Compare commits

...
Author SHA1 Message Date
Zoltan Kochan 987541b4df feat: check the verification log before caching it
Moving the upload to just after the install left one window open: pnpm runs a
package's lifecycle scripts during the install, so an allow-listed dependency
can still append a record claiming some other lockfile passed verification, and
the upload would publish it. Writing pnpm's own record after those scripts
would not help — the log is appended to, so the forged record survives whatever
pnpm writes next to it.

What does distinguish the two is shape: an install appends its own verdict and
leaves earlier records untouched. So the log is uploaded only when every record
that predated the install is still there, and no more records were added than
there were installs. Both failure modes cost a re-verification in the next job
and nothing else, which is also the price of pnpm compacting the log past a
thousand records — rare enough in CI, where a job restores at most one record.
2026-08-13 17:13:55 +02:00
Zoltan Kochan 34f0a19e27 docs: put lifecycle scripts on the right side of the upload
The previous commit listed a dependency's own scripts among the things that
run after the install, which is where they do not run: pnpm executes them
during the install, ahead of the upload, so they stay inside the window rather
than being closed out of it. What keeps that narrow is that pnpm refuses to
run them at all — `ERR_PNPM_IGNORED_BUILDS` — unless the repository
allow-lists the package, and such a package can already run code in the job.
2026-08-13 17:09:12 +02:00
Zoltan Kochan e6cb65ab2f fix: upload the verification log right after the install writes it
Saving in the post step left the whole job between the install and the upload.
Anything running in that window — the job's tests, its build, a dependency's
own install scripts — can rewrite the log on disk, and the job's own cache
write would then publish a record claiming some other lockfile passed
verification, for every later job to restore and trust. No cache credentials
needed: the attacker rides the write the job performs anyway.

The log is complete the moment the install finishes, so it is uploaded there.
The post step still covers a job that installs in a step of its own, where
that is the first point the log is known to be final; the save is idempotent
across the two, and the process-local flags exist because main and post do not
share state within a run.
2026-08-13 17:03:37 +02:00
Zoltan Kochan b543421fa5 feat: cache the lockfile verification log regardless of cache
The log is under a kilobyte and pnpm writes it on every install, not only
where supply-chain policies are configured: the integrity and tarball-URL
checks are unconditional. A job that starts without it re-checks every
lockfile entry against the registry — on a ~2000-entry lockfile with a warm
store, 13.5s vs 1.5s with `minimumReleaseAge` and `trustPolicy` configured,
and still 6.7s vs 1.6s with no policies at all.

Tying that to the `cache` input made the common case slow for no saving worth
counting, so the log is now restored and saved on its own key whether or not
the store is cached. `cache` goes back to meaning what its name says.
2026-08-13 16:56:49 +02:00
Zoltan Kochan 544072d0b9 docs: tighten the verification cache comments
The module header explained the whole feature where naming the file's purpose
is enough, and the ordering comment described `pnpm store prune` deleting the
log without saying which versions do — pnpm/pnpm#13893 stops deleting it.
2026-08-13 16:47:45 +02:00
Zoltan Kochan f141ddd75f fix: normalize Windows extended-length store paths
On a Windows runner pnpm 12 reports a store path like
`\\?\D:\.pnpm-store\v11`, and the post step then fails with
"Invalid pattern. Root segment must not contain globs" — the cache toolkit
reads the `?` in that prefix as a glob in the root segment. Cache APIs do not
need the extended-length form, so the path is converted back to a regular
drive or UNC path, the same way pnpm/setup handles it.

Reported in pnpm/action-setup#286 and reproduced by the Windows leg of the
lockfile verification cache job.
2026-08-13 14:05:26 +02:00
Zoltan Kochan c0a6b0ff36 perf: cache pnpm's lockfile verification results
pnpm v11 and newer verify every lockfile entry against the configured
supply-chain policies (`minimumReleaseAge`, `trustPolicy`, ...) and memoize
the verdict in `<cacheDir>/lockfile-verified.jsonl`. The action cached only
the store, so every job started with that verdict missing and re-checked the
whole lockfile against the registry — on typescript-eslint's repository,
16.6s of a 17.6s install on Linux and 40.1s of 42.4s on Windows.

The verdict depends on the lockfile content and the policies, never on the
runner, so it is cached under its own key alongside the store cache and
restored without prefix fallback: an entry recorded for a different lockfile
could never be reused. Saving happens before `pnpm store prune`, which drops
the log along with the store's other derived state.

Anything that goes wrong here only costs the next job the re-verification, so
failures are reported as warnings instead of failing the build. Older pnpm
versions never write the log, and the post step then finds nothing to save.
2026-08-13 13:59:37 +02:00
Eric Nemchik 0977fd9972 docs: Update README to include devEngines.packageManager (#273)
Support added in #211 and #256
2026-08-03 13:44:13 +02:00
Jamie TannaandClaude Sonnet 5 48261aca05 fix: update pnpm to v11.19.0 (#283)
* fix: update pnpm to v11.19.0

Via `scripts/update-bootstrap.mjs 11.19.0`

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>

* fixup! fix: update pnpm to v11.19.0

As it needs to be rebuilt on Linux.

---------

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-08-03 11:54:52 +02:00
Jamie Tanna 75677f717d ci: use pnpm 11 for pr-check (#284)
Noticed while working on #283.
2026-08-03 11:02:17 +02:00
Sukka 769ae71fb3 refactor: introduce restore keys for cache (#280) 2026-08-03 10:32:23 +02:00
Kevin Cui 6fed91f804 docs(README): point users to the successor pnpm/setup action (#282)
* docs(README): point users to the successor pnpm/setup action

The pnpm setup action has moved to `pnpm/setup`, which installs
pnpm v11+ as a self-contained native executable and can install a
JavaScript runtime (Node.js, Bun, or Deno) in the same step,
replacing `actions/setup-node`.

Add a notice at the top of the README, a migration section with a
before/after workflow example and an input/output mapping table,
and mention the successor in the Notes section. The rest of the
docs stay intact since `pnpm/action-setup` remains the way to
install pnpm v10 and older.

Signed-off-by: Kevin Cui <bh@bugs.cc>

* docs(README): address review feedback on migration section

Add an explicit version: 11 to the migration example and note when the
input can be omitted, since pnpm/setup requires pnpm v11+ and a repo
migrating from version: 10 may have no packageManager field or one that
pins v10.

Move the v2 upgrade warning below the page title so the two callouts
are no longer adjacent blockquotes (markdownlint MD028), keeping the
successor notice and the legacy warning as separate blocks.

Fix the comma splice and use "set up" as the verb in the Notes
section.

Signed-off-by: Kevin Cui <bh@bugs.cc>

---------

Signed-off-by: Kevin Cui <bh@bugs.cc>
2026-08-02 22:56:56 -04:00
Zoltan Kochan 0ebf47130e fix: update pnpm to v11.7.0 (#267)
* fix: update pnpm to v11.7.0

* fix: update bundle
2026-06-15 14:04:13 +02:00
mungodewarandZoltan Kochan 0e279bb959 fix: update pnpm to 11.1.1 (#248)
* fix: update pnpm to v11.1.1

* fix: update bundle

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2026-05-12 14:32:25 +02:00
Zoltan Kochan 3e835812ef fix: drop patchPnpmEnv so standalone+self-update works on Windows (#258)
`patchPnpmEnv` prepended `dest/node_modules/.bin` to PATH before
spawning `pnpm install` / `pnpm store prune`. On Windows in standalone
mode, `.bin/pnpm.cmd` is an npm-created shim that always points at the
BOOTSTRAP pnpm (currently 11.0.4) — the binary npm linked when it
installed `@pnpm/exe` into `node_modules`. The self-updated pnpm
written by `pnpm self-update` lives at `$PNPM_HOME/bin`, which is
separately added to PATH via `addPath()` in install-pnpm.

When the user requested a pnpm version different from the bootstrap
under `standalone: true` on Windows, patchPnpmEnv's `.bin` entry
shadowed the self-updated `$PNPM_HOME/bin` and the action's internal
`pnpm install` ran on the bootstrap. On a pnpm 11.0.x bootstrap this
broke any 11.1+ install flag (e.g. `--no-runtime`), reporting:

    ERROR  Unknown option: 'runtime'

POSIX standalone got lucky because `.bin` and `$PNPM_HOME` resolve to
the same directory there. Non-standalone never tripped on this since
the `.bin/pnpm` symlink for a regular `pnpm` package keeps working
across self-updates.

Removed `patchPnpmEnv` and the now-empty `src/utils/` module.
`spawnSync` now inherits `process.env`, whose PATH is already
correctly fronted by `$PNPM_HOME/bin` and `$PNPM_HOME` via the
`addPath` calls in install-pnpm.

Added `standalone_windows_self_update` to test.yaml as a regression
guard: standalone on Windows + target 11.1.0 + `run_install` with
`--no-runtime`. With the previous code, the install would have run
under the bootstrap (11.0.4) and errored on the unknown flag.

Originally found while building pnpm/setup (the new combined
pnpm + runtime action).
2026-05-11 22:48:51 +02:00
Andrew Haines 551b42e879 docs(README): fix cache_dependency_path type (#257)
* docs(README): fix `cache_dependency_path` type

* docs(README): add multiple lockfile example

* docs: update input description to match README
2026-05-11 16:41:41 +02:00
Zoltan Kochan 739bfe42ca fix: self-update bootstrap to packageManager-pinned version (#233) (#256)
* fix: self-update bootstrap to packageManager-pinned version (#233)

When package.json pins pnpm via `packageManager` or an exact
`devEngines.packageManager.version`, self-update the bootstrap up
front. The bootstrap's `pnpm store path` skips pnpm's auto-switch
(the `store` command sets `skipPackageManagerCheck = true`), so it
reports the bootstrap's `STORE_VERSION` while the user's actual
install runs under the pinned version and writes to a different
STORE_VERSION — breaking `cache: true` and `setup-node`'s
`cache: pnpm` on cold caches.

* fix: check bin/ dir instead of pnpm.exe for self-update detection

On Windows pnpm self-update writes `.bin/bin/pnpm` (a JS launcher),
not `.bin/bin/pnpm.exe`, so the previous existsSync probe always
fell back to pnpmHome and the bin_dest output pointed at the
bootstrap pnpm. Check whether the `bin` directory itself exists.

* fix: self-update accepts ranges; drop exact-semver gate

`pnpm self-update` resolves semver ranges to a specific version, so
`devEngines.packageManager.version: ">=10 <11"` can also go through
the self-update path. That makes readTargetVersion total — it always
returns a string or throws — so the runtime auto-switch fallback (and
the `pnpm_config_pm_on_fail=download` export from #252) is no longer
reachable and gets removed.

Adds a range case to the cache_store_path matrix.
2026-05-11 14:06:33 +02:00
Zoltan Kochan f61705d907 chore: add CODEOWNERS 2026-05-11 12:46:12 +02:00
Andrew Haines 7a5507b117 fix: restore inputs from state in post (#255) 2026-05-11 12:44:49 +02:00
Zoltan Kochan 1155470f3e fix: honor devEngines.packageManager.onFail=error (#252) (#254)
## Summary
- Export `pnpm_config_pm_on_fail=download` from the action so the bootstrap pnpm switches versions via `manage-package-manager-versions` instead of throwing `BAD_PM_VERSION` when a project pins `devEngines.packageManager.onFail = "error"` without supplying a `version:` input.
- Adds a `test_dev_engines_on_fail_error` workflow job (Linux/macOS/Windows, exact + range) that reproduces #252.

Fixes #252.
2026-05-11 01:51:30 +02:00
Zoltan Kochan 91ab88e261 fix: bin_dest output points to self-updated pnpm, not bootstrap (#249)
* fix: bin_dest output points to self-updated pnpm, not bootstrap (#247)

`pnpm self-update <version>` writes the target binary to
`${PNPM_HOME}/bin/`, leaving the bootstrap symlink at `${PNPM_HOME}/pnpm`
untouched. The `bin_dest` output was set to `${PNPM_HOME}`, so consumers
invoking `${{ steps.pnpm.outputs.bin_dest }}/pnpm` got the bootstrap
version (currently 11.0.4) instead of the version they requested.

PATH lookup hid the bug: `${PNPM_HOME}/bin` was prepended ahead of
`${PNPM_HOME}`, so `pnpm` resolved from PATH was the right one. Existing
version-respect tests only checked `pnpm --version`, not `bin_dest`.

Resolve `binDest` inside `runSelfInstaller` (target lives in
`${PNPM_HOME}/bin` after self-update, otherwise stays at `${PNPM_HOME}`)
and plumb it through to `setOutputs`. Add a regression test that invokes
`${bin_dest}/pnpm --version` directly across Linux/macOS/Windows.

* test(ci): pass bin_dest via env to survive Windows backslashes

Direct GitHub-expression interpolation of `${{ steps.pnpm.outputs.bin_dest }}`
into the bash script let bash eat the backslashes in the Windows path
(`C:Usersrunneradminsetup-pnpmnode_modules.binbin/pnpm`), failing with
"No such file or directory". Forward the value via env so the path
reaches bash unmangled.

* build: rebuild dist with clean lockfile-matched deps
2026-05-07 12:58:58 +02:00
Zoltan Kochan e578e19d19 fix: update pnpm to 11.0.4 2026-05-04 12:08:02 +02:00
Zoltan Kochan 8912a9102a fix: append (not prepend) action node dir to PATH for npm bootstrap (#241) 2026-05-02 16:10:46 +02:00
Ben QuarmbyandZoltan Kochan 26f6d4f2c5 fix: use npm co-located with the action node binary (#239)
* fix: use npm co-located with the action node binary

* fix: resolve npm by absolute path; guard against unset PATH

Follow-up to 5a9e198. Two refinements to the GHE self-hosted runner fix:

- Spawn npm via `path.join(dirname(process.execPath), 'npm[.cmd]')`
  instead of relying on PATH lookup. This matches the original PR
  description and is robust against PATH-shadowed npm installations.
- Avoid `"<dir>:undefined"` leaking into PATH when `process.env.PATH`
  is unset (rare, but possible in stripped environments).

PATH still has the node directory prepended so npm's
`#!/usr/bin/env node` shebang can resolve node on Linux/macOS.

* fix: revert npm to PATH lookup; runner externals lacks npm

Revert 42e75a1's switch to absolute-path npm resolution. The premise
that npm is co-located with the action's node binary is false on
GitHub-hosted runners: `process.execPath` points into
`runner/externals/node24/bin/`, which contains node only — not npm.
The absolute-path spawn produced ENOENT on Linux/macOS and
"not recognized" on Windows.

Go back to spawning `'npm'` and relying on PATH lookup, which works
on standard runners (npm is on PATH from the runner image) and on
the GHE self-hosted setup that motivated the original fix. Keep the
node-directory prepend so npm's `#!/usr/bin/env node` shebang
resolves, and keep the unset-PATH guard.

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2026-04-30 22:28:41 +02:00
Zoltan Kochan 903f9c1a6e fix: update pnpm to 11.0.0-rc.5 2026-04-21 20:27:39 +02:00
Zoltan Kochan bdf0af2a9d test: add strict version-match jobs to reproduce #225 / #227
The existing version tests only check output format via regex, which is
why the PATH-shadowing bug (#230) slipped through — the bootstrap pnpm's
version string matched the regex just as well as the requested version.

- test_version_respects_request: runs the action with `version: 9.15.5`
  and `version: 10.33.0` (both differ from the bootstrap) and asserts
  that `pnpm --version` matches exactly. Regression test for #225/#230.

- test_package_manager_field: writes a `packageManager: pnpm@<v>` entry
  into package.json, runs the action with no `version:` input, and
  asserts exact match. Reproduces #227; currently expected to fail
  since `packageManager` extraction was intentionally not added.
2026-04-18 15:20:30 +02:00
oniani1 71c92474e7 fix: pnpm self-update binary shadowed by bootstrap on PATH (#230)
Problem
pnpm self-update installs the target version to PNPM_HOME/bin/pnpm, but the bootstrap binary at PNPM_HOME/pnpm has higher PATH precedence because addPath(pnpmHome) was called after addPath(pnpmHome/bin). @actions/core's addPath prepends, so the later call wins — the bootstrap version shadows the self-updated binary.

Fix
Swap the addPath call order so PNPM_HOME/bin (where self-update puts the target binary) has higher PATH precedence. The bootstrap pnpm is invoked via absolute path, so this doesn't affect the bootstrap step.
2026-04-18 15:00:23 +02:00
Zoltan Kochan 078e9d4164 fix: update pnpm to 11.0.0-rc.2 2026-04-18 00:36:06 +02:00
Zoltan Kochan 08c4be7e2e docs(README): update action-setup version 2026-04-10 23:08:33 +02:00
Zoltan Kochan 579891461a chore: update .gitignore 2026-04-10 23:03:10 +02:00
Zoltan Kochan ddffd66754 fix: remove accidentally committed file 2026-04-10 23:02:48 +02:00
Zoltan Kochan b43f991918 fix: update pnpm to 11.0.0-rc.0 2026-04-10 23:00:38 +02:00
Andreas Deininger 3852509c9e README.md: bring versions up-to-date (#222) 2026-04-10 22:48:51 +02:00
Zoltan Kochan 6e7bdbda5f chore: bump bootstrap pnpm to 11.0.0-beta.4-1 and add update script
Add `pnpm run update-bootstrap [version]` to regenerate the bootstrap
lockfiles. Bumps from 11.0.0-beta.3 to 11.0.0-beta.4-1.
2026-03-30 00:09:19 +02:00
Zoltan Kochan 6b87c4621a fix: Windows standalone mode — bypass broken npm shims (#217)
* fix: overwrite npm .cmd wrappers for @pnpm/exe on Windows

npm creates .cmd wrappers that invoke bin entries through `node`,
but @pnpm/exe bins are native executables, not JavaScript files.
This causes pnpm commands to silently fail on Windows.

* fix: copy pnpm.exe to .bin/ on Windows for standalone mode

The .cmd wrapper approach didn't work because CMD doesn't properly
wait for extensionless PE binaries. Instead, copy the actual .exe
(and .cmd for pnpx) from @pnpm/exe into .bin/ so PATHEXT finds
pnpm.exe directly, bypassing npm's broken node-wrapping shim.

* fix: add @pnpm/exe dir to PATH on Windows instead of .bin shims

On Windows, npm's .bin shims can't properly execute the extensionless
native binaries from @pnpm/exe. Instead of trying to fix the shims,
add the @pnpm/exe directory directly to PATH where pnpm.exe lives.

* test: validate pnpm --version output in CI

All version checks now capture output and assert it matches a semver
pattern. Previously, a silently failing pnpm (exit 0, no output)
would pass the tests.

* debug: log pnpm --version output during setup

* fix: remove duplicate addPath in setOutputs that shadowed pnpm.exe

setOutputs called addPath(node_modules/.bin) AFTER installPnpm had
already added the correct path (@pnpm/exe on Windows). Since
GITHUB_PATH entries are prepended, .bin ended up first in PATH,
causing PowerShell to find npm's broken shims instead of pnpm.exe.

* fix: add PNPM_HOME/bin to PATH on all platforms

* fix: address review feedback — PATH ordering and regex anchoring

- Swap addPath order so pnpmHome (with pnpm.exe) is prepended last
  and has highest precedence over pnpmHome/bin.
- Anchor version regex with $ and allow prerelease suffixes.
2026-03-27 20:42:10 +01:00
Zoltan KochanandClaude Opus 4.6 994d756a33 feat: read pnpm version from devEngines.packageManager (#211)
* feat: read pnpm version from devEngines.packageManager field

When no version is specified in the action config or the packageManager
field of package.json, fall back to devEngines.packageManager.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: skip self-update for devEngines.packageManager and add CI tests

pnpm auto-switches to the right version when devEngines.packageManager
is set, so self-update is unnecessary. This also enables range support
(e.g. ">=9.15.0") which self-update doesn't handle.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 11:10:47 +01:00
22 changed files with 1236 additions and 377 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
* @zkochan
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with: with:
run_install: true run_install: true
version: 9 version: 11
- name: Update dist/index.js - name: Update dist/index.js
run: pnpm run build run: pnpm run build
+303 -63
View File
@@ -1,39 +1,76 @@
name: Test Action name: Test Action
on: on:
- push pull_request:
- pull_request push:
- workflow_dispatch branches:
- master
workflow_dispatch:
jobs: jobs:
test_default_inputs: smoke:
name: Test with default inputs # Cross-OS coverage. Exercises the bootstrap install + PATH on each platform,
# the version-respects-request regression (#225 / #230 — Windows PATH shadow),
# and the bin_dest output regression (#247). Multi-version coverage on Linux
# so we don't pay 3x for major-version differences.
name: 'Smoke (${{ matrix.name }})'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
pnpm: include:
- 9.15.5 - name: 'ubuntu / v9.15.5'
os: os: ubuntu-latest
- ubuntu-latest version: '9.15.5'
- macos-latest - name: 'ubuntu / v10.33.0'
- windows-latest os: ubuntu-latest
version: '10.33.0'
- name: 'ubuntu / v9.15.5 / custom-dest'
os: ubuntu-latest
version: '9.15.5'
dest: '~/test/pnpm'
- name: 'macos / v9.15.5'
os: macos-latest
version: '9.15.5'
- name: 'windows / v9.15.5'
os: windows-latest
version: '9.15.5'
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Run the action - id: pnpm
name: Run the action
uses: ./ uses: ./
with: with:
version: 9.15.5 version: ${{ matrix.version }}
dest: ${{ matrix.dest || '~/setup-pnpm' }}
- name: 'Test: which' - name: 'Test: pnpm/pnpx on PATH report the requested version (incl. via bin_dest)'
run: which pnpm; which pnpx # Pass paths via env, not template interpolation, so Windows
# backslashes in `bin_dest` aren't eaten by bash's escape handling.
- name: 'Test: version' env:
run: pnpm --version BIN_DEST: ${{ steps.pnpm.outputs.bin_dest }}
REQUIRED: ${{ matrix.version }}
run: |
set -e
which pnpm
which pnpx
actual="$(pnpm --version)"
echo "pnpm --version: ${actual}"
if [ "${actual}" != "${REQUIRED}" ]; then
echo "Expected pnpm version ${REQUIRED}, but got ${actual}"
exit 1
fi
bin_dest_version="$("$BIN_DEST/pnpm" --version)"
echo "bin_dest pnpm --version: ${bin_dest_version}"
if [ "${bin_dest_version}" != "${REQUIRED}" ]; then
echo "Expected ${REQUIRED} via bin_dest, but got ${bin_dest_version}"
exit 1
fi
shell: bash
- name: 'Test: install in a fresh project' - name: 'Test: install in a fresh project'
run: | run: |
@@ -43,47 +80,95 @@ jobs:
pnpm add is-odd pnpm add is-odd
shell: bash shell: bash
test_dest: manifest_pin:
name: Test with dest # Folds the old test_package_manager_field, test_dev_engines, and
# test_dev_engines_on_fail_error jobs. The action's manifest handling is
# OS-independent, so ubuntu-only is sufficient.
name: 'Manifest pin: ${{ matrix.label }}'
runs-on: ${{ matrix.os }} runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
pnpm: include:
- 9.15.5 - label: 'packageManager pnpm@9.15.5 (#227)'
os: manifest: '{"packageManager":"pnpm@9.15.5"}'
- ubuntu-latest version: '9.15.5'
- macos-latest - label: 'packageManager pnpm@10.33.0'
- windows-latest manifest: '{"packageManager":"pnpm@10.33.0"}'
version: '10.33.0'
- label: 'devEngines onFail=download, exact'
manifest: '{"devEngines":{"packageManager":{"name":"pnpm","version":"9.15.5","onFail":"download"}}}'
version: '9.15.5'
- label: 'devEngines onFail=download, range'
manifest: '{"devEngines":{"packageManager":{"name":"pnpm","version":">=9.15.0","onFail":"download"}}}'
version: '>=9.15.0'
- label: 'devEngines onFail=error, exact (#252)'
manifest: '{"devEngines":{"packageManager":{"name":"pnpm","version":"9.15.5","onFail":"error"}}}'
version: '9.15.5'
- label: 'devEngines onFail=error, range (#252)'
manifest: '{"devEngines":{"packageManager":{"name":"pnpm","version":">=9.15.0","onFail":"error"}}}'
version: '>=9.15.0'
- label: 'explicit version: pnpm_config_pm_on_fail not exported'
# Regression guard for the af8e203 scope fix: when the user passes an
# explicit `version:` input, the action must NOT export
# pnpm_config_pm_on_fail=download, so the user's strict onFail policy
# is preserved. Asserted directly on the env var rather than pnpm
# runtime behavior — different pnpm majors read devEngines
# differently (v10 ignores it, v11+ honors it).
manifest: '{"devEngines":{"packageManager":{"name":"pnpm","version":"9.15.5","onFail":"error"}}}'
explicit_version: '10.33.0'
expect_pm_on_fail_unset: true
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Set up package.json
run: echo '${{ matrix.manifest }}' > package.json
shell: bash
- name: Run the action - name: Run the action
uses: ./ uses: ./
with: with:
version: 9.15.5 version: ${{ matrix.explicit_version }}
dest: ~/test/pnpm
- name: 'Test: which' - name: 'Test: pnpm reports the pinned version'
run: which pnpm && which pnpx if: ${{ !matrix.expect_pm_on_fail_unset }}
env:
REQUIRED: ${{ matrix.version }}
run: |
set -e
actual="$(pnpm --version)"
echo "pnpm version: ${actual}"
if [ "${REQUIRED}" = ">=9.15.0" ]; then
min="9.15.0"
if [ "$(printf '%s\n' "${min}" "${actual}" | sort -V | head -n1)" != "${min}" ]; then
echo "Expected pnpm version >= ${min}, but got ${actual}"
exit 1
fi
else
if [ "${actual}" != "${REQUIRED}" ]; then
echo "Expected pnpm version ${REQUIRED}, but got ${actual}"
exit 1
fi
fi
shell: bash
- name: 'Test: version' - name: 'Test: pnpm_config_pm_on_fail not exported (explicit version preserves strict policy)'
run: pnpm --version if: ${{ matrix.expect_pm_on_fail_unset }}
run: |
if [ -n "${pnpm_config_pm_on_fail:-}" ]; then
echo "Expected pnpm_config_pm_on_fail to be unset, but got: '${pnpm_config_pm_on_fail}'"
exit 1
fi
echo "pnpm_config_pm_on_fail is unset, as expected"
shell: bash
test_standalone: standalone:
name: Test with standalone name: Standalone mode
runs-on: ${{ matrix.os }} runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
@@ -94,34 +179,125 @@ jobs:
version: 9.15.0 version: 9.15.0
standalone: true standalone: true
- name: 'Test: which' - name: 'Test: pnpm works'
run: which pnpm
- name: 'Test: version'
run: pnpm --version
- name: 'Test: install in a fresh project'
run: | run: |
set -e
which pnpm
actual="$(pnpm --version)"
if [ "${actual}" != "9.15.0" ]; then
echo "Expected 9.15.0, got ${actual}"
exit 1
fi
mkdir /tmp/test-standalone mkdir /tmp/test-standalone
cd /tmp/test-standalone cd /tmp/test-standalone
pnpm init pnpm init
pnpm add is-odd pnpm add is-odd
shell: bash shell: bash
test_run_install: standalone_windows_self_update:
name: 'Test with run_install (${{ matrix.run_install.name }}, ${{ matrix.os }})' # Regression guard for the patchPnpmEnv PATH-shadow bug. When
# standalone: true on Windows AND the requested pnpm differs from the
# bootstrap, the previous patchPnpmEnv prepended node_modules/.bin to
# PATH; that directory contains an npm-created pnpm.cmd shim pointing
# at the BOOTSTRAP pnpm, which shadowed the self-updated pnpm at
# $PNPM_HOME/bin and caused `pnpm install` inside the action to run
# under the bootstrap version. Exercising a newer-pnpm-only flag
# (`--no-runtime`, added in 11.1.0) makes the regression assertable:
# if the bootstrap (11.0.4) handles the install, it errors with
# "Unknown option: 'runtime'".
name: 'Standalone Windows self-update (PATH regression)'
runs-on: windows-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
runs-on: ${{ matrix.os }} - name: Set up package.json with a minimal manifest
# run_install needs a manifest to install against. Removing the
# repo's existing pnpm-lock.yaml avoids frozen-lockfile mismatch.
run: |
rm -f pnpm-lock.yaml
echo '{"name":"sw","private":true,"packageManager":"pnpm@11.1.0"}' > package.json
shell: bash
- name: Run the action
uses: ./
with:
version: 11.1.0
standalone: true
run_install: |
args: ['--no-runtime']
- name: 'Test: pnpm install completed under the self-updated pnpm'
# If the bug recurs, the previous step's run_install will have failed
# the job with "Unknown option: 'runtime'", so reaching this step
# implies success. Still verify the version on PATH matches request.
env:
REQUIRED: '11.1.0'
run: |
set -e
actual="$(pnpm --version)"
echo "pnpm --version: ${actual}"
if [ "${actual}" != "${REQUIRED}" ]; then
echo "Expected pnpm ${REQUIRED}, got ${actual}"
exit 1
fi
shell: bash
cache_store_path:
# Regression guard for #233. When package.json pins a pnpm major that
# differs from the bootstrap pnpm's major, the bootstrap reports its
# own STORE_VERSION from `pnpm store path` (the `store` command skips
# pnpm's auto-switch). The user's actual `pnpm install` runs under the
# pinned version and writes to a different STORE_VERSION, so the post
# step's saveCache then fails with "Path Validation Error". The fix is
# to self-update the bootstrap to the pinned version up front.
name: 'Cache store path matches install (#233): ${{ matrix.label }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- label: 'packageManager pnpm@10.33.0'
manifest: '{"packageManager":"pnpm@10.33.0","dependencies":{"is-odd":"3.0.1"}}'
- label: 'devEngines exact pnpm@10.33.0'
manifest: '{"devEngines":{"packageManager":{"name":"pnpm","version":"10.33.0"}},"dependencies":{"is-odd":"3.0.1"}}'
- label: 'devEngines range >=10 <11'
manifest: '{"devEngines":{"packageManager":{"name":"pnpm","version":">=10 <11"}},"dependencies":{"is-odd":"3.0.1"}}'
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Set up package.json
run: echo '${{ matrix.manifest }}' > package.json
shell: bash
- id: pnpm
uses: ./
with:
cache: true
run_install: |
- args: [--no-frozen-lockfile]
- name: 'Test: store path computed by the action exists on disk'
run: |
set -e
actual="$(pnpm store path --silent)"
echo "pnpm store path: ${actual}"
if [ ! -d "${actual}" ]; then
echo "Expected store path to exist on disk; cache save would fail"
exit 1
fi
shell: bash
run_install:
name: 'run_install (${{ matrix.run_install.name }})'
runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
pnpm:
- 9.15.5
os:
- ubuntu-latest
- macos-latest
- windows-latest
run_install: run_install:
- name: 'null' - name: 'null'
value: 'null' value: 'null'
@@ -142,8 +318,72 @@ jobs:
version: 9.15.5 version: 9.15.5
run_install: ${{ matrix.run_install.value }} run_install: ${{ matrix.run_install.value }}
- name: 'Test: which' - name: 'Test: pnpm works'
run: which pnpm; which pnpx run: |
set -e
which pnpm
which pnpx
actual="$(pnpm --version)"
if [ "${actual}" != "9.15.5" ]; then
echo "Expected 9.15.5, got ${actual}"
exit 1
fi
shell: bash
- name: 'Test: version' cache_lockfile_verification:
run: pnpm --version # The action caches pnpm's lockfile verification log, which lives in
# `cacheDir` — a directory pnpm resolves per platform and does not print.
# Guard the action's copy of that default against pnpm's own.
name: 'Lockfile verification cache (${{ matrix.os }}, cache=${{ matrix.cache }})'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# The log is cached independently of the store, so the store-less
# configuration has to reach it too.
- os: ubuntu-latest
cache: false
- os: ubuntu-latest
cache: true
- os: macos-latest
cache: true
- os: windows-latest
cache: true
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Set up a project with a supply-chain policy
# A one-minute floor activates the verification without holding back
# any version the install resolves.
run: |
echo '{"dependencies":{"is-odd":"3.0.1"}}' > package.json
printf 'packages:\n - .\nminimumReleaseAge: 1\n' > pnpm-workspace.yaml
shell: bash
- uses: ./
with:
version: '12.0.0-rc.4'
cache: ${{ matrix.cache }}
run_install: |
- args: [--no-frozen-lockfile]
- name: 'Test: pnpm wrote the verification log where the action looks for it'
run: |
set -e
case "$RUNNER_OS" in
Linux) cacheDir="${XDG_CACHE_HOME:-$HOME/.cache}/pnpm" ;;
macOS) cacheDir="$HOME/Library/Caches/pnpm" ;;
Windows) cacheDir="$(cygpath -u "$LOCALAPPDATA")/pnpm-cache" ;;
*) echo "Unexpected RUNNER_OS: $RUNNER_OS"; exit 1 ;;
esac
echo "Expecting the verification log in ${cacheDir}"
if [ ! -f "${cacheDir}/lockfile-verified.jsonl" ]; then
echo "No lockfile-verified.jsonl there; the action would cache nothing"
ls -la "${cacheDir}" || true
exit 1
fi
shell: bash
+1
View File
@@ -9,3 +9,4 @@ temp
tmp.* tmp.*
temp.* temp.*
.pnpm-store .pnpm-store
.claude
+112 -16
View File
@@ -1,20 +1,70 @@
> ## :warning: Upgrade from v2! > [!IMPORTANT]
> **This action has a successor: [`pnpm/setup`](https://github.com/pnpm/setup).**
> >
> The v2 version of this action [has stopped working](https://github.com/pnpm/action-setup/issues/135) with newer Node.js versions. Please, upgrade to the latest version to fix any issues. > For pnpm v11 and newer, use [`pnpm/setup`](https://github.com/pnpm/setup) instead. It downloads pnpm's self-contained release binary (no Node.js or npm required) and can install a JavaScript runtime (Node.js, Bun, or Deno) in the same step, replacing `actions/setup-node`.
>
> `pnpm/action-setup` remains the action to use for installing pnpm v10 and older. See [Migrating to pnpm/setup](#migrating-to-pnpmsetup) below.
# Setup pnpm # Setup pnpm
Install pnpm package manager. Install pnpm package manager.
> ## :warning: Upgrade from v2!
>
> The v2 version of this action [has stopped working](https://github.com/pnpm/action-setup/issues/135) with newer Node.js versions. Please, upgrade to the latest version to fix any issues.
## Migrating to pnpm/setup
[`pnpm/setup`](https://github.com/pnpm/setup) installs pnpm v11+ as a native standalone executable and can install Node.js, Bun, or Deno in the same step, so a typical workflow no longer needs `actions/setup-node` or an explicit `pnpm install` step:
```yaml
steps:
- uses: actions/checkout@v6
# Before:
# - uses: pnpm/action-setup@v6
# with:
# version: 10
# cache: true
# - uses: actions/setup-node@v4
# with:
# node-version: 22
# - run: pnpm install
# After:
- uses: pnpm/setup@v1
with:
version: 11
runtime: node@22
cache: true
```
The `version` input can be omitted only when `packageManager` (or `devEngines.packageManager`) in `package.json` declares pnpm v11 or newer; otherwise keep it explicit, since `pnpm/setup` requires pnpm v11+.
Input and output changes:
| `pnpm/action-setup` | `pnpm/setup` | Notes |
| ------------------- | ------------ | ----- |
| `version` | `version` | Must resolve to pnpm v11 or newer. As before, it can be omitted when `packageManager` (or `devEngines.packageManager`) is set in `package.json`. |
| `dest` | `dest` | Unchanged. |
| `run_install` | `install` | `pnpm/setup` runs `pnpm install` automatically when a `package.json` is present (`install: true` by default); set `install: false` to skip it. The object/array form (`recursive`, `cwd`, `args`) is not supported — run those commands in separate steps. |
| `cache` | `cache` | Unchanged. |
| `cache_dependency_path` | `cache-dependency-path` | Renamed to kebab-case. |
| `package_json_file` | `package-json-file` | Renamed to kebab-case. |
| `standalone` | removed | `pnpm/setup` always installs the standalone native executable. |
| n/a | `runtime` | New: installs Node.js, Bun, or Deno (e.g. `node@22`, `bun@latest`, `deno@2`), or reads `devEngines.runtime` from `package.json`. |
| n/a | `token` | New: GitHub token for release lookup; defaults to `${{ github.token }}` and rarely needs to be set. |
| `bin_dest` (output) | `bin-dest` (output) | Renamed to kebab-case. New outputs `runtime-name` and `runtime-version` describe the installed runtime. |
## Inputs ## Inputs
### `version` ### `version`
Version of pnpm to install. Version of pnpm to install.
**Optional** when there is a [`packageManager` field in the `package.json`](https://nodejs.org/api/corepack.html). **Optional** when there is a [`packageManager` or `devEngines.packageManager` field in the `package.json`](https://nodejs.org/api/corepack.html).
otherwise, this field is **required** It supports npm versioning scheme, it could be an exact version (such as `6.24.1`), or a version range (such as `6`, `6.x.x`, `6.24.x`, `^6.24.1`, `*`, etc.), or `latest`. otherwise, this field is **required** It supports npm versioning scheme, it could be an exact version (such as `10.9.8`), or a version range (such as `10`, `10.x.x`, `10.9.x`, `^10.9.8`, `*`, etc.), or `latest`.
### `dest` ### `dest`
@@ -44,15 +94,15 @@ If `run_install` is a YAML string representation of either an object or an array
### `cache` ### `cache`
**Optional** (_type:_ `boolean`, _default:_ `false`) Whether to cache the pnpm store directory. **Optional** (_type:_ `boolean`, _default:_ `false`) Whether to cache the pnpm store directory, keyed on the lockfile's content hash. On pnpm v11 and newer, the results of pnpm's lockfile verification are cached regardless of this input — see [Lockfile verification cache](#lockfile-verification-cache).
### `cache_dependency_path` ### `cache_dependency_path`
**Optional** (_type:_ `string|string[]`, _default:_ `pnpm-lock.yaml`) File path to the pnpm lockfile, which contents hash will be used as a cache key. **Optional** (_type:_ `string`, _default:_ `pnpm-lock.yaml`) File path to the pnpm lockfile, whose contents hash will be used as a cache key. Accepts multiple paths delimited by newlines.
### `package_json_file` ### `package_json_file`
**Optional** (_type:_ `string`, _default:_ `package.json`) File path to the `package.json`/[`package.yaml`](https://github.com/pnpm/pnpm/pull/1799) to read "packageManager" configuration. **Optional** (_type:_ `string`, _default:_ `package.json`) File path to the `package.json`/[`package.yaml`](https://github.com/pnpm/pnpm/pull/1799) to read `packageManager` or `devEngines.packageManager` configuration.
### `standalone` ### `standalone`
@@ -74,7 +124,7 @@ Location of `pnpm` and `pnpx` command.
### Install only pnpm without `packageManager` ### Install only pnpm without `packageManager`
This works when the repo either doesn't have a `package.json` or has a `package.json` but it doesn't specify `packageManager`. This works when the repo either doesn't have a `package.json` or has a `package.json` but it doesn't specify `packageManager` or `devEngines.packageManager`.
```yaml ```yaml
on: on:
@@ -86,14 +136,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: pnpm/action-setup@v5 - uses: pnpm/action-setup@v6
with: with:
version: 10 version: 10
``` ```
### Install only pnpm with `packageManager` ### Install only pnpm with `packageManager`
Omit `version` input to use the version in the [`packageManager` field in the `package.json`](https://nodejs.org/api/corepack.html). Omit `version` input to use the version in the [`packageManager` or `devEngines.packageManager` field in the `package.json`](https://nodejs.org/api/corepack.html).
```yaml ```yaml
on: on:
@@ -105,7 +155,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: pnpm/action-setup@v5 - uses: pnpm/action-setup@v6
``` ```
### Install pnpm and a few npm packages ### Install pnpm and a few npm packages
@@ -120,9 +170,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: pnpm/action-setup@v5 - uses: pnpm/action-setup@v6
with: with:
version: 10 version: 10
run_install: | run_install: |
@@ -144,9 +194,9 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- uses: pnpm/action-setup@v5 - uses: pnpm/action-setup@v6
name: Install pnpm name: Install pnpm
with: with:
version: 10 version: 10
@@ -158,9 +208,55 @@ jobs:
**Note:** You don't need to run `pnpm store prune` at the end; post-action has already taken care of that. **Note:** You don't need to run `pnpm store prune` at the end; post-action has already taken care of that.
### Lockfile verification cache
pnpm v11 and newer check every lockfile entry before installing it — that each entry pins an integrity hash, that a pinned tarball URL matches the registry's own metadata, and, where configured, your `minimumReleaseAge` and `trustPolicy` policies. The verdict is memoized in a sub-kilobyte file, so an unchanged lockfile is not re-checked against the registry.
The action restores and saves that file on every run, independently of the `cache` input, because a job that starts without it pays for the check every time. On a repository with ~2000 lockfile entries and a warm store:
| | without the log | with it |
| --- | --- | --- |
| `minimumReleaseAge` + `trustPolicy` | 13.5s | 1.5s |
| no policies configured | 6.7s | 1.6s |
Reusing a verdict is not a weaker check: pnpm re-verifies whenever the lockfile content changes, and whenever the recorded policy is looser than the one now configured.
The log is uploaded as soon as the install that produced it finishes, not at the end of the job, so nothing the job runs afterwards — its tests, its build, any later step — can alter what other jobs restore. Dependency lifecycle scripts are the exception, since they run inside the install itself, ahead of the upload: pnpm refuses to run them unless the repository allow-lists the package through `allowBuilds`, and a package on that list can already run code in the job.
Before uploading, the action checks that the log grew the way an install grows it: every record that predated the install still there, and no more new records than installs it ran. A dependency's script that slips an extra record in is caught by that, and the log is not cached — the next job re-verifies, which costs seconds and nothing else.
A job that installs in a step of its own rather than through this action is saved at the end of the job instead, since that is the first moment the log is known to be complete. The record count cannot be bounded there, so only the "nothing disappeared" half of the check applies.
### Cache dependencies from multiple lockfiles
```yaml
on:
- push
- pull_request
jobs:
cache-and-install-multiple:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
with:
version: 10
cache: true
cache_dependency_path: |
one/pnpm-lock.yaml
two/pnpm-lock.yaml
run_install: |
- cwd: one
- cwd: two
```
## Notes ## Notes
This action does not setup Node.js for you, use [actions/setup-node](https://github.com/actions/setup-node) yourself. This action does not set up Node.js. Use [actions/setup-node](https://github.com/actions/setup-node) yourself. If you are on pnpm v11 or newer, [`pnpm/setup`](https://github.com/pnpm/setup) can install pnpm and Node.js in a single step.
## License ## License
+5 -2
View File
@@ -16,11 +16,14 @@ inputs:
required: false required: false
default: 'null' default: 'null'
cache: cache:
description: Whether to cache the pnpm store directory description: |
Whether to cache the pnpm store directory, keyed on the lockfile's
content hash. On pnpm v11 and newer, the results of pnpm's lockfile
verification are cached either way — see the README.
required: false required: false
default: 'false' default: 'false'
cache_dependency_path: cache_dependency_path:
description: File path to the pnpm lockfile, which contents hash will be used as a cache key description: File path to the pnpm lockfile, whose contents hash will be used as a cache key. Accepts multiple paths delimited by newlines.
required: false required: false
default: 'pnpm-lock.yaml' default: 'pnpm-lock.yaml'
package_json_file: package_json_file:
+157 -156
View File
@@ -1,199 +1,198 @@
"use strict";var TX=Object.create;var xm=Object.defineProperty;var OX=Object.getOwnPropertyDescriptor;var LX=Object.getOwnPropertyNames;var MX=Object.getPrototypeOf,FX=Object.prototype.hasOwnProperty;var UX=(t,e)=>()=>(t&&(e=t(t=0)),e);var h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),qX=(t,e)=>{for(var r in e)xm(t,r,{get:e[r],enumerable:!0})},SP=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of LX(e))!FX.call(t,i)&&i!==r&&xm(t,i,{get:()=>e[i],enumerable:!(n=OX(e,i))||n.enumerable});return t};var Ct=(t,e,r)=>(r=t!=null?TX(MX(t)):{},SP(e||!t||!t.__esModule?xm(r,"default",{value:t,enumerable:!0}):r,t)),Fi=t=>SP(xm({},"__esModule",{value:!0}),t);var Rm=h(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.toCommandProperties=fc.toCommandValue=void 0;function HX(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}fc.toCommandValue=HX;function jX(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}fc.toCommandProperties=jX});var _P=h(ti=>{"use strict";var zX=ti&&ti.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),GX=ti&&ti.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),YX=ti&&ti.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&zX(e,t,r);return GX(e,t),e};Object.defineProperty(ti,"__esModule",{value:!0});ti.issue=ti.issueCommand=void 0;var JX=YX(require("os")),RP=Rm();function vP(t,e,r){let n=new MQ(t,e,r);process.stdout.write(n.toString()+JX.EOL)}ti.issueCommand=vP;function VX(t,e=""){vP(t,{},e)}ti.issue=VX;var xP="::",MQ=class{constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=xP+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let i=this.properties[n];i&&(r?r=!1:e+=",",e+=`${n}=${$X(i)}`)}}return e+=`${xP}${WX(this.message)}`,e}};function WX(t){return(0,RP.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function $X(t){return(0,RP.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}});var PP=h(ri=>{"use strict";var KX=ri&&ri.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),XX=ri&&ri.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),UQ=ri&&ri.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&KX(e,t,r);return XX(e,t),e};Object.defineProperty(ri,"__esModule",{value:!0});ri.prepareKeyValueMessage=ri.issueFileCommand=void 0;var ZX=UQ(require("crypto")),DP=UQ(require("fs")),FQ=UQ(require("os")),kP=Rm();function e5(t,e){let r=process.env[`GITHUB_${t}`];if(!r)throw new Error(`Unable to find environment variable for file command ${t}`);if(!DP.existsSync(r))throw new Error(`Missing file at path: ${r}`);DP.appendFileSync(r,`${(0,kP.toCommandValue)(e)}${FQ.EOL}`,{encoding:"utf8"})}ri.issueFileCommand=e5;function t5(t,e){let r=`ghadelimiter_${ZX.randomUUID()}`,n=(0,kP.toCommandValue)(e);if(t.includes(r))throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${t}<<${r}${FQ.EOL}${n}${FQ.EOL}${r}`}ri.prepareKeyValueMessage=t5});var OP=h(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});hc.checkBypass=hc.getProxyUrl=void 0;function r5(t){let e=t.protocol==="https:";if(TP(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new vm(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new vm(`http://${r}`)}else return}hc.getProxyUrl=r5;function TP(t){if(!t.hostname)return!1;let e=t.hostname;if(n5(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let i=[t.hostname.toUpperCase()];typeof n=="number"&&i.push(`${i[0]}:${n}`);for(let s of r.split(",").map(o=>o.trim().toUpperCase()).filter(oLine truncated "use strict";var QK=Object.create;var Ug=Object.defineProperty;var bK=Object.getOwnPropertyDescriptor;var NK=Object.getOwnPropertyNames;var wK=Object.getPrototypeOf,xK=Object.prototype.hasOwnProperty;var SK=(t,e)=>()=>(t&&(e=t(t=0)),e);var h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),vK=(t,e)=>{for(var r in e)Ug(t,r,{get:e[r],enumerable:!0})},z_=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of NK(e))!xK.call(t,i)&&i!==r&&Ug(t,i,{get:()=>e[i],enumerable:!(n=bK(e,i))||n.enumerable});return t};var ot=(t,e,r)=>(r=t!=null?QK(wK(t)):{},z_(e||!t||!t.__esModule?Ug(r,"default",{value:t,enumerable:!0}):r,t)),Si=t=>z_(Ug({},"__esModule",{value:!0}),t);var qg=h(JA=>{"use strict";Object.defineProperty(JA,"__esModule",{value:!0});JA.toCommandProperties=JA.toCommandValue=void 0;function RK(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}JA.toCommandValue=RK;function DK(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}JA.toCommandProperties=DK});var J_=h(Gn=>{"use strict";var _K=Gn&&Gn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),kK=Gn&&Gn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),PK=Gn&&Gn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&_K(e,t,r);return kK(e,t),e};Object.defineProperty(Gn,"__esModule",{value:!0});Gn.issue=Gn.issueCommand=void 0;var TK=PK(require("os")),G_=qg();function Y_(t,e,r){let n=new yB(t,e,r);process.stdout.write(n.toString()+TK.EOL)}Gn.issueCommand=Y_;function OK(t,e=""){Y_(t,{},e)}Gn.issue=OK;var j_="::",yB=class{constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=j_+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let i=this.properties[n];i&&(r?r=!1:e+=",",e+=`${n}=${LK(i)}`)}}return e+=`${j_}${MK(this.message)}`,e}};function MK(t){return(0,G_.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function LK(t){return(0,G_.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}});var $_=h(Yn=>{"use strict";var FK=Yn&&Yn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),UK=Yn&&Yn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),CB=Yn&&Yn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&FK(e,t,r);return UK(e,t),e};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.prepareKeyValueMessage=Yn.issueFileCommand=void 0;var qK=CB(require("crypto")),V_=CB(require("fs")),EB=CB(require("os")),W_=qg();function HK(t,e){let r=process.env[`GITHUB_${t}`];if(!r)throw new Error(`Unable to find environment variable for file command ${t}`);if(!V_.existsSync(r))throw new Error(`Missing file at path: ${r}`);V_.appendFileSync(r,`${(0,W_.toCommandValue)(e)}${EB.EOL}`,{encoding:"utf8"})}Yn.issueFileCommand=HK;function zK(t,e){let r=`ghadelimiter_${qK.randomUUID()}`,n=(0,W_.toCommandValue)(e);if(t.includes(r))throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${t}<<${r}${EB.EOL}${n}${EB.EOL}${r}`}Yn.prepareKeyValueMessage=zK});var X_=h(VA=>{"use strict";Object.defineProperty(VA,"__esModule",{value:!0});VA.checkBypass=VA.getProxyUrl=void 0;function jK(t){let e=t.protocol==="https:";if(K_(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new Hg(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Hg(`http://${r}`)}else return}VA.getProxyUrl=jK;function K_(t){if(!t.hostname)return!1;let e=t.hostname;if(GK(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let i=[t.hostname.toUpperCase()];typeof n=="number"&&i.push(`${i[0]}:${n}`);for(let s of r.split(",").map(o=>o.trim().toUpperCase()).filter(oLine truncated
`,u.message,u.stack);var d=new Error("tunneling socket could not be established, cause="+u.message);d.code="ECONNRESET",e.request.emit("error",d),n.removeSocket(i)}};qs.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(i){n.request.onSocket(i)})}};function MP(t,e){var r=this;qs.prototype.createSocket.call(r,t,function(n){var i=t.request.getHeader("host"),s=HQ({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):t.host}),o=i5.connect(0,s);r.sockets[r.sockets.indexOf(n)]=o,e(o)})}function FP(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function HQ(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var i=Object.keys(n),s=0,o=i.length;s<o;++s){var a=i[s];n[a]!==void 0&&(t[a]=n[a])}}return t}var Do;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Do=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:Do=function(){};gc.debug=Do});var HP=h((cOe,qP)=>{qP.exports=UP()});var It=h((lOe,jP)=>{jP.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kHeadersList:Symbol("headers list"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kHTTP2BuildRequest:Symbol("http2 build request"),kHTTP1BuildRequest:Symbol("http1 build request"),kHTTP2CopyHeaders:Symbol("http2 copy headers"),kHTTPConnVersion:Symbol("http connection version"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable")}});var At=h((uOe,zP)=>{"use strict";var Vt=class extends Error{constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}},jQ=class t extends Vt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},zQ=class t extends Vt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},GQ=class t extends Vt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}},YQ=class t extends Vt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},JQ=class t extends Vt{constructor(e,r,n,i){super(e),Error.captureStackTrace(this,t),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=i,this.status=r,this.statusCode=r,this.headers=n}},VQ=class t extends Vt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="InvalidArgumentError",this.message=e||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}},WQ=class t extends Vt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="InvalidReturnValueError",this.message=e||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}},$Q=class t extends Vt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="AbortError",this.messag Line truncated `,u.message,u.stack);var d=new Error("tunneling socket could not be established, cause="+u.message);d.code="ECONNRESET",e.request.emit("error",d),n.removeSocket(i)}};Ns.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(i){n.request.onSocket(i)})}};function ek(t,e){var r=this;Ns.prototype.createSocket.call(r,t,function(n){var i=t.request.getHeader("host"),s=BB({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):t.host}),o=YK.connect(0,s);r.sockets[r.sockets.indexOf(n)]=o,e(o)})}function tk(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function BB(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var i=Object.keys(n),s=0,o=i.length;s<o;++s){var a=i[s];n[a]!==void 0&&(t[a]=n[a])}}return t}var go;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?go=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:go=function(){};WA.debug=go});var ik=h((S_e,nk)=>{nk.exports=rk()});var yt=h((v_e,sk)=>{sk.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kHeadersList:Symbol("headers list"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kHTTP2BuildRequest:Symbol("http2 build request"),kHTTP1BuildRequest:Symbol("http1 build request"),kHTTP2CopyHeaders:Symbol("http2 copy headers"),kHTTPConnVersion:Symbol("http connection version"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable")}});var At=h((R_e,ok)=>{"use strict";var zt=class extends Error{constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}},QB=class t extends zt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},bB=class t extends zt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},NB=class t extends zt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}},wB=class t extends zt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},xB=class t extends zt{constructor(e,r,n,i){super(e),Error.captureStackTrace(this,t),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=i,this.status=r,this.statusCode=r,this.headers=n}},SB=class t extends zt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="InvalidArgumentError",this.message=e||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}},vB=class t extends zt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="InvalidReturnValueError",this.message=e||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}},RB=class t extends zt{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="AbortError",this.messag Line truncated
\r \r
`),$5=/\r\n/g,K5=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function pc(t){fT.call(this),t=t||{};let e=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=dT(t,"maxHeaderPairs",2e3),this.maxHeaderSize=dT(t,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new V5(W5),this.ss.on("info",function(r,n,i,s){n&&!e.maxed&&(e.nread+s-i>=e.maxHeaderSize?(s=e.maxHeaderSize-e.nread+i,e.nread=e.maxHeaderSize,e.maxed=!0):e.nread+=s-i,e.buffer+=n.toString("binary",i,s)),r&&e._finish()})}J5(pc,fT);pc.prototype.push=function(t){let e=this.ss.push(t);if(this.finished)return e};pc.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};pc.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let t=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",t)};pc.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let t=this.buffer.split($5),e=t.length,r,n;for(var i=0;i<e;++i){if(t[i].length===0)continue;if((t[i][0]===" "||t[i][0]===" ")&&n){this.header[n][this.header[n].length-1]+=t[i];continue}let s=t[i].indexOf(":");if(s===-1||s===0)return;if(r=K5.exec(t[i]),n=r[1].toLowerCase(),this.header[n]=this.header[n]||[],this.header[n].push(r[2]||""),++this.npairs===this.maxHeaderPairs)break}};hT.exports=pc});var gb=h((EOe,pT)=>{"use strict";var hb=require("node:stream").Writable,X5=require("node:util").inherits,Z5=db(),mT=lT(),e6=gT(),t6=45,r6=Buffer.from("-"),n6=Buffer.from(`\r `),L8=/\r\n/g,F8=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function KA(t){vk.call(this),t=t||{};let e=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=Sk(t,"maxHeaderPairs",2e3),this.maxHeaderSize=Sk(t,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new O8(M8),this.ss.on("info",function(r,n,i,s){n&&!e.maxed&&(e.nread+s-i>=e.maxHeaderSize?(s=e.maxHeaderSize-e.nread+i,e.nread=e.maxHeaderSize,e.maxed=!0):e.nread+=s-i,e.buffer+=n.toString("binary",i,s)),r&&e._finish()})}T8(KA,vk);KA.prototype.push=function(t){let e=this.ss.push(t);if(this.finished)return e};KA.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};KA.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let t=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",t)};KA.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let t=this.buffer.split(L8),e=t.length,r,n;for(var i=0;i<e;++i){if(t[i].length===0)continue;if((t[i][0]===" "||t[i][0]===" ")&&n){this.header[n][this.header[n].length-1]+=t[i];continue}let s=t[i].indexOf(":");if(s===-1||s===0)return;if(r=F8.exec(t[i]),n=r[1].toLowerCase(),this.header[n]=this.header[n]||[],this.header[n].push(r[2]||""),++this.npairs===this.maxHeaderPairs)break}};Rk.exports=KA});var WB=h((L_e,kk)=>{"use strict";var VB=require("node:stream").Writable,U8=require("node:util").inherits,q8=YB(),_k=wk(),H8=Dk(),z8=45,j8=Buffer.from("-"),G8=Buffer.from(`\r
`),i6=function(){};function Ui(t){if(!(this instanceof Ui))return new Ui(t);if(hb.call(this,t),!t||!t.headerFirst&&typeof t.boundary!="string")throw new TypeError("Boundary required");typeof t.boundary=="string"?this.setBoundary(t.boundary):this._bparser=void 0,this._headerFirst=t.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:t.partHwm},this._pause=!1;let e=this;this._hparser=new e6(t),this._hparser.on("header",function(r){e._inHeader=!1,e._part.emit("header",r)})}X5(Ui,hb);Ui.prototype.emit=function(t){if(t==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let r=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(r+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else hb.prototype.emit.apply(this,arguments)};Ui.prototype._write=function(t,e,r){if(!this._hparser&&!this._bparser)return r();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new mT(this._partOpts),this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._ignore());let n=this._hparser.push(t);if(!this._inHeader&&n!==void 0&&n<t.length)t=t.slice(n);else return r()}this._firstWrite&&(this._bparser.push(n6),this._firstWrite=!1),this._bparser.push(t),this._pause?this._cb=r:r()};Ui.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};Ui.prototype.setBoundary=function(t){let e=this;this._bparser=new Z5(`\r `),Y8=function(){};function vi(t){if(!(this instanceof vi))return new vi(t);if(VB.call(this,t),!t||!t.headerFirst&&typeof t.boundary!="string")throw new TypeError("Boundary required");typeof t.boundary=="string"?this.setBoundary(t.boundary):this._bparser=void 0,this._headerFirst=t.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:t.partHwm},this._pause=!1;let e=this;this._hparser=new H8(t),this._hparser.on("header",function(r){e._inHeader=!1,e._part.emit("header",r)})}U8(vi,VB);vi.prototype.emit=function(t){if(t==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let r=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(r+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else VB.prototype.emit.apply(this,arguments)};vi.prototype._write=function(t,e,r){if(!this._hparser&&!this._bparser)return r();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new _k(this._partOpts),this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._ignore());let n=this._hparser.push(t);if(!this._inHeader&&n!==void 0&&n<t.length)t=t.slice(n);else return r()}this._firstWrite&&(this._bparser.push(G8),this._firstWrite=!1),this._bparser.push(t),this._pause?this._cb=r:r()};vi.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};vi.prototype.setBoundary=function(t){let e=this;this._bparser=new q8(`\r
--`+t),this._bparser.on("info",function(r,n,i,s){e._oninfo(r,n,i,s)})};Ui.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",i6),this._part.resume())};Ui.prototype._oninfo=function(t,e,r,n){let i,s=this,o=0,a,A=!0;if(!this._part&&this._justMatched&&e){for(;this._dashes<2&&r+o<n;)if(e[r+o]===t6)++o,++this._dashes;else{this._dashes&&(i=r6),this._dashes=0;break}if(this._dashes===2&&(r+o<n&&this.listenerCount("trailer")!==0&&this.emit("trailer",e.slice(r+o,n)),this.reset(),this._finished=!0,s._parts===0&&(s._realFinish=!0,s.emit("finish"),s._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new mT(this._partOpts),this._part._read=function(c){s._unpause()},this._isPreamble&&this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._isPreamble!==!0&&this.listenerCount("part")!==0?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),e&&r<n&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(i&&(A=this._part.push(i)),A=this._part.push(e.slice(r,n)),A||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(i&&this._hparser.push(i),a=this._hparser.push(e.slice(r,n)),!this._inHeader&&a!==void 0&&a<n&&this._oninfo(!1,e,r+a,n))),t&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:r!==n&&(++this._parts,this._part.on("end",function(){--s._parts===0&&(s._finished?(s._realFinish=!0,s.emit("finish"),s._realFinish=!1):s._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};Ui.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let t=this._cb;this._cb=void 0,t()}};pT.exports=Ui});var Om=h((mb,CT)=>{"use strict";var yT=new TextDecoder("utf-8"),ET=new Map([["utf-8",yT],["utf8",yT]]);function s6(t){let e;for(;;)switch(t){case"utf-8":case"utf8":return Jd.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return Jd.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return Jd.utf16le;case"base64":return Jd.base64;default:if(e===void 0){e=!0,t=t.toLowerCase();continue}return Jd.other.bind(t)}}var Jd={utf8:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.utf8Slice(0,t.length)),latin1:(t,e)=>t.length===0?"":typeof t=="string"?t:t.latin1Slice(0,t.length),utf16le:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.ucs2Slice(0,t.length)),base64:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.base64Slice(0,t.length)),other:(t,e)=>{if(t.length===0)return"";if(typeof t=="string"&&(t=Buffer.from(t,e)),ET.has(mb.toString()))try{return ET.get(mb).decode(t)}catch{}return typeof t=="string"?t:t.toString()}};function o6(t,e,r){return t&&s6(r)(t,e)}CT.exports=o6});var yb=h((COe,NT)=>{"use strict";var Lm=Om(),IT=/%[a-fA-F0-9][a-fA-F0-9]/g,a6={"%00":"\0","%01":"","%02":"","%03":"","%04":"","%05":"","%06":"","%07":"\x07","%08":"\b","%09":" ","%0a":` --`+t),this._bparser.on("info",function(r,n,i,s){e._oninfo(r,n,i,s)})};vi.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",Y8),this._part.resume())};vi.prototype._oninfo=function(t,e,r,n){let i,s=this,o=0,a,A=!0;if(!this._part&&this._justMatched&&e){for(;this._dashes<2&&r+o<n;)if(e[r+o]===z8)++o,++this._dashes;else{this._dashes&&(i=j8),this._dashes=0;break}if(this._dashes===2&&(r+o<n&&this.listenerCount("trailer")!==0&&this.emit("trailer",e.slice(r+o,n)),this.reset(),this._finished=!0,s._parts===0&&(s._realFinish=!0,s.emit("finish"),s._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new _k(this._partOpts),this._part._read=function(c){s._unpause()},this._isPreamble&&this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._isPreamble!==!0&&this.listenerCount("part")!==0?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),e&&r<n&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(i&&(A=this._part.push(i)),A=this._part.push(e.slice(r,n)),A||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(i&&this._hparser.push(i),a=this._hparser.push(e.slice(r,n)),!this._inHeader&&a!==void 0&&a<n&&this._oninfo(!1,e,r+a,n))),t&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:r!==n&&(++this._parts,this._part.on("end",function(){--s._parts===0&&(s._finished?(s._realFinish=!0,s.emit("finish"),s._realFinish=!1):s._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};vi.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let t=this._cb;this._cb=void 0,t()}};kk.exports=vi});var Vg=h(($B,Ok)=>{"use strict";var Pk=new TextDecoder("utf-8"),Tk=new Map([["utf-8",Pk],["utf8",Pk]]);function J8(t){let e;for(;;)switch(t){case"utf-8":case"utf8":return yd.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return yd.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return yd.utf16le;case"base64":return yd.base64;default:if(e===void 0){e=!0,t=t.toLowerCase();continue}return yd.other.bind(t)}}var yd={utf8:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.utf8Slice(0,t.length)),latin1:(t,e)=>t.length===0?"":typeof t=="string"?t:t.latin1Slice(0,t.length),utf16le:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.ucs2Slice(0,t.length)),base64:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.base64Slice(0,t.length)),other:(t,e)=>{if(t.length===0)return"";if(typeof t=="string"&&(t=Buffer.from(t,e)),Tk.has($B.toString()))try{return Tk.get($B).decode(t)}catch{}return typeof t=="string"?t:t.toString()}};function V8(t,e,r){return t&&J8(r)(t,e)}Ok.exports=V8});var XB=h((F_e,qk)=>{"use strict";var Wg=Vg(),Mk=/%[a-fA-F0-9][a-fA-F0-9]/g,W8={"%00":"\0","%01":"","%02":"","%03":"","%04":"","%05":"","%06":"","%07":"\x07","%08":"\b","%09":" ","%0a":`
`,"%0A":` `,"%0A":`
`,"%0b":"\v","%0B":"\v","%0c":"\f","%0C":"\f","%0d":"\r","%0D":"\r","%0e":"","%0E":"","%0f":"","%0F":"","%10":"","%11":"","%12":"","%13":"","%14":"","%15":"","%16":"","%17":"","%18":"","%19":"","%1a":"","%1A":"","%1b":"\x1B","%1B":"\x1B","%1c":"","%1C":"","%1d":"","%1D":"","%1e":"","%1E":"","%1f":"","%1F":"","%20":" ","%21":"!","%22":'"',"%23":"#","%24":"$","%25":"%","%26":"&","%27":"'","%28":"(","%29":")","%2a":"*","%2A":"*","%2b":"+","%2B":"+","%2c":",","%2C":",","%2d":"-","%2D":"-","%2e":".","%2E":".","%2f":"/","%2F":"/","%30":"0","%31":"1","%32":"2","%33":"3","%34":"4","%35":"5","%36":"6","%37":"7","%38":"8","%39":"9","%3a":":","%3A":":","%3b":";","%3B":";","%3c":"<","%3C":"<","%3d":"=","%3D":"=","%3e":">","%3E":">","%3f":"?","%3F":"?","%40":"@","%41":"A","%42":"B","%43":"C","%44":"D","%45":"E","%46":"F","%47":"G","%48":"H","%49":"I","%4a":"J","%4A":"J","%4b":"K","%4B":"K","%4c":"L","%4C":"L","%4d":"M","%4D":"M","%4e":"N","%4E":"N","%4f":"O","%4F":"O","%50":"P","%51":"Q","%52":"R","%53":"S","%54":"T","%55":"U","%56":"V","%57":"W","%58":"X","%59":"Y","%5a":"Z","%5A":"Z","%5b":"[","%5B":"[","%5c":"\\","%5C":"\\","%5d":"]","%5D":"]","%5e":"^","%5E":"^","%5f":"_","%5F":"_","%60":"`","%61":"a","%62":"b","%63":"c","%64":"d","%65":"e","%66":"f","%67":"g","%68":"h","%69":"i","%6a":"j","%6A":"j","%6b":"k","%6B":"k","%6c":"l","%6C":"l","%6d":"m","%6D":"m","%6e":"n","%6E":"n","%6f":"o","%6F":"o","%70":"p","%71":"q","%72":"r","%73":"s","%74":"t","%75":"u","%76":"v","%77":"w","%78":"x","%79":"y","%7a":"z","%7A":"z","%7b":"{","%7B":"{","%7c":"|","%7C":"|","%7d":"}","%7D":"}","%7e":"~","%7E":"~","%7f":"\x7F","%7F":"\x7F","%80":"\x80","%81":"\x81","%82":"\x82","%83":"\x83","%84":"\x84","%85":"\x85","%86":"\x86","%87":"\x87","%88":"\x88","%89":"\x89","%8a":"\x8A","%8A":"\x8A","%8b":"\x8B","%8B":"\x8B","%8c":"\x8C","%8C":"\x8C","%8d":"\x8D","%8D":"\x8D","%8e":"\x8E","%8E":"\x8E","%8f":"\x8F","%8F":"\x8F","%90":"\x90","%91":"\x91","%92":"\x92","%93":"\x93","%94":"\x94","%95":"\x95","%96":"\x96","%97":"\x97","%98":"\x98","%99":"\x99","%9a":"\x9A","%9A":"\x9A","%9b":"\x9B","%9B":"\x9B","%9c":"\x9C","%9C":"\x9C","%9d":"\x9D","%9D":"\x9D","%9e":"\x9E","%9E":"\x9E","%9f":"\x9F","%9F":"\x9F","%a0":"\xA0","%A0":"\xA0","%a1":"\xA1","%A1":"\xA1","%a2":"\xA2","%A2":"\xA2","%a3":"\xA3","%A3":"\xA3","%a4":"\xA4","%A4":"\xA4","%a5":"\xA5","%A5":"\xA5","%a6":"\xA6","%A6":"\xA6","%a7":"\xA7","%A7":"\xA7","%a8":"\xA8","%A8":"\xA8","%a9":"\xA9","%A9":"\xA9","%aa":"\xAA","%Aa":"\xAA","%aA":"\xAA","%AA":"\xAA","%ab":"\xAB","%Ab":"\xAB","%aB":"\xAB","%AB":"\xAB","%ac":"\xAC","%Ac":"\xAC","%aC":"\xAC","%AC":"\xAC","%ad":"\xAD","%Ad":"\xAD","%aD":"\xAD","%AD":"\xAD","%ae":"\xAE","%Ae":"\xAE","%aE":"\xAE","%AE":"\xAE","%af":"\xAF","%Af":"\xAF","%aF":"\xAF","%AF":"\xAF","%b0":"\xB0","%B0":"\xB0","%b1":"\xB1","%B1":"\xB1","%b2":"\xB2","%B2":"\xB2","%b3":"\xB3","%B3":"\xB3","%b4":"\xB4","%B4":"\xB4","%b5":"\xB5","%B5":"\xB5","%b6":"\xB6","%B6":"\xB6","%b7":"\xB7","%B7":"\xB7","%b8":"\xB8","%B8":"\xB8","%b9":"\xB9","%B9":"\xB9","%ba":"\xBA","%Ba":"\xBA","%bA":"\xBA","%BA":"\xBA","%bb":"\xBB","%Bb":"\xBB","%bB":"\xBB","%BB":"\xBB","%bc":"\xBC","%Bc":"\xBC","%bC":"\xBC","%BC":"\xBC","%bd":"\xBD","%Bd":"\xBD","%bD":"\xBD","%BD":"\xBD","%be":"\xBE","%Be":"\xBE","%bE":"\xBE","%BE":"\xBE","%bf":"\xBF","%Bf":"\xBF","%bF":"\xBF","%BF":"\xBF","%c0":"\xC0","%C0":"\xC0","%c1":"\xC1","%C1":"\xC1","%c2":"\xC2","%C2":"\xC2","%c3":"\xC3","%C3":"\xC3","%c4":"\xC4","%C4":"\xC4","%c5":"\xC5","%C5":"\xC5","%c6":"\xC6","%C6":"\xC6","%c7":"\xC7","%C7":"\xC7","%c8":"\xC8","%C8":"\xC8","%c9":"\xC9","%C9":"\xC9","%ca":"\xCA","%Ca":"\xCA","%cA":"\xCA","%CA":"\xCA","%cb":"\xCB","%Cb":"\xCB","%cB":"\xCB","%CB":"\xCB","%cc":"\xCC","%Cc":"\xCC","%cC":"\xCC","%CC":"\xCC","%cd":"\xCD","%Cd":"\xCD","%cD":"\xCD","%CD":"\xCD","%ce":"\xCE","%Ce":"\xCE","%cE":"\xCE","%CE":"\xCE","%cf":"\xCF","%Cf":"\xCF","%cF":"\xCF","%CF":"\xCF","%d0":"\xD0","%D0":"\xD0","%d1":"\xD1","%D1":"\xD1","%d2":"\xD2","%D2":"\xD2","%d3":"\xD3","%D3":"\xD3","%d4":"\xD4","%D4":"\xD4","%d5":"\xD5","%D5":"\xD5","%d6":"\xD6","%D6":"\xD6","%d7":"\xD7","%D7":"\xD7","%d8":"\xD8","%D8":"\xD8","%d9":"\xD9","%D9":"\xD9","%da":"\xDA","%Da":"\xDA","%dA":"\xDA","%DA":"\xDA","%db":"\xDB","%Db":"\xDB","%dB":"\xDB","%DB":"\xDB","%dc":"\xDC","%Dc":"\xDC","%dC":"\xDC","%DC":"\xDC","%dd":"\xDD","%Dd":"\xDD","%dD":"\xDD","%DD":"\xDD","%de":"\xDE","%De":"\xDE","%dE":"\xDE","%DE":"\xDE","%df":"\xDF","%Df":"\xDF","%dF":"\xDF","%DF":"\xDF","%e0":"\xE0","%E0":"\xE0","%e1":"\xE1","%E1":"\xE1","%e2":"\xE2","%E2":"\xE2","%e3":"\xE3","%E3":"\xE3","%e4":"\xE4","%E4":"\xE4","%e5":"\xE5","%E5":"\xE5","%e6":"\xE6","%E6":"\xE6","%e7":"\xE7","%E7":"\xE7","%e8":"\xE8","%E8":"\xE8","%e9":"\xE9","%E9":"\xE9","%ea":"\xEA","%Ea":"\xEA","%eA":"\xEA","%EA":"\xEA","%eb":"\xEB","%Eb":"\xEB","%eB":"\xEB","%EB":"\xEB","%ec":"\xEC","%Ec":"\xEC","%eC":"\xEC","%EC":"\xEC","%ed":"\xED","%Ed":"\xED","%eD":"\xED","%ED":"\xED","%ee":"\xLine truncated `,"%0b":"\v","%0B":"\v","%0c":"\f","%0C":"\f","%0d":"\r","%0D":"\r","%0e":"","%0E":"","%0f":"","%0F":"","%10":"","%11":"","%12":"","%13":"","%14":"","%15":"","%16":"","%17":"","%18":"","%19":"","%1a":"","%1A":"","%1b":"\x1B","%1B":"\x1B","%1c":"","%1C":"","%1d":"","%1D":"","%1e":"","%1E":"","%1f":"","%1F":"","%20":" ","%21":"!","%22":'"',"%23":"#","%24":"$","%25":"%","%26":"&","%27":"'","%28":"(","%29":")","%2a":"*","%2A":"*","%2b":"+","%2B":"+","%2c":",","%2C":",","%2d":"-","%2D":"-","%2e":".","%2E":".","%2f":"/","%2F":"/","%30":"0","%31":"1","%32":"2","%33":"3","%34":"4","%35":"5","%36":"6","%37":"7","%38":"8","%39":"9","%3a":":","%3A":":","%3b":";","%3B":";","%3c":"<","%3C":"<","%3d":"=","%3D":"=","%3e":">","%3E":">","%3f":"?","%3F":"?","%40":"@","%41":"A","%42":"B","%43":"C","%44":"D","%45":"E","%46":"F","%47":"G","%48":"H","%49":"I","%4a":"J","%4A":"J","%4b":"K","%4B":"K","%4c":"L","%4C":"L","%4d":"M","%4D":"M","%4e":"N","%4E":"N","%4f":"O","%4F":"O","%50":"P","%51":"Q","%52":"R","%53":"S","%54":"T","%55":"U","%56":"V","%57":"W","%58":"X","%59":"Y","%5a":"Z","%5A":"Z","%5b":"[","%5B":"[","%5c":"\\","%5C":"\\","%5d":"]","%5D":"]","%5e":"^","%5E":"^","%5f":"_","%5F":"_","%60":"`","%61":"a","%62":"b","%63":"c","%64":"d","%65":"e","%66":"f","%67":"g","%68":"h","%69":"i","%6a":"j","%6A":"j","%6b":"k","%6B":"k","%6c":"l","%6C":"l","%6d":"m","%6D":"m","%6e":"n","%6E":"n","%6f":"o","%6F":"o","%70":"p","%71":"q","%72":"r","%73":"s","%74":"t","%75":"u","%76":"v","%77":"w","%78":"x","%79":"y","%7a":"z","%7A":"z","%7b":"{","%7B":"{","%7c":"|","%7C":"|","%7d":"}","%7D":"}","%7e":"~","%7E":"~","%7f":"\x7F","%7F":"\x7F","%80":"\x80","%81":"\x81","%82":"\x82","%83":"\x83","%84":"\x84","%85":"\x85","%86":"\x86","%87":"\x87","%88":"\x88","%89":"\x89","%8a":"\x8A","%8A":"\x8A","%8b":"\x8B","%8B":"\x8B","%8c":"\x8C","%8C":"\x8C","%8d":"\x8D","%8D":"\x8D","%8e":"\x8E","%8E":"\x8E","%8f":"\x8F","%8F":"\x8F","%90":"\x90","%91":"\x91","%92":"\x92","%93":"\x93","%94":"\x94","%95":"\x95","%96":"\x96","%97":"\x97","%98":"\x98","%99":"\x99","%9a":"\x9A","%9A":"\x9A","%9b":"\x9B","%9B":"\x9B","%9c":"\x9C","%9C":"\x9C","%9d":"\x9D","%9D":"\x9D","%9e":"\x9E","%9E":"\x9E","%9f":"\x9F","%9F":"\x9F","%a0":"\xA0","%A0":"\xA0","%a1":"\xA1","%A1":"\xA1","%a2":"\xA2","%A2":"\xA2","%a3":"\xA3","%A3":"\xA3","%a4":"\xA4","%A4":"\xA4","%a5":"\xA5","%A5":"\xA5","%a6":"\xA6","%A6":"\xA6","%a7":"\xA7","%A7":"\xA7","%a8":"\xA8","%A8":"\xA8","%a9":"\xA9","%A9":"\xA9","%aa":"\xAA","%Aa":"\xAA","%aA":"\xAA","%AA":"\xAA","%ab":"\xAB","%Ab":"\xAB","%aB":"\xAB","%AB":"\xAB","%ac":"\xAC","%Ac":"\xAC","%aC":"\xAC","%AC":"\xAC","%ad":"\xAD","%Ad":"\xAD","%aD":"\xAD","%AD":"\xAD","%ae":"\xAE","%Ae":"\xAE","%aE":"\xAE","%AE":"\xAE","%af":"\xAF","%Af":"\xAF","%aF":"\xAF","%AF":"\xAF","%b0":"\xB0","%B0":"\xB0","%b1":"\xB1","%B1":"\xB1","%b2":"\xB2","%B2":"\xB2","%b3":"\xB3","%B3":"\xB3","%b4":"\xB4","%B4":"\xB4","%b5":"\xB5","%B5":"\xB5","%b6":"\xB6","%B6":"\xB6","%b7":"\xB7","%B7":"\xB7","%b8":"\xB8","%B8":"\xB8","%b9":"\xB9","%B9":"\xB9","%ba":"\xBA","%Ba":"\xBA","%bA":"\xBA","%BA":"\xBA","%bb":"\xBB","%Bb":"\xBB","%bB":"\xBB","%BB":"\xBB","%bc":"\xBC","%Bc":"\xBC","%bC":"\xBC","%BC":"\xBC","%bd":"\xBD","%Bd":"\xBD","%bD":"\xBD","%BD":"\xBD","%be":"\xBE","%Be":"\xBE","%bE":"\xBE","%BE":"\xBE","%bf":"\xBF","%Bf":"\xBF","%bF":"\xBF","%BF":"\xBF","%c0":"\xC0","%C0":"\xC0","%c1":"\xC1","%C1":"\xC1","%c2":"\xC2","%C2":"\xC2","%c3":"\xC3","%C3":"\xC3","%c4":"\xC4","%C4":"\xC4","%c5":"\xC5","%C5":"\xC5","%c6":"\xC6","%C6":"\xC6","%c7":"\xC7","%C7":"\xC7","%c8":"\xC8","%C8":"\xC8","%c9":"\xC9","%C9":"\xC9","%ca":"\xCA","%Ca":"\xCA","%cA":"\xCA","%CA":"\xCA","%cb":"\xCB","%Cb":"\xCB","%cB":"\xCB","%CB":"\xCB","%cc":"\xCC","%Cc":"\xCC","%cC":"\xCC","%CC":"\xCC","%cd":"\xCD","%Cd":"\xCD","%cD":"\xCD","%CD":"\xCD","%ce":"\xCE","%Ce":"\xCE","%cE":"\xCE","%CE":"\xCE","%cf":"\xCF","%Cf":"\xCF","%cF":"\xCF","%CF":"\xCF","%d0":"\xD0","%D0":"\xD0","%d1":"\xD1","%D1":"\xD1","%d2":"\xD2","%D2":"\xD2","%d3":"\xD3","%D3":"\xD3","%d4":"\xD4","%D4":"\xD4","%d5":"\xD5","%D5":"\xD5","%d6":"\xD6","%D6":"\xD6","%d7":"\xD7","%D7":"\xD7","%d8":"\xD8","%D8":"\xD8","%d9":"\xD9","%D9":"\xD9","%da":"\xDA","%Da":"\xDA","%dA":"\xDA","%DA":"\xDA","%db":"\xDB","%Db":"\xDB","%dB":"\xDB","%DB":"\xDB","%dc":"\xDC","%Dc":"\xDC","%dC":"\xDC","%DC":"\xDC","%dd":"\xDD","%Dd":"\xDD","%dD":"\xDD","%DD":"\xDD","%de":"\xDE","%De":"\xDE","%dE":"\xDE","%DE":"\xDE","%df":"\xDF","%Df":"\xDF","%dF":"\xDF","%DF":"\xDF","%e0":"\xE0","%E0":"\xE0","%e1":"\xE1","%E1":"\xE1","%e2":"\xE2","%E2":"\xE2","%e3":"\xE3","%E3":"\xE3","%e4":"\xE4","%E4":"\xE4","%e5":"\xE5","%E5":"\xE5","%e6":"\xE6","%E6":"\xE6","%e7":"\xE7","%E7":"\xE7","%e8":"\xE8","%E8":"\xE8","%e9":"\xE9","%E9":"\xE9","%ea":"\xEA","%Ea":"\xEA","%eA":"\xEA","%EA":"\xEA","%eb":"\xEB","%Eb":"\xEB","%eB":"\xEB","%EB":"\xEB","%ec":"\xEC","%Ec":"\xEC","%eC":"\xEC","%EC":"\xEC","%ed":"\xED","%Ed":"\xED","%eD":"\xED","%ED":"\xED","%ee":"\xLine truncated
`))}function oZ(t,e){let{headersList:r}=e,n=(r.get("referrer-policy")??"").split(","),i="";if(n.length>0)for(let s=n.length;s!==0;s--){let o=n[s-1].trim();if(Y6.has(o)){i=o;break}}i!==""&&(t.referrerPolicy=i)}function aZ(){return"allowed"}function AZ(){return"success"}function cZ(){return"success"}function lZ(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e)}function uZ(t){let e=t.origin;if(t.responseTainting==="cors"||t.mode==="websocket")e&&t.headersList.append("origin",e);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&wb(t.origin)&&!wb($d(t))&&(e=null);break;case"same-origin":Hm(t,$d(t))||(e=null);break;default:}e&&t.headersList.append("origin",e)}}function dZ(t){return W6.now()}function fZ(t){return{startTime:t.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:t.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function hZ(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function gZ(t){return{referrerPolicy:t.referrerPolicy}}function mZ(t){let e=t.referrerPolicy;Bc(e);let r=null;if(t.referrer==="client"){let a=V6();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let n=bb(r),i=bb(r,!0);n.toString().length>4096&&(n=i);let s=Hm(t,n),o=Wd(n)&&!Wd(t.url);switch(e){case"origin":return i??bb(r,!0);case"unsafe-url":return n;case"same-origin":return s?i:"no-referrer";case"origin-when-cross-origin":return s?n:i;case"strict-origin-when-cross-origin":{let a=$d(t);return Hm(n,a)?n:Wd(n)&&!Wd(a)?"no-referrer":i}default:return o?"no-referrer":i}}function bb(t,e){return Bc(t instanceof URL),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}function Wd(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}function pZ(t,e){if(qm===void 0)return!0;let r=XT(e);if(r==="no metadata"||r.length===0)return!0;let n=EZ(r),i=CZ(r,n);for(let s of i){let o=s.algo,a=s.hash,A=qm.createHash(o).update(t).digest("base64");if(A[A.length-1]==="="&&(A[A.length-2]==="="?A=A.slice(0,-2):A=A.slice(0,-1)),IZ(A,a))return!0}return!1}var yZ=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function XT(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let i=yZ.exec(n);if(i===null||i.groups===void 0||i.groups.algo===void 0)continue;let s=i.groups.algo.toLowerCase();VT.includes(s)&&e.push(i.groups)}return r===!0?"no metadata":e}function EZ(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}function CZ(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}function IZ(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r]){if(t[r]==="+"&&e[r]==="-"||t[r]==="/"&&e[r]==="_")continue;return!1}return!0}function BZ(t){}function Hm(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function QZ(){let t,e;return{promise:new Promise((n,i)=>{t=n,e=i}),resolve:t,reject:e}}function bZ(t){return t.controller.state==="aborted"}function NZ(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}var Sb={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"};Object.setPrototypeOf(Sb,null);function wZ(t){return Sb[t.toLowerCase()]??t}function SZ(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return Bc(typeof e=="string"),e}var xZ=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function RZ(t,e,r){let n={index:0,kind:r,target:t},i={next(){if(Object.getPrototypeOf(this)!==i)throw new TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`);let{index:s,kind:o,target:a}=n,A=a(),c=A.length;if(s>=c)return{value:void 0,done:!0};let l=A[s];return n.index=s+1,vZ(l,o)},[Symbol.toStringTag]:`${e} Iterator`};return Object.setPrototypeOf(i,xZ),Object.setPrototypeOf({},i)}function vZ(t,e){let r;switch(e){case"key":{r=t[0];break}case"value":{r=t[1];break}case"key+value":{r Line truncated `))}function V5(t,e){let{headersList:r}=e,n=(r.get("referrer-policy")??"").split(","),i="";if(n.length>0)for(let s=n.length;s!==0;s--){let o=n[s-1].trim();if(P5.has(o)){i=o;break}}i!==""&&(t.referrerPolicy=i)}function W5(){return"allowed"}function $5(){return"success"}function K5(){return"success"}function X5(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e)}function Z5(t){let e=t.origin;if(t.responseTainting==="cors"||t.mode==="websocket")e&&t.headersList.append("origin",e);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&oQ(t.origin)&&!oQ(Id(t))&&(e=null);break;case"same-origin":em(t,Id(t))||(e=null);break;default:}e&&t.headersList.append("origin",e)}}function eX(t){return M5.now()}function tX(t){return{startTime:t.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:t.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function rX(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function nX(t){return{referrerPolicy:t.referrerPolicy}}function iX(t){let e=t.referrerPolicy;rc(e);let r=null;if(t.referrer==="client"){let a=O5();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let n=iQ(r),i=iQ(r,!0);n.toString().length>4096&&(n=i);let s=em(t,n),o=Cd(n)&&!Cd(t.url);switch(e){case"origin":return i??iQ(r,!0);case"unsafe-url":return n;case"same-origin":return s?i:"no-referrer";case"origin-when-cross-origin":return s?n:i;case"strict-origin-when-cross-origin":{let a=Id(t);return em(n,a)?n:Cd(n)&&!Cd(a)?"no-referrer":i}default:return o?"no-referrer":i}}function iQ(t,e){return rc(t instanceof URL),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}function Cd(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}function sX(t,e){if(Zg===void 0)return!0;let r=hP(e);if(r==="no metadata"||r.length===0)return!0;let n=aX(r),i=AX(r,n);for(let s of i){let o=s.algo,a=s.hash,A=Zg.createHash(o).update(t).digest("base64");if(A[A.length-1]==="="&&(A[A.length-2]==="="?A=A.slice(0,-2):A=A.slice(0,-1)),cX(A,a))return!0}return!1}var oX=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function hP(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let i=oX.exec(n);if(i===null||i.groups===void 0||i.groups.algo===void 0)continue;let s=i.groups.algo.toLowerCase();lP.includes(s)&&e.push(i.groups)}return r===!0?"no metadata":e}function aX(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}function AX(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}function cX(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r]){if(t[r]==="+"&&e[r]==="-"||t[r]==="/"&&e[r]==="_")continue;return!1}return!0}function lX(t){}function em(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function uX(){let t,e;return{promise:new Promise((n,i)=>{t=n,e=i}),resolve:t,reject:e}}function dX(t){return t.controller.state==="aborted"}function fX(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}var aQ={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"};Object.setPrototypeOf(aQ,null);function hX(t){return aQ[t.toLowerCase()]??t}function gX(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return rc(typeof e=="string"),e}var mX=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function pX(t,e,r){let n={index:0,kind:r,target:t},i={next(){if(Object.getPrototypeOf(this)!==i)throw new TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`);let{index:s,kind:o,target:a}=n,A=a(),c=A.length;if(s>=c)return{value:void 0,done:!0};let l=A[s];return n.index=s+1,yX(l,o)},[Symbol.toStringTag]:`${e} Iterator`};return Object.setPrototypeOf(i,mX),Object.setPrototypeOf({},i)}function yX(t,e){let r;switch(e){case"key":{r=t[0];break}case"value":{r=t[1];break}case"key+value":{r Line truncated
`||t===" "||t===" "}function xb(t,e=!0,r=!0){let n=0,i=t.length-1;if(e)for(;n<t.length&&sO(t[n]);n++);if(r)for(;i>0&&sO(t[i]);i--);return t.slice(n,i+1)}function oO(t){return t==="\r"||t===` `||t===" "||t===" "}function AQ(t,e=!0,r=!0){let n=0,i=t.length-1;if(e)for(;n<t.length&&IP(t[n]);n++);if(r)for(;i>0&&IP(t[i]);i--);return t.slice(n,i+1)}function BP(t){return t==="\r"||t===`
`||t===" "||t==="\f"||t===" "}function WZ(t,e=!0,r=!0){let n=0,i=t.length-1;if(e)for(;n<t.length&&oO(t[n]);n++);if(r)for(;i>0&&oO(t[i]);i--);return t.slice(n,i+1)}lO.exports={dataURLProcessor:GZ,URLSerializer:aO,collectASequenceOfCodePoints:Gm,collectASequenceOfCodePointsFast:Qc,stringPercentDecode:AO,parseMIMEType:Rb,collectAnHTTPQuotedString:cO,serializeAMimeType:VZ}});var Ym=h((DOe,gO)=>{"use strict";var{Blob:fO,File:uO}=require("buffer"),{types:vb}=require("util"),{kState:On}=js(),{isBlobLike:hO}=ni(),{webidl:Ve}=Vr(),{parseMIMEType:$Z,serializeAMimeType:KZ}=qi(),{kEnumerableProperty:dO}=Ue(),XZ=new TextEncoder,Kd=class t extends fO{constructor(e,r,n={}){Ve.argumentLengthCheck(arguments,2,{header:"File constructor"}),e=Ve.converters["sequence<BlobPart>"](e),r=Ve.converters.USVString(r),n=Ve.converters.FilePropertyBag(n);let i=r,s=n.type,o;e:{if(s){if(s=$Z(s),s==="failure"){s="";break e}s=KZ(s).toLowerCase()}o=n.lastModified}super(ZZ(e,n),{type:s}),this[On]={name:i,lastModified:o,type:s}}get name(){return Ve.brandCheck(this,t),this[On].name}get lastModified(){return Ve.brandCheck(this,t),this[On].lastModified}get type(){return Ve.brandCheck(this,t),this[On].type}},_b=class t{constructor(e,r,n={}){let i=r,s=n.type,o=n.lastModified??Date.now();this[On]={blobLike:e,name:i,type:s,lastModified:o}}stream(...e){return Ve.brandCheck(this,t),this[On].blobLike.stream(...e)}arrayBuffer(...e){return Ve.brandCheck(this,t),this[On].blobLike.arrayBuffer(...e)}slice(...e){return Ve.brandCheck(this,t),this[On].blobLike.slice(...e)}text(...e){return Ve.brandCheck(this,t),this[On].blobLike.text(...e)}get size(){return Ve.brandCheck(this,t),this[On].blobLike.size}get type(){return Ve.brandCheck(this,t),this[On].blobLike.type}get name(){return Ve.brandCheck(this,t),this[On].name}get lastModified(){return Ve.brandCheck(this,t),this[On].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(Kd.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:dO,lastModified:dO});Ve.converters.Blob=Ve.interfaceConverter(fO);Ve.converters.BlobPart=function(t,e){if(Ve.util.Type(t)==="Object"){if(hO(t))return Ve.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||vb.isAnyArrayBuffer(t))return Ve.converters.BufferSource(t,e)}return Ve.converters.USVString(t,e)};Ve.converters["sequence<BlobPart>"]=Ve.sequenceConverter(Ve.converters.BlobPart);Ve.converters.FilePropertyBag=Ve.dictionaryConverter([{key:"lastModified",converter:Ve.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:Ve.converters.DOMString,defaultValue:""},{key:"endings",converter:t=>(t=Ve.converters.DOMString(t),t=t.toLowerCase(),t!=="native"&&(t="transparent"),t),defaultValue:"transparent"}]);function ZZ(t,e){let r=[];for(let n of t)if(typeof n=="string"){let i=n;e.endings==="native"&&(i=e7(i)),r.push(XZ.encode(i))}else vb.isAnyArrayBuffer(n)||vb.isTypedArray(n)?n.buffer?r.push(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)):r.push(new Uint8Array(n)):hO(n)&&r.push(n);return r}function e7(t){let e=` `||t===" "||t==="\f"||t===" "}function MX(t,e=!0,r=!0){let n=0,i=t.length-1;if(e)for(;n<t.length&&BP(t[n]);n++);if(r)for(;i>0&&BP(t[i]);i--);return t.slice(n,i+1)}wP.exports={dataURLProcessor:kX,URLSerializer:QP,collectASequenceOfCodePoints:nm,collectASequenceOfCodePointsFast:nc,stringPercentDecode:bP,parseMIMEType:cQ,collectAnHTTPQuotedString:NP,serializeAMimeType:OX}});var im=h((K_e,DP)=>{"use strict";var{Blob:vP,File:xP}=require("buffer"),{types:lQ}=require("util"),{kState:xn}=xs(),{isBlobLike:RP}=Jn(),{webidl:Je}=Hr(),{parseMIMEType:LX,serializeAMimeType:FX}=Ri(),{kEnumerableProperty:SP}=Fe(),UX=new TextEncoder,Bd=class t extends vP{constructor(e,r,n={}){Je.argumentLengthCheck(arguments,2,{header:"File constructor"}),e=Je.converters["sequence<BlobPart>"](e),r=Je.converters.USVString(r),n=Je.converters.FilePropertyBag(n);let i=r,s=n.type,o;e:{if(s){if(s=LX(s),s==="failure"){s="";break e}s=FX(s).toLowerCase()}o=n.lastModified}super(qX(e,n),{type:s}),this[xn]={name:i,lastModified:o,type:s}}get name(){return Je.brandCheck(this,t),this[xn].name}get lastModified(){return Je.brandCheck(this,t),this[xn].lastModified}get type(){return Je.brandCheck(this,t),this[xn].type}},uQ=class t{constructor(e,r,n={}){let i=r,s=n.type,o=n.lastModified??Date.now();this[xn]={blobLike:e,name:i,type:s,lastModified:o}}stream(...e){return Je.brandCheck(this,t),this[xn].blobLike.stream(...e)}arrayBuffer(...e){return Je.brandCheck(this,t),this[xn].blobLike.arrayBuffer(...e)}slice(...e){return Je.brandCheck(this,t),this[xn].blobLike.slice(...e)}text(...e){return Je.brandCheck(this,t),this[xn].blobLike.text(...e)}get size(){return Je.brandCheck(this,t),this[xn].blobLike.size}get type(){return Je.brandCheck(this,t),this[xn].blobLike.type}get name(){return Je.brandCheck(this,t),this[xn].name}get lastModified(){return Je.brandCheck(this,t),this[xn].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(Bd.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:SP,lastModified:SP});Je.converters.Blob=Je.interfaceConverter(vP);Je.converters.BlobPart=function(t,e){if(Je.util.Type(t)==="Object"){if(RP(t))return Je.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||lQ.isAnyArrayBuffer(t))return Je.converters.BufferSource(t,e)}return Je.converters.USVString(t,e)};Je.converters["sequence<BlobPart>"]=Je.sequenceConverter(Je.converters.BlobPart);Je.converters.FilePropertyBag=Je.dictionaryConverter([{key:"lastModified",converter:Je.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:Je.converters.DOMString,defaultValue:""},{key:"endings",converter:t=>(t=Je.converters.DOMString(t),t=t.toLowerCase(),t!=="native"&&(t="transparent"),t),defaultValue:"transparent"}]);function qX(t,e){let r=[];for(let n of t)if(typeof n=="string"){let i=n;e.endings==="native"&&(i=HX(i)),r.push(UX.encode(i))}else lQ.isAnyArrayBuffer(n)||lQ.isTypedArray(n)?n.buffer?r.push(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)):r.push(new Uint8Array(n)):RP(n)&&r.push(n);return r}function HX(t){let e=`
`;return process.platform==="win32"&&(e=`\r `;return process.platform==="win32"&&(e=`\r
`),t.replace(/\r?\n/g,e)}function t7(t){return uO&&t instanceof uO||t instanceof Kd||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}gO.exports={File:Kd,FileLike:_b,isFileLike:t7}});var Vm=h((kOe,CO)=>{"use strict";var{isBlobLike:Jm,toUSVString:r7,makeIterator:Db}=ni(),{kState:Lr}=js(),{File:EO,FileLike:mO,isFileLike:n7}=Ym(),{webidl:it}=Vr(),{Blob:i7,File:kb}=require("buffer"),pO=kb??EO,bc=class t{constructor(e){if(e!==void 0)throw it.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[Lr]=[]}append(e,r,n=void 0){if(it.brandCheck(this,t),it.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!Jm(r))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=it.converters.USVString(e),r=Jm(r)?it.converters.Blob(r,{strict:!1}):it.converters.USVString(r),n=arguments.length===3?it.converters.USVString(n):void 0;let i=yO(e,r,n);this[Lr].push(i)}delete(e){it.brandCheck(this,t),it.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=it.converters.USVString(e),this[Lr]=this[Lr].filter(r=>r.name!==e)}get(e){it.brandCheck(this,t),it.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=it.converters.USVString(e);let r=this[Lr].findIndex(n=>n.name===e);return r===-1?null:this[Lr][r].value}getAll(e){return it.brandCheck(this,t),it.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=it.converters.USVString(e),this[Lr].filter(r=>r.name===e).map(r=>r.value)}has(e){return it.brandCheck(this,t),it.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=it.converters.USVString(e),this[Lr].findIndex(r=>r.name===e)!==-1}set(e,r,n=void 0){if(it.brandCheck(this,t),it.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!Jm(r))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=it.converters.USVString(e),r=Jm(r)?it.converters.Blob(r,{strict:!1}):it.converters.USVString(r),n=arguments.length===3?r7(n):void 0;let i=yO(e,r,n),s=this[Lr].findIndex(o=>o.name===e);s!==-1?this[Lr]=[...this[Lr].slice(0,s),i,...this[Lr].slice(s+1).filter(o=>o.name!==e)]:this[Lr].push(i)}entries(){return it.brandCheck(this,t),Db(()=>this[Lr].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return it.brandCheck(this,t),Db(()=>this[Lr].map(e=>[e.name,e.value]),"FormData","key")}values(){return it.brandCheck(this,t),Db(()=>this[Lr].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,r=globalThis){if(it.brandCheck(this,t),it.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[n,i]of this)e.apply(r,[i,n,this])}};bc.prototype[Symbol.iterator]=bc.prototype.entries;Object.defineProperties(bc.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function yO(t,e,r){if(t=Buffer.from(t).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(n7(e)||(e=e instanceof i7?new pO([e],"blob",{type:e.type}):new mO(e,"blob",{type:e.type})),r!==void 0){let n={type:e.type,lastModified:e.lastModified};e=kb&&e instanceof kb||e instanceof EO?new pO([e],r,n):new mO(e,r,n)}return{name:t,value:e}}CO.exports={FormData:bc}});var Xd=h((POe,RO)=>{"use strict";var s7=MT(),Nc=Ue(),{ReadableStreamFrom:o7,isBlobLike:IO,isReadableStreamLike:a7,readableStreamClose:A7,createDeferredPromise:c7,fullyReadBody:l7}=ni(),{FormData:BO}=Vm(),{kState:Gs}=js(),{webidl:Pb}=Vr(),{DOMException:NO,structuredClone:u7}=To(),{Blob:d7,File:f7}=require("buffer"),{kBodyUsed:h7}=It(),Tb=require("assert"),{isErrored:g7}=Ue(),{isUint8Array:wO,isArrayBuffer:m7}=require("util/types"),{File:p7}=Ym(),{parseMIMEType:y7,serializeAMimeType:E7}=qi(),Ob;try{let t=require("node:crypto");Ob=e=>t.randomInt(0,e)}catch{Ob=t=>Math.floor(Math.random(t))}var zs=globalThis.ReadableStream,QO=f7??p7,Wm=new TextEncoder,C7=new TextDecoder;function SO(t,e=!1){zs||(zs=require("stream/web").ReadableStream);let r=null;t instanceof zs?r=t:IO(t)?r=t.stream():r=new zs({async pull(A){A.enqueue(typeof i=="string"?Wm.encode(i):i),queueMicrotask(()=>A7(A))},start(){},type:void 0}),Tb(a7(r));let n=null,i=null,s=null,o=null;if(typeof t=="string")i=t,o="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)i=t.toString(),o="application/x-www-form-urlencoded;charset=UTF-8";else if(m7(t))i=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(Nc.isFormDataLike(t)){let A=`----formdata-undici-0${`${Ob(1e11)}`.padStart(11,"0")}`,c=`--${A}\r `),t.replace(/\r?\n/g,e)}function zX(t){return xP&&t instanceof xP||t instanceof Bd||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}DP.exports={File:Bd,FileLike:uQ,isFileLike:zX}});var om=h((X_e,OP)=>{"use strict";var{isBlobLike:sm,toUSVString:jX,makeIterator:dQ}=Jn(),{kState:_r}=xs(),{File:TP,FileLike:_P,isFileLike:GX}=im(),{webidl:nt}=Hr(),{Blob:YX,File:fQ}=require("buffer"),kP=fQ??TP,ic=class t{constructor(e){if(e!==void 0)throw nt.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[_r]=[]}append(e,r,n=void 0){if(nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!sm(r))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=nt.converters.USVString(e),r=sm(r)?nt.converters.Blob(r,{strict:!1}):nt.converters.USVString(r),n=arguments.length===3?nt.converters.USVString(n):void 0;let i=PP(e,r,n);this[_r].push(i)}delete(e){nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=nt.converters.USVString(e),this[_r]=this[_r].filter(r=>r.name!==e)}get(e){nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=nt.converters.USVString(e);let r=this[_r].findIndex(n=>n.name===e);return r===-1?null:this[_r][r].value}getAll(e){return nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=nt.converters.USVString(e),this[_r].filter(r=>r.name===e).map(r=>r.value)}has(e){return nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=nt.converters.USVString(e),this[_r].findIndex(r=>r.name===e)!==-1}set(e,r,n=void 0){if(nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!sm(r))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=nt.converters.USVString(e),r=sm(r)?nt.converters.Blob(r,{strict:!1}):nt.converters.USVString(r),n=arguments.length===3?jX(n):void 0;let i=PP(e,r,n),s=this[_r].findIndex(o=>o.name===e);s!==-1?this[_r]=[...this[_r].slice(0,s),i,...this[_r].slice(s+1).filter(o=>o.name!==e)]:this[_r].push(i)}entries(){return nt.brandCheck(this,t),dQ(()=>this[_r].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return nt.brandCheck(this,t),dQ(()=>this[_r].map(e=>[e.name,e.value]),"FormData","key")}values(){return nt.brandCheck(this,t),dQ(()=>this[_r].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,r=globalThis){if(nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[n,i]of this)e.apply(r,[i,n,this])}};ic.prototype[Symbol.iterator]=ic.prototype.entries;Object.defineProperties(ic.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function PP(t,e,r){if(t=Buffer.from(t).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(GX(e)||(e=e instanceof YX?new kP([e],"blob",{type:e.type}):new _P(e,"blob",{type:e.type})),r!==void 0){let n={type:e.type,lastModified:e.lastModified};e=fQ&&e instanceof fQ||e instanceof TP?new kP([e],r,n):new _P(e,r,n)}return{name:t,value:e}}OP.exports={FormData:ic}});var Qd=h((Z_e,GP)=>{"use strict";var JX=eP(),sc=Fe(),{ReadableStreamFrom:VX,isBlobLike:MP,isReadableStreamLike:WX,readableStreamClose:$X,createDeferredPromise:KX,fullyReadBody:XX}=Jn(),{FormData:LP}=om(),{kState:vs}=xs(),{webidl:hQ}=Hr(),{DOMException:qP,structuredClone:ZX}=yo(),{Blob:e6,File:t6}=require("buffer"),{kBodyUsed:r6}=yt(),gQ=require("assert"),{isErrored:n6}=Fe(),{isUint8Array:HP,isArrayBuffer:i6}=require("util/types"),{File:s6}=im(),{parseMIMEType:o6,serializeAMimeType:a6}=Ri(),mQ;try{let t=require("node:crypto");mQ=e=>t.randomInt(0,e)}catch{mQ=t=>Math.floor(Math.random(t))}var Ss=globalThis.ReadableStream,FP=t6??s6,am=new TextEncoder,A6=new TextDecoder;function zP(t,e=!1){Ss||(Ss=require("stream/web").ReadableStream);let r=null;t instanceof Ss?r=t:MP(t)?r=t.stream():r=new Ss({async pull(A){A.enqueue(typeof i=="string"?am.encode(i):i),queueMicrotask(()=>$X(A))},start(){},type:void 0}),gQ(WX(r));let n=null,i=null,s=null,o=null;if(typeof t=="string")i=t,o="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)i=t.toString(),o="application/x-www-form-urlencoded;charset=UTF-8";else if(i6(t))i=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(sc.isFormDataLike(t)){let A=`----formdata-undici-0${`${mQ(1e11)}`.padStart(11,"0")}`,c=`--${A}\r
Content-Disposition: form-data`;let l=E=>E.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),u=E=>E.replace(/\r?\n|\r/g,`\r Content-Disposition: form-data`;let l=E=>E.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),u=E=>E.replace(/\r?\n|\r/g,`\r
`),d=[],f=new Uint8Array([13,10]);s=0;let g=!1;for(let[E,C]of t)if(typeof C=="string"){let I=Wm.encode(c+`; name="${l(u(E))}"\r `),d=[],f=new Uint8Array([13,10]);s=0;let g=!1;for(let[E,C]of t)if(typeof C=="string"){let I=am.encode(c+`; name="${l(u(E))}"\r
\r \r
${u(C)}\r ${u(C)}\r
`);d.push(I),s+=I.byteLength}else{let I=Wm.encode(`${c}; name="${l(u(E))}"`+(C.name?`; filename="${l(C.name)}"`:"")+`\r `);d.push(I),s+=I.byteLength}else{let I=am.encode(`${c}; name="${l(u(E))}"`+(C.name?`; filename="${l(C.name)}"`:"")+`\r
Content-Type: ${C.type||"application/octet-stream"}\r Content-Type: ${C.type||"application/octet-stream"}\r
\r \r
`);d.push(I,C,f),typeof C.size=="number"?s+=I.byteLength+C.size+f.byteLength:g=!0}let m=Wm.encode(`--${A}--`);d.push(m),s+=m.byteLength,g&&(s=null),i=t,n=async function*(){for(let E of d)E.stream?yield*E.stream():yield E},o="multipart/form-data; boundary="+A}else if(IO(t))i=t,s=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Nc.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof zs?t:o7(t)}if((typeof i=="string"||Nc.isBuffer(i))&&(s=Buffer.byteLength(i)),n!=null){let A;r=new zs({async start(){A=n(t)[Symbol.asyncIterator]()},async pull(c){let{value:l,done:u}=await A.next();return u?queueMicrotask(()=>{c.close()}):g7(r)||c.enqueue(new Uint8Array(l)),c.desiredSize>0},async cancel(c){await A.return()},type:void 0})}return[{stream:r,source:i,length:s},o]}function I7(t,e=!1){return zs||(zs=require("stream/web").ReadableStream),t instanceof zs&&(Tb(!Nc.isDisturbed(t),"The body has already been consumed."),Tb(!t.locked,"The stream is locked.")),SO(t,e)}function B7(t){let[e,r]=t.stream.tee(),n=u7(r,{transfer:[r]}),[,i]=n.tee();return t.stream=e,{stream:i,length:t.length,source:t.source}}async function*bO(t){if(t)if(wO(t))yield t;else{let e=t.stream;if(Nc.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[h7]=!0,yield*e}}function Lb(t){if(t.aborted)throw new NO("The operation was aborted.","AbortError")}function Q7(t){return{blob(){return $m(this,r=>{let n=S7(this);return n==="failure"?n="":n&&(n=E7(n)),new d7([r],{type:n})},t)},arrayBuffer(){return $m(this,r=>new Uint8Array(r).buffer,t)},text(){return $m(this,xO,t)},json(){return $m(this,w7,t)},async formData(){Pb.brandCheck(this,t),Lb(this[Gs]);let r=this.headers.get("Content-Type");if(/multipart\/form-data/.test(r)){let n={};for(let[a,A]of this.headers)n[a.toLowerCase()]=A;let i=new BO,s;try{s=new s7({headers:n,preservePath:!0})}catch(a){throw new NO(`${a}`,"AbortError")}s.on("field",(a,A)=>{i.append(a,A)}),s.on("file",(a,A,c,l,u)=>{let d=[];if(l==="base64"||l.toLowerCase()==="base64"){let f="";A.on("data",g=>{f+=g.toString().replace(/[\r\n]/gm,"");let m=f.length-f.length%4;d.push(Buffer.from(f.slice(0,m),"base64")),f=f.slice(m)}),A.on("end",()=>{d.push(Buffer.from(f,"base64")),i.append(a,new QO(d,c,{type:u}))})}else A.on("data",f=>{d.push(f)}),A.on("end",()=>{i.append(a,new QO(d,c,{type:u}))})});let o=new Promise((a,A)=>{s.on("finish",a),s.on("error",c=>A(new TypeError(c)))});if(this.body!==null)for await(let a of bO(this[Gs].body))s.write(a);return s.end(),await o,i}else if(/application\/x-www-form-urlencoded/.test(r)){let n;try{let s="",o=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of bO(this[Gs].body)){if(!wO(a))throw new TypeError("Expected Uint8Array chunk");s+=o.decode(a,{stream:!0})}s+=o.decode(),n=new URLSearchParams(s)}catch(s){throw Object.assign(new TypeError,{cause:s})}let i=new BO;for(let[s,o]of n)i.append(s,o);return i}else throw await Promise.resolve(),Lb(this[Gs]),Pb.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}function b7(t){Object.assign(t.prototype,Q7(t))}async function $m(t,e,r){if(Pb.brandCheck(t,r),Lb(t[Gs]),N7(t[Gs].body))throw new TypeError("Body is unusable");let n=c7(),i=o=>n.reject(o),s=o=>{try{n.resolve(e(o))}catch(a){i(a)}};return t[Gs].body==null?(s(new Uint8Array),n.promise):(await l7(t[Gs].body,s,i),n.promise)}function N7(t){return t!=null&&(t.stream.locked||Nc.isDisturbed(t.stream))}function xO(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),C7.decode(t))}function w7(t){return JSON.parse(xO(t))}function S7(t){let{headersList:e}=t[Gs],r=e.get("content-type");return r===null?"failure":y7(r)}RO.exports={extractBody:SO,safelyExtractBody:I7,cloneBody:B7,mixinBody:b7}});var kO=h((TOe,DO)=>{"use strict";var{InvalidArgumentError:gt,NotSupportedError:x7}=At(),Ys=require("assert"),{kHTTP2BuildRequest:R7,kHTTP2CopyHeaders:v7,kHTTP1BuildRequest:_7}=It(),an=Ue(),vO=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,_O=/[^\t\x20-\x7e\x80-\xff]/,D7=/[^\u0021-\u00ff]/,Hi=Symbol("handler"),tr={},Mb;try{let t=require("diagnostics_channel");tr.create=t.channel("undici:request:create"),tr.bodySent=t.channel("undici:request:bodySent"),tr.headers=t.channel("undici:request:headers"),tr.trailers=t.channel("undici:request:trailers"),tr.error=t.channel("undici:request:error")}catch{tr.create={hasSubscribers:!1},tr.bodySent={hasSubscribers:!1},tr.headers={hasSubscribers:!1},tr.trailers={hasSubscribers:!1},tr.error={hasSubscribers:!1}}var Fb=class t{constructor(e,{path:r,method:n,body:i,headers:s,query:o,idempotent:a,blocking:A,upgrade:c,headersTimeout:l,bodyTimeout:u,reset:d,throwOnError:f,expectContinue:g},m){if(typeof r!="string")throw new gt("path must be a string");if(r[0]!=="/"&&!(r.startsWith("http://")||r.startsWith("https://"))&&n!=="CONNECT")throw new gtLine truncated `);d.push(I,C,f),typeof C.size=="number"?s+=I.byteLength+C.size+f.byteLength:g=!0}let m=am.encode(`--${A}--`);d.push(m),s+=m.byteLength,g&&(s=null),i=t,n=async function*(){for(let E of d)E.stream?yield*E.stream():yield E},o="multipart/form-data; boundary="+A}else if(MP(t))i=t,s=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(sc.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof Ss?t:VX(t)}if((typeof i=="string"||sc.isBuffer(i))&&(s=Buffer.byteLength(i)),n!=null){let A;r=new Ss({async start(){A=n(t)[Symbol.asyncIterator]()},async pull(c){let{value:l,done:u}=await A.next();return u?queueMicrotask(()=>{c.close()}):n6(r)||c.enqueue(new Uint8Array(l)),c.desiredSize>0},async cancel(c){await A.return()},type:void 0})}return[{stream:r,source:i,length:s},o]}function c6(t,e=!1){return Ss||(Ss=require("stream/web").ReadableStream),t instanceof Ss&&(gQ(!sc.isDisturbed(t),"The body has already been consumed."),gQ(!t.locked,"The stream is locked.")),zP(t,e)}function l6(t){let[e,r]=t.stream.tee(),n=ZX(r,{transfer:[r]}),[,i]=n.tee();return t.stream=e,{stream:i,length:t.length,source:t.source}}async function*UP(t){if(t)if(HP(t))yield t;else{let e=t.stream;if(sc.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[r6]=!0,yield*e}}function pQ(t){if(t.aborted)throw new qP("The operation was aborted.","AbortError")}function u6(t){return{blob(){return Am(this,r=>{let n=g6(this);return n==="failure"?n="":n&&(n=a6(n)),new e6([r],{type:n})},t)},arrayBuffer(){return Am(this,r=>new Uint8Array(r).buffer,t)},text(){return Am(this,jP,t)},json(){return Am(this,h6,t)},async formData(){hQ.brandCheck(this,t),pQ(this[vs]);let r=this.headers.get("Content-Type");if(/multipart\/form-data/.test(r)){let n={};for(let[a,A]of this.headers)n[a.toLowerCase()]=A;let i=new LP,s;try{s=new JX({headers:n,preservePath:!0})}catch(a){throw new qP(`${a}`,"AbortError")}s.on("field",(a,A)=>{i.append(a,A)}),s.on("file",(a,A,c,l,u)=>{let d=[];if(l==="base64"||l.toLowerCase()==="base64"){let f="";A.on("data",g=>{f+=g.toString().replace(/[\r\n]/gm,"");let m=f.length-f.length%4;d.push(Buffer.from(f.slice(0,m),"base64")),f=f.slice(m)}),A.on("end",()=>{d.push(Buffer.from(f,"base64")),i.append(a,new FP(d,c,{type:u}))})}else A.on("data",f=>{d.push(f)}),A.on("end",()=>{i.append(a,new FP(d,c,{type:u}))})});let o=new Promise((a,A)=>{s.on("finish",a),s.on("error",c=>A(new TypeError(c)))});if(this.body!==null)for await(let a of UP(this[vs].body))s.write(a);return s.end(),await o,i}else if(/application\/x-www-form-urlencoded/.test(r)){let n;try{let s="",o=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of UP(this[vs].body)){if(!HP(a))throw new TypeError("Expected Uint8Array chunk");s+=o.decode(a,{stream:!0})}s+=o.decode(),n=new URLSearchParams(s)}catch(s){throw Object.assign(new TypeError,{cause:s})}let i=new LP;for(let[s,o]of n)i.append(s,o);return i}else throw await Promise.resolve(),pQ(this[vs]),hQ.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}function d6(t){Object.assign(t.prototype,u6(t))}async function Am(t,e,r){if(hQ.brandCheck(t,r),pQ(t[vs]),f6(t[vs].body))throw new TypeError("Body is unusable");let n=KX(),i=o=>n.reject(o),s=o=>{try{n.resolve(e(o))}catch(a){i(a)}};return t[vs].body==null?(s(new Uint8Array),n.promise):(await XX(t[vs].body,s,i),n.promise)}function f6(t){return t!=null&&(t.stream.locked||sc.isDisturbed(t.stream))}function jP(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),A6.decode(t))}function h6(t){return JSON.parse(jP(t))}function g6(t){let{headersList:e}=t[vs],r=e.get("content-type");return r===null?"failure":o6(r)}GP.exports={extractBody:zP,safelyExtractBody:c6,cloneBody:l6,mixinBody:d6}});var WP=h((eke,VP)=>{"use strict";var{InvalidArgumentError:ht,NotSupportedError:m6}=At(),Rs=require("assert"),{kHTTP2BuildRequest:p6,kHTTP2CopyHeaders:y6,kHTTP1BuildRequest:E6}=yt(),Zr=Fe(),YP=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,JP=/[^\t\x20-\x7e\x80-\xff]/,C6=/[^\u0021-\u00ff]/,Di=Symbol("handler"),$t={},yQ;try{let t=require("diagnostics_channel");$t.create=t.channel("undici:request:create"),$t.bodySent=t.channel("undici:request:bodySent"),$t.headers=t.channel("undici:request:headers"),$t.trailers=t.channel("undici:request:trailers"),$t.error=t.channel("undici:request:error")}catch{$t.create={hasSubscribers:!1},$t.bodySent={hasSubscribers:!1},$t.headers={hasSubscribers:!1},$t.trailers={hasSubscribers:!1},$t.error={hasSubscribers:!1}}var EQ=class t{constructor(e,{path:r,method:n,body:i,headers:s,query:o,idempotent:a,blocking:A,upgrade:c,headersTimeout:l,bodyTimeout:u,reset:d,throwOnError:f,expectContinue:g},m){if(typeof r!="string")throw new ht("path must be a string");if(r[0]!=="/"&&!(r.startsWith("http://")||r.startsWith("https://"))&&n!=="CONNECT")throw new htLine truncated
`),this.body=E.stream,this.contentLength=E.length}else an.isBlobLike(i)&&this.contentType==null&&i.type&&(this.contentType=i.type,this.headers+=`content-type: ${i.type}\r `),this.body=E.stream,this.contentLength=E.length}else Zr.isBlobLike(i)&&this.contentType==null&&i.type&&(this.contentType=i.type,this.headers+=`content-type: ${i.type}\r
`);an.validateHandler(m,n,c),this.servername=an.getServerName(this.host),this[Hi]=m,tr.create.hasSubscribers&&tr.create.publish({request:this})}onBodySent(e){if(this[Hi].onBodySent)try{return this[Hi].onBodySent(e)}catch(r){this.abort(r)}}onRequestSent(){if(tr.bodySent.hasSubscribers&&tr.bodySent.publish({request:this}),this[Hi].onRequestSent)try{return this[Hi].onRequestSent()}catch(e){this.abort(e)}}onConnect(e){if(Ys(!this.aborted),Ys(!this.completed),this.error)e(this.error);else return this.abort=e,this[Hi].onConnect(e)}onHeaders(e,r,n,i){Ys(!this.aborted),Ys(!this.completed),tr.headers.hasSubscribers&&tr.headers.publish({request:this,response:{statusCode:e,headers:r,statusText:i}});try{return this[Hi].onHeaders(e,r,n,i)}catch(s){this.abort(s)}}onData(e){Ys(!this.aborted),Ys(!this.completed);try{return this[Hi].onData(e)}catch(r){return this.abort(r),!1}}onUpgrade(e,r,n){return Ys(!this.aborted),Ys(!this.completed),this[Hi].onUpgrade(e,r,n)}onComplete(e){this.onFinally(),Ys(!this.aborted),this.completed=!0,tr.trailers.hasSubscribers&&tr.trailers.publish({request:this,trailers:e});try{return this[Hi].onComplete(e)}catch(r){this.onError(r)}}onError(e){if(this.onFinally(),tr.error.hasSubscribers&&tr.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Hi].onError(e)}onFinally(){this.errorHandler&&(this.body.off("error",this.errorHandler),this.errorHandler=null),this.endHandler&&(this.body.off("end",this.endHandler),this.endHandler=null)}addHeader(e,r){return Zd(this,e,r),this}static[_7](e,r,n){return new t(e,r,n)}static[R7](e,r,n){let i=r.headers;r={...r,headers:null};let s=new t(e,r,n);if(s.headers={},Array.isArray(i)){if(i.length%2!==0)throw new gt("headers array must be even");for(let o=0;o<i.length;o+=2)Zd(s,i[o],i[o+1],!0)}else if(i&&typeof i=="object"){let o=Object.keys(i);for(let a=0;a<o.length;a++){let A=o[a];Zd(s,A,i[A],!0)}}else if(i!=null)throw new gt("headers must be an object or an array");return s}static[v7](e){let r=e.split(`\r `);Zr.validateHandler(m,n,c),this.servername=Zr.getServerName(this.host),this[Di]=m,$t.create.hasSubscribers&&$t.create.publish({request:this})}onBodySent(e){if(this[Di].onBodySent)try{return this[Di].onBodySent(e)}catch(r){this.abort(r)}}onRequestSent(){if($t.bodySent.hasSubscribers&&$t.bodySent.publish({request:this}),this[Di].onRequestSent)try{return this[Di].onRequestSent()}catch(e){this.abort(e)}}onConnect(e){if(Rs(!this.aborted),Rs(!this.completed),this.error)e(this.error);else return this.abort=e,this[Di].onConnect(e)}onHeaders(e,r,n,i){Rs(!this.aborted),Rs(!this.completed),$t.headers.hasSubscribers&&$t.headers.publish({request:this,response:{statusCode:e,headers:r,statusText:i}});try{return this[Di].onHeaders(e,r,n,i)}catch(s){this.abort(s)}}onData(e){Rs(!this.aborted),Rs(!this.completed);try{return this[Di].onData(e)}catch(r){return this.abort(r),!1}}onUpgrade(e,r,n){return Rs(!this.aborted),Rs(!this.completed),this[Di].onUpgrade(e,r,n)}onComplete(e){this.onFinally(),Rs(!this.aborted),this.completed=!0,$t.trailers.hasSubscribers&&$t.trailers.publish({request:this,trailers:e});try{return this[Di].onComplete(e)}catch(r){this.onError(r)}}onError(e){if(this.onFinally(),$t.error.hasSubscribers&&$t.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Di].onError(e)}onFinally(){this.errorHandler&&(this.body.off("error",this.errorHandler),this.errorHandler=null),this.endHandler&&(this.body.off("end",this.endHandler),this.endHandler=null)}addHeader(e,r){return bd(this,e,r),this}static[E6](e,r,n){return new t(e,r,n)}static[p6](e,r,n){let i=r.headers;r={...r,headers:null};let s=new t(e,r,n);if(s.headers={},Array.isArray(i)){if(i.length%2!==0)throw new ht("headers array must be even");for(let o=0;o<i.length;o+=2)bd(s,i[o],i[o+1],!0)}else if(i&&typeof i=="object"){let o=Object.keys(i);for(let a=0;a<o.length;a++){let A=o[a];bd(s,A,i[A],!0)}}else if(i!=null)throw new ht("headers must be an object or an array");return s}static[y6](e){let r=e.split(`\r
`),n={};for(let i of r){let[s,o]=i.split(": ");o==null||o.length===0||(n[s]?n[s]+=`,${o}`:n[s]=o)}return n}};function Ha(t,e,r){if(e&&typeof e=="object")throw new gt(`invalid ${t} header`);if(e=e!=null?`${e}`:"",_O.exec(e)!==null)throw new gt(`invalid ${t} header`);return r?e:`${t}: ${e}\r `),n={};for(let i of r){let[s,o]=i.split(": ");o==null||o.length===0||(n[s]?n[s]+=`,${o}`:n[s]=o)}return n}};function Qa(t,e,r){if(e&&typeof e=="object")throw new ht(`invalid ${t} header`);if(e=e!=null?`${e}`:"",JP.exec(e)!==null)throw new ht(`invalid ${t} header`);return r?e:`${t}: ${e}\r
`}function Zd(t,e,r,n=!1){if(r&&typeof r=="object"&&!Array.isArray(r))throw new gt(`invalid ${e} header`);if(r===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(_O.exec(r)!==null)throw new gt(`invalid ${e} header`);t.host=r}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(r,10),!Number.isFinite(t.contentLength))throw new gt("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=r,n?t.headers[e]=Ha(e,r,n):t.headers+=Ha(e,r);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new gt("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof r=="string"?r.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new gt("invalid connection header");i==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new gt("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new gt("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new x7("expect header not supported");if(vO.exec(e)===null)throw new gt("invalid header key");if(Array.isArray(r))for(let i=0;i<r.length;i++)n?t.headers[e]?t.headers[e]+=`,${Ha(e,r[i],n)}`:t.headers[e]=Ha(e,r[i],n):t.headers+=Ha(e,r[i]);else n?t.headers[e]=Ha(e,r,n):t.headers+=Ha(e,r)}}}DO.exports=Fb});var Km=h((OOe,PO)=>{"use strict";var k7=require("events"),Ub=class extends k7{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};PO.exports=Ub});var tf=h((LOe,TO)=>{"use strict";var P7=Km(),{ClientDestroyedError:qb,ClientClosedError:T7,InvalidArgumentError:wc}=At(),{kDestroy:O7,kClose:L7,kDispatch:Hb,kInterceptors:ja}=It(),Sc=Symbol("destroyed"),ef=Symbol("closed"),Js=Symbol("onDestroyed"),xc=Symbol("onClosed"),Xm=Symbol("Intercepted Dispatch"),jb=class extends P7{constructor(){super(),this[Sc]=!1,this[Js]=null,this[ef]=!1,this[xc]=[]}get destroyed(){return this[Sc]}get closed(){return this[ef]}get interceptors(){return this[ja]}set interceptors(e){if(e){for(let r=e.length-1;r>=0;r--)if(typeof this[ja][r]!="function")throw new wc("interceptor must be an function")}this[ja]=e}close(e){if(e===void 0)return new Promise((n,i)=>{this.close((s,o)=>s?i(s):n(o))});if(typeof e!="function")throw new wc("invalid callback");if(this[Sc]){queueMicrotask(()=>e(new qb,null));return}if(this[ef]){this[xc]?this[xc].push(e):queueMicrotask(()=>e(null,null));return}this[ef]=!0,this[xc].push(e);let r=()=>{let n=this[xc];this[xc]=null;for(let i=0;i<n.length;i++)n[i](null,null)};this[L7]().then(()=>this.destroy()).then(()=>{queueMicrotask(r)})}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((i,s)=>{this.destroy(e,(o,a)=>o?s(o):i(a))});if(typeof r!="function")throw new wc("invalid callback");if(this[Sc]){this[Js]?this[Js].push(r):queueMicrotask(()=>r(null,null));return}e||(e=new qb),this[Sc]=!0,this[Js]=this[Js]||[],this[Js].push(r);let n=()=>{let i=this[Js];this[Js]=null;for(let s=0;s<i.length;s++)i[s](null,null)};this[O7](e).then(()=>{queueMicrotask(n)})}[Xm](e,r){if(!this[ja]||this[ja].length===0)return this[Xm]=this[Hb],this[Hb](e,r);let n=this[Hb].bind(this);for(let i=this[ja].length-1;i>=0;i--)n=this[ja][i](n);return this[Xm]=n,n(e,r)}dispatch(e,r){if(!r||typeof r!="object")throw new wc("handler must be an object");try{if(!e||typeof e!="object")throw new wc("opts must be an object.");if(this[Sc]||this[Js])throw new qb;if(this[ef])throw new T7;return this[Xm](e,r)}catch(n){if(typeof r.onError!="function")throw new wc("invalid onError method");return r.onError(n),!1}}};TO.exports=jb});var rf=h((UOe,MO)=>{"use strict";var M7=require("net"),OO=require("assert"),LO=Ue(),{InvalidArgumentError:F7,ConnectTimeoutError:U7}=At(),zb,Gb;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?Gb=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(r=>{if(this._sessionCache.size<this._maxCachedSessions)return;let n=this._sessionCache.get(r);n!==void 0&&n.deref()===void 0&&this._sessionCache.delete(r)})}get(e){let r=this._sessionCache.get(e);return r?r.deref():null}set(e,r){this._maxCachedSessions!==0&&(this._sessionCache.set(e,new WeakRef(r)),this._sessionRegistry.register(r,e))}}:Gb=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map}get(e){return this._sessionCache.get(e)}set(e,r){if(this._maxCachedSessions!==0){if(this._sessionCache.size>=this._maxCachedSessions){let{value:n}=this._sessionCache.keys().next();this._sessionCache.delete(n)}this._sessionCache.set(e,r)}}};function q7({allowH2:t,maxCachedSessions:e,socketPath:r,timeout:n,...i}){if(e!=null&&(!Number.isInteger(e)||e<0))throw new F7("maxCachedSessions must be a positive integer or zero");let s={path:r,...i},o=new Gb(e??100);return n=n??1e4,t=t??!1,function({hostname: Line truncated `}function bd(t,e,r,n=!1){if(r&&typeof r=="object"&&!Array.isArray(r))throw new ht(`invalid ${e} header`);if(r===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(JP.exec(r)!==null)throw new ht(`invalid ${e} header`);t.host=r}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(r,10),!Number.isFinite(t.contentLength))throw new ht("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=r,n?t.headers[e]=Qa(e,r,n):t.headers+=Qa(e,r);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new ht("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof r=="string"?r.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new ht("invalid connection header");i==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new ht("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new ht("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new m6("expect header not supported");if(YP.exec(e)===null)throw new ht("invalid header key");if(Array.isArray(r))for(let i=0;i<r.length;i++)n?t.headers[e]?t.headers[e]+=`,${Qa(e,r[i],n)}`:t.headers[e]=Qa(e,r[i],n):t.headers+=Qa(e,r[i]);else n?t.headers[e]=Qa(e,r,n):t.headers+=Qa(e,r)}}}VP.exports=EQ});var cm=h((tke,$P)=>{"use strict";var I6=require("events"),CQ=class extends I6{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};$P.exports=CQ});var wd=h((rke,KP)=>{"use strict";var B6=cm(),{ClientDestroyedError:IQ,ClientClosedError:Q6,InvalidArgumentError:oc}=At(),{kDestroy:b6,kClose:N6,kDispatch:BQ,kInterceptors:ba}=yt(),ac=Symbol("destroyed"),Nd=Symbol("closed"),Ds=Symbol("onDestroyed"),Ac=Symbol("onClosed"),lm=Symbol("Intercepted Dispatch"),QQ=class extends B6{constructor(){super(),this[ac]=!1,this[Ds]=null,this[Nd]=!1,this[Ac]=[]}get destroyed(){return this[ac]}get closed(){return this[Nd]}get interceptors(){return this[ba]}set interceptors(e){if(e){for(let r=e.length-1;r>=0;r--)if(typeof this[ba][r]!="function")throw new oc("interceptor must be an function")}this[ba]=e}close(e){if(e===void 0)return new Promise((n,i)=>{this.close((s,o)=>s?i(s):n(o))});if(typeof e!="function")throw new oc("invalid callback");if(this[ac]){queueMicrotask(()=>e(new IQ,null));return}if(this[Nd]){this[Ac]?this[Ac].push(e):queueMicrotask(()=>e(null,null));return}this[Nd]=!0,this[Ac].push(e);let r=()=>{let n=this[Ac];this[Ac]=null;for(let i=0;i<n.length;i++)n[i](null,null)};this[N6]().then(()=>this.destroy()).then(()=>{queueMicrotask(r)})}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((i,s)=>{this.destroy(e,(o,a)=>o?s(o):i(a))});if(typeof r!="function")throw new oc("invalid callback");if(this[ac]){this[Ds]?this[Ds].push(r):queueMicrotask(()=>r(null,null));return}e||(e=new IQ),this[ac]=!0,this[Ds]=this[Ds]||[],this[Ds].push(r);let n=()=>{let i=this[Ds];this[Ds]=null;for(let s=0;s<i.length;s++)i[s](null,null)};this[b6](e).then(()=>{queueMicrotask(n)})}[lm](e,r){if(!this[ba]||this[ba].length===0)return this[lm]=this[BQ],this[BQ](e,r);let n=this[BQ].bind(this);for(let i=this[ba].length-1;i>=0;i--)n=this[ba][i](n);return this[lm]=n,n(e,r)}dispatch(e,r){if(!r||typeof r!="object")throw new oc("handler must be an object");try{if(!e||typeof e!="object")throw new oc("opts must be an object.");if(this[ac]||this[Ds])throw new IQ;if(this[Nd])throw new Q6;return this[lm](e,r)}catch(n){if(typeof r.onError!="function")throw new oc("invalid onError method");return r.onError(n),!1}}};KP.exports=QQ});var xd=h((ske,eT)=>{"use strict";var w6=require("net"),XP=require("assert"),ZP=Fe(),{InvalidArgumentError:x6,ConnectTimeoutError:S6}=At(),bQ,NQ;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?NQ=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(r=>{if(this._sessionCache.size<this._maxCachedSessions)return;let n=this._sessionCache.get(r);n!==void 0&&n.deref()===void 0&&this._sessionCache.delete(r)})}get(e){let r=this._sessionCache.get(e);return r?r.deref():null}set(e,r){this._maxCachedSessions!==0&&(this._sessionCache.set(e,new WeakRef(r)),this._sessionRegistry.register(r,e))}}:NQ=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map}get(e){return this._sessionCache.get(e)}set(e,r){if(this._maxCachedSessions!==0){if(this._sessionCache.size>=this._maxCachedSessions){let{value:n}=this._sessionCache.keys().next();this._sessionCache.delete(n)}this._sessionCache.set(e,r)}}};function v6({allowH2:t,maxCachedSessions:e,socketPath:r,timeout:n,...i}){if(e!=null&&(!Number.isInteger(e)||e<0))throw new x6("maxCachedSessions must be a positive integer or zero");let s={path:r,...i},o=new NQ(e??100);return n=n??1e4,t=t??!1,function({hostname: Line truncated
`,this[tL]=A??3e5,this[eL]=i??3e5,this[cf]=I??!0,this[pee]=w,this[lf]=T,this[Lo]=null,this[nL]=k>-1?k:-1,this[us]="h1",this[Mn]=null,this[op]=Re?{openStreams:0,maxConcurrentStreams:H??100}:null,this[iL]=`${this[Rr].hostname}${this[Rr].port?`:${this[Rr].port}`:""}`,this[Bt]=[],this[Qt]=0,this[Ln]=0}get pipelining(){return this[Fo]}set pipelining(e){this[Fo]=e,Fn(this,!0)}get[Ya](){return this[Bt].length-this[Ln]}get[Dt](){return this[Ln]-this[Qt]}get[Ga](){return this[Bt].length-this[Qt]}get[mee](){return!!this[Ot]&&!this[vc]&&!this[Ot].destroyed}get[Zb](){let e=this[Ot];return e&&(e[Wr]||e[$s]||e[Dc])||this[Ga]>=(this[Fo]||1)||this[Ya]>0}[gee](e){AL(this),this.once("connect",e)}[Cee](e,r){let n=e.origin||this[Rr].origin,i=this[us]==="h2"?Xb[Bee](n,e,r):Xb[bee](n,e,r);return this[Bt].push(i),this[za]||(Ae.bodyLength(i.body)==null&&Ae.isIterable(i.body)?(this[za]=1,process.nextTick(Fn,this)):Fn(this,!0)),this[za]&&this[Mo]!==2&&this[Zb]&&(this[Mo]=2),this[Mo]<2}async[yee](){return new Promise(e=>{this[Ga]?this[Lo]=e:e(null)})}async[Eee](e){return new Promise(r=>{let n=this[Bt].splice(this[Ln]);for(let s=0;s<n.length;s++){let o=n[s];$r(this,o,e)}let i=()=>{this[Lo]&&(this[Lo](),this[Lo]=null),r()};this[Mn]!=null&&(Ae.destroy(this[Mn],e),this[Mn]=null,this[op]=null),this[Ot]?Ae.destroy(this[Ot].on("close",i),e):queueMicrotask(i),Fn(this)})}};function Dee(t){ee(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Ot][vr]=t,lp(this[ls],t)}function kee(t,e,r){let n=new cs(`HTTP/2: "frameError" received - type ${t}, code ${e}`);r===0&&(this[Ot][vr]=n,lp(this[ls],n))}function Pee(){Ae.destroy(this,new _c("other side closed")),Ae.destroy(this[Ot],new _c("other side closed"))}function Tee(t){let e=this[ls],r=new cs(`HTTP/2: "GOAWAY" frame received with code ${t}`);if(e[Ot]=null,e[Mn]=null,e.destroyed){ee(this[Ya]===0);let n=e[Bt].splice(e[Qt]);for(let i=0;i<n.length;i++){let s=n[i];$r(this,s,r)}}else if(e[Dt]>0){let n=e[Bt][e[Qt]];e[Bt][e[Qt]++]=null,$r(e,n,r)}e[Ln]=e[Qt],ee(e[Dt]===0),e.emit("disconnect",e[Rr],[e],r),Fn(e)}var os=UO(),Oee=tp(),Lee=Buffer.alloc(0);async function Mee(){let t=process.env.JEST_WORKER_ID?Wb():void 0,e;try{e=await WebAssembly.compile(Buffer.from(JO(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(t||Wb(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,i)=>0,wasm_on_status:(r,n,i)=>{ee.strictEqual(or.ptr,r);let s=n-As+as.byteOffset;return or.onStatus(new rp(as.buffer,s,i))||0},wasm_on_message_begin:r=>(ee.strictEqual(or.ptr,r),or.onMessageBegin()||0),wasm_on_header_field:(r,n,i)=>{ee.strictEqual(or.ptr,r);let s=n-As+as.byteOffset;return or.onHeaderField(new rp(as.buffer,s,i))||0},wasm_on_header_value:(r,n,i)=>{ee.strictEqual(or.ptr,r);let s=n-As+as.byteOffset;return or.onHeaderValue(new rp(as.buffer,s,i))||0},wasm_on_headers_complete:(r,n,i,s)=>(ee.strictEqual(or.ptr,r),or.onHeadersComplete(n,!!i,!!s)||0),wasm_on_body:(r,n,i)=>{ee.strictEqual(or.ptr,r);let s=n-As+as.byteOffset;return or.onBody(new rp(as.buffer,s,i))||0},wasm_on_message_complete:r=>(ee.strictEqual(or.ptr,r),or.onMessageComplete()||0)}})}var Kb=null,r0=Mee();r0.catch();var or=null,as=null,np=0,As=null,kc=1,sp=2,n0=3,i0=class{constructor(e,r,{exports:n}){ee(Number.isFinite(e[ip])&&e[ip]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(os.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[ip],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[nL]}setTimeout(e,r){this.timeoutType=r,e!==this.timeoutValue?($b.clearTimeout(this.timeout),e?(this.timeout=$b.setTimeout(Fee,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(ee(this.ptr!=null),ee(or==null),this.llhttp.llhttp_resume(this.ptr),ee(this.timeoutType===sp),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||Lee),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){ee(this.ptr!=null),ee(or==null),ee(!this.paused);let{socket:r,llhttp:n}=this;e.length>np&&(As&&n.free(As),np=Math.ceil(e.length/4096)*4096,As=n.malloc(np)),new Uint8Array(n.memory.buffer,As,np).set(e);try{let i;try{as=e,or=this,i=n.llhttp_execute(this.ptr,As,e.length)}catch(o){throw o}finally{or=null,as=null}let s=n.llhttp_get_error_pos(this.ptr)-As;if(i===os.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(s));else if(i===os.ERROR.PAUSED)this.paused=!0,r.unshift(e.slice(s));else if(i!==os.ERROR.OK){let o=n.llhttp_get_error_reason(this.ptr),a="";if(o){let A=new Uint8Array(n.memory.buffer,o).indexOf(0);a="Response does not match the HTTP Line truncated `,this[pT]=A??3e5,this[mT]=i??3e5,this[kd]=I??!0,this[sZ]=w,this[Pd]=T,this[Co]=null,this[ET]=k>-1?k:-1,this[Ki]="h1",this[vn]=null,this[ym]=Se?{openStreams:0,maxConcurrentStreams:H??100}:null,this[CT]=`${this[Qr].hostname}${this[Qr].port?`:${this[Qr].port}`:""}`,this[Et]=[],this[Ct]=0,this[Sn]=0}get pipelining(){return this[Bo]}set pipelining(e){this[Bo]=e,Rn(this,!0)}get[xa](){return this[Et].length-this[Sn]}get[St](){return this[Sn]-this[Ct]}get[wa](){return this[Et].length-this[Ct]}get[iZ](){return!!this[_t]&&!this[lc]&&!this[_t].destroyed}get[kQ](){let e=this[_t];return e&&(e[zr]||e[Ps]||e[dc])||this[wa]>=(this[Bo]||1)||this[xa]>0}[nZ](e){bT(this),this.once("connect",e)}[AZ](e,r){let n=e.origin||this[Qr].origin,i=this[Ki]==="h2"?_Q[lZ](n,e,r):_Q[dZ](n,e,r);return this[Et].push(i),this[Na]||(Ae.bodyLength(i.body)==null&&Ae.isIterable(i.body)?(this[Na]=1,process.nextTick(Rn,this)):Rn(this,!0)),this[Na]&&this[Io]!==2&&this[kQ]&&(this[Io]=2),this[Io]<2}async[oZ](){return new Promise(e=>{this[wa]?this[Co]=e:e(null)})}async[aZ](e){return new Promise(r=>{let n=this[Et].splice(this[Sn]);for(let s=0;s<n.length;s++){let o=n[s];jr(this,o,e)}let i=()=>{this[Co]&&(this[Co](),this[Co]=null),r()};this[vn]!=null&&(Ae.destroy(this[vn],e),this[vn]=null,this[ym]=null),this[_t]?Ae.destroy(this[_t].on("close",i),e):queueMicrotask(i),Rn(this)})}};function CZ(t){ee(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[_t][br]=t,Bm(this[$i],t)}function IZ(t,e,r){let n=new Wi(`HTTP/2: "frameError" received - type ${t}, code ${e}`);r===0&&(this[_t][br]=n,Bm(this[$i],n))}function BZ(){Ae.destroy(this,new uc("other side closed")),Ae.destroy(this[_t],new uc("other side closed"))}function QZ(t){let e=this[$i],r=new Wi(`HTTP/2: "GOAWAY" frame received with code ${t}`);if(e[_t]=null,e[vn]=null,e.destroyed){ee(this[xa]===0);let n=e[Et].splice(e[Ct]);for(let i=0;i<n.length;i++){let s=n[i];jr(this,s,r)}}else if(e[St]>0){let n=e[Et][e[Ct]];e[Et][e[Ct]++]=null,jr(e,n,r)}e[Sn]=e[Ct],ee(e[St]===0),e.emit("disconnect",e[Qr],[e],r),Rn(e)}var Yi=rT(),bZ=fm(),NZ=Buffer.alloc(0);async function wZ(){let t=process.env.JEST_WORKER_ID?vQ():void 0,e;try{e=await WebAssembly.compile(Buffer.from(cT(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(t||vQ(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,i)=>0,wasm_on_status:(r,n,i)=>{ee.strictEqual(rr.ptr,r);let s=n-Vi+Ji.byteOffset;return rr.onStatus(new hm(Ji.buffer,s,i))||0},wasm_on_message_begin:r=>(ee.strictEqual(rr.ptr,r),rr.onMessageBegin()||0),wasm_on_header_field:(r,n,i)=>{ee.strictEqual(rr.ptr,r);let s=n-Vi+Ji.byteOffset;return rr.onHeaderField(new hm(Ji.buffer,s,i))||0},wasm_on_header_value:(r,n,i)=>{ee.strictEqual(rr.ptr,r);let s=n-Vi+Ji.byteOffset;return rr.onHeaderValue(new hm(Ji.buffer,s,i))||0},wasm_on_headers_complete:(r,n,i,s)=>(ee.strictEqual(rr.ptr,r),rr.onHeadersComplete(n,!!i,!!s)||0),wasm_on_body:(r,n,i)=>{ee.strictEqual(rr.ptr,r);let s=n-Vi+Ji.byteOffset;return rr.onBody(new hm(Ji.buffer,s,i))||0},wasm_on_message_complete:r=>(ee.strictEqual(rr.ptr,r),rr.onMessageComplete()||0)}})}var DQ=null,OQ=wZ();OQ.catch();var rr=null,Ji=null,gm=0,Vi=null,fc=1,pm=2,MQ=3,LQ=class{constructor(e,r,{exports:n}){ee(Number.isFinite(e[mm])&&e[mm]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(Yi.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[mm],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[ET]}setTimeout(e,r){this.timeoutType=r,e!==this.timeoutValue?(RQ.clearTimeout(this.timeout),e?(this.timeout=RQ.setTimeout(xZ,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(ee(this.ptr!=null),ee(rr==null),this.llhttp.llhttp_resume(this.ptr),ee(this.timeoutType===pm),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||NZ),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){ee(this.ptr!=null),ee(rr==null),ee(!this.paused);let{socket:r,llhttp:n}=this;e.length>gm&&(Vi&&n.free(Vi),gm=Math.ceil(e.length/4096)*4096,Vi=n.malloc(gm)),new Uint8Array(n.memory.buffer,Vi,gm).set(e);try{let i;try{Ji=e,rr=this,i=n.llhttp_execute(this.ptr,Vi,e.length)}catch(o){throw o}finally{rr=null,Ji=null}let s=n.llhttp_get_error_pos(this.ptr)-Vi;if(i===Yi.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(s));else if(i===Yi.ERROR.PAUSED)this.paused=!0,r.unshift(e.slice(s));else if(i!==Yi.ERROR.OK){let o=n.llhttp_get_error_reason(this.ptr),a="";if(o){let A=new Uint8Array(n.memory.buffer,o).indexOf(0);a="Response does not match the HTTP/1.1 protocol ("+B Line truncated
`;return typeof s=="string"?g+=`host: ${s}\r `;return typeof s=="string"?g+=`host: ${s}\r
`:g+=t[KO],o?g+=`connection: upgrade\r `:g+=t[fT],o?g+=`connection: upgrade\r
upgrade: ${o}\r upgrade: ${o}\r
`:t[Fo]&&!f[Wr]?g+=`connection: keep-alive\r `:t[Bo]&&!f[zr]?g+=`connection: keep-alive\r
`:g+=`connection: close\r `:g+=`connection: close\r
`,a&&(g+=a),Mr.sendHeaders.hasSubscribers&&Mr.sendHeaders.publish({request:e,headers:g,socket:f}),!r||u===0?(d===0?f.write(`${g}content-length: 0\r `,a&&(g+=a),kr.sendHeaders.hasSubscribers&&kr.sendHeaders.publish({request:e,headers:g,socket:f}),!r||u===0?(d===0?f.write(`${g}content-length: 0\r
\r \r
`,"latin1"):(ee(d===null,"no body must not have content length"),f.write(`${g}\r `,"latin1"):(ee(d===null,"no body must not have content length"),f.write(`${g}\r
`,"latin1")),e.onRequestSent()):Ae.isBuffer(r)?(ee(d===r.byteLength,"buffer body must have content length"),f.cork(),f.write(`${g}content-length: ${d}\r `,"latin1")),e.onRequestSent()):Ae.isBuffer(r)?(ee(d===r.byteLength,"buffer body must have content length"),f.cork(),f.write(`${g}content-length: ${d}\r
\r \r
`,"latin1"),f.write(r),f.uncork(),e.onBodySent(r),e.onRequestSent(),l||(f[Wr]=!0)):Ae.isBlobLike(r)?typeof r.stream=="function"?Ap({body:r.stream(),client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):uL({body:r,client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):Ae.isStream(r)?lL({body:r,client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):Ae.isIterable(r)?Ap({body:r,client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):ee(!1),!0}function Hee(t,e,r){let{body:n,method:i,path:s,host:o,upgrade:a,expectContinue:A,signal:c,headers:l}=r,u;if(typeof l=="string"?u=Xb[Qee](l.trim()):u=l,a)return $r(t,r,new Error("Upgrade not supported for H2")),!1;try{r.onConnect(I=>{r.aborted||r.completed||$r(t,r,I||new o0)})}catch(I){$r(t,r,I)}if(r.aborted)return!1;let d,f=t[op];if(u[Nee]=o||t[iL],u[wee]=i,i==="CONNECT")return e.ref(),d=e.request(u,{endStream:!1,signal:c}),d.id&&!d.pending?(r.onUpgrade(null,null,d),++f.openStreams):d.once("ready",()=>{r.onUpgrade(null,null,d),++f.openStreams}),d.once("close",()=>{f.openStreams-=1,f.openStreams===0&&e.unref()}),!0;u[See]=s,u[xee]="https";let g=i==="PUT"||i==="POST"||i==="PATCH";n&&typeof n.read=="function"&&n.read(0);let m=Ae.bodyLength(n);if(m==null&&(m=r.contentLength),(m===0||!g)&&(m=null),cL(i)&&m>0&&r.contentLength!=null&&r.contentLength!==m){if(t[cf])return $r(t,r,new Ws),!1;process.emitWarning(new Ws)}m!=null&&(ee(n,"no body must not have content length"),u[Ree]=`${m}`),e.ref();let E=i==="GET"||i==="HEAD";return A?(u[vee]="100-continue",d=e.request(u,{endStream:E,signal:c}),d.once("continue",C)):(d=e.request(u,{endStream:E,signal:c}),C()),++f.openStreams,d.once("response",I=>{let{[_ee]:N,...w}=I;r.onHeaders(Number(N),w,d.resume.bind(d),"")===!1&&d.pause()}),d.once("end",()=>{r.onComplete([])}),d.on("data",I=>{r.onData(I)===!1&&d.pause()}),d.once("close",()=>{f.openStreams-=1,f.openStreams===0&&e.unref()}),d.once("error",function(I){t[Mn]&&!t[Mn].destroyed&&!this.closed&&!this.destroyed&&(f.streams-=1,Ae.destroy(d,I))}),d.once("frameError",(I,N)=>{let w=new cs(`HTTP/2: "frameError" received - type ${I}, code ${N}`);$r(t,r,w),t[Mn]&&!t[Mn].destroyed&&!this.closed&&!this.destroyed&&(f.streams-=1,Ae.destroy(d,w))}),!0;function C(){n?Ae.isBuffer(n)?(ee(m===n.byteLength,"buffer body must have content length"),d.cork(),d.write(n),d.uncork(),d.end(),r.onBodySent(n),r.onRequestSent()):Ae.isBlobLike(n)?typeof n.stream=="function"?Ap({client:t,request:r,contentLength:m,h2stream:d,expectsPayload:g,body:n.stream(),socket:t[Ot],header:""}):uL({body:n,client:t,request:r,contentLength:m,expectsPayload:g,h2stream:d,header:"",socket:t[Ot]}):Ae.isStream(n)?lL({body:n,client:t,request:r,contentLength:m,expectsPayload:g,socket:t[Ot],h2stream:d,header:""}):Ae.isIterable(n)?Ap({body:n,client:t,request:r,contentLength:m,expectsPayload:g,header:"",h2stream:d,socket:t[Ot]}):ee(!1):r.onRequestSent()}}function lL({h2stream:t,body:e,client:r,request:n,socket:i,contentLength:s,header:o,expectsPayload:a}){if(ee(s!==0||r[Dt]===0,"stream body cannot be pipelined"),r[us]==="h2"){let m=function(E){n.onBodySent(E)},g=see(e,t,E=>{E?(Ae.destroy(e,E),Ae.destroy(t,E)):n.onRequestSent()});g.on("data",m),g.once("end",()=>{g.removeListener("data",m),Ae.destroy(g)});return}let A=!1,c=new cp({socket:i,request:n,contentLength:s,client:r,expectsPayload:a,header:o}),l=function(g){if(!A)try{!c.write(g)&&this.pause&&this.pause()}catch(m){Ae.destroy(this,m)}},u=function(){A||e.resume&&e.resume()},d=function(){if(A)return;let g=new o0;queueMicrotask(()=>f(g))},f=function(g){if(!A){if(A=!0,ee(i.destroyed||i[$s]&&r[Dt]<=1),i.off("drain",u).off("error",f),e.removeListener("data",l).removeListener("end",f).removeListener("error",f).removeListener("close",d),!g)try{c.end()}catch(m){g=m}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?Ae.destroy(e,g):Ae.destroy(e)}};e.on("data",l).on("end",f).on("error",f).on("close",d),e.resume&&e.resume(),i.on("drain",u).on("error",f)}async function uL({h2stream:t,body:e,client:r,request:n,socket:i,contentLength:s,header:o,expectsPayload:a}){ee(s===e.size,"blob body must have content length");let A=r[us]==="h2";try{if(s!=null&&s!==e.size)throw new Ws;let c=Buffer.from(await e.arrayBuffer());A?(t.cork(),t.write(c),t.uncork()):(i.cork(),i.write(`${o}content-length: ${s}\r `,"latin1"),f.write(r),f.uncork(),e.onBodySent(r),e.onRequestSent(),l||(f[zr]=!0)):Ae.isBlobLike(r)?typeof r.stream=="function"?Cm({body:r.stream(),client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):xT({body:r,client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):Ae.isStream(r)?wT({body:r,client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):Ae.isIterable(r)?Cm({body:r,client:t,request:e,socket:f,contentLength:d,header:g,expectsPayload:l}):ee(!1),!0}function RZ(t,e,r){let{body:n,method:i,path:s,host:o,upgrade:a,expectContinue:A,signal:c,headers:l}=r,u;if(typeof l=="string"?u=_Q[uZ](l.trim()):u=l,a)return jr(t,r,new Error("Upgrade not supported for H2")),!1;try{r.onConnect(I=>{r.aborted||r.completed||jr(t,r,I||new UQ)})}catch(I){jr(t,r,I)}if(r.aborted)return!1;let d,f=t[ym];if(u[fZ]=o||t[CT],u[hZ]=i,i==="CONNECT")return e.ref(),d=e.request(u,{endStream:!1,signal:c}),d.id&&!d.pending?(r.onUpgrade(null,null,d),++f.openStreams):d.once("ready",()=>{r.onUpgrade(null,null,d),++f.openStreams}),d.once("close",()=>{f.openStreams-=1,f.openStreams===0&&e.unref()}),!0;u[gZ]=s,u[mZ]="https";let g=i==="PUT"||i==="POST"||i==="PATCH";n&&typeof n.read=="function"&&n.read(0);let m=Ae.bodyLength(n);if(m==null&&(m=r.contentLength),(m===0||!g)&&(m=null),NT(i)&&m>0&&r.contentLength!=null&&r.contentLength!==m){if(t[kd])return jr(t,r,new ks),!1;process.emitWarning(new ks)}m!=null&&(ee(n,"no body must not have content length"),u[pZ]=`${m}`),e.ref();let E=i==="GET"||i==="HEAD";return A?(u[yZ]="100-continue",d=e.request(u,{endStream:E,signal:c}),d.once("continue",C)):(d=e.request(u,{endStream:E,signal:c}),C()),++f.openStreams,d.once("response",I=>{let{[EZ]:b,...w}=I;r.onHeaders(Number(b),w,d.resume.bind(d),"")===!1&&d.pause()}),d.once("end",()=>{r.onComplete([])}),d.on("data",I=>{r.onData(I)===!1&&d.pause()}),d.once("close",()=>{f.openStreams-=1,f.openStreams===0&&e.unref()}),d.once("error",function(I){t[vn]&&!t[vn].destroyed&&!this.closed&&!this.destroyed&&(f.streams-=1,Ae.destroy(d,I))}),d.once("frameError",(I,b)=>{let w=new Wi(`HTTP/2: "frameError" received - type ${I}, code ${b}`);jr(t,r,w),t[vn]&&!t[vn].destroyed&&!this.closed&&!this.destroyed&&(f.streams-=1,Ae.destroy(d,w))}),!0;function C(){n?Ae.isBuffer(n)?(ee(m===n.byteLength,"buffer body must have content length"),d.cork(),d.write(n),d.uncork(),d.end(),r.onBodySent(n),r.onRequestSent()):Ae.isBlobLike(n)?typeof n.stream=="function"?Cm({client:t,request:r,contentLength:m,h2stream:d,expectsPayload:g,body:n.stream(),socket:t[_t],header:""}):xT({body:n,client:t,request:r,contentLength:m,expectsPayload:g,h2stream:d,header:"",socket:t[_t]}):Ae.isStream(n)?wT({body:n,client:t,request:r,contentLength:m,expectsPayload:g,socket:t[_t],h2stream:d,header:""}):Ae.isIterable(n)?Cm({body:n,client:t,request:r,contentLength:m,expectsPayload:g,header:"",h2stream:d,socket:t[_t]}):ee(!1):r.onRequestSent()}}function wT({h2stream:t,body:e,client:r,request:n,socket:i,contentLength:s,header:o,expectsPayload:a}){if(ee(s!==0||r[St]===0,"stream body cannot be pipelined"),r[Ki]==="h2"){let m=function(E){n.onBodySent(E)},g=J6(e,t,E=>{E?(Ae.destroy(e,E),Ae.destroy(t,E)):n.onRequestSent()});g.on("data",m),g.once("end",()=>{g.removeListener("data",m),Ae.destroy(g)});return}let A=!1,c=new Im({socket:i,request:n,contentLength:s,client:r,expectsPayload:a,header:o}),l=function(g){if(!A)try{!c.write(g)&&this.pause&&this.pause()}catch(m){Ae.destroy(this,m)}},u=function(){A||e.resume&&e.resume()},d=function(){if(A)return;let g=new UQ;queueMicrotask(()=>f(g))},f=function(g){if(!A){if(A=!0,ee(i.destroyed||i[Ps]&&r[St]<=1),i.off("drain",u).off("error",f),e.removeListener("data",l).removeListener("end",f).removeListener("error",f).removeListener("close",d),!g)try{c.end()}catch(m){g=m}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?Ae.destroy(e,g):Ae.destroy(e)}};e.on("data",l).on("end",f).on("error",f).on("close",d),e.resume&&e.resume(),i.on("drain",u).on("error",f)}async function xT({h2stream:t,body:e,client:r,request:n,socket:i,contentLength:s,header:o,expectsPayload:a}){ee(s===e.size,"blob body must have content length");let A=r[Ki]==="h2";try{if(s!=null&&s!==e.size)throw new ks;let c=Buffer.from(await e.arrayBuffer());A?(t.cork(),t.write(c),t.uncork()):(i.cork(),i.write(`${o}content-length: ${s}\r
\r \r
`,"latin1"),i.write(c),i.uncork()),n.onBodySent(c),n.onRequestSent(),a||(i[Wr]=!0),Fn(r)}catch(c){Ae.destroy(A?t:i,c)}}async function Ap({h2stream:t,body:e,client:r,request:n,socket:i,contentLength:s,header:o,expectsPayload:a}){ee(s!==0||r[Dt]===0,"iterator body cannot be pipelined");let A=null;function c(){if(A){let d=A;A=null,d()}}let l=()=>new Promise((d,f)=>{ee(A===null),i[vr]?f(i[vr]):A=d});if(r[us]==="h2"){t.on("close",c).on("drain",c);try{for await(let d of e){if(i[vr])throw i[vr];let f=t.write(d);n.onBodySent(d),f||await l()}}catch(d){t.destroy(d)}finally{n.onRequestSent(),t.end(),t.off("close",c).off("drain",c)}return}i.on("close",c).on("drain",c);let u=new cp({socket:i,request:n,contentLength:s,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(i[vr])throw i[vr];u.write(d)||await l()}u.end()}catch(d){u.destroy(d)}finally{i.off("close",c).off("drain",c)}}var cp=class{constructor({socket:e,request:r,contentLength:n,client:i,expectsPayload:s,header:o}){this.socket=e,this.request=r,this.contentLength=n,this.client=i,this.bytesWritten=0,this.expectsPayload=s,this.header=o,e[$s]=!0}write(e){let{socket:r,request:n,contentLength:i,client:s,bytesWritten:o,expectsPayload:a,header:A}=this;if(r[vr])throw r[vr];if(r.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(i!==null&&o+c>i){if(s[cf])throw new Ws;process.emitWarning(new Ws)}r.cork(),o===0&&(a||(r[Wr]=!0),i===null?r.write(`${A}transfer-encoding: chunked\r `,"latin1"),i.write(c),i.uncork()),n.onBodySent(c),n.onRequestSent(),a||(i[zr]=!0),Rn(r)}catch(c){Ae.destroy(A?t:i,c)}}async function Cm({h2stream:t,body:e,client:r,request:n,socket:i,contentLength:s,header:o,expectsPayload:a}){ee(s!==0||r[St]===0,"iterator body cannot be pipelined");let A=null;function c(){if(A){let d=A;A=null,d()}}let l=()=>new Promise((d,f)=>{ee(A===null),i[br]?f(i[br]):A=d});if(r[Ki]==="h2"){t.on("close",c).on("drain",c);try{for await(let d of e){if(i[br])throw i[br];let f=t.write(d);n.onBodySent(d),f||await l()}}catch(d){t.destroy(d)}finally{n.onRequestSent(),t.end(),t.off("close",c).off("drain",c)}return}i.on("close",c).on("drain",c);let u=new Im({socket:i,request:n,contentLength:s,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(i[br])throw i[br];u.write(d)||await l()}u.end()}catch(d){u.destroy(d)}finally{i.off("close",c).off("drain",c)}}var Im=class{constructor({socket:e,request:r,contentLength:n,client:i,expectsPayload:s,header:o}){this.socket=e,this.request=r,this.contentLength=n,this.client=i,this.bytesWritten=0,this.expectsPayload=s,this.header=o,e[Ps]=!0}write(e){let{socket:r,request:n,contentLength:i,client:s,bytesWritten:o,expectsPayload:a,header:A}=this;if(r[br])throw r[br];if(r.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(i!==null&&o+c>i){if(s[kd])throw new ks;process.emitWarning(new ks)}r.cork(),o===0&&(a||(r[zr]=!0),i===null?r.write(`${A}transfer-encoding: chunked\r
`,"latin1"):r.write(`${A}content-length: ${i}\r `,"latin1"):r.write(`${A}content-length: ${i}\r
\r \r
`,"latin1")),i===null&&r.write(`\r `,"latin1")),i===null&&r.write(`\r
${c.toString(16)}\r ${c.toString(16)}\r
`,"latin1"),this.bytesWritten+=c;let l=r.write(e);return r.uncork(),n.onBodySent(e),l||r[Tt].timeout&&r[Tt].timeoutType===kc&&r[Tt].timeout.refresh&&r[Tt].timeout.refresh(),l}end(){let{socket:e,contentLength:r,client:n,bytesWritten:i,expectsPayload:s,header:o,request:a}=this;if(a.onRequestSent(),e[$s]=!1,e[vr])throw e[vr];if(!e.destroyed){if(i===0?s?e.write(`${o}content-length: 0\r `,"latin1"),this.bytesWritten+=c;let l=r.write(e);return r.uncork(),n.onBodySent(e),l||r[Dt].timeout&&r[Dt].timeoutType===fc&&r[Dt].timeout.refresh&&r[Dt].timeout.refresh(),l}end(){let{socket:e,contentLength:r,client:n,bytesWritten:i,expectsPayload:s,header:o,request:a}=this;if(a.onRequestSent(),e[Ps]=!1,e[br])throw e[br];if(!e.destroyed){if(i===0?s?e.write(`${o}content-length: 0\r
\r \r
`,"latin1"):e.write(`${o}\r `,"latin1"):e.write(`${o}\r
`,"latin1"):r===null&&e.write(`\r `,"latin1"):r===null&&e.write(`\r
0\r 0\r
\r \r
`,"latin1"),r!==null&&i!==r){if(n[cf])throw new Ws;process.emitWarning(new Ws)}e[Tt].timeout&&e[Tt].timeoutType===kc&&e[Tt].timeout.refresh&&e[Tt].timeout.refresh(),Fn(n)}}destroy(e){let{socket:r,client:n}=this;r[$s]=!1,e&&(ee(n[Dt]<=1,"pipeline should only contain this request"),Ae.destroy(r,e))}};function $r(t,e,r){try{e.onError(r),ee(e.aborted)}catch(n){t.emit("error",n)}}dL.exports=t0});var hL=h((WOe,fL)=>{"use strict";var up=class{constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};fL.exports=class{constructor(){this.head=this.tail=new up}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new up),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var mL=h(($Oe,gL)=>{var{kFree:jee,kConnected:zee,kPending:Gee,kQueued:Yee,kRunning:Jee,kSize:Vee}=It(),Ja=Symbol("pool"),a0=class{constructor(e){this[Ja]=e}get connected(){return this[Ja][zee]}get free(){return this[Ja][jee]}get pending(){return this[Ja][Gee]}get queued(){return this[Ja][Yee]}get running(){return this[Ja][Jee]}get size(){return this[Ja][Vee]}};gL.exports=a0});var f0=h((KOe,wL)=>{"use strict";var Wee=tf(),$ee=hL(),{kConnected:A0,kSize:pL,kRunning:yL,kPending:EL,kQueued:df,kBusy:Kee,kFree:Xee,kUrl:Zee,kClose:ete,kDestroy:tte,kDispatch:rte}=It(),nte=mL(),An=Symbol("clients"),Kr=Symbol("needDrain"),ff=Symbol("queue"),c0=Symbol("closed resolve"),l0=Symbol("onDrain"),CL=Symbol("onConnect"),IL=Symbol("onDisconnect"),BL=Symbol("onConnectionError"),u0=Symbol("get dispatcher"),bL=Symbol("add client"),NL=Symbol("remove client"),QL=Symbol("stats"),d0=class extends Wee{constructor(){super(),this[ff]=new $ee,this[An]=[],this[df]=0;let e=this;this[l0]=function(n,i){let s=e[ff],o=!1;for(;!o;){let a=s.shift();if(!a)break;e[df]--,o=!this.dispatch(a.opts,a.handler)}this[Kr]=o,!this[Kr]&&e[Kr]&&(e[Kr]=!1,e.emit("drain",n,[e,...i])),e[c0]&&s.isEmpty()&&Promise.all(e[An].map(a=>a.close())).then(e[c0])},this[CL]=(r,n)=>{e.emit("connect",r,[e,...n])},this[IL]=(r,n,i)=>{e.emit("disconnect",r,[e,...n],i)},this[BL]=(r,n,i)=>{e.emit("connectionError",r,[e,...n],i)},this[QL]=new nte(this)}get[Kee](){return this[Kr]}get[A0](){return this[An].filter(e=>e[A0]).length}get[Xee](){return this[An].filter(e=>e[A0]&&!e[Kr]).length}get[EL](){let e=this[df];for(let{[EL]:r}of this[An])e+=r;return e}get[yL](){let e=0;for(let{[yL]:r}of this[An])e+=r;return e}get[pL](){let e=this[df];for(let{[pL]:r}of this[An])e+=r;return e}get stats(){return this[QL]}async[ete](){return this[ff].isEmpty()?Promise.all(this[An].map(e=>e.close())):new Promise(e=>{this[c0]=e})}async[tte](e){for(;;){let r=this[ff].shift();if(!r)break;r.handler.onError(e)}return Promise.all(this[An].map(r=>r.destroy(e)))}[rte](e,r){let n=this[u0]();return n?n.dispatch(e,r)||(n[Kr]=!0,this[Kr]=!this[u0]()):(this[Kr]=!0,this[ff].push({opts:e,handler:r}),this[df]++),!this[Kr]}[bL](e){return e.on("drain",this[l0]).on("connect",this[CL]).on("disconnect",this[IL]).on("connectionError",this[BL]),this[An].push(e),this[Kr]&&process.nextTick(()=>{this[Kr]&&this[l0](e[Zee],[this,e])}),this}[NL](e){e.close(()=>{let r=this[An].indexOf(e);r!==-1&&this[An].splice(r,1)}),this[Kr]=this[An].some(r=>!r[Kr]&&r.closed!==!0&&r.destroyed!==!0)}};wL.exports={PoolBase:d0,kClients:An,kNeedDrain:Kr,kAddClient:bL,kRemoveClient:NL,kGetDispatcher:u0}});var Pc=h((XOe,RL)=>{"use strict";var{PoolBase:ite,kClients:dp,kNeedDrain:ste,kAddClient:ote,kGetDispatcher:ate}=f0(),Ate=uf(),{InvalidArgumentError:h0}=At(),g0=Ue(),{kUrl:SL,kInterceptors:cte}=It(),lte=rf(),m0=Symbol("options"),p0=Symbol("connections"),xL=Symbol("factory");function ute(t,e){return new Ate(t,e)}var y0=class extends ite{constructor(e,{connections:r,factory:n=ute,connect:i,connectTimeout:s,tls:o,maxCachedSessions:a,socketPath:A,autoSelectFamily:c,autoSelectFamilyAttemptTimeout:l,allowH2:u,...d}={}){if(super(),r!=null&&(!Number.isFinite(r)||r<0))throw new h0("invalid connections");if(typeof n!="function")throw new h0("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new h0("connect must be a function or an object");typeof i!="function"&&(i=lte({...o,maxCachedSessions:a,allowH2:u,socketPath:A,timeout:s,...g0.nodeHasAutoSelectFamily&&c?{autoSelectFamily:c,autoSelectFamilyAttemptTimeout:l}:void 0,...i})),this[cte]=d.interceptors&&d.interceptors.Pool&&Array.isArray(d.interceptors.Pool)?d.interceptors.Pool:[],this[p0]=r||null,this[SL]=g0.parseOrigin(e),this[m0]={...g0.deepClone(d),connect:i,allowH2:u},this[m0].interceptors=d.interceptors?{...d.interceptors}:void 0,this[xL]=n,this.on("connectionError",(f,g,m)=>{for(let E of g){let C=this[dp].indexOf(E);C!==-1&&this[d Line truncated `,"latin1"),r!==null&&i!==r){if(n[kd])throw new ks;process.emitWarning(new ks)}e[Dt].timeout&&e[Dt].timeoutType===fc&&e[Dt].timeout.refresh&&e[Dt].timeout.refresh(),Rn(n)}}destroy(e){let{socket:r,client:n}=this;r[Ps]=!1,e&&(ee(n[St]<=1,"pipeline should only contain this request"),Ae.destroy(r,e))}};function jr(t,e,r){try{e.onError(r),ee(e.aborted)}catch(n){t.emit("error",n)}}ST.exports=TQ});var RT=h((hke,vT)=>{"use strict";var Qm=class{constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};vT.exports=class{constructor(){this.head=this.tail=new Qm}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Qm),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var _T=h((gke,DT)=>{var{kFree:DZ,kConnected:_Z,kPending:kZ,kQueued:PZ,kRunning:TZ,kSize:OZ}=yt(),Sa=Symbol("pool"),qQ=class{constructor(e){this[Sa]=e}get connected(){return this[Sa][_Z]}get free(){return this[Sa][DZ]}get pending(){return this[Sa][kZ]}get queued(){return this[Sa][PZ]}get running(){return this[Sa][TZ]}get size(){return this[Sa][OZ]}};DT.exports=qQ});var JQ=h((mke,HT)=>{"use strict";var MZ=wd(),LZ=RT(),{kConnected:HQ,kSize:kT,kRunning:PT,kPending:TT,kQueued:Od,kBusy:FZ,kFree:UZ,kUrl:qZ,kClose:HZ,kDestroy:zZ,kDispatch:jZ}=yt(),GZ=_T(),en=Symbol("clients"),Gr=Symbol("needDrain"),Md=Symbol("queue"),zQ=Symbol("closed resolve"),jQ=Symbol("onDrain"),OT=Symbol("onConnect"),MT=Symbol("onDisconnect"),LT=Symbol("onConnectionError"),GQ=Symbol("get dispatcher"),UT=Symbol("add client"),qT=Symbol("remove client"),FT=Symbol("stats"),YQ=class extends MZ{constructor(){super(),this[Md]=new LZ,this[en]=[],this[Od]=0;let e=this;this[jQ]=function(n,i){let s=e[Md],o=!1;for(;!o;){let a=s.shift();if(!a)break;e[Od]--,o=!this.dispatch(a.opts,a.handler)}this[Gr]=o,!this[Gr]&&e[Gr]&&(e[Gr]=!1,e.emit("drain",n,[e,...i])),e[zQ]&&s.isEmpty()&&Promise.all(e[en].map(a=>a.close())).then(e[zQ])},this[OT]=(r,n)=>{e.emit("connect",r,[e,...n])},this[MT]=(r,n,i)=>{e.emit("disconnect",r,[e,...n],i)},this[LT]=(r,n,i)=>{e.emit("connectionError",r,[e,...n],i)},this[FT]=new GZ(this)}get[FZ](){return this[Gr]}get[HQ](){return this[en].filter(e=>e[HQ]).length}get[UZ](){return this[en].filter(e=>e[HQ]&&!e[Gr]).length}get[TT](){let e=this[Od];for(let{[TT]:r}of this[en])e+=r;return e}get[PT](){let e=0;for(let{[PT]:r}of this[en])e+=r;return e}get[kT](){let e=this[Od];for(let{[kT]:r}of this[en])e+=r;return e}get stats(){return this[FT]}async[HZ](){return this[Md].isEmpty()?Promise.all(this[en].map(e=>e.close())):new Promise(e=>{this[zQ]=e})}async[zZ](e){for(;;){let r=this[Md].shift();if(!r)break;r.handler.onError(e)}return Promise.all(this[en].map(r=>r.destroy(e)))}[jZ](e,r){let n=this[GQ]();return n?n.dispatch(e,r)||(n[Gr]=!0,this[Gr]=!this[GQ]()):(this[Gr]=!0,this[Md].push({opts:e,handler:r}),this[Od]++),!this[Gr]}[UT](e){return e.on("drain",this[jQ]).on("connect",this[OT]).on("disconnect",this[MT]).on("connectionError",this[LT]),this[en].push(e),this[Gr]&&process.nextTick(()=>{this[Gr]&&this[jQ](e[qZ],[this,e])}),this}[qT](e){e.close(()=>{let r=this[en].indexOf(e);r!==-1&&this[en].splice(r,1)}),this[Gr]=this[en].some(r=>!r[Gr]&&r.closed!==!0&&r.destroyed!==!0)}};HT.exports={PoolBase:YQ,kClients:en,kNeedDrain:Gr,kAddClient:UT,kRemoveClient:qT,kGetDispatcher:GQ}});var hc=h((pke,GT)=>{"use strict";var{PoolBase:YZ,kClients:bm,kNeedDrain:JZ,kAddClient:VZ,kGetDispatcher:WZ}=JQ(),$Z=Td(),{InvalidArgumentError:VQ}=At(),WQ=Fe(),{kUrl:zT,kInterceptors:KZ}=yt(),XZ=xd(),$Q=Symbol("options"),KQ=Symbol("connections"),jT=Symbol("factory");function ZZ(t,e){return new $Z(t,e)}var XQ=class extends YZ{constructor(e,{connections:r,factory:n=ZZ,connect:i,connectTimeout:s,tls:o,maxCachedSessions:a,socketPath:A,autoSelectFamily:c,autoSelectFamilyAttemptTimeout:l,allowH2:u,...d}={}){if(super(),r!=null&&(!Number.isFinite(r)||r<0))throw new VQ("invalid connections");if(typeof n!="function")throw new VQ("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new VQ("connect must be a function or an object");typeof i!="function"&&(i=XZ({...o,maxCachedSessions:a,allowH2:u,socketPath:A,timeout:s,...WQ.nodeHasAutoSelectFamily&&c?{autoSelectFamily:c,autoSelectFamilyAttemptTimeout:l}:void 0,...i})),this[KZ]=d.interceptors&&d.interceptors.Pool&&Array.isArray(d.interceptors.Pool)?d.interceptors.Pool:[],this[KQ]=r||null,this[zT]=WQ.parseOrigin(e),this[$Q]={...WQ.deepClone(d),connect:i,allowH2:u},this[$Q].interceptors=d.interceptors?{...d.interceptors}:void 0,this[jT]=n,this.on("connectionError",(f,g,m)=>{for(let E of g){let C=this[bm].indexOf(E);C!==-1&&this[bm].splice(C,1)}})}[WZ](){let e=this[bm].fin Line truncated
${n.count} ${n.noun} ${n.is} pending: ${n.count} ${n.noun} ${n.is} pending:
${e.format(r)} ${e.format(r)}
`.trim())}};aF.exports=rN});var hF=h((QLe,fF)=>{"use strict";var{kProxy:dne,kClose:fne,kDestroy:hne,kInterceptors:gne}=It(),{URL:cF}=require("url"),lF=gf(),mne=Pc(),pne=tf(),{InvalidArgumentError:Cf,RequestAbortedError:yne}=At(),uF=rf(),yf=Symbol("proxy agent"),kp=Symbol("proxy client"),Ef=Symbol("proxy headers"),nN=Symbol("request tls settings"),Ene=Symbol("proxy tls settings"),dF=Symbol("connect endpoint function");function Cne(t){return t==="https:"?443:80}function Ine(t){if(typeof t=="string"&&(t={uri:t}),!t||!t.uri)throw new Cf("Proxy opts.uri is mandatory");return{uri:t.uri,protocol:t.protocol||"https"}}function Bne(t,e){return new mne(t,e)}var iN=class extends pne{constructor(e){if(super(e),this[dne]=Ine(e),this[yf]=new lF(e),this[gne]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new Cf("Proxy opts.uri is mandatory");let{clientFactory:r=Bne}=e;if(typeof r!="function")throw new Cf("Proxy opts.clientFactory must be a function.");this[nN]=e.requestTls,this[Ene]=e.proxyTls,this[Ef]=e.headers||{};let n=new cF(e.uri),{origin:i,port:s,host:o,username:a,password:A}=n;if(e.auth&&e.token)throw new Cf("opts.auth cannot be used in combination with opts.token");e.auth?this[Ef]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[Ef]["proxy-authorization"]=e.token:a&&A&&(this[Ef]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(a)}:${decodeURIComponent(A)}`).toString("base64")}`);let c=uF({...e.proxyTls});this[dF]=uF({...e.requestTls}),this[kp]=r(n,{connect:c}),this[yf]=new lF({...e,connect:async(l,u)=>{let d=l.host;l.port||(d+=`:${Cne(l.protocol)}`);try{let{socket:f,statusCode:g}=await this[kp].connect({origin:i,port:s,path:d,signal:l.signal,headers:{...this[Ef],host:o}});if(g!==200&&(f.on("error",()=>{}).destroy(),u(new yne(`Proxy response (${g}) !== 200 when HTTP Tunneling`))),l.protocol!=="https:"){u(null,f);return}let m;this[nN]?m=this[nN].servername:m=l.servername,this[dF]({...l,servername:m,httpSocket:f},u)}catch(f){u(f)}}})}dispatch(e,r){let{host:n}=new cF(e.origin),i=Qne(e.headers);return bne(i),this[yf].dispatch({...e,headers:{...i,host:n}},r)}async[fne](){await this[yf].close(),await this[kp].close()}async[hne](){await this[yf].destroy(),await this[kp].destroy()}};function Qne(t){if(Array.isArray(t)){let e={};for(let r=0;r<t.length;r+=2)e[t[r]]=t[r+1];return e}return t}function bne(t){if(t&&Object.keys(t).find(r=>r.toLowerCase()==="proxy-authorization"))throw new Cf("Proxy-Authorization should be sent in ProxyAgent constructor")}fF.exports=iN});var EF=h((bLe,yF)=>{var Za=require("assert"),{kRetryHandlerDefaultRetry:gF}=It(),{RequestRetryError:Pp}=At(),{isDisturbed:mF,parseHeaders:Nne,parseRangeHeader:pF}=Ue();function wne(t){let e=Date.now();return new Date(t).getTime()-e}var sN=class t{constructor(e,r){let{retryOptions:n,...i}=e,{retry:s,maxRetries:o,maxTimeout:a,minTimeout:A,timeoutFactor:c,methods:l,errorCodes:u,retryAfter:d,statusCodes:f}=n??{};this.dispatch=r.dispatch,this.handler=r.handler,this.opts=i,this.abort=null,this.aborted=!1,this.retryOpts={retry:s??t[gF],retryAfter:d??!0,maxTimeout:a??30*1e3,timeout:A??500,timeoutFactor:c??2,maxRetries:o??5,methods:l??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:f??[500,502,503,504,429],errorCodes:u??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE"]},this.retryCount=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(g=>{this.aborted=!0,this.abort?this.abort(g):this.reason=g})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,r,n){this.handler.onUpgrade&&this.handler.onUpgrade(e,r,n)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[gF](e,{state:r,opts:n},i){let{statusCode:s,code:o,headers:a}=e,{method:A,retryOptions:c}=n,{maxRetries:l,timeout:u,maxTimeout:d,timeoutFactor:f,statusCodes:g,errorCodes:m,methods:E}=c,{counter:C,currentTimeout:I}=r;if(I=I!=null&&I>0?I:u,o&&o!=="UND_ERR_REQ_RETRY"&&o!=="UND_ERR_SOCKET"&&!m.includes(o)){i(e);return}if(Array.isArray(E)&&!E.includes(A)){i(e);return}if(s!=null&&Array.isArray(g)&&!g.includes(s)){i(e);return}if(C>l){i(e);return}let N=a!=null&&a["retry-after"];N&&(N=Number(N),N=isNaN(N)?wne(N):N*1e3);let w=N>0?Math.min(N,d):Math.min(I*f**C,d);r.currentTimeout=w,setTimeout(()=>i(null),w)}onHeaders(e,r,n,i){let s=Nne(r);if(this.retryCount+=1,e>=300)return this.abort(new Pp("Request failed",e,{headers:s,count:this.retryCount})),!1;if(this.resume!=null){if(this.resume=null,e!==206)return!0;let a=pF(s["content-range"]);if(!a)return this.abort(new Pp("Content-Range mismatch",e,{headers:s,count:this.retryCount})),!1;if(this.etag!=null&&this.etag!==s.etag)return this.abort(new Pp("ETag mismatch",e,{headers:s,count:this.retryCount})),!1;let{start:A,size:c,end:l=c}=a;return Za(t Line truncated `.trim())}};QM.exports=Ob});var RM=h((Hke,vM)=>{"use strict";var{kProxy:ete,kClose:tte,kDestroy:rte,kInterceptors:nte}=yt(),{URL:NM}=require("url"),wM=Fd(),ite=hc(),ste=wd(),{InvalidArgumentError:jd,RequestAbortedError:ote}=At(),xM=xd(),Hd=Symbol("proxy agent"),Gm=Symbol("proxy client"),zd=Symbol("proxy headers"),Mb=Symbol("request tls settings"),ate=Symbol("proxy tls settings"),SM=Symbol("connect endpoint function");function Ate(t){return t==="https:"?443:80}function cte(t){if(typeof t=="string"&&(t={uri:t}),!t||!t.uri)throw new jd("Proxy opts.uri is mandatory");return{uri:t.uri,protocol:t.protocol||"https"}}function lte(t,e){return new ite(t,e)}var Lb=class extends ste{constructor(e){if(super(e),this[ete]=cte(e),this[Hd]=new wM(e),this[nte]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new jd("Proxy opts.uri is mandatory");let{clientFactory:r=lte}=e;if(typeof r!="function")throw new jd("Proxy opts.clientFactory must be a function.");this[Mb]=e.requestTls,this[ate]=e.proxyTls,this[zd]=e.headers||{};let n=new NM(e.uri),{origin:i,port:s,host:o,username:a,password:A}=n;if(e.auth&&e.token)throw new jd("opts.auth cannot be used in combination with opts.token");e.auth?this[zd]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[zd]["proxy-authorization"]=e.token:a&&A&&(this[zd]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(a)}:${decodeURIComponent(A)}`).toString("base64")}`);let c=xM({...e.proxyTls});this[SM]=xM({...e.requestTls}),this[Gm]=r(n,{connect:c}),this[Hd]=new wM({...e,connect:async(l,u)=>{let d=l.host;l.port||(d+=`:${Ate(l.protocol)}`);try{let{socket:f,statusCode:g}=await this[Gm].connect({origin:i,port:s,path:d,signal:l.signal,headers:{...this[zd],host:o}});if(g!==200&&(f.on("error",()=>{}).destroy(),u(new ote(`Proxy response (${g}) !== 200 when HTTP Tunneling`))),l.protocol!=="https:"){u(null,f);return}let m;this[Mb]?m=this[Mb].servername:m=l.servername,this[SM]({...l,servername:m,httpSocket:f},u)}catch(f){u(f)}}})}dispatch(e,r){let{host:n}=new NM(e.origin),i=ute(e.headers);return dte(i),this[Hd].dispatch({...e,headers:{...i,host:n}},r)}async[tte](){await this[Hd].close(),await this[Gm].close()}async[rte](){await this[Hd].destroy(),await this[Gm].destroy()}};function ute(t){if(Array.isArray(t)){let e={};for(let r=0;r<t.length;r+=2)e[t[r]]=t[r+1];return e}return t}function dte(t){if(t&&Object.keys(t).find(r=>r.toLowerCase()==="proxy-authorization"))throw new jd("Proxy-Authorization should be sent in ProxyAgent constructor")}vM.exports=Lb});var TM=h((zke,PM)=>{var Pa=require("assert"),{kRetryHandlerDefaultRetry:DM}=yt(),{RequestRetryError:Ym}=At(),{isDisturbed:_M,parseHeaders:fte,parseRangeHeader:kM}=Fe();function hte(t){let e=Date.now();return new Date(t).getTime()-e}var Fb=class t{constructor(e,r){let{retryOptions:n,...i}=e,{retry:s,maxRetries:o,maxTimeout:a,minTimeout:A,timeoutFactor:c,methods:l,errorCodes:u,retryAfter:d,statusCodes:f}=n??{};this.dispatch=r.dispatch,this.handler=r.handler,this.opts=i,this.abort=null,this.aborted=!1,this.retryOpts={retry:s??t[DM],retryAfter:d??!0,maxTimeout:a??30*1e3,timeout:A??500,timeoutFactor:c??2,maxRetries:o??5,methods:l??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:f??[500,502,503,504,429],errorCodes:u??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE"]},this.retryCount=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(g=>{this.aborted=!0,this.abort?this.abort(g):this.reason=g})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,r,n){this.handler.onUpgrade&&this.handler.onUpgrade(e,r,n)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[DM](e,{state:r,opts:n},i){let{statusCode:s,code:o,headers:a}=e,{method:A,retryOptions:c}=n,{maxRetries:l,timeout:u,maxTimeout:d,timeoutFactor:f,statusCodes:g,errorCodes:m,methods:E}=c,{counter:C,currentTimeout:I}=r;if(I=I!=null&&I>0?I:u,o&&o!=="UND_ERR_REQ_RETRY"&&o!=="UND_ERR_SOCKET"&&!m.includes(o)){i(e);return}if(Array.isArray(E)&&!E.includes(A)){i(e);return}if(s!=null&&Array.isArray(g)&&!g.includes(s)){i(e);return}if(C>l){i(e);return}let b=a!=null&&a["retry-after"];b&&(b=Number(b),b=isNaN(b)?hte(b):b*1e3);let w=b>0?Math.min(b,d):Math.min(I*f**C,d);r.currentTimeout=w,setTimeout(()=>i(null),w)}onHeaders(e,r,n,i){let s=fte(r);if(this.retryCount+=1,e>=300)return this.abort(new Ym("Request failed",e,{headers:s,count:this.retryCount})),!1;if(this.resume!=null){if(this.resume=null,e!==206)return!0;let a=kM(s["content-range"]);if(!a)return this.abort(new Ym("Content-Range mismatch",e,{headers:s,count:this.retryCount})),!1;if(this.etag!=null&&this.etag!==s.etag)return this.abort(new Ym("ETag mismatch",e,{headers:s,count:this.retryCount})),!1;let{start:A,size:c,end:l=c}=a;return Pa(t Line truncated
Error Code : ${o.statusCode} Error Code : ${o.statusCode}
Error Message: ${o.message}`)})).result)===null||r===void 0?void 0:r.value;if(!s)throw new Error("Response json body do not have ID Token field");return s})}static getIDToken(e){return x1(this,void 0,void 0,function*(){try{let r=t.getIDTokenUrl();if(e){let i=encodeURIComponent(e);r=`${r}&audience=${i}`}(0,R1.debug)(`ID token url is ${r}`);let n=yield t.getCall(r);return(0,R1.setSecret)(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};sl.OidcClient=VN});var XN=h(fn=>{"use strict";var WN=fn&&fn.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(fn,"__esModule",{value:!0});fn.summary=fn.markdownSummary=fn.SUMMARY_DOCS_URL=fn.SUMMARY_ENV_VAR=void 0;var mae=require("os"),$N=require("fs"),{access:pae,appendFile:yae,writeFile:Eae}=$N.promises;fn.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";fn.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var KN=class{constructor(){this._buffer=""}filePath(){return WN(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[fn.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${fn.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield pae(e,$N.constants.R_OK|$N.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let i=Object.entries(n).map(([s,o])=>` ${s}="${o}"`).join("");return r?`<${e}${i}>${r}</${e}>`:`<${e}${i}>`}write(e){return WN(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?Eae:yae)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return WN(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(mae.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),i=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(i).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",i=e.map(o=>this.wrap("li",o)).join(""),s=this.wrap(n,i);return this.addRaw(s).addEOL()}addTable(e){let r=e.map(i=>{let s=i.map(o=>{if(typeof o=="string")return this.wrap("td",o);let{header:a,data:A,colspan:c,rowspan:l}=o,u=a?"th":"td",d=Object.assign(Object.assign({},c&&{colspan:c}),l&&{rowspan:l});return this.wrap(u,A,d)}).join("");return this.wrap("tr",s)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:i,height:s}=n||{},o=Object.assign(Object.assign({},i&&{width:i}),s&&{height:s}),a=this.wrap("img",null,Object.assign({src:e,alt:r},o));return this.addRaw(a).addEOL()}addHeading(e,r){let n=`h${r}`,i=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",s=this.wrap(i,e);return this.addRaw(s).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),i=this.wrap("blockquote",e,n);return this.addRaw(i).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},_1=new KN;fn.markdownSummary=_1;fn.summary=_1});var D1=h(hn=>{"use strict";var Cae=hn&&hn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Iae=hn&&hn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Bae=hn&&hn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Cae(e,t,r);return Iae(e,t),e};Object.defineProperty(hn,"__esModule",{value:!0});hn.toPlatformPath=hn.toWin32Path=hn.toPosixPath=void 0;var Qae=Bae(require("path"));function bae(t){return t.replace(/[\\]/g,"/")}hn.toPosixPath=bae;function Nae(t){return t.replace(/[/]/g,"\\")}hn.toWin32Path=Nae;function wae(t){return t.replace(/[/\\]/g,Qae.sep)}hn.toPlatformPath=wae});var ew=h(re=>{"use strict";var Sae=re&&re.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[nLine truncated Error Message: ${o.message}`)})).result)===null||r===void 0?void 0:r.value;if(!s)throw new Error("Response json body do not have ID Token field");return s})}static getIDToken(e){return jF(this,void 0,void 0,function*(){try{let r=t.getIDTokenUrl();if(e){let i=encodeURIComponent(e);r=`${r}&audience=${i}`}(0,GF.debug)(`ID token url is ${r}`);let n=yield t.getCall(r);return(0,GF.setSecret)(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};Fc.OidcClient=S0});var _0=h(on=>{"use strict";var v0=on&&on.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(on,"__esModule",{value:!0});on.summary=on.markdownSummary=on.SUMMARY_DOCS_URL=on.SUMMARY_ENV_VAR=void 0;var ise=require("os"),R0=require("fs"),{access:sse,appendFile:ose,writeFile:ase}=R0.promises;on.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";on.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var D0=class{constructor(){this._buffer=""}filePath(){return v0(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[on.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${on.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield sse(e,R0.constants.R_OK|R0.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let i=Object.entries(n).map(([s,o])=>` ${s}="${o}"`).join("");return r?`<${e}${i}>${r}</${e}>`:`<${e}${i}>`}write(e){return v0(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?ase:ose)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return v0(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(ise.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),i=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(i).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",i=e.map(o=>this.wrap("li",o)).join(""),s=this.wrap(n,i);return this.addRaw(s).addEOL()}addTable(e){let r=e.map(i=>{let s=i.map(o=>{if(typeof o=="string")return this.wrap("td",o);let{header:a,data:A,colspan:c,rowspan:l}=o,u=a?"th":"td",d=Object.assign(Object.assign({},c&&{colspan:c}),l&&{rowspan:l});return this.wrap(u,A,d)}).join("");return this.wrap("tr",s)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:i,height:s}=n||{},o=Object.assign(Object.assign({},i&&{width:i}),s&&{height:s}),a=this.wrap("img",null,Object.assign({src:e,alt:r},o));return this.addRaw(a).addEOL()}addHeading(e,r){let n=`h${r}`,i=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",s=this.wrap(i,e);return this.addRaw(s).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),i=this.wrap("blockquote",e,n);return this.addRaw(i).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},JF=new D0;on.markdownSummary=JF;on.summary=JF});var VF=h(an=>{"use strict";var Ase=an&&an.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),cse=an&&an.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),lse=an&&an.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ase(e,t,r);return cse(e,t),e};Object.defineProperty(an,"__esModule",{value:!0});an.toPlatformPath=an.toWin32Path=an.toPosixPath=void 0;var use=lse(require("path"));function dse(t){return t.replace(/[\\]/g,"/")}an.toPosixPath=dse;function fse(t){return t.replace(/[/]/g,"\\")}an.toWin32Path=fse;function hse(t){return t.replace(/[/\\]/g,use.sep)}an.toPlatformPath=hse});var P0=h(re=>{"use strict";var gse=re&&re.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[nLine truncated
`);return{name:e,version:r}});qe.platform=$1.default.platform();qe.arch=$1.default.arch();qe.isWindows=qe.platform==="win32";qe.isMacOS=qe.platform==="darwin";qe.isLinux=qe.platform==="linux";function sAe(){return Ry(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield qe.isWindows?rAe():qe.isMacOS?nAe():iAe()),{platform:qe.platform,arch:qe.arch,isWindows:qe.isWindows,isMacOS:qe.isMacOS,isLinux:qe.isLinux})})}qe.getDetails=sAe});var at=h(te=>{"use strict";var oAe=te&&te.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),aAe=te&&te.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),sw=te&&te.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&oAe(e,t,r);return aAe(e,t),e},X1=te&&te.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(te,"__esModule",{value:!0});te.platform=te.toPlatformPath=te.toWin32Path=te.toPosixPath=te.markdownSummary=te.summary=te.getIDToken=te.getState=te.saveState=te.group=te.endGroup=te.startGroup=te.info=te.notice=te.warning=te.error=te.debug=te.isDebug=te.setFailed=te.setCommandEcho=te.setOutput=te.getBooleanInput=te.getMultilineInput=te.getInput=te.addPath=te.setSecret=te.exportVariable=te.ExitCode=void 0;var li=_P(),aA=PP(),al=Rm(),Z1=sw(require("os")),AAe=sw(require("path")),cAe=v1(),iw;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(iw||(te.ExitCode=iw={}));function lAe(t,e){let r=(0,al.toCommandValue)(e);if(process.env[t]=r,process.env.GITHUB_ENV||"")return(0,aA.issueFileCommand)("ENV",(0,aA.prepareKeyValueMessage)(t,e));(0,li.issueCommand)("set-env",{name:t},r)}te.exportVariable=lAe;function uAe(t){(0,li.issueCommand)("add-mask",{},t)}te.setSecret=uAe;function dAe(t){process.env.GITHUB_PATH||""?(0,aA.issueFileCommand)("PATH",t):(0,li.issueCommand)("add-path",{},t),process.env.PATH=`${t}${AAe.delimiter}${process.env.PATH}`}te.addPath=dAe;function ow(t,e){let r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?r:r.trim()}te.getInput=ow;function fAe(t,e){let r=ow(t,e).split(` `);return{name:e,version:r}});Ue.platform=dU.default.platform();Ue.arch=dU.default.arch();Ue.isWindows=Ue.platform==="win32";Ue.isMacOS=Ue.platform==="darwin";Ue.isLinux=Ue.platform==="linux";function Jse(){return qp(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield Ue.isWindows?jse():Ue.isMacOS?Gse():Yse()),{platform:Ue.platform,arch:Ue.arch,isWindows:Ue.isWindows,isMacOS:Ue.isMacOS,isLinux:Ue.isLinux})})}Ue.getDetails=Jse});var it=h(te=>{"use strict";var Vse=te&&te.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Wse=te&&te.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),F0=te&&te.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Vse(e,t,r);return Wse(e,t),e},hU=te&&te.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(te,"__esModule",{value:!0});te.platform=te.toPlatformPath=te.toWin32Path=te.toPosixPath=te.markdownSummary=te.summary=te.getIDToken=te.getState=te.saveState=te.group=te.endGroup=te.startGroup=te.info=te.notice=te.warning=te.error=te.debug=te.isDebug=te.setFailed=te.setCommandEcho=te.setOutput=te.getBooleanInput=te.getMultilineInput=te.getInput=te.addPath=te.setSecret=te.exportVariable=te.ExitCode=void 0;var ei=J_(),Ha=$_(),Hc=qg(),gU=F0(require("os")),$se=F0(require("path")),Kse=YF(),L0;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(L0||(te.ExitCode=L0={}));function Xse(t,e){let r=(0,Hc.toCommandValue)(e);if(process.env[t]=r,process.env.GITHUB_ENV||"")return(0,Ha.issueFileCommand)("ENV",(0,Ha.prepareKeyValueMessage)(t,e));(0,ei.issueCommand)("set-env",{name:t},r)}te.exportVariable=Xse;function Zse(t){(0,ei.issueCommand)("add-mask",{},t)}te.setSecret=Zse;function eoe(t){process.env.GITHUB_PATH||""?(0,Ha.issueFileCommand)("PATH",t):(0,ei.issueCommand)("add-path",{},t),process.env.PATH=`${t}${$se.delimiter}${process.env.PATH}`}te.addPath=eoe;function U0(t,e){let r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?r:r.trim()}te.getInput=U0;function toe(t,e){let r=U0(t,e).split(`
`).filter(n=>n!=="");return e&&e.trimWhitespace===!1?r:r.map(n=>n.trim())}te.getMultilineInput=fAe;function hAe(t,e){let r=["true","True","TRUE"],n=["false","False","FALSE"],i=ow(t,e);if(r.includes(i))return!0;if(n.includes(i))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t} `).filter(n=>n!=="");return e&&e.trimWhitespace===!1?r:r.map(n=>n.trim())}te.getMultilineInput=toe;function roe(t,e){let r=["true","True","TRUE"],n=["false","False","FALSE"],i=U0(t,e);if(r.includes(i))return!0;if(n.includes(i))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}te.getBooleanInput=hAe;function gAe(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,aA.issueFileCommand)("OUTPUT",(0,aA.prepareKeyValueMessage)(t,e));process.stdout.write(Z1.EOL),(0,li.issueCommand)("set-output",{name:t},(0,al.toCommandValue)(e))}te.setOutput=gAe;function mAe(t){(0,li.issue)("echo",t?"on":"off")}te.setCommandEcho=mAe;function pAe(t){process.exitCode=iw.Failure,eq(t)}te.setFailed=pAe;function yAe(){return process.env.RUNNER_DEBUG==="1"}te.isDebug=yAe;function EAe(t){(0,li.issueCommand)("debug",{},t)}te.debug=EAe;function eq(t,e={}){(0,li.issueCommand)("error",(0,al.toCommandProperties)(e),t instanceof Error?t.toString():t)}te.error=eq;function CAe(t,e={}){(0,li.issueCommand)("warning",(0,al.toCommandProperties)(e),t instanceof Error?t.toString():t)}te.warning=CAe;function IAe(t,e={}){(0,li.issueCommand)("notice",(0,al.toCommandProperties)(e),t instanceof Error?t.toString():t)}te.notice=IAe;function BAe(t){process.stdout.write(t+Z1.EOL)}te.info=BAe;function tq(t){(0,li.issue)("group",t)}te.startGroup=tq;function rq(){(0,li.issue)("endgroup")}te.endGroup=rq;function QAe(t,e){return X1(this,void 0,void 0,function*(){tq(t);let r;try{r=yield e()}finally{rq()}return r})}te.group=QAe;function bAe(t,e){if(process.env.GITHUB_STATE||"")return(0,aA.issueFileCommand)("STATE",(0,aA.prepareKeyValueMessage)(t,e));(0,li.issueCommand)("save-state",{name:t},(0,al.toCommandValue)(e))}te.saveState=bAe;function NAe(t){return process.env[`STATE_${t}`]||""}te.getState=NAe;function wAe(t){return X1(this,void 0,void 0,function*(){return yield cAe.OidcClient.getIDToken(t)})}te.getIDToken=wAe;var SAe=XN();Object.defineProperty(te,"summary",{enumerable:!0,get:function(){return SAe.summary}});var xAe=XN();Object.defineProperty(te,"markdownSummary",{enumerable:!0,get:function(){return xAe.markdownSummary}});var aw=D1();Object.defineProperty(te,"toPosixPath",{enumerable:!0,get:function(){return aw.toPosixPath}});Object.defineProperty(te,"toWin32Path",{enumerable:!0,get:function(){return aw.toWin32Path}});Object.defineProperty(te,"toPlatformPath",{enumerable:!0,get:function(){return aw.toPlatformPath}});te.platform=sw(K1())});var nq=h(Es=>{"use strict";var RAe=Es&&Es.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),vAe=Es&&Es.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),_Ae=Es&&Es.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&RAe(e,t,r);return vAe(e,t),e};Object.defineProperty(Es,"__esModule",{value:!0});Es.getOptions=void 0;var Aw=_Ae(at());function DAe(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,omitBrokenSymbolicLinks:!0};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,Aw.debug(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,Aw.debug(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,Aw.debug(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`))),e}Es.getOptions=DAe});var _y=h(Mt=>{"use strict";var kAe=Mt&&Mt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),PAe=Mt&&Mt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),TAe=Mt&&Mt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&kAe(e,t,r);return PAe(e,t),e},OAe=Mt&&Mt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.safeTrimTrailingSeparator=Mt.normalizeSeparators=Mt.hasRoot=Mt.hasAbsoluteRoot=Mt.ensureAbsoluteRoot=Mt.dirname=void 0;var vy=TAe(require("path")),AA=OAe(require("assert")),Jo=process.platform==="win32";function LAe(t){if(t=lw(t),Jo&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=vy.dirname(t);return Jo&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=lw(e)),e}Mt.dirname=LAe;function MAe(t,e){if(AA.default(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),AA.default(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),cw(e))return e;if(Jo){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let r=process.cwd();return AA.default(r.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${r}'`),e[0].toUpperCase()===r[0].toUpperCase()?e.length===2?`${e[0]}:\\${r.substr(3)}`:(r.endsWith("\\")||(r+="\\Line truncated Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}te.getBooleanInput=roe;function noe(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,Ha.issueFileCommand)("OUTPUT",(0,Ha.prepareKeyValueMessage)(t,e));process.stdout.write(gU.EOL),(0,ei.issueCommand)("set-output",{name:t},(0,Hc.toCommandValue)(e))}te.setOutput=noe;function ioe(t){(0,ei.issue)("echo",t?"on":"off")}te.setCommandEcho=ioe;function soe(t){process.exitCode=L0.Failure,mU(t)}te.setFailed=soe;function ooe(){return process.env.RUNNER_DEBUG==="1"}te.isDebug=ooe;function aoe(t){(0,ei.issueCommand)("debug",{},t)}te.debug=aoe;function mU(t,e={}){(0,ei.issueCommand)("error",(0,Hc.toCommandProperties)(e),t instanceof Error?t.toString():t)}te.error=mU;function Aoe(t,e={}){(0,ei.issueCommand)("warning",(0,Hc.toCommandProperties)(e),t instanceof Error?t.toString():t)}te.warning=Aoe;function coe(t,e={}){(0,ei.issueCommand)("notice",(0,Hc.toCommandProperties)(e),t instanceof Error?t.toString():t)}te.notice=coe;function loe(t){process.stdout.write(t+gU.EOL)}te.info=loe;function pU(t){(0,ei.issue)("group",t)}te.startGroup=pU;function yU(){(0,ei.issue)("endgroup")}te.endGroup=yU;function uoe(t,e){return hU(this,void 0,void 0,function*(){pU(t);let r;try{r=yield e()}finally{yU()}return r})}te.group=uoe;function doe(t,e){if(process.env.GITHUB_STATE||"")return(0,Ha.issueFileCommand)("STATE",(0,Ha.prepareKeyValueMessage)(t,e));(0,ei.issueCommand)("save-state",{name:t},(0,Hc.toCommandValue)(e))}te.saveState=doe;function foe(t){return process.env[`STATE_${t}`]||""}te.getState=foe;function hoe(t){return hU(this,void 0,void 0,function*(){return yield Kse.OidcClient.getIDToken(t)})}te.getIDToken=hoe;var goe=_0();Object.defineProperty(te,"summary",{enumerable:!0,get:function(){return goe.summary}});var moe=_0();Object.defineProperty(te,"markdownSummary",{enumerable:!0,get:function(){return moe.markdownSummary}});var q0=VF();Object.defineProperty(te,"toPosixPath",{enumerable:!0,get:function(){return q0.toPosixPath}});Object.defineProperty(te,"toWin32Path",{enumerable:!0,get:function(){return q0.toWin32Path}});Object.defineProperty(te,"toPlatformPath",{enumerable:!0,get:function(){return q0.toPlatformPath}});te.platform=F0(fU())});var EU=h(ss=>{"use strict";var poe=ss&&ss.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),yoe=ss&&ss.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Eoe=ss&&ss.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&poe(e,t,r);return yoe(e,t),e};Object.defineProperty(ss,"__esModule",{value:!0});ss.getOptions=void 0;var H0=Eoe(it());function Coe(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,omitBrokenSymbolicLinks:!0};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,H0.debug(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,H0.debug(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,H0.debug(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`))),e}ss.getOptions=Coe});var zp=h(Pt=>{"use strict";var Ioe=Pt&&Pt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Boe=Pt&&Pt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Qoe=Pt&&Pt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Ioe(e,t,r);return Boe(e,t),e},boe=Pt&&Pt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.safeTrimTrailingSeparator=Pt.normalizeSeparators=Pt.hasRoot=Pt.hasAbsoluteRoot=Pt.ensureAbsoluteRoot=Pt.dirname=void 0;var Hp=Qoe(require("path")),za=boe(require("assert")),Ro=process.platform==="win32";function Noe(t){if(t=j0(t),Ro&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=Hp.dirname(t);return Ro&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=j0(e)),e}Pt.dirname=Noe;function woe(t,e){if(za.default(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),za.default(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),z0(e))return e;if(Ro){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let r=process.cwd();return za.default(r.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${r}'`),e[0].toUpperCase()===r[0].toUpperCase()?e.length===2?`${e[0]}:\\${r.substr(3)}`:(r.endsWith("\\")||(r+="\\Line truncated
%s`,v,v,I,n);var T=I.type==="*"?hw:I.type==="?"?fw:"\\"+I.type;i=!0,n=n.slice(0,I.reStart)+T+"\\("+v}g(),s&&(n+="\\\\");var U=!1;switch(n.charAt(0)){case"[":case".":case"(":U=!0}for(var k=a.length-1;k>-1;k--){var J=a[k],be=n.slice(0,J.reStart),Re=n.slice(J.reStart,J.reEnd-8),H=n.slice(J.reEnd-8,J.reEnd),_e=n.slice(J.reEnd);H+=_e;var rt=be.split("(").length-1,Or=_e;for(m=0;m<rt;m++)Or=Or.replace(/\)[+*?]?/,"");_e=Or;var fr="";_e===""&&e!==ky&&(fr="$");var So=be+Re+_e+fr+H;n=So}if(n!==""&&i&&(n="(?=.)"+n),U&&(n=d+n),e===ky)return[n,i];if(!i)return fce(t);var xo=r.nocase?"i":"";try{var Oi=new RegExp("^"+n+"$",xo)}catch{return new RegExp("$.")}return Oi._glob=t,Oi._src=n,Oi}Yn.makeRe=function(t,e){return new Dr(t,e||{}).makeRe()};Dr.prototype.makeRe=dce;function dce(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?hw:e.dot?ice:sce,n=e.nocase?"i":"",i=t.map(function(s){return s.map(function(o){return o===gw?r:typeof o=="string"?hce(o):o._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch{this.regexp=!1}return this.regexp}Yn.match=function(t,e,r){r=r||{};var n=new Dr(e,r);return t=t.filter(function(i){return n.match(i)}),n.options.nonull&&!t.length&&t.push(e),t};Dr.prototype.match=function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;Lf.sep!=="/"&&(e=e.split(Lf.sep).join("/")),e=e.split(bq),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var s,o;for(o=e.length-1;o>=0&&(s=e[o],!s);o--);for(o=0;o<i.length;o++){var a=i[o],A=e;n.matchBase&&a.length===1&&(A=[s]);var c=this.matchOne(A,a,r);if(c)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};Dr.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,s=0,o=t.length,a=e.length;i<o&&s<a;i++,s++){this.debug("matchOne loop");var A=e[s],c=t[i];if(this.debug(e,A,c),A===!1)return!1;if(A===gw){this.debug("GLOBSTAR",[e,A,c]);var l=i,u=s+1;if(u===a){for(this.debug("** at the end");i<o;i++)if(t[i]==="."||t[i]===".."||!n.dot&&t[i].charAt(0)===".")return!1;return!0}for(;l<o;){var d=t[l];if(this.debug(` %s`,R,R,I,n);var T=I.type==="*"?V0:I.type==="?"?J0:"\\"+I.type;i=!0,n=n.slice(0,I.reStart)+T+"\\("+R}g(),s&&(n+="\\\\");var U=!1;switch(n.charAt(0)){case"[":case".":case"(":U=!0}for(var k=a.length-1;k>-1;k--){var J=a[k],Qe=n.slice(0,J.reStart),Se=n.slice(J.reStart,J.reEnd-8),H=n.slice(J.reEnd-8,J.reEnd),Re=n.slice(J.reEnd);H+=Re;var tt=Qe.split("(").length-1,Dr=Re;for(m=0;m<tt;m++)Dr=Dr.replace(/\)[+*?]?/,"");Re=Dr;var ar="";Re===""&&e!==Gp&&(ar="$");var co=Qe+Se+Re+ar+H;n=co}if(n!==""&&i&&(n="(?=.)"+n),U&&(n=d+n),e===Gp)return[n,i];if(!i)return tae(t);var lo=r.nocase?"i":"";try{var Ni=new RegExp("^"+n+"$",lo)}catch{return new RegExp("$.")}return Ni._glob=t,Ni._src=n,Ni}Mn.makeRe=function(t,e){return new wr(t,e||{}).makeRe()};wr.prototype.makeRe=eae;function eae(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?V0:e.dot?Yoe:Joe,n=e.nocase?"i":"",i=t.map(function(s){return s.map(function(o){return o===W0?r:typeof o=="string"?rae(o):o._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch{this.regexp=!1}return this.regexp}Mn.match=function(t,e,r){r=r||{};var n=new wr(e,r);return t=t.filter(function(i){return n.match(i)}),n.options.nonull&&!t.length&&t.push(e),t};wr.prototype.match=function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;af.sep!=="/"&&(e=e.split(af.sep).join("/")),e=e.split(UU),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var s,o;for(o=e.length-1;o>=0&&(s=e[o],!s);o--);for(o=0;o<i.length;o++){var a=i[o],A=e;n.matchBase&&a.length===1&&(A=[s]);var c=this.matchOne(A,a,r);if(c)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};wr.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,s=0,o=t.length,a=e.length;i<o&&s<a;i++,s++){this.debug("matchOne loop");var A=e[s],c=t[i];if(this.debug(e,A,c),A===!1)return!1;if(A===W0){this.debug("GLOBSTAR",[e,A,c]);var l=i,u=s+1;if(u===a){for(this.debug("** at the end");i<o;i++)if(t[i]==="."||t[i]===".."||!n.dot&&t[i].charAt(0)===".")return!1;return!0}for(;l<o;){var d=t[l];if(this.debug(`
globstar while`,t,l,e,u,d),this.matchOne(t.slice(l),e.slice(u),r))return this.debug("globstar found match!",l,o,d),!0;if(d==="."||d===".."||!n.dot&&d.charAt(0)==="."){this.debug("dot detected!",t,l,e,u);break}this.debug("globstar swallow a segment, and continue"),l++}return!!(r&&(this.debug(` globstar while`,t,l,e,u,d),this.matchOne(t.slice(l),e.slice(u),r))return this.debug("globstar found match!",l,o,d),!0;if(d==="."||d===".."||!n.dot&&d.charAt(0)==="."){this.debug("dot detected!",t,l,e,u);break}this.debug("globstar swallow a segment, and continue"),l++}return!!(r&&(this.debug(`
>>> no match, partial?`,t,l,e,u),l===o))}var f;if(typeof A=="string"?(f=c===A,this.debug("string match",A,c,f)):(f=c.match(A),this.debug("pattern match",A,c,f)),!f)return!1}if(i===o&&s===a)return!0;if(i===o)return r;if(s===a)return i===o-1&&t[i]==="";throw new Error("wtf?")};function fce(t){return t.replace(/\\(.)/g,"$1")}function hce(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var xq=h(ui=>{"use strict";var gce=ui&&ui.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),mce=ui&&ui.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Sq=ui&&ui.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&gce(e,t,r);return mce(e,t),e},pce=ui&&ui.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ui,"__esModule",{value:!0});ui.Path=void 0;var Mf=Sq(require("path")),Wo=Sq(_y()),Ff=pce(require("assert")),yce=process.platform==="win32",pw=class{constructor(e){if(this.segments=[],typeof e=="string")if(Ff.default(e,"Parameter 'itemPath' must not be empty"),e=Wo.safeTrimTrailingSeparator(e),!Wo.hasRoot(e))this.segments=e.split(Mf.sep);else{let r=e,n=Wo.dirname(r);for(;n!==r;){let i=Mf.basename(r);this.segments.unshift(i),r=n,n=Wo.dirname(r)}this.segments.unshift(r)}else{Ff.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let r=0;r<e.length;r++){let n=e[r];Ff.default(n,"Parameter 'itemPath' must not contain any empty segments"),n=Wo.normalizeSeparators(e[r]),r===0&&Wo.hasRoot(n)?(n=Wo.safeTrimTrailingSeparator(n),Ff.default(n===Wo.dirname(n),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(n)):(Ff.default(!n.includes(Mf.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(n))}}}toString(){let e=this.segments[0],r=e.endsWith(Mf.sep)||yce&&/^[A-Z]:$/i.test(e);for(let n=1;n<this.segments.length;n++)r?r=!1:e+=Mf.sep,e+=this.segments[n];return e}};ui.Path=pw});var Rq=h(di=>{"use strict";var Ece=di&&di.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Cce=di&&di.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Cw=di&&di.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Ece(e,t,r);return Cce(e,t),e},Ice=di&&di.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(di,"__esModule",{value:!0});di.Pattern=void 0;var Bce=Cw(require("os")),Uf=Cw(require("path")),En=Cw(_y()),cA=Ice(require("assert")),Qce=mw(),yw=Dy(),Ty=xq(),to=process.platform==="win32",Ew=class t{constructor(e,r=!1,n,i){this.negate=!1;let s;if(typeof e=="string")s=e.trim();else{n=n||[],cA.default(n.length,"Parameter 'segments' must not empty");let c=t.getLiteral(n[0]);cA.default(c&&En.hasAbsoluteRoot(c),"Parameter 'segments' first element must be a root path"),s=new Ty.Path(n).toString().trim(),e&&(s=`!${s}`)}for(;s.startsWith("!");)this.negate=!this.negate,s=s.substr(1).trim();s=t.fixupPattern(s,i),this.segments=new Ty.Path(s).segments,this.trailingSeparator=En.normalizeSeparators(s).endsWith(Uf.sep),s=En.safeTrimTrailingSeparator(s);let o=!1,a=this.segments.map(c=>t.getLiteral(c)).filter(c=>!o&&!(o=c===""));this.searchPath=new Ty.Path(a).toString(),this.rootRegExp=new RegExp(t.regExpEscape(a[0]),to?"i":""),this.isImplicitPattern=r;let A={dot:!0,nobrace:!0,nocase:to,nocomment:!0,noext:!0,nonegate:!0};s=to?s.replace(/\\/g,"/"):s,this.minimatch=new Qce.Minimatch(s,A)}match(e){return this.segments[this.segments.length-1]==="**"?(e=En.normalizeSeparators(e),!e.endsWith(Uf.sep)&&this.isImplicitPattern===!1&&(e=`${e}${Uf.sep}`)):e=En.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?yw.MatchKind.Directory:yw.MatchKind.All:yw.MatchKind.None}partialMatch(e){return e=En.safeTrimTrailingSeparator(e),En.dirname(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(to?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(to?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,r){cA.default(e,"pattern cannot be empty");let n=new Ty.Path(e).segments.map(i=>t.getLiteral(i));if(cA.default(n.every((i,s)=>(i!=="."||s===0)&&i!==".."),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),cA.default(!En.hasRoot(e)||n[0],`Invalid pattern '${e}'. Root segment must not contain globs.`),e=En.normalizeSeparators(e),e==="."||e.startsWith(`.${Uf.sep}`))e Line truncated >>> no match, partial?`,t,l,e,u),l===o))}var f;if(typeof A=="string"?(f=c===A,this.debug("string match",A,c,f)):(f=c.match(A),this.debug("pattern match",A,c,f)),!f)return!1}if(i===o&&s===a)return!0;if(i===o)return r;if(s===a)return i===o-1&&t[i]==="";throw new Error("wtf?")};function tae(t){return t.replace(/\\(.)/g,"$1")}function rae(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var jU=h(ti=>{"use strict";var nae=ti&&ti.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),iae=ti&&ti.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),zU=ti&&ti.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&nae(e,t,r);return iae(e,t),e},sae=ti&&ti.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ti,"__esModule",{value:!0});ti.Path=void 0;var Af=zU(require("path")),_o=zU(zp()),cf=sae(require("assert")),oae=process.platform==="win32",K0=class{constructor(e){if(this.segments=[],typeof e=="string")if(cf.default(e,"Parameter 'itemPath' must not be empty"),e=_o.safeTrimTrailingSeparator(e),!_o.hasRoot(e))this.segments=e.split(Af.sep);else{let r=e,n=_o.dirname(r);for(;n!==r;){let i=Af.basename(r);this.segments.unshift(i),r=n,n=_o.dirname(r)}this.segments.unshift(r)}else{cf.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let r=0;r<e.length;r++){let n=e[r];cf.default(n,"Parameter 'itemPath' must not contain any empty segments"),n=_o.normalizeSeparators(e[r]),r===0&&_o.hasRoot(n)?(n=_o.safeTrimTrailingSeparator(n),cf.default(n===_o.dirname(n),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(n)):(cf.default(!n.includes(Af.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(n))}}}toString(){let e=this.segments[0],r=e.endsWith(Af.sep)||oae&&/^[A-Z]:$/i.test(e);for(let n=1;n<this.segments.length;n++)r?r=!1:e+=Af.sep,e+=this.segments[n];return e}};ti.Path=K0});var GU=h(ri=>{"use strict";var aae=ri&&ri.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Aae=ri&&ri.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),eN=ri&&ri.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&aae(e,t,r);return Aae(e,t),e},cae=ri&&ri.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ri,"__esModule",{value:!0});ri.Pattern=void 0;var lae=eN(require("os")),lf=eN(require("path")),dn=eN(zp()),ja=cae(require("assert")),uae=$0(),X0=jp(),Jp=jU(),Fs=process.platform==="win32",Z0=class t{constructor(e,r=!1,n,i){this.negate=!1;let s;if(typeof e=="string")s=e.trim();else{n=n||[],ja.default(n.length,"Parameter 'segments' must not empty");let c=t.getLiteral(n[0]);ja.default(c&&dn.hasAbsoluteRoot(c),"Parameter 'segments' first element must be a root path"),s=new Jp.Path(n).toString().trim(),e&&(s=`!${s}`)}for(;s.startsWith("!");)this.negate=!this.negate,s=s.substr(1).trim();s=t.fixupPattern(s,i),this.segments=new Jp.Path(s).segments,this.trailingSeparator=dn.normalizeSeparators(s).endsWith(lf.sep),s=dn.safeTrimTrailingSeparator(s);let o=!1,a=this.segments.map(c=>t.getLiteral(c)).filter(c=>!o&&!(o=c===""));this.searchPath=new Jp.Path(a).toString(),this.rootRegExp=new RegExp(t.regExpEscape(a[0]),Fs?"i":""),this.isImplicitPattern=r;let A={dot:!0,nobrace:!0,nocase:Fs,nocomment:!0,noext:!0,nonegate:!0};s=Fs?s.replace(/\\/g,"/"):s,this.minimatch=new uae.Minimatch(s,A)}match(e){return this.segments[this.segments.length-1]==="**"?(e=dn.normalizeSeparators(e),!e.endsWith(lf.sep)&&this.isImplicitPattern===!1&&(e=`${e}${lf.sep}`)):e=dn.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?X0.MatchKind.Directory:X0.MatchKind.All:X0.MatchKind.None}partialMatch(e){return e=dn.safeTrimTrailingSeparator(e),dn.dirname(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(Fs?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(Fs?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,r){ja.default(e,"pattern cannot be empty");let n=new Jp.Path(e).segments.map(i=>t.getLiteral(i));if(ja.default(n.every((i,s)=>(i!=="."||s===0)&&i!==".."),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),ja.default(!dn.hasRoot(e)||n[0],`Invalid pattern '${e}'. Root segment must not contain globs.`),e=dn.normalizeSeparators(e),e==="."||e.startsWith(`.${lf.sep}`))e Line truncated
`),e=e.replace(/\r/g,` `),e=e.replace(/\r/g,`
`));let i=e.split(` `));let i=e.split(`
`).map(s=>s.trim());for(let s of i)!s||s.startsWith("#")||n.patterns.push(new kq.Pattern(s));return n.searchPaths.push(...Ly.getSearchPaths(n.patterns)),n})}static stat(e,r,n){return Bw(this,void 0,void 0,function*(){let i;if(r.followSymbolicLinks)try{i=yield qf.promises.stat(e.path)}catch(s){if(s.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){Qw.debug(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw s}else i=yield qf.promises.lstat(e.path);if(i.isDirectory()&&r.followSymbolicLinks){let s=yield qf.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(o=>o===s)){Qw.debug(`Symlink cycle detected for path '${e.path}' and realpath '${s}'`);return}n.push(s)}return i})}};gr.DefaultGlobber=bw});var Oq=h(cl=>{"use strict";var vce=cl&&cl.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(cl,"__esModule",{value:!0});cl.create=void 0;var _ce=Tq();function Dce(t,e){return vce(this,void 0,void 0,function*(){return yield _ce.DefaultGlobber.create(t,e)})}cl.create=Dce});var Hq=h((ye,qq)=>{ye=qq.exports=xe;var Ke;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?Ke=function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)}:Ke=function(){};ye.SEMVER_SPEC_VERSION="2.0.0";var jf=256,My=Number.MAX_SAFE_INTEGER||9007199254740991,Nw=16,kce=jf-6,ll=ye.re=[],$e=ye.safeRe=[],D=ye.src=[],x=ye.tokens={},Fq=0;function De(t){x[t]=Fq++}var Sw="[a-zA-Z0-9-]",ww=[["\\s",1],["\\d",jf],[Sw,kce]];function Gf(t){for(var e=0;e<ww.length;e++){var r=ww[e][0],n=ww[e][1];t=t.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return t}De("NUMERICIDENTIFIER");D[x.NUMERICIDENTIFIER]="0|[1-9]\\d*";De("NUMERICIDENTIFIERLOOSE");D[x.NUMERICIDENTIFIERLOOSE]="\\d+";De("NONNUMERICIDENTIFIER");D[x.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+Sw+"*";De("MAINVERSION");D[x.MAINVERSION]="("+D[x.NUMERICIDENTIFIER]+")\\.("+D[x.NUMERICIDENTIFIER]+")\\.("+D[x.NUMERICIDENTIFIER]+")";De("MAINVERSIONLOOSE");D[x.MAINVERSIONLOOSE]="("+D[x.NUMERICIDENTIFIERLOOSE]+")\\.("+D[x.NUMERICIDENTIFIERLOOSE]+")\\.("+D[x.NUMERICIDENTIFIERLOOSE]+")";De("PRERELEASEIDENTIFIER");D[x.PRERELEASEIDENTIFIER]="(?:"+D[x.NUMERICIDENTIFIER]+"|"+D[x.NONNUMERICIDENTIFIER]+")";De("PRERELEASEIDENTIFIERLOOSE");D[x.PRERELEASEIDENTIFIERLOOSE]="(?:"+D[x.NUMERICIDENTIFIERLOOSE]+"|"+D[x.NONNUMERICIDENTIFIER]+")";De("PRERELEASE");D[x.PRERELEASE]="(?:-("+D[x.PRERELEASEIDENTIFIER]+"(?:\\."+D[x.PRERELEASEIDENTIFIER]+")*))";De("PRERELEASELOOSE");D[x.PRERELEASELOOSE]="(?:-?("+D[x.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+D[x.PRERELEASEIDENTIFIERLOOSE]+")*))";De("BUILDIDENTIFIER");D[x.BUILDIDENTIFIER]=Sw+"+";De("BUILD");D[x.BUILD]="(?:\\+("+D[x.BUILDIDENTIFIER]+"(?:\\."+D[x.BUILDIDENTIFIER]+")*))";De("FULL");De("FULLPLAIN");D[x.FULLPLAIN]="v?"+D[x.MAINVERSION]+D[x.PRERELEASE]+"?"+D[x.BUILD]+"?";D[x.FULL]="^"+D[x.FULLPLAIN]+"$";De("LOOSEPLAIN");D[x.LOOSEPLAIN]="[v=\\s]*"+D[x.MAINVERSIONLOOSE]+D[x.PRERELEASELOOSE]+"?"+D[x.BUILD]+"?";De("LOOSE");D[x.LOOSE]="^"+D[x.LOOSEPLAIN]+"$";De("GTLT");D[x.GTLT]="((?:<|>)?=?)";De("XRANGEIDENTIFIERLOOSE");D[x.XRANGEIDENTIFIERLOOSE]=D[x.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";De("XRANGEIDENTIFIER");D[x.XRANGEIDENTIFIER]=D[x.NUMERICIDENTIFIER]+"|x|X|\\*";De("XRANGEPLAIN");D[x.XRANGEPLAIN]="[v=\\s]*("+D[x.XRANGEIDENTIFIER]+")(?:\\.("+D[x.XRANGEIDENTIFIER]+")(?:\\.("+D[x.XRANGEIDENTIFIER]+")(?:"+D[x.PRERELEASE]+")?"+D[x.BUILD]+"?)?)?";De("XRANGEPLAINLOOSE");D[x.XRANGEPLAINLOOSE]="[v=\\s]*("+D[x.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+D[x.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+D[x.XRANGEIDENTIFIERLOOSE]+")(?:"+D[x.PRERELEASELOOSE]+")?"+D[x.BUILD]+"?)?)?";De("XRANGE");D[x.XRANGE]="^"+D[x.GTLT]+"\\s*"+D[x.XRANGEPLAIN]+"$";De("XRANGELOOSE");D[x.XRANGELOOSE]="^"+D[x.GTLT]+"\\s*"+D[x.XRANGEPLAINLOOSE]+"$";De("COERCE");D[x.COERCE]="(^|[^\\d])(\\d{1,"+Nw+"})(?:\\.(\\d{1,"+Nw+"}))?(?:\\.(\\d{1,"+Nw+"}))?(?:$|[^\\d])";De("COERCERTL");ll[x.COERCERTL]=new RegExp(D[x.COERCE],"g");$e[x.COERCERTL]=new RegExp(Gf(D[x.COERCE]),"g");De("LONETILDE");D[x.LONETILDE]="(?:~>?)";De("TILDETRIM");D[x.TILDETRIM]="(\\s*)"+D[x.LONETILDE]+"\\s+";ll[x.TILDETRIM]=new RegExp(D[x.TILDETRIM],"g");$e[x.TILDETRIM]=new RegExp(Gf(D[x.TILDETRIM]),"g");var Pce="$1~";De("TILDE");D[x.TILDE]="^"+D[x.LONETILDE]+D[x.XRANGEPLAIN]+"$";De("TILDELOOSE");D[x.TILDELOOSE]="^"+D[x.LONETILDE]+D[x.XRANGEPLAINLOOSE]+"$";De("LONECARET");D[x.LONECARET]="(?:\\^)";De("CARETTRIM");D[x.CARETTRIM]="(\\s*)"+D[x.LONECARET]+"\\s+";ll[x.CARETTRIM]=new RegExp(D[x.CARETTRIM],"g");$e[x.CARETTRIM]=new RegExp(Gf(D[x.CARETTRIM]),"g");var Tce="$1^";De("CARET");D[x.CARET]="^ Line truncated `).map(s=>s.trim());for(let s of i)!s||s.startsWith("#")||n.patterns.push(new WU.Pattern(s));return n.searchPaths.push(...Wp.getSearchPaths(n.patterns)),n})}static stat(e,r,n){return rN(this,void 0,void 0,function*(){let i;if(r.followSymbolicLinks)try{i=yield uf.promises.stat(e.path)}catch(s){if(s.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){nN.debug(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw s}else i=yield uf.promises.lstat(e.path);if(i.isDirectory()&&r.followSymbolicLinks){let s=yield uf.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(o=>o===s)){nN.debug(`Symlink cycle detected for path '${e.path}' and realpath '${s}'`);return}n.push(s)}return i})}};cr.DefaultGlobber=iN});var XU=h(jc=>{"use strict";var yae=jc&&jc.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(jc,"__esModule",{value:!0});jc.create=void 0;var Eae=KU();function Cae(t,e){return yae(this,void 0,void 0,function*(){return yield Eae.DefaultGlobber.create(t,e)})}jc.create=Cae});var i1=h((pe,n1)=>{pe=n1.exports=xe;var $e;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?$e=function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)}:$e=function(){};pe.SEMVER_SPEC_VERSION="2.0.0";var ff=256,$p=Number.MAX_SAFE_INTEGER||9007199254740991,sN=16,Iae=ff-6,Gc=pe.re=[],We=pe.safeRe=[],_=pe.src=[],S=pe.tokens={},t1=0;function De(t){S[t]=t1++}var aN="[a-zA-Z0-9-]",oN=[["\\s",1],["\\d",ff],[aN,Iae]];function gf(t){for(var e=0;e<oN.length;e++){var r=oN[e][0],n=oN[e][1];t=t.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return t}De("NUMERICIDENTIFIER");_[S.NUMERICIDENTIFIER]="0|[1-9]\\d*";De("NUMERICIDENTIFIERLOOSE");_[S.NUMERICIDENTIFIERLOOSE]="\\d+";De("NONNUMERICIDENTIFIER");_[S.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+aN+"*";De("MAINVERSION");_[S.MAINVERSION]="("+_[S.NUMERICIDENTIFIER]+")\\.("+_[S.NUMERICIDENTIFIER]+")\\.("+_[S.NUMERICIDENTIFIER]+")";De("MAINVERSIONLOOSE");_[S.MAINVERSIONLOOSE]="("+_[S.NUMERICIDENTIFIERLOOSE]+")\\.("+_[S.NUMERICIDENTIFIERLOOSE]+")\\.("+_[S.NUMERICIDENTIFIERLOOSE]+")";De("PRERELEASEIDENTIFIER");_[S.PRERELEASEIDENTIFIER]="(?:"+_[S.NUMERICIDENTIFIER]+"|"+_[S.NONNUMERICIDENTIFIER]+")";De("PRERELEASEIDENTIFIERLOOSE");_[S.PRERELEASEIDENTIFIERLOOSE]="(?:"+_[S.NUMERICIDENTIFIERLOOSE]+"|"+_[S.NONNUMERICIDENTIFIER]+")";De("PRERELEASE");_[S.PRERELEASE]="(?:-("+_[S.PRERELEASEIDENTIFIER]+"(?:\\."+_[S.PRERELEASEIDENTIFIER]+")*))";De("PRERELEASELOOSE");_[S.PRERELEASELOOSE]="(?:-?("+_[S.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+_[S.PRERELEASEIDENTIFIERLOOSE]+")*))";De("BUILDIDENTIFIER");_[S.BUILDIDENTIFIER]=aN+"+";De("BUILD");_[S.BUILD]="(?:\\+("+_[S.BUILDIDENTIFIER]+"(?:\\."+_[S.BUILDIDENTIFIER]+")*))";De("FULL");De("FULLPLAIN");_[S.FULLPLAIN]="v?"+_[S.MAINVERSION]+_[S.PRERELEASE]+"?"+_[S.BUILD]+"?";_[S.FULL]="^"+_[S.FULLPLAIN]+"$";De("LOOSEPLAIN");_[S.LOOSEPLAIN]="[v=\\s]*"+_[S.MAINVERSIONLOOSE]+_[S.PRERELEASELOOSE]+"?"+_[S.BUILD]+"?";De("LOOSE");_[S.LOOSE]="^"+_[S.LOOSEPLAIN]+"$";De("GTLT");_[S.GTLT]="((?:<|>)?=?)";De("XRANGEIDENTIFIERLOOSE");_[S.XRANGEIDENTIFIERLOOSE]=_[S.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";De("XRANGEIDENTIFIER");_[S.XRANGEIDENTIFIER]=_[S.NUMERICIDENTIFIER]+"|x|X|\\*";De("XRANGEPLAIN");_[S.XRANGEPLAIN]="[v=\\s]*("+_[S.XRANGEIDENTIFIER]+")(?:\\.("+_[S.XRANGEIDENTIFIER]+")(?:\\.("+_[S.XRANGEIDENTIFIER]+")(?:"+_[S.PRERELEASE]+")?"+_[S.BUILD]+"?)?)?";De("XRANGEPLAINLOOSE");_[S.XRANGEPLAINLOOSE]="[v=\\s]*("+_[S.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+_[S.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+_[S.XRANGEIDENTIFIERLOOSE]+")(?:"+_[S.PRERELEASELOOSE]+")?"+_[S.BUILD]+"?)?)?";De("XRANGE");_[S.XRANGE]="^"+_[S.GTLT]+"\\s*"+_[S.XRANGEPLAIN]+"$";De("XRANGELOOSE");_[S.XRANGELOOSE]="^"+_[S.GTLT]+"\\s*"+_[S.XRANGEPLAINLOOSE]+"$";De("COERCE");_[S.COERCE]="(^|[^\\d])(\\d{1,"+sN+"})(?:\\.(\\d{1,"+sN+"}))?(?:\\.(\\d{1,"+sN+"}))?(?:$|[^\\d])";De("COERCERTL");Gc[S.COERCERTL]=new RegExp(_[S.COERCE],"g");We[S.COERCERTL]=new RegExp(gf(_[S.COERCE]),"g");De("LONETILDE");_[S.LONETILDE]="(?:~>?)";De("TILDETRIM");_[S.TILDETRIM]="(\\s*)"+_[S.LONETILDE]+"\\s+";Gc[S.TILDETRIM]=new RegExp(_[S.TILDETRIM],"g");We[S.TILDETRIM]=new RegExp(gf(_[S.TILDETRIM]),"g");var Bae="$1~";De("TILDE");_[S.TILDE]="^"+_[S.LONETILDE]+_[S.XRANGEPLAIN]+"$";De("TILDELOOSE");_[S.TILDELOOSE]="^"+_[S.LONETILDE]+_[S.XRANGEPLAINLOOSE]+"$";De("LONECARET");_[S.LONECARET]="(?:\\^)";De("CARETTRIM");_[S.CARETTRIM]="(\\s*)"+_[S.LONECARET]+"\\s+";Gc[S.CARETTRIM]=new RegExp(_[S.CARETTRIM],"g");We[S.CARETTRIM]=new RegExp(gf(_[S.CARETTRIM]),"g");var Qae="$1^";De("CARET");_[S.CARET]="^ Line truncated
`),{implicitDescendants:!1});try{for(var c=!0,l=yle(A.globGenerator()),u;u=yield l.next(),e=u.done,!e;c=!0){i=u.value,c=!1;let d=i,f=Hy.relative(a,d).replace(new RegExp(`\\${Hy.sep}`,"g"),"/");Jf.debug(`Matched: ${f}`),f===""?o.push("."):o.push(`${f}`)}}catch(d){r={error:d}}finally{try{!c&&!e&&(n=l.return)&&(yield n.call(l))}finally{if(r)throw r.error}}return o})}Ye.resolvePaths=wle;function Sle(t){return dl(this,void 0,void 0,function*(){return Ble.promisify(Dw.unlink)(t)})}Ye.unlinkFile=Sle;function Vq(t,e=[]){return dl(this,void 0,void 0,function*(){let r="";e.push("--version"),Jf.debug(`Checking ${t} ${e.join(" ")}`);try{yield Ele.exec(`${t}`,e,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:n=>r+=n.toString(),stderr:n=>r+=n.toString()}})}catch(n){Jf.debug(n.message)}return r=r.trim(),Jf.debug(r),r})}function xle(){return dl(this,void 0,void 0,function*(){let t=yield Vq("zstd",["--quiet"]),e=Ile.clean(t);return Jf.debug(`zstd version: ${e}`),t===""?dA.CompressionMethod.Gzip:dA.CompressionMethod.ZstdWithoutLong})}Ye.getCompressionMethod=xle;function Rle(t){return t===dA.CompressionMethod.Gzip?dA.CacheFilename.Gzip:dA.CacheFilename.Zstd}Ye.getCacheFileName=Rle;function vle(){return dl(this,void 0,void 0,function*(){return Dw.existsSync(dA.GnuTarPathOnWindows)?dA.GnuTarPathOnWindows:(yield Vq("tar")).toLowerCase().includes("gnu tar")?Yq.which("tar"):""})}Ye.getGnuTarPathOnWindows=vle;function _le(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}Ye.assertDefined=_le;function Dle(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(Qle),Jq.createHash("sha256").update(n.join("|")).digest("hex")}Ye.getCacheVersion=Dle;function kle(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}Ye.getRuntimeToken=kle});var hi={};qX(hi,{__addDisposableResource:()=>E2,__assign:()=>jy,__asyncDelegator:()=>u2,__asyncGenerator:()=>l2,__asyncValues:()=>d2,__await:()=>hl,__awaiter:()=>i2,__classPrivateFieldGet:()=>m2,__classPrivateFieldIn:()=>y2,__classPrivateFieldSet:()=>p2,__createBinding:()=>Gy,__decorate:()=>Kq,__disposeResources:()=>C2,__esDecorate:()=>Zq,__exportStar:()=>o2,__extends:()=>Wq,__generator:()=>s2,__importDefault:()=>g2,__importStar:()=>h2,__makeTemplateObject:()=>f2,__metadata:()=>n2,__param:()=>Xq,__propKey:()=>t2,__read:()=>Tw,__rest:()=>$q,__rewriteRelativeImportExtension:()=>I2,__runInitializers:()=>e2,__setFunctionName:()=>r2,__spread:()=>a2,__spreadArray:()=>c2,__spreadArrays:()=>A2,__values:()=>zy,default:()=>Ole});function Wq(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");kw(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function $q(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function Kq(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function Xq(t,e){return function(r,n){e(r,n,t)}}function Zq(t,e,r,n,i,s){function o(C){if(C!==void 0&&typeof C!="function")throw new TypeError("Function expected");return C}for(var a=n.kind,A=a==="getter"?"get":a==="setter"?"set":"value",c=!e&&t?n.static?t:t.prototype:null,l=e||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),u,d=!1,f=r.length-1;f>=0;f--){var g={};for(var m in n)g[m]=m==="access"?{}:n[m];for(var m in n.access)g.access[m]=n.access[m];g.addInitializer=function(C){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(C||null))};var E=(0,r[f])(a==="accessor"?{get:l.get,set:l.set}:l[A],g);if(a==="accessor"){if(E===void 0)continue;if(E===null||typeof E!="object")throw new TypeError("Object expected");(u=o(E.get))&&(l.get=u),(u=o(E.set))&&(l.set=u),(u=o(E.init))&&i.unshift(u)}else(u=o(E))&&(a==="field"?i.unshift(u):l[A]=u)}c&&Object.defineProperty(c,n.name,l),d=!0}function e2(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}function t2(t){return typeof t=="symbol"?t:"".concat(t)}function r2(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function n2(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function i2(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)}) Line truncated `),{implicitDescendants:!1});try{for(var c=!0,l=oAe(A.globGenerator()),u;u=yield l.next(),e=u.done,!e;c=!0){i=u.value,c=!1;let d=i,f=ey.relative(a,d).replace(new RegExp(`\\${ey.sep}`,"g"),"/");pf.debug(`Matched: ${f}`),f===""?o.push("."):o.push(`${f}`)}}catch(d){r={error:d}}finally{try{!c&&!e&&(n=l.return)&&(yield n.call(l))}finally{if(r)throw r.error}}return o})}Ge.resolvePaths=hAe;function gAe(t){return Jc(this,void 0,void 0,function*(){return lAe.promisify(dN.unlink)(t)})}Ge.unlinkFile=gAe;function l1(t,e=[]){return Jc(this,void 0,void 0,function*(){let r="";e.push("--version"),pf.debug(`Checking ${t} ${e.join(" ")}`);try{yield aAe.exec(`${t}`,e,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:n=>r+=n.toString(),stderr:n=>r+=n.toString()}})}catch(n){pf.debug(n.message)}return r=r.trim(),pf.debug(r),r})}function mAe(){return Jc(this,void 0,void 0,function*(){let t=yield l1("zstd",["--quiet"]),e=cAe.clean(t);return pf.debug(`zstd version: ${e}`),t===""?Ja.CompressionMethod.Gzip:Ja.CompressionMethod.ZstdWithoutLong})}Ge.getCompressionMethod=mAe;function pAe(t){return t===Ja.CompressionMethod.Gzip?Ja.CacheFilename.Gzip:Ja.CacheFilename.Zstd}Ge.getCacheFileName=pAe;function yAe(){return Jc(this,void 0,void 0,function*(){return dN.existsSync(Ja.GnuTarPathOnWindows)?Ja.GnuTarPathOnWindows:(yield l1("tar")).toLowerCase().includes("gnu tar")?A1.which("tar"):""})}Ge.getGnuTarPathOnWindows=yAe;function EAe(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}Ge.assertDefined=EAe;function CAe(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(uAe),c1.createHash("sha256").update(n.join("|")).digest("hex")}Ge.getCacheVersion=CAe;function IAe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}Ge.getRuntimeToken=IAe});var ii={};vK(ii,{__addDisposableResource:()=>T1,__assign:()=>ty,__asyncDelegator:()=>x1,__asyncGenerator:()=>w1,__asyncValues:()=>S1,__await:()=>Wc,__awaiter:()=>C1,__classPrivateFieldGet:()=>_1,__classPrivateFieldIn:()=>P1,__classPrivateFieldSet:()=>k1,__createBinding:()=>ny,__decorate:()=>f1,__disposeResources:()=>O1,__esDecorate:()=>g1,__exportStar:()=>B1,__extends:()=>u1,__generator:()=>I1,__importDefault:()=>D1,__importStar:()=>R1,__makeTemplateObject:()=>v1,__metadata:()=>E1,__param:()=>h1,__propKey:()=>p1,__read:()=>gN,__rest:()=>d1,__rewriteRelativeImportExtension:()=>M1,__runInitializers:()=>m1,__setFunctionName:()=>y1,__spread:()=>Q1,__spreadArray:()=>N1,__spreadArrays:()=>b1,__values:()=>ry,default:()=>bAe});function u1(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");fN(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function d1(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function f1(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function h1(t,e){return function(r,n){e(r,n,t)}}function g1(t,e,r,n,i,s){function o(C){if(C!==void 0&&typeof C!="function")throw new TypeError("Function expected");return C}for(var a=n.kind,A=a==="getter"?"get":a==="setter"?"set":"value",c=!e&&t?n.static?t:t.prototype:null,l=e||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),u,d=!1,f=r.length-1;f>=0;f--){var g={};for(var m in n)g[m]=m==="access"?{}:n[m];for(var m in n.access)g.access[m]=n.access[m];g.addInitializer=function(C){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(C||null))};var E=(0,r[f])(a==="accessor"?{get:l.get,set:l.set}:l[A],g);if(a==="accessor"){if(E===void 0)continue;if(E===null||typeof E!="object")throw new TypeError("Object expected");(u=o(E.get))&&(l.get=u),(u=o(E.set))&&(l.set=u),(u=o(E.init))&&i.unshift(u)}else(u=o(E))&&(a==="field"?i.unshift(u):l[A]=u)}c&&Object.defineProperty(c,n.name,l),d=!0}function m1(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}function p1(t){return typeof t=="symbol"?t:"".concat(t)}function y1(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function E1(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function C1(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)}) Line truncated
${hue.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};Xf.RestError=gl;gl.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";gl.PARSE_ERROR="PARSE_ERROR";function gue(t){return t instanceof gl?!0:(0,uue.isError)(t)&&t.name==="RestError"}});var fA=h(eE=>{"use strict";Object.defineProperty(eE,"__esModule",{value:!0});eE.uint8ArrayToString=mue;eE.stringToUint8Array=pue;function mue(t,e){return Buffer.from(t).toString(e)}function pue(t,e){return Buffer.from(t,e)}});var Zf=h(tE=>{"use strict";Object.defineProperty(tE,"__esModule",{value:!0});tE.logger=void 0;var yue=$f();tE.logger=(0,yue.createClientLogger)("ts-http-runtime")});var z2=h(nE=>{"use strict";Object.defineProperty(nE,"__esModule",{value:!0});nE.getBodyLength=j2;nE.createNodeHttpClient=wue;var AS=(gi(),Fi(hi)),sS=AS.__importStar(require("node:http")),oS=AS.__importStar(require("node:https")),F2=AS.__importStar(require("node:zlib")),Eue=require("node:stream"),U2=Vf(),Cue=Xo(),th=ml(),pl=Zf(),Iue=Kf(),Bue={};function eh(t){return t&&typeof t.pipe=="function"}function q2(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function H2(t){return t&&typeof t.byteLength=="number"}var rE=class extends Eue.Transform{_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(i){n(i)}}constructor(e){super(),this.loadedBytes=0,this.progressCallback=e}},aS=class{constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(e){var r,n,i;let s=new AbortController,o;if(e.abortSignal){if(e.abortSignal.aborted)throw new U2.AbortError("The operation was aborted. Request has already been canceled.");o=d=>{d.type==="abort"&&s.abort()},e.abortSignal.addEventListener("abort",o)}let a;e.timeout>0&&(a=setTimeout(()=>{let d=new Iue.Sanitizer;pl.logger.info(`request to '${d.sanitizeUrl(e.url)}' timed out. canceling...`),s.abort()},e.timeout));let A=e.headers.get("Accept-Encoding"),c=A?.includes("gzip")||A?.includes("deflate"),l=typeof e.body=="function"?e.body():e.body;if(l&&!e.headers.has("Content-Length")){let d=j2(l);d!==null&&e.headers.set("Content-Length",d)}let u;try{if(l&&e.onUploadProgress){let C=e.onUploadProgress,I=new rE(C);I.on("error",N=>{pl.logger.error("Error in upload progress",N)}),eh(l)?l.pipe(I):I.end(l),l=I}let d=await this.makeRequest(e,s,l);a!==void 0&&clearTimeout(a);let f=Que(d),m={status:(r=d.statusCode)!==null&&r!==void 0?r:0,headers:f,request:e};if(e.method==="HEAD")return d.resume(),m;u=c?bue(d,f):d;let E=e.onDownloadProgress;if(E){let C=new rE(E);C.on("error",I=>{pl.logger.error("Error in download progress",I)}),u.pipe(C),u=C}return!((n=e.streamResponseStatusCodes)===null||n===void 0)&&n.has(Number.POSITIVE_INFINITY)||!((i=e.streamResponseStatusCodes)===null||i===void 0)&&i.has(m.status)?m.readableStreamBody=u:m.bodyAsText=await Nue(u),m}finally{if(e.abortSignal&&o){let d=Promise.resolve();eh(l)&&(d=q2(l));let f=Promise.resolve();eh(u)&&(f=q2(u)),Promise.all([d,f]).then(()=>{var g;o&&((g=e.abortSignal)===null||g===void 0||g.removeEventListener("abort",o))}).catch(g=>{pl.logger.warning("Error when cleaning up abortListener on httpRequest",g)})}}}makeRequest(e,r,n){var i;let s=new URL(e.url),o=s.protocol!=="https:";if(o&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let a=(i=e.agent)!==null&&i!==void 0?i:this.getOrCreateAgent(e,o),A=Object.assign({agent:a,hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0})},e.requestOverrides);return new Promise((c,l)=>{let u=o?sS.request(A,c):oS.request(A,c);u.once("error",d=>{var f;l(new th.RestError(d.message,{code:(f=d.code)!==null&&f!==void 0?f:th.RestError.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let d=new U2.AbortError("The operation was aborted. Rejecting from abort signal callback while making request.");u.destroy(d),l(d)}),n&&eh(n)?n.pipe(u):n?typeof n=="string"||Buffer.isBuffer(n)?u.end(n):H2(n)?u.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(pl.logger.error("Unrecognized body type",n),l(new th.RestError("Unrecognized body type"))):u.end()})}getOrCreateAgent(e,r){var n;let i=e.disableKeepAlive;if(r)return i?sS.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new sS.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(i&&!e.tlsSettings)return oS.globalAgent;let s=(n=e.tlsSettings)!==null&&n!==void 0?n:Bue,o=this.cachedHttpsAgents.get(s);return o&&o.options.keepAlive===!i||(pl.logger.info("No cached TLS Agent exist, creating a new Agent"),o=new oS.Agent(Object.assign({keepAlive:!i},s)),this.cachedHttpsAgents.set(s,o)),o}}};function Que(t){let e=(0,Cue.createHttpHeaders)();for(let r of Object.keys(t.head Line truncated ${rce.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};Bf.RestError=$c;$c.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";$c.PARSE_ERROR="PARSE_ERROR";function nce(t){return t instanceof $c?!0:(0,ZAe.isError)(t)&&t.name==="RestError"}});var Va=h(dy=>{"use strict";Object.defineProperty(dy,"__esModule",{value:!0});dy.uint8ArrayToString=ice;dy.stringToUint8Array=sce;function ice(t,e){return Buffer.from(t).toString(e)}function sce(t,e){return Buffer.from(t,e)}});var Qf=h(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});fy.logger=void 0;var oce=Cf();fy.logger=(0,oce.createClientLogger)("ts-http-runtime")});var oq=h(gy=>{"use strict";Object.defineProperty(gy,"__esModule",{value:!0});gy.getBodyLength=sq;gy.createNodeHttpClient=hce;var HN=(si(),Si(ii)),FN=HN.__importStar(require("node:http")),UN=HN.__importStar(require("node:https")),tq=HN.__importStar(require("node:zlib")),ace=require("node:stream"),rq=yf(),Ace=To(),Nf=Kc(),Xc=Qf(),cce=If(),lce={};function bf(t){return t&&typeof t.pipe=="function"}function nq(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function iq(t){return t&&typeof t.byteLength=="number"}var hy=class extends ace.Transform{_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(i){n(i)}}constructor(e){super(),this.loadedBytes=0,this.progressCallback=e}},qN=class{constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(e){var r,n,i;let s=new AbortController,o;if(e.abortSignal){if(e.abortSignal.aborted)throw new rq.AbortError("The operation was aborted. Request has already been canceled.");o=d=>{d.type==="abort"&&s.abort()},e.abortSignal.addEventListener("abort",o)}let a;e.timeout>0&&(a=setTimeout(()=>{let d=new cce.Sanitizer;Xc.logger.info(`request to '${d.sanitizeUrl(e.url)}' timed out. canceling...`),s.abort()},e.timeout));let A=e.headers.get("Accept-Encoding"),c=A?.includes("gzip")||A?.includes("deflate"),l=typeof e.body=="function"?e.body():e.body;if(l&&!e.headers.has("Content-Length")){let d=sq(l);d!==null&&e.headers.set("Content-Length",d)}let u;try{if(l&&e.onUploadProgress){let C=e.onUploadProgress,I=new hy(C);I.on("error",b=>{Xc.logger.error("Error in upload progress",b)}),bf(l)?l.pipe(I):I.end(l),l=I}let d=await this.makeRequest(e,s,l);a!==void 0&&clearTimeout(a);let f=uce(d),m={status:(r=d.statusCode)!==null&&r!==void 0?r:0,headers:f,request:e};if(e.method==="HEAD")return d.resume(),m;u=c?dce(d,f):d;let E=e.onDownloadProgress;if(E){let C=new hy(E);C.on("error",I=>{Xc.logger.error("Error in download progress",I)}),u.pipe(C),u=C}return!((n=e.streamResponseStatusCodes)===null||n===void 0)&&n.has(Number.POSITIVE_INFINITY)||!((i=e.streamResponseStatusCodes)===null||i===void 0)&&i.has(m.status)?m.readableStreamBody=u:m.bodyAsText=await fce(u),m}finally{if(e.abortSignal&&o){let d=Promise.resolve();bf(l)&&(d=nq(l));let f=Promise.resolve();bf(u)&&(f=nq(u)),Promise.all([d,f]).then(()=>{var g;o&&((g=e.abortSignal)===null||g===void 0||g.removeEventListener("abort",o))}).catch(g=>{Xc.logger.warning("Error when cleaning up abortListener on httpRequest",g)})}}}makeRequest(e,r,n){var i;let s=new URL(e.url),o=s.protocol!=="https:";if(o&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let a=(i=e.agent)!==null&&i!==void 0?i:this.getOrCreateAgent(e,o),A=Object.assign({agent:a,hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0})},e.requestOverrides);return new Promise((c,l)=>{let u=o?FN.request(A,c):UN.request(A,c);u.once("error",d=>{var f;l(new Nf.RestError(d.message,{code:(f=d.code)!==null&&f!==void 0?f:Nf.RestError.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let d=new rq.AbortError("The operation was aborted. Rejecting from abort signal callback while making request.");u.destroy(d),l(d)}),n&&bf(n)?n.pipe(u):n?typeof n=="string"||Buffer.isBuffer(n)?u.end(n):iq(n)?u.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Xc.logger.error("Unrecognized body type",n),l(new Nf.RestError("Unrecognized body type"))):u.end()})}getOrCreateAgent(e,r){var n;let i=e.disableKeepAlive;if(r)return i?FN.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new FN.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(i&&!e.tlsSettings)return UN.globalAgent;let s=(n=e.tlsSettings)!==null&&n!==void 0?n:lce,o=this.cachedHttpsAgents.get(s);return o&&o.options.keepAlive===!i||(Xc.logger.info("No cached TLS Agent exist, creating a new Agent"),o=new UN.Agent(Object.assign({keepAlive:!i},s)),this.cachedHttpsAgents.set(s,o)),o}}};function uce(t){let e=(0,Ace.createHttpHeaders)();for(let r of Object.keys(t.head Line truncated
`).join(` `).join(`
`+s),t.push(i+"m+"+fE.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Tde()+e+" "+t[0]}function Tde(){return mr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Ode(...t){return process.stderr.write(dE.formatWithOptions(mr.inspectOpts,...t)+` `+s),t.push(i+"m+"+Ny.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Qle()+e+" "+t[0]}function Qle(){return lr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function ble(...t){return process.stderr.write(by.formatWithOptions(lr.inspectOpts,...t)+`
`)}function Lde(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Mde(){return process.env.DEBUG}function Fde(t){t.inspectOpts={};let e=Object.keys(mr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=mr.inspectOpts[e[r]]}fE.exports=vS()(mr);var{formatters:AH}=fE.exports;AH.o=function(t){return this.inspectOpts.colors=this.useColors,dE.inspect(t,this.inspectOpts).split(` `)}function Nle(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function wle(){return process.env.DEBUG}function xle(t){t.inspectOpts={};let e=Object.keys(lr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=lr.inspectOpts[e[r]]}Ny.exports=lw()(lr);var{formatters:bq}=Ny.exports;bq.o=function(t){return this.inspectOpts.colors=this.useColors,by.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};AH.O=function(t){return this.inspectOpts.colors=this.useColors,dE.inspect(t,this.inspectOpts)}});var hE=h((cFe,_S)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?_S.exports=aH():_S.exports=cH()});var dH=h(In=>{"use strict";var Ude=In&&In.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qde=In&&In.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),lH=In&&In.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ude(e,t,r);return qde(e,t),e};Object.defineProperty(In,"__esModule",{value:!0});In.req=In.json=In.toBuffer=void 0;var Hde=lH(require("http")),jde=lH(require("https"));async function uH(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}In.toBuffer=uH;async function zde(t){let r=(await uH(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let i=n;throw i.message+=` (input: ${r})`,i}}In.json=zde;function Gde(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?jde:Hde).request(t,e),i=new Promise((s,o)=>{n.once("response",s).once("error",o).end()});return n.then=i.then.bind(i),n}In.req=Gde});var kS=h(Jn=>{"use strict";var hH=Jn&&Jn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Yde=Jn&&Jn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),gH=Jn&&Jn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&hH(e,t,r);return Yde(e,t),e},Jde=Jn&&Jn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&hH(e,t,r)};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Agent=void 0;var Vde=gH(require("net")),fH=gH(require("http")),Wde=require("https");Jde(dH(),Jn);var Is=Symbol("AgentBaseInternalState"),DS=class extends fH.Agent{constructor(e){super(e),this[Is]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(` `).map(e=>e.trim()).join(" ")};bq.O=function(t){return this.inspectOpts.colors=this.useColors,by.inspect(t,this.inspectOpts)}});var wy=h((STe,uw)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?uw.exports=Qq():uw.exports=Nq()});var Sq=h(hn=>{"use strict";var Sle=hn&&hn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),vle=hn&&hn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wq=hn&&hn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Sle(e,t,r);return vle(e,t),e};Object.defineProperty(hn,"__esModule",{value:!0});hn.req=hn.json=hn.toBuffer=void 0;var Rle=wq(require("http")),Dle=wq(require("https"));async function xq(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}hn.toBuffer=xq;async function _le(t){let r=(await xq(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let i=n;throw i.message+=` (input: ${r})`,i}}hn.json=_le;function kle(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?Dle:Rle).request(t,e),i=new Promise((s,o)=>{n.once("response",s).once("error",o).end()});return n.then=i.then.bind(i),n}hn.req=kle});var fw=h(Ln=>{"use strict";var Rq=Ln&&Ln.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Ple=Ln&&Ln.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Dq=Ln&&Ln.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Rq(e,t,r);return Ple(e,t),e},Tle=Ln&&Ln.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Rq(e,t,r)};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.Agent=void 0;var Ole=Dq(require("net")),vq=Dq(require("http")),Mle=require("https");Tle(Sq(),Ln);var as=Symbol("AgentBaseInternalState"),dw=class extends vq.Agent{constructor(e){super(e),this[as]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new Vde.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],i=n.indexOf(r);i!==-1&&(n.splice(i,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?Wde.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let i={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(i),o=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,i)).then(a=>{if(this.decrementSockets(s,o),a instanceof fH.Agent)try{return a.addRequest(e,i)}catch(A){return n(A)}this[Is].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(s,o),n(a)})}createConnection(){let e=this[Is].currentSocket;if(this[Is].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Is].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Is]&&(this[Is].defaultPort=e)}get protocol(){return this[Is].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Is]&&(this[Is].protocol=e)}};Jn.Agent=DS});var mH=h(Rl=>{"use strict";var $de=Rl&&Rl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Rl,"__esModule",{value:!0});Rl.parseProxyResponse=void 0;var Kde=$de(hE()),gE=(0,Kde.default)("https-proxy-agent:parse-proxy-response");function Xde(t){return new Promise((e,r)=>{let n=0,i=[];function s(){let l=t.read();l?c(l):t.once("readable",s)}function o(){t.removeListener("end",a),t.removeListener("error",A),t.removeListener("readable",s)}function a(){o(),gE("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function A(l){o(),gE("onerror %o",l),r(l)}function c(l){i.push(l),n+=l.length;let u=Buffer.concat(i,n),d=u.indexOf(`\r `).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new Ole.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],i=n.indexOf(r);i!==-1&&(n.splice(i,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?Mle.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let i={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(i),o=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,i)).then(a=>{if(this.decrementSockets(s,o),a instanceof vq.Agent)try{return a.addRequest(e,i)}catch(A){return n(A)}this[as].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(s,o),n(a)})}createConnection(){let e=this[as].currentSocket;if(this[as].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[as].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[as]&&(this[as].defaultPort=e)}get protocol(){return this[as].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[as]&&(this[as].protocol=e)}};Ln.Agent=dw});var _q=h(ll=>{"use strict";var Lle=ll&&ll.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ll,"__esModule",{value:!0});ll.parseProxyResponse=void 0;var Fle=Lle(wy()),xy=(0,Fle.default)("https-proxy-agent:parse-proxy-response");function Ule(t){return new Promise((e,r)=>{let n=0,i=[];function s(){let l=t.read();l?c(l):t.once("readable",s)}function o(){t.removeListener("end",a),t.removeListener("error",A),t.removeListener("readable",s)}function a(){o(),xy("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function A(l){o(),xy("onerror %o",l),r(l)}function c(l){i.push(l),n+=l.length;let u=Buffer.concat(i,n),d=u.indexOf(`\r
\r \r
`);if(d===-1){gE("have not received end of HTTP headers yet..."),s();return}let f=u.slice(0,d).toString("ascii").split(`\r `);if(d===-1){xy("have not received end of HTTP headers yet..."),s();return}let f=u.slice(0,d).toString("ascii").split(`\r
`),g=f.shift();if(!g)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let m=g.split(" "),E=+m[1],C=m.slice(2).join(" "),I={};for(let N of f){if(!N)continue;let w=N.indexOf(":");if(w===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${N}"`));let v=N.slice(0,w).toLowerCase(),T=N.slice(w+1).trimStart(),U=I[v];typeof U=="string"?I[v]=[U,T]:Array.isArray(U)?U.push(T):I[v]=T}gE("got proxy server response: %o %o",g,I),o(),e({connect:{statusCode:E,statusText:C,headers:I},buffered:u})}t.on("error",A),t.on("end",a),s()})}Rl.parseProxyResponse=Xde});var BH=h(mi=>{"use strict";var Zde=mi&&mi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),efe=mi&&mi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),CH=mi&&mi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Zde(e,t,r);return efe(e,t),e},IH=mi&&mi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mi,"__esModule",{value:!0});mi.HttpsProxyAgent=void 0;var mE=CH(require("net")),pH=CH(require("tls")),tfe=IH(require("assert")),rfe=IH(hE()),nfe=kS(),ife=require("url"),sfe=mH(),ih=(0,rfe.default)("https-proxy-agent"),yH=t=>t.servername===void 0&&t.host&&!mE.isIP(t.host)?{...t,servername:t.host}:t,pE=class extends nfe.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new ife.URL(e):e,this.proxyHeaders=r?.headers??{},ih("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?EH(r,"headers"):null,host:n,port:i}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let i;n.protocol==="https:"?(ih("Creating `tls.Socket`: %o",this.connectOpts),i=pH.connect(yH(this.connectOpts))):(ih("Creating `net.Socket`: %o",this.connectOpts),i=mE.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=mE.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${o}:${r.port} HTTP/1.1\r `),g=f.shift();if(!g)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let m=g.split(" "),E=+m[1],C=m.slice(2).join(" "),I={};for(let b of f){if(!b)continue;let w=b.indexOf(":");if(w===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${b}"`));let R=b.slice(0,w).toLowerCase(),T=b.slice(w+1).trimStart(),U=I[R];typeof U=="string"?I[R]=[U,T]:Array.isArray(U)?U.push(T):I[R]=T}xy("got proxy server response: %o %o",g,I),o(),e({connect:{statusCode:E,statusText:C,headers:I},buffered:u})}t.on("error",A),t.on("end",a),s()})}ll.parseProxyResponse=Ule});var Lq=h(oi=>{"use strict";var qle=oi&&oi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Hle=oi&&oi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Oq=oi&&oi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&qle(e,t,r);return Hle(e,t),e},Mq=oi&&oi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oi,"__esModule",{value:!0});oi.HttpsProxyAgent=void 0;var Sy=Oq(require("net")),kq=Oq(require("tls")),zle=Mq(require("assert")),jle=Mq(wy()),Gle=fw(),Yle=require("url"),Jle=_q(),Sf=(0,jle.default)("https-proxy-agent"),Pq=t=>t.servername===void 0&&t.host&&!Sy.isIP(t.host)?{...t,servername:t.host}:t,vy=class extends Gle.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new Yle.URL(e):e,this.proxyHeaders=r?.headers??{},Sf("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?Tq(r,"headers"):null,host:n,port:i}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let i;n.protocol==="https:"?(Sf("Creating `tls.Socket`: %o",this.connectOpts),i=kq.connect(Pq(this.connectOpts))):(Sf("Creating `net.Socket`: %o",this.connectOpts),i=Sy.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=Sy.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${o}:${r.port} HTTP/1.1\r
`;if(n.username||n.password){let d=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}s.Host=`${o}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(s))a+=`${d}: ${s[d]}\r `;if(n.username||n.password){let d=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}s.Host=`${o}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(s))a+=`${d}: ${s[d]}\r
`;let A=(0,sfe.parseProxyResponse)(i);i.write(`${a}\r `;let A=(0,Jle.parseProxyResponse)(i);i.write(`${a}\r
`);let{connect:c,buffered:l}=await A;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),c.statusCode===200)return e.once("socket",ofe),r.secureEndpoint?(ih("Upgrading socket connection to TLS"),pH.connect({...EH(yH(r),"host","path","port"),socket:i})):i;i.destroy();let u=new mE.Socket({writable:!1});return u.readable=!0,e.once("socket",d=>{ih("Replaying proxy buffer for failed request"),(0,tfe.default)(d.listenerCount("data")>0),d.push(l),d.push(null)}),u}};pE.protocols=["http","https"];mi.HttpsProxyAgent=pE;function ofe(t){t.resume()}function EH(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var NH=h(pi=>{"use strict";var afe=pi&&pi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Afe=pi&&pi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),bH=pi&&pi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&afe(e,t,r);return Afe(e,t),e},cfe=pi&&pi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pi,"__esModule",{value:!0});pi.HttpProxyAgent=void 0;var lfe=bH(require("net")),ufe=bH(require("tls")),dfe=cfe(hE()),ffe=require("events"),hfe=kS(),QH=require("url"),vl=(0,dfe.default)("http-proxy-agent"),yE=class extends hfe.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new QH.URL(e):e,this.proxyHeaders=r?.headers??{},vl("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?gfe(r,"headers"):null,host:n,port:i}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,i=r.secureEndpoint?"https:":"http:",s=e.getHeader("host")||"localhost",o=`${i}//${s}`,a=new QH.URL(e.path,o);r.port!==80&&(a.port=String(r.port)),e.path=String(a);let A=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let c=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;A["Proxy-Authorization"]=`Basic ${Buffer.from(c).toString("base64")}`}A["Proxy-Connection"]||(A["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let c of Object.keys(A)){let l=A[c];l&&e.setHeader(c,l)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,i;vl("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(vl("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,i=n.indexOf(`\r `);let{connect:c,buffered:l}=await A;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),c.statusCode===200)return e.once("socket",Vle),r.secureEndpoint?(Sf("Upgrading socket connection to TLS"),kq.connect({...Tq(Pq(r),"host","path","port"),socket:i})):i;i.destroy();let u=new Sy.Socket({writable:!1});return u.readable=!0,e.once("socket",d=>{Sf("Replaying proxy buffer for failed request"),(0,zle.default)(d.listenerCount("data")>0),d.push(l),d.push(null)}),u}};vy.protocols=["http","https"];oi.HttpsProxyAgent=vy;function Vle(t){t.resume()}function Tq(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var qq=h(ai=>{"use strict";var Wle=ai&&ai.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$le=ai&&ai.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Uq=ai&&ai.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Wle(e,t,r);return $le(e,t),e},Kle=ai&&ai.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ai,"__esModule",{value:!0});ai.HttpProxyAgent=void 0;var Xle=Uq(require("net")),Zle=Uq(require("tls")),eue=Kle(wy()),tue=require("events"),rue=fw(),Fq=require("url"),ul=(0,eue.default)("http-proxy-agent"),Ry=class extends rue.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new Fq.URL(e):e,this.proxyHeaders=r?.headers??{},ul("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?nue(r,"headers"):null,host:n,port:i}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,i=r.secureEndpoint?"https:":"http:",s=e.getHeader("host")||"localhost",o=`${i}//${s}`,a=new Fq.URL(e.path,o);r.port!==80&&(a.port=String(r.port)),e.path=String(a);let A=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let c=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;A["Proxy-Authorization"]=`Basic ${Buffer.from(c).toString("base64")}`}A["Proxy-Connection"]||(A["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let c of Object.keys(A)){let l=A[c];l&&e.setHeader(c,l)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,i;ul("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(ul("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,i=n.indexOf(`\r
\r \r
`)+4,e.outputData[0].data=e._header+n.substring(i),vl("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(vl("Creating `tls.Socket`: %o",this.connectOpts),s=ufe.connect(this.connectOpts)):(vl("Creating `net.Socket`: %o",this.connectOpts),s=lfe.connect(this.connectOpts)),await(0,ffe.once)(s,"connect"),s}};yE.protocols=["http","https"];pi.HttpProxyAgent=yE;function gfe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var PS=h(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.globalNoProxyList=yi.proxyPolicyName=void 0;yi.loadNoProxy=vH;yi.getDefaultProxySettings=Nfe;yi.proxyPolicy=Sfe;var mfe=BH(),pfe=NH(),yfe=Zf(),Efe="HTTPS_PROXY",Cfe="HTTP_PROXY",Ife="ALL_PROXY",Bfe="NO_PROXY";yi.proxyPolicyName="proxyPolicy";yi.globalNoProxyList=[];var xH=!1,Qfe=new Map;function EE(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}function RH(){if(!process)return;let t=EE(Efe),e=EE(Ife),r=EE(Cfe);return t||e||r}function bfe(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let i=!1;for(let s of e)s[0]==="."?(n.endsWith(s)||n.length===s.length-1&&n===s.slice(1))&&(i=!0):n===s&&(i=!0);return r?.set(n,i),i}function vH(){let t=EE(Bfe);return xH=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}function Nfe(t){if(!t&&(t=RH(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}function wfe(){let t=RH();return t?new URL(t):void 0}function wH(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}function SH(t,e,r){if(t.agent)return;let i=new URL(t.url).protocol!=="https:";t.tlsSettings&&yfe.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let s=t.headers.toJSON();i?(e.httpProxyAgent||(e.httpProxyAgent=new pfe.HttpProxyAgent(r,{headers:s})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new mfe.HttpsProxyAgent(r,{headers:s})),t.agent=e.httpsProxyAgent)}function Sfe(t,e){xH||yi.globalNoProxyList.push(...vH());let r=t?wH(t):wfe(),n={};return{name:yi.proxyPolicyName,async sendRequest(i,s){var o;return!i.proxySettings&&r&&!bfe(i.url,(o=e?.customNoProxyList)!==null&&o!==void 0?o:yi.globalNoProxyList,e?.customNoProxyList?void 0:Qfe)?SH(i,n,r):i.proxySettings&&SH(i,n,wH(i.proxySettings)),s(i)}}}});var TS=h(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.agentPolicyName=void 0;_l.agentPolicy=xfe;_l.agentPolicyName="agentPolicy";function xfe(t){return{name:_l.agentPolicyName,sendRequest:async(e,r)=>(e.agent||(e.agent=t),r(e))}}});var OS=h(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.tlsPolicyName=void 0;Dl.tlsPolicy=Rfe;Dl.tlsPolicyName="tlsPolicy";function Rfe(t){return{name:Dl.tlsPolicyName,sendRequest:async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e))}}});var sh=h(mA=>{"use strict";Object.defineProperty(mA,"__esModule",{value:!0});mA.isNodeReadableStream=_H;mA.isWebReadableStream=DH;mA.isBinaryBody=vfe;mA.isReadableStream=kH;mA.isBlob=_fe;function _H(t){return!!(t&&typeof t.pipe=="function")}function DH(t){return!!(t&&typeof t.getReader=="function"&&typeof t.tee=="function")}function vfe(t){return t!==void 0&&(t instanceof Uint8Array||kH(t)||typeof t=="function"||t instanceof Blob)}function kH(t){return _H(t)||DH(t)}function _fe(t){return typeof t.stream=="function"}});var OH=h(MS=>{"use strict";Object.defineProperty(MS,"__esModule",{value:!0});MS.concat=Tfe;var io=(gi(),Fi(hi)),LS=require("stream"),Dfe=sh();function PH(){return io.__asyncGenerator(this,arguments,function*(){let e=this.getReader();try{for(;;){let{done:r,value:n}=yield io.__await(e.read());if(r)return yield io.__await(void 0);yield yield io.__await(n)}}finally{e.releaseLock()}})}function kfe(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=PH.bind(t)),t.values||(t.values=PH.bind(t))}function TH(t){return t instanceof ReadableStream?(kfe(t),LS.Readable.fromWeb(t)):t}function Pfe(t){return t instanceof Uint8Array?LS.Readable.from(Buffer.from(t)):(0,Dfe.isBlob)(t)?TH(t.stream()):TH(t)}async function Tfe(t){return function(){let e=t.map(r=>typeof r=="function"?r():r).map(Pfe);return LS.Readable.from((function(){return io.__asyncGenerator(this,arguments,function*(){var r,n,i,s;for(let c of e)try{for(var o=!0,a=(n=void 0,io.__asyncValues(c)),A;A=yield io.__await(a.next()),r=A.done,!r;o=!0){s=A.value,o=!1;let l=s;yield yield io.__await(l)}}catch(l){n={error:l}}finally{try{!o&&!r&&(i=a.return)&&(yield io.__await(i.call(a)))}finally{if(n)throw n.error}}})})())}}});var FS=h(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.multipartPolicyName=vo Line truncated `)+4,e.outputData[0].data=e._header+n.substring(i),ul("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(ul("Creating `tls.Socket`: %o",this.connectOpts),s=Zle.connect(this.connectOpts)):(ul("Creating `net.Socket`: %o",this.connectOpts),s=Xle.connect(this.connectOpts)),await(0,tue.once)(s,"connect"),s}};Ry.protocols=["http","https"];ai.HttpProxyAgent=Ry;function nue(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var hw=h(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.globalNoProxyList=Ai.proxyPolicyName=void 0;Ai.loadNoProxy=Yq;Ai.getDefaultProxySettings=fue;Ai.proxyPolicy=gue;var iue=Lq(),sue=qq(),oue=Qf(),aue="HTTPS_PROXY",Aue="HTTP_PROXY",cue="ALL_PROXY",lue="NO_PROXY";Ai.proxyPolicyName="proxyPolicy";Ai.globalNoProxyList=[];var jq=!1,uue=new Map;function Dy(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}function Gq(){if(!process)return;let t=Dy(aue),e=Dy(cue),r=Dy(Aue);return t||e||r}function due(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let i=!1;for(let s of e)s[0]==="."?(n.endsWith(s)||n.length===s.length-1&&n===s.slice(1))&&(i=!0):n===s&&(i=!0);return r?.set(n,i),i}function Yq(){let t=Dy(lue);return jq=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}function fue(t){if(!t&&(t=Gq(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}function hue(){let t=Gq();return t?new URL(t):void 0}function Hq(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}function zq(t,e,r){if(t.agent)return;let i=new URL(t.url).protocol!=="https:";t.tlsSettings&&oue.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let s=t.headers.toJSON();i?(e.httpProxyAgent||(e.httpProxyAgent=new sue.HttpProxyAgent(r,{headers:s})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new iue.HttpsProxyAgent(r,{headers:s})),t.agent=e.httpsProxyAgent)}function gue(t,e){jq||Ai.globalNoProxyList.push(...Yq());let r=t?Hq(t):hue(),n={};return{name:Ai.proxyPolicyName,async sendRequest(i,s){var o;return!i.proxySettings&&r&&!due(i.url,(o=e?.customNoProxyList)!==null&&o!==void 0?o:Ai.globalNoProxyList,e?.customNoProxyList?void 0:uue)?zq(i,n,r):i.proxySettings&&zq(i,n,Hq(i.proxySettings)),s(i)}}}});var gw=h(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.agentPolicyName=void 0;dl.agentPolicy=mue;dl.agentPolicyName="agentPolicy";function mue(t){return{name:dl.agentPolicyName,sendRequest:async(e,r)=>(e.agent||(e.agent=t),r(e))}}});var mw=h(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.tlsPolicyName=void 0;fl.tlsPolicy=pue;fl.tlsPolicyName="tlsPolicy";function pue(t){return{name:fl.tlsPolicyName,sendRequest:async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e))}}});var vf=h(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.isNodeReadableStream=Jq;Ka.isWebReadableStream=Vq;Ka.isBinaryBody=yue;Ka.isReadableStream=Wq;Ka.isBlob=Eue;function Jq(t){return!!(t&&typeof t.pipe=="function")}function Vq(t){return!!(t&&typeof t.getReader=="function"&&typeof t.tee=="function")}function yue(t){return t!==void 0&&(t instanceof Uint8Array||Wq(t)||typeof t=="function"||t instanceof Blob)}function Wq(t){return Jq(t)||Vq(t)}function Eue(t){return typeof t.stream=="function"}});var Xq=h(yw=>{"use strict";Object.defineProperty(yw,"__esModule",{value:!0});yw.concat=Que;var Hs=(si(),Si(ii)),pw=require("stream"),Cue=vf();function $q(){return Hs.__asyncGenerator(this,arguments,function*(){let e=this.getReader();try{for(;;){let{done:r,value:n}=yield Hs.__await(e.read());if(r)return yield Hs.__await(void 0);yield yield Hs.__await(n)}}finally{e.releaseLock()}})}function Iue(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=$q.bind(t)),t.values||(t.values=$q.bind(t))}function Kq(t){return t instanceof ReadableStream?(Iue(t),pw.Readable.fromWeb(t)):t}function Bue(t){return t instanceof Uint8Array?pw.Readable.from(Buffer.from(t)):(0,Cue.isBlob)(t)?Kq(t.stream()):Kq(t)}async function Que(t){return function(){let e=t.map(r=>typeof r=="function"?r():r).map(Bue);return pw.Readable.from((function(){return Hs.__asyncGenerator(this,arguments,function*(){var r,n,i,s;for(let c of e)try{for(var o=!0,a=(n=void 0,Hs.__asyncValues(c)),A;A=yield Hs.__await(a.next()),r=A.done,!r;o=!0){s=A.value,o=!1;let l=s;yield yield Hs.__await(l)}}catch(l){n={error:l}}finally{try{!o&&!r&&(i=a.return)&&(yield Hs.__await(i.call(a)))}finally{if(n)throw n.error}}})})())}}});var Ew=h(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.multipartPolicyName=vo Line truncated
`;return e}function qfe(t){return t instanceof Uint8Array?t.byteLength:(0,Ofe.isBlob)(t)?t.size===-1?void 0:t.size:void 0}function Hfe(t){let e=0;for(let r of t){let n=qfe(r);if(n===void 0)return;e+=n}return e}async function jfe(t,e,r){let n=[(0,kl.stringToUint8Array)(`--${r}`,"utf-8"),...e.flatMap(s=>[(0,kl.stringToUint8Array)(`\r `;return e}function vue(t){return t instanceof Uint8Array?t.byteLength:(0,bue.isBlob)(t)?t.size===-1?void 0:t.size:void 0}function Rue(t){let e=0;for(let r of t){let n=vue(r);if(n===void 0)return;e+=n}return e}async function Due(t,e,r){let n=[(0,hl.stringToUint8Array)(`--${r}`,"utf-8"),...e.flatMap(s=>[(0,hl.stringToUint8Array)(`\r
`,"utf-8"),(0,kl.stringToUint8Array)(Ufe(s.headers),"utf-8"),(0,kl.stringToUint8Array)(`\r `,"utf-8"),(0,hl.stringToUint8Array)(Sue(s.headers),"utf-8"),(0,hl.stringToUint8Array)(`\r
`,"utf-8"),s.body,(0,kl.stringToUint8Array)(`\r `,"utf-8"),s.body,(0,hl.stringToUint8Array)(`\r
--${r}`,"utf-8")]),(0,kl.stringToUint8Array)(`--\r --${r}`,"utf-8")]),(0,hl.stringToUint8Array)(`--\r
\r \r
`,"utf-8")],i=Hfe(n);i&&t.headers.set("Content-Length",i),t.body=await(0,Mfe.concat)(n)}Pl.multipartPolicyName="multipartPolicy";var zfe=70,Gfe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Yfe(t){if(t.length>zfe)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!Gfe.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}function Jfe(){return{name:Pl.multipartPolicyName,async sendRequest(t,e){var r;if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let n=t.multipartBody.boundary,i=(r=t.headers.get("Content-Type"))!==null&&r!==void 0?r:"multipart/mixed",s=i.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${i}`);let[,o,a]=s;if(a&&n&&a!==n)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${n} in the request body`);return n??(n=a),n?Yfe(n):n=Ffe(),t.headers.set("Content-Type",`${o}; boundary=${n}`),await jfe(t,t.multipartBody.parts,n),t.multipartBody=void 0,e(t)}}}});var FH=h(US=>{"use strict";Object.defineProperty(US,"__esModule",{value:!0});US.createPipelineFromOptions=ihe;var Vfe=uS(),Wfe=Zw(),$fe=dS(),Kfe=gS(),Xfe=mS(),Zfe=bS(),ehe=RS(),LH=nh(),the=PS(),rhe=TS(),nhe=OS(),MH=FS();function ihe(t){let e=(0,Wfe.createEmptyPipeline)();return LH.isNodeLike&&(t.agent&&e.addPolicy((0,rhe.agentPolicy)(t.agent)),t.tlsOptions&&e.addPolicy((0,nhe.tlsPolicy)(t.tlsOptions)),e.addPolicy((0,the.proxyPolicy)(t.proxyOptions)),e.addPolicy((0,Xfe.decompressResponsePolicy)())),e.addPolicy((0,ehe.formDataPolicy)(),{beforePolicies:[MH.multipartPolicyName]}),e.addPolicy((0,Kfe.userAgentPolicy)(t.userAgentOptions)),e.addPolicy((0,MH.multipartPolicy)(),{afterPhase:"Deserialize"}),e.addPolicy((0,Zfe.defaultRetryPolicy)(t.retryOptions),{phase:"Retry"}),LH.isNodeLike&&e.addPolicy((0,$fe.redirectPolicy)(t.redirectOptions),{afterPhase:"Retry"}),e.addPolicy((0,Vfe.logPolicy)(t.loggingOptions),{afterPhase:"Sign"}),e}});var UH=h(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.apiVersionPolicyName=void 0;Tl.apiVersionPolicy=she;Tl.apiVersionPolicyName="ApiVersionPolicy";function she(t){return{name:Tl.apiVersionPolicyName,sendRequest:(e,r)=>{let n=new URL(e.url);return!n.searchParams.get("api-version")&&t.apiVersion&&(e.url=`${e.url}${Array.from(n.searchParams.keys()).length>0?"&":"?"}api-version=${t.apiVersion}`),r(e)}}}});var qH=h(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.isOAuth2TokenCredential=ohe;Ol.isBearerTokenCredential=ahe;Ol.isBasicCredential=Ahe;Ol.isApiKeyCredential=che;function ohe(t){return"getOAuth2Token"in t}function ahe(t){return"getBearerToken"in t}function Ahe(t){return"username"in t&&"password"in t}function che(t){return"key"in t}});var oh=h(qS=>{"use strict";Object.defineProperty(qS,"__esModule",{value:!0});qS.ensureSecureConnection=fhe;var lhe=Zf(),HH=!1;function uhe(t,e){if(e.allowInsecureConnection&&t.allowInsecureConnection){let r=new URL(t.url);if(r.hostname==="localhost"||r.hostname==="127.0.0.1")return!0}return!1}function dhe(){let t="Sending token over insecure transport. Assume any token issued is compromised.";lhe.logger.warning(t),typeof(process==null?void 0:process.emitWarning)=="function"&&!HH&&(HH=!0,process.emitWarning(t))}function fhe(t,e){if(!t.url.toLowerCase().startsWith("https://"))if(uhe(t,e))dhe();else throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false.")}});var jH=h(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.apiKeyAuthenticationPolicyName=void 0;Ll.apiKeyAuthenticationPolicy=ghe;var hhe=oh();Ll.apiKeyAuthenticationPolicyName="apiKeyAuthenticationPolicy";function ghe(t){return{name:Ll.apiKeyAuthenticationPolicyName,async sendRequest(e,r){var n,i;(0,hhe.ensureSecureConnection)(e,t);let s=(i=(n=e.authSchemes)!==null&&n!==void 0?n:t.authSchemes)===null||i===void 0?void 0:i.find(o=>o.kind==="apiKey");if(!s)return r(e);if(s.apiKeyLocation!=="header")throw new Error(`Unsupported API key location: ${s.apiKeyLocation}`);return e.headers.set(s.name,t.credential.key),r(e)}}}});var GH=h(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.basicAuthenticationPolicyName=void 0;Ml.basicAuthenticationPolicy=phe;var zH=fA(),mhe=oh();Ml.basicAuthenticationPolicyName="bearerAuthenticationPolicy";function phe(t){return{name:Ml.basicAuthenticationPolicyName,async sendRequest(e,r){var n,i;if((0,mhe.ensureSecureConnection)(e,t),!((i=(n=e.authSchemes)!==null&&n!==void 0?n:t.authSchemes)===null||i===void 0?void 0:i.find(c=>c.kind==="http"&&c.scheme==="basic")))return r(e);let{username:o,password:a}=t.credential,A=(0,zH.uint8ArrayToString)((0,zH.stringToUint8Array)(`${o}:${a}`,"utf-8"),"base64");return e.headers.set("Authori Line truncated `,"utf-8")],i=Rue(n);i&&t.headers.set("Content-Length",i),t.body=await(0,wue.concat)(n)}gl.multipartPolicyName="multipartPolicy";var _ue=70,kue=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Pue(t){if(t.length>_ue)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!kue.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}function Tue(){return{name:gl.multipartPolicyName,async sendRequest(t,e){var r;if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let n=t.multipartBody.boundary,i=(r=t.headers.get("Content-Type"))!==null&&r!==void 0?r:"multipart/mixed",s=i.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${i}`);let[,o,a]=s;if(a&&n&&a!==n)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${n} in the request body`);return n??(n=a),n?Pue(n):n=xue(),t.headers.set("Content-Type",`${o}; boundary=${n}`),await Due(t,t.multipartBody.parts,n),t.multipartBody=void 0,e(t)}}}});var t2=h(Cw=>{"use strict";Object.defineProperty(Cw,"__esModule",{value:!0});Cw.createPipelineFromOptions=Yue;var Oue=GN(),Mue=kN(),Lue=YN(),Fue=WN(),Uue=$N(),que=iw(),Hue=cw(),Zq=xf(),zue=hw(),jue=gw(),Gue=mw(),e2=Ew();function Yue(t){let e=(0,Mue.createEmptyPipeline)();return Zq.isNodeLike&&(t.agent&&e.addPolicy((0,jue.agentPolicy)(t.agent)),t.tlsOptions&&e.addPolicy((0,Gue.tlsPolicy)(t.tlsOptions)),e.addPolicy((0,zue.proxyPolicy)(t.proxyOptions)),e.addPolicy((0,Uue.decompressResponsePolicy)())),e.addPolicy((0,Hue.formDataPolicy)(),{beforePolicies:[e2.multipartPolicyName]}),e.addPolicy((0,Fue.userAgentPolicy)(t.userAgentOptions)),e.addPolicy((0,e2.multipartPolicy)(),{afterPhase:"Deserialize"}),e.addPolicy((0,que.defaultRetryPolicy)(t.retryOptions),{phase:"Retry"}),Zq.isNodeLike&&e.addPolicy((0,Lue.redirectPolicy)(t.redirectOptions),{afterPhase:"Retry"}),e.addPolicy((0,Oue.logPolicy)(t.loggingOptions),{afterPhase:"Sign"}),e}});var r2=h(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.apiVersionPolicyName=void 0;ml.apiVersionPolicy=Jue;ml.apiVersionPolicyName="ApiVersionPolicy";function Jue(t){return{name:ml.apiVersionPolicyName,sendRequest:(e,r)=>{let n=new URL(e.url);return!n.searchParams.get("api-version")&&t.apiVersion&&(e.url=`${e.url}${Array.from(n.searchParams.keys()).length>0?"&":"?"}api-version=${t.apiVersion}`),r(e)}}}});var n2=h(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.isOAuth2TokenCredential=Vue;pl.isBearerTokenCredential=Wue;pl.isBasicCredential=$ue;pl.isApiKeyCredential=Kue;function Vue(t){return"getOAuth2Token"in t}function Wue(t){return"getBearerToken"in t}function $ue(t){return"username"in t&&"password"in t}function Kue(t){return"key"in t}});var Rf=h(Iw=>{"use strict";Object.defineProperty(Iw,"__esModule",{value:!0});Iw.ensureSecureConnection=tde;var Xue=Qf(),i2=!1;function Zue(t,e){if(e.allowInsecureConnection&&t.allowInsecureConnection){let r=new URL(t.url);if(r.hostname==="localhost"||r.hostname==="127.0.0.1")return!0}return!1}function ede(){let t="Sending token over insecure transport. Assume any token issued is compromised.";Xue.logger.warning(t),typeof(process==null?void 0:process.emitWarning)=="function"&&!i2&&(i2=!0,process.emitWarning(t))}function tde(t,e){if(!t.url.toLowerCase().startsWith("https://"))if(Zue(t,e))ede();else throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false.")}});var s2=h(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.apiKeyAuthenticationPolicyName=void 0;yl.apiKeyAuthenticationPolicy=nde;var rde=Rf();yl.apiKeyAuthenticationPolicyName="apiKeyAuthenticationPolicy";function nde(t){return{name:yl.apiKeyAuthenticationPolicyName,async sendRequest(e,r){var n,i;(0,rde.ensureSecureConnection)(e,t);let s=(i=(n=e.authSchemes)!==null&&n!==void 0?n:t.authSchemes)===null||i===void 0?void 0:i.find(o=>o.kind==="apiKey");if(!s)return r(e);if(s.apiKeyLocation!=="header")throw new Error(`Unsupported API key location: ${s.apiKeyLocation}`);return e.headers.set(s.name,t.credential.key),r(e)}}}});var a2=h(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.basicAuthenticationPolicyName=void 0;El.basicAuthenticationPolicy=sde;var o2=Va(),ide=Rf();El.basicAuthenticationPolicyName="bearerAuthenticationPolicy";function sde(t){return{name:El.basicAuthenticationPolicyName,async sendRequest(e,r){var n,i;if((0,ide.ensureSecureConnection)(e,t),!((i=(n=e.authSchemes)!==null&&n!==void 0?n:t.authSchemes)===null||i===void 0?void 0:i.find(c=>c.kind==="http"&&c.scheme==="basic")))return r(e);let{username:o,password:a}=t.credential,A=(0,o2.uint8ArrayToString)((0,o2.stringToUint8Array)(`${o}:${a}`,"utf-8"),"base64");return e.headers.set("Authori Line truncated
`).join(""))}return e(t)}}}});var wz=h(CA=>{"use strict";Object.defineProperty(CA,"__esModule",{value:!0});CA.auxiliaryAuthenticationHeaderPolicyName=void 0;CA.auxiliaryAuthenticationHeaderPolicy=Vpe;var Gpe=Lx(),Ype=Ah();CA.auxiliaryAuthenticationHeaderPolicyName="auxiliaryAuthenticationHeaderPolicy";var Nz="x-ms-authorization-auxiliary";async function Jpe(t){var e,r;let{scopes:n,getAccessToken:i,request:s}=t,o={abortSignal:s.abortSignal,tracingOptions:s.tracingOptions};return(r=(e=await i(n,o))===null||e===void 0?void 0:e.token)!==null&&r!==void 0?r:""}function Vpe(t){let{credentials:e,scopes:r}=t,n=t.logger||Ype.logger,i=new WeakMap;return{name:CA.auxiliaryAuthenticationHeaderPolicyName,async sendRequest(s,o){if(!s.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.");if(!e||e.length===0)return n.info(`${CA.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`),o(s);let a=[];for(let c of e){let l=i.get(c);l||(l=(0,Gpe.createTokenCycler)(c),i.set(c,l)),a.push(Jpe({scopes:Array.isArray(r)?r:[r],request:s,getAccessToken:l,logger:n}))}let A=(await Promise.all(a)).filter(c=>!!c);return A.length===0?(n.warning(`None of the auxiliary tokens are valid. ${Nz} header will not be set.`),o(s)):(s.headers.set(Nz,A.map(c=>`Bearer ${c}`).join(", ")),o(s))}}}});var oo=h(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.createFileFromStream=L.createFile=L.agentPolicyName=L.agentPolicy=L.auxiliaryAuthenticationHeaderPolicyName=L.auxiliaryAuthenticationHeaderPolicy=L.ndJsonPolicyName=L.ndJsonPolicy=L.bearerTokenAuthenticationPolicyName=L.bearerTokenAuthenticationPolicy=L.formDataPolicyName=L.formDataPolicy=L.tlsPolicyName=L.tlsPolicy=L.userAgentPolicyName=L.userAgentPolicy=L.defaultRetryPolicy=L.tracingPolicyName=L.tracingPolicy=L.retryPolicy=L.throttlingRetryPolicyName=L.throttlingRetryPolicy=L.systemErrorRetryPolicyName=L.systemErrorRetryPolicy=L.redirectPolicyName=L.redirectPolicy=L.getDefaultProxySettings=L.proxyPolicyName=L.proxyPolicy=L.multipartPolicyName=L.multipartPolicy=L.logPolicyName=L.logPolicy=L.setClientRequestIdPolicyName=L.setClientRequestIdPolicy=L.exponentialRetryPolicyName=L.exponentialRetryPolicy=L.decompressResponsePolicyName=L.decompressResponsePolicy=L.isRestError=L.RestError=L.createPipelineRequest=L.createHttpHeaders=L.createDefaultHttpClient=L.createPipelineFromOptions=L.createEmptyPipeline=void 0;var Wpe=XS();Object.defineProperty(L,"createEmptyPipeline",{enumerable:!0,get:function(){return Wpe.createEmptyPipeline}});var $pe=Az();Object.defineProperty(L,"createPipelineFromOptions",{enumerable:!0,get:function(){return $pe.createPipelineFromOptions}});var Kpe=cz();Object.defineProperty(L,"createDefaultHttpClient",{enumerable:!0,get:function(){return Kpe.createDefaultHttpClient}});var Xpe=lz();Object.defineProperty(L,"createHttpHeaders",{enumerable:!0,get:function(){return Xpe.createHttpHeaders}});var Zpe=uz();Object.defineProperty(L,"createPipelineRequest",{enumerable:!0,get:function(){return Zpe.createPipelineRequest}});var Sz=FE();Object.defineProperty(L,"RestError",{enumerable:!0,get:function(){return Sz.RestError}});Object.defineProperty(L,"isRestError",{enumerable:!0,get:function(){return Sz.isRestError}});var xz=mx();Object.defineProperty(L,"decompressResponsePolicy",{enumerable:!0,get:function(){return xz.decompressResponsePolicy}});Object.defineProperty(L,"decompressResponsePolicyName",{enumerable:!0,get:function(){return xz.decompressResponsePolicyName}});var Rz=fz();Object.defineProperty(L,"exponentialRetryPolicy",{enumerable:!0,get:function(){return Rz.exponentialRetryPolicy}});Object.defineProperty(L,"exponentialRetryPolicyName",{enumerable:!0,get:function(){return Rz.exponentialRetryPolicyName}});var vz=Ix();Object.defineProperty(L,"setClientRequestIdPolicy",{enumerable:!0,get:function(){return vz.setClientRequestIdPolicy}});Object.defineProperty(L,"setClientRequestIdPolicyName",{enumerable:!0,get:function(){return vz.setClientRequestIdPolicyName}});var _z=ex();Object.defineProperty(L,"logPolicy",{enumerable:!0,get:function(){return _z.logPolicy}});Object.defineProperty(L,"logPolicyName",{enumerable:!0,get:function(){return _z.logPolicyName}});var Dz=gx();Object.defineProperty(L,"multipartPolicy",{enumerable:!0,get:function(){return Dz.multipartPolicy}});Object.defineProperty(L,"multipartPolicyName",{enumerable:!0,get:function(){return Dz.multipartPolicyName}});var Mx=Cx();Object.defineProperty(L,"proxyPolicy",{enumerable:!0,get:function(){return Mx.proxyPolicy}});Object.defineProperty(L,"proxyPolicyName",{enumerable:!0,get:function(){return Mx.proxyPolicyName}});Object.defineProperty(L,"getDefaultProxySettings",{enumerable:!0,get:function(){return Mx.getDefaultProxySettings}});var kz=tx();Object.defineProperty(L,"redirectPolicy",{enumerable:!0,get:function(){return kz.redirectPolicy}});Object.defineProperty(L,"redirect Line truncated `).join(""))}return e(t)}}}});var HH=h(tA=>{"use strict";Object.defineProperty(tA,"__esModule",{value:!0});tA.auxiliaryAuthenticationHeaderPolicyName=void 0;tA.auxiliaryAuthenticationHeaderPolicy=Oge;var kge=px(),Pge=_f();tA.auxiliaryAuthenticationHeaderPolicyName="auxiliaryAuthenticationHeaderPolicy";var qH="x-ms-authorization-auxiliary";async function Tge(t){var e,r;let{scopes:n,getAccessToken:i,request:s}=t,o={abortSignal:s.abortSignal,tracingOptions:s.tracingOptions};return(r=(e=await i(n,o))===null||e===void 0?void 0:e.token)!==null&&r!==void 0?r:""}function Oge(t){let{credentials:e,scopes:r}=t,n=t.logger||Pge.logger,i=new WeakMap;return{name:tA.auxiliaryAuthenticationHeaderPolicyName,async sendRequest(s,o){if(!s.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.");if(!e||e.length===0)return n.info(`${tA.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`),o(s);let a=[];for(let c of e){let l=i.get(c);l||(l=(0,kge.createTokenCycler)(c),i.set(c,l)),a.push(Tge({scopes:Array.isArray(r)?r:[r],request:s,getAccessToken:l,logger:n}))}let A=(await Promise.all(a)).filter(c=>!!c);return A.length===0?(n.warning(`None of the auxiliary tokens are valid. ${qH} header will not be set.`),o(s)):(s.headers.set(qH,A.map(c=>`Bearer ${c}`).join(", ")),o(s))}}}});var js=h(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.createFileFromStream=M.createFile=M.agentPolicyName=M.agentPolicy=M.auxiliaryAuthenticationHeaderPolicyName=M.auxiliaryAuthenticationHeaderPolicy=M.ndJsonPolicyName=M.ndJsonPolicy=M.bearerTokenAuthenticationPolicyName=M.bearerTokenAuthenticationPolicy=M.formDataPolicyName=M.formDataPolicy=M.tlsPolicyName=M.tlsPolicy=M.userAgentPolicyName=M.userAgentPolicy=M.defaultRetryPolicy=M.tracingPolicyName=M.tracingPolicy=M.retryPolicy=M.throttlingRetryPolicyName=M.throttlingRetryPolicy=M.systemErrorRetryPolicyName=M.systemErrorRetryPolicy=M.redirectPolicyName=M.redirectPolicy=M.getDefaultProxySettings=M.proxyPolicyName=M.proxyPolicy=M.multipartPolicyName=M.multipartPolicy=M.logPolicyName=M.logPolicy=M.setClientRequestIdPolicyName=M.setClientRequestIdPolicy=M.exponentialRetryPolicyName=M.exponentialRetryPolicy=M.decompressResponsePolicyName=M.decompressResponsePolicy=M.isRestError=M.RestError=M.createPipelineRequest=M.createHttpHeaders=M.createDefaultHttpClient=M.createPipelineFromOptions=M.createEmptyPipeline=void 0;var Mge=_w();Object.defineProperty(M,"createEmptyPipeline",{enumerable:!0,get:function(){return Mge.createEmptyPipeline}});var Lge=bH();Object.defineProperty(M,"createPipelineFromOptions",{enumerable:!0,get:function(){return Lge.createPipelineFromOptions}});var Fge=NH();Object.defineProperty(M,"createDefaultHttpClient",{enumerable:!0,get:function(){return Fge.createDefaultHttpClient}});var Uge=wH();Object.defineProperty(M,"createHttpHeaders",{enumerable:!0,get:function(){return Uge.createHttpHeaders}});var qge=xH();Object.defineProperty(M,"createPipelineRequest",{enumerable:!0,get:function(){return qge.createPipelineRequest}});var zH=Ky();Object.defineProperty(M,"RestError",{enumerable:!0,get:function(){return zH.RestError}});Object.defineProperty(M,"isRestError",{enumerable:!0,get:function(){return zH.isRestError}});var jH=$w();Object.defineProperty(M,"decompressResponsePolicy",{enumerable:!0,get:function(){return jH.decompressResponsePolicy}});Object.defineProperty(M,"decompressResponsePolicyName",{enumerable:!0,get:function(){return jH.decompressResponsePolicyName}});var GH=vH();Object.defineProperty(M,"exponentialRetryPolicy",{enumerable:!0,get:function(){return GH.exponentialRetryPolicy}});Object.defineProperty(M,"exponentialRetryPolicyName",{enumerable:!0,get:function(){return GH.exponentialRetryPolicyName}});var YH=tx();Object.defineProperty(M,"setClientRequestIdPolicy",{enumerable:!0,get:function(){return YH.setClientRequestIdPolicy}});Object.defineProperty(M,"setClientRequestIdPolicyName",{enumerable:!0,get:function(){return YH.setClientRequestIdPolicyName}});var JH=Pw();Object.defineProperty(M,"logPolicy",{enumerable:!0,get:function(){return JH.logPolicy}});Object.defineProperty(M,"logPolicyName",{enumerable:!0,get:function(){return JH.logPolicyName}});var VH=Ww();Object.defineProperty(M,"multipartPolicy",{enumerable:!0,get:function(){return VH.multipartPolicy}});Object.defineProperty(M,"multipartPolicyName",{enumerable:!0,get:function(){return VH.multipartPolicyName}});var yx=ex();Object.defineProperty(M,"proxyPolicy",{enumerable:!0,get:function(){return yx.proxyPolicy}});Object.defineProperty(M,"proxyPolicyName",{enumerable:!0,get:function(){return yx.proxyPolicyName}});Object.defineProperty(M,"getDefaultProxySettings",{enumerable:!0,get:function(){return yx.getDefaultProxySettings}});var WH=Tw();Object.defineProperty(M,"redirectPolicy",{enumerable:!0,get:function(){return WH.redirectPolicy}});Object.defineProperty(M,"redirect Line truncated
`&&p[b]!=="\r";b++)P+=p[b];if(P=P.trim(),P[P.length-1]==="/"&&(P=P.substring(0,P.length-1),b--),!s(P)){let ae;return ae=P.trim().length===0?"Invalid space after '<'.":"Tag '"+P+"' is an invalid name.",C("InvalidTag",ae,N(p,b))}let z=f(p,b);if(z===!1)return C("InvalidAttr","Attributes for '"+P+"' have open quote.",N(p,b));let Ee=z.value;if(b=z.index,Ee[Ee.length-1]==="/"){let ae=b-Ee.length;Ee=Ee.substring(0,Ee.length-1);let Fe=m(Ee,y);if(Fe!==!0)return C(Fe.err.code,Fe.err.msg,N(p,ae+Fe.err.line));S=!0}else if(R){if(!z.tagClosed)return C("InvalidTag","Closing tag '"+P+"' doesn't have proper closing.",N(p,b));if(Ee.trim().length>0)return C("InvalidTag","Closing tag '"+P+"' can't have attributes or invalid starting.",N(p,_));if(B.length===0)return C("InvalidTag","Closing tag '"+P+"' has not been opened.",N(p,_));{let ae=B.pop();if(P!==ae.tagName){let Fe=N(p,ae.tagStartPos);return C("InvalidTag","Expected closing tag '"+ae.tagName+"' (opened in line "+Fe.line+", col "+Fe.col+") instead of closing tag '"+P+"'.",N(p,_))}B.length==0&&(Q=!0)}}else{let ae=m(Ee,y);if(ae!==!0)return C(ae.err.code,ae.err.msg,N(p,b-Ee.length+ae.err.line));if(Q===!0)return C("InvalidXml","Multiple possible root nodes found.",N(p,b));y.unpairedTags.indexOf(P)!==-1||B.push({tagName:P,tagStartPos:_}),S=!0}for(b++;b<p.length;b++)if(p[b]==="<"){if(p[b+1]==="!"){b++,b=l(p,b);continue}if(p[b+1]!=="?")break;if(b=c(p,++b),b.err)return b}else if(p[b]==="&"){let ae=E(p,b);if(ae==-1)return C("InvalidChar","char '&' is not expected.",N(p,b));b=ae}else if(Q===!0&&!A(p[b]))return C("InvalidXml","Extra text at the end",N(p,b));p[b]==="<"&&b--}}}return S?B.length==1?C("InvalidTag","Unclosed tag '"+B[0].tagName+"'.",N(p,B[0].tagStartPos)):!(B.length>0)||C("InvalidXml","Invalid '"+JSON.stringify(B.map((b=>b.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):C("InvalidXml","Start tag expected.",1)}function A(p){return p===" "||p===" "||p===` `&&p[N]!=="\r";N++)P+=p[N];if(P=P.trim(),P[P.length-1]==="/"&&(P=P.substring(0,P.length-1),N--),!s(P)){let ae;return ae=P.trim().length===0?"Invalid space after '<'.":"Tag '"+P+"' is an invalid name.",C("InvalidTag",ae,b(p,N))}let j=f(p,N);if(j===!1)return C("InvalidAttr","Attributes for '"+P+"' have open quote.",b(p,N));let ye=j.value;if(N=j.index,ye[ye.length-1]==="/"){let ae=N-ye.length;ye=ye.substring(0,ye.length-1);let Le=m(ye,y);if(Le!==!0)return C(Le.err.code,Le.err.msg,b(p,ae+Le.err.line));x=!0}else if(v){if(!j.tagClosed)return C("InvalidTag","Closing tag '"+P+"' doesn't have proper closing.",b(p,N));if(ye.trim().length>0)return C("InvalidTag","Closing tag '"+P+"' can't have attributes or invalid starting.",b(p,D));if(B.length===0)return C("InvalidTag","Closing tag '"+P+"' has not been opened.",b(p,D));{let ae=B.pop();if(P!==ae.tagName){let Le=b(p,ae.tagStartPos);return C("InvalidTag","Expected closing tag '"+ae.tagName+"' (opened in line "+Le.line+", col "+Le.col+") instead of closing tag '"+P+"'.",b(p,D))}B.length==0&&(Q=!0)}}else{let ae=m(ye,y);if(ae!==!0)return C(ae.err.code,ae.err.msg,b(p,N-ye.length+ae.err.line));if(Q===!0)return C("InvalidXml","Multiple possible root nodes found.",b(p,N));y.unpairedTags.indexOf(P)!==-1||B.push({tagName:P,tagStartPos:D}),x=!0}for(N++;N<p.length;N++)if(p[N]==="<"){if(p[N+1]==="!"){N++,N=l(p,N);continue}if(p[N+1]!=="?")break;if(N=c(p,++N),N.err)return N}else if(p[N]==="&"){let ae=E(p,N);if(ae==-1)return C("InvalidChar","char '&' is not expected.",b(p,N));N=ae}else if(Q===!0&&!A(p[N]))return C("InvalidXml","Extra text at the end",b(p,N));p[N]==="<"&&N--}}}return x?B.length==1?C("InvalidTag","Unclosed tag '"+B[0].tagName+"'.",b(p,B[0].tagStartPos)):!(B.length>0)||C("InvalidXml","Invalid '"+JSON.stringify(B.map((N=>N.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):C("InvalidXml","Start tag expected.",1)}function A(p){return p===" "||p===" "||p===`
`||p==="\r"}function c(p,y){let B=y;for(;y<p.length;y++)if(!(p[y]!="?"&&p[y]!=" ")){let S=p.substr(B,y-B);if(y>5&&S==="xml")return C("InvalidXml","XML declaration allowed only at the start of the document.",N(p,y));if(p[y]=="?"&&p[y+1]==">"){y++;break}}return y}function l(p,y){if(p.length>y+5&&p[y+1]==="-"&&p[y+2]==="-"){for(y+=3;y<p.length;y++)if(p[y]==="-"&&p[y+1]==="-"&&p[y+2]===">"){y+=2;break}}else if(p.length>y+8&&p[y+1]==="D"&&p[y+2]==="O"&&p[y+3]==="C"&&p[y+4]==="T"&&p[y+5]==="Y"&&p[y+6]==="P"&&p[y+7]==="E"){let B=1;for(y+=8;y<p.length;y++)if(p[y]==="<")B++;else if(p[y]===">"&&(B--,B===0))break}else if(p.length>y+9&&p[y+1]==="["&&p[y+2]==="C"&&p[y+3]==="D"&&p[y+4]==="A"&&p[y+5]==="T"&&p[y+6]==="A"&&p[y+7]==="["){for(y+=8;y<p.length;y++)if(p[y]==="]"&&p[y+1]==="]"&&p[y+2]===">"){y+=2;break}}return y}let u='"',d="'";function f(p,y){let B="",S="",Q=!1;for(;y<p.length;y++){if(p[y]===u||p[y]===d)S===""?S=p[y]:S!==p[y]||(S="");else if(p[y]===">"&&S===""){Q=!0;break}B+=p[y]}return S===""&&{value:B,index:y,tagClosed:Q}}let g=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function m(p,y){let B=i(p,g),S={};for(let Q=0;Q<B.length;Q++){if(B[Q][1].length===0)return C("InvalidAttr","Attribute '"+B[Q][2]+"' has no space in starting.",w(B[Q]));if(B[Q][3]!==void 0&&B[Q][4]===void 0)return C("InvalidAttr","Attribute '"+B[Q][2]+"' is without value.",w(B[Q]));if(B[Q][3]===void 0&&!y.allowBooleanAttributes)return C("InvalidAttr","boolean attribute '"+B[Q][2]+"' is not allowed.",w(B[Q]));let b=B[Q][2];if(!I(b))return C("InvalidAttr","Attribute '"+b+"' is an invalid name.",w(B[Q]));if(S.hasOwnProperty(b))return C("InvalidAttr","Attribute '"+b+"' is repeated.",w(B[Q]));S[b]=1}return!0}function E(p,y){if(p[++y]===";")return-1;if(p[y]==="#")return(function(S,Q){let b=/\d/;for(S[Q]==="x"&&(Q++,b=/[\da-fA-F]/);Q<S.length;Q++){if(S[Q]===";")return Q;if(!S[Q].match(b))break}return-1})(p,++y);let B=0;for(;y<p.length;y++,B++)if(!(p[y].match(/\w/)&&B<20)){if(p[y]===";")break;return-1}return y}function C(p,y,B){return{err:{code:p,msg:y,line:B.line||B,col:B.col}}}function I(p){return s(p)}function N(p,y){let B=p.substring(0,y).split(/\r?\n/);return{line:B.length,col:B[B.length-1].length+1}}function w(p){return p.startIndex+p[1].length}let v={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(p,y){return y},attributeValueProcessor:function(p,y){return y},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(p,y,B){return p},captureMetaData:!1},T;T=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class U{constructor(y){this.tagname=y,this.child=[],this[":@"]={}}add(y,B){y==="__proto__"&&(y="#__proto__"),this.child.push({[y]:B})}addChild(y,B){y.tagname==="__proto__"&&(y.tagname="#__proto__"),y[":@"]&&Object.keys(y[":@"]).length>0?this.child.push({[y.tagname]:y.child,":@":y[":@"]}):this.child.push({[y.tagname]:y.child}),B!==void 0&&(this.child[this.child.length-1][T]={startIndex:B})}static getMetaDataSymbol(){return T}}function k(p,y){let B={};if(p[y+3]!=="O"||p[y+4]!=="C"||p[y+5]!=="T"||p[y+6]!=="Y"||p[y+7]!=="P"||p[y+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{y+=9;let S=1,Q=!1,b=!1,_="";for(;y<p.length;y++)if(p[y]!=="<"||b)if(p[y]===">"){if(b?p[y-1]==="-"&&p[y-2]==="-"&&(b=!1,S--):S--,S===0)break}else p[y]==="["?Q=!0:_+=p[y];else{if(Q&&rt(p,"!ENTITY",y)){let R,P;y+=7,[R,P,y]=be(p,y+1),P.indexOf("&")===-1&&(B[R]={regx:RegExp(`&${R};`,"g"),val:P})}else if(Q&&rt(p,"!ELEMENT",y)){y+=8;let{index:R}=_e(p,y+1);y=R}else if(Q&&rt(p,"!ATTLIST",y))y+=8;else if(Q&&rt(p,"!NOTATION",y)){y+=9;let{index:R}=Re(p,y+1);y=R}else{if(!rt(p,"!--",y))throw new Error("Invalid DOCTYPE");b=!0}S++,_=""}if(S!==0)throw new Error("Unclosed DOCTYPE")}return{entities:B,i:y}}let J=(p,y)=>{for(;y<p.length&&/\s/.test(p[y]);)y++;return y};function be(p,y){y=J(p,y);let B="";for(;y<p.length&&!/\s/.test(p[y])&&p[y]!=='"'&&p[y]!=="'";)B+=p[y],y++;if(Or(B),y=J(p,y),p.substring(y,y+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(p[y]==="%")throw new Error("Parameter entities are not supported");let S="";return[y,S]=H(p,y,"entity"),[B,S,--y]}function Re(p,y){y=J(p,y);let B="";for(;y<p.length&&!/\s/.test(p[y]);)B+=p[y],y++;Or(B),y=J(p,y);let S=p.substring(y,y+6).toUpperCase();if(S!=="SYSTEM"&&S!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${S}"`);y+=S.length,y=J(p,y);let Q=null,b=null;if(S==="PUBLIC")[y,Q]=H(p,y,"publicIdentifier"),p[y=J(p,y)]!=='"'&&p[y]!=="'"||([y,b]=H(p,y,"systemIdentifier"));else if(S==="SYSTEM"&&([y,b]=H(p,y,"systemIdentifieLine truncated `||p==="\r"}function c(p,y){let B=y;for(;y<p.length;y++)if(!(p[y]!="?"&&p[y]!=" ")){let x=p.substr(B,y-B);if(y>5&&x==="xml")return C("InvalidXml","XML declaration allowed only at the start of the document.",b(p,y));if(p[y]=="?"&&p[y+1]==">"){y++;break}}return y}function l(p,y){if(p.length>y+5&&p[y+1]==="-"&&p[y+2]==="-"){for(y+=3;y<p.length;y++)if(p[y]==="-"&&p[y+1]==="-"&&p[y+2]===">"){y+=2;break}}else if(p.length>y+8&&p[y+1]==="D"&&p[y+2]==="O"&&p[y+3]==="C"&&p[y+4]==="T"&&p[y+5]==="Y"&&p[y+6]==="P"&&p[y+7]==="E"){let B=1;for(y+=8;y<p.length;y++)if(p[y]==="<")B++;else if(p[y]===">"&&(B--,B===0))break}else if(p.length>y+9&&p[y+1]==="["&&p[y+2]==="C"&&p[y+3]==="D"&&p[y+4]==="A"&&p[y+5]==="T"&&p[y+6]==="A"&&p[y+7]==="["){for(y+=8;y<p.length;y++)if(p[y]==="]"&&p[y+1]==="]"&&p[y+2]===">"){y+=2;break}}return y}let u='"',d="'";function f(p,y){let B="",x="",Q=!1;for(;y<p.length;y++){if(p[y]===u||p[y]===d)x===""?x=p[y]:x!==p[y]||(x="");else if(p[y]===">"&&x===""){Q=!0;break}B+=p[y]}return x===""&&{value:B,index:y,tagClosed:Q}}let g=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function m(p,y){let B=i(p,g),x={};for(let Q=0;Q<B.length;Q++){if(B[Q][1].length===0)return C("InvalidAttr","Attribute '"+B[Q][2]+"' has no space in starting.",w(B[Q]));if(B[Q][3]!==void 0&&B[Q][4]===void 0)return C("InvalidAttr","Attribute '"+B[Q][2]+"' is without value.",w(B[Q]));if(B[Q][3]===void 0&&!y.allowBooleanAttributes)return C("InvalidAttr","boolean attribute '"+B[Q][2]+"' is not allowed.",w(B[Q]));let N=B[Q][2];if(!I(N))return C("InvalidAttr","Attribute '"+N+"' is an invalid name.",w(B[Q]));if(x.hasOwnProperty(N))return C("InvalidAttr","Attribute '"+N+"' is repeated.",w(B[Q]));x[N]=1}return!0}function E(p,y){if(p[++y]===";")return-1;if(p[y]==="#")return(function(x,Q){let N=/\d/;for(x[Q]==="x"&&(Q++,N=/[\da-fA-F]/);Q<x.length;Q++){if(x[Q]===";")return Q;if(!x[Q].match(N))break}return-1})(p,++y);let B=0;for(;y<p.length;y++,B++)if(!(p[y].match(/\w/)&&B<20)){if(p[y]===";")break;return-1}return y}function C(p,y,B){return{err:{code:p,msg:y,line:B.line||B,col:B.col}}}function I(p){return s(p)}function b(p,y){let B=p.substring(0,y).split(/\r?\n/);return{line:B.length,col:B[B.length-1].length+1}}function w(p){return p.startIndex+p[1].length}let R={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(p,y){return y},attributeValueProcessor:function(p,y){return y},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(p,y,B){return p},captureMetaData:!1},T;T=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class U{constructor(y){this.tagname=y,this.child=[],this[":@"]={}}add(y,B){y==="__proto__"&&(y="#__proto__"),this.child.push({[y]:B})}addChild(y,B){y.tagname==="__proto__"&&(y.tagname="#__proto__"),y[":@"]&&Object.keys(y[":@"]).length>0?this.child.push({[y.tagname]:y.child,":@":y[":@"]}):this.child.push({[y.tagname]:y.child}),B!==void 0&&(this.child[this.child.length-1][T]={startIndex:B})}static getMetaDataSymbol(){return T}}function k(p,y){let B={};if(p[y+3]!=="O"||p[y+4]!=="C"||p[y+5]!=="T"||p[y+6]!=="Y"||p[y+7]!=="P"||p[y+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{y+=9;let x=1,Q=!1,N=!1,D="";for(;y<p.length;y++)if(p[y]!=="<"||N)if(p[y]===">"){if(N?p[y-1]==="-"&&p[y-2]==="-"&&(N=!1,x--):x--,x===0)break}else p[y]==="["?Q=!0:D+=p[y];else{if(Q&&tt(p,"!ENTITY",y)){let v,P;y+=7,[v,P,y]=Qe(p,y+1),P.indexOf("&")===-1&&(B[v]={regx:RegExp(`&${v};`,"g"),val:P})}else if(Q&&tt(p,"!ELEMENT",y)){y+=8;let{index:v}=Re(p,y+1);y=v}else if(Q&&tt(p,"!ATTLIST",y))y+=8;else if(Q&&tt(p,"!NOTATION",y)){y+=9;let{index:v}=Se(p,y+1);y=v}else{if(!tt(p,"!--",y))throw new Error("Invalid DOCTYPE");N=!0}x++,D=""}if(x!==0)throw new Error("Unclosed DOCTYPE")}return{entities:B,i:y}}let J=(p,y)=>{for(;y<p.length&&/\s/.test(p[y]);)y++;return y};function Qe(p,y){y=J(p,y);let B="";for(;y<p.length&&!/\s/.test(p[y])&&p[y]!=='"'&&p[y]!=="'";)B+=p[y],y++;if(Dr(B),y=J(p,y),p.substring(y,y+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(p[y]==="%")throw new Error("Parameter entities are not supported");let x="";return[y,x]=H(p,y,"entity"),[B,x,--y]}function Se(p,y){y=J(p,y);let B="";for(;y<p.length&&!/\s/.test(p[y]);)B+=p[y],y++;Dr(B),y=J(p,y);let x=p.substring(y,y+6).toUpperCase();if(x!=="SYSTEM"&&x!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${x}"`);y+=x.length,y=J(p,y);let Q=null,N=null;if(x==="PUBLIC")[y,Q]=H(p,y,"publicIdentifier"),p[y=J(p,y)]!=='"'&&p[y]!=="'"||([y,N]=H(p,y,"systemIdentifier"));else if(x==="SYSTEM"&&([y,N]=H(p,y,"systemIdentifieLine truncated
`);let y=new U("!xml"),B=y,S="",Q="";for(let b=0;b<p.length;b++)if(p[b]==="<")if(p[b+1]==="/"){let _=Fa(p,">",b,"Closing Tag is not closed."),R=p.substring(b+2,_).trim();if(this.options.removeNSPrefix){let Ee=R.indexOf(":");Ee!==-1&&(R=R.substr(Ee+1))}this.options.transformTagName&&(R=this.options.transformTagName(R)),B&&(S=this.saveTextToParentTag(S,B,Q));let P=Q.substring(Q.lastIndexOf(".")+1);if(R&&this.options.unpairedTags.indexOf(R)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${R}>`);let z=0;P&&this.options.unpairedTags.indexOf(P)!==-1?(z=Q.lastIndexOf(".",Q.lastIndexOf(".")-1),this.tagsNodeStack.pop()):z=Q.lastIndexOf("."),Q=Q.substring(0,z),B=this.tagsNodeStack.pop(),S="",b=_}else if(p[b+1]==="?"){let _=OQ(p,b,!1,"?>");if(!_)throw new Error("Pi Tag is not closed.");if(S=this.saveTextToParentTag(S,B,Q),!(this.options.ignoreDeclaration&&_.tagName==="?xml"||this.options.ignorePiTags)){let R=new U(_.tagName);R.add(this.options.textNodeName,""),_.tagName!==_.tagExp&&_.attrExpPresent&&(R[":@"]=this.buildAttributesMap(_.tagExp,Q,_.tagName)),this.addChild(B,R,Q,b)}b=_.closeIndex+1}else if(p.substr(b+1,3)==="!--"){let _=Fa(p,"-->",b+4,"Comment is not closed.");if(this.options.commentPropName){let R=p.substring(b+4,_-2);S=this.saveTextToParentTag(S,B,Q),B.add(this.options.commentPropName,[{[this.options.textNodeName]:R}])}b=_}else if(p.substr(b+1,2)==="!D"){let _=k(p,b);this.docTypeEntities=_.entities,b=_.i}else if(p.substr(b+1,2)==="!["){let _=Fa(p,"]]>",b,"CDATA is not closed.")-2,R=p.substring(b+9,_);S=this.saveTextToParentTag(S,B,Q);let P=this.parseTextData(R,B.tagname,Q,!0,!1,!0,!0);P==null&&(P=""),this.options.cdataPropName?B.add(this.options.cdataPropName,[{[this.options.textNodeName]:R}]):B.add(this.options.textNodeName,P),b=_+2}else{let _=OQ(p,b,this.options.removeNSPrefix),R=_.tagName,P=_.rawTagName,z=_.tagExp,Ee=_.attrExpPresent,ae=_.closeIndex;this.options.transformTagName&&(R=this.options.transformTagName(R)),B&&S&&B.tagname!=="!xml"&&(S=this.saveTextToParentTag(S,B,Q,!1));let Fe=B;Fe&&this.options.unpairedTags.indexOf(Fe.tagname)!==-1&&(B=this.tagsNodeStack.pop(),Q=Q.substring(0,Q.lastIndexOf("."))),R!==y.tagname&&(Q+=Q?"."+R:R);let nt=b;if(this.isItStopNode(this.options.stopNodes,Q,R)){let ze="";if(z.length>0&&z.lastIndexOf("/")===z.length-1)R[R.length-1]==="/"?(R=R.substr(0,R.length-1),Q=Q.substr(0,Q.length-1),z=R):z=z.substr(0,z.length-1),b=_.closeIndex;else if(this.options.unpairedTags.indexOf(R)!==-1)b=_.closeIndex;else{let is=this.readStopNodeData(p,P,ae+1);if(!is)throw new Error(`Unexpected end of ${P}`);b=is.i,ze=is.tagContent}let er=new U(R);R!==z&&Ee&&(er[":@"]=this.buildAttributesMap(z,Q,R)),ze&&(ze=this.parseTextData(ze,R,Q,!0,Ee,!0,!0)),Q=Q.substr(0,Q.lastIndexOf(".")),er.add(this.options.textNodeName,ze),this.addChild(B,er,Q,nt)}else{if(z.length>0&&z.lastIndexOf("/")===z.length-1){R[R.length-1]==="/"?(R=R.substr(0,R.length-1),Q=Q.substr(0,Q.length-1),z=R):z=z.substr(0,z.length-1),this.options.transformTagName&&(R=this.options.transformTagName(R));let ze=new U(R);R!==z&&Ee&&(ze[":@"]=this.buildAttributesMap(z,Q,R)),this.addChild(B,ze,Q,nt),Q=Q.substr(0,Q.lastIndexOf("."))}else{let ze=new U(R);this.tagsNodeStack.push(B),R!==z&&Ee&&(ze[":@"]=this.buildAttributesMap(z,Q,R)),this.addChild(B,ze,Q,nt),B=ze}S="",b=ae}}else S+=p[b];return y.child};function pX(p,y,B,S){this.options.captureMetaData||(S=void 0);let Q=this.options.updateTag(y.tagname,B,y[":@"]);Q===!1||(typeof Q=="string"&&(y.tagname=Q),p.addChild(y,S))}let yX=function(p){if(this.options.processEntities){for(let y in this.docTypeEntities){let B=this.docTypeEntities[y];p=p.replace(B.regx,B.val)}for(let y in this.lastEntities){let B=this.lastEntities[y];p=p.replace(B.regex,B.val)}if(this.options.htmlEntities)for(let y in this.htmlEntities){let B=this.htmlEntities[y];p=p.replace(B.regex,B.val)}p=p.replace(this.ampEntity.regex,this.ampEntity.val)}return p};function EX(p,y,B,S){return p&&(S===void 0&&(S=y.child.length===0),(p=this.parseTextData(p,y.tagname,B,!1,!!y[":@"]&&Object.keys(y[":@"]).length!==0,S))!==void 0&&p!==""&&y.add(this.options.textNodeName,p),p=""),p}function CX(p,y,B){let S="*."+B;for(let Q in p){let b=p[Q];if(S===b||y===b)return!0}return!1}function Fa(p,y,B,S){let Q=p.indexOf(y,B);if(Q===-1)throw new Error(S);return Q+y.length-1}function OQ(p,y,B,S=">"){let Q=(function(ae,Fe,nt=">"){let ze,er="";for(let is=Fe;is<ae.length;is++){let _o=ae[is];if(ze)_o===ze&&(ze="");else if(_o==='"'||_o==="'")ze=_o;else if(_o===nt[0]){if(!nt[1])return{data:er,index:is};if(ae[is+1]===nt[1])return{data:er,index:is}}else _o===" "&&(_o=" ");er+=_o}})(p,y+1,S);if(!Q)return;let b=Q.data,_=Q.index,R=b.search(/\s/),P=b,z=!0;R!==-1&&(P=b.substring(0,R),b=b.substring(R+1).trimStart());let Ee=P;if(B){let ae=P.indexOf(":");ae!==-1&&(P=P.substr(ae+1),z=P!==Q.data.substr(ae+1))}return{tagName:P,tagExp:b,closeIndex:_,attrExpPresent:z,rawTagName:Ee}}function IX(p,y,B){let S=B,Q=1;for(;B<p.length;B++)if(p[B]==="<")if(p[B+1]=Line truncated `);let y=new U("!xml"),B=y,x="",Q="";for(let N=0;N<p.length;N++)if(p[N]==="<")if(p[N+1]==="/"){let D=Ca(p,">",N,"Closing Tag is not closed."),v=p.substring(N+2,D).trim();if(this.options.removeNSPrefix){let ye=v.indexOf(":");ye!==-1&&(v=v.substr(ye+1))}this.options.transformTagName&&(v=this.options.transformTagName(v)),B&&(x=this.saveTextToParentTag(x,B,Q));let P=Q.substring(Q.lastIndexOf(".")+1);if(v&&this.options.unpairedTags.indexOf(v)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${v}>`);let j=0;P&&this.options.unpairedTags.indexOf(P)!==-1?(j=Q.lastIndexOf(".",Q.lastIndexOf(".")-1),this.tagsNodeStack.pop()):j=Q.lastIndexOf("."),Q=Q.substring(0,j),B=this.tagsNodeStack.pop(),x="",N=D}else if(p[N+1]==="?"){let D=mB(p,N,!1,"?>");if(!D)throw new Error("Pi Tag is not closed.");if(x=this.saveTextToParentTag(x,B,Q),!(this.options.ignoreDeclaration&&D.tagName==="?xml"||this.options.ignorePiTags)){let v=new U(D.tagName);v.add(this.options.textNodeName,""),D.tagName!==D.tagExp&&D.attrExpPresent&&(v[":@"]=this.buildAttributesMap(D.tagExp,Q,D.tagName)),this.addChild(B,v,Q,N)}N=D.closeIndex+1}else if(p.substr(N+1,3)==="!--"){let D=Ca(p,"-->",N+4,"Comment is not closed.");if(this.options.commentPropName){let v=p.substring(N+4,D-2);x=this.saveTextToParentTag(x,B,Q),B.add(this.options.commentPropName,[{[this.options.textNodeName]:v}])}N=D}else if(p.substr(N+1,2)==="!D"){let D=k(p,N);this.docTypeEntities=D.entities,N=D.i}else if(p.substr(N+1,2)==="!["){let D=Ca(p,"]]>",N,"CDATA is not closed.")-2,v=p.substring(N+9,D);x=this.saveTextToParentTag(x,B,Q);let P=this.parseTextData(v,B.tagname,Q,!0,!1,!0,!0);P==null&&(P=""),this.options.cdataPropName?B.add(this.options.cdataPropName,[{[this.options.textNodeName]:v}]):B.add(this.options.textNodeName,P),N=D+2}else{let D=mB(p,N,this.options.removeNSPrefix),v=D.tagName,P=D.rawTagName,j=D.tagExp,ye=D.attrExpPresent,ae=D.closeIndex;this.options.transformTagName&&(v=this.options.transformTagName(v)),B&&x&&B.tagname!=="!xml"&&(x=this.saveTextToParentTag(x,B,Q,!1));let Le=B;Le&&this.options.unpairedTags.indexOf(Le.tagname)!==-1&&(B=this.tagsNodeStack.pop(),Q=Q.substring(0,Q.lastIndexOf("."))),v!==y.tagname&&(Q+=Q?"."+v:v);let rt=N;if(this.isItStopNode(this.options.stopNodes,Q,v)){let ze="";if(j.length>0&&j.lastIndexOf("/")===j.length-1)v[v.length-1]==="/"?(v=v.substr(0,v.length-1),Q=Q.substr(0,Q.length-1),j=v):j=j.substr(0,j.length-1),N=D.closeIndex;else if(this.options.unpairedTags.indexOf(v)!==-1)N=D.closeIndex;else{let ji=this.readStopNodeData(p,P,ae+1);if(!ji)throw new Error(`Unexpected end of ${P}`);N=ji.i,ze=ji.tagContent}let Wt=new U(v);v!==j&&ye&&(Wt[":@"]=this.buildAttributesMap(j,Q,v)),ze&&(ze=this.parseTextData(ze,v,Q,!0,ye,!0,!0)),Q=Q.substr(0,Q.lastIndexOf(".")),Wt.add(this.options.textNodeName,ze),this.addChild(B,Wt,Q,rt)}else{if(j.length>0&&j.lastIndexOf("/")===j.length-1){v[v.length-1]==="/"?(v=v.substr(0,v.length-1),Q=Q.substr(0,Q.length-1),j=v):j=j.substr(0,j.length-1),this.options.transformTagName&&(v=this.options.transformTagName(v));let ze=new U(v);v!==j&&ye&&(ze[":@"]=this.buildAttributesMap(j,Q,v)),this.addChild(B,ze,Q,rt),Q=Q.substr(0,Q.lastIndexOf("."))}else{let ze=new U(v);this.tagsNodeStack.push(B),v!==j&&ye&&(ze[":@"]=this.buildAttributesMap(j,Q,v)),this.addChild(B,ze,Q,rt),B=ze}x="",N=ae}}else x+=p[N];return y.child};function sK(p,y,B,x){this.options.captureMetaData||(x=void 0);let Q=this.options.updateTag(y.tagname,B,y[":@"]);Q===!1||(typeof Q=="string"&&(y.tagname=Q),p.addChild(y,x))}let oK=function(p){if(this.options.processEntities){for(let y in this.docTypeEntities){let B=this.docTypeEntities[y];p=p.replace(B.regx,B.val)}for(let y in this.lastEntities){let B=this.lastEntities[y];p=p.replace(B.regex,B.val)}if(this.options.htmlEntities)for(let y in this.htmlEntities){let B=this.htmlEntities[y];p=p.replace(B.regex,B.val)}p=p.replace(this.ampEntity.regex,this.ampEntity.val)}return p};function aK(p,y,B,x){return p&&(x===void 0&&(x=y.child.length===0),(p=this.parseTextData(p,y.tagname,B,!1,!!y[":@"]&&Object.keys(y[":@"]).length!==0,x))!==void 0&&p!==""&&y.add(this.options.textNodeName,p),p=""),p}function AK(p,y,B){let x="*."+B;for(let Q in p){let N=p[Q];if(x===N||y===N)return!0}return!1}function Ca(p,y,B,x){let Q=p.indexOf(y,B);if(Q===-1)throw new Error(x);return Q+y.length-1}function mB(p,y,B,x=">"){let Q=(function(ae,Le,rt=">"){let ze,Wt="";for(let ji=Le;ji<ae.length;ji++){let ho=ae[ji];if(ze)ho===ze&&(ze="");else if(ho==='"'||ho==="'")ze=ho;else if(ho===rt[0]){if(!rt[1])return{data:Wt,index:ji};if(ae[ji+1]===rt[1])return{data:Wt,index:ji}}else ho===" "&&(ho=" ");Wt+=ho}})(p,y+1,x);if(!Q)return;let N=Q.data,D=Q.index,v=N.search(/\s/),P=N,j=!0;v!==-1&&(P=N.substring(0,v),N=N.substring(v+1).trimStart());let ye=P;if(B){let ae=P.indexOf(":");ae!==-1&&(P=P.substr(ae+1),j=P!==Q.data.substr(ae+1))}return{tagName:P,tagExp:N,closeIndex:D,attrExpPresent:j,rawTagName:ye}}function cK(p,y,B){let x=B,Q=1;for(;B<p.length;B++)if(p[B]==="<")if(p[B+1]=Line truncated
`),bP(p,y,"",B)}function bP(p,y,B,S){let Q="",b=!1;for(let _=0;_<p.length;_++){let R=p[_],P=xX(R);if(P===void 0)continue;let z="";if(z=B.length===0?P:`${B}.${P}`,P===y.textNodeName){let nt=R[P];RX(z,y)||(nt=y.tagValueProcessor(P,nt),nt=wP(nt,y)),b&&(Q+=S),Q+=nt,b=!1;continue}if(P===y.cdataPropName){b&&(Q+=S),Q+=`<![CDATA[${R[P][0][y.textNodeName]}]]>`,b=!1;continue}if(P===y.commentPropName){Q+=S+`<!--${R[P][0][y.textNodeName]}-->`,b=!0;continue}if(P[0]==="?"){let nt=NP(R[":@"],y),ze=P==="?xml"?"":S,er=R[P][0][y.textNodeName];er=er.length!==0?" "+er:"",Q+=ze+`<${P}${er}${nt}?>`,b=!0;continue}let Ee=S;Ee!==""&&(Ee+=y.indentBy);let ae=S+`<${P}${NP(R[":@"],y)}`,Fe=bP(R[P],y,z,Ee);y.unpairedTags.indexOf(P)!==-1?y.suppressUnpairedNode?Q+=ae+">":Q+=ae+"/>":Fe&&Fe.length!==0||!y.suppressEmptyNode?Fe&&Fe.endsWith(">")?Q+=ae+`>${Fe}${S}</${P}>`:(Q+=ae+">",Fe&&S!==""&&(Fe.includes("/>")||Fe.includes("</"))?Q+=S+y.indentBy+Fe+S:Q+=Fe,Q+=`</${P}>`):Q+=ae+"/>",b=!0}return Q}function xX(p){let y=Object.keys(p);for(let B=0;B<y.length;B++){let S=y[B];if(p.hasOwnProperty(S)&&S!==":@")return S}}function NP(p,y){let B="";if(p&&!y.ignoreAttributes)for(let S in p){if(!p.hasOwnProperty(S))continue;let Q=y.attributeValueProcessor(S,p[S]);Q=wP(Q,y),Q===!0&&y.suppressBooleanAttributes?B+=` ${S.substr(y.attributeNamePrefix.length)}`:B+=` ${S.substr(y.attributeNamePrefix.length)}="${Q}"`}return B}function RX(p,y){let B=(p=p.substr(0,p.length-y.textNodeName.length-1)).substr(p.lastIndexOf(".")+1);for(let S in y.stopNodes)if(y.stopNodes[S]===p||y.stopNodes[S]==="*."+B)return!0;return!1}function wP(p,y){if(p&&p.length>0&&y.processEntities)for(let B=0;B<y.entities.length;B++){let S=y.entities[B];p=p.replace(S.regex,S.val)}return p}let vX={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(p,y){return y},attributeValueProcessor:function(p,y){return y},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function vo(p){this.options=Object.assign({},vX,p),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Li(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=kX),this.processTextOrObjNode=_X,this.options.format?(this.indentate=DX,this.tagEndChar=`> `),U_(p,y,"",B)}function U_(p,y,B,x){let Q="",N=!1;for(let D=0;D<p.length;D++){let v=p[D],P=mK(v);if(P===void 0)continue;let j="";if(j=B.length===0?P:`${B}.${P}`,P===y.textNodeName){let rt=v[P];pK(j,y)||(rt=y.tagValueProcessor(P,rt),rt=H_(rt,y)),N&&(Q+=x),Q+=rt,N=!1;continue}if(P===y.cdataPropName){N&&(Q+=x),Q+=`<![CDATA[${v[P][0][y.textNodeName]}]]>`,N=!1;continue}if(P===y.commentPropName){Q+=x+`<!--${v[P][0][y.textNodeName]}-->`,N=!0;continue}if(P[0]==="?"){let rt=q_(v[":@"],y),ze=P==="?xml"?"":x,Wt=v[P][0][y.textNodeName];Wt=Wt.length!==0?" "+Wt:"",Q+=ze+`<${P}${Wt}${rt}?>`,N=!0;continue}let ye=x;ye!==""&&(ye+=y.indentBy);let ae=x+`<${P}${q_(v[":@"],y)}`,Le=U_(v[P],y,j,ye);y.unpairedTags.indexOf(P)!==-1?y.suppressUnpairedNode?Q+=ae+">":Q+=ae+"/>":Le&&Le.length!==0||!y.suppressEmptyNode?Le&&Le.endsWith(">")?Q+=ae+`>${Le}${x}</${P}>`:(Q+=ae+">",Le&&x!==""&&(Le.includes("/>")||Le.includes("</"))?Q+=x+y.indentBy+Le+x:Q+=Le,Q+=`</${P}>`):Q+=ae+"/>",N=!0}return Q}function mK(p){let y=Object.keys(p);for(let B=0;B<y.length;B++){let x=y[B];if(p.hasOwnProperty(x)&&x!==":@")return x}}function q_(p,y){let B="";if(p&&!y.ignoreAttributes)for(let x in p){if(!p.hasOwnProperty(x))continue;let Q=y.attributeValueProcessor(x,p[x]);Q=H_(Q,y),Q===!0&&y.suppressBooleanAttributes?B+=` ${x.substr(y.attributeNamePrefix.length)}`:B+=` ${x.substr(y.attributeNamePrefix.length)}="${Q}"`}return B}function pK(p,y){let B=(p=p.substr(0,p.length-y.textNodeName.length-1)).substr(p.lastIndexOf(".")+1);for(let x in y.stopNodes)if(y.stopNodes[x]===p||y.stopNodes[x]==="*."+B)return!0;return!1}function H_(p,y){if(p&&p.length>0&&y.processEntities)for(let B=0;B<y.entities.length;B++){let x=y.entities[B];p=p.replace(x.regex,x.val)}return p}let yK={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(p,y){return y},attributeValueProcessor:function(p,y){return y},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function fo(p){this.options=Object.assign({},yK,p),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=wi(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=IK),this.processTextOrObjNode=EK,this.options.format?(this.indentate=CK,this.tagEndChar=`>
`,this.newLine=` `,this.newLine=`
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function _X(p,y,B,S){let Q=this.j2x(p,B+1,S.concat(y));return p[this.options.textNodeName]!==void 0&&Object.keys(p).length===1?this.buildTextValNode(p[this.options.textNodeName],y,Q.attrStr,B):this.buildObjectNode(Q.val,y,Q.attrStr,B)}function DX(p){return this.options.indentBy.repeat(p)}function kX(p){return!(!p.startsWith(this.options.attributeNamePrefix)||p===this.options.textNodeName)&&p.substr(this.attrPrefixLen)}vo.prototype.build=function(p){return this.options.preserveOrder?SX(p,this.options):(Array.isArray(p)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(p={[this.options.arrayNodeName]:p}),this.j2x(p,0,[]).val)},vo.prototype.j2x=function(p,y,B){let S="",Q="",b=B.join(".");for(let _ in p)if(Object.prototype.hasOwnProperty.call(p,_))if(p[_]===void 0)this.isAttribute(_)&&(Q+="");else if(p[_]===null)this.isAttribute(_)||_===this.options.cdataPropName?Q+="":_[0]==="?"?Q+=this.indentate(y)+"<"+_+"?"+this.tagEndChar:Q+=this.indentate(y)+"<"+_+"/"+this.tagEndChar;else if(p[_]instanceof Date)Q+=this.buildTextValNode(p[_],_,"",y);else if(typeof p[_]!="object"){let R=this.isAttribute(_);if(R&&!this.ignoreAttributesFn(R,b))S+=this.buildAttrPairStr(R,""+p[_]);else if(!R)if(_===this.options.textNodeName){let P=this.options.tagValueProcessor(_,""+p[_]);Q+=this.replaceEntitiesValue(P)}else Q+=this.buildTextValNode(p[_],_,"",y)}else if(Array.isArray(p[_])){let R=p[_].length,P="",z="";for(let Ee=0;Ee<R;Ee++){let ae=p[_][Ee];if(ae!==void 0)if(ae===null)_[0]==="?"?Q+=this.indentate(y)+"<"+_+"?"+this.tagEndChar:Q+=this.indentate(y)+"<"+_+"/"+this.tagEndChar;else if(typeof ae=="object")if(this.options.oneListGroup){let Fe=this.j2x(ae,y+1,B.concat(_));P+=Fe.val,this.options.attributesGroupName&&ae.hasOwnProperty(this.options.attributesGroupName)&&(z+=Fe.attrStr)}else P+=this.processTextOrObjNode(ae,_,y,B);else if(this.options.oneListGroup){let Fe=this.options.tagValueProcessor(_,ae);Fe=this.replaceEntitiesValue(Fe),P+=Fe}else P+=this.buildTextValNode(ae,_,"",y)}this.options.oneListGroup&&(P=this.buildObjectNode(P,_,z,y)),Q+=P}else if(this.options.attributesGroupName&&_===this.options.attributesGroupName){let R=Object.keys(p[_]),P=R.length;for(let z=0;z<P;z++)S+=this.buildAttrPairStr(R[z],""+p[_][R[z]])}else Q+=this.processTextOrObjNode(p[_],_,y,B);return{attrStr:S,val:Q}},vo.prototype.buildAttrPairStr=function(p,y){return y=this.options.attributeValueProcessor(p,""+y),y=this.replaceEntitiesValue(y),this.options.suppressBooleanAttributes&&y==="true"?" "+p:" "+p+'="'+y+'"'},vo.prototype.buildObjectNode=function(p,y,B,S){if(p==="")return y[0]==="?"?this.indentate(S)+"<"+y+B+"?"+this.tagEndChar:this.indentate(S)+"<"+y+B+this.closeTag(y)+this.tagEndChar;{let Q="</"+y+this.tagEndChar,b="";return y[0]==="?"&&(b="?",Q=""),!B&&B!==""||p.indexOf("<")!==-1?this.options.commentPropName!==!1&&y===this.options.commentPropName&&b.length===0?this.indentate(S)+`<!--${p}-->`+this.newLine:this.indentate(S)+"<"+y+B+b+this.tagEndChar+p+this.indentate(S)+Q:this.indentate(S)+"<"+y+B+b+">"+p+Q}},vo.prototype.closeTag=function(p){let y="";return this.options.unpairedTags.indexOf(p)!==-1?this.options.suppressUnpairedNode||(y="/"):y=this.options.suppressEmptyNode?"/":`></${p}`,y},vo.prototype.buildTextValNode=function(p,y,B,S){if(this.options.cdataPropName!==!1&&y===this.options.cdataPropName)return this.indentate(S)+`<![CDATA[${p}]]>`+this.newLine;if(this.options.commentPropName!==!1&&y===this.options.commentPropName)return this.indentate(S)+`<!--${p}-->`+this.newLine;if(y[0]==="?")return this.indentate(S)+"<"+y+B+"?"+this.tagEndChar;{let Q=this.options.tagValueProcessor(y,p);return Q=this.replaceEntitiesValue(Q),Q===""?this.indentate(S)+"<"+y+B+this.closeTag(y)+this.tagEndChar:this.indentate(S)+"<"+y+B+">"+Q+"</"+y+this.tagEndChar}},vo.prototype.replaceEntitiesValue=function(p){if(p&&p.length>0&&this.options.processEntities)for(let y=0;y<this.options.entities.length;y++){let B=this.options.entities[y];p=p.replace(B.regex,B.val)}return p};let PX={validate:a};GG.exports=e})()});var uR=h(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.XML_CHARKEY=au.XML_ATTRKEY=void 0;au.XML_ATTRKEY="$";au.XML_CHARKEY="_"});var WG=h(oC=>{"use strict";Object.defineProperty(oC,"__esModule",{value:!0});oC.stringifyXML=lCe;oC.parseXML=uCe;var dR=YG(),JG=uR();function VG(t){var e;return{attributesGroupName:JG.XML_ATTRKEY,textNodeName:(e=t.xmlCharKey)!==null&&e!==void 0?e:JG.XML_CHARKEY,ignoreAttributes:!1,suppressBooleanAttributes:!1}}function ACe(t={}){var e,r;return Object.assign(Object.assign({},VG(t)),{attributeNamePrefix:"@_",format:!0,suppressEmptyNode:!0,indentBy:"",rootNodeName:(e=t.rootName)!==null&&e!==void 0?e:"root",cdataPropName:(r=t.cdataPropName)!==null&&r!==void 0?r:"__cdata"})}function cCe(t={}){return Object.assign(Object.assign({},VG(t)),{parseAttributeValue:!1,parseTagValue:!1,attributeNamePrefix:"",stopNodes:t.stopNodes,processEnLine truncated `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function EK(p,y,B,x){let Q=this.j2x(p,B+1,x.concat(y));return p[this.options.textNodeName]!==void 0&&Object.keys(p).length===1?this.buildTextValNode(p[this.options.textNodeName],y,Q.attrStr,B):this.buildObjectNode(Q.val,y,Q.attrStr,B)}function CK(p){return this.options.indentBy.repeat(p)}function IK(p){return!(!p.startsWith(this.options.attributeNamePrefix)||p===this.options.textNodeName)&&p.substr(this.attrPrefixLen)}fo.prototype.build=function(p){return this.options.preserveOrder?gK(p,this.options):(Array.isArray(p)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(p={[this.options.arrayNodeName]:p}),this.j2x(p,0,[]).val)},fo.prototype.j2x=function(p,y,B){let x="",Q="",N=B.join(".");for(let D in p)if(Object.prototype.hasOwnProperty.call(p,D))if(p[D]===void 0)this.isAttribute(D)&&(Q+="");else if(p[D]===null)this.isAttribute(D)||D===this.options.cdataPropName?Q+="":D[0]==="?"?Q+=this.indentate(y)+"<"+D+"?"+this.tagEndChar:Q+=this.indentate(y)+"<"+D+"/"+this.tagEndChar;else if(p[D]instanceof Date)Q+=this.buildTextValNode(p[D],D,"",y);else if(typeof p[D]!="object"){let v=this.isAttribute(D);if(v&&!this.ignoreAttributesFn(v,N))x+=this.buildAttrPairStr(v,""+p[D]);else if(!v)if(D===this.options.textNodeName){let P=this.options.tagValueProcessor(D,""+p[D]);Q+=this.replaceEntitiesValue(P)}else Q+=this.buildTextValNode(p[D],D,"",y)}else if(Array.isArray(p[D])){let v=p[D].length,P="",j="";for(let ye=0;ye<v;ye++){let ae=p[D][ye];if(ae!==void 0)if(ae===null)D[0]==="?"?Q+=this.indentate(y)+"<"+D+"?"+this.tagEndChar:Q+=this.indentate(y)+"<"+D+"/"+this.tagEndChar;else if(typeof ae=="object")if(this.options.oneListGroup){let Le=this.j2x(ae,y+1,B.concat(D));P+=Le.val,this.options.attributesGroupName&&ae.hasOwnProperty(this.options.attributesGroupName)&&(j+=Le.attrStr)}else P+=this.processTextOrObjNode(ae,D,y,B);else if(this.options.oneListGroup){let Le=this.options.tagValueProcessor(D,ae);Le=this.replaceEntitiesValue(Le),P+=Le}else P+=this.buildTextValNode(ae,D,"",y)}this.options.oneListGroup&&(P=this.buildObjectNode(P,D,j,y)),Q+=P}else if(this.options.attributesGroupName&&D===this.options.attributesGroupName){let v=Object.keys(p[D]),P=v.length;for(let j=0;j<P;j++)x+=this.buildAttrPairStr(v[j],""+p[D][v[j]])}else Q+=this.processTextOrObjNode(p[D],D,y,B);return{attrStr:x,val:Q}},fo.prototype.buildAttrPairStr=function(p,y){return y=this.options.attributeValueProcessor(p,""+y),y=this.replaceEntitiesValue(y),this.options.suppressBooleanAttributes&&y==="true"?" "+p:" "+p+'="'+y+'"'},fo.prototype.buildObjectNode=function(p,y,B,x){if(p==="")return y[0]==="?"?this.indentate(x)+"<"+y+B+"?"+this.tagEndChar:this.indentate(x)+"<"+y+B+this.closeTag(y)+this.tagEndChar;{let Q="</"+y+this.tagEndChar,N="";return y[0]==="?"&&(N="?",Q=""),!B&&B!==""||p.indexOf("<")!==-1?this.options.commentPropName!==!1&&y===this.options.commentPropName&&N.length===0?this.indentate(x)+`<!--${p}-->`+this.newLine:this.indentate(x)+"<"+y+B+N+this.tagEndChar+p+this.indentate(x)+Q:this.indentate(x)+"<"+y+B+N+">"+p+Q}},fo.prototype.closeTag=function(p){let y="";return this.options.unpairedTags.indexOf(p)!==-1?this.options.suppressUnpairedNode||(y="/"):y=this.options.suppressEmptyNode?"/":`></${p}`,y},fo.prototype.buildTextValNode=function(p,y,B,x){if(this.options.cdataPropName!==!1&&y===this.options.cdataPropName)return this.indentate(x)+`<![CDATA[${p}]]>`+this.newLine;if(this.options.commentPropName!==!1&&y===this.options.commentPropName)return this.indentate(x)+`<!--${p}-->`+this.newLine;if(y[0]==="?")return this.indentate(x)+"<"+y+B+"?"+this.tagEndChar;{let Q=this.options.tagValueProcessor(y,p);return Q=this.replaceEntitiesValue(Q),Q===""?this.indentate(x)+"<"+y+B+this.closeTag(y)+this.tagEndChar:this.indentate(x)+"<"+y+B+">"+Q+"</"+y+this.tagEndChar}},fo.prototype.replaceEntitiesValue=function(p){if(p&&p.length>0&&this.options.processEntities)for(let y=0;y<this.options.entities.length;y++){let B=this.options.entities[y];p=p.replace(B.regex,B.val)}return p};let BK={validate:a};aj.exports=e})()});var Gx=h(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.XML_CHARKEY=Hl.XML_ATTRKEY=void 0;Hl.XML_ATTRKEY="$";Hl.XML_CHARKEY="_"});var uj=h(yE=>{"use strict";Object.defineProperty(yE,"__esModule",{value:!0});yE.stringifyXML=Xpe;yE.parseXML=Zpe;var Yx=Aj(),cj=Gx();function lj(t){var e;return{attributesGroupName:cj.XML_ATTRKEY,textNodeName:(e=t.xmlCharKey)!==null&&e!==void 0?e:cj.XML_CHARKEY,ignoreAttributes:!1,suppressBooleanAttributes:!1}}function $pe(t={}){var e,r;return Object.assign(Object.assign({},lj(t)),{attributeNamePrefix:"@_",format:!0,suppressEmptyNode:!0,indentBy:"",rootNodeName:(e=t.rootName)!==null&&e!==void 0?e:"root",cdataPropName:(r=t.cdataPropName)!==null&&r!==void 0?r:"__cdata"})}function Kpe(t={}){return Object.assign(Object.assign({},lj(t)),{parseAttributeValue:!1,parseTagValue:!1,attributeNamePrefix:"",stopNodes:t.stopNodes,processEnLine truncated
Polling from: ${r.config.operationLocation} Polling from: ${r.config.operationLocation}
Operation status: ${l} Operation status: ${l}
Polling status: ${eY.terminalStates.includes(l)?"Stopped":"Running"}`),l==="succeeded"){let u=o(c,r);if(u!==void 0)return{response:await e(u).catch(ZG({state:r,stateProxy:n,isOperationError:a})),status:l}}return{response:c,status:l}}async function ECe(t){let{poll:e,state:r,stateProxy:n,options:i,getOperationStatus:s,getResourceLocation:o,getOperationLocation:a,isOperationError:A,withOperationLocation:c,getPollingInterval:l,processResult:u,getError:d,updateState:f,setDelay:g,isDone:m,setErrorAsResult:E}=t,{operationLocation:C}=r.config;if(C!==void 0){let{response:I,status:N}=await yCe({poll:e,getOperationStatus:s,state:r,stateProxy:n,operationLocation:C,getResourceLocation:o,isOperationError:A,options:i});if(tY({status:N,response:I,state:r,stateProxy:n,isDone:m,processResult:u,getError:d,setErrorAsResult:E}),!eY.terminalStates.includes(N)){let w=l?.(I);w&&g(w);let v=a?.(I,r);if(v!==void 0){let T=C!==v;r.config.operationLocation=v,c?.(v,T)}else c?.(C,!1)}f?.(r,I)}}na.pollOperation=ECe});var pR=h(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.pollHttpOperation=Ft.isOperationError=Ft.getResourceLocation=Ft.getOperationStatus=Ft.getOperationLocation=Ft.initHttpOperation=Ft.getStatusFromInitialResponse=Ft.getErrorFromResponse=Ft.parseRetryAfter=Ft.inferLroMode=void 0;var rY=lC(),hR=AC();function nY(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}function iY(t){return t.headers.location}function sY(t){return t.headers["operation-location"]}function oY(t){return t.headers["azure-asyncoperation"]}function CCe(t){var e;let{location:r,requestMethod:n,requestPath:i,resourceLocationConfig:s}=t;switch(n){case"PUT":return i;case"DELETE":return;case"PATCH":return(e=o())!==null&&e!==void 0?e:i;default:return o()}function o(){switch(s){case"azure-async-operation":return;case"original-uri":return i;default:return r}}}function aY(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:i}=t,s=sY(e),o=oY(e),a=nY({operationLocation:s,azureAsyncOperation:o}),A=iY(e),c=r?.toLocaleUpperCase();return a!==void 0?{mode:"OperationLocation",operationLocation:a,resourceLocation:CCe({requestMethod:c,location:A,requestPath:n,resourceLocationConfig:i})}:A!==void 0?{mode:"ResourceLocation",operationLocation:A}:c==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}Ft.inferLroMode=aY;function AY(t){let{status:e,statusCode:r}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return gR(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return hR.logger.verbose(`LRO: unrecognized operation status: ${e}`),e}}function ICe(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return AY({status:r,statusCode:t.statusCode})}function BCe(t){var e,r;let{properties:n,provisioningState:i}=(e=t.body)!==null&&e!==void 0?e:{},s=(r=n?.provisioningState)!==null&&r!==void 0?r:i;return AY({status:s,statusCode:t.statusCode})}function gR(t){return t===202?"running":t<300?"succeeded":"failed"}function cY({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?QCe(new Date(e)):r*1e3}}Ft.parseRetryAfter=cY;function lY(t){let e=fY(t,"error");if(!e){hR.logger.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){hR.logger.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}Ft.getErrorFromResponse=lY;function QCe(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}function uY(t){let{response:e,state:r,operationLocation:n}=t;function i(){var o;switch((o=r.config.metadata)===null||o===void 0?void 0:o.mode){case void 0:return gR(e.rawResponse.statusCode);case"Body":return mR(e,r);default:return"running"}}let s=i();return s==="running"&&n===void 0?"succeeded":s}Ft.getStatusFromInitialResponse=uY;async function bCe(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:i,setErrorAsResult:s}=t;return(0,rY.initOperation)({init:async()=>{let o=await i.sendInitialRequest(),a=aY({rawResponse:o.rawResponse,requestPath:i.requestPath,requestMethod:i.requestMethod,resourceLocationConfig:r});return Object.assign({response:o,operationLocation:a?.operationLocation,resourceLocation:a?.resourceLocation},a?.mode?{metadata:{mode:a.mode}}:{})},stateProxy:e,processResult:n?({flatResponse:o},a)=>n(o,a):({flatResponse:o})=>o,getOperationStatus:uY,setErrorAsResult:s})}Ft.initHttpOperation=bCe;function dY({rawResponse:t},e){var r;switch((r=e.config.metadata)===null||r=Line truncated Polling status: ${mj.terminalStates.includes(l)?"Stopped":"Running"}`),l==="succeeded"){let u=o(c,r);if(u!==void 0)return{response:await e(u).catch(gj({state:r,stateProxy:n,isOperationError:a})),status:l}}return{response:c,status:l}}async function aye(t){let{poll:e,state:r,stateProxy:n,options:i,getOperationStatus:s,getResourceLocation:o,getOperationLocation:a,isOperationError:A,withOperationLocation:c,getPollingInterval:l,processResult:u,getError:d,updateState:f,setDelay:g,isDone:m,setErrorAsResult:E}=t,{operationLocation:C}=r.config;if(C!==void 0){let{response:I,status:b}=await oye({poll:e,getOperationStatus:s,state:r,stateProxy:n,operationLocation:C,getResourceLocation:o,isOperationError:A,options:i});if(pj({status:b,response:I,state:r,stateProxy:n,isDone:m,processResult:u,getError:d,setErrorAsResult:E}),!mj.terminalStates.includes(b)){let w=l?.(I);w&&g(w);let R=a?.(I,r);if(R!==void 0){let T=C!==R;r.config.operationLocation=R,c?.(R,T)}else c?.(C,!1)}f?.(r,I)}}Uo.pollOperation=aye});var Kx=h(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.pollHttpOperation=Tt.isOperationError=Tt.getResourceLocation=Tt.getOperationStatus=Tt.getOperationLocation=Tt.initHttpOperation=Tt.getStatusFromInitialResponse=Tt.getErrorFromResponse=Tt.parseRetryAfter=Tt.inferLroMode=void 0;var yj=BE(),Vx=CE();function Ej(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}function Cj(t){return t.headers.location}function Ij(t){return t.headers["operation-location"]}function Bj(t){return t.headers["azure-asyncoperation"]}function Aye(t){var e;let{location:r,requestMethod:n,requestPath:i,resourceLocationConfig:s}=t;switch(n){case"PUT":return i;case"DELETE":return;case"PATCH":return(e=o())!==null&&e!==void 0?e:i;default:return o()}function o(){switch(s){case"azure-async-operation":return;case"original-uri":return i;default:return r}}}function Qj(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:i}=t,s=Ij(e),o=Bj(e),a=Ej({operationLocation:s,azureAsyncOperation:o}),A=Cj(e),c=r?.toLocaleUpperCase();return a!==void 0?{mode:"OperationLocation",operationLocation:a,resourceLocation:Aye({requestMethod:c,location:A,requestPath:n,resourceLocationConfig:i})}:A!==void 0?{mode:"ResourceLocation",operationLocation:A}:c==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}Tt.inferLroMode=Qj;function bj(t){let{status:e,statusCode:r}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return Wx(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return Vx.logger.verbose(`LRO: unrecognized operation status: ${e}`),e}}function cye(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return bj({status:r,statusCode:t.statusCode})}function lye(t){var e,r;let{properties:n,provisioningState:i}=(e=t.body)!==null&&e!==void 0?e:{},s=(r=n?.provisioningState)!==null&&r!==void 0?r:i;return bj({status:s,statusCode:t.statusCode})}function Wx(t){return t===202?"running":t<300?"succeeded":"failed"}function Nj({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?uye(new Date(e)):r*1e3}}Tt.parseRetryAfter=Nj;function wj(t){let e=vj(t,"error");if(!e){Vx.logger.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){Vx.logger.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}Tt.getErrorFromResponse=wj;function uye(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}function xj(t){let{response:e,state:r,operationLocation:n}=t;function i(){var o;switch((o=r.config.metadata)===null||o===void 0?void 0:o.mode){case void 0:return Wx(e.rawResponse.statusCode);case"Body":return $x(e,r);default:return"running"}}let s=i();return s==="running"&&n===void 0?"succeeded":s}Tt.getStatusFromInitialResponse=xj;async function dye(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:i,setErrorAsResult:s}=t;return(0,yj.initOperation)({init:async()=>{let o=await i.sendInitialRequest(),a=Qj({rawResponse:o.rawResponse,requestPath:i.requestPath,requestMethod:i.requestMethod,resourceLocationConfig:r});return Object.assign({response:o,operationLocation:a?.operationLocation,resourceLocation:a?.resourceLocation},a?.mode?{metadata:{mode:a.mode}}:{})},stateProxy:e,processResult:n?({flatResponse:o},a)=>n(o,a):({flatResponse:o})=>o,getOperationStatus:xj,setErrorAsResult:s})}Tt.initHttpOperation=dye;function Sj({rawResponse:t},e){var r;switch((r=e.config.metadata)===null||r=Line truncated
`,FY="HTTP/1.1",eIe="AES256",tIe="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",rIe=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"],nIe=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],iIe="BlobUsesCustomerSpecifiedEncryption",sIe="BlobDoesNotUseCustomerSpecifiedEncryption",oIe=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function aIe(t){let e=new URL(t),r=e.pathname;return r=r||"/",r=cIe(r),e.pathname=r,e.toString()}function AIe(t){let e="";if(t.search("DevelopmentStorageProxyUri=")!==-1){let r=t.split(";");for(let n of r)n.trim().startsWith("DevelopmentStorageProxyUri=")&&(e=n.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return e}function QA(t,e){let r=t.split(";");for(let n of r)if(n.trim().startsWith(e))return n.trim().match(e+"=(.*)")[1];return""}function yu(t){let e="";t.startsWith("UseDevelopmentStorage=true")&&(e=AIe(t),t=tIe);let r=QA(t,"BlobEndpoint");if(r=r.endsWith("/")?r.slice(0,-1):r,t.search("DefaultEndpointsProtocol=")!==-1&&t.search("AccountKey=")!==-1){let n="",i="",s=Buffer.from("accountKey","base64"),o="";if(i=QA(t,"AccountName"),s=Buffer.from(QA(t,"AccountKey"),"base64"),!r){n=QA(t,"DefaultEndpointsProtocol");let a=n.toLowerCase();if(a!=="https"&&a!=="http")throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(o=QA(t,"EndpointSuffix"),!o)throw new Error("Invalid EndpointSuffix in the provided Connection String");r=`${n}://${i}.blob.${o}`}if(i){if(s.length===0)throw new Error("Invalid AccountKey in the provided Connection String")}else throw new Error("Invalid AccountName in the provided Connection String");return{kind:"AccountConnString",url:r,accountName:i,accountKey:s,proxyUri:e}}else{let n=QA(t,"SharedAccessSignature"),i=QA(t,"AccountName");if(i||(i=zY(r)),r){if(!n)throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}else throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");return n.startsWith("?")&&(n=n.substring(1)),{kind:"SASConnString",url:r,accountName:i,accountSas:n}}}function cIe(t){return encodeURIComponent(t).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}function Pt(t,e){let r=new URL(t),n=r.pathname;return n=n?n.endsWith("/")?`${n}${e}`:`${n}/${e}`:e,r.pathname=n,r.toString()}function Ao(t,e,r){let n=new URL(t),i=encodeURIComponent(e),s=r?encodeURIComponent( Line truncated `,tG="HTTP/1.1",Hye="AES256",zye="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",jye=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"],Gye=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],Yye="BlobUsesCustomerSpecifiedEncryption",Jye="BlobDoesNotUseCustomerSpecifiedEncryption",Vye=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function Wye(t){let e=new URL(t),r=e.pathname;return r=r||"/",r=Kye(r),e.pathname=r,e.toString()}function $ye(t){let e="";if(t.search("DevelopmentStorageProxyUri=")!==-1){let r=t.split(";");for(let n of r)n.trim().startsWith("DevelopmentStorageProxyUri=")&&(e=n.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return e}function iA(t,e){let r=t.split(";");for(let n of r)if(n.trim().startsWith(e))return n.trim().match(e+"=(.*)")[1];return""}function Zl(t){let e="";t.startsWith("UseDevelopmentStorage=true")&&(e=$ye(t),t=zye);let r=iA(t,"BlobEndpoint");if(r=r.endsWith("/")?r.slice(0,-1):r,t.search("DefaultEndpointsProtocol=")!==-1&&t.search("AccountKey=")!==-1){let n="",i="",s=Buffer.from("accountKey","base64"),o="";if(i=iA(t,"AccountName"),s=Buffer.from(iA(t,"AccountKey"),"base64"),!r){n=iA(t,"DefaultEndpointsProtocol");let a=n.toLowerCase();if(a!=="https"&&a!=="http")throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(o=iA(t,"EndpointSuffix"),!o)throw new Error("Invalid EndpointSuffix in the provided Connection String");r=`${n}://${i}.blob.${o}`}if(i){if(s.length===0)throw new Error("Invalid AccountKey in the provided Connection String")}else throw new Error("Invalid AccountName in the provided Connection String");return{kind:"AccountConnString",url:r,accountName:i,accountKey:s,proxyUri:e}}else{let n=iA(t,"SharedAccessSignature"),i=iA(t,"AccountName");if(i||(i=oG(r)),r){if(!n)throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}else throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");return n.startsWith("?")&&(n=n.substring(1)),{kind:"SASConnString",url:r,accountName:i,accountSas:n}}}function Kye(t){return encodeURIComponent(t).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}function Rt(t,e){let r=new URL(t),n=r.pathname;return n=n?n.endsWith("/")?`${n}${e}`:`${n}/${e}`:e,r.pathname=n,r.toString()}function Ys(t,e,r){let n=new URL(t),i=encodeURIComponent(e),s=r?encodeURIComponent( Line truncated
`)+` `)+`
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(Ie.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===Ie.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(i=>i.name.toLowerCase().startsWith(Ie.PREFIX_FOR_STORAGE));r.sort((i,s)=>GY(i.name.toLowerCase(),s.name.toLowerCase())),r=r.filter((i,s,o)=>!(s>0&&i.name.toLowerCase()===o[s-1].name.toLowerCase()));let n="";return r.forEach(i=>{n+=`${i.name.toLowerCase().trimRight()}:${i.value.trimLeft()} `+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(Ce.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===Ce.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(i=>i.name.toLowerCase().startsWith(Ce.PREFIX_FOR_STORAGE));r.sort((i,s)=>aG(i.name.toLowerCase(),s.name.toLowerCase())),r=r.filter((i,s,o)=>!(s>0&&i.name.toLowerCase()===o[s-1].name.toLowerCase()));let n="";return r.forEach(i=>{n+=`${i.name.toLowerCase().trimRight()}:${i.value.trimLeft()}
`}),n}getCanonicalizedResourceString(e){let r=OC(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let i=qY(e.url),s={};if(i){let o=[];for(let a in i)if(Object.prototype.hasOwnProperty.call(i,a)){let A=a.toLowerCase();s[A]=i[a],o.push(A)}o.sort();for(let a of o)n+=` `}),n}getCanonicalizedResourceString(e){let r=VE(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let i=nG(e.url),s={};if(i){let o=[];for(let a in i)if(Object.prototype.hasOwnProperty.call(i,a)){let A=a.toLowerCase();s[A]=i[a],o.push(A)}o.sort();for(let a of o)n+=`
${a}:${decodeURIComponent(s[a])}`}return n}},qh=class{create(e,r){throw new Error("Method should be implemented in children classes.")}},lt=class extends qh{constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new NC(e,r,this)}computeHMACSHA256(e){return sv.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}},wC=class extends Uh{constructor(e,r){super(e,r)}},dt=class extends qh{create(e,r){return new wC(e,r)}},wR;function BIe(){return wR||(wR=jr.createDefaultHttpClient()),wR}var QIe="storageBrowserPolicy";function bIe(){return{name:QIe,async sendRequest(t,e){return st.isNode||((t.method==="GET"||t.method==="HEAD")&&(t.url=Ao(t.url,Yi.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(Ie.COOKIE),t.headers.delete(Ie.CONTENT_LENGTH)),e(t)}}}var NIe="storageRetryPolicy",Hh;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Hh||(Hh={}));var cu={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Hh.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},wIe=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],SIe=new PC.AbortError("The operation was aborted.");function xIe(t={}){var e,r,n,i,s,o;let a=(e=t.retryPolicyType)!==null&&e!==void 0?e:cu.retryPolicyType,A=(r=t.maxTries)!==null&&r!==void 0?r:cu.maxTries,c=(n=t.retryDelayInMs)!==null&&n!==void 0?n:cu.retryDelayInMs,l=(i=t.maxRetryDelayInMs)!==null&&i!==void 0?i:cu.maxRetryDelayInMs,u=(s=t.secondaryHost)!==null&&s!==void 0?s:cu.secondaryHost,d=(o=t.tryTimeoutInMs)!==null&&o!==void 0?o:cu.tryTimeoutInMs;function f({isPrimaryRetry:m,attempt:E,response:C,error:I}){var N,w;if(E>=A)return nr.info(`RetryPolicy: Attempt(s) ${E} >= maxTries ${A}, no further try.`),!1;if(I){for(let v of wIe)if(I.name.toUpperCase().includes(v)||I.message.toUpperCase().includes(v)||I.code&&I.code.toString().toUpperCase()===v)return nr.info(`RetryPolicy: Network error ${v} found, will retry.`),!0;if(I?.code==="PARSE_ERROR"&&I?.message.startsWith('Error "Error: Unclosed root tag'))return nr.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0}if(C||I){let v=(w=(N=C?.status)!==null&&N!==void 0?N:I?.statusCode)!==null&&w!==void 0?w:0;if(!m&&v===404)return nr.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(v===503||v===500)return nr.info(`RetryPolicy: Will retry for status code ${v}.`),!0}return!1}function g(m,E){let C=0;if(m)switch(a){case Hh.EXPONENTIAL:C=Math.min((Math.pow(2,E-1)-1)*c,l);break;case Hh.FIXED:C=c;break}else C=Math.random()*1e3;return nr.info(`RetryPolicy: Delay for ${C}ms`),C}return{name:NIe,async sendRequest(m,E){d&&(m.url=Ao(m.url,Yi.Parameters.TIMEOUT,String(Math.floor(d/1e3))));let C=m.url,I=u?UY(m.url,u):void 0,N=!1,w=1,v=!0,T,U;for(;v;){let k=N||!I||!["GET","HEAD","OPTIONS"].includes(m.method)||w%2===1;m.url=k?C:I,T=void 0,U=void 0;try{nr.info(`RetryPolicy: =====> Try=${w} ${k?"Primary":"Secondary"}`),T=await E(m),N=N||!k&&T.status===404}catch(J){if(jr.isRestError(J))nr.error(`RetryPolicy: Caught error, message: ${J.message}, code: ${J.code}`),U=J;else throw nr.error(`RetryPolicy: Caught error, message: ${st.getErrorMessage(J)}`),J}v=f({isPrimaryRetry:k,attempt:w,response:T,error:U}),v&&await HY(g(k,w),m.abortSignal,SIe),w++}if(T)return T;throw U??new jr.RestError("RetryPolicy failed without known error.")}}}var RIe="storageSharedKeyCredentialPolicy";function YY(t){function e(s){s.headers.set(Ie.X_MS_DATE,new Date().toUTCString()),s.body&&(typeof s.body=="string"||Buffer.isBuffer(s.body))&&s.body.length>0&&s.headers.set(Ie.CONTENT_LENGTH,Buffer.byteLength(s.body));let o=[s.method.toUpperCase(),r(s,Ie.CONTENT_LANGUAGE),r(s,Ie.CONTENT_ENCODING),r(s,Ie.CONTENT_LENGTH),r(s,Ie.CONTENT_MD5),r(s,Ie.CONTENT_TYPE),r(s,Ie.DATE),r(s,Ie.IF_MODIFIED_SINCE),r(s,Ie.IF_MATCH),r(s,Ie.IF_NONE_MATCH),r(s,Ie.IF_UNMODIFIED_SINCE),r(s,Ie.RANGE)].join(` ${a}:${decodeURIComponent(s[a])}`}return n}},uh=class{create(e,r){throw new Error("Method should be implemented in children classes.")}},lt=class extends uh{constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new ME(e,r,this)}computeHMACSHA256(e){return FS.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}},LE=class extends lh{constructor(e,r){super(e,r)}},dt=class extends uh{create(e,r){return new LE(e,r)}},oS;function lEe(){return oS||(oS=Lr.createDefaultHttpClient()),oS}var uEe="storageBrowserPolicy";function dEe(){return{name:uEe,async sendRequest(t,e){return st.isNode||((t.method==="GET"||t.method==="HEAD")&&(t.url=Ys(t.url,Ti.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(Ce.COOKIE),t.headers.delete(Ce.CONTENT_LENGTH)),e(t)}}}var fEe="storageRetryPolicy",dh;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(dh||(dh={}));var jl={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:dh.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},hEe=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],gEe=new YE.AbortError("The operation was aborted.");function mEe(t={}){var e,r,n,i,s,o;let a=(e=t.retryPolicyType)!==null&&e!==void 0?e:jl.retryPolicyType,A=(r=t.maxTries)!==null&&r!==void 0?r:jl.maxTries,c=(n=t.retryDelayInMs)!==null&&n!==void 0?n:jl.retryDelayInMs,l=(i=t.maxRetryDelayInMs)!==null&&i!==void 0?i:jl.maxRetryDelayInMs,u=(s=t.secondaryHost)!==null&&s!==void 0?s:jl.secondaryHost,d=(o=t.tryTimeoutInMs)!==null&&o!==void 0?o:jl.tryTimeoutInMs;function f({isPrimaryRetry:m,attempt:E,response:C,error:I}){var b,w;if(E>=A)return Xt.info(`RetryPolicy: Attempt(s) ${E} >= maxTries ${A}, no further try.`),!1;if(I){for(let R of hEe)if(I.name.toUpperCase().includes(R)||I.message.toUpperCase().includes(R)||I.code&&I.code.toString().toUpperCase()===R)return Xt.info(`RetryPolicy: Network error ${R} found, will retry.`),!0;if(I?.code==="PARSE_ERROR"&&I?.message.startsWith('Error "Error: Unclosed root tag'))return Xt.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0}if(C||I){let R=(w=(b=C?.status)!==null&&b!==void 0?b:I?.statusCode)!==null&&w!==void 0?w:0;if(!m&&R===404)return Xt.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(R===503||R===500)return Xt.info(`RetryPolicy: Will retry for status code ${R}.`),!0}return!1}function g(m,E){let C=0;if(m)switch(a){case dh.EXPONENTIAL:C=Math.min((Math.pow(2,E-1)-1)*c,l);break;case dh.FIXED:C=c;break}else C=Math.random()*1e3;return Xt.info(`RetryPolicy: Delay for ${C}ms`),C}return{name:fEe,async sendRequest(m,E){d&&(m.url=Ys(m.url,Ti.Parameters.TIMEOUT,String(Math.floor(d/1e3))));let C=m.url,I=u?rG(m.url,u):void 0,b=!1,w=1,R=!0,T,U;for(;R;){let k=b||!I||!["GET","HEAD","OPTIONS"].includes(m.method)||w%2===1;m.url=k?C:I,T=void 0,U=void 0;try{Xt.info(`RetryPolicy: =====> Try=${w} ${k?"Primary":"Secondary"}`),T=await E(m),b=b||!k&&T.status===404}catch(J){if(Lr.isRestError(J))Xt.error(`RetryPolicy: Caught error, message: ${J.message}, code: ${J.code}`),U=J;else throw Xt.error(`RetryPolicy: Caught error, message: ${st.getErrorMessage(J)}`),J}R=f({isPrimaryRetry:k,attempt:w,response:T,error:U}),R&&await iG(g(k,w),m.abortSignal,gEe),w++}if(T)return T;throw U??new Lr.RestError("RetryPolicy failed without known error.")}}}var pEe="storageSharedKeyCredentialPolicy";function AG(t){function e(s){s.headers.set(Ce.X_MS_DATE,new Date().toUTCString()),s.body&&(typeof s.body=="string"||Buffer.isBuffer(s.body))&&s.body.length>0&&s.headers.set(Ce.CONTENT_LENGTH,Buffer.byteLength(s.body));let o=[s.method.toUpperCase(),r(s,Ce.CONTENT_LANGUAGE),r(s,Ce.CONTENT_ENCODING),r(s,Ce.CONTENT_LENGTH),r(s,Ce.CONTENT_MD5),r(s,Ce.CONTENT_TYPE),r(s,Ce.DATE),r(s,Ce.IF_MODIFIED_SINCE),r(s,Ce.IF_MATCH),r(s,Ce.IF_NONE_MATCH),r(s,Ce.IF_UNMODIFIED_SINCE),r(s,Ce.RANGE)].join(`
`)+` `)+`
`+n(s)+i(s),a=sv.createHmac("sha256",t.accountKey).update(o,"utf8").digest("base64");s.headers.set(Ie.AUTHORIZATION,`SharedKey ${t.accountName}:${a}`)}function r(s,o){let a=s.headers.get(o);return!a||o===Ie.CONTENT_LENGTH&&a==="0"?"":a}function n(s){let o=[];for(let[A,c]of s.headers)A.toLowerCase().startsWith(Ie.PREFIX_FOR_STORAGE)&&o.push({name:A,value:c});o.sort((A,c)=>GY(A.name.toLowerCase(),c.name.toLowerCase())),o=o.filter((A,c,l)=>!(c>0&&A.name.toLowerCase()===l[c-1].name.toLowerCase()));let a="";return o.forEach(A=>{a+=`${A.name.toLowerCase().trimRight()}:${A.value.trimLeft()} `+n(s)+i(s),a=FS.createHmac("sha256",t.accountKey).update(o,"utf8").digest("base64");s.headers.set(Ce.AUTHORIZATION,`SharedKey ${t.accountName}:${a}`)}function r(s,o){let a=s.headers.get(o);return!a||o===Ce.CONTENT_LENGTH&&a==="0"?"":a}function n(s){let o=[];for(let[A,c]of s.headers)A.toLowerCase().startsWith(Ce.PREFIX_FOR_STORAGE)&&o.push({name:A,value:c});o.sort((A,c)=>aG(A.name.toLowerCase(),c.name.toLowerCase())),o=o.filter((A,c,l)=>!(c>0&&A.name.toLowerCase()===l[c-1].name.toLowerCase()));let a="";return o.forEach(A=>{a+=`${A.name.toLowerCase().trimRight()}:${A.value.trimLeft()}
`}),a}function i(s){let o=OC(s.url)||"/",a="";a+=`/${t.accountName}${o}`;let A=qY(s.url),c={};if(A){let l=[];for(let u in A)if(Object.prototype.hasOwnProperty.call(A,u)){let d=u.toLowerCase();c[d]=A[u],l.push(d)}l.sort();for(let u of l)a+=` `}),a}function i(s){let o=VE(s.url)||"/",a="";a+=`/${t.accountName}${o}`;let A=nG(s.url),c={};if(A){let l=[];for(let u in A)if(Object.prototype.hasOwnProperty.call(A,u)){let d=u.toLowerCase();c[d]=A[u],l.push(d)}l.sort();for(let u of l)a+=`
${u}:${decodeURIComponent(c[u])}`}return a}return{name:RIe,async sendRequest(s,o){return e(s),o(s)}}}var SC=class extends fu{constructor(e,r){super(e,r)}async sendRequest(e){return st.isNode?this._nextPolicy.sendRequest(e):((e.method.toUpperCase()==="GET"||e.method.toUpperCase()==="HEAD")&&(e.url=Ao(e.url,Yi.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),e.headers.remove(Ie.COOKIE),e.headers.remove(Ie.CONTENT_LENGTH),this._nextPolicy.sendRequest(e))}},xC=class{create(e,r){return new SC(e,r)}},vIe="StorageCorrectContentLengthPolicy";function _Ie(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(Ie.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:vIe,async sendRequest(e,r){return t(e),r(e)}}}function Aa(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}var jh=class{constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function ut(t,e={}){t||(t=new dt);let r=new jh([],e);return r._credential=t,r}function DIe(t){let e=[kIe,WY,PIe,TIe,OIe,LIe,FIe];if(t.factories.length){let r=t.factories.filter(n=>!e.some(i=>i(n)));if(r.length){let n=r.some(i=>MIe(i));return{wrappedPolicies:kC.createRequestPolicyFactoryPolicy(r),afterRetry:n}}}}function JY(t){var e;let r=t.options,{httpClient:n}=r,i=q.__rest(r,["httpClient"]),s=t._coreHttpClient;s||(s=n?kC.convertHttpClient(n):BIe(),t._coreHttpClient=s);let o=t._corePipeline;if(!o){let a=`azsdk-js-azure-storage-blob/${LY}`,A=i.userAgentOptions&&i.userAgentOptions.userAgentPrefix?`${i.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;o=Lh.createClientPipeline(Object.assign(Object.assign({},i),{loggingOptions:{additionalAllowedHeaderNames:rIe,additionalAllowedQueryParameters:nIe,logger:nr.info},userAgentOptions:{userAgentPrefix:A},serializationOptions:{stringifyXML:xR.stringifyXML,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:xR.parseXML,serializerOptions:{xml:{xmlCharKey:"#"}}}})),o.removePolicy({phase:"Retry"}),o.removePolicy({name:jr.decompressResponsePolicyName}),o.addPolicy(_Ie()),o.addPolicy(xIe(i.retryOptions),{phase:"Retry"}),o.addPolicy(bIe());let c=DIe(t);c&&o.addPolicy(c.wrappedPolicies,c.afterRetry?{afterPhase:"Retry"}:void 0);let l=VY(t);Ei.isTokenCredential(l)?o.addPolicy(jr.bearerTokenAuthenticationPolicy({credential:l,scopes:(e=i.audience)!==null&&e!==void 0?e:cv,challengeCallbacks:{authorizeRequestOnChallenge:Lh.authorizeRequestOnTenantChallenge}}),{phase:"Sign"}):l instanceof lt&&o.addPolicy(YY({accountName:l.accountName,accountKey:l.accountKey}),{phase:"Sign"}),t._corePipeline=o}return Object.assign(Object.assign({},i),{allowInsecureConnection:!0,httpClient:s,pipeline:o})}function VY(t){if(t._credential)return t._credential;let e=new dt;for(let r of t.factories)if(Ei.isTokenCredential(r.credential))e=r.credential;else if(WY(r))return r;return e}function WY(t){return t instanceof lt?!0:t.constructor.name==="StorageSharedKeyCredential"}function kIe(t){return t instanceof dt?!0:t.constructor.name==="AnonymousCredential"}function PIe(t){return Ei.isTokenCredential(t.credential)}function TIe(t){return t instanceof xC?!0:t.constructor.name==="StorageBrowserPolicyFactory"}function OIe(t){return t instanceof bC?!0:t.constructor.name==="StorageRetryPolicyFactory"}function LIe(t){return t.constructor.name==="TelemetryPolicyFactory"}function MIe(t){return t.constructor.name==="InjectorPolicyFactory"}function FIe(t){let e=["GenerateClientRequestIdPolicy","TracingPolicy","LogPolicy","ProxyPolicy","DisableResponseDecompressionPolicy","KeepAlivePolicy","DeserializationPolicy"],r={sendRequest:async o=>({request:o,headers:o.headers.clone(),status:500})},n={log(o,a){},shouldLog(o){return!1}},s=t.create(r,n).constructor.name;return e.some(o=>s.startsWith(o))}var uv={serializedName:"BlobServiceProperties",xmlName:"StorageServiceProperties",type:{name:"Composite",className:"BlobServiceProperties",modelProperties:{blobAnalyticsLogging:{serializedName:"Logging",xmlName:"Logging",type:{name:"Composite",className:"Logging"}},hourMetrics:{serializedName:"HourMetrics",xmlName:"HourMetrics",type:{name:"Composite",className:"Metrics"}},minuteMetrics:{serializedName:"MinuteMetrics",xmlName:"MinuteMetrics",type:{name:"Composite",className:"Metrics"}},cors:{serializedName:"Cors",xmlName:"Cors",xmlIsWrapped:!0,xmlElementName:"CorsRule",type:{name:"Sequence",element:{type:{name:"Composite",className:"CorsRule"}}}},defaultServiceVersion:{serializedName:"DefaultServiceVersion",xmlName:"DefaultServiceVersion",type:{name:"String"}},deleteRetentionPolicy:{serializedName:"DeleteRetentionPolicy",xmlName:"DeleteRetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}},staticWebsite:{serializedName:"StaticWebsite",xmlName:"StaticWebsite",type:{name:"Composite",className:"StaticWe Line truncated ${u}:${decodeURIComponent(c[u])}`}return a}return{name:pEe,async sendRequest(s,o){return e(s),o(s)}}}var FE=class extends Vl{constructor(e,r){super(e,r)}async sendRequest(e){return st.isNode?this._nextPolicy.sendRequest(e):((e.method.toUpperCase()==="GET"||e.method.toUpperCase()==="HEAD")&&(e.url=Ys(e.url,Ti.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),e.headers.remove(Ce.COOKIE),e.headers.remove(Ce.CONTENT_LENGTH),this._nextPolicy.sendRequest(e))}},UE=class{create(e,r){return new FE(e,r)}},yEe="StorageCorrectContentLengthPolicy";function EEe(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(Ce.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:yEe,async sendRequest(e,r){return t(e),r(e)}}}function Go(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}var fh=class{constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function ut(t,e={}){t||(t=new dt);let r=new fh([],e);return r._credential=t,r}function CEe(t){let e=[IEe,uG,BEe,QEe,bEe,NEe,xEe];if(t.factories.length){let r=t.factories.filter(n=>!e.some(i=>i(n)));if(r.length){let n=r.some(i=>wEe(i));return{wrappedPolicies:GE.createRequestPolicyFactoryPolicy(r),afterRetry:n}}}}function cG(t){var e;let r=t.options,{httpClient:n}=r,i=q.__rest(r,["httpClient"]),s=t._coreHttpClient;s||(s=n?GE.convertHttpClient(n):lEe(),t._coreHttpClient=s);let o=t._corePipeline;if(!o){let a=`azsdk-js-azure-storage-blob/${Zj}`,A=i.userAgentOptions&&i.userAgentOptions.userAgentPrefix?`${i.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;o=ah.createClientPipeline(Object.assign(Object.assign({},i),{loggingOptions:{additionalAllowedHeaderNames:jye,additionalAllowedQueryParameters:Gye,logger:Xt.info},userAgentOptions:{userAgentPrefix:A},serializationOptions:{stringifyXML:AS.stringifyXML,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:AS.parseXML,serializerOptions:{xml:{xmlCharKey:"#"}}}})),o.removePolicy({phase:"Retry"}),o.removePolicy({name:Lr.decompressResponsePolicyName}),o.addPolicy(EEe()),o.addPolicy(mEe(i.retryOptions),{phase:"Retry"}),o.addPolicy(dEe());let c=CEe(t);c&&o.addPolicy(c.wrappedPolicies,c.afterRetry?{afterPhase:"Retry"}:void 0);let l=lG(t);ci.isTokenCredential(l)?o.addPolicy(Lr.bearerTokenAuthenticationPolicy({credential:l,scopes:(e=i.audience)!==null&&e!==void 0?e:zS,challengeCallbacks:{authorizeRequestOnChallenge:ah.authorizeRequestOnTenantChallenge}}),{phase:"Sign"}):l instanceof lt&&o.addPolicy(AG({accountName:l.accountName,accountKey:l.accountKey}),{phase:"Sign"}),t._corePipeline=o}return Object.assign(Object.assign({},i),{allowInsecureConnection:!0,httpClient:s,pipeline:o})}function lG(t){if(t._credential)return t._credential;let e=new dt;for(let r of t.factories)if(ci.isTokenCredential(r.credential))e=r.credential;else if(uG(r))return r;return e}function uG(t){return t instanceof lt?!0:t.constructor.name==="StorageSharedKeyCredential"}function IEe(t){return t instanceof dt?!0:t.constructor.name==="AnonymousCredential"}function BEe(t){return ci.isTokenCredential(t.credential)}function QEe(t){return t instanceof UE?!0:t.constructor.name==="StorageBrowserPolicyFactory"}function bEe(t){return t instanceof OE?!0:t.constructor.name==="StorageRetryPolicyFactory"}function NEe(t){return t.constructor.name==="TelemetryPolicyFactory"}function wEe(t){return t.constructor.name==="InjectorPolicyFactory"}function xEe(t){let e=["GenerateClientRequestIdPolicy","TracingPolicy","LogPolicy","ProxyPolicy","DisableResponseDecompressionPolicy","KeepAlivePolicy","DeserializationPolicy"],r={sendRequest:async o=>({request:o,headers:o.headers.clone(),status:500})},n={log(o,a){},shouldLog(o){return!1}},s=t.create(r,n).constructor.name;return e.some(o=>s.startsWith(o))}var GS={serializedName:"BlobServiceProperties",xmlName:"StorageServiceProperties",type:{name:"Composite",className:"BlobServiceProperties",modelProperties:{blobAnalyticsLogging:{serializedName:"Logging",xmlName:"Logging",type:{name:"Composite",className:"Logging"}},hourMetrics:{serializedName:"HourMetrics",xmlName:"HourMetrics",type:{name:"Composite",className:"Metrics"}},minuteMetrics:{serializedName:"MinuteMetrics",xmlName:"MinuteMetrics",type:{name:"Composite",className:"Metrics"}},cors:{serializedName:"Cors",xmlName:"Cors",xmlIsWrapped:!0,xmlElementName:"CorsRule",type:{name:"Sequence",element:{type:{name:"Composite",className:"CorsRule"}}}},defaultServiceVersion:{serializedName:"DefaultServiceVersion",xmlName:"DefaultServiceVersion",type:{name:"String"}},deleteRetentionPolicy:{serializedName:"DeleteRetentionPolicy",xmlName:"DeleteRetentionPolicy",type:{name:"Composite",className:"RetentionPolicy"}},staticWebsite:{serializedName:"StaticWebsite",xmlName:"StaticWebsite",type:{name:"Composite",className:"StaticWe Line truncated
`),s=e.computeHMACSHA256(i);return{sasQueryParameters:new Ns(t.version,s,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}function Qbe(t,e){if(t=Lu(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=co.parse(t.permissions.toString()).toString():i=lo.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?Xe(t.startsOn,!1):"",t.expiresOn?Xe(t.expiresOn,!1):"",Ou(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?uo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(` `),s=e.computeHMACSHA256(i);return{sasQueryParameters:new us(t.version,s,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}function uBe(t,e){if(t=yu(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=Js.parse(t.permissions.toString()).toString():i=Vs.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?Ke(t.startsOn,!1):"",t.expiresOn?Ke(t.expiresOn,!1):"",pu(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ws(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new Ns(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}function bbe(t,e){if(t=Lu(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=co.parse(t.permissions.toString()).toString():i=lo.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?Xe(t.startsOn,!1):"",t.expiresOn?Xe(t.expiresOn,!1):"",Ou(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?uo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(` `),o=e.computeHMACSHA256(s);return{sasQueryParameters:new us(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}function dBe(t,e){if(t=yu(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=Js.parse(t.permissions.toString()).toString():i=Vs.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?Ke(t.startsOn,!1):"",t.expiresOn?Ke(t.expiresOn,!1):"",pu(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ws(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new Ns(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:s}}function Nbe(t,e){if(t=Lu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=co.parse(t.permissions.toString()).toString():i=lo.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?Xe(t.startsOn,!1):"",t.expiresOn?Xe(t.expiresOn,!1):"",Ou(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Xe(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Xe(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?uo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(` `),o=e.computeHMACSHA256(s);return{sasQueryParameters:new us(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:s}}function fBe(t,e){if(t=yu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=Js.parse(t.permissions.toString()).toString():i=Vs.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?Ke(t.startsOn,!1):"",t.expiresOn?Ke(t.expiresOn,!1):"",pu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ke(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ke(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Ws(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new Ns(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:s}}function wbe(t,e){if(t=Lu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=co.parse(t.permissions.toString()).toString():i=lo.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?Xe(t.startsOn,!1):"",t.expiresOn?Xe(t.expiresOn,!1):"",Ou(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Xe(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Xe(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?uo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(` `),o=e.computeHMACSHA256(s);return{sasQueryParameters:new us(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:s}}function hBe(t,e){if(t=yu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=Js.parse(t.permissions.toString()).toString():i=Vs.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?Ke(t.startsOn,!1):"",t.expiresOn?Ke(t.expiresOn,!1):"",pu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ke(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ke(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ws(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new Ns(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:s}}function Sbe(t,e){if(t=Lu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=co.parse(t.permissions.toString()).toString():i=lo.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?Xe(t.startsOn,!1):"",t.expiresOn?Xe(t.expiresOn,!1):"",Ou(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Xe(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Xe(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?uo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(` `),o=e.computeHMACSHA256(s);return{sasQueryParameters:new us(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:s}}function gBe(t,e){if(t=yu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=Js.parse(t.permissions.toString()).toString():i=Vs.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?Ke(t.startsOn,!1):"",t.expiresOn?Ke(t.expiresOn,!1):"",pu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ke(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ke(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ws(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new Ns(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:s}}function Ou(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}function Lu(t){let e=t.version?t.version:Av;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}var Jh=class{get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=st.randomUUID()),this._leaseId=r}async acquireLease(e,r={}){var n,i,s,o,a;if(this._isContainer&&(!((n=r.conditions)===null||n===void 0)&&n.ifMatch&&((i=r.conditions)===null||i===void 0?void 0:i.ifMatch)!==bs||!((s=r.conditions)===null||s===void 0)&&s.ifNoneMatch&&((o=r.conditions)===null||o===void 0?void 0:o.ifNoneMatch)!==bs||!((a=r.conditions)===null||a===void 0)&&a.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return F.withSpan("BlobLeaseClient-acquireLease",r,async A=>{var c;return V(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(c=r.conditions)===null||c===void 0?void 0:c.tagConditions}),proposedLeaseId:this._leaseId,tracingOptions:A.tracingOptions}))})}async changeLease(e,r={}){var n,i,s,o,a;if(this._isContainer&&(!((n=r.conditions)===null||n===void 0)&&n.ifMatch&&((i=r.conditions)===null||i===void 0?void 0:i.ifMatch)!==bs||!((s=r.conditions)===null||s===void 0)&&s.ifNoneMatch&&((o=r.conditions)===null||o===void 0?void 0:o.ifNoneMatch)!==bs||!((a=r.conditions)===null||a===void 0)&&a.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return F.withSpan("BlobLeaseClient-changeLease",r,async A=>{var c;let l=V(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(c=r.conditions)===null||c===void 0?void 0:c.tagConditions}),tracingOptions:A.tracingOptions}));return this._leaseId=e,l})}async releaseLease(e={}){var r,n,i,s,o;if(this._isContainer&&(!((r=e.conditions)===null||r===void 0)&&r.ifMatch&&((n=e.conditions)===null||n===void 0?void 0:n.ifMatch)!==bs||!((i=e.conditions)===null||i===void 0)&&i.ifNoneMatch&&((s=e.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==bs||!((o=e.conditions)===null||o===void 0)&&o.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return F.withSpan("BlobLeaseClient-releaseLease",e,async a=>{var A;return V(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:Objec Line truncated `),o=e.computeHMACSHA256(s);return{sasQueryParameters:new us(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:s}}function pu(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}function yu(t){let e=t.version?t.version:HS;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}var ph=class{get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=st.randomUUID()),this._leaseId=r}async acquireLease(e,r={}){var n,i,s,o,a;if(this._isContainer&&(!((n=r.conditions)===null||n===void 0)&&n.ifMatch&&((i=r.conditions)===null||i===void 0?void 0:i.ifMatch)!==ls||!((s=r.conditions)===null||s===void 0)&&s.ifNoneMatch&&((o=r.conditions)===null||o===void 0?void 0:o.ifNoneMatch)!==ls||!((a=r.conditions)===null||a===void 0)&&a.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return F.withSpan("BlobLeaseClient-acquireLease",r,async A=>{var c;return V(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(c=r.conditions)===null||c===void 0?void 0:c.tagConditions}),proposedLeaseId:this._leaseId,tracingOptions:A.tracingOptions}))})}async changeLease(e,r={}){var n,i,s,o,a;if(this._isContainer&&(!((n=r.conditions)===null||n===void 0)&&n.ifMatch&&((i=r.conditions)===null||i===void 0?void 0:i.ifMatch)!==ls||!((s=r.conditions)===null||s===void 0)&&s.ifNoneMatch&&((o=r.conditions)===null||o===void 0?void 0:o.ifNoneMatch)!==ls||!((a=r.conditions)===null||a===void 0)&&a.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return F.withSpan("BlobLeaseClient-changeLease",r,async A=>{var c;let l=V(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(c=r.conditions)===null||c===void 0?void 0:c.tagConditions}),tracingOptions:A.tracingOptions}));return this._leaseId=e,l})}async releaseLease(e={}){var r,n,i,s,o;if(this._isContainer&&(!((r=e.conditions)===null||r===void 0)&&r.ifMatch&&((n=e.conditions)===null||n===void 0?void 0:n.ifMatch)!==ls||!((i=e.conditions)===null||i===void 0)&&i.ifNoneMatch&&((s=e.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==ls||!((o=e.conditions)===null||o===void 0)&&o.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return F.withSpan("BlobLeaseClient-releaseLease",e,async a=>{var A;return V(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:Objec Line truncated
`):o=[e.accountName,n,i,s,t.startsOn?Xe(t.startsOn,!1):"",Xe(t.expiresOn,!1),t.ipRange?uo(t.ipRange):"",t.protocol?t.protocol:"",r,""].join(` `):o=[e.accountName,n,i,s,t.startsOn?Ke(t.startsOn,!1):"",Ke(t.expiresOn,!1),t.ipRange?Ws(t.ipRange):"",t.protocol?t.protocol:"",r,""].join(`
`);let a=e.computeHMACSHA256(o);return{sasQueryParameters:new Ns(r,a,n.toString(),i,s,t.protocol,t.startsOn,t.expiresOn,t.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.encryptionScope),stringToSign:o}}var iv=class t extends zh{static fromConnectionString(e,r){r=r||{};let n=yu(e);if(n.kind==="AccountConnString")if(st.isNode){let i=new lt(n.accountName,n.accountKey);r.proxyOptions||(r.proxyOptions=jr.getDefaultProxySettings(n.proxyUri));let s=ut(i,r);return new t(n.url,s)}else throw new Error("Account connection string is only supported in Node.js environment");else if(n.kind==="SASConnString"){let i=ut(new dt,r);return new t(n.url+"?"+n.accountSas,i)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}constructor(e,r,n){let i;Aa(r)?i=r:st.isNode&&r instanceof lt||r instanceof dt||Ei.isTokenCredential(r)?i=ut(r,n):i=ut(new dt,n),super(e,i),this.serviceContext=this.storageClientContext.service}getContainerClient(e){return new _C(Pt(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,r={}){return F.withSpan("BlobServiceClient-createContainer",r,async n=>{let i=this.getContainerClient(e),s=await i.create(n);return{containerClient:i,containerCreateResponse:s}})}async deleteContainer(e,r={}){return F.withSpan("BlobServiceClient-deleteContainer",r,async n=>this.getContainerClient(e).delete(n))}async undeleteContainer(e,r,n={}){return F.withSpan("BlobServiceClient-undeleteContainer",n,async i=>{let s=this.getContainerClient(n.destinationContainerName||e),o=s.storageClientContext.container,a=V(await o.restore({deletedContainerName:e,deletedContainerVersion:r,tracingOptions:i.tracingOptions}));return{containerClient:s,containerUndeleteResponse:a}})}async renameContainer(e,r,n={}){return F.withSpan("BlobServiceClient-renameContainer",n,async i=>{var s;let o=this.getContainerClient(r),a=o.storageClientContext.container,A=V(await a.rename(e,Object.assign(Object.assign({},i),{sourceLeaseId:(s=n.sourceCondition)===null||s===void 0?void 0:s.leaseId})));return{containerClient:o,containerRenameResponse:A}})}async getProperties(e={}){return F.withSpan("BlobServiceClient-getProperties",e,async r=>V(await this.serviceContext.getProperties({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async setProperties(e,r={}){return F.withSpan("BlobServiceClient-setProperties",r,async n=>V(await this.serviceContext.setProperties(e,{abortSignal:r.abortSignal,tracingOptions:n.tracingOptions})))}async getStatistics(e={}){return F.withSpan("BlobServiceClient-getStatistics",e,async r=>V(await this.serviceContext.getStatistics({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async getAccountInfo(e={}){return F.withSpan("BlobServiceClient-getAccountInfo",e,async r=>V(await this.serviceContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async listContainersSegment(e,r={}){return F.withSpan("BlobServiceClient-listContainersSegment",r,async n=>V(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({abortSignal:r.abortSignal,marker:e},r),{include:typeof r.include=="string"?[r.include]:r.include,tracingOptions:n.tracingOptions}))))}async findBlobsByTagsSegment(e,r,n={}){return F.withSpan("BlobServiceClient-findBlobsByTagsSegment",n,async i=>{let s=V(await this.serviceContext.filterBlobs({abortSignal:n.abortSignal,where:e,marker:r,maxPageSize:n.maxPageSize,tracingOptions:i.tracingOptions}));return Object.assign(Object.assign({},s),{_response:s._response,blobs:s.blobs.map(a=>{var A;let c="";return((A=a.tags)===null||A===void 0?void 0:A.blobTagSet.length)===1&&(c=a.tags.blobTagSet[0].value),Object.assign(Object.assign({},a),{tags:Ph(a.tags),tagValue:c})})})})}findBlobsByTagsSegments(e,r){return q.__asyncGenerator(this,arguments,function*(i,s,o={}){let a;if(s||s===void 0)do a=yield q.__await(this.findBlobsByTagsSegment(i,s,o)),a.blobs=a.blobs||[],s=a.continuationToken,yield yield q.__await(a);while(s)})}findBlobsByTagsItems(e){return q.__asyncGenerator(this,arguments,function*(n,i={}){var s,o,a,A;let c;try{for(var l=!0,u=q.__asyncValues(this.findBlobsByTagsSegments(n,c,i)),d;d=yield q.__await(u.next()),s=d.done,!s;l=!0){A=d.value,l=!1;let f=A;yield q.__await(yield*q.__asyncDelegator(q.__asyncValues(f.blobs)))}}catch(f){o={error:f}}finally{try{!l&&!s&&(a=u.return)&&(yield q.__await(a.call(u)))}finally{if(o)throw o.error}}})}findBlobsByTags(e,r={}){let n=Object.assign({},r),i=this.findBlobsByTagsItems(e,n);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(s={})=>this.findBlobsByTagsSegments(e,s.continuationToken,Object.assign({maxPageSize:s.maxPageSize},n))}}listSegments(e){return q.__asyncGenerator(this,arguments,function*(n,i={}){let s;if(n||n===void 0)do s=yield q.__await(this.listContainersSegment(n,i)),s.containerItems=s.containerItems||[],n=s.continuationToken,yield yield q.__await(yield q.__await(s));while(n)})}listItems(){retur Line truncated `);let a=e.computeHMACSHA256(o);return{sasQueryParameters:new us(r,a,n.toString(),i,s,t.protocol,t.startsOn,t.expiresOn,t.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.encryptionScope),stringToSign:o}}var LS=class t extends hh{static fromConnectionString(e,r){r=r||{};let n=Zl(e);if(n.kind==="AccountConnString")if(st.isNode){let i=new lt(n.accountName,n.accountKey);r.proxyOptions||(r.proxyOptions=Lr.getDefaultProxySettings(n.proxyUri));let s=ut(i,r);return new t(n.url,s)}else throw new Error("Account connection string is only supported in Node.js environment");else if(n.kind==="SASConnString"){let i=ut(new dt,r);return new t(n.url+"?"+n.accountSas,i)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}constructor(e,r,n){let i;Go(r)?i=r:st.isNode&&r instanceof lt||r instanceof dt||ci.isTokenCredential(r)?i=ut(r,n):i=ut(new dt,n),super(e,i),this.serviceContext=this.storageClientContext.service}getContainerClient(e){return new zE(Rt(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,r={}){return F.withSpan("BlobServiceClient-createContainer",r,async n=>{let i=this.getContainerClient(e),s=await i.create(n);return{containerClient:i,containerCreateResponse:s}})}async deleteContainer(e,r={}){return F.withSpan("BlobServiceClient-deleteContainer",r,async n=>this.getContainerClient(e).delete(n))}async undeleteContainer(e,r,n={}){return F.withSpan("BlobServiceClient-undeleteContainer",n,async i=>{let s=this.getContainerClient(n.destinationContainerName||e),o=s.storageClientContext.container,a=V(await o.restore({deletedContainerName:e,deletedContainerVersion:r,tracingOptions:i.tracingOptions}));return{containerClient:s,containerUndeleteResponse:a}})}async renameContainer(e,r,n={}){return F.withSpan("BlobServiceClient-renameContainer",n,async i=>{var s;let o=this.getContainerClient(r),a=o.storageClientContext.container,A=V(await a.rename(e,Object.assign(Object.assign({},i),{sourceLeaseId:(s=n.sourceCondition)===null||s===void 0?void 0:s.leaseId})));return{containerClient:o,containerRenameResponse:A}})}async getProperties(e={}){return F.withSpan("BlobServiceClient-getProperties",e,async r=>V(await this.serviceContext.getProperties({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async setProperties(e,r={}){return F.withSpan("BlobServiceClient-setProperties",r,async n=>V(await this.serviceContext.setProperties(e,{abortSignal:r.abortSignal,tracingOptions:n.tracingOptions})))}async getStatistics(e={}){return F.withSpan("BlobServiceClient-getStatistics",e,async r=>V(await this.serviceContext.getStatistics({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async getAccountInfo(e={}){return F.withSpan("BlobServiceClient-getAccountInfo",e,async r=>V(await this.serviceContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async listContainersSegment(e,r={}){return F.withSpan("BlobServiceClient-listContainersSegment",r,async n=>V(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({abortSignal:r.abortSignal,marker:e},r),{include:typeof r.include=="string"?[r.include]:r.include,tracingOptions:n.tracingOptions}))))}async findBlobsByTagsSegment(e,r,n={}){return F.withSpan("BlobServiceClient-findBlobsByTagsSegment",n,async i=>{let s=V(await this.serviceContext.filterBlobs({abortSignal:n.abortSignal,where:e,marker:r,maxPageSize:n.maxPageSize,tracingOptions:i.tracingOptions}));return Object.assign(Object.assign({},s),{_response:s._response,blobs:s.blobs.map(a=>{var A;let c="";return((A=a.tags)===null||A===void 0?void 0:A.blobTagSet.length)===1&&(c=a.tags.blobTagSet[0].value),Object.assign(Object.assign({},a),{tags:ih(a.tags),tagValue:c})})})})}findBlobsByTagsSegments(e,r){return q.__asyncGenerator(this,arguments,function*(i,s,o={}){let a;if(s||s===void 0)do a=yield q.__await(this.findBlobsByTagsSegment(i,s,o)),a.blobs=a.blobs||[],s=a.continuationToken,yield yield q.__await(a);while(s)})}findBlobsByTagsItems(e){return q.__asyncGenerator(this,arguments,function*(n,i={}){var s,o,a,A;let c;try{for(var l=!0,u=q.__asyncValues(this.findBlobsByTagsSegments(n,c,i)),d;d=yield q.__await(u.next()),s=d.done,!s;l=!0){A=d.value,l=!1;let f=A;yield q.__await(yield*q.__asyncDelegator(q.__asyncValues(f.blobs)))}}catch(f){o={error:f}}finally{try{!l&&!s&&(a=u.return)&&(yield q.__await(a.call(u)))}finally{if(o)throw o.error}}})}findBlobsByTags(e,r={}){let n=Object.assign({},r),i=this.findBlobsByTagsItems(e,n);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(s={})=>this.findBlobsByTagsSegments(e,s.continuationToken,Object.assign({maxPageSize:s.maxPageSize},n))}}listSegments(e){return q.__asyncGenerator(this,arguments,function*(n,i={}){let s;if(n||n===void 0)do s=yield q.__await(this.listContainersSegment(n,i)),s.containerItems=s.containerItems||[],n=s.continuationToken,yield yield q.__await(yield q.__await(s));while(n)})}listItems(){retur Line truncated
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};Qn.NetworkError=jC;jC.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var zC=class extends Error{constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours. If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};mn.NetworkError=tC;tC.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var rC=class extends Error{constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};Qn.UsageError=zC;zC.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var g3=h(bn=>{"use strict";var jbe=bn&&bn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zbe=bn&&bn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Gbe=bn&&bn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&jbe(e,t,r);return zbe(e,t),e},Ybe=bn&&bn.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(bn,"__esModule",{value:!0});bn.uploadCacheArchiveSDK=bn.UploadProgress=void 0;var _v=Gbe(at()),Jbe=Nv(),Vbe=vv(),GC=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,i=(e/(1024*1024)/(n/1e3)).toFixed(1);_v.info(`Sent ${e} of ${this.contentLength} (${r}%), ${i} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};bn.UploadProgress=GC;function Wbe(t,e,r){var n;return Ybe(this,void 0,void 0,function*(){let i=new Jbe.BlobClient(t),s=i.getBlockBlobClient(),o=new GC((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:o.onProgress()};try{o.startDisplayTimer(),_v.debug(`BlobClient: ${i.name}:${i.accountName}:${i.containerName}`);let A=yield s.uploadFile(e,a);if(A._response.status>=400)throw new Vbe.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${A._response.status}`);return A}catch(A){throw _v.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${A.message}`),A}finally{o.stopDisplayTimer()}})}bn.uploadCacheArchiveSDK=Wbe});var kv=h(qt=>{"use strict";var $be=qt&&qt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Kbe=qt&&qt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Xbe=qt&&qt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&$be(e,t,r);return Kbe(e,t),e},JC=qt&&qt.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(qt,"__esModule",{value:!0});qt.retryHttpClientResponse=qt.retryTypedResponse=qt.retry=qt.isRetryableStatusCode=qt.isServerErrorStatusCode=qt.isSuccessStatusCode=void 0;var m3=Xbe(at()),YC=oA(),Mu=Yf();function Zbe(t){return t?t>=200&&t<300:!1}qt.isSuccessStatusCode=Zbe;function p3(t){return t?t>=500:!0}qt.isServerErrorStatusCode=p3;function y3(t){return t?[YC.HttpCodes.BadGateway,YC.HttpCodes.ServiceUnavailable,YC.HttpCodes.GatewayTimeout].includes(t):!1}qt.isRetryableStatusCode=y3;function e0e(t){return JC(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function Dv(t,e,r,n=Mu.DefaultRetryAttempts,i=Mu.DefaultRetryDelay,s=void 0){return JC(this,void 0,void 0,function*(){let o="",a=1;for(;a<=n;){let A,c,l=!1;try{A=yield e()}catch(u){s&&(A=s(u)),l=!0,o=u.message}if(A&&(c=r(A),!p3(c)))return A;if(c&&(l=y3(c),o=`Cache service responded with ${c}`),m3.debug(`${t} - Attempt ${a} of ${n} failed with Line truncated More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};mn.UsageError=rC;rC.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var DV=h(pn=>{"use strict";var DBe=pn&&pn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),_Be=pn&&pn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kBe=pn&&pn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&DBe(e,t,r);return _Be(e,t),e},PBe=pn&&pn.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(pn,"__esModule",{value:!0});pn.uploadCacheArchiveSDK=pn.UploadProgress=void 0;var uv=kBe(it()),TBe=sv(),OBe=lv(),nC=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,i=(e/(1024*1024)/(n/1e3)).toFixed(1);uv.info(`Sent ${e} of ${this.contentLength} (${r}%), ${i} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};pn.UploadProgress=nC;function MBe(t,e,r){var n;return PBe(this,void 0,void 0,function*(){let i=new TBe.BlobClient(t),s=i.getBlockBlobClient(),o=new nC((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:o.onProgress()};try{o.startDisplayTimer(),uv.debug(`BlobClient: ${i.name}:${i.accountName}:${i.containerName}`);let A=yield s.uploadFile(e,a);if(A._response.status>=400)throw new OBe.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${A._response.status}`);return A}catch(A){throw uv.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${A.message}`),A}finally{o.stopDisplayTimer()}})}pn.uploadCacheArchiveSDK=MBe});var fv=h(Mt=>{"use strict";var LBe=Mt&&Mt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),FBe=Mt&&Mt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),UBe=Mt&&Mt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&LBe(e,t,r);return FBe(e,t),e},sC=Mt&&Mt.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.retryHttpClientResponse=Mt.retryTypedResponse=Mt.retry=Mt.isRetryableStatusCode=Mt.isServerErrorStatusCode=Mt.isSuccessStatusCode=void 0;var _V=UBe(it()),iC=qa(),Eu=mf();function qBe(t){return t?t>=200&&t<300:!1}Mt.isSuccessStatusCode=qBe;function kV(t){return t?t>=500:!0}Mt.isServerErrorStatusCode=kV;function PV(t){return t?[iC.HttpCodes.BadGateway,iC.HttpCodes.ServiceUnavailable,iC.HttpCodes.GatewayTimeout].includes(t):!1}Mt.isRetryableStatusCode=PV;function HBe(t){return sC(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function dv(t,e,r,n=Eu.DefaultRetryAttempts,i=Eu.DefaultRetryDelay,s=void 0){return sC(this,void 0,void 0,function*(){let o="",a=1;for(;a<=n;){let A,c,l=!1;try{A=yield e()}catch(u){s&&(A=s(u)),l=!0,o=u.message}if(A&&(c=r(A),!kV(c)))return A;if(c&&(l=PV(c),o=`Cache service responded with ${c}`),_V.debug(`${t} - Attempt ${a} of ${n} failed with Line truncated
Other caches with similar key:`);for(let a of s?.artifactCaches||[])$n.debug(`Cache Key: ${a?.cacheKey}, Cache Version: ${a?.cacheVersion}, Cache Scope: ${a?.scope}, Cache Created: ${a?.creationTime}`)}}})}function L0e(t,e,r){return Nn(this,void 0,void 0,function*(){let n=new R0e.URL(t),i=(0,Uv.getDownloadOptions)(r);n.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield(0,KC.downloadCacheStorageSDK)(t,e,i):i.concurrentBlobDownloads?yield(0,KC.downloadCacheHttpClientConcurrent)(t,e,i):yield(0,KC.downloadCacheHttpClient)(t,e):yield(0,KC.downloadCacheHttpClient)(t,e)})}Nr.downloadCache=L0e;function M0e(t,e,r){return Nn(this,void 0,void 0,function*(){let n=qv(),i=qu.getCacheVersion(e,r?.compressionMethod,r?.enableCrossOsArchive),s={key:t,version:i,cacheSize:r?.cacheSize};return yield(0,ha.retryTypedResponse)("reserveCache",()=>Nn(this,void 0,void 0,function*(){return n.postJson(og("caches"),s)}))})}Nr.reserveCache=M0e;function v3(t,e){return`bytes ${t}-${e}/*`}function F0e(t,e,r,n,i){return Nn(this,void 0,void 0,function*(){$n.debug(`Uploading chunk of size ${i-n+1} bytes at offset ${n} with content range: ${v3(n,i)}`);let s={"Content-Type":"application/octet-stream","Content-Range":v3(n,i)},o=yield(0,ha.retryHttpClientResponse)(`uploadChunk (start: ${n}, end: ${i})`,()=>Nn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),s)}));if(!(0,ha.isSuccessStatusCode)(o.message.statusCode))throw new Error(`Cache service responded with ${o.message.statusCode} during upload chunk.`)})}function U0e(t,e,r,n){return Nn(this,void 0,void 0,function*(){let i=qu.getArchiveFileSizeInBytes(r),s=og(`caches/${e.toString()}`),o=Mv.openSync(r,"r"),a=(0,Uv.getUploadOptions)(n),A=qu.assertDefined("uploadConcurrency",a.uploadConcurrency),c=qu.assertDefined("uploadChunkSize",a.uploadChunkSize),l=[...new Array(A).keys()];$n.debug("Awaiting all uploads");let u=0;try{yield Promise.all(l.map(()=>Nn(this,void 0,void 0,function*(){for(;u<i;){let d=Math.min(i-u,c),f=u,g=u+d-1;u+=c,yield F0e(t,s,()=>Mv.createReadStream(r,{fd:o,start:f,end:g,autoClose:!1}).on("error",m=>{throw new Error(`Cache upload failed because file read failed with ${m.message}`)}),f,g)}})))}finally{Mv.closeSync(o)}})}function q0e(t,e,r){return Nn(this,void 0,void 0,function*(){let n={size:r};return yield(0,ha.retryTypedResponse)("commitCache",()=>Nn(this,void 0,void 0,function*(){return t.postJson(og(`caches/${e.toString()}`),n)}))})}function H0e(t,e,r,n){return Nn(this,void 0,void 0,function*(){if((0,Uv.getUploadOptions)(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,v0e.uploadCacheArchiveSDK)(r,e,n)}else{let s=qv();$n.debug("Upload cache"),yield U0e(s,t,e,n),$n.debug("Commiting cache");let o=qu.getArchiveFileSizeInBytes(e);$n.info(`Cache Size: ~${Math.round(o/(1024*1024))} MB (${o} B)`);let a=yield q0e(s,t,o);if(!(0,ha.isSuccessStatusCode)(a.statusCode))throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`);$n.info("Cache saved successfully")}})}Nr.saveCache=H0e});var XC=h(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});Hu.isJsonObject=Hu.typeofJsonValue=void 0;function j0e(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}Hu.typeofJsonValue=j0e;function z0e(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}Hu.isJsonObject=z0e});var eI=h(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});ju.base64encode=ju.base64decode=void 0;var mo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),ZC=[];for(let t=0;t<mo.length;t++)ZC[mo[t].charCodeAt(0)]=t;ZC[45]=mo.indexOf("+");ZC[95]=mo.indexOf("/");function G0e(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let r=new Uint8Array(e),n=0,i=0,s,o=0;for(let a=0;a<t.length;a++){if(s=ZC[t.charCodeAt(a)],s===void 0)switch(t[a]){case"=":i=0;case` Other caches with similar key:`);for(let a of s?.artifactCaches||[])qn.debug(`Cache Key: ${a?.cacheKey}, Cache Version: ${a?.cacheVersion}, Cache Scope: ${a?.scope}, Cache Created: ${a?.creationTime}`)}}})}function NQe(t,e,r){return yn(this,void 0,void 0,function*(){let n=new pQe.URL(t),i=(0,Cv.getDownloadOptions)(r);n.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield(0,cC.downloadCacheStorageSDK)(t,e,i):i.concurrentBlobDownloads?yield(0,cC.downloadCacheHttpClientConcurrent)(t,e,i):yield(0,cC.downloadCacheHttpClient)(t,e):yield(0,cC.downloadCacheHttpClient)(t,e)})}Er.downloadCache=NQe;function wQe(t,e,r){return yn(this,void 0,void 0,function*(){let n=Iv(),i=Bu.getCacheVersion(e,r?.compressionMethod,r?.enableCrossOsArchive),s={key:t,version:i,cacheSize:r?.cacheSize};return yield(0,Ko.retryTypedResponse)("reserveCache",()=>yn(this,void 0,void 0,function*(){return n.postJson(Rh("caches"),s)}))})}Er.reserveCache=wQe;function YV(t,e){return`bytes ${t}-${e}/*`}function xQe(t,e,r,n,i){return yn(this,void 0,void 0,function*(){qn.debug(`Uploading chunk of size ${i-n+1} bytes at offset ${n} with content range: ${YV(n,i)}`);let s={"Content-Type":"application/octet-stream","Content-Range":YV(n,i)},o=yield(0,Ko.retryHttpClientResponse)(`uploadChunk (start: ${n}, end: ${i})`,()=>yn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),s)}));if(!(0,Ko.isSuccessStatusCode)(o.message.statusCode))throw new Error(`Cache service responded with ${o.message.statusCode} during upload chunk.`)})}function SQe(t,e,r,n){return yn(this,void 0,void 0,function*(){let i=Bu.getArchiveFileSizeInBytes(r),s=Rh(`caches/${e.toString()}`),o=yv.openSync(r,"r"),a=(0,Cv.getUploadOptions)(n),A=Bu.assertDefined("uploadConcurrency",a.uploadConcurrency),c=Bu.assertDefined("uploadChunkSize",a.uploadChunkSize),l=[...new Array(A).keys()];qn.debug("Awaiting all uploads");let u=0;try{yield Promise.all(l.map(()=>yn(this,void 0,void 0,function*(){for(;u<i;){let d=Math.min(i-u,c),f=u,g=u+d-1;u+=c,yield xQe(t,s,()=>yv.createReadStream(r,{fd:o,start:f,end:g,autoClose:!1}).on("error",m=>{throw new Error(`Cache upload failed because file read failed with ${m.message}`)}),f,g)}})))}finally{yv.closeSync(o)}})}function vQe(t,e,r){return yn(this,void 0,void 0,function*(){let n={size:r};return yield(0,Ko.retryTypedResponse)("commitCache",()=>yn(this,void 0,void 0,function*(){return t.postJson(Rh(`caches/${e.toString()}`),n)}))})}function RQe(t,e,r,n){return yn(this,void 0,void 0,function*(){if((0,Cv.getUploadOptions)(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,yQe.uploadCacheArchiveSDK)(r,e,n)}else{let s=Iv();qn.debug("Upload cache"),yield SQe(s,t,e,n),qn.debug("Commiting cache");let o=Bu.getArchiveFileSizeInBytes(e);qn.info(`Cache Size: ~${Math.round(o/(1024*1024))} MB (${o} B)`);let a=yield vQe(s,t,o);if(!(0,Ko.isSuccessStatusCode)(a.statusCode))throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`);qn.info("Cache saved successfully")}})}Er.saveCache=RQe});var lC=h(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});Qu.isJsonObject=Qu.typeofJsonValue=void 0;function DQe(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}Qu.typeofJsonValue=DQe;function _Qe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}Qu.isJsonObject=_Qe});var dC=h(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.base64encode=bu.base64decode=void 0;var Zs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),uC=[];for(let t=0;t<Zs.length;t++)uC[Zs[t].charCodeAt(0)]=t;uC[45]=Zs.indexOf("+");uC[95]=Zs.indexOf("/");function kQe(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let r=new Uint8Array(e),n=0,i=0,s,o=0;for(let a=0;a<t.length;a++){if(s=uC[t.charCodeAt(a)],s===void 0)switch(t[a]){case"=":i=0;case`
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:o=s,i=1;break;case 1:r[n++]=o<<2|(s&48)>>4,o=s,i=2;break;case 2:r[n++]=(o&15)<<4|(s&60)>>2,o=s,i=3;break;case 3:r[n++]=(o&3)<<6|s,i=0;break}}if(i==1)throw Error("invalid base64 string.");return r.subarray(0,n)}ju.base64decode=G0e;function Y0e(t){let e="",r=0,n,i=0;for(let s=0;s<t.length;s++)switch(n=t[s],r){case 0:e+=mo[n>>2],i=(n&3)<<4,r=1;break;case 1:e+=mo[i|n>>4],i=(n&15)<<2,r=2;break;case 2:e+=mo[i|n>>6],e+=mo[n&63],r=0;break}return r&&(e+=mo[i],e+="=",r==1&&(e+="=")),e}ju.base64encode=Y0e});var D3=h(tI=>{"use strict";Object.defineProperty(tI,"__esModule",{value:!0});tI.utf8read=void 0;var Hv=t=>String.fromCharCode.apply(String,t);function J0e(t){if(t.length<1)return"";let e=0,r=[],n=[],i=0,s,o=t.length;for(;e<o;)s=t[e++],s<128?n[i++]=s:s>191&&s<224?n[i++]=(s&31)<<6|t[e++]&63:s>239&&s<365?(s=((s&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[i++]=55296+(s>>10),n[i++]=56320+(s&1023)):n[i++]=(s&15)<<12|(t[e++]&63)<<6|t[e++]&63,i>8191&&(r.push(Hv(n)),i=0);return r.length?(i&&r.push(Hv(n.slice(0,i))),r.join("")):Hv(n.slice(0,i))}tI.utf8read=J0e});var ag=h(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.WireType=Ss.mergeBinaryOptions=Ss.UnknownFieldHandler=void 0;var V0e;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,i,s,o)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:i,wireType:s,data:o})},t.onWrite=(r,n,i)=>{for(let{no:s,wireType:o,data:a}of t.list(n))i.tag(s,o).raw(a)},t.list=(r,n)=>{if(e(r)){let i=r[t.symbol];return n?i.filter(s=>s.no==n):i}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=r=>r&&Array.isArray(r[t.symbol])})(V0e=Ss.UnknownFieldHandler||(Ss.UnknownFieldHandler={}));function W0e(t,e){return Object.assign(Object.assign({},t),e)}Ss.mergeBinaryOptions=W0e;var $0e;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})($0e=Ss.WireType||(Ss.WireType={}))});var nI=h(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.varint32read=wn.varint32write=wn.int64toString=wn.int64fromString=wn.varint64write=wn.varint64read=void 0;function K0e(){let t=0,e=0;for(let n=0;n<28;n+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<n,(i&128)==0)return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,(r&128)==0)return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let i=this.buf[this.pos++];if(e|=(i&127)<<n,(i&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}wn.varint64read=K0e;function X0e(t,e,r){for(let s=0;s<28;s=s+7){let o=t>>>s,a=!(!(o>>>7)&&e==0),A=(a?o|128:o)&255;if(r.push(A),!a)return}let n=t>>>28&15|(e&7)<<4,i=e>>3!=0;if(r.push((i?n|128:n)&255),!!i){for(let s=3;s<31;s=s+7){let o=e>>>s,a=!!(o>>>7),A=(a?o|128:o)&255;if(r.push(A),!a)return}r.push(e>>>31&1)}}wn.varint64write=X0e;var rI=65536*65536;function Z0e(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,i=0;function s(o,a){let A=Number(t.slice(o,a));i*=r,n=n*r+A,n>=rI&&(i=i+(n/rI|0),n=n%rI)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[e,n,i]}wn.int64fromString=Z0e;function eNe(t,e){if(e>>>0<=2097151)return""+(rI*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,i=e>>16&65535,s=r+n*6777216+i*6710656,o=n+i*8147497,a=i*2,A=1e7;s>=A&&(o+=Math.floor(s/A),s%=A),o>=A&&(a+=Math.floor(o/A),o%=A);function c(l,u){let d=l?String(l):"";return u?"0000000".slice(d.length)+d:d}return c(a,0)+c(o,a)+c(s,1)}wn.int64toString=eNe;function tNe(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}wn.varint32write=tNe;function rNe(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}wn.varint32read=rNe});var ma=h(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.PbLong=ga.PbULong=ga.detectBi=void 0;var Ag=nI(),ft;function k3(){let t=new DataView(new ArrayBuffer(8));ft=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:t}:void 0}ga.detectBi=k3;k3();function P3(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var T3=/^-?[0-9]+$/,sI=4294967296,iI=2147483648,oI=class{c Line truncated `:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:o=s,i=1;break;case 1:r[n++]=o<<2|(s&48)>>4,o=s,i=2;break;case 2:r[n++]=(o&15)<<4|(s&60)>>2,o=s,i=3;break;case 3:r[n++]=(o&3)<<6|s,i=0;break}}if(i==1)throw Error("invalid base64 string.");return r.subarray(0,n)}bu.base64decode=kQe;function PQe(t){let e="",r=0,n,i=0;for(let s=0;s<t.length;s++)switch(n=t[s],r){case 0:e+=Zs[n>>2],i=(n&3)<<4,r=1;break;case 1:e+=Zs[i|n>>4],i=(n&15)<<2,r=2;break;case 2:e+=Zs[i|n>>6],e+=Zs[n&63],r=0;break}return r&&(e+=Zs[i],e+="=",r==1&&(e+="=")),e}bu.base64encode=PQe});var VV=h(fC=>{"use strict";Object.defineProperty(fC,"__esModule",{value:!0});fC.utf8read=void 0;var Bv=t=>String.fromCharCode.apply(String,t);function TQe(t){if(t.length<1)return"";let e=0,r=[],n=[],i=0,s,o=t.length;for(;e<o;)s=t[e++],s<128?n[i++]=s:s>191&&s<224?n[i++]=(s&31)<<6|t[e++]&63:s>239&&s<365?(s=((s&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[i++]=55296+(s>>10),n[i++]=56320+(s&1023)):n[i++]=(s&15)<<12|(t[e++]&63)<<6|t[e++]&63,i>8191&&(r.push(Bv(n)),i=0);return r.length?(i&&r.push(Bv(n.slice(0,i))),r.join("")):Bv(n.slice(0,i))}fC.utf8read=TQe});var Dh=h(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});fs.WireType=fs.mergeBinaryOptions=fs.UnknownFieldHandler=void 0;var OQe;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,i,s,o)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:i,wireType:s,data:o})},t.onWrite=(r,n,i)=>{for(let{no:s,wireType:o,data:a}of t.list(n))i.tag(s,o).raw(a)},t.list=(r,n)=>{if(e(r)){let i=r[t.symbol];return n?i.filter(s=>s.no==n):i}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=r=>r&&Array.isArray(r[t.symbol])})(OQe=fs.UnknownFieldHandler||(fs.UnknownFieldHandler={}));function MQe(t,e){return Object.assign(Object.assign({},t),e)}fs.mergeBinaryOptions=MQe;var LQe;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(LQe=fs.WireType||(fs.WireType={}))});var gC=h(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.varint32read=En.varint32write=En.int64toString=En.int64fromString=En.varint64write=En.varint64read=void 0;function FQe(){let t=0,e=0;for(let n=0;n<28;n+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<n,(i&128)==0)return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,(r&128)==0)return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let i=this.buf[this.pos++];if(e|=(i&127)<<n,(i&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}En.varint64read=FQe;function UQe(t,e,r){for(let s=0;s<28;s=s+7){let o=t>>>s,a=!(!(o>>>7)&&e==0),A=(a?o|128:o)&255;if(r.push(A),!a)return}let n=t>>>28&15|(e&7)<<4,i=e>>3!=0;if(r.push((i?n|128:n)&255),!!i){for(let s=3;s<31;s=s+7){let o=e>>>s,a=!!(o>>>7),A=(a?o|128:o)&255;if(r.push(A),!a)return}r.push(e>>>31&1)}}En.varint64write=UQe;var hC=65536*65536;function qQe(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,i=0;function s(o,a){let A=Number(t.slice(o,a));i*=r,n=n*r+A,n>=hC&&(i=i+(n/hC|0),n=n%hC)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[e,n,i]}En.int64fromString=qQe;function HQe(t,e){if(e>>>0<=2097151)return""+(hC*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,i=e>>16&65535,s=r+n*6777216+i*6710656,o=n+i*8147497,a=i*2,A=1e7;s>=A&&(o+=Math.floor(s/A),s%=A),o>=A&&(a+=Math.floor(o/A),o%=A);function c(l,u){let d=l?String(l):"";return u?"0000000".slice(d.length)+d:d}return c(a,0)+c(o,a)+c(s,1)}En.int64toString=HQe;function zQe(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}En.varint32write=zQe;function jQe(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}En.varint32read=jQe});var Zo=h(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.PbLong=Xo.PbULong=Xo.detectBi=void 0;var _h=gC(),ft;function WV(){let t=new DataView(new ArrayBuffer(8));ft=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:t}:void 0}Xo.detectBi=WV;WV();function $V(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var KV=/^-?[0-9]+$/,pC=4294967296,mC=2147483648,yC=class{c Line truncated
`)}};vI.RpcError=g_});var p_=h(DI=>{"use strict";Object.defineProperty(DI,"__esModule",{value:!0});DI.mergeRpcOptions=void 0;var u4=$u();function bwe(t,e){if(!e)return t;let r={};_I(t,r),_I(e,r);for(let n of Object.keys(e)){let i=e[n];switch(n){case"jsonOptions":r.jsonOptions=u4.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=u4.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},_I(t.meta,r.meta),_I(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(i):i.concat();break}}return r}DI.mergeRpcOptions=bwe;function _I(t,e){if(!t)return;let r=e;for(let[n,i]of Object.entries(t))i instanceof Date?r[n]=new Date(i.getTime()):Array.isArray(i)?r[n]=i.concat():r[n]=i}});var E_=h(PA=>{"use strict";Object.defineProperty(PA,"__esModule",{value:!0});PA.Deferred=PA.DeferredState=void 0;var vs;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(vs=PA.DeferredState||(PA.DeferredState={}));var y_=class{constructor(e=!0){this._state=vs.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==vs.PENDING)throw new Error(`cannot resolve ${vs[this.state].toLowerCase()}`);this._resolve(e),this._state=vs.RESOLVED}reject(e){if(this.state!==vs.PENDING)throw new Error(`cannot reject ${vs[this.state].toLowerCase()}`);this._reject(e),this._state=vs.REJECTED}resolvePending(e){this._state===vs.PENDING&&this.resolve(e)}rejectPending(e){this._state===vs.PENDING&&this.reject(e)}};PA.Deferred=y_});var I_=h(kI=>{"use strict";Object.defineProperty(kI,"__esModule",{value:!0});kI.RpcOutputStreamController=void 0;var d4=E_(),TA=$u(),C_=class{constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){TA.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){TA.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){TA.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){TA.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;TA.assert(e,"bad state"),TA.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new d4.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;TA.assert(n.state==d4.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};kI.RpcOutputStreamController=C_});var Q_=h(Ku=>{"use strict";var Nwe=Ku&&Ku.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ku,"__esModule",{value:!0});Ku.UnaryCall=void 0;var B_=class{constructor(e,r,n,i,s,o,a){this.method=e,this.requestHeaders=r,this.request=n,this.headers=i,this.response=s,this.status=o,this.trailers=a}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return Nwe(this,void 0,void 0,function*(){let[e,r,n,i]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:i}})}};Ku.UnaryCall=B_});var N_=h(Xu=>{"use strict";var wwe=Xu&&Xu.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Xu,"__esModule",{value:!0});Xu.ServerStreamingCall=void 0;var b_=class{constructor(e,r,n,i Line truncated `)}};HC.RpcError=Wv});var Kv=h(jC=>{"use strict";Object.defineProperty(jC,"__esModule",{value:!0});jC.mergeRpcOptions=void 0;var xW=Jt();function d0e(t,e){if(!e)return t;let r={};zC(t,r),zC(e,r);for(let n of Object.keys(e)){let i=e[n];switch(n){case"jsonOptions":r.jsonOptions=xW.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=xW.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},zC(t.meta,r.meta),zC(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(i):i.concat();break}}return r}jC.mergeRpcOptions=d0e;function zC(t,e){if(!t)return;let r=e;for(let[n,i]of Object.entries(t))i instanceof Date?r[n]=new Date(i.getTime()):Array.isArray(i)?r[n]=i.concat():r[n]=i}});var Zv=h(gA=>{"use strict";Object.defineProperty(gA,"__esModule",{value:!0});gA.Deferred=gA.DeferredState=void 0;var ms;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(ms=gA.DeferredState||(gA.DeferredState={}));var Xv=class{constructor(e=!0){this._state=ms.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==ms.PENDING)throw new Error(`cannot resolve ${ms[this.state].toLowerCase()}`);this._resolve(e),this._state=ms.RESOLVED}reject(e){if(this.state!==ms.PENDING)throw new Error(`cannot reject ${ms[this.state].toLowerCase()}`);this._reject(e),this._state=ms.REJECTED}resolvePending(e){this._state===ms.PENDING&&this.resolve(e)}rejectPending(e){this._state===ms.PENDING&&this.reject(e)}};gA.Deferred=Xv});var tR=h(GC=>{"use strict";Object.defineProperty(GC,"__esModule",{value:!0});GC.RpcOutputStreamController=void 0;var SW=Zv(),mA=Jt(),eR=class{constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){mA.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){mA.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){mA.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){mA.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;mA.assert(e,"bad state"),mA.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new SW.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;mA.assert(n.state==SW.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};GC.RpcOutputStreamController=eR});var nR=h(Du=>{"use strict";var f0e=Du&&Du.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Du,"__esModule",{value:!0});Du.UnaryCall=void 0;var rR=class{constructor(e,r,n,i,s,o,a){this.method=e,this.requestHeaders=r,this.request=n,this.headers=i,this.response=s,this.status=o,this.trailers=a}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return f0e(this,void 0,void 0,function*(){let[e,r,n,i]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:i}})}};Du.UnaryCall=rR});var sR=h(_u=>{"use strict";var h0e=_u&&_u.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(_u,"__esModule",{value:!0});_u.ServerStreamingCall=void 0;var iR=class{constructor(e,r,n,i Line truncated
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:o=s,i=1;break;case 1:r[n++]=o<<2|(s&48)>>4,o=s,i=2;break;case 2:r[n++]=(o&15)<<4|(s&60)>>2,o=s,i=3;break;case 3:r[n++]=(o&3)<<6|s,i=0;break}}if(i==1)throw Error("invalid base64 string.");return r.subarray(0,n)}sd.base64decode=Xwe;function Zwe(t){let e="",r=0,n,i=0;for(let s=0;s<t.length;s++)switch(n=t[s],r){case 0:e+=po[n>>2],i=(n&3)<<4,r=1;break;case 1:e+=po[i|n>>4],i=(n&15)<<2,r=2;break;case 2:e+=po[i|n>>6],e+=po[n&63],r=0;break}return r&&(e+=po[i],e+="=",r==1&&(e+="=")),e}sd.base64encode=Zwe});var E4=h(FI=>{"use strict";Object.defineProperty(FI,"__esModule",{value:!0});FI.utf8read=void 0;var D_=t=>String.fromCharCode.apply(String,t);function eSe(t){if(t.length<1)return"";let e=0,r=[],n=[],i=0,s,o=t.length;for(;e<o;)s=t[e++],s<128?n[i++]=s:s>191&&s<224?n[i++]=(s&31)<<6|t[e++]&63:s>239&&s<365?(s=((s&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[i++]=55296+(s>>10),n[i++]=56320+(s&1023)):n[i++]=(s&15)<<12|(t[e++]&63)<<6|t[e++]&63,i>8191&&(r.push(D_(n)),i=0);return r.length?(i&&r.push(D_(n.slice(0,i))),r.join("")):D_(n.slice(0,i))}FI.utf8read=eSe});var Ig=h(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.WireType=_s.mergeBinaryOptions=_s.UnknownFieldHandler=void 0;var tSe;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,i,s,o)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:i,wireType:s,data:o})},t.onWrite=(r,n,i)=>{for(let{no:s,wireType:o,data:a}of t.list(n))i.tag(s,o).raw(a)},t.list=(r,n)=>{if(e(r)){let i=r[t.symbol];return n?i.filter(s=>s.no==n):i}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=r=>r&&Array.isArray(r[t.symbol])})(tSe=_s.UnknownFieldHandler||(_s.UnknownFieldHandler={}));function rSe(t,e){return Object.assign(Object.assign({},t),e)}_s.mergeBinaryOptions=rSe;var nSe;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(nSe=_s.WireType||(_s.WireType={}))});var qI=h(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.varint32read=xn.varint32write=xn.int64toString=xn.int64fromString=xn.varint64write=xn.varint64read=void 0;function iSe(){let t=0,e=0;for(let n=0;n<28;n+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<n,(i&128)==0)return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,(r&128)==0)return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let i=this.buf[this.pos++];if(e|=(i&127)<<n,(i&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}xn.varint64read=iSe;function sSe(t,e,r){for(let s=0;s<28;s=s+7){let o=t>>>s,a=!(!(o>>>7)&&e==0),A=(a?o|128:o)&255;if(r.push(A),!a)return}let n=t>>>28&15|(e&7)<<4,i=e>>3!=0;if(r.push((i?n|128:n)&255),!!i){for(let s=3;s<31;s=s+7){let o=e>>>s,a=!!(o>>>7),A=(a?o|128:o)&255;if(r.push(A),!a)return}r.push(e>>>31&1)}}xn.varint64write=sSe;var UI=65536*65536;function oSe(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,i=0;function s(o,a){let A=Number(t.slice(o,a));i*=r,n=n*r+A,n>=UI&&(i=i+(n/UI|0),n=n%UI)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[e,n,i]}xn.int64fromString=oSe;function aSe(t,e){if(e>>>0<=2097151)return""+(UI*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,i=e>>16&65535,s=r+n*6777216+i*6710656,o=n+i*8147497,a=i*2,A=1e7;s>=A&&(o+=Math.floor(s/A),s%=A),o>=A&&(a+=Math.floor(o/A),o%=A);function c(l,u){let d=l?String(l):"";return u?"0000000".slice(d.length)+d:d}return c(a,0)+c(o,a)+c(s,1)}xn.int64toString=aSe;function ASe(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}xn.varint32write=ASe;function cSe(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}xn.varint32read=cSe});var Ea=h(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.PbLong=ya.PbULong=ya.detectBi=void 0;var Bg=qI(),ht;function C4(){let t=new DataView(new ArrayBuffer(8));ht=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:t}:void 0}ya.detectBi=C4;C4();function I4(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var B4=/^-?[0-9]+$/,jI=4294967296,HI=2147483648,zI=class{c Line truncated `));let n=yield xR(r,"create");yield SR(n,t)})}Ur.createTar=ANe});var Vh=h(qt=>{"use strict";var cNe=qt&&qt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lNe=qt&&qt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Jh=qt&&qt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&cNe(e,t,r);return lNe(e,t),e},Ju=qt&&qt.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(qt,"__esModule",{value:!0});qt.saveCache=qt.restoreCache=qt.isFeatureAvailable=qt.FinalizeCacheError=qt.ReserveCacheError=qt.ValidationError=void 0;var fe=Jh(it()),ZC=Jh(require("path")),xt=Jh(Vc()),Yu=Jh(JV()),VW=Jh(jW()),eI=aC(),ra=JW(),tI=qa(),yi=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};qt.ValidationError=yi;var pA=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};qt.ReserveCacheError=pA;var Yh=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};qt.FinalizeCacheError=Yh;function WW(t){if(!t||t.length===0)throw new yi("Path Validation Error: At least one directory or file path is required")}function vR(t){if(t.length>512)throw new yi(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new yi(`Key Validation Error: ${t} cannot contain commas.`)}function uNe(){return(0,eI.getCacheServiceVersion)()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}qt.isFeatureAvailable=uNe;function dNe(t,e,r,n,i=!1){return Ju(this,void 0,void 0,function*(){let s=(0,eI.getCacheServiceVersion)();return fe.debug(`Cache service version: ${s}`),WW(t),s==="v2"?yield hNe(t,e,r,n,i):yield fNe(t,e,r,n,i)})}qt.restoreCache=dNe;function fNe(t,e,r,n,i=!1){return Ju(this,void 0,void 0,function*(){r=r||[];let s=[e,...r];if(fe.debug("Resolved Keys:"),fe.debug(JSON.stringify(s)),s.length>10)throw new yi("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of s)vR(A);let o=yield xt.getCompressionMethod(),a="";try{let A=yield Yu.getCacheEntry(s,t,{compressionMethod:o,enableCrossOsArchive:i});if(!A?.archiveLocation)return;if(n?.lookupOnly)return fe.info("Lookup only - skipping download"),A.cacheKey;a=ZC.join(yield xt.createTempDirectory(),xt.getCacheFileName(o)),fe.debug(`Archive Path: ${a}`),yield Yu.downloadCache(A.archiveLocation,a,n),fe.isDebug()&&(yield(0,ra.listTar)(a,o));let c=xt.getArchiveFileSizeInBytes(a);return fe.info(`Cache Size: ~${Math.round(c/(1024*1024))} MB (${c} B)`),yield(0,ra.extractTar)(a,o),fe.info("Cache restored successfully"),A.cacheKey}catch(A){let c=A;if(c.name===yi.name)throw A;c instanceof tI.HttpClientError&&typeof c.statusCode=="number"&&c.statusCode>=500?fe.error(`Failed to restore: ${A.message}`):fe.warning(`Failed to restore: ${A.message}`)}finally{try{yield xt.unlinkFile(a)}catch(A){fe.debug(`Failed to delete archive: ${A}`)}}})}function hNe(t,e,r,n,i=!1){return Ju(this,void 0,void 0,function*(){n=Object.assign(Object.assign({},n),{useAzureSdk:!0}),r=r||[];let s=[e,...r];if(fe.debug("Resolved Keys:"),fe.debug(JSON.stringify(s)),s.length>10)throw new yi("Key Validation Error: Keys are limited to a maximum of 10.");for(let a of s)vR(a);let o="";try{let a=VW.internalCacheTwirpClient(),A=yield xt.getCompressionMethod(),c={key:e,restoreKeys:r,version:xt.getCacheVersion(t,A,i)},l=yield a.GetCacheEntryDownloadURL(c);if(!l.ok){fe.debug(`Cache not found for version ${c.version} of keys: ${s.join(", ")}`);return}if(c.key!==l.matchedKey?fe.info(`Cache hit for restore-key: ${l.matchedKey}`):fe.info(`Cache hit for: ${l.matchedKey}`),n?.lookupOnly)return fe.info("Lookup only - skipping download"),l.matchedKey;o=ZC.join(yield xt.createTempDirectory(),xt.getCacheFileName(A)),fe.debug(`Archive path: ${o}`),fe.debug(`Starting download of archive to: ${o}`),yield Yu.downloadCache(l.signedDownloadUrl,o,n);let d=xt.getArchiveFileSizeInBytes(o);return fe.info(`Cache Size: ~${Math.round(d/(1024*1024))} MB (${d} B)`),fe.isDebug()&&(yield(0,ra.listTar)(o,A)),yield(0,ra.extractTar)(o,A),fe.info("Cache restored successfully"),l.matchedKey}catch(a){let A=a;if(A.name===yi.name)throw a;A instanceof tI.HttpClientError&&typeof A.statusCode=="number"&&A.statusCode>=500?fe.error(`Line truncated
`));let n=yield yD(r,"create");yield ED(n,t)})}Yr.createTar=Wxe});var IB=h(Yt=>{"use strict";var $xe=Yt&&Yt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Kxe=Yt&&Yt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Tg=Yt&&Yt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&$xe(e,t,r);return Kxe(e,t),e},Id=Yt&&Yt.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.saveCache=Yt.restoreCache=Yt.isFeatureAvailable=Yt.FinalizeCacheError=Yt.ReserveCacheError=Yt.ValidationError=void 0;var he=Tg(at()),yB=Tg(require("path")),_t=Tg(fl()),Cd=Tg(_3()),l$=Tg(o$()),EB=WC(),Ba=c$(),CB=oA(),Ri=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};Yt.ValidationError=Ri;var MA=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};Yt.ReserveCacheError=MA;var Pg=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};Yt.FinalizeCacheError=Pg;function u$(t){if(!t||t.length===0)throw new Ri("Path Validation Error: At least one directory or file path is required")}function CD(t){if(t.length>512)throw new Ri(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Ri(`Key Validation Error: ${t} cannot contain commas.`)}function Xxe(){return(0,EB.getCacheServiceVersion)()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}Yt.isFeatureAvailable=Xxe;function Zxe(t,e,r,n,i=!1){return Id(this,void 0,void 0,function*(){let s=(0,EB.getCacheServiceVersion)();return he.debug(`Cache service version: ${s}`),u$(t),s==="v2"?yield tRe(t,e,r,n,i):yield eRe(t,e,r,n,i)})}Yt.restoreCache=Zxe;function eRe(t,e,r,n,i=!1){return Id(this,void 0,void 0,function*(){r=r||[];let s=[e,...r];if(he.debug("Resolved Keys:"),he.debug(JSON.stringify(s)),s.length>10)throw new Ri("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of s)CD(A);let o=yield _t.getCompressionMethod(),a="";try{let A=yield Cd.getCacheEntry(s,t,{compressionMethod:o,enableCrossOsArchive:i});if(!A?.archiveLocation)return;if(n?.lookupOnly)return he.info("Lookup only - skipping download"),A.cacheKey;a=yB.join(yield _t.createTempDirectory(),_t.getCacheFileName(o)),he.debug(`Archive Path: ${a}`),yield Cd.downloadCache(A.archiveLocation,a,n),he.isDebug()&&(yield(0,Ba.listTar)(a,o));let c=_t.getArchiveFileSizeInBytes(a);return he.info(`Cache Size: ~${Math.round(c/(1024*1024))} MB (${c} B)`),yield(0,Ba.extractTar)(a,o),he.info("Cache restored successfully"),A.cacheKey}catch(A){let c=A;if(c.name===Ri.name)throw A;c instanceof CB.HttpClientError&&typeof c.statusCode=="number"&&c.statusCode>=500?he.error(`Failed to restore: ${A.message}`):he.warning(`Failed to restore: ${A.message}`)}finally{try{yield _t.unlinkFile(a)}catch(A){he.debug(`Failed to delete archive: ${A}`)}}})}function tRe(t,e,r,n,i=!1){return Id(this,void 0,void 0,function*(){n=Object.assign(Object.assign({},n),{useAzureSdk:!0}),r=r||[];let s=[e,...r];if(he.debug("Resolved Keys:"),he.debug(JSON.stringify(s)),s.length>10)throw new Ri("Key Validation Error: Keys are limited to a maximum of 10.");for(let a of s)CD(a);let o="";try{let a=l$.internalCacheTwirpClient(),A=yield _t.getCompressionMethod(),c={key:e,restoreKeys:r,version:_t.getCacheVersion(t,A,i)},l=yield a.GetCacheEntryDownloadURL(c);if(!l.ok){he.debug(`Cache not found for version ${c.version} of keys: ${s.join(", ")}`);return}if(c.key!==l.matchedKey?he.info(`Cache hit for restore-key: ${l.matchedKey}`):he.info(`Cache hit for: ${l.matchedKey}`),n?.lookupOnly)return he.info("Lookup only - skipping download"),l.matchedKey;o=yB.join(yield _t.createTempDirectory(),_t.getCacheFileName(A)),he.debug(`Archive path: ${o}`),he.debug(`Starting download of archive to: ${o}`),yield Cd.downloadCache(l.signedDownloadUrl,o,n);let d=_t.getArchiveFileSizeInBytes(o);return he.info(`Cache Size: ~${Math.round(d/(1024*1024))} MB (${d} B)`),he.isDebug()&&(yield(0,Ba.listTar)(o,A)),yield(0,Ba.extractTar)(o,A),he.info("Cache restored successfully"),l.matchedKey}catch(a){let A=a;if(A.name===Ri.name)throw a;A instanceof CB.HttpClientError&&typeof A.statusCode=="number"&&A.statusCode>=500?he.error(`Line truncated
`),e=e.replace(/\r/g,` `),e=e.replace(/\r/g,`
`));let i=e.split(` `));let i=e.split(`
`).map(s=>s.trim());for(let s of i)!s||s.startsWith("#")||n.patterns.push(new b$.Pattern(s));return n.searchPaths.push(...xB.getSearchPaths(n.patterns)),n})}static stat(e,r,n){return xD(this,void 0,void 0,function*(){let i;if(r.followSymbolicLinks)try{i=yield qg.promises.stat(e.path)}catch(s){if(s.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){RD.debug(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw s}else i=yield qg.promises.lstat(e.path);if(i.isDirectory()&&r.followSymbolicLinks){let s=yield qg.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(o=>o===s)){RD.debug(`Symlink cycle detected for path '${e.path}' and realpath '${s}'`);return}n.push(s)}return i})}};Sr.DefaultGlobber=vD});var v$=h(Dn=>{"use strict";var LRe=Dn&&Dn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),MRe=Dn&&Dn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Bd=Dn&&Dn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&LRe(e,t,r);return MRe(e,t),e},FRe=Dn&&Dn.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})},URe=Dn&&Dn.__asyncValues||function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,A){o=t[s](o),i(a,A,o.done,o.value)})}}function i(s,o,a,A){Promise.resolve(A).then(function(c){s({value:c,done:a})},o)}};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.hashFiles=void 0;var S$=Bd(require("crypto")),x$=Bd(at()),R$=Bd(require("fs")),qRe=Bd(require("stream")),HRe=Bd(require("util")),jRe=Bd(require("path"));function zRe(t,e,r=!1){var n,i,s,o,a;return FRe(this,void 0,void 0,function*(){let A=r?x$.info:x$.debug,c=!1,l=e||((a=process.env.GITHUB_WORKSPACE)!==null&&a!==void 0?a:process.cwd()),u=S$.createHash("sha256"),d=0;try{for(var f=!0,g=URe(t.globGenerator()),m;m=yield g.next(),n=m.done,!n;f=!0){o=m.value,f=!1;let E=o;if(A(E),!E.startsWith(`${l}${jRe.sep}`)){A(`Ignore '${E}' since it is not under GITHUB_WORKSPACE.`);continue}if(R$.statSync(E).isDirectory()){A(`Skip directory '${E}'.`);continue}let C=S$.createHash("sha256");yield HRe.promisify(qRe.pipeline)(R$.createReadStream(E),C),u.write(C.digest()),d++,c||(c=!0)}}catch(E){i={error:E}}finally{try{!f&&!n&&(s=g.return)&&(yield s.call(g))}finally{if(i)throw i.error}}return u.end(),c?(A(`Found ${d} files to hash.`),u.digest("hex")):(A("No matches found for glob"),"")})}Dn.hashFiles=zRe});var k$=h(wa=>{"use strict";var _$=wa&&wa.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(wa,"__esModule",{value:!0});wa.hashFiles=wa.create=void 0;var GRe=w$(),YRe=v$();function D$(t,e){return _$(this,void 0,void 0,function*(){return yield GRe.DefaultGlobber.create(t,e)})}wa.create=D$;function JRe(t,e="",r,n=!1){return _$(this,void 0,void 0,function*(){let i=!0;r&&typeof r.followSymbolicLinks=="boolean"&&(i=r.followSymbolicLinks);let s=yield D$(t,{followSymbolicLinks:i});return(0,YRe.hashFiles)(s,e,n)})}wa.hashFiles=JRe});var Y$=h((x2e,G$)=>{"use strict";G$.exports=function(t){if(typeof t!="string")throw new Error("expected a string");return t.split(` `).map(s=>s.trim());for(let s of i)!s||s.startsWith("#")||n.patterns.push(new A4.Pattern(s));return n.searchPaths.push(...AI.getSearchPaths(n.patterns)),n})}static stat(e,r,n){return MR(this,void 0,void 0,function*(){let i;if(r.followSymbolicLinks)try{i=yield eg.promises.stat(e.path)}catch(s){if(s.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){LR.debug(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw s}else i=yield eg.promises.lstat(e.path);if(i.isDirectory()&&r.followSymbolicLinks){let s=yield eg.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(o=>o===s)){LR.debug(`Symlink cycle detected for path '${e.path}' and realpath '${s}'`);return}n.push(s)}return i})}};Ir.DefaultGlobber=FR});var h4=h(Qn=>{"use strict";var $Ne=Qn&&Qn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),KNe=Qn&&Qn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Vu=Qn&&Qn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&$Ne(e,t,r);return KNe(e,t),e},XNe=Qn&&Qn.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})},ZNe=Qn&&Qn.__asyncValues||function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,A){o=t[s](o),i(a,A,o.done,o.value)})}}function i(s,o,a,A){Promise.resolve(A).then(function(c){s({value:c,done:a})},o)}};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.hashFiles=void 0;var u4=Vu(require("crypto")),d4=Vu(it()),f4=Vu(require("fs")),ewe=Vu(require("stream")),twe=Vu(require("util")),rwe=Vu(require("path"));function nwe(t,e,r=!1){var n,i,s,o,a;return XNe(this,void 0,void 0,function*(){let A=r?d4.info:d4.debug,c=!1,l=e||((a=process.env.GITHUB_WORKSPACE)!==null&&a!==void 0?a:process.cwd()),u=u4.createHash("sha256"),d=0;try{for(var f=!0,g=ZNe(t.globGenerator()),m;m=yield g.next(),n=m.done,!n;f=!0){o=m.value,f=!1;let E=o;if(A(E),!E.startsWith(`${l}${rwe.sep}`)){A(`Ignore '${E}' since it is not under GITHUB_WORKSPACE.`);continue}if(f4.statSync(E).isDirectory()){A(`Skip directory '${E}'.`);continue}let C=u4.createHash("sha256");yield twe.promisify(ewe.pipeline)(f4.createReadStream(E),C),u.write(C.digest()),d++,c||(c=!0)}}catch(E){i={error:E}}finally{try{!f&&!n&&(s=g.return)&&(yield s.call(g))}finally{if(i)throw i.error}}return u.end(),c?(A(`Found ${d} files to hash.`),u.digest("hex")):(A("No matches found for glob"),"")})}Qn.hashFiles=nwe});var p4=h(oa=>{"use strict";var g4=oa&&oa.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function A(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){l.done?s(l.value):i(l.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(oa,"__esModule",{value:!0});oa.hashFiles=oa.create=void 0;var iwe=l4(),swe=h4();function m4(t,e){return g4(this,void 0,void 0,function*(){return yield iwe.DefaultGlobber.create(t,e)})}oa.create=m4;function owe(t,e="",r,n=!1){return g4(this,void 0,void 0,function*(){let i=!0;r&&typeof r.followSymbolicLinks=="boolean"&&(i=r.followSymbolicLinks);let s=yield m4(t,{followSymbolicLinks:i});return(0,swe.hashFiles)(s,e,n)})}oa.hashFiles=owe});var T4=h((bFe,P4)=>{"use strict";P4.exports=function(t){if(typeof t!="string")throw new Error("expected a string");return t.split(`
`).map(KRe).filter(Boolean)};function KRe(t,e){if(!t||!t.length||t.charAt(0)==="#")return null;var r=t.split(":");return{username:r[0],password:r[1],uid:r[2],gid:r[3],gecos:r[4],homedir:r[5],shell:r[6]}}});var V$=h((R2e,J$)=>{"use strict";var XRe=require("fs"),ZRe=Y$();function eve(){if(process.platform==="win32")return process.env.USERPROFILE?process.env.USERPROFILE:process.env.HOMEDRIVE&&process.env.HOMEPATH?process.env.HOMEDRIVE+process.env.HOMEPATH:process.env.HOME?process.env.HOME:null;if(process.env.HOME)return process.env.HOME;var t=nve("/etc/passwd"),e=tve(ZRe(t),rve());if(e)return e;var r=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return r?process.platform==="darwin"?"/Users/"+r:"/home/"+r:null}function tve(t,e){for(var r=t.length,n=0;n<r;n++)if(+t[n].uid===e)return t[n].homedir}function rve(){return typeof process.geteuid=="function"?process.geteuid():process.getuid()}function nve(t){try{return XRe.readFileSync(t,"utf8")}catch{return""}}J$.exports=eve});var $$=h((v2e,_D)=>{"use strict";var W$=require("os");typeof W$.homedir<"u"?_D.exports=W$.homedir:_D.exports=V$()});var Z$=h((_2e,X$)=>{var ive=$$(),K$=require("path");X$.exports=function(e){var r=ive();return e.charCodeAt(0)===126?e.charCodeAt(1)===43?K$.join(process.cwd(),e.slice(2)):r?K$.join(r,e.slice(1)):e:e}});var He=h(Tr=>{"use strict";var DD=Symbol.for("yaml.alias"),eK=Symbol.for("yaml.document"),RB=Symbol.for("yaml.map"),tK=Symbol.for("yaml.pair"),kD=Symbol.for("yaml.scalar"),vB=Symbol.for("yaml.seq"),Io=Symbol.for("yaml.node.type"),sve=t=>!!t&&typeof t=="object"&&t[Io]===DD,ove=t=>!!t&&typeof t=="object"&&t[Io]===eK,ave=t=>!!t&&typeof t=="object"&&t[Io]===RB,Ave=t=>!!t&&typeof t=="object"&&t[Io]===tK,rK=t=>!!t&&typeof t=="object"&&t[Io]===kD,cve=t=>!!t&&typeof t=="object"&&t[Io]===vB;function nK(t){if(t&&typeof t=="object")switch(t[Io]){case RB:case vB:return!0}return!1}function lve(t){if(t&&typeof t=="object")switch(t[Io]){case DD:case RB:case kD:case vB:return!0}return!1}var uve=t=>(rK(t)||nK(t))&&!!t.anchor;Tr.ALIAS=DD;Tr.DOC=eK;Tr.MAP=RB;Tr.NODE_TYPE=Io;Tr.PAIR=tK;Tr.SCALAR=kD;Tr.SEQ=vB;Tr.hasAnchor=uve;Tr.isAlias=sve;Tr.isCollection=nK;Tr.isDocument=ove;Tr.isMap=ave;Tr.isNode=lve;Tr.isPair=Ave;Tr.isScalar=rK;Tr.isSeq=cve});var jg=h(PD=>{"use strict";var dr=He(),kn=Symbol("break visit"),iK=Symbol("skip children"),Ps=Symbol("remove node");function _B(t,e){let r=sK(e);dr.isDocument(t)?bd(null,t.contents,r,Object.freeze([t]))===Ps&&(t.contents=null):bd(null,t,r,Object.freeze([]))}_B.BREAK=kn;_B.SKIP=iK;_B.REMOVE=Ps;function bd(t,e,r,n){let i=oK(t,e,r,n);if(dr.isNode(i)||dr.isPair(i))return aK(t,n,i),bd(t,i,r,n);if(typeof i!="symbol"){if(dr.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let o=bd(s,e.items[s],r,n);if(typeof o=="number")s=o-1;else{if(o===kn)return kn;o===Ps&&(e.items.splice(s,1),s-=1)}}}else if(dr.isPair(e)){n=Object.freeze(n.concat(e));let s=bd("key",e.key,r,n);if(s===kn)return kn;s===Ps&&(e.key=null);let o=bd("value",e.value,r,n);if(o===kn)return kn;o===Ps&&(e.value=null)}}return i}async function DB(t,e){let r=sK(e);dr.isDocument(t)?await Nd(null,t.contents,r,Object.freeze([t]))===Ps&&(t.contents=null):await Nd(null,t,r,Object.freeze([]))}DB.BREAK=kn;DB.SKIP=iK;DB.REMOVE=Ps;async function Nd(t,e,r,n){let i=await oK(t,e,r,n);if(dr.isNode(i)||dr.isPair(i))return aK(t,n,i),Nd(t,i,r,n);if(typeof i!="symbol"){if(dr.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let o=await Nd(s,e.items[s],r,n);if(typeof o=="number")s=o-1;else{if(o===kn)return kn;o===Ps&&(e.items.splice(s,1),s-=1)}}}else if(dr.isPair(e)){n=Object.freeze(n.concat(e));let s=await Nd("key",e.key,r,n);if(s===kn)return kn;s===Ps&&(e.key=null);let o=await Nd("value",e.value,r,n);if(o===kn)return kn;o===Ps&&(e.value=null)}}return i}function sK(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function oK(t,e,r,n){if(typeof r=="function")return r(t,e,n);if(dr.isMap(e))return r.Map?.(t,e,n);if(dr.isSeq(e))return r.Seq?.(t,e,n);if(dr.isPair(e))return r.Pair?.(t,e,n);if(dr.isScalar(e))return r.Scalar?.(t,e,n);if(dr.isAlias(e))return r.Alias?.(t,e,n)}function aK(t,e,r){let n=e[e.length-1];if(dr.isCollection(n))n.items[t]=r;else if(dr.isPair(n))t==="key"?n.key=r:n.value=r;else if(dr.isDocument(n))n.contents=r;else{let i=dr.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}PD.visit=_B;PD.visitAsync=DB});var TD=h(cK=>{"use strict";var AK=He(),dve=jg(),fve={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},hve=t=>t.replace(/[!,[\]{}]/g,e=>fve[e]),zg=class t{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart= Line truncated `).map(gwe).filter(Boolean)};function gwe(t,e){if(!t||!t.length||t.charAt(0)==="#")return null;var r=t.split(":");return{username:r[0],password:r[1],uid:r[2],gid:r[3],gecos:r[4],homedir:r[5],shell:r[6]}}});var M4=h((NFe,O4)=>{"use strict";var mwe=require("fs"),pwe=T4();function ywe(){if(process.platform==="win32")return process.env.USERPROFILE?process.env.USERPROFILE:process.env.HOMEDRIVE&&process.env.HOMEPATH?process.env.HOMEDRIVE+process.env.HOMEPATH:process.env.HOME?process.env.HOME:null;if(process.env.HOME)return process.env.HOME;var t=Iwe("/etc/passwd"),e=Ewe(pwe(t),Cwe());if(e)return e;var r=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return r?process.platform==="darwin"?"/Users/"+r:"/home/"+r:null}function Ewe(t,e){for(var r=t.length,n=0;n<r;n++)if(+t[n].uid===e)return t[n].homedir}function Cwe(){return typeof process.geteuid=="function"?process.geteuid():process.getuid()}function Iwe(t){try{return mwe.readFileSync(t,"utf8")}catch{return""}}O4.exports=ywe});var F4=h((wFe,YR)=>{"use strict";var L4=require("os");typeof L4.homedir<"u"?YR.exports=L4.homedir:YR.exports=M4()});var H4=h((xFe,q4)=>{var Bwe=F4(),U4=require("path");q4.exports=function(e){var r=Bwe();return e.charCodeAt(0)===126?e.charCodeAt(1)===43?U4.join(process.cwd(),e.slice(2)):r?U4.join(r,e.slice(1)):e:e}});var qe=h(vr=>{"use strict";var JR=Symbol.for("yaml.alias"),z4=Symbol.for("yaml.document"),dI=Symbol.for("yaml.map"),j4=Symbol.for("yaml.pair"),VR=Symbol.for("yaml.scalar"),fI=Symbol.for("yaml.seq"),no=Symbol.for("yaml.node.type"),Qwe=t=>!!t&&typeof t=="object"&&t[no]===JR,bwe=t=>!!t&&typeof t=="object"&&t[no]===z4,Nwe=t=>!!t&&typeof t=="object"&&t[no]===dI,wwe=t=>!!t&&typeof t=="object"&&t[no]===j4,G4=t=>!!t&&typeof t=="object"&&t[no]===VR,xwe=t=>!!t&&typeof t=="object"&&t[no]===fI;function Y4(t){if(t&&typeof t=="object")switch(t[no]){case dI:case fI:return!0}return!1}function Swe(t){if(t&&typeof t=="object")switch(t[no]){case JR:case dI:case VR:case fI:return!0}return!1}var vwe=t=>(G4(t)||Y4(t))&&!!t.anchor;vr.ALIAS=JR;vr.DOC=z4;vr.MAP=dI;vr.NODE_TYPE=no;vr.PAIR=j4;vr.SCALAR=VR;vr.SEQ=fI;vr.hasAnchor=vwe;vr.isAlias=Qwe;vr.isCollection=Y4;vr.isDocument=bwe;vr.isMap=Nwe;vr.isNode=Swe;vr.isPair=wwe;vr.isScalar=G4;vr.isSeq=xwe});var rg=h(WR=>{"use strict";var or=qe(),bn=Symbol("break visit"),J4=Symbol("skip children"),ys=Symbol("remove node");function hI(t,e){let r=V4(e);or.isDocument(t)?$u(null,t.contents,r,Object.freeze([t]))===ys&&(t.contents=null):$u(null,t,r,Object.freeze([]))}hI.BREAK=bn;hI.SKIP=J4;hI.REMOVE=ys;function $u(t,e,r,n){let i=W4(t,e,r,n);if(or.isNode(i)||or.isPair(i))return $4(t,n,i),$u(t,i,r,n);if(typeof i!="symbol"){if(or.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let o=$u(s,e.items[s],r,n);if(typeof o=="number")s=o-1;else{if(o===bn)return bn;o===ys&&(e.items.splice(s,1),s-=1)}}}else if(or.isPair(e)){n=Object.freeze(n.concat(e));let s=$u("key",e.key,r,n);if(s===bn)return bn;s===ys&&(e.key=null);let o=$u("value",e.value,r,n);if(o===bn)return bn;o===ys&&(e.value=null)}}return i}async function gI(t,e){let r=V4(e);or.isDocument(t)?await Ku(null,t.contents,r,Object.freeze([t]))===ys&&(t.contents=null):await Ku(null,t,r,Object.freeze([]))}gI.BREAK=bn;gI.SKIP=J4;gI.REMOVE=ys;async function Ku(t,e,r,n){let i=await W4(t,e,r,n);if(or.isNode(i)||or.isPair(i))return $4(t,n,i),Ku(t,i,r,n);if(typeof i!="symbol"){if(or.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){let o=await Ku(s,e.items[s],r,n);if(typeof o=="number")s=o-1;else{if(o===bn)return bn;o===ys&&(e.items.splice(s,1),s-=1)}}}else if(or.isPair(e)){n=Object.freeze(n.concat(e));let s=await Ku("key",e.key,r,n);if(s===bn)return bn;s===ys&&(e.key=null);let o=await Ku("value",e.value,r,n);if(o===bn)return bn;o===ys&&(e.value=null)}}return i}function V4(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function W4(t,e,r,n){if(typeof r=="function")return r(t,e,n);if(or.isMap(e))return r.Map?.(t,e,n);if(or.isSeq(e))return r.Seq?.(t,e,n);if(or.isPair(e))return r.Pair?.(t,e,n);if(or.isScalar(e))return r.Scalar?.(t,e,n);if(or.isAlias(e))return r.Alias?.(t,e,n)}function $4(t,e,r){let n=e[e.length-1];if(or.isCollection(n))n.items[t]=r;else if(or.isPair(n))t==="key"?n.key=r:n.value=r;else if(or.isDocument(n))n.contents=r;else{let i=or.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}WR.visit=hI;WR.visitAsync=gI});var $R=h(X4=>{"use strict";var K4=qe(),Rwe=rg(),Dwe={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},_we=t=>t.replace(/[!,[\]{}]/g,e=>Dwe[e]),ng=class t{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart= Line truncated
`)}};zg.defaultYaml={explicit:!1,version:"1.2"};zg.defaultTags={"!!":"tag:yaml.org,2002:"};cK.Directives=zg});var kB=h(Gg=>{"use strict";var lK=He(),gve=jg();function mve(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function uK(t){let e=new Set;return gve.visit(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}function dK(t,e){for(let r=1;;++r){let n=`${t}${r}`;if(!e.has(n))return n}}function pve(t,e){let r=[],n=new Map,i=null;return{onAnchor:s=>{r.push(s),i||(i=uK(t));let o=dK(e,i);return i.add(o),o},setAnchors:()=>{for(let s of r){let o=n.get(s);if(typeof o=="object"&&o.anchor&&(lK.isScalar(o.node)||lK.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:n}}Gg.anchorIsValid=mve;Gg.anchorNames=uK;Gg.createNodeAnchors=pve;Gg.findNewAnchor=dK});var OD=h(fK=>{"use strict";function Yg(t,e,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,s=n.length;i<s;++i){let o=n[i],a=Yg(t,n,String(i),o);a===void 0?delete n[i]:a!==o&&(n[i]=a)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let s=n.get(i),o=Yg(t,n,i,s);o===void 0?n.delete(i):o!==s&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let s=Yg(t,n,i,i);s===void 0?n.delete(i):s!==i&&(n.delete(i),n.add(s))}else for(let[i,s]of Object.entries(n)){let o=Yg(t,n,i,s);o===void 0?delete n[i]:o!==s&&(n[i]=o)}return t.call(e,r,n)}fK.applyReviver=Yg});var Sa=h(gK=>{"use strict";var yve=He();function hK(t,e,r){if(Array.isArray(t))return t.map((n,i)=>hK(n,String(i),r));if(t&&typeof t.toJSON=="function"){if(!r||!yve.hasAnchor(t))return t.toJSON(e,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n),r.onCreate=s=>{n.res=s,delete r.onCreate};let i=t.toJSON(e,r);return r.onCreate&&r.onCreate(i),i}return typeof t=="bigint"&&!r?.keep?Number(t):t}gK.toJS=hK});var PB=h(pK=>{"use strict";var Eve=OD(),mK=He(),Cve=Sa(),LD=class{constructor(e){Object.defineProperty(this,mK.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!mK.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=Cve.toJS(this,"",o);if(typeof i=="function")for(let{count:A,res:c}of o.anchors.values())i(c,A);return typeof s=="function"?Eve.applyReviver(s,{"":a},"",a):a}};pK.NodeBase=LD});var Jg=h(EK=>{"use strict";var Ive=kB(),yK=jg(),TB=He(),Bve=PB(),Qve=Sa(),MD=class extends Bve.NodeBase{constructor(e){super(TB.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let r;return yK.visit(e,{Node:(n,i)=>{if(i===this)return yK.visit.BREAK;i.anchor===this.source&&(r=i)}}),r}toJSON(e,r){if(!r)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:s}=r,o=this.resolve(i);if(!o){let A=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(A)}let a=n.get(o);if(a||(Qve.toJS(o,null,r),a=n.get(o)),!a||a.res===void 0){let A="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(A)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=OB(i,o,n)),a.count*a.aliasCount>s)){let A="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(A)}return a.res}toString(e,r,n){let i=`*${this.source}`;if(e){if(Ive.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}};function OB(t,e,r){if(TB.isAlias(e)){let n=e.resolve(t),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(TB.isCollection(e)){let n=0;for(let i of e.items){let s=OB(t,i,r);s>n&&(n=s)}return n}else if(TB.isPair(e)){let n=OB(t,e.key,r),i=OB(t,e.value,r);return Math.max(n,i)}return 1}EK.Alias=MD});var sr=h(FD=>{"use strict";var bve=He(),Nve=PB(),wve=Sa(),Sve=t=>!t||typeof t!="function"&&typeof t!="object",xa=class extends Nve.NodeBase{constructor(e){super(bve.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:wve.toJS(this.value,e,r)}toString(){return String(this.value)}};xa.BLOCK_FOLDED="BLOCK_FOLDED";xa.BLOCK_LITERAL="BLOCK_LITERAL";xa.PLAIN="PLAIN";xa.QUOTE_DOUBLE="QUOTE_DOUBLE";xa.QUOTE_SINGLE="QUOTE_SINGLE";FD.Scalar=xa;FD.isScalarValue=Sve});var Vg=h(IK=>{"use strict";var xve=Jg(),HA=He(),CK=sr(),Rve="tag:yaml.org,2002:";function vve(t,e,r){if(e){let n=r.filter(s=>s.tag===e),i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return r.find(n=>n.identify?.(t)&&!n.format)}function _ve(t,e,r){if(HA.isDocument(t)&&(t=t.contents),HA.isNode(t))r Line truncated `)}};ng.defaultYaml={explicit:!1,version:"1.2"};ng.defaultTags={"!!":"tag:yaml.org,2002:"};X4.Directives=ng});var mI=h(ig=>{"use strict";var Z4=qe(),kwe=rg();function Pwe(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function e3(t){let e=new Set;return kwe.visit(t,{Value(r,n){n.anchor&&e.add(n.anchor)}}),e}function t3(t,e){for(let r=1;;++r){let n=`${t}${r}`;if(!e.has(n))return n}}function Twe(t,e){let r=[],n=new Map,i=null;return{onAnchor:s=>{r.push(s),i||(i=e3(t));let o=t3(e,i);return i.add(o),o},setAnchors:()=>{for(let s of r){let o=n.get(s);if(typeof o=="object"&&o.anchor&&(Z4.isScalar(o.node)||Z4.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:n}}ig.anchorIsValid=Pwe;ig.anchorNames=e3;ig.createNodeAnchors=Twe;ig.findNewAnchor=t3});var KR=h(r3=>{"use strict";function sg(t,e,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,s=n.length;i<s;++i){let o=n[i],a=sg(t,n,String(i),o);a===void 0?delete n[i]:a!==o&&(n[i]=a)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let s=n.get(i),o=sg(t,n,i,s);o===void 0?n.delete(i):o!==s&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let s=sg(t,n,i,i);s===void 0?n.delete(i):s!==i&&(n.delete(i),n.add(s))}else for(let[i,s]of Object.entries(n)){let o=sg(t,n,i,s);o===void 0?delete n[i]:o!==s&&(n[i]=o)}return t.call(e,r,n)}r3.applyReviver=sg});var aa=h(i3=>{"use strict";var Owe=qe();function n3(t,e,r){if(Array.isArray(t))return t.map((n,i)=>n3(n,String(i),r));if(t&&typeof t.toJSON=="function"){if(!r||!Owe.hasAnchor(t))return t.toJSON(e,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n),r.onCreate=s=>{n.res=s,delete r.onCreate};let i=t.toJSON(e,r);return r.onCreate&&r.onCreate(i),i}return typeof t=="bigint"&&!r?.keep?Number(t):t}i3.toJS=n3});var pI=h(o3=>{"use strict";var Mwe=KR(),s3=qe(),Lwe=aa(),XR=class{constructor(e){Object.defineProperty(this,s3.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!s3.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=Lwe.toJS(this,"",o);if(typeof i=="function")for(let{count:A,res:c}of o.anchors.values())i(c,A);return typeof s=="function"?Mwe.applyReviver(s,{"":a},"",a):a}};o3.NodeBase=XR});var og=h(A3=>{"use strict";var Fwe=mI(),a3=rg(),yI=qe(),Uwe=pI(),qwe=aa(),ZR=class extends Uwe.NodeBase{constructor(e){super(yI.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let r;return a3.visit(e,{Node:(n,i)=>{if(i===this)return a3.visit.BREAK;i.anchor===this.source&&(r=i)}}),r}toJSON(e,r){if(!r)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:s}=r,o=this.resolve(i);if(!o){let A=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(A)}let a=n.get(o);if(a||(qwe.toJS(o,null,r),a=n.get(o)),!a||a.res===void 0){let A="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(A)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=EI(i,o,n)),a.count*a.aliasCount>s)){let A="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(A)}return a.res}toString(e,r,n){let i=`*${this.source}`;if(e){if(Fwe.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}};function EI(t,e,r){if(yI.isAlias(e)){let n=e.resolve(t),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(yI.isCollection(e)){let n=0;for(let i of e.items){let s=EI(t,i,r);s>n&&(n=s)}return n}else if(yI.isPair(e)){let n=EI(t,e.key,r),i=EI(t,e.value,r);return Math.max(n,i)}return 1}A3.Alias=ZR});var tr=h(eD=>{"use strict";var Hwe=qe(),zwe=pI(),jwe=aa(),Gwe=t=>!t||typeof t!="function"&&typeof t!="object",Aa=class extends zwe.NodeBase{constructor(e){super(Hwe.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:jwe.toJS(this.value,e,r)}toString(){return String(this.value)}};Aa.BLOCK_FOLDED="BLOCK_FOLDED";Aa.BLOCK_LITERAL="BLOCK_LITERAL";Aa.PLAIN="PLAIN";Aa.QUOTE_DOUBLE="QUOTE_DOUBLE";Aa.QUOTE_SINGLE="QUOTE_SINGLE";eD.Scalar=Aa;eD.isScalarValue=Gwe});var ag=h(l3=>{"use strict";var Ywe=og(),BA=qe(),c3=tr(),Jwe="tag:yaml.org,2002:";function Vwe(t,e,r){if(e){let n=r.filter(s=>s.tag===e),i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return r.find(n=>n.identify?.(t)&&!n.format)}function Wwe(t,e,r){if(BA.isDocument(t)&&(t=t.contents),BA.isNode(t))r Line truncated
`)?HD(r,e):r.includes(` `)?nD(r,e):r.includes(`
`)?` `)?`
`+HD(r,e):(t.endsWith(" ")?"":" ")+r;FB.indentComment=HD;FB.lineComment=Tve;FB.stringifyComment=Pve});var bK=h($g=>{"use strict";var Ove="flow",jD="block",UB="quoted";function Lve(t,e,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return t;i<s&&(s=0);let A=Math.max(1+s,1+i-e.length);if(t.length<=A)return t;let c=[],l={},u=i-e.length;typeof n=="number"&&(n>i-Math.max(2,s)?c.push(0):u=i-n);let d,f,g=!1,m=-1,E=-1,C=-1;r===jD&&(m=QK(t,m,e.length),m!==-1&&(u=m+A));for(let N;N=t[m+=1];){if(r===UB&&N==="\\"){switch(E=m,t[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}C=m}if(N===` `+nD(r,e):(t.endsWith(" ")?"":" ")+r;BI.indentComment=nD;BI.lineComment=Zwe;BI.stringifyComment=Xwe});var f3=h(cg=>{"use strict";var exe="flow",iD="block",QI="quoted";function txe(t,e,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return t;i<s&&(s=0);let A=Math.max(1+s,1+i-e.length);if(t.length<=A)return t;let c=[],l={},u=i-e.length;typeof n=="number"&&(n>i-Math.max(2,s)?c.push(0):u=i-n);let d,f,g=!1,m=-1,E=-1,C=-1;r===iD&&(m=d3(t,m,e.length),m!==-1&&(u=m+A));for(let b;b=t[m+=1];){if(r===QI&&b==="\\"){switch(E=m,t[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}C=m}if(b===`
`)r===jD&&(m=QK(t,m,e.length)),u=m+e.length+A,d=void 0;else{if(N===" "&&f&&f!==" "&&f!==` `)r===iD&&(m=d3(t,m,e.length)),u=m+e.length+A,d=void 0;else{if(b===" "&&f&&f!==" "&&f!==`
`&&f!==" "){let w=t[m+1];w&&w!==" "&&w!==` `&&f!==" "){let w=t[m+1];w&&w!==" "&&w!==`
`&&w!==" "&&(d=m)}if(m>=u)if(d)c.push(d),u=d+A,d=void 0;else if(r===UB){for(;f===" "||f===" ";)f=N,N=t[m+=1],g=!0;let w=m>C+1?m-2:E-1;if(l[w])return t;c.push(w),l[w]=!0,u=w+A,d=void 0}else g=!0}f=N}if(g&&a&&a(),c.length===0)return t;o&&o();let I=t.slice(0,c[0]);for(let N=0;N<c.length;++N){let w=c[N],v=c[N+1]||t.length;w===0?I=` `&&w!==" "&&(d=m)}if(m>=u)if(d)c.push(d),u=d+A,d=void 0;else if(r===QI){for(;f===" "||f===" ";)f=b,b=t[m+=1],g=!0;let w=m>C+1?m-2:E-1;if(l[w])return t;c.push(w),l[w]=!0,u=w+A,d=void 0}else g=!0}f=b}if(g&&a&&a(),c.length===0)return t;o&&o();let I=t.slice(0,c[0]);for(let b=0;b<c.length;++b){let w=c[b],R=c[b+1]||t.length;w===0?I=`
${e}${t.slice(0,v)}`:(r===UB&&l[w]&&(I+=`${t[w]}\\`),I+=` ${e}${t.slice(0,R)}`:(r===QI&&l[w]&&(I+=`${t[w]}\\`),I+=`
${e}${t.slice(w+1,v)}`)}return I}function QK(t,e,r){let n=e,i=e+1,s=t[i];for(;s===" "||s===" ";)if(e<i+r)s=t[++e];else{do s=t[++e];while(s&&s!==` ${e}${t.slice(w+1,R)}`)}return I}function d3(t,e,r){let n=e,i=e+1,s=t[i];for(;s===" "||s===" ";)if(e<i+r)s=t[++e];else{do s=t[++e];while(s&&s!==`
`);n=e,i=e+1,s=t[i]}return n}$g.FOLD_BLOCK=jD;$g.FOLD_FLOW=Ove;$g.FOLD_QUOTED=UB;$g.foldFlowLines=Lve});var Xg=h(NK=>{"use strict";var es=sr(),Ra=bK(),HB=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),jB=t=>/^(%|---|\.\.\.)/m.test(t);function Mve(t,e,r){if(!e||e<0)return!1;let n=e-r,i=t.length;if(i<=n)return!1;for(let s=0,o=0;s<i;++s)if(t[s]===` `);n=e,i=e+1,s=t[i]}return n}cg.FOLD_BLOCK=iD;cg.FOLD_FLOW=exe;cg.FOLD_QUOTED=QI;cg.foldFlowLines=txe});var ug=h(h3=>{"use strict";var qi=tr(),ca=f3(),NI=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),wI=t=>/^(%|---|\.\.\.)/m.test(t);function rxe(t,e,r){if(!e||e<0)return!1;let n=e-r,i=t.length;if(i<=n)return!1;for(let s=0,o=0;s<i;++s)if(t[s]===`
`){if(s-o>n)return!0;if(o=s+1,i-o<=n)return!1}return!0}function Kg(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(jB(t)?" ":""),o="",a=0;for(let A=0,c=r[A];c;c=r[++A])if(c===" "&&r[A+1]==="\\"&&r[A+2]==="n"&&(o+=r.slice(a,A)+"\\ ",A+=1,a=A,c="\\"),c==="\\")switch(r[A+1]){case"u":{o+=r.slice(a,A);let l=r.substr(A+2,4);switch(l){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:l.substr(0,2)==="00"?o+="\\x"+l.substr(2):o+=r.substr(A,6)}A+=5,a=A+1}break;case"n":if(n||r[A+2]==='"'||r.length<i)A+=1;else{for(o+=r.slice(a,A)+` `){if(s-o>n)return!0;if(o=s+1,i-o<=n)return!1}return!0}function lg(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(wI(t)?" ":""),o="",a=0;for(let A=0,c=r[A];c;c=r[++A])if(c===" "&&r[A+1]==="\\"&&r[A+2]==="n"&&(o+=r.slice(a,A)+"\\ ",A+=1,a=A,c="\\"),c==="\\")switch(r[A+1]){case"u":{o+=r.slice(a,A);let l=r.substr(A+2,4);switch(l){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:l.substr(0,2)==="00"?o+="\\x"+l.substr(2):o+=r.substr(A,6)}A+=5,a=A+1}break;case"n":if(n||r[A+2]==='"'||r.length<i)A+=1;else{for(o+=r.slice(a,A)+`
`;r[A+2]==="\\"&&r[A+3]==="n"&&r[A+4]!=='"';)o+=` `;r[A+2]==="\\"&&r[A+3]==="n"&&r[A+4]!=='"';)o+=`
`,A+=2;o+=s,r[A+2]===" "&&(o+="\\"),A+=1,a=A+1}break;default:A+=1}return o=a?o+r.slice(a):r,n?o:Ra.foldFlowLines(o,s,Ra.FOLD_QUOTED,HB(e,!1))}function zD(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(` `,A+=2;o+=s,r[A+2]===" "&&(o+="\\"),A+=1,a=A+1}break;default:A+=1}return o=a?o+r.slice(a):r,n?o:ca.foldFlowLines(o,s,ca.FOLD_QUOTED,NI(e,!1))}function sD(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
`)||/[ \t]\n|\n[ \t]/.test(t))return Kg(t,e);let r=e.indent||(jB(t)?" ":""),n="'"+t.replace(/'/g,"''").replace(/\n+/g,`$& `)||/[ \t]\n|\n[ \t]/.test(t))return lg(t,e);let r=e.indent||(wI(t)?" ":""),n="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
${r}`)+"'";return e.implicitKey?n:Ra.foldFlowLines(n,r,Ra.FOLD_FLOW,HB(e,!1))}function wd(t,e){let{singleQuote:r}=e.options,n;if(r===!1)n=Kg;else{let i=t.includes('"'),s=t.includes("'");i&&!s?n=zD:s&&!i?n=Kg:n=r?zD:Kg}return n(t,e)}var GD;try{GD=new RegExp(`(^|(?<! ${r}`)+"'";return e.implicitKey?n:ca.foldFlowLines(n,r,ca.FOLD_FLOW,NI(e,!1))}function Xu(t,e){let{singleQuote:r}=e.options,n;if(r===!1)n=lg;else{let i=t.includes('"'),s=t.includes("'");i&&!s?n=sD:s&&!i?n=lg:n=r?sD:lg}return n(t,e)}var oD;try{oD=new RegExp(`(^|(?<!
)) ))
+(?! +(?!
|$)`,"g")}catch{GD=/\n+(?!\n|$)/g}function qB({comment:t,type:e,value:r},n,i,s){let{blockQuote:o,commentString:a,lineWidth:A}=n.options;if(!o||/\n[\t ]+$/.test(r)||/^\s*$/.test(r))return wd(r,n);let c=n.indent||(n.forceBlockIndent||jB(r)?" ":""),l=o==="literal"?!0:o==="folded"||e===es.Scalar.BLOCK_FOLDED?!1:e===es.Scalar.BLOCK_LITERAL?!0:!Mve(r,A,c.length);if(!r)return l?`| |$)`,"g")}catch{oD=/\n+(?!\n|$)/g}function bI({comment:t,type:e,value:r},n,i,s){let{blockQuote:o,commentString:a,lineWidth:A}=n.options;if(!o||/\n[\t ]+$/.test(r)||/^\s*$/.test(r))return Xu(r,n);let c=n.indent||(n.forceBlockIndent||wI(r)?" ":""),l=o==="literal"?!0:o==="folded"||e===qi.Scalar.BLOCK_FOLDED?!1:e===qi.Scalar.BLOCK_LITERAL?!0:!rxe(r,A,c.length);if(!r)return l?`|
`:`> `:`>
`;let u,d;for(d=r.length;d>0;--d){let v=r[d-1];if(v!==` `;let u,d;for(d=r.length;d>0;--d){let R=r[d-1];if(R!==`
`&&v!==" "&&v!==" ")break}let f=r.substring(d),g=f.indexOf(` `&&R!==" "&&R!==" ")break}let f=r.substring(d),g=f.indexOf(`
`);g===-1?u="-":r===f||g!==f.length-1?(u="+",s&&s()):u="",f&&(r=r.slice(0,-f.length),f[f.length-1]===` `);g===-1?u="-":r===f||g!==f.length-1?(u="+",s&&s()):u="",f&&(r=r.slice(0,-f.length),f[f.length-1]===`
`&&(f=f.slice(0,-1)),f=f.replace(GD,`$&${c}`));let m=!1,E,C=-1;for(E=0;E<r.length;++E){let v=r[E];if(v===" ")m=!0;else if(v===` `&&(f=f.slice(0,-1)),f=f.replace(oD,`$&${c}`));let m=!1,E,C=-1;for(E=0;E<r.length;++E){let R=r[E];if(R===" ")m=!0;else if(R===`
`)C=E;else break}let I=r.substring(0,C<E?C+1:E);I&&(r=r.substring(I.length),I=I.replace(/\n+/g,`$&${c}`));let w=(m?c?"2":"1":"")+u;if(t&&(w+=" "+a(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!l){let v=r.replace(/\n+/g,` `)C=E;else break}let I=r.substring(0,C<E?C+1:E);I&&(r=r.substring(I.length),I=I.replace(/\n+/g,`$&${c}`));let w=(m?c?"2":"1":"")+u;if(t&&(w+=" "+a(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!l){let R=r.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),T=!1,U=HB(n,!0);o!=="folded"&&e!==es.Scalar.BLOCK_FOLDED&&(U.onOverflow=()=>{T=!0});let k=Ra.foldFlowLines(`${I}${v}${f}`,c,Ra.FOLD_BLOCK,U);if(!T)return`>${w} $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),T=!1,U=NI(n,!0);o!=="folded"&&e!==qi.Scalar.BLOCK_FOLDED&&(U.onOverflow=()=>{T=!0});let k=ca.foldFlowLines(`${I}${R}${f}`,c,ca.FOLD_BLOCK,U);if(!T)return`>${w}
${c}${k}`}return r=r.replace(/\n+/g,`$&${c}`),`|${w} ${c}${k}`}return r=r.replace(/\n+/g,`$&${c}`),`|${w}
${c}${I}${r}${f}`}function Fve(t,e,r,n){let{type:i,value:s}=t,{actualString:o,implicitKey:a,indent:A,indentStep:c,inFlow:l}=e;if(a&&s.includes(` ${c}${I}${r}${f}`}function nxe(t,e,r,n){let{type:i,value:s}=t,{actualString:o,implicitKey:a,indent:A,indentStep:c,inFlow:l}=e;if(a&&s.includes(`
`)||l&&/[[\]{},]/.test(s))return wd(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||l||!s.includes(` `)||l&&/[[\]{},]/.test(s))return Xu(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||l||!s.includes(`
`)?wd(s,e):qB(t,e,r,n);if(!a&&!l&&i!==es.Scalar.PLAIN&&s.includes(` `)?Xu(s,e):bI(t,e,r,n);if(!a&&!l&&i!==qi.Scalar.PLAIN&&s.includes(`
`))return qB(t,e,r,n);if(jB(s)){if(A==="")return e.forceBlockIndent=!0,qB(t,e,r,n);if(a&&A===c)return wd(s,e)}let u=s.replace(/\n+/g,`$& `))return bI(t,e,r,n);if(wI(s)){if(A==="")return e.forceBlockIndent=!0,bI(t,e,r,n);if(a&&A===c)return Xu(s,e)}let u=s.replace(/\n+/g,`$&
${A}`);if(o){let d=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(u),{compat:f,tags:g}=e.doc.schema;if(g.some(d)||f?.some(d))return wd(s,e)}return a?u:Ra.foldFlowLines(u,A,Ra.FOLD_FLOW,HB(e,!1))}function Uve(t,e,r,n){let{implicitKey:i,inFlow:s}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==es.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=es.Scalar.QUOTE_DOUBLE);let A=l=>{switch(l){case es.Scalar.BLOCK_FOLDED:case es.Scalar.BLOCK_LITERAL:return i||s?wd(o.value,e):qB(o,e,r,n);case es.Scalar.QUOTE_DOUBLE:return Kg(o.value,e);case es.Scalar.QUOTE_SINGLE:return zD(o.value,e);case es.Scalar.PLAIN:return Fve(o,e,r,n);default:return null}},c=A(a);if(c===null){let{defaultKeyType:l,defaultStringType:u}=e.options,d=i&&l||u;if(c=A(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}NK.stringifyString=Uve});var Zg=h(YD=>{"use strict";var qve=kB(),va=He(),Hve=Wg(),jve=Xg();function zve(t,e){let r=Object.assign({blockQuote:!0,commentString:Hve.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function Gve(t,e){if(e.tag){let i=t.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let r,n;if(va.isScalar(e)){n=e.value;let i=t.filter(s=>s.identify?.(n));if(i.length>1){let s=i.filter(o=>o.test);s.length>0&&(i=s)}r=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else n=e,r=t.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??typeof n;throw new Error(`Tag not resolved for ${i} value`)}return r}function Yve(t,e,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],s=(va.isScalar(t)||va.isCollection(t))&&t.anchor;s&&qve.anchorIsValid(s)&&(r.add(s),i.push(`&${s}`));let o=t.tag?t.tag:e.default?null:e.tag;return o&&i.push(n.directives.tagString(o)),i.join(" ")}function Jve(t,e,r,n){if(va.isPair(t))return t.toString(e,r,n);if(va.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i,s=va.isNode(t)?t:e.doc.createNode(t,{onTagObj:A=>i=A});i||(i=Gve(e.doc.schema.tags,s));let o=Yve(s,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof i.stringify=="function"?i.stringify(s,e,r,n):va.isScalar(s)?jve.stringifyString(s,e,r,n):s.toString(e,r,n);return o?va.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o} ${A}`);if(o){let d=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(u),{compat:f,tags:g}=e.doc.schema;if(g.some(d)||f?.some(d))return Xu(s,e)}return a?u:ca.foldFlowLines(u,A,ca.FOLD_FLOW,NI(e,!1))}function ixe(t,e,r,n){let{implicitKey:i,inFlow:s}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==qi.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=qi.Scalar.QUOTE_DOUBLE);let A=l=>{switch(l){case qi.Scalar.BLOCK_FOLDED:case qi.Scalar.BLOCK_LITERAL:return i||s?Xu(o.value,e):bI(o,e,r,n);case qi.Scalar.QUOTE_DOUBLE:return lg(o.value,e);case qi.Scalar.QUOTE_SINGLE:return sD(o.value,e);case qi.Scalar.PLAIN:return nxe(o,e,r,n);default:return null}},c=A(a);if(c===null){let{defaultKeyType:l,defaultStringType:u}=e.options,d=i&&l||u;if(c=A(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}h3.stringifyString=ixe});var dg=h(aD=>{"use strict";var sxe=mI(),la=qe(),oxe=Ag(),axe=ug();function Axe(t,e){let r=Object.assign({blockQuote:!0,commentString:oxe.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function cxe(t,e){if(e.tag){let i=t.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let r,n;if(la.isScalar(e)){n=e.value;let i=t.filter(s=>s.identify?.(n));if(i.length>1){let s=i.filter(o=>o.test);s.length>0&&(i=s)}r=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else n=e,r=t.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??typeof n;throw new Error(`Tag not resolved for ${i} value`)}return r}function lxe(t,e,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],s=(la.isScalar(t)||la.isCollection(t))&&t.anchor;s&&sxe.anchorIsValid(s)&&(r.add(s),i.push(`&${s}`));let o=t.tag?t.tag:e.default?null:e.tag;return o&&i.push(n.directives.tagString(o)),i.join(" ")}function uxe(t,e,r,n){if(la.isPair(t))return t.toString(e,r,n);if(la.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i,s=la.isNode(t)?t:e.doc.createNode(t,{onTagObj:A=>i=A});i||(i=cxe(e.doc.schema.tags,s));let o=lxe(s,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof i.stringify=="function"?i.stringify(s,e,r,n):la.isScalar(s)?axe.stringifyString(s,e,r,n):s.toString(e,r,n);return o?la.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
${e.indent}${a}`:a}YD.createStringifyContext=zve;YD.stringify=Jve});var RK=h(xK=>{"use strict";var Bo=He(),wK=sr(),SK=Zg(),em=Wg();function Vve({key:t,value:e},r,n,i){let{allNullValues:s,doc:o,indent:a,indentStep:A,options:{commentString:c,indentSeq:l,simpleKeys:u}}=r,d=Bo.isNode(t)&&t.comment||null;if(u){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(Bo.isCollection(t)||!Bo.isNode(t)&&typeof t=="object"){let U="With simple keys, collection cannot be used as a key value";throw new Error(U)}}let f=!u&&(!t||d&&e==null&&!r.inFlow||Bo.isCollection(t)||(Bo.isScalar(t)?t.type===wK.Scalar.BLOCK_FOLDED||t.type===wK.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!f&&(u||!s),indent:a+A});let g=!1,m=!1,E=SK.stringify(t,r,()=>g=!0,()=>m=!0);if(!f&&!r.inFlow&&E.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(r.inFlow){if(s||e==null)return g&&n&&n(),E===""?"?":f?`? ${E}`:E}else if(s&&!u||e==null&&f)return E=`? ${E}`,d&&!g?E+=em.lineComment(E,r.indent,c(d)):m&&i&&i(),E;g&&(d=null),f?(d&&(E+=em.lineComment(E,r.indent,c(d))),E=`? ${E} ${e.indent}${a}`:a}aD.createStringifyContext=Axe;aD.stringify=uxe});var y3=h(p3=>{"use strict";var io=qe(),g3=tr(),m3=dg(),fg=Ag();function dxe({key:t,value:e},r,n,i){let{allNullValues:s,doc:o,indent:a,indentStep:A,options:{commentString:c,indentSeq:l,simpleKeys:u}}=r,d=io.isNode(t)&&t.comment||null;if(u){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(io.isCollection(t)||!io.isNode(t)&&typeof t=="object"){let U="With simple keys, collection cannot be used as a key value";throw new Error(U)}}let f=!u&&(!t||d&&e==null&&!r.inFlow||io.isCollection(t)||(io.isScalar(t)?t.type===g3.Scalar.BLOCK_FOLDED||t.type===g3.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!f&&(u||!s),indent:a+A});let g=!1,m=!1,E=m3.stringify(t,r,()=>g=!0,()=>m=!0);if(!f&&!r.inFlow&&E.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(r.inFlow){if(s||e==null)return g&&n&&n(),E===""?"?":f?`? ${E}`:E}else if(s&&!u||e==null&&f)return E=`? ${E}`,d&&!g?E+=fg.lineComment(E,r.indent,c(d)):m&&i&&i(),E;g&&(d=null),f?(d&&(E+=fg.lineComment(E,r.indent,c(d))),E=`? ${E}
${a}:`):(E=`${E}:`,d&&(E+=em.lineComment(E,r.indent,c(d))));let C,I,N;Bo.isNode(e)?(C=!!e.spaceBefore,I=e.commentBefore,N=e.comment):(C=!1,I=null,N=null,e&&typeof e=="object"&&(e=o.createNode(e))),r.implicitKey=!1,!f&&!d&&Bo.isScalar(e)&&(r.indentAtStart=E.length+1),m=!1,!l&&A.length>=2&&!r.inFlow&&!f&&Bo.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let w=!1,v=SK.stringify(e,r,()=>w=!0,()=>m=!0),T=" ";if(d||C||I){if(T=C?` ${a}:`):(E=`${E}:`,d&&(E+=fg.lineComment(E,r.indent,c(d))));let C,I,b;io.isNode(e)?(C=!!e.spaceBefore,I=e.commentBefore,b=e.comment):(C=!1,I=null,b=null,e&&typeof e=="object"&&(e=o.createNode(e))),r.implicitKey=!1,!f&&!d&&io.isScalar(e)&&(r.indentAtStart=E.length+1),m=!1,!l&&A.length>=2&&!r.inFlow&&!f&&io.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let w=!1,R=m3.stringify(e,r,()=>w=!0,()=>m=!0),T=" ";if(d||C||I){if(T=C?`
`:"",I){let U=c(I);T+=` `:"",I){let U=c(I);T+=`
${em.indentComment(U,r.indent)}`}v===""&&!r.inFlow?T===` ${fg.indentComment(U,r.indent)}`}R===""&&!r.inFlow?T===`
`&&(T=` `&&(T=`
`):T+=` `):T+=`
${r.indent}`}else if(!f&&Bo.isCollection(e)){let U=v[0],k=v.indexOf(` ${r.indent}`}else if(!f&&io.isCollection(e)){let U=R[0],k=R.indexOf(`
`),J=k!==-1,be=r.inFlow??e.flow??e.items.length===0;if(J||!be){let Re=!1;if(J&&(U==="&"||U==="!")){let H=v.indexOf(" ");U==="&"&&H!==-1&&H<k&&v[H+1]==="!"&&(H=v.indexOf(" ",H+1)),(H===-1||k<H)&&(Re=!0)}Re||(T=` `),J=k!==-1,Qe=r.inFlow??e.flow??e.items.length===0;if(J||!Qe){let Se=!1;if(J&&(U==="&"||U==="!")){let H=R.indexOf(" ");U==="&"&&H!==-1&&H<k&&R[H+1]==="!"&&(H=R.indexOf(" ",H+1)),(H===-1||k<H)&&(Se=!0)}Se||(T=`
${r.indent}`)}}else(v===""||v[0]===` ${r.indent}`)}}else(R===""||R[0]===`
`)&&(T="");return E+=T+v,r.inFlow?w&&n&&n():N&&!w?E+=em.lineComment(E,r.indent,c(N)):m&&i&&i(),E}xK.stringifyPair=Vve});var VD=h(JD=>{"use strict";var vK=require("node:process");function Wve(t,...e){t==="debug"&&console.log(...e)}function $ve(t,e){(t==="debug"||t==="warn")&&(typeof vK.emitWarning=="function"?vK.emitWarning(e):console.warn(e))}JD.debug=Wve;JD.warn=$ve});var JB=h(YB=>{"use strict";var tm=He(),_K=sr(),zB="<<",GB={identify:t=>t===zB||typeof t=="symbol"&&t.description===zB,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new _K.Scalar(Symbol(zB)),{addToJSMap:DK}),stringify:()=>zB},Kve=(t,e)=>(GB.identify(e)||tm.isScalar(e)&&(!e.type||e.type===_K.Scalar.PLAIN)&&GB.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===GB.tag&&r.default);function DK(t,e,r){if(r=t&&tm.isAlias(r)?r.resolve(t.doc):r,tm.isSeq(r))for(let n of r.items)WD(t,e,n);else if(Array.isArray(r))for(let n of r)WD(t,e,n);else WD(t,e,r)}function WD(t,e,r){let n=t&&tm.isAlias(r)?r.resolve(t.doc):r;if(!tm.isMap(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,t,Map);for(let[s,o]of i)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}YB.addMergeToJSMap=DK;YB.isMergeKey=Kve;YB.merge=GB});var KD=h(TK=>{"use strict";var Xve=VD(),kK=JB(),Zve=Zg(),PK=He(),$D=Sa();function e_e(t,e,{key:r,value:n}){if(PK.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(kK.isMergeKey(t,r))kK.addMergeToJSMap(t,e,n);else{let i=$D.toJS(r,"",t);if(e instanceof Map)e.set(i,$D.toJS(n,i,t));else if(e instanceof Set)e.add(i);else{let s=t_e(r,i,t),o=$D.toJS(n,s,t);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function t_e(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(PK.isNode(t)&&r?.doc){let n=Zve.createStringifyContext(r.doc,{});n.anchors=new Set;for(let s of r.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=t.toString(n);if(!r.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),Xve.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(e)}TK.addPairToJSMap=e_e});var _a=h(XD=>{"use strict";var OK=Vg(),r_e=RK(),n_e=KD(),VB=He();function i_e(t,e,r){let n=OK.createNode(t,void 0,r),i=OK.createNode(e,void 0,r);return new WB(n,i)}var WB=class t{constructor(e,r=null){Object.defineProperty(this,VB.NODE_TYPE,{value:VB.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return VB.isNode(r)&&(r=r.clone(e)),VB.isNode(n)&&(n=n.clone(e)),new t(r,n)}toJSON(e,r){let n=r?.mapAsMap?new Map:{};return n_e.addPairToJSMap(r,n,this)}toString(e,r,n){return e?.doc?r_e.stringifyPair(this,e,r,n):JSON.stringify(this)}};XD.Pair=WB;XD.createPair=i_e});var ZD=h(MK=>{"use strict";var jA=He(),LK=Zg(),$B=Wg();function s_e(t,e,r){return(e.inFlow??t.flow?a_e:o_e)(t,e,r)}function o_e({comment:t,items:e},r,{blockItemPrefix:n,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:A,options:{commentString:c}}=r,l=Object.assign({},r,{indent:s,type:null}),u=!1,d=[];for(let g=0;g<e.length;++g){let m=e[g],E=null;if(jA.isNode(m))!u&&m.spaceBefore&&d.push(""),KB(r,d,m.commentBefore,u),m.comment&&(E=m.comment);else if(jA.isPair(m)){let I=jA.isNode(m.key)?m.key:null;I&&(!u&&I.spaceBefore&&d.push(""),KB(r,d,I.commentBefore,u))}u=!1;let C=LK.stringify(m,l,()=>E=null,()=>u=!0);E&&(C+=$B.lineComment(C,s,c(E))),u&&E&&(u=!1),d.push(n+C)}let f;if(d.length===0)f=i.start+i.end;else{f=d[0];for(let g=1;g<d.length;++g){let m=d[g];f+=m?` `)&&(T="");return E+=T+R,r.inFlow?w&&n&&n():b&&!w?E+=fg.lineComment(E,r.indent,c(b)):m&&i&&i(),E}p3.stringifyPair=dxe});var cD=h(AD=>{"use strict";var E3=require("node:process");function fxe(t,...e){t==="debug"&&console.log(...e)}function hxe(t,e){(t==="debug"||t==="warn")&&(typeof E3.emitWarning=="function"?E3.emitWarning(e):console.warn(e))}AD.debug=fxe;AD.warn=hxe});var RI=h(vI=>{"use strict";var hg=qe(),C3=tr(),xI="<<",SI={identify:t=>t===xI||typeof t=="symbol"&&t.description===xI,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new C3.Scalar(Symbol(xI)),{addToJSMap:I3}),stringify:()=>xI},gxe=(t,e)=>(SI.identify(e)||hg.isScalar(e)&&(!e.type||e.type===C3.Scalar.PLAIN)&&SI.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===SI.tag&&r.default);function I3(t,e,r){if(r=t&&hg.isAlias(r)?r.resolve(t.doc):r,hg.isSeq(r))for(let n of r.items)lD(t,e,n);else if(Array.isArray(r))for(let n of r)lD(t,e,n);else lD(t,e,r)}function lD(t,e,r){let n=t&&hg.isAlias(r)?r.resolve(t.doc):r;if(!hg.isMap(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,t,Map);for(let[s,o]of i)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}vI.addMergeToJSMap=I3;vI.isMergeKey=gxe;vI.merge=SI});var dD=h(b3=>{"use strict";var mxe=cD(),B3=RI(),pxe=dg(),Q3=qe(),uD=aa();function yxe(t,e,{key:r,value:n}){if(Q3.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,n);else if(B3.isMergeKey(t,r))B3.addMergeToJSMap(t,e,n);else{let i=uD.toJS(r,"",t);if(e instanceof Map)e.set(i,uD.toJS(n,i,t));else if(e instanceof Set)e.add(i);else{let s=Exe(r,i,t),o=uD.toJS(n,s,t);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function Exe(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(Q3.isNode(t)&&r?.doc){let n=pxe.createStringifyContext(r.doc,{});n.anchors=new Set;for(let s of r.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=t.toString(n);if(!r.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),mxe.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(e)}b3.addPairToJSMap=yxe});var ua=h(fD=>{"use strict";var N3=ag(),Cxe=y3(),Ixe=dD(),DI=qe();function Bxe(t,e,r){let n=N3.createNode(t,void 0,r),i=N3.createNode(e,void 0,r);return new _I(n,i)}var _I=class t{constructor(e,r=null){Object.defineProperty(this,DI.NODE_TYPE,{value:DI.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:n}=this;return DI.isNode(r)&&(r=r.clone(e)),DI.isNode(n)&&(n=n.clone(e)),new t(r,n)}toJSON(e,r){let n=r?.mapAsMap?new Map:{};return Ixe.addPairToJSMap(r,n,this)}toString(e,r,n){return e?.doc?Cxe.stringifyPair(this,e,r,n):JSON.stringify(this)}};fD.Pair=_I;fD.createPair=Bxe});var hD=h(x3=>{"use strict";var QA=qe(),w3=dg(),kI=Ag();function Qxe(t,e,r){return(e.inFlow??t.flow?Nxe:bxe)(t,e,r)}function bxe({comment:t,items:e},r,{blockItemPrefix:n,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:A,options:{commentString:c}}=r,l=Object.assign({},r,{indent:s,type:null}),u=!1,d=[];for(let g=0;g<e.length;++g){let m=e[g],E=null;if(QA.isNode(m))!u&&m.spaceBefore&&d.push(""),PI(r,d,m.commentBefore,u),m.comment&&(E=m.comment);else if(QA.isPair(m)){let I=QA.isNode(m.key)?m.key:null;I&&(!u&&I.spaceBefore&&d.push(""),PI(r,d,I.commentBefore,u))}u=!1;let C=w3.stringify(m,l,()=>E=null,()=>u=!0);E&&(C+=kI.lineComment(C,s,c(E))),u&&E&&(u=!1),d.push(n+C)}let f;if(d.length===0)f=i.start+i.end;else{f=d[0];for(let g=1;g<d.length;++g){let m=d[g];f+=m?`
${A}${m}`:` ${A}${m}`:`
`}}return t?(f+=` `}}return t?(f+=`
`+$B.indentComment(c(t),A),a&&a()):u&&o&&o(),f}function a_e({items:t},e,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;n+=s;let A=Object.assign({},e,{indent:n,inFlow:!0,type:null}),c=!1,l=0,u=[];for(let g=0;g<t.length;++g){let m=t[g],E=null;if(jA.isNode(m))m.spaceBefore&&u.push(""),KB(e,u,m.commentBefore,!1),m.comment&&(E=m.comment);else if(jA.isPair(m)){let I=jA.isNode(m.key)?m.key:null;I&&(I.spaceBefore&&u.push(""),KB(e,u,I.commentBefore,!1),I.comment&&(c=!0));let N=jA.isNode(m.value)?m.value:null;N?(N.comment&&(E=N.comment),N.commentBefore&&(c=!0)):m.value==null&&I?.comment&&(E=I.comment)}E&&(c=!0);let C=LK.stringify(m,A,()=>E=null);g<t.length-1&&(C+=","),E&&(C+=$B.lineComment(C,n,a(E))),!c&&(u.length>l||C.includes(` `+kI.indentComment(c(t),A),a&&a()):u&&o&&o(),f}function Nxe({items:t},e,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;n+=s;let A=Object.assign({},e,{indent:n,inFlow:!0,type:null}),c=!1,l=0,u=[];for(let g=0;g<t.length;++g){let m=t[g],E=null;if(QA.isNode(m))m.spaceBefore&&u.push(""),PI(e,u,m.commentBefore,!1),m.comment&&(E=m.comment);else if(QA.isPair(m)){let I=QA.isNode(m.key)?m.key:null;I&&(I.spaceBefore&&u.push(""),PI(e,u,I.commentBefore,!1),I.comment&&(c=!0));let b=QA.isNode(m.value)?m.value:null;b?(b.comment&&(E=b.comment),b.commentBefore&&(c=!0)):m.value==null&&I?.comment&&(E=I.comment)}E&&(c=!0);let C=w3.stringify(m,A,()=>E=null);g<t.length-1&&(C+=","),E&&(C+=kI.lineComment(C,n,a(E))),!c&&(u.length>l||C.includes(`
`))&&(c=!0),u.push(C),l=u.length}let{start:d,end:f}=r;if(u.length===0)return d+f;if(!c){let g=u.reduce((m,E)=>m+E.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=d;for(let m of u)g+=m?` `))&&(c=!0),u.push(C),l=u.length}let{start:d,end:f}=r;if(u.length===0)return d+f;if(!c){let g=u.reduce((m,E)=>m+E.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=d;for(let m of u)g+=m?`
${s}${i}${m}`:` ${s}${i}${m}`:`
`;return`${g} `;return`${g}
${i}${f}`}else return`${d}${o}${u.join(" ")}${o}${f}`}function KB({indent:t,options:{commentString:e}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let s=$B.indentComment(e(n),t);r.push(s.trimStart())}}MK.stringifyCollection=s_e});var ka=h(tk=>{"use strict";var A_e=ZD(),c_e=KD(),l_e=MB(),Da=He(),XB=_a(),u_e=sr();function rm(t,e){let r=Da.isScalar(e)?e.value:e;for(let n of t)if(Da.isPair(n)&&(n.key===e||n.key===r||Da.isScalar(n.key)&&n.key.value===r))return n}var ek=class extends l_e.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Da.MAP,e),this.items=[]}static from(e,r,n){let{keepUndefined:i,replacer:s}=n,o=new this(e),a=(A,c)=>{if(typeof s=="function")c=s.call(r,A,c);else if(Array.isArray(s)&&!s.includes(A))return;(c!==void 0||i)&&o.items.push(XB.createPair(A,c,n))};if(r instanceof Map)for(let[A,c]of r)a(A,c);else if(r&&typeof r=="object")for(let A of Object.keys(r))a(A,r[A]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,r){let n;Da.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new XB.Pair(e,e?.value):n=new XB.Pair(e.key,e.value);let i=rm(this.items,n.key),s=this.schema?.sortMapEntries;if(i){if(!r)throw new Error(`Key ${n.key} already set`);Da.isScalar(i.value)&&u_e.isScalarValue(n.value)?i.value.value=n.value:i.value=n.value}else if(s){let o=this.items.findIndex(a=>s(n,a)<0);o===-1?this.items.push(n):this.items.splice(o,0,n)}else this.items.push(n)}delete(e){let r=rm(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let i=rm(this.items,e)?.value;return(!r&&Da.isScalar(i)?i.value:i)??void 0}has(e){return!!rm(this.items,e)}set(e,r){this.add(new XB.Pair(e,r),!0)}toJSON(e,r,n){let i=n?new n:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(i);for(let s of this.items)c_e.addPairToJSMap(r,i,s);return i}toString(e,r,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!Da.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),A_e.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}};tk.YAMLMap=ek;tk.findPair=rm});var Sd=h(UK=>{"use strict";var d_e=He(),FK=ka(),f_e={collection:"map",default:!0,nodeClass:FK.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return d_e.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>FK.YAMLMap.from(t,e,r)};UK.map=f_e});var Pa=h(qK=>{"use strict";var h_e=Vg(),g_e=ZD(),m_e=MB(),eQ=He(),p_e=sr(),y_e=Sa(),rk=class extends m_e.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(eQ.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=ZB(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let n=ZB(e);if(typeof n!="number")return;let i=this.items[n];return!r&&eQ.isScalar(i)?i.value:i}has(e){let r=ZB(e);return typeof r=="number"&&r<this.items.length}set(e,r){let n=ZB(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];eQ.isScalar(i)&&p_e.isScalarValue(r)?i.value=r:this.items[n]=r}toJSON(e,r){let n=[];r?.onCreate&&r.onCreate(n);let i=0;for(let s of this.items)n.push(y_e.toJS(s,String(i++),r));return n}toString(e,r,n){return e?g_e.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:r}):JSON.stringify(this)}static from(e,r,n){let{replacer:i}=n,s=new this(e);if(r&&Symbol.iterator in Object(r)){let o=0;for(let a of r){if(typeof i=="function"){let A=r instanceof Set?a:String(o++);a=i.call(r,A,a)}s.items.push(h_e.createNode(a,void 0,n))}}return s}};function ZB(t){let e=eQ.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}qK.YAMLSeq=rk});var xd=h(jK=>{"use strict";var E_e=He(),HK=Pa(),C_e={collection:"seq",default:!0,nodeClass:HK.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return E_e.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>HK.YAMLSeq.from(t,e,r)};jK.seq=C_e});var nm=h(zK=>{"use strict";var I_e=Xg(),B_e={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,n){return e=Object.assign({actualString:!0},e),I_e.stringifyString(t,e,r,n)}};zK.string=B_e});var tQ=h(JK=>{"use strict";var GK=sr(),YK={identify:t=>t==null,createNode:()=>new GK.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new GK.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&YK.test.test(t)?t:e.options.nullStr};JK.nullTag=YK});var nk=h(WK=>{"use strict";var Q_e=sr(),VK={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new Q_e.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&VK.test.test(t)){let n=t[0]==="t"||t[0 Line truncated ${i}${f}`}else return`${d}${o}${u.join(" ")}${o}${f}`}function PI({indent:t,options:{commentString:e}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let s=kI.indentComment(e(n),t);r.push(s.trimStart())}}x3.stringifyCollection=Qxe});var fa=h(mD=>{"use strict";var wxe=hD(),xxe=dD(),Sxe=II(),da=qe(),TI=ua(),vxe=tr();function gg(t,e){let r=da.isScalar(e)?e.value:e;for(let n of t)if(da.isPair(n)&&(n.key===e||n.key===r||da.isScalar(n.key)&&n.key.value===r))return n}var gD=class extends Sxe.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(da.MAP,e),this.items=[]}static from(e,r,n){let{keepUndefined:i,replacer:s}=n,o=new this(e),a=(A,c)=>{if(typeof s=="function")c=s.call(r,A,c);else if(Array.isArray(s)&&!s.includes(A))return;(c!==void 0||i)&&o.items.push(TI.createPair(A,c,n))};if(r instanceof Map)for(let[A,c]of r)a(A,c);else if(r&&typeof r=="object")for(let A of Object.keys(r))a(A,r[A]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,r){let n;da.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new TI.Pair(e,e?.value):n=new TI.Pair(e.key,e.value);let i=gg(this.items,n.key),s=this.schema?.sortMapEntries;if(i){if(!r)throw new Error(`Key ${n.key} already set`);da.isScalar(i.value)&&vxe.isScalarValue(n.value)?i.value.value=n.value:i.value=n.value}else if(s){let o=this.items.findIndex(a=>s(n,a)<0);o===-1?this.items.push(n):this.items.splice(o,0,n)}else this.items.push(n)}delete(e){let r=gg(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let i=gg(this.items,e)?.value;return(!r&&da.isScalar(i)?i.value:i)??void 0}has(e){return!!gg(this.items,e)}set(e,r){this.add(new TI.Pair(e,r),!0)}toJSON(e,r,n){let i=n?new n:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(i);for(let s of this.items)xxe.addPairToJSMap(r,i,s);return i}toString(e,r,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!da.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),wxe.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}};mD.YAMLMap=gD;mD.findPair=gg});var Zu=h(v3=>{"use strict";var Rxe=qe(),S3=fa(),Dxe={collection:"map",default:!0,nodeClass:S3.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return Rxe.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>S3.YAMLMap.from(t,e,r)};v3.map=Dxe});var ha=h(R3=>{"use strict";var _xe=ag(),kxe=hD(),Pxe=II(),MI=qe(),Txe=tr(),Oxe=aa(),pD=class extends Pxe.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(MI.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=OI(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let n=OI(e);if(typeof n!="number")return;let i=this.items[n];return!r&&MI.isScalar(i)?i.value:i}has(e){let r=OI(e);return typeof r=="number"&&r<this.items.length}set(e,r){let n=OI(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];MI.isScalar(i)&&Txe.isScalarValue(r)?i.value=r:this.items[n]=r}toJSON(e,r){let n=[];r?.onCreate&&r.onCreate(n);let i=0;for(let s of this.items)n.push(Oxe.toJS(s,String(i++),r));return n}toString(e,r,n){return e?kxe.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:r}):JSON.stringify(this)}static from(e,r,n){let{replacer:i}=n,s=new this(e);if(r&&Symbol.iterator in Object(r)){let o=0;for(let a of r){if(typeof i=="function"){let A=r instanceof Set?a:String(o++);a=i.call(r,A,a)}s.items.push(_xe.createNode(a,void 0,n))}}return s}};function OI(t){let e=MI.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}R3.YAMLSeq=pD});var ed=h(_3=>{"use strict";var Mxe=qe(),D3=ha(),Lxe={collection:"seq",default:!0,nodeClass:D3.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return Mxe.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>D3.YAMLSeq.from(t,e,r)};_3.seq=Lxe});var mg=h(k3=>{"use strict";var Fxe=ug(),Uxe={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,n){return e=Object.assign({actualString:!0},e),Fxe.stringifyString(t,e,r,n)}};k3.string=Uxe});var LI=h(O3=>{"use strict";var P3=tr(),T3={identify:t=>t==null,createNode:()=>new P3.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new P3.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&T3.test.test(t)?t:e.options.nullStr};O3.nullTag=T3});var yD=h(L3=>{"use strict";var qxe=tr(),M3={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new qxe.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&M3.test.test(t)){let n=t[0]==="t"||t[0 Line truncated
`:" ")}return z_e.stringifyString({comment:t,type:e,value:a},n,i,s)}};i9.binary=G_e});var AQ=h(aQ=>{"use strict";var oQ=He(),dk=_a(),Y_e=sr(),J_e=Pa();function s9(t,e){if(oQ.isSeq(t))for(let r=0;r<t.items.length;++r){let n=t.items[r];if(!oQ.isPair(n)){if(oQ.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new dk.Pair(new Y_e.Scalar(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore} `:" ")}return ASe.stringifyString({comment:t,type:e,value:a},n,i,s)}};J3.binary=cSe});var GI=h(jI=>{"use strict";var zI=qe(),xD=ua(),lSe=tr(),uSe=ha();function V3(t,e){if(zI.isSeq(t))for(let r=0;r<t.items.length;++r){let n=t.items[r];if(!zI.isPair(n)){if(zI.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new xD.Pair(new lSe.Scalar(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
${i.key.commentBefore}`:n.commentBefore),n.comment){let s=i.value??i.key;s.comment=s.comment?`${n.comment} ${i.key.commentBefore}`:n.commentBefore),n.comment){let s=i.value??i.key;s.comment=s.comment?`${n.comment}
${s.comment}`:n.comment}n=i}t.items[r]=oQ.isPair(n)?n:new dk.Pair(n)}}else e("Expected a sequence for this tag");return t}function o9(t,e,r){let{replacer:n}=r,i=new J_e.YAMLSeq(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(s++),o));let a,A;if(Array.isArray(o))if(o.length===2)a=o[0],A=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],A=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;i.items.push(dk.createPair(a,A,r))}return i}var V_e={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s9,createNode:o9};aQ.createPairs=o9;aQ.pairs=V_e;aQ.resolvePairs=s9});var gk=h(hk=>{"use strict";var a9=He(),fk=Sa(),sm=ka(),W_e=Pa(),A9=AQ(),zA=class t extends W_e.YAMLSeq{constructor(){super(),this.add=sm.YAMLMap.prototype.add.bind(this),this.delete=sm.YAMLMap.prototype.delete.bind(this),this.get=sm.YAMLMap.prototype.get.bind(this),this.has=sm.YAMLMap.prototype.has.bind(this),this.set=sm.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let n=new Map;r?.onCreate&&r.onCreate(n);for(let i of this.items){let s,o;if(a9.isPair(i)?(s=fk.toJS(i.key,"",r),o=fk.toJS(i.value,s,r)):s=fk.toJS(i,"",r),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,o)}return n}static from(e,r,n){let i=A9.createPairs(e,r,n),s=new this;return s.items=i.items,s}};zA.tag="tag:yaml.org,2002:omap";var $_e={collection:"seq",identify:t=>t instanceof Map,nodeClass:zA,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=A9.resolvePairs(t,e),n=[];for(let{key:i}of r.items)a9.isScalar(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new zA,r)},createNode:(t,e,r)=>zA.from(t,e,r)};hk.YAMLOMap=zA;hk.omap=$_e});var f9=h(mk=>{"use strict";var c9=sr();function l9({value:t,source:e},r){return e&&(t?u9:d9).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}var u9={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new c9.Scalar(!0),stringify:l9},d9={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new c9.Scalar(!1),stringify:l9};mk.falseTag=d9;mk.trueTag=u9});var h9=h(cQ=>{"use strict";var K_e=sr(),pk=Rd(),X_e={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:pk.stringifyNumber},Z_e={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():pk.stringifyNumber(t)}},eDe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new K_e.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let n=t.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:pk.stringifyNumber};cQ.float=eDe;cQ.floatExp=Z_e;cQ.floatNaN=X_e});var m9=h(am=>{"use strict";var g9=Rd(),om=t=>typeof t=="bigint"||Number.isInteger(t);function lQ(t,e,r,{intAsBigInt:n}){let i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),n){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let o=BigInt(t);return i==="-"?BigInt(-1)*o:o}let s=parseInt(t,r);return i==="-"?-1*s:s}function yk(t,e,r){let{value:n}=t;if(om(n)){let i=n.toString(e);return n<0?"-"+r+i.substr(1):r+i}return g9.stringifyNumber(t)}var tDe={identify:om,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>lQ(t,2,2,r),stringify:t=>yk(t,2,"0b")},rDe={identify:om,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>lQ(t,1,8,r),stringify:t=>yk(t,8,"0")},nDe={identify:om,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>lQ(t,0,10,r),stringify:g9.stringifyNumber},iDe={identify:om,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>lQ(t,2,16,r),stringify:t=>yk(t,16,"0x")};am.int=nDe;am.intBin=tDe;am.intHex=iDe;am.intOct=rDe});var Ck=h(Ek=>{"use strict";var fQ=He(),uQ=_a(),dQ=ka(),GA=class t extends dQ.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let r;fQ.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new uQ.Pair(e.key,null):r=new uQ.Pair(e,null),dQ.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let n=dQ.findPair(this.items,e);return!r&&fQ.isPair(n)?fQ.isSca Line truncated ${s.comment}`:n.comment}n=i}t.items[r]=zI.isPair(n)?n:new xD.Pair(n)}}else e("Expected a sequence for this tag");return t}function W3(t,e,r){let{replacer:n}=r,i=new uSe.YAMLSeq(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(s++),o));let a,A;if(Array.isArray(o))if(o.length===2)a=o[0],A=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],A=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;i.items.push(xD.createPair(a,A,r))}return i}var dSe={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:V3,createNode:W3};jI.createPairs=W3;jI.pairs=dSe;jI.resolvePairs=V3});var RD=h(vD=>{"use strict";var $3=qe(),SD=aa(),yg=fa(),fSe=ha(),K3=GI(),bA=class t extends fSe.YAMLSeq{constructor(){super(),this.add=yg.YAMLMap.prototype.add.bind(this),this.delete=yg.YAMLMap.prototype.delete.bind(this),this.get=yg.YAMLMap.prototype.get.bind(this),this.has=yg.YAMLMap.prototype.has.bind(this),this.set=yg.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let n=new Map;r?.onCreate&&r.onCreate(n);for(let i of this.items){let s,o;if($3.isPair(i)?(s=SD.toJS(i.key,"",r),o=SD.toJS(i.value,s,r)):s=SD.toJS(i,"",r),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,o)}return n}static from(e,r,n){let i=K3.createPairs(e,r,n),s=new this;return s.items=i.items,s}};bA.tag="tag:yaml.org,2002:omap";var hSe={collection:"seq",identify:t=>t instanceof Map,nodeClass:bA,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=K3.resolvePairs(t,e),n=[];for(let{key:i}of r.items)$3.isScalar(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new bA,r)},createNode:(t,e,r)=>bA.from(t,e,r)};vD.YAMLOMap=bA;vD.omap=hSe});var r$=h(DD=>{"use strict";var X3=tr();function Z3({value:t,source:e},r){return e&&(t?e$:t$).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}var e$={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new X3.Scalar(!0),stringify:Z3},t$={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new X3.Scalar(!1),stringify:Z3};DD.falseTag=t$;DD.trueTag=e$});var n$=h(YI=>{"use strict";var gSe=tr(),_D=td(),mSe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:_D.stringifyNumber},pSe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():_D.stringifyNumber(t)}},ySe={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new gSe.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let n=t.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:_D.stringifyNumber};YI.float=ySe;YI.floatExp=pSe;YI.floatNaN=mSe});var s$=h(Cg=>{"use strict";var i$=td(),Eg=t=>typeof t=="bigint"||Number.isInteger(t);function JI(t,e,r,{intAsBigInt:n}){let i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),n){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let o=BigInt(t);return i==="-"?BigInt(-1)*o:o}let s=parseInt(t,r);return i==="-"?-1*s:s}function kD(t,e,r){let{value:n}=t;if(Eg(n)){let i=n.toString(e);return n<0?"-"+r+i.substr(1):r+i}return i$.stringifyNumber(t)}var ESe={identify:Eg,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>JI(t,2,2,r),stringify:t=>kD(t,2,"0b")},CSe={identify:Eg,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>JI(t,1,8,r),stringify:t=>kD(t,8,"0")},ISe={identify:Eg,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>JI(t,0,10,r),stringify:i$.stringifyNumber},BSe={identify:Eg,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>JI(t,2,16,r),stringify:t=>kD(t,16,"0x")};Cg.int=ISe;Cg.intBin=ESe;Cg.intHex=BSe;Cg.intOct=CSe});var TD=h(PD=>{"use strict";var $I=qe(),VI=ua(),WI=fa(),NA=class t extends WI.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let r;$I.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new VI.Pair(e.key,null):r=new VI.Pair(e,null),WI.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let n=WI.findPair(this.items,e);return!r&&$I.isPair(n)?$I.isSca Line truncated
`)?(r.push("..."),r.push(cm.indentComment(A,""))):r.push(`... ${A}`)}else r.push("...");else{let A=t.comment;A&&o&&(A=A.replace(/^\n+/,"")),A&&((!o||a)&&r[r.length-1]!==""&&r.push(""),r.push(cm.indentComment(s(A),"")))}return r.join(` `)?(r.push("..."),r.push(Bg.indentComment(A,""))):r.push(`... ${A}`)}else r.push("...");else{let A=t.comment;A&&o&&(A=A.replace(/^\n+/,"")),A&&((!o||a)&&r[r.length-1]!==""&&r.push(""),r.push(Bg.indentComment(s(A),"")))}return r.join(`
`)+` `)+`
`}k9.stringifyDocument=_De});var lm=h(T9=>{"use strict";var DDe=Jg(),vd=MB(),ki=He(),kDe=_a(),PDe=Sa(),TDe=vk(),ODe=P9(),Dk=kB(),LDe=OD(),MDe=Vg(),kk=TD(),Pk=class t{constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ki.NODE_TYPE,{value:ki.DOC});let i=null;typeof r=="function"||Array.isArray(r)?i=r:n===void 0&&r&&(n=r,r=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=s;let{version:o}=s;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new kk.Directives({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(t.prototype,{[ki.NODE_TYPE]:{value:ki.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=ki.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){_d(this.contents)&&this.contents.add(e)}addIn(e,r){_d(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let n=Dk.anchorNames(this);e.anchor=!r||n.has(r)?Dk.findNewAnchor(r||"a",n):r}return new DDe.Alias(e.anchor)}createNode(e,r,n){let i;if(typeof r=="function")e=r.call({"":e},"",e),i=r;else if(Array.isArray(r)){let E=I=>typeof I=="number"||I instanceof String||I instanceof Number,C=r.filter(E).map(String);C.length>0&&(r=r.concat(C)),i=r}else n===void 0&&r&&(n=r,r=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:A,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=Dk.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:s??!0,keepUndefined:A??!1,onAnchor:u,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:f},m=MDe.createNode(e,l,g);return a&&ki.isCollection(m)&&(m.flow=!0),d(),m}createPair(e,r,n={}){let i=this.createNode(e,null,n),s=this.createNode(r,null,n);return new kDe.Pair(i,s)}delete(e){return _d(this.contents)?this.contents.delete(e):!1}deleteIn(e){return vd.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):_d(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return ki.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return vd.isEmptyPath(e)?!r&&ki.isScalar(this.contents)?this.contents.value:this.contents:ki.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return ki.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return vd.isEmptyPath(e)?this.contents!==void 0:ki.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=vd.collectionFromPath(this.schema,[e],r):_d(this.contents)&&this.contents.set(e,r)}setIn(e,r){vd.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=vd.collectionFromPath(this.schema,Array.from(e),r):_d(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new kk.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new kk.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new TDe.Schema(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:n,maxAliasCount:i,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},A=PDe.toJS(this.contents,r??"",a);if(typeof s=="function")for(let{count:c,res:l}of a.anchors.values())s(l,c);return typeof o=="function"?LDe.applyReviver(o,{"":A},"",A):A}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return ODe.stringifyDocument(this,e)}};function _d(t){if(ki.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}T9.Document=Pk});var fm=h(dm=>{"use strict";var um=class extends Error{constructor(e,r,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=r}},Tk=class extends um{constructor(e,r,n){super("YAMLParseError",e,r,n) Line truncated `}B$.stringifyDocument=WSe});var Qg=h(b$=>{"use strict";var $Se=og(),rd=II(),Bi=qe(),KSe=ua(),XSe=aa(),ZSe=GD(),eve=Q$(),JD=mI(),tve=KR(),rve=ag(),VD=$R(),WD=class t{constructor(e,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Bi.NODE_TYPE,{value:Bi.DOC});let i=null;typeof r=="function"||Array.isArray(r)?i=r:n===void 0&&r&&(n=r,r=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=s;let{version:o}=s;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new VD.Directives({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(t.prototype,{[Bi.NODE_TYPE]:{value:Bi.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Bi.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){nd(this.contents)&&this.contents.add(e)}addIn(e,r){nd(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let n=JD.anchorNames(this);e.anchor=!r||n.has(r)?JD.findNewAnchor(r||"a",n):r}return new $Se.Alias(e.anchor)}createNode(e,r,n){let i;if(typeof r=="function")e=r.call({"":e},"",e),i=r;else if(Array.isArray(r)){let E=I=>typeof I=="number"||I instanceof String||I instanceof Number,C=r.filter(E).map(String);C.length>0&&(r=r.concat(C)),i=r}else n===void 0&&r&&(n=r,r=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:A,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=JD.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:s??!0,keepUndefined:A??!1,onAnchor:u,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:f},m=rve.createNode(e,l,g);return a&&Bi.isCollection(m)&&(m.flow=!0),d(),m}createPair(e,r,n={}){let i=this.createNode(e,null,n),s=this.createNode(r,null,n);return new KSe.Pair(i,s)}delete(e){return nd(this.contents)?this.contents.delete(e):!1}deleteIn(e){return rd.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):nd(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return Bi.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return rd.isEmptyPath(e)?!r&&Bi.isScalar(this.contents)?this.contents.value:this.contents:Bi.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return Bi.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return rd.isEmptyPath(e)?this.contents!==void 0:Bi.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=rd.collectionFromPath(this.schema,[e],r):nd(this.contents)&&this.contents.set(e,r)}setIn(e,r){rd.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=rd.collectionFromPath(this.schema,Array.from(e),r):nd(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new VD.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new VD.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new ZSe.Schema(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:n,maxAliasCount:i,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},A=XSe.toJS(this.contents,r??"",a);if(typeof s=="function")for(let{count:c,res:l}of a.anchors.values())s(l,c);return typeof o=="function"?tve.applyReviver(o,{"":A},"",A):A}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return eve.stringifyDocument(this,e)}};function nd(t){if(Bi.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}b$.Document=WD});var wg=h(Ng=>{"use strict";var bg=class extends Error{constructor(e,r,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=r}},$D=class extends bg{constructor(e,r,n){super("YAMLParseError",e,r,n) Line truncated
`),o=a+o}if(/[^ ]/.test(o)){let a=1,A=r.linePos[1];A&&A.line===n&&A.col>i&&(a=Math.max(1,Math.min(A.col-i,80-s)));let c=" ".repeat(s)+"^".repeat(a);r.message+=`: `),o=a+o}if(/[^ ]/.test(o)){let a=1,A=r.linePos[1];A&&A.line===n&&A.col>i&&(a=Math.max(1,Math.min(A.col-i,80-s)));let c=" ".repeat(s)+"^".repeat(a);r.message+=`:
${o} ${o}
${c} ${c}
`}};dm.YAMLError=um;dm.YAMLParseError=Tk;dm.YAMLWarning=Ok;dm.prettifyError=FDe});var hm=h(O9=>{"use strict";function UDe(t,{flow:e,indicator:r,next:n,offset:i,onError:s,parentIndent:o,startOnNewline:a}){let A=!1,c=a,l=a,u="",d="",f=!1,g=!1,m=null,E=null,C=null,I=null,N=null,w=null,v=null;for(let k of t)switch(g&&(k.type!=="space"&&k.type!=="newline"&&k.type!=="comma"&&s(k.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),m&&(c&&k.type!=="comment"&&k.type!=="newline"&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),k.type){case"space":!e&&(r!=="doc-start"||n?.type!=="flow-collection")&&k.source.includes(" ")&&(m=k),l=!0;break;case"comment":{l||s(k,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let J=k.source.substring(1)||" ";u?u+=d+J:u=J,d="",c=!1;break}case"newline":c?u?u+=k.source:(!w||r!=="seq-item-ind")&&(A=!0):d+=k.source,c=!0,f=!0,(E||C)&&(I=k),l=!0;break;case"anchor":E&&s(k,"MULTIPLE_ANCHORS","A node can have at most one anchor"),k.source.endsWith(":")&&s(k.offset+k.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),E=k,v===null&&(v=k.offset),c=!1,l=!1,g=!0;break;case"tag":{C&&s(k,"MULTIPLE_TAGS","A node can have at most one tag"),C=k,v===null&&(v=k.offset),c=!1,l=!1,g=!0;break}case r:(E||C)&&s(k,"BAD_PROP_ORDER",`Anchors and tags must be after the ${k.source} indicator`),w&&s(k,"UNEXPECTED_TOKEN",`Unexpected ${k.source} in ${e??"collection"}`),w=k,c=r==="seq-item-ind"||r==="explicit-key-ind",l=!1;break;case"comma":if(e){N&&s(k,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),N=k,c=!1,l=!1;break}default:s(k,"UNEXPECTED_TOKEN",`Unexpected ${k.type} token`),c=!1,l=!1}let T=t[t.length-1],U=T?T.offset+T.source.length:i;return g&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:N,found:w,spaceBefore:A,comment:u,hasNewline:f,anchor:E,tag:C,newlineAfterProp:I,end:U,start:v??U}}O9.resolveProps=UDe});var yQ=h(L9=>{"use strict";function Lk(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(` `}};Ng.YAMLError=bg;Ng.YAMLParseError=$D;Ng.YAMLWarning=KD;Ng.prettifyError=nve});var xg=h(N$=>{"use strict";function ive(t,{flow:e,indicator:r,next:n,offset:i,onError:s,parentIndent:o,startOnNewline:a}){let A=!1,c=a,l=a,u="",d="",f=!1,g=!1,m=null,E=null,C=null,I=null,b=null,w=null,R=null;for(let k of t)switch(g&&(k.type!=="space"&&k.type!=="newline"&&k.type!=="comma"&&s(k.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),m&&(c&&k.type!=="comment"&&k.type!=="newline"&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),k.type){case"space":!e&&(r!=="doc-start"||n?.type!=="flow-collection")&&k.source.includes(" ")&&(m=k),l=!0;break;case"comment":{l||s(k,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let J=k.source.substring(1)||" ";u?u+=d+J:u=J,d="",c=!1;break}case"newline":c?u?u+=k.source:(!w||r!=="seq-item-ind")&&(A=!0):d+=k.source,c=!0,f=!0,(E||C)&&(I=k),l=!0;break;case"anchor":E&&s(k,"MULTIPLE_ANCHORS","A node can have at most one anchor"),k.source.endsWith(":")&&s(k.offset+k.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),E=k,R===null&&(R=k.offset),c=!1,l=!1,g=!0;break;case"tag":{C&&s(k,"MULTIPLE_TAGS","A node can have at most one tag"),C=k,R===null&&(R=k.offset),c=!1,l=!1,g=!0;break}case r:(E||C)&&s(k,"BAD_PROP_ORDER",`Anchors and tags must be after the ${k.source} indicator`),w&&s(k,"UNEXPECTED_TOKEN",`Unexpected ${k.source} in ${e??"collection"}`),w=k,c=r==="seq-item-ind"||r==="explicit-key-ind",l=!1;break;case"comma":if(e){b&&s(k,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),b=k,c=!1,l=!1;break}default:s(k,"UNEXPECTED_TOKEN",`Unexpected ${k.type} token`),c=!1,l=!1}let T=t[t.length-1],U=T?T.offset+T.source.length:i;return g&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:w,spaceBefore:A,comment:u,hasNewline:f,anchor:E,tag:C,newlineAfterProp:I,end:U,start:R??U}}N$.resolveProps=ive});var tB=h(w$=>{"use strict";function XD(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(Lk(e.key)||Lk(e.value))return!0}return!1;default:return!0}}L9.containsNewline=Lk});var Mk=h(M9=>{"use strict";var qDe=yQ();function HDe(t,e,r){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&qDe.containsNewline(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}M9.flowIndentCheck=HDe});var Fk=h(U9=>{"use strict";var F9=He();function jDe(t,e,r){let{uniqueKeys:n}=t.options;if(n===!1)return!1;let i=typeof n=="function"?n:(s,o)=>s===o||F9.isScalar(s)&&F9.isScalar(o)&&s.value===o.value;return e.some(s=>i(s.key,r))}U9.mapIncludes=jDe});var Y9=h(G9=>{"use strict";var q9=_a(),zDe=ka(),H9=hm(),GDe=yQ(),j9=Mk(),YDe=Fk(),z9="All mapping items must start at the same column";function JDe({composeNode:t,composeEmptyNode:e},r,n,i,s){let o=s?.nodeClass??zDe.YAMLMap,a=new o(r.schema);r.atRoot&&(r.atRoot=!1);let A=n.offset,c=null;for(let l of n.items){let{start:u,key:d,sep:f,value:g}=l,m=H9.resolveProps(u,{indicator:"explicit-key-ind",next:d??f?.[0],offset:A,onError:i,parentIndent:n.indent,startOnNewline:!0}),E=!m.found;if(E){if(d&&(d.type==="block-seq"?i(A,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==n.indent&&i(A,"BAD_INDENT",z9)),!m.anchor&&!m.tag&&!f){c=m.end,m.comment&&(a.comment?a.comment+=` `))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(XD(e.key)||XD(e.value))return!0}return!1;default:return!0}}w$.containsNewline=XD});var ZD=h(x$=>{"use strict";var sve=tB();function ove(t,e,r){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===t&&(n.source==="]"||n.source==="}")&&sve.containsNewline(e)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}x$.flowIndentCheck=ove});var e_=h(v$=>{"use strict";var S$=qe();function ave(t,e,r){let{uniqueKeys:n}=t.options;if(n===!1)return!1;let i=typeof n=="function"?n:(s,o)=>s===o||S$.isScalar(s)&&S$.isScalar(o)&&s.value===o.value;return e.some(s=>i(s.key,r))}v$.mapIncludes=ave});var T$=h(P$=>{"use strict";var R$=ua(),Ave=fa(),D$=xg(),cve=tB(),_$=ZD(),lve=e_(),k$="All mapping items must start at the same column";function uve({composeNode:t,composeEmptyNode:e},r,n,i,s){let o=s?.nodeClass??Ave.YAMLMap,a=new o(r.schema);r.atRoot&&(r.atRoot=!1);let A=n.offset,c=null;for(let l of n.items){let{start:u,key:d,sep:f,value:g}=l,m=D$.resolveProps(u,{indicator:"explicit-key-ind",next:d??f?.[0],offset:A,onError:i,parentIndent:n.indent,startOnNewline:!0}),E=!m.found;if(E){if(d&&(d.type==="block-seq"?i(A,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==n.indent&&i(A,"BAD_INDENT",k$)),!m.anchor&&!m.tag&&!f){c=m.end,m.comment&&(a.comment?a.comment+=`
`+m.comment:a.comment=m.comment);continue}(m.newlineAfterProp||GDe.containsNewline(d))&&i(d??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else m.found?.indent!==n.indent&&i(A,"BAD_INDENT",z9);r.atKey=!0;let C=m.end,I=d?t(r,d,m,i):e(r,C,u,null,m,i);r.schema.compat&&j9.flowIndentCheck(n.indent,d,i),r.atKey=!1,YDe.mapIncludes(r,a.items,I)&&i(C,"DUPLICATE_KEY","Map keys must be unique");let N=H9.resolveProps(f??[],{indicator:"map-value-ind",next:g,offset:I.range[2],onError:i,parentIndent:n.indent,startOnNewline:!d||d.type==="block-scalar"});if(A=N.end,N.found){E&&(g?.type==="block-map"&&!N.hasNewline&&i(A,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&m.start<N.found.offset-1024&&i(I.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let w=g?t(r,g,N,i):e(r,A,f,null,N,i);r.schema.compat&&j9.flowIndentCheck(n.indent,g,i),A=w.range[2];let v=new q9.Pair(I,w);r.options.keepSourceTokens&&(v.srcToken=l),a.items.push(v)}else{E&&i(I.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),N.comment&&(I.comment?I.comment+=` `+m.comment:a.comment=m.comment);continue}(m.newlineAfterProp||cve.containsNewline(d))&&i(d??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else m.found?.indent!==n.indent&&i(A,"BAD_INDENT",k$);r.atKey=!0;let C=m.end,I=d?t(r,d,m,i):e(r,C,u,null,m,i);r.schema.compat&&_$.flowIndentCheck(n.indent,d,i),r.atKey=!1,lve.mapIncludes(r,a.items,I)&&i(C,"DUPLICATE_KEY","Map keys must be unique");let b=D$.resolveProps(f??[],{indicator:"map-value-ind",next:g,offset:I.range[2],onError:i,parentIndent:n.indent,startOnNewline:!d||d.type==="block-scalar"});if(A=b.end,b.found){E&&(g?.type==="block-map"&&!b.hasNewline&&i(A,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&m.start<b.found.offset-1024&&i(I.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let w=g?t(r,g,b,i):e(r,A,f,null,b,i);r.schema.compat&&_$.flowIndentCheck(n.indent,g,i),A=w.range[2];let R=new R$.Pair(I,w);r.options.keepSourceTokens&&(R.srcToken=l),a.items.push(R)}else{E&&i(I.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),b.comment&&(I.comment?I.comment+=`
`+N.comment:I.comment=N.comment);let w=new q9.Pair(I);r.options.keepSourceTokens&&(w.srcToken=l),a.items.push(w)}}return c&&c<A&&i(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[n.offset,A,c??A],a}G9.resolveBlockMap=JDe});var V9=h(J9=>{"use strict";var VDe=Pa(),WDe=hm(),$De=Mk();function KDe({composeNode:t,composeEmptyNode:e},r,n,i,s){let o=s?.nodeClass??VDe.YAMLSeq,a=new o(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let A=n.offset,c=null;for(let{start:l,value:u}of n.items){let d=WDe.resolveProps(l,{indicator:"seq-item-ind",next:u,offset:A,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||u)u&&u.type==="block-seq"?i(d.end,"BAD_INDENT","All sequence items must start at the same column"):i(A,"MISSING_CHAR","Sequence item without - indicator");else{c=d.end,d.comment&&(a.comment=d.comment);continue}let f=u?t(r,u,d,i):e(r,d.end,l,null,d,i);r.schema.compat&&$De.flowIndentCheck(n.indent,u,i),A=f.range[2],a.items.push(f)}return a.range=[n.offset,A,c??A],a}J9.resolveBlockSeq=KDe});var Dd=h(W9=>{"use strict";function XDe(t,e,r,n){let i="";if(t){let s=!1,o="";for(let a of t){let{source:A,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{r&&!s&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let l=A.substring(1)||" ";i?i+=o+l:i=l,o="";break}case"newline":i&&(o+=A),s=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=A.length}}return{comment:i,offset:e}}W9.resolveEnd=XDe});var Z9=h(X9=>{"use strict";var ZDe=He(),eke=_a(),$9=ka(),tke=Pa(),rke=Dd(),K9=hm(),nke=yQ(),ike=Fk(),Uk="Block collections are not allowed within flow collections",qk=t=>t&&(t.type==="block-map"||t.type==="block-seq");function ske({composeNode:t,composeEmptyNode:e},r,n,i,s){let o=n.start.source==="{",a=o?"flow map":"flow sequence",A=s?.nodeClass??(o?$9.YAMLMap:tke.YAMLSeq),c=new A(r.schema);c.flow=!0;let l=r.atRoot;l&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let u=n.offset+n.start.source.length;for(let E=0;E<n.items.length;++E){let C=n.items[E],{start:I,key:N,sep:w,value:v}=C,T=K9.resolveProps(I,{flow:a,indicator:"explicit-key-ind",next:N??w?.[0],offset:u,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!T.found){if(!T.anchor&&!T.tag&&!w&&!v){E===0&&T.comma?i(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):E<n.items.length-1&&i(T.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),T.comment&&(c.comment?c.comment+=` `+b.comment:I.comment=b.comment);let w=new R$.Pair(I);r.options.keepSourceTokens&&(w.srcToken=l),a.items.push(w)}}return c&&c<A&&i(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[n.offset,A,c??A],a}P$.resolveBlockMap=uve});var M$=h(O$=>{"use strict";var dve=ha(),fve=xg(),hve=ZD();function gve({composeNode:t,composeEmptyNode:e},r,n,i,s){let o=s?.nodeClass??dve.YAMLSeq,a=new o(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let A=n.offset,c=null;for(let{start:l,value:u}of n.items){let d=fve.resolveProps(l,{indicator:"seq-item-ind",next:u,offset:A,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||u)u&&u.type==="block-seq"?i(d.end,"BAD_INDENT","All sequence items must start at the same column"):i(A,"MISSING_CHAR","Sequence item without - indicator");else{c=d.end,d.comment&&(a.comment=d.comment);continue}let f=u?t(r,u,d,i):e(r,d.end,l,null,d,i);r.schema.compat&&hve.flowIndentCheck(n.indent,u,i),A=f.range[2],a.items.push(f)}return a.range=[n.offset,A,c??A],a}O$.resolveBlockSeq=gve});var id=h(L$=>{"use strict";function mve(t,e,r,n){let i="";if(t){let s=!1,o="";for(let a of t){let{source:A,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{r&&!s&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let l=A.substring(1)||" ";i?i+=o+l:i=l,o="";break}case"newline":i&&(o+=A),s=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=A.length}}return{comment:i,offset:e}}L$.resolveEnd=mve});var H$=h(q$=>{"use strict";var pve=qe(),yve=ua(),F$=fa(),Eve=ha(),Cve=id(),U$=xg(),Ive=tB(),Bve=e_(),t_="Block collections are not allowed within flow collections",r_=t=>t&&(t.type==="block-map"||t.type==="block-seq");function Qve({composeNode:t,composeEmptyNode:e},r,n,i,s){let o=n.start.source==="{",a=o?"flow map":"flow sequence",A=s?.nodeClass??(o?F$.YAMLMap:Eve.YAMLSeq),c=new A(r.schema);c.flow=!0;let l=r.atRoot;l&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let u=n.offset+n.start.source.length;for(let E=0;E<n.items.length;++E){let C=n.items[E],{start:I,key:b,sep:w,value:R}=C,T=U$.resolveProps(I,{flow:a,indicator:"explicit-key-ind",next:b??w?.[0],offset:u,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!T.found){if(!T.anchor&&!T.tag&&!w&&!R){E===0&&T.comma?i(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):E<n.items.length-1&&i(T.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),T.comment&&(c.comment?c.comment+=`
`+T.comment:c.comment=T.comment),u=T.end;continue}!o&&r.options.strict&&nke.containsNewline(N)&&i(N,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(E===0)T.comma&&i(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(T.comma||i(T.start,"MISSING_CHAR",`Missing , between ${a} items`),T.comment){let U="";e:for(let k of I)switch(k.type){case"comma":case"space":break;case"comment":U=k.source.substring(1);break e;default:break e}if(U){let k=c.items[c.items.length-1];ZDe.isPair(k)&&(k=k.value??k.key),k.comment?k.comment+=` `+T.comment:c.comment=T.comment),u=T.end;continue}!o&&r.options.strict&&Ive.containsNewline(b)&&i(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(E===0)T.comma&&i(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(T.comma||i(T.start,"MISSING_CHAR",`Missing , between ${a} items`),T.comment){let U="";e:for(let k of I)switch(k.type){case"comma":case"space":break;case"comment":U=k.source.substring(1);break e;default:break e}if(U){let k=c.items[c.items.length-1];pve.isPair(k)&&(k=k.value??k.key),k.comment?k.comment+=`
`+U:k.comment=U,T.comment=T.comment.substring(U.length+1)}}if(!o&&!w&&!T.found){let U=v?t(r,v,T,i):e(r,T.end,w,null,T,i);c.items.push(U),u=U.range[2],qk(v)&&i(U.range,"BLOCK_IN_FLOW",Uk)}else{r.atKey=!0;let U=T.end,k=N?t(r,N,T,i):e(r,U,I,null,T,i);qk(N)&&i(k.range,"BLOCK_IN_FLOW",Uk),r.atKey=!1;let J=K9.resolveProps(w??[],{flow:a,indicator:"map-value-ind",next:v,offset:k.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(J.found){if(!o&&!T.found&&r.options.strict){if(w)for(let H of w){if(H===J.found)break;if(H.type==="newline"){i(H,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}T.start<J.found.offset-1024&&i(J.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else v&&("source"in v&&v.source&&v.source[0]===":"?i(v,"MISSING_CHAR",`Missing space after : in ${a}`):i(J.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let be=v?t(r,v,J,i):J.found?e(r,J.end,w,null,J,i):null;be?qk(v)&&i(be.range,"BLOCK_IN_FLOW",Uk):J.comment&&(k.comment?k.comment+=` `+U:k.comment=U,T.comment=T.comment.substring(U.length+1)}}if(!o&&!w&&!T.found){let U=R?t(r,R,T,i):e(r,T.end,w,null,T,i);c.items.push(U),u=U.range[2],r_(R)&&i(U.range,"BLOCK_IN_FLOW",t_)}else{r.atKey=!0;let U=T.end,k=b?t(r,b,T,i):e(r,U,I,null,T,i);r_(b)&&i(k.range,"BLOCK_IN_FLOW",t_),r.atKey=!1;let J=U$.resolveProps(w??[],{flow:a,indicator:"map-value-ind",next:R,offset:k.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(J.found){if(!o&&!T.found&&r.options.strict){if(w)for(let H of w){if(H===J.found)break;if(H.type==="newline"){i(H,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}T.start<J.found.offset-1024&&i(J.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else R&&("source"in R&&R.source&&R.source[0]===":"?i(R,"MISSING_CHAR",`Missing space after : in ${a}`):i(J.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let Qe=R?t(r,R,J,i):J.found?e(r,J.end,w,null,J,i):null;Qe?r_(R)&&i(Qe.range,"BLOCK_IN_FLOW",t_):J.comment&&(k.comment?k.comment+=`
`+J.comment:k.comment=J.comment);let Re=new eke.Pair(k,be);if(r.options.keepSourceTokens&&(Re.srcToken=C),o){let H=c;ike.mapIncludes(r,H.items,k)&&i(U,"DUPLICATE_KEY","Map keys must be unique"),H.items.push(Re)}else{let H=new $9.YAMLMap(r.schema);H.flow=!0,H.items.push(Re);let _e=(be??k).range;H.range=[k.range[0],_e[1],_e[2]],c.items.push(H)}u=be?be.range[2]:J.end}}let d=o?"}":"]",[f,...g]=n.end,m=u;if(f&&f.source===d)m=f.offset+f.source.length;else{let E=a[0].toUpperCase()+a.substring(1),C=l?`${E} must end with a ${d}`:`${E} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?"MISSING_CHAR":"BAD_INDENT",C),f&&f.source.length!==1&&g.unshift(f)}if(g.length>0){let E=rke.resolveEnd(g,m,r.options.strict,i);E.comment&&(c.comment?c.comment+=` `+J.comment:k.comment=J.comment);let Se=new yve.Pair(k,Qe);if(r.options.keepSourceTokens&&(Se.srcToken=C),o){let H=c;Bve.mapIncludes(r,H.items,k)&&i(U,"DUPLICATE_KEY","Map keys must be unique"),H.items.push(Se)}else{let H=new F$.YAMLMap(r.schema);H.flow=!0,H.items.push(Se);let Re=(Qe??k).range;H.range=[k.range[0],Re[1],Re[2]],c.items.push(H)}u=Qe?Qe.range[2]:J.end}}let d=o?"}":"]",[f,...g]=n.end,m=u;if(f&&f.source===d)m=f.offset+f.source.length;else{let E=a[0].toUpperCase()+a.substring(1),C=l?`${E} must end with a ${d}`:`${E} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?"MISSING_CHAR":"BAD_INDENT",C),f&&f.source.length!==1&&g.unshift(f)}if(g.length>0){let E=Cve.resolveEnd(g,m,r.options.strict,i);E.comment&&(c.comment?c.comment+=`
`+E.comment:c.comment=E.comment),c.range=[n.offset,m,E.offset]}else c.range=[n.offset,m,m];return c}X9.resolveFlowCollection=ske});var t8=h(e8=>{"use strict";var oke=He(),ake=sr(),Ake=ka(),cke=Pa(),lke=Y9(),uke=V9(),dke=Z9();function Hk(t,e,r,n,i,s){let o=r.type==="block-map"?lke.resolveBlockMap(t,e,r,n,s):r.type==="block-seq"?uke.resolveBlockSeq(t,e,r,n,s):dke.resolveFlowCollection(t,e,r,n,s),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function fke(t,e,r,n,i){let s=n.tag,o=s?e.directives.tagName(s.source,d=>i(s,"TAG_RESOLVE_FAILED",d)):null;if(r.type==="block-seq"){let{anchor:d,newlineAfterProp:f}=n,g=d&&s?d.offset>s.offset?d:s:d??s;g&&(!f||f.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}let a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===Ake.YAMLMap.tagName&&a==="map"||o===cke.YAMLSeq.tagName&&a==="seq")return Hk(t,e,r,i,o);let A=e.schema.tags.find(d=>d.tag===o&&d.collection===a);if(!A){let d=e.schema.knownTags[o];if(d&&d.collection===a)e.schema.tags.push(Object.assign({},d,{default:!1})),A=d;else return d?.collection?i(s,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Hk(t,e,r,i,o)}let c=Hk(t,e,r,i,o,A),l=A.resolve?.(c,d=>i(s,"TAG_RESOLVE_FAILED",d),e.options)??c,u=oke.isNode(l)?l:new ake.Scalar(l);return u.range=c.range,u.tag=o,A?.format&&(u.format=A.format),u}e8.composeCollection=fke});var zk=h(r8=>{"use strict";var jk=sr();function hke(t,e,r){let n=e.offset,i=gke(e,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let s=i.mode===">"?jk.Scalar.BLOCK_FOLDED:jk.Scalar.BLOCK_LITERAL,o=e.source?mke(e.source):[],a=o.length;for(let m=o.length-1;m>=0;--m){let E=o[m][1];if(E===""||E==="\r")a=m;else break}if(a===0){let m=i.chomp==="+"&&o.length>0?` `+E.comment:c.comment=E.comment),c.range=[n.offset,m,E.offset]}else c.range=[n.offset,m,m];return c}q$.resolveFlowCollection=Qve});var j$=h(z$=>{"use strict";var bve=qe(),Nve=tr(),wve=fa(),xve=ha(),Sve=T$(),vve=M$(),Rve=H$();function n_(t,e,r,n,i,s){let o=r.type==="block-map"?Sve.resolveBlockMap(t,e,r,n,s):r.type==="block-seq"?vve.resolveBlockSeq(t,e,r,n,s):Rve.resolveFlowCollection(t,e,r,n,s),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function Dve(t,e,r,n,i){let s=n.tag,o=s?e.directives.tagName(s.source,d=>i(s,"TAG_RESOLVE_FAILED",d)):null;if(r.type==="block-seq"){let{anchor:d,newlineAfterProp:f}=n,g=d&&s?d.offset>s.offset?d:s:d??s;g&&(!f||f.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}let a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===wve.YAMLMap.tagName&&a==="map"||o===xve.YAMLSeq.tagName&&a==="seq")return n_(t,e,r,i,o);let A=e.schema.tags.find(d=>d.tag===o&&d.collection===a);if(!A){let d=e.schema.knownTags[o];if(d&&d.collection===a)e.schema.tags.push(Object.assign({},d,{default:!1})),A=d;else return d?.collection?i(s,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),n_(t,e,r,i,o)}let c=n_(t,e,r,i,o,A),l=A.resolve?.(c,d=>i(s,"TAG_RESOLVE_FAILED",d),e.options)??c,u=bve.isNode(l)?l:new Nve.Scalar(l);return u.range=c.range,u.tag=o,A?.format&&(u.format=A.format),u}z$.composeCollection=Dve});var s_=h(G$=>{"use strict";var i_=tr();function _ve(t,e,r){let n=e.offset,i=kve(e,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let s=i.mode===">"?i_.Scalar.BLOCK_FOLDED:i_.Scalar.BLOCK_LITERAL,o=e.source?Pve(e.source):[],a=o.length;for(let m=o.length-1;m>=0;--m){let E=o[m][1];if(E===""||E==="\r")a=m;else break}if(a===0){let m=i.chomp==="+"&&o.length>0?`
`.repeat(Math.max(1,o.length-1)):"",E=n+i.length;return e.source&&(E+=e.source.length),{value:m,type:s,comment:i.comment,range:[n,E,E]}}let A=e.indent+i.indent,c=e.offset+i.length,l=0;for(let m=0;m<a;++m){let[E,C]=o[m];if(C===""||C==="\r")i.indent===0&&E.length>A&&(A=E.length);else{E.length<A&&r(c+E.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(A=E.length),l=m,A===0&&!t.atRoot&&r(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=E.length+C.length+1}for(let m=o.length-1;m>=a;--m)o[m][0].length>A&&(a=m+1);let u="",d="",f=!1;for(let m=0;m<l;++m)u+=o[m][0].slice(A)+` `.repeat(Math.max(1,o.length-1)):"",E=n+i.length;return e.source&&(E+=e.source.length),{value:m,type:s,comment:i.comment,range:[n,E,E]}}let A=e.indent+i.indent,c=e.offset+i.length,l=0;for(let m=0;m<a;++m){let[E,C]=o[m];if(C===""||C==="\r")i.indent===0&&E.length>A&&(A=E.length);else{E.length<A&&r(c+E.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(A=E.length),l=m,A===0&&!t.atRoot&&r(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=E.length+C.length+1}for(let m=o.length-1;m>=a;--m)o[m][0].length>A&&(a=m+1);let u="",d="",f=!1;for(let m=0;m<l;++m)u+=o[m][0].slice(A)+`
`;for(let m=l;m<a;++m){let[E,C]=o[m];c+=E.length+C.length+1;let I=C[C.length-1]==="\r";if(I&&(C=C.slice(0,-1)),C&&E.length<A){let w=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;r(c-C.length-(I?2:1),"BAD_INDENT",w),E=""}s===jk.Scalar.BLOCK_LITERAL?(u+=d+E.slice(A)+C,d=` `;for(let m=l;m<a;++m){let[E,C]=o[m];c+=E.length+C.length+1;let I=C[C.length-1]==="\r";if(I&&(C=C.slice(0,-1)),C&&E.length<A){let w=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;r(c-C.length-(I?2:1),"BAD_INDENT",w),E=""}s===i_.Scalar.BLOCK_LITERAL?(u+=d+E.slice(A)+C,d=`
`):E.length>A||C[0]===" "?(d===" "?d=` `):E.length>A||C[0]===" "?(d===" "?d=`
`:!f&&d===` `:!f&&d===`
`&&(d=` `&&(d=`
@@ -206,71 +205,73 @@ ${c}
`+o[m][0].slice(A);u[u.length-1]!==` `+o[m][0].slice(A);u[u.length-1]!==`
`&&(u+=` `&&(u+=`
`);break;default:u+=` `);break;default:u+=`
`}let g=n+i.length+e.source.length;return{value:u,type:s,comment:i.comment,range:[n,g,g]}}function gke({offset:t,props:e},r,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],s=i[0],o=0,a="",A=-1;for(let d=1;d<i.length;++d){let f=i[d];if(!a&&(f==="-"||f==="+"))a=f;else{let g=Number(f);!o&&g?o=g:A===-1&&(A=t+d)}}A!==-1&&n(A,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,l="",u=i.length;for(let d=1;d<e.length;++d){let f=e[d];switch(f.type){case"space":c=!0;case"newline":u+=f.source.length;break;case"comment":r&&!c&&n(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=f.source.length,l=f.source.substring(1);break;case"error":n(f,"UNEXPECTED_TOKEN",f.message),u+=f.source.length;break;default:{let g=`Unexpected token in block scalar header: ${f.type}`;n(f,"UNEXPECTED_TOKEN",g);let m=f.source;m&&typeof m=="string"&&(u+=m.length)}}}return{mode:s,indent:o,chomp:a,comment:l,length:u}}function mke(t){let e=t.split(/\n( *)/),r=e[0],n=r.match(/^( *)/),s=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}r8.resolveBlockScalar=hke});var Yk=h(i8=>{"use strict";var Gk=sr(),pke=Dd();function yke(t,e,r){let{offset:n,type:i,source:s,end:o}=t,a,A,c=(d,f,g)=>r(n+d,f,g);switch(i){case"scalar":a=Gk.Scalar.PLAIN,A=Eke(s,c);break;case"single-quoted-scalar":a=Gk.Scalar.QUOTE_SINGLE,A=Cke(s,c);break;case"double-quoted-scalar":a=Gk.Scalar.QUOTE_DOUBLE,A=Ike(s,c);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+s.length,n+s.length]}}let l=n+s.length,u=pke.resolveEnd(o,l,e,r);return{value:A,type:a,comment:u.comment,range:[n,l,u.offset]}}function Eke(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),n8(t)}function Cke(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),n8(t.slice(1,-1)).replace(/''/g,"'")}function n8(t){let e,r;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r? `}let g=n+i.length+e.source.length;return{value:u,type:s,comment:i.comment,range:[n,g,g]}}function kve({offset:t,props:e},r,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],s=i[0],o=0,a="",A=-1;for(let d=1;d<i.length;++d){let f=i[d];if(!a&&(f==="-"||f==="+"))a=f;else{let g=Number(f);!o&&g?o=g:A===-1&&(A=t+d)}}A!==-1&&n(A,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,l="",u=i.length;for(let d=1;d<e.length;++d){let f=e[d];switch(f.type){case"space":c=!0;case"newline":u+=f.source.length;break;case"comment":r&&!c&&n(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=f.source.length,l=f.source.substring(1);break;case"error":n(f,"UNEXPECTED_TOKEN",f.message),u+=f.source.length;break;default:{let g=`Unexpected token in block scalar header: ${f.type}`;n(f,"UNEXPECTED_TOKEN",g);let m=f.source;m&&typeof m=="string"&&(u+=m.length)}}}return{mode:s,indent:o,chomp:a,comment:l,length:u}}function Pve(t){let e=t.split(/\n( *)/),r=e[0],n=r.match(/^( *)/),s=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}G$.resolveBlockScalar=_ve});var a_=h(J$=>{"use strict";var o_=tr(),Tve=id();function Ove(t,e,r){let{offset:n,type:i,source:s,end:o}=t,a,A,c=(d,f,g)=>r(n+d,f,g);switch(i){case"scalar":a=o_.Scalar.PLAIN,A=Mve(s,c);break;case"single-quoted-scalar":a=o_.Scalar.QUOTE_SINGLE,A=Lve(s,c);break;case"double-quoted-scalar":a=o_.Scalar.QUOTE_DOUBLE,A=Fve(s,c);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+s.length,n+s.length]}}let l=n+s.length,u=Tve.resolveEnd(o,l,e,r);return{value:A,type:a,comment:u.comment,range:[n,l,u.offset]}}function Mve(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Y$(t)}function Lve(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Y$(t.slice(1,-1)).replace(/''/g,"'")}function Y$(t){let e,r;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
`,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r? `,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(t);if(!n)return t;let i=n[1],s=" ",o=e.lastIndex;for(r.lastIndex=o;n=r.exec(t);)n[1]===""?s===` `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(t);if(!n)return t;let i=n[1],s=" ",o=e.lastIndex;for(r.lastIndex=o;n=r.exec(t);)n[1]===""?s===`
`?i+=s:s=` `?i+=s:s=`
`:(i+=s+n[1],s=" "),o=r.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,n=a.exec(t),i+s+(n?.[1]??"")}function Ike(t,e){let r="";for(let n=1;n<t.length-1;++n){let i=t[n];if(!(i==="\r"&&t[n+1]===` `:(i+=s+n[1],s=" "),o=r.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,n=a.exec(t),i+s+(n?.[1]??"")}function Fve(t,e){let r="";for(let n=1;n<t.length-1;++n){let i=t[n];if(!(i==="\r"&&t[n+1]===`
`))if(i===` `))if(i===`
`){let{fold:s,offset:o}=Bke(t,n);r+=s,n=o}else if(i==="\\"){let s=t[++n],o=Qke[s];if(o)r+=o;else if(s===` `){let{fold:s,offset:o}=Uve(t,n);r+=s,n=o}else if(i==="\\"){let s=t[++n],o=qve[s];if(o)r+=o;else if(s===`
`)for(s=t[n+1];s===" "||s===" ";)s=t[++n+1];else if(s==="\r"&&t[n+1]===` `)for(s=t[n+1];s===" "||s===" ";)s=t[++n+1];else if(s==="\r"&&t[n+1]===`
`)for(s=t[++n+1];s===" "||s===" ";)s=t[++n+1];else if(s==="x"||s==="u"||s==="U"){let a={x:2,u:4,U:8}[s];r+=bke(t,n+1,a,e),n+=a}else{let a=t.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(i===" "||i===" "){let s=n,o=t[n+1];for(;o===" "||o===" ";)o=t[++n+1];o!==` `)for(s=t[++n+1];s===" "||s===" ";)s=t[++n+1];else if(s==="x"||s==="u"||s==="U"){let a={x:2,u:4,U:8}[s];r+=Hve(t,n+1,a,e),n+=a}else{let a=t.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(i===" "||i===" "){let s=n,o=t[n+1];for(;o===" "||o===" ";)o=t[++n+1];o!==`
`&&!(o==="\r"&&t[n+2]===` `&&!(o==="\r"&&t[n+2]===`
`)&&(r+=n>s?t.slice(s,n+1):i)}else r+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function Bke(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===` `)&&(r+=n>s?t.slice(s,n+1):i)}else r+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function Uve(t,e){let r="",n=t[e+1];for(;(n===" "||n===" "||n===`
`||n==="\r")&&!(n==="\r"&&t[e+2]!==` `||n==="\r")&&!(n==="\r"&&t[e+2]!==`
`);)n===` `);)n===`
`&&(r+=` `&&(r+=`
`),e+=1,n=t[e+1];return r||(r=" "),{fold:r,offset:e}}var Qke={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` `),e+=1,n=t[e+1];return r||(r=" "),{fold:r,offset:e}}var qve={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function bke(t,e,r,n){let i=t.substr(e,r),o=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){let a=t.substr(e-2,r+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}i8.resolveFlowScalar=yke});var a8=h(o8=>{"use strict";var YA=He(),s8=sr(),Nke=zk(),wke=Yk();function Ske(t,e,r,n){let{value:i,type:s,comment:o,range:a}=e.type==="block-scalar"?Nke.resolveBlockScalar(t,e,n):wke.resolveFlowScalar(e,t.options.strict,n),A=r?t.directives.tagName(r.source,u=>n(r,"TAG_RESOLVE_FAILED",u)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[YA.SCALAR]:A?c=xke(t.schema,i,A,r,n):e.type==="scalar"?c=Rke(t,i,e,n):c=t.schema[YA.SCALAR];let l;try{let u=c.resolve(i,d=>n(r??e,"TAG_RESOLVE_FAILED",d),t.options);l=YA.isScalar(u)?u:new s8.Scalar(u)}catch(u){let d=u instanceof Error?u.message:String(u);n(r??e,"TAG_RESOLVE_FAILED",d),l=new s8.Scalar(i)}return l.range=a,l.source=i,s&&(l.type=s),A&&(l.tag=A),c.format&&(l.format=c.format),o&&(l.comment=o),l}function xke(t,e,r,n,i){if(r==="!")return t[YA.SCALAR];let s=[];for(let a of t.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)s.push(a);else return a;for(let a of s)if(a.test?.test(e))return a;let o=t.knownTags[r];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[YA.SCALAR])}function Rke({atKey:t,directives:e,schema:r},n,i,s){let o=r.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(n))||r[YA.SCALAR];if(r.compat){let a=r.compat.find(A=>A.default&&A.test?.test(n))??r[YA.SCALAR];if(o.tag!==a.tag){let A=e.tagString(o.tag),c=e.tagString(a.tag),l=`Value may be parsed as either ${A} or ${c}`;s(i,"TAG_RESOLVE_FAILED",l,!0)}}return o}o8.composeScalar=Ske});var c8=h(A8=>{"use strict";function vke(t,e,r){if(e){r===null&&(r=e.length);for(let n=r-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++n];i?.type==="space";)t+=i.source.length,i=e[++n];break}}return t}A8.emptyScalarPosition=vke});var d8=h(Vk=>{"use strict";var _ke=Jg(),Dke=He(),kke=t8(),l8=a8(),Pke=Dd(),Tke=c8(),Oke={composeNode:u8,composeEmptyNode:Jk};function u8(t,e,r,n){let i=t.atKey,{spaceBefore:s,comment:o,anchor:a,tag:A}=r,c,l=!0;switch(e.type){case"alias":c=Lke(t,e,n),(a||A)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=l8.composeScalar(t,e,A,n),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=kke.composeCollection(Oke,t,e,r,n),a&&(c.anchor=a.source.substring(1));break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",u),c=Jk(t,e.offset,void 0,null,r,n),l=!1}}return a&&c.anchor===""&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!Dke.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&n(A??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&l&&(c.srcToken=e),c}function Jk(t,e,r,n,{spaceBefore:i,comment:s,anchor:o,tag:a,end:A},c){let l={type:"scalar",offset:Tke.emptyScalarPosition(e,r,n),indent:-1,source:""},u=l8.composeScalar(t,l,a,c);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(u.spaceBefore=!0),s&&(u.comment=s,u.range[2]=A),u}function Lke({options:t},{offset:e,source:r,end:n},i){let s=new _ke.Alias(r.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+r.length,a=Pke.resolveEnd(n,o,t.strict,i);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}Vk.composeEmptyNode=Jk;Vk.composeNode=u8});var g8=h(h8=>{"use strict";var Mke=lm(),f8=d8(),Fke=Dd(),Uke=hm();function qke(t,e,{offset:r,start:n,value:i,end:s},o){let a=Object.assign({_directives:e},t),A=new Mke.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:A.directives,options:A.options,schema:A.schema},l=Uke.resolveProps(n,{indicator:"doc-start",next:i??s?.[0],offset:r,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(A.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!l.hasNewline&&o(l.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),A.contents=i?f8.composeNode(c,i,l,o):f8.composeEmptyNode(c,l.end,n,null,l,o);let u=A.contents.range[2],d=Fke.resolveEnd(s,u,!1,o);return d.comment&&(A.comment=d.comment),A.range=[r,u,d.offset],A}h8.composeDoc=qke});var $k=h(y8=>{"use strict";var Hke=require("node:process"),jke=TD(),zke=lm(),gm=fm(),m8=He(),Gke= Line truncated `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Hve(t,e,r,n){let i=t.substr(e,r),o=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){let a=t.substr(e-2,r+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}J$.resolveFlowScalar=Ove});var $$=h(W$=>{"use strict";var wA=qe(),V$=tr(),zve=s_(),jve=a_();function Gve(t,e,r,n){let{value:i,type:s,comment:o,range:a}=e.type==="block-scalar"?zve.resolveBlockScalar(t,e,n):jve.resolveFlowScalar(e,t.options.strict,n),A=r?t.directives.tagName(r.source,u=>n(r,"TAG_RESOLVE_FAILED",u)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[wA.SCALAR]:A?c=Yve(t.schema,i,A,r,n):e.type==="scalar"?c=Jve(t,i,e,n):c=t.schema[wA.SCALAR];let l;try{let u=c.resolve(i,d=>n(r??e,"TAG_RESOLVE_FAILED",d),t.options);l=wA.isScalar(u)?u:new V$.Scalar(u)}catch(u){let d=u instanceof Error?u.message:String(u);n(r??e,"TAG_RESOLVE_FAILED",d),l=new V$.Scalar(i)}return l.range=a,l.source=i,s&&(l.type=s),A&&(l.tag=A),c.format&&(l.format=c.format),o&&(l.comment=o),l}function Yve(t,e,r,n,i){if(r==="!")return t[wA.SCALAR];let s=[];for(let a of t.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)s.push(a);else return a;for(let a of s)if(a.test?.test(e))return a;let o=t.knownTags[r];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[wA.SCALAR])}function Jve({atKey:t,directives:e,schema:r},n,i,s){let o=r.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(n))||r[wA.SCALAR];if(r.compat){let a=r.compat.find(A=>A.default&&A.test?.test(n))??r[wA.SCALAR];if(o.tag!==a.tag){let A=e.tagString(o.tag),c=e.tagString(a.tag),l=`Value may be parsed as either ${A} or ${c}`;s(i,"TAG_RESOLVE_FAILED",l,!0)}}return o}W$.composeScalar=Gve});var X$=h(K$=>{"use strict";function Vve(t,e,r){if(e){r===null&&(r=e.length);for(let n=r-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++n];i?.type==="space";)t+=i.source.length,i=e[++n];break}}return t}K$.emptyScalarPosition=Vve});var t9=h(c_=>{"use strict";var Wve=og(),$ve=qe(),Kve=j$(),Z$=$$(),Xve=id(),Zve=X$(),eRe={composeNode:e9,composeEmptyNode:A_};function e9(t,e,r,n){let i=t.atKey,{spaceBefore:s,comment:o,anchor:a,tag:A}=r,c,l=!0;switch(e.type){case"alias":c=tRe(t,e,n),(a||A)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Z$.composeScalar(t,e,A,n),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=Kve.composeCollection(eRe,t,e,r,n),a&&(c.anchor=a.source.substring(1));break;default:{let u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",u),c=A_(t,e.offset,void 0,null,r,n),l=!1}}return a&&c.anchor===""&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!$ve.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&n(A??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&l&&(c.srcToken=e),c}function A_(t,e,r,n,{spaceBefore:i,comment:s,anchor:o,tag:a,end:A},c){let l={type:"scalar",offset:Zve.emptyScalarPosition(e,r,n),indent:-1,source:""},u=Z$.composeScalar(t,l,a,c);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(u.spaceBefore=!0),s&&(u.comment=s,u.range[2]=A),u}function tRe({options:t},{offset:e,source:r,end:n},i){let s=new Wve.Alias(r.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+r.length,a=Xve.resolveEnd(n,o,t.strict,i);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}c_.composeEmptyNode=A_;c_.composeNode=e9});var i9=h(n9=>{"use strict";var rRe=Qg(),r9=t9(),nRe=id(),iRe=xg();function sRe(t,e,{offset:r,start:n,value:i,end:s},o){let a=Object.assign({_directives:e},t),A=new rRe.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:A.directives,options:A.options,schema:A.schema},l=iRe.resolveProps(n,{indicator:"doc-start",next:i??s?.[0],offset:r,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(A.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!l.hasNewline&&o(l.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),A.contents=i?r9.composeNode(c,i,l,o):r9.composeEmptyNode(c,l.end,n,null,l,o);let u=A.contents.range[2],d=nRe.resolveEnd(s,u,!1,o);return d.comment&&(A.comment=d.comment),A.range=[r,u,d.offset],A}n9.composeDoc=sRe});var u_=h(a9=>{"use strict";var oRe=require("node:process"),aRe=$R(),ARe=Qg(),Sg=wg(),s9=qe(),cRe= Line truncated
`:` `:`
`)+(s.substring(1)||" "),r=!0,n=!1;break;case"%":t[i+1]?.[0]!=="#"&&(i+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:e,afterEmptyLine:n}}var Wk=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,n,i,s)=>{let o=mm(r);s?this.warnings.push(new gm.YAMLWarning(o,n,i)):this.errors.push(new gm.YAMLParseError(o,n,i))},this.directives=new jke.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:n,afterEmptyLine:i}=p8(this.prelude);if(n){let s=e.contents;if(r)e.comment=e.comment?`${e.comment} `)+(s.substring(1)||" "),r=!0,n=!1;break;case"%":t[i+1]?.[0]!=="#"&&(i+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:e,afterEmptyLine:n}}var l_=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,n,i,s)=>{let o=vg(r);s?this.warnings.push(new Sg.YAMLWarning(o,n,i)):this.errors.push(new Sg.YAMLParseError(o,n,i))},this.directives=new aRe.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:n,afterEmptyLine:i}=o9(this.prelude);if(n){let s=e.contents;if(r)e.comment=e.comment?`${e.comment}
${n}`:n;else if(i||e.directives.docStart||!s)e.commentBefore=n;else if(m8.isCollection(s)&&!s.flow&&s.items.length>0){let o=s.items[0];m8.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${n} ${n}`:n;else if(i||e.directives.docStart||!s)e.commentBefore=n;else if(s9.isCollection(s)&&!s.flow&&s.items.length>0){let o=s.items[0];s9.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${n}
${a}`:n}else{let o=s.commentBefore;s.commentBefore=o?`${n} ${a}`:n}else{let o=s.commentBefore;s.commentBefore=o?`${n}
${o}`:n}}r?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:p8(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,n=-1){for(let i of e)yield*this.next(i);yield*this.end(r,n)}*next(e){switch(Hke.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(r,n,i)=>{let s=mm(e);s[0]+=r,this.onError(s,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=Gke.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new gm.YAMLParseError(mm(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new gm.YAMLParseError(mm(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=Yke.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let n=this.doc.comment;this.doc.comment=n?`${n} ${o}`:n}}r?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:o9(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,n=-1){for(let i of e)yield*this.next(i);yield*this.end(r,n)}*next(e){switch(oRe.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(r,n,i)=>{let s=vg(e);s[0]+=r,this.onError(s,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=cRe.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Sg.YAMLParseError(vg(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new Sg.YAMLParseError(vg(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=lRe.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new gm.YAMLParseError(mm(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new zke.Document(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,r,r],this.decorate(i,!1),yield i}}};y8.Composer=Wk});var I8=h(EQ=>{"use strict";var Jke=zk(),Vke=Yk(),Wke=fm(),E8=Xg();function $ke(t,e=!0,r){if(t){let n=(i,s,o)=>{let a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(r)r(a,s,o);else throw new Wke.YAMLParseError([a,a+1],s,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Vke.resolveFlowScalar(t,e,n);case"block-scalar":return Jke.resolveBlockScalar({options:{strict:e}},t,n)}}return null}function Kke(t,e){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:s=-1,type:o="PLAIN"}=e,a=E8.stringifyString({type:o,value:t},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),A=e.end??[{type:"newline",offset:-1,indent:n,source:` ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Sg.YAMLParseError(vg(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new ARe.Document(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,r,r],this.decorate(i,!1),yield i}}};a9.Composer=l_});var l9=h(rB=>{"use strict";var uRe=s_(),dRe=a_(),fRe=wg(),A9=ug();function hRe(t,e=!0,r){if(t){let n=(i,s,o)=>{let a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(r)r(a,s,o);else throw new fRe.YAMLParseError([a,a+1],s,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return dRe.resolveFlowScalar(t,e,n);case"block-scalar":return uRe.resolveBlockScalar({options:{strict:e}},t,n)}}return null}function gRe(t,e){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:s=-1,type:o="PLAIN"}=e,a=A9.stringifyString({type:o,value:t},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),A=e.end??[{type:"newline",offset:-1,indent:n,source:`
`}];switch(a[0]){case"|":case">":{let c=a.indexOf(` `}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
`),l=a.substring(0,c),u=a.substring(c+1)+` `),l=a.substring(0,c),u=a.substring(c+1)+`
`,d=[{type:"block-scalar-header",offset:s,indent:n,source:l}];return C8(d,A)||d.push({type:"newline",offset:-1,indent:n,source:` `,d=[{type:"block-scalar-header",offset:s,indent:n,source:l}];return c9(d,A)||d.push({type:"newline",offset:-1,indent:n,source:`
`}),{type:"block-scalar",offset:s,indent:n,props:d,source:u}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:a,end:A};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:a,end:A};default:return{type:"scalar",offset:s,indent:n,source:a,end:A}}}function Xke(t,e,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=r,a="indent"in t?t.indent:null;if(n&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=t.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let A=E8.stringifyString({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(A[0]){case"|":case">":Zke(t,A);break;case'"':Kk(t,A,"double-quoted-scalar");break;case"'":Kk(t,A,"single-quoted-scalar");break;default:Kk(t,A,"scalar")}}function Zke(t,e){let r=e.indexOf(` `}),{type:"block-scalar",offset:s,indent:n,props:d,source:u}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:a,end:A};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:a,end:A};default:return{type:"scalar",offset:s,indent:n,source:a,end:A}}}function mRe(t,e,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=r,a="indent"in t?t.indent:null;if(n&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=t.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let A=A9.stringifyString({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(A[0]){case"|":case">":pRe(t,A);break;case'"':d_(t,A,"double-quoted-scalar");break;case"'":d_(t,A,"single-quoted-scalar");break;default:d_(t,A,"scalar")}}function pRe(t,e){let r=e.indexOf(`
`),n=e.substring(0,r),i=e.substring(r+1)+` `),n=e.substring(0,r),i=e.substring(r+1)+`
`;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=n,t.source=i}else{let{offset:s}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:n}];C8(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:` `;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=n,t.source=i}else{let{offset:s}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:n}];c9(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
`});for(let A of Object.keys(t))A!=="type"&&A!=="offset"&&delete t[A];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:i})}}function C8(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}function Kk(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let n=t.props.slice(1),i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(let s of n)s.offset+=i;delete t.props,Object.assign(t,{type:r,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:` `});for(let A of Object.keys(t))A!=="type"&&A!=="offset"&&delete t[A];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:i})}}function c9(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}function d_(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let n=t.props.slice(1),i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(let s of n)s.offset+=i;delete t.props,Object.assign(t,{type:r,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
`};delete t.items,Object.assign(t,{type:r,source:e,end:[i]});break}default:{let n="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:r,indent:n,source:e,end:i})}}}EQ.createScalarToken=Kke;EQ.resolveAsScalar=$ke;EQ.setScalarValue=Xke});var Q8=h(B8=>{"use strict";var ePe=t=>"type"in t?IQ(t):CQ(t);function IQ(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=IQ(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=CQ(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=CQ(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=CQ(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}function CQ({start:t,key:e,sep:r,value:n}){let i="";for(let s of t)i+=s.source;if(e&&(i+=IQ(e)),r)for(let s of r)i+=s.source;return n&&(i+=IQ(n)),i}B8.stringify=ePe});var S8=h(w8=>{"use strict";var Xk=Symbol("break visit"),tPe=Symbol("skip children"),b8=Symbol("remove item");function JA(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),N8(Object.freeze([]),t,e)}JA.BREAK=Xk;JA.SKIP=tPe;JA.REMOVE=b8;JA.itemAtPath=(t,e)=>{let r=t;for(let[n,i]of e){let s=r?.[n];if(s&&"items"in s)r=s.items[i];else return}return r};JA.parentCollection=(t,e)=>{let r=JA.itemAtPath(t,e.slice(0,-1)),n=e[e.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function N8(t,e,r){let n=r(e,t);if(typeof n=="symbol")return n;for(let i of["key","value"]){let s=e[i];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=N8(Object.freeze(t.concat([[i,o]])),s.items[o],r);if(typeof a=="number")o=a-1;else{if(a===Xk)return Xk;a===b8&&(s.items.splice(o,1),o-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,t))}}return typeof n=="function"?n(e,t):n}w8.visit=JA});var BQ=h(Pn=>{"use strict";var Zk=I8(),rPe=Q8(),nPe=S8(),eP="\uFEFF",tP="",rP="",nP="",iPe=t=>!!t&&"items"in t,sPe=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function oPe(t){switch(t){case eP:return"<BOM>";case tP:return"<DOC>";case rP:return"<FLOW_END>";case nP:return"<SCALAR>";default:return JSON.stringify(t)}}function aPe(t){switch(t){case eP:return"byte-order-mark";case tP:return"doc-mode";case rP:return"flow-error-end";case nP:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` `};delete t.items,Object.assign(t,{type:r,source:e,end:[i]});break}default:{let n="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:r,indent:n,source:e,end:i})}}}rB.createScalarToken=gRe;rB.resolveAsScalar=hRe;rB.setScalarValue=mRe});var d9=h(u9=>{"use strict";var yRe=t=>"type"in t?iB(t):nB(t);function iB(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=iB(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=nB(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=nB(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=nB(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}function nB({start:t,key:e,sep:r,value:n}){let i="";for(let s of t)i+=s.source;if(e&&(i+=iB(e)),r)for(let s of r)i+=s.source;return n&&(i+=iB(n)),i}u9.stringify=yRe});var m9=h(g9=>{"use strict";var f_=Symbol("break visit"),ERe=Symbol("skip children"),f9=Symbol("remove item");function xA(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),h9(Object.freeze([]),t,e)}xA.BREAK=f_;xA.SKIP=ERe;xA.REMOVE=f9;xA.itemAtPath=(t,e)=>{let r=t;for(let[n,i]of e){let s=r?.[n];if(s&&"items"in s)r=s.items[i];else return}return r};xA.parentCollection=(t,e)=>{let r=xA.itemAtPath(t,e.slice(0,-1)),n=e[e.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function h9(t,e,r){let n=r(e,t);if(typeof n=="symbol")return n;for(let i of["key","value"]){let s=e[i];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=h9(Object.freeze(t.concat([[i,o]])),s.items[o],r);if(typeof a=="number")o=a-1;else{if(a===f_)return f_;a===f9&&(s.items.splice(o,1),o-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,t))}}return typeof n=="function"?n(e,t):n}g9.visit=xA});var sB=h(Nn=>{"use strict";var h_=l9(),CRe=d9(),IRe=m9(),g_="\uFEFF",m_="",p_="",y_="",BRe=t=>!!t&&"items"in t,QRe=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function bRe(t){switch(t){case g_:return"<BOM>";case m_:return"<DOC>";case p_:return"<FLOW_END>";case y_:return"<SCALAR>";default:return JSON.stringify(t)}}function NRe(t){switch(t){case g_:return"byte-order-mark";case m_:return"doc-mode";case p_:return"flow-error-end";case y_:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r `:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}Pn.createScalarToken=Zk.createScalarToken;Pn.resolveAsScalar=Zk.resolveAsScalar;Pn.setScalarValue=Zk.setScalarValue;Pn.stringify=rPe.stringify;Pn.visit=nPe.visit;Pn.BOM=eP;Pn.DOCUMENT=tP;Pn.FLOW_END=rP;Pn.SCALAR=nP;Pn.isCollection=iPe;Pn.isScalar=sPe;Pn.prettyToken=oPe;Pn.tokenType=aPe});var oP=h(R8=>{"use strict";var pm=BQ();function ts(t){switch(t){case void 0:case" ":case` `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}Nn.createScalarToken=h_.createScalarToken;Nn.resolveAsScalar=h_.resolveAsScalar;Nn.setScalarValue=h_.setScalarValue;Nn.stringify=CRe.stringify;Nn.visit=IRe.visit;Nn.BOM=g_;Nn.DOCUMENT=m_;Nn.FLOW_END=p_;Nn.SCALAR=y_;Nn.isCollection=BRe;Nn.isScalar=QRe;Nn.prettyToken=bRe;Nn.tokenType=NRe});var I_=h(y9=>{"use strict";var Rg=sB();function Hi(t){switch(t){case void 0:case" ":case`
`:case"\r":case" ":return!0;default:return!1}}var x8=new Set("0123456789ABCDEFabcdef"),APe=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),QQ=new Set(",[]{}"),cPe=new Set(` ,[]{} `:case"\r":case" ":return!0;default:return!1}}var p9=new Set("0123456789ABCDEFabcdef"),wRe=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),oB=new Set(",[]{}"),xRe=new Set(` ,[]{}
\r `),iP=t=>!t||cPe.has(t),sP=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===` \r `),E_=t=>!t||xRe.has(t),C_=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
`?!0:r==="\r"?this.buffer[e+1]===` `?!0:r==="\r"?this.buffer[e+1]===`
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let n=0;for(;r===" ";)r=this.buffer[++n+e];if(r==="\r"){let i=this.buffer[n+e+1];if(i===` `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let n=0;for(;r===" ";)r=this.buffer[++n+e];if(r==="\r"){let i=this.buffer[n+e+1];if(i===`
`||!i&&!this.atEnd)return e+n+1}return r===` `||!i&&!this.atEnd)return e+n+1}return r===`
`||n>=this.indentNext||!r&&!this.atEnd?e+n:-1}if(r==="-"||r==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&ts(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(` `||n>=this.indentNext||!r&&!this.atEnd?e+n:-1}if(r==="-"||r==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&Hi(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===pm.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,n=e.indexOf("#");for(;n!==-1;){let s=e[n-1];if(s===" "||s===" "){r=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let s=e[r-1];if(s===" "||s===" ")r-=1;else break}let i=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield pm.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let r=this.peek(3);if((r==="---"||r==="...")&&ts(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ts(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&ts(r)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(iP),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,n=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&ts(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield pm.FLOW_END,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(iP),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||ts(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),r=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let s=0;for(;this.buffer[r-1-s]==="\\";)s+=1;if(s%2===0)break;r=this.buffer.indexOf('"',r+1)}let n=this.buffer.substring(0,r),i=n.indexOf(` `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Rg.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,n=e.indexOf("#");for(;n!==-1;){let s=e[n-1];if(s===" "||s===" "){r=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let s=e[r-1];if(s===" "||s===" ")r-=1;else break}let i=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield Rg.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let r=this.peek(3);if((r==="---"||r==="...")&&Hi(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Hi(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Hi(r)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(E_),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,n=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&Hi(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Rg.FLOW_END,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(E_),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||Hi(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),r=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let s=0;for(;this.buffer[r-1-s]==="\\";)s+=1;if(s%2===0)break;r=this.buffer.indexOf('"',r+1)}let n=this.buffer.substring(0,r),i=n.indexOf(`
`,this.pos);if(i!==-1){for(;i!==-1;){let s=this.continueScalar(i+1);if(s===-1)break;i=n.indexOf(` `,this.pos);if(i!==-1){for(;i!==-1;){let s=this.continueScalar(i+1);if(s===-1)break;i=n.indexOf(`
`,s)}i!==-1&&(r=i-(n[i-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let r=this.buffer[++e];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>ts(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,n;e:for(let s=this.pos;n=this.buffer[s];++s)switch(n){case" ":r+=1;break;case` `,s)}i!==-1&&(r=i-(n[i-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let r=this.buffer[++e];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>Hi(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,n;e:for(let s=this.pos;n=this.buffer[s];++s)switch(n){case" ":r+=1;break;case`
`:e=s,r=0;break;case"\r":{let o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===` `:e=s,r=0;break;case"\r":{let o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
`)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(` `)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===` `,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
`;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===` `;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
`&&s>=this.pos&&s+1+r>a)e=s;else break}while(!0);return yield pm.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let s=this.buffer[n+1];if(ts(s)||e&&QQ.has(s))break;r=n}else if(ts(i)){let s=this.buffer[n+1];if(i==="\r"&&(s===` `&&s>=this.pos&&s+1+r>a)e=s;else break}while(!0);return yield Rg.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let s=this.buffer[n+1];if(Hi(s)||e&&oB.has(s))break;r=n}else if(Hi(i)){let s=this.buffer[n+1];if(i==="\r"&&(s===`
`?(n+=1,i=` `?(n+=1,i=`
`,s=this.buffer[n+1]):r=n),s==="#"||e&&QQ.has(s))break;if(i===` `,s=this.buffer[n+1]):r=n),s==="#"||e&&oB.has(s))break;if(i===`
`){let o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&QQ.has(i))break;r=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield pm.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(iP))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,r=this.charAt(1);if(ts(r)||e&&QQ.has(r))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!ts(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(APe.has(r))r=this.buffer[++e];else if(r==="%"&&x8.has(this.buffer[e+1])&&x8.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===` `){let o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&oB.has(i))break;r=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Rg.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(E_))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,r=this.charAt(1);if(Hi(r)||e&&oB.has(r))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!Hi(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(wRe.has(r))r=this.buffer[++e];else if(r==="%"&&p9.has(this.buffer[e+1])&&p9.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===` `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,n;do n=this.buffer[++r];while(n===" "||e&&n===" ");let i=r-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=r),i}*pushUntil(e){let r=this.pos,n=this.buffer[r];for(;!e(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};R8.Lexer=sP});var AP=h(v8=>{"use strict";var aP=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,n=this.lineStarts.length;for(;r<n;){let s=r+n>>1;this.lineStarts[s]<e?r=s+1:n=s}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};let i=this.lineStarts[r-1];return{line:r,col:e-i+1}}}};v8.LineCounter=aP});var lP=h(T8=>{"use strict";var lPe=require("node:process"),_8=BQ(),uPe=oP();function VA(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}function D8(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function P8(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function bQ(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function kd(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function k8(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!VA(e.start,"explicit-key-ind")&&!VA(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,P8(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var cP=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new uPe.Lexer,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,r))yield*this.next(n);r||(yield*this.end())}*next(e){if(this.source=e,lPe.env.LOG_TOKENS&&console.log("|",_8.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=_8.tokenType(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&k8(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=r;else{Object.assign(i,{key:r,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:r}):i.value=r;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:r,sep:[]}):i.sep?i.value=r:Object.assign(i,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="bloc Line truncated `?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,n;do n=this.buffer[++r];while(n===" "||e&&n===" ");let i=r-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=r),i}*pushUntil(e){let r=this.pos,n=this.buffer[r];for(;!e(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};y9.Lexer=C_});var Q_=h(E9=>{"use strict";var B_=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,n=this.lineStarts.length;for(;r<n;){let s=r+n>>1;this.lineStarts[s]<e?r=s+1:n=s}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};let i=this.lineStarts[r-1];return{line:r,col:e-i+1}}}};E9.LineCounter=B_});var N_=h(b9=>{"use strict";var SRe=require("node:process"),C9=sB(),vRe=I_();function SA(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}function I9(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Q9(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function aB(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function sd(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function B9(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!SA(e.start,"explicit-key-ind")&&!SA(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Q9(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var b_=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new vRe.Lexer,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,r))yield*this.next(n);r||(yield*this.end())}*next(e){if(this.source=e,SRe.env.LOG_TOKENS&&console.log("|",C9.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=C9.tokenType(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&B9(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=r;else{Object.assign(i,{key:r,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:r}):i.value=r;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:r,sep:[]}):i.sep?i.value=r:Object.assign(i,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="bloc Line truncated
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(` `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",s=[];if(i&&r.sep&&!r.value){let o=[];for(let a=0;a<r.sep.length;++a){let A=r.sep[a];switch(A.type){case"newline":o.push(a);break;case"space":break;case"comment":A.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=r.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||r.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):i||r.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(VA(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(P8(r.key)&&!VA(r.sep,"newline")){let o=kd(r.start),a=r.key,A=r.sep;A.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:A}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(VA(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let o=kd(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):VA(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);i||r.value?(e.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(o):(Object.assign(r,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){n&&o.type!=="block-seq"&&e.items.push({start:s}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||VA(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n&&n.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"singl Line truncated `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",s=[];if(i&&r.sep&&!r.value){let o=[];for(let a=0;a<r.sep.length;++a){let A=r.sep[a];switch(A.type){case"newline":o.push(a);break;case"space":break;case"comment":A.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=r.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||r.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):i||r.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(SA(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(Q9(r.key)&&!SA(r.sep,"newline")){let o=sd(r.start),a=r.key,A=r.sep;A.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:A}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(SA(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let o=sd(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):SA(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);i||r.value?(e.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(o):(Object.assign(r,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){n&&o.type!=="block-seq"&&e.items.push({start:s}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,r.start),i.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||SA(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n&&n.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"singl Line truncated
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(` `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
`,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=bQ(e),n=kd(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=bQ(e),n=kd(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};T8.Parser=cP});var U8=h(Em=>{"use strict";var O8=$k(),dPe=lm(),ym=fm(),fPe=VD(),hPe=He(),gPe=AP(),L8=lP();function M8(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new gPe.LineCounter||null,prettyErrors:e}}function mPe(t,e={}){let{lineCounter:r,prettyErrors:n}=M8(e),i=new L8.Parser(r?.addNewLine),s=new O8.Composer(e),o=Array.from(s.compose(i.parse(t)));if(n&&r)for(let a of o)a.errors.forEach(ym.prettifyError(t,r)),a.warnings.forEach(ym.prettifyError(t,r));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function F8(t,e={}){let{lineCounter:r,prettyErrors:n}=M8(e),i=new L8.Parser(r?.addNewLine),s=new O8.Composer(e),o=null;for(let a of s.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new ym.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(o.errors.forEach(ym.prettifyError(t,r)),o.warnings.forEach(ym.prettifyError(t,r))),o}function pPe(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=F8(t,r);if(!i)return null;if(i.warnings.forEach(s=>fPe.warn(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}function yPe(t,e,r){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){let{keepUndefined:i}=r??e??{};if(!i)return}return hPe.isDocument(t)&&!n?t.toString(r):new dPe.Document(t,n,r).toString(r)}Em.parse=pPe;Em.parseAllDocuments=mPe;Em.parseDocument=F8;Em.stringify=yPe});var dP=h(tt=>{"use strict";var EPe=$k(),CPe=lm(),IPe=vk(),uP=fm(),BPe=Jg(),Ta=He(),QPe=_a(),bPe=sr(),NPe=ka(),wPe=Pa(),SPe=BQ(),xPe=oP(),RPe=AP(),vPe=lP(),NQ=U8(),q8=jg();tt.Composer=EPe.Composer;tt.Document=CPe.Document;tt.Schema=IPe.Schema;tt.YAMLError=uP.YAMLError;tt.YAMLParseError=uP.YAMLParseError;tt.YAMLWarning=uP.YAMLWarning;tt.Alias=BPe.Alias;tt.isAlias=Ta.isAlias;tt.isCollection=Ta.isCollection;tt.isDocument=Ta.isDocument;tt.isMap=Ta.isMap;tt.isNode=Ta.isNode;tt.isPair=Ta.isPair;tt.isScalar=Ta.isScalar;tt.isSeq=Ta.isSeq;tt.Pair=QPe.Pair;tt.Scalar=bPe.Scalar;tt.YAMLMap=NPe.YAMLMap;tt.YAMLSeq=wPe.YAMLSeq;tt.CST=SPe;tt.Lexer=xPe.Lexer;tt.LineCounter=RPe.LineCounter;tt.Parser=vPe.Parser;tt.parse=NQ.parse;tt.parseAllDocuments=NQ.parseAllDocuments;tt.parseDocument=NQ.parseDocument;tt.stringify=NQ.stringify;tt.visit=q8.visit;tt.visitAsync=q8.visitAsync});var Gd=Ct(at());var F$=Ct(IB()),Qd=Ct(at());var P$=Ct(IB()),Di=Ct(at()),T$=Ct(Pf()),O$=Ct(k$()),L$=Ct(require("os"));async function M$(t){let e=await VRe();(0,Di.saveState)("cache_path",e);let r=await(0,O$.hashFiles)(t.cacheDependencyPath);if(!r)throw new Error("Some specified paths were not resolved, unable to cache dependencies.");let n=`pnpm-cache-${process.env.RUNNER_OS}-${L$.default.arch()}-${r}`;(0,Di.debug)(`Primary key is ${n}`),(0,Di.saveState)("cache_primary_key",n);let i=await(0,P$.restoreCache)([e],n);if((0,Di.setOutput)("cache-hit",!!i),!i){(0,Di.info)("Cache is not found");return}(0,Di.saveState)("cache_restored_key",i),(0,Di.info)(`Cache restored from key: ${i}`)}async function VRe(){let{stdout:t}=await(0,T$.getExecOutput)("pnpm store path --silent"),e=t.trim();return(0,Di.debug)(`Cache folLine truncated `,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=aB(e),n=sd(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=aB(e),n=sd(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};b9.Parser=b_});var v9=h(_g=>{"use strict";var N9=u_(),RRe=Qg(),Dg=wg(),DRe=cD(),_Re=qe(),kRe=Q_(),w9=N_();function x9(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new kRe.LineCounter||null,prettyErrors:e}}function PRe(t,e={}){let{lineCounter:r,prettyErrors:n}=x9(e),i=new w9.Parser(r?.addNewLine),s=new N9.Composer(e),o=Array.from(s.compose(i.parse(t)));if(n&&r)for(let a of o)a.errors.forEach(Dg.prettifyError(t,r)),a.warnings.forEach(Dg.prettifyError(t,r));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function S9(t,e={}){let{lineCounter:r,prettyErrors:n}=x9(e),i=new w9.Parser(r?.addNewLine),s=new N9.Composer(e),o=null;for(let a of s.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Dg.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(o.errors.forEach(Dg.prettifyError(t,r)),o.warnings.forEach(Dg.prettifyError(t,r))),o}function TRe(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=S9(t,r);if(!i)return null;if(i.warnings.forEach(s=>DRe.warn(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}function ORe(t,e,r){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){let{keepUndefined:i}=r??e??{};if(!i)return}return _Re.isDocument(t)&&!n?t.toString(r):new RRe.Document(t,n,r).toString(r)}_g.parse=TRe;_g.parseAllDocuments=PRe;_g.parseDocument=S9;_g.stringify=ORe});var x_=h(et=>{"use strict";var MRe=u_(),LRe=Qg(),FRe=GD(),w_=wg(),URe=og(),ga=qe(),qRe=ua(),HRe=tr(),zRe=fa(),jRe=ha(),GRe=sB(),YRe=I_(),JRe=Q_(),VRe=N_(),AB=v9(),R9=rg();et.Composer=MRe.Composer;et.Document=LRe.Document;et.Schema=FRe.Schema;et.YAMLError=w_.YAMLError;et.YAMLParseError=w_.YAMLParseError;et.YAMLWarning=w_.YAMLWarning;et.Alias=URe.Alias;et.isAlias=ga.isAlias;et.isCollection=ga.isCollection;et.isDocument=ga.isDocument;et.isMap=ga.isMap;et.isNode=ga.isNode;et.isPair=ga.isPair;et.isScalar=ga.isScalar;et.isSeq=ga.isSeq;et.Pair=qRe.Pair;et.Scalar=HRe.Scalar;et.YAMLMap=zRe.YAMLMap;et.YAMLSeq=jRe.YAMLSeq;et.CST=GRe;et.Lexer=YRe.Lexer;et.LineCounter=JRe.LineCounter;et.Parser=VRe.Parser;et.parse=AB.parse;et.parseAllDocuments=AB.parseAllDocuments;et.parseDocument=AB.parseDocument;et.stringify=AB.stringify;et.visit=R9.visit;et.visitAsync=R9.visitAsync});var Ea=ot(it());var S4=ot(Vh()),Wu=ot(it());var b4=ot(Vh()),Ii=ot(it()),N4=ot(qc()),w4=ot(p4()),GR=ot(require("os"));var lI=ot(Vh()),er=ot(it()),y4=ot(qc()),uI=require("fs"),zR=ot(require("os")),CA=ot(require("path"));function cI(t){let e="\\\\?\\";if(!t.startsWith(e))return t;let r=t.slice(e.length),n="UNC\\";return r.toUpperCase().startsWith(n)?`\\\\${r.slice(n.length)}`:r}var awe="lockfile-verified.jsonl",E4="lockfile_verification_cache_path",C4="lockfile_verification_cache_key",UR="lockfile_verification_cache_stored",qR,HR=!1,I4;async function B4(t){try{let e=CA.default.join(await cwe(),awe),r=`pnpm-lockfile-verified-${process.env.RUNNER_OS}-${zR.default.arch()}-${t}`;qR={cacheFilePath:e,key:r},(0,er.saveState)(E4,e),(0,er.saveState)(C4,r),(0,er.debug)(`Lockfile verification cache path is ${e}, key isLine truncated
`).filter(Boolean)}catch{return}}async function cwe(){let{stdout:t}=await(0,y4.getExecOutput)("pnpm config get cacheDir",void 0,{silent:!0,ignoreReturnCode:!0}),e=t.trim();return e&&e!=="undefined"?cI(e):lwe()}function lwe(){let{XDG_CACHE_HOME:t,LOCALAPPDATA:e}=process.env;if(t)return CA.default.join(t,"pnpm");let r=zR.default.homedir();switch(process.platform){case"darwin":return CA.default.join(r,"Library","Caches","pnpm");case"win32":return e?CA.default.join(e,"pnpm-cache"):CA.default.join(r,".pnpm-cache");default:return CA.default.join(r,".cache","pnpm")}}async function x4(t){let e=await(0,w4.hashFiles)(t.cacheDependencyPath);if(!e){if(t.cache)throw new Error("Some specified paths were not resolved, unable to cache dependencies.");return}await B4(e),t.cache&&await uwe(e)}async function uwe(t){let e=await dwe();(0,Ii.saveState)("cache_path",e);let r=`pnpm-cache-${process.env.RUNNER_OS}-${GR.default.arch()}-${t}`;(0,Ii.debug)(`Primary key is ${r}`),(0,Ii.saveState)("cache_primary_key",r);let n=[`pnpm-cache-${process.env.RUNNER_OS}-${GR.default.arch()}-`],i=await(0,b4.restoreCache)([e],r,n);if((0,Ii.setOutput)("cache-hit",i===r),!i){(0,Ii.info)("Cache is not found");return}(0,Ii.saveState)("cache_restored_key",i),(0,Ii.info)(`Cache restored from key: ${i}`)}async function dwe(){let{stdout:t}=await(0,N4.getExecOutput)("pnpm store path --silent"),e=cI(t.trim());return(0,Ii.debug)(`Cache folder is set to "${e}"`),e}async function fwe(t){if(!(0,S4.isFeatureAvailable)()){t.cache&&(0,Wu.warning)("Cache is not available, skipping cache restoration");return}(0,Wu.startGroup)("Restoring cache..."),await x4(t),(0,Wu.endGroup)()}var v4=fwe;var _4=ot(it());var R4=ot(Vh()),IA=ot(it());async function D4(){let t=(0,IA.getState)("cache_restored_key"),e=(0,IA.getState)("cache_primary_key"),r=(0,IA.getState)("cache_path");if(e===t){(0,IA.info)(`Cache hit occurred on the primary key ${e}, not saving cache.`);return}await(0,R4.saveCache)([r],e)!=-1&&(0,IA.info)(`Cache saved with the key: ${e}`)}async function hwe(t){if(t.cache)try{await D4()}catch(e){(0,_4.setFailed)(e.message)}}var k4=hwe;var gd=ot(it()),Y9=ot(H4());var hd=ot(it()),j9=ot(x_());var He;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let s={};for(let o of i)s[o]=o;return s},t.getValidEnumValues=i=>{let s=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(let a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(let o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(He||(He={}));var v_;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(v_||(v_={}));var Z=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),oo=t=>{switch(typeof t){case"undefined":return Z.undefined;case"string":return Z.string;case"number":return isNaN(t)?Z.nan:Z.number;case"boolean":return Z.boolean;case"function":return Z.function;case"bigint":return Z.bigint;case"symbol":return Z.symbol;case"object":return Array.isArray(t)?Z.array:t===null?Z.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Z.promise:typeof Map<"u"&&t instanceof Map?Z.map:typeof Set<"u"&&t instanceof Set?Z.set:typeof Date<"u"&&t instanceof Date?Z.date:Z.object;default:return Z.unknown}},O=He.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),WRe=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Kr=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(let o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,A=0;for(;A<o.path.length;){let c=o.path[A];A===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(o))):a[c]=a[c]||{_ Line truncated
- version ${e} in the GitHub Action config with the key "version" - version ${e} in the GitHub Action config with the key "version"
- version ${i} in the package.json with the key "packageManager" - version ${i} in the package.json with the key "packageManager"
Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`);return e}if(typeof i=="string"&&i.startsWith("pnpm@"))return i.replace("pnpm@","").replace(/\+.*$/,"");throw n?new Error(`No pnpm version is specified. Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`);return e}if(s?.packageManager?.name==="pnpm"&&s.packageManager.version)return s.packageManager.version;if(o)return o;throw n?new Error(`No pnpm version is specified.
Please specify it by one of the following ways: Please specify it by one of the following ways:
- in the GitHub Action config with the key "version" - in the GitHub Action config with the key "version"
- in the package.json with the key "packageManager"`):new Error(`No workspace is found. - in the package.json with the key "packageManager"
- in the package.json with the key "devEngines.packageManager"`):new Error(`No workspace is found.
If you've intended to let pnpm/action-setup read preferred pnpm version from the "packageManager" field in the package.json file, If you've intended to let pnpm/action-setup read preferred pnpm version from the "packageManager" field in the package.json file,
please run the actions/checkout before pnpm/action-setup. please run the actions/checkout before pnpm/action-setup.
Otherwise, please specify the pnpm version in the action configuration.`)}function sX(t,e,r){return new Promise((n,i)=>{let s=(0,oX.spawn)(t,e,{cwd:r.cwd,stdio:["pipe","inherit","inherit"],shell:process.platform==="win32"});s.on("error",i),s.on("close",n)})}var cX=YTe;async function VTe(t){(0,zd.startGroup)("Running self-installer...");let e=await cX(t);if((0,zd.endGroup)(),e)return(0,zd.setFailed)(`Something went wrong, self-installer exits with code ${e}`)}var lX=VTe;var Sm=Ct(at());var wm=Ct(require("path")),IP=Ct(require("process")),kQ=t=>wm.default.join(t.dest,"node_modules",".bin"),PQ=t=>({...IP.default.env,PATH:wm.default.join(kQ(t),"bin")+wm.default.delimiter+kQ(t)+wm.default.delimiter+IP.default.env.PATH});function WTe(t){let e=kQ(t);(0,Sm.addPath)(e),(0,Sm.setOutput)("dest",t.dest),(0,Sm.setOutput)("bin_dest",e)}var uX=WTe;var uc=Ct(at()),dX=require("child_process");function $Te(t){let e=PQ(t);for(let r of t.runInstall){let n=["install"];r.recursive&&n.unshift("recursive"),r.args&&n.push(...r.args);let i=["pnpm",...n].join(" ");(0,uc.startGroup)(`Running ${i}...`);let{error:s,status:o}=(0,dX.spawnSync)("pnpm",n,{stdio:"inherit",cwd:r.cwd,shell:!0,env:e});if((0,uc.endGroup)(),s){(0,uc.setFailed)(s);continue}if(o){(0,uc.setFailed)(`Command ${i} (cwd: ${r.cwd}) exits with status ${o}`);continue}}}var fX=$Te;var dc=Ct(at()),hX=require("child_process");function KTe(t){if(t.runInstall.length===0){console.log("Pruning is unnecessary.");return}(0,dc.startGroup)("Running pnpm store prune...");let{error:e,status:r}=(0,hX.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:!0,env:PQ(t)});if((0,dc.endGroup)(),e){(0,dc.warning)(e);return}if(r){(0,dc.warning)(`command pnpm store prune exits with code ${r}`);return}}var gX=KTe;async function XTe(){let t=iX();(0,Gd.getState)("is_post")==="true"?await eOe(t):await ZTe(t)}async function ZTe(t){(0,Gd.saveState)("is_post","true"),await lX(t),console.log("Installation Completed!"),uX(t),await U$(t),fX(t)}async function eOe(t){gX(t),await z$(t)}XTe().catch(t=>{console.error(t),(0,Gd.setFailed)(t)}); Otherwise, please specify the pnpm version in the action configuration.`)}function d_e(){return new Promise(t=>{let e=(0,O_.spawn)("node",["--version"],{stdio:["pipe","pipe","pipe"],shell:process.platform==="win32"}),r="";e.stdout.on("data",n=>{r+=n.toString()}),e.on("close",()=>{let n=r.match(/^v(\d+)\.(\d+)/);t(n?{major:parseInt(n[1],10),minor:parseInt(n[2],10)}:{major:0,minor:0})}),e.on("error",()=>t({major:0,minor:0}))})}function V9(t,e,r){return new Promise((n,i)=>{let s=(0,O_.spawn)(t,e,{cwd:r.cwd,env:r.env,stdio:["pipe","inherit","inherit"],shell:process.platform==="win32"});s.on("error",i),s.on("close",n)})}var K9=l_e;async function f_e(t){(0,md.startGroup)("Running self-installer...");let{exitCode:e,binDest:r}=await K9(t);if((0,md.endGroup)(),e){(0,md.setFailed)(`Something went wrong, self-installer exits with code ${e}`);return}return r}var X9=f_e;var M_=ot(it());function h_e(t,e){(0,M_.setOutput)("dest",t.dest),(0,M_.setOutput)("bin_dest",e)}var Z9=h_e;var GA=ot(it()),eK=require("child_process");function g_e(t){for(let e of t.runInstall){let r=["install"];e.recursive&&r.unshift("recursive"),e.args&&r.push(...e.args);let n=["pnpm",...r].join(" ");(0,GA.startGroup)(`Running ${n}...`);let{error:i,status:s}=(0,eK.spawnSync)("pnpm",r,{stdio:"inherit",cwd:e.cwd,shell:!0});if((0,GA.endGroup)(),i){(0,GA.setFailed)(i);continue}if(s){(0,GA.setFailed)(`Command ${n} (cwd: ${e.cwd}) exits with status ${s}`);continue}}}var tK=g_e;var YA=ot(it()),rK=require("child_process");function m_e(t){if(t.runInstall.length===0){console.log("Pruning is unnecessary.");return}(0,YA.startGroup)("Running pnpm store prune...");let{error:e,status:r}=(0,rK.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:!0});if((0,YA.endGroup)(),e){(0,YA.warning)(e);return}if(r){(0,YA.warning)(`command pnpm store prune exits with code ${r}`);return}}var nK=m_e;async function p_e(){(0,Ea.getState)("is_post")==="true"?await E_e():await y_e()}async function y_e(){let t=J9();(0,Ea.saveState)("inputs",t),(0,Ea.saveState)("is_post","true");let e=await X9(t);e!==void 0&&(console.log("Installation Completed!"),Z9(t,e),await v4(t),tK(t),await jR(t.runInstall.length))}async function E_e(){let t=JSON.parse((0,Ea.getState)("inputs"));await jR(),nK(t),await k4(t)}p_e().catch(t=>{console.error(t),(0,Ea.setFailed)(t)});
/*! Bundled license information: /*! Bundled license information:
undici/lib/fetch/body.js: undici/lib/fetch/body.js:
+2 -1
View File
@@ -3,7 +3,8 @@
"scripts": { "scripts": {
"build:bundle": "esbuild src/index.ts --bundle --platform=node --target=node24 --format=cjs --minify --outfile=dist/index.js --loader:.json=json", "build:bundle": "esbuild src/index.ts --bundle --platform=node --target=node24 --format=cjs --minify --outfile=dist/index.js --loader:.json=json",
"build": "pnpm run build:bundle", "build": "pnpm run build:bundle",
"start": "pnpm run build && sh ./run.sh" "start": "pnpm run build && sh ./run.sh",
"update-bootstrap": "node scripts/update-bootstrap.mjs"
}, },
"dependencies": { "dependencies": {
"@actions/cache": "^4.1.0", "@actions/cache": "^4.1.0",
+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/env node
// Usage: node scripts/update-bootstrap.mjs [version]
// If version is omitted, fetches the latest next-11 tag from npm.
// Regenerates the bootstrap lockfiles used by action-setup to install pnpm via npm.
import { execSync } from 'child_process'
import { mkdtempSync, rmSync, readFileSync, writeFileSync } from 'fs'
import { join } from 'path'
import { tmpdir } from 'os'
const BOOTSTRAP_DIR = new URL('../src/install-pnpm/bootstrap/', import.meta.url).pathname
const version = process.argv[2] || resolveLatestVersion()
console.log(`Updating bootstrap lockfiles to pnpm@${version} ...`)
generateLock('pnpm-lock.json', { pnpm: version }, 'bootstrap-pnpm')
generateLock('exe-lock.json', { '@pnpm/exe': version }, 'bootstrap-exe')
console.log('Done!')
function resolveLatestVersion() {
const json = execSync('npm view @pnpm/exe dist-tags --json', { encoding: 'utf8' })
const tags = JSON.parse(json)
const version = tags['next-11'] || tags['latest']
if (!version) {
console.error('Could not determine latest pnpm version from npm dist-tags')
process.exit(1)
}
return version
}
function generateLock(filename, dependencies, name) {
const tmp = mkdtempSync(join(tmpdir(), 'pnpm-bootstrap-'))
try {
writeFileSync(join(tmp, 'package.json'), JSON.stringify({ private: true, dependencies }))
execSync('npm install --package-lock-only --ignore-scripts', { cwd: tmp, stdio: 'pipe' })
const lock = readFileSync(join(tmp, 'package-lock.json'), 'utf8')
const parsed = JSON.parse(lock)
parsed.name = name
writeFileSync(join(BOOTSTRAP_DIR, filename), JSON.stringify(parsed, null, 2) + '\n')
console.log(` ${filename} -> ${Object.values(dependencies)[0]}@${version}`)
} finally {
rmSync(tmp, { recursive: true, force: true })
}
}
+2 -2
View File
@@ -4,10 +4,10 @@ import { Inputs } from '../inputs'
import { runRestoreCache } from './run' import { runRestoreCache } from './run'
export async function restoreCache(inputs: Inputs) { export async function restoreCache(inputs: Inputs) {
if (!inputs.cache) return
if (!isFeatureAvailable()) { if (!isFeatureAvailable()) {
if (inputs.cache) {
warning('Cache is not available, skipping cache restoration') warning('Cache is not available, skipping cache restoration')
}
return return
} }
+34 -6
View File
@@ -4,23 +4,51 @@ import { getExecOutput } from '@actions/exec'
import { hashFiles } from '@actions/glob' import { hashFiles } from '@actions/glob'
import os from 'os' import os from 'os'
import { Inputs } from '../inputs' import { Inputs } from '../inputs'
import { restoreVerificationCache } from '../lockfile-verification-cache'
import { removeWindowsExtendedPathPrefix } from '../windows-path'
export async function runRestoreCache(inputs: Inputs) { export async function runRestoreCache(inputs: Inputs) {
const cachePath = await getCacheDirectory()
saveState('cache_path', cachePath)
const fileHash = await hashFiles(inputs.cacheDependencyPath) const fileHash = await hashFiles(inputs.cacheDependencyPath)
if (!fileHash) { if (!fileHash) {
// Both caches are keyed on the lockfile, so neither can be restored
// without one. Only the store cache was asked for by name.
if (inputs.cache) {
throw new Error('Some specified paths were not resolved, unable to cache dependencies.') throw new Error('Some specified paths were not resolved, unable to cache dependencies.')
} }
return
}
// Restored whether or not the store is cached: the log is a fraction of a
// kilobyte, and without it pnpm re-checks every lockfile entry against the
// registry on each run — seconds even on a repository that configures no
// supply-chain policies.
await restoreVerificationCache(fileHash)
if (inputs.cache) {
await runRestoreStoreCache(fileHash)
}
}
async function runRestoreStoreCache(fileHash: string) {
const cachePath = await getCacheDirectory()
saveState('cache_path', cachePath)
const primaryKey = `pnpm-cache-${process.env.RUNNER_OS}-${os.arch()}-${fileHash}` const primaryKey = `pnpm-cache-${process.env.RUNNER_OS}-${os.arch()}-${fileHash}`
debug(`Primary key is ${primaryKey}`) debug(`Primary key is ${primaryKey}`)
saveState('cache_primary_key', primaryKey) saveState('cache_primary_key', primaryKey)
let cacheKey = await restoreCache([cachePath], primaryKey) // We don't need to download everything again if only one dependency changed
// We can still re-use previous store to cache the rest of the unchanged dependencies
const restoreKeys = [
`pnpm-cache-${process.env.RUNNER_OS}-${os.arch()}-`
];
setOutput('cache-hit', Boolean(cacheKey)) let cacheKey = await restoreCache([cachePath], primaryKey, restoreKeys)
// A restore-key (prefix) match still restores an older store, but "cache-hit"
// must only report an exact primary-key match, so dependency installation
// is not skipped when the lockfile has changed.
setOutput('cache-hit', cacheKey === primaryKey)
if (!cacheKey) { if (!cacheKey) {
info(`Cache is not found`) info(`Cache is not found`)
@@ -33,7 +61,7 @@ export async function runRestoreCache(inputs: Inputs) {
async function getCacheDirectory() { async function getCacheDirectory() {
const { stdout } = await getExecOutput('pnpm store path --silent') const { stdout } = await getExecOutput('pnpm store path --silent')
const cacheFolderPath = stdout.trim() const cacheFolderPath = removeWindowsExtendedPathPrefix(stdout.trim())
debug(`Cache folder is set to "${cacheFolderPath}"`) debug(`Cache folder is set to "${cacheFolderPath}"`)
return cacheFolderPath return cacheFolderPath
} }
+16 -8
View File
@@ -3,33 +3,41 @@ import restoreCache from './cache-restore'
import saveCache from './cache-save' import saveCache from './cache-save'
import getInputs, { Inputs } from './inputs' import getInputs, { Inputs } from './inputs'
import installPnpm from './install-pnpm' import installPnpm from './install-pnpm'
import { saveVerificationCache } from './lockfile-verification-cache'
import setOutputs from './outputs' import setOutputs from './outputs'
import pnpmInstall from './pnpm-install' import pnpmInstall from './pnpm-install'
import pruneStore from './pnpm-store-prune' import pruneStore from './pnpm-store-prune'
async function main() { async function main() {
const inputs = getInputs()
if (getState('is_post') === 'true') { if (getState('is_post') === 'true') {
await runPost(inputs) await runPost()
} else { } else {
await runMain(inputs) await runMain()
} }
} }
async function runMain(inputs: Inputs) { async function runMain() {
const inputs = getInputs()
saveState('inputs', inputs)
saveState('is_post', 'true') saveState('is_post', 'true')
await installPnpm(inputs) const binDest = await installPnpm(inputs)
if (binDest === undefined) return
console.log('Installation Completed!') console.log('Installation Completed!')
setOutputs(inputs) setOutputs(inputs, binDest)
await restoreCache(inputs) await restoreCache(inputs)
pnpmInstall(inputs) pnpmInstall(inputs)
await saveVerificationCache(inputs.runInstall.length)
} }
async function runPost(inputs: Inputs) { async function runPost() {
const inputs = JSON.parse(getState('inputs')) as Inputs
// Covers a job that installs in a later step of its own; when this action
// installed, the log was already saved then. Runs before the prune because
// pnpm versions before pnpm/pnpm#13893 delete the log during one.
await saveVerificationCache()
pruneStore(inputs) pruneStore(inputs)
await saveCache(inputs) await saveCache(inputs)
} }
+239 -59
View File
@@ -5,34 +5,42 @@
"packages": { "packages": {
"": { "": {
"dependencies": { "dependencies": {
"@pnpm/exe": "10.32.1" "@pnpm/exe": "11.19.0"
} }
}, },
"node_modules/@pnpm/exe": { "node_modules/@pnpm/exe": {
"version": "10.32.1", "version": "11.19.0",
"resolved": "https://registry.npmjs.org/@pnpm/exe/-/exe-10.32.1.tgz", "resolved": "https://registry.npmjs.org/@pnpm/exe/-/exe-11.19.0.tgz",
"integrity": "sha512-baEtwHeZwmZAdBuuDDL6tbdGg5KpxhPxr3QFfYTGXvY6ws+Z1bN0mQ7ZjcaXBSC1HuLpVXnZ6NsBiaZ2DMv4vg==", "integrity": "sha512-P1mw8BZaNkEpttlyzKsxTj7PVs94bMB4cQ8pJhgbrCTSBP7xCzKS3VlOwIInS7aS5by6KAbfO5Vs9yK/ekugrg==",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"dependencies": {
"@reflink/reflink": "0.1.19",
"detect-libc": "^2.1.2"
},
"bin": { "bin": {
"pnpm": "pnpm" "pn": "pn",
"pnpm": "pnpm",
"pnpx": "pnpx",
"pnx": "pnx"
}, },
"funding": { "funding": {
"url": "https://opencollective.com/pnpm" "url": "https://opencollective.com/pnpm"
}, },
"optionalDependencies": { "optionalDependencies": {
"@pnpm/linux-arm64": "10.32.1", "@pnpm/linux-arm64": "11.19.0",
"@pnpm/linux-x64": "10.32.1", "@pnpm/linux-x64": "11.19.0",
"@pnpm/macos-arm64": "10.32.1", "@pnpm/linuxstatic-arm64": "11.19.0",
"@pnpm/macos-x64": "10.32.1", "@pnpm/linuxstatic-x64": "11.19.0",
"@pnpm/win-arm64": "10.32.1", "@pnpm/macos-arm64": "11.19.0",
"@pnpm/win-x64": "10.32.1" "@pnpm/win-arm64": "11.19.0",
"@pnpm/win-x64": "11.19.0"
} }
}, },
"node_modules/@pnpm/linux-arm64": { "node_modules/@pnpm/linux-arm64": {
"version": "10.32.1", "version": "11.19.0",
"resolved": "https://registry.npmjs.org/@pnpm/linux-arm64/-/linux-arm64-10.32.1.tgz", "resolved": "https://registry.npmjs.org/@pnpm/linux-arm64/-/linux-arm64-11.19.0.tgz",
"integrity": "sha512-6uB0B+XvunQwHGzIMk2JCkl4Ur6BtM4XbJSwB/mgpWmXDoX/KTJmgx2lodcTjgJSGSySCHfIVuTR9sj/F2D4EA==", "integrity": "sha512-c5AJqnsj0BMqMCOtctOzsCqyfY+afFe1kdM9F2FrNhYwtnQRMHoJy+51qfee4yuTPOVRyk3Yh1dwvyAadiznvA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -41,17 +49,14 @@
"os": [ "os": [
"linux" "linux"
], ],
"bin": {
"pnpm": "pnpm"
},
"funding": { "funding": {
"url": "https://opencollective.com/pnpm" "url": "https://opencollective.com/pnpm"
} }
}, },
"node_modules/@pnpm/linux-x64": { "node_modules/@pnpm/linux-x64": {
"version": "10.32.1", "version": "11.19.0",
"resolved": "https://registry.npmjs.org/@pnpm/linux-x64/-/linux-x64-10.32.1.tgz", "resolved": "https://registry.npmjs.org/@pnpm/linux-x64/-/linux-x64-11.19.0.tgz",
"integrity": "sha512-AM2tv23Fg7h+nV+adqA/SkZKUysSIEetHfBwYFl8ArgdgkqbGoQy0rAOdKYQBb920CqfexXfI8OA8kPCzRxYng==", "integrity": "sha512-KOKpA9o75SvmRQgWO+EqEpQzJg1b9uHk5y61PAx90sSpdYtKDPua2eBXBglzv8YK1xM3DsYXFEf7Scs+3HeDsA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -60,17 +65,52 @@
"os": [ "os": [
"linux" "linux"
], ],
"bin": { "funding": {
"pnpm": "pnpm" "url": "https://opencollective.com/pnpm"
}
}, },
"node_modules/@pnpm/linuxstatic-arm64": {
"version": "11.19.0",
"resolved": "https://registry.npmjs.org/@pnpm/linuxstatic-arm64/-/linuxstatic-arm64-11.19.0.tgz",
"integrity": "sha512-Ci9WxgCInZc3F43R6BfaHevi+dYqaI5CLi6421egFsK649eHvYPytvu+zABhTNlYGNJbD8j9w+AUYInz/TPsyQ==",
"cpu": [
"arm64"
],
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"funding": {
"url": "https://opencollective.com/pnpm"
}
},
"node_modules/@pnpm/linuxstatic-x64": {
"version": "11.19.0",
"resolved": "https://registry.npmjs.org/@pnpm/linuxstatic-x64/-/linuxstatic-x64-11.19.0.tgz",
"integrity": "sha512-GNMk96vNJ4uEWigekarjHofXNDFsTYRL0Mw2YlDkv/W+u0cn/UAVPHfd5aAfsf6Arel2ZQfxPUTXlpunFujWnA==",
"cpu": [
"x64"
],
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"funding": { "funding": {
"url": "https://opencollective.com/pnpm" "url": "https://opencollective.com/pnpm"
} }
}, },
"node_modules/@pnpm/macos-arm64": { "node_modules/@pnpm/macos-arm64": {
"version": "10.32.1", "version": "11.19.0",
"resolved": "https://registry.npmjs.org/@pnpm/macos-arm64/-/macos-arm64-10.32.1.tgz", "resolved": "https://registry.npmjs.org/@pnpm/macos-arm64/-/macos-arm64-11.19.0.tgz",
"integrity": "sha512-Zr4JkhRbtGVsYgbuGZO0dq/6FPOn072Pdo0ubmqWtc14cUATKgAJD7efG03yqr3MLgtwFHgdtUzZ1WsaYAtUTA==", "integrity": "sha512-I3Ee/GQlPxEOeBSzqxBNwcTHxVebjMiN2xLdTBS6OK2TAPzbWMIExjU5brxhr8rAk73p7mbv/a/2tFC/3gl6FA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -79,36 +119,14 @@
"os": [ "os": [
"darwin" "darwin"
], ],
"bin": {
"pnpm": "pnpm"
},
"funding": {
"url": "https://opencollective.com/pnpm"
}
},
"node_modules/@pnpm/macos-x64": {
"version": "10.32.1",
"resolved": "https://registry.npmjs.org/@pnpm/macos-x64/-/macos-x64-10.32.1.tgz",
"integrity": "sha512-Yk6q3oFDu//OniXJxfTSHo+aew1LX81FcbzJAtEkcCeTQ0SLbQT6J3QiOMNikp8n8IjNhsy+bn2bdkUxaw+akA==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"bin": {
"pnpm": "pnpm"
},
"funding": { "funding": {
"url": "https://opencollective.com/pnpm" "url": "https://opencollective.com/pnpm"
} }
}, },
"node_modules/@pnpm/win-arm64": { "node_modules/@pnpm/win-arm64": {
"version": "10.32.1", "version": "11.19.0",
"resolved": "https://registry.npmjs.org/@pnpm/win-arm64/-/win-arm64-10.32.1.tgz", "resolved": "https://registry.npmjs.org/@pnpm/win-arm64/-/win-arm64-11.19.0.tgz",
"integrity": "sha512-P8rsP5IUetpYjr2iwggoswL2qUukYrJoToXWuMyo8immn58CsYxaXsHVQ1Oq1R3XMfmGGWTXLsiJuQ7H991MRg==", "integrity": "sha512-rOiWuJ9wjaFY9ZDVPGVjpvjIQHZNB72rioxvuyzDKJ7dqKQ97VF27a4rmOtjhMB5u83cdDGEJ+OY+H1+TP+frw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -117,17 +135,14 @@
"os": [ "os": [
"win32" "win32"
], ],
"bin": {
"pnpm": "pnpm.exe"
},
"funding": { "funding": {
"url": "https://opencollective.com/pnpm" "url": "https://opencollective.com/pnpm"
} }
}, },
"node_modules/@pnpm/win-x64": { "node_modules/@pnpm/win-x64": {
"version": "10.32.1", "version": "11.19.0",
"resolved": "https://registry.npmjs.org/@pnpm/win-x64/-/win-x64-10.32.1.tgz", "resolved": "https://registry.npmjs.org/@pnpm/win-x64/-/win-x64-11.19.0.tgz",
"integrity": "sha512-i24GwbtBO8ojrhp8WWimX7NgZs0UKH1171oRt6qcRL+a+FxE0Eggv2y0KP7ZI7F3+LZMarwr3tnYsZryfciUOg==", "integrity": "sha512-l26XeTxoGxfU+mVcZ5jFdP9hNe5yrOlLPSkAlwwpXPI1iyyU4JUSxm6Jdyxu1UAU1FerD/BvLK2vrlR6d9ogag==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -136,12 +151,177 @@
"os": [ "os": [
"win32" "win32"
], ],
"bin": {
"pnpm": "pnpm.exe"
},
"funding": { "funding": {
"url": "https://opencollective.com/pnpm" "url": "https://opencollective.com/pnpm"
} }
},
"node_modules/@reflink/reflink": {
"version": "0.1.19",
"resolved": "https://registry.npmjs.org/@reflink/reflink/-/reflink-0.1.19.tgz",
"integrity": "sha512-DmCG8GzysnCZ15bres3N5AHCmwBwYgp0As6xjhQ47rAUTUXxJiK+lLUxaGsX3hd/30qUpVElh05PbGuxRPgJwA==",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"optionalDependencies": {
"@reflink/reflink-darwin-arm64": "0.1.19",
"@reflink/reflink-darwin-x64": "0.1.19",
"@reflink/reflink-linux-arm64-gnu": "0.1.19",
"@reflink/reflink-linux-arm64-musl": "0.1.19",
"@reflink/reflink-linux-x64-gnu": "0.1.19",
"@reflink/reflink-linux-x64-musl": "0.1.19",
"@reflink/reflink-win32-arm64-msvc": "0.1.19",
"@reflink/reflink-win32-x64-msvc": "0.1.19"
}
},
"node_modules/@reflink/reflink-darwin-arm64": {
"version": "0.1.19",
"resolved": "https://registry.npmjs.org/@reflink/reflink-darwin-arm64/-/reflink-darwin-arm64-0.1.19.tgz",
"integrity": "sha512-ruy44Lpepdk1FqDz38vExBY/PVUsjxZA+chd9wozjUH9JjuDT/HEaQYA6wYN9mf041l0yLVar6BCZuWABJvHSA==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@reflink/reflink-darwin-x64": {
"version": "0.1.19",
"resolved": "https://registry.npmjs.org/@reflink/reflink-darwin-x64/-/reflink-darwin-x64-0.1.19.tgz",
"integrity": "sha512-By85MSWrMZa+c26TcnAy8SDk0sTUkYlNnwknSchkhHpGXOtjNDUOxJE9oByBnGbeuIE1PiQsxDG3Ud+IVV9yuA==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@reflink/reflink-linux-arm64-gnu": {
"version": "0.1.19",
"resolved": "https://registry.npmjs.org/@reflink/reflink-linux-arm64-gnu/-/reflink-linux-arm64-gnu-0.1.19.tgz",
"integrity": "sha512-7P+er8+rP9iNeN+bfmccM4hTAaLP6PQJPKWSA4iSk2bNvo6KU6RyPgYeHxXmzNKzPVRcypZQTpFgstHam6maVg==",
"cpu": [
"arm64"
],
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@reflink/reflink-linux-arm64-musl": {
"version": "0.1.19",
"resolved": "https://registry.npmjs.org/@reflink/reflink-linux-arm64-musl/-/reflink-linux-arm64-musl-0.1.19.tgz",
"integrity": "sha512-37iO/Dp6m5DDaC2sf3zPtx/hl9FV3Xze4xoYidrxxS9bgP3S8ALroxRK6xBG/1TtfXKTvolvp+IjrUU6ujIGmA==",
"cpu": [
"arm64"
],
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@reflink/reflink-linux-x64-gnu": {
"version": "0.1.19",
"resolved": "https://registry.npmjs.org/@reflink/reflink-linux-x64-gnu/-/reflink-linux-x64-gnu-0.1.19.tgz",
"integrity": "sha512-jbI8jvuYCaA3MVUdu8vLoLAFqC+iNMpiSuLbxlAgg7x3K5bsS8nOpTRnkLF7vISJ+rVR8W+7ThXlXlUQ93ulkw==",
"cpu": [
"x64"
],
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@reflink/reflink-linux-x64-musl": {
"version": "0.1.19",
"resolved": "https://registry.npmjs.org/@reflink/reflink-linux-x64-musl/-/reflink-linux-x64-musl-0.1.19.tgz",
"integrity": "sha512-e9FBWDe+lv7QKAwtKOt6A2W/fyy/aEEfr0g6j/hWzvQcrzHCsz07BNQYlNOjTfeytrtLU7k449H1PI95jA4OjQ==",
"cpu": [
"x64"
],
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@reflink/reflink-win32-arm64-msvc": {
"version": "0.1.19",
"resolved": "https://registry.npmjs.org/@reflink/reflink-win32-arm64-msvc/-/reflink-win32-arm64-msvc-0.1.19.tgz",
"integrity": "sha512-09PxnVIQcd+UOn4WAW73WU6PXL7DwGS6wPlkMhMg2zlHHG65F3vHepOw06HFCq+N42qkaNAc8AKIabWvtk6cIQ==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@reflink/reflink-win32-x64-msvc": {
"version": "0.1.19",
"resolved": "https://registry.npmjs.org/@reflink/reflink-win32-x64-msvc/-/reflink-win32-x64-msvc-0.1.19.tgz",
"integrity": "sha512-E//yT4ni2SyhwP8JRjVGWr3cbnhWDiPLgnQ66qqaanjjnMiu3O/2tjCPQXlcGc/DEYofpDc9fvhv6tALQsMV9w==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/detect-libc": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
"license": "Apache-2.0",
"engines": {
"node": ">=8"
}
} }
} }
} }
+9 -7
View File
@@ -5,20 +5,22 @@
"packages": { "packages": {
"": { "": {
"dependencies": { "dependencies": {
"pnpm": "latest" "pnpm": "11.19.0"
} }
}, },
"node_modules/pnpm": { "node_modules/pnpm": {
"version": "10.32.1", "version": "11.19.0",
"resolved": "https://registry.npmjs.org/pnpm/-/pnpm-10.32.1.tgz", "resolved": "https://registry.npmjs.org/pnpm/-/pnpm-11.19.0.tgz",
"integrity": "sha512-pwaTjw6JrBRWtlY+q07fHR+vM2jRGR/FxZeQ6W3JGORFarLmfWE94QQ9LoyB+HMD5rQNT/7KnfFe8a1Wc0jyvg==", "integrity": "sha512-eIHz7VkNRyxKlV4riLISF5ERYGbcyIy8o4SeybYPG7qm0syyIfqR2k4cZb7yvL43k2Wup6xTnHv4be3DobItzg==",
"license": "MIT", "license": "MIT",
"bin": { "bin": {
"pnpm": "bin/pnpm.cjs", "pn": "bin/pnpm.mjs",
"pnpx": "bin/pnpx.cjs" "pnpm": "bin/pnpm.mjs",
"pnpx": "bin/pnpx.mjs",
"pnx": "bin/pnpx.mjs"
}, },
"engines": { "engines": {
"node": ">=18.12" "node": ">=22.13"
}, },
"funding": { "funding": {
"url": "https://opencollective.com/pnpm" "url": "https://opencollective.com/pnpm"
+6 -4
View File
@@ -4,13 +4,15 @@ import runSelfInstaller from './run'
export { runSelfInstaller } export { runSelfInstaller }
export async function install(inputs: Inputs) { export async function install(inputs: Inputs): Promise<string | undefined> {
startGroup('Running self-installer...') startGroup('Running self-installer...')
const status = await runSelfInstaller(inputs) const { exitCode, binDest } = await runSelfInstaller(inputs)
endGroup() endGroup()
if (status) { if (exitCode) {
return setFailed(`Something went wrong, self-installer exits with code ${status}`) setFailed(`Something went wrong, self-installer exits with code ${exitCode}`)
return undefined
} }
return binDest
} }
export default install export default install
+106 -31
View File
@@ -12,8 +12,18 @@ import exeLock from './bootstrap/exe-lock.json'
const BOOTSTRAP_PNPM_PACKAGE_JSON = JSON.stringify({ private: true, dependencies: { pnpm: pnpmLock.packages['node_modules/pnpm'].version } }) const BOOTSTRAP_PNPM_PACKAGE_JSON = JSON.stringify({ private: true, dependencies: { pnpm: pnpmLock.packages['node_modules/pnpm'].version } })
const BOOTSTRAP_EXE_PACKAGE_JSON = JSON.stringify({ private: true, dependencies: { '@pnpm/exe': exeLock.packages['node_modules/@pnpm/exe'].version } }) const BOOTSTRAP_EXE_PACKAGE_JSON = JSON.stringify({ private: true, dependencies: { '@pnpm/exe': exeLock.packages['node_modules/@pnpm/exe'].version } })
export async function runSelfInstaller(inputs: Inputs): Promise<number> { export interface SelfInstallerResult {
const { version, dest, packageJsonFile, standalone } = inputs exitCode: number
binDest: string
}
export async function runSelfInstaller(inputs: Inputs): Promise<SelfInstallerResult> {
const { version, dest, packageJsonFile } = inputs
// pnpm v11 requires Node >= 22.13; use standalone (exe) bootstrap which
// bundles its own Node.js when the system Node is too old
const systemNode = await getSystemNodeVersion()
const standalone = inputs.standalone || systemNode.major < 22 || (systemNode.major === 22 && systemNode.minor < 13)
// Install bootstrap pnpm via npm (integrity verified by committed lockfile) // Install bootstrap pnpm via npm (integrity verified by committed lockfile)
await rm(dest, { recursive: true, force: true }) await rm(dest, { recursive: true, force: true })
@@ -24,73 +34,110 @@ export async function runSelfInstaller(inputs: Inputs): Promise<number> {
await writeFile(path.join(dest, 'package.json'), packageJson) await writeFile(path.join(dest, 'package.json'), packageJson)
await writeFile(path.join(dest, 'package-lock.json'), JSON.stringify(lockfile)) await writeFile(path.join(dest, 'package-lock.json'), JSON.stringify(lockfile))
const npmExitCode = await runCommand('npm', ['ci'], { cwd: dest }) // Append the action's node directory to PATH so npm's
// `#!/usr/bin/env node` shebang resolves on runners (e.g. GHE
// self-hosted) where node isn't already on PATH. Append (not
// prepend) so a user-installed toolchain on PATH — e.g. from a
// prior `setup-node` step — keeps precedence; otherwise the
// runner-bundled node would shadow it and pair the user's npm
// with a mismatched node version. npm itself is resolved via
// PATH — on the GitHub Actions runner it is not co-located with
// `process.execPath`.
const nodeDir = path.dirname(process.execPath)
// On Windows, the PATH key casing varies; search case-insensitively.
const pathKey = Object.keys(process.env).find(k => k.toUpperCase() === 'PATH') ?? 'PATH'
const currentPath = process.env[pathKey]
const npmEnv = { ...process.env, [pathKey]: currentPath ? currentPath + path.delimiter + nodeDir : nodeDir }
const npmExitCode = await runCommand('npm', ['ci'], { cwd: dest, env: npmEnv })
if (npmExitCode !== 0) { if (npmExitCode !== 0) {
return npmExitCode return { exitCode: npmExitCode, binDest: path.join(dest, 'node_modules', '.bin') }
} }
const pnpmHome = path.join(dest, 'node_modules', '.bin') // On Windows with standalone mode, npm's .bin shims can't properly
// execute the extensionless @pnpm/exe native binaries. Add the
// @pnpm/exe directory directly to PATH so pnpm.exe is found natively.
const pnpmHome = standalone && process.platform === 'win32'
? path.join(dest, 'node_modules', '@pnpm', 'exe')
: path.join(dest, 'node_modules', '.bin')
// PNPM_HOME/bin is where `pnpm self-update` places the target version
// binary. It must have higher PATH precedence than pnpmHome (which
// contains the bootstrap binary) so the self-updated version is found
// first. The bootstrap pnpm is invoked via absolute path, not PATH,
// so this ordering does not affect the bootstrap step.
addPath(pnpmHome) addPath(pnpmHome)
addPath(path.join(pnpmHome, 'bin')) addPath(path.join(pnpmHome, 'bin'))
exportVariable('PNPM_HOME', pnpmHome) exportVariable('PNPM_HOME', pnpmHome)
// Ensure pnpm bin link exists — npm ci sometimes doesn't create it // Ensure pnpm bin link exists — npm ci sometimes doesn't create it
const pnpmBinLink = path.join(pnpmHome, 'pnpm') if (process.platform !== 'win32') {
const pnpmBinLink = path.join(dest, 'node_modules', '.bin', 'pnpm')
if (!existsSync(pnpmBinLink)) { if (!existsSync(pnpmBinLink)) {
await mkdir(pnpmHome, { recursive: true }) await mkdir(path.join(dest, 'node_modules', '.bin'), { recursive: true })
const target = standalone const target = standalone
? path.join('..', '@pnpm', 'exe', 'pnpm') ? path.join('..', '@pnpm', 'exe', 'pnpm')
: path.join('..', 'pnpm', 'bin', 'pnpm.cjs') : path.join('..', 'pnpm', 'bin', 'pnpm.mjs')
await symlink(target, pnpmBinLink) await symlink(target, pnpmBinLink)
} }
}
const bootstrapPnpm = standalone const bootstrapPnpm = standalone
? path.join(dest, 'node_modules', '@pnpm', 'exe', 'pnpm') ? path.join(dest, 'node_modules', '@pnpm', 'exe', process.platform === 'win32' ? 'pnpm.exe' : 'pnpm')
: path.join(dest, 'node_modules', 'pnpm', 'bin', 'pnpm.cjs') : path.join(dest, 'node_modules', 'pnpm', 'bin', 'pnpm.mjs')
// Determine the target version // Self-update the bootstrap to the requested pnpm version. readTargetVersion
// either returns a value or throws, so this always runs.
const targetVersion = readTargetVersion({ version, packageJsonFile }) const targetVersion = readTargetVersion({ version, packageJsonFile })
if (targetVersion) {
const cmd = standalone ? bootstrapPnpm : process.execPath const cmd = standalone ? bootstrapPnpm : process.execPath
const args = standalone ? ['self-update', targetVersion] : [bootstrapPnpm, 'self-update', targetVersion] const args = standalone ? ['self-update', targetVersion] : [bootstrapPnpm, 'self-update', targetVersion]
const exitCode = await runCommand(cmd, args, { cwd: dest }) const exitCode = await runCommand(cmd, args, { cwd: dest })
if (exitCode !== 0) { if (exitCode !== 0) {
return exitCode return { exitCode, binDest: pnpmHome }
} }
} // self-update writes the target pnpm/pnpx into PNPM_HOME/bin, leaving
// the bootstrap symlinks in pnpmHome pointing at the old version. Use
return 0 // PNPM_HOME/bin so consumers of the bin_dest output (e.g.
// `${steps.pnpm.outputs.bin_dest}/pnpm`) invoke the requested version.
//
// When the requested version resolves to the bootstrap version, self-update
// is a no-op and PNPM_HOME/bin is not created — fall back to pnpmHome,
// whose symlinks already point at the right version.
const updatedBinDir = path.join(pnpmHome, 'bin')
return { exitCode: 0, binDest: existsSync(updatedBinDir) ? updatedBinDir : pnpmHome }
} }
function readTargetVersion(opts: { function readTargetVersion(opts: {
readonly version?: string | undefined readonly version?: string | undefined
readonly packageJsonFile: string readonly packageJsonFile: string
}): string | undefined { }): string {
const { version, packageJsonFile } = opts const { version, packageJsonFile } = opts
const { GITHUB_WORKSPACE } = process.env const { GITHUB_WORKSPACE } = process.env
let packageManager: unknown let packageManager: string | undefined
let devEngines: { packageManager?: { name?: string; version?: string } } | undefined
if (GITHUB_WORKSPACE) { if (GITHUB_WORKSPACE) {
try { try {
const content = readFileSync(path.join(GITHUB_WORKSPACE, packageJsonFile), 'utf8'); const content = readFileSync(path.join(GITHUB_WORKSPACE, packageJsonFile), 'utf8');
({ packageManager } = packageJsonFile.endsWith(".yaml") const manifest = packageJsonFile.endsWith(".yaml")
? parseYaml(content, { merge: true }) ? parseYaml(content, { merge: true })
: JSON.parse(content) : JSON.parse(content)
) packageManager = manifest.packageManager
devEngines = manifest.devEngines
} catch (error: unknown) { } catch (error: unknown) {
// Swallow error if package.json doesn't exist in root // Swallow error if package.json doesn't exist in root
if (!util.types.isNativeError(error) || !('code' in error) || error.code !== 'ENOENT') throw error if (!util.types.isNativeError(error) || !('code' in error) || error.code !== 'ENOENT') throw error
} }
} }
// packageManager is always exact `pnpm@<version>[+<integrity>]` per spec.
// Strip the integrity hash for self-update.
const packageManagerVersion =
typeof packageManager === 'string' && packageManager.startsWith('pnpm@')
? packageManager.slice('pnpm@'.length).split('+')[0]
: undefined
if (version) { if (version) {
if ( if (packageManagerVersion && packageManagerVersion !== version) {
typeof packageManager === 'string' &&
packageManager.startsWith('pnpm@') &&
packageManager.replace('pnpm@', '') !== version
) {
throw new Error(`Multiple versions of pnpm specified: throw new Error(`Multiple versions of pnpm specified:
- version ${version} in the GitHub Action config with the key "version" - version ${version} in the GitHub Action config with the key "version"
- version ${packageManager} in the package.json with the key "packageManager" - version ${packageManager} in the package.json with the key "packageManager"
@@ -100,9 +147,22 @@ Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_
return version return version
} }
if (typeof packageManager === 'string' && packageManager.startsWith('pnpm@')) { // Self-update the bootstrap pnpm to the version pinned in package.json so
// Strip the "pnpm@" prefix and any "+sha..." hash suffix // PATH-resolved `pnpm` (and the bin_dest output) reflect the target
return packageManager.replace('pnpm@', '').replace(/\+.*$/, '') // version. Without this, `pnpm store path` runs as the bootstrap and
// reports a different STORE_VERSION than the one the user's actual
// install writes to — breaking cache: true and actions/setup-node's
// `cache: pnpm` on cold caches (issue #233).
//
// devEngines.packageManager takes priority over packageManager, matching
// pnpm's getWantedPackageManager logic. `pnpm self-update` accepts both
// exact versions and semver ranges, so we pass either through directly.
if (devEngines?.packageManager?.name === 'pnpm' && devEngines.packageManager.version) {
return devEngines.packageManager.version
}
if (packageManagerVersion) {
return packageManagerVersion
} }
if (!GITHUB_WORKSPACE) { if (!GITHUB_WORKSPACE) {
@@ -115,13 +175,28 @@ Otherwise, please specify the pnpm version in the action configuration.`)
throw new Error(`No pnpm version is specified. throw new Error(`No pnpm version is specified.
Please specify it by one of the following ways: Please specify it by one of the following ways:
- in the GitHub Action config with the key "version" - in the GitHub Action config with the key "version"
- in the package.json with the key "packageManager"`) - in the package.json with the key "packageManager"
- in the package.json with the key "devEngines.packageManager"`)
} }
function runCommand(cmd: string, args: string[], opts: { cwd: string }): Promise<number> { function getSystemNodeVersion(): Promise<{ major: number; minor: number }> {
return new Promise((resolve) => {
const cp = spawn('node', ['--version'], { stdio: ['pipe', 'pipe', 'pipe'], shell: process.platform === 'win32' })
let output = ''
cp.stdout.on('data', (data: Buffer) => { output += data.toString() })
cp.on('close', () => {
const match = output.match(/^v(\d+)\.(\d+)/)
resolve(match ? { major: parseInt(match[1], 10), minor: parseInt(match[2], 10) } : { major: 0, minor: 0 })
})
cp.on('error', () => resolve({ major: 0, minor: 0 }))
})
}
function runCommand(cmd: string, args: string[], opts: { cwd: string; env?: Record<string, string | undefined> }): Promise<number> {
return new Promise<number>((resolve, reject) => { return new Promise<number>((resolve, reject) => {
const cp = spawn(cmd, args, { const cp = spawn(cmd, args, {
cwd: opts.cwd, cwd: opts.cwd,
env: opts.env,
stdio: ['pipe', 'inherit', 'inherit'], stdio: ['pipe', 'inherit', 'inherit'],
shell: process.platform === 'win32', shell: process.platform === 'win32',
}) })
+164
View File
@@ -0,0 +1,164 @@
import { restoreCache, saveCache } from '@actions/cache'
import { debug, getState, info, saveState, warning } from '@actions/core'
import { getExecOutput } from '@actions/exec'
import { existsSync, readFileSync } from 'fs'
import os from 'os'
import path from 'path'
import { removeWindowsExtendedPathPrefix } from '../windows-path'
/**
* Where pnpm v11+ memoizes which lockfile passed which supply-chain policies.
* A job without it re-checks every lockfile entry against the registry, which
* on a large repository costs more than the install.
*/
const VERIFICATION_CACHE_FILE = 'lockfile-verified.jsonl'
const PATH_STATE = 'lockfile_verification_cache_path'
const KEY_STATE = 'lockfile_verification_cache_key'
const STORED_STATE = 'lockfile_verification_cache_stored'
/**
* Where the log lives and under which key it belongs in the cache. Held in
* memory as well as in the action's state because the main and post steps run
* as separate processes, and state written by one is only readable by the
* other.
*/
let target: { cacheFilePath: string, key: string } | undefined
/** Whether this process already restored or saved the log. */
let stored = false
/** The log's records as they stood before the install ran. */
let recordsBeforeInstall: string[] | undefined
/**
* The verdict is only valid for the exact lockfile content it was recorded
* for, so this cache is keyed on the same lockfile hash as the store cache
* but restored without prefix fallback: an older entry could never be used.
*/
export async function restoreVerificationCache(lockfileHash: string): Promise<void> {
try {
const cacheFilePath = path.join(await getPnpmCacheDirectory(), VERIFICATION_CACHE_FILE)
const key = `pnpm-lockfile-verified-${process.env.RUNNER_OS}-${os.arch()}-${lockfileHash}`
target = { cacheFilePath, key }
saveState(PATH_STATE, cacheFilePath)
saveState(KEY_STATE, key)
debug(`Lockfile verification cache path is ${cacheFilePath}, key is ${key}`)
const restoredKey = await restoreCache([cacheFilePath], key)
recordsBeforeInstall = readRecords(cacheFilePath)
if (!restoredKey) {
info('Lockfile verification cache is not found')
return
}
stored = true
saveState(STORED_STATE, 'true')
info(`Lockfile verification cache restored from key: ${restoredKey}`)
} catch (error) {
// The gate only costs time, never correctness — a job that cannot reuse
// a past verdict re-verifies and moves on.
warning(`Failed to restore the lockfile verification cache: ${(error as Error).message}`)
}
}
/**
* Uploaded as soon as the install that produced the log finishes, rather than
* at the end of the job: whatever a job runs after installing can rewrite the
* log on disk, and the job's own cache write would then publish that for later
* jobs to trust. Lifecycle scripts of the installed packages stay inside the
* window — they run during the install — but pnpm only runs those the
* repository has allow-listed, and `expectedNewRecords` catches what they
* append.
*
* Safe to call more than once; the second call is a no-op.
*/
export async function saveVerificationCache(expectedNewRecords = Infinity): Promise<void> {
if (stored || getState(STORED_STATE) === 'true') return
const cacheFilePath = target?.cacheFilePath ?? getState(PATH_STATE)
const key = target?.key ?? getState(KEY_STATE)
if (!cacheFilePath || !key || !existsSync(cacheFilePath)) return
if (!onlyGrewAsExpected(cacheFilePath, expectedNewRecords)) return
try {
const cacheId = await saveCache([cacheFilePath], key)
if (cacheId === -1) return
stored = true
saveState(STORED_STATE, 'true')
info(`Lockfile verification cache saved with the key: ${key}`)
} catch (error) {
warning(`Failed to save the lockfile verification cache: ${(error as Error).message}`)
}
}
/**
* An install appends its own verdict and leaves every earlier record in place.
* Anything else — a record the install did not write, or an earlier one gone —
* means something other than pnpm's verification wrote to the log, and
* uploading it would hand that to every later job. pnpm compacting the log
* (past a thousand records) lands here too, at the cost of one re-verification.
*/
function onlyGrewAsExpected(cacheFilePath: string, expectedNewRecords: number): boolean {
const before = recordsBeforeInstall
if (before === undefined) return true
const after = readRecords(cacheFilePath)
if (after === undefined) return false
if (!before.every((record, index) => after[index] === record)) {
warning(
'Records that predate the install are missing from the lockfile verification log; not caching it.'
)
return false
}
const added = after.length - before.length
if (added > expectedNewRecords) {
warning(
`The lockfile verification log gained ${added} records during the install, expected at most ${expectedNewRecords}; not caching it.`
)
return false
}
return true
}
function readRecords(cacheFilePath: string): string[] | undefined {
try {
return readFileSync(cacheFilePath, 'utf8').split('\n').filter(Boolean)
} catch {
return undefined
}
}
async function getPnpmCacheDirectory(): Promise<string> {
const { stdout } = await getExecOutput('pnpm config get cacheDir', undefined, {
silent: true,
ignoreReturnCode: true,
})
const configured = stdout.trim()
// `pnpm config get` reports settings, not defaults: an unset `cacheDir`
// prints `undefined` and the default has to be derived here.
if (configured && configured !== 'undefined') {
return removeWindowsExtendedPathPrefix(configured)
}
return defaultPnpmCacheDirectory()
}
/** Mirrors pnpm's own `cacheDir` default. */
function defaultPnpmCacheDirectory(): string {
const { XDG_CACHE_HOME, LOCALAPPDATA } = process.env
if (XDG_CACHE_HOME) return path.join(XDG_CACHE_HOME, 'pnpm')
const homeDir = os.homedir()
switch (process.platform) {
case 'darwin':
return path.join(homeDir, 'Library', 'Caches', 'pnpm')
case 'win32':
return LOCALAPPDATA ? path.join(LOCALAPPDATA, 'pnpm-cache') : path.join(homeDir, '.pnpm-cache')
default:
return path.join(homeDir, '.cache', 'pnpm')
}
}
+4 -5
View File
@@ -1,10 +1,9 @@
import { setOutput, addPath } from '@actions/core' import { setOutput } from '@actions/core'
import { Inputs } from '../inputs' import { Inputs } from '../inputs'
import { getBinDest } from '../utils'
export function setOutputs(inputs: Inputs) { export function setOutputs(inputs: Inputs, binDest: string) {
const binDest = getBinDest(inputs) // NOTE: addPath is already called in installPnpm — do not call it again
addPath(binDest) // here, as a second addPath would shadow the correct entry on Windows.
setOutput('dest', inputs.dest) setOutput('dest', inputs.dest)
setOutput('bin_dest', binDest) setOutput('bin_dest', binDest)
} }
+6 -4
View File
@@ -1,11 +1,8 @@
import { setFailed, startGroup, endGroup } from '@actions/core' import { setFailed, startGroup, endGroup } from '@actions/core'
import { spawnSync } from 'child_process' import { spawnSync } from 'child_process'
import { Inputs } from '../inputs' import { Inputs } from '../inputs'
import { patchPnpmEnv } from '../utils'
export function runPnpmInstall(inputs: Inputs) { export function runPnpmInstall(inputs: Inputs) {
const env = patchPnpmEnv(inputs)
for (const options of inputs.runInstall) { for (const options of inputs.runInstall) {
const args = ['install'] const args = ['install']
if (options.recursive) args.unshift('recursive') if (options.recursive) args.unshift('recursive')
@@ -14,11 +11,16 @@ export function runPnpmInstall(inputs: Inputs) {
const cmdStr = ['pnpm', ...args].join(' ') const cmdStr = ['pnpm', ...args].join(' ')
startGroup(`Running ${cmdStr}...`) startGroup(`Running ${cmdStr}...`)
// spawnSync inherits process.env, which already has $PNPM_HOME/bin and
// $PNPM_HOME prepended via addPath() in install-pnpm. Do NOT pass a
// hand-patched env that adds node_modules/.bin to the front — on
// Windows standalone, .bin/pnpm.cmd is an npm shim pointing at the
// BOOTSTRAP pnpm, which would shadow the self-updated one and break
// newer-pnpm-only behavior.
const { error, status } = spawnSync('pnpm', args, { const { error, status } = spawnSync('pnpm', args, {
stdio: 'inherit', stdio: 'inherit',
cwd: options.cwd, cwd: options.cwd,
shell: true, shell: true,
env,
}) })
endGroup() endGroup()
+2 -2
View File
@@ -1,7 +1,6 @@
import { warning, startGroup, endGroup } from '@actions/core' import { warning, startGroup, endGroup } from '@actions/core'
import { spawnSync } from 'child_process' import { spawnSync } from 'child_process'
import { Inputs } from '../inputs' import { Inputs } from '../inputs'
import { patchPnpmEnv } from '../utils'
export function pruneStore(inputs: Inputs) { export function pruneStore(inputs: Inputs) {
if (inputs.runInstall.length === 0) { if (inputs.runInstall.length === 0) {
@@ -10,10 +9,11 @@ export function pruneStore(inputs: Inputs) {
} }
startGroup('Running pnpm store prune...') startGroup('Running pnpm store prune...')
// spawnSync inherits process.env (which has the right PATH from addPath
// in install-pnpm). See pnpm-install/index.ts for the rationale.
const { error, status } = spawnSync('pnpm', ['store', 'prune'], { const { error, status } = spawnSync('pnpm', ['store', 'prune'], {
stdio: 'inherit', stdio: 'inherit',
shell: true, shell: true,
env: patchPnpmEnv(inputs),
}) })
endGroup() endGroup()
-10
View File
@@ -1,10 +0,0 @@
import path from 'path'
import process from 'process'
import { Inputs } from '../inputs'
export const getBinDest = (inputs: Inputs): string => path.join(inputs.dest, 'node_modules', '.bin')
export const patchPnpmEnv = (inputs: Inputs): NodeJS.ProcessEnv => ({
...process.env,
PATH: path.join(getBinDest(inputs), 'bin') + path.delimiter + getBinDest(inputs) + path.delimiter + process.env.PATH,
})
+19
View File
@@ -0,0 +1,19 @@
/**
* pnpm may report an extended-length path on Windows. The `?` in that prefix
* is interpreted as a wildcard by `@actions/cache`, which rejects it as a glob
* in the root segment. Cache APIs do not need the extended-length form, so
* convert it back to a regular drive or UNC path.
*/
export function removeWindowsExtendedPathPrefix(cachePath: string): string {
const extendedPathPrefix = '\\\\?\\'
if (!cachePath.startsWith(extendedPathPrefix)) return cachePath
const pathWithoutPrefix = cachePath.slice(extendedPathPrefix.length)
const uncPrefix = 'UNC\\'
if (pathWithoutPrefix.toUpperCase().startsWith(uncPrefix)) {
return `\\\\${pathWithoutPrefix.slice(uncPrefix.length)}`
}
return pathWithoutPrefix
}
export default removeWindowsExtendedPathPrefix