From 1e6c8330d4e70122662a92ee48a0079d44390241 Mon Sep 17 00:00:00 2001 From: Markus <28785953+MarkusJx@users.noreply.github.com> Date: Mon, 6 Jan 2025 12:55:23 +0100 Subject: [PATCH] ci: add lint workflow (#48) --- .github/dependabot.yml | 6 + .github/workflows/lint.yml | 18 + .github/workflows/test-cmake.yml | 204 +- .github/workflows/test.yml | 164 +- README.md | 172 +- action.yml | 70 +- dist/index.js | 29 +- dist/licenses.txt | 591 +++-- package-lock.json | 3968 +++++++++++++++++------------- package.json | 95 +- src/cache.ts | 28 +- src/index.ts | 194 +- src/installV1.ts | 112 +- src/installV2.ts | 124 +- src/request-progress.d.ts | 43 +- src/shared.ts | 510 ++-- tsconfig.json | 34 +- 17 files changed, 3555 insertions(+), 2807 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/lint.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..122534f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: 'npm' + directory: '/' + schedule: + interval: 'daily' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..f137284 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,18 @@ +name: Lint + +on: + push: + +jobs: + check-format: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + - name: Install dependencies + run: npm ci + - name: Check formatting + run: npm run prettier:check diff --git a/.github/workflows/test-cmake.yml b/.github/workflows/test-cmake.yml index 810ccd0..fc1e17d 100644 --- a/.github/workflows/test-cmake.yml +++ b/.github/workflows/test-cmake.yml @@ -1,116 +1,116 @@ name: CMake on: - push: - paths: - - '.github/workflows/test-cmake.yml' - - 'dist/**' - - 'action.yml' - - 'test/**' - pull_request: - paths: - - '.github/workflows/test-cmake.yml' - - 'dist/**' - - 'action.yml' - - 'test/**' + push: + paths: + - '.github/workflows/test-cmake.yml' + - 'dist/**' + - 'action.yml' + - 'test/**' + pull_request: + paths: + - '.github/workflows/test-cmake.yml' + - 'dist/**' + - 'action.yml' + - 'test/**' env: - BUILD_TYPE: Debug + BUILD_TYPE: Debug jobs: - build: - runs-on: ${{ matrix.os }} + build: + runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: ubuntu-20.04 - COMPILER: gcc - PLATFORM: 20.04 - ARCH: x86 - cache: false - - os: ubuntu-20.04 - COMPILER: gcc - PLATFORM: 20.04 - ARCH: aarch64 - cache: false - - os: windows-2019 - COMPILER: msvc - PLATFORM: 2019 - ARCH: x86 - cache: false - - os: windows-2019 - COMPILER: mingw - PLATFORM: 2019 - ARCH: x86 - cache: false - - os: ubuntu-20.04 - COMPILER: gcc - PLATFORM: 20.04 - ARCH: x86 - cache: true - - os: ubuntu-20.04 - COMPILER: gcc - PLATFORM: 20.04 - ARCH: aarch64 - cache: true - - os: windows-2019 - COMPILER: msvc - PLATFORM: 2019 - ARCH: x86 - cache: true - - os: windows-2019 - COMPILER: mingw - PLATFORM: 2019 - ARCH: x86 - cache: true + strategy: + matrix: + include: + - os: ubuntu-20.04 + COMPILER: gcc + PLATFORM: 20.04 + ARCH: x86 + cache: false + - os: ubuntu-20.04 + COMPILER: gcc + PLATFORM: 20.04 + ARCH: aarch64 + cache: false + - os: windows-2019 + COMPILER: msvc + PLATFORM: 2019 + ARCH: x86 + cache: false + - os: windows-2019 + COMPILER: mingw + PLATFORM: 2019 + ARCH: x86 + cache: false + - os: ubuntu-20.04 + COMPILER: gcc + PLATFORM: 20.04 + ARCH: x86 + cache: true + - os: ubuntu-20.04 + COMPILER: gcc + PLATFORM: 20.04 + ARCH: aarch64 + cache: true + - os: windows-2019 + COMPILER: msvc + PLATFORM: 2019 + ARCH: x86 + cache: true + - os: windows-2019 + COMPILER: mingw + PLATFORM: 2019 + ARCH: x86 + cache: true - steps: - - uses: actions/checkout@v3 - - name: Install boost - uses: ./ - id: install-boost - with: - boost_version: 1.79.0 - platform_version: ${{matrix.PLATFORM}} - toolset: ${{matrix.COMPILER}} - arch: ${{matrix.ARCH}} - cache: ${{matrix.cache}} + steps: + - uses: actions/checkout@v3 + - name: Install boost + uses: ./ + id: install-boost + with: + boost_version: 1.79.0 + platform_version: ${{matrix.PLATFORM}} + toolset: ${{matrix.COMPILER}} + arch: ${{matrix.ARCH}} + cache: ${{matrix.cache}} - - name: Setup MinGW - uses: egor-tensin/setup-mingw@v2 - if: ${{runner.os == 'Windows' && matrix.COMPILER == 'mingw'}} - with: - version: '8.1.0' + - name: Setup MinGW + uses: egor-tensin/setup-mingw@v2 + if: ${{runner.os == 'Windows' && matrix.COMPILER == 'mingw'}} + with: + version: '8.1.0' - - name: Install arm64 compiler - run: sudo apt-get update && sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y - if: matrix.ARCH == 'aarch64' + - name: Install arm64 compiler + run: sudo apt-get update && sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y + if: matrix.ARCH == 'aarch64' - - name: Configure CMake mingw - shell: bash - working-directory: test - run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBoost_LIBRARY_DIRS="${{steps.install-boost.outputs.BOOST_ROOT}}/lib" -G "MinGW Makefiles" -B build - if: ${{matrix.COMPILER == 'mingw'}} - env: - BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} + - name: Configure CMake mingw + shell: bash + working-directory: test + run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBoost_LIBRARY_DIRS="${{steps.install-boost.outputs.BOOST_ROOT}}/lib" -G "MinGW Makefiles" -B build + if: ${{matrix.COMPILER == 'mingw'}} + env: + BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} - - name: Configure CMake arm64 - shell: bash - working-directory: test - run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_ARM_BINARIES=1 -DBoost_LIBRARY_DIRS="${{steps.install-boost.outputs.BOOST_ROOT}}/lib" -B build - if: matrix.ARCH == 'aarch64' - env: - BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} + - name: Configure CMake arm64 + shell: bash + working-directory: test + run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_ARM_BINARIES=1 -DBoost_LIBRARY_DIRS="${{steps.install-boost.outputs.BOOST_ROOT}}/lib" -B build + if: matrix.ARCH == 'aarch64' + env: + BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} - - name: Configure CMake - shell: bash - working-directory: test - run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBoost_LIBRARY_DIRS="${{steps.install-boost.outputs.BOOST_ROOT}}/lib" -B build - if: ${{matrix.COMPILER != 'mingw' && matrix.ARCH != 'aarch64'}} - env: - BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} - - name: Build - working-directory: test/build - shell: bash - run: cmake --build . --config $BUILD_TYPE + - name: Configure CMake + shell: bash + working-directory: test + run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBoost_LIBRARY_DIRS="${{steps.install-boost.outputs.BOOST_ROOT}}/lib" -B build + if: ${{matrix.COMPILER != 'mingw' && matrix.ARCH != 'aarch64'}} + env: + BOOST_ROOT: ${{steps.install-boost.outputs.BOOST_ROOT}} + - name: Build + working-directory: test/build + shell: bash + run: cmake --build . --config $BUILD_TYPE diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ff07436..3dd35bd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,92 +1,92 @@ name: test on: - workflow_dispatch: - push: - paths: - - '.github/workflows/test.yml' - - 'dist/**' - - 'action.yml' - pull_request: - paths: - - '.github/workflows/test-cmake.yml' - - 'dist/**' - - 'action.yml' - - 'test/**' + workflow_dispatch: + push: + paths: + - '.github/workflows/test.yml' + - 'dist/**' + - 'action.yml' + pull_request: + paths: + - '.github/workflows/test-cmake.yml' + - 'dist/**' + - 'action.yml' + - 'test/**' jobs: - build: - runs-on: ${{ matrix.os }} + build: + runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: ubuntu-22.04 - boost_version: '1.80.0' - version: 22.04 - toolset: 'gcc' - - os: ubuntu-22.04 - boost_version: '1.80.0.beta1' - version: 22.04 - toolset: 'gcc' - - os: windows-2022 - boost_version: '1.80.0' - version: 2022 - toolset: 'msvc' - - os: windows-2022 - boost_version: '1.80.0.beta1' - version: 2022 - toolset: 'msvc' + strategy: + matrix: + include: + - os: ubuntu-22.04 + boost_version: '1.80.0' + version: 22.04 + toolset: 'gcc' + - os: ubuntu-22.04 + boost_version: '1.80.0.beta1' + version: 22.04 + toolset: 'gcc' + - os: windows-2022 + boost_version: '1.80.0' + version: 2022 + toolset: 'msvc' + - os: windows-2022 + boost_version: '1.80.0.beta1' + version: 2022 + toolset: 'msvc' - steps: - - uses: actions/checkout@v3 - - name: Install boost - uses: ./ - id: install-boost - with: - boost_version: ${{ matrix.boost_version }} - platform_version: ${{matrix.version}} - toolset: ${{matrix.toolset}} - - name: List contents of boost directory - run: ls - working-directory: ${{ steps.install-boost.outputs.BOOST_ROOT }} - shell: bash - - run: echo "${{ steps.install-boost.outputs.BOOST_ROOT }}" - shell: bash - - run: echo "${{ steps.install-boost.outputs.BOOST_VER }}" - shell: bash + steps: + - uses: actions/checkout@v3 + - name: Install boost + uses: ./ + id: install-boost + with: + boost_version: ${{ matrix.boost_version }} + platform_version: ${{matrix.version}} + toolset: ${{matrix.toolset}} + - name: List contents of boost directory + run: ls + working-directory: ${{ steps.install-boost.outputs.BOOST_ROOT }} + shell: bash + - run: echo "${{ steps.install-boost.outputs.BOOST_ROOT }}" + shell: bash + - run: echo "${{ steps.install-boost.outputs.BOOST_VER }}" + shell: bash - build-custom-install-dir: - runs-on: ${{matrix.os}} + build-custom-install-dir: + runs-on: ${{matrix.os}} - strategy: - matrix: - include: - - os: ubuntu-22.04 - version: 22.04 - dir: '/home/runner' - toolset: 'gcc' - - os: windows-2022 - version: 2022 - dir: 'C:/' - toolset: 'msvc' + strategy: + matrix: + include: + - os: ubuntu-22.04 + version: 22.04 + dir: '/home/runner' + toolset: 'gcc' + - os: windows-2022 + version: 2022 + dir: 'C:/' + toolset: 'msvc' - steps: - - uses: actions/checkout@v3 - - name: Install boost - uses: ./ - id: install-boost - with: - boost_version: 1.80.0 - boost_install_dir: ${{matrix.dir}} - cache: false - platform_version: ${{matrix.version}} - toolset: ${{matrix.toolset}} - - name: List contents of boost directory - run: ls - working-directory: ${{ steps.install-boost.outputs.BOOST_ROOT }} - shell: bash - - run: echo "${{ steps.install-boost.outputs.BOOST_ROOT }}" - shell: bash - - run: echo "${{ steps.install-boost.outputs.BOOST_VER }}" - shell: bash + steps: + - uses: actions/checkout@v3 + - name: Install boost + uses: ./ + id: install-boost + with: + boost_version: 1.80.0 + boost_install_dir: ${{matrix.dir}} + cache: false + platform_version: ${{matrix.version}} + toolset: ${{matrix.toolset}} + - name: List contents of boost directory + run: ls + working-directory: ${{ steps.install-boost.outputs.BOOST_ROOT }} + shell: bash + - run: echo "${{ steps.install-boost.outputs.BOOST_ROOT }}" + shell: bash + - run: echo "${{ steps.install-boost.outputs.BOOST_VER }}" + shell: bash diff --git a/README.md b/README.md index de5a8cf..c38ecda 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ The boost root directory path, to be passed to another tool, e.g. CMake to find - name: Configure CMake run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -B build env: - BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} + BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} ``` **Notes**: Sometimes you'll have to pass the path to the include and library directories to cmake: @@ -80,11 +80,11 @@ The boost root directory path, to be passed to another tool, e.g. CMake to find ```yml - name: Configure CMake run: | - cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -B build\ - -DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include\ - -DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib + cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -B build\ + -DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include\ + -DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib env: - BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} + BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} ``` ### `BOOST_VER` @@ -100,19 +100,19 @@ The version of boost installed, e.g. `boost-1.73.0-linux-16.04`. uses: MarkusJx/install-boost@v2.4.5 id: install-boost with: - # REQUIRED: Specify the required boost version - # A list of supported versions can be found here: - # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json - boost_version: 1.73.0 - # OPTIONAL: Specify a custon install location - boost_install_dir: C:\some_directory - # OPTIONAL: Specify a platform version - platform_version: 2019 - # OPTIONAL: Specify a toolset - toolset: msvc - - # NOTE: If a boost version matching all requirements cannot be found, - # this build step will fail + # REQUIRED: Specify the required boost version + # A list of supported versions can be found here: + # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json + boost_version: 1.73.0 + # OPTIONAL: Specify a custon install location + boost_install_dir: C:\some_directory + # OPTIONAL: Specify a platform version + platform_version: 2019 + # OPTIONAL: Specify a toolset + toolset: msvc + + # NOTE: If a boost version matching all requirements cannot be found, + # this build step will fail ``` ### Ubuntu @@ -122,21 +122,21 @@ The version of boost installed, e.g. `boost-1.73.0-linux-16.04`. uses: MarkusJx/install-boost@v2.4.5 id: install-boost with: - # REQUIRED: Specify the required boost version - # A list of supported versions can be found here: - # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json - boost_version: 1.73.0 - # OPTIONAL: Specify a platform version - platform_version: 18.04 - # OPTIONAL: Specify a custom install location - boost_install_dir: /home/runner/some_directory - # OPTIONAL: Specify a toolset - toolset: gcc - # OPTIONAL: Specify an architecture - arch: x86 - - # NOTE: If a boost version matching all requirements cannot be found, - # this build step will fail + # REQUIRED: Specify the required boost version + # A list of supported versions can be found here: + # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json + boost_version: 1.73.0 + # OPTIONAL: Specify a platform version + platform_version: 18.04 + # OPTIONAL: Specify a custom install location + boost_install_dir: /home/runner/some_directory + # OPTIONAL: Specify a toolset + toolset: gcc + # OPTIONAL: Specify an architecture + arch: x86 + + # NOTE: If a boost version matching all requirements cannot be found, + # this build step will fail ``` ### MacOs @@ -146,19 +146,19 @@ The version of boost installed, e.g. `boost-1.73.0-linux-16.04`. uses: MarkusJx/install-boost@v2.4.5 id: install-boost with: - # REQUIRED: Specify the required boost version - # A list of supported versions can be found here: - # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json - boost_version: 1.73.0 - # OPTIONAL: Specify a platform version - platform_version: 10.15 - # OPTIONAL: Specify a custom install location - boost_install_dir: /home/runner/some_directory - # OPTIONAL: Specify a toolset - toolset: clang - - # NOTE: If a boost version matching all requirements cannot be found, - # this build step will fail + # REQUIRED: Specify the required boost version + # A list of supported versions can be found here: + # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json + boost_version: 1.73.0 + # OPTIONAL: Specify a platform version + platform_version: 10.15 + # OPTIONAL: Specify a custom install location + boost_install_dir: /home/runner/some_directory + # OPTIONAL: Specify a toolset + toolset: clang + + # NOTE: If a boost version matching all requirements cannot be found, + # this build step will fail ``` ### Legacy use @@ -170,17 +170,17 @@ The version of boost installed, e.g. `boost-1.73.0-linux-16.04`. uses: MarkusJx/install-boost@v1.0.1 id: install-boost with: - # REQUIRED: Specify the required boost version - # A list of supported versions can be found here: - # https://github.com/actions/boost-versions/blob/main/versions-manifest.json - boost_version: 1.73.0 - # OPTIONAL: Specify a toolset on windows - toolset: msvc14.2 - # OPTIONAL: Specify a custon install location - boost_install_dir: C:\some_directory - - # NOTE: If a boost version matching all requirements cannot be found, - # this build step will fail + # REQUIRED: Specify the required boost version + # A list of supported versions can be found here: + # https://github.com/actions/boost-versions/blob/main/versions-manifest.json + boost_version: 1.73.0 + # OPTIONAL: Specify a toolset on windows + toolset: msvc14.2 + # OPTIONAL: Specify a custon install location + boost_install_dir: C:\some_directory + + # NOTE: If a boost version matching all requirements cannot be found, + # this build step will fail ``` or @@ -190,19 +190,19 @@ or uses: MarkusJx/install-boost@v2.4.4 id: install-boost with: - # REQUIRED: Specify the required boost version - # A list of supported versions can be found here: - # https://github.com/actions/boost-versions/blob/main/versions-manifest.json - boost_version: 1.73.0 - # Use the legacy version of this action - version: legacy - # OPTIONAL: Specify a toolset on windows - toolset: msvc14.2 - # OPTIONAL: Specify a custon install location - boost_install_dir: C:\some_directory - - # NOTE: If a boost version matching all requirements cannot be found, - # this build step will fail + # REQUIRED: Specify the required boost version + # A list of supported versions can be found here: + # https://github.com/actions/boost-versions/blob/main/versions-manifest.json + boost_version: 1.73.0 + # Use the legacy version of this action + version: legacy + # OPTIONAL: Specify a toolset on windows + toolset: msvc14.2 + # OPTIONAL: Specify a custon install location + boost_install_dir: C:\some_directory + + # NOTE: If a boost version matching all requirements cannot be found, + # this build step will fail ``` #### Ubuntu @@ -212,17 +212,17 @@ or uses: MarkusJx/install-boost@v1.0.1 id: install-boost with: - # REQUIRED: Specify the required boost version - # A list of supported versions can be found here: - # https://github.com/actions/boost-versions/blob/main/versions-manifest.json - boost_version: 1.73.0 - # OPTIONAL: Specify a platform version on ubuntu - platform_version: 18.04 - # OPTIONAL: Specify a custom install location - boost_install_dir: /home/runner/some_directory - - # NOTE: If a boost version matching all requirements cannot be found, - # this build step will fail + # REQUIRED: Specify the required boost version + # A list of supported versions can be found here: + # https://github.com/actions/boost-versions/blob/main/versions-manifest.json + boost_version: 1.73.0 + # OPTIONAL: Specify a platform version on ubuntu + platform_version: 18.04 + # OPTIONAL: Specify a custom install location + boost_install_dir: /home/runner/some_directory + + # NOTE: If a boost version matching all requirements cannot be found, + # this build step will fail ``` ## Caching @@ -236,11 +236,11 @@ this behaviour by setting the `cache` variable to `false`. Starting from boost version `1.80.0`, the pre-built binaries will be built with `boost.python` for the following python versions: -- `3.7` -- `3.8` -- `3.9` -- `3.10` -- `3.11` +- `3.7` +- `3.8` +- `3.9` +- `3.10` +- `3.11` Due to memory restrictions on the build runners, there are some binaries which don't support python: diff --git a/action.yml b/action.yml index 1077d57..0aabdab 100644 --- a/action.yml +++ b/action.yml @@ -2,41 +2,41 @@ name: 'Download and install Boost' description: 'Download and install Boost' author: 'MarkusJx' inputs: - boost_version: - description: 'The boost version to install, e.g. "1.73.0"' - required: true - toolset: - description: 'The toolset used to compile boost, e.g. "msvc"' - required: false - default: '' - platform_version: - description: 'The platform version boost was compiled on, e.g. "18.04"' - required: false - default: '' - link: - description: 'Whether the boost libraries are linked statically or dynamically' - required: false - default: '' - arch: - description: 'The architecture the binaries were built for' - required: false - default: 'x86' - boost_install_dir: - description: 'The dirctory to install boost into' - required: false - default: '' - cache: - description: 'Wheter to use actions/cache to improve build times' - required: false - default: true + boost_version: + description: 'The boost version to install, e.g. "1.73.0"' + required: true + toolset: + description: 'The toolset used to compile boost, e.g. "msvc"' + required: false + default: '' + platform_version: + description: 'The platform version boost was compiled on, e.g. "18.04"' + required: false + default: '' + link: + description: 'Whether the boost libraries are linked statically or dynamically' + required: false + default: '' + arch: + description: 'The architecture the binaries were built for' + required: false + default: 'x86' + boost_install_dir: + description: 'The dirctory to install boost into' + required: false + default: '' + cache: + description: 'Wheter to use actions/cache to improve build times' + required: false + default: true outputs: - BOOST_ROOT: - description: 'The path to the boost installation, e.g. to be used in CMake' - BOOST_VER: - description: 'The boost version installed' + BOOST_ROOT: + description: 'The path to the boost installation, e.g. to be used in CMake' + BOOST_VER: + description: 'The boost version installed' runs: - using: 'node20' - main: 'dist/index.js' + using: 'node20' + main: 'dist/index.js' branding: - icon: 'activity' - color: 'gray-dark' + icon: 'activity' + color: 'gray-dark' diff --git a/dist/index.js b/dist/index.js index a0cfb9c..d768be5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -(()=>{var __webpack_modules__={27799:function(e,t,r){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,a,i)}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))a(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(a.next(e))}catch(e){i(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.saveCache=t.restoreCache=t.isFeatureAvailable=t.ReserveCacheError=t.ValidationError=void 0;const o=n(r(42186));const p=n(r(71017));const l=n(r(91518));const c=n(r(98245));const d=r(56490);class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}t.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(e){super(e);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}t.ReserveCacheError=ReserveCacheError;function checkPaths(e){if(!e||e.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(e){if(e.length>512){throw new ValidationError(`Key Validation Error: ${e} cannot be larger than 512 characters.`)}const t=/^[^,]*$/;if(!t.test(e)){throw new ValidationError(`Key Validation Error: ${e} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}t.isFeatureAvailable=isFeatureAvailable;function restoreCache(e,t,r,a,i=false){return s(this,void 0,void 0,(function*(){checkPaths(e);r=r||[];const n=[t,...r];o.debug("Resolved Keys:");o.debug(JSON.stringify(n));if(n.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of n){checkKey(e)}const s=yield l.getCompressionMethod();let u="";try{const t=yield c.getCacheEntry(n,e,{compressionMethod:s,enableCrossOsArchive:i});if(!(t===null||t===void 0?void 0:t.archiveLocation)){return undefined}if(a===null||a===void 0?void 0:a.lookupOnly){o.info("Lookup only - skipping download");return t.cacheKey}u=p.join(yield l.createTempDirectory(),l.getCacheFileName(s));o.debug(`Archive Path: ${u}`);yield c.downloadCache(t.archiveLocation,u,a);if(o.isDebug()){yield(0,d.listTar)(u,s)}const r=l.getArchiveFileSizeInBytes(u);o.info(`Cache Size: ~${Math.round(r/(1024*1024))} MB (${r} B)`);yield(0,d.extractTar)(u,s);o.info("Cache restored successfully");return t.cacheKey}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else{o.warning(`Failed to restore: ${e.message}`)}}finally{try{yield l.unlinkFile(u)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return undefined}))}t.restoreCache=restoreCache;function saveCache(e,t,r,a=false){var i,n,u,m,h;return s(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const s=yield l.getCompressionMethod();let f=-1;const g=yield l.resolvePaths(e);o.debug("Cache Paths:");o.debug(`${JSON.stringify(g)}`);if(g.length===0){throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}const y=yield l.createTempDirectory();const v=p.join(y,l.getCacheFileName(s));o.debug(`Archive Path: ${v}`);try{yield(0,d.createTar)(y,g,s);if(o.isDebug()){yield(0,d.listTar)(v,s)}const p=10*1024*1024*1024;const E=l.getArchiveFileSizeInBytes(v);o.debug(`File Size: ${E}`);if(E>p&&!l.isGhes()){throw new Error(`Cache size of ~${Math.round(E/(1024*1024))} MB (${E} B) is over the 10GB limit, not saving cache.`)}o.debug("Reserving Cache");const b=yield c.reserveCache(t,e,{compressionMethod:s,enableCrossOsArchive:a,cacheSize:E});if((i=b===null||b===void 0?void 0:b.result)===null||i===void 0?void 0:i.cacheId){f=(n=b===null||b===void 0?void 0:b.result)===null||n===void 0?void 0:n.cacheId}else if((b===null||b===void 0?void 0:b.statusCode)===400){throw new Error((m=(u=b===null||b===void 0?void 0:b.error)===null||u===void 0?void 0:u.message)!==null&&m!==void 0?m:`Cache size of ~${Math.round(E/(1024*1024))} MB (${E} B) is over the data cap limit, not saving cache.`)}else{throw new ReserveCacheError(`Unable to reserve cache with key ${t}, another job may be creating this cache. More details: ${(h=b===null||b===void 0?void 0:b.error)===null||h===void 0?void 0:h.message}`)}o.debug(`Saving Cache (ID: ${f})`);yield c.saveCache(f,v,r)}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else if(t.name===ReserveCacheError.name){o.info(`Failed to save: ${t.message}`)}else{o.warning(`Failed to save: ${t.message}`)}}finally{try{yield l.unlinkFile(v)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return f}))}t.saveCache=saveCache},98245:function(e,t,r){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,a,i)}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))a(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(a.next(e))}catch(e){i(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.saveCache=t.reserveCache=t.downloadCache=t.getCacheEntry=t.getCacheVersion=void 0;const o=n(r(42186));const p=r(96255);const l=r(35526);const c=n(r(6113));const d=n(r(57147));const u=r(57310);const m=n(r(91518));const h=r(55500);const f=r(76215);const g=r(13981);const y="1.0";function getCacheApiUrl(e){const t=process.env["ACTIONS_CACHE_URL"]||"";if(!t){throw new Error("Cache Service Url not found, unable to restore cache.")}const r=`${t}_apis/artifactcache/${e}`;o.debug(`Resource Url: ${r}`);return r}function createAcceptHeader(e,t){return`${e};api-version=${t}`}function getRequestOptions(){const e={headers:{Accept:createAcceptHeader("application/json","6.0-preview.1")}};return e}function createHttpClient(){const e=process.env["ACTIONS_RUNTIME_TOKEN"]||"";const t=new l.BearerCredentialHandler(e);return new p.HttpClient("actions/cache",[t],getRequestOptions())}function getCacheVersion(e,t,r=false){const a=e.slice();if(t){a.push(t)}if(process.platform==="win32"&&!r){a.push("windows-only")}a.push(y);return c.createHash("sha256").update(a.join("|")).digest("hex")}t.getCacheVersion=getCacheVersion;function getCacheEntry(e,t,r){return s(this,void 0,void 0,(function*(){const a=createHttpClient();const i=getCacheVersion(t,r===null||r===void 0?void 0:r.compressionMethod,r===null||r===void 0?void 0:r.enableCrossOsArchive);const n=`cache?keys=${encodeURIComponent(e.join(","))}&version=${i}`;const p=yield(0,g.retryTypedResponse)("getCacheEntry",(()=>s(this,void 0,void 0,(function*(){return a.getJson(getCacheApiUrl(n))}))));if(p.statusCode===204){if(o.isDebug()){yield printCachesListForDiagnostics(e[0],a,i)}return null}if(!(0,g.isSuccessStatusCode)(p.statusCode)){throw new Error(`Cache service responded with ${p.statusCode}`)}const l=p.result;const c=l===null||l===void 0?void 0:l.archiveLocation;if(!c){throw new Error("Cache not found.")}o.setSecret(c);o.debug(`Cache Result:`);o.debug(JSON.stringify(l));return l}))}t.getCacheEntry=getCacheEntry;function printCachesListForDiagnostics(e,t,r){return s(this,void 0,void 0,(function*(){const a=`caches?key=${encodeURIComponent(e)}`;const i=yield(0,g.retryTypedResponse)("listCache",(()=>s(this,void 0,void 0,(function*(){return t.getJson(getCacheApiUrl(a))}))));if(i.statusCode===200){const t=i.result;const a=t===null||t===void 0?void 0:t.totalCount;if(a&&a>0){o.debug(`No matching cache found for cache key '${e}', version '${r} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`);for(const e of(t===null||t===void 0?void 0:t.artifactCaches)||[]){o.debug(`Cache Key: ${e===null||e===void 0?void 0:e.cacheKey}, Cache Version: ${e===null||e===void 0?void 0:e.cacheVersion}, Cache Scope: ${e===null||e===void 0?void 0:e.scope}, Cache Created: ${e===null||e===void 0?void 0:e.creationTime}`)}}}}))}function downloadCache(e,t,r){return s(this,void 0,void 0,(function*(){const a=new u.URL(e);const i=(0,f.getDownloadOptions)(r);if(a.hostname.endsWith(".blob.core.windows.net")){if(i.useAzureSdk){yield(0,h.downloadCacheStorageSDK)(e,t,i)}else if(i.concurrentBlobDownloads){yield(0,h.downloadCacheHttpClientConcurrent)(e,t,i)}else{yield(0,h.downloadCacheHttpClient)(e,t)}}else{yield(0,h.downloadCacheHttpClient)(e,t)}}))}t.downloadCache=downloadCache;function reserveCache(e,t,r){return s(this,void 0,void 0,(function*(){const a=createHttpClient();const i=getCacheVersion(t,r===null||r===void 0?void 0:r.compressionMethod,r===null||r===void 0?void 0:r.enableCrossOsArchive);const n={key:e,version:i,cacheSize:r===null||r===void 0?void 0:r.cacheSize};const o=yield(0,g.retryTypedResponse)("reserveCache",(()=>s(this,void 0,void 0,(function*(){return a.postJson(getCacheApiUrl("caches"),n)}))));return o}))}t.reserveCache=reserveCache;function getContentRange(e,t){return`bytes ${e}-${t}/*`}function uploadChunk(e,t,r,a,i){return s(this,void 0,void 0,(function*(){o.debug(`Uploading chunk of size ${i-a+1} bytes at offset ${a} with content range: ${getContentRange(a,i)}`);const n={"Content-Type":"application/octet-stream","Content-Range":getContentRange(a,i)};const p=yield(0,g.retryHttpClientResponse)(`uploadChunk (start: ${a}, end: ${i})`,(()=>s(this,void 0,void 0,(function*(){return e.sendStream("PATCH",t,r(),n)}))));if(!(0,g.isSuccessStatusCode)(p.message.statusCode)){throw new Error(`Cache service responded with ${p.message.statusCode} during upload chunk.`)}}))}function uploadFile(e,t,r,a){return s(this,void 0,void 0,(function*(){const i=m.getArchiveFileSizeInBytes(r);const n=getCacheApiUrl(`caches/${t.toString()}`);const p=d.openSync(r,"r");const l=(0,f.getUploadOptions)(a);const c=m.assertDefined("uploadConcurrency",l.uploadConcurrency);const u=m.assertDefined("uploadChunkSize",l.uploadChunkSize);const h=[...new Array(c).keys()];o.debug("Awaiting all uploads");let g=0;try{yield Promise.all(h.map((()=>s(this,void 0,void 0,(function*(){while(gd.createReadStream(r,{fd:p,start:a,end:s,autoClose:false}).on("error",(e=>{throw new Error(`Cache upload failed because file read failed with ${e.message}`)}))),a,s)}})))))}finally{d.closeSync(p)}return}))}function commitCache(e,t,r){return s(this,void 0,void 0,(function*(){const a={size:r};return yield(0,g.retryTypedResponse)("commitCache",(()=>s(this,void 0,void 0,(function*(){return e.postJson(getCacheApiUrl(`caches/${t.toString()}`),a)}))))}))}function saveCache(e,t,r){return s(this,void 0,void 0,(function*(){const a=createHttpClient();o.debug("Upload cache");yield uploadFile(a,e,t,r);o.debug("Commiting cache");const i=m.getArchiveFileSizeInBytes(t);o.info(`Cache Size: ~${Math.round(i/(1024*1024))} MB (${i} B)`);const n=yield commitCache(a,e,i);if(!(0,g.isSuccessStatusCode)(n.statusCode)){throw new Error(`Cache service responded with ${n.statusCode} during commit cache.`)}o.info("Cache saved successfully")}))}t.saveCache=saveCache},91518:function(e,t,r){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,a,i)}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))a(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(a.next(e))}catch(e){i(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};var o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},verb("next"),verb("throw"),verb("return"),r[Symbol.asyncIterator]=function(){return this},r);function verb(t){r[t]=e[t]&&function(r){return new Promise((function(a,i){r=e[t](r),settle(a,i,r.done,r.value)}))}}function settle(e,t,r,a){Promise.resolve(a).then((function(t){e({value:t,done:r})}),t)}};Object.defineProperty(t,"__esModule",{value:true});t.isGhes=t.assertDefined=t.getGnuTarPathOnWindows=t.getCacheFileName=t.getCompressionMethod=t.unlinkFile=t.resolvePaths=t.getArchiveFileSizeInBytes=t.createTempDirectory=void 0;const p=n(r(42186));const l=n(r(71514));const c=n(r(28090));const d=n(r(47351));const u=n(r(57147));const m=n(r(71017));const h=n(r(3771));const f=n(r(73837));const g=r(2155);const y=r(88840);function createTempDirectory(){return s(this,void 0,void 0,(function*(){const e=process.platform==="win32";let t=process.env["RUNNER_TEMP"]||"";if(!t){let r;if(e){r=process.env["USERPROFILE"]||"C:\\"}else{if(process.platform==="darwin"){r="/Users"}else{r="/home"}}t=m.join(r,"actions","temp")}const r=m.join(t,(0,g.v4)());yield d.mkdirP(r);return r}))}t.createTempDirectory=createTempDirectory;function getArchiveFileSizeInBytes(e){return u.statSync(e).size}t.getArchiveFileSizeInBytes=getArchiveFileSizeInBytes;function resolvePaths(e){var t,r,a,i;var n;return s(this,void 0,void 0,(function*(){const s=[];const l=(n=process.env["GITHUB_WORKSPACE"])!==null&&n!==void 0?n:process.cwd();const d=yield c.create(e.join("\n"),{implicitDescendants:false});try{for(var u=true,h=o(d.globGenerator()),f;f=yield h.next(),t=f.done,!t;u=true){i=f.value;u=false;const e=i;const t=m.relative(l,e).replace(new RegExp(`\\${m.sep}`,"g"),"/");p.debug(`Matched: ${t}`);if(t===""){s.push(".")}else{s.push(`${t}`)}}}catch(e){r={error:e}}finally{try{if(!u&&!t&&(a=h.return))yield a.call(h)}finally{if(r)throw r.error}}return s}))}t.resolvePaths=resolvePaths;function unlinkFile(e){return s(this,void 0,void 0,(function*(){return f.promisify(u.unlink)(e)}))}t.unlinkFile=unlinkFile;function getVersion(e,t=[]){return s(this,void 0,void 0,(function*(){let r="";t.push("--version");p.debug(`Checking ${e} ${t.join(" ")}`);try{yield l.exec(`${e}`,t,{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>r+=e.toString(),stderr:e=>r+=e.toString()}})}catch(e){p.debug(e.message)}r=r.trim();p.debug(r);return r}))}function getCompressionMethod(){return s(this,void 0,void 0,(function*(){const e=yield getVersion("zstd",["--quiet"]);const t=h.clean(e);p.debug(`zstd version: ${t}`);if(e===""){return y.CompressionMethod.Gzip}else{return y.CompressionMethod.ZstdWithoutLong}}))}t.getCompressionMethod=getCompressionMethod;function getCacheFileName(e){return e===y.CompressionMethod.Gzip?y.CacheFilename.Gzip:y.CacheFilename.Zstd}t.getCacheFileName=getCacheFileName;function getGnuTarPathOnWindows(){return s(this,void 0,void 0,(function*(){if(u.existsSync(y.GnuTarPathOnWindows)){return y.GnuTarPathOnWindows}const e=yield getVersion("tar");return e.toLowerCase().includes("gnu tar")?d.which("tar"):""}))}t.getGnuTarPathOnWindows=getGnuTarPathOnWindows;function assertDefined(e,t){if(t===undefined){throw Error(`Expected ${e} but value was undefiend`)}return t}t.assertDefined=assertDefined;function isGhes(){const e=new URL(process.env["GITHUB_SERVER_URL"]||"https://github.com");const t=e.hostname.trimEnd().toUpperCase();const r=t==="GITHUB.COM";const a=t.endsWith(".GHE.COM")||t.endsWith(".GHE.LOCALHOST");return!r&&!a}t.isGhes=isGhes},88840:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ManifestFilename=t.TarFilename=t.SystemTarPathOnWindows=t.GnuTarPathOnWindows=t.SocketTimeout=t.DefaultRetryDelay=t.DefaultRetryAttempts=t.ArchiveToolType=t.CompressionMethod=t.CacheFilename=void 0;var r;(function(e){e["Gzip"]="cache.tgz";e["Zstd"]="cache.tzst"})(r||(t.CacheFilename=r={}));var a;(function(e){e["Gzip"]="gzip";e["ZstdWithoutLong"]="zstd-without-long";e["Zstd"]="zstd"})(a||(t.CompressionMethod=a={}));var i;(function(e){e["GNU"]="gnu";e["BSD"]="bsd"})(i||(t.ArchiveToolType=i={}));t.DefaultRetryAttempts=2;t.DefaultRetryDelay=5e3;t.SocketTimeout=5e3;t.GnuTarPathOnWindows=`${process.env["PROGRAMFILES"]}\\Git\\usr\\bin\\tar.exe`;t.SystemTarPathOnWindows=`${process.env["SYSTEMDRIVE"]}\\Windows\\System32\\tar.exe`;t.TarFilename="cache.tar";t.ManifestFilename="manifest.txt"},55500:function(e,t,r){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,a,i)}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))a(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(a.next(e))}catch(e){i(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.downloadCacheStorageSDK=t.downloadCacheHttpClientConcurrent=t.downloadCacheHttpClient=t.DownloadProgress=void 0;const o=n(r(42186));const p=r(96255);const l=r(84100);const c=n(r(14300));const d=n(r(57147));const u=n(r(12781));const m=n(r(73837));const h=n(r(91518));const f=r(88840);const g=r(13981);const y=r(52557);function pipeResponseToStream(e,t){return s(this,void 0,void 0,(function*(){const r=m.promisify(u.pipeline);yield r(e.message,t)}))}class DownloadProgress{constructor(e){this.contentLength=e;this.segmentIndex=0;this.segmentSize=0;this.segmentOffset=0;this.receivedBytes=0;this.displayedComplete=false;this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize;this.segmentIndex=this.segmentIndex+1;this.segmentSize=e;this.receivedBytes=0;o.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){this.receivedBytes=e}getTransferredBytes(){return this.segmentOffset+this.receivedBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete){return}const e=this.segmentOffset+this.receivedBytes;const t=(100*(e/this.contentLength)).toFixed(1);const r=Date.now()-this.startTime;const a=(e/(1024*1024)/(r/1e3)).toFixed(1);o.info(`Received ${e} of ${this.contentLength} (${t}%), ${a} MBs/sec`);if(this.isDone()){this.displayedComplete=true}}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){const displayCallback=()=>{this.display();if(!this.isDone()){this.timeoutHandle=setTimeout(displayCallback,e)}};this.timeoutHandle=setTimeout(displayCallback,e)}stopDisplayTimer(){if(this.timeoutHandle){clearTimeout(this.timeoutHandle);this.timeoutHandle=undefined}this.display()}}t.DownloadProgress=DownloadProgress;function downloadCacheHttpClient(e,t){return s(this,void 0,void 0,(function*(){const r=d.createWriteStream(t);const a=new p.HttpClient("actions/cache");const i=yield(0,g.retryHttpClientResponse)("downloadCache",(()=>s(this,void 0,void 0,(function*(){return a.get(e)}))));i.message.socket.setTimeout(f.SocketTimeout,(()=>{i.message.destroy();o.debug(`Aborting download, socket timed out after ${f.SocketTimeout} ms`)}));yield pipeResponseToStream(i,r);const n=i.message.headers["content-length"];if(n){const e=parseInt(n);const r=h.getArchiveFileSizeInBytes(t);if(r!==e){throw new Error(`Incomplete download. Expected file size: ${e}, actual file size: ${r}`)}}else{o.debug("Unable to validate download, no Content-Length header")}}))}t.downloadCacheHttpClient=downloadCacheHttpClient;function downloadCacheHttpClientConcurrent(e,t,r){var a;return s(this,void 0,void 0,(function*(){const i=yield d.promises.open(t,"w");const n=new p.HttpClient("actions/cache",undefined,{socketTimeout:r.timeoutInMs,keepAlive:true});try{const t=yield(0,g.retryHttpClientResponse)("downloadCacheMetadata",(()=>s(this,void 0,void 0,(function*(){return yield n.request("HEAD",e,null,{})}))));const o=t.message.headers["content-length"];if(o===undefined||o===null){throw new Error("Content-Length not found on blob response")}const p=parseInt(o);if(Number.isNaN(p)){throw new Error(`Could not interpret Content-Length: ${p}`)}const l=[];const c=4*1024*1024;for(let t=0;t
s(this,void 0,void 0,(function*(){return yield downloadSegmentRetry(n,e,t,r)}))})}l.reverse();let d=0;let u=0;const m=new DownloadProgress(p);m.startDisplayTimer();const h=m.onProgress();const f=[];let y;const waitAndWrite=()=>s(this,void 0,void 0,(function*(){const e=yield Promise.race(Object.values(f));yield i.write(e.buffer,0,e.count,e.offset);d--;delete f[e.offset];u+=e.count;h({loadedBytes:u})}));while(y=l.pop()){f[y.offset]=y.promiseGetter();d++;if(d>=((a=r.downloadConcurrency)!==null&&a!==void 0?a:10)){yield waitAndWrite()}}while(d>0){yield waitAndWrite()}}finally{n.dispose();yield i.close()}}))}t.downloadCacheHttpClientConcurrent=downloadCacheHttpClientConcurrent;function downloadSegmentRetry(e,t,r,a){return s(this,void 0,void 0,(function*(){const i=5;let n=0;while(true){try{const i=3e4;const n=yield promiseWithTimeout(i,downloadSegment(e,t,r,a));if(typeof n==="string"){throw new Error("downloadSegmentRetry failed due to timeout")}return n}catch(e){if(n>=i){throw e}n++}}}))}function downloadSegment(e,t,r,a){return s(this,void 0,void 0,(function*(){const i=yield(0,g.retryHttpClientResponse)("downloadCachePart",(()=>s(this,void 0,void 0,(function*(){return yield e.get(t,{Range:`bytes=${r}-${r+a-1}`})}))));if(!i.readBodyBuffer){throw new Error("Expected HttpClientResponse to implement readBodyBuffer")}return{offset:r,count:a,buffer:yield i.readBodyBuffer()}}))}function downloadCacheStorageSDK(e,t,r){var a;return s(this,void 0,void 0,(function*(){const i=new l.BlockBlobClient(e,undefined,{retryOptions:{tryTimeoutInMs:r.timeoutInMs}});const n=yield i.getProperties();const s=(a=n.contentLength)!==null&&a!==void 0?a:-1;if(s<0){o.debug("Unable to determine content length, downloading file with http-client...");yield downloadCacheHttpClient(e,t)}else{const e=Math.min(134217728,c.constants.MAX_LENGTH);const a=new DownloadProgress(s);const n=d.openSync(t,"w");try{a.startDisplayTimer();const t=new y.AbortController;const o=t.signal;while(!a.isDone()){const p=a.segmentOffset+a.segmentSize;const l=Math.min(e,s-p);a.nextSegment(l);const c=yield promiseWithTimeout(r.segmentTimeoutInMs||36e5,i.downloadToBuffer(p,l,{abortSignal:o,concurrency:r.downloadConcurrency,onProgress:a.onProgress()}));if(c==="timeout"){t.abort();throw new Error("Aborting cache download as the download time exceeded the timeout.")}else if(Buffer.isBuffer(c)){d.writeFileSync(n,c)}}}finally{a.stopDisplayTimer();d.closeSync(n)}}}))}t.downloadCacheStorageSDK=downloadCacheStorageSDK;const promiseWithTimeout=(e,t)=>s(void 0,void 0,void 0,(function*(){let r;const a=new Promise((t=>{r=setTimeout((()=>t("timeout")),e)}));return Promise.race([t,a]).then((e=>{clearTimeout(r);return e}))}))},13981:function(e,t,r){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,a,i)}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))a(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(a.next(e))}catch(e){i(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.retryHttpClientResponse=t.retryTypedResponse=t.retry=t.isRetryableStatusCode=t.isServerErrorStatusCode=t.isSuccessStatusCode=void 0;const o=n(r(42186));const p=r(96255);const l=r(88840);function isSuccessStatusCode(e){if(!e){return false}return e>=200&&e<300}t.isSuccessStatusCode=isSuccessStatusCode;function isServerErrorStatusCode(e){if(!e){return true}return e>=500}t.isServerErrorStatusCode=isServerErrorStatusCode;function isRetryableStatusCode(e){if(!e){return false}const t=[p.HttpCodes.BadGateway,p.HttpCodes.ServiceUnavailable,p.HttpCodes.GatewayTimeout];return t.includes(e)}t.isRetryableStatusCode=isRetryableStatusCode;function sleep(e){return s(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,e)))}))}function retry(e,t,r,a=l.DefaultRetryAttempts,i=l.DefaultRetryDelay,n=undefined){return s(this,void 0,void 0,(function*(){let s="";let p=1;while(p<=a){let l=undefined;let c=undefined;let d=false;try{l=yield t()}catch(e){if(n){l=n(e)}d=true;s=e.message}if(l){c=r(l);if(!isServerErrorStatusCode(c)){return l}}if(c){d=isRetryableStatusCode(c);s=`Cache service responded with ${c}`}o.debug(`${e} - Attempt ${p} of ${a} failed with error: ${s}`);if(!d){o.debug(`${e} - Error is not retryable`);break}yield sleep(i);p++}throw Error(`${e} failed: ${s}`)}))}t.retry=retry;function retryTypedResponse(e,t,r=l.DefaultRetryAttempts,a=l.DefaultRetryDelay){return s(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.statusCode),r,a,(e=>{if(e instanceof p.HttpClientError){return{statusCode:e.statusCode,result:null,headers:{},error:e}}else{return undefined}}))}))}t.retryTypedResponse=retryTypedResponse;function retryHttpClientResponse(e,t,r=l.DefaultRetryAttempts,a=l.DefaultRetryDelay){return s(this,void 0,void 0,(function*(){return yield retry(e,t,(e=>e.message.statusCode),r,a)}))}t.retryHttpClientResponse=retryHttpClientResponse},56490:function(e,t,r){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,a,i)}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))a(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(a.next(e))}catch(e){i(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.createTar=t.extractTar=t.listTar=void 0;const o=r(71514);const p=n(r(47351));const l=r(57147);const c=n(r(71017));const d=n(r(91518));const u=r(88840);const m=process.platform==="win32";function getTarPath(){return s(this,void 0,void 0,(function*(){switch(process.platform){case"win32":{const e=yield d.getGnuTarPathOnWindows();const t=u.SystemTarPathOnWindows;if(e){return{path:e,type:u.ArchiveToolType.GNU}}else if((0,l.existsSync)(t)){return{path:t,type:u.ArchiveToolType.BSD}}break}case"darwin":{const e=yield p.which("gtar",false);if(e){return{path:e,type:u.ArchiveToolType.GNU}}else{return{path:yield p.which("tar",true),type:u.ArchiveToolType.BSD}}}default:break}return{path:yield p.which("tar",true),type:u.ArchiveToolType.GNU}}))}function getTarArgs(e,t,r,a=""){return s(this,void 0,void 0,(function*(){const i=[`"${e.path}"`];const n=d.getCacheFileName(t);const s="cache.tar";const o=getWorkingDirectory();const p=e.type===u.ArchiveToolType.BSD&&t!==u.CompressionMethod.Gzip&&m;switch(r){case"create":i.push("--posix","-cf",p?s:n.replace(new RegExp(`\\${c.sep}`,"g"),"/"),"--exclude",p?s:n.replace(new RegExp(`\\${c.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${c.sep}`,"g"),"/"),"--files-from",u.ManifestFilename);break;case"extract":i.push("-xf",p?s:a.replace(new RegExp(`\\${c.sep}`,"g"),"/"),"-P","-C",o.replace(new RegExp(`\\${c.sep}`,"g"),"/"));break;case"list":i.push("-tf",p?s:a.replace(new RegExp(`\\${c.sep}`,"g"),"/"),"-P");break}if(e.type===u.ArchiveToolType.GNU){switch(process.platform){case"win32":i.push("--force-local");break;case"darwin":i.push("--delay-directory-restore");break}}return i}))}function getCommands(e,t,r=""){return s(this,void 0,void 0,(function*(){let a;const i=yield getTarPath();const n=yield getTarArgs(i,e,t,r);const s=t!=="create"?yield getDecompressionProgram(i,e,r):yield getCompressionProgram(i,e);const o=i.type===u.ArchiveToolType.BSD&&e!==u.CompressionMethod.Gzip&&m;if(o&&t!=="create"){a=[[...s].join(" "),[...n].join(" ")]}else{a=[[...n].join(" "),[...s].join(" ")]}if(o){return a}return[a.join(" ")]}))}function getWorkingDirectory(){var e;return(e=process.env["GITHUB_WORKSPACE"])!==null&&e!==void 0?e:process.cwd()}function getDecompressionProgram(e,t,r){return s(this,void 0,void 0,(function*(){const a=e.type===u.ArchiveToolType.BSD&&t!==u.CompressionMethod.Gzip&&m;switch(t){case u.CompressionMethod.Zstd:return a?["zstd -d --long=30 --force -o",u.TarFilename,r.replace(new RegExp(`\\${c.sep}`,"g"),"/")]:["--use-compress-program",m?'"zstd -d --long=30"':"unzstd --long=30"];case u.CompressionMethod.ZstdWithoutLong:return a?["zstd -d --force -o",u.TarFilename,r.replace(new RegExp(`\\${c.sep}`,"g"),"/")]:["--use-compress-program",m?'"zstd -d"':"unzstd"];default:return["-z"]}}))}function getCompressionProgram(e,t){return s(this,void 0,void 0,(function*(){const r=d.getCacheFileName(t);const a=e.type===u.ArchiveToolType.BSD&&t!==u.CompressionMethod.Gzip&&m;switch(t){case u.CompressionMethod.Zstd:return a?["zstd -T0 --long=30 --force -o",r.replace(new RegExp(`\\${c.sep}`,"g"),"/"),u.TarFilename]:["--use-compress-program",m?'"zstd -T0 --long=30"':"zstdmt --long=30"];case u.CompressionMethod.ZstdWithoutLong:return a?["zstd -T0 --force -o",r.replace(new RegExp(`\\${c.sep}`,"g"),"/"),u.TarFilename]:["--use-compress-program",m?'"zstd -T0"':"zstdmt"];default:return["-z"]}}))}function execCommands(e,t){return s(this,void 0,void 0,(function*(){for(const r of e){try{yield(0,o.exec)(r,undefined,{cwd:t,env:Object.assign(Object.assign({},process.env),{MSYS:"winsymlinks:nativestrict"})})}catch(e){throw new Error(`${r.split(" ")[0]} failed with error: ${e===null||e===void 0?void 0:e.message}`)}}}))}function listTar(e,t){return s(this,void 0,void 0,(function*(){const r=yield getCommands(t,"list",e);yield execCommands(r)}))}t.listTar=listTar;function extractTar(e,t){return s(this,void 0,void 0,(function*(){const r=getWorkingDirectory();yield p.mkdirP(r);const a=yield getCommands(t,"extract",e);yield execCommands(a)}))}t.extractTar=extractTar;function createTar(e,t,r){return s(this,void 0,void 0,(function*(){(0,l.writeFileSync)(c.join(e,u.ManifestFilename),t.join("\n"));const a=yield getCommands(r,"create");yield execCommands(a,e)}))}t.createTar=createTar},76215:function(e,t,r){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,a,i)}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))a(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getDownloadOptions=t.getUploadOptions=void 0;const s=n(r(42186));function getUploadOptions(e){const t={uploadConcurrency:4,uploadChunkSize:32*1024*1024};if(e){if(typeof e.uploadConcurrency==="number"){t.uploadConcurrency=e.uploadConcurrency}if(typeof e.uploadChunkSize==="number"){t.uploadChunkSize=e.uploadChunkSize}}s.debug(`Upload concurrency: ${t.uploadConcurrency}`);s.debug(`Upload chunk size: ${t.uploadChunkSize}`);return t}t.getUploadOptions=getUploadOptions;function getDownloadOptions(e){const t={useAzureSdk:false,concurrentBlobDownloads:true,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:6e5,lookupOnly:false};if(e){if(typeof e.useAzureSdk==="boolean"){t.useAzureSdk=e.useAzureSdk}if(typeof e.concurrentBlobDownloads==="boolean"){t.concurrentBlobDownloads=e.concurrentBlobDownloads}if(typeof e.downloadConcurrency==="number"){t.downloadConcurrency=e.downloadConcurrency}if(typeof e.timeoutInMs==="number"){t.timeoutInMs=e.timeoutInMs}if(typeof e.segmentTimeoutInMs==="number"){t.segmentTimeoutInMs=e.segmentTimeoutInMs}if(typeof e.lookupOnly==="boolean"){t.lookupOnly=e.lookupOnly}}const r=process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"];if(r&&!isNaN(Number(r))&&isFinite(Number(r))){t.segmentTimeoutInMs=Number(r)*60*1e3}s.debug(`Use Azure SDK: ${t.useAzureSdk}`);s.debug(`Download concurrency: ${t.downloadConcurrency}`);s.debug(`Request timeout (ms): ${t.timeoutInMs}`);s.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`);s.debug(`Segment download timeout (ms): ${t.segmentTimeoutInMs}`);s.debug(`Lookup only: ${t.lookupOnly}`);return t}t.getDownloadOptions=getDownloadOptions},3771:(e,t)=>{t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var a=256;var i=Number.MAX_SAFE_INTEGER||9007199254740991;var n=16;var s=a-6;var o=t.re=[];var p=t.safeRe=[];var l=t.src=[];var c=t.tokens={};var d=0;function tok(e){c[e]=d++}var u="[a-zA-Z0-9-]";var m=[["\\s",1],["\\d",a],[u,s]];function makeSafeRe(e){for(var t=0;t {"use strict";e.exports=function generate_uniqueItems(e,t,r){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[t];var o=e.schemaPath+e.util.getProperty(t);var p=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(n||"");var d="valid"+i;var u=e.opts.$data&&s&&s.$data,m;if(u){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";m="schema"+i}else{m=s}if((s||u)&&e.opts.uniqueItems!==false){if(u){a+=" var "+d+"; if ("+m+" === false || "+m+" === undefined) "+d+" = true; else if (typeof "+m+" != 'boolean') "+d+" = false; else { "}a+=" var i = "+c+".length , "+d+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,f=Array.isArray(h);if(!h||h=="object"||h=="array"||f&&(h.indexOf("object")>=0||h.indexOf("array")>=0)){a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+c+"[i], "+c+"[j])) { "+d+" = false; break outer; } } } "}else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+c+"[i]; ";var g="checkDataType"+(f?"s":"");a+=" if ("+e.util[g](h,"item",e.opts.strictNumbers,true)+") continue; ";if(f){a+=" if (typeof item == 'string') item = '\"' + item; "}a+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ";if(u){a+=" } "}a+=" if (!"+d+") { ";var y=y||[];y.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { i: i, j: j } ";if(e.opts.messages!==false){a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(e.opts.verbose){a+=" , schema: ";if(u){a+="validate.schema"+o}else{a+=""+s}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}a+=" } "}else{a+=" {} "}var v=a;a=y.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+v+"]); "}else{a+=" validate.errors = ["+v+"]; return false; "}}else{a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } ";if(l){a+=" else { "}}else{if(l){a+=" if (true) { "}}return a}},49585:e=>{"use strict";e.exports=function generate_validate(e,t,r){var a="";var i=e.schema.$async===true,n=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),s=e.self._getId(e.schema);if(e.opts.strictKeywords){var o=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(o){var p="unknown keyword: "+o;if(e.opts.strictKeywords==="log")e.logger.warn(p);else throw new Error(p)}}if(e.isTop){a+=" var validate = ";if(i){e.async=true;a+="async "}a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if(s&&(e.opts.sourceCode||e.opts.processCode)){a+=" "+("/*# sourceURL="+s+" */")+" "}}if(typeof e.schema=="boolean"||!(n||e.schema.$ref)){var t="false schema";var l=e.level;var c=e.dataLevel;var d=e.schema[t];var u=e.schemaPath+e.util.getProperty(t);var m=e.errSchemaPath+"/"+t;var h=!e.opts.allErrors;var f;var g="data"+(c||"");var y="valid"+l;if(e.schema===false){if(e.isTop){h=true}else{a+=" var "+y+" = false; "}var v=v||[];v.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(f||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(m)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'boolean schema is false' "}if(e.opts.verbose){a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+g+" "}a+=" } "}else{a+=" {} "}var E=a;a=v.pop();if(!e.compositeRule&&h){if(e.async){a+=" throw new ValidationError(["+E+"]); "}else{a+=" validate.errors = ["+E+"]; return false; "}}else{a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(e.isTop){if(i){a+=" return data; "}else{a+=" validate.errors = null; return true; "}}else{a+=" var "+y+" = true; "}}if(e.isTop){a+=" }; return validate; "}return a}if(e.isTop){var b=e.isTop,l=e.level=0,c=e.dataLevel=0,g="data";e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema));e.baseId=e.baseId||e.rootId;delete e.isTop;e.dataPathArr=[""];if(e.schema.default!==undefined&&e.opts.useDefaults&&e.opts.strictDefaults){var C="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(C);else throw new Error(C)}a+=" var vErrors = null; ";a+=" var errors = 0; ";a+=" if (rootData === undefined) rootData = data; "}else{var l=e.level,c=e.dataLevel,g="data"+(c||"");if(s)e.baseId=e.resolve.url(e.baseId,s);if(i&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+l+" = errors;"}var y="valid"+l,h=!e.opts.allErrors,B="",I="";var f;var w=e.schema.type,Q=Array.isArray(w);if(w&&e.opts.nullable&&e.schema.nullable===true){if(Q){if(w.indexOf("null")==-1)w=w.concat("null")}else if(w!="null"){w=[w,"null"];Q=true}}if(Q&&w.length==1){w=w[0];Q=false}if(e.schema.$ref&&n){if(e.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)')}else if(e.opts.extendRefs!==true){n=false;e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"')}}if(e.schema.$comment&&e.opts.$comment){a+=" "+e.RULES.all.$comment.code(e,"$comment")}if(w){if(e.opts.coerceTypes){var x=e.util.coerceToTypes(e.opts.coerceTypes,w)}var k=e.RULES.types[w];if(x||Q||k===true||k&&!$shouldUseGroup(k)){var u=e.schemaPath+".type",m=e.errSchemaPath+"/type";var u=e.schemaPath+".type",m=e.errSchemaPath+"/type",N=Q?"checkDataTypes":"checkDataType";a+=" if ("+e.util[N](w,g,e.opts.strictNumbers,true)+") { ";if(x){var R="dataType"+l,D="coerced"+l;a+=" var "+R+" = typeof "+g+"; var "+D+" = undefined; ";if(e.opts.coerceTypes=="array"){a+=" if ("+R+" == 'object' && Array.isArray("+g+") && "+g+".length == 1) { "+g+" = "+g+"[0]; "+R+" = typeof "+g+"; if ("+e.util.checkDataType(e.schema.type,g,e.opts.strictNumbers)+") "+D+" = "+g+"; } "}a+=" if ("+D+" !== undefined) ; ";var P=x;if(P){var O,_=-1,j=P.length-1;while(_ a){return null}var r=t.loose?c[u.LOOSE]:c[u.FULL];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>a){throw new TypeError("version is longer than "+a+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var i=e.trim().match(t.loose?c[u.LOOSE]:c[u.FULL]);if(!i){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+i[1];this.minor=+i[2];this.patch=+i[3];if(this.major>n||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>n||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>n||this.patch<0){throw new TypeError("Invalid patch version")}if(!i[4]){this.prerelease=[]}else{this.prerelease=i[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t 0||k===false:e.util.schemaHasRules(k,e.RULES.all)){h.schema=k;h.schemaPath=o+"["+x+"]";h.errSchemaPath=c+"/"+x;a+=" "+e.validate(h)+" ";h.baseId=y}else{a+=" var "+g+" = true; "}if(x){a+=" if ("+g+" && "+b+") { "+p+" = false; "+C+" = ["+C+", "+x+"]; } else { ";f+="}"}a+=" if ("+g+") { "+p+" = "+b+" = true; "+C+" = "+x+"; }"}}e.compositeRule=h.compositeRule=I;a+=""+f+"if (!"+p+") { var err = ";if(e.createErrors!==false){a+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { passingSchemas: "+C+" } ";if(e.opts.messages!==false){a+=" , message: 'should match exactly one schema in oneOf' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(vErrors); "}else{a+=" validate.errors = vErrors; return false; "}}a+="} else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; }";if(e.opts.allErrors){a+=" } "}return a}},3690:e=>{"use strict";e.exports=function generate_pattern(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var s=e.schema[t];var o=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var u="data"+(i||"");var p=e.opts.$data&&s&&s.$data,m;if(p){a+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ";m="schema"+n}else{m=s}var h=p?"(new RegExp("+m+"))":e.usePattern(s);a+="if ( ";if(p){a+=" ("+m+" !== undefined && typeof "+m+" != 'string') || "}a+=" !"+h+".test("+u+") ) { ";var f=f||[];f.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ";if(p){a+=""+m}else{a+=""+e.util.toQuotedString(s)}a+=" } ";if(e.opts.messages!==false){a+=" , message: 'should match pattern \"";if(p){a+="' + "+m+" + '"}else{a+=""+e.util.escapeQuotes(s)}a+="\"' "}if(e.opts.verbose){a+=" , schema: ";if(p){a+="validate.schema"+o}else{a+=""+e.util.toQuotedString(s)}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var g=a;a=f.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+g+"]); "}else{a+=" validate.errors = ["+g+"]; return false; "}}else{a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(l){a+=" else { "}return a}},52403:e=>{"use strict";e.exports=function generate_properties(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var s=e.schema[t];var o=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var u="data"+(i||"");var p="errs__"+n;var m=e.util.copy(e);var h="";m.level++;var f="valid"+m.level;var g="key"+n,y="idx"+n,b=m.dataLevel=e.dataLevel+1,C="data"+b,I="dataProperties"+n;var w=Object.keys(s||{}).filter(notProto),k=e.schema.patternProperties||{},x=Object.keys(k).filter(notProto),P=e.schema.additionalProperties,j=w.length||x.length,O=P===false,z=typeof P=="object"&&Object.keys(P).length,q=e.opts.removeAdditional,H=O||z||q,V=e.opts.ownProperties,G=e.baseId;var Y=e.schema.required;if(Y&&!(e.opts.$data&&Y.$data)&&Y.length =b)break;n[v]=d[h]}o-=h}return 0}e.exports={BLOCKS:n,HASHSIZE:s,hash:bcrypt_hash,pbkdf:bcrypt_pbkdf}},33717:(e,t,r)=>{var a=r(86891);var i=r(9417);e.exports=expandTop;var n="\0SLASH"+Math.random()+"\0";var s="\0OPEN"+Math.random()+"\0";var o="\0CLOSE"+Math.random()+"\0";var p="\0COMMA"+Math.random()+"\0";var l="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(n).split("\\{").join(s).split("\\}").join(o).split("\\,").join(p).split("\\.").join(l)}function unescapeBraces(e){return e.split(n).join("\\").split(s).join("{").split(o).join("}").split(p).join(",").split(l).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var r=i("{","}",e);if(!r)return e.split(",");var a=r.pre;var n=r.body;var s=r.post;var o=a.split(",");o[o.length-1]+="{"+n+"}";var p=parseCommaParts(s);if(s.length){o[o.length-1]+=p.shift();o.push.apply(o,p)}t.push.apply(t,o);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[];var n=i("{","}",e);if(!n||/\$$/.test(n.pre))return[e];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var l=s||p;var c=n.body.indexOf(",")>=0;if(!l&&!c){if(n.post.match(/,.*\}/)){e=n.pre+"{"+n.body+o+n.post;return expand(e)}return[e]}var d;if(l){d=n.body.split(/\.\./)}else{d=parseCommaParts(n.body);if(d.length===1){d=expand(d[0],false).map(embrace);if(d.length===1){var u=n.post.length?expand(n.post,false):[""];return u.map((function(e){return n.pre+d[0]+e}))}}}var m=n.pre;var u=n.post.length?expand(n.post,false):[""];var h;if(l){var f=numeric(d[0]);var g=numeric(d[1]);var y=Math.max(d[0].length,d[1].length);var v=d.length==3?Math.abs(numeric(d[2])):1;var E=lte;var b=g{function callbackForResult(e,t){if(e){a(e)}else if(!t){a(new Error("Unknown error"))}else{r(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,r){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let a=false;function handleResult(e,t){if(!a){a=true;r(e,t)}}const i=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let n;i.on("socket",(e=>{n=e}));i.setTimeout(this._socketTimeout||3*6e4,(()=>{if(n){n.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));i.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){i.end()}));t.pipe(i)}else{i.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const r=l.getProxyUrl(t);const a=r&&r.hostname;if(!a){return}return this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const a={};a.parsedUrl=t;const i=a.parsedUrl.protocol==="https:";a.httpModule=i?p:o;const n=i?443:80;a.options={};a.options.host=a.parsedUrl.hostname;a.options.port=a.parsedUrl.port?parseInt(a.parsedUrl.port):n;a.options.path=(a.parsedUrl.pathname||"")+(a.parsedUrl.search||"");a.options.method=e;a.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){a.options.headers["user-agent"]=this.userAgent}a.options.agent=this._getAgent(a.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(a.options)}}return a}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){let a;if(this.requestOptions&&this.requestOptions.headers){a=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||a||r}_getAgent(e){let t;const r=l.getProxyUrl(e);const a=r&&r.hostname;if(this._keepAlive&&a){t=this._proxyAgent}if(this._keepAlive&&!a){t=this._agent}if(t){return t}const i=e.protocol==="https:";let n=100;if(this.requestOptions){n=this.requestOptions.maxSockets||o.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:n,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let a;const s=r.protocol==="https:";if(i){a=s?c.httpsOverHttps:c.httpsOverHttp}else{a=s?c.httpOverHttps:c.httpOverHttp}t=a(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:n};t=i?new p.Agent(e):new o.Agent(e);this._agent=t}if(!t){t=i?p.globalAgent:o.globalAgent}if(i&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let r;if(this._keepAlive){r=this._proxyAgentDispatcher}if(r){return r}const a=e.protocol==="https:";r=new d.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`${t.username}:${t.password}`}));this._proxyAgentDispatcher=r;if(a&&this._ignoreSslError){r.options=Object.assign(r.options.requestTls||{},{rejectUnauthorized:false})}return r}_performExponentialBackoff(e){return s(this,void 0,void 0,(function*(){e=Math.min(v,e);const t=E*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return s(this,void 0,void 0,(function*(){return new Promise(((r,a)=>s(this,void 0,void 0,(function*(){const i=e.message.statusCode||0;const n={statusCode:i,result:null,headers:{}};if(i===u.NotFound){r(n)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let s;let o;try{o=yield e.readBody();if(o&&o.length>0){if(t&&t.deserializeDates){s=JSON.parse(o,dateTimeDeserializer)}else{s=JSON.parse(o)}n.result=s}n.headers=e.message.headers}catch(e){}if(i>299){let e;if(s&&s.message){e=s.message}else if(o&&o.length>0){e=o}else{e=`Failed request: (${i})`}const t=new HttpClientError(e,i);t.result=n.result;a(t)}else{r(n)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},19835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const r=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(r){try{return new URL(r)}catch(e){if(!r.startsWith("http://")&&!r.startsWith("https://"))return new URL(`http://${r}`)}}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const r=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!r){return false}let a;if(e.port){a=Number(e.port)}else if(e.protocol==="http:"){a=80}else if(e.protocol==="https:"){a=443}const i=[e.hostname.toUpperCase()];if(typeof a==="number"){i.push(`${i[0]}:${a}`)}for(const e of r.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||i.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}},81962:function(e,t,r){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;Object.defineProperty(e,a,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))a(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(a.next(e))}catch(e){i(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};var o;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.READONLY=t.UV_FS_O_EXLOCK=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rm=t.rename=t.readlink=t.readdir=t.open=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const p=n(r(57147));const l=n(r(71017));o=p.promises,t.chmod=o.chmod,t.copyFile=o.copyFile,t.lstat=o.lstat,t.mkdir=o.mkdir,t.open=o.open,t.readdir=o.readdir,t.readlink=o.readlink,t.rename=o.rename,t.rm=o.rm,t.rmdir=o.rmdir,t.stat=o.stat,t.symlink=o.symlink,t.unlink=o.unlink;t.IS_WINDOWS=process.platform==="win32";t.UV_FS_O_EXLOCK=268435456;t.READONLY=p.constants.O_RDONLY;function exists(e){return s(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,r=false){return s(this,void 0,void 0,(function*(){const a=r?yield t.stat(e):yield t.lstat(e);return a.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,r){return s(this,void 0,void 0,(function*(){let a=undefined;try{a=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(a&&a.isFile()){if(t.IS_WINDOWS){const t=l.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(a)){return e}}}const i=e;for(const n of r){e=i+n;a=undefined;try{a=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(a&&a.isFile()){if(t.IS_WINDOWS){try{const r=l.dirname(e);const a=l.basename(e).toUpperCase();for(const i of yield t.readdir(r)){if(a===i.toUpperCase()){e=l.join(r,i);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(a)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},47351:function(e,t,r){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;Object.defineProperty(e,a,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))a(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(a.next(e))}catch(e){i(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const o=r(39491);const p=n(r(71017));const l=n(r(81962));function cp(e,t,r={}){return s(this,void 0,void 0,(function*(){const{force:a,recursive:i,copySourceDirectory:n}=readCopyOptions(r);const s=(yield l.exists(t))?yield l.stat(t):null;if(s&&s.isFile()&&!a){return}const o=s&&s.isDirectory()&&n?p.join(t,p.basename(e)):t;if(!(yield l.exists(e))){throw new Error(`no such file or directory: ${e}`)}const c=yield l.stat(e);if(c.isDirectory()){if(!i){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,o,0,a)}}else{if(p.relative(e,o)===""){throw new Error(`'${o}' and '${e}' are the same file`)}yield copyFile(e,o,a)}}))}t.cp=cp;function mv(e,t,r={}){return s(this,void 0,void 0,(function*(){if(yield l.exists(t)){let a=true;if(yield l.isDirectory(t)){t=p.join(t,p.basename(e));a=yield l.exists(t)}if(a){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(p.dirname(t));yield l.rename(e,t)}))}t.mv=mv;function rmRF(e){return s(this,void 0,void 0,(function*(){if(l.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield l.rm(e,{force:true,maxRetries:3,recursive:true,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}}))}t.rmRF=rmRF;function mkdirP(e){return s(this,void 0,void 0,(function*(){o.ok(e,"a path argument must be provided");yield l.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(l.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return t}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}t.which=which;function findInPath(e){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(l.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(p.delimiter)){if(e){t.push(e)}}}if(l.isRooted(e)){const r=yield l.tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(p.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(p.delimiter)){if(e){r.push(e)}}}const a=[];for(const i of r){const r=yield l.tryGetExecutablePath(p.join(i,e),t);if(r){a.push(r)}}return a}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);const a=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:a}}function cpDirRecursive(e,t,r,a){return s(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const i=yield l.readdir(e);for(const n of i){const i=`${e}/${n}`;const s=`${t}/${n}`;const o=yield l.lstat(i);if(o.isDirectory()){yield cpDirRecursive(i,s,r,a)}else{yield copyFile(i,s,a)}}yield l.chmod(t,(yield l.stat(e)).mode)}))}function copyFile(e,t,r){return s(this,void 0,void 0,(function*(){if((yield l.lstat(e)).isSymbolicLink()){try{yield l.lstat(t);yield l.unlink(t)}catch(e){if(e.code==="EPERM"){yield l.chmod(t,"0666");yield l.unlink(t)}}const r=yield l.readlink(e);yield l.symlink(r,t,l.IS_WINDOWS?"junction":null)}else if(!(yield l.exists(t))||r){yield l.copyFile(e,t)}}))}},52557:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=new WeakMap;const a=new WeakMap;class AbortSignal{constructor(){this.onabort=null;r.set(this,[]);a.set(this,false)}get aborted(){if(!a.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}return a.get(this)}static get none(){return new AbortSignal}addEventListener(e,t){if(!r.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const a=r.get(this);a.push(t)}removeEventListener(e,t){if(!r.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const a=r.get(this);const i=a.indexOf(t);if(i>-1){a.splice(i,1)}}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function abortSignal(e){if(e.aborted){return}if(e.onabort){e.onabort.call(e)}const t=r.get(e);if(t){t.slice().forEach((t=>{t.call(e,{type:"abort"})}))}a.set(e,true)}class AbortError extends Error{constructor(e){super(e);this.name="AbortError"}}class AbortController{constructor(e){this._signal=new AbortSignal;if(!e){return}if(!Array.isArray(e)){e=arguments}for(const t of e){if(t.aborted){this.abort()}else{t.addEventListener("abort",(()=>{this.abort()}))}}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(e){const t=new AbortSignal;const r=setTimeout(abortSignal,e,t);if(typeof r.unref==="function"){r.unref()}return t}}t.AbortController=AbortController;t.AbortError=AbortError;t.AbortSignal=AbortSignal},39645:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var a=r(51333);class AzureKeyCredential{get key(){return this._key}constructor(e){if(!e){throw new Error("key must be a non-empty string")}this._key=e}update(e){this._key=e}}function isKeyCredential(e){return a.isObjectWithProperties(e,["key"])&&typeof e.key==="string"}class AzureNamedKeyCredential{get key(){return this._key}get name(){return this._name}constructor(e,t){if(!e||!t){throw new TypeError("name and key must be non-empty strings")}this._name=e;this._key=t}update(e,t){if(!e||!t){throw new TypeError("newName and newKey must be non-empty strings")}this._name=e;this._key=t}}function isNamedKeyCredential(e){return a.isObjectWithProperties(e,["name","key"])&&typeof e.key==="string"&&typeof e.name==="string"}class AzureSASCredential{get signature(){return this._signature}constructor(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}update(e){if(!e){throw new Error("shared access signature must be a non-empty string")}this._signature=e}}function isSASCredential(e){return a.isObjectWithProperties(e,["signature"])&&typeof e.signature==="string"}function isTokenCredential(e){const t=e;return t&&typeof t.getToken==="function"&&(t.signRequest===undefined||t.getToken.length>0)}t.AzureKeyCredential=AzureKeyCredential;t.AzureNamedKeyCredential=AzureNamedKeyCredential;t.AzureSASCredential=AzureSASCredential;t.isKeyCredential=isKeyCredential;t.isNamedKeyCredential=isNamedKeyCredential;t.isSASCredential=isSASCredential;t.isTokenCredential=isTokenCredential},24607:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var a=r(43415);var i=r(73837);var n=r(4351);var s=r(66189);var o=r(51333);var p=r(3233);var l=r(39645);var c=r(22037);var d=r(13685);var u=r(95687);var m=r(52557);var h=r(74294);var f=r(12781);var g=r(46279);var y=r(80467);var v=r(94175);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:true,get:function(){return e[r]}})}}))}t["default"]=e;return Object.freeze(t)}var E=_interopNamespace(s);var b=_interopNamespace(c);var C=_interopNamespace(d);var B=_interopNamespace(u);var I=_interopNamespace(h);var w=_interopDefaultLegacy(g);var Q=_interopDefaultLegacy(y);function getHeaderKey(e){return e.toLowerCase()}function isHttpHeadersLike(e){if(e&&typeof e==="object"){const t=e;if(typeof t.rawHeaders==="function"&&typeof t.clone==="function"&&typeof t.get==="function"&&typeof t.set==="function"&&typeof t.contains==="function"&&typeof t.remove==="function"&&typeof t.headersArray==="function"&&typeof t.headerValues==="function"&&typeof t.headerNames==="function"&&typeof t.toJson==="function"){return true}}return false}class HttpHeaders{constructor(e){this._headersMap={};if(e){for(const t in e){this.set(t,e[t])}}}set(e,t){this._headersMap[getHeaderKey(e)]={name:e,value:t.toString().trim()}}get(e){const t=this._headersMap[getHeaderKey(e)];return!t?undefined:t.value}contains(e){return!!this._headersMap[getHeaderKey(e)]}remove(e){const t=this.contains(e);delete this._headersMap[getHeaderKey(e)];return t}rawHeaders(){return this.toJson({preserveCase:true})}headersArray(){const e=[];for(const t in this._headersMap){e.push(this._headersMap[t])}return e}headerNames(){const e=[];const t=this.headersArray();for(let r=0;ro){failValidation("MaxItems",o)}if(p!=undefined&&h.length>p){failValidation("MaxLength",p)}if(l!=undefined&&h.length{clearTimeout(p);o(e)}))}))}async function streamToBuffer2(e,t,r){let a=0;const i=t.length;return new Promise(((n,s)=>{e.on("readable",(()=>{let n=e.read();if(!n){return}if(typeof n==="string"){n=Buffer.from(n,r)}if(a+n.length>i){s(new Error(`Stream exceeds buffer size. Buffer size: ${i}`));return}t.fill(n,a,a+n.length);a+=n.length}));e.on("end",(()=>{n(a)}));e.on("error",s)}))}async function readStreamToLocalFile(e,t){return new Promise(((r,a)=>{const i=y.createWriteStream(t);e.on("error",(e=>{a(e)}));i.on("error",(e=>{a(e)}));i.on("close",r);e.pipe(i)}))}const Wo=v.promisify(y.stat);const Xo=y.createReadStream;class BlobClient extends StorageClient{constructor(e,t,r,i){i=i||{};let n;let s;if(isPipelineLike(t)){s=e;n=t}else if(a.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||a.isTokenCredential(t)){s=e;i=r;n=newPipeline(t,i)}else if(!t&&typeof t!=="string"){s=e;if(r&&typeof r!=="string"){i=r}n=newPipeline(new AnonymousCredential,i)}else if(t&&typeof t==="string"&&r&&typeof r==="string"){const o=t;const p=r;const l=extractConnectionStringParts(e);if(l.kind==="AccountConnString"){if(a.isNode){const e=new StorageSharedKeyCredential(l.accountName,l.accountKey);s=appendToURLPath(appendToURLPath(l.url,encodeURIComponent(o)),encodeURIComponent(p));if(!i.proxyOptions){i.proxyOptions=a.getDefaultProxySettings(l.proxyUri)}n=newPipeline(e,i)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(l.kind==="SASConnString"){s=appendToURLPath(appendToURLPath(l.url,encodeURIComponent(o)),encodeURIComponent(p))+"?"+l.accountSas;n=newPipeline(new AnonymousCredential,i)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}super(s,n);({blobName:this._name,containerName:this._containerName}=this.getBlobAndContainerNamesFromUrl());this.blobContext=new Blob$1(this.storageClientContext);this._snapshot=getURLParameter(this.url,uo.Parameters.SNAPSHOT);this._versionId=getURLParameter(this.url,uo.Parameters.VERSIONID)}get name(){return this._name}get containerName(){return this._containerName}withSnapshot(e){return new BlobClient(setURLParameter(this.url,uo.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)}withVersion(e){return new BlobClient(setURLParameter(this.url,uo.Parameters.VERSIONID,e.length===0?undefined:e),this.pipeline)}getAppendBlobClient(){return new AppendBlobClient(this.url,this.pipeline)}getBlockBlobClient(){return new BlockBlobClient(this.url,this.pipeline)}getPageBlobClient(){return new PageBlobClient(this.url,this.pipeline)}async download(e=0,t,r={}){var i;r.conditions=r.conditions||{};r.conditions=r.conditions||{};ensureCpkIfSpecified(r.customerProvidedKey,this.isHttps);const{span:s,updatedOptions:o}=Oo("BlobClient-download",r);try{const n=await this.blobContext.download(Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(i=r.conditions)===null||i===void 0?void 0:i.tagConditions}),requestOptions:{onDownloadProgress:a.isNode?undefined:r.onProgress},range:e===0&&!t?undefined:rangeToString({offset:e,count:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey},convertTracingToRequestOptionsBase(o)));const s=Object.assign(Object.assign({},n),{_response:n._response,objectReplicationDestinationPolicyId:n.objectReplicationPolicyId,objectReplicationSourceProperties:parseObjectReplicationRecord(n.objectReplicationRules)});if(!a.isNode){return s}if(r.maxRetryRequests===undefined||r.maxRetryRequests<0){r.maxRetryRequests=po}if(n.contentLength===undefined){throw new RangeError(`File download response doesn't contain valid content length header`)}if(!n.etag){throw new RangeError(`File download response doesn't contain valid etag header`)}return new BlobDownloadResponse(s,(async t=>{var a;const i={leaseAccessConditions:r.conditions,modifiedAccessConditions:{ifMatch:r.conditions.ifMatch||n.etag,ifModifiedSince:r.conditions.ifModifiedSince,ifNoneMatch:r.conditions.ifNoneMatch,ifUnmodifiedSince:r.conditions.ifUnmodifiedSince,ifTags:(a=r.conditions)===null||a===void 0?void 0:a.tagConditions},range:rangeToString({count:e+n.contentLength-t,offset:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey};return(await this.blobContext.download(Object.assign({abortSignal:r.abortSignal},i))).readableStreamBody}),e,n.contentLength,{maxRetryRequests:r.maxRetryRequests,onProgress:r.onProgress})}catch(e){s.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{s.end()}}async exists(e={}){const{span:t,updatedOptions:r}=Oo("BlobClient-exists",e);try{ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);await this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:r.tracingOptions});return true}catch(e){if(e.statusCode===404){return false}else if(e.statusCode===409&&(e.details.errorCode===Qo||e.details.errorCode===So)){return true}t.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async getProperties(e={}){var t;const{span:r,updatedOptions:a}=Oo("BlobClient-getProperties",e);try{e.conditions=e.conditions||{};ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);const r=await this.blobContext.getProperties(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey},convertTracingToRequestOptionsBase(a)));return Object.assign(Object.assign({},r),{_response:r._response,objectReplicationDestinationPolicyId:r.objectReplicationPolicyId,objectReplicationSourceProperties:parseObjectReplicationRecord(r.objectReplicationRules)})}catch(e){r.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async delete(e={}){var t;const{span:r,updatedOptions:a}=Oo("BlobClient-delete",e);e.conditions=e.conditions||{};try{return await this.blobContext.delete(Object.assign({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},convertTracingToRequestOptionsBase(a)))}catch(e){r.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async deleteIfExists(e={}){var t,r;const{span:a,updatedOptions:i}=Oo("BlobClient-deleteIfExists",e);try{const e=await this.delete(i);return Object.assign(Object.assign({succeeded:true},e),{_response:e._response})}catch(e){if(((t=e.details)===null||t===void 0?void 0:t.errorCode)==="BlobNotFound"){a.setStatus({code:n.SpanStatusCode.ERROR,message:"Expected exception when deleting a blob or snapshot only if it exists."});return Object.assign(Object.assign({succeeded:false},(r=e.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:e.response})}a.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async undelete(e={}){const{span:t,updatedOptions:r}=Oo("BlobClient-undelete",e);try{return await this.blobContext.undelete(Object.assign({abortSignal:e.abortSignal},convertTracingToRequestOptionsBase(r)))}catch(e){t.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{t.end()}}async setHTTPHeaders(e,t={}){var r;const{span:a,updatedOptions:i}=Oo("BlobClient-setHTTPHeaders",t);t.conditions=t.conditions||{};try{ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return await this.blobContext.setHttpHeaders(Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:e,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},convertTracingToRequestOptionsBase(i)))}catch(e){a.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async setMetadata(e,t={}){var r;const{span:a,updatedOptions:i}=Oo("BlobClient-setMetadata",t);t.conditions=t.conditions||{};try{ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return await this.blobContext.setMetadata(Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope},convertTracingToRequestOptionsBase(i)))}catch(e){a.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async setTags(e,t={}){var r;const{span:a,updatedOptions:i}=Oo("BlobClient-setTags",t);try{return await this.blobContext.setTags(Object.assign(Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},convertTracingToRequestOptionsBase(i)),{tags:toBlobTags(e)}))}catch(e){a.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async getTags(e={}){var t;const{span:r,updatedOptions:a}=Oo("BlobClient-getTags",e);try{const r=await this.blobContext.getTags(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},convertTracingToRequestOptionsBase(a)));const i=Object.assign(Object.assign({},r),{_response:r._response,tags:toTags({blobTagSet:r.blobTagSet})||{}});return i}catch(e){r.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}getBlobLeaseClient(e){return new BlobLeaseClient(this,e)}async createSnapshot(e={}){var t;const{span:r,updatedOptions:a}=Oo("BlobClient-createSnapshot",e);e.conditions=e.conditions||{};try{ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);return await this.blobContext.createSnapshot(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope},convertTracingToRequestOptionsBase(a)))}catch(e){r.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async beginCopyFromURL(e,t={}){const r={abortCopyFromURL:(...e)=>this.abortCopyFromURL(...e),getProperties:(...e)=>this.getProperties(...e),startCopyFromURL:(...e)=>this.startCopyFromURL(...e)};const a=new BlobBeginCopyFromUrlPoller({blobClient:r,copySource:e,intervalInMs:t.intervalInMs,onProgress:t.onProgress,resumeFrom:t.resumeFrom,startCopyFromURLOptions:t});await a.poll();return a}async abortCopyFromURL(e,t={}){const{span:r,updatedOptions:a}=Oo("BlobClient-abortCopyFromURL",t);try{return await this.blobContext.abortCopyFromURL(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions},convertTracingToRequestOptionsBase(a)))}catch(e){r.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{r.end()}}async syncCopyFromURL(e,t={}){var r,a,i;const{span:s,updatedOptions:o}=Oo("BlobClient-syncCopyFromURL",t);t.conditions=t.conditions||{};t.sourceConditions=t.sourceConditions||{};try{return await this.blobContext.copyFromURL(e,Object.assign({abortSignal:t.abortSignal,metadata:t.metadata,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince},sourceContentMD5:t.sourceContentMD5,copySourceAuthorization:httpAuthorizationToString(t.sourceAuthorization),tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags),immutabilityPolicyExpiry:(a=t.immutabilityPolicy)===null||a===void 0?void 0:a.expiriesOn,immutabilityPolicyMode:(i=t.immutabilityPolicy)===null||i===void 0?void 0:i.policyMode,legalHold:t.legalHold,encryptionScope:t.encryptionScope,copySourceTags:t.copySourceTags},convertTracingToRequestOptionsBase(o)))}catch(e){s.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{s.end()}}async setAccessTier(e,t={}){var r;const{span:a,updatedOptions:i}=Oo("BlobClient-setAccessTier",t);try{return await this.blobContext.setTier(toAccessTier(e),Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),rehydratePriority:t.rehydratePriority},convertTracingToRequestOptionsBase(i)))}catch(e){a.setStatus({code:n.SpanStatusCode.ERROR,message:e.message});throw e}finally{a.end()}}async downloadToBuffer(e,t,r,a={}){let i;let s=0;let o=0;let p=a;if(e instanceof Buffer){i=e;s=t||0;o=typeof r==="number"?r:0}else{s=typeof e==="number"?e:0;o=typeof t==="number"?t:0;p=r||{}}const{span:l,updatedOptions:c}=Oo("BlobClient-downloadToBuffer",p);try{if(!p.blockSize){p.blockSize=0}if(p.blockSize<0){throw new RangeError("blockSize option must be >= 0")}if(p.blockSize===0){p.blockSize=oo}if(s<0){throw new RangeError("offset option must be >= 0")}if(o&&o<=0){throw new RangeError("count option must be greater than 0")}if(!p.conditions){p.conditions={}}if(!o){const e=await this.getProperties(Object.assign(Object.assign({},p),{tracingOptions:Object.assign(Object.assign({},p.tracingOptions),convertTracingToRequestOptionsBase(c))}));o=e.contentLength-s;if(o<0){throw new RangeError(`offset ${s} shouldn't be larger than blob size ${e.contentLength}`)}}if(!i){try{i=Buffer.alloc(o)}catch(e){throw new Error(`Unable to allocate the buffer of size: ${o}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${e.message}`)}}if(i.length0||v===false:e.util.schemaHasRules(v,e.RULES.all)){a+=" "+h+" = true; if ( "+c+e.util.getProperty(C)+" !== undefined ";if(y){a+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(C)+"') "}a+=") { ";u.schema=v;u.schemaPath=o+e.util.getProperty(C);u.errSchemaPath=p+"/"+e.util.escapeFragment(C);a+=" "+e.validate(u)+" ";u.baseId=L;a+=" } ";if(l){a+=" if ("+h+") { ";m+="}"}}}if(l){a+=" "+m+" if ("+d+" == errors) {"}return a}},10163:e=>{"use strict";e.exports=function generate_enum(e,t,r){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[t];var o=e.schemaPath+e.util.getProperty(t);var p=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(n||"");var d="valid"+i;var u=e.opts.$data&&s&&s.$data,m;if(u){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";m="schema"+i}else{m=s}var h="i"+i,f="schema"+i;if(!u){a+=" var "+f+" = validate.schema"+o+";"}a+="var "+d+";";if(u){a+=" if (schema"+i+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+i+")) "+d+" = false; else {"}a+=""+d+" = false;for (var "+h+"=0; "+h+"<"+f+".length; "+h+"++) if (equal("+c+", "+f+"["+h+"])) { "+d+" = true; break; }";if(u){a+=" } "}a+=" if (!"+d+") { ";var g=g||[];g.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { allowedValues: schema"+i+" } ";if(e.opts.messages!==false){a+=" , message: 'should be equal to one of the allowed values' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}a+=" } "}else{a+=" {} "}var y=a;a=g.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+y+"]); "}else{a+=" validate.errors = ["+y+"]; return false; "}}else{a+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" }";if(l){a+=" else { "}return a}},63847:e=>{"use strict";e.exports=function generate_format(e,t,r){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[t];var o=e.schemaPath+e.util.getProperty(t);var p=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(n||"");if(e.opts.format===false){if(l){a+=" if (true) { "}return a}var d=e.opts.$data&&s&&s.$data,u;if(d){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";u="schema"+i}else{u=s}var m=e.opts.unknownFormats,h=Array.isArray(m);if(d){var f="format"+i,g="isObject"+i,y="formatType"+i;a+=" var "+f+" = formats["+u+"]; var "+g+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+y+" = "+g+" && "+f+".type || 'string'; if ("+g+") { ";if(e.async){a+=" var async"+i+" = "+f+".async; "}a+=" "+f+" = "+f+".validate; } if ( ";if(d){a+=" ("+u+" !== undefined && typeof "+u+" != 'string') || "}a+=" (";if(m!="ignore"){a+=" ("+u+" && !"+f+" ";if(h){a+=" && self._opts.unknownFormats.indexOf("+u+") == -1 "}a+=") || "}a+=" ("+f+" && "+y+" == '"+r+"' && !(typeof "+f+" == 'function' ? ";if(e.async){a+=" (async"+i+" ? await "+f+"("+c+") : "+f+"("+c+")) "}else{a+=" "+f+"("+c+") "}a+=" : "+f+".test("+c+"))))) {"}else{var f=e.formats[s];if(!f){if(m=="ignore"){e.logger.warn('unknown format "'+s+'" ignored in schema at path "'+e.errSchemaPath+'"');if(l){a+=" if (true) { "}return a}else if(h&&m.indexOf(s)>=0){if(l){a+=" if (true) { "}return a}else{throw new Error('unknown format "'+s+'" is used in schema at path "'+e.errSchemaPath+'"')}}var g=typeof f=="object"&&!(f instanceof RegExp)&&f.validate;var y=g&&f.type||"string";if(g){var v=f.async===true;f=f.validate}if(y!=r){if(l){a+=" if (true) { "}return a}if(v){if(!e.async)throw new Error("async format in sync schema");var E="formats"+e.util.getProperty(s)+".validate";a+=" if (!(await "+E+"("+c+"))) { "}else{a+=" if (! ";var E="formats"+e.util.getProperty(s);if(g)E+=".validate";if(typeof f=="function"){a+=" "+E+"("+c+") "}else{a+=" "+E+".test("+c+") "}a+=") { "}}var b=b||[];b.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { format: ";if(d){a+=""+u}else{a+=""+e.util.toQuotedString(s)}a+=" } ";if(e.opts.messages!==false){a+=" , message: 'should match format \"";if(d){a+="' + "+u+" + '"}else{a+=""+e.util.escapeQuotes(s)}a+="\"' "}if(e.opts.verbose){a+=" , schema: ";if(d){a+="validate.schema"+o}else{a+=""+e.util.toQuotedString(s)}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}a+=" } "}else{a+=" {} "}var C=a;a=b.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+C+"]); "}else{a+=" validate.errors = ["+C+"]; return false; "}}else{a+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } ";if(l){a+=" else { "}return a}},80862:e=>{"use strict";e.exports=function generate_if(e,t,r){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[t];var o=e.schemaPath+e.util.getProperty(t);var p=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(n||"");var d="valid"+i;var u="errs__"+i;var m=e.util.copy(e);m.level++;var h="valid"+m.level;var f=e.schema["then"],g=e.schema["else"],y=f!==undefined&&(e.opts.strictKeywords?typeof f=="object"&&Object.keys(f).length>0||f===false:e.util.schemaHasRules(f,e.RULES.all)),v=g!==undefined&&(e.opts.strictKeywords?typeof g=="object"&&Object.keys(g).length>0||g===false:e.util.schemaHasRules(g,e.RULES.all)),E=m.baseId;if(y||v){var b;m.createErrors=false;m.schema=s;m.schemaPath=o;m.errSchemaPath=p;a+=" var "+u+" = errors; var "+d+" = true; ";var C=e.compositeRule;e.compositeRule=m.compositeRule=true;a+=" "+e.validate(m)+" ";m.baseId=E;m.createErrors=true;a+=" errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ";e.compositeRule=m.compositeRule=C;if(y){a+=" if ("+h+") { ";m.schema=e.schema["then"];m.schemaPath=e.schemaPath+".then";m.errSchemaPath=e.errSchemaPath+"/then";a+=" "+e.validate(m)+" ";m.baseId=E;a+=" "+d+" = "+h+"; ";if(y&&v){b="ifClause"+i;a+=" var "+b+" = 'then'; "}else{b="'then'"}a+=" } ";if(v){a+=" else { "}}else{a+=" if (!"+h+") { "}if(v){m.schema=e.schema["else"];m.schemaPath=e.schemaPath+".else";m.errSchemaPath=e.errSchemaPath+"/else";a+=" "+e.validate(m)+" ";m.baseId=E;a+=" "+d+" = "+h+"; ";if(y&&v){b="ifClause"+i;a+=" var "+b+" = 'else'; "}else{b="'else'"}a+=" } "}a+=" if (!"+d+") { var err = ";if(e.createErrors!==false){a+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { failingKeyword: "+b+" } ";if(e.opts.messages!==false){a+=" , message: 'should match \"' + "+b+" + '\" schema' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}a+=" } "}else{a+=" {} "}a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(vErrors); "}else{a+=" validate.errors = vErrors; return false; "}}a+=" } ";if(l){a+=" else { "}}else{if(l){a+=" if (true) { "}}return a}},85810:(e,t,r)=>{"use strict";e.exports={$ref:r(42393),allOf:r(89443),anyOf:r(63093),$comment:r(30134),const:r(1661),contains:r(55964),dependencies:r(2591),enum:r(10163),format:r(63847),if:r(80862),items:r(54408),maximum:r(7404),minimum:r(7404),maxItems:r(64683),minItems:r(64683),maxLength:r(52114),minLength:r(52114),maxProperties:r(71142),minProperties:r(71142),multipleOf:r(39772),not:r(60750),oneOf:r(6106),pattern:r(13912),properties:r(52924),propertyNames:r(19195),required:r(8420),uniqueItems:r(24995),validate:r(49585)}},54408:e=>{"use strict";e.exports=function generate_items(e,t,r){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[t];var o=e.schemaPath+e.util.getProperty(t);var p=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(n||"");var d="valid"+i;var u="errs__"+i;var m=e.util.copy(e);var h="";m.level++;var f="valid"+m.level;var g="i"+i,y=m.dataLevel=e.dataLevel+1,v="data"+y,E=e.baseId;a+="var "+u+" = errors;var "+d+";";if(Array.isArray(s)){var b=e.schema.additionalItems;if(b===false){a+=" "+d+" = "+c+".length <= "+s.length+"; ";var C=p;p=e.errSchemaPath+"/additionalItems";a+=" if (!"+d+") { ";var B=B||[];B.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { limit: "+s.length+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT have more than "+s.length+" items' "}if(e.opts.verbose){a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}a+=" } "}else{a+=" {} "}var I=a;a=B.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+I+"]); "}else{a+=" validate.errors = ["+I+"]; return false; "}}else{a+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } ";p=C;if(l){h+="}";a+=" else { "}}var w=s;if(w){var Q,x=-1,k=w.length-1;while(x
{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CacheService=t.LookupCacheEntryResponse=t.LookupCacheEntryRequest=t.ListCacheEntriesResponse=t.ListCacheEntriesRequest=t.DeleteCacheEntryResponse=t.DeleteCacheEntryRequest=t.GetCacheEntryDownloadURLResponse=t.GetCacheEntryDownloadURLRequest=t.FinalizeCacheEntryUploadResponse=t.FinalizeCacheEntryUploadRequest=t.CreateCacheEntryResponse=t.CreateCacheEntryRequest=void 0;const a=r(44420);const n=r(68886);const i=r(68886);const s=r(68886);const o=r(68886);const c=r(68886);const l=r(55893);const u=r(89444);class CreateCacheEntryRequest$Type extends c.MessageType{constructor(){super("github.actions.results.api.v1.CreateCacheEntryRequest",[{no:1,name:"metadata",kind:"message",T:()=>u.CacheMetadata},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9}])}create(e){const t={key:"",version:""};globalThis.Object.defineProperty(t,o.MESSAGE_TYPE,{enumerable:false,value:this});if(e!==undefined)(0,s.reflectionMergePartial)(this,t,e);return t}internalBinaryRead(e,t,r,a){let n=a!==null&&a!==void 0?a:this.create(),s=e.pos+t;while(e.posu.CacheMetadata},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"size_bytes",kind:"scalar",T:3},{no:4,name:"version",kind:"scalar",T:9}])}create(e){const t={key:"",sizeBytes:"0",version:""};globalThis.Object.defineProperty(t,o.MESSAGE_TYPE,{enumerable:false,value:this});if(e!==undefined)(0,s.reflectionMergePartial)(this,t,e);return t}internalBinaryRead(e,t,r,a){let n=a!==null&&a!==void 0?a:this.create(),s=e.pos+t;while(e.posu.CacheMetadata},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"restore_keys",kind:"scalar",repeat:2,T:9},{no:4,name:"version",kind:"scalar",T:9}])}create(e){const t={key:"",restoreKeys:[],version:""};globalThis.Object.defineProperty(t,o.MESSAGE_TYPE,{enumerable:false,value:this});if(e!==undefined)(0,s.reflectionMergePartial)(this,t,e);return t}internalBinaryRead(e,t,r,a){let n=a!==null&&a!==void 0?a:this.create(),s=e.pos+t;while(e.posu.CacheMetadata},{no:2,name:"key",kind:"scalar",T:9}])}create(e){const t={key:""};globalThis.Object.defineProperty(t,o.MESSAGE_TYPE,{enumerable:false,value:this});if(e!==undefined)(0,s.reflectionMergePartial)(this,t,e);return t}internalBinaryRead(e,t,r,a){let n=a!==null&&a!==void 0?a:this.create(),s=e.pos+t;while(e.posu.CacheMetadata},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"restore_keys",kind:"scalar",repeat:2,T:9}])}create(e){const t={key:"",restoreKeys:[]};globalThis.Object.defineProperty(t,o.MESSAGE_TYPE,{enumerable:false,value:this});if(e!==undefined)(0,s.reflectionMergePartial)(this,t,e);return t}internalBinaryRead(e,t,r,a){let n=a!==null&&a!==void 0?a:this.create(),s=e.pos+t;while(e.posl.CacheEntry}])}create(e){const t={entries:[]};globalThis.Object.defineProperty(t,o.MESSAGE_TYPE,{enumerable:false,value:this});if(e!==undefined)(0,s.reflectionMergePartial)(this,t,e);return t}internalBinaryRead(e,t,r,a){let n=a!==null&&a!==void 0?a:this.create(),s=e.pos+t;while(e.posu.CacheMetadata},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"restore_keys",kind:"scalar",repeat:2,T:9},{no:4,name:"version",kind:"scalar",T:9}])}create(e){const t={key:"",restoreKeys:[],version:""};globalThis.Object.defineProperty(t,o.MESSAGE_TYPE,{enumerable:false,value:this});if(e!==undefined)(0,s.reflectionMergePartial)(this,t,e);return t}internalBinaryRead(e,t,r,a){let n=a!==null&&a!==void 0?a:this.create(),s=e.pos+t;while(e.posl.CacheEntry}])}create(e){const t={exists:false};globalThis.Object.defineProperty(t,o.MESSAGE_TYPE,{enumerable:false,value:this});if(e!==undefined)(0,s.reflectionMergePartial)(this,t,e);return t}internalBinaryRead(e,t,r,a){let n=a!==null&&a!==void 0?a:this.create(),s=e.pos+t;while(e.posi.CreateCacheEntryResponse.fromJson(e,{ignoreUnknownFields:true})))}FinalizeCacheEntryUpload(e){const t=i.FinalizeCacheEntryUploadRequest.toJson(e,{useProtoFieldName:true,emitDefaultValues:false});const r=this.rpc.request("github.actions.results.api.v1.CacheService","FinalizeCacheEntryUpload","application/json",t);return r.then((e=>i.FinalizeCacheEntryUploadResponse.fromJson(e,{ignoreUnknownFields:true})))}GetCacheEntryDownloadURL(e){const t=i.GetCacheEntryDownloadURLRequest.toJson(e,{useProtoFieldName:true,emitDefaultValues:false});const r=this.rpc.request("github.actions.results.api.v1.CacheService","GetCacheEntryDownloadURL","application/json",t);return r.then((e=>i.GetCacheEntryDownloadURLResponse.fromJson(e,{ignoreUnknownFields:true})))}DeleteCacheEntry(e){const t=i.DeleteCacheEntryRequest.toJson(e,{useProtoFieldName:true,emitDefaultValues:false});const r=this.rpc.request("github.actions.results.api.v1.CacheService","DeleteCacheEntry","application/json",t);return r.then((e=>i.DeleteCacheEntryResponse.fromJson(e,{ignoreUnknownFields:true})))}ListCacheEntries(e){const t=i.ListCacheEntriesRequest.toJson(e,{useProtoFieldName:true,emitDefaultValues:false});const r=this.rpc.request("github.actions.results.api.v1.CacheService","ListCacheEntries","application/json",t);return r.then((e=>i.ListCacheEntriesResponse.fromJson(e,{ignoreUnknownFields:true})))}LookupCacheEntry(e){const t=i.LookupCacheEntryRequest.toJson(e,{useProtoFieldName:true,emitDefaultValues:false});const r=this.rpc.request("github.actions.results.api.v1.CacheService","LookupCacheEntry","application/json",t);return r.then((e=>i.LookupCacheEntryResponse.fromJson(e,{ignoreUnknownFields:true})))}}t.CacheServiceClientJSON=CacheServiceClientJSON;class CacheServiceClientProtobuf{constructor(e){this.rpc=e;this.CreateCacheEntry.bind(this);this.FinalizeCacheEntryUpload.bind(this);this.GetCacheEntryDownloadURL.bind(this);this.DeleteCacheEntry.bind(this);this.ListCacheEntries.bind(this);this.LookupCacheEntry.bind(this)}CreateCacheEntry(e){const t=i.CreateCacheEntryRequest.toBinary(e);const r=this.rpc.request("github.actions.results.api.v1.CacheService","CreateCacheEntry","application/protobuf",t);return r.then((e=>i.CreateCacheEntryResponse.fromBinary(e)))}FinalizeCacheEntryUpload(e){const t=i.FinalizeCacheEntryUploadRequest.toBinary(e);const r=this.rpc.request("github.actions.results.api.v1.CacheService","FinalizeCacheEntryUpload","application/protobuf",t);return r.then((e=>i.FinalizeCacheEntryUploadResponse.fromBinary(e)))}GetCacheEntryDownloadURL(e){const t=i.GetCacheEntryDownloadURLRequest.toBinary(e);const r=this.rpc.request("github.actions.results.api.v1.CacheService","GetCacheEntryDownloadURL","application/protobuf",t);return r.then((e=>i.GetCacheEntryDownloadURLResponse.fromBinary(e)))}DeleteCacheEntry(e){const t=i.DeleteCacheEntryRequest.toBinary(e);const r=this.rpc.request("github.actions.results.api.v1.CacheService","DeleteCacheEntry","application/protobuf",t);return r.then((e=>i.DeleteCacheEntryResponse.fromBinary(e)))}ListCacheEntries(e){const t=i.ListCacheEntriesRequest.toBinary(e);const r=this.rpc.request("github.actions.results.api.v1.CacheService","ListCacheEntries","application/protobuf",t);return r.then((e=>i.ListCacheEntriesResponse.fromBinary(e)))}LookupCacheEntry(e){const t=i.LookupCacheEntryRequest.toBinary(e);const r=this.rpc.request("github.actions.results.api.v1.CacheService","LookupCacheEntry","application/protobuf",t);return r.then((e=>i.LookupCacheEntryResponse.fromBinary(e)))}}t.CacheServiceClientProtobuf=CacheServiceClientProtobuf;var s;(function(e){e["CreateCacheEntry"]="CreateCacheEntry";e["FinalizeCacheEntryUpload"]="FinalizeCacheEntryUpload";e["GetCacheEntryDownloadURL"]="GetCacheEntryDownloadURL";e["DeleteCacheEntry"]="DeleteCacheEntry";e["ListCacheEntries"]="ListCacheEntries";e["LookupCacheEntry"]="LookupCacheEntry"})(s||(t.CacheServiceMethod=s={}));t.CacheServiceMethodList=[s.CreateCacheEntry,s.FinalizeCacheEntryUpload,s.GetCacheEntryDownloadURL,s.DeleteCacheEntry,s.ListCacheEntries,s.LookupCacheEntry];function createCacheServiceServer(e){return new n.TwirpServer({service:e,packageName:"github.actions.results.api.v1",serviceName:"CacheService",methodList:t.CacheServiceMethodList,matchRoute:matchCacheServiceRoute})}t.createCacheServiceServer=createCacheServiceServer;function matchCacheServiceRoute(e,t){switch(e){case"CreateCacheEntry":return(e,r,n,i)=>a(this,void 0,void 0,(function*(){e=Object.assign(Object.assign({},e),{methodName:"CreateCacheEntry"});yield t.onMatch(e);return handleCacheServiceCreateCacheEntryRequest(e,r,n,i)}));case"FinalizeCacheEntryUpload":return(e,r,n,i)=>a(this,void 0,void 0,(function*(){e=Object.assign(Object.assign({},e),{methodName:"FinalizeCacheEntryUpload"});yield t.onMatch(e);return handleCacheServiceFinalizeCacheEntryUploadRequest(e,r,n,i)}));case"GetCacheEntryDownloadURL":return(e,r,n,i)=>a(this,void 0,void 0,(function*(){e=Object.assign(Object.assign({},e),{methodName:"GetCacheEntryDownloadURL"});yield t.onMatch(e);return handleCacheServiceGetCacheEntryDownloadURLRequest(e,r,n,i)}));case"DeleteCacheEntry":return(e,r,n,i)=>a(this,void 0,void 0,(function*(){e=Object.assign(Object.assign({},e),{methodName:"DeleteCacheEntry"});yield t.onMatch(e);return handleCacheServiceDeleteCacheEntryRequest(e,r,n,i)}));case"ListCacheEntries":return(e,r,n,i)=>a(this,void 0,void 0,(function*(){e=Object.assign(Object.assign({},e),{methodName:"ListCacheEntries"});yield t.onMatch(e);return handleCacheServiceListCacheEntriesRequest(e,r,n,i)}));case"LookupCacheEntry":return(e,r,n,i)=>a(this,void 0,void 0,(function*(){e=Object.assign(Object.assign({},e),{methodName:"LookupCacheEntry"});yield t.onMatch(e);return handleCacheServiceLookupCacheEntryRequest(e,r,n,i)}));default:t.onNotFound();const e=`no handler found`;throw new n.TwirpError(n.TwirpErrorCode.BadRoute,e)}}function handleCacheServiceCreateCacheEntryRequest(e,t,r,a){switch(e.contentType){case n.TwirpContentType.JSON:return handleCacheServiceCreateCacheEntryJSON(e,t,r,a);case n.TwirpContentType.Protobuf:return handleCacheServiceCreateCacheEntryProtobuf(e,t,r,a);default:const i="unexpected Content-Type";throw new n.TwirpError(n.TwirpErrorCode.BadRoute,i)}}function handleCacheServiceFinalizeCacheEntryUploadRequest(e,t,r,a){switch(e.contentType){case n.TwirpContentType.JSON:return handleCacheServiceFinalizeCacheEntryUploadJSON(e,t,r,a);case n.TwirpContentType.Protobuf:return handleCacheServiceFinalizeCacheEntryUploadProtobuf(e,t,r,a);default:const i="unexpected Content-Type";throw new n.TwirpError(n.TwirpErrorCode.BadRoute,i)}}function handleCacheServiceGetCacheEntryDownloadURLRequest(e,t,r,a){switch(e.contentType){case n.TwirpContentType.JSON:return handleCacheServiceGetCacheEntryDownloadURLJSON(e,t,r,a);case n.TwirpContentType.Protobuf:return handleCacheServiceGetCacheEntryDownloadURLProtobuf(e,t,r,a);default:const i="unexpected Content-Type";throw new n.TwirpError(n.TwirpErrorCode.BadRoute,i)}}function handleCacheServiceDeleteCacheEntryRequest(e,t,r,a){switch(e.contentType){case n.TwirpContentType.JSON:return handleCacheServiceDeleteCacheEntryJSON(e,t,r,a);case n.TwirpContentType.Protobuf:return handleCacheServiceDeleteCacheEntryProtobuf(e,t,r,a);default:const i="unexpected Content-Type";throw new n.TwirpError(n.TwirpErrorCode.BadRoute,i)}}function handleCacheServiceListCacheEntriesRequest(e,t,r,a){switch(e.contentType){case n.TwirpContentType.JSON:return handleCacheServiceListCacheEntriesJSON(e,t,r,a);case n.TwirpContentType.Protobuf:return handleCacheServiceListCacheEntriesProtobuf(e,t,r,a);default:const i="unexpected Content-Type";throw new n.TwirpError(n.TwirpErrorCode.BadRoute,i)}}function handleCacheServiceLookupCacheEntryRequest(e,t,r,a){switch(e.contentType){case n.TwirpContentType.JSON:return handleCacheServiceLookupCacheEntryJSON(e,t,r,a);case n.TwirpContentType.Protobuf:return handleCacheServiceLookupCacheEntryProtobuf(e,t,r,a);default:const i="unexpected Content-Type";throw new n.TwirpError(n.TwirpErrorCode.BadRoute,i)}}function handleCacheServiceCreateCacheEntryJSON(e,t,r,s){return a(this,void 0,void 0,(function*(){let a;let o;try{const e=JSON.parse(r.toString()||"{}");a=i.CreateCacheEntryRequest.fromJson(e,{ignoreUnknownFields:true})}catch(e){if(e instanceof Error){const t="the json request could not be decoded";throw new n.TwirpError(n.TwirpErrorCode.Malformed,t).withCause(e,true)}}if(s&&s.length>0){const r=(0,n.chainInterceptors)(...s);o=yield r(e,a,((e,r)=>t.CreateCacheEntry(e,r)))}else{o=yield t.CreateCacheEntry(e,a)}return JSON.stringify(i.CreateCacheEntryResponse.toJson(o,{useProtoFieldName:true,emitDefaultValues:false}))}))}function handleCacheServiceFinalizeCacheEntryUploadJSON(e,t,r,s){return a(this,void 0,void 0,(function*(){let a;let o;try{const e=JSON.parse(r.toString()||"{}");a=i.FinalizeCacheEntryUploadRequest.fromJson(e,{ignoreUnknownFields:true})}catch(e){if(e instanceof Error){const t="the json request could not be decoded";throw new n.TwirpError(n.TwirpErrorCode.Malformed,t).withCause(e,true)}}if(s&&s.length>0){const r=(0,n.chainInterceptors)(...s);o=yield r(e,a,((e,r)=>t.FinalizeCacheEntryUpload(e,r)))}else{o=yield t.FinalizeCacheEntryUpload(e,a)}return JSON.stringify(i.FinalizeCacheEntryUploadResponse.toJson(o,{useProtoFieldName:true,emitDefaultValues:false}))}))}function handleCacheServiceGetCacheEntryDownloadURLJSON(e,t,r,s){return a(this,void 0,void 0,(function*(){let a;let o;try{const e=JSON.parse(r.toString()||"{}");a=i.GetCacheEntryDownloadURLRequest.fromJson(e,{ignoreUnknownFields:true})}catch(e){if(e instanceof Error){const t="the json request could not be decoded";throw new n.TwirpError(n.TwirpErrorCode.Malformed,t).withCause(e,true)}}if(s&&s.length>0){const r=(0,n.chainInterceptors)(...s);o=yield r(e,a,((e,r)=>t.GetCacheEntryDownloadURL(e,r)))}else{o=yield t.GetCacheEntryDownloadURL(e,a)}return JSON.stringify(i.GetCacheEntryDownloadURLResponse.toJson(o,{useProtoFieldName:true,emitDefaultValues:false}))}))}function handleCacheServiceDeleteCacheEntryJSON(e,t,r,s){return a(this,void 0,void 0,(function*(){let a;let o;try{const e=JSON.parse(r.toString()||"{}");a=i.DeleteCacheEntryRequest.fromJson(e,{ignoreUnknownFields:true})}catch(e){if(e instanceof Error){const t="the json request could not be decoded";throw new n.TwirpError(n.TwirpErrorCode.Malformed,t).withCause(e,true)}}if(s&&s.length>0){const r=(0,n.chainInterceptors)(...s);o=yield r(e,a,((e,r)=>t.DeleteCacheEntry(e,r)))}else{o=yield t.DeleteCacheEntry(e,a)}return JSON.stringify(i.DeleteCacheEntryResponse.toJson(o,{useProtoFieldName:true,emitDefaultValues:false}))}))}function handleCacheServiceListCacheEntriesJSON(e,t,r,s){return a(this,void 0,void 0,(function*(){let a;let o;try{const e=JSON.parse(r.toString()||"{}");a=i.ListCacheEntriesRequest.fromJson(e,{ignoreUnknownFields:true})}catch(e){if(e instanceof Error){const t="the json request could not be decoded";throw new n.TwirpError(n.TwirpErrorCode.Malformed,t).withCause(e,true)}}if(s&&s.length>0){const r=(0,n.chainInterceptors)(...s);o=yield r(e,a,((e,r)=>t.ListCacheEntries(e,r)))}else{o=yield t.ListCacheEntries(e,a)}return JSON.stringify(i.ListCacheEntriesResponse.toJson(o,{useProtoFieldName:true,emitDefaultValues:false}))}))}function handleCacheServiceLookupCacheEntryJSON(e,t,r,s){return a(this,void 0,void 0,(function*(){let a;let o;try{const e=JSON.parse(r.toString()||"{}");a=i.LookupCacheEntryRequest.fromJson(e,{ignoreUnknownFields:true})}catch(e){if(e instanceof Error){const t="the json request could not be decoded";throw new n.TwirpError(n.TwirpErrorCode.Malformed,t).withCause(e,true)}}if(s&&s.length>0){const r=(0,n.chainInterceptors)(...s);o=yield r(e,a,((e,r)=>t.LookupCacheEntry(e,r)))}else{o=yield t.LookupCacheEntry(e,a)}return JSON.stringify(i.LookupCacheEntryResponse.toJson(o,{useProtoFieldName:true,emitDefaultValues:false}))}))}function handleCacheServiceCreateCacheEntryProtobuf(e,t,r,s){return a(this,void 0,void 0,(function*(){let a;let o;try{a=i.CreateCacheEntryRequest.fromBinary(r)}catch(e){if(e instanceof Error){const t="the protobuf request could not be decoded";throw new n.TwirpError(n.TwirpErrorCode.Malformed,t).withCause(e,true)}}if(s&&s.length>0){const r=(0,n.chainInterceptors)(...s);o=yield r(e,a,((e,r)=>t.CreateCacheEntry(e,r)))}else{o=yield t.CreateCacheEntry(e,a)}return Buffer.from(i.CreateCacheEntryResponse.toBinary(o))}))}function handleCacheServiceFinalizeCacheEntryUploadProtobuf(e,t,r,s){return a(this,void 0,void 0,(function*(){let a;let o;try{a=i.FinalizeCacheEntryUploadRequest.fromBinary(r)}catch(e){if(e instanceof Error){const t="the protobuf request could not be decoded";throw new n.TwirpError(n.TwirpErrorCode.Malformed,t).withCause(e,true)}}if(s&&s.length>0){const r=(0,n.chainInterceptors)(...s);o=yield r(e,a,((e,r)=>t.FinalizeCacheEntryUpload(e,r)))}else{o=yield t.FinalizeCacheEntryUpload(e,a)}return Buffer.from(i.FinalizeCacheEntryUploadResponse.toBinary(o))}))}function handleCacheServiceGetCacheEntryDownloadURLProtobuf(e,t,r,s){return a(this,void 0,void 0,(function*(){let a;let o;try{a=i.GetCacheEntryDownloadURLRequest.fromBinary(r)}catch(e){if(e instanceof Error){const t="the protobuf request could not be decoded";throw new n.TwirpError(n.TwirpErrorCode.Malformed,t).withCause(e,true)}}if(s&&s.length>0){const r=(0,n.chainInterceptors)(...s);o=yield r(e,a,((e,r)=>t.GetCacheEntryDownloadURL(e,r)))}else{o=yield t.GetCacheEntryDownloadURL(e,a)}return Buffer.from(i.GetCacheEntryDownloadURLResponse.toBinary(o))}))}function handleCacheServiceDeleteCacheEntryProtobuf(e,t,r,s){return a(this,void 0,void 0,(function*(){let a;let o;try{a=i.DeleteCacheEntryRequest.fromBinary(r)}catch(e){if(e instanceof Error){const t="the protobuf request could not be decoded";throw new n.TwirpError(n.TwirpErrorCode.Malformed,t).withCause(e,true)}}if(s&&s.length>0){const r=(0,n.chainInterceptors)(...s);o=yield r(e,a,((e,r)=>t.DeleteCacheEntry(e,r)))}else{o=yield t.DeleteCacheEntry(e,a)}return Buffer.from(i.DeleteCacheEntryResponse.toBinary(o))}))}function handleCacheServiceListCacheEntriesProtobuf(e,t,r,s){return a(this,void 0,void 0,(function*(){let a;let o;try{a=i.ListCacheEntriesRequest.fromBinary(r)}catch(e){if(e instanceof Error){const t="the protobuf request could not be decoded";throw new n.TwirpError(n.TwirpErrorCode.Malformed,t).withCause(e,true)}}if(s&&s.length>0){const r=(0,n.chainInterceptors)(...s);o=yield r(e,a,((e,r)=>t.ListCacheEntries(e,r)))}else{o=yield t.ListCacheEntries(e,a)}return Buffer.from(i.ListCacheEntriesResponse.toBinary(o))}))}function handleCacheServiceLookupCacheEntryProtobuf(e,t,r,s){return a(this,void 0,void 0,(function*(){let a;let o;try{a=i.LookupCacheEntryRequest.fromBinary(r)}catch(e){if(e instanceof Error){const t="the protobuf request could not be decoded";throw new n.TwirpError(n.TwirpErrorCode.Malformed,t).withCause(e,true)}}if(s&&s.length>0){const r=(0,n.chainInterceptors)(...s);o=yield r(e,a,((e,r)=>t.LookupCacheEntry(e,r)))}else{o=yield t.LookupCacheEntry(e,a)}return Buffer.from(i.LookupCacheEntryResponse.toBinary(o))}))}},55893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CacheEntry=void 0;const a=r(68886);const n=r(68886);const i=r(68886);const s=r(68886);const o=r(68886);const c=r(28200);class CacheEntry$Type extends o.MessageType{constructor(){super("github.actions.results.entities.v1.CacheEntry",[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"hash",kind:"scalar",T:9},{no:3,name:"size_bytes",kind:"scalar",T:3},{no:4,name:"scope",kind:"scalar",T:9},{no:5,name:"version",kind:"scalar",T:9},{no:6,name:"created_at",kind:"message",T:()=>c.Timestamp},{no:7,name:"last_accessed_at",kind:"message",T:()=>c.Timestamp},{no:8,name:"expires_at",kind:"message",T:()=>c.Timestamp}])}create(e){const t={key:"",hash:"",sizeBytes:"0",scope:"",version:""};globalThis.Object.defineProperty(t,s.MESSAGE_TYPE,{enumerable:false,value:this});if(e!==undefined)(0,i.reflectionMergePartial)(this,t,e);return t}internalBinaryRead(e,t,r,a){let i=a!==null&&a!==void 0?a:this.create(),s=e.pos+t;while(e.pos{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CacheMetadata=void 0;const a=r(68886);const n=r(68886);const i=r(68886);const s=r(68886);const o=r(68886);const c=r(29425);class CacheMetadata$Type extends o.MessageType{constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:()=>c.CacheScope}])}create(e){const t={repositoryId:"0",scope:[]};globalThis.Object.defineProperty(t,s.MESSAGE_TYPE,{enumerable:false,value:this});if(e!==undefined)(0,i.reflectionMergePartial)(this,t,e);return t}internalBinaryRead(e,t,r,a){let i=a!==null&&a!==void 0?a:this.create(),s=e.pos+t;while(e.pos{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CacheScope=void 0;const a=r(68886);const n=r(68886);const i=r(68886);const s=r(68886);const o=r(68886);class CacheScope$Type extends o.MessageType{constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){const t={scope:"",permission:"0"};globalThis.Object.defineProperty(t,s.MESSAGE_TYPE,{enumerable:false,value:this});if(e!==undefined)(0,i.reflectionMergePartial)(this,t,e);return t}internalBinaryRead(e,t,r,a){let i=a!==null&&a!==void 0?a:this.create(),s=e.pos+t;while(e.poss(this,void 0,void 0,(function*(){return a.getJson(getCacheApiUrl(i))}))));if(c.statusCode===204){if(o.isDebug()){yield printCachesListForDiagnostics(e[0],a,n)}return null}if(!(0,y.isSuccessStatusCode)(c.statusCode)){throw new Error(`Cache service responded with ${c.statusCode}`)}const l=c.result;const u=l===null||l===void 0?void 0:l.archiveLocation;if(!u){throw new Error("Cache not found.")}o.setSecret(u);o.debug(`Cache Result:`);o.debug(JSON.stringify(l));return l}))}t.getCacheEntry=getCacheEntry;function printCachesListForDiagnostics(e,t,r){return s(this,void 0,void 0,(function*(){const a=`caches?key=${encodeURIComponent(e)}`;const n=yield(0,y.retryTypedResponse)("listCache",(()=>s(this,void 0,void 0,(function*(){return t.getJson(getCacheApiUrl(a))}))));if(n.statusCode===200){const t=n.result;const a=t===null||t===void 0?void 0:t.totalCount;if(a&&a>0){o.debug(`No matching cache found for cache key '${e}', version '${r} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`);for(const e of(t===null||t===void 0?void 0:t.artifactCaches)||[]){o.debug(`Cache Key: ${e===null||e===void 0?void 0:e.cacheKey}, Cache Version: ${e===null||e===void 0?void 0:e.cacheVersion}, Cache Scope: ${e===null||e===void 0?void 0:e.scope}, Cache Created: ${e===null||e===void 0?void 0:e.creationTime}`)}}}}))}function downloadCache(e,t,r){return s(this,void 0,void 0,(function*(){const a=new p.URL(e);const n=(0,g.getDownloadOptions)(r);if(a.hostname.endsWith(".blob.core.windows.net")){if(n.useAzureSdk){yield(0,f.downloadCacheStorageSDK)(e,t,n)}else if(n.concurrentBlobDownloads){yield(0,f.downloadCacheHttpClientConcurrent)(e,t,n)}else{yield(0,f.downloadCacheHttpClient)(e,t)}}else{yield(0,f.downloadCacheHttpClient)(e,t)}}))}t.downloadCache=downloadCache;function reserveCache(e,t,r){return s(this,void 0,void 0,(function*(){const a=createHttpClient();const n=m.getCacheVersion(t,r===null||r===void 0?void 0:r.compressionMethod,r===null||r===void 0?void 0:r.enableCrossOsArchive);const i={key:e,version:n,cacheSize:r===null||r===void 0?void 0:r.cacheSize};const o=yield(0,y.retryTypedResponse)("reserveCache",(()=>s(this,void 0,void 0,(function*(){return a.postJson(getCacheApiUrl("caches"),i)}))));return o}))}t.reserveCache=reserveCache;function getContentRange(e,t){return`bytes ${e}-${t}/*`}function uploadChunk(e,t,r,a,n){return s(this,void 0,void 0,(function*(){o.debug(`Uploading chunk of size ${n-a+1} bytes at offset ${a} with content range: ${getContentRange(a,n)}`);const i={"Content-Type":"application/octet-stream","Content-Range":getContentRange(a,n)};const c=yield(0,y.retryHttpClientResponse)(`uploadChunk (start: ${a}, end: ${n})`,(()=>s(this,void 0,void 0,(function*(){return e.sendStream("PATCH",t,r(),i)}))));if(!(0,y.isSuccessStatusCode)(c.message.statusCode)){throw new Error(`Cache service responded with ${c.message.statusCode} during upload chunk.`)}}))}function uploadFile(e,t,r,a){return s(this,void 0,void 0,(function*(){const n=m.getArchiveFileSizeInBytes(r);const i=getCacheApiUrl(`caches/${t.toString()}`);const c=u.openSync(r,"r");const l=(0,g.getUploadOptions)(a);const p=m.assertDefined("uploadConcurrency",l.uploadConcurrency);const h=m.assertDefined("uploadChunkSize",l.uploadChunkSize);const f=[...new Array(p).keys()];o.debug("Awaiting all uploads");let y=0;try{yield Promise.all(f.map((()=>s(this,void 0,void 0,(function*(){while(y{function callbackForResult(e,t){if(e){a(e)}else if(!t){a(new Error("Unknown error"))}else{r(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,r){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let a=false;function handleResult(e,t){if(!a){a=true;r(e,t)}}const n=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let i;n.on("socket",(e=>{i=e}));n.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));n.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){n.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){n.end()}));t.pipe(n)}else{n.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const r=l.getProxyUrl(t);const a=r&&r.hostname;if(!a){return}return this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const a={};a.parsedUrl=t;const n=a.parsedUrl.protocol==="https:";a.httpModule=n?c:o;const i=n?443:80;a.options={};a.options.host=a.parsedUrl.hostname;a.options.port=a.parsedUrl.port?parseInt(a.parsedUrl.port):i;a.options.path=(a.parsedUrl.pathname||"")+(a.parsedUrl.search||"");a.options.method=e;a.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){a.options.headers["user-agent"]=this.userAgent}a.options.agent=this._getAgent(a.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(a.options)}}return a}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){let a;if(this.requestOptions&&this.requestOptions.headers){a=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||a||r}_getAgent(e){let t;const r=l.getProxyUrl(e);const a=r&&r.hostname;if(this._keepAlive&&a){t=this._proxyAgent}if(!a){t=this._agent}if(t){return t}const n=e.protocol==="https:";let i=100;if(this.requestOptions){i=this.requestOptions.maxSockets||o.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let a;const s=r.protocol==="https:";if(n){a=s?u.httpsOverHttps:u.httpsOverHttp}else{a=s?u.httpOverHttps:u.httpOverHttp}t=a(e);this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=n?new c.Agent(e):new o.Agent(e);this._agent=t}if(n&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let r;if(this._keepAlive){r=this._proxyAgentDispatcher}if(r){return r}const a=e.protocol==="https:";r=new p.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`Basic ${Buffer.from(`${t.username}:${t.password}`).toString("base64")}`}));this._proxyAgentDispatcher=r;if(a&&this._ignoreSslError){r.options=Object.assign(r.options.requestTls||{},{rejectUnauthorized:false})}return r}_performExponentialBackoff(e){return s(this,void 0,void 0,(function*(){e=Math.min(C,e);const t=I*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return s(this,void 0,void 0,(function*(){return new Promise(((r,a)=>s(this,void 0,void 0,(function*(){const n=e.message.statusCode||0;const i={statusCode:n,result:null,headers:{}};if(n===m.NotFound){r(i)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let s;let o;try{o=yield e.readBody();if(o&&o.length>0){if(t&&t.deserializeDates){s=JSON.parse(o,dateTimeDeserializer)}else{s=JSON.parse(o)}i.result=s}i.headers=e.message.headers}catch(e){}if(n>299){let e;if(s&&s.message){e=s.message}else if(o&&o.length>0){e=o}else{e=`Failed request: (${n})`}const t=new HttpClientError(e,n);t.result=i.result;a(t)}else{r(i)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},54988:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const r=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(r){try{return new DecodedURL(r)}catch(e){if(!r.startsWith("http://")&&!r.startsWith("https://"))return new DecodedURL(`http://${r}`)}}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const r=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!r){return false}let a;if(e.port){a=Number(e.port)}else if(e.protocol==="http:"){a=80}else if(e.protocol==="https:"){a=443}const n=[e.hostname.toUpperCase()];if(typeof a==="number"){n.push(`${n[0]}:${a}`)}for(const e of r.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||n.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}class DecodedURL extends URL{constructor(e,t){super(e,t);this._decodedUsername=decodeURIComponent(super.username);this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}},75207:function(e,t,r){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;Object.defineProperty(e,a,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))a(t,e,r);n(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(a.next(e))}catch(e){n(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};var o;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.READONLY=t.UV_FS_O_EXLOCK=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rm=t.rename=t.readlink=t.readdir=t.open=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const c=i(r(79896));const l=i(r(16928));o=c.promises,t.chmod=o.chmod,t.copyFile=o.copyFile,t.lstat=o.lstat,t.mkdir=o.mkdir,t.open=o.open,t.readdir=o.readdir,t.readlink=o.readlink,t.rename=o.rename,t.rm=o.rm,t.rmdir=o.rmdir,t.stat=o.stat,t.symlink=o.symlink,t.unlink=o.unlink;t.IS_WINDOWS=process.platform==="win32";t.UV_FS_O_EXLOCK=268435456;t.READONLY=c.constants.O_RDONLY;function exists(e){return s(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,r=false){return s(this,void 0,void 0,(function*(){const a=r?yield t.stat(e):yield t.lstat(e);return a.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,r){return s(this,void 0,void 0,(function*(){let a=undefined;try{a=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(a&&a.isFile()){if(t.IS_WINDOWS){const t=l.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(a)){return e}}}const n=e;for(const i of r){e=n+i;a=undefined;try{a=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(a&&a.isFile()){if(t.IS_WINDOWS){try{const r=l.dirname(e);const a=l.basename(e).toUpperCase();for(const n of yield t.readdir(r)){if(a===n.toUpperCase()){e=l.join(r,n);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(a)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},94994:function(e,t,r){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;Object.defineProperty(e,a,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,a){if(a===undefined)a=r;e[a]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))a(t,e,r);n(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,a){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(a.next(e))}catch(e){n(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const o=r(42613);const c=i(r(16928));const l=i(r(75207));function cp(e,t,r={}){return s(this,void 0,void 0,(function*(){const{force:a,recursive:n,copySourceDirectory:i}=readCopyOptions(r);const s=(yield l.exists(t))?yield l.stat(t):null;if(s&&s.isFile()&&!a){return}const o=s&&s.isDirectory()&&i?c.join(t,c.basename(e)):t;if(!(yield l.exists(e))){throw new Error(`no such file or directory: ${e}`)}const u=yield l.stat(e);if(u.isDirectory()){if(!n){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,o,0,a)}}else{if(c.relative(e,o)===""){throw new Error(`'${o}' and '${e}' are the same file`)}yield copyFile(e,o,a)}}))}t.cp=cp;function mv(e,t,r={}){return s(this,void 0,void 0,(function*(){if(yield l.exists(t)){let a=true;if(yield l.isDirectory(t)){t=c.join(t,c.basename(e));a=yield l.exists(t)}if(a){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(c.dirname(t));yield l.rename(e,t)}))}t.mv=mv;function rmRF(e){return s(this,void 0,void 0,(function*(){if(l.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield l.rm(e,{force:true,maxRetries:3,recursive:true,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}}))}t.rmRF=rmRF;function mkdirP(e){return s(this,void 0,void 0,(function*(){o.ok(e,"a path argument must be provided");yield l.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(l.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return t}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}t.which=which;function findInPath(e){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(l.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(c.delimiter)){if(e){t.push(e)}}}if(l.isRooted(e)){const r=yield l.tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(c.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(c.delimiter)){if(e){r.push(e)}}}const a=[];for(const n of r){const r=yield l.tryGetExecutablePath(c.join(n,e),t);if(r){a.push(r)}}return a}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);const a=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:a}}function cpDirRecursive(e,t,r,a){return s(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const n=yield l.readdir(e);for(const i of n){const n=`${e}/${i}`;const s=`${t}/${i}`;const o=yield l.lstat(n);if(o.isDirectory()){yield cpDirRecursive(n,s,r,a)}else{yield copyFile(n,s,a)}}yield l.chmod(t,(yield l.stat(e)).mode)}))}function copyFile(e,t,r){return s(this,void 0,void 0,(function*(){if((yield l.lstat(e)).isSymbolicLink()){try{yield l.lstat(t);yield l.unlink(t)}catch(e){if(e.code==="EPERM"){yield l.chmod(t,"0666");yield l.unlink(t)}}const r=yield l.readlink(e);yield l.symlink(r,t,l.IS_WINDOWS?"junction":null)}else if(!(yield l.exists(t))||r){yield l.copyFile(e,t)}}))}},68110:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=new WeakMap;const a=new WeakMap;class AbortSignal{constructor(){this.onabort=null;r.set(this,[]);a.set(this,false)}get aborted(){if(!a.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}return a.get(this)}static get none(){return new AbortSignal}addEventListener(e,t){if(!r.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const a=r.get(this);a.push(t)}removeEventListener(e,t){if(!r.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const a=r.get(this);const n=a.indexOf(t);if(n>-1){a.splice(n,1)}}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function abortSignal(e){if(e.aborted){return}if(e.onabort){e.onabort.call(e)}const t=r.get(e);if(t){t.slice().forEach((t=>{t.call(e,{type:"abort"})}))}a.set(e,true)}class AbortError extends Error{constructor(e){super(e);this.name="AbortError"}}class AbortController{constructor(e){this._signal=new AbortSignal;if(!e){return}if(!Array.isArray(e)){e=arguments}for(const t of e){if(t.aborted){this.abort()}else{t.addEventListener("abort",(()=>{this.abort()}))}}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(e){const t=new AbortSignal;const r=setTimeout(abortSignal,e,t);if(typeof r.unref==="function"){r.unref()}return t}}t.AbortController=AbortController;t.AbortError=AbortError;t.AbortSignal=AbortSignal},1012:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var a=r(20778);var n=r(61860);var i=r(50417);var s=r(87779);var o=r(61584);var c=r(60160);var l=r(78756);var u=r(26515);var p=r(24517);var m=r(76982);var h=r(20623);var f=r(2203);var g=r(91754);var y=r(24434);var b=r(79896);var C=r(39023);var I=r(20181);function _interopNamespaceDefault(e){var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:true,get:function(){return e[r]}})}}))}t.default=e;return Object.freeze(t)}var w=_interopNamespaceDefault(o);var k=_interopNamespaceDefault(c);var x=_interopNamespaceDefault(b);var P=_interopNamespaceDefault(C);const j=u.createClientLogger("storage-blob");class BaseRequestPolicy{constructor(e,t){this._nextPolicy=e;this._options=t}shouldLog(e){return this._options.shouldLog(e)}log(e,t){this._options.log(e,t)}}const O="12.26.0";const z="2025-01-05";const q=256*1024*1024;const H=4e3*1024*1024;const V=5e4;const G=8*1024*1024;const Y=4*1024*1024;const W=5;const X=100*1e3;const ee="https://storage.azure.com/.default";const te={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};const re={HTTP_ACCEPTED:202,HTTP_CONFLICT:409,HTTP_NOT_FOUND:404,HTTP_PRECON_FAILED:412,HTTP_RANGE_NOT_SATISFIABLE:416};const ae={AUTHORIZATION:"Authorization",AUTHORIZATION_SCHEME:"Bearer",CONTENT_ENCODING:"Content-Encoding",CONTENT_ID:"Content-ID",CONTENT_LANGUAGE:"Content-Language",CONTENT_LENGTH:"Content-Length",CONTENT_MD5:"Content-Md5",CONTENT_TRANSFER_ENCODING:"Content-Transfer-Encoding",CONTENT_TYPE:"Content-Type",COOKIE:"Cookie",DATE:"date",IF_MATCH:"if-match",IF_MODIFIED_SINCE:"if-modified-since",IF_NONE_MATCH:"if-none-match",IF_UNMODIFIED_SINCE:"if-unmodified-since",PREFIX_FOR_STORAGE:"x-ms-",RANGE:"Range",USER_AGENT:"User-Agent",X_MS_CLIENT_REQUEST_ID:"x-ms-client-request-id",X_MS_COPY_SOURCE:"x-ms-copy-source",X_MS_DATE:"x-ms-date",X_MS_ERROR_CODE:"x-ms-error-code",X_MS_VERSION:"x-ms-version",X_MS_CopySourceErrorCode:"x-ms-copy-source-error-code"};const ne="";const ie="*";const se=1*1024*1024;const oe=256;const ce=4*se;const le="\r\n";const ue="HTTP/1.1";const Ae="AES256";const pe=`DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;const de=["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"];const me=["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"];const he="BlobUsesCustomerSpecifiedEncryption";const fe="BlobDoesNotUseCustomerSpecifiedEncryption";const ge=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function escapeURLPath(e){const t=new URL(e);let r=t.pathname;r=r||"/";r=escape(r);t.pathname=r;return t.toString()}function getProxyUriFromDevConnString(e){let t="";if(e.search("DevelopmentStorageProxyUri=")!==-1){const r=e.split(";");for(const e of r){if(e.trim().startsWith("DevelopmentStorageProxyUri=")){t=e.trim().match("DevelopmentStorageProxyUri=(.*)")[1]}}}return t}function getValueInConnString(e,t){const r=e.split(";");for(const e of r){if(e.trim().startsWith(t)){return e.trim().match(t+"=(.*)")[1]}}return""}function extractConnectionStringParts(e){let t="";if(e.startsWith("UseDevelopmentStorage=true")){t=getProxyUriFromDevConnString(e);e=pe}let r=getValueInConnString(e,"BlobEndpoint");r=r.endsWith("/")?r.slice(0,-1):r;if(e.search("DefaultEndpointsProtocol=")!==-1&&e.search("AccountKey=")!==-1){let a="";let n="";let i=Buffer.from("accountKey","base64");let s="";n=getValueInConnString(e,"AccountName");i=Buffer.from(getValueInConnString(e,"AccountKey"),"base64");if(!r){a=getValueInConnString(e,"DefaultEndpointsProtocol");const t=a.toLowerCase();if(t!=="https"&&t!=="http"){throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'")}s=getValueInConnString(e,"EndpointSuffix");if(!s){throw new Error("Invalid EndpointSuffix in the provided Connection String")}r=`${a}://${n}.blob.${s}`}if(!n){throw new Error("Invalid AccountName in the provided Connection String")}else if(i.length===0){throw new Error("Invalid AccountKey in the provided Connection String")}return{kind:"AccountConnString",url:r,accountName:n,accountKey:i,proxyUri:t}}else{let t=getValueInConnString(e,"SharedAccessSignature");let a=getValueInConnString(e,"AccountName");if(!a){a=getAccountNameFromUrl(r)}if(!r){throw new Error("Invalid BlobEndpoint in the provided SAS Connection String")}else if(!t){throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}if(t.startsWith("?")){t=t.substring(1)}return{kind:"SASConnString",url:r,accountName:a,accountSas:t}}}function escape(e){return encodeURIComponent(e).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}function appendToURLPath(e,t){const r=new URL(e);let a=r.pathname;a=a?a.endsWith("/")?`${a}${t}`:`${a}/${t}`:t;r.pathname=a;return r.toString()}function setURLParameter(e,t,r){const a=new URL(e);const n=encodeURIComponent(t);const i=r?encodeURIComponent(r):undefined;const s=a.search===""?"?":a.search;const o=[];for(const e of s.slice(1).split("&")){if(e){const[t]=e.split("=",2);if(t!==n){o.push(e)}}}if(i){o.push(`${n}=${i}`)}a.search=o.length?`?${o.join("&")}`:"";return a.toString()}function getURLParameter(e,t){var r;const a=new URL(e);return(r=a.searchParams.get(t))!==null&&r!==void 0?r:undefined}function setURLHost(e,t){const r=new URL(e);r.hostname=t;return r.toString()}function getURLPath(e){try{const t=new URL(e);return t.pathname}catch(e){return undefined}}function getURLScheme(e){try{const t=new URL(e);return t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol}catch(e){return undefined}}function getURLPathAndQuery(e){const t=new URL(e);const r=t.pathname;if(!r){throw new RangeError("Invalid url without valid path.")}let a=t.search||"";a=a.trim();if(a!==""){a=a.startsWith("?")?a:`?${a}`}return`${r}${a}`}function getURLQueries(e){let t=new URL(e).search;if(!t){return{}}t=t.trim();t=t.startsWith("?")?t.substring(1):t;let r=t.split("&");r=r.filter((e=>{const t=e.indexOf("=");const r=e.lastIndexOf("=");return t>0&&t===r&&r{clearTimeout(c);o(e)}))}))}async function streamToBuffer2(e,t,r){let a=0;const n=t.length;return new Promise(((i,s)=>{e.on("readable",(()=>{let i=e.read();if(!i){return}if(typeof i==="string"){i=Buffer.from(i,r)}if(a+i.length>n){s(new Error(`Stream exceeds buffer size. Buffer size: ${n}`));return}t.fill(i,a,a+i.length);a+=i.length}));e.on("end",(()=>{i(a)}));e.on("error",s)}))}async function readStreamToLocalFile(e,t){return new Promise(((r,a)=>{const n=x.createWriteStream(t);e.on("error",(e=>{a(e)}));n.on("error",(e=>{a(e)}));n.on("close",r);e.pipe(n)}))}const vc=P.promisify(x.stat);const Cc=x.createReadStream;class BlobClient extends StorageClient{get name(){return this._name}get containerName(){return this._containerName}constructor(e,t,r,n){n=n||{};let o;let c;if(isPipelineLike(t)){c=e;o=t}else if(s.isNode&&t instanceof StorageSharedKeyCredential||t instanceof AnonymousCredential||i.isTokenCredential(t)){c=e;n=r;o=newPipeline(t,n)}else if(!t&&typeof t!=="string"){c=e;if(r&&typeof r!=="string"){n=r}o=newPipeline(new AnonymousCredential,n)}else if(t&&typeof t==="string"&&r&&typeof r==="string"){const i=t;const l=r;const u=extractConnectionStringParts(e);if(u.kind==="AccountConnString"){if(s.isNode){const e=new StorageSharedKeyCredential(u.accountName,u.accountKey);c=appendToURLPath(appendToURLPath(u.url,encodeURIComponent(i)),encodeURIComponent(l));if(!n.proxyOptions){n.proxyOptions=a.getDefaultProxySettings(u.proxyUri)}o=newPipeline(e,n)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(u.kind==="SASConnString"){c=appendToURLPath(appendToURLPath(u.url,encodeURIComponent(i)),encodeURIComponent(l))+"?"+u.accountSas;o=newPipeline(new AnonymousCredential,n)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}super(c,o);({blobName:this._name,containerName:this._containerName}=this.getBlobAndContainerNamesFromUrl());this.blobContext=this.storageClientContext.blob;this._snapshot=getURLParameter(this.url,te.Parameters.SNAPSHOT);this._versionId=getURLParameter(this.url,te.Parameters.VERSIONID)}withSnapshot(e){return new BlobClient(setURLParameter(this.url,te.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)}withVersion(e){return new BlobClient(setURLParameter(this.url,te.Parameters.VERSIONID,e.length===0?undefined:e),this.pipeline)}getAppendBlobClient(){return new AppendBlobClient(this.url,this.pipeline)}getBlockBlobClient(){return new BlockBlobClient(this.url,this.pipeline)}getPageBlobClient(){return new PageBlobClient(this.url,this.pipeline)}async download(e=0,t,r={}){r.conditions=r.conditions||{};r.conditions=r.conditions||{};ensureCpkIfSpecified(r.customerProvidedKey,this.isHttps);return cc.withSpan("BlobClient-download",r,(async a=>{var n;const i=assertResponse(await this.blobContext.download({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),requestOptions:{onDownloadProgress:s.isNode?undefined:r.onProgress},range:e===0&&!t?undefined:rangeToString({offset:e,count:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey,tracingOptions:a.tracingOptions}));const o=Object.assign(Object.assign({},i),{_response:i._response,objectReplicationDestinationPolicyId:i.objectReplicationPolicyId,objectReplicationSourceProperties:parseObjectReplicationRecord(i.objectReplicationRules)});if(!s.isNode){return o}if(r.maxRetryRequests===undefined||r.maxRetryRequests<0){r.maxRetryRequests=W}if(i.contentLength===undefined){throw new RangeError(`File download response doesn't contain valid content length header`)}if(!i.etag){throw new RangeError(`File download response doesn't contain valid etag header`)}return new BlobDownloadResponse(o,(async t=>{var a;const n={leaseAccessConditions:r.conditions,modifiedAccessConditions:{ifMatch:r.conditions.ifMatch||i.etag,ifModifiedSince:r.conditions.ifModifiedSince,ifNoneMatch:r.conditions.ifNoneMatch,ifUnmodifiedSince:r.conditions.ifUnmodifiedSince,ifTags:(a=r.conditions)===null||a===void 0?void 0:a.tagConditions},range:rangeToString({count:e+i.contentLength-t,offset:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey};return(await this.blobContext.download(Object.assign({abortSignal:r.abortSignal},n))).readableStreamBody}),e,i.contentLength,{maxRetryRequests:r.maxRetryRequests,onProgress:r.onProgress})}))}async exists(e={}){return cc.withSpan("BlobClient-exists",e,(async t=>{try{ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);await this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:t.tracingOptions});return true}catch(e){if(e.statusCode===404){return false}else if(e.statusCode===409&&(e.details.errorCode===he||e.details.errorCode===fe)){return true}throw e}}))}async getProperties(e={}){e.conditions=e.conditions||{};ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);return cc.withSpan("BlobClient-getProperties",e,(async t=>{var r;const a=assertResponse(await this.blobContext.getProperties({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(r=e.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:e.customerProvidedKey,tracingOptions:t.tracingOptions}));return Object.assign(Object.assign({},a),{_response:a._response,objectReplicationDestinationPolicyId:a.objectReplicationPolicyId,objectReplicationSourceProperties:parseObjectReplicationRecord(a.objectReplicationRules)})}))}async delete(e={}){e.conditions=e.conditions||{};return cc.withSpan("BlobClient-delete",e,(async t=>{var r;return assertResponse(await this.blobContext.delete({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(r=e.conditions)===null||r===void 0?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}))}))}async deleteIfExists(e={}){return cc.withSpan("BlobClient-deleteIfExists",e,(async e=>{var t,r;try{const t=assertResponse(await this.delete(e));return Object.assign(Object.assign({succeeded:true},t),{_response:t._response})}catch(e){if(((t=e.details)===null||t===void 0?void 0:t.errorCode)==="BlobNotFound"){return Object.assign(Object.assign({succeeded:false},(r=e.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:e.response})}throw e}}))}async undelete(e={}){return cc.withSpan("BlobClient-undelete",e,(async t=>assertResponse(await this.blobContext.undelete({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}))))}async setHTTPHeaders(e,t={}){t.conditions=t.conditions||{};ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return cc.withSpan("BlobClient-setHTTPHeaders",t,(async r=>{var a;return assertResponse(await this.blobContext.setHttpHeaders({abortSignal:t.abortSignal,blobHttpHeaders:e,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(a=t.conditions)===null||a===void 0?void 0:a.tagConditions}),tracingOptions:r.tracingOptions}))}))}async setMetadata(e,t={}){t.conditions=t.conditions||{};ensureCpkIfSpecified(t.customerProvidedKey,this.isHttps);return cc.withSpan("BlobClient-setMetadata",t,(async r=>{var a;return assertResponse(await this.blobContext.setMetadata({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(a=t.conditions)===null||a===void 0?void 0:a.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,tracingOptions:r.tracingOptions}))}))}async setTags(e,t={}){return cc.withSpan("BlobClient-setTags",t,(async r=>{var a;return assertResponse(await this.blobContext.setTags({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(a=t.conditions)===null||a===void 0?void 0:a.tagConditions}),tracingOptions:r.tracingOptions,tags:toBlobTags(e)}))}))}async getTags(e={}){return cc.withSpan("BlobClient-getTags",e,(async t=>{var r;const a=assertResponse(await this.blobContext.getTags({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(r=e.conditions)===null||r===void 0?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}));const n=Object.assign(Object.assign({},a),{_response:a._response,tags:toTags({blobTagSet:a.blobTagSet})||{}});return n}))}getBlobLeaseClient(e){return new BlobLeaseClient(this,e)}async createSnapshot(e={}){e.conditions=e.conditions||{};ensureCpkIfSpecified(e.customerProvidedKey,this.isHttps);return cc.withSpan("BlobClient-createSnapshot",e,(async t=>{var r;return assertResponse(await this.blobContext.createSnapshot({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(r=e.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,tracingOptions:t.tracingOptions}))}))}async beginCopyFromURL(e,t={}){const r={abortCopyFromURL:(...e)=>this.abortCopyFromURL(...e),getProperties:(...e)=>this.getProperties(...e),startCopyFromURL:(...e)=>this.startCopyFromURL(...e)};const a=new BlobBeginCopyFromUrlPoller({blobClient:r,copySource:e,intervalInMs:t.intervalInMs,onProgress:t.onProgress,resumeFrom:t.resumeFrom,startCopyFromURLOptions:t});await a.poll();return a}async abortCopyFromURL(e,t={}){return cc.withSpan("BlobClient-abortCopyFromURL",t,(async r=>assertResponse(await this.blobContext.abortCopyFromURL(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,tracingOptions:r.tracingOptions}))))}async syncCopyFromURL(e,t={}){t.conditions=t.conditions||{};t.sourceConditions=t.sourceConditions||{};return cc.withSpan("BlobClient-syncCopyFromURL",t,(async r=>{var a,n,i,s,o,c,l;return assertResponse(await this.blobContext.copyFromURL(e,{abortSignal:t.abortSignal,metadata:t.metadata,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(a=t.conditions)===null||a===void 0?void 0:a.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:(n=t.sourceConditions)===null||n===void 0?void 0:n.ifMatch,sourceIfModifiedSince:(i=t.sourceConditions)===null||i===void 0?void 0:i.ifModifiedSince,sourceIfNoneMatch:(s=t.sourceConditions)===null||s===void 0?void 0:s.ifNoneMatch,sourceIfUnmodifiedSince:(o=t.sourceConditions)===null||o===void 0?void 0:o.ifUnmodifiedSince},sourceContentMD5:t.sourceContentMD5,copySourceAuthorization:httpAuthorizationToString(t.sourceAuthorization),tier:toAccessTier(t.tier),blobTagsString:toBlobTagsString(t.tags),immutabilityPolicyExpiry:(c=t.immutabilityPolicy)===null||c===void 0?void 0:c.expiriesOn,immutabilityPolicyMode:(l=t.immutabilityPolicy)===null||l===void 0?void 0:l.policyMode,legalHold:t.legalHold,encryptionScope:t.encryptionScope,copySourceTags:t.copySourceTags,tracingOptions:r.tracingOptions}))}))}async setAccessTier(e,t={}){return cc.withSpan("BlobClient-setAccessTier",t,(async r=>{var a;return assertResponse(await this.blobContext.setTier(toAccessTier(e),{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(a=t.conditions)===null||a===void 0?void 0:a.tagConditions}),rehydratePriority:t.rehydratePriority,tracingOptions:r.tracingOptions}))}))}async downloadToBuffer(e,t,r,a={}){var n;let i;let s=0;let o=0;let c=a;if(e instanceof Buffer){i=e;s=t||0;o=typeof r==="number"?r:0}else{s=typeof e==="number"?e:0;o=typeof t==="number"?t:0;c=r||{}}let l=(n=c.blockSize)!==null&&n!==void 0?n:0;if(l<0){throw new RangeError("blockSize option must be >= 0")}if(l===0){l=Y}if(s<0){throw new RangeError("offset option must be >= 0")}if(o&&o<=0){throw new RangeError("count option must be greater than 0")}if(!c.conditions){c.conditions={}}return cc.withSpan("BlobClient-downloadToBuffer",c,(async e=>{if(!o){const t=await this.getProperties(Object.assign(Object.assign({},c),{tracingOptions:e.tracingOptions}));o=t.contentLength-s;if(o<0){throw new RangeError(`offset ${s} shouldn't be larger than blob size ${t.contentLength}`)}}if(!i){try{i=Buffer.alloc(o)}catch(e){throw new Error(`Unable to allocate the buffer of size: ${o}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${e.message}`)}}if(i.lengthn||e<0)throw new Error("invalid uint 32: "+e)}t.assertUInt32=assertUInt32;function assertFloat32(e){if(typeof e!=="number")throw new Error("invalid float 32: "+typeof e);if(!Number.isFinite(e))return;if(e>r||e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.base64encode=t.base64decode=void 0;let r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");let a=[];for(let e=0;e191&&i<224)a[n++]=(i&31)<<6|e[t++]&63;else if(i>239&&i<365){i=((i&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536;a[n++]=55296+(i>>10);a[n++]=56320+(i&1023)}else a[n++]=(i&15)<<12|(e[t++]&63)<<6|e[t++]&63;if(n>8191){r.push(fromCharCodes(a));n=0}}if(r.length){if(n)r.push(fromCharCodes(a.slice(0,n)));return r.join("")}return fromCharCodes(a.slice(0,n))}t.utf8read=utf8read},89611:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ReflectionBinaryReader=void 0;const a=r(54816);const n=r(67910);const i=r(63402);const s=r(19526);class ReflectionBinaryReader{constructor(e){this.info=e}prepare(){var e;if(!this.fieldNoToField){const t=(e=this.info.fields)!==null&&e!==void 0?e:[];this.fieldNoToField=new Map(t.map((e=>[e.no,e])))}}read(e,t,r,i){this.prepare();const s=i===undefined?e.len:e.pos+i;while(e.pos{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ReflectionBinaryWriter=void 0;const a=r(54816);const n=r(67910);const i=r(8602);const s=r(61753);class ReflectionBinaryWriter{constructor(e){this.info=e}prepare(){if(!this.fields){const e=this.info.fields?this.info.fields.concat():[];this.fields=e.sort(((e,t)=>e.no-t.no))}}write(e,t,r){this.prepare();for(const a of this.fields){let s,o,c=a.repeat,l=a.localName;if(a.oneof){const t=e[a.oneof];if(t.oneofKind!==l)continue;s=t[l];o=true}else{s=e[l];o=false}switch(a.kind){case"scalar":case"enum":let e=a.kind=="enum"?n.ScalarType.INT32:a.T;if(c){i.assert(Array.isArray(s));if(c==n.RepeatType.PACKED)this.packed(t,e,a.no,s);else for(const r of s)this.scalar(t,e,a.no,r,true)}else if(s===undefined)i.assert(a.opt);else this.scalar(t,e,a.no,s,o||a.opt);break;case"message":if(c){i.assert(Array.isArray(s));for(const e of s)this.message(t,r,a.T(),a.no,e)}else{this.message(t,r,a.T(),a.no,s)}break;case"map":i.assert(typeof s=="object"&&s!==null);for(const[e,n]of Object.entries(s))this.mapEntry(t,r,a,e,n);break}}let s=r.writeUnknownFields;if(s!==false)(s===true?a.UnknownFieldHandler.onWrite:s)(this.info.typeName,e,t)}mapEntry(e,t,r,s,o){e.tag(r.no,a.WireType.LengthDelimited);e.fork();let c=s;switch(r.K){case n.ScalarType.INT32:case n.ScalarType.FIXED32:case n.ScalarType.UINT32:case n.ScalarType.SFIXED32:case n.ScalarType.SINT32:c=Number.parseInt(s);break;case n.ScalarType.BOOL:i.assert(s=="true"||s=="false");c=s=="true";break}this.scalar(e,r.K,1,c,true);switch(r.V.kind){case"scalar":this.scalar(e,r.V.T,2,o,true);break;case"enum":this.scalar(e,n.ScalarType.INT32,2,o,true);break;case"message":this.message(e,t,r.V.T(),2,o);break}e.join()}message(e,t,r,n,i){if(i===undefined)return;r.internalBinaryWrite(i,e.tag(n,a.WireType.LengthDelimited).fork(),t);e.join()}scalar(e,t,r,a,n){let[i,s,o]=this.scalarInfo(t,a);if(!o||n){e.tag(r,i);e[s](a)}}packed(e,t,r,s){if(!s.length)return;i.assert(t!==n.ScalarType.BYTES&&t!==n.ScalarType.STRING);e.tag(r,a.WireType.LengthDelimited);e.fork();let[,o]=this.scalarInfo(t);for(let t=0;t0||O===false:e.util.schemaHasRules(O,e.RULES.all)){a+=" "+g+" = true; if ("+u+".length > "+z+") { ";var H=u+"["+z+"]";h.schema=O;h.schemaPath=o+"["+z+"]";h.errSchemaPath=c+"/"+z;h.errorPath=e.util.getPathExpr(e.errorPath,z,e.opts.jsonPointers,true);h.dataPathArr[b]=z;var V=e.validate(h);h.baseId=I;if(e.util.varOccurences(V,C)<2){a+=" "+e.util.varReplace(V,C,H)+" "}else{a+=" var "+C+" = "+H+"; "+V+" "}a+=" } ";if(l){a+=" if ("+g+") { ";f+="}"}}}}if(typeof w=="object"&&(e.opts.strictKeywords?typeof w=="object"&&Object.keys(w).length>0||w===false:e.util.schemaHasRules(w,e.RULES.all))){h.schema=w;h.schemaPath=e.schemaPath+".additionalItems";h.errSchemaPath=e.errSchemaPath+"/additionalItems";a+=" "+g+" = true; if ("+u+".length > "+s.length+") { for (var "+y+" = "+s.length+"; "+y+" < "+u+".length; "+y+"++) { ";h.errorPath=e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers,true);var H=u+"["+y+"]";h.dataPathArr[b]=y;var V=e.validate(h);h.baseId=I;if(e.util.varOccurences(V,C)<2){a+=" "+e.util.varReplace(V,C,H)+" "}else{a+=" var "+C+" = "+H+"; "+V+" "}if(l){a+=" if (!"+g+") break; "}a+=" } } ";if(l){a+=" if ("+g+") { ";f+="}"}}}else if(e.opts.strictKeywords?typeof s=="object"&&Object.keys(s).length>0||s===false:e.util.schemaHasRules(s,e.RULES.all)){h.schema=s;h.schemaPath=o;h.errSchemaPath=c;a+=" for (var "+y+" = "+0+"; "+y+" < "+u+".length; "+y+"++) { ";h.errorPath=e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers,true);var H=u+"["+y+"]";h.dataPathArr[b]=y;var V=e.validate(h);h.baseId=I;if(e.util.varOccurences(V,C)<2){a+=" "+e.util.varReplace(V,C,H)+" "}else{a+=" var "+C+" = "+H+"; "+V+" "}if(l){a+=" if (!"+g+") break; "}a+=" }"}if(l){a+=" "+f+" if ("+m+" == errors) {"}return a}},49019:e=>{"use strict";e.exports=function generate_multipleOf(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var s=e.schema[t];var o=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var u="data"+(i||"");var p=e.opts.$data&&s&&s.$data,m;if(p){a+=" var schema"+n+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ";m="schema"+n}else{m=s}if(!(p||typeof s=="number")){throw new Error(t+" must be number")}a+="var division"+n+";if (";if(p){a+=" "+m+" !== undefined && ( typeof "+m+" != 'number' || "}a+=" (division"+n+" = "+u+" / "+m+", ";if(e.opts.multipleOfPrecision){a+=" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+e.opts.multipleOfPrecision+" "}else{a+=" division"+n+" !== parseInt(division"+n+") "}a+=" ) ";if(p){a+=" ) "}a+=" ) { ";var h=h||[];h.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+m+" } ";if(e.opts.messages!==false){a+=" , message: 'should be multiple of ";if(p){a+="' + "+m}else{a+=""+m+"'"}}if(e.opts.verbose){a+=" , schema: ";if(p){a+="validate.schema"+o}else{a+=""+s}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var f=a;a=h.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+f+"]); "}else{a+=" validate.errors = ["+f+"]; return false; "}}else{a+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(l){a+=" else { "}return a}},60589:e=>{"use strict";e.exports=function generate_not(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var s=e.schema[t];var o=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var u="data"+(i||"");var p="errs__"+n;var m=e.util.copy(e);m.level++;var h="valid"+m.level;if(e.opts.strictKeywords?typeof s=="object"&&Object.keys(s).length>0||s===false:e.util.schemaHasRules(s,e.RULES.all)){m.schema=s;m.schemaPath=o;m.errSchemaPath=c;a+=" var "+p+" = errors; ";var f=e.compositeRule;e.compositeRule=m.compositeRule=true;m.createErrors=false;var g;if(m.opts.allErrors){g=m.opts.allErrors;m.opts.allErrors=false}a+=" "+e.validate(m)+" ";m.createErrors=true;if(g)m.opts.allErrors=g;e.compositeRule=m.compositeRule=f;a+=" if ("+h+") { ";var y=y||[];y.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'should NOT be valid' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var b=a;a=y.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+b+"]); "}else{a+=" validate.errors = ["+b+"]; return false; "}}else{a+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ";if(e.opts.allErrors){a+=" } "}}else{a+=" var err = ";if(e.createErrors!==false){a+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'should NOT be valid' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(l){a+=" if (false) { "}}return a}},75365:e=>{"use strict";e.exports=function generate_oneOf(e,t,r){var a=" ";var n=e.level;var i=e.dataLevel;var s=e.schema[t];var o=e.schemaPath+e.util.getProperty(t);var c=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var u="data"+(i||"");var p="valid"+n;var m="errs__"+n;var h=e.util.copy(e);var f="";h.level++;var g="valid"+h.level;var y=h.baseId,b="prevValid"+n,C="passingSchemas"+n;a+="var "+m+" = errors , "+b+" = false , "+p+" = false , "+C+" = null; ";var I=e.compositeRule;e.compositeRule=h.compositeRule=true;var w=s;if(w){var k,x=-1,P=w.length-1;while(x