diff --git a/README.md b/README.md index 54eddb7..74d0938 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Below is a summary of the actions in the library and a short description of what | [`generate-tag`](generate-tag/action.yml) | Generate unique tags for artifacts | `node24` | ✅ | | [`parse-config`](parse-config/action.yml) | Parse and validate a JSON configuration and expose the configuration as separate outputs | `node24` | ✅ | | [`slack-notify`](slack-notify/action.yml) | Send notifications to Slack | `node24` | ❌ | -| [`trigger-deployment-pipeline`](trigger-deployment-pipeline/action.yml) | Trigger Liflig CDK Pipelines in AWS | `composite` | ✅ | +| [`trigger-deployment-pipeline`](trigger-deployment-pipeline/action.yml) | Trigger Liflig CDK Pipelines in AWS | `node24` | ✅ | | [`upload-cdk-source`](upload-cdk-source/action.yml) | Create and upload an archive of the CDK source to use during deployment of a Liflig CDK Pipeline | `node24` | ✅ | | [`upload-cloud-assembly`](upload-cloud-assembly/action.yml) | Create and upload an archive of the CDK source to use during deployment of a Liflig CDK Pipeline | `node24` | ✅ | | [`upload-s3-artifact`](upload-s3-artifact/action.yml) | Upload a file or directory to S3 | `node24` | ✅ | diff --git a/bun.lock b/bun.lock index a1132f9..812323f 100644 --- a/bun.lock +++ b/bun.lock @@ -5,6 +5,7 @@ "": { "dependencies": { "@aws-sdk/client-s3": "3.1127.0", + "@aws-sdk/client-ssm": "3.1127.0", "@aws-sdk/lib-storage": "3.1127.0", "fflate": "0.8.3", }, @@ -36,6 +37,8 @@ "@aws-sdk/client-s3": ["@aws-sdk/client-s3@3.1127.0", "", { "dependencies": { "@aws-sdk/checksums": "^3.1000.29", "@aws-sdk/core": "^3.977.9", "@aws-sdk/credential-provider-node": "^3.972.82", "@aws-sdk/middleware-sdk-s3": "^3.972.75", "@aws-sdk/signature-v4-multi-region": "^3.996.46", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/fetch-http-handler": "^5.7.2", "@smithy/node-http-handler": "^4.11.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-0ZSAgmEda33xPqVPt+bx2KzrXV1cUCKRRVPGliLu+V7DzHPa04CqPSi1maGEM4O0LDP0iI6HRSW5ULloNwayNw=="], + "@aws-sdk/client-ssm": ["@aws-sdk/client-ssm@3.1127.0", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/credential-provider-node": "^3.972.82", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/fetch-http-handler": "^5.7.2", "@smithy/node-http-handler": "^4.11.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-EVjNFjN68RiOv8vLEjkQ22g3PPFwI6JiuRhkWmD+xHVVmWlcgUr9DMueU6fRwql53CJu9Gl6h4EByzsyXKfgrw=="], + "@aws-sdk/core": ["@aws-sdk/core@3.977.9", "", { "dependencies": { "@aws-sdk/types": "^3.974.5", "@aws-sdk/xml-builder": "^3.972.40", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.33.3", "@smithy/signature-v4": "^5.6.12", "@smithy/types": "^4.17.2", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-reqPFEQrZxDZpeGj4PFMepBeR5LGYHRqq/L0motTzgFkCRBA4rFdaVXDSLYyGHhxVz7sT2PDnPN9CluGSfgyJA=="], "@aws-sdk/credential-provider-env": ["@aws-sdk/credential-provider-env@3.972.70", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-H404B7dJl2mCrBqahDEYsanB0xhdDp6tXnXcTUnXmmpy2Q3J0Ho0bUajZ2jr/RdwzCyS59Gi8xXIFwPLGBl6Uw=="], diff --git a/lib/aws.ts b/lib/aws.ts index 4798d59..2acbd94 100644 --- a/lib/aws.ts +++ b/lib/aws.ts @@ -1,4 +1,5 @@ import { S3Client } from "@aws-sdk/client-s3" +import { PutParameterCommand, SSMClient } from "@aws-sdk/client-ssm" import { Upload } from "@aws-sdk/lib-storage" /** @@ -40,3 +41,10 @@ export async function putObject( const result = await upload.done() return result.VersionId } + +/** Writes a plain string parameter, replacing any value already there. */ +export async function putParameter(name: string, value: string): Promise { + await new SSMClient({}).send( + new PutParameterCommand({ Name: name, Value: value, Type: "String", Overwrite: true }), + ) +} diff --git a/package.json b/package.json index e465279..95d1e39 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ }, "dependencies": { "@aws-sdk/client-s3": "3.1127.0", + "@aws-sdk/client-ssm": "3.1127.0", "@aws-sdk/lib-storage": "3.1127.0", "fflate": "0.8.3" } diff --git a/trigger-deployment-pipeline/action.sh b/trigger-deployment-pipeline/action.sh deleted file mode 100755 index 9f0295e..0000000 --- a/trigger-deployment-pipeline/action.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -IFS=$'\n\t' - -parse_args() { - INPUT_AWS_S3_BUCKET_NAME="" - INPUT_PIPELINES="" - INPUT_CDK_SOURCE_METADATA_FILE="" - INPUT_ARTIFACT_PARAMETERS="" - INPUT_CLOUD_ASSEMBLY_METADATA_FILE="" - INPUT_TRIGGER_TYPE="" - while [ "$#" -gt 0 ]; do - case "$1" in - --aws-s3-bucket-name) INPUT_AWS_S3_BUCKET_NAME="$2"; shift; shift ;; - --pipelines) INPUT_PIPELINES="$2"; shift; shift ;; - --cdk-source-metadata-file) INPUT_CDK_SOURCE_METADATA_FILE="$2"; shift; shift ;; - --cloud-assembly-metadata-file) INPUT_CLOUD_ASSEMBLY_METADATA_FILE="$2"; shift; shift ;; - --artifact-parameters) INPUT_ARTIFACT_PARAMETERS="$2"; shift; shift ;; - --trigger-type) INPUT_TRIGGER_TYPE="$2"; shift; shift ;; - *) echo "Unknown option '$1'"; exit 1 ;; - esac - done - if [ "$INPUT_AWS_S3_BUCKET_NAME" = "" ]; then - echo "Parameter 'aws-s3-bucket-name' is empty"; exit 1 - fi - if [ "$INPUT_PIPELINES" = "" ]; then - echo "Parameter 'pipelines' is empty"; exit 1 - fi - if [ "$INPUT_TRIGGER_TYPE" = "" ]; then - echo "Parameter 'trigger-type' is empty"; exit 1 - fi - if [ "$INPUT_TRIGGER_TYPE" = "cdk-source" ]; then - if [ "$INPUT_CDK_SOURCE_METADATA_FILE" = "" ]; then - echo "Parameter 'cdk-source-metadata-file' must be set when parameter 'trigger-type' is 'cdk-source'"; exit 1 - elif [ ! -f "$INPUT_CDK_SOURCE_METADATA_FILE" ]; then - echo "File '$INPUT_CDK_SOURCE_METADATA_FILE' describing the CDK source does not exist"; exit 1 - fi - fi - if [ "$INPUT_TRIGGER_TYPE" = "cloud-assembly" ]; then - if [ "$INPUT_CLOUD_ASSEMBLY_METADATA_FILE" = "" ]; then - echo "Parameter 'cloud-assembly-metadata-file' must be set when parameter 'trigger-type' is 'cloud-assembly'"; exit 1 - elif [ ! -f "$INPUT_CLOUD_ASSEMBLY_METADATA_FILE" ]; then - echo "File '$INPUT_CLOUD_ASSEMBLY_METADATA_FILE' describing the Cloud Assembly does not exist"; exit 1 - fi - fi - if [ "$INPUT_TRIGGER_TYPE" = "artifact" ] && [ "$INPUT_ARTIFACT_PARAMETERS" = "" ]; then - echo "Parameter 'artifact-parameters' must be set when parameter 'trigger-type' is 'artifact'"; exit 1 - fi - readonly INPUT_AWS_S3_BUCKET_NAME INPUT_PIPELINES INPUT_CDK_SOURCE_METADATA_FILE INPUT_ARTIFACT_PARAMETERS INPUT_CLOUD_ASSEMBLY_METADATA_FILE - export INPUT_AWS_S3_BUCKET_NAME INPUT_PIPELINES INPUT_CDK_SOURCE_METADATA_FILE INPUT_ARTIFACT_PARAMETERS INPUT_CLOUD_ASSEMBLY_METADATA_FILE -} - -create_trigger_file() { - local trigger_file="$1" - if [ "${GITHUB_ACTIONS:-false}" = "true" ]; then - ci_trigger_type="GITHUB_ACTIONS" - ci_triggered_by="$GITHUB_ACTOR" - vcs_commit_author="$(git show -s --format="%an")" - vcs_branch_name="${GITHUB_REF#refs/heads/}" - vcs_commit_hash="$GITHUB_SHA" - vcs_repository_owner="$(echo "$GITHUB_REPOSITORY" | cut -d"/" -f1)" - vcs_repository_name="$(echo "$GITHUB_REPOSITORY" | cut -d"/" -f2-)" - - if ! github_actions_run="$(curl -L \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $GITHUB_TOKEN" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - --fail \ - --silent \ - --show-error \ - "https://api.github.com/repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" - )"; then - echo "Failed to fetch timing information for the current GitHub Actions workflow run" >&2 - exit 1 - fi - ci_start_time="$(echo "$github_actions_run" | jq --exit-status --raw-output ".created_at")" - # A quick check to see that what we parsed from the the GitHub API response looks likes a date - echo "$ci_start_time" | grep -q "^[0-9]\{4,\}-.*$" - # NOTE: Since we use the same trigger file for all pipelines, the stop time - # will not be entirely accurate, but will likely only be off by a second or two. - ci_stop_time="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" - else - ci_trigger_type="LOCAL" - ci_triggered_by="$(whoami)@$(hostname)" - vcs_commit_author="$(git show -s --format="%an")" - vcs_branch_name="$(git rev-parse --abbrev-ref HEAD)" - vcs_commit_hash="$(git show -s --format="%H")" - # NOTE: Extract details from GitHub remote - vcs_repository_owner="$(git config --get "remote.origin.url" | sed -n "s/^.*github.com[\/:]\(.*\)\/\(.*\)\(\.git\)\{0,1\}$/\1/p")" - vcs_repository_name="$(git config --get "remote.origin.url" | sed -n "s/^.*github.com[\/:]\(.*\)\/\(.*\)\(\.git\)\{0,1\}$/\2/p")" - fi - - cat < "$trigger_file" -{ - "version": "0.1", - "ci": { - "type": "$ci_trigger_type", - "triggeredBy": "$ci_triggered_by", - "startTime": "${ci_start_time:-}", - "stopTime": "${ci_stop_time:-}" - }, - "vcs": { - "commitAuthor": "$vcs_commit_author", - "branchName": "$vcs_branch_name", - "commitHash": "$vcs_commit_hash", - "repositoryName": "$vcs_repository_name", - "repositoryOwner": "$vcs_repository_owner" - } -} -EOF - printf "Contents of trigger file '%s':\n%s\n" "$trigger_file" "$(cat "$trigger_file")" -} - -main() { - parse_args "$@" - tmp_path="/tmp/trigger-deployment-pipeline-$(date +%s)" - mkdir -p "$tmp_path" - pipeline_trigger_filename="trigger" - pipeline_trigger_path="$tmp_path/$pipeline_trigger_filename" - cdk_source_metadata_filename="cdk-source.json" - cloud_assembly_filename="cloud-assembly.json" - artifact_parameter_namespace="/liflig-cdk/default/pipeline-variables" - - create_trigger_file "$pipeline_trigger_path" - - # Store references to artifacts in SSM - if [ "$INPUT_TRIGGER_TYPE" = "artifact" ]; then - echo "$INPUT_ARTIFACT_PARAMETERS" | tr ' ' '\n' | while read -r parameter; do - parameter_name="$(echo "$parameter" | cut -d '=' -f1)" - parameter_value="$(echo "$parameter" | cut -d '=' -f2)" - aws ssm put-parameter \ - --name "$artifact_parameter_namespace/$parameter_name" \ - --value "$parameter_value" \ - --type String \ - --overwrite - done - fi - - # Upload 1) CDK source or Cloud Assembly metadata file and 2) pipeline trigger file - echo "$INPUT_PIPELINES" | tr ' ' '\n' | while read -r pipeline_name; do - if [ "$INPUT_TRIGGER_TYPE" = "cdk-source" ]; then - aws s3 cp "$INPUT_CDK_SOURCE_METADATA_FILE" "s3://$INPUT_AWS_S3_BUCKET_NAME/pipelines/$pipeline_name/$cdk_source_metadata_filename" - elif [ "$INPUT_TRIGGER_TYPE" = "cloud-assembly" ]; then - aws s3 cp "$INPUT_CLOUD_ASSEMBLY_METADATA_FILE" "s3://$INPUT_AWS_S3_BUCKET_NAME/pipelines/$pipeline_name/$cloud_assembly_filename" - fi - aws s3 cp "$pipeline_trigger_path" "s3://$INPUT_AWS_S3_BUCKET_NAME/pipelines/$pipeline_name/$pipeline_trigger_filename" - done -} - -main "$@" diff --git a/trigger-deployment-pipeline/action.yml b/trigger-deployment-pipeline/action.yml index f108d98..a45eabb 100644 --- a/trigger-deployment-pipeline/action.yml +++ b/trigger-deployment-pipeline/action.yml @@ -42,24 +42,5 @@ inputs: Example for setting multiple artifacts parameters: artifact-parameters: "devWebappS3Key=my-s3-artifact.zip devBackendEcrTag=my-tag" runs: - using: "composite" - steps: - - name: trigger deployment - id: trigger - shell: bash --noprofile --norc -euo pipefail {0} - env: - INPUT_PIPELINES: ${{ inputs.pipelines }} - INPUT_AWS_S3_BUCKET_NAME: ${{ inputs.aws-s3-bucket-name }} - INPUT_TRIGGER_TYPE: ${{ inputs.trigger-type }} - INPUT_CDK_SOURCE_METADATA_FILE: ${{ inputs.cdk-source-metadata-file }} - INPUT_CLOUD_ASSEMBLY_METADATA_FILE: ${{ inputs.cloud-assembly-metadata-file }} - INPUT_ARTIFACT_PARAMETERS: ${{ inputs.artifact-parameters }} - GITHUB_TOKEN: ${{ inputs.github-token }} - run: | - bash $GITHUB_ACTION_PATH/action.sh \ - --pipelines "$INPUT_PIPELINES" \ - --aws-s3-bucket-name "$INPUT_AWS_S3_BUCKET_NAME" \ - --trigger-type "$INPUT_TRIGGER_TYPE" \ - --cdk-source-metadata-file "$INPUT_CDK_SOURCE_METADATA_FILE" \ - --cloud-assembly-metadata-file "$INPUT_CLOUD_ASSEMBLY_METADATA_FILE" \ - --artifact-parameters "$INPUT_ARTIFACT_PARAMETERS" + using: "node24" + main: "dist/index.mjs" diff --git a/trigger-deployment-pipeline/dist/index.mjs b/trigger-deployment-pipeline/dist/index.mjs new file mode 100644 index 0000000..2da548e --- /dev/null +++ b/trigger-deployment-pipeline/dist/index.mjs @@ -0,0 +1,47782 @@ +import { createRequire } from "node:module"; +var __create = Object.create; +var __getProtoOf = Object.getPrototypeOf; +var __defProp = Object.defineProperty; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +function __accessProp(key) { + return this[key]; +} +var __toESMCache_node; +var __toESMCache_esm; +var __toESM = (mod, isNodeMode, target) => { + var canCache = mod != null && typeof mod === "object"; + if (canCache) { + var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap; + var cached = cache.get(mod); + if (cached) + return cached; + } + target = mod != null ? __create(__getProtoOf(mod)) : {}; + const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target; + if (mod && typeof mod === "object" || typeof mod === "function") { + for (let key of __getOwnPropNames(mod)) + if (!__hasOwnProp.call(to, key)) + __defProp(to, key, { + get: __accessProp.bind(mod, key), + enumerable: true + }); + } + if (canCache) + cache.set(mod, to); + return to; +}; +var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); +var __require = /* @__PURE__ */ createRequire(import.meta.url); + +// node_modules/@smithy/types/dist-cjs/index.js +var require_dist_cjs = __commonJS(function(exports) { + var HttpAuthLocation; + (function(HttpAuthLocation) { + HttpAuthLocation["HEADER"] = "header"; + HttpAuthLocation["QUERY"] = "query"; + })(HttpAuthLocation || (HttpAuthLocation = {})); + var HttpApiKeyAuthLocation; + (function(HttpApiKeyAuthLocation) { + HttpApiKeyAuthLocation["HEADER"] = "header"; + HttpApiKeyAuthLocation["QUERY"] = "query"; + })(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {})); + var EndpointURLScheme; + (function(EndpointURLScheme) { + EndpointURLScheme["HTTP"] = "http"; + EndpointURLScheme["HTTPS"] = "https"; + })(EndpointURLScheme || (EndpointURLScheme = {})); + var AlgorithmId; + (function(AlgorithmId) { + AlgorithmId["MD5"] = "md5"; + AlgorithmId["CRC32"] = "crc32"; + AlgorithmId["CRC32C"] = "crc32c"; + AlgorithmId["SHA1"] = "sha1"; + AlgorithmId["SHA256"] = "sha256"; + })(AlgorithmId || (AlgorithmId = {})); + var getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== undefined) { + checksumAlgorithms.push({ + algorithmId: () => AlgorithmId.SHA256, + checksumConstructor: () => runtimeConfig.sha256 + }); + } + if (runtimeConfig.md5 != null) { + checksumAlgorithms.push({ + algorithmId: () => AlgorithmId.MD5, + checksumConstructor: () => runtimeConfig.md5 + }); + } + return { + addChecksumAlgorithm(algo) { + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + } + }; + }; + var resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }; + var getDefaultClientConfiguration = (runtimeConfig) => { + return getChecksumConfiguration(runtimeConfig); + }; + var resolveDefaultRuntimeConfig = (config) => { + return resolveChecksumRuntimeConfig(config); + }; + var FieldPosition; + (function(FieldPosition) { + FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; + FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; + })(FieldPosition || (FieldPosition = {})); + var SMITHY_CONTEXT_KEY = "__smithy_context"; + var IniSectionType; + (function(IniSectionType) { + IniSectionType["PROFILE"] = "profile"; + IniSectionType["SSO_SESSION"] = "sso-session"; + IniSectionType["SERVICES"] = "services"; + })(IniSectionType || (IniSectionType = {})); + var RequestHandlerProtocol; + (function(RequestHandlerProtocol) { + RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; + RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; + RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; + })(RequestHandlerProtocol || (RequestHandlerProtocol = {})); + exports.AlgorithmId = AlgorithmId; + exports.EndpointURLScheme = EndpointURLScheme; + exports.FieldPosition = FieldPosition; + exports.HttpApiKeyAuthLocation = HttpApiKeyAuthLocation; + exports.HttpAuthLocation = HttpAuthLocation; + exports.IniSectionType = IniSectionType; + exports.RequestHandlerProtocol = RequestHandlerProtocol; + exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; + exports.getDefaultClientConfiguration = getDefaultClientConfiguration; + exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; +}); + +// node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +var require_transport = __commonJS(function(exports) { + var { SMITHY_CONTEXT_KEY } = require_dist_cjs(); + var getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {}); + function hasOwn(o, k) { + return Object.prototype.hasOwnProperty.call(o, k); + } + + class HttpRequest { + method; + protocol; + hostname; + port; + path; + query; + headers; + username; + password; + fragment; + body; + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + static clone(request) { + const cloned = new HttpRequest({ + ...request, + headers: { ...request.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; + } + static isInstance(request) { + if (!request) { + return false; + } + const req = request; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; + } + clone() { + return HttpRequest.clone(this); + } + } + function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); + } + + class HttpResponse { + statusCode; + reason; + headers; + body; + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } + } + var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); + var isValidHostLabel = (value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); + } + const labels = value.split("."); + for (const label of labels) { + if (!isValidHostLabel(label)) { + return false; + } + } + return true; + }; + function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9.-]*[a-z0-9]$/; + return hostPattern.test(hostname); + } + var normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }; + function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } + } + return query; + } + var parseUrl = (url) => { + if (typeof url === "string") { + return parseUrl(new URL(url)); + } + const { hostname, pathname, port, protocol, search } = url; + let query; + if (search) { + query = parseQueryString(search); + } + return { + hostname, + port: port ? parseInt(port) : undefined, + protocol, + path: pathname, + query + }; + }; + var toEndpointV1 = (endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + const v1Endpoint = parseUrl(endpoint.url); + if (endpoint.headers) { + v1Endpoint.headers = {}; + for (const name in endpoint.headers) { + if (!hasOwn(endpoint.headers, name)) + continue; + v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", "); + } + } + return v1Endpoint; + } + return endpoint; + } + return parseUrl(endpoint); + }; + exports.HttpRequest = HttpRequest; + exports.HttpResponse = HttpResponse; + exports.getSmithyContext = getSmithyContext; + exports.hasOwn = hasOwn; + exports.isValidHostLabel = isValidHostLabel; + exports.isValidHostname = isValidHostname; + exports.normalizeProvider = normalizeProvider; + exports.parseQueryString = parseQueryString; + exports.parseUrl = parseUrl; + exports.toEndpointV1 = toEndpointV1; +}); + +// node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +var require_schema = __commonJS(function(exports) { + var { getSmithyContext, HttpResponse, toEndpointV1 } = require_transport(); + var deref = (schemaRef) => { + if (typeof schemaRef === "function") { + return schemaRef(); + } + return schemaRef; + }; + var operation = (namespace, name, traits, input, output) => ({ + name, + namespace, + traits, + input, + output + }); + var schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { + const { response } = await next(args); + const { operationSchema } = getSmithyContext(context); + const [, ns, n, t, i, o] = operationSchema ?? []; + try { + const parsed = await config.protocol.deserializeResponse(operation(ns, n, t, i, o), { + ...config, + ...context + }, response); + return { + response, + output: parsed + }; + } catch (error) { + Object.defineProperty(error, "$response", { + value: response, + enumerable: false, + writable: false, + configurable: false + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + try { + error.message += ` + ` + hint; + } catch (ignored) { + if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { + console.warn(hint); + } else { + context.logger?.warn?.(hint); + } + } + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } + } + try { + if (HttpResponse.isInstance(response)) { + const { headers = {}, statusCode } = response; + const headerEntries = Object.entries(headers); + error.$metadata = { + httpStatusCode: statusCode, + requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries) + }; + } + } catch (ignored) {} + } + throw error; + } + }; + var findHeader = (pattern, headers) => { + return (headers.find(([k]) => { + return k.match(pattern); + }) || [undefined, undefined])[1]; + }; + var schemaSerializationMiddleware = (config) => (next, context) => async (args) => { + const { operationSchema } = getSmithyContext(context); + const [, ns, n, t, i, o] = operationSchema ?? []; + const endpoint = context.endpointV2 ? async () => toEndpointV1(context.endpointV2) : config.endpoint; + const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, { + ...config, + ...context, + endpoint + }); + return next({ + ...args, + request + }); + }; + var deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true + }; + var serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + function getSchemaSerdePlugin(config) { + return { + applyToStack: (commandStack) => { + commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption); + commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption); + config.protocol.setSerdeContext(config); + } + }; + } + + class Schema { + name; + namespace; + traits; + static assign(instance, values) { + const schema = Object.assign(instance, values); + return schema; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const list = lhs; + return list.symbol === this.symbol; + } + return isPrototype; + } + getName() { + return this.namespace + "#" + this.name; + } + } + + class ListSchema extends Schema { + static symbol = Symbol.for("@smithy/lis"); + valueSchema; + symbol = ListSchema.symbol; + } + var list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema, { + name, + namespace, + traits, + valueSchema + }); + + class MapSchema extends Schema { + static symbol = Symbol.for("@smithy/map"); + keySchema; + valueSchema; + symbol = MapSchema.symbol; + } + var map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema, { + name, + namespace, + traits, + keySchema, + valueSchema + }); + + class OperationSchema extends Schema { + static symbol = Symbol.for("@smithy/ope"); + input; + output; + symbol = OperationSchema.symbol; + } + var op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema, { + name, + namespace, + traits, + input, + output + }); + + class StructureSchema extends Schema { + static symbol = Symbol.for("@smithy/str"); + memberNames; + memberList; + symbol = StructureSchema.symbol; + } + var struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema, { + name, + namespace, + traits, + memberNames, + memberList + }); + + class ErrorSchema extends StructureSchema { + static symbol = Symbol.for("@smithy/err"); + ctor; + symbol = ErrorSchema.symbol; + } + var error = (namespace, name, traits, memberNames, memberList, _ctor) => Schema.assign(new ErrorSchema, { + name, + namespace, + traits, + memberNames, + memberList, + ctor: null + }); + var traitsCache = []; + function translateTraits(indicator) { + if (typeof indicator === "object") { + return indicator; + } + indicator = indicator | 0; + if (traitsCache[indicator]) { + return traitsCache[indicator]; + } + const traits = {}; + let i = 0; + for (const trait of [ + "httpLabel", + "idempotent", + "idempotencyToken", + "sensitive", + "httpPayload", + "httpResponseCode", + "httpQueryParams" + ]) { + if ((indicator >> i++ & 1) === 1) { + traits[trait] = 1; + } + } + return traitsCache[indicator] = traits; + } + var anno = { + it: Symbol.for("@smithy/nor-struct-it"), + ns: Symbol.for("@smithy/ns") + }; + var simpleSchemaCacheN = []; + var simpleSchemaCacheS = {}; + + class NormalizedSchema { + ref; + memberName; + static symbol = Symbol.for("@smithy/nor"); + symbol = NormalizedSchema.symbol; + name; + schema; + _isMemberSchema; + traits; + memberTraits; + normalizedTraits; + constructor(ref, memberName) { + this.ref = ref; + this.memberName = memberName; + const traitStack = []; + let _ref = ref; + let schema = ref; + this._isMemberSchema = false; + while (isMemberSchema(_ref)) { + traitStack.push(_ref[1]); + _ref = _ref[0]; + schema = deref(_ref); + this._isMemberSchema = true; + } + if (traitStack.length > 0) { + this.memberTraits = {}; + for (let i = traitStack.length - 1;i >= 0; --i) { + const traitSet = traitStack[i]; + Object.assign(this.memberTraits, translateTraits(traitSet)); + } + } else { + this.memberTraits = 0; + } + if (schema instanceof NormalizedSchema) { + const computedMemberTraits = this.memberTraits; + Object.assign(this, schema); + this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits()); + this.normalizedTraits = undefined; + this.memberName = memberName ?? schema.memberName; + return; + } + this.schema = deref(schema); + if (isStaticSchema(this.schema)) { + this.name = `${this.schema[1]}#${this.schema[2]}`; + this.traits = this.schema[3]; + } else { + this.name = this.memberName ?? String(schema); + this.traits = 0; + } + if (this._isMemberSchema && !memberName) { + throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); + } + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const ns = lhs; + return ns.symbol === this.symbol; + } + return isPrototype; + } + static of(ref) { + const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null; + if (typeof ref === "number") { + if (simpleSchemaCacheN[ref]) { + return simpleSchemaCacheN[ref]; + } + } else if (typeof ref === "string") { + if (simpleSchemaCacheS[ref]) { + return simpleSchemaCacheS[ref]; + } + } else if (keyAble) { + if (ref[anno.ns]) { + return ref[anno.ns]; + } + } + const sc = deref(ref); + if (sc instanceof NormalizedSchema) { + return sc; + } + if (isMemberSchema(sc)) { + const [ns, traits] = sc; + if (ns instanceof NormalizedSchema) { + Object.assign(ns.getMergedTraits(), translateTraits(traits)); + return ns; + } + throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`); + } + const ns = new NormalizedSchema(sc); + if (keyAble) { + return ref[anno.ns] = ns; + } + if (typeof sc === "string") { + return simpleSchemaCacheS[sc] = ns; + } + if (typeof sc === "number") { + return simpleSchemaCacheN[sc] = ns; + } + return ns; + } + getSchema() { + const sc = this.schema; + if (Array.isArray(sc) && sc[0] === 0) { + return sc[4]; + } + return sc; + } + getName(withNamespace = false) { + const { name } = this; + const short = !withNamespace && name && name.includes("#"); + return short ? name.split("#")[1] : name || undefined; + } + getMemberName() { + return this.memberName; + } + isMemberSchema() { + return this._isMemberSchema; + } + isListSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1; + } + isMapSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2; + } + isStructSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + const id = sc[0]; + return id === 3 || id === -3 || id === 4; + } + isUnionSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + return sc[0] === 4; + } + isBlobSchema() { + const sc = this.getSchema(); + return sc === 21 || sc === 42; + } + isTimestampSchema() { + const sc = this.getSchema(); + return typeof sc === "number" && sc >= 4 && sc <= 7; + } + isUnitSchema() { + return this.getSchema() === "unit"; + } + isDocumentSchema() { + return this.getSchema() === 15; + } + isStringSchema() { + return this.getSchema() === 0; + } + isBooleanSchema() { + return this.getSchema() === 2; + } + isNumericSchema() { + return this.getSchema() === 1; + } + isBigIntegerSchema() { + return this.getSchema() === 17; + } + isBigDecimalSchema() { + return this.getSchema() === 19; + } + isStreaming() { + const { streaming } = this.getMergedTraits(); + return !!streaming || this.getSchema() === 42; + } + isIdempotencyToken() { + return !!this.getMergedTraits().idempotencyToken; + } + getMergedTraits() { + return this.normalizedTraits ?? (this.normalizedTraits = { + ...this.getOwnTraits(), + ...this.getMemberTraits() + }); + } + getMemberTraits() { + return translateTraits(this.memberTraits); + } + getOwnTraits() { + return translateTraits(this.traits); + } + getKeySchema() { + const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()]; + if (!isDoc && !isMap) { + throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`); + } + const schema = this.getSchema(); + const memberSchema = isDoc ? 15 : schema[4] ?? 0; + return member([memberSchema, 0], "key"); + } + getValueSchema() { + const sc = this.getSchema(); + const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; + const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : undefined; + if (memberSchema != null) { + return member([memberSchema, 0], isMap ? "value" : "member"); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); + } + getMemberSchema(memberName) { + const struct = this.getSchema(); + if (this.isStructSchema() && struct[4].includes(memberName)) { + const i = struct[4].indexOf(memberName); + const memberSchema = struct[5][i]; + return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName); + } + if (this.isDocumentSchema()) { + return member([15, 0], memberName); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`); + } + getMemberSchemas() { + const buffer = {}; + try { + for (const [k, v] of this.structIterator()) { + buffer[k] = v; + } + } catch (ignored) {} + return buffer; + } + getEventStreamMember() { + if (this.isStructSchema()) { + for (const [memberName, memberSchema] of this.structIterator()) { + if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { + return memberName; + } + } + } + return ""; + } + *structIterator() { + if (this.isUnitSchema()) { + return; + } + if (!this.isStructSchema()) { + throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); + } + const struct = this.getSchema(); + const z = struct[4].length; + let it = struct[anno.it]; + if (it && z === it.length) { + yield* it; + return; + } + it = Array(z); + for (let i = 0;i < z; ++i) { + const k = struct[4][i]; + const v = member([struct[5][i], 0], k); + yield it[i] = [k, v]; + } + struct[anno.it] = it; + } + } + function member(memberSchema, memberName) { + if (memberSchema instanceof NormalizedSchema) { + return Object.assign(memberSchema, { + memberName, + _isMemberSchema: true + }); + } + const internalCtorAccess = NormalizedSchema; + return new internalCtorAccess(memberSchema, memberName); + } + var isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2; + var isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5; + + class SimpleSchema extends Schema { + static symbol = Symbol.for("@smithy/sim"); + schemaRef; + symbol = SimpleSchema.symbol; + } + var sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema, { + name, + namespace, + traits, + schemaRef + }); + var simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema, { + name, + namespace, + traits, + schemaRef + }); + var SCHEMA = { + BLOB: 21, + STREAMING_BLOB: 42, + BOOLEAN: 2, + STRING: 0, + NUMERIC: 1, + BIG_INTEGER: 17, + BIG_DECIMAL: 19, + DOCUMENT: 15, + TIMESTAMP_DEFAULT: 4, + TIMESTAMP_DATE_TIME: 5, + TIMESTAMP_HTTP_DATE: 6, + TIMESTAMP_EPOCH_SECONDS: 7, + LIST_MODIFIER: 64, + MAP_MODIFIER: 128 + }; + + class TypeRegistry { + namespace; + schemas; + exceptions; + static registries = new Map; + constructor(namespace, schemas = new Map, exceptions = new Map) { + this.namespace = namespace; + this.schemas = schemas; + this.exceptions = exceptions; + } + static for(namespace) { + if (!TypeRegistry.registries.has(namespace)) { + TypeRegistry.registries.set(namespace, new TypeRegistry(namespace)); + } + return TypeRegistry.registries.get(namespace); + } + copyFrom(other) { + const { schemas, exceptions } = this; + for (const [k, v] of other.schemas) { + if (!schemas.has(k)) { + schemas.set(k, v); + } + } + for (const [k, v] of other.exceptions) { + if (!exceptions.has(k)) { + exceptions.set(k, v); + } + } + } + register(shapeId, schema) { + const qualifiedName = this.normalizeShapeId(shapeId); + for (const r of [this, TypeRegistry.for(qualifiedName.split("#")[0])]) { + r.schemas.set(qualifiedName, schema); + } + } + getSchema(shapeId) { + const id = this.normalizeShapeId(shapeId); + if (!this.schemas.has(id)) { + if (!shapeId.includes("#")) { + const suffix = "#" + shapeId; + const candidates = []; + for (const [shapeId, schema] of this.schemas.entries()) { + if (shapeId.endsWith(suffix)) { + candidates.push(schema); + } + } + if (candidates.length === 1) { + return candidates[0]; + } + } + throw new Error(`@smithy/core/schema - schema not found for ${id}`); + } + return this.schemas.get(id); + } + registerError(es, ctor) { + const $error2 = es; + const ns = $error2[1]; + for (const r of [this, TypeRegistry.for(ns)]) { + r.schemas.set(ns + "#" + $error2[2], $error2); + r.exceptions.set($error2, ctor); + } + } + getErrorCtor(es) { + const $error2 = es; + if (this.exceptions.has($error2)) { + return this.exceptions.get($error2); + } + const registry = TypeRegistry.for($error2[1]); + return registry.exceptions.get($error2); + } + getBaseException() { + for (const exceptionKey of this.exceptions.keys()) { + if (Array.isArray(exceptionKey)) { + const [, ns, name] = exceptionKey; + const id = ns + "#" + name; + if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { + return exceptionKey; + } + } + } + return; + } + find(predicate) { + for (const schema of this.schemas.values()) { + if (predicate(schema)) { + return schema; + } + } + return; + } + clear() { + this.schemas.clear(); + this.exceptions.clear(); + } + normalizeShapeId(shapeId) { + if (shapeId.includes("#")) { + return shapeId; + } + return this.namespace + "#" + shapeId; + } + } + exports.ErrorSchema = ErrorSchema; + exports.ListSchema = ListSchema; + exports.MapSchema = MapSchema; + exports.NormalizedSchema = NormalizedSchema; + exports.OperationSchema = OperationSchema; + exports.SCHEMA = SCHEMA; + exports.Schema = Schema; + exports.SimpleSchema = SimpleSchema; + exports.StructureSchema = StructureSchema; + exports.TypeRegistry = TypeRegistry; + exports.deref = deref; + exports.deserializerMiddlewareOption = deserializerMiddlewareOption; + exports.error = error; + exports.getSchemaSerdePlugin = getSchemaSerdePlugin; + exports.isStaticSchema = isStaticSchema; + exports.list = list; + exports.map = map; + exports.op = op; + exports.operation = operation; + exports.serializerMiddlewareOption = serializerMiddlewareOption; + exports.sim = sim; + exports.simAdapter = simAdapter; + exports.simpleSchemaCacheN = simpleSchemaCacheN; + exports.simpleSchemaCacheS = simpleSchemaCacheS; + exports.struct = struct; + exports.traitsCache = traitsCache; + exports.translateTraits = translateTraits; +}); + +// node_modules/@smithy/core/dist-cjs/submodules/client/index.js +var require_client = __commonJS(function(exports) { + var { hasOwn } = require_transport(); + var { getSmithyContext, normalizeProvider } = require_transport(); + exports.getSmithyContext = getSmithyContext; + exports.normalizeProvider = normalizeProvider; + var { SMITHY_CONTEXT_KEY, AlgorithmId } = require_dist_cjs(); + exports.AlgorithmId = AlgorithmId; + var { NormalizedSchema } = require_schema(); + var getAllAliases = (name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); + } + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); + } + } + return _aliases; + }; + var getMiddlewareNameWithAliases = (name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; + }; + var constructStack = () => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = new Set; + const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]); + const removeByName = (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + const aliases = getAllAliases(entry.name, entry.aliases); + if (aliases.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }; + const removeByReference = (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }; + const cloneTo = (toStack) => { + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + toStack.identifyOnResolve?.(stack.identifyOnResolve()); + return toStack; + }; + const expandRelativeMiddlewareList = (from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }; + const getMiddlewareList = (debug = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === undefined) { + if (debug) { + return; + } + throw new Error(`${entry.toMiddleware} is not found when adding ` + `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` + `middleware ${entry.relation} ${entry.toMiddleware}`); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); + } + } + }); + const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, []); + return mainChain; + }; + const stack = { + add: (middleware, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ` + `${toOverride.priority} priority in ${toOverride.step} step cannot ` + `be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ` + `${entry.priority} priority in ${entry.step} step.`); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ` + `${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden ` + `by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} ` + `"${entry.toMiddleware}" middleware.`); + } + relativeEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, + clone: () => cloneTo(constructStack()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases = getAllAliases(name, _aliases); + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)); + return cloned; + }, + applyToStack: cloneTo, + identify: () => { + return getMiddlewareList(true).map((mw) => { + const step = mw.step ?? mw.relation + " " + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + }); + }, + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: (handler, context) => { + for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) { + handler = middleware(handler, context); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler; + } + }; + return stack; + }; + var stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1 + }; + var priorityWeights = { + high: 3, + normal: 2, + low: 1 + }; + var invalidFunction = (message) => () => { + throw new Error(message); + }; + var invalidProvider = (message) => () => Promise.reject(message); + var getCircularReplacer = () => { + const seen = new WeakSet; + return (key, value) => { + if (typeof value === "object" && value !== null) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }; + }; + var sleep = (seconds) => { + return new Promise((resolve) => setTimeout(resolve, seconds * 1000)); + }; + var waiterServiceDefaults = { + minDelay: 2, + maxDelay: 120 + }; + var WaiterState; + (function(WaiterState) { + WaiterState["ABORTED"] = "ABORTED"; + WaiterState["FAILURE"] = "FAILURE"; + WaiterState["SUCCESS"] = "SUCCESS"; + WaiterState["RETRY"] = "RETRY"; + WaiterState["TIMEOUT"] = "TIMEOUT"; + })(WaiterState || (WaiterState = {})); + var checkExceptions = (result) => { + if (result.state === WaiterState.ABORTED) { + const abortError = new Error(`${JSON.stringify({ + ...result, + reason: "Request was aborted" + }, getCircularReplacer())}`); + abortError.name = "AbortError"; + throw abortError; + } else if (result.state === WaiterState.TIMEOUT) { + const timeoutError = new Error(`${JSON.stringify({ + ...result, + reason: "Waiter has timed out" + }, getCircularReplacer())}`); + timeoutError.name = "TimeoutError"; + throw timeoutError; + } else if (result.state !== WaiterState.SUCCESS) { + throw new Error(`${JSON.stringify(result, getCircularReplacer())}`); + } + return result; + }; + var runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => { + const observedResponses = {}; + const [minDelayMs, maxDelayMs] = [minDelay * 1000, maxDelay * 1000]; + let currentAttempt = 0; + const waitUntil = Date.now() + maxWaitTime * 1000; + const warn403Time = Date.now() + 60000; + let didWarn403 = false; + while (true) { + if (currentAttempt > 0) { + const delayMs = exponentialBackoffWithJitter(minDelayMs, maxDelayMs, currentAttempt, waitUntil); + if (abortController?.signal?.aborted || abortSignal?.aborted) { + const message = "AbortController signal aborted."; + observedResponses[message] |= 0; + observedResponses[message] += 1; + return { state: WaiterState.ABORTED, observedResponses }; + } + if (Date.now() + delayMs > waitUntil) { + return { state: WaiterState.TIMEOUT, observedResponses }; + } + await sleep(delayMs / 1000); + } + const { state, reason } = await acceptorChecks(client, input); + if (reason) { + const message = createMessageFromResponse(reason); + observedResponses[message] |= 0; + observedResponses[message] += 1; + } + if (state !== WaiterState.RETRY) { + return { state, reason, final: reason, observedResponses }; + } + currentAttempt += 1; + if (!didWarn403 && Date.now() >= warn403Time) { + checkWarn403(observedResponses, client); + didWarn403 = true; + } + } + }; + var checkWarn403 = (observedResponses = {}, client) => { + const orderedErrors = Object.keys(observedResponses); + let count403 = 0; + for (const response of orderedErrors) { + const n = observedResponses[response] | 0; + if (response.startsWith("403:")) { + count403 += n; + } + } + const clientLogger = client?.config?.logger; + const warningLogger = typeof clientLogger?.warn === "function" && !clientLogger.constructor?.name?.includes?.("NoOpLogger") ? clientLogger : console; + if (count403 >= 3 || orderedErrors[orderedErrors.length - 1]?.startsWith("403:")) { + warningLogger.warn(`@smithy/util-waiter WARN - 403 status code encountered during waiter polling.`); + } + }; + var createMessageFromResponse = (reason) => { + const status = reason?.$response?.statusCode ?? reason?.$metadata?.httpStatusCode; + if (reason?.$responseBodyText) { + return `${status ? status + ": " : ""}Deserialization error for body: ${reason.$responseBodyText}`; + } + if (status) { + if (reason?.$response || reason?.message) { + return `${status ?? "Unknown"}: ${reason?.message}`; + } + return `${status}: OK`; + } + return String(reason?.message ?? JSON.stringify(reason, getCircularReplacer()) ?? "Unknown"); + }; + var exponentialBackoffWithJitter = (minDelayMs, maxDelayMs, attempt, waitUntil) => { + const attemptCountCeiling = Math.log(maxDelayMs / minDelayMs) / Math.log(2) + 1; + if (attempt > attemptCountCeiling) { + return maxDelayMs; + } + const delay = minDelayMs * 2 ** (attempt - 1); + const capped = Math.min(delay, maxDelayMs); + const waitFor = randomInRange(minDelayMs, capped); + if (Date.now() + waitFor > waitUntil) { + const timeRemaining = waitUntil - Date.now(); + return Math.max(0, timeRemaining - 500); + } + return waitFor; + }; + var randomInRange = (min, max) => min + Math.random() * (max - min); + var validateWaiterOptions = (options) => { + if (options.maxWaitTime <= 0) { + throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`); + } else if (options.minDelay <= 0) { + throw new Error(`WaiterConfiguration.minDelay must be greater than 0`); + } else if (options.maxDelay <= 0) { + throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`); + } else if (options.maxWaitTime <= options.minDelay) { + throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); + } else if (options.maxDelay < options.minDelay) { + throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); + } + }; + var abortTimeout = (abortSignal) => { + let onAbort; + const promise = new Promise((resolve) => { + onAbort = () => resolve({ state: WaiterState.ABORTED }); + if (typeof abortSignal.addEventListener === "function") { + abortSignal.addEventListener("abort", onAbort); + } else { + abortSignal.onabort = onAbort; + } + }); + return { + clearListener() { + if (typeof abortSignal.removeEventListener === "function") { + abortSignal.removeEventListener("abort", onAbort); + } + }, + aborted: promise + }; + }; + var createWaiter = async (options, input, acceptorChecks) => { + const params = { + ...waiterServiceDefaults, + ...options + }; + validateWaiterOptions(params); + const exitConditions = [runPolling(params, input, acceptorChecks)]; + const finalize = []; + if (options.abortSignal) { + const { aborted, clearListener } = abortTimeout(options.abortSignal); + finalize.push(clearListener); + exitConditions.push(aborted); + } + if (options.abortController?.signal) { + const { aborted, clearListener } = abortTimeout(options.abortController.signal); + finalize.push(clearListener); + exitConditions.push(aborted); + } + return Promise.race(exitConditions).then((result) => { + for (const fn of finalize) { + fn(); + } + return result; + }); + }; + + class Client { + config; + middlewareStack = constructStack(); + initConfig; + handlers; + constructor(config) { + this.config = config; + const { protocol, protocolSettings } = config; + if (protocolSettings) { + if (typeof protocol === "function") { + config.protocol = new protocol(protocolSettings); + } + } + } + send(command, optionsOrCb, cb) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : undefined; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; + const useHandlerCache = options === undefined && this.config.cacheMiddleware === true; + let handler; + if (useHandlerCache) { + if (!this.handlers) { + this.handlers = new WeakMap; + } + const handlers = this.handlers; + if (handlers.has(command.constructor)) { + handler = handlers.get(command.constructor); + } else { + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + handlers.set(command.constructor, handler); + } + } else { + delete this.handlers; + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + } + if (callback) { + handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => {}); + } else { + return handler(command).then((result) => result.output); + } + } + destroy() { + this.config?.requestHandler?.destroy?.(); + delete this.handlers; + } + } + var SENSITIVE_STRING$1 = "***SensitiveInformation***"; + function schemaLogFilter(schema, data) { + if (data == null) { + return data; + } + const ns = NormalizedSchema.of(schema); + if (ns.getMergedTraits().sensitive) { + return SENSITIVE_STRING$1; + } + if (ns.isListSchema()) { + const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING$1; + } + } else if (ns.isMapSchema()) { + const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING$1; + } + } else if (ns.isStructSchema() && typeof data === "object") { + const object = data; + const newObject = {}; + for (const [member, memberNs] of ns.structIterator()) { + if (object[member] != null) { + newObject[member] = schemaLogFilter(memberNs, object[member]); + } + } + return newObject; + } + return data; + } + + class Command { + middlewareStack = constructStack(); + schema; + static classBuilder() { + return new ClassBuilder; + } + resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext + }, + ...additionalContext + }; + const { requestHandler } = configuration; + let requestOptions = options ?? {}; + if (smithyContext.eventStream) { + requestOptions = { + isEventStream: true, + ...requestOptions + }; + } + return stack.resolve((request) => requestHandler.handle(request.request, requestOptions), handlerExecutionContext); + } + } + + class ClassBuilder { + _init = () => {}; + _ep = {}; + _middlewareFn = () => []; + _commandName = ""; + _clientName = ""; + _additionalContext = {}; + _smithyContext = {}; + _inputFilterSensitiveLog = undefined; + _outputFilterSensitiveLog = undefined; + _serializer = null; + _deserializer = null; + _operationSchema; + init(cb) { + this._init = cb; + } + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + s(service, operation, smithyContext = {}) { + this._smithyContext = { + service, + operation, + ...smithyContext + }; + return this; + } + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + ser(serializer) { + this._serializer = serializer; + return this; + } + de(deserializer) { + this._deserializer = deserializer; + return this; + } + sc(operation) { + this._operationSchema = operation; + this._smithyContext.operationSchema = operation; + return this; + } + build() { + const closure = this; + let CommandRef; + return CommandRef = class extends Command { + input; + static getEndpointParameterInstructions() { + return closure._ep; + } + constructor(...[input]) { + super(); + this.input = input ?? {}; + closure._init(this); + this.schema = closure._operationSchema; + } + resolveMiddleware(stack, configuration, options) { + const op = closure._operationSchema; + const input = op?.[4] ?? op?.input; + const output = op?.[5] ?? op?.output; + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _), + outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _), + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); + } + serialize = closure._serializer; + deserialize = closure._deserializer; + }; + } + } + var SENSITIVE_STRING = "***SensitiveInformation***"; + var createAggregatedClient = (commands, Client, options) => { + for (const [command, CommandCtor] of Object.entries(commands)) { + const methodImpl = async function(args, optionsOrCb, cb) { + const command = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + }; + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client.prototype[methodName] = methodImpl; + } + const { paginators = {}, waiters = {} } = options ?? {}; + for (const [paginatorName, paginatorFn] of Object.entries(paginators)) { + if (Client.prototype[paginatorName] === undefined) { + Client.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) { + return paginatorFn({ + ...paginationConfiguration, + client: this + }, commandInput, ...rest); + }; + } + } + for (const [waiterName, waiterFn] of Object.entries(waiters)) { + if (Client.prototype[waiterName] === undefined) { + Client.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) { + let config = waiterConfiguration; + if (typeof waiterConfiguration === "number") { + config = { + maxWaitTime: waiterConfiguration + }; + } + return waiterFn({ + ...config, + client: this + }, commandInput, ...rest); + }; + } + } + }; + + class ServiceException extends Error { + $fault; + $response; + $retryable; + $metadata; + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } + static isInstance(value) { + if (!value) + return false; + const candidate = value; + return ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); + } + static [Symbol.hasInstance](instance) { + if (!instance) + return false; + const candidate = instance; + if (this === ServiceException) { + return ServiceException.isInstance(instance); + } + if (ServiceException.isInstance(instance)) { + if (candidate.name && this.name) { + return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; + } + return this.prototype.isPrototypeOf(instance); + } + return false; + } + } + var decorateServiceException = (exception, additions = {}) => { + Object.entries(additions).filter(([, v]) => v !== undefined).forEach(([k, v]) => { + if (exception[k] == undefined || exception[k] === "") { + exception[k] = v; + } + }); + const message = exception.message || exception.Message || "UnknownError"; + exception.message = message; + delete exception.Message; + return exception; + }; + var throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => { + const $metadata = deserializeMetadata(output); + const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined; + const response = new exceptionCtor({ + name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError", + $fault: "client", + $metadata + }); + throw decorateServiceException(response, parsedBody); + }; + var withBaseException = (ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; + }; + var deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }); + var loadConfigsForDefaultMode = (mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100 + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 30000 + }; + default: + return {}; + } + }; + var warningEmitted = false; + var emitWarningIfUnsupportedVersion = (version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { + warningEmitted = true; + } + }; + var knownAlgorithms = Object.values(AlgorithmId); + var getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in AlgorithmId) { + if (!hasOwn(AlgorithmId, id)) + continue; + const algorithmId = AlgorithmId[id]; + if (runtimeConfig[algorithmId] === undefined) { + continue; + } + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId] + }); + } + for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) { + checksumAlgorithms.push({ + algorithmId: () => id, + checksumConstructor: () => ChecksumCtor + }); + } + return { + addChecksumAlgorithm(algo) { + runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {}; + const id = algo.algorithmId(); + const ctor = algo.checksumConstructor(); + if (knownAlgorithms.includes(id)) { + runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor; + } else { + runtimeConfig.checksumAlgorithms[id] = ctor; + } + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + } + }; + }; + var resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + const id = checksumAlgorithm.algorithmId(); + if (knownAlgorithms.includes(id)) { + runtimeConfig[id] = checksumAlgorithm.checksumConstructor(); + } + }); + return runtimeConfig; + }; + var getRetryConfiguration = (runtimeConfig) => { + return { + setRetryStrategy(retryStrategy) { + runtimeConfig.retryStrategy = retryStrategy; + }, + retryStrategy() { + return runtimeConfig.retryStrategy; + } + }; + }; + var resolveRetryRuntimeConfig = (retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; + }; + var getDefaultExtensionConfiguration = (runtimeConfig) => { + return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); + }; + var getDefaultClientConfiguration = getDefaultExtensionConfiguration; + var resolveDefaultRuntimeConfig = (config) => { + return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config)); + }; + var getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray]; + var getValueFromTextNode = (obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (!hasOwn(obj, key)) + continue; + if (obj[key][textNodeName] !== undefined) { + obj[key] = obj[key][textNodeName]; + } else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode(obj[key]); + } + } + return obj; + }; + var isSerializableHeaderValue = (value) => { + return value != null; + }; + + class NoOpLogger { + trace() {} + debug() {} + info() {} + warn() {} + error() {} + } + function map(arg0, arg1, arg2) { + let target; + let filter; + let instructions; + if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { + target = {}; + instructions = arg0; + } else { + target = arg0; + if (typeof arg1 === "function") { + filter = arg1; + instructions = arg2; + return mapWithFilter(target, filter, instructions); + } else { + instructions = arg1; + } + } + for (const key in instructions) { + if (!hasOwn(instructions, key)) + continue; + if (!Array.isArray(instructions[key])) { + target[key] = instructions[key]; + continue; + } + applyInstruction(target, null, instructions, key); + } + return target; + } + var convertMap = (target) => { + const output = {}; + for (const [k, v] of Object.entries(target || {})) { + output[k] = [, v]; + } + return output; + }; + var take = (source, instructions) => { + const out = {}; + for (const key in instructions) { + if (!hasOwn(instructions, key)) + continue; + applyInstruction(out, source, instructions, key); + } + return out; + }; + var mapWithFilter = (target, filter, instructions) => { + return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => { + if (Array.isArray(value)) { + _instructions[key] = value; + } else { + if (typeof value === "function") { + _instructions[key] = [filter, value()]; + } else { + _instructions[key] = [filter, value]; + } + } + return _instructions; + }, {})); + }; + var applyInstruction = (target, source, instructions, targetKey) => { + if (source !== null) { + let instruction = instructions[targetKey]; + if (typeof instruction === "function") { + instruction = [, instruction]; + } + const [filter = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; + if (typeof filter === "function" && filter(source[sourceKey]) || typeof filter !== "function" && !!filter) { + target[targetKey] = valueFn(source[sourceKey]); + } + return; + } + let [filter, value] = instructions[targetKey]; + if (typeof value === "function") { + let _value; + const defaultFilterPassed = filter === undefined && (_value = value()) != null; + const customFilterPassed = typeof filter === "function" && !!filter(undefined) || typeof filter !== "function" && !!filter; + if (defaultFilterPassed) { + target[targetKey] = _value; + } else if (customFilterPassed) { + target[targetKey] = value(); + } + } else { + const defaultFilterPassed = filter === undefined && value != null; + const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter; + if (defaultFilterPassed || customFilterPassed) { + target[targetKey] = value; + } + } + }; + var nonNullish = (_) => _ != null; + var pass = (_) => _; + var serializeFloat = (value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } + }; + var serializeDateTime = (date) => date.toISOString().replace(".000Z", "Z"); + var _json = (obj) => { + if (obj == null) { + return {}; + } + if (Array.isArray(obj)) { + return obj.filter((_) => _ != null).map(_json); + } + if (typeof obj === "object") { + const target = {}; + for (const key in obj) { + if (!hasOwn(obj, key)) + continue; + if (obj[key] == null) { + continue; + } + target[key] = _json(obj[key]); + } + return target; + } + return obj; + }; + function makeBuilder(common, service, name, ep) { + return function makeCommand(added, plugins, op, $, smithyContext = {}) { + const epMerged = Object.assign({}, common, added); + return Command.classBuilder().ep(epMerged).m(function(CommandCtor, clientStack, config, options) { + const list = plugins.call(this, CommandCtor, clientStack, config, options); + list.unshift(ep(config, CommandCtor.getEndpointParameterInstructions())); + return list; + }).s(service, op, smithyContext).n(name, op.charAt(0).toUpperCase() + op.slice(1) + "Command").sc($).build(); + }; + } + exports.Client = Client; + exports.Command = Command; + exports.NoOpLogger = NoOpLogger; + exports.SENSITIVE_STRING = SENSITIVE_STRING; + exports.ServiceException = ServiceException; + exports.WaiterState = WaiterState; + exports._json = _json; + exports.checkExceptions = checkExceptions; + exports.constructStack = constructStack; + exports.convertMap = convertMap; + exports.createAggregatedClient = createAggregatedClient; + exports.createWaiter = createWaiter; + exports.decorateServiceException = decorateServiceException; + exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion; + exports.getArrayIfSingleItem = getArrayIfSingleItem; + exports.getChecksumConfiguration = getChecksumConfiguration; + exports.getDefaultClientConfiguration = getDefaultClientConfiguration; + exports.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration; + exports.getRetryConfiguration = getRetryConfiguration; + exports.getValueFromTextNode = getValueFromTextNode; + exports.invalidFunction = invalidFunction; + exports.invalidProvider = invalidProvider; + exports.isSerializableHeaderValue = isSerializableHeaderValue; + exports.loadConfigsForDefaultMode = loadConfigsForDefaultMode; + exports.makeBuilder = makeBuilder; + exports.map = map; + exports.resolveChecksumRuntimeConfig = resolveChecksumRuntimeConfig; + exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; + exports.resolveRetryRuntimeConfig = resolveRetryRuntimeConfig; + exports.schemaLogFilter = schemaLogFilter; + exports.serializeDateTime = serializeDateTime; + exports.serializeFloat = serializeFloat; + exports.take = take; + exports.throwDefaultError = throwDefaultError; + exports.waiterServiceDefaults = waiterServiceDefaults; + exports.withBaseException = withBaseException; +}); + +// node_modules/@smithy/core/dist-cjs/submodules/config/index.js +var require_config = __commonJS(function(exports) { + var { homedir } = __require("node:os"); + var { sep, join } = __require("node:path"); + var { createHash } = __require("node:crypto"); + var { readFile: readFile$1 } = __require("node:fs/promises"); + var { IniSectionType } = require_dist_cjs(); + var { normalizeProvider } = require_client(); + var { isValidHostLabel } = require_transport(); + + class ProviderError extends Error { + name = "ProviderError"; + tryNextLink; + constructor(message, options = true) { + let logger; + let tryNextLink = true; + if (typeof options === "boolean") { + logger = undefined; + tryNextLink = options; + } else if (options != null && typeof options === "object") { + logger = options.logger; + tryNextLink = options.tryNextLink ?? true; + } + super(message); + this.tryNextLink = tryNextLink; + Object.setPrototypeOf(this, ProviderError.prototype); + logger?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); + } + static from(error, options = true) { + return Object.assign(new this(error.message, options), error); + } + } + + class CredentialsProviderError extends ProviderError { + name = "CredentialsProviderError"; + constructor(message, options = true) { + super(message, options); + Object.setPrototypeOf(this, CredentialsProviderError.prototype); + } + } + + class TokenProviderError extends ProviderError { + name = "TokenProviderError"; + constructor(message, options = true) { + super(message, options); + Object.setPrototypeOf(this, TokenProviderError.prototype); + } + } + var chain = (...providers) => async () => { + if (providers.length === 0) { + throw new ProviderError("No providers in chain"); + } + let lastProviderError; + for (const provider of providers) { + try { + const credentials = await provider(); + return credentials; + } catch (err) { + lastProviderError = err; + if (err?.tryNextLink) { + continue; + } + throw err; + } + } + throw lastProviderError; + }; + var fromValue = (staticValue) => () => Promise.resolve(staticValue); + var memoize = (provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = undefined; + } + return resolved; + }; + if (isExpired === undefined) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; + }; + var booleanSelector = (obj, key, type) => { + if (!(key in obj)) + return; + if (obj[key] === "true") + return true; + if (obj[key] === "false") + return false; + throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); + }; + var numberSelector = (obj, key, type) => { + if (!(key in obj)) + return; + const numberValue = parseInt(obj[key], 10); + if (Number.isNaN(numberValue)) { + throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); + } + return numberValue; + }; + var SelectorType; + (function(SelectorType) { + SelectorType["ENV"] = "env"; + SelectorType["CONFIG"] = "shared config entry"; + })(SelectorType || (SelectorType = {})); + var homeDirCache = {}; + var getHomeDirCacheKey = () => { + if (process && process.geteuid) { + return `${process.geteuid()}`; + } + return "DEFAULT"; + }; + var getHomeDir = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + const homeDirCacheKey = getHomeDirCacheKey(); + if (!homeDirCache[homeDirCacheKey]) + homeDirCache[homeDirCacheKey] = homedir(); + return homeDirCache[homeDirCacheKey]; + }; + var ENV_PROFILE = "AWS_PROFILE"; + var DEFAULT_PROFILE = "default"; + var getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; + var getSSOTokenFilepath = (id) => { + const hasher = createHash("sha1"); + const cacheName = hasher.update(id).digest("hex"); + return join(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`); + }; + var tokenIntercept = {}; + var getSSOTokenFromFile = async (id) => { + if (tokenIntercept[id]) { + return tokenIntercept[id]; + } + const ssoTokenFilepath = getSSOTokenFilepath(id); + const ssoTokenText = await readFile$1(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); + }; + var CONFIG_PREFIX_SEPARATOR = "."; + var getConfigData = (data) => Object.entries(data).filter(([key]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { + return false; + } + return Object.values(IniSectionType).includes(key.substring(0, indexOfSeparator)); + }).reduce((acc, [key, value]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; + }, { + ...data.default && { default: data.default } + }); + var ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; + var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || join(getHomeDir(), ".aws", "config"); + var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; + var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || join(getHomeDir(), ".aws", "credentials"); + var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@+.%:/]+)\2$/; + var profileNameBlockList = ["__proto__", "profile __proto__"]; + var parseIni = (iniData) => { + const map = {}; + let currentSection; + let currentSubSection; + for (const iniLine of iniData.split(/\r?\n/)) { + const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); + const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; + if (isSection) { + currentSection = undefined; + currentSubSection = undefined; + const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); + const matches = prefixKeyRegex.exec(sectionName); + if (matches) { + const [, prefix, , name] = matches; + if (Object.values(IniSectionType).includes(prefix)) { + currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); + } + } else { + currentSection = sectionName; + } + if (profileNameBlockList.includes(sectionName)) { + throw new Error(`Found invalid profile name "${sectionName}"`); + } + } else if (currentSection) { + const indexOfEqualsSign = trimmedLine.indexOf("="); + if (![0, -1].includes(indexOfEqualsSign)) { + const [name, value] = [ + trimmedLine.substring(0, indexOfEqualsSign).trim(), + trimmedLine.substring(indexOfEqualsSign + 1).trim() + ]; + if (value === "") { + currentSubSection = name; + } else { + if (currentSubSection && iniLine.trimStart() === iniLine) { + currentSubSection = undefined; + } + map[currentSection] = map[currentSection] || {}; + const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; + map[currentSection][key] = value; + } + } + } + } + return map; + }; + var filePromises = {}; + var fileIntercept = {}; + var readFile = (path, options) => { + if (fileIntercept[path] !== undefined) { + return fileIntercept[path]; + } + if (!filePromises[path] || options?.ignoreCache) { + filePromises[path] = readFile$1(path, "utf8"); + } + return filePromises[path]; + }; + var swallowError$1 = () => ({}); + var loadSharedConfigFiles = async (init = {}) => { + const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; + const homeDir = getHomeDir(); + const relativeHomeDirPrefix = "~/"; + let resolvedFilepath = filepath; + if (filepath.startsWith(relativeHomeDirPrefix)) { + resolvedFilepath = join(homeDir, filepath.slice(2)); + } + let resolvedConfigFilepath = configFilepath; + if (configFilepath.startsWith(relativeHomeDirPrefix)) { + resolvedConfigFilepath = join(homeDir, configFilepath.slice(2)); + } + const parsedFiles = await Promise.all([ + readFile(resolvedConfigFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).then(getConfigData).catch(swallowError$1), + readFile(resolvedFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).catch(swallowError$1) + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1] + }; + }; + var getSsoSessionData = (data) => Object.entries(data).filter(([key]) => key.startsWith(IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); + var swallowError = () => ({}); + var loadSsoSessionData = async (init = {}) => readFile(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError); + var mergeConfigFiles = (...files) => { + const merged = {}; + for (const file of files) { + for (const [key, values] of Object.entries(file)) { + if (merged[key] !== undefined) { + Object.assign(merged[key], values); + } else { + merged[key] = values; + } + } + } + return merged; + }; + var parseKnownFiles = async (init) => { + const parsedFiles = await loadSharedConfigFiles(init); + return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); + }; + var externalDataInterceptor = { + getFileRecord() { + return fileIntercept; + }, + interceptFile(path, contents) { + fileIntercept[path] = Promise.resolve(contents); + }, + getTokenRecord() { + return tokenIntercept; + }, + interceptToken(id, contents) { + tokenIntercept[id] = contents; + } + }; + function getSelectorName(functionString) { + try { + const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); + constants.delete("CONFIG"); + constants.delete("CONFIG_PREFIX_SEPARATOR"); + constants.delete("ENV"); + return [...constants].join(", "); + } catch (ignored) { + return functionString; + } + } + var fromEnv = (envVarSelector, options) => async () => { + try { + const config = envVarSelector(process.env, options); + if (config === undefined) { + throw new Error; + } + return config; + } catch (e) { + throw new CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger }); + } + }; + var fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = getProfileName(init); + const { configFile, credentialsFile } = await loadSharedConfigFiles(init); + const profileFromCredentials = credentialsFile[profile] || {}; + const profileFromConfig = configFile[profile] || {}; + const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials }; + try { + const cfgFile = preferredFile === "config" ? configFile : credentialsFile; + const configValue = configSelector(mergedProfile, cfgFile); + if (configValue === undefined) { + throw new Error; + } + return configValue; + } catch (e) { + throw new CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger }); + } + }; + var isFunction = (func) => typeof func === "function"; + var fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : fromValue(defaultValue); + var loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { + const { signingName, logger } = configuration; + const envOptions = { signingName, logger }; + return memoize(chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))); + }; + var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; + var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; + var DEFAULT_USE_DUALSTACK_ENDPOINT = false; + var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG), + default: false + }; + var nodeDualstackConfigSelectors = { + environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG), + default: undefined + }; + var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; + var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; + var DEFAULT_USE_FIPS_ENDPOINT = false; + var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG), + default: false + }; + var nodeFipsConfigSelectors = { + environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG), + default: undefined + }; + var resolveCustomEndpointsConfig = (input) => { + const { tls, endpoint, urlParser, useDualstackEndpoint } = input; + return Object.assign(input, { + tls: tls ?? true, + endpoint: normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), + isCustomEndpoint: true, + useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false) + }); + }; + var getEndpointFromRegion = async (input) => { + const { tls = true } = input; + const region = await input.region(); + const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); + if (!dnsHostRegex.test(region)) { + throw new Error("Invalid region in client config"); + } + const useDualstackEndpoint = await input.useDualstackEndpoint(); + const useFipsEndpoint = await input.useFipsEndpoint(); + const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; + if (!hostname) { + throw new Error("Cannot resolve hostname from client config"); + } + return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); + }; + var resolveEndpointsConfig = (input) => { + const useDualstackEndpoint = normalizeProvider(input.useDualstackEndpoint ?? false); + const { endpoint, useFipsEndpoint, urlParser, tls } = input; + return Object.assign(input, { + tls: tls ?? true, + endpoint: endpoint ? normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: !!endpoint, + useDualstackEndpoint + }); + }; + var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; + var AWS_REGION_ENV = "AWS_REGION"; + var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; + var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; + var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; + var IMDS_REGION_PATH = "/latest/meta-data/placement/region"; + var IMDS_TOKEN_PATH = "/latest/api/token"; + var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; + var X_AWS_EC2_METADATA_TOKEN_TTL = "x-aws-ec2-metadata-token-ttl-seconds"; + var TIMEOUT_MS = 1000; + var NEG_CACHE_TTL_MS = 60000; + var negativeCacheUntil = 0; + var getInstanceMetadataRegion = async () => { + if (process.env[ENV_IMDS_DISABLED]) { + return; + } + if (Date.now() < negativeCacheUntil) { + return; + } + try { + const endpoint = resolveImdsEndpoint(); + const token = (await imdsRequest({ + ...endpoint, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + [X_AWS_EC2_METADATA_TOKEN_TTL]: "21600" + } + })).toString(); + const region = (await imdsRequest({ + ...endpoint, + path: IMDS_REGION_PATH, + method: "GET", + headers: { + [X_AWS_EC2_METADATA_TOKEN]: token + } + })).toString().trim(); + return region || cacheNegativeAndReturnUndefined(); + } catch { + return cacheNegativeAndReturnUndefined(); + } + }; + var cacheNegativeAndReturnUndefined = () => { + negativeCacheUntil = Date.now() + NEG_CACHE_TTL_MS; + return; + }; + var resolveImdsEndpoint = () => { + const envEndpoint = process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT; + if (envEndpoint) { + const url = new URL(envEndpoint); + return { + hostname: url.hostname.replace(/^\[(.+)]$/, "$1"), + port: url.port ? Number(url.port) : undefined + }; + } + if (process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE === "IPv6") { + return { hostname: "fd00:ec2::254" }; + } + return { hostname: "169.254.169.254" }; + }; + var imdsRequest = async (options) => { + const { request } = __require("node:http"); + return new Promise((resolve, reject) => { + const req = request({ + hostname: options.hostname, + port: options.port, + path: options.path, + method: options.method, + headers: options.headers, + timeout: TIMEOUT_MS, + signal: AbortSignal.timeout(TIMEOUT_MS) + }); + req.on("error", (err) => { + reject(err); + req.destroy(); + }); + req.on("timeout", () => { + reject(new Error("TimeoutError from instance metadata service")); + req.destroy(); + }); + req.on("response", (res) => { + const { statusCode = 400 } = res; + if (statusCode < 200 || statusCode >= 300) { + reject(Object.assign(new Error("Error response received from instance metadata service"), { statusCode })); + req.destroy(); + return; + } + const chunks = []; + res.on("data", (chunk) => chunks.push(chunk)); + res.on("end", () => { + resolve(Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); + }; + var REGION_ENV_NAME = "AWS_REGION"; + var REGION_INI_NAME = "region"; + var NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: async () => { + const region = await getInstanceMetadataRegion(); + if (region) { + return region; + } + throw new Error("Region is missing"); + } + }; + var NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials" + }; + var validRegions = new Set; + var checkRegion = (region, check = isValidHostLabel) => { + if (!validRegions.has(region) && !check(region)) { + if (region === "*") { + console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`); + } else { + throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`); + } + } else { + validRegions.add(region); + } + }; + var isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); + var getRealRegion = (region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region; + var resolveRegionConfig = (input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return Object.assign(input, { + region: async () => { + const providedRegion = typeof region === "function" ? await region() : region; + const realRegion = getRealRegion(providedRegion); + checkRegion(realRegion); + return realRegion; + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + } + }); + }; + var getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))?.hostname; + var getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : undefined; + var getResolvedPartition = (region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws"; + var getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { + if (signingRegion) { + return signingRegion; + } else if (useFipsEndpoint) { + const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); + const regionRegexmatchArray = hostname.match(regionRegexJs); + if (regionRegexmatchArray) { + return regionRegexmatchArray[0].slice(1, -1); + } + } + }; + var getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash }) => { + const partition = getResolvedPartition(region, { partitionHash }); + const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region; + const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; + const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions); + const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions); + const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); + if (hostname === undefined) { + throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); + } + const signingRegion = getResolvedSigningRegion(hostname, { + signingRegion: regionHash[resolvedRegion]?.signingRegion, + regionRegex: partitionHash[partition].regionRegex, + useFipsEndpoint + }); + return { + partition, + signingService, + hostname, + ...signingRegion && { signingRegion }, + ...regionHash[resolvedRegion]?.signingService && { + signingService: regionHash[resolvedRegion].signingService + } + }; + }; + var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; + var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; + var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + return env[AWS_DEFAULTS_MODE_ENV]; + }, + configFileSelector: (profile) => { + return profile[AWS_DEFAULTS_MODE_CONFIG]; + }, + default: "legacy" + }; + var resolveDefaultsModeConfig = ({ region = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => memoize(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode?.toLowerCase()) { + case "auto": + return resolveNodeDefaultsModeAuto(region); + case "in-region": + case "cross-region": + case "mobile": + case "standard": + case "legacy": + return Promise.resolve(mode?.toLocaleLowerCase()); + case undefined: + return Promise.resolve("legacy"); + default: + throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); + } + }); + var resolveNodeDefaultsModeAuto = async (clientRegion) => { + if (clientRegion) { + const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; + const inferredRegion = await inferPhysicalRegion(); + if (!inferredRegion) { + return "standard"; + } + if (resolvedRegion === inferredRegion) { + return "in-region"; + } else { + return "cross-region"; + } + } + return "standard"; + }; + var inferPhysicalRegion = async () => { + if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { + return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; + } + return getInstanceMetadataRegion(); + }; + exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; + exports.CONFIG_USE_DUALSTACK_ENDPOINT = CONFIG_USE_DUALSTACK_ENDPOINT; + exports.CONFIG_USE_FIPS_ENDPOINT = CONFIG_USE_FIPS_ENDPOINT; + exports.CredentialsProviderError = CredentialsProviderError; + exports.DEFAULT_PROFILE = DEFAULT_PROFILE; + exports.DEFAULT_USE_DUALSTACK_ENDPOINT = DEFAULT_USE_DUALSTACK_ENDPOINT; + exports.DEFAULT_USE_FIPS_ENDPOINT = DEFAULT_USE_FIPS_ENDPOINT; + exports.ENV_PROFILE = ENV_PROFILE; + exports.ENV_USE_DUALSTACK_ENDPOINT = ENV_USE_DUALSTACK_ENDPOINT; + exports.ENV_USE_FIPS_ENDPOINT = ENV_USE_FIPS_ENDPOINT; + exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS; + exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS; + exports.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS; + exports.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS; + exports.ProviderError = ProviderError; + exports.REGION_ENV_NAME = REGION_ENV_NAME; + exports.REGION_INI_NAME = REGION_INI_NAME; + exports.SelectorType = SelectorType; + exports.TokenProviderError = TokenProviderError; + exports.booleanSelector = booleanSelector; + exports.chain = chain; + exports.externalDataInterceptor = externalDataInterceptor; + exports.fromStatic = fromStatic; + exports.fromValue = fromValue; + exports.getHomeDir = getHomeDir; + exports.getProfileName = getProfileName; + exports.getRegionInfo = getRegionInfo; + exports.getSSOTokenFilepath = getSSOTokenFilepath; + exports.getSSOTokenFromFile = getSSOTokenFromFile; + exports.loadConfig = loadConfig; + exports.loadSharedConfigFiles = loadSharedConfigFiles; + exports.loadSsoSessionData = loadSsoSessionData; + exports.memoize = memoize; + exports.nodeDualstackConfigSelectors = nodeDualstackConfigSelectors; + exports.nodeFipsConfigSelectors = nodeFipsConfigSelectors; + exports.numberSelector = numberSelector; + exports.parseKnownFiles = parseKnownFiles; + exports.readFile = readFile; + exports.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig; + exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig; + exports.resolveEndpointsConfig = resolveEndpointsConfig; + exports.resolveRegionConfig = resolveRegionConfig; +}); + +// node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +var require_endpoints = __commonJS(function(exports) { + var { CONFIG_PREFIX_SEPARATOR, booleanSelector, SelectorType, loadConfig } = require_config(); + var { toEndpointV1, getSmithyContext, normalizeProvider, isValidHostLabel, hasOwn } = require_transport(); + exports.isValidHostLabel = isValidHostLabel; + exports.middlewareEndpointToEndpointV1 = toEndpointV1; + exports.toEndpointV1 = toEndpointV1; + var { EndpointURLScheme } = require_dist_cjs(); + var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; + var CONFIG_ENDPOINT_URL = "endpoint_url"; + var getEndpointUrlConfig = (serviceId) => ({ + environmentVariableSelector: (env) => { + const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); + const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; + if (serviceEndpointUrl) + return serviceEndpointUrl; + const endpointUrl = env[ENV_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return; + }, + configFileSelector: (profile, config) => { + if (profile.services) { + const servicesSectionKey = ["services", profile.services].join(CONFIG_PREFIX_SEPARATOR); + if (!config || !config[servicesSectionKey]) { + throw new Error(`The services section "${profile.services}" specified in the profile is not present in the shared configuration file.`); + } + const servicesSection = config[servicesSectionKey]; + const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); + const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(CONFIG_PREFIX_SEPARATOR)]; + if (endpointUrl) + return endpointUrl; + } + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return; + }, + default: undefined + }); + var ENV_IGNORE_CONFIGURED_ENDPOINT_URLS = "AWS_IGNORE_CONFIGURED_ENDPOINT_URLS"; + var CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS = "ignore_configured_endpoint_urls"; + var ignoreConfiguredEndpointUrlsConfigSelectors = { + environmentVariableSelector: (env) => booleanSelector(env, ENV_IGNORE_CONFIGURED_ENDPOINT_URLS, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS, SelectorType.CONFIG), + default: false + }; + var getEndpointFromConfig = async (serviceId) => { + const ignore = await loadConfig(ignoreConfiguredEndpointUrlsConfigSelectors)(); + if (ignore) { + return; + } + return loadConfig(getEndpointUrlConfig(serviceId ?? ""))(); + }; + var resolveParamsForS3 = async (endpointParams) => { + const bucket = endpointParams?.Bucket || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); + } + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; + }; + var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/; + var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; + var DOTS_PATTERN = /\.\./; + var isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName); + var isArnBucketName = (bucketName) => { + const [arn, partition, service, , , bucket] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = Boolean(isArn && partition && service && bucket); + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return isValidArn; + }; + var createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => { + const configProvider = async () => { + let configValue; + if (isClientContextParam) { + const clientContextParams = config.clientContextParams; + const nestedValue = clientContextParams?.[configKey]; + configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey]; + } else { + configValue = config[configKey] ?? config[canonicalEndpointParamKey]; + } + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }; + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; + return configValue; + }; + } + if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = credentials?.accountId ?? credentials?.AccountId; + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + if (config.isCustomEndpoint === false) { + return; + } + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname, port, path } = endpoint; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; + } + } + return endpoint; + }; + } + return configProvider; + }; + function bindGetEndpointFromInstructions(getEndpointFromConfig) { + return async (commandInput, instructionsSupplier, clientConfig, context) => { + if (!clientConfig.isCustomEndpoint && !clientConfig.ignoreConfiguredEndpointUrls) { + let endpointFromConfig; + if (clientConfig.serviceConfiguredEndpoint) { + endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); + } else { + endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId); + } + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + clientConfig.isCustomEndpoint = true; + context?.logger?.debug?.(`@smithy/core/endpoints - resolved endpoint from config: ${endpointFromConfig}`); + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context); + if (clientConfig.isCustomEndpoint && clientConfig.endpoint) { + const customEndpoint = await clientConfig.endpoint(); + if (customEndpoint?.headers) { + endpoint.headers ??= {}; + for (const [name, value] of Object.entries(customEndpoint.headers)) { + endpoint.headers[name] = Array.isArray(value) ? value : [value]; + } + } + } + return endpoint; + }; + } + var resolveParams = async (commandInput, instructionsSupplier, clientConfig) => { + const endpointParams = {}; + const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")(); + break; + case "operationContextParams": + endpointParams[name] = instruction.get(commandInput); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; + }; + function setFeature(context, feature, value) { + if (!context.__smithy_context) { + context.__smithy_context = { features: {} }; + } else if (!context.__smithy_context.features) { + context.__smithy_context.features = {}; + } + context.__smithy_context.features[feature] = value; + } + function bindEndpointMiddleware(getEndpointFromConfig) { + const getEndpointFromInstructions = bindGetEndpointFromInstructions(getEndpointFromConfig); + return ({ config, instructions }) => { + return (next, context) => async (args) => { + if (config.isCustomEndpoint) { + setFeature(context, "ENDPOINT_OVERRIDE", "N"); + } + const endpoint = await getEndpointFromInstructions(args.input, { + getEndpointParameterInstructions() { + return instructions; + } + }, { ...config }, context); + context.endpointV2 = endpoint; + context.authSchemes = endpoint.properties?.authSchemes; + const authScheme = context.authSchemes?.[0]; + if (authScheme) { + context["signing_region"] = authScheme.signingRegion; + context["signing_service"] = authScheme.signingName; + const smithyContext = getSmithyContext(context); + const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet + }, authScheme.properties); + } + } + return next({ + ...args + }); + }; + }; + } + var serializerMiddlewareOption = { + name: "serializerMiddleware" + }; + var endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: serializerMiddlewareOption.name + }; + function bindGetEndpointPlugin(getEndpointFromConfig) { + const endpointMiddleware = bindEndpointMiddleware(getEndpointFromConfig); + return (config, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(endpointMiddleware({ + config, + instructions + }), endpointMiddlewareOptions); + } + }); + } + function bindResolveEndpointConfig(getEndpointFromConfig) { + return (input) => { + const tls = input.tls ?? true; + const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await normalizeProvider(endpoint)()) : undefined; + const isCustomEndpoint = !!endpoint; + const resolvedConfig = Object.assign(input, { + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false), + useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false), + ignoreConfiguredEndpointUrls: !!input.ignoreConfiguredEndpointUrls + }); + let configuredEndpointPromise = undefined; + resolvedConfig.serviceConfiguredEndpoint = async () => { + if (input.serviceId && !configuredEndpointPromise) { + configuredEndpointPromise = getEndpointFromConfig(input.serviceId); + } + return configuredEndpointPromise; + }; + return resolvedConfig; + }; + } + + class BinaryDecisionDiagram { + nodes; + root; + conditions; + results; + constructor(bdd, root, conditions, results) { + this.nodes = bdd; + this.root = root; + this.conditions = conditions; + this.results = results; + } + static from(bdd, root, conditions, results) { + return new BinaryDecisionDiagram(bdd, root, conditions, results); + } + } + + class EndpointCache { + capacity; + data = new Map; + parameters = []; + constructor({ size, params }) { + this.capacity = size ?? 50; + if (params) { + this.parameters = params; + } + } + get(endpointParams, resolver) { + const key = this.hash(endpointParams); + if (key === false) { + return resolver(); + } + if (!this.data.has(key)) { + if (this.data.size > this.capacity + 10) { + const keys = this.data.keys(); + let i = 0; + while (true) { + const { value, done } = keys.next(); + this.data.delete(value); + if (done || ++i > 10) { + break; + } + } + } + this.data.set(key, resolver()); + } + return this.data.get(key); + } + size() { + return this.data.size; + } + hash(endpointParams) { + let buffer = ""; + const { parameters } = this; + if (parameters.length === 0) { + return false; + } + for (const param of parameters) { + const val = String(endpointParams[param] ?? ""); + if (val.includes("|;")) { + return false; + } + buffer += val + "|;"; + } + return buffer; + } + } + + class EndpointError extends Error { + constructor(message) { + super(message); + this.name = "EndpointError"; + } + } + var debugId = "endpoints"; + function toDebugString(input) { + if (typeof input !== "object" || input == null) { + return input; + } + if ("ref" in input) { + return `$${toDebugString(input.ref)}`; + } + if ("fn" in input) { + return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; + } + return JSON.stringify(input, null, 2); + } + var customEndpointFunctions = {}; + var booleanEquals = (value1, value2) => value1 === value2; + function coalesce(...args) { + for (const arg of args) { + if (arg != null) { + return arg; + } + } + return; + } + var getAttrPathList = (path) => { + const parts = path.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new EndpointError(`Path: '${path}' does not end with ']'`); + } + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); + } + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); + } + pathList.push(arrayIndex); + } else { + pathList.push(part); + } + } + return pathList; + }; + var getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); + } else if (Array.isArray(acc)) { + const i = parseInt(index); + return acc[i < 0 ? acc.length + i : i]; + } + return acc[index]; + }, value); + var isSet = (value) => value != null; + function ite(condition, trueValue, falseValue) { + return condition ? trueValue : falseValue; + } + var not = (value) => !value; + var IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); + var isIpAddress = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"); + var DEFAULT_PORTS = { + [EndpointURLScheme.HTTP]: 80, + [EndpointURLScheme.HTTPS]: 443 + }; + var parseURL = (value) => { + const whatwgURL = (() => { + try { + if (value instanceof URL) { + return value; + } + if (typeof value === "object" && "hostname" in value) { + const { hostname, port, protocol = "", path = "", query = {} } = value; + const url = new URL(`${protocol}//${hostname}${port ? `:${port}` : ""}${path}`); + url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&"); + return url; + } + return new URL(value); + } catch (ignored) { + return null; + } + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; + } + const urlString = whatwgURL.href; + const { host, hostname, pathname, protocol, search } = whatwgURL; + if (search) { + return null; + } + const scheme = protocol.slice(0, -1); + if (!Object.values(EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = isIpAddress(hostname); + const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`); + const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; + return { + scheme, + authority, + path: pathname, + normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, + isIp + }; + }; + function split(value, delimiter, limit) { + if (limit === 1) { + return [value]; + } + if (value === "") { + return [""]; + } + const parts = value.split(delimiter); + if (limit === 0) { + return parts; + } + return parts.slice(0, limit - 1).concat(parts.slice(1).join(delimiter)); + } + var stringEquals = (value1, value2) => value1 === value2; + var substring = (input, start, stop, reverse) => { + if (input == null || start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) { + return null; + } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); + }; + var uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`); + var endpointFunctions = { + booleanEquals, + coalesce, + getAttr, + isSet, + isValidHostLabel, + ite, + not, + parseURL, + split, + stringEquals, + substring, + uriEncode + }; + var evaluateTemplate = (template, options) => { + const evaluatedTemplateArr = []; + const { referenceRecord, endpointParams } = options; + let currentIndex = 0; + while (currentIndex < template.length) { + const openingBraceIndex = template.indexOf("{", currentIndex); + if (openingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(currentIndex)); + break; + } + evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); + const closingBraceIndex = template.indexOf("}", openingBraceIndex); + if (closingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(openingBraceIndex)); + break; + } + if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { + evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); + currentIndex = closingBraceIndex + 2; + } + const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); + if (parameterName.includes("#")) { + const [refName, attrName] = parameterName.split("#"); + evaluatedTemplateArr.push(getAttr(referenceRecord[refName] ?? endpointParams[refName], attrName)); + } else { + evaluatedTemplateArr.push(referenceRecord[parameterName] ?? endpointParams[parameterName]); + } + currentIndex = closingBraceIndex + 1; + } + return evaluatedTemplateArr.join(""); + }; + var getReferenceValue = ({ ref }, options) => { + return options.referenceRecord[ref] ?? options.endpointParams[ref]; + }; + var evaluateExpression = (obj, keyName, options) => { + if (typeof obj === "string") { + return evaluateTemplate(obj, options); + } else if (obj["fn"]) { + return group$2.callFunction(obj, options); + } else if (obj["ref"]) { + return getReferenceValue(obj, options); + } + throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); + }; + var callFunction = ({ fn, argv }, options) => { + const evaluatedArgs = Array(argv.length); + for (let i = 0;i < evaluatedArgs.length; ++i) { + const arg = argv[i]; + if (typeof arg === "boolean" || typeof arg === "number") { + evaluatedArgs[i] = arg; + } else { + evaluatedArgs[i] = group$2.evaluateExpression(arg, "arg", options); + } + } + const namespaceSeparatorIndex = fn.indexOf("."); + if (namespaceSeparatorIndex !== -1) { + const namespaceFunctions = customEndpointFunctions[fn.slice(0, namespaceSeparatorIndex)]; + const customFunction = namespaceFunctions?.[fn.slice(namespaceSeparatorIndex + 1)]; + if (typeof customFunction === "function") { + return customFunction(...evaluatedArgs); + } + } + const callable = endpointFunctions[fn]; + if (typeof callable === "function") { + return callable(...evaluatedArgs); + } + throw new Error(`function ${fn} not loaded in endpointFunctions.`); + }; + var group$2 = { + evaluateExpression, + callFunction + }; + var evaluateCondition = (condition, options) => { + const { assign } = condition; + if (assign && assign in options.referenceRecord) { + throw new EndpointError(`'${assign}' is already defined in Reference Record.`); + } + const value = callFunction(condition, options); + options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(condition)} = ${toDebugString(value)}`); + const result = value === "" ? true : !!value; + if (assign != null) { + return { result, toAssign: { name: assign, value } }; + } + return { result }; + }; + var getEndpointHeaders = (headers, options) => Object.entries(headers ?? {}).reduce((acc, [headerKey, headerVal]) => { + acc[headerKey] = headerVal.map((headerValEntry) => { + const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); + if (typeof processedExpr !== "string") { + throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }); + return acc; + }, {}); + var getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => { + acc[propertyKey] = group$1.getEndpointProperty(propertyVal, options); + return acc; + }, {}); + var getEndpointProperty = (property, options) => { + if (Array.isArray(property)) { + return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); + } + switch (typeof property) { + case "string": + return evaluateTemplate(property, options); + case "object": + if (property === null) { + throw new EndpointError(`Unexpected endpoint property: ${property}`); + } + return group$1.getEndpointProperties(property, options); + case "boolean": + return property; + default: + throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); + } + }; + var group$1 = { + getEndpointProperty, + getEndpointProperties + }; + var getEndpointUrl = (endpointUrl, options) => { + const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } catch (error) { + console.error(`Failed to construct URL with ${expression}`, error); + throw error; + } + } + throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); + }; + var RESULT = 1e8; + var decideEndpoint = (bdd, options) => { + const { nodes, root, results, conditions } = bdd; + let ref = root; + const referenceRecord = {}; + const closure = { + referenceRecord, + endpointParams: options.endpointParams, + logger: options.logger + }; + while (ref !== 1 && ref !== -1 && ref < RESULT) { + const node_i = 3 * (Math.abs(ref) - 1); + const [condition_i, highRef, lowRef] = [nodes[node_i], nodes[node_i + 1], nodes[node_i + 2]]; + const [fn, argv, assign] = conditions[condition_i]; + const evaluation = evaluateCondition({ fn, assign, argv }, closure); + if (evaluation.toAssign) { + const { name, value } = evaluation.toAssign; + referenceRecord[name] = value; + } + ref = ref >= 0 === evaluation.result ? highRef : lowRef; + } + if (ref >= RESULT) { + const result = results[ref - RESULT]; + if (result[0] === -1) { + const [, errorExpression] = result; + throw new EndpointError(evaluateExpression(errorExpression, "Error", closure)); + } + const [url, properties, headers] = result; + return { + url: getEndpointUrl(url, closure), + properties: getEndpointProperties(properties, closure), + headers: getEndpointHeaders(headers ?? {}, closure) + }; + } + throw new EndpointError(`No matching endpoint.`); + }; + var evaluateConditions = (conditions = [], options) => { + const conditionsReferenceRecord = {}; + const conditionOptions = { + ...options, + referenceRecord: { ...options.referenceRecord } + }; + let didAssign = false; + for (const condition of conditions) { + const { result, toAssign } = evaluateCondition(condition, conditionOptions); + if (!result) { + return { result }; + } + if (toAssign) { + didAssign = true; + conditionsReferenceRecord[toAssign.name] = toAssign.value; + conditionOptions.referenceRecord[toAssign.name] = toAssign.value; + options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); + } + } + if (didAssign) { + return { result: true, referenceRecord: conditionsReferenceRecord }; + } + return { result: true }; + }; + var evaluateEndpointRule = (endpointRule, options) => { + const { conditions, endpoint } = endpointRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const endpointRuleOptions = referenceRecord ? { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + } : options; + const { url, properties, headers } = endpoint; + options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); + const endpointToReturn = { url: getEndpointUrl(url, endpointRuleOptions) }; + if (headers != null) { + endpointToReturn.headers = getEndpointHeaders(headers, endpointRuleOptions); + } + if (properties != null) { + endpointToReturn.properties = getEndpointProperties(properties, endpointRuleOptions); + } + return endpointToReturn; + }; + var evaluateErrorRule = (errorRule, options) => { + const { conditions, error } = errorRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const errorRuleOptions = referenceRecord ? { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + } : options; + throw new EndpointError(evaluateExpression(error, "Error", errorRuleOptions)); + }; + var evaluateRules = (rules, options) => { + for (const rule of rules) { + if (rule.type === "endpoint") { + const endpointOrUndefined = evaluateEndpointRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else if (rule.type === "error") { + evaluateErrorRule(rule, options); + } else if (rule.type === "tree") { + const endpointOrUndefined = group.evaluateTreeRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else { + throw new EndpointError(`Unknown endpoint rule: ${rule}`); + } + } + throw new EndpointError(`Rules evaluation failed`); + }; + var evaluateTreeRule = (treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const treeRuleOptions = referenceRecord ? { ...options, referenceRecord: { ...options.referenceRecord, ...referenceRecord } } : options; + return group.evaluateRules(rules, treeRuleOptions); + }; + var group = { + evaluateRules, + evaluateTreeRule + }; + var resolveEndpoint = (ruleSetObject, options) => { + const { endpointParams, logger } = options; + const { parameters, rules } = ruleSetObject; + options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); + for (const paramKey in parameters) { + if (!hasOwn(parameters, paramKey)) + continue; + const parameter = parameters[paramKey]; + const endpointParam = endpointParams[paramKey]; + if (endpointParam == null && parameter.default != null) { + endpointParams[paramKey] = parameter.default; + continue; + } + if (parameter.required && endpointParam == null) { + throw new EndpointError(`Missing required parameter: '${paramKey}'`); + } + } + const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} }); + options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); + return endpoint; + }; + var resolveEndpointRequiredConfig = (input) => { + const { endpoint } = input; + if (endpoint === undefined) { + input.endpoint = async () => { + throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint."); + }; + } + return input; + }; + var getEndpointFromInstructions = bindGetEndpointFromInstructions(getEndpointFromConfig); + var resolveEndpointConfig = bindResolveEndpointConfig(getEndpointFromConfig); + var endpointMiddleware = bindEndpointMiddleware(getEndpointFromConfig); + var getEndpointPlugin = bindGetEndpointPlugin(getEndpointFromConfig); + exports.BinaryDecisionDiagram = BinaryDecisionDiagram; + exports.EndpointCache = EndpointCache; + exports.EndpointError = EndpointError; + exports.customEndpointFunctions = customEndpointFunctions; + exports.decideEndpoint = decideEndpoint; + exports.endpointMiddleware = endpointMiddleware; + exports.endpointMiddlewareOptions = endpointMiddlewareOptions; + exports.getEndpointFromInstructions = getEndpointFromInstructions; + exports.getEndpointPlugin = getEndpointPlugin; + exports.isIpAddress = isIpAddress; + exports.resolveEndpoint = resolveEndpoint; + exports.resolveEndpointConfig = resolveEndpointConfig; + exports.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig; + exports.resolveParams = resolveParams; +}); + +// node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +var require_serde = __commonJS(function(exports) { + var { createHmac, createHash, getRandomValues } = __require("node:crypto"); + var { hasOwn, HttpResponse } = require_transport(); + exports.hasOwn = hasOwn; + var { ReadStream, lstatSync, fstatSync } = __require("node:fs"); + var { toEndpointV1 } = require_endpoints(); + var { Readable, Writable, PassThrough } = __require("node:stream"); + var isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; + var fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { + if (!isArrayBuffer(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + } + return Buffer.from(input, offset, length); + }; + var fromString = (input, encoding) => { + if (typeof input !== "string") { + throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + } + return encoding ? Buffer.from(input, encoding) : Buffer.from(input); + }; + var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; + var fromBase64 = (input) => { + if (input.length * 3 % 4 !== 0) { + throw new TypeError(`Incorrect padding on base64 string.`); + } + if (!BASE64_REGEX.exec(input)) { + throw new TypeError(`Invalid base64 string.`); + } + const buffer = fromString(input, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + }; + var fromUtf8$1 = (input) => { + const buf = fromString(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); + }; + var toBase64$1 = (_input) => { + let input; + if (typeof _input === "string") { + input = fromUtf8$1(_input); + } else { + input = _input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64"); + }; + function bindUint8ArrayBlobAdapter(toUtf8, fromUtf8, toBase64, fromBase64) { + return class Uint8ArrayBlobAdapter extends Uint8Array { + static fromString(source, encoding = "utf-8") { + if (typeof source === "string") { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate(fromBase64(source)); + } + return Uint8ArrayBlobAdapter.mutate(fromUtf8(source)); + } + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); + } + static mutate(source) { + Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype); + return source; + } + transformToString(encoding = "utf-8") { + if (encoding === "base64") { + return toBase64(this); + } + return toUtf8(this); + } + }; + } + var toUtf8$1 = (input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); + }; + var decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0")); + function bindV4(getRandomValues) { + if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") { + return () => crypto.randomUUID(); + } + return () => { + const rnds = new Uint8Array(16); + getRandomValues(rnds); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]]; + }; + } + var copyDocumentWithTransform = (source, _schemaRef, _transform = (_) => _) => source; + var parseBoolean = (value) => { + switch (value) { + case "true": + return true; + case "false": + return false; + default: + throw new Error(`Unable to parse boolean value "${value}"`); + } + }; + var expectBoolean = (value) => { + if (value === null || value === undefined) { + return; + } + if (typeof value === "number") { + if (value === 0 || value === 1) { + logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (value === 0) { + return false; + } + if (value === 1) { + return true; + } + } + if (typeof value === "string") { + const lower = value.toLowerCase(); + if (lower === "false" || lower === "true") { + logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (lower === "false") { + return false; + } + if (lower === "true") { + return true; + } + } + if (typeof value === "boolean") { + return value; + } + throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); + }; + var expectNumber = (value) => { + if (value === null || value === undefined) { + return; + } + if (typeof value === "string") { + const parsed = parseFloat(value); + if (!Number.isNaN(parsed)) { + if (String(parsed) !== String(value)) { + logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); + } + return parsed; + } + } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); + }; + var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); + var expectFloat32 = (value) => { + const expected = expectNumber(value); + if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; + }; + var expectLong = (value) => { + if (value === null || value === undefined) { + return; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); + }; + var expectInt = expectLong; + var expectInt32 = (value) => expectSizedInt(value, 32); + var expectShort = (value) => expectSizedInt(value, 16); + var expectByte = (value) => expectSizedInt(value, 8); + var expectSizedInt = (value, size) => { + const expected = expectLong(value); + if (expected !== undefined && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; + }; + var castInt = (value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } + }; + var expectNonNull = (value, location) => { + if (value === null || value === undefined) { + if (location) { + throw new TypeError(`Expected a non-null value for ${location}`); + } + throw new TypeError("Expected a non-null value"); + } + return value; + }; + var expectObject = (value) => { + if (value === null || value === undefined) { + return; + } + if (typeof value === "object" && !Array.isArray(value)) { + return value; + } + const receivedType = Array.isArray(value) ? "array" : typeof value; + throw new TypeError(`Expected object, got ${receivedType}: ${value}`); + }; + var expectString = (value) => { + if (value === null || value === undefined) { + return; + } + if (typeof value === "string") { + return value; + } + if (["boolean", "number", "bigint"].includes(typeof value)) { + logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); + return String(value); + } + throw new TypeError(`Expected string, got ${typeof value}: ${value}`); + }; + var expectUnion = (value) => { + if (value === null || value === undefined) { + return; + } + const asObject = expectObject(value); + const setKeys = []; + for (const k in asObject) { + if (!hasOwn(asObject, k)) + continue; + if (asObject[k] != null) { + setKeys.push(k); + } + } + if (setKeys.length === 0) { + throw new TypeError(`Unions must have exactly one non-null member. None were found.`); + } + if (setKeys.length > 1) { + throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + } + return asObject; + }; + var strictParseDouble = (value) => { + if (typeof value == "string") { + return expectNumber(parseNumber(value)); + } + return expectNumber(value); + }; + var strictParseFloat = strictParseDouble; + var strictParseFloat32 = (value) => { + if (typeof value == "string") { + return expectFloat32(parseNumber(value)); + } + return expectFloat32(value); + }; + var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; + var parseNumber = (value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); + }; + var limitedParseDouble = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectNumber(value); + }; + var handleFloat = limitedParseDouble; + var limitedParseFloat = limitedParseDouble; + var limitedParseFloat32 = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectFloat32(value); + }; + var parseFloatString = (value) => { + switch (value) { + case "NaN": + return NaN; + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + default: + throw new Error(`Unable to parse float value: ${value}`); + } + }; + var strictParseLong = (value) => { + if (typeof value === "string") { + return expectLong(parseNumber(value)); + } + return expectLong(value); + }; + var strictParseInt = strictParseLong; + var strictParseInt32 = (value) => { + if (typeof value === "string") { + return expectInt32(parseNumber(value)); + } + return expectInt32(value); + }; + var strictParseShort = (value) => { + if (typeof value === "string") { + return expectShort(parseNumber(value)); + } + return expectShort(value); + }; + var strictParseByte = (value) => { + if (typeof value === "string") { + return expectByte(parseNumber(value)); + } + return expectByte(value); + }; + var stackTraceWarning = (message) => { + return String(new TypeError(message).stack || message).split(` +`).slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join(` +`); + }; + var logger = { + warn: console.warn + }; + var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; + var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + function dateToUtcString(date) { + const year = date.getUTCFullYear(); + const month = date.getUTCMonth(); + const dayOfWeek = date.getUTCDay(); + const dayOfMonthInt = date.getUTCDate(); + const hoursInt = date.getUTCHours(); + const minutesInt = date.getUTCMinutes(); + const secondsInt = date.getUTCSeconds(); + const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; + const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; + const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; + const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; + return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`; + } + var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); + var parseRfc3339DateTime = (value) => { + if (value === null || value === undefined) { + return; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match; + const year = strictParseShort(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + }; + var RFC3339_WITH_OFFSET$1 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}:\d{2})|[zZ])$/); + var parseRfc3339DateTimeWithOffset = (value) => { + if (value === null || value === undefined) { + return; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339_WITH_OFFSET$1.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match; + const year = strictParseShort(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + if (offsetStr.toUpperCase() != "Z") { + date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr)); + } + return date; + }; + var IMF_FIXDATE$1 = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); + var RFC_850_DATE$1 = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); + var ASC_TIME$1 = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/); + var parseRfc7231DateTime = (value) => { + if (value === null || value === undefined) { + return; + } + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); + } + let match = IMF_FIXDATE$1.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + match = RFC_850_DATE$1.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds + })); + } + match = ASC_TIME$1.exec(value); + if (match) { + const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match; + return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + throw new TypeError("Invalid RFC-7231 date-time value"); + }; + var parseEpochTimestamp = (value) => { + if (value === null || value === undefined) { + return; + } + let valueAsDouble; + if (typeof value === "number") { + valueAsDouble = value; + } else if (typeof value === "string") { + valueAsDouble = strictParseDouble(value); + } else if (typeof value === "object" && value.tag === 1) { + valueAsDouble = value.value; + } else { + throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); + } + if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { + throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); + } + return new Date(Math.round(valueAsDouble * 1000)); + }; + var buildDate = (year, month, day, time) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year, adjustedMonth, day); + return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, "hour", 0, 23), parseDateValue(time.minutes, "minute", 0, 59), parseDateValue(time.seconds, "seconds", 0, 60), parseMilliseconds(time.fractionalMilliseconds))); + }; + var parseTwoDigitYear = (value) => { + const thisYear = new Date().getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; + }; + var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000; + var adjustRfc850Year = (input) => { + if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds())); + } + return input; + }; + var parseMonthByShortName = (value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; + }; + var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + var validateDayOfMonth = (year, month, day) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year)) { + maxDays = 29; + } + if (day > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); + } + }; + var isLeapYear = (year) => { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + }; + var parseDateValue = (value, type, lower, upper) => { + const dateVal = strictParseByte(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; + }; + var parseMilliseconds = (value) => { + if (value === null || value === undefined) { + return 0; + } + return strictParseFloat32("0." + value) * 1000; + }; + var parseOffsetToMilliseconds = (value) => { + const directionStr = value[0]; + let direction = 1; + if (directionStr == "+") { + direction = 1; + } else if (directionStr == "-") { + direction = -1; + } else { + throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`); + } + const hour = Number(value.substring(1, 3)); + const minute = Number(value.substring(4, 6)); + return direction * (hour * 60 + minute) * 60 * 1000; + }; + var stripLeadingZeroes = (value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); + }; + var LazyJsonString = function LazyJsonString(val) { + const str = Object.assign(new String(val), { + deserializeJSON() { + return JSON.parse(String(val)); + }, + toString() { + return String(val); + }, + toJSON() { + return String(val); + } + }); + return str; + }; + LazyJsonString.from = (object) => { + if (object && typeof object === "object" && (object instanceof LazyJsonString || ("deserializeJSON" in object))) { + return object; + } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) { + return LazyJsonString(String(object)); + } + return LazyJsonString(JSON.stringify(object)); + }; + LazyJsonString.fromObject = LazyJsonString.from; + function quoteHeader(part) { + if (part.includes(",") || part.includes('"')) { + part = `"${part.replace(/"/g, "\\\"")}"`; + } + return part; + } + var ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`; + var mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`; + var time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`; + var date = `(\\d?\\d)`; + var year = `(\\d{4})`; + var RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/); + var IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`); + var RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`); + var ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`); + var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + var _parseEpochTimestamp = (value) => { + if (value == null) { + return; + } + let num = NaN; + if (typeof value === "number") { + num = value; + } else if (typeof value === "string") { + if (!/^-?\d*\.?\d+$/.test(value)) { + throw new TypeError(`parseEpochTimestamp - numeric string invalid.`); + } + num = Number.parseFloat(value); + } else if (typeof value === "object" && value.tag === 1) { + num = value.value; + } + if (isNaN(num) || Math.abs(num) === Infinity) { + throw new TypeError("Epoch timestamps must be valid finite numbers."); + } + return new Date(Math.round(num * 1000)); + }; + var _parseRfc3339DateTimeWithOffset = (value) => { + if (value == null) { + return; + } + if (typeof value !== "string") { + throw new TypeError("RFC3339 timestamps must be strings"); + } + const matches = RFC3339_WITH_OFFSET.exec(value); + if (!matches) { + throw new TypeError(`Invalid RFC3339 timestamp format ${value}`); + } + const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches; + range(monthStr, 1, 12); + range(dayStr, 1, 31); + range(hours, 0, 23); + range(minutes, 0, 59); + range(seconds, 0, 60); + const date = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0)); + date.setUTCFullYear(Number(yearStr)); + if (offsetStr.toUpperCase() != "Z") { + const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [undefined, "+", 0, 0]; + const scalar = sign === "-" ? 1 : -1; + date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000)); + } + return date; + }; + var _parseRfc7231DateTime = (value) => { + if (value == null) { + return; + } + if (typeof value !== "string") { + throw new TypeError("RFC7231 timestamps must be strings."); + } + let day; + let month; + let year; + let hour; + let minute; + let second; + let fraction; + let matches; + if (matches = IMF_FIXDATE.exec(value)) { + [, day, month, year, hour, minute, second, fraction] = matches; + } else if (matches = RFC_850_DATE.exec(value)) { + [, day, month, year, hour, minute, second, fraction] = matches; + year = (Number(year) + 1900).toString(); + } else if (matches = ASC_TIME.exec(value)) { + [, month, day, hour, minute, second, fraction, year] = matches; + } + if (year && second) { + const timestamp = Date.UTC(Number(year), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0); + range(day, 1, 31); + range(hour, 0, 23); + range(minute, 0, 59); + range(second, 0, 60); + const date = new Date(timestamp); + date.setUTCFullYear(Number(year)); + return date; + } + throw new TypeError(`Invalid RFC7231 date-time value ${value}.`); + }; + function range(v, min, max) { + const _v = Number(v); + if (_v < min || _v > max) { + throw new Error(`Value ${_v} out of range [${min}, ${max}]`); + } + } + function splitEvery(value, delimiter, numDelimiters) { + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + } + const segments = value.split(delimiter); + if (numDelimiters === 1) { + return segments; + } + const compoundSegments = []; + let currentSegment = ""; + for (let i = 0;i < segments.length; i++) { + if (currentSegment === "") { + currentSegment = segments[i]; + } else { + currentSegment += delimiter + segments[i]; + } + if ((i + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; + } + } + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; + } + var splitHeader = (value) => { + const z = value.length; + const values = []; + let withinQuotes = false; + let prevChar = undefined; + let anchor = 0; + for (let i = 0;i < z; ++i) { + const char = value[i]; + switch (char) { + case `"`: + if (prevChar !== "\\") { + withinQuotes = !withinQuotes; + } + break; + case ",": + if (!withinQuotes) { + values.push(value.slice(anchor, i)); + anchor = i + 1; + } + break; + } + prevChar = char; + } + values.push(value.slice(anchor)); + return values.map((v) => { + v = v.trim(); + const z = v.length; + if (z < 2) { + return v; + } + if (v[0] === `"` && v[z - 1] === `"`) { + v = v.slice(1, z - 1); + } + return v.replace(/\\"/g, '"'); + }); + }; + var format = /^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/; + + class NumericValue { + string; + type; + constructor(string, type) { + this.string = string; + this.type = type; + if (!format.test(string)) { + throw new Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${string}"`); + } + } + toString() { + return this.string; + } + static [Symbol.hasInstance](object) { + if (!object || typeof object !== "object") { + return false; + } + const _nv = object; + return NumericValue.prototype.isPrototypeOf(object) || _nv.type === "bigDecimal" && format.test(_nv.string); + } + } + function nv(input) { + return new NumericValue(String(input), "bigDecimal"); + } + var SHORT_TO_HEX = {}; + var HEX_TO_SHORT = {}; + for (let i = 0;i < 256; i++) { + let encodedByte = i.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i] = encodedByte; + HEX_TO_SHORT[encodedByte] = i; + } + function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i = 0;i < encoded.length; i += 2) { + const encodedByte = encoded.slice(i, i + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i / 2] = HEX_TO_SHORT[encodedByte]; + } else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; + } + function toHex(bytes) { + let out = ""; + for (let i = 0;i < bytes.byteLength; i++) { + out += SHORT_TO_HEX[bytes[i]]; + } + return out; + } + var calculateBodyLength = (body) => { + if (!body) { + return 0; + } + if (typeof body === "string") { + return Buffer.byteLength(body); + } else if (typeof body.byteLength === "number") { + return body.byteLength; + } else if (typeof body.size === "number") { + return body.size; + } else if (typeof body.start === "number" && typeof body.end === "number") { + return body.end + 1 - body.start; + } else if (body instanceof ReadStream) { + if (body.path != null) { + return lstatSync(body.path).size; + } else if (typeof body.fd === "number") { + return fstatSync(body.fd).size; + } + } + throw new Error(`Body Length computation failed for ${body}`); + }; + var toUint8Array = (data) => { + if (data instanceof Uint8Array) { + return data; + } + if (typeof data === "string") { + return fromUtf8$1(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); + }; + function concatBytes(arrays, length) { + if (length === undefined) { + length = 0; + for (const bytes of arrays) { + length += bytes.byteLength; + } + } + const result = new Uint8Array(length); + let offset = 0; + for (const buf of arrays) { + result.set(buf, offset); + offset += buf.byteLength; + } + return result; + } + var deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => { + const { response } = await next(args); + try { + const parsed = await deserializer(response, options); + return { + response, + output: parsed + }; + } catch (error) { + Object.defineProperty(error, "$response", { + value: response, + enumerable: false, + writable: false, + configurable: false + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + try { + error.message += ` + ` + hint; + } catch (ignored) { + if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { + console.warn(hint); + } else { + context.logger?.warn?.(hint); + } + } + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } + } + try { + if (HttpResponse.isInstance(response)) { + const { headers = {} } = response; + const headerEntries = Object.entries(headers); + error.$metadata = { + httpStatusCode: response.statusCode, + requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries) + }; + } + } catch (ignored) {} + } + throw error; + } + }; + var findHeader = (pattern, headers) => { + return (headers.find(([k]) => { + return k.match(pattern); + }) || [undefined, undefined])[1]; + }; + var serializerMiddleware = (options, serializer) => (next, context) => async (args) => { + const endpointConfig = options; + const endpoint = context.endpointV2 ? async () => toEndpointV1(context.endpointV2) : endpointConfig.endpoint; + if (!endpoint) { + throw new Error("No valid endpoint provider available."); + } + const request = await serializer(args.input, { ...options, endpoint }); + return next({ + ...args, + request + }); + }; + var deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true + }; + var serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + function getSerdePlugin(config, serializer, deserializer) { + return { + applyToStack: (commandStack) => { + commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); + commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption); + } + }; + } + + class Hash { + algorithmIdentifier; + secret; + hash; + constructor(algorithmIdentifier, secret) { + this.algorithmIdentifier = algorithmIdentifier; + this.secret = secret; + this.reset(); + } + update(toHash, encoding) { + this.hash.update(toUint8Array(castSourceData(toHash, encoding))); + } + digest() { + return Promise.resolve(this.hash.digest()); + } + reset() { + this.hash = this.secret ? createHmac(this.algorithmIdentifier, castSourceData(this.secret)) : createHash(this.algorithmIdentifier); + } + } + function castSourceData(toCast, encoding) { + if (Buffer.isBuffer(toCast)) { + return toCast; + } + if (typeof toCast === "string") { + return fromString(toCast, encoding); + } + if (ArrayBuffer.isView(toCast)) { + return fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength); + } + return fromArrayBuffer(toCast); + } + var ChecksumStream$1 = class ChecksumStream extends Readable { + expectedChecksum; + checksumSourceLocation; + checksum; + source; + base64Encoder; + constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) { + super(); + if (typeof source.pipe !== "function") { + throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); + } + this.source = source; + this.base64Encoder = base64Encoder ?? toBase64$1; + this.expectedChecksum = expectedChecksum; + this.checksum = checksum; + this.checksumSourceLocation = checksumSourceLocation; + this.source.on("data", this.onSourceData); + this.source.on("end", this.onSourceEnd); + this.source.on("error", this.onSourceError); + this.source.on("close", this.onSourceClose); + this.source.pause(); + } + onSourceData = (chunk) => { + if (this.destroyed) { + return; + } + try { + this.checksum.update(chunk); + } catch (e) { + this.destroy(e); + return; + } + if (!this.push(chunk)) { + this.source.pause(); + } + }; + onSourceEnd = async () => { + if (this.destroyed) { + return; + } + try { + const digest = await this.checksum.digest(); + const received = this.base64Encoder(digest); + if (this.expectedChecksum !== received) { + this.destroy(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + ` in response header "${this.checksumSourceLocation}".`)); + return; + } + } catch (e) { + this.destroy(e); + return; + } + this.push(null); + }; + onSourceError = (error) => { + this.destroy(error); + }; + onSourceClose = () => { + if (!this.destroyed && !this.source.readableEnded) { + this.destroy(new Error("Connection lost or stream closed before all data was received.")); + } + }; + _read(_size) { + this.source.resume(); + } + _destroy(error, callback) { + this.source?.removeListener("data", this.onSourceData); + this.source?.removeListener("end", this.onSourceEnd); + this.source?.removeListener("error", this.onSourceError); + this.source?.removeListener("close", this.onSourceClose); + this.source?.destroy(); + callback(error); + } + }; + var isReadableStream = (stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream); + var isBlob = (blob) => { + return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob); + }; + var fromUtf8 = (input) => new TextEncoder().encode(input); + var chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`; + Object.entries(chars).reduce((acc, [i, c]) => { + acc[c] = Number(i); + return acc; + }, {}); + var alphabetByValue = chars.split(""); + var bitsPerLetter = 6; + var bitsPerByte = 8; + var maxLetterValue = 63; + function toBase64(_input) { + let input; + if (typeof _input === "string") { + input = fromUtf8(_input); + } else { + input = _input; + } + const isArrayLike = typeof input === "object" && typeof input.length === "number"; + const isUint8Array = typeof input === "object" && typeof input.byteOffset === "number" && typeof input.byteLength === "number"; + if (!isArrayLike && !isUint8Array) { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + let str = ""; + for (let i = 0;i < input.length; i += 3) { + let bits = 0; + let bitLength = 0; + for (let j = i, limit = Math.min(i + 3, input.length);j < limit; j++) { + bits |= input[j] << (limit - j - 1) * bitsPerByte; + bitLength += bitsPerByte; + } + const bitClusterCount = Math.ceil(bitLength / bitsPerLetter); + bits <<= bitClusterCount * bitsPerLetter - bitLength; + for (let k = 1;k <= bitClusterCount; k++) { + const offset = (bitClusterCount - k) * bitsPerLetter; + str += alphabetByValue[(bits & maxLetterValue << offset) >> offset]; + } + str += "==".slice(0, 4 - bitClusterCount); + } + return str; + } + var ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() {}; + + class ChecksumStream extends ReadableStreamRef { + } + var createChecksumStream$1 = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => { + if (!isReadableStream(source)) { + throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); + } + const encoder = base64Encoder ?? toBase64; + if (typeof TransformStream !== "function") { + throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); + } + const transform = new TransformStream({ + start() {}, + async transform(chunk, controller) { + checksum.update(chunk); + controller.enqueue(chunk); + }, + async flush(controller) { + const digest = await checksum.digest(); + const received = encoder(digest); + if (expectedChecksum !== received) { + const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}"` + ` in response header "${checksumSourceLocation}".`); + controller.error(error); + } else { + controller.terminate(); + } + } + }); + source.pipeThrough(transform); + const readable = transform.readable; + Object.setPrototypeOf(readable, ChecksumStream.prototype); + return readable; + }; + function createChecksumStream(init) { + if (typeof ReadableStream === "function" && isReadableStream(init.source)) { + return createChecksumStream$1(init); + } + return new ChecksumStream$1(init); + } + + class ByteArrayCollector { + allocByteArray; + byteLength = 0; + byteArrays = []; + constructor(allocByteArray) { + this.allocByteArray = allocByteArray; + } + push(byteArray) { + this.byteArrays.push(byteArray); + this.byteLength += byteArray.byteLength; + } + flush() { + if (this.byteArrays.length === 1) { + const bytes = this.byteArrays[0]; + this.reset(); + return bytes; + } + const aggregation = this.allocByteArray(this.byteLength); + let cursor = 0; + for (let i = 0;i < this.byteArrays.length; ++i) { + const bytes = this.byteArrays[i]; + aggregation.set(bytes, cursor); + cursor += bytes.byteLength; + } + this.reset(); + return aggregation; + } + reset() { + this.byteArrays = []; + this.byteLength = 0; + } + } + function createBufferedReadableStream(upstream, size, logger) { + const reader = upstream.getReader(); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = ["", new ByteArrayCollector((size) => new Uint8Array(size))]; + let mode = -1; + const pull = async (controller) => { + const { value, done } = await reader.read(); + const chunk = value; + if (done) { + if (mode !== -1) { + const remainder = flush(buffers, mode); + if (sizeOf(remainder) > 0) { + controller.enqueue(remainder); + } + } + controller.close(); + } else { + const chunkMode = modeOf(chunk, false); + if (mode !== chunkMode) { + if (mode >= 0) { + controller.enqueue(flush(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + controller.enqueue(chunk); + return; + } + const chunkSize = sizeOf(chunk); + bytesSeen += chunkSize; + const bufferSize = sizeOf(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + controller.enqueue(chunk); + } else { + const newSize = merge(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + controller.enqueue(flush(buffers, mode)); + } else { + await pull(controller); + } + } + } + }; + return new ReadableStream({ + pull + }); + } + function merge(buffers, mode, chunk) { + switch (mode) { + case 0: + buffers[0] += chunk; + return sizeOf(buffers[0]); + case 1: + case 2: + buffers[mode].push(chunk); + return sizeOf(buffers[mode]); + } + } + function flush(buffers, mode) { + switch (mode) { + case 0: + const s = buffers[0]; + buffers[0] = ""; + return s; + case 1: + case 2: + return buffers[mode].flush(); + } + throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); + } + function sizeOf(chunk) { + return chunk?.byteLength ?? chunk?.length ?? 0; + } + function modeOf(chunk, allowBuffer = true) { + if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { + return 2; + } + if (chunk instanceof Uint8Array) { + return 1; + } + if (typeof chunk === "string") { + return 0; + } + return -1; + } + function createBufferedReadable(upstream, size, logger) { + if (isReadableStream(upstream)) { + return createBufferedReadableStream(upstream, size, logger); + } + const downstream = new Readable({ read() {} }); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = [ + "", + new ByteArrayCollector((size) => new Uint8Array(size)), + new ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))) + ]; + let mode = -1; + upstream.on("data", (chunk) => { + const chunkMode = modeOf(chunk, true); + if (mode !== chunkMode) { + if (mode >= 0) { + downstream.push(flush(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + downstream.push(chunk); + return; + } + const chunkSize = sizeOf(chunk); + bytesSeen += chunkSize; + const bufferSize = sizeOf(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + downstream.push(chunk); + } else { + const newSize = merge(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + downstream.push(flush(buffers, mode)); + } + } + }); + upstream.on("end", () => { + if (mode !== -1) { + const remainder = flush(buffers, mode); + if (sizeOf(remainder) > 0) { + downstream.push(remainder); + } + } + downstream.push(null); + }); + return downstream; + } + var getAwsChunkedEncodingStream$1 = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== undefined && bodyLengthChecker !== undefined && checksumAlgorithmFn !== undefined && checksumLocationName !== undefined && streamHasher !== undefined; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; + const reader = readableStream.getReader(); + return new ReadableStream({ + async pull(controller) { + const { value, done } = await reader.read(); + if (done) { + controller.enqueue(`0\r +`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + controller.enqueue(`${checksumLocationName}:${checksum}\r +`); + controller.enqueue(`\r +`); + } + controller.close(); + } else { + controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r +${value}\r +`); + } + } + }); + }; + function getAwsChunkedEncodingStream(stream, options) { + const readable = stream; + const readableStream = stream; + if (isReadableStream(readableStream)) { + return getAwsChunkedEncodingStream$1(readableStream, options); + } + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== undefined && checksumAlgorithmFn !== undefined && checksumLocationName !== undefined && streamHasher !== undefined; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : undefined; + const awsChunkedEncodingStream = new Readable({ + read: () => {} + }); + readable.on("data", (data) => { + const length = bodyLengthChecker(data) || 0; + if (length === 0) { + return; + } + awsChunkedEncodingStream.push(`${length.toString(16)}\r +`); + awsChunkedEncodingStream.push(data); + awsChunkedEncodingStream.push(`\r +`); + }); + readable.on("end", async () => { + awsChunkedEncodingStream.push(`0\r +`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r +`); + awsChunkedEncodingStream.push(`\r +`); + } + awsChunkedEncodingStream.push(null); + }); + return awsChunkedEncodingStream; + } + async function headStream$1(stream, bytes) { + let byteLengthCounter = 0; + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + byteLengthCounter += value?.byteLength ?? 0; + } + if (byteLengthCounter >= bytes) { + break; + } + isDone = done; + } + reader.releaseLock(); + const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); + let offset = 0; + for (const chunk of chunks) { + if (chunk.byteLength > collected.byteLength - offset) { + collected.set(chunk.subarray(0, collected.byteLength - offset), offset); + break; + } else { + collected.set(chunk, offset); + } + offset += chunk.length; + } + return collected; + } + var headStream = (stream, bytes) => { + if (isReadableStream(stream)) { + return headStream$1(stream, bytes); + } + return new Promise((resolve, reject) => { + const collector = new Collector$1; + collector.limit = bytes; + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes = concatBytes(this.buffers); + resolve(bytes); + }); + }); + }; + var Collector$1 = class Collector extends Writable { + buffers = []; + limit = Infinity; + bytesBuffered = 0; + _write(chunk, encoding, callback) { + this.buffers.push(chunk); + this.bytesBuffered += chunk.byteLength ?? 0; + if (this.bytesBuffered >= this.limit) { + const excess = this.bytesBuffered - this.limit; + const tailBuffer = this.buffers[this.buffers.length - 1]; + this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess); + this.emit("finish"); + } + callback(); + } + }; + var toUtf8 = (input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return new TextDecoder("utf-8").decode(input); + }; + var streamCollector$1 = async (stream) => { + if (isBlob(stream)) { + return collectBlob(stream); + } + return collectReadableStream(stream); + }; + async function collectBlob(blob) { + return blob.arrayBuffer().then((ab) => new Uint8Array(ab)); + } + async function collectReadableStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let length = 0; + while (true) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + if (done) { + break; + } + } + return concatBytes(chunks, length); + } + var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1 = "The stream has already been transformed."; + var sdkStreamMixin$1 = (stream) => { + if (!isBlobInstance(stream) && !isReadableStream(stream)) { + const name = stream?.__proto__?.constructor?.name || stream; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1); + } + transformed = true; + return await streamCollector$1(stream); + }; + const blobToWebStream = (blob) => { + if (typeof blob.stream !== "function") { + throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled. +` + "If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + } + return blob.stream(); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return toBase64(buf); + } else if (encoding === "hex") { + return toHex(buf); + } else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { + return toUtf8(buf); + } else if (typeof TextDecoder === "function") { + return new TextDecoder(encoding).decode(buf); + } else { + throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1); + } + transformed = true; + if (isBlobInstance(stream)) { + return blobToWebStream(stream); + } else if (isReadableStream(stream)) { + return stream; + } else { + throw new Error(`Cannot transform payload to web stream, got ${stream}`); + } + } + }); + }; + var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; + var streamCollector = (stream) => { + if (isBlob(stream)) { + return collectBlob(stream); + } + if (isReadableStream(stream)) { + return collectReadableStream(stream); + } + return new Promise((resolve, reject) => { + const collector = new Collector; + const nodeStream = stream; + nodeStream.pipe(collector); + nodeStream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes = concatBytes(this.bufferedBytes); + resolve(bytes); + }); + }); + }; + + class Collector extends Writable { + bufferedBytes = []; + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } + } + var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + var sdkStreamMixin = (stream) => { + if (!(stream instanceof Readable)) { + try { + return sdkStreamMixin$1(stream); + } catch (ignored) { + const name = stream?.__proto__?.constructor?.name || stream; + throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); + } + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await streamCollector(stream); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === undefined || Buffer.isEncoding(encoding)) { + return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); + } else { + const decoder = new TextDecoder(encoding); + return decoder.decode(buf); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + if (stream.readableFlowing !== null) { + throw new Error("The stream has been consumed by other callbacks."); + } + if (typeof Readable.toWeb !== "function") { + throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); + } + transformed = true; + return Readable.toWeb(stream); + } + }); + }; + async function splitStream$1(stream) { + if (typeof stream.stream === "function") { + stream = stream.stream(); + } + const readableStream = stream; + return readableStream.tee(); + } + async function splitStream(stream) { + if (isReadableStream(stream) || isBlob(stream)) { + return splitStream$1(stream); + } + const stream1 = new PassThrough; + const stream2 = new PassThrough; + stream.pipe(stream1); + stream.pipe(stream2); + return [stream1, stream2]; + } + + class Uint8ArrayBlobAdapter extends bindUint8ArrayBlobAdapter(toUtf8$1, fromUtf8$1, toBase64$1, fromBase64) { + } + var _getRandomValues = getRandomValues; + var v4 = bindV4(_getRandomValues); + var generateIdempotencyToken = v4; + exports.ChecksumStream = ChecksumStream$1; + exports.Hash = Hash; + exports.LazyJsonString = LazyJsonString; + exports.NumericValue = NumericValue; + exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter; + exports._parseEpochTimestamp = _parseEpochTimestamp; + exports._parseRfc3339DateTimeWithOffset = _parseRfc3339DateTimeWithOffset; + exports._parseRfc7231DateTime = _parseRfc7231DateTime; + exports.calculateBodyLength = calculateBodyLength; + exports.concatBytes = concatBytes; + exports.copyDocumentWithTransform = copyDocumentWithTransform; + exports.createBufferedReadable = createBufferedReadable; + exports.createChecksumStream = createChecksumStream; + exports.dateToUtcString = dateToUtcString; + exports.deserializerMiddleware = deserializerMiddleware; + exports.deserializerMiddlewareOption = deserializerMiddlewareOption; + exports.expectBoolean = expectBoolean; + exports.expectByte = expectByte; + exports.expectFloat32 = expectFloat32; + exports.expectInt = expectInt; + exports.expectInt32 = expectInt32; + exports.expectLong = expectLong; + exports.expectNonNull = expectNonNull; + exports.expectNumber = expectNumber; + exports.expectObject = expectObject; + exports.expectShort = expectShort; + exports.expectString = expectString; + exports.expectUnion = expectUnion; + exports.fromArrayBuffer = fromArrayBuffer; + exports.fromBase64 = fromBase64; + exports.fromHex = fromHex; + exports.fromString = fromString; + exports.fromUtf8 = fromUtf8$1; + exports.generateIdempotencyToken = generateIdempotencyToken; + exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; + exports.getSerdePlugin = getSerdePlugin; + exports.handleFloat = handleFloat; + exports.headStream = headStream; + exports.isArrayBuffer = isArrayBuffer; + exports.isBlob = isBlob; + exports.isReadableStream = isReadableStream; + exports.limitedParseDouble = limitedParseDouble; + exports.limitedParseFloat = limitedParseFloat; + exports.limitedParseFloat32 = limitedParseFloat32; + exports.logger = logger; + exports.nv = nv; + exports.parseBoolean = parseBoolean; + exports.parseEpochTimestamp = parseEpochTimestamp; + exports.parseRfc3339DateTime = parseRfc3339DateTime; + exports.parseRfc3339DateTimeWithOffset = parseRfc3339DateTimeWithOffset; + exports.parseRfc7231DateTime = parseRfc7231DateTime; + exports.quoteHeader = quoteHeader; + exports.sdkStreamMixin = sdkStreamMixin; + exports.serializerMiddleware = serializerMiddleware; + exports.serializerMiddlewareOption = serializerMiddlewareOption; + exports.splitEvery = splitEvery; + exports.splitHeader = splitHeader; + exports.splitStream = splitStream; + exports.streamCollector = streamCollector; + exports.strictParseByte = strictParseByte; + exports.strictParseDouble = strictParseDouble; + exports.strictParseFloat = strictParseFloat; + exports.strictParseFloat32 = strictParseFloat32; + exports.strictParseInt = strictParseInt; + exports.strictParseInt32 = strictParseInt32; + exports.strictParseLong = strictParseLong; + exports.strictParseShort = strictParseShort; + exports.toBase64 = toBase64$1; + exports.toHex = toHex; + exports.toUint8Array = toUint8Array; + exports.toUtf8 = toUtf8$1; + exports.v4 = v4; +}); + +// node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +var require_checksum = __commonJS(function(exports) { + var { createReadStream } = __require("node:fs"); + var { Writable } = __require("node:stream"); + var { toUint8Array, concatBytes } = require_serde(); + var { createHash, createHmac } = __require("node:crypto"); + var zlib = __require("node:zlib"); + async function blobReader(blob, onChunk, chunkSize = 1024 * 1024) { + const size = blob.size; + let totalBytesRead = 0; + while (totalBytesRead < size) { + const slice = blob.slice(totalBytesRead, Math.min(size, totalBytesRead + chunkSize)); + onChunk(new Uint8Array(await slice.arrayBuffer())); + totalBytesRead += slice.size; + } + } + var blobHasher = async function blobHasher(hashCtor, blob) { + const hash = new hashCtor; + await blobReader(blob, (chunk) => { + hash.update(chunk); + }); + return hash.digest(); + }; + + class HashCalculator extends Writable { + hash; + constructor(hash, options) { + super(options); + this.hash = hash; + } + _write(chunk, encoding, callback) { + try { + this.hash.update(toUint8Array(chunk)); + } catch (err) { + return callback(err); + } + callback(); + } + } + var fileStreamHasher = (hashCtor, fileStream) => new Promise((resolve, reject) => { + if (!isReadStream(fileStream)) { + reject(new Error("Unable to calculate hash for non-file streams.")); + return; + } + const fileStreamTee = createReadStream(fileStream.path, { + start: fileStream.start, + end: fileStream.end + }); + const hash = new hashCtor; + const hashCalculator = new HashCalculator(hash); + fileStreamTee.pipe(hashCalculator); + fileStreamTee.on("error", (err) => { + hashCalculator.end(); + reject(err); + }); + hashCalculator.on("error", reject); + hashCalculator.on("finish", function() { + hash.digest().then(resolve).catch(reject); + }); + }); + var isReadStream = (stream) => typeof stream.path === "string"; + var readableStreamHasher = (hashCtor, readableStream) => { + if (readableStream.readableFlowing !== null) { + throw new Error("Unable to calculate hash for flowing readable stream"); + } + const hash = new hashCtor; + const hashCalculator = new HashCalculator(hash); + readableStream.pipe(hashCalculator); + return new Promise((resolve, reject) => { + readableStream.on("error", (err) => { + hashCalculator.end(); + reject(err); + }); + hashCalculator.on("error", reject); + hashCalculator.on("finish", () => { + hash.digest().then(resolve).catch(reject); + }); + }); + }; + + class Md5Js { + digestLength = 16; + state = Uint32Array.from(INIT$1); + writeBuffer = new DataView(new ArrayBuffer(64)); + bufferLength = 0; + bytesHashed = 0; + update(sourceData) { + const data = toUint8Array(sourceData); + let pos = 0; + let len = data.byteLength; + this.bytesHashed += len; + while (len > 0) { + this.writeBuffer.setUint8(this.bufferLength++, data[pos++]); + --len; + if (this.bufferLength === 64) { + compress(this.state, this.writeBuffer); + this.bufferLength = 0; + } + } + } + async digest() { + const state = Uint32Array.from(this.state); + const buf = new DataView(this.writeBuffer.buffer.slice(0)); + let bufLen = this.bufferLength; + const bits = this.bytesHashed * 8; + buf.setUint8(bufLen++, 128); + if (this.bufferLength % 64 >= 56) { + for (let i = bufLen;i < 64; ++i) { + buf.setUint8(i, 0); + } + compress(state, buf); + bufLen = 0; + } + for (let i = bufLen;i < 56; ++i) { + buf.setUint8(i, 0); + } + buf.setUint32(56, bits >>> 0, true); + buf.setUint32(60, Math.floor(bits / 2 ** 32), true); + compress(state, buf); + const out = new Uint8Array(16); + const view = new DataView(out.buffer); + for (let i = 0;i < 4; ++i) { + view.setUint32(i * 4, state[i], true); + } + return out; + } + reset() { + this.state.set(INIT$1); + this.writeBuffer = new DataView(new ArrayBuffer(64)); + this.bufferLength = 0; + this.bytesHashed = 0; + } + } + var INIT$1 = [1732584193, 4023233417, 2562383102, 271733878]; + var M = 4294967295; + var S = Uint8Array.of(7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21); + var T = Array.from({ length: 64 }, (_, i) => Math.abs(Math.sin(i + 1)) * 2 ** 32 >>> 0); + function compress(state, block) { + let a = state[0], b = state[1], c = state[2], d = state[3]; + for (let i = 0;i < 64; ++i) { + let f, g; + if (i < 16) { + f = b & c | ~b & d; + g = i; + } else if (i < 32) { + f = d & b | c & ~d; + g = (5 * i + 1) % 16; + } else if (i < 48) { + f = b ^ c ^ d; + g = (3 * i + 5) % 16; + } else { + f = c ^ (b | ~d); + g = 7 * i % 16; + } + const x = block.getUint32(g * 4, true); + const tmp = d; + d = c; + c = b; + const s = S[(i >> 4) * 4 + (i & 3)]; + const sum = (a + f & M) + (x + T[i] & M) & M; + b = b + ((sum << s | sum >>> 32 - s) >>> 0) & M; + a = tmp; + } + state[0] = state[0] + a & M; + state[1] = state[1] + b & M; + state[2] = state[2] + c & M; + state[3] = state[3] + d & M; + } + var hasNativeCrypto$1 = (() => { + try { + createHash("md5"); + return true; + } catch { + return false; + } + })(); + var Md5Node = hasNativeCrypto$1 ? buildNativeClass$2() : Md5Js; + function buildNativeClass$2() { + return class Md5Node { + digestLength = 16; + hash = createHash("md5"); + update(data) { + this.hash.update(toUint8Array(data)); + } + async digest() { + const buf = this.hash.copy().digest(); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + reset() { + this.hash = createHash("md5"); + } + }; + } + var CRC32_TABLE = new Uint32Array(256); + for (let i = 0;i < 256; ++i) { + let c = i; + for (let j = 0;j < 8; ++j) { + c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1; + } + CRC32_TABLE[i] = c >>> 0; + } + var ONES = 4294967295; + + class Crc32Js { + digestLength = 4; + checksum = ONES; + update(data) { + for (let i = 0;i < data.length; ++i) { + this.checksum = this.checksum >>> 8 ^ CRC32_TABLE[(this.checksum ^ data[i]) & 255]; + } + } + digestSync() { + return (this.checksum ^ ONES) >>> 0; + } + async digest() { + const value = this.digestSync(); + const out = new Uint8Array(4); + new DataView(out.buffer).setUint32(0, value, false); + return out; + } + reset() { + this.checksum = ONES; + } + } + var zlibCrc32 = typeof zlib.crc32 === "function" ? zlib.crc32 : undefined; + var Crc32Node = zlibCrc32 ? buildNativeClass$1(zlibCrc32) : Crc32Js; + function buildNativeClass$1(nativeCrc32) { + return class Crc32Node { + digestLength = 4; + value = 0; + update(data) { + this.value = nativeCrc32(data, this.value); + } + digestSync() { + return this.value >>> 0; + } + async digest() { + const out = new Uint8Array(4); + new DataView(out.buffer).setUint32(0, this.digestSync(), false); + return out; + } + reset() { + this.value = 0; + } + }; + } + var BLOCK = 64; + var DIGEST_LENGTH = 32; + var MAX_HASHABLE_LENGTH = 2 ** 53 - 1; + + class Sha256Js { + digestLength = DIGEST_LENGTH; + state = Int32Array.from(INIT); + w; + buffer = new Uint8Array(64); + bufferLength = 0; + bytesHashed = 0; + finished = false; + inner; + outer; + constructor(secret) { + if (secret) { + const key = Sha256Js.normalizeKey(secret); + this.inner = new Sha256Js; + this.outer = new Sha256Js; + const { inner, outer } = this; + const pad = new Uint8Array(BLOCK * 2); + for (let i = 0;i < BLOCK; ++i) { + pad[i] = 54 ^ key[i]; + pad[i + BLOCK] = 92 ^ key[i]; + } + inner.update(pad.subarray(0, BLOCK)); + outer.update(pad.subarray(BLOCK)); + } + } + update(data) { + if (this.finished) { + throw new Error("Attempted to update an already finished HMAC."); + } + if (this.inner) { + this.inner.update(data); + return; + } + const chunk = toUint8Array(data); + let position = 0; + let { byteLength } = chunk; + this.bytesHashed += byteLength; + if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) { + throw new Error("Cannot hash more than 2^53 - 1 bits"); + } + while (byteLength > 0) { + this.buffer[this.bufferLength++] = chunk[position++]; + byteLength--; + if (this.bufferLength === BLOCK) { + this.hashBuffer(); + this.bufferLength = 0; + } + } + } + async digest() { + const { inner, outer } = this; + if (inner && outer) { + if (this.finished) { + throw new Error("Attempted to digest an already finished HMAC."); + } + this.finished = true; + const innerDigest = inner.digestSync(); + outer.update(innerDigest); + return outer.digestSync(); + } + return this.digestSync(); + } + reset() { + this.state = Int32Array.from(INIT); + this.buffer = new Uint8Array(64); + this.bufferLength = 0; + this.bytesHashed = 0; + } + digestSync() { + const state = this.state.slice(); + const buffer = this.buffer.slice(); + let bufferLength = this.bufferLength; + const bitsHashed = this.bytesHashed * 8; + const bufferView = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength); + bufferView.setUint8(bufferLength++, 128); + if ((bufferLength - 1) % BLOCK >= BLOCK - 8) { + for (let i = bufferLength;i < BLOCK; ++i) { + bufferView.setUint8(i, 0); + } + this.hashBufferWith(state, buffer); + bufferLength = 0; + } + for (let i = bufferLength;i < BLOCK - 8; ++i) { + bufferView.setUint8(i, 0); + } + bufferView.setUint32(BLOCK - 8, Math.floor(bitsHashed / 4294967296), false); + bufferView.setUint32(BLOCK - 4, bitsHashed, false); + this.hashBufferWith(state, buffer); + const out = new Uint8Array(DIGEST_LENGTH); + for (let i = 0;i < 8; ++i) { + out[i * 4] = state[i] >>> 24 & 255; + out[i * 4 + 1] = state[i] >>> 16 & 255; + out[i * 4 + 2] = state[i] >>> 8 & 255; + out[i * 4 + 3] = state[i] >>> 0 & 255; + } + return out; + } + static normalizeKey(secret) { + const key = toUint8Array(secret); + if (key.byteLength > BLOCK) { + const h = new Sha256Js; + h.update(key); + const out = h.digestSync(); + const padded = new Uint8Array(BLOCK); + padded.set(out); + return padded; + } + if (key.byteLength < BLOCK) { + const padded = new Uint8Array(BLOCK); + padded.set(key); + return padded; + } + return key; + } + hashBuffer() { + this.hashBufferWith(this.state, this.buffer); + } + hashBufferWith(state, buffer) { + const w = this.w ??= new Int32Array(64); + let s0 = state[0], s1 = state[1], s2 = state[2], s3 = state[3], s4 = state[4], s5 = state[5], s6 = state[6], s7 = state[7]; + for (let i = 0;i < BLOCK; ++i) { + if (i < 16) { + w[i] = (buffer[i * 4] & 255) << 24 | (buffer[i * 4 + 1] & 255) << 16 | (buffer[i * 4 + 2] & 255) << 8 | buffer[i * 4 + 3] & 255; + } else { + let u = w[i - 2]; + const t1 = (u >>> 17 | u << 15) ^ (u >>> 19 | u << 13) ^ u >>> 10; + u = w[i - 15]; + const t2 = (u >>> 7 | u << 25) ^ (u >>> 18 | u << 14) ^ u >>> 3; + w[i] = (t1 + w[i - 7] | 0) + (t2 + w[i - 16] | 0); + } + const t1 = (((s4 >>> 6 | s4 << 26) ^ (s4 >>> 11 | s4 << 21) ^ (s4 >>> 25 | s4 << 7)) + (s4 & s5 ^ ~s4 & s6) | 0) + (s7 + (K[i] + w[i] | 0) | 0) | 0; + const t2 = ((s0 >>> 2 | s0 << 30) ^ (s0 >>> 13 | s0 << 19) ^ (s0 >>> 22 | s0 << 10)) + (s0 & s1 ^ s0 & s2 ^ s1 & s2) | 0; + s7 = s6; + s6 = s5; + s5 = s4; + s4 = s3 + t1 | 0; + s3 = s2; + s2 = s1; + s1 = s0; + s0 = t1 + t2 | 0; + } + state[0] += s0; + state[1] += s1; + state[2] += s2; + state[3] += s3; + state[4] += s4; + state[5] += s5; + state[6] += s6; + state[7] += s7; + } + } + var INIT = new Int32Array([ + 1779033703, + 3144134277, + 1013904242, + 2773480762, + 1359893119, + 2600822924, + 528734635, + 1541459225 + ]); + var K = new Int32Array([ + 1116352408, + 1899447441, + 3049323471, + 3921009573, + 961987163, + 1508970993, + 2453635748, + 2870763221, + 3624381080, + 310598401, + 607225278, + 1426881987, + 1925078388, + 2162078206, + 2614888103, + 3248222580, + 3835390401, + 4022224774, + 264347078, + 604807628, + 770255983, + 1249150122, + 1555081692, + 1996064986, + 2554220882, + 2821834349, + 2952996808, + 3210313671, + 3336571891, + 3584528711, + 113926993, + 338241895, + 666307205, + 773529912, + 1294757372, + 1396182291, + 1695183700, + 1986661051, + 2177026350, + 2456956037, + 2730485921, + 2820302411, + 3259730800, + 3345764771, + 3516065817, + 3600352804, + 4094571909, + 275423344, + 430227734, + 506948616, + 659060556, + 883997877, + 958139571, + 1322822218, + 1537002063, + 1747873779, + 1955562222, + 2024104815, + 2227730452, + 2361852424, + 2428436474, + 2756734187, + 3204031479, + 3329325298 + ]); + var hasNativeCrypto = (() => { + try { + createHash("sha256"); + return true; + } catch { + return false; + } + })(); + var Sha256Node = hasNativeCrypto ? buildNativeClass() : Sha256Js; + function buildNativeClass() { + return class Sha256Node { + digestLength = 32; + secret; + hash; + isHmac; + finished = false; + constructor(secret) { + this.secret = secret; + this.isHmac = !!secret; + this.hash = this.createHash(); + } + update(data) { + if (this.finished) { + throw new Error("Attempted to update an already finished hash."); + } + this.hash.update(data); + } + async digest() { + let buf; + if (this.isHmac) { + this.finished = true; + buf = this.hash.digest(); + } else { + buf = this.hash.copy().digest(); + } + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + reset() { + this.hash = this.createHash(); + this.finished = false; + } + createHash() { + return this.secret ? createHmac("sha256", toBuffer(this.secret)) : createHash("sha256"); + } + }; + } + function toBuffer(data) { + if (typeof data === "string") { + return data; + } + if (ArrayBuffer.isView(data)) { + return Buffer.from(data.buffer, data.byteOffset, data.byteLength); + } + return Buffer.from(data); + } + var { digest, sign, importKey } = globalThis?.crypto?.subtle ?? {}; + var subtle = typeof digest === "function" && typeof sign === "function" && typeof importKey === "function" ? globalThis.crypto.subtle : undefined; + var MAX_PENDING_BYTES = 8 * 1024 * 1024; + + class Sha256WebCrypto { + digestLength = 32; + secret; + pending = []; + pendingBytes = 0; + fallback; + finished = false; + constructor(secret) { + if (secret) { + this.secret = toUint8Array(secret); + } + } + update(data) { + if (this.finished) { + throw new Error("Attempted to update an already finished HMAC."); + } + if (this.fallback) { + this.fallback.update(data); + return; + } + this.pending.push(data.slice()); + this.pendingBytes += data.byteLength; + if (this.pendingBytes >= MAX_PENDING_BYTES) { + this.switchToFallback(); + } + } + async digest() { + if (this.fallback) { + return this.fallback.digest(); + } + if (this.secret && this.finished) { + throw new Error("Attempted to digest an already finished HMAC."); + } + const data = concatBytes(this.pending); + if (subtle) { + if (this.secret) { + this.finished = true; + const key = await subtle.importKey("raw", this.secret, { name: "HMAC", hash: "SHA-256" }, false, ["sign"]); + const sig = await subtle.sign("HMAC", key, data); + return new Uint8Array(sig); + } + const hash = await subtle.digest("SHA-256", data); + return new Uint8Array(hash); + } + const sha256 = new Sha256Js(this.secret); + sha256.update(data); + return sha256.digest(); + } + reset() { + this.pending = []; + this.pendingBytes = 0; + this.fallback = undefined; + this.finished = false; + } + switchToFallback() { + const sha256Js = new Sha256Js(this.secret); + for (const chunk of this.pending) { + sha256Js.update(chunk); + } + this.fallback = sha256Js; + this.pending = []; + this.pendingBytes = 0; + } + } + exports.Crc32 = Crc32Node; + exports.Crc32Js = Crc32Js; + exports.Crc32Node = Crc32Node; + exports.Md5 = Md5Node; + exports.Md5Js = Md5Js; + exports.Md5Node = Md5Node; + exports.Sha256 = Sha256Node; + exports.Sha256Js = Sha256Js; + exports.Sha256Node = Sha256Node; + exports.Sha256WebCrypto = Sha256WebCrypto; + exports.blobHasher = blobHasher; + exports.blobReader = blobReader; + exports.fileStreamHasher = fileStreamHasher; + exports.readableStreamHasher = readableStreamHasher; +}); + +// node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +var require_event_streams = __commonJS(function(exports) { + var { Crc32 } = require_checksum(); + var { hasOwn } = require_transport(); + var { toHex, fromHex, toUtf8, fromUtf8 } = require_serde(); + var { Readable } = __require("node:stream"); + var { TypeRegistry } = require_schema(); + + class Int64 { + bytes; + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number) { + if (number > 9223372036854776000 || number < -9223372036854776000) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i = 7, remaining = Math.abs(Math.round(number));i > -1 && remaining > 0; i--, remaining /= 256) { + bytes[i] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new Int64(bytes); + } + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt(toHex(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + } + function negate(bytes) { + for (let i = 0;i < 8; i++) { + bytes[i] ^= 255; + } + for (let i = 7;i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) + break; + } + } + + class HeaderMarshaller { + toUtf8; + fromUtf8; + constructor(toUtf8, fromUtf8) { + this.toUtf8 = toUtf8; + this.fromUtf8 = fromUtf8; + } + format(headers) { + const chunks = []; + for (const headerName in headers) { + if (!hasOwn(headers, headerName)) + continue; + const bytes = this.fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = this.fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set(fromHex(header.value.replace(/-/g, "")), 1); + return uuidBytes; + } + } + parse(headers) { + const out = {}; + let position = 0; + while (position < headers.byteLength) { + const nameLength = headers.getUint8(position++); + const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); + position += nameLength; + switch (headers.getUint8(position++)) { + case 0: + out[name] = { + type: BOOLEAN_TAG, + value: true + }; + break; + case 1: + out[name] = { + type: BOOLEAN_TAG, + value: false + }; + break; + case 2: + out[name] = { + type: BYTE_TAG, + value: headers.getInt8(position++) + }; + break; + case 3: + out[name] = { + type: SHORT_TAG, + value: headers.getInt16(position, false) + }; + position += 2; + break; + case 4: + out[name] = { + type: INT_TAG, + value: headers.getInt32(position, false) + }; + position += 4; + break; + case 5: + out[name] = { + type: LONG_TAG, + value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)) + }; + position += 8; + break; + case 6: + const binaryLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: BINARY_TAG, + value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength) + }; + position += binaryLength; + break; + case 7: + const stringLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: STRING_TAG, + value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)) + }; + position += stringLength; + break; + case 8: + out[name] = { + type: TIMESTAMP_TAG, + value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()) + }; + position += 8; + break; + case 9: + const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); + position += 16; + out[name] = { + type: UUID_TAG, + value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}` + }; + break; + default: + throw new Error(`Unrecognized header type tag`); + } + } + return out; + } + } + var HEADER_VALUE_TYPE; + (function(HEADER_VALUE_TYPE) { + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolTrue"] = 0] = "boolTrue"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolFalse"] = 1] = "boolFalse"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byte"] = 2] = "byte"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["short"] = 3] = "short"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["integer"] = 4] = "integer"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["long"] = 5] = "long"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byteArray"] = 6] = "byteArray"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["string"] = 7] = "string"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["timestamp"] = 8] = "timestamp"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["uuid"] = 9] = "uuid"; + })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {})); + var BOOLEAN_TAG = "boolean"; + var BYTE_TAG = "byte"; + var SHORT_TAG = "short"; + var INT_TAG = "integer"; + var LONG_TAG = "long"; + var BINARY_TAG = "binary"; + var STRING_TAG = "string"; + var TIMESTAMP_TAG = "timestamp"; + var UUID_TAG = "uuid"; + var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + var PRELUDE_MEMBER_LENGTH = 4; + var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; + var CHECKSUM_LENGTH = 4; + var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; + function splitMessage({ byteLength, byteOffset, buffer }) { + if (byteLength < MINIMUM_MESSAGE_LENGTH) { + throw new Error("Provided message too short to accommodate event stream message overhead"); + } + const view = new DataView(buffer, byteOffset, byteLength); + const messageLength = view.getUint32(0, false); + if (byteLength !== messageLength) { + throw new Error("Reported message length does not match received message length"); + } + const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); + const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); + const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); + const checksummer = new Crc32; + checksummer.update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); + if (expectedPreludeChecksum !== checksummer.digestSync()) { + throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digestSync()})`); + } + checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH))); + if (expectedMessageChecksum !== checksummer.digestSync()) { + throw new Error(`The message checksum (${checksummer.digestSync()}) did not match the expected value of ${expectedMessageChecksum}`); + } + return { + headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), + body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)) + }; + } + + class EventStreamCodec { + headerMarshaller; + messageBuffer; + isEndOfStream; + constructor(toUtf8, fromUtf8) { + this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8); + this.messageBuffer = []; + this.isEndOfStream = false; + } + feed(message) { + this.messageBuffer.push(this.decode(message)); + } + endOfStream() { + this.isEndOfStream = true; + } + getMessage() { + const message = this.messageBuffer.pop(); + const isEndOfStream = this.isEndOfStream; + return { + getMessage() { + return message; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + getAvailableMessages() { + const messages = this.messageBuffer; + this.messageBuffer = []; + const isEndOfStream = this.isEndOfStream; + return { + getMessages() { + return messages; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + encode({ headers: rawHeaders, body }) { + const headers = this.headerMarshaller.format(rawHeaders); + const length = headers.byteLength + body.byteLength + 16; + const out = new Uint8Array(length); + const view = new DataView(out.buffer, out.byteOffset, out.byteLength); + const checksum = new Crc32; + view.setUint32(0, length, false); + view.setUint32(4, headers.byteLength, false); + checksum.update(out.subarray(0, 8)); + view.setUint32(8, checksum.digestSync(), false); + out.set(headers, 12); + out.set(body, headers.byteLength + 12); + checksum.update(out.subarray(8, length - 4)); + view.setUint32(length - 4, checksum.digestSync(), false); + return out; + } + decode(message) { + const { headers, body } = splitMessage(message); + return { headers: this.headerMarshaller.parse(headers), body }; + } + formatHeaders(rawHeaders) { + return this.headerMarshaller.format(rawHeaders); + } + } + + class MessageDecoderStream { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async* asyncIterator() { + for await (const bytes of this.options.inputStream) { + const decoded = this.options.decoder.decode(bytes); + yield decoded; + } + } + } + + class MessageEncoderStream { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async* asyncIterator() { + for await (const msg of this.options.messageStream) { + const encoded = this.options.encoder.encode(msg); + yield encoded; + } + if (this.options.includeEndFrame) { + yield new Uint8Array(0); + } + } + } + + class SmithyMessageDecoderStream { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async* asyncIterator() { + for await (const message of this.options.messageStream) { + const deserialized = await this.options.deserializer(message); + if (deserialized === undefined) + continue; + yield deserialized; + } + } + } + + class SmithyMessageEncoderStream { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async* asyncIterator() { + for await (const chunk of this.options.inputStream) { + const payloadBuf = this.options.serializer(chunk); + yield payloadBuf; + } + } + } + function getChunkedStream(source) { + let currentMessageTotalLength = 0; + let currentMessagePendingLength = 0; + let currentMessage = null; + let messageLengthBuffer = null; + const allocateMessage = (size) => { + if (typeof size !== "number") { + throw new Error("Attempted to allocate an event message where size was not a number: " + size); + } + currentMessageTotalLength = size; + currentMessagePendingLength = 4; + currentMessage = new Uint8Array(size); + const currentMessageView = new DataView(currentMessage.buffer); + currentMessageView.setUint32(0, size, false); + }; + const iterator = async function* () { + const sourceIterator = source[Symbol.asyncIterator](); + while (true) { + const { value, done } = await sourceIterator.next(); + if (done) { + if (!currentMessageTotalLength) { + return; + } else if (currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + } else { + throw new Error("Truncated event message received."); + } + return; + } + const chunkLength = value.length; + let currentOffset = 0; + while (currentOffset < chunkLength) { + if (!currentMessage) { + const bytesRemaining = chunkLength - currentOffset; + if (!messageLengthBuffer) { + messageLengthBuffer = new Uint8Array(4); + } + const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining); + messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength); + currentMessagePendingLength += numBytesForTotal; + currentOffset += numBytesForTotal; + if (currentMessagePendingLength < 4) { + break; + } + allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false)); + messageLengthBuffer = null; + } + const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset); + currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength); + currentMessagePendingLength += numBytesToWrite; + currentOffset += numBytesToWrite; + if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + currentMessage = null; + currentMessageTotalLength = 0; + currentMessagePendingLength = 0; + } + } + } + }; + return { + [Symbol.asyncIterator]: iterator + }; + } + function getUnmarshalledStream(source, options) { + const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8); + return { + [Symbol.asyncIterator]: async function* () { + for await (const chunk of source) { + const message = options.eventStreamCodec.decode(chunk); + const type = await messageUnmarshaller(message); + if (type === undefined) + continue; + yield type; + } + } + }; + } + function getMessageUnmarshaller(deserializer, toUtf8) { + return async function(message) { + const { value: messageType } = message.headers[":message-type"]; + if (messageType === "error") { + const unmodeledError = new Error(message.headers[":error-message"].value || "UnknownError"); + unmodeledError.name = message.headers[":error-code"].value; + throw unmodeledError; + } else if (messageType === "exception") { + const code = message.headers[":exception-type"].value; + const exception = { [code]: message }; + const deserializedException = await deserializer(exception); + if (deserializedException.$unknown) { + const error = new Error(toUtf8(message.body)); + error.name = code; + throw error; + } + throw deserializedException[code]; + } else if (messageType === "event") { + const event = { + [message.headers[":event-type"].value]: message + }; + const deserialized = await deserializer(event); + if (deserialized.$unknown) + return; + return deserialized; + } else { + throw Error(`Unrecognizable event type: ${message.headers[":event-type"].value}`); + } + }; + } + var EventStreamMarshaller$1 = class EventStreamMarshaller { + eventStreamCodec; + utfEncoder; + constructor({ utf8Encoder, utf8Decoder }) { + this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder); + this.utfEncoder = utf8Encoder; + } + deserialize(body, deserializer) { + const inputStream = getChunkedStream(body); + return new SmithyMessageDecoderStream({ + messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }), + deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder) + }); + } + serialize(inputStream, serializer) { + return new MessageEncoderStream({ + messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }), + encoder: this.eventStreamCodec, + includeEndFrame: true + }); + } + }; + var eventStreamSerdeProvider$1 = (options) => new EventStreamMarshaller$1(options); + + class EventStreamMarshaller { + universalMarshaller; + constructor({ utf8Encoder, utf8Decoder }) { + this.universalMarshaller = new EventStreamMarshaller$1({ + utf8Decoder, + utf8Encoder + }); + } + deserialize(body, deserializer) { + const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readableToIterable(body); + return this.universalMarshaller.deserialize(bodyIterable, deserializer); + } + serialize(input, serializer) { + return Readable.from(this.universalMarshaller.serialize(input, serializer)); + } + } + var eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options); + async function* readableToIterable(readStream) { + let streamEnded = false; + let generationEnded = false; + const records = new Array; + readStream.on("error", (err) => { + if (!streamEnded) { + streamEnded = true; + } + if (err) { + throw err; + } + }); + readStream.on("data", (data) => { + records.push(data); + }); + readStream.on("end", () => { + streamEnded = true; + }); + while (!generationEnded) { + const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0)); + if (value) { + yield value; + } + generationEnded = streamEnded && records.length === 0; + } + } + var readableStreamToIterable = (readableStream) => ({ + [Symbol.asyncIterator]: async function* () { + const reader = readableStream.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) + return; + yield value; + } + } finally { + reader.releaseLock(); + } + } + }); + var iterableToReadableStream = (asyncIterable) => { + const iterator = asyncIterable[Symbol.asyncIterator](); + return new ReadableStream({ + async pull(controller) { + const { done, value } = await iterator.next(); + if (done) { + return controller.close(); + } + controller.enqueue(value); + } + }); + }; + var resolveEventStreamSerdeConfig = (input) => Object.assign(input, { + eventStreamMarshaller: input.eventStreamSerdeProvider(input) + }); + + class EventStreamSerde { + marshaller; + serializer; + deserializer; + serdeContext; + defaultContentType; + compositeErrorRegistry; + constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, compositeErrorRegistry }) { + this.marshaller = marshaller; + this.serializer = serializer; + this.deserializer = deserializer; + this.serdeContext = serdeContext; + this.defaultContentType = defaultContentType; + this.compositeErrorRegistry = compositeErrorRegistry; + } + async serializeEventStream({ eventStream, requestSchema, initialRequest, initialMessageType }) { + const marshaller = this.marshaller; + const eventStreamMember = requestSchema.getEventStreamMember(); + const unionSchema = requestSchema.getMemberSchema(eventStreamMember); + const serializer = this.serializer; + const defaultContentType = this.defaultContentType; + const initialRequestMarker = Symbol("initialRequestMarker"); + const eventStreamIterable = { + async* [Symbol.asyncIterator]() { + if (initialRequest) { + const headers = { + ":event-type": { type: "string", value: initialMessageType ?? "initial-request" }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: defaultContentType } + }; + serializer.write(requestSchema, initialRequest); + const body = serializer.flush(); + yield { + [initialRequestMarker]: true, + headers, + body + }; + } + for await (const page of eventStream) { + yield page; + } + } + }; + return marshaller.serialize(eventStreamIterable, (event) => { + if (event[initialRequestMarker]) { + return { + headers: event.headers, + body: event.body + }; + } + let unionMember = ""; + for (const key in event) { + if (!hasOwn(event, key)) + continue; + if (key !== "__type") { + unionMember = key; + break; + } + } + const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event); + const headers = { + ":event-type": { type: "string", value: eventType }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: explicitPayloadContentType ?? defaultContentType }, + ...additionalHeaders + }; + return { + headers, + body + }; + }); + } + async deserializeEventStream({ response, responseSchema, initialResponseContainer, initialMessageType }) { + const marshaller = this.marshaller; + const eventStreamMember = responseSchema.getEventStreamMember(); + const unionSchema = responseSchema.getMemberSchema(eventStreamMember); + const memberSchemas = unionSchema.getMemberSchemas(); + const initialResponseMarker = Symbol("initialResponseMarker"); + const asyncIterable = marshaller.deserialize(response.body, async (event) => { + let unionMember = ""; + for (const key in event) { + if (!hasOwn(event, key)) + continue; + if (key !== "__type") { + unionMember = key; + break; + } + } + const body = event[unionMember].body; + if (unionMember === (initialMessageType ?? "initial-response")) { + const dataObject = await this.deserializer.read(responseSchema, body); + delete dataObject[eventStreamMember]; + return { + [initialResponseMarker]: true, + ...dataObject + }; + } else if (unionMember in memberSchemas) { + const eventStreamSchema = memberSchemas[unionMember]; + if (eventStreamSchema.isStructSchema()) { + const out = {}; + let hasBindings = false; + for (const [name, member] of eventStreamSchema.structIterator()) { + const { eventHeader, eventPayload } = member.getMergedTraits(); + hasBindings = hasBindings || Boolean(eventHeader || eventPayload); + if (eventPayload) { + if (member.isBlobSchema()) { + out[name] = body; + } else if (member.isStringSchema()) { + out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body); + } else if (member.isStructSchema()) { + out[name] = await this.deserializer.read(member, body); + } + } else if (eventHeader) { + const value = event[unionMember].headers[name]?.value; + if (value != null) { + if (member.isNumericSchema()) { + if (value && typeof value === "object" && "bytes" in value) { + out[name] = BigInt(value.toString()); + } else { + out[name] = Number(value); + } + } else { + out[name] = value; + } + } + } + } + return { + [unionMember]: await this.readEventMember(eventStreamSchema, body, hasBindings, out) + }; + } + return { + [unionMember]: await this.deserializer.read(eventStreamSchema, body) + }; + } else { + return { + $unknown: event + }; + } + }); + const asyncIterator = asyncIterable[Symbol.asyncIterator](); + const firstEvent = await asyncIterator.next(); + if (firstEvent.done) { + return asyncIterable; + } + if (firstEvent.value?.[initialResponseMarker]) { + if (!responseSchema) { + throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given."); + } + for (const key in firstEvent.value) { + if (!hasOwn(firstEvent.value, key)) + continue; + initialResponseContainer[key] = firstEvent.value[key]; + } + } + return { + async* [Symbol.asyncIterator]() { + if (!firstEvent?.value?.[initialResponseMarker]) { + yield firstEvent.value; + } + while (true) { + const { done, value } = await asyncIterator.next(); + if (done) { + break; + } + yield value; + } + } + }; + } + async readEventMember(eventStreamSchema, body, hasBindings, out) { + let ErrCtor; + const staticStructuralSchema = eventStreamSchema.getSchema(); + if (Array.isArray(staticStructuralSchema) && staticStructuralSchema[0] === -3) { + const namespace = staticStructuralSchema[1]; + const nsRegistry = TypeRegistry.for(namespace); + this.compositeErrorRegistry?.copyFrom(nsRegistry); + ErrCtor = (this.compositeErrorRegistry ?? nsRegistry)?.getErrorCtor(staticStructuralSchema); + } + const dataObject = hasBindings ? out : body.byteLength === 0 ? {} : await this.deserializer.read(eventStreamSchema, body); + if (ErrCtor) { + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const metadata = {}; + const $fault = eventStreamSchema.getMergedTraits().error; + if ($fault) { + metadata.$fault = $fault; + } + return Object.assign(new ErrCtor({}), metadata, { + message + }, dataObject); + } + return dataObject; + } + writeEventBody(unionMember, unionSchema, event) { + const serializer = this.serializer; + let eventType = unionMember; + let explicitPayloadMember = null; + let explicitPayloadContentType; + const isKnownSchema = (() => { + const struct = unionSchema.getSchema(); + return struct[4].includes(unionMember); + })(); + const additionalHeaders = {}; + if (!isKnownSchema) { + const [type, value] = event[unionMember]; + eventType = type; + serializer.write(15, value); + } else { + const eventSchema = unionSchema.getMemberSchema(unionMember); + if (eventSchema.isStructSchema()) { + for (const [memberName, memberSchema] of eventSchema.structIterator()) { + const { eventHeader, eventPayload } = memberSchema.getMergedTraits(); + if (eventPayload) { + explicitPayloadMember = memberName; + } else if (eventHeader) { + const value = event[unionMember][memberName]; + let type = "binary"; + if (memberSchema.isNumericSchema()) { + if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) { + type = "integer"; + } else { + type = "long"; + } + } else if (memberSchema.isTimestampSchema()) { + type = "timestamp"; + } else if (memberSchema.isStringSchema()) { + type = "string"; + } else if (memberSchema.isBooleanSchema()) { + type = "boolean"; + } + if (value != null) { + additionalHeaders[memberName] = { + type, + value + }; + delete event[unionMember][memberName]; + } + } + } + if (explicitPayloadMember !== null) { + const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember); + if (payloadSchema.isBlobSchema()) { + explicitPayloadContentType = "application/octet-stream"; + } else if (payloadSchema.isStringSchema()) { + explicitPayloadContentType = "text/plain"; + } + serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]); + } else { + serializer.write(eventSchema, event[unionMember]); + } + } else if (eventSchema.isUnitSchema()) { + serializer.write(eventSchema, {}); + } else { + throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union."); + } + } + const messageSerialization = serializer.flush() ?? new Uint8Array; + const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization) : messageSerialization; + return { + body, + eventType, + explicitPayloadContentType, + additionalHeaders + }; + } + } + exports.EventStreamCodec = EventStreamCodec; + exports.EventStreamMarshaller = EventStreamMarshaller; + exports.EventStreamSerde = EventStreamSerde; + exports.HeaderMarshaller = HeaderMarshaller; + exports.Int64 = Int64; + exports.MessageDecoderStream = MessageDecoderStream; + exports.MessageEncoderStream = MessageEncoderStream; + exports.SmithyMessageDecoderStream = SmithyMessageDecoderStream; + exports.SmithyMessageEncoderStream = SmithyMessageEncoderStream; + exports.UniversalEventStreamMarshaller = EventStreamMarshaller$1; + exports.eventStreamSerdeProvider = eventStreamSerdeProvider; + exports.getChunkedStream = getChunkedStream; + exports.getMessageUnmarshaller = getMessageUnmarshaller; + exports.getUnmarshalledStream = getUnmarshalledStream; + exports.iterableToReadableStream = iterableToReadableStream; + exports.readableStreamToIterable = readableStreamToIterable; + exports.resolveEventStreamSerdeConfig = resolveEventStreamSerdeConfig; + exports.universalEventStreamSerdeProvider = eventStreamSerdeProvider$1; +}); + +// node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +var require_protocols = __commonJS(function(exports) { + var { Uint8ArrayBlobAdapter, sdkStreamMixin, splitEvery, splitHeader, fromBase64, _parseEpochTimestamp, _parseRfc7231DateTime, _parseRfc3339DateTimeWithOffset, LazyJsonString, NumericValue, toUtf8, fromUtf8, generateIdempotencyToken, toBase64, dateToUtcString, quoteHeader } = require_serde(); + var { HttpRequest, HttpResponse, hasOwn, isValidHostname } = require_transport(); + var { parseQueryString, parseUrl } = require_transport(); + exports.HttpRequest = HttpRequest; + exports.HttpResponse = HttpResponse; + exports.isValidHostname = isValidHostname; + exports.parseQueryString = parseQueryString; + exports.parseUrl = parseUrl; + var { TypeRegistry, NormalizedSchema, translateTraits } = require_schema(); + var { FieldPosition } = require_dist_cjs(); + var collectBody = async (streamBody = new Uint8Array, context) => { + if (streamBody instanceof Uint8Array) { + return Uint8ArrayBlobAdapter.mutate(streamBody); + } + if (!streamBody) { + return Uint8ArrayBlobAdapter.mutate(new Uint8Array); + } + const fromContext = context.streamCollector(streamBody); + return Uint8ArrayBlobAdapter.mutate(await fromContext); + }; + function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); + } + + class SerdeContext { + serdeContext; + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + } + + class HttpProtocol extends SerdeContext { + options; + compositeErrorRegistry; + constructor(options) { + super(); + this.options = options; + this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace); + for (const etr of options.errorTypeRegistries ?? []) { + this.compositeErrorRegistry.copyFrom(etr); + } + } + getRequestType() { + return HttpRequest; + } + getResponseType() { + return HttpResponse; + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.serializer.setSerdeContext(serdeContext); + this.deserializer.setSerdeContext(serdeContext); + if (this.getPayloadCodec()) { + this.getPayloadCodec().setSerdeContext(serdeContext); + } + } + updateServiceEndpoint(request, endpoint) { + if ("url" in endpoint) { + request.protocol = endpoint.url.protocol; + request.hostname = endpoint.url.hostname; + request.port = endpoint.url.port ? Number(endpoint.url.port) : undefined; + request.path = endpoint.url.pathname; + request.fragment = endpoint.url.hash || undefined; + request.username = endpoint.url.username || undefined; + request.password = endpoint.url.password || undefined; + if (!request.query) { + request.query = {}; + } + for (const [k, v] of endpoint.url.searchParams.entries()) { + request.query[k] = v; + } + if (endpoint.headers) { + for (const name in endpoint.headers) { + if (!hasOwn(endpoint.headers, name)) + continue; + request.headers[name] = endpoint.headers[name].join(", "); + } + } + return request; + } else { + request.protocol = endpoint.protocol; + request.hostname = endpoint.hostname; + request.port = endpoint.port ? Number(endpoint.port) : undefined; + request.path = endpoint.path; + request.query = { + ...endpoint.query + }; + if (endpoint.headers) { + for (const name in endpoint.headers) { + if (!hasOwn(endpoint.headers, name)) + continue; + request.headers[name] = endpoint.headers[name]; + } + } + return request; + } + } + setHostPrefix(request, operationSchema, input) { + if (this.serdeContext?.disableHostPrefix) { + return; + } + const inputNs = NormalizedSchema.of(operationSchema.input); + const opTraits = translateTraits(operationSchema.traits ?? {}); + if (opTraits.endpoint) { + let hostPrefix = opTraits.endpoint?.[0]; + if (typeof hostPrefix === "string") { + for (const [name, member] of inputNs.structIterator()) { + if (!member.getMergedTraits().hostLabel) { + continue; + } + const replacement = input[name]; + if (typeof replacement !== "string") { + throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`); + } + hostPrefix = hostPrefix.replace(`{${name}}`, replacement); + } + request.hostname = hostPrefix + request.hostname; + if (!isValidHostname(request.hostname)) { + throw new Error(`[${request.hostname}] is not a valid hostname.`); + } + } + } + } + deserializeMetadata(output) { + return { + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }; + } + async serializeEventStream({ eventStream, requestSchema, initialRequest }) { + const eventStreamSerde = await this.loadEventStreamCapability(); + return eventStreamSerde.serializeEventStream({ + eventStream, + requestSchema, + initialRequest + }); + } + async deserializeEventStream({ response, responseSchema, initialResponseContainer }) { + const eventStreamSerde = await this.loadEventStreamCapability(); + return eventStreamSerde.deserializeEventStream({ + response, + responseSchema, + initialResponseContainer + }); + } + async loadEventStreamCapability() { + const { EventStreamSerde, eventStreamSerdeProvider } = require_event_streams(); + const marshaller = this.resolveEventStreamMarshaller(eventStreamSerdeProvider); + return new EventStreamSerde({ + marshaller, + serializer: this.serializer, + deserializer: this.deserializer, + serdeContext: this.serdeContext, + defaultContentType: this.getDefaultContentType(), + compositeErrorRegistry: this.compositeErrorRegistry + }); + } + resolveEventStreamMarshaller(importedProvider) { + const context = this.serdeContext; + if (context.eventStreamMarshaller) { + return context.eventStreamMarshaller; + } + return importedProvider(this.serdeContext); + } + getDefaultContentType() { + throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`); + } + async deserializeHttpMessage(schema, context, response, arg4, arg5) { + return []; + } + getEventStreamMarshaller() { + const context = this.serdeContext; + if (!context.eventStreamMarshaller) { + throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext."); + } + return context.eventStreamMarshaller; + } + } + + class HttpBindingProtocol extends HttpProtocol { + async serializeRequest(operationSchema, _input, context) { + const input = _input && typeof _input === "object" ? _input : {}; + const serializer = this.serializer; + const query = {}; + const headers = {}; + const endpoint = await context.endpoint(); + const ns = NormalizedSchema.of(operationSchema?.input); + const payloadMemberNames = []; + const payloadMemberSchemas = []; + let hasNonHttpBindingMember = false; + let payload; + const request = new HttpRequest({ + protocol: "", + hostname: "", + port: undefined, + path: "", + fragment: undefined, + query, + headers, + body: undefined + }); + if (endpoint) { + this.updateServiceEndpoint(request, endpoint); + this.setHostPrefix(request, operationSchema, input); + const opTraits = translateTraits(operationSchema.traits); + if (opTraits.http) { + request.method = opTraits.http[0]; + const [path, search] = opTraits.http[1].split("?"); + if (request.path == "/") { + request.path = path; + } else { + request.path += path; + } + const traitSearchParams = new URLSearchParams(search ?? ""); + for (const [key, value] of traitSearchParams) { + query[key] = value; + } + } + } + for (const [memberName, memberNs] of ns.structIterator()) { + const memberTraits = memberNs.getMergedTraits() ?? {}; + const inputMemberValue = input[memberName]; + if (inputMemberValue == null && !memberNs.isIdempotencyToken()) { + if (memberTraits.httpLabel) { + if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) { + throw new Error(`No value provided for input HTTP label: ${memberName}.`); + } + } + continue; + } + if (memberTraits.httpPayload) { + const isStreaming = memberNs.isStreaming(); + if (isStreaming) { + const isEventStream = memberNs.isStructSchema(); + if (isEventStream) { + if (input[memberName]) { + payload = await this.serializeEventStream({ + eventStream: input[memberName], + requestSchema: ns + }); + } + } else { + payload = inputMemberValue; + } + } else { + serializer.write(memberNs, inputMemberValue); + payload = serializer.flush(); + } + } else if (memberTraits.httpLabel) { + serializer.write(memberNs, inputMemberValue); + const replacement = serializer.flush(); + if (request.path.includes(`{${memberName}+}`)) { + request.path = request.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent).join("/")); + } else if (request.path.includes(`{${memberName}}`)) { + request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement)); + } + } else if (memberTraits.httpHeader) { + serializer.write(memberNs, inputMemberValue); + headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush()); + } else if (typeof memberTraits.httpPrefixHeaders === "string") { + for (const key in inputMemberValue) { + if (!hasOwn(inputMemberValue, key)) + continue; + const val = inputMemberValue[key]; + const amalgam = memberTraits.httpPrefixHeaders + key; + serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val); + headers[amalgam.toLowerCase()] = serializer.flush(); + } + } else if (memberTraits.httpQuery || memberTraits.httpQueryParams) { + this.serializeQuery(memberNs, inputMemberValue, query); + } else { + hasNonHttpBindingMember = true; + payloadMemberNames.push(memberName); + payloadMemberSchemas.push(memberNs); + } + } + if (hasNonHttpBindingMember && input) { + const [namespace, name] = (ns.getName(true) ?? "#Unknown").split("#"); + const requiredMembers = ns.getSchema()[6]; + const payloadSchema = [ + 3, + namespace, + name, + ns.getMergedTraits(), + payloadMemberNames, + payloadMemberSchemas, + undefined + ]; + if (requiredMembers) { + payloadSchema[6] = requiredMembers; + } else { + payloadSchema.pop(); + } + serializer.write(payloadSchema, input); + payload = serializer.flush(); + } + request.headers = headers; + request.query = query; + request.body = payload; + return request; + } + serializeQuery(ns, data, query) { + const serializer = this.serializer; + const traits = ns.getMergedTraits(); + if (traits.httpQueryParams) { + for (const key in data) { + if (!hasOwn(data, key)) + continue; + if (!(key in query)) { + const val = data[key]; + const valueSchema = ns.getValueSchema(); + Object.assign(valueSchema.getMergedTraits(), { + ...traits, + httpQuery: key, + httpQueryParams: undefined + }); + this.serializeQuery(valueSchema, val, query); + } + } + return; + } + if (ns.isListSchema()) { + const sparse = !!ns.getMergedTraits().sparse; + const buffer = []; + for (const item of data) { + serializer.write([ns.getValueSchema(), traits], item); + const serializable = serializer.flush(); + if (sparse || serializable !== undefined) { + buffer.push(serializable); + } + } + query[traits.httpQuery] = buffer; + } else { + serializer.write([ns, traits], data); + query[traits.httpQuery] = serializer.flush(); + } + } + async deserializeResponse(operationSchema, context, response) { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes = await collectBody(response.body, context); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(15, bytes)); + } + await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response)); + throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw."); + } + for (const header in response.headers) { + if (!hasOwn(response.headers, header)) + continue; + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject); + if (nonHttpBindingMembers.length) { + const bytes = await collectBody(response.body, context); + if (bytes.byteLength > 0) { + const dataFromBody = await deserializer.read(ns, bytes); + for (const member of nonHttpBindingMembers) { + if (dataFromBody[member] != null) { + dataObject[member] = dataFromBody[member]; + } + } + } + } else if (nonHttpBindingMembers.discardResponseBody) { + await collectBody(response.body, context); + } + dataObject.$metadata = this.deserializeMetadata(response); + return dataObject; + } + async deserializeHttpMessage(schema, context, response, arg4, arg5) { + let dataObject; + if (arg4 instanceof Set) { + dataObject = arg5; + } else { + dataObject = arg4; + } + let discardResponseBody = true; + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(schema); + const nonHttpBindingMembers = []; + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMemberTraits(); + if (memberTraits.httpPayload) { + discardResponseBody = false; + const isStreaming = memberSchema.isStreaming(); + if (isStreaming) { + const isEventStream = memberSchema.isStructSchema(); + if (isEventStream) { + dataObject[memberName] = await this.deserializeEventStream({ + response, + responseSchema: ns + }); + } else { + dataObject[memberName] = sdkStreamMixin(response.body); + } + } else if (response.body) { + const bytes = await collectBody(response.body, context); + if (bytes.byteLength > 0) { + dataObject[memberName] = await deserializer.read(memberSchema, bytes); + } + } + } else if (memberTraits.httpHeader) { + const key = String(memberTraits.httpHeader).toLowerCase(); + const value = response.headers[key]; + if (value != null) { + if (memberSchema.isListSchema()) { + const headerListValueSchema = memberSchema.getValueSchema(); + headerListValueSchema.getMergedTraits().httpHeader = key; + let sections; + if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === 4) { + sections = splitEvery(value, ",", 2); + } else { + sections = splitHeader(value); + } + const list = []; + for (const section of sections) { + list.push(await deserializer.read(headerListValueSchema, section.trim())); + } + dataObject[memberName] = list; + } else { + dataObject[memberName] = await deserializer.read(memberSchema, value); + } + } + } else if (memberTraits.httpPrefixHeaders !== undefined) { + dataObject[memberName] = {}; + for (const header in response.headers) { + if (!hasOwn(response.headers, header)) + continue; + if (header.startsWith(memberTraits.httpPrefixHeaders)) { + const value = response.headers[header]; + const valueSchema = memberSchema.getValueSchema(); + valueSchema.getMergedTraits().httpHeader = header; + dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value); + } + } + } else if (memberTraits.httpResponseCode) { + dataObject[memberName] = response.statusCode; + } else { + nonHttpBindingMembers.push(memberName); + } + } + nonHttpBindingMembers.discardResponseBody = discardResponseBody; + return nonHttpBindingMembers; + } + } + + class RpcProtocol extends HttpProtocol { + async serializeRequest(operationSchema, _input, context) { + const serializer = this.serializer; + const query = {}; + const headers = {}; + const endpoint = await context.endpoint(); + const ns = NormalizedSchema.of(operationSchema?.input); + const schema = ns.getSchema(); + let payload; + const input = _input && typeof _input === "object" ? _input : {}; + const request = new HttpRequest({ + protocol: "", + hostname: "", + port: undefined, + path: "/", + fragment: undefined, + query, + headers, + body: undefined + }); + if (endpoint) { + this.updateServiceEndpoint(request, endpoint); + this.setHostPrefix(request, operationSchema, input); + } + if (input) { + const eventStreamMember = ns.getEventStreamMember(); + if (eventStreamMember) { + if (input[eventStreamMember]) { + const initialRequest = {}; + for (const [memberName] of ns.structIterator()) { + if (memberName !== eventStreamMember && input[memberName] != null) { + initialRequest[memberName] = input[memberName]; + } + } + payload = await this.serializeEventStream({ + eventStream: input[eventStreamMember], + requestSchema: ns, + initialRequest + }); + } + } else { + serializer.write(schema, input); + payload = serializer.flush(); + } + } + request.headers = Object.assign(request.headers, headers); + request.query = query; + request.body = payload; + request.method = "POST"; + return request; + } + async deserializeResponse(operationSchema, context, response) { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes = await collectBody(response.body, context); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(15, bytes)); + } + await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response)); + throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw."); + } + for (const header in response.headers) { + if (!hasOwn(response.headers, header)) + continue; + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + const eventStreamMember = ns.getEventStreamMember(); + if (eventStreamMember) { + dataObject[eventStreamMember] = await this.deserializeEventStream({ + response, + responseSchema: ns, + initialResponseContainer: dataObject + }); + } else { + const bytes = await collectBody(response.body, context); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(ns, bytes)); + } + } + dataObject.$metadata = this.deserializeMetadata(response); + return dataObject; + } + } + var resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { + if (input != null && input[memberName] !== undefined) { + const labelValue = labelValueProvider(); + if (labelValue == null || labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: " + memberName + "."); + } + resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel ? labelValue.split("/").map((segment) => extendedEncodeURIComponent(segment)).join("/") : extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: " + memberName + "."); + } + return resolvedPath; + }; + function requestBuilder(input, context) { + return new RequestBuilder(input, context); + } + + class RequestBuilder { + input; + context; + query = {}; + method = ""; + headers = {}; + path = ""; + body = null; + hostname = ""; + resolvePathStack = []; + constructor(input, context) { + this.input = input; + this.context = context; + } + async build() { + const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint(); + this.path = basePath; + for (const resolvePath of this.resolvePathStack) { + resolvePath(this.path); + } + return new HttpRequest({ + protocol, + hostname: this.hostname || hostname, + port, + method: this.method, + path: this.path, + query: this.query, + body: this.body, + headers: this.headers + }); + } + hn(hostname) { + this.hostname = hostname; + return this; + } + bp(uriLabel) { + this.resolvePathStack.push((basePath) => { + this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; + }); + return this; + } + p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { + this.resolvePathStack.push((path) => { + this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); + }); + return this; + } + h(headers) { + this.headers = headers; + return this; + } + q(query) { + this.query = query; + return this; + } + b(body) { + this.body = body; + return this; + } + m(method) { + this.method = method; + return this; + } + } + function determineTimestampFormat(ns, settings) { + if (settings.timestampFormat.useTrait) { + if (ns.isTimestampSchema() && (ns.getSchema() === 5 || ns.getSchema() === 6 || ns.getSchema() === 7)) { + return ns.getSchema(); + } + } + const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits(); + const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === "string" || Boolean(httpHeader) ? 6 : Boolean(httpQuery) || Boolean(httpLabel) ? 5 : undefined : undefined; + return bindingFormat ?? settings.timestampFormat.default; + } + + class FromStringShapeDeserializer extends SerdeContext { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + read(_schema, data) { + const ns = NormalizedSchema.of(_schema); + if (ns.isListSchema()) { + return splitHeader(data).map((item) => this.read(ns.getValueSchema(), item)); + } + if (ns.isBlobSchema()) { + return (this.serdeContext?.base64Decoder ?? fromBase64)(data); + } + if (ns.isTimestampSchema()) { + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + return _parseRfc3339DateTimeWithOffset(data); + case 6: + return _parseRfc7231DateTime(data); + case 7: + return _parseEpochTimestamp(data); + default: + console.warn("Missing timestamp format, parsing value with Date constructor:", data); + return new Date(data); + } + } + if (ns.isStringSchema()) { + const mediaType = ns.getMergedTraits().mediaType; + let intermediateValue = data; + if (mediaType) { + if (ns.getMergedTraits().httpHeader) { + intermediateValue = this.base64ToUtf8(intermediateValue); + } + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + intermediateValue = LazyJsonString.from(intermediateValue); + } + return intermediateValue; + } + } + if (ns.isNumericSchema()) { + return Number(data); + } + if (ns.isBigIntegerSchema()) { + return BigInt(data); + } + if (ns.isBigDecimalSchema()) { + return new NumericValue(data, "bigDecimal"); + } + if (ns.isBooleanSchema()) { + return String(data).toLowerCase() === "true"; + } + return data; + } + base64ToUtf8(base64String) { + return (this.serdeContext?.utf8Encoder ?? toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String)); + } + } + + class HttpInterceptingShapeDeserializer extends SerdeContext { + codecDeserializer; + stringDeserializer; + constructor(codecDeserializer, codecSettings) { + super(); + this.codecDeserializer = codecDeserializer; + this.stringDeserializer = new FromStringShapeDeserializer(codecSettings); + } + setSerdeContext(serdeContext) { + this.stringDeserializer.setSerdeContext(serdeContext); + this.codecDeserializer.setSerdeContext(serdeContext); + this.serdeContext = serdeContext; + } + read(schema, data) { + const ns = NormalizedSchema.of(schema); + const traits = ns.getMergedTraits(); + const toString = this.serdeContext?.utf8Encoder ?? toUtf8; + if (traits.httpHeader || traits.httpResponseCode) { + return this.stringDeserializer.read(ns, toString(data)); + } + if (traits.httpPayload) { + if (ns.isBlobSchema()) { + const toBytes = this.serdeContext?.utf8Decoder ?? fromUtf8; + if (typeof data === "string") { + return toBytes(data); + } + return data; + } else if (ns.isStringSchema()) { + if ("byteLength" in data) { + return toString(data); + } + return data; + } + } + return this.codecDeserializer.read(ns, data); + } + } + + class ToStringShapeSerializer extends SerdeContext { + settings; + stringBuffer = ""; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + switch (typeof value) { + case "object": + if (value === null) { + this.stringBuffer = "null"; + return; + } + if (ns.isTimestampSchema()) { + if (!(value instanceof Date)) { + throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`); + } + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + this.stringBuffer = value.toISOString().replace(".000Z", "Z"); + break; + case 6: + this.stringBuffer = dateToUtcString(value); + break; + case 7: + this.stringBuffer = String(value.getTime() / 1000); + break; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + this.stringBuffer = String(value.getTime() / 1000); + } + return; + } + if (ns.isBlobSchema() && "byteLength" in value) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(value); + return; + } + if (ns.isListSchema() && Array.isArray(value)) { + let buffer = ""; + for (const item of value) { + this.write([ns.getValueSchema(), ns.getMergedTraits()], item); + const headerItem = this.flush(); + const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader(headerItem); + if (buffer !== "") { + buffer += ", "; + } + buffer += serialized; + } + this.stringBuffer = buffer; + return; + } + this.stringBuffer = JSON.stringify(value, null, 2); + break; + case "string": + const mediaType = ns.getMergedTraits().mediaType; + let intermediateValue = value; + if (mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + intermediateValue = LazyJsonString.from(intermediateValue); + } + if (ns.getMergedTraits().httpHeader) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(intermediateValue.toString()); + return; + } + } + this.stringBuffer = value; + break; + default: + if (ns.isIdempotencyToken()) { + this.stringBuffer = generateIdempotencyToken(); + } else { + this.stringBuffer = String(value); + } + } + } + flush() { + const buffer = this.stringBuffer; + this.stringBuffer = ""; + return buffer; + } + } + + class HttpInterceptingShapeSerializer { + codecSerializer; + stringSerializer; + buffer; + constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) { + this.codecSerializer = codecSerializer; + this.stringSerializer = stringSerializer; + } + setSerdeContext(serdeContext) { + this.codecSerializer.setSerdeContext(serdeContext); + this.stringSerializer.setSerdeContext(serdeContext); + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + const traits = ns.getMergedTraits(); + if (traits.httpHeader || traits.httpLabel || traits.httpQuery) { + this.stringSerializer.write(ns, value); + this.buffer = this.stringSerializer.flush(); + return; + } + return this.codecSerializer.write(ns, value); + } + flush() { + if (this.buffer !== undefined) { + const buffer = this.buffer; + this.buffer = undefined; + return buffer; + } + return this.codecSerializer.flush(); + } + } + + class Field { + name; + kind; + values; + constructor({ name, kind = FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind; + this.values = values; + } + add(value) { + this.values.push(value); + } + set(values) { + this.values = values; + } + remove(value) { + this.values = this.values.filter((v) => v !== value); + } + toString() { + return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", "); + } + get() { + return this.values; + } + } + + class Fields { + entries = {}; + encoding; + constructor({ fields = [], encoding = "utf-8" }) { + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; + } + setField(field) { + this.entries[field.name.toLowerCase()] = field; + } + getField(name) { + return this.entries[name.toLowerCase()]; + } + removeField(name) { + delete this.entries[name.toLowerCase()]; + } + getByType(kind) { + return Object.values(this.entries).filter((field) => field.kind === kind); + } + } + var getHttpHandlerExtensionConfiguration = (runtimeConfig) => { + if (runtimeConfig.logger && runtimeConfig.logger.constructor?.name !== "NoOpLogger") { + runtimeConfig.requestHandler?.updateHttpClientConfig?.(Symbol.for("logger"), runtimeConfig.logger); + } + return { + setHttpHandler(handler) { + runtimeConfig.requestHandler = handler; + }, + httpHandler() { + return runtimeConfig.requestHandler; + }, + updateHttpClientConfig(key, value) { + runtimeConfig.requestHandler?.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return runtimeConfig.requestHandler.httpHandlerConfigs(); + } + }; + }; + var resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { + return { + requestHandler: httpHandlerExtensionConfiguration.httpHandler() + }; + }; + var CONTENT_LENGTH_HEADER = "content-length"; + function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request = args.request; + if (HttpRequest.isInstance(request)) { + const { body, headers } = request; + if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) { + try { + const length = bodyLengthChecker(body); + if (length != null) { + request.headers = { + ...request.headers, + [CONTENT_LENGTH_HEADER]: String(length) + }; + } + } catch (ignored) {} + } + } + return next({ + ...args, + request + }); + }; + } + var contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true + }; + var getContentLengthPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + } + }); + var escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); + var hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; + var escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/"); + function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = escapeUri(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length;i < iLen; i++) { + parts.push(`${key}=${escapeUri(value[i])}`); + } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${escapeUri(value)}`; + } + parts.push(qsEntry); + } + } + return parts.join("&"); + } + exports.Field = Field; + exports.Fields = Fields; + exports.FromStringShapeDeserializer = FromStringShapeDeserializer; + exports.HttpBindingProtocol = HttpBindingProtocol; + exports.HttpInterceptingShapeDeserializer = HttpInterceptingShapeDeserializer; + exports.HttpInterceptingShapeSerializer = HttpInterceptingShapeSerializer; + exports.HttpProtocol = HttpProtocol; + exports.RequestBuilder = RequestBuilder; + exports.RpcProtocol = RpcProtocol; + exports.SerdeContext = SerdeContext; + exports.ToStringShapeSerializer = ToStringShapeSerializer; + exports.buildQueryString = buildQueryString; + exports.collectBody = collectBody; + exports.contentLengthMiddleware = contentLengthMiddleware; + exports.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions; + exports.determineTimestampFormat = determineTimestampFormat; + exports.escapeUri = escapeUri; + exports.escapeUriPath = escapeUriPath; + exports.extendedEncodeURIComponent = extendedEncodeURIComponent; + exports.getContentLengthPlugin = getContentLengthPlugin; + exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; + exports.requestBuilder = requestBuilder; + exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; + exports.resolvedPath = resolvedPath; +}); + +// node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +var require_retry = __commonJS(function(exports) { + var { Readable } = __require("node:stream"); + var { NoOpLogger, normalizeProvider } = require_client(); + var { HttpResponse, HttpRequest } = require_protocols(); + var { parseRfc7231DateTime, v4 } = require_serde(); + var { hasOwn } = require_transport(); + var isStreamingPayload = (request) => request?.body instanceof Readable || typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream; + var CLOCK_SKEW_ERROR_CODES = [ + "AccessDeniedException", + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch" + ]; + var THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException" + ]; + var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; + var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; + var NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND", "EAI_AGAIN"]; + var isRetryableByTrait = (error) => error?.$retryable !== undefined; + var isClockSkewError = (error) => CLOCK_SKEW_ERROR_CODES.includes(error.name); + var isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected; + var isBrowserNetworkError = (error) => { + const errorMessages = new Set([ + "Failed to fetch", + "NetworkError when attempting to fetch resource", + "The Internet connection appears to be offline", + "Load failed", + "Network request failed" + ]); + const isValid = error && error instanceof TypeError; + if (!isValid) { + return false; + } + return errorMessages.has(error.message); + }; + var isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error.name) || error.$retryable?.throttling == true; + var isTransientError = (error, depth = 0) => isRetryableByTrait(error) || isClockSkewCorrectedError(error) || error.name === "InvalidSignatureException" && error.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error) || isNodeJsHttp2TransientError(error) || error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1); + var isServerError = (error) => { + if (error.$metadata?.httpStatusCode !== undefined) { + const statusCode = error.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) { + return true; + } + return false; + } + return false; + }; + function isNodeJsHttp2TransientError(error) { + return error.code === "ERR_HTTP2_STREAM_ERROR" && error.message.includes("NGHTTP2_REFUSED_STREAM"); + } + var DEFAULT_RETRY_DELAY_BASE = 100; + var MAXIMUM_RETRY_DELAY = 20 * 1000; + var THROTTLING_RETRY_DELAY_BASE = 500; + var INITIAL_RETRY_TOKENS = 500; + var RETRY_COST = 5; + var TIMEOUT_RETRY_COST = 10; + var NO_RETRY_INCREMENT = 1; + var INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; + var REQUEST_HEADER = "amz-sdk-request"; + function parseRetryAfterHeader(response, logger) { + if (!HttpResponse.isInstance(response)) { + return; + } + for (const header in response.headers) { + if (!hasOwn(response.headers, header)) + continue; + const h = header.toLowerCase(); + if (h === "retry-after") { + const retryAfter = response.headers[header]; + let retryAfterSeconds = NaN; + if (retryAfter.endsWith("GMT")) { + try { + const date = parseRfc7231DateTime(retryAfter); + retryAfterSeconds = (date.getTime() - Date.now()) / 1000; + } catch (e) { + logger?.trace?.("Failed to parse retry-after header"); + logger?.trace?.(e); + } + } else if (retryAfter.match(/ GMT, ((\d+)|(\d+\.\d+))$/)) { + retryAfterSeconds = Number(retryAfter.match(/ GMT, ([\d.]+)$/)?.[1]); + } else if (retryAfter.match(/^((\d+)|(\d+\.\d+))$/)) { + retryAfterSeconds = Number(retryAfter); + } else if (Date.parse(retryAfter) >= Date.now()) { + retryAfterSeconds = (Date.parse(retryAfter) - Date.now()) / 1000; + } + if (isNaN(retryAfterSeconds)) { + return; + } + return new Date(Date.now() + retryAfterSeconds * 1000); + } else if (h === "x-amz-retry-after") { + const v = response.headers[header]; + const backoffMilliseconds = Number(v); + if (isNaN(backoffMilliseconds)) { + logger?.trace?.(`Failed to parse x-amz-retry-after=${v}`); + return; + } + return new Date(Date.now() + backoffMilliseconds); + } + } + } + function getRetryAfterHint(response, logger) { + return parseRetryAfterHeader(response, logger); + } + var asSdkError = (error) => { + if (error instanceof Error) + return error; + if (error instanceof Object) + return Object.assign(new Error, error); + if (typeof error === "string") + return new Error(error); + return new Error(`AWS SDK error wrapper for ${error}`); + }; + function bindRetryMiddleware(isStreamingPayload) { + return (options) => (next, context) => async (args) => { + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken((context["partition_id"] ?? "") + (context.__retryLongPoll ? ":longpoll" : "")); + let lastError = new Error; + let attempts = 0; + let totalRetryDelay = 0; + const { request } = args; + const isRequest = HttpRequest.isInstance(request); + if (isRequest) { + request.headers[INVOCATION_ID_HEADER] = v4(); + } + while (true) { + try { + if (isRequest) { + request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } catch (e) { + const retryErrorInfo = getRetryErrorInfo(e, options.logger); + lastError = asSdkError(e); + if (isRequest && isStreamingPayload(request)) { + (context.logger instanceof NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request."); + throw lastError; + } + try { + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } catch (ignoredRefreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; + } + attempts = retryToken.getRetryCount(); + const delay = retryToken.getRetryDelay(); + totalRetryDelay += (retryToken?.$retryLog?.acquisitionDelay ?? 0) + delay; + if (delay > 0) { + await cooldown(delay); + } + } + } + } else { + retryStrategy = retryStrategy; + if (retryStrategy?.mode) { + context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; + } + return retryStrategy.retry(next, args); + } + }; + } + var cooldown = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + var isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined"; + var getRetryErrorInfo = (error, logger) => { + const errorInfo = { + error, + errorType: getRetryErrorType(error) + }; + const retryAfterHint = parseRetryAfterHeader(error.$response, logger); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; + }; + var getRetryErrorType = (error) => { + if (isThrottlingError(error)) + return "THROTTLING"; + if (isTransientError(error)) + return "TRANSIENT"; + if (isServerError(error)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; + }; + var retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true + }; + function bindGetRetryPlugin(isStreamingPayload) { + const retryMiddleware = bindRetryMiddleware(isStreamingPayload); + return (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(retryMiddleware(options), retryMiddlewareOptions); + } + }); + } + + class DefaultRateLimiter { + static setTimeoutFn = (fn, delay) => setTimeout(fn, delay); + beta; + minCapacity; + minFillRate; + scaleConstant; + smooth; + enabled = false; + availableTokens = 0; + lastMaxRate = 0; + measuredTxRate = 0; + requestCount = 0; + fillRate; + lastThrottleTime; + lastTimestamp = 0; + lastTxRateBucket; + maxCapacity; + timeWindow = 0; + constructor(options) { + this.beta = options?.beta ?? 0.7; + this.minCapacity = options?.minCapacity ?? 1; + this.minFillRate = options?.minFillRate ?? 0.5; + this.scaleConstant = options?.scaleConstant ?? 0.4; + this.smooth = options?.smooth ?? 0.8; + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + const retryErrorInfo = response; + const isThrottling = retryErrorInfo?.errorType === "THROTTLING" || isThrottlingError(retryErrorInfo?.error ?? response); + if (isThrottling) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); + } + getCurrentTimeInSeconds() { + return Date.now() / 1000; + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + while (amount > this.availableTokens) { + const delay = (amount - this.availableTokens) / this.fillRate * 1000; + await new Promise((resolve) => DefaultRateLimiter.setTimeoutFn(resolve, delay)); + this.refillTokenBucket(); + } + this.availableTokens = this.availableTokens - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.availableTokens = Math.min(this.maxCapacity, this.availableTokens + fillAmount); + this.lastTimestamp = timestamp; + } + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.availableTokens = Math.min(this.availableTokens, this.maxCapacity); + } + updateMeasuredRate() { + const t = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } + } + + class Retry { + static v2026 = typeof process !== "undefined" && process.env?.SMITHY_NEW_RETRIES_2026 === "true"; + static delay() { + return Retry.v2026 ? 50 : 100; + } + static throttlingDelay() { + return Retry.v2026 ? 1000 : 500; + } + static cost() { + return Retry.v2026 ? 14 : 5; + } + static throttlingCost() { + return Retry.v2026 ? 5 : 10; + } + static modifiedCostType() { + return Retry.v2026 ? "THROTTLING" : "TRANSIENT"; + } + } + + class DefaultRetryBackoffStrategy { + x = Retry.delay(); + computeNextBackoffDelay(i) { + const b = Math.random(); + const r = 2; + const t_i = b * Math.min(this.x * r ** i, MAXIMUM_RETRY_DELAY); + return Math.floor(t_i); + } + setDelayBase(delay) { + this.x = delay; + } + } + + class DefaultRetryToken { + delay; + count; + cost; + longPoll; + $retryLog = { + acquisitionDelay: 0 + }; + constructor(delay, count, cost, longPoll) { + this.delay = delay; + this.count = count; + this.cost = cost; + this.longPoll = longPoll; + } + getRetryCount() { + return this.count; + } + getRetryDelay() { + return Math.min(MAXIMUM_RETRY_DELAY, this.delay); + } + getRetryCost() { + return this.cost; + } + isLongPoll() { + return this.longPoll; + } + } + var RETRY_MODES; + (function(RETRY_MODES) { + RETRY_MODES["STANDARD"] = "standard"; + RETRY_MODES["ADAPTIVE"] = "adaptive"; + })(RETRY_MODES || (RETRY_MODES = {})); + var DEFAULT_MAX_ATTEMPTS = 3; + var DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD; + var refusal = { + incompatible: 1, + attempts: 2, + capacity: 3 + }; + var StandardRetryStrategy$1 = class StandardRetryStrategy { + mode = RETRY_MODES.STANDARD; + retryBackoffStrategy; + capacity = INITIAL_RETRY_TOKENS; + maxAttemptsProvider; + baseDelay; + constructor(arg1) { + if (typeof arg1 === "number") { + this.maxAttemptsProvider = async () => arg1; + } else if (typeof arg1 === "function") { + this.maxAttemptsProvider = arg1; + } else if (arg1 && typeof arg1 === "object") { + this.maxAttemptsProvider = async () => arg1.maxAttempts; + this.baseDelay = arg1.baseDelay; + this.retryBackoffStrategy = arg1.backoff; + } + this.maxAttemptsProvider ??= async () => DEFAULT_MAX_ATTEMPTS; + this.baseDelay ??= Retry.delay(); + this.retryBackoffStrategy ??= new DefaultRetryBackoffStrategy; + } + async acquireInitialRetryToken(retryTokenScope) { + return new DefaultRetryToken(Retry.delay(), 0, undefined, Retry.v2026 && retryTokenScope.includes(":longpoll")); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + const retryCode = this.retryCode(token, errorInfo, maxAttempts); + const shouldRetry = retryCode === 0; + const isLongPoll = token.isLongPoll?.(); + if (shouldRetry || isLongPoll) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? Retry.throttlingDelay() : this.baseDelay); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + let retryDelay = delayFromErrorType; + if (errorInfo.retryAfterHint instanceof Date) { + retryDelay = Math.max(delayFromErrorType, Math.min(errorInfo.retryAfterHint.getTime() - Date.now(), delayFromErrorType + 5000)); + } + if (!shouldRetry) { + const longPollBackoff = Retry.v2026 && retryCode === refusal.capacity && isLongPoll ? retryDelay : 0; + if (longPollBackoff > 0) { + await new Promise((r) => setTimeout(r, longPollBackoff)); + } + } else { + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + const nextToken = new DefaultRetryToken(0, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false); + await new Promise((r) => setTimeout(r, retryDelay)); + nextToken.$retryLog.acquisitionDelay = retryDelay; + return nextToken; + } + } + throw new Error("No retry token available"); + } + recordSuccess(token) { + this.capacity = Math.min(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); + } + getCapacity() { + return this.capacity; + } + async maxAttempts() { + return this.maxAttemptsProvider(); + } + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } catch (ignored) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; + } + } + retryCode(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + const retryableStatus = this.isRetryableError(errorInfo.errorType) ? 0 : refusal.incompatible; + const attemptStatus = attempts < maxAttempts ? 0 : refusal.attempts; + const capacityStatus = this.capacity >= this.getCapacityCost(errorInfo.errorType) ? 0 : refusal.capacity; + return retryableStatus || attemptStatus || capacityStatus; + } + getCapacityCost(errorType) { + return errorType === Retry.modifiedCostType() ? Retry.throttlingCost() : Retry.cost(); + } + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; + } + }; + var AdaptiveRetryStrategy$1 = class AdaptiveRetryStrategy { + mode = RETRY_MODES.ADAPTIVE; + rateLimiter; + standardRetryStrategy; + constructor(maxAttemptsProvider, options) { + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter; + this.standardRetryStrategy = options ? new StandardRetryStrategy$1({ + maxAttempts: typeof maxAttemptsProvider === "number" ? maxAttemptsProvider : 3, + ...options + }) : new StandardRetryStrategy$1(maxAttemptsProvider); + } + async acquireInitialRetryToken(retryTokenScope) { + const token = await this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + await this.rateLimiter.getSendToken(); + return token; + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + const token = await this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + await this.rateLimiter.getSendToken(); + return token; + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); + } + async maxAttemptsProvider() { + return this.standardRetryStrategy.maxAttempts(); + } + }; + + class ConfiguredRetryStrategy extends StandardRetryStrategy$1 { + computeNextBackoffDelay; + constructor(maxAttempts, computeNextBackoffDelay = Retry.delay()) { + super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); + if (typeof computeNextBackoffDelay === "number") { + this.computeNextBackoffDelay = () => computeNextBackoffDelay; + } else { + this.computeNextBackoffDelay = computeNextBackoffDelay; + } + this.retryBackoffStrategy.computeNextBackoffDelay = (completedAttempt) => { + const nextAttempt = completedAttempt + 1; + return this.computeNextBackoffDelay(nextAttempt); + }; + } + } + var getDefaultRetryQuota = (initialRetryTokens, options) => { + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = NO_RETRY_INCREMENT; + const retryCost = RETRY_COST; + const timeoutRetryCost = TIMEOUT_RETRY_COST; + let availableCapacity = initialRetryTokens; + const getCapacityAmount = (error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost; + const hasRetryTokens = (error) => getCapacityAmount(error) <= availableCapacity; + const retrieveRetryTokens = (error) => { + if (!hasRetryTokens(error)) { + throw new Error("No retry token available"); + } + const capacityAmount = getCapacityAmount(error); + availableCapacity -= capacityAmount; + return capacityAmount; + }; + const releaseRetryTokens = (capacityReleaseAmount) => { + availableCapacity += capacityReleaseAmount ?? noRetryIncrement; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }; + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens + }); + }; + var defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + var defaultRetryDecider = (error) => { + if (!error) { + return false; + } + return isRetryableByTrait(error) || isClockSkewError(error) || isThrottlingError(error) || isTransientError(error); + }; + + class StandardRetryStrategy { + maxAttemptsProvider; + retryDecider; + delayDecider; + retryQuota; + mode = RETRY_MODES.STANDARD; + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.retryDecider = options?.retryDecider ?? defaultRetryDecider; + this.delayDecider = options?.delayDecider ?? defaultDelayDecider; + this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(INITIAL_RETRY_TOKENS); + } + shouldRetry(error, attempts, maxAttempts) { + return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); + } + async getMaxAttempts() { + let maxAttempts; + try { + maxAttempts = await this.maxAttemptsProvider(); + } catch (ignored) { + maxAttempts = DEFAULT_MAX_ATTEMPTS; + } + return maxAttempts; + } + async retry(next, args, options) { + let retryTokenAmount; + let attempts = 0; + let totalDelay = 0; + const maxAttempts = await this.getMaxAttempts(); + const { request } = args; + if (HttpRequest.isInstance(request)) { + request.headers[INVOCATION_ID_HEADER] = v4(); + } + while (true) { + try { + if (HttpRequest.isInstance(request)) { + request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + if (options?.beforeRequest) { + await options.beforeRequest(); + } + const { response, output } = await next(args); + if (options?.afterRequest) { + options.afterRequest(response); + } + this.retryQuota.releaseRetryTokens(retryTokenAmount); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalDelay; + return { response, output }; + } catch (e) { + const err = asSdkError(e); + attempts++; + if (this.shouldRetry(err, attempts, maxAttempts)) { + retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); + const delayFromDecider = this.delayDecider(isThrottlingError(err) ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE, attempts); + const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); + const delay = Math.max(delayFromResponse || 0, delayFromDecider); + totalDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + continue; + } + if (!err.$metadata) { + err.$metadata = {}; + } + err.$metadata.attempts = attempts; + err.$metadata.totalRetryDelay = totalDelay; + throw err; + } + } + } + } + var getDelayFromRetryAfterHeader = (response) => { + if (!HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return Math.min(retryAfterSeconds * 1000, 20000); + const retryAfterDate = new Date(retryAfter); + return Math.min(retryAfterDate.getTime() - Date.now(), 20000); + }; + + class AdaptiveRetryStrategy extends StandardRetryStrategy { + rateLimiter; + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options ?? {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter; + this.mode = RETRY_MODES.ADAPTIVE; + } + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); + } + }); + } + } + var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; + var CONFIG_MAX_ATTEMPTS = "max_attempts"; + var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + const value = env[ENV_MAX_ATTEMPTS]; + if (!value) + return; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + configFileSelector: (profile) => { + const value = profile[CONFIG_MAX_ATTEMPTS]; + if (!value) + return; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + default: DEFAULT_MAX_ATTEMPTS + }; + var resolveRetryConfig = (input, defaults) => { + const { retryStrategy, retryMode } = input; + const { defaultMaxAttempts = DEFAULT_MAX_ATTEMPTS, defaultBaseDelay = Retry.delay() } = defaults ?? {}; + const maxAttemptsProvider = normalizeProvider(input.maxAttempts ?? defaultMaxAttempts); + let controller = retryStrategy ? Promise.resolve(retryStrategy) : undefined; + const getDefault = async () => { + const maxAttempts = await maxAttemptsProvider(); + const adaptive = await normalizeProvider(retryMode)() === RETRY_MODES.ADAPTIVE; + if (adaptive) { + return new AdaptiveRetryStrategy$1(maxAttemptsProvider, { + maxAttempts, + baseDelay: defaultBaseDelay + }); + } + return new StandardRetryStrategy$1({ + maxAttempts, + baseDelay: defaultBaseDelay + }); + }; + return Object.assign(input, { + maxAttempts: maxAttemptsProvider, + retryStrategy: () => controller ??= getDefault() + }); + }; + var ENV_RETRY_MODE = "AWS_RETRY_MODE"; + var CONFIG_RETRY_MODE = "retry_mode"; + var NODE_RETRY_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_RETRY_MODE], + configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + default: DEFAULT_RETRY_MODE + }; + var omitRetryHeadersMiddleware = () => (next) => async (args) => { + const { request } = args; + if (HttpRequest.isInstance(request)) { + delete request.headers[INVOCATION_ID_HEADER]; + delete request.headers[REQUEST_HEADER]; + } + return next(args); + }; + var omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true + }; + var getOmitRetryHeadersPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); + } + }); + var retryMiddleware = bindRetryMiddleware(isStreamingPayload); + var getRetryPlugin = bindGetRetryPlugin(isStreamingPayload); + exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy$1; + exports.CONFIG_MAX_ATTEMPTS = CONFIG_MAX_ATTEMPTS; + exports.CONFIG_RETRY_MODE = CONFIG_RETRY_MODE; + exports.ConfiguredRetryStrategy = ConfiguredRetryStrategy; + exports.DEFAULT_MAX_ATTEMPTS = DEFAULT_MAX_ATTEMPTS; + exports.DEFAULT_RETRY_DELAY_BASE = DEFAULT_RETRY_DELAY_BASE; + exports.DEFAULT_RETRY_MODE = DEFAULT_RETRY_MODE; + exports.DefaultRateLimiter = DefaultRateLimiter; + exports.DeprecatedAdaptiveRetryStrategy = AdaptiveRetryStrategy; + exports.DeprecatedStandardRetryStrategy = StandardRetryStrategy; + exports.ENV_MAX_ATTEMPTS = ENV_MAX_ATTEMPTS; + exports.ENV_RETRY_MODE = ENV_RETRY_MODE; + exports.INITIAL_RETRY_TOKENS = INITIAL_RETRY_TOKENS; + exports.INVOCATION_ID_HEADER = INVOCATION_ID_HEADER; + exports.MAXIMUM_RETRY_DELAY = MAXIMUM_RETRY_DELAY; + exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = NODE_MAX_ATTEMPT_CONFIG_OPTIONS; + exports.NODE_RETRY_MODE_CONFIG_OPTIONS = NODE_RETRY_MODE_CONFIG_OPTIONS; + exports.NO_RETRY_INCREMENT = NO_RETRY_INCREMENT; + exports.REQUEST_HEADER = REQUEST_HEADER; + exports.RETRY_COST = RETRY_COST; + exports.RETRY_MODES = RETRY_MODES; + exports.Retry = Retry; + exports.StandardRetryStrategy = StandardRetryStrategy$1; + exports.THROTTLING_RETRY_DELAY_BASE = THROTTLING_RETRY_DELAY_BASE; + exports.TIMEOUT_RETRY_COST = TIMEOUT_RETRY_COST; + exports.defaultDelayDecider = defaultDelayDecider; + exports.defaultRetryDecider = defaultRetryDecider; + exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin; + exports.getRetryAfterHint = getRetryAfterHint; + exports.getRetryPlugin = getRetryPlugin; + exports.isBrowserNetworkError = isBrowserNetworkError; + exports.isClockSkewCorrectedError = isClockSkewCorrectedError; + exports.isClockSkewError = isClockSkewError; + exports.isNodeJsHttp2TransientError = isNodeJsHttp2TransientError; + exports.isRetryableByTrait = isRetryableByTrait; + exports.isServerError = isServerError; + exports.isThrottlingError = isThrottlingError; + exports.isTransientError = isTransientError; + exports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware; + exports.omitRetryHeadersMiddlewareOptions = omitRetryHeadersMiddlewareOptions; + exports.resolveRetryConfig = resolveRetryConfig; + exports.retryMiddleware = retryMiddleware; + exports.retryMiddlewareOptions = retryMiddlewareOptions; +}); + +// node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js +var require_invoke_store = __commonJS(function(exports) { + var PROTECTED_KEYS = { + REQUEST_ID: Symbol.for("_AWS_LAMBDA_REQUEST_ID"), + X_RAY_TRACE_ID: Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"), + TENANT_ID: Symbol.for("_AWS_LAMBDA_TENANT_ID"), + TRACEPARENT: Symbol.for("_AWS_LAMBDA_TRACEPARENT"), + TRACESTATE: Symbol.for("_AWS_LAMBDA_TRACESTATE"), + BAGGAGE: Symbol.for("_AWS_LAMBDA_BAGGAGE") + }; + var NO_GLOBAL_AWS_LAMBDA = ["true", "1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA ?? ""); + if (!NO_GLOBAL_AWS_LAMBDA) { + globalThis.awslambda = globalThis.awslambda || {}; + } + + class InvokeStoreBase { + static PROTECTED_KEYS = PROTECTED_KEYS; + isProtectedKey(key) { + return Object.values(PROTECTED_KEYS).includes(key); + } + getRequestId() { + return this.get(PROTECTED_KEYS.REQUEST_ID) ?? "-"; + } + getXRayTraceId() { + return this.get(PROTECTED_KEYS.X_RAY_TRACE_ID); + } + getTenantId() { + return this.get(PROTECTED_KEYS.TENANT_ID); + } + getTraceparent() { + return this.get(PROTECTED_KEYS.TRACEPARENT); + } + getTracestate() { + return this.get(PROTECTED_KEYS.TRACESTATE); + } + getBaggage() { + return this.get(PROTECTED_KEYS.BAGGAGE); + } + } + + class InvokeStoreSingle extends InvokeStoreBase { + currentContext; + getContext() { + return this.currentContext; + } + hasContext() { + return this.currentContext !== undefined; + } + get(key) { + return this.currentContext?.[key]; + } + set(key, value) { + if (this.isProtectedKey(key)) { + throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`); + } + this.currentContext = this.currentContext || {}; + this.currentContext[key] = value; + } + run(context, fn) { + this.currentContext = context; + return fn(); + } + } + + class InvokeStoreMulti extends InvokeStoreBase { + als; + static async create() { + const instance = new InvokeStoreMulti; + const asyncHooks = await import("node:async_hooks"); + instance.als = new asyncHooks.AsyncLocalStorage; + return instance; + } + getContext() { + return this.als.getStore(); + } + hasContext() { + return this.als.getStore() !== undefined; + } + get(key) { + return this.als.getStore()?.[key]; + } + set(key, value) { + if (this.isProtectedKey(key)) { + throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`); + } + const store = this.als.getStore(); + if (!store) { + throw new Error("No context available"); + } + store[key] = value; + } + run(context, fn) { + return this.als.run(context, fn); + } + } + exports.InvokeStore = undefined; + (function(InvokeStore) { + let instance = null; + async function getInstanceAsync(forceInvokeStoreMulti) { + if (!instance) { + instance = (async () => { + const isMulti = forceInvokeStoreMulti === true || "AWS_LAMBDA_MAX_CONCURRENCY" in process.env; + const newInstance = isMulti ? await InvokeStoreMulti.create() : new InvokeStoreSingle; + if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda?.InvokeStore) { + return globalThis.awslambda.InvokeStore; + } else if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda) { + globalThis.awslambda.InvokeStore = newInstance; + return newInstance; + } else { + return newInstance; + } + })(); + } + return instance; + } + InvokeStore.getInstanceAsync = getInstanceAsync; + InvokeStore._testing = process.env.AWS_LAMBDA_BENCHMARK_MODE === "1" ? { + reset: () => { + instance = null; + if (globalThis.awslambda?.InvokeStore) { + delete globalThis.awslambda.InvokeStore; + } + globalThis.awslambda = { InvokeStore: undefined }; + } + } : undefined; + })(exports.InvokeStore || (exports.InvokeStore = {})); + exports.InvokeStoreBase = InvokeStoreBase; +}); + +// node_modules/@smithy/core/dist-cjs/index.js +var require_dist_cjs2 = __commonJS(function(exports) { + var { getSmithyContext, hasOwn } = require_transport(); + exports.getSmithyContext = getSmithyContext; + var { HttpRequest } = require_protocols(); + var { requestBuilder } = require_protocols(); + exports.requestBuilder = requestBuilder; + var { HttpApiKeyAuthLocation } = require_dist_cjs(); + var resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => { + if (!authSchemePreference || authSchemePreference.length === 0) { + return candidateAuthOptions; + } + const preferredAuthOptions = []; + for (const preferredSchemeName of authSchemePreference) { + for (const candidateAuthOption of candidateAuthOptions) { + const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1]; + if (candidateAuthSchemeName === preferredSchemeName) { + preferredAuthOptions.push(candidateAuthOption); + } + } + } + for (const candidateAuthOption of candidateAuthOptions) { + if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) { + preferredAuthOptions.push(candidateAuthOption); + } + } + return preferredAuthOptions; + }; + function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map = new Map; + for (const scheme of httpAuthSchemes) { + map.set(scheme.schemeId, scheme); + } + return map; + } + var httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => { + const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)); + const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : []; + const resolvedOptions = resolveAuthOptions(options, authSchemePreference); + const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes); + const smithyContext = getSmithyContext(context); + const failureReasons = []; + for (const option of resolvedOptions) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; + } + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; + } + const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {}; + option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); + option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); + smithyContext.selectedHttpAuthScheme = { + httpAuthOption: option, + identity: await identityProvider(option.identityProperties), + signer: scheme.signer + }; + break; + } + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join(` +`)); + } + return next(args); + }; + var httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware" + }; + var getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); + } + }); + var httpAuthSchemeMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: "serializerMiddleware" + }; + var getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeMiddlewareOptions); + } + }); + var defaultErrorHandler = (signingProperties) => (error) => { + throw error; + }; + var defaultSuccessHandler = (httpResponse, signingProperties) => {}; + var httpSigningMiddleware = (config) => (next, context) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = getSmithyContext(context); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme; + const output = await next({ + ...args, + request: await signer.sign(args.request, identity, signingProperties) + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; + }; + var httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: "retryMiddleware" + }; + var getHttpSigningPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(), httpSigningMiddlewareOptions); + } + }); + var normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }; + var makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => { + let command = new CommandCtor(input); + command = withCommand(command) ?? command; + return await client.send(command, ...args); + }; + function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return async function* paginateOperation(config, input, ...additionalArguments) { + const _input = input; + let token = config.startingToken ?? _input[inputTokenName]; + let hasNext = true; + let page; + while (hasNext) { + _input[inputTokenName] = token; + if (pageSizeTokenName) { + _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize; + } + if (config.client instanceof ClientCtor) { + page = await makePagedClientRequest(CommandCtor, config.client, input, config.withCommand, ...additionalArguments); + } else { + throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); + } + yield page; + const prevToken = token; + token = get(page, outputTokenName); + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + return; + }; + } + var get = (fromObject, path) => { + let cursor = fromObject; + const pathComponents = path.split("."); + for (const step of pathComponents) { + if (!cursor || typeof cursor !== "object") { + return; + } + cursor = cursor[step]; + } + return cursor; + }; + function setFeature(context, feature, value) { + if (!context.__smithy_context) { + context.__smithy_context = { + features: {} + }; + } else if (!context.__smithy_context.features) { + context.__smithy_context.features = {}; + } + context.__smithy_context.features[feature] = value; + } + + class DefaultIdentityProviderConfig { + authSchemes = new Map; + constructor(config) { + for (const key in config) { + if (!hasOwn(config, key)) + continue; + const value = config[key]; + if (value !== undefined) { + this.authSchemes.set(key, value); + } + } + } + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); + } + } + + class HttpApiKeyAuthSigner { + async sign(httpRequest, identity, signingProperties) { + if (!signingProperties) { + throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing"); + } + if (!signingProperties.name) { + throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing"); + } + if (!signingProperties.in) { + throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing"); + } + if (!identity.apiKey) { + throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined"); + } + const clonedRequest = HttpRequest.clone(httpRequest); + if (signingProperties.in === HttpApiKeyAuthLocation.QUERY) { + clonedRequest.query[signingProperties.name] = identity.apiKey; + } else if (signingProperties.in === HttpApiKeyAuthLocation.HEADER) { + clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey; + } else { + throw new Error("request can only be signed with `apiKey` locations `query` or `header`, " + "but found: `" + signingProperties.in + "`"); + } + return clonedRequest; + } + } + + class HttpBearerAuthSigner { + async sign(httpRequest, identity, signingProperties) { + const clonedRequest = HttpRequest.clone(httpRequest); + if (!identity.token) { + throw new Error("request could not be signed with `token` since the `token` is not defined"); + } + clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`; + return clonedRequest; + } + } + + class NoAuthSigner { + async sign(httpRequest, identity, signingProperties) { + return httpRequest; + } + } + var createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired(identity) { + return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs; + }; + var EXPIRATION_MS = 300000; + var isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); + var doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined; + var memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => { + if (provider === undefined) { + return; + } + const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = async (options) => { + if (!pending) { + pending = normalizedProvider(options); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = undefined; + } + return resolved; + }; + if (isExpired === undefined) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + if (isConstant) { + return resolved; + } + if (!requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(options); + return resolved; + } + return resolved; + }; + }; + exports.DefaultIdentityProviderConfig = DefaultIdentityProviderConfig; + exports.EXPIRATION_MS = EXPIRATION_MS; + exports.HttpApiKeyAuthSigner = HttpApiKeyAuthSigner; + exports.HttpBearerAuthSigner = HttpBearerAuthSigner; + exports.NoAuthSigner = NoAuthSigner; + exports.createIsIdentityExpiredFunction = createIsIdentityExpiredFunction; + exports.createPaginator = createPaginator; + exports.doesIdentityRequireRefresh = doesIdentityRequireRefresh; + exports.getHttpAuthSchemeEndpointRuleSetPlugin = getHttpAuthSchemeEndpointRuleSetPlugin; + exports.getHttpAuthSchemePlugin = getHttpAuthSchemePlugin; + exports.getHttpSigningPlugin = getHttpSigningPlugin; + exports.httpAuthSchemeEndpointRuleSetMiddlewareOptions = httpAuthSchemeEndpointRuleSetMiddlewareOptions; + exports.httpAuthSchemeMiddleware = httpAuthSchemeMiddleware; + exports.httpAuthSchemeMiddlewareOptions = httpAuthSchemeMiddlewareOptions; + exports.httpSigningMiddleware = httpSigningMiddleware; + exports.httpSigningMiddlewareOptions = httpSigningMiddlewareOptions; + exports.isIdentityExpired = isIdentityExpired; + exports.memoizeIdentityProvider = memoizeIdentityProvider; + exports.normalizeProvider = normalizeProvider; + exports.setFeature = setFeature; +}); + +// node_modules/bowser/es5.js +var require_es5 = __commonJS(function(exports, module) { + (function(e, t) { + typeof exports == "object" && typeof module == "object" ? module.exports = t() : typeof define == "function" && define.amd ? define([], t) : typeof exports == "object" ? exports.bowser = t() : e.bowser = t(); + })(exports, function() { + return function(e) { + var t = {}; + function r(i) { + if (t[i]) + return t[i].exports; + var n = t[i] = { i, l: false, exports: {} }; + return e[i].call(n.exports, n, n.exports, r), n.l = true, n.exports; + } + return r.m = e, r.c = t, r.d = function(e, t, i) { + r.o(e, t) || Object.defineProperty(e, t, { enumerable: true, get: i }); + }, r.r = function(e) { + typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: true }); + }, r.t = function(e, t) { + if (1 & t && (e = r(e)), 8 & t) + return e; + if (4 & t && typeof e == "object" && e && e.__esModule) + return e; + var i = Object.create(null); + if (r.r(i), Object.defineProperty(i, "default", { enumerable: true, value: e }), 2 & t && typeof e != "string") + for (var n in e) + r.d(i, n, function(t) { + return e[t]; + }.bind(null, n)); + return i; + }, r.n = function(e) { + var t = e && e.__esModule ? function() { + return e.default; + } : function() { + return e; + }; + return r.d(t, "a", t), t; + }, r.o = function(e, t) { + return Object.prototype.hasOwnProperty.call(e, t); + }, r.p = "", r(r.s = 90); + }({ 17: function(e, t, r) { + t.__esModule = true, t.default = undefined; + var i = r(18), n = function() { + function e() {} + return e.getFirstMatch = function(e, t) { + var r = t.match(e); + return r && r.length > 0 && r[1] || ""; + }, e.getSecondMatch = function(e, t) { + var r = t.match(e); + return r && r.length > 1 && r[2] || ""; + }, e.matchAndReturnConst = function(e, t, r) { + if (e.test(t)) + return r; + }, e.getWindowsVersionName = function(e) { + switch (e) { + case "NT": + return "NT"; + case "XP": + return "XP"; + case "NT 5.0": + return "2000"; + case "NT 5.1": + return "XP"; + case "NT 5.2": + return "2003"; + case "NT 6.0": + return "Vista"; + case "NT 6.1": + return "7"; + case "NT 6.2": + return "8"; + case "NT 6.3": + return "8.1"; + case "NT 10.0": + return "10"; + default: + return; + } + }, e.getMacOSVersionName = function(e) { + var t = e.split(".").splice(0, 2).map(function(e) { + return parseInt(e, 10) || 0; + }); + t.push(0); + var r = t[0], i = t[1]; + if (r === 10) + switch (i) { + case 5: + return "Leopard"; + case 6: + return "Snow Leopard"; + case 7: + return "Lion"; + case 8: + return "Mountain Lion"; + case 9: + return "Mavericks"; + case 10: + return "Yosemite"; + case 11: + return "El Capitan"; + case 12: + return "Sierra"; + case 13: + return "High Sierra"; + case 14: + return "Mojave"; + case 15: + return "Catalina"; + default: + return; + } + switch (r) { + case 11: + return "Big Sur"; + case 12: + return "Monterey"; + case 13: + return "Ventura"; + case 14: + return "Sonoma"; + case 15: + return "Sequoia"; + default: + return; + } + }, e.getAndroidVersionName = function(e) { + var t = e.split(".").splice(0, 2).map(function(e) { + return parseInt(e, 10) || 0; + }); + if (t.push(0), !(t[0] === 1 && t[1] < 5)) + return t[0] === 1 && t[1] < 6 ? "Cupcake" : t[0] === 1 && t[1] >= 6 ? "Donut" : t[0] === 2 && t[1] < 2 ? "Eclair" : t[0] === 2 && t[1] === 2 ? "Froyo" : t[0] === 2 && t[1] > 2 ? "Gingerbread" : t[0] === 3 ? "Honeycomb" : t[0] === 4 && t[1] < 1 ? "Ice Cream Sandwich" : t[0] === 4 && t[1] < 4 ? "Jelly Bean" : t[0] === 4 && t[1] >= 4 ? "KitKat" : t[0] === 5 ? "Lollipop" : t[0] === 6 ? "Marshmallow" : t[0] === 7 ? "Nougat" : t[0] === 8 ? "Oreo" : t[0] === 9 ? "Pie" : undefined; + }, e.getVersionPrecision = function(e) { + return e.split(".").length; + }, e.compareVersions = function(t, r, i) { + i === undefined && (i = false); + var n = e.getVersionPrecision(t), a = e.getVersionPrecision(r), o = Math.max(n, a), s = 0, u = e.map([t, r], function(t) { + var r = o - e.getVersionPrecision(t), i = t + new Array(r + 1).join(".0"); + return e.map(i.split("."), function(e) { + return new Array(20 - e.length).join("0") + e; + }).reverse(); + }); + for (i && (s = o - Math.min(n, a)), o -= 1;o >= s; ) { + if (u[0][o] > u[1][o]) + return 1; + if (u[0][o] === u[1][o]) { + if (o === s) + return 0; + o -= 1; + } else if (u[0][o] < u[1][o]) + return -1; + } + }, e.map = function(e, t) { + var r, i = []; + if (Array.prototype.map) + return Array.prototype.map.call(e, t); + for (r = 0;r < e.length; r += 1) + i.push(t(e[r])); + return i; + }, e.find = function(e, t) { + var r, i; + if (Array.prototype.find) + return Array.prototype.find.call(e, t); + for (r = 0, i = e.length;r < i; r += 1) { + var n = e[r]; + if (t(n, r)) + return n; + } + }, e.assign = function(e) { + for (var t, r, i = e, n = arguments.length, a = new Array(n > 1 ? n - 1 : 0), o = 1;o < n; o++) + a[o - 1] = arguments[o]; + if (Object.assign) + return Object.assign.apply(Object, [e].concat(a)); + var s = function() { + var e = a[t]; + typeof e == "object" && e !== null && Object.keys(e).forEach(function(t) { + i[t] = e[t]; + }); + }; + for (t = 0, r = a.length;t < r; t += 1) + s(); + return e; + }, e.getBrowserAlias = function(e) { + return i.BROWSER_ALIASES_MAP[e]; + }, e.getBrowserTypeByAlias = function(e) { + return i.BROWSER_MAP[e] || ""; + }, e; + }(); + t.default = n, e.exports = t.default; + }, 18: function(e, t, r) { + t.__esModule = true, t.ENGINE_MAP = t.OS_MAP = t.PLATFORMS_MAP = t.BROWSER_MAP = t.BROWSER_ALIASES_MAP = undefined; + t.BROWSER_ALIASES_MAP = { AmazonBot: "amazonbot", "Amazon Silk": "amazon_silk", "Android Browser": "android", BaiduSpider: "baiduspider", Bada: "bada", BingCrawler: "bingcrawler", Brave: "brave", BlackBerry: "blackberry", "ChatGPT-User": "chatgpt_user", Chrome: "chrome", ClaudeBot: "claudebot", Chromium: "chromium", Diffbot: "diffbot", DuckDuckBot: "duckduckbot", DuckDuckGo: "duckduckgo", Electron: "electron", Epiphany: "epiphany", FacebookExternalHit: "facebookexternalhit", Firefox: "firefox", Focus: "focus", Generic: "generic", "Google Search": "google_search", Googlebot: "googlebot", GPTBot: "gptbot", "Internet Explorer": "ie", InternetArchiveCrawler: "internetarchivecrawler", "K-Meleon": "k_meleon", LibreWolf: "librewolf", Linespider: "linespider", Maxthon: "maxthon", "Meta-ExternalAds": "meta_externalads", "Meta-ExternalAgent": "meta_externalagent", "Meta-ExternalFetcher": "meta_externalfetcher", "Meta-WebIndexer": "meta_webindexer", "Microsoft Edge": "edge", "MZ Browser": "mz", "NAVER Whale Browser": "naver", "OAI-SearchBot": "oai_searchbot", Omgilibot: "omgilibot", Opera: "opera", "Opera Coast": "opera_coast", "Pale Moon": "pale_moon", PerplexityBot: "perplexitybot", "Perplexity-User": "perplexity_user", PhantomJS: "phantomjs", PingdomBot: "pingdombot", Puffin: "puffin", QQ: "qq", QQLite: "qqlite", QupZilla: "qupzilla", Roku: "roku", Safari: "safari", Sailfish: "sailfish", "Samsung Internet for Android": "samsung_internet", SlackBot: "slackbot", SeaMonkey: "seamonkey", Sleipnir: "sleipnir", "Sogou Browser": "sogou", Swing: "swing", Tizen: "tizen", "UC Browser": "uc", Vivaldi: "vivaldi", "WebOS Browser": "webos", WeChat: "wechat", YahooSlurp: "yahooslurp", "Yandex Browser": "yandex", YandexBot: "yandexbot", YouBot: "youbot" }; + t.BROWSER_MAP = { amazonbot: "AmazonBot", amazon_silk: "Amazon Silk", android: "Android Browser", baiduspider: "BaiduSpider", bada: "Bada", bingcrawler: "BingCrawler", blackberry: "BlackBerry", brave: "Brave", chatgpt_user: "ChatGPT-User", chrome: "Chrome", claudebot: "ClaudeBot", chromium: "Chromium", diffbot: "Diffbot", duckduckbot: "DuckDuckBot", duckduckgo: "DuckDuckGo", edge: "Microsoft Edge", electron: "Electron", epiphany: "Epiphany", facebookexternalhit: "FacebookExternalHit", firefox: "Firefox", focus: "Focus", generic: "Generic", google_search: "Google Search", googlebot: "Googlebot", gptbot: "GPTBot", ie: "Internet Explorer", internetarchivecrawler: "InternetArchiveCrawler", k_meleon: "K-Meleon", librewolf: "LibreWolf", linespider: "Linespider", maxthon: "Maxthon", meta_externalads: "Meta-ExternalAds", meta_externalagent: "Meta-ExternalAgent", meta_externalfetcher: "Meta-ExternalFetcher", meta_webindexer: "Meta-WebIndexer", mz: "MZ Browser", naver: "NAVER Whale Browser", oai_searchbot: "OAI-SearchBot", omgilibot: "Omgilibot", opera: "Opera", opera_coast: "Opera Coast", pale_moon: "Pale Moon", perplexitybot: "PerplexityBot", perplexity_user: "Perplexity-User", phantomjs: "PhantomJS", pingdombot: "PingdomBot", puffin: "Puffin", qq: "QQ Browser", qqlite: "QQ Browser Lite", qupzilla: "QupZilla", roku: "Roku", safari: "Safari", sailfish: "Sailfish", samsung_internet: "Samsung Internet for Android", seamonkey: "SeaMonkey", slackbot: "SlackBot", sleipnir: "Sleipnir", sogou: "Sogou Browser", swing: "Swing", tizen: "Tizen", uc: "UC Browser", vivaldi: "Vivaldi", webos: "WebOS Browser", wechat: "WeChat", yahooslurp: "YahooSlurp", yandex: "Yandex Browser", yandexbot: "YandexBot", youbot: "YouBot" }; + t.PLATFORMS_MAP = { bot: "bot", desktop: "desktop", mobile: "mobile", tablet: "tablet", tv: "tv" }; + t.OS_MAP = { Android: "Android", Bada: "Bada", BlackBerry: "BlackBerry", ChromeOS: "Chrome OS", HarmonyOS: "HarmonyOS", iOS: "iOS", Linux: "Linux", MacOS: "macOS", PlayStation4: "PlayStation 4", Roku: "Roku", Tizen: "Tizen", WebOS: "WebOS", Windows: "Windows", WindowsPhone: "Windows Phone" }; + t.ENGINE_MAP = { Blink: "Blink", EdgeHTML: "EdgeHTML", Gecko: "Gecko", Presto: "Presto", Trident: "Trident", WebKit: "WebKit" }; + }, 90: function(e, t, r) { + t.__esModule = true, t.default = undefined; + var i, n = (i = r(91)) && i.__esModule ? i : { default: i }, a = r(18); + function o(e, t) { + for (var r = 0;r < t.length; r++) { + var i = t[r]; + i.enumerable = i.enumerable || false, i.configurable = true, "value" in i && (i.writable = true), Object.defineProperty(e, i.key, i); + } + } + var s = function() { + function e() {} + var t, r, i; + return e.getParser = function(e, t, r) { + if (t === undefined && (t = false), r === undefined && (r = null), typeof e != "string") + throw new Error("UserAgent should be a string"); + return new n.default(e, t, r); + }, e.parse = function(e, t) { + return t === undefined && (t = null), new n.default(e, t).getResult(); + }, t = e, i = [{ key: "BROWSER_MAP", get: function() { + return a.BROWSER_MAP; + } }, { key: "ENGINE_MAP", get: function() { + return a.ENGINE_MAP; + } }, { key: "OS_MAP", get: function() { + return a.OS_MAP; + } }, { key: "PLATFORMS_MAP", get: function() { + return a.PLATFORMS_MAP; + } }], (r = null) && o(t.prototype, r), i && o(t, i), e; + }(); + t.default = s, e.exports = t.default; + }, 91: function(e, t, r) { + t.__esModule = true, t.default = undefined; + var i = u(r(92)), n = u(r(93)), a = u(r(94)), o = u(r(95)), s = u(r(17)); + function u(e) { + return e && e.__esModule ? e : { default: e }; + } + var d = function() { + function e(e, t, r) { + if (t === undefined && (t = false), r === undefined && (r = null), e == null || e === "") + throw new Error("UserAgent parameter can't be empty"); + this._ua = e; + var i = false; + typeof t == "boolean" ? (i = t, this._hints = r) : this._hints = t != null && typeof t == "object" ? t : null, this.parsedResult = {}, i !== true && this.parse(); + } + var t = e.prototype; + return t.getHints = function() { + return this._hints; + }, t.hasBrand = function(e) { + if (!this._hints || !Array.isArray(this._hints.brands)) + return false; + var t = e.toLowerCase(); + return this._hints.brands.some(function(e) { + return e.brand && e.brand.toLowerCase() === t; + }); + }, t.getBrandVersion = function(e) { + if (this._hints && Array.isArray(this._hints.brands)) { + var t = e.toLowerCase(), r = this._hints.brands.find(function(e) { + return e.brand && e.brand.toLowerCase() === t; + }); + return r ? r.version : undefined; + } + }, t.getUA = function() { + return this._ua; + }, t.test = function(e) { + return e.test(this._ua); + }, t.parseBrowser = function() { + var e = this; + this.parsedResult.browser = {}; + var t = s.default.find(i.default, function(t) { + if (typeof t.test == "function") + return t.test(e); + if (Array.isArray(t.test)) + return t.test.some(function(t) { + return e.test(t); + }); + throw new Error("Browser's test function is not valid"); + }); + return t && (this.parsedResult.browser = t.describe(this.getUA(), this)), this.parsedResult.browser; + }, t.getBrowser = function() { + return this.parsedResult.browser ? this.parsedResult.browser : this.parseBrowser(); + }, t.getBrowserName = function(e) { + return e ? String(this.getBrowser().name).toLowerCase() || "" : this.getBrowser().name || ""; + }, t.getBrowserVersion = function() { + return this.getBrowser().version; + }, t.getOS = function() { + return this.parsedResult.os ? this.parsedResult.os : this.parseOS(); + }, t.parseOS = function() { + var e = this; + this.parsedResult.os = {}; + var t = s.default.find(n.default, function(t) { + if (typeof t.test == "function") + return t.test(e); + if (Array.isArray(t.test)) + return t.test.some(function(t) { + return e.test(t); + }); + throw new Error("Browser's test function is not valid"); + }); + return t && (this.parsedResult.os = t.describe(this.getUA())), this.parsedResult.os; + }, t.getOSName = function(e) { + var t = this.getOS().name; + return e ? String(t).toLowerCase() || "" : t || ""; + }, t.getOSVersion = function() { + return this.getOS().version; + }, t.getPlatform = function() { + return this.parsedResult.platform ? this.parsedResult.platform : this.parsePlatform(); + }, t.getPlatformType = function(e) { + e === undefined && (e = false); + var t = this.getPlatform().type; + return e ? String(t).toLowerCase() || "" : t || ""; + }, t.parsePlatform = function() { + var e = this; + this.parsedResult.platform = {}; + var t = s.default.find(a.default, function(t) { + if (typeof t.test == "function") + return t.test(e); + if (Array.isArray(t.test)) + return t.test.some(function(t) { + return e.test(t); + }); + throw new Error("Browser's test function is not valid"); + }); + return t && (this.parsedResult.platform = t.describe(this.getUA())), this.parsedResult.platform; + }, t.getEngine = function() { + return this.parsedResult.engine ? this.parsedResult.engine : this.parseEngine(); + }, t.getEngineName = function(e) { + return e ? String(this.getEngine().name).toLowerCase() || "" : this.getEngine().name || ""; + }, t.parseEngine = function() { + var e = this; + this.parsedResult.engine = {}; + var t = s.default.find(o.default, function(t) { + if (typeof t.test == "function") + return t.test(e); + if (Array.isArray(t.test)) + return t.test.some(function(t) { + return e.test(t); + }); + throw new Error("Browser's test function is not valid"); + }); + return t && (this.parsedResult.engine = t.describe(this.getUA())), this.parsedResult.engine; + }, t.parse = function() { + return this.parseBrowser(), this.parseOS(), this.parsePlatform(), this.parseEngine(), this; + }, t.getResult = function() { + return s.default.assign({}, this.parsedResult); + }, t.satisfies = function(e) { + var t = this, r = {}, i = 0, n = {}, a = 0; + if (Object.keys(e).forEach(function(t) { + var o = e[t]; + typeof o == "string" ? (n[t] = o, a += 1) : typeof o == "object" && (r[t] = o, i += 1); + }), i > 0) { + var o = Object.keys(r), u = s.default.find(o, function(e) { + return t.isOS(e); + }); + if (u) { + var d = this.satisfies(r[u]); + if (d !== undefined) + return d; + } + var c = s.default.find(o, function(e) { + return t.isPlatform(e); + }); + if (c) { + var f = this.satisfies(r[c]); + if (f !== undefined) + return f; + } + } + if (a > 0) { + var l = Object.keys(n), b = s.default.find(l, function(e) { + return t.isBrowser(e, true); + }); + if (b !== undefined) + return this.compareVersion(n[b]); + } + }, t.isBrowser = function(e, t) { + t === undefined && (t = false); + var r = this.getBrowserName().toLowerCase(), i = e.toLowerCase(), n = s.default.getBrowserTypeByAlias(i); + return t && n && (i = n.toLowerCase()), i === r; + }, t.compareVersion = function(e) { + var t = [0], r = e, i = false, n = this.getBrowserVersion(); + if (typeof n == "string") + return e[0] === ">" || e[0] === "<" ? (r = e.substr(1), e[1] === "=" ? (i = true, r = e.substr(2)) : t = [], e[0] === ">" ? t.push(1) : t.push(-1)) : e[0] === "=" ? r = e.substr(1) : e[0] === "~" && (i = true, r = e.substr(1)), t.indexOf(s.default.compareVersions(n, r, i)) > -1; + }, t.isOS = function(e) { + return this.getOSName(true) === String(e).toLowerCase(); + }, t.isPlatform = function(e) { + return this.getPlatformType(true) === String(e).toLowerCase(); + }, t.isEngine = function(e) { + return this.getEngineName(true) === String(e).toLowerCase(); + }, t.is = function(e, t) { + return t === undefined && (t = false), this.isBrowser(e, t) || this.isOS(e) || this.isPlatform(e); + }, t.some = function(e) { + var t = this; + return e === undefined && (e = []), e.some(function(e) { + return t.is(e); + }); + }, e; + }(); + t.default = d, e.exports = t.default; + }, 92: function(e, t, r) { + t.__esModule = true, t.default = undefined; + var i, n = (i = r(17)) && i.__esModule ? i : { default: i }; + var a = /version\/(\d+(\.?_?\d+)+)/i, o = [{ test: [/gptbot/i], describe: function(e) { + var t = { name: "GPTBot" }, r = n.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/chatgpt-user/i], describe: function(e) { + var t = { name: "ChatGPT-User" }, r = n.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/oai-searchbot/i], describe: function(e) { + var t = { name: "OAI-SearchBot" }, r = n.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/claudebot/i, /claude-web/i, /claude-user/i, /claude-searchbot/i], describe: function(e) { + var t = { name: "ClaudeBot" }, r = n.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/omgilibot/i, /webzio-extended/i], describe: function(e) { + var t = { name: "Omgilibot" }, r = n.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/diffbot/i], describe: function(e) { + var t = { name: "Diffbot" }, r = n.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/perplexitybot/i], describe: function(e) { + var t = { name: "PerplexityBot" }, r = n.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/perplexity-user/i], describe: function(e) { + var t = { name: "Perplexity-User" }, r = n.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/youbot/i], describe: function(e) { + var t = { name: "YouBot" }, r = n.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/meta-webindexer/i], describe: function(e) { + var t = { name: "Meta-WebIndexer" }, r = n.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/meta-externalads/i], describe: function(e) { + var t = { name: "Meta-ExternalAds" }, r = n.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/meta-externalagent/i], describe: function(e) { + var t = { name: "Meta-ExternalAgent" }, r = n.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/meta-externalfetcher/i], describe: function(e) { + var t = { name: "Meta-ExternalFetcher" }, r = n.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/googlebot/i], describe: function(e) { + var t = { name: "Googlebot" }, r = n.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/linespider/i], describe: function(e) { + var t = { name: "Linespider" }, r = n.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/amazonbot/i], describe: function(e) { + var t = { name: "AmazonBot" }, r = n.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/bingbot/i], describe: function(e) { + var t = { name: "BingCrawler" }, r = n.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/baiduspider/i], describe: function(e) { + var t = { name: "BaiduSpider" }, r = n.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/duckduckbot/i], describe: function(e) { + var t = { name: "DuckDuckBot" }, r = n.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/ia_archiver/i], describe: function(e) { + var t = { name: "InternetArchiveCrawler" }, r = n.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/facebookexternalhit/i, /facebookcatalog/i], describe: function() { + return { name: "FacebookExternalHit" }; + } }, { test: [/slackbot/i, /slack-imgProxy/i], describe: function(e) { + var t = { name: "SlackBot" }, r = n.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/yahoo!?[\s/]*slurp/i], describe: function() { + return { name: "YahooSlurp" }; + } }, { test: [/yandexbot/i, /yandexmobilebot/i], describe: function() { + return { name: "YandexBot" }; + } }, { test: [/pingdom/i], describe: function() { + return { name: "PingdomBot" }; + } }, { test: [/opera/i], describe: function(e) { + var t = { name: "Opera" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/opr\/|opios/i], describe: function(e) { + var t = { name: "Opera" }, r = n.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/SamsungBrowser/i], describe: function(e) { + var t = { name: "Samsung Internet for Android" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/Whale/i], describe: function(e) { + var t = { name: "NAVER Whale Browser" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/PaleMoon/i], describe: function(e) { + var t = { name: "Pale Moon" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/MZBrowser/i], describe: function(e) { + var t = { name: "MZ Browser" }, r = n.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/focus/i], describe: function(e) { + var t = { name: "Focus" }, r = n.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/swing/i], describe: function(e) { + var t = { name: "Swing" }, r = n.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/coast/i], describe: function(e) { + var t = { name: "Opera Coast" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/opt\/\d+(?:.?_?\d+)+/i], describe: function(e) { + var t = { name: "Opera Touch" }, r = n.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/yabrowser/i], describe: function(e) { + var t = { name: "Yandex Browser" }, r = n.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/ucbrowser/i], describe: function(e) { + var t = { name: "UC Browser" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/Maxthon|mxios/i], describe: function(e) { + var t = { name: "Maxthon" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/epiphany/i], describe: function(e) { + var t = { name: "Epiphany" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/puffin/i], describe: function(e) { + var t = { name: "Puffin" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/sleipnir/i], describe: function(e) { + var t = { name: "Sleipnir" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/k-meleon/i], describe: function(e) { + var t = { name: "K-Meleon" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/micromessenger/i], describe: function(e) { + var t = { name: "WeChat" }, r = n.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/qqbrowser/i], describe: function(e) { + var t = { name: /qqbrowserlite/i.test(e) ? "QQ Browser Lite" : "QQ Browser" }, r = n.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/msie|trident/i], describe: function(e) { + var t = { name: "Internet Explorer" }, r = n.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/\sedg\//i], describe: function(e) { + var t = { name: "Microsoft Edge" }, r = n.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/edg([ea]|ios)/i], describe: function(e) { + var t = { name: "Microsoft Edge" }, r = n.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/vivaldi/i], describe: function(e) { + var t = { name: "Vivaldi" }, r = n.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/seamonkey/i], describe: function(e) { + var t = { name: "SeaMonkey" }, r = n.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/sailfish/i], describe: function(e) { + var t = { name: "Sailfish" }, r = n.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i, e); + return r && (t.version = r), t; + } }, { test: [/silk/i], describe: function(e) { + var t = { name: "Amazon Silk" }, r = n.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/phantom/i], describe: function(e) { + var t = { name: "PhantomJS" }, r = n.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/slimerjs/i], describe: function(e) { + var t = { name: "SlimerJS" }, r = n.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/blackberry|\bbb\d+/i, /rim\stablet/i], describe: function(e) { + var t = { name: "BlackBerry" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/(web|hpw)[o0]s/i], describe: function(e) { + var t = { name: "WebOS Browser" }, r = n.default.getFirstMatch(a, e) || n.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/bada/i], describe: function(e) { + var t = { name: "Bada" }, r = n.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/tizen/i], describe: function(e) { + var t = { name: "Tizen" }, r = n.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/qupzilla/i], describe: function(e) { + var t = { name: "QupZilla" }, r = n.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/librewolf/i], describe: function(e) { + var t = { name: "LibreWolf" }, r = n.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/firefox|iceweasel|fxios/i], describe: function(e) { + var t = { name: "Firefox" }, r = n.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/electron/i], describe: function(e) { + var t = { name: "Electron" }, r = n.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/sogoumobilebrowser/i, /metasr/i, /se 2\.[x]/i], describe: function(e) { + var t = { name: "Sogou Browser" }, r = n.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i, e), i = n.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, e), a = n.default.getFirstMatch(/se ([\d.]+)x/i, e), o = r || i || a; + return o && (t.version = o), t; + } }, { test: [/MiuiBrowser/i], describe: function(e) { + var t = { name: "Miui" }, r = n.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: function(e) { + return !!e.hasBrand("DuckDuckGo") || e.test(/\sDdg\/[\d.]+$/i); + }, describe: function(e, t) { + var r = { name: "DuckDuckGo" }; + if (t) { + var i = t.getBrandVersion("DuckDuckGo"); + if (i) + return r.version = i, r; + } + var a = n.default.getFirstMatch(/\sDdg\/([\d.]+)$/i, e); + return a && (r.version = a), r; + } }, { test: function(e) { + return e.hasBrand("Brave"); + }, describe: function(e, t) { + var r = { name: "Brave" }; + if (t) { + var i = t.getBrandVersion("Brave"); + if (i) + return r.version = i, r; + } + return r; + } }, { test: [/chromium/i], describe: function(e) { + var t = { name: "Chromium" }, r = n.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, e) || n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/chrome|crios|crmo/i], describe: function(e) { + var t = { name: "Chrome" }, r = n.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/GSA/i], describe: function(e) { + var t = { name: "Google Search" }, r = n.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: function(e) { + var t = !e.test(/like android/i), r = e.test(/android/i); + return t && r; + }, describe: function(e) { + var t = { name: "Android Browser" }, r = n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/playstation 4/i], describe: function(e) { + var t = { name: "PlayStation 4" }, r = n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/safari|applewebkit/i], describe: function(e) { + var t = { name: "Safari" }, r = n.default.getFirstMatch(a, e); + return r && (t.version = r), t; + } }, { test: [/.*/i], describe: function(e) { + var t = e.search("\\(") !== -1 ? /^(.*)\/(.*)[ \t]\((.*)/ : /^(.*)\/(.*) /; + return { name: n.default.getFirstMatch(t, e), version: n.default.getSecondMatch(t, e) }; + } }]; + t.default = o, e.exports = t.default; + }, 93: function(e, t, r) { + t.__esModule = true, t.default = undefined; + var i, n = (i = r(17)) && i.__esModule ? i : { default: i }, a = r(18); + var o = [{ test: [/Roku\/DVP/], describe: function(e) { + var t = n.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i, e); + return { name: a.OS_MAP.Roku, version: t }; + } }, { test: [/windows phone/i], describe: function(e) { + var t = n.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i, e); + return { name: a.OS_MAP.WindowsPhone, version: t }; + } }, { test: [/windows /i], describe: function(e) { + var t = n.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i, e), r = n.default.getWindowsVersionName(t); + return { name: a.OS_MAP.Windows, version: t, versionName: r }; + } }, { test: [/Macintosh(.*?) FxiOS(.*?)\//], describe: function(e) { + var t = { name: a.OS_MAP.iOS }, r = n.default.getSecondMatch(/(Version\/)(\d[\d.]+)/, e); + return r && (t.version = r), t; + } }, { test: [/macintosh/i], describe: function(e) { + var t = n.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, e).replace(/[_\s]/g, "."), r = n.default.getMacOSVersionName(t), i = { name: a.OS_MAP.MacOS, version: t }; + return r && (i.versionName = r), i; + } }, { test: [/(ipod|iphone|ipad)/i], describe: function(e) { + var t = n.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i, e).replace(/[_\s]/g, "."); + return { name: a.OS_MAP.iOS, version: t }; + } }, { test: [/OpenHarmony/i], describe: function(e) { + var t = n.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i, e); + return { name: a.OS_MAP.HarmonyOS, version: t }; + } }, { test: function(e) { + var t = !e.test(/like android/i), r = e.test(/android/i); + return t && r; + }, describe: function(e) { + var t = n.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i, e), r = n.default.getAndroidVersionName(t), i = { name: a.OS_MAP.Android, version: t }; + return r && (i.versionName = r), i; + } }, { test: [/(web|hpw)[o0]s/i], describe: function(e) { + var t = n.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i, e), r = { name: a.OS_MAP.WebOS }; + return t && t.length && (r.version = t), r; + } }, { test: [/blackberry|\bbb\d+/i, /rim\stablet/i], describe: function(e) { + var t = n.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i, e) || n.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i, e) || n.default.getFirstMatch(/\bbb(\d+)/i, e); + return { name: a.OS_MAP.BlackBerry, version: t }; + } }, { test: [/bada/i], describe: function(e) { + var t = n.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i, e); + return { name: a.OS_MAP.Bada, version: t }; + } }, { test: [/tizen/i], describe: function(e) { + var t = n.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i, e); + return { name: a.OS_MAP.Tizen, version: t }; + } }, { test: [/linux/i], describe: function() { + return { name: a.OS_MAP.Linux }; + } }, { test: [/CrOS/], describe: function() { + return { name: a.OS_MAP.ChromeOS }; + } }, { test: [/PlayStation 4/], describe: function(e) { + var t = n.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, e); + return { name: a.OS_MAP.PlayStation4, version: t }; + } }]; + t.default = o, e.exports = t.default; + }, 94: function(e, t, r) { + t.__esModule = true, t.default = undefined; + var i, n = (i = r(17)) && i.__esModule ? i : { default: i }, a = r(18); + var o = [{ test: [/googlebot/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Google" }; + } }, { test: [/linespider/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Line" }; + } }, { test: [/amazonbot/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Amazon" }; + } }, { test: [/gptbot/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "OpenAI" }; + } }, { test: [/chatgpt-user/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "OpenAI" }; + } }, { test: [/oai-searchbot/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "OpenAI" }; + } }, { test: [/baiduspider/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Baidu" }; + } }, { test: [/bingbot/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Bing" }; + } }, { test: [/duckduckbot/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "DuckDuckGo" }; + } }, { test: [/claudebot/i, /claude-web/i, /claude-user/i, /claude-searchbot/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Anthropic" }; + } }, { test: [/omgilibot/i, /webzio-extended/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Webz.io" }; + } }, { test: [/diffbot/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Diffbot" }; + } }, { test: [/perplexitybot/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Perplexity AI" }; + } }, { test: [/perplexity-user/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Perplexity AI" }; + } }, { test: [/youbot/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "You.com" }; + } }, { test: [/ia_archiver/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Internet Archive" }; + } }, { test: [/meta-webindexer/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Meta" }; + } }, { test: [/meta-externalads/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Meta" }; + } }, { test: [/meta-externalagent/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Meta" }; + } }, { test: [/meta-externalfetcher/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Meta" }; + } }, { test: [/facebookexternalhit/i, /facebookcatalog/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Meta" }; + } }, { test: [/slackbot/i, /slack-imgProxy/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Slack" }; + } }, { test: [/yahoo/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Yahoo" }; + } }, { test: [/yandexbot/i, /yandexmobilebot/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Yandex" }; + } }, { test: [/pingdom/i], describe: function() { + return { type: a.PLATFORMS_MAP.bot, vendor: "Pingdom" }; + } }, { test: [/huawei/i], describe: function(e) { + var t = n.default.getFirstMatch(/(can-l01)/i, e) && "Nova", r = { type: a.PLATFORMS_MAP.mobile, vendor: "Huawei" }; + return t && (r.model = t), r; + } }, { test: [/nexus\s*(?:7|8|9|10).*/i], describe: function() { + return { type: a.PLATFORMS_MAP.tablet, vendor: "Nexus" }; + } }, { test: [/ipad/i], describe: function() { + return { type: a.PLATFORMS_MAP.tablet, vendor: "Apple", model: "iPad" }; + } }, { test: [/Macintosh(.*?) FxiOS(.*?)\//], describe: function() { + return { type: a.PLATFORMS_MAP.tablet, vendor: "Apple", model: "iPad" }; + } }, { test: [/kftt build/i], describe: function() { + return { type: a.PLATFORMS_MAP.tablet, vendor: "Amazon", model: "Kindle Fire HD 7" }; + } }, { test: [/silk/i], describe: function() { + return { type: a.PLATFORMS_MAP.tablet, vendor: "Amazon" }; + } }, { test: [/tablet(?! pc)/i], describe: function() { + return { type: a.PLATFORMS_MAP.tablet }; + } }, { test: function(e) { + var t = e.test(/ipod|iphone/i), r = e.test(/like (ipod|iphone)/i); + return t && !r; + }, describe: function(e) { + var t = n.default.getFirstMatch(/(ipod|iphone)/i, e); + return { type: a.PLATFORMS_MAP.mobile, vendor: "Apple", model: t }; + } }, { test: [/nexus\s*[0-6].*/i, /galaxy nexus/i], describe: function() { + return { type: a.PLATFORMS_MAP.mobile, vendor: "Nexus" }; + } }, { test: [/Nokia/i], describe: function(e) { + var t = n.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i, e), r = { type: a.PLATFORMS_MAP.mobile, vendor: "Nokia" }; + return t && (r.model = t), r; + } }, { test: [/[^-]mobi/i], describe: function() { + return { type: a.PLATFORMS_MAP.mobile }; + } }, { test: function(e) { + return e.getBrowserName(true) === "blackberry"; + }, describe: function() { + return { type: a.PLATFORMS_MAP.mobile, vendor: "BlackBerry" }; + } }, { test: function(e) { + return e.getBrowserName(true) === "bada"; + }, describe: function() { + return { type: a.PLATFORMS_MAP.mobile }; + } }, { test: function(e) { + return e.getBrowserName() === "windows phone"; + }, describe: function() { + return { type: a.PLATFORMS_MAP.mobile, vendor: "Microsoft" }; + } }, { test: function(e) { + var t = Number(String(e.getOSVersion()).split(".")[0]); + return e.getOSName(true) === "android" && t >= 3; + }, describe: function() { + return { type: a.PLATFORMS_MAP.tablet }; + } }, { test: function(e) { + return e.getOSName(true) === "android"; + }, describe: function() { + return { type: a.PLATFORMS_MAP.mobile }; + } }, { test: [/smart-?tv|smarttv/i], describe: function() { + return { type: a.PLATFORMS_MAP.tv }; + } }, { test: [/netcast/i], describe: function() { + return { type: a.PLATFORMS_MAP.tv }; + } }, { test: function(e) { + return e.getOSName(true) === "macos"; + }, describe: function() { + return { type: a.PLATFORMS_MAP.desktop, vendor: "Apple" }; + } }, { test: function(e) { + return e.getOSName(true) === "windows"; + }, describe: function() { + return { type: a.PLATFORMS_MAP.desktop }; + } }, { test: function(e) { + return e.getOSName(true) === "linux"; + }, describe: function() { + return { type: a.PLATFORMS_MAP.desktop }; + } }, { test: function(e) { + return e.getOSName(true) === "playstation 4"; + }, describe: function() { + return { type: a.PLATFORMS_MAP.tv }; + } }, { test: function(e) { + return e.getOSName(true) === "roku"; + }, describe: function() { + return { type: a.PLATFORMS_MAP.tv }; + } }]; + t.default = o, e.exports = t.default; + }, 95: function(e, t, r) { + t.__esModule = true, t.default = undefined; + var i, n = (i = r(17)) && i.__esModule ? i : { default: i }, a = r(18); + var o = [{ test: function(e) { + return e.getBrowserName(true) === "microsoft edge"; + }, describe: function(e) { + if (/\sedg\//i.test(e)) + return { name: a.ENGINE_MAP.Blink }; + var t = n.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, e); + return { name: a.ENGINE_MAP.EdgeHTML, version: t }; + } }, { test: [/trident/i], describe: function(e) { + var t = { name: a.ENGINE_MAP.Trident }, r = n.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: function(e) { + return e.test(/presto/i); + }, describe: function(e) { + var t = { name: a.ENGINE_MAP.Presto }, r = n.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: function(e) { + var t = e.test(/gecko/i), r = e.test(/like gecko/i); + return t && !r; + }, describe: function(e) { + var t = { name: a.ENGINE_MAP.Gecko }, r = n.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }, { test: [/(apple)?webkit\/537\.36/i], describe: function() { + return { name: a.ENGINE_MAP.Blink }; + } }, { test: [/(apple)?webkit/i], describe: function(e) { + var t = { name: a.ENGINE_MAP.WebKit }, r = n.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i, e); + return r && (t.version = r), t; + } }]; + t.default = o, e.exports = t.default; + } }); + }); +}); + +// node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +var require_client2 = __commonJS(function(exports) { + var { Retry, RETRY_MODES } = require_retry(); + var { HttpRequest, parseUrl } = require_protocols(); + var { InvokeStore } = require_invoke_store(); + var { normalizeProvider } = require_dist_cjs2(); + var { platform, release } = __require("node:os"); + var { versions, env } = __require("node:process"); + var { isValidHostLabel, isIpAddress, customEndpointFunctions } = require_endpoints(); + var { EndpointError, resolveEndpoint } = require_endpoints(); + exports.EndpointError = EndpointError; + exports.isIpAddress = isIpAddress; + exports.resolveEndpoint = resolveEndpoint; + var { loadConfig, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS } = require_config(); + var { REGION_ENV_NAME, REGION_INI_NAME, resolveRegionConfig } = require_config(); + exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS; + exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS; + exports.REGION_ENV_NAME = REGION_ENV_NAME; + exports.REGION_INI_NAME = REGION_INI_NAME; + exports.resolveRegionConfig = resolveRegionConfig; + var state = { + warningEmitted: false + }; + var emitWarningIfUnsupportedVersion = (version) => { + if (version && !state.warningEmitted) { + if (process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED === "true") { + state.warningEmitted = true; + return; + } + const userMajorVersion = parseInt(version.substring(1, version.indexOf("."))); + const vv = 22; + if (userMajorVersion < vv) { + state.warningEmitted = true; + process.emitWarning(`NodeVersionSupportWarning: The AWS SDK for JavaScript (v3) +versions published after the first week of January 2027 +will require node >=${vv}. You are running node ${version}. + +To continue receiving updates to AWS services, bug fixes, +and security updates please upgrade to node >=${vv}. + +More information can be found at: https://a.co/c895JFp`); + } + } + }; + var longPollMiddleware = () => (next, context) => async (args) => { + context.__retryLongPoll = true; + return next(args); + }; + var longPollMiddlewareOptions = { + name: "longPollMiddleware", + tags: ["RETRY"], + step: "initialize", + override: true + }; + var getLongPollPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(longPollMiddleware(), longPollMiddlewareOptions); + } + }); + function setCredentialFeature(credentials, feature, value) { + if (!credentials.$source) { + credentials.$source = {}; + } + credentials.$source[feature] = value; + return credentials; + } + Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true"; + function setFeature(context, feature, value) { + if (!context.__aws_sdk_context) { + context.__aws_sdk_context = { + features: {} + }; + } else if (!context.__aws_sdk_context.features) { + context.__aws_sdk_context.features = {}; + } + context.__aws_sdk_context.features[feature] = value; + } + function setTokenFeature(token, feature, value) { + if (!token.$source) { + token.$source = {}; + } + token.$source[feature] = value; + return token; + } + function resolveHostHeaderConfig(input) { + return input; + } + var hostHeaderMiddleware = (options) => (next) => async (args) => { + if (!HttpRequest.isInstance(args.request)) + return next(args); + const { request } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { + delete request.headers["host"]; + request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); + } else if (!request.headers["host"]) { + let host = request.hostname; + if (request.port != null) + host += `:${request.port}`; + request.headers["host"] = host; + } + return next(args); + }; + var hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true + }; + var getHostHeaderPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + } + }); + var loggerMiddleware = () => (next, context) => async (args) => { + try { + const response = await next(args); + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + logger?.info?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata + }); + return response; + } catch (error) { + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + logger?.error?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error, + metadata: error.$metadata + }); + throw error; + } + }; + var loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true + }; + var getLoggerPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); + } + }); + var recursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION", "TRACE_CONTEXT_PROPAGATION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low" + }; + var AWS_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; + var _X_AMZN_TRACE_ID = "_X_AMZN_TRACE_ID"; + var X_AMZN_TRACE_ID = "X-Amzn-Trace-Id"; + var TRACEPARENT = "traceparent"; + var TRACESTATE = "tracestate"; + var BAGGAGE = "baggage"; + var recursionDetectionMiddleware = () => (next) => async (args) => { + const { request } = args; + if (!HttpRequest.isInstance(request)) { + return next(args); + } + let invokeStore; + { + const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === X_AMZN_TRACE_ID.toLowerCase()) ?? X_AMZN_TRACE_ID; + if (!request.headers.hasOwnProperty(traceIdHeader)) { + const functionName = process.env[AWS_LAMBDA_FUNCTION_NAME]; + const traceIdFromEnv = process.env[_X_AMZN_TRACE_ID]; + invokeStore ??= await InvokeStore.getInstanceAsync(); + const traceIdFromInvokeStore = invokeStore?.getXRayTraceId(); + const traceId = traceIdFromInvokeStore ?? traceIdFromEnv; + const nonEmptyString = (str) => typeof str === "string" && str.length > 0; + if (nonEmptyString(functionName) && nonEmptyString(traceId)) { + request.headers[X_AMZN_TRACE_ID] = traceId; + } + } + } + { + sanitizeTraceHeaders(request.headers); + const existingTraceparent = request.headers[TRACEPARENT]; + if (!existingTraceparent) { + const traceparent = (invokeStore ??= await InvokeStore.getInstanceAsync())?.getTraceparent?.(); + if (traceparent) { + request.headers[TRACEPARENT] = traceparent; + const tracestate = invokeStore?.getTracestate?.(); + if (tracestate) { + request.headers[TRACESTATE] = tracestate; + } + const baggage = invokeStore?.getBaggage?.(); + if (baggage) { + request.headers[BAGGAGE] = baggage; + } + } + } + } + return next(args); + }; + function sanitizeTraceHeaders(headers) { + for (const header of Object.keys(headers)) { + const lower = header.toLowerCase(); + if (header !== lower && (lower === TRACEPARENT || lower === TRACESTATE || lower === BAGGAGE)) { + headers[lower] = headers[header]; + delete headers[header]; + } + } + } + var getRecursionDetectionPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions); + } + }); + var DEFAULT_UA_APP_ID = undefined; + function isValidUserAgentAppId(appId) { + if (appId === undefined) { + return true; + } + return typeof appId === "string" && appId.length <= 50; + } + function resolveUserAgentConfig(input) { + const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID); + const { customUserAgent } = input; + return Object.assign(input, { + customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent, + userAgentAppId: async () => { + const appId = await normalizedAppIdProvider(); + if (!isValidUserAgentAppId(appId)) { + const logger = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger; + if (typeof appId !== "string") { + logger?.warn("userAgentAppId must be a string or undefined."); + } else if (appId.length > 50) { + logger?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."); + } + } + return appId; + } + }); + } + var partitionsInfo = { + partitions: [ + { + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-east-2": { + description: "Asia Pacific (Taipei)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "ap-southeast-5": { + description: "Asia Pacific (Malaysia)" + }, + "ap-southeast-6": { + description: "Asia Pacific (New Zealand)" + }, + "ap-southeast-7": { + description: "Asia Pacific (Thailand)" + }, + "aws-global": { + description: "aws global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "mx-central-1": { + description: "Mexico (Central)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, + { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "aws-cn global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, + { + id: "aws-eusc", + outputs: { + dnsSuffix: "amazonaws.eu", + dualStackDnsSuffix: "api.amazonwebservices.eu", + implicitGlobalRegion: "eusc-de-east-1", + name: "aws-eusc", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + regions: { + "eusc-de-east-1": { + description: "AWS European Sovereign Cloud (Germany)" + } + } + }, + { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "api.aws.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "aws-iso global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, + { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "api.aws.scloud", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "aws-iso-b global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + }, + "us-isob-west-1": { + description: "US ISOB West" + } + } + }, + { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "api.cloud-aws.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "aws-iso-e-global": { + description: "aws-iso-e global region" + }, + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, + { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "api.aws.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: { + "aws-iso-f-global": { + description: "aws-iso-f global region" + }, + "us-isof-east-1": { + description: "US ISOF EAST" + }, + "us-isof-south-1": { + description: "US ISOF SOUTH" + } + } + }, + { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "aws-us-gov global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + } + ], + version: "1.1" + }; + var selectedPartitionsInfo = partitionsInfo; + var selectedUserAgentPrefix = ""; + var partition = (value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition of partitions) { + const { regions, outputs } = partition; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData + }; + } + } + } + for (const partition of partitions) { + const { regionRegex, outputs } = partition; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error("Provided region was not found in the partition array or regex," + " and default partition with id 'aws' doesn't exist."); + } + return { + ...DEFAULT_PARTITION.outputs + }; + }; + var setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; + }; + var useDefaultPartitionInfo = () => { + setPartitionInfo(partitionsInfo, ""); + }; + var getUserAgentPrefix = () => selectedUserAgentPrefix; + var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/; + async function checkFeatures(context, config, args) { + const request = args.request; + if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") { + setFeature(context, "PROTOCOL_RPC_V2_CBOR", "M"); + } + if (typeof config.retryStrategy === "function") { + const retryStrategy = await config.retryStrategy(); + if (typeof retryStrategy.mode === "string") { + switch (retryStrategy.mode) { + case RETRY_MODES.ADAPTIVE: + setFeature(context, "RETRY_MODE_ADAPTIVE", "F"); + break; + case RETRY_MODES.STANDARD: + setFeature(context, "RETRY_MODE_STANDARD", "E"); + break; + } + } + } + if (typeof config.accountIdEndpointMode === "function") { + const endpointV2 = context.endpointV2; + if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) { + setFeature(context, "ACCOUNT_ID_ENDPOINT", "O"); + } + switch (await config.accountIdEndpointMode?.()) { + case "disabled": + setFeature(context, "ACCOUNT_ID_MODE_DISABLED", "Q"); + break; + case "preferred": + setFeature(context, "ACCOUNT_ID_MODE_PREFERRED", "P"); + break; + case "required": + setFeature(context, "ACCOUNT_ID_MODE_REQUIRED", "R"); + break; + } + } + const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity; + if (identity?.$source) { + const credentials = identity; + if (credentials.accountId) { + setFeature(context, "RESOLVED_ACCOUNT_ID", "T"); + } + for (const [key, value] of Object.entries(credentials.$source ?? {})) { + setFeature(context, key, value); + } + } + } + var USER_AGENT = "user-agent"; + var X_AMZ_USER_AGENT = "x-amz-user-agent"; + var SPACE = " "; + var UA_NAME_SEPARATOR = "/"; + var UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g; + var UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g; + var UA_ESCAPE_CHAR = "-"; + var BYTE_LIMIT = 1024; + function encodeFeatures(features) { + let buffer = ""; + for (const key in features) { + const val = features[key]; + if (buffer.length + val.length + 1 <= BYTE_LIMIT) { + if (buffer.length) { + buffer += "," + val; + } else { + buffer += val; + } + continue; + } + break; + } + return buffer; + } + var userAgentMiddleware = (options) => (next, context) => async (args) => { + const { request } = args; + if (!HttpRequest.isInstance(request)) { + return next(args); + } + const { headers } = request; + const userAgent = context?.userAgent?.map(escapeUserAgent) || []; + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + await checkFeatures(context, options, args); + const awsContext = context; + defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`); + const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || []; + const appId = await options.userAgentAppId(); + if (appId) { + defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`])); + } + const prefix = getUserAgentPrefix(); + const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE); + const normalUAValue = [ + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), + ...customUserAgent + ].join(SPACE); + if (options.runtime !== "browser") { + if (normalUAValue) { + headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue; + } + headers[USER_AGENT] = sdkUserAgentValue; + } else { + headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; + } + return next({ + ...args, + request + }); + }; + var escapeUserAgent = (userAgentPair) => { + const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); + const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); + const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); + const prefix = name.substring(0, prefixSeparatorIndex); + let uaName = name.substring(prefixSeparatorIndex + 1); + if (prefix === "api") { + uaName = uaName.toLowerCase(); + } + return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => { + switch (index) { + case 0: + return item; + case 1: + return `${acc}/${item}`; + default: + return `${acc}#${item}`; + } + }, ""); + }; + var getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true + }; + var getUserAgentPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions); + } + }); + var getRuntimeUserAgentPair = () => { + const runtimesToCheck = ["deno", "bun", "llrt"]; + for (const runtime of runtimesToCheck) { + if (versions[runtime]) { + return [`md/${runtime}`, versions[runtime]]; + } + } + return ["md/nodejs", versions.node]; + }; + var crtAvailability = { + isCrtAvailable: false + }; + var isCrtAvailable = () => { + if (crtAvailability.isCrtAvailable) { + return ["md/crt-avail"]; + } + return null; + }; + var createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => { + const runtimeUserAgentPair = getRuntimeUserAgentPair(); + return async (config) => { + const sections = [ + ["aws-sdk-js", clientVersion], + ["ua", "2.1"], + [`os/${platform()}`, release()], + ["lang/js"], + runtimeUserAgentPair + ]; + const crtAvailable = isCrtAvailable(); + if (crtAvailable) { + sections.push(crtAvailable); + } + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + if (env.AWS_EXECUTION_ENV) { + sections.push([`exec-env/${env.AWS_EXECUTION_ENV}`]); + } + const appId = await config?.userAgentAppId?.(); + const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; + return resolvedUserAgent; + }; + }; + var defaultUserAgent = createDefaultUserAgentProvider; + var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; + var UA_APP_ID_INI_NAME = "sdk_ua_app_id"; + var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id"; + var NODE_APP_ID_CONFIG_OPTIONS = { + environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME], + configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], + default: DEFAULT_UA_APP_ID + }; + var createUserAgentStringParsingProvider = ({ serviceId, clientVersion }) => async (config) => { + const module2 = require_es5(); + const parse2 = module2.parse ?? module2.default.parse ?? (() => ""); + const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent ? parse2(window.navigator.userAgent) : undefined; + const sections = [ + ["aws-sdk-js", clientVersion], + ["ua", "2.1"], + [`os/${parsedUA?.os?.name || "other"}`, parsedUA?.os?.version], + ["lang/js"], + ["md/browser", `${parsedUA?.browser?.name ?? "unknown"}_${parsedUA?.browser?.version ?? "unknown"}`] + ]; + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + const appId = await config?.userAgentAppId?.(); + if (appId) { + sections.push([`app/${appId}`]); + } + return sections; + }; + var fallback = { + os(ua) { + if (/iPhone|iPad|iPod/.test(ua)) + return "iOS"; + if (/Macintosh|Mac OS X/.test(ua)) + return "macOS"; + if (/Windows NT/.test(ua)) + return "Windows"; + if (/Android/.test(ua)) + return "Android"; + if (/Linux/.test(ua)) + return "Linux"; + return; + }, + browser(ua) { + if (/EdgiOS|EdgA|Edg\//.test(ua)) + return "Microsoft Edge"; + if (/Firefox\//.test(ua)) + return "Firefox"; + if (/Chrome\//.test(ua)) + return "Chrome"; + if (/Safari\//.test(ua)) + return "Safari"; + return; + } + }; + var isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!isValidHostLabel(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if (isIpAddress(value)) { + return false; + } + return true; + }; + var ARN_DELIMITER = ":"; + var RESOURCE_DELIMITER = "/"; + var parseArn = (value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) + return null; + const [arn, partition, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") + return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition, + service, + region, + accountId, + resourceId + }; + }; + var awsEndpointFunctions = { + isVirtualHostableS3Bucket, + parseArn, + partition + }; + customEndpointFunctions.aws = awsEndpointFunctions; + var resolveDefaultAwsRegionalEndpointsConfig = (input) => { + if (typeof input.endpointProvider !== "function") { + throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); + } + const { endpoint } = input; + if (endpoint === undefined) { + input.endpoint = async () => { + return toEndpointV1(input.endpointProvider({ + Region: typeof input.region === "function" ? await input.region() : input.region, + UseDualStack: typeof input.useDualstackEndpoint === "function" ? await input.useDualstackEndpoint() : input.useDualstackEndpoint, + UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint, + Endpoint: undefined + }, { logger: input.logger })); + }; + } + return input; + }; + var toEndpointV1 = (endpoint) => parseUrl(endpoint.url); + function stsRegionDefaultResolver(loaderConfig = {}) { + return loadConfig({ + ...NODE_REGION_CONFIG_OPTIONS, + async default() { + if (!warning.silence) { + console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly."); + } + return "us-east-1"; + } + }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }); + } + var warning = { + silence: false + }; + var getAwsRegionExtensionConfiguration = (runtimeConfig) => { + return { + setRegion(region) { + runtimeConfig.region = region; + }, + region() { + return runtimeConfig.region; + } + }; + }; + var resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region() + }; + }; + exports.DEFAULT_UA_APP_ID = DEFAULT_UA_APP_ID; + exports.NODE_APP_ID_CONFIG_OPTIONS = NODE_APP_ID_CONFIG_OPTIONS; + exports.UA_APP_ID_ENV_NAME = UA_APP_ID_ENV_NAME; + exports.UA_APP_ID_INI_NAME = UA_APP_ID_INI_NAME; + exports.awsEndpointFunctions = awsEndpointFunctions; + exports.createDefaultUserAgentProvider = createDefaultUserAgentProvider; + exports.createUserAgentStringParsingProvider = createUserAgentStringParsingProvider; + exports.crtAvailability = crtAvailability; + exports.defaultUserAgent = defaultUserAgent; + exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion; + exports.fallback = fallback; + exports.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration; + exports.getHostHeaderPlugin = getHostHeaderPlugin; + exports.getLoggerPlugin = getLoggerPlugin; + exports.getLongPollPlugin = getLongPollPlugin; + exports.getRecursionDetectionPlugin = getRecursionDetectionPlugin; + exports.getUserAgentMiddlewareOptions = getUserAgentMiddlewareOptions; + exports.getUserAgentPlugin = getUserAgentPlugin; + exports.getUserAgentPrefix = getUserAgentPrefix; + exports.hostHeaderMiddleware = hostHeaderMiddleware; + exports.hostHeaderMiddlewareOptions = hostHeaderMiddlewareOptions; + exports.isVirtualHostableS3Bucket = isVirtualHostableS3Bucket; + exports.loggerMiddleware = loggerMiddleware; + exports.loggerMiddlewareOptions = loggerMiddlewareOptions; + exports.parseArn = parseArn; + exports.partition = partition; + exports.recursionDetectionMiddleware = recursionDetectionMiddleware; + exports.recursionDetectionMiddlewareOptions = recursionDetectionMiddlewareOptions; + exports.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration; + exports.resolveDefaultAwsRegionalEndpointsConfig = resolveDefaultAwsRegionalEndpointsConfig; + exports.resolveHostHeaderConfig = resolveHostHeaderConfig; + exports.resolveUserAgentConfig = resolveUserAgentConfig; + exports.setCredentialFeature = setCredentialFeature; + exports.setFeature = setFeature; + exports.setPartitionInfo = setPartitionInfo; + exports.setTokenFeature = setTokenFeature; + exports.state = state; + exports.stsRegionDefaultResolver = stsRegionDefaultResolver; + exports.stsRegionWarning = warning; + exports.toEndpointV1 = toEndpointV1; + exports.useDefaultPartitionInfo = useDefaultPartitionInfo; + exports.userAgentMiddleware = userAgentMiddleware; +}); + +// node_modules/@aws-sdk/checksums/dist-cjs/submodules/crc/index.js +var require_crc = __commonJS(function(exports) { + var { Crc32, Crc32Js, Crc32Node } = require_checksum(); + exports.Crc32 = Crc32; + exports.Crc32Js = Crc32Js; + exports.Crc32Node = Crc32Node; + var T = new Uint32Array(256); + for (let i = 0;i < 256; ++i) { + let c = i; + for (let j = 0;j < 8; ++j) { + c = c & 1 ? 2197175160 ^ c >>> 1 : c >>> 1; + } + T[i] = c >>> 0; + } + + class Crc32cJs { + digestLength = 4; + crc = 4294967295; + update(data) { + let crc = this.crc; + for (let i = 0;i < data.length; ++i) { + crc = crc >>> 8 ^ T[(crc ^ data[i]) & 255]; + } + this.crc = crc; + } + async digest() { + const value = (this.crc ^ 4294967295) >>> 0; + const out = new Uint8Array(4); + out[0] = value >>> 24; + out[1] = value >>> 16 & 255; + out[2] = value >>> 8 & 255; + out[3] = value & 255; + return out; + } + reset() { + this.crc = 4294967295; + } + } + var Crc32cNode = Crc32cJs; + var crc64NvmeCrtContainer = { + CrtCrc64Nvme: null + }; + var generateCRC64NVMETable = () => { + const sliceLength = 8; + const tables = new Array(sliceLength); + for (let slice = 0;slice < sliceLength; slice++) { + const table = new Array(512); + for (let i = 0;i < 256; i++) { + let crc = BigInt(i); + for (let j = 0;j < 8 * (slice + 1); j++) { + if (crc & 1n) { + crc = crc >> 1n ^ 0x9a6c9329ac4bc9b5n; + } else { + crc = crc >> 1n; + } + } + table[i * 2] = Number(crc >> 32n & 0xffffffffn); + table[i * 2 + 1] = Number(crc & 0xffffffffn); + } + tables[slice] = new Uint32Array(table); + } + return tables; + }; + var CRC64_NVME_REVERSED_TABLE; + var t0; + var t1; + var t2; + var t3; + var t4; + var t5; + var t6; + var t7; + var ensureTablesInitialized = () => { + if (!CRC64_NVME_REVERSED_TABLE) { + CRC64_NVME_REVERSED_TABLE = generateCRC64NVMETable(); + [t0, t1, t2, t3, t4, t5, t6, t7] = CRC64_NVME_REVERSED_TABLE; + } + }; + + class Crc64NvmeJs { + c1 = 0; + c2 = 0; + constructor() { + ensureTablesInitialized(); + this.reset(); + } + update(data) { + const len = data.length; + let i = 0; + let crc1 = this.c1; + let crc2 = this.c2; + while (i + 8 <= len) { + const idx0 = ((crc2 ^ data[i++]) & 255) << 1; + const idx1 = ((crc2 >>> 8 ^ data[i++]) & 255) << 1; + const idx2 = ((crc2 >>> 16 ^ data[i++]) & 255) << 1; + const idx3 = ((crc2 >>> 24 ^ data[i++]) & 255) << 1; + const idx4 = ((crc1 ^ data[i++]) & 255) << 1; + const idx5 = ((crc1 >>> 8 ^ data[i++]) & 255) << 1; + const idx6 = ((crc1 >>> 16 ^ data[i++]) & 255) << 1; + const idx7 = ((crc1 >>> 24 ^ data[i++]) & 255) << 1; + crc1 = t7[idx0] ^ t6[idx1] ^ t5[idx2] ^ t4[idx3] ^ t3[idx4] ^ t2[idx5] ^ t1[idx6] ^ t0[idx7]; + crc2 = t7[idx0 + 1] ^ t6[idx1 + 1] ^ t5[idx2 + 1] ^ t4[idx3 + 1] ^ t3[idx4 + 1] ^ t2[idx5 + 1] ^ t1[idx6 + 1] ^ t0[idx7 + 1]; + } + while (i < len) { + const idx = ((crc2 ^ data[i]) & 255) << 1; + crc2 = (crc2 >>> 8 | (crc1 & 255) << 24) >>> 0; + crc1 = crc1 >>> 8 ^ t0[idx]; + crc2 ^= t0[idx + 1]; + ++i; + } + this.c1 = crc1; + this.c2 = crc2; + } + async digest() { + const c1 = this.c1 ^ 4294967295; + const c2 = this.c2 ^ 4294967295; + return new Uint8Array([ + c1 >>> 24, + c1 >>> 16 & 255, + c1 >>> 8 & 255, + c1 & 255, + c2 >>> 24, + c2 >>> 16 & 255, + c2 >>> 8 & 255, + c2 & 255 + ]); + } + reset() { + this.c1 = 4294967295; + this.c2 = 4294967295; + } + } + + class Crc64Nvme { + impl; + constructor() { + const Crt = crc64NvmeCrtContainer.CrtCrc64Nvme; + this.impl = Crt ? new Crt : new Crc64NvmeJs; + } + update(data) { + this.impl.update(data); + } + async digest() { + return this.impl.digest(); + } + reset() { + this.impl.reset(); + } + } + exports.Crc32c = Crc32cNode; + exports.Crc32cJs = Crc32cJs; + exports.Crc32cNode = Crc32cNode; + exports.Crc64Nvme = Crc64Nvme; + exports.Crc64NvmeJs = Crc64NvmeJs; + exports.crc64NvmeCrtContainer = crc64NvmeCrtContainer; +}); + +// node_modules/@aws-sdk/checksums/dist-cjs/submodules/flexible-checksums/index.js +var require_flexible_checksums = __commonJS(function(exports) { + var { setFeature } = require_client2(); + var { HttpRequest } = require_protocols(); + var { isArrayBuffer, toUint8Array, createBufferedReadable, createChecksumStream } = require_serde(); + var { Crc64Nvme, Crc32c, Crc32 } = require_crc(); + var { normalizeProvider } = require_client(); + var RequestChecksumCalculation = { + WHEN_SUPPORTED: "WHEN_SUPPORTED", + WHEN_REQUIRED: "WHEN_REQUIRED" + }; + var DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED; + var ResponseChecksumValidation = { + WHEN_SUPPORTED: "WHEN_SUPPORTED", + WHEN_REQUIRED: "WHEN_REQUIRED" + }; + var DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED; + var ChecksumAlgorithm; + (function(ChecksumAlgorithm) { + ChecksumAlgorithm["MD5"] = "MD5"; + ChecksumAlgorithm["CRC32"] = "CRC32"; + ChecksumAlgorithm["CRC32C"] = "CRC32C"; + ChecksumAlgorithm["CRC64NVME"] = "CRC64NVME"; + ChecksumAlgorithm["SHA1"] = "SHA1"; + ChecksumAlgorithm["SHA256"] = "SHA256"; + })(ChecksumAlgorithm || (ChecksumAlgorithm = {})); + var ChecksumLocation; + (function(ChecksumLocation) { + ChecksumLocation["HEADER"] = "header"; + ChecksumLocation["TRAILER"] = "trailer"; + })(ChecksumLocation || (ChecksumLocation = {})); + var DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32; + var SelectorType; + (function(SelectorType) { + SelectorType["ENV"] = "env"; + SelectorType["CONFIG"] = "shared config entry"; + })(SelectorType || (SelectorType = {})); + var stringUnionSelector = (obj, key, union, type) => { + if (!(key in obj)) + return; + const value = obj[key].toUpperCase(); + if (!Object.values(union).includes(value)) { + throw new TypeError(`Cannot load ${type} '${key}'. Expected one of ${Object.values(union)}, got '${obj[key]}'.`); + } + return value; + }; + var ENV_REQUEST_CHECKSUM_CALCULATION = "AWS_REQUEST_CHECKSUM_CALCULATION"; + var CONFIG_REQUEST_CHECKSUM_CALCULATION = "request_checksum_calculation"; + var NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => stringUnionSelector(env, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.ENV), + configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.CONFIG), + default: DEFAULT_REQUEST_CHECKSUM_CALCULATION + }; + var ENV_RESPONSE_CHECKSUM_VALIDATION = "AWS_RESPONSE_CHECKSUM_VALIDATION"; + var CONFIG_RESPONSE_CHECKSUM_VALIDATION = "response_checksum_validation"; + var NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => stringUnionSelector(env, ENV_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.ENV), + configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.CONFIG), + default: DEFAULT_RESPONSE_CHECKSUM_VALIDATION + }; + var getChecksumAlgorithmForRequest = (input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => { + if (!requestAlgorithmMember) { + return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired ? DEFAULT_CHECKSUM_ALGORITHM : undefined; + } + if (!input[requestAlgorithmMember]) { + return; + } + const checksumAlgorithm = input[requestAlgorithmMember]; + return checksumAlgorithm; + }; + var getChecksumLocationName = (algorithm) => algorithm === ChecksumAlgorithm.MD5 ? "content-md5" : `x-amz-checksum-${algorithm.toLowerCase()}`; + var hasHeader = (header, headers) => { + const soughtHeader = header.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; + }; + var hasHeaderWithPrefix = (headerPrefix, headers) => { + const soughtHeaderPrefix = headerPrefix.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) { + return true; + } + } + return false; + }; + var isStreaming = (body) => body !== undefined && typeof body !== "string" && !ArrayBuffer.isView(body) && !isArrayBuffer(body); + var CLIENT_SUPPORTED_ALGORITHMS = [ + ChecksumAlgorithm.CRC32, + ChecksumAlgorithm.CRC32C, + ChecksumAlgorithm.CRC64NVME, + ChecksumAlgorithm.SHA1, + ChecksumAlgorithm.SHA256 + ]; + var PRIORITY_ORDER_ALGORITHMS = [ + ChecksumAlgorithm.SHA256, + ChecksumAlgorithm.SHA1, + ChecksumAlgorithm.CRC32, + ChecksumAlgorithm.CRC32C, + ChecksumAlgorithm.CRC64NVME + ]; + var selectChecksumAlgorithmFunction = (checksumAlgorithm, config) => { + const { checksumAlgorithms = {} } = config; + switch (checksumAlgorithm) { + case ChecksumAlgorithm.MD5: + return checksumAlgorithms?.MD5 ?? config.md5; + case ChecksumAlgorithm.CRC32: + return checksumAlgorithms?.CRC32 ?? Crc32; + case ChecksumAlgorithm.CRC32C: + return checksumAlgorithms?.CRC32C ?? Crc32c; + case ChecksumAlgorithm.CRC64NVME: + return checksumAlgorithms?.CRC64NVME ?? Crc64Nvme; + case ChecksumAlgorithm.SHA1: + return checksumAlgorithms?.SHA1 ?? config.sha1; + case ChecksumAlgorithm.SHA256: + return checksumAlgorithms?.SHA256 ?? config.sha256; + default: + if (checksumAlgorithms?.[checksumAlgorithm]) { + return checksumAlgorithms[checksumAlgorithm]; + } + throw new Error(`The checksum algorithm "${checksumAlgorithm}" is not supported by the client.` + ` Select one of ${CLIENT_SUPPORTED_ALGORITHMS}, or provide an implementation to ` + ` the client constructor checksums field.`); + } + }; + var stringHasher = (checksumAlgorithmFn, body) => { + const hash = new checksumAlgorithmFn; + hash.update(toUint8Array(body || "")); + return hash.digest(); + }; + var flexibleChecksumsMiddlewareOptions = { + name: "flexibleChecksumsMiddleware", + step: "build", + tags: ["BODY_CHECKSUM"], + override: true + }; + var flexibleChecksumsMiddleware = (config, middlewareConfig) => (next, context) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + if (hasHeaderWithPrefix("x-amz-checksum-", args.request.headers)) { + return next(args); + } + const { request, input } = args; + const { body: requestBody, headers } = request; + const { base64Encoder, streamHasher } = config; + const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig; + const requestChecksumCalculation = await config.requestChecksumCalculation(); + const requestAlgorithmMemberName = requestAlgorithmMember?.name; + const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader; + if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) { + if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) { + input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM; + if (requestAlgorithmMemberHttpHeader) { + headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM; + } + } + } + const checksumAlgorithm = getChecksumAlgorithmForRequest(input, { + requestChecksumRequired, + requestAlgorithmMember: requestAlgorithmMember?.name, + requestChecksumCalculation + }); + let updatedBody = requestBody; + let updatedHeaders = headers; + if (checksumAlgorithm) { + switch (checksumAlgorithm) { + case ChecksumAlgorithm.CRC32: + setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_CRC32", "U"); + break; + case ChecksumAlgorithm.CRC32C: + setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_CRC32C", "V"); + break; + case ChecksumAlgorithm.CRC64NVME: + setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_CRC64", "W"); + break; + case ChecksumAlgorithm.SHA1: + setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_SHA1", "X"); + break; + case ChecksumAlgorithm.SHA256: + setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_SHA256", "Y"); + break; + } + const checksumLocationName = getChecksumLocationName(checksumAlgorithm); + const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config); + if (isStreaming(requestBody)) { + const { getAwsChunkedEncodingStream, bodyLengthChecker } = config; + updatedBody = getAwsChunkedEncodingStream(typeof config.requestStreamBufferSize === "number" && config.requestStreamBufferSize >= 8 * 1024 ? createBufferedReadable(requestBody, config.requestStreamBufferSize, context.logger) : requestBody, { + base64Encoder, + bodyLengthChecker, + checksumLocationName, + checksumAlgorithmFn, + streamHasher + }); + updatedHeaders = { + ...headers, + "content-encoding": headers["content-encoding"] ? `${headers["content-encoding"]},aws-chunked` : "aws-chunked", + "transfer-encoding": "chunked", + "x-amz-decoded-content-length": headers["content-length"], + "x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER", + "x-amz-trailer": checksumLocationName + }; + delete updatedHeaders["content-length"]; + } else if (!hasHeader(checksumLocationName, headers)) { + const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody); + updatedHeaders = { + ...headers, + [checksumLocationName]: base64Encoder(rawChecksum) + }; + } + } + try { + const result = await next({ + ...args, + request: { + ...request, + headers: updatedHeaders, + body: updatedBody + } + }); + return result; + } catch (e) { + if (e instanceof Error && e.name === "InvalidChunkSizeError") { + try { + if (!e.message.endsWith(".")) { + e.message += "."; + } + e.message += " Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."; + } catch (ignored) {} + } + throw e; + } + }; + var flexibleChecksumsInputMiddlewareOptions = { + name: "flexibleChecksumsInputMiddleware", + toMiddleware: "serializerMiddleware", + relation: "before", + tags: ["BODY_CHECKSUM"], + override: true + }; + var flexibleChecksumsInputMiddleware = (config, middlewareConfig) => (next, context) => async (args) => { + const input = args.input; + const { requestValidationModeMember } = middlewareConfig; + const requestChecksumCalculation = await config.requestChecksumCalculation(); + const responseChecksumValidation = await config.responseChecksumValidation(); + switch (requestChecksumCalculation) { + case RequestChecksumCalculation.WHEN_REQUIRED: + setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED", "a"); + break; + case RequestChecksumCalculation.WHEN_SUPPORTED: + setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED", "Z"); + break; + } + switch (responseChecksumValidation) { + case ResponseChecksumValidation.WHEN_REQUIRED: + setFeature(context, "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED", "c"); + break; + case ResponseChecksumValidation.WHEN_SUPPORTED: + setFeature(context, "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED", "b"); + break; + } + if (requestValidationModeMember && !input[requestValidationModeMember]) { + if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) { + input[requestValidationModeMember] = "ENABLED"; + } + } + return next(args); + }; + var getChecksumAlgorithmListForResponse = (responseAlgorithms = []) => { + const validChecksumAlgorithms = []; + let i = PRIORITY_ORDER_ALGORITHMS.length; + for (const algorithm of responseAlgorithms) { + const priority = PRIORITY_ORDER_ALGORITHMS.indexOf(algorithm); + if (priority !== -1) { + validChecksumAlgorithms[priority] = algorithm; + } else { + validChecksumAlgorithms[i++] = algorithm; + } + } + return validChecksumAlgorithms.filter(Boolean); + }; + var isChecksumWithPartNumber = (checksum) => { + const lastHyphenIndex = checksum.lastIndexOf("-"); + if (lastHyphenIndex !== -1) { + const numberPart = checksum.slice(lastHyphenIndex + 1); + if (!numberPart.startsWith("0")) { + const number = parseInt(numberPart, 10); + if (!isNaN(number) && number >= 1 && number <= 1e4) { + return true; + } + } + } + return false; + }; + var getChecksum = async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body)); + var validateChecksumFromResponse = async (response, { config, responseAlgorithms, logger }) => { + const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms); + const { body: responseBody, headers: responseHeaders } = response; + for (const algorithm of checksumAlgorithms) { + const responseHeader = getChecksumLocationName(algorithm); + const checksumFromResponse = responseHeaders[responseHeader]; + if (checksumFromResponse) { + let checksumAlgorithmFn; + try { + checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config); + } catch (error) { + if (algorithm === ChecksumAlgorithm.CRC64NVME) { + logger?.warn(`Skipping ${ChecksumAlgorithm.CRC64NVME} checksum validation: ${error.message}`); + continue; + } + throw error; + } + const { base64Encoder } = config; + if (isStreaming(responseBody)) { + response.body = createChecksumStream({ + expectedChecksum: checksumFromResponse, + checksumSourceLocation: responseHeader, + checksum: new checksumAlgorithmFn, + source: responseBody, + base64Encoder + }); + return; + } + const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder }); + if (checksum === checksumFromResponse) { + break; + } + throw new Error(`Checksum mismatch: expected "${checksum}" but received "${checksumFromResponse}"` + ` in response header "${responseHeader}".`); + } + } + }; + var flexibleChecksumsResponseMiddlewareOptions = { + name: "flexibleChecksumsResponseMiddleware", + toMiddleware: "deserializerMiddleware", + relation: "after", + tags: ["BODY_CHECKSUM"], + override: true + }; + var flexibleChecksumsResponseMiddleware = (config, middlewareConfig) => (next, context) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const input = args.input; + const result = await next(args); + const response = result.response; + const { requestValidationModeMember, responseAlgorithms } = middlewareConfig; + if (requestValidationModeMember && input[requestValidationModeMember] === "ENABLED") { + const { clientName, commandName } = context; + const customChecksumAlgorithms = Object.keys(config.checksumAlgorithms ?? {}).filter((algorithm) => { + const responseHeader = getChecksumLocationName(algorithm); + return response.headers[responseHeader] !== undefined; + }); + const algoList = getChecksumAlgorithmListForResponse([ + ...responseAlgorithms ?? [], + ...customChecksumAlgorithms + ]); + const isS3WholeObjectMultipartGetResponseChecksum = clientName === "S3Client" && commandName === "GetObjectCommand" && algoList.every((algorithm) => { + const responseHeader = getChecksumLocationName(algorithm); + const checksumFromResponse = response.headers[responseHeader]; + return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse); + }); + if (isS3WholeObjectMultipartGetResponseChecksum) { + return result; + } + await validateChecksumFromResponse(response, { + config, + responseAlgorithms: algoList, + logger: context.logger + }); + } + return result; + }; + var getFlexibleChecksumsPlugin = (config, middlewareConfig) => ({ + applyToStack: (clientStack) => { + clientStack.add(flexibleChecksumsMiddleware(config, middlewareConfig), flexibleChecksumsMiddlewareOptions); + clientStack.addRelativeTo(flexibleChecksumsInputMiddleware(config, middlewareConfig), flexibleChecksumsInputMiddlewareOptions); + clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions); + } + }); + var resolveFlexibleChecksumsConfig = (input) => { + const { requestChecksumCalculation, responseChecksumValidation, requestStreamBufferSize } = input; + return Object.assign(input, { + requestChecksumCalculation: normalizeProvider(requestChecksumCalculation ?? DEFAULT_REQUEST_CHECKSUM_CALCULATION), + responseChecksumValidation: normalizeProvider(responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION), + requestStreamBufferSize: Number(requestStreamBufferSize ?? 0), + checksumAlgorithms: input.checksumAlgorithms ?? {} + }); + }; + exports.CONFIG_REQUEST_CHECKSUM_CALCULATION = CONFIG_REQUEST_CHECKSUM_CALCULATION; + exports.CONFIG_RESPONSE_CHECKSUM_VALIDATION = CONFIG_RESPONSE_CHECKSUM_VALIDATION; + exports.ChecksumAlgorithm = ChecksumAlgorithm; + exports.ChecksumLocation = ChecksumLocation; + exports.DEFAULT_CHECKSUM_ALGORITHM = DEFAULT_CHECKSUM_ALGORITHM; + exports.DEFAULT_REQUEST_CHECKSUM_CALCULATION = DEFAULT_REQUEST_CHECKSUM_CALCULATION; + exports.DEFAULT_RESPONSE_CHECKSUM_VALIDATION = DEFAULT_RESPONSE_CHECKSUM_VALIDATION; + exports.ENV_REQUEST_CHECKSUM_CALCULATION = ENV_REQUEST_CHECKSUM_CALCULATION; + exports.ENV_RESPONSE_CHECKSUM_VALIDATION = ENV_RESPONSE_CHECKSUM_VALIDATION; + exports.NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS; + exports.NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS; + exports.RequestChecksumCalculation = RequestChecksumCalculation; + exports.ResponseChecksumValidation = ResponseChecksumValidation; + exports.flexibleChecksumsMiddleware = flexibleChecksumsMiddleware; + exports.flexibleChecksumsMiddlewareOptions = flexibleChecksumsMiddlewareOptions; + exports.getFlexibleChecksumsPlugin = getFlexibleChecksumsPlugin; + exports.resolveFlexibleChecksumsConfig = resolveFlexibleChecksumsConfig; +}); + +// node_modules/@smithy/signature-v4/dist-cjs/index.js +var require_dist_cjs3 = __commonJS(function(exports) { + var { hasOwn, fromUtf8, fromHex, toHex, toUint8Array, isArrayBuffer } = require_serde(); + var { normalizeProvider } = require_client(); + var { escapeUri, HttpRequest } = require_protocols(); + + class HeaderFormatter { + format(headers) { + const chunks = []; + for (const headerName in headers) { + if (!hasOwn(headers, headerName)) + continue; + const bytes = fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set(fromHex(header.value.replace(/-/g, "")), 1); + return uuidBytes; + } + } + } + var HEADER_VALUE_TYPE; + (function(HEADER_VALUE_TYPE) { + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolTrue"] = 0] = "boolTrue"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolFalse"] = 1] = "boolFalse"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byte"] = 2] = "byte"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["short"] = 3] = "short"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["integer"] = 4] = "integer"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["long"] = 5] = "long"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byteArray"] = 6] = "byteArray"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["string"] = 7] = "string"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["timestamp"] = 8] = "timestamp"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["uuid"] = 9] = "uuid"; + })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {})); + var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + + class Int64 { + bytes; + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number) { + if (number > 9223372036854776000 || number < -9223372036854776000) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i = 7, remaining = Math.abs(Math.round(number));i > -1 && remaining > 0; i--, remaining /= 256) { + bytes[i] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new Int64(bytes); + } + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt(toHex(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + } + function negate(bytes) { + for (let i = 0;i < 8; i++) { + bytes[i] ^= 255; + } + for (let i = 7;i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) + break; + } + } + var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; + var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; + var AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; + var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; + var EXPIRES_QUERY_PARAM = "X-Amz-Expires"; + var SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; + var TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; + var REGION_SET_PARAM = "X-Amz-Region-Set"; + var AUTH_HEADER = "authorization"; + var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); + var DATE_HEADER = "date"; + var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; + var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); + var SHA256_HEADER = "x-amz-content-sha256"; + var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); + var HOST_HEADER = "host"; + var ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true + }; + var PROXY_HEADER_PATTERN = /^proxy-/; + var SEC_HEADER_PATTERN = /^sec-/; + var UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i]; + var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; + var ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256"; + var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; + var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; + var MAX_CACHE_SIZE = 50; + var KEY_TYPE_IDENTIFIER = "aws4_request"; + var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + var getCanonicalQuery = ({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key in query) { + if (!hasOwn(query, key)) + continue; + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; + } + const encodedKey = escapeUri(key); + keys.push(encodedKey); + const value = query[key]; + if (typeof value === "string") { + serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`; + } else if (Array.isArray(value)) { + serialized[encodedKey] = value.slice(0).reduce((encoded, value) => encoded.concat([`${encodedKey}=${escapeUri(value)}`]), []).sort().join("&"); + } + } + return keys.sort().map((key) => serialized[key]).filter((serialized) => serialized).join("&"); + }; + var iso8601 = (time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z"); + var toDate = (time) => { + if (typeof time === "number") { + return new Date(time * 1000); + } + if (typeof time === "string") { + if (Number(time)) { + return new Date(Number(time) * 1000); + } + return new Date(time); + } + return time; + }; + + class SignatureV4Base { + service; + regionProvider; + credentialProvider; + sha256; + uriEscapePath; + applyChecksum; + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) { + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = normalizeProvider(region); + this.credentialProvider = normalizeProvider(credentials); + } + createCanonicalRequest(request, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request.method} +${this.getCanonicalPath(request)} +${getCanonicalQuery(request)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(` +`)} + +${sortedHeaders.join(";")} +${payloadHash}`; + } + async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) { + const hash = new this.sha256; + hash.update(toUint8Array(canonicalRequest)); + const hashedRequest = await hash.digest(); + return `${algorithmIdentifier} +${longDate} +${credentialScope} +${toHex(hashedRequest)}`; + } + getCanonicalPath({ path }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path.split("/")) { + if (pathSegment?.length === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } else { + normalizedPathSegments.push(pathSegment); + } + } + const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`; + const doubleEncoded = escapeUri(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); + } + return path; + } + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); + } + } + formatDate(now) { + const longDate = iso8601(now).replace(/[-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8) + }; + } + getCanonicalHeaderList(headers) { + return Object.keys(headers).sort().join(";"); + } + } + var signingKeyCache = {}; + var cacheQueue = []; + var createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`; + var getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; + } + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; + } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); + } + return signingKeyCache[cacheKey] = key; + }; + var clearCredentialCache = () => { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); + }; + var hmac = (ctor, secret, data) => { + const hash = new ctor(secret); + hash.update(toUint8Array(data)); + return hash.digest(); + }; + var getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == undefined) { + continue; + } + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { + continue; + } + } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + } + return canonical; + }; + var getPayloadHash = async ({ headers, body }, hashConstructor) => { + for (const headerName in headers) { + if (!hasOwn(headers, headerName)) + continue; + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; + } + } + if (body == undefined) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer(body)) { + const hashCtor = new hashConstructor; + hashCtor.update(toUint8Array(body)); + return toHex(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; + }; + var hasHeader = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName in headers) { + if (!hasOwn(headers, headerName)) + continue; + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; + }; + var moveHeadersToQuery = (request, options = {}) => { + const { headers, query = {} } = HttpRequest.clone(request); + for (const name in headers) { + if (!hasOwn(headers, name)) + continue; + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) { + query[name] = headers[name]; + delete headers[name]; + } + } + return { + ...request, + headers, + query + }; + }; + var prepareRequest = (request) => { + request = HttpRequest.clone(request); + for (const headerName in request.headers) { + if (!hasOwn(request.headers, headerName)) + continue; + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request.headers[headerName]; + } + } + return request; + }; + + class SignatureV4 extends SignatureV4Base { + headerFormatter = new HeaderFormatter; + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) { + super({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath + }); + } + async presign(originalRequest, options = {}) { + const { signingDate = new Date, expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { longDate, shortDate } = this.formatDate(signingDate); + if (expiresIn > MAX_PRESIGNED_TTL) { + return Promise.reject("Signature version 4 presigned URLs" + " must have an expiration date less than one week in" + " the future"); + } + const scope = createScope(shortDate, region, signingService ?? this.service); + const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders }); + if (credentials.sessionToken) { + request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; + } + request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; + request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request.query[AMZ_DATE_QUERY_PARAM] = longDate; + request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders); + request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256))); + return request; + } + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); + } else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); + } else if (toSign.message) { + return this.signMessage(toSign, options); + } else { + return this.signRequest(toSign, options); + } + } + async signEvent({ headers, payload }, { signingDate = new Date, priorSignature, signingRegion, signingService, eventStreamCredentials }) { + const region = signingRegion ?? await this.regionProvider(); + const { shortDate, longDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash = new this.sha256; + hash.update(headers); + const hashedHeaders = toHex(await hash.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload + ].join(` +`); + return this.signString(stringToSign, { + signingDate, + signingRegion: region, + signingService, + eventStreamCredentials + }); + } + async signMessage(signableMessage, { signingDate = new Date, signingRegion, signingService, eventStreamCredentials }) { + const promise = this.signEvent({ + headers: this.headerFormatter.format(signableMessage.message.headers), + payload: signableMessage.message.body + }, { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature, + eventStreamCredentials + }); + return promise.then((signature) => { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = new Date, signingRegion, signingService, eventStreamCredentials } = {}) { + const credentials = eventStreamCredentials ?? await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { shortDate } = this.formatDate(signingDate); + const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash.update(toUint8Array(stringToSign)); + return toHex(await hash.digest()); + } + async signRequest(requestToSign, { signingDate = new Date, signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const request = prepareRequest(requestToSign); + const { longDate, shortDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + request.headers[AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request.headers[TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await getPayloadHash(request, this.sha256); + if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) { + request.headers[SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash)); + request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} ` + `Credential=${credentials.accessKeyId}/${scope}, ` + `SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, ` + `Signature=${signature}`; + return request; + } + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER); + const hash = new this.sha256(await keyPromise); + hash.update(toUint8Array(stringToSign)); + return toHex(await hash.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + } + } + var signatureV4aContainer = { + SignatureV4a: null + }; + exports.ALGORITHM_IDENTIFIER = ALGORITHM_IDENTIFIER; + exports.ALGORITHM_IDENTIFIER_V4A = ALGORITHM_IDENTIFIER_V4A; + exports.ALGORITHM_QUERY_PARAM = ALGORITHM_QUERY_PARAM; + exports.ALWAYS_UNSIGNABLE_HEADERS = ALWAYS_UNSIGNABLE_HEADERS; + exports.AMZ_DATE_HEADER = AMZ_DATE_HEADER; + exports.AMZ_DATE_QUERY_PARAM = AMZ_DATE_QUERY_PARAM; + exports.AUTH_HEADER = AUTH_HEADER; + exports.CREDENTIAL_QUERY_PARAM = CREDENTIAL_QUERY_PARAM; + exports.DATE_HEADER = DATE_HEADER; + exports.EVENT_ALGORITHM_IDENTIFIER = EVENT_ALGORITHM_IDENTIFIER; + exports.EXPIRES_QUERY_PARAM = EXPIRES_QUERY_PARAM; + exports.GENERATED_HEADERS = GENERATED_HEADERS; + exports.HOST_HEADER = HOST_HEADER; + exports.KEY_TYPE_IDENTIFIER = KEY_TYPE_IDENTIFIER; + exports.MAX_CACHE_SIZE = MAX_CACHE_SIZE; + exports.MAX_PRESIGNED_TTL = MAX_PRESIGNED_TTL; + exports.PROXY_HEADER_PATTERN = PROXY_HEADER_PATTERN; + exports.REGION_SET_PARAM = REGION_SET_PARAM; + exports.SEC_HEADER_PATTERN = SEC_HEADER_PATTERN; + exports.SHA256_HEADER = SHA256_HEADER; + exports.SIGNATURE_HEADER = SIGNATURE_HEADER; + exports.SIGNATURE_QUERY_PARAM = SIGNATURE_QUERY_PARAM; + exports.SIGNED_HEADERS_QUERY_PARAM = SIGNED_HEADERS_QUERY_PARAM; + exports.SignatureV4 = SignatureV4; + exports.SignatureV4Base = SignatureV4Base; + exports.TOKEN_HEADER = TOKEN_HEADER; + exports.TOKEN_QUERY_PARAM = TOKEN_QUERY_PARAM; + exports.UNSIGNABLE_PATTERNS = UNSIGNABLE_PATTERNS; + exports.UNSIGNED_PAYLOAD = UNSIGNED_PAYLOAD; + exports.clearCredentialCache = clearCredentialCache; + exports.createScope = createScope; + exports.getCanonicalHeaders = getCanonicalHeaders; + exports.getCanonicalQuery = getCanonicalQuery; + exports.getPayloadHash = getPayloadHash; + exports.getSigningKey = getSigningKey; + exports.hasHeader = hasHeader; + exports.moveHeadersToQuery = moveHeadersToQuery; + exports.prepareRequest = prepareRequest; + exports.signatureV4aContainer = signatureV4aContainer; +}); + +// node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +var require_dist_cjs4 = __commonJS(function(exports) { + var { SignatureV4, signatureV4aContainer } = require_dist_cjs3(); + var signatureV4CrtContainer = { + CrtSignerV4: null + }; + var SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token"; + var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase(); + + class SignatureV4SignWithCredentials extends SignatureV4 { + async signWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return privateAccess.signRequest(requestToSign, options ?? {}); + } + async presignWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + delete requestToSign.headers[SESSION_TOKEN_HEADER]; + requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + requestToSign.query = requestToSign.query ?? {}; + requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return this.presign(requestToSign, options); + } + } + function getCredentialsWithoutSessionToken(credentials) { + return { + accessKeyId: credentials.accessKeyId, + secretAccessKey: credentials.secretAccessKey, + expiration: credentials.expiration + }; + } + function setSingleOverride(privateAccess, credentialsWithoutSessionToken) { + const currentCredentialProvider = privateAccess.credentialProvider; + privateAccess.credentialProvider = () => { + privateAccess.credentialProvider = currentCredentialProvider; + return Promise.resolve(credentialsWithoutSessionToken); + }; + } + + class SignatureV4MultiRegion { + sigv4aSigner; + sigv4Signer; + signerOptions; + static sigv4aDependency() { + if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") { + return "crt"; + } else if (typeof signatureV4aContainer.SignatureV4a === "function") { + return "js"; + } + return "none"; + } + constructor(options) { + this.sigv4Signer = new SignatureV4SignWithCredentials(options); + this.signerOptions = options; + } + async sign(requestToSign, options = {}) { + if (options.signingRegion === "*") { + return this.getSigv4aSigner().sign(requestToSign, options); + } + return this.sigv4Signer.sign(requestToSign, options); + } + async signWithCredentials(requestToSign, credentials, options = {}) { + if (options.signingRegion === "*") { + const signer = this.getSigv4aSigner(); + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + if (CrtSignerV4 && signer instanceof CrtSignerV4) { + return signer.signWithCredentials(requestToSign, credentials, options); + } else { + throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` + `Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. ` + `You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] ` + `or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. ` + `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); + } + } + return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options); + } + async presign(originalRequest, options = {}) { + if (options.signingRegion === "*") { + const signer = this.getSigv4aSigner(); + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + if (CrtSignerV4 && signer instanceof CrtSignerV4) { + return signer.presign(originalRequest, options); + } else { + throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` + `Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. ` + `You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] ` + `or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. ` + `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); + } + } + return this.sigv4Signer.presign(originalRequest, options); + } + async presignWithCredentials(originalRequest, credentials, options = {}) { + if (options.signingRegion === "*") { + throw new Error("Method presignWithCredentials is not supported for [signingRegion=*]."); + } + return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options); + } + getSigv4aSigner() { + if (!this.sigv4aSigner) { + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + const JsSigV4aSigner = signatureV4aContainer.SignatureV4a; + if (this.signerOptions.runtime === "node") { + if (!CrtSignerV4 && !JsSigV4aSigner) { + throw new Error("Neither CRT nor JS SigV4a implementation is available. " + "Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. " + "For more information please go to " + "https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); + } + if (CrtSignerV4 && typeof CrtSignerV4 === "function") { + this.sigv4aSigner = new CrtSignerV4({ + ...this.signerOptions, + signingAlgorithm: 1 + }); + } else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") { + this.sigv4aSigner = new JsSigV4aSigner({ + ...this.signerOptions + }); + } else { + throw new Error("Available SigV4a implementation is not a valid constructor. " + "Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a." + "For more information please go to " + "https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); + } + } else { + if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") { + throw new Error("JS SigV4a implementation is not available or not a valid constructor. " + "Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. " + "You must also register the package by calling [require('@aws-sdk/signature-v4a');] " + "or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. " + "For more information please go to " + "https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a"); + } + this.sigv4aSigner = new JsSigV4aSigner({ + ...this.signerOptions + }); + } + } + return this.sigv4aSigner; + } + } + exports.SignatureV4MultiRegion = SignatureV4MultiRegion; + exports.SignatureV4SignWithCredentials = SignatureV4SignWithCredentials; + exports.signatureV4CrtContainer = signatureV4CrtContainer; +}); + +// node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +var require_util = __commonJS(function(exports) { + var { buildQueryString } = require_protocols(); + var validate = (str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6; + var parse = (arn) => { + const segments = arn.split(":"); + if (segments.length < 6 || segments[0] !== "arn") + throw new Error("Malformed ARN"); + const [, partition, service, region, accountId, ...resource] = segments; + return { + partition, + service, + region, + accountId, + resource: resource.join(":") + }; + }; + var build = (arnObject) => { + const { partition = "aws", service, region, accountId, resource } = arnObject; + if ([service, region, accountId, resource].some((segment) => typeof segment !== "string")) { + throw new Error("Input ARN object is invalid"); + } + return `arn:${partition}:${service}:${region}:${accountId}:${resource}`; + }; + function formatUrl(request) { + const { port, query } = request; + let { protocol, path, hostname } = request; + if (protocol && protocol.slice(-1) !== ":") { + protocol += ":"; + } + if (port) { + hostname += `:${port}`; + } + if (path && path.charAt(0) !== "/") { + path = `/${path}`; + } + let queryString = query ? buildQueryString(query) : ""; + if (queryString && queryString[0] !== "?") { + queryString = `?${queryString}`; + } + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + let fragment = ""; + if (request.fragment) { + fragment = `#${request.fragment}`; + } + return `${protocol}//${auth}${hostname}${path}${queryString}${fragment}`; + } + exports.build = build; + exports.formatUrl = formatUrl; + exports.parse = parse; + exports.validate = validate; +}); + +// node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +var require_cbor = __commonJS(function(exports) { + var { nv, NumericValue, calculateBodyLength, generateIdempotencyToken, fromBase64, _parseEpochTimestamp } = require_serde(); + var { hasOwn, getSmithyContext } = require_transport(); + var { HttpRequest, collectBody, SerdeContext, RpcProtocol } = require_protocols(); + var { NormalizedSchema, deref, TypeRegistry } = require_schema(); + var majorUint64 = 0; + var majorNegativeInt64 = 1; + var majorUnstructuredByteString = 2; + var majorUtf8String = 3; + var majorList = 4; + var majorMap = 5; + var majorTag = 6; + var majorSpecial = 7; + var specialFalse = 20; + var specialTrue = 21; + var specialNull = 22; + var specialUndefined = 23; + var extendedOneByte = 24; + var extendedFloat16 = 25; + var extendedFloat32 = 26; + var extendedFloat64 = 27; + var minorIndefinite = 31; + function alloc(size) { + return typeof Buffer !== "undefined" ? Buffer.alloc(size) : new Uint8Array(size); + } + var tagSymbol = Symbol("@smithy/core/cbor::tagSymbol"); + function tag(data) { + data[tagSymbol] = true; + return data; + } + var USE_BUFFER$3 = typeof Buffer !== "undefined"; + var textDecoder$1 = new TextDecoder; + var payload$1 = alloc(0); + var isBuffer$1 = false; + var dataView$2 = new DataView(payload$1.buffer, payload$1.byteOffset, payload$1.byteLength); + var _offset = 0; + function setPayload(bytes) { + payload$1 = bytes; + isBuffer$1 = USE_BUFFER$3 && payload$1 instanceof Buffer; + dataView$2 = new DataView(payload$1.buffer, payload$1.byteOffset, payload$1.byteLength); + } + function decode(at, to) { + if (at >= to) { + throw new Error("unexpected end of (decode) payload."); + } + const major = (payload$1[at] & 224) >> 5; + const minor = payload$1[at] & 31; + if (minor === minorIndefinite && 2 <= major && major <= 5) { + return decodeIndefinite(at, to); + } + switch (major) { + case majorUint64: + case majorNegativeInt64: + case majorTag: { + let unsignedInt; + let offset; + if (minor < 24) { + unsignedInt = minor; + offset = 1; + } else { + switch (minor) { + case extendedOneByte: + if (to - at < 2) { + overflow$1(1); + } + unsignedInt = payload$1[at + 1]; + offset = 2; + break; + case extendedFloat16: + if (to - at < 3) { + overflow$1(2); + } + unsignedInt = dataView$2.getUint16(at + 1); + offset = 3; + break; + case extendedFloat32: + if (to - at < 5) { + overflow$1(4); + } + unsignedInt = dataView$2.getUint32(at + 1); + offset = 5; + break; + case extendedFloat64: + if (to - at < 9) { + overflow$1(8); + } + { + const hi = dataView$2.getUint32(at + 1); + if (hi < 2097152) { + unsignedInt = hi * 4294967296 + dataView$2.getUint32(at + 5); + } else { + unsignedInt = dataView$2.getBigUint64(at + 1); + } + } + offset = 9; + break; + default: + unexpectedMinor(minor); + } + } + if (major === majorUint64) { + _offset = offset; + return castBigInt$1(unsignedInt); + } else if (major === majorNegativeInt64) { + let negativeInt; + if (typeof unsignedInt === "bigint") { + negativeInt = BigInt(-1) - unsignedInt; + } else { + negativeInt = -1 - unsignedInt; + } + _offset = offset; + return castBigInt$1(negativeInt); + } else { + return decodeTagValue(at, to, minor, unsignedInt, offset); + } + } + case majorUtf8String: + return decodeUtf8String(at, to); + case majorMap: + return decodeMap(at, to); + case majorList: + return decodeList(at, to); + case majorUnstructuredByteString: + return decodeUnstructuredByteString(at, to); + default: + return decodeSpecial(at, to); + } + } + function decodeIndefinite(at, to) { + const major = (payload$1[at] & 224) >> 5; + const minor = payload$1[at] & 31; + if (minor === minorIndefinite) { + switch (major) { + case majorUtf8String: + return decodeUtf8StringIndefinite(at, to); + case majorMap: + return decodeMapIndefinite(at, to); + case majorList: + return decodeListIndefinite(at, to); + case majorUnstructuredByteString: + return decodeUnstructuredByteStringIndefinite(at, to); + } + } + } + function bytesToFloat16$1(a, b) { + const sign = a >> 7; + const exponent = (a & 124) >> 2; + const fraction = (a & 3) << 8 | b; + const scalar = sign === 0 ? 1 : -1; + if (exponent === 0) { + if (fraction === 0) { + return 0; + } + return scalar * (Math.pow(2, 1 - 15) * (fraction / 1024)); + } else if (exponent === 31) { + if (fraction === 0) { + return scalar * Infinity; + } + return NaN; + } + return scalar * (Math.pow(2, exponent - 15) * (1 + fraction / 1024)); + } + function decodeMap(at, to) { + const mapDataLength = decodeCount$1(at, to); + if (mapDataLength < 25) { + return decodeMapSmall(at, to, mapDataLength); + } + return decodeMapLarge(at, to, mapDataLength); + } + function decodeMapLarge(at, to, mapDataLength) { + const offset = _offset; + at += offset; + const base = at; + const map = Object.create(null); + for (let i = 0;i < mapDataLength; ++i) { + const key = decodeUtf8String(at, to); + at += _offset; + const valMajor = (payload$1[at] & 224) >> 5; + if (valMajor === majorUtf8String) { + map[key] = decodeUtf8String(at, to); + } else { + map[key] = decode(at, to); + } + at += _offset; + } + _offset = offset + (at - base); + Object.setPrototypeOf(map, Object.prototype); + return map; + } + function decodeMapSmall(at, to, mapDataLength) { + const offset = _offset; + at += offset; + const base = at; + const map = {}; + for (let i = 0;i < mapDataLength; ++i) { + const key = decodeUtf8String(at, to); + at += _offset; + map[key] = decode(at, to); + at += _offset; + } + _offset = offset + (at - base); + return map; + } + function decodeList(at, to) { + const listDataLength = decodeCount$1(at, to); + const offset = _offset; + at += offset; + const base = at; + const list = Array(listDataLength); + for (let i = 0;i < listDataLength; ++i) { + list[i] = decode(at, to); + at += _offset; + } + _offset = offset + (at - base); + return list; + } + function decodeUtf8String(at, to) { + const length = decodeCount$1(at, to); + const offset = _offset; + at += offset; + if (to - at < length) { + overflow$1(length); + } + _offset = offset + length; + if (length < 24) { + return decodeUtf8StringCached(at, length); + } + if (isBuffer$1) { + return payload$1.toString("utf-8", at, at + length); + } + return textDecoder$1.decode(payload$1.subarray(at, at + length)); + } + var stringCache$1 = new Array(2048); + var stringCacheEpochs$1 = new Uint16Array(2048); + var cacheEpoch$1 = 0; + function advanceDecodingEpoch() { + cacheEpoch$1 = cacheEpoch$1 + 1 & 65535; + } + function decodeUtf8StringCached(at, length) { + let h = length; + for (let i = 0;i < length; ++i) { + h = h * 31 + payload$1[at + i] | 0; + } + const slot = h >>> 0 & 2047; + const cached = stringCache$1[slot]; + if (cached !== undefined) { + if (cached.length === length) { + let match = true; + for (let i = 0;i < length; ++i) { + if (cached.charCodeAt(i) !== payload$1[at + i]) { + match = false; + break; + } + } + if (match) { + stringCacheEpochs$1[slot] = cacheEpoch$1; + return cached; + } + } + } + const result = isBuffer$1 ? payload$1.toString("utf-8", at, at + length) : textDecoder$1.decode(payload$1.subarray(at, at + length)); + if (stringCacheEpochs$1[slot] !== cacheEpoch$1) { + stringCache$1[slot] = result; + stringCacheEpochs$1[slot] = cacheEpoch$1; + } + return result; + } + function decodeUnstructuredByteString(at, to) { + const length = decodeCount$1(at, to); + const offset = _offset; + at += offset; + if (to - at < length) { + overflow$1(length); + } + const value = payload$1.subarray(at, at + length); + _offset = offset + length; + return value; + } + function decodeTagValue(at, to, minor, unsignedInt, offset) { + if (minor === 2 || minor === 3) { + const length = decodeCount$1(at + offset, to); + let b = BigInt(0); + const start = at + offset + _offset; + for (let i = start;i < start + length; ++i) { + b = b << BigInt(8) | BigInt(payload$1[i]); + } + _offset = offset + _offset + length; + return minor === 3 ? -b - BigInt(1) : b; + } else if (minor === 4) { + const decimalFraction = decode(at + offset, to); + const [rawExponent, mantissa] = decimalFraction; + const normalizer = mantissa < 0 ? -1 : 1; + const absMantissa = BigInt(normalizer) * BigInt(mantissa); + const mantissaDigits = String(absMantissa); + const sign = mantissa < 0 ? "-" : ""; + let numericString; + const isSmallExponent = typeof rawExponent === "number" && Math.abs(rawExponent) <= 2 ** 28; + if (isSmallExponent) { + const exponent = rawExponent; + const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + mantissaDigits; + numericString = exponent === 0 ? mantissaStr : mantissaStr.slice(0, mantissaStr.length + exponent) + "." + mantissaStr.slice(exponent); + numericString = numericString.replace(/^0+/g, ""); + if (numericString === "") { + numericString = "0"; + } + if (numericString[0] === ".") { + numericString = "0" + numericString; + } + numericString = sign + numericString; + } else { + const bigExponent = BigInt(rawExponent); + if (mantissaDigits.length === 1) { + numericString = sign + mantissaDigits + "e" + String(bigExponent); + } else { + const adjustedExp = bigExponent + BigInt(mantissaDigits.length - 1); + numericString = sign + mantissaDigits[0] + "." + mantissaDigits.slice(1) + "e" + String(adjustedExp); + } + } + _offset = offset + _offset; + return nv(numericString); + } else { + const value = decode(at + offset, to); + const valueOffset = _offset; + _offset = offset + valueOffset; + return tag({ tag: castBigInt$1(unsignedInt), value }); + } + } + function decodeSpecial(at, to) { + const minor = payload$1[at] & 31; + switch (minor) { + case specialTrue: + case specialFalse: + _offset = 1; + return minor === specialTrue; + case specialNull: + _offset = 1; + return null; + case specialUndefined: + _offset = 1; + return null; + case extendedFloat16: + if (to - at < 3) { + throw new Error("incomplete float16 at end of buf."); + } + _offset = 3; + return bytesToFloat16$1(payload$1[at + 1], payload$1[at + 2]); + case extendedFloat32: + if (to - at < 5) { + throw new Error("incomplete float32 at end of buf."); + } + _offset = 5; + return dataView$2.getFloat32(at + 1); + case extendedFloat64: + if (to - at < 9) { + throw new Error("incomplete float64 at end of buf."); + } + _offset = 9; + return dataView$2.getFloat64(at + 1); + default: + unexpectedMinor(minor); + } + } + function decodeCount$1(at, to) { + const minor = payload$1[at] & 31; + if (minor < 24) { + _offset = 1; + return minor; + } + switch (minor) { + case extendedOneByte: + if (to - at < 2) { + overflow$1(1); + } + _offset = 2; + return payload$1[at + 1]; + case extendedFloat16: + if (to - at < 3) { + overflow$1(2); + } + _offset = 3; + return dataView$2.getUint16(at + 1); + case extendedFloat32: + if (to - at < 5) { + overflow$1(4); + } + _offset = 5; + return dataView$2.getUint32(at + 1); + case extendedFloat64: + if (to - at < 9) { + overflow$1(8); + } + _offset = 9; + return demote(dataView$2.getBigUint64(at + 1)); + default: + unexpectedMinor(minor); + } + } + function decodeMapIndefinite(at, to) { + at += 1; + const base = at; + const map = {}; + for (;at < to; ) { + if (payload$1[at] === 255) { + _offset = at - base + 2; + return map; + } + const key = decodeUtf8String(at, to); + at += _offset; + map[key] = decode(at, to); + at += _offset; + } + throw new Error("expected break marker."); + } + function decodeListIndefinite(at, to) { + at += 1; + const list = []; + for (const base = at;at < to; ) { + if (payload$1[at] === 255) { + _offset = at - base + 2; + return list; + } + list.push(decode(at, to)); + at += _offset; + } + throw new Error("expected break marker."); + } + function decodeUtf8StringIndefinite(at, to) { + at += 1; + const vector = []; + for (const base = at;at < to; ) { + if (payload$1[at] === 255) { + const data = alloc(vector.length); + data.set(vector, 0); + _offset = at - base + 2; + if (USE_BUFFER$3) { + return data.toString("utf-8", 0, data.length); + } + return textDecoder$1.decode(data); + } + const major = (payload$1[at] & 224) >> 5; + const minor = payload$1[at] & 31; + if (major !== majorUtf8String) { + unexpectedMajorInIndefiniteString(major); + } + if (minor === minorIndefinite) { + throw new Error("nested indefinite string."); + } + const bytes = decodeUnstructuredByteString(at, to); + const length = _offset; + at += length; + for (let i = 0;i < bytes.length; ++i) { + vector.push(bytes[i]); + } + } + throw new Error("expected break marker."); + } + function decodeUnstructuredByteStringIndefinite(at, to) { + at += 1; + const vector = []; + for (const base = at;at < to; ) { + if (payload$1[at] === 255) { + const data = alloc(vector.length); + data.set(vector, 0); + _offset = at - base + 2; + return data; + } + const major = (payload$1[at] & 224) >> 5; + const minor = payload$1[at] & 31; + if (major !== majorUnstructuredByteString) { + unexpectedMajorInIndefiniteString(major); + } + if (minor === minorIndefinite) { + throw new Error("nested indefinite string."); + } + const bytes = decodeUnstructuredByteString(at, to); + const length = _offset; + at += length; + for (let i = 0;i < bytes.length; ++i) { + vector.push(bytes[i]); + } + } + throw new Error("expected break marker."); + } + function castBigInt$1(bigInt) { + if (typeof bigInt === "number") { + return bigInt; + } + const num = Number(bigInt); + if (Number.MIN_SAFE_INTEGER <= num && num <= Number.MAX_SAFE_INTEGER) { + return num; + } + return bigInt; + } + function demote(bigInteger) { + const num = Number(bigInteger); + if (num < Number.MIN_SAFE_INTEGER || Number.MAX_SAFE_INTEGER < num) { + console.warn(new Error(`@smithy/core/cbor - truncating BigInt(${bigInteger}) to ${num} with loss of precision.`)); + } + return num; + } + function overflow$1(n) { + throw new Error(`length ${n} greater than remaining buf len.`); + } + function unexpectedMinor(minor) { + throw new Error(`unexpected minor value ${minor}.`); + } + function unexpectedMajorInIndefiniteString(major) { + throw new Error(`unexpected major type ${major} in indefinite string.`); + } + var USE_BUFFER$2 = typeof Buffer !== "undefined"; + var encodeStringCache = new Map; + var encodeCacheEpoch$1 = 0; + var encodeCacheSaturated$1 = false; + var initialSize = 2048; + var data = alloc(initialSize); + var dataView$1 = new DataView(data.buffer, data.byteOffset, data.byteLength); + var cursor$1 = 0; + function encode(_input) { + const encodeStack = [_input]; + while (encodeStack.length) { + const input = encodeStack.pop(); + if (typeof input === "string") { + const len = input.length; + if (USE_BUFFER$2) { + ensureSpace(len * 3 + 9); + if (len > 23) { + encodeHeader$1(majorUtf8String, Buffer.byteLength(input)); + cursor$1 += data.write(input, cursor$1); + } else { + encodeStringCached(input); + } + } else { + const maxBytes = len * 3; + ensureSpace(maxBytes + 9); + const headerPos = cursor$1; + const result = new TextEncoder().encodeInto(input, data.subarray(cursor$1 + 9)); + const byteLen = result.written; + let headerSize; + if (byteLen < 24) { + headerSize = 1; + } else if (byteLen < 256) { + headerSize = 2; + } else if (byteLen < 65536) { + headerSize = 3; + } else if (byteLen < 4294967296) { + headerSize = 5; + } else { + headerSize = 9; + } + if (headerSize < 9) { + data.copyWithin(headerPos + headerSize, headerPos + 9, headerPos + 9 + byteLen); + } + cursor$1 = headerPos; + encodeInteger(majorUtf8String, byteLen); + cursor$1 += byteLen; + } + continue; + } + if (data.byteLength - cursor$1 < 9) { + ensureSpace(64); + } + if (typeof input === "number") { + if (Number.isInteger(input) && input >= -9007199254740992 && input <= 9007199254740991) { + const nonNegative = input >= 0; + const major = nonNegative ? majorUint64 : majorNegativeInt64; + const value = nonNegative ? input : -input - 1; + if (value < 24) { + data[cursor$1++] = major << 5 | value; + } else if (value < 256) { + data[cursor$1++] = major << 5 | 24; + data[cursor$1++] = value; + } else if (value < 65536) { + data[cursor$1++] = major << 5 | extendedFloat16; + data[cursor$1++] = value >> 8; + data[cursor$1++] = value & 255; + } else if (value < 4294967296) { + data[cursor$1++] = major << 5 | extendedFloat32; + dataView$1.setUint32(cursor$1, value); + cursor$1 += 4; + } else { + data[cursor$1++] = major << 5 | extendedFloat64; + const hi = value / 4294967296 | 0; + const lo = value - hi * 4294967296 | 0; + dataView$1.setUint32(cursor$1, hi); + dataView$1.setUint32(cursor$1 + 4, lo); + cursor$1 += 8; + } + continue; + } + data[cursor$1++] = majorSpecial << 5 | extendedFloat64; + dataView$1.setFloat64(cursor$1, input); + cursor$1 += 8; + continue; + } else if (typeof input === "bigint") { + const nonNegative = input >= 0; + const major = nonNegative ? majorUint64 : majorNegativeInt64; + const value = nonNegative ? input : -input - BigInt(1); + if (value < BigInt("18446744073709551616")) { + const n = Number(value); + if (n < 4294967296) { + encodeInteger(major, n); + } else { + data[cursor$1++] = major << 5 | extendedFloat64; + dataView$1.setBigUint64(cursor$1, value); + cursor$1 += 8; + } + } else { + const binaryBigInt = value.toString(2); + const bigIntBytes = new Uint8Array(Math.ceil(binaryBigInt.length / 8)); + let b = value; + let i = 0; + while (bigIntBytes.byteLength - ++i >= 0) { + bigIntBytes[bigIntBytes.byteLength - i] = Number(b & BigInt(255)); + b >>= BigInt(8); + } + ensureSpace(bigIntBytes.byteLength * 2 + 16); + data[cursor$1++] = nonNegative ? 194 : 195; + encodeHeader$1(majorUnstructuredByteString, bigIntBytes.byteLength); + data.set(bigIntBytes, cursor$1); + cursor$1 += bigIntBytes.byteLength; + } + continue; + } else if (input === null) { + data[cursor$1++] = majorSpecial << 5 | specialNull; + continue; + } else if (typeof input === "boolean") { + data[cursor$1++] = majorSpecial << 5 | (input ? specialTrue : specialFalse); + continue; + } else if (typeof input === "undefined") { + throw new Error("@smithy/core/cbor: client may not serialize undefined value."); + } else if (Array.isArray(input)) { + encodeInteger(majorList, input.length); + ensureSpace(input.length * 9 + 64); + for (let i = input.length - 1;i >= 0; --i) { + encodeStack.push(input[i]); + } + continue; + } else if (typeof input.byteLength === "number") { + ensureSpace(input.length * 2 + 9); + encodeInteger(majorUnstructuredByteString, input.length); + data.set(input, cursor$1); + cursor$1 += input.byteLength; + continue; + } else if (typeof input === "object") { + if (input instanceof NumericValue) { + let str = input.string; + let expOffset = BigInt(0); + const eIndex = str.search(/[eE]/); + if (eIndex !== -1) { + expOffset = BigInt(str.slice(eIndex + 1)); + str = str.slice(0, eIndex); + } + const decimalIndex = str.indexOf("."); + const fractionDigits = decimalIndex === -1 ? 0 : str.length - decimalIndex - 1; + const exponent = expOffset - BigInt(fractionDigits); + const mantissa = BigInt(str.replace(".", "")); + data[cursor$1++] = 196; + encodeInteger(majorList, 2); + encodeStack.push(mantissa); + encodeStack.push(exponent >= -0x20000000000000n && exponent <= 0x1fffffffffffffn ? Number(exponent) : exponent); + continue; + } + if (input[tagSymbol]) { + if ("tag" in input && "value" in input) { + encodeStack.push(input.value); + encodeHeader$1(majorTag, input.tag); + continue; + } else { + throw new Error("tag encountered with missing fields, need 'tag' and 'value', found: " + JSON.stringify(input)); + } + } + const keys = Object.keys(input); + const len = keys.length; + encodeInteger(majorMap, len); + for (let i = len - 1;i >= 0; --i) { + encodeStack.push(input[keys[i]]); + encodeStack.push(keys[i]); + } + continue; + } + throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`); + } + } + function advanceEncodingEpoch() { + encodeCacheEpoch$1 = encodeCacheEpoch$1 + 1 & 65535; + encodeCacheSaturated$1 = false; + } + function toUint8Array() { + const out = alloc(cursor$1); + out.set(data.subarray(0, cursor$1), 0); + cursor$1 = 0; + return out; + } + function resize(size) { + const old = data; + data = alloc(size); + if (old) { + if (old.copy) { + old.copy(data, 0, 0, old.byteLength); + } else { + data.set(old, 0); + } + } + dataView$1 = new DataView(data.buffer, data.byteOffset, data.byteLength); + } + function encodeStringCached(input) { + const cached = encodeStringCache.get(input); + if (cached !== undefined) { + data.set(cached.bytes, cursor$1); + cursor$1 += cached.bytes.length; + cached.epoch = encodeCacheEpoch$1; + return; + } + const start = cursor$1; + const byteLen = Buffer.byteLength(input); + encodeInteger(majorUtf8String, byteLen); + cursor$1 += data.write(input, cursor$1); + const bytes = Uint8Array.prototype.slice.call(data, start, cursor$1); + if (encodeStringCache.size >= 2048) { + if (encodeCacheSaturated$1) { + return; + } + let evicted = 0; + for (const [key, entry] of encodeStringCache) { + if (evicted >= 1024) { + break; + } + if (entry.epoch !== encodeCacheEpoch$1) { + encodeStringCache.delete(key); + evicted++; + } + } + if (evicted === 0) { + encodeCacheSaturated$1 = true; + return; + } + } + if (encodeStringCache.size < 2048) { + encodeStringCache.set(input, { epoch: encodeCacheEpoch$1, bytes }); + } + } + function ensureSpace(bytes) { + const remaining = data.byteLength - cursor$1; + if (remaining < bytes) { + if (cursor$1 < 16000000) { + resize(Math.max(data.byteLength * 4, data.byteLength + bytes)); + } else { + resize(data.byteLength + bytes + 16000000); + } + } + } + function encodeHeader$1(major, value) { + if (value < 24) { + data[cursor$1++] = major << 5 | value; + } else if (value < 256) { + data[cursor$1++] = major << 5 | 24; + data[cursor$1++] = value; + } else if (value < 65536) { + data[cursor$1++] = major << 5 | extendedFloat16; + dataView$1.setUint16(cursor$1, value); + cursor$1 += 2; + } else if (value < 4294967296) { + data[cursor$1++] = major << 5 | extendedFloat32; + dataView$1.setUint32(cursor$1, value); + cursor$1 += 4; + } else { + data[cursor$1++] = major << 5 | extendedFloat64; + dataView$1.setBigUint64(cursor$1, typeof value === "bigint" ? value : BigInt(value)); + cursor$1 += 8; + } + } + function encodeInteger(major, value) { + if (value < 24) { + data[cursor$1++] = major << 5 | value; + } else if (value < 256) { + data[cursor$1++] = major << 5 | 24; + data[cursor$1++] = value; + } else if (value < 65536) { + data[cursor$1++] = major << 5 | extendedFloat16; + data[cursor$1++] = value >> 8; + data[cursor$1++] = value & 255; + } else if (value < 4294967296) { + data[cursor$1++] = major << 5 | extendedFloat32; + dataView$1.setUint32(cursor$1, value); + cursor$1 += 4; + } else { + data[cursor$1++] = major << 5 | extendedFloat64; + const hi = value / 4294967296 | 0; + const lo = value - hi * 4294967296 | 0; + dataView$1.setUint32(cursor$1, hi); + dataView$1.setUint32(cursor$1 + 4, lo); + cursor$1 += 8; + } + } + var cbor = { + deserialize(payload) { + advanceDecodingEpoch(); + setPayload(payload); + return decode(0, payload.length); + }, + serialize(input) { + advanceEncodingEpoch(); + try { + encode(input); + return toUint8Array(); + } catch (e) { + toUint8Array(); + throw e; + } + }, + resizeEncodingBuffer(size) { + resize(size); + } + }; + var parseCborBody = (streamBody, context) => { + return collectBody(streamBody, context).then(async (bytes) => { + if (bytes.length) { + try { + return cbor.deserialize(bytes); + } catch (e) { + Object.defineProperty(e, "$responseBodyText", { + value: context.utf8Encoder(bytes) + }); + throw e; + } + } + return {}; + }); + }; + var dateToTag = (date) => { + return tag({ + tag: 1, + value: date.getTime() / 1000 + }); + }; + var parseCborErrorBody = async (errorBody, context) => { + const value = await parseCborBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; + }; + var loadSmithyRpcV2CborErrorCode = (output, data) => { + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + let codeKey; + for (const key in data) { + if (!hasOwn(data, key)) + continue; + if (key.toLowerCase() === "code") { + codeKey = key; + break; + } + } + if (codeKey && data[codeKey] !== undefined) { + return sanitizeErrorCode(data[codeKey]); + } + }; + var checkCborResponse = (response) => { + if (String(response.headers["smithy-protocol"]).toLowerCase() !== "rpc-v2-cbor") { + throw new Error("Malformed RPCv2 CBOR response, status: " + response.statusCode); + } + }; + var buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => { + const endpoint = await context.endpoint(); + const { hostname, protocol = "https", port, path: basePath } = endpoint; + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers: { + ...headers + } + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (endpoint.headers) { + for (const name in endpoint.headers) { + if (!hasOwn(endpoint.headers, name)) + continue; + contents.headers[name] = endpoint.headers[name]; + } + } + if (body !== undefined) { + contents.body = body; + try { + contents.headers["content-length"] = String(calculateBodyLength(body)); + } catch (ignored) {} + } + return new HttpRequest(contents); + }; + + class CborShapeSerializer2 extends SerdeContext { + write(schema, value) { + cursor = 0; + const ns = NormalizedSchema.of(schema); + writeValue(ns, value, undefined, this.serdeContext); + } + flush() { + const result = buf.subarray(0, cursor); + cursor = 0; + buf = allocUnsafe(INITIAL_BUFFER_SIZE); + view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + return result; + } + } + var CBOR_STRUCT_CACHE = Symbol.for("@smithy/cbor-struct-cache"); + function loadCborStructIterator(ns) { + const schema = ns.getSchema(); + const existing = schema[CBOR_STRUCT_CACHE]; + if (existing) { + return existing; + } + const memberNames = []; + const memberSchemas = []; + for (const [name, memberSchema] of ns.structIterator()) { + memberNames.push(name); + memberSchemas.push(memberSchema); + } + const encodedKeys = new Array(memberNames.length); + for (let i = 0;i < memberNames.length; ++i) { + encodedKeys[i] = encodeCborStringKey(memberNames[i]); + } + const cache = { memberNames, memberSchemas, encodedKeys }; + schema[CBOR_STRUCT_CACHE] = cache; + return cache; + } + function encodeCborStringKey(s) { + let utf8Bytes; + if (USE_BUFFER$1) { + utf8Bytes = Buffer.from(s, "utf-8"); + } else { + utf8Bytes = new TextEncoder().encode(s); + } + const byteLen = utf8Bytes.length; + let headerSize; + if (byteLen < 24) { + headerSize = 1; + } else if (byteLen < 256) { + headerSize = 2; + } else { + headerSize = 3; + } + const result = new Uint8Array(headerSize + byteLen); + if (headerSize === 1) { + result[0] = majorUtf8String << 5 | byteLen; + } else if (headerSize === 2) { + result[0] = majorUtf8String << 5 | 24; + result[1] = byteLen; + } else { + result[0] = majorUtf8String << 5 | extendedFloat16; + result[1] = byteLen >> 8; + result[2] = byteLen & 255; + } + result.set(utf8Bytes, headerSize); + return result; + } + var USE_BUFFER$1 = typeof Buffer !== "undefined"; + var textEncoder = new TextEncoder; + var INITIAL_BUFFER_SIZE = 2048; + var buf = USE_BUFFER$1 ? Buffer.allocUnsafe(INITIAL_BUFFER_SIZE) : new Uint8Array(INITIAL_BUFFER_SIZE); + var view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + var cursor = 0; + var STRING_CACHE_MAX = 2048; + var stringEncodeCache = new Map; + var encodeCacheEpoch = 0; + var encodeCacheSaturated = false; + function allocUnsafe(size) { + return USE_BUFFER$1 ? Buffer.allocUnsafe(size) : new Uint8Array(size); + } + function writeValue(ns, value, container, serdeContext) { + if (value == null) { + if (value === undefined && ns.isIdempotencyToken()) { + writeString(generateIdempotencyToken()); + return; + } + ensure(1); + buf[cursor++] = majorSpecial << 5 | specialNull; + return; + } + if (ns.isUnitSchema()) { + ensure(1); + encodeHeader(majorMap, 0); + return; + } + const isObject = typeof value === "object"; + if (isObject) { + if (ns.isBlobSchema()) { + if (value instanceof Uint8Array) { + writeBytes(value); + return; + } + } + if (ns.isTimestampSchema()) { + if (value instanceof Date) { + writeTimestamp(value); + return; + } + } + if (ns.isStructSchema()) { + writeStruct(ns, value, serdeContext); + return; + } + if (Array.isArray(value) && (ns.isListSchema() || ns.isDocumentSchema())) { + writeList(ns, value, ns.isDocumentSchema(), serdeContext); + return; + } + if (ns.isMapSchema()) { + writeMap(ns, value, false, serdeContext); + return; + } + if (value instanceof Date) { + writeTimestamp(value); + return; + } + if (value instanceof Uint8Array) { + writeBytes(value); + return; + } + if (value instanceof NumericValue) { + writeNumericValue(value); + return; + } + if (value[tagSymbol]) { + const tagged = value; + writeTag(tagged.tag, tagged.value); + return; + } + if (ns.isDocumentSchema()) { + if (Array.isArray(value)) { + writeList(ns, value, true, serdeContext); + } else { + writeMap(ns, value, true, serdeContext); + } + return; + } + if (ns.isBigDecimalSchema()) { + writeUntypedValue(value); + return; + } + writeMap(ns, value, true, serdeContext); + return; + } + if (typeof value === "string") { + if (ns.isBlobSchema()) { + const bytes = (serdeContext?.base64Decoder ?? fromBase64)(value); + writeBytes(bytes); + return; + } + writeString(value); + return; + } + if (typeof value === "number") { + ensure(9); + if (Number.isInteger(value) && value >= -9007199254740992 && value <= 9007199254740991) { + writeInteger(value); + } else { + writeFloat64(value); + } + return; + } + if (typeof value === "boolean") { + ensure(1); + buf[cursor++] = majorSpecial << 5 | (value ? specialTrue : specialFalse); + return; + } + if (typeof value === "bigint") { + writeBigInt(value); + return; + } + writeString(String(value)); + } + function writeStruct(ns, value, serdeContext) { + if (ns.isUnionSchema()) { + let wrote = false; + for (const [memberName, memberSchema] of ns.structIterator()) { + const item = value[memberName]; + if (item != null) { + ensure(9); + encodeHeader(majorMap, 1); + writeString(memberName); + writeValue(memberSchema, item, ns, serdeContext); + wrote = true; + break; + } + } + if (!wrote) { + const { $unknown } = value; + if (Array.isArray($unknown)) { + ensure(9); + encodeHeader(majorMap, 1); + writeString($unknown[0]); + writeUntypedValue($unknown[1]); + } else { + ensure(9); + encodeHeader(majorMap, 0); + } + } + return; + } + const cache = loadCborStructIterator(ns); + const { memberNames, memberSchemas, encodedKeys } = cache; + const z = memberNames.length; + let headerSize; + if (z < 24) { + headerSize = 1; + } else if (z < 256) { + headerSize = 2; + } else { + headerSize = 3; + } + ensure(headerSize); + const headerPos = cursor; + cursor += headerSize; + let count = 0; + for (let i = 0;i < z; ++i) { + const item = value[memberNames[i]]; + if (item == null && !memberSchemas[i].isIdempotencyToken()) { + continue; + } + const key = encodedKeys[i]; + ensure(key.length); + buf.set(key, cursor); + cursor += key.length; + writeValue(memberSchemas[i], item, ns, serdeContext); + ++count; + } + if (typeof value.__type === "string") { + for (const k in value) { + if (!hasOwn(value, k)) + continue; + if (!memberNames.includes(k)) { + writeString(k); + writeUntypedValue(value[k]); + ++count; + } + } + } + if (headerSize === 1) { + buf[headerPos] = majorMap << 5 | count; + } else if (headerSize === 2) { + buf[headerPos] = majorMap << 5 | 24; + buf[headerPos + 1] = count; + } else { + buf[headerPos] = majorMap << 5 | extendedFloat16; + buf[headerPos + 1] = count >> 8; + buf[headerPos + 2] = count & 255; + } + } + function writeList(ns, value, isDocument, serdeContext) { + const sparse = !!ns.getMergedTraits().sparse; + const valueSchema = ns.getValueSchema(); + if (isDocument || sparse) { + const items = []; + for (let i = 0;i < value.length; ++i) { + const item = value[i]; + if (isDocument) { + if (item !== undefined) { + items.push(item); + } + } else { + if (item != null || sparse) { + items.push(item); + } + } + } + ensure(9); + encodeHeader(majorList, items.length); + for (let i = 0;i < items.length; ++i) { + writeValue(valueSchema, items[i], undefined, serdeContext); + } + } else { + let count = 0; + for (let i = 0;i < value.length; ++i) { + if (value[i] != null) { + ++count; + } + } + ensure(9); + encodeHeader(majorList, count); + for (let i = 0;i < value.length; ++i) { + if (value[i] != null) { + writeValue(valueSchema, value[i], undefined, serdeContext); + } + } + } + } + function writeMap(ns, value, isDocument, serdeContext) { + const sparse = !!ns.getMergedTraits().sparse; + const valueSchema = ns.getValueSchema(); + const keys = []; + for (const k in value) { + if (!hasOwn(value, k)) + continue; + const v = value[k]; + if (isDocument ? v !== undefined : v != null || sparse) { + keys.push(k); + } + } + ensure(9); + encodeHeader(majorMap, keys.length); + for (let i = 0;i < keys.length; ++i) { + const k = keys[i]; + writeString(k); + writeValue(valueSchema, value[k], undefined, serdeContext); + } + } + function writeUntypedValue(value) { + if (value == null) { + ensure(1); + buf[cursor++] = majorSpecial << 5 | specialNull; + return; + } + if (typeof value === "string") { + writeString(value); + return; + } + if (typeof value === "number") { + ensure(9); + if (Number.isInteger(value) && value >= -9007199254740992 && value <= 9007199254740991) { + writeInteger(value); + } else { + writeFloat64(value); + } + return; + } + if (typeof value === "boolean") { + ensure(1); + buf[cursor++] = majorSpecial << 5 | (value ? specialTrue : specialFalse); + return; + } + if (typeof value === "bigint") { + writeBigInt(value); + return; + } + if (value instanceof Uint8Array) { + writeBytes(value); + return; + } + if (value instanceof Date) { + writeTimestamp(value); + return; + } + if (value instanceof NumericValue) { + writeNumericValue(value); + return; + } + if (value[tagSymbol]) { + const tagged = value; + writeTag(tagged.tag, tagged.value); + return; + } + if (Array.isArray(value)) { + ensure(9); + encodeHeader(majorList, value.length); + for (let i = 0;i < value.length; ++i) { + writeUntypedValue(value[i]); + } + return; + } + if (typeof value === "object") { + const keys = Object.keys(value); + ensure(9); + encodeHeader(majorMap, keys.length); + for (let i = 0;i < keys.length; ++i) { + writeString(keys[i]); + writeUntypedValue(value[keys[i]]); + } + return; + } + writeString(String(value)); + } + function ensure(n) { + if (cursor + n > buf.length) { + let newSize = buf.length * 2; + while (newSize < cursor + n) { + newSize *= 2; + } + const next = allocUnsafe(newSize); + next.set(buf.subarray(0, cursor)); + buf = next; + view = new DataView(next.buffer, next.byteOffset, next.byteLength); + } + } + function encodeHeader(major, value) { + if (value < 24) { + buf[cursor++] = major << 5 | value; + } else if (value < 256) { + buf[cursor++] = major << 5 | 24; + buf[cursor++] = value; + } else if (value < 65536) { + buf[cursor++] = major << 5 | extendedFloat16; + buf[cursor++] = value >> 8; + buf[cursor++] = value & 255; + } else if (value < 4294967296) { + buf[cursor++] = major << 5 | extendedFloat32; + view.setUint32(cursor, value); + cursor += 4; + } else { + buf[cursor++] = major << 5 | extendedFloat64; + const hi = value / 4294967296 | 0; + const lo = value - hi * 4294967296 | 0; + view.setUint32(cursor, hi); + view.setUint32(cursor + 4, lo); + cursor += 8; + } + } + function encodeBigHeader(major, value) { + const n = Number(value); + if (n < 4294967296) { + encodeHeader(major, n); + return; + } + buf[cursor++] = major << 5 | extendedFloat64; + view.setBigUint64(cursor, value); + cursor += 8; + } + function writeString(s) { + const len = s.length; + if (len <= 23) { + const cached = stringEncodeCache.get(s); + if (cached) { + ensure(cached.bytes.length); + buf.set(cached.bytes, cursor); + cursor += cached.bytes.length; + cached.epoch = encodeCacheEpoch; + return; + } + const start = cursor; + writeStringUncached(s, len); + const end = cursor; + const bytes = Uint8Array.prototype.slice.call(buf, start, end); + if (stringEncodeCache.size >= STRING_CACHE_MAX) { + if (encodeCacheSaturated) { + return; + } + let evicted = 0; + for (const [key, entry] of stringEncodeCache) { + if (evicted >= 1024) { + break; + } + if (entry.epoch !== encodeCacheEpoch) { + stringEncodeCache.delete(key); + ++evicted; + } + } + if (evicted === 0) { + encodeCacheSaturated = true; + return; + } + } + if (stringEncodeCache.size < STRING_CACHE_MAX) { + stringEncodeCache.set(s, { epoch: encodeCacheEpoch, bytes }); + } + return; + } + writeStringUncached(s, len); + } + function writeStringUncached(s, len) { + if (USE_BUFFER$1) { + const maxBytes = len * 3; + ensure(maxBytes + 9); + const byteLen = Buffer.byteLength(s); + encodeHeader(majorUtf8String, byteLen); + cursor += buf.write(s, cursor); + } else { + const maxBytes = len * 3; + ensure(maxBytes + 9); + const headerPos = cursor; + const result = textEncoder.encodeInto(s, buf.subarray(headerPos + 9)); + const byteLen = result.written; + let headerSize; + if (byteLen < 24) { + headerSize = 1; + } else if (byteLen < 256) { + headerSize = 2; + } else if (byteLen < 65536) { + headerSize = 3; + } else if (byteLen < 4294967296) { + headerSize = 5; + } else { + headerSize = 9; + } + if (headerSize < 9) { + buf.copyWithin(headerPos + headerSize, headerPos + 9, headerPos + 9 + byteLen); + } + cursor = headerPos; + encodeHeader(majorUtf8String, byteLen); + cursor += byteLen; + } + } + function writeFloat64(value) { + ensure(9); + buf[cursor++] = majorSpecial << 5 | extendedFloat64; + view.setFloat64(cursor, value); + cursor += 8; + } + function writeInteger(value) { + ensure(9); + const nonNegative = value >= 0; + const major = nonNegative ? majorUint64 : majorNegativeInt64; + const abs = nonNegative ? value : -value - 1; + encodeHeader(major, abs); + } + function writeBigInt(value) { + const nonNegative = value >= 0; + const major = nonNegative ? majorUint64 : majorNegativeInt64; + const abs = nonNegative ? value : -value - BigInt(1); + if (abs < BigInt("18446744073709551616")) { + ensure(9); + encodeBigHeader(major, abs); + } else { + const binaryStr = abs.toString(2); + const byteLen = Math.ceil(binaryStr.length / 8); + const bigIntBytes = new Uint8Array(byteLen); + let b = abs; + for (let i = byteLen - 1;i >= 0; --i) { + bigIntBytes[i] = Number(b & BigInt(255)); + b >>= BigInt(8); + } + ensure(byteLen + 16); + buf[cursor++] = nonNegative ? 194 : 195; + encodeHeader(majorUnstructuredByteString, byteLen); + buf.set(bigIntBytes, cursor); + cursor += byteLen; + } + } + function writeBytes(data) { + ensure(data.length + 9); + encodeHeader(majorUnstructuredByteString, data.length); + buf.set(data, cursor); + cursor += data.length; + } + function writeTag(tagValue, innerValue) { + ensure(9); + if (typeof tagValue === "bigint") { + encodeBigHeader(majorTag, tagValue); + } else { + encodeHeader(majorTag, tagValue); + } + writeUntypedValue(innerValue); + } + function writeNumericValue(nv) { + let str = nv.string; + let expOffset = BigInt(0); + const eIndex = str.search(/[eE]/); + if (eIndex !== -1) { + expOffset = BigInt(str.slice(eIndex + 1)); + str = str.slice(0, eIndex); + } + const decimalIndex = str.indexOf("."); + const fractionDigits = decimalIndex === -1 ? 0 : str.length - decimalIndex - 1; + const exponent = expOffset - BigInt(fractionDigits); + const mantissa = BigInt(str.replace(".", "")); + ensure(9); + buf[cursor++] = 196; + encodeHeader(majorList, 2); + ensure(9); + if (exponent >= -0x20000000000000n && exponent <= 0x1fffffffffffffn) { + writeInteger(Number(exponent)); + } else { + writeBigInt(exponent); + } + writeBigInt(mantissa); + } + function writeTimestamp(date) { + ensure(18); + encodeHeader(majorTag, 1); + const epochSecs = date.getTime() / 1000; + if (Number.isInteger(epochSecs)) { + writeInteger(epochSecs); + } else { + writeFloat64(epochSecs); + } + } + + class CborShapeDeserializer2 extends SerdeContext { + read(schema, bytes) { + payload = bytes; + isBuffer = USE_BUFFER && bytes instanceof Buffer; + dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); + pos = 0; + end = bytes.length; + cacheEpoch = cacheEpoch + 1 & 65535; + return readValue(NormalizedSchema.of(schema)); + } + readValue(_schema, value) { + return transformObject(NormalizedSchema.of(_schema), value); + } + } + var USE_BUFFER = typeof Buffer !== "undefined"; + var textDecoder = new TextDecoder; + var payload = new Uint8Array(0); + var isBuffer = false; + var dataView = new DataView(new ArrayBuffer(0)); + var pos = 0; + var end = 0; + var STRING_CACHE_SIZE = 2048; + var stringCache = new Array(STRING_CACHE_SIZE); + var stringCacheEpochs = new Uint16Array(STRING_CACHE_SIZE); + var cacheEpoch = 0; + function readValue(ns) { + if (pos >= end) { + throw new Error("unexpected end of CBOR payload."); + } + const major = (payload[pos] & 224) >> 5; + const minor = payload[pos] & 31; + if (minor === minorIndefinite && major >= 2 && major <= 5) { + return readIndefinite(ns, major); + } + switch (major) { + case majorUint64: + return readUnsignedInt(); + case majorNegativeInt64: + return readNegativeInt(); + case majorUnstructuredByteString: + return readByteString(); + case majorUtf8String: + return readUtf8String(); + case majorList: + return readList(ns); + case majorMap: + return readMap(ns); + case majorTag: + return readTag(); + case majorSpecial: + return readSpecial(); + default: + throw new Error(`unexpected CBOR major type ${major}.`); + } + } + function readList(ns) { + const count = decodeCount(); + const memberSchema = ns.isListSchema() ? ns.getValueSchema() : ns; + const list = Array(count); + for (let i = 0;i < count; ++i) { + list[i] = readValue(memberSchema); + } + return list; + } + function readMap(ns) { + const count = decodeCount(); + if (ns.isStructSchema()) { + const startPos = pos; + return readStruct(ns, count, startPos); + } + const valueSchema = ns.isMapSchema() ? ns.getValueSchema() : ns; + const map = {}; + for (let i = 0;i < count; ++i) { + const key = readUtf8String(); + map[key] = readValue(valueSchema); + } + return map; + } + function readStruct(ns, count, startPos) { + const isUnion = ns.isUnionSchema(); + const cache = loadCborStructIterator(ns); + const { memberSchemas, encodedKeys, memberNames } = cache; + const z = encodedKeys.length; + const result = {}; + let unknownKey; + let unknownValue; + let unknownCount = 0; + let hasType = false; + let hint = 0; + for (let i = 0;i < count; ++i) { + const matchIdx = matchStructKey(encodedKeys, z, hint); + if (matchIdx >= 0) { + hint = matchIdx + 1; + if (hint >= z) { + hint = 0; + } + const val = readValue(memberSchemas[matchIdx]); + if (val != null) { + result[memberNames[matchIdx]] = val; + } + } else { + const key = readUtf8String(); + const val = readValue(NormalizedSchema.of(15)); + if (key === "__type" && typeof val === "string") { + hasType = true; + } else { + unknownKey = key; + unknownValue = val; + ++unknownCount; + } + } + } + if (isUnion) { + let resultEmpty = true; + for (const _ in result) { + if (!hasOwn(result, _)) + continue; + resultEmpty = false; + break; + } + if (resultEmpty && unknownCount === 1) { + result.$unknown = [unknownKey, unknownValue]; + } + } else if (hasType) { + pos = startPos; + const docSchema = NormalizedSchema.of(15); + for (let i = 0;i < count; ++i) { + const key = readUtf8String(); + const val = readValue(docSchema); + if (!(key in result)) { + result[key] = val; + } + } + } + return result; + } + function readTag(ns) { + const tagNum = decodeArgument(); + const tagNumber = typeof tagNum === "bigint" ? Number(tagNum) : tagNum; + if (tagNumber === 1) { + const docSchema = NormalizedSchema.of(15); + const epochValue = readValue(docSchema); + return _parseEpochTimestamp(epochValue); + } + if (tagNumber === 2 || tagNumber === 3) { + const byteStr = readByteString(); + let b = BigInt(0); + for (let i = 0;i < byteStr.length; ++i) { + b = b << BigInt(8) | BigInt(byteStr[i]); + } + return tagNumber === 3 ? -b - BigInt(1) : b; + } + if (tagNumber === 4) { + const docSchema = NormalizedSchema.of(15); + const pair = readValue(docSchema); + const [rawExponent, mantissa] = pair; + const normalizer = mantissa < 0 ? -1 : 1; + const absMantissa = BigInt(normalizer) * BigInt(mantissa); + const mantissaDigits = String(absMantissa); + const sign = mantissa < 0 ? "-" : ""; + let numericString; + const isSmallExponent = typeof rawExponent === "number" && Math.abs(rawExponent) <= 2 ** 28; + if (isSmallExponent) { + const exponent = rawExponent; + const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + mantissaDigits; + numericString = exponent === 0 ? mantissaStr : mantissaStr.slice(0, mantissaStr.length + exponent) + "." + mantissaStr.slice(exponent); + numericString = numericString.replace(/^0+/g, ""); + if (numericString === "") { + numericString = "0"; + } + if (numericString[0] === ".") { + numericString = "0" + numericString; + } + numericString = sign + numericString; + } else { + const bigExponent = BigInt(rawExponent); + if (mantissaDigits.length === 1) { + numericString = sign + mantissaDigits + "e" + String(bigExponent); + } else { + const adjustedExp = bigExponent + BigInt(mantissaDigits.length - 1); + numericString = sign + mantissaDigits[0] + "." + mantissaDigits.slice(1) + "e" + String(adjustedExp); + } + } + return nv(numericString); + } + const docSchema = NormalizedSchema.of(15); + const innerValue = readValue(docSchema); + return { tag: castBigInt(tagNum), value: innerValue }; + } + function readIndefinite(ns, major) { + switch (major) { + case majorUtf8String: + return readUtf8StringIndefinite(); + case majorUnstructuredByteString: + return readByteStringIndefinite(); + case majorList: + return readListIndefinite(ns); + case majorMap: + return readMapIndefinite(ns); + default: + throw new Error(`unexpected indefinite length for major ${major}.`); + } + } + function readUtf8StringIndefinite() { + pos += 1; + const chunks = []; + let totalLen = 0; + while (pos < end) { + if (payload[pos] === 255) { + pos += 1; + const combined = new Uint8Array(totalLen); + let offset = 0; + for (let i = 0;i < chunks.length; ++i) { + combined.set(chunks[i], offset); + offset += chunks[i].length; + } + if (USE_BUFFER) { + return Buffer.from(combined.buffer, combined.byteOffset, combined.byteLength).toString("utf-8"); + } + return textDecoder.decode(combined); + } + const bytes = readByteString(); + chunks.push(bytes); + totalLen += bytes.length; + } + throw new Error("expected break marker."); + } + function readByteStringIndefinite() { + pos += 1; + const chunks = []; + let totalLen = 0; + while (pos < end) { + if (payload[pos] === 255) { + pos += 1; + const combined = new Uint8Array(totalLen); + let offset = 0; + for (let i = 0;i < chunks.length; ++i) { + combined.set(chunks[i], offset); + offset += chunks[i].length; + } + return combined; + } + const bytes = readByteString(); + chunks.push(bytes); + totalLen += bytes.length; + } + throw new Error("expected break marker."); + } + function readListIndefinite(ns) { + pos += 1; + const memberSchema = ns.isListSchema() ? ns.getValueSchema() : ns; + const list = []; + while (pos < end) { + if (payload[pos] === 255) { + pos += 1; + return list; + } + list.push(readValue(memberSchema)); + } + throw new Error("expected break marker."); + } + function readMapIndefinite(ns) { + pos += 1; + if (ns.isStructSchema()) { + const cache = loadCborStructIterator(ns); + const { memberSchemas, encodedKeys, memberNames } = cache; + const z = encodedKeys.length; + const isUnion = ns.isUnionSchema(); + const result = {}; + let unknownKey; + let unknownValue; + let unknownCount = 0; + let hint = 0; + while (pos < end) { + if (payload[pos] === 255) { + pos += 1; + if (isUnion) { + let resultEmpty = true; + for (const _ in result) { + if (!hasOwn(result, _)) + continue; + resultEmpty = false; + break; + } + if (resultEmpty && unknownCount === 1) { + result.$unknown = [unknownKey, unknownValue]; + } + } + return result; + } + const matchIdx = matchStructKey(encodedKeys, z, hint); + if (matchIdx >= 0) { + hint = matchIdx + 1; + if (hint >= z) { + hint = 0; + } + const val = readValue(memberSchemas[matchIdx]); + if (val != null) { + result[memberNames[matchIdx]] = val; + } + } else { + const key = readUtf8String(); + const val = readValue(NormalizedSchema.of(15)); + if (key !== "__type") { + unknownKey = key; + unknownValue = val; + ++unknownCount; + } + } + } + throw new Error("expected break marker."); + } + const valueSchema = ns.isMapSchema() ? ns.getValueSchema() : ns; + const map = {}; + while (pos < end) { + if (payload[pos] === 255) { + pos += 1; + return map; + } + const key = readUtf8String(); + map[key] = readValue(valueSchema); + } + throw new Error("expected break marker."); + } + function matchStructKey(encodedKeys, z, hint) { + const hintKey = encodedKeys[hint]; + if (pos + hintKey.length <= end && bytesMatch(pos, hintKey)) { + pos += hintKey.length; + return hint; + } + for (let i = 0;i < z; ++i) { + if (i === hint) { + continue; + } + const ek = encodedKeys[i]; + if (pos + ek.length <= end && bytesMatch(pos, ek)) { + pos += ek.length; + return i; + } + } + return -1; + } + function bytesMatch(at, expected) { + const len = expected.length; + if (payload[at] !== expected[0]) { + return false; + } + for (let i = 1;i < len; ++i) { + if (payload[at + i] !== expected[i]) { + return false; + } + } + return true; + } + function decodeArgument() { + const minor = payload[pos] & 31; + if (minor < 24) { + pos += 1; + return minor; + } + switch (minor) { + case extendedOneByte: + if (end - pos < 2) { + overflow(1); + } + pos += 2; + return payload[pos - 1]; + case extendedFloat16: + if (end - pos < 3) { + overflow(2); + } + pos += 3; + return dataView.getUint16(pos - 2); + case extendedFloat32: + if (end - pos < 5) { + overflow(4); + } + pos += 5; + return dataView.getUint32(pos - 4); + case extendedFloat64: { + if (end - pos < 9) { + overflow(8); + } + pos += 9; + const hi = dataView.getUint32(pos - 8); + if (hi < 2097152) { + return hi * 4294967296 + dataView.getUint32(pos - 4); + } + return dataView.getBigUint64(pos - 8); + } + default: + throw new Error(`unexpected minor value ${minor}.`); + } + } + function decodeCount() { + const val = decodeArgument(); + return typeof val === "bigint" ? Number(val) : val; + } + function readUnsignedInt() { + const val = decodeArgument(); + return castBigInt(val); + } + function readNegativeInt() { + const val = decodeArgument(); + if (typeof val === "bigint") { + return BigInt(-1) - val; + } + return -1 - val; + } + function readByteString() { + const length = decodeCount(); + if (end - pos < length) { + overflow(length); + } + const start = pos; + pos += length; + return payload.subarray(start, start + length); + } + function readUtf8String() { + const length = decodeCount(); + if (end - pos < length) { + overflow(length); + } + const start = pos; + pos += length; + if (length < 24) { + return decodeUtf8Cached(start, length); + } + if (isBuffer) { + return payload.toString("utf-8", start, start + length); + } + return textDecoder.decode(payload.subarray(start, start + length)); + } + function decodeUtf8Cached(at, length) { + let h = length; + for (let i = 0;i < length; ++i) { + h = h * 31 + payload[at + i] | 0; + } + const slot = h >>> 0 & STRING_CACHE_SIZE - 1; + const cached = stringCache[slot]; + if (cached !== undefined && cached.length === length) { + let match = true; + for (let i = 0;i < length; ++i) { + if (cached.charCodeAt(i) !== payload[at + i]) { + match = false; + break; + } + } + if (match) { + stringCacheEpochs[slot] = cacheEpoch; + return cached; + } + } + const result = isBuffer ? payload.toString("utf-8", at, at + length) : textDecoder.decode(payload.subarray(at, at + length)); + if (stringCacheEpochs[slot] !== cacheEpoch) { + stringCache[slot] = result; + stringCacheEpochs[slot] = cacheEpoch; + } + return result; + } + function readSpecial() { + const p = pos; + const minor = payload[p] & 31; + switch (minor) { + case specialTrue: + pos = p + 1; + return true; + case specialFalse: + pos = p + 1; + return false; + case specialNull: + pos = p + 1; + return null; + case specialUndefined: + pos = p + 1; + return null; + case extendedFloat16: { + if (end - p < 3) { + overflow(2); + } + pos = p + 3; + return bytesToFloat16(payload[p + 1], payload[p + 2]); + } + case extendedFloat32: { + if (end - p < 5) { + overflow(4); + } + pos = p + 5; + return dataView.getFloat32(p + 1); + } + case extendedFloat64: { + if (end - p < 9) { + overflow(8); + } + pos = p + 9; + return dataView.getFloat64(p + 1); + } + default: + throw new Error(`unexpected minor value ${minor} for major 7.`); + } + } + function bytesToFloat16(a, b) { + const sign = a >> 7; + const exponent = (a & 124) >> 2; + const fraction = (a & 3) << 8 | b; + const scalar = sign === 0 ? 1 : -1; + if (exponent === 0) { + if (fraction === 0) { + return 0; + } + return scalar * (Math.pow(2, 1 - 15) * (fraction / 1024)); + } else if (exponent === 31) { + if (fraction === 0) { + return scalar * Infinity; + } + return NaN; + } + return scalar * (Math.pow(2, exponent - 15) * (1 + fraction / 1024)); + } + function castBigInt(value) { + if (typeof value === "number") { + return value; + } + const num = Number(value); + if (Number.MIN_SAFE_INTEGER <= num && num <= Number.MAX_SAFE_INTEGER) { + return num; + } + return value; + } + function overflow(n) { + throw new Error(`CBOR: length ${n} greater than remaining buffer length.`); + } + function transformObject(ns, value) { + if (ns.isTimestampSchema()) { + if (typeof value === "number") { + return _parseEpochTimestamp(value); + } + if (typeof value === "object" && value !== null) { + if (value.tag === 1 && "value" in value) { + return _parseEpochTimestamp(value.value); + } + } + } + if (ns.isBlobSchema()) { + return value; + } + if (typeof value === "undefined" || typeof value === "boolean" || typeof value === "number" || typeof value === "string" || typeof value === "bigint" || typeof value === "symbol") { + return value; + } + if (typeof value !== "object" || value === null) { + return value; + } + if ("byteLength" in value) { + return value; + } + if (value instanceof Date) { + return value; + } + if (value instanceof NumericValue) { + return value; + } + if (ns.isDocumentSchema()) { + return value; + } + if (ns.isListSchema()) { + const memberSchema = ns.getValueSchema(); + const out = []; + for (const item of value) { + out.push(transformObject(memberSchema, item)); + } + return out; + } + const newObject = {}; + if (ns.isMapSchema()) { + const targetSchema = ns.getValueSchema(); + for (const key in value) { + if (!hasOwn(value, key)) + continue; + newObject[key] = transformObject(targetSchema, value[key]); + } + } else if (ns.isStructSchema()) { + const isUnion = ns.isUnionSchema(); + let keys; + if (isUnion) { + keys = new Set; + for (const k in value) { + if (!hasOwn(value, k)) + continue; + if (k !== "__type") { + keys.add(k); + } + } + } + for (const [key, memberSchema] of ns.structIterator()) { + if (isUnion) { + keys.delete(key); + } + if (value[key] != null) { + newObject[key] = transformObject(memberSchema, value[key]); + } + } + if (isUnion && keys?.size === 1) { + let newObjectEmpty = true; + for (const _ in newObject) { + if (!hasOwn(newObject, _)) + continue; + newObjectEmpty = false; + break; + } + if (newObjectEmpty) { + const k = keys.values().next().value; + newObject.$unknown = [k, value[k]]; + } + } else if (typeof value.__type === "string") { + for (const k in value) { + if (!hasOwn(value, k)) + continue; + if (!(k in newObject)) { + newObject[k] = value[k]; + } + } + } + } + return newObject; + } + + class CborCodec extends SerdeContext { + createSerializer() { + const serializer = new CborShapeSerializer2; + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new CborShapeDeserializer2; + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + } + + class SmithyRpcV2CborProtocol extends RpcProtocol { + codec = new CborCodec; + serializer = this.codec.createSerializer(); + deserializer = this.codec.createDeserializer(); + constructor({ defaultNamespace, errorTypeRegistries }) { + super({ defaultNamespace, errorTypeRegistries }); + } + getShapeId() { + return "smithy.protocols#rpcv2Cbor"; + } + getPayloadCodec() { + return this.codec; + } + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + Object.assign(request.headers, { + "content-type": this.getDefaultContentType(), + "smithy-protocol": "rpc-v2-cbor", + accept: this.getDefaultContentType() + }); + if (deref(operationSchema.input) === "unit") { + delete request.body; + delete request.headers["content-type"]; + } else { + if (!request.body) { + this.serializer.write(15, {}); + request.body = this.serializer.flush(); + } + if (request.body instanceof Uint8Array) { + request.headers["content-length"] = String(request.body.byteLength); + } + } + const { service, operation } = getSmithyContext(context); + const path = `/service/${service}/operation/${operation}`; + if (request.path.endsWith("/")) { + request.path += path.slice(1); + } else { + request.path += path; + } + return request; + } + async deserializeResponse(operationSchema, context, response) { + return super.deserializeResponse(operationSchema, context, response); + } + async handleError(operationSchema, context, response, dataObject, metadata) { + const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown"; + const errorMetadata = { + $metadata: metadata, + $fault: response.statusCode <= 500 ? "client" : "server" + }; + let namespace = this.options.defaultNamespace; + if (errorName.includes("#")) { + [namespace] = errorName.split("#"); + } + const registry = this.compositeErrorRegistry; + const nsRegistry = TypeRegistry.for(namespace); + registry.copyFrom(nsRegistry); + let errorSchema; + try { + errorSchema = registry.getSchema(errorName); + } catch (ignored) { + if (dataObject.Message) { + dataObject.message = dataObject.Message; + } + const syntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace); + registry.copyFrom(syntheticRegistry); + const baseExceptionSchema = registry.getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = registry.getErrorCtor(baseExceptionSchema); + throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject); + } + throw Object.assign(new Error(errorName), errorMetadata, dataObject); + } + const ns = NormalizedSchema.of(errorSchema); + const ErrorCtor = registry.getErrorCtor(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new ErrorCtor({}); + const output = {}; + for (const [name, member] of ns.structIterator()) { + output[name] = this.deserializer.readValue(member, dataObject[name]); + } + throw Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message + }, output); + } + getDefaultContentType() { + return "application/cbor"; + } + } + + class CborShapeSerializer extends SerdeContext { + value; + write(schema, value) { + this.value = this.serialize(schema, value); + } + serialize(schema, source) { + const ns = NormalizedSchema.of(schema); + if (source == null) { + if (ns.isIdempotencyToken()) { + return generateIdempotencyToken(); + } + return source; + } + if (ns.isBlobSchema()) { + if (typeof source === "string") { + return (this.serdeContext?.base64Decoder ?? fromBase64)(source); + } + return source; + } + if (ns.isTimestampSchema()) { + if (typeof source === "number" || typeof source === "bigint") { + return dateToTag(new Date(Number(source) / 1000 | 0)); + } + return dateToTag(source); + } + if (typeof source === "function" || typeof source === "object") { + const sourceObject = source; + if (ns.isListSchema() && Array.isArray(sourceObject)) { + const sparse = !!ns.getMergedTraits().sparse; + const newArray = []; + let i = 0; + for (const item of sourceObject) { + const value = this.serialize(ns.getValueSchema(), item); + if (value != null || sparse) { + newArray[i++] = value; + } + } + return newArray; + } + if (sourceObject instanceof Date) { + return dateToTag(sourceObject); + } + const newObject = {}; + if (ns.isMapSchema()) { + const sparse = !!ns.getMergedTraits().sparse; + for (const key in sourceObject) { + if (!hasOwn(sourceObject, key)) + continue; + const value = this.serialize(ns.getValueSchema(), sourceObject[key]); + if (value != null || sparse) { + newObject[key] = value; + } + } + } else if (ns.isStructSchema()) { + for (const [key, memberSchema] of ns.structIterator()) { + const value = this.serialize(memberSchema, sourceObject[key]); + if (value != null) { + newObject[key] = value; + } + } + const isUnion = ns.isUnionSchema(); + if (isUnion && Array.isArray(sourceObject.$unknown)) { + const [k, v] = sourceObject.$unknown; + newObject[k] = v; + } else if (typeof sourceObject.__type === "string") { + for (const k in sourceObject) { + if (!hasOwn(sourceObject, k)) + continue; + if (!(k in newObject)) { + newObject[k] = this.serialize(15, sourceObject[k]); + } + } + } + } else if (ns.isDocumentSchema()) { + if (Array.isArray(sourceObject)) { + const newArray = []; + let i = 0; + for (const item of sourceObject) { + newArray[i++] = this.serialize(ns.getValueSchema(), item); + } + return newArray; + } + for (const key in sourceObject) { + if (!hasOwn(sourceObject, key)) + continue; + newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]); + } + } else if (ns.isBigDecimalSchema()) { + return sourceObject; + } + return newObject; + } + return source; + } + flush() { + const buffer = cbor.serialize(this.value); + this.value = undefined; + return buffer; + } + } + + class CborShapeDeserializer extends SerdeContext { + read(schema, bytes) { + const data = cbor.deserialize(bytes); + return this.readValue(schema, data); + } + readValue(_schema, value) { + const ns = NormalizedSchema.of(_schema); + if (ns.isTimestampSchema()) { + if (typeof value === "number") { + return _parseEpochTimestamp(value); + } + if (typeof value === "object") { + if (value.tag === 1 && "value" in value) { + return _parseEpochTimestamp(value.value); + } + } + } + if (ns.isBlobSchema()) { + if (typeof value === "string") { + return (this.serdeContext?.base64Decoder ?? fromBase64)(value); + } + return value; + } + if (typeof value === "undefined" || typeof value === "boolean" || typeof value === "number" || typeof value === "string" || typeof value === "bigint" || typeof value === "symbol") { + return value; + } else if (typeof value === "object") { + if (value === null) { + return null; + } + if ("byteLength" in value) { + return value; + } + if (value instanceof Date) { + return value; + } + if (ns.isDocumentSchema()) { + return value; + } + if (ns.isListSchema()) { + const newArray = []; + const memberSchema = ns.getValueSchema(); + for (const item of value) { + const itemValue = this.readValue(memberSchema, item); + newArray.push(itemValue); + } + return newArray; + } + const newObject = {}; + if (ns.isMapSchema()) { + const targetSchema = ns.getValueSchema(); + for (const key in value) { + if (!hasOwn(value, key)) + continue; + const itemValue = this.readValue(targetSchema, value[key]); + newObject[key] = itemValue; + } + } else if (ns.isStructSchema()) { + const isUnion = ns.isUnionSchema(); + let keys; + if (isUnion) { + keys = new Set; + for (const k in value) { + if (!hasOwn(value, k)) + continue; + if (k !== "__type") { + keys.add(k); + } + } + } + for (const [key, memberSchema] of ns.structIterator()) { + if (isUnion) { + keys.delete(key); + } + if (value[key] != null) { + newObject[key] = this.readValue(memberSchema, value[key]); + } + } + if (isUnion && keys?.size === 1) { + let newObjectEmpty = true; + for (const _ in newObject) { + if (!hasOwn(newObject, _)) + continue; + newObjectEmpty = false; + break; + } + if (newObjectEmpty) { + const k = keys.values().next().value; + newObject.$unknown = [k, value[k]]; + } + } else if (typeof value.__type === "string") { + for (const k in value) { + if (!hasOwn(value, k)) + continue; + if (!(k in newObject)) { + newObject[k] = value[k]; + } + } + } + } else if (value instanceof NumericValue) { + return value; + } + return newObject; + } else { + return value; + } + } + } + exports.CborCodec = CborCodec; + exports.CborShapeDeserializer = CborShapeDeserializer; + exports.CborShapeDeserializer2 = CborShapeDeserializer2; + exports.CborShapeSerializer = CborShapeSerializer; + exports.CborShapeSerializer2 = CborShapeSerializer2; + exports.SmithyRpcV2CborProtocol = SmithyRpcV2CborProtocol; + exports.buildHttpRpcRequest = buildHttpRpcRequest; + exports.cbor = cbor; + exports.checkCborResponse = checkCborResponse; + exports.dateToTag = dateToTag; + exports.loadSmithyRpcV2CborErrorCode = loadSmithyRpcV2CborErrorCode; + exports.parseCborBody = parseCborBody; + exports.parseCborErrorBody = parseCborErrorBody; + exports.tag = tag; + exports.tagSymbol = tagSymbol; +}); + +// node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +var require_dist_cjs5 = __commonJS(function(exports) { + var ATTR_ESCAPE_RE = /[&<>"]/g; + var ATTR_ESCAPE_MAP = { + "&": "&", + "<": "<", + ">": ">", + '"': """ + }; + function escapeAttribute(value) { + return value.replace(ATTR_ESCAPE_RE, (ch) => ATTR_ESCAPE_MAP[ch]); + } + var ELEMENT_ESCAPE_RE = /[&"'<>\r\n\u0085\u2028]/g; + var ELEMENT_ESCAPE_MAP = { + "&": "&", + '"': """, + "'": "'", + "<": "<", + ">": ">", + "\r": " ", + "\n": " ", + "…": "…", + "\u2028": "
" + }; + function escapeElement(value) { + return value.replace(ELEMENT_ESCAPE_RE, (ch) => ELEMENT_ESCAPE_MAP[ch]); + } + + class XmlText { + value; + constructor(value) { + this.value = value; + } + toString() { + return escapeElement("" + this.value); + } + } + + class XmlNode { + name; + children; + attributes = {}; + static of(name, childText, withName) { + const node = new XmlNode(name); + if (childText !== undefined) { + node.addChildNode(new XmlText(childText)); + } + if (withName !== undefined) { + node.withName(withName); + } + return node; + } + constructor(name, children = []) { + this.name = name; + this.children = children; + } + withName(name) { + this.name = name; + return this; + } + addAttribute(name, value) { + this.attributes[name] = value; + return this; + } + addChildNode(child) { + this.children.push(child); + return this; + } + removeAttribute(name) { + delete this.attributes[name]; + return this; + } + n(name) { + this.name = name; + return this; + } + c(child) { + this.children.push(child); + return this; + } + a(name, value) { + if (value != null) { + this.attributes[name] = value; + } + return this; + } + cc(input, field, withName = field) { + if (input[field] != null) { + const node = XmlNode.of(field, input[field]).withName(withName); + this.c(node); + } + } + l(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + nodes.map((node) => { + node.withName(memberName); + this.c(node); + }); + } + } + lc(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + const containerNode = new XmlNode(memberName); + nodes.map((node) => { + containerNode.c(node); + }); + this.c(containerNode); + } + } + toString() { + const hasChildren = Boolean(this.children.length); + let xmlText = `<${this.name}`; + const attributes = this.attributes; + for (const attributeName of Object.keys(attributes)) { + const attribute = attributes[attributeName]; + if (attribute != null) { + xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`; + } + } + return xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}`; + } + } + function writeKey(obj) { + Object.defineProperty(obj, "__proto__", { value: undefined, writable: true, enumerable: true, configurable: true }); + } + function parseXML(xml) { + const state = new AwsXmlParser(xml); + return state.parse(); + } + + class AwsXmlParser { + x; + i = 0; + z; + constructor(x) { + this.x = x; + this.x = x.replace(/\r\n?/g, ` +`); + this.z = this.x.length; + } + parse() { + const p = this; + const { z } = p; + while (p.i < z) { + p.trim(); + if (p.i >= z) { + break; + } + if (p.isNext(""); + p.trim(); + } else if (p.isNext(""); + p.trim(); + } else if (p.isNext("/`.includes(p.x[p.i])) { + tag += p.x[p.i++]; + } + let hasAttrs = false; + const attrs = {}; + while (p.i < p.z) { + p.trim(); + if (">/".includes(p.x[p.i])) { + break; + } + let name = ""; + while (p.i < p.z && !`= \r +>/?`.includes(p.x[p.i])) { + name += p.x[p.i++]; + } + p.trim(); + if (p.x[p.i] !== "=") { + break; + } + ++p.i; + p.trim(); + if (name === "__proto__") { + writeKey(attrs); + } + attrs[name] = p.readAttrValue(); + hasAttrs = true; + } + if (p.i >= p.z) { + throw new Error("@aws-sdk XML parse error: unexpected end of input."); + } + if (p.x[p.i] === "/") { + ++p.i; + if (p.i >= p.z || p.x[p.i] !== ">") { + throw new Error("@aws-sdk XML parse error: expected > at the end of self-closing tag."); + } + ++p.i; + return { tag, value: hasAttrs ? attrs : "" }; + } + if (p.x[p.i] !== ">") { + throw new Error("@aws-sdk XML parse error: expected > at the end of opening tag."); + } + ++p.i; + const textParts = []; + const childTags = []; + let hasElementChild = false; + while (p.i < p.z) { + if (p.isNext(""); + } else if (p.isNext("")); + } else if (p.isNext(""); + } else { + hasElementChild = true; + childTags.push(p.parseTag()); + } + } else { + let text = ""; + while (p.i < p.z && p.x[p.i] !== "<") { + text += p.x[p.i++]; + } + textParts.push(p.decodeEntities(text)); + } + } + if (!p.isNext(".`); + } + p.i += 2; + const closeTag = p.readTo(">").trim(); + if (closeTag !== tag) { + throw new Error(`@aws-sdk XML parse error: mismatched tags <${tag}> and .`); + } + if (!hasAttrs && textParts.length === 0 && !hasElementChild) { + return { tag, value: "" }; + } + if (!hasAttrs && !hasElementChild) { + const text = textParts.length === 1 ? textParts[0] : textParts.join(""); + if (text.trim() === "" && text.includes(` +`)) { + return { tag, value: "" }; + } + return { tag, value: text }; + } + const obj = {}; + for (const text of textParts) { + if (text.trim() === "" && text.includes(` +`)) { + continue; + } + obj["#text"] = "#text" in obj ? obj["#text"] + text : text; + } + for (const child of childTags) { + if (child.tag === "__proto__") { + writeKey(obj); + } + if (child.tag in obj) { + if (Array.isArray(obj[child.tag])) { + obj[child.tag].push(child.value); + } else { + obj[child.tag] = [obj[child.tag], child.value]; + } + } else { + obj[child.tag] = child.value; + } + } + for (const [k, v] of Object.entries(attrs)) { + if (k === "__proto__") { + writeKey(obj); + } + obj[k] = v; + } + return { tag, value: obj }; + } + static ENTITIES = { + amp: "&", + lt: "<", + gt: ">", + quot: '"', + apos: "'" + }; + skipDoctype() { + const p = this; + p.i += 9; + let depth = 0; + while (p.i < p.z) { + const c = p.x[p.i]; + if (c === "[") { + ++depth; + } else if (c === "]") { + --depth; + } else if (c === ">" && depth === 0) { + ++p.i; + return; + } + ++p.i; + } + throw new Error("@aws-sdk XML parse error: unclosed DOCTYPE."); + } + decodeEntities(s) { + return s.replace(/&(?:#x([0-9a-fA-F]{1,6})|#(\d{1,7})|([a-zA-Z][a-zA-Z0-9]{0,30}));/g, (_, hex, dec, named) => { + if (hex) { + return String.fromCharCode(parseInt(hex, 16)); + } + if (dec) { + return String.fromCharCode(parseInt(dec, 10)); + } + return AwsXmlParser.ENTITIES[named] ?? ""; + }); + } + } + exports.XmlNode = XmlNode; + exports.XmlText = XmlText; + exports.parseXML = parseXML; +}); + +// node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +var require_protocols2 = __commonJS(function(exports) { + var { SmithyRpcV2CborProtocol, loadSmithyRpcV2CborErrorCode } = require_cbor(); + var { TypeRegistry, NormalizedSchema, deref } = require_schema(); + var { decorateServiceException, getValueFromTextNode } = require_client(); + var { collectBody, determineTimestampFormat, RpcProtocol, HttpBindingProtocol, HttpInterceptingShapeSerializer, HttpInterceptingShapeDeserializer, FromStringShapeDeserializer, extendedEncodeURIComponent } = require_protocols(); + var { NumericValue, toUtf8, fromBase64, LazyJsonString, parseEpochTimestamp, parseRfc7231DateTime, parseRfc3339DateTimeWithOffset, generateIdempotencyToken, toBase64, dateToUtcString, expectUnion } = require_serde(); + var { parseXML, XmlNode, XmlText } = require_dist_cjs5(); + + class ProtocolLib { + queryCompat; + errorRegistry; + constructor(queryCompat = false) { + this.queryCompat = queryCompat; + } + resolveRestContentType(defaultContentType, inputSchema) { + const members = inputSchema.getMemberSchemas(); + const httpPayloadMember = Object.values(members).find((m) => { + return !!m.getMergedTraits().httpPayload; + }); + if (httpPayloadMember) { + const mediaType = httpPayloadMember.getMergedTraits().mediaType; + if (mediaType) { + return mediaType; + } else if (httpPayloadMember.isStringSchema()) { + return "text/plain"; + } else if (httpPayloadMember.isBlobSchema()) { + return "application/octet-stream"; + } else { + return defaultContentType; + } + } else if (!inputSchema.isUnitSchema()) { + const hasBody = Object.values(members).find((m) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits(); + const noPrefixHeaders = httpPrefixHeaders === undefined; + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders; + }); + if (hasBody) { + return defaultContentType; + } + } + } + async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) { + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [, errorName] = errorIdentifier.split("#"); + } + const errorMetadata = { + $metadata: metadata, + $fault: response.statusCode < 500 ? "client" : "server" + }; + if (!this.errorRegistry) { + throw new Error("@aws-sdk/core/protocols - error handler not initialized."); + } + try { + const errorSchema = getErrorSchema?.(this.errorRegistry, errorName) ?? this.errorRegistry.getSchema(errorIdentifier); + return { errorSchema, errorMetadata }; + } catch (e) { + dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError"; + const synthetic = this.errorRegistry; + const baseExceptionSchema = synthetic.getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error; + throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject); + } + const d = dataObject; + const message = d?.message ?? d?.Message ?? d?.Error?.Message ?? d?.Error?.message; + throw this.decorateServiceException(Object.assign(new Error(message), { + name: errorName + }, errorMetadata), dataObject); + } + } + compose(composite, errorIdentifier, defaultNamespace) { + let namespace = defaultNamespace; + if (errorIdentifier.includes("#")) { + [namespace] = errorIdentifier.split("#"); + } + const staticRegistry = TypeRegistry.for(namespace); + const defaultSyntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + defaultNamespace); + composite.copyFrom(staticRegistry); + composite.copyFrom(defaultSyntheticRegistry); + this.errorRegistry = composite; + } + decorateServiceException(exception, additions = {}) { + if (this.queryCompat) { + const msg = exception.Message ?? additions.Message; + const error = decorateServiceException(exception, additions); + if (msg) { + error.message = msg; + } + const errorObj = error.Error ?? {}; + errorObj.Type = error.Error?.Type; + errorObj.Code = error.Error?.Code; + errorObj.Message = error.Error?.message ?? error.Error?.Message ?? msg; + error.Error = errorObj; + const reqId = error.$metadata.requestId; + if (reqId) { + error.RequestId = reqId; + } + return error; + } + return decorateServiceException(exception, additions); + } + setQueryCompatError(output, response) { + const queryErrorHeader = response.headers?.["x-amzn-query-error"]; + if (output !== undefined && queryErrorHeader != null) { + const [Code, Type] = queryErrorHeader.split(";"); + const keys = Object.keys(output); + const Error2 = { + Code, + Type + }; + output.Code = Code; + output.Type = Type; + for (let i = 0;i < keys.length; i++) { + const k = keys[i]; + Error2[k === "message" ? "Message" : k] = output[k]; + } + delete Error2.__type; + output.Error = Error2; + } + } + queryCompatOutput(queryCompatErrorData, errorData) { + if (queryCompatErrorData.Error) { + errorData.Error = queryCompatErrorData.Error; + } + if (queryCompatErrorData.Type) { + errorData.Type = queryCompatErrorData.Type; + } + if (queryCompatErrorData.Code) { + errorData.Code = queryCompatErrorData.Code; + } + } + findQueryCompatibleError(registry, errorName) { + try { + return registry.getSchema(errorName); + } catch (e) { + return registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName); + } + } + } + + class AwsSmithyRpcV2CborProtocol extends SmithyRpcV2CborProtocol { + awsQueryCompatible; + mixin; + constructor({ defaultNamespace, errorTypeRegistries, awsQueryCompatible }) { + super({ defaultNamespace, errorTypeRegistries }); + this.awsQueryCompatible = !!awsQueryCompatible; + this.mixin = new ProtocolLib(this.awsQueryCompatible); + } + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + if (this.awsQueryCompatible) { + request.headers["x-amzn-query-mode"] = "true"; + } + return request; + } + async handleError(operationSchema, context, response, dataObject, metadata) { + if (this.awsQueryCompatible) { + this.mixin.setQueryCompatError(dataObject, response); + } + const errorName = (() => { + const compatHeader = response.headers["x-amzn-query-error"]; + if (compatHeader && this.awsQueryCompatible) { + return compatHeader.split(";")[0]; + } + return loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown"; + })(); + this.mixin.compose(this.compositeErrorRegistry, errorName, this.options.defaultNamespace); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined); + const ns = NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "UnknownError"; + const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor({}); + const output = {}; + for (const [name, member] of ns.structIterator()) { + if (dataObject[name] != null) { + output[name] = this.deserializer.readValue(member, dataObject[name]); + } + } + if (this.awsQueryCompatible) { + this.mixin.queryCompatOutput(dataObject, output); + } + throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message + }, output), dataObject); + } + } + + class SerdeContextConfig { + serdeContext; + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + } + + class UnionSerde { + from; + to; + keys; + constructor(from, to) { + this.from = from; + this.to = to; + const keys = Object.keys(this.from); + const set = new Set(keys); + set.delete("__type"); + this.keys = set; + } + mark(key) { + this.keys.delete(key); + } + hasUnknown() { + return this.keys.size === 1 && Object.keys(this.to).length === 0; + } + writeUnknown() { + if (this.hasUnknown()) { + const k = this.keys.values().next().value; + const v = this.from[k]; + this.to.$unknown = [k, v]; + } + } + } + var canParseBuffer; + function detectBufferParsing() { + if (canParseBuffer === undefined) { + try { + if (typeof Buffer !== "function") { + canParseBuffer = false; + } else { + const result = JSON.parse(Buffer.from([123, 125])); + canParseBuffer = result !== null && typeof result === "object"; + } + } catch { + canParseBuffer = false; + } + } + return canParseBuffer; + } + function jsonReviver(key, value, context) { + if (context?.source) { + const numericString = context.source; + if (typeof value === "number") { + const inSafeRange = value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER; + if (inSafeRange) { + if (isRepresentable(numericString, value)) { + return value; + } + return new NumericValue(numericString, "bigDecimal"); + } else { + if (isFractionalBigNumeric(numericString)) { + return new NumericValue(numericString, "bigDecimal"); + } + if (/[eE]/.test(numericString)) { + return expandExponentToBigInt(numericString); + } + return BigInt(numericString); + } + } + } + return value; + } + function isFractionalBigNumeric(s) { + const dotIndex = s.indexOf("."); + if (dotIndex === -1) { + return false; + } + const eIndex = s.search(/[eE]/); + if (eIndex === -1) { + return true; + } + const fracDigits = eIndex - dotIndex - 1; + const exp = parseInt(s.slice(eIndex + 1), 10); + return exp < fracDigits; + } + function isRepresentable(numericString, value) { + if (numericString === String(value)) { + return true; + } + if (Object.is(value, -0)) { + return true; + } + if (/[eE]/.test(numericString)) { + return expandToDecimal(numericString) === expandToDecimal(String(value)); + } + const normalized = numericString.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, ""); + const canonical = String(value); + if (normalized === canonical) { + return true; + } + if (/[eE]/.test(canonical)) { + return normalized === expandToDecimal(canonical); + } + return false; + } + function expandToDecimal(s) { + const negative = s.startsWith("-"); + const abs = negative ? s.slice(1) : s; + const eIndex = abs.search(/[eE]/); + let result; + if (eIndex === -1) { + result = abs; + } else { + const exp = parseInt(abs.slice(eIndex + 1), 10); + const mantissa = abs.slice(0, eIndex); + const dotIndex = mantissa.indexOf("."); + let digits; + let intLen; + if (dotIndex === -1) { + digits = mantissa; + intLen = mantissa.length; + } else { + digits = mantissa.slice(0, dotIndex) + mantissa.slice(dotIndex + 1); + intLen = dotIndex; + } + digits = digits.replace(/0+$/, "") || "0"; + const newDotPos = intLen + exp; + if (digits === "0") { + result = "0"; + } else if (newDotPos <= 0) { + result = "0." + "0".repeat(-newDotPos) + digits; + } else if (newDotPos >= digits.length) { + result = digits + "0".repeat(newDotPos - digits.length); + } else { + result = digits.slice(0, newDotPos) + "." + digits.slice(newDotPos); + } + } + if (result.includes(".")) { + result = result.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, ""); + } + return (negative ? "-" : "") + result; + } + function expandExponentToBigInt(s) { + const eIndex = s.search(/[eE]/); + const exp = parseInt(s.slice(eIndex + 1), 10); + const negative = s.startsWith("-"); + const mantissa = s.slice(negative ? 1 : 0, eIndex); + const dotIndex = mantissa.indexOf("."); + let digits; + let shift; + if (dotIndex === -1) { + digits = mantissa; + shift = exp; + } else { + digits = mantissa.slice(0, dotIndex) + mantissa.slice(dotIndex + 1); + const fracDigits = mantissa.length - dotIndex - 1; + shift = exp - fracDigits; + } + digits = digits.replace(/0+$/, "") || "0"; + const result = BigInt(digits) * 10n ** BigInt(shift + (mantissa.replace(".", "").length - digits.length)); + return negative ? -result : result; + } + var REVIVER_SYMBOL = Symbol.for("@aws-sdk/reviver"); + function needsReviver(schema) { + const ns = NormalizedSchema.of(schema); + const raw = ns.getSchema(); + if (Array.isArray(raw) && ns.isStructSchema()) { + if (REVIVER_SYMBOL in raw) { + return raw[REVIVER_SYMBOL]; + } + const result = _check(ns, new Set); + raw[REVIVER_SYMBOL] = result; + return result; + } + return _check(ns, new Set); + } + function _check(ns, seen) { + const raw = ns.getSchema(); + if (seen.has(raw)) { + return false; + } + seen.add(raw); + if (ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) { + return true; + } + if (ns.isStructSchema()) { + for (const [, memberSchema] of ns.structIterator()) { + if (_check(memberSchema, seen)) { + return true; + } + } + } else if (ns.isListSchema() || ns.isMapSchema()) { + if (_check(ns.getValueSchema(), seen)) { + return true; + } + } else if (ns.isDocumentSchema()) { + return true; + } + return false; + } + var collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => (context?.utf8Encoder ?? toUtf8)(body)); + async function parseJsonBody(streamBody, context, schema) { + let parsingInput; + if (detectBufferParsing() && typeof streamBody?.[Symbol.asyncIterator] === "function") { + const buffer = await collectBody(streamBody, context); + if (typeof Buffer === "function") { + if (Buffer.isBuffer(buffer)) { + parsingInput = buffer; + } else { + parsingInput = Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + } + } + if (!parsingInput) { + parsingInput = await collectBodyString(streamBody, context); + } + if (parsingInput.length === 0) { + return {}; + } + const reviver = schema && needsReviver(schema) ? jsonReviver : undefined; + try { + return JSON.parse(parsingInput, reviver); + } catch (e) { + if (e?.name === "SyntaxError") { + Object.defineProperty(e, "$responseBodyText", { + value: typeof parsingInput === "string" ? parsingInput : parsingInput.toString("utf8") + }); + } + throw e; + } + } + var parseJsonErrorBody = async (errorBody, context) => { + const value = await parseJsonBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; + }; + var findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + var sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + var loadRestJsonErrorCode = (output, data) => { + return loadErrorCode(output, data, ["header", "code", "type"]); + }; + var loadJsonRpcErrorCode = (output, data, queryCompat = false) => { + return loadErrorCode(output, data, queryCompat ? ["code", "header", "type"] : ["type", "code", "header"]); + }; + var loadErrorCode = ({ headers }, data, order) => { + while (order.length > 0) { + const location = order.shift(); + switch (location) { + case "header": + const headerKey = findKey(headers ?? {}, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(headers[headerKey]); + } + break; + case "code": + const codeKey = findKey(data ?? {}, "code"); + if (codeKey && data[codeKey] !== undefined) { + return sanitizeErrorCode(data[codeKey]); + } + break; + case "type": + if (data?.__type !== undefined) { + return sanitizeErrorCode(data.__type); + } + break; + } + } + }; + function writeKey(obj) { + Object.defineProperty(obj, "__proto__", { value: undefined, writable: true, enumerable: true, configurable: true }); + } + + class JsonShapeDeserializer2 extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + async read(schema, data) { + const reviver = needsReviver(schema) ? jsonReviver : undefined; + let parsed; + if (typeof data === "string") { + if (data.length === 0) { + return {}; + } + parsed = JSON.parse(data, reviver); + } else if (data instanceof Uint8Array && detectBufferParsing()) { + if (data.byteLength === 0) { + return {}; + } + const buf = Buffer.isBuffer(data) ? data : Buffer.from(data.buffer, data.byteOffset, data.byteLength); + parsed = JSON.parse(buf, reviver); + } else { + parsed = await parseJsonBody(data, this.serdeContext, schema); + } + return this._read(schema, parsed); + } + readObject(schema, data) { + return this._read(schema, data); + } + _read(schema, value) { + const isObject = value !== null && typeof value === "object"; + const ns = NormalizedSchema.of(schema); + if (isObject) { + if (ns.isStructSchema()) { + return this._readStruct(ns, value); + } + if (Array.isArray(value) && ns.isListSchema()) { + const listMember = ns.getValueSchema(); + if (this.needsTransform(listMember)) { + for (let i = 0;i < value.length; ++i) { + value[i] = this._read(listMember, value[i]); + } + } + return value; + } + if (ns.isMapSchema()) { + const mapMember = ns.getValueSchema(); + const map = value; + if (this.needsTransform(mapMember)) { + for (const k in map) { + if (k === "__proto__") { + writeKey(map); + } + map[k] = this._read(mapMember, map[k]); + } + } + return map; + } + } + if (ns.isBlobSchema() && typeof value === "string") { + return fromBase64(value); + } + const mediaType = ns.getMergedTraits().mediaType; + if (ns.isStringSchema() && typeof value === "string" && mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + return LazyJsonString.from(value); + } + return value; + } + if (ns.isTimestampSchema() && value != null) { + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + return parseRfc3339DateTimeWithOffset(value); + case 6: + return parseRfc7231DateTime(value); + case 7: + return parseEpochTimestamp(value); + default: + console.warn("Missing timestamp format, parsing value with Date constructor:", value); + return new Date(value); + } + } + if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) { + return BigInt(value); + } + if (ns.isBigDecimalSchema() && value != null) { + if (value instanceof NumericValue) { + return value; + } + const untyped = value; + if (untyped.type === "bigDecimal" && "string" in untyped) { + return new NumericValue(untyped.string, untyped.type); + } + return new NumericValue(String(value), "bigDecimal"); + } + if (ns.isNumericSchema() && typeof value === "string") { + switch (value) { + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + case "NaN": + return NaN; + } + return value; + } + if (ns.isDocumentSchema()) { + if (isObject) { + if (Array.isArray(value)) { + for (let i = 0;i < value.length; ++i) { + const v = value[i]; + if (!(v instanceof NumericValue)) { + value[i] = this._read(ns, v); + } + } + } else { + const doc = value; + for (const k in doc) { + if (k === "__proto__") { + writeKey(doc); + } + const v = doc[k]; + if (!(v instanceof NumericValue)) { + doc[k] = this._read(ns, v); + } + } + } + } + } + return value; + } + _readStruct(ns, record) { + const union = ns.isUnionSchema(); + const out = {}; + let nameMap; + const hasType = typeof record.__type === "string"; + const { jsonName } = this.settings; + if (jsonName && hasType) { + nameMap = {}; + } + let unionSerde; + if (union) { + unionSerde = new UnionSerde(record, out); + } + for (const [memberName, memberSchema] of ns.structIterator()) { + let fromKey = memberName; + if (jsonName) { + fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey; + if (hasType) { + nameMap[fromKey] = memberName; + } + } + if (union) { + unionSerde.mark(fromKey); + } + if (record[fromKey] != null) { + out[memberName] = this._read(memberSchema, record[fromKey]); + } + } + if (union) { + unionSerde.writeUnknown(); + } else if (hasType) { + for (const k in record) { + const v = record[k]; + const t = jsonName ? nameMap[k] ?? k : k; + if (!(t in out)) { + out[t] = v; + } + } + } + return out; + } + needsTransform(ns) { + if (ns.isBlobSchema() || ns.isTimestampSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) { + return true; + } + if (ns.isDocumentSchema() || ns.isStructSchema() || ns.isListSchema() || ns.isMapSchema()) { + return true; + } + if (ns.isStringSchema() && ns.getMergedTraits().mediaType) { + return true; + } + return false; + } + } + + class JsonBytesStringAdapter extends Uint8Array { + string = null; + static allocUnsafe(bytes) { + if (typeof Buffer === "function") { + const buffer = Buffer.allocUnsafe(bytes); + return new JsonBytesStringAdapter(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + return new JsonBytesStringAdapter(bytes); + } + toString() { + return this.s(); + } + valueOf() { + return this.s(); + } + includes(searchString, position) { + if (typeof searchString === "string") { + return this.s().includes(searchString, position); + } + return Uint8Array.prototype.includes.call(this, searchString, position); + } + indexOf(searchString, position) { + if (typeof searchString === "string") { + return this.s().indexOf(searchString, position); + } + return Uint8Array.prototype.indexOf.call(this, searchString, position); + } + lastIndexOf(searchString, position) { + if (typeof searchString === "string") { + return this.s().lastIndexOf(searchString, position); + } + const fn = Uint8Array.prototype.lastIndexOf; + if (position !== undefined) { + return fn.call(this, searchString, position); + } + return fn.call(this, searchString); + } + startsWith(searchString, position) { + return this.s().startsWith(searchString, position); + } + endsWith(searchString, endPosition) { + return this.s().endsWith(searchString, endPosition); + } + match(regexp) { + return this.s().match(regexp); + } + replace(searchValue, replaceValue) { + return this.s().replace(searchValue, replaceValue); + } + search(regexp) { + return this.s().search(regexp); + } + split(separator, limit) { + return this.s().split(separator, limit); + } + substring(start, end) { + return this.s().substring(start, end); + } + trim() { + return this.s().trim(); + } + trimStart() { + return this.s().trimStart(); + } + trimEnd() { + return this.s().trimEnd(); + } + charAt(pos) { + return this.s().charAt(pos); + } + charCodeAt(index) { + return this.s().charCodeAt(index); + } + padStart(maxLength, fillString) { + return this.s().padStart(maxLength, fillString); + } + padEnd(maxLength, fillString) { + return this.s().padEnd(maxLength, fillString); + } + repeat(count) { + return this.s().repeat(count); + } + toUpperCase() { + return this.s().toUpperCase(); + } + toLowerCase() { + return this.s().toLowerCase(); + } + s() { + if (this.string == null) { + const n = Date.now(); + if (n > warned + 60000) { + console.warn("@aws-sdk/core/protocols - WARN - JsonCodec2: you have called a string method on a Uint8Array request body. " + "It has been automatically converted to string. In a future version this will throw an error."); + warned = n; + } + this.string = toUtf8(this); + } + return this.string; + } + } + var warned = 0; + var encoder = new TextEncoder; + var OPEN_BRACE = 123; + var CLOSE_BRACE = 125; + var OPEN_BRACKET = 91; + var CLOSE_BRACKET = 93; + var QUOTE = 34; + var COLON = 58; + var COMMA = 44; + var BACKSLASH = 92; + var TRUE = new Uint8Array([116, 114, 117, 101]); + var FALSE = new Uint8Array([102, 97, 108, 115, 101]); + var NULL = new Uint8Array([110, 117, 108, 108]); + var ESCAPE_TABLE = new Array(128).fill(null); + ESCAPE_TABLE[8] = "b"; + ESCAPE_TABLE[9] = "t"; + ESCAPE_TABLE[10] = "n"; + ESCAPE_TABLE[12] = "f"; + ESCAPE_TABLE[13] = "r"; + ESCAPE_TABLE[34] = '"'; + ESCAPE_TABLE[92] = "\\"; + for (let i = 0;i < 32; i++) { + if (ESCAPE_TABLE[i] === null) { + ESCAPE_TABLE[i] = "u00" + i.toString(16).padStart(2, "0"); + } + } + var INITIAL_BUFFER_SIZE = 2048; + function alloc(size) { + return JsonBytesStringAdapter.allocUnsafe(size); + } + + class JsonShapeSerializer2 extends SerdeContextConfig { + settings; + json; + i = 0; + rootSchema; + rawValue; + passthrough = false; + constructor(settings) { + super(); + this.settings = settings; + this.json = alloc(INITIAL_BUFFER_SIZE); + } + write(schema, value) { + this.i = 0; + this.rawValue = value; + this.rootSchema = NormalizedSchema.of(schema); + this.passthrough = this.rootSchema.isBlobSchema() || this.rootSchema.isStringSchema(); + if (!this.passthrough) { + this.writeValue(this.rootSchema, value, undefined); + } + } + writeDiscriminatedDocument(schema, value) { + this.i = 0; + this.rootSchema = NormalizedSchema.of(schema); + const ns = this.rootSchema; + if (ns.isStructSchema() && value != null && typeof value === "object") { + this.writeValue(ns, value, undefined); + const prefix = `"__type":"${ns.getName(true) ?? "Unknown"}",`; + const z = prefix.length; + this.ensure(z); + this.json.copyWithin(1 + z, 1, this.i); + encoder.encodeInto(prefix, this.json.subarray(1)); + this.i += z; + } else { + this.writeValue(ns, value, undefined); + } + } + flush() { + this.rootSchema = undefined; + const finalPosition = this.i; + this.i = 0; + const raw = this.rawValue; + this.rawValue = undefined; + if (finalPosition === 0) { + return raw; + } + const result = this.json.subarray(0, finalPosition); + this.json = alloc(INITIAL_BUFFER_SIZE); + return result; + } + ensure(byteCount) { + const { i, json } = this; + if (i + byteCount > json.length) { + let newSize = json.length * 2; + while (newSize < i + byteCount) { + newSize *= 2; + } + const next = alloc(newSize); + next.set(this.json); + this.json = next; + } + } + writeAscii(s) { + const z = s.length; + this.ensure(z); + let { i, json } = this; + for (let j = 0;j < z; ++j) { + json[i] = s.charCodeAt(j); + i += 1; + } + this.i = i; + } + writeAsciiQuoted(s) { + const z = s.length; + this.ensure(z + 4); + let { json, i } = this; + json[i++] = QUOTE; + for (let j = 0;j < z; ++j) { + json[i++] = s.charCodeAt(j); + } + json[i++] = QUOTE; + this.i = i; + } + writeJsonString(s) { + this.ensure(s.length * 3 + 2); + this.json[this.i++] = QUOTE; + const z = s.length; + for (let j = 0;j < z; ++j) { + const c = s.charCodeAt(j); + if (c > 34 && c < 92) { + this.json[this.i++] = c; + } else if (c < 128) { + const esc = ESCAPE_TABLE[c]; + if (esc !== null) { + this.ensure(esc.length + 1); + this.json[this.i++] = BACKSLASH; + for (let k = 0;k < esc.length; k++) { + this.json[this.i++] = esc.charCodeAt(k); + } + } else { + this.json[this.i++] = c; + } + } else if (c >= 55296 && c <= 56319) { + const next = j + 1 < z ? s.charCodeAt(j + 1) : 0; + if (next >= 56320 && next <= 57343) { + this.ensure(4); + const { written } = encoder.encodeInto(s.substring(j, j + 2), this.json.subarray(this.i)); + this.i += written; + ++j; + } else { + this.ensure(6); + this.writeUnicodeEscape(c); + } + } else if (c >= 56320 && c <= 57343) { + this.ensure(6); + this.writeUnicodeEscape(c); + } else { + let { i, json } = this; + if (c < 2048) { + json[i++] = 192 | c >> 6; + json[i++] = 128 | c & 63; + } else { + json[i++] = 224 | c >> 12; + json[i++] = 128 | c >> 6 & 63; + json[i++] = 128 | c & 63; + } + this.i = i; + } + } + this.json[this.i++] = QUOTE; + } + writeUnicodeEscape(code) { + let { json, i } = this; + json[i++] = BACKSLASH; + json[i++] = 117; + const hex = code.toString(16).padStart(4, "0"); + for (let j = 0;j < 4; ++j) { + json[i++] = hex.charCodeAt(j); + } + this.i = i; + } + static B64 = (() => { + const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + const table = new Uint8Array(64); + for (let i = 0;i < 64; ++i) { + table[i] = chars.charCodeAt(i); + } + return table; + })(); + writeBase64(data) { + const b64Len = Math.ceil(data.length / 3) * 4; + this.ensure(b64Len + 2); + const json = this.json; + const B64 = JsonShapeSerializer2.B64; + let i = this.i; + json[i++] = QUOTE; + const len = data.length; + const remainder = len % 3; + const mainLen = len - remainder; + for (let j = 0;j < mainLen; j += 3) { + const a = data[j]; + const b = data[j + 1]; + const c = data[j + 2]; + json[i++] = B64[a >> 2]; + json[i++] = B64[(a & 3) << 4 | b >> 4]; + json[i++] = B64[(b & 15) << 2 | c >> 6]; + json[i++] = B64[c & 63]; + } + if (remainder === 2) { + const a = data[mainLen]; + const b = data[mainLen + 1]; + json[i++] = B64[a >> 2]; + json[i++] = B64[(a & 3) << 4 | b >> 4]; + json[i++] = B64[(b & 15) << 2]; + json[i++] = 61; + } else if (remainder === 1) { + const a = data[mainLen]; + json[i++] = B64[a >> 2]; + json[i++] = B64[(a & 3) << 4]; + json[i++] = 61; + json[i++] = 61; + } + json[i++] = QUOTE; + this.i = i; + } + writeValue(schema, value, container) { + if (value == null) { + if (container?.isStructSchema()) { + if (value === undefined) { + const ns = NormalizedSchema.of(schema); + if (ns.isIdempotencyToken()) { + this.writeAsciiQuoted(generateIdempotencyToken()); + return; + } + } + return; + } + this.ensure(4); + this.json.set(NULL, this.i); + this.i += 4; + return; + } + const ns = NormalizedSchema.of(schema); + const isObject = typeof value === "object"; + if (ns.isStringSchema()) { + const mediaType = ns.getMergedTraits().mediaType; + if (mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + this.writeJsonString(LazyJsonString.from(value).toString()); + return; + } + } + } + if (isObject) { + if (ns.isStructSchema()) { + this.writeStruct(ns, value); + return; + } + if (Array.isArray(value) && (ns.isListSchema() || ns.isDocumentSchema())) { + this.writeList(ns, value, ns.isDocumentSchema()); + return; + } + if (ns.isMapSchema()) { + this.writeMap(ns, value, false); + return; + } + if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) { + this.writeBase64(value); + return; + } + if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) { + this.writeTimestamp(ns, value); + return; + } + if (value instanceof NumericValue) { + this.writeAscii(value.string); + return; + } + if (ns.isDocumentSchema()) { + if (Array.isArray(value)) { + this.writeList(ns, value, true); + } else { + this.writeMap(ns, value, true); + } + return; + } + const json = JSON.stringify(value); + this.writeAscii(json); + return; + } + if (typeof value === "string") { + if (ns.isBlobSchema()) { + const b64 = (this.serdeContext?.base64Encoder ?? toBase64)(value); + this.writeAsciiQuoted(b64); + return; + } + this.writeJsonString(value); + return; + } + if (typeof value === "number") { + if (Math.abs(value) === Infinity || Number.isNaN(value)) { + this.writeAsciiQuoted(String(value)); + return; + } + const numStr = String(value); + this.writeAscii(numStr); + return; + } + if (typeof value === "boolean") { + this.ensure(5); + let { i, json } = this; + if (value) { + json.set(TRUE, i); + i += 4; + } else { + json.set(FALSE, i); + i += 5; + } + this.i = i; + return; + } + if (typeof value === "bigint") { + this.writeAscii(value.toString()); + return; + } + this.writeAscii(String(value)); + } + writeStruct(ns, value) { + this.ensure(2); + this.json[this.i++] = OPEN_BRACE; + let wroteAny = false; + const hasType = typeof value.__type === "string"; + let writtenKeys; + if (hasType) { + writtenKeys = new Set; + } + for (const [memberName, memberSchema] of ns.structIterator()) { + const item = value[memberName]; + if (item == null && !memberSchema.isIdempotencyToken()) { + continue; + } + if (wroteAny) { + this.ensure(1); + this.json[this.i++] = COMMA; + } + wroteAny = true; + const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; + if (writtenKeys) { + writtenKeys.add(memberName); + writtenKeys.add(targetKey); + } + this.writeAsciiQuoted(targetKey); + this.json[this.i++] = COLON; + this.writeValue(memberSchema, item, ns); + } + if (!wroteAny && ns.isUnionSchema()) { + const { $unknown } = value; + if (Array.isArray($unknown)) { + const [k, v] = $unknown; + this.writeAsciiQuoted(k); + this.ensure(1); + this.json[this.i++] = COLON; + this.writeValue(15, v, ns); + } + } else if (hasType) { + for (const k in value) { + if (writtenKeys.has(k)) { + continue; + } + writtenKeys.add(k); + const v = value[k]; + if (wroteAny) { + this.ensure(1); + this.json[this.i++] = COMMA; + } + wroteAny = true; + this.writeAsciiQuoted(k); + this.ensure(1); + this.json[this.i++] = COLON; + this.writeValue(15, v, undefined); + } + } + this.ensure(1); + this.json[this.i++] = CLOSE_BRACE; + } + writeList(ns, value, isDocument) { + const sparse = !!ns.getMergedTraits().sparse; + const valueSchema = ns.getValueSchema(); + if (!isDocument) { + if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) { + let hasSpecials = false; + for (let i = 0;i < value.length; ++i) { + const v = value[i]; + if (Number.isNaN(v) || v === Infinity || v === -Infinity || v == null && !sparse) { + hasSpecials = true; + break; + } + } + let json; + if (!hasSpecials) { + json = JSON.stringify(value); + } else { + const out = []; + for (let i = 0;i < value.length; ++i) { + const v = value[i]; + if (v == null && !sparse) + continue; + if (Number.isNaN(v) || v === Infinity || v === -Infinity) { + out.push(String(v)); + } else { + out.push(v); + } + } + json = JSON.stringify(out); + } + this.ensure(json.length * 3); + this.i += encoder.encodeInto(json, this.json.subarray(this.i)).written; + return; + } + } + this.ensure(2); + this.json[this.i++] = OPEN_BRACKET; + let wroteFirstItem = false; + for (let i = 0;i < value.length; ++i) { + const item = value[i]; + if (isDocument ? item === undefined : item == null && !sparse) { + continue; + } + if (wroteFirstItem) { + this.ensure(1); + this.json[this.i++] = COMMA; + } + this.writeValue(valueSchema, item, undefined); + wroteFirstItem = true; + } + this.ensure(1); + this.json[this.i++] = CLOSE_BRACKET; + } + writeMap(ns, value, isDocument) { + const sparse = !!ns.getMergedTraits().sparse; + const valueSchema = ns.getValueSchema(); + if (!isDocument) { + if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) { + let modifications; + for (const k in value) { + const v = value[k]; + if (Number.isNaN(v) || v === Infinity || v === -Infinity) { + (modifications ??= {})[k] = v; + value[k] = String(v); + } else if (v === null && !sparse) { + (modifications ??= {})[k] = null; + value[k] = undefined; + } + } + const json = JSON.stringify(value); + if (modifications) { + Object.assign(value, modifications); + } + this.ensure(json.length * 3); + this.i += encoder.encodeInto(json, this.json.subarray(this.i)).written; + return; + } + } + this.ensure(2); + this.json[this.i++] = OPEN_BRACE; + let first = true; + for (const k in value) { + const v = value[k]; + if (isDocument ? v === undefined : v == null && !sparse) { + continue; + } + if (!first) { + this.ensure(1); + this.json[this.i++] = COMMA; + } + first = false; + this.writeJsonString(k); + this.ensure(1); + this.json[this.i++] = COLON; + this.writeValue(valueSchema, v, undefined); + } + this.ensure(1); + this.json[this.i++] = CLOSE_BRACE; + } + writeTimestamp(ns, value) { + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: { + const iso = value.toISOString().replace(".000Z", "Z"); + this.writeAsciiQuoted(iso); + return; + } + case 6: { + this.writeAsciiQuoted(dateToUtcString(value)); + return; + } + case 7: { + const epochSecs = String(value.getTime() / 1000); + this.writeAscii(epochSecs); + return; + } + default: { + const epochSecs = String(value.getTime() / 1000); + this.writeAscii(epochSecs); + return; + } + } + } + } + + class JsonCodec2 extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + createSerializer() { + const serializer = new JsonShapeSerializer2(this.settings); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new JsonShapeDeserializer2(this.settings); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + } + + class AwsJsonRpcProtocol extends RpcProtocol { + serializer; + deserializer; + serviceTarget; + codec; + mixin; + awsQueryCompatible; + constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec }) { + super({ + defaultNamespace, + errorTypeRegistries + }); + this.serviceTarget = serviceTarget; + this.codec = jsonCodec ?? new JsonCodec2({ + timestampFormat: { + useTrait: true, + default: 7 + }, + jsonName: false + }); + this.serializer = this.codec.createSerializer(); + this.deserializer = this.codec.createDeserializer(); + this.awsQueryCompatible = !!awsQueryCompatible; + this.mixin = new ProtocolLib(this.awsQueryCompatible); + } + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + if (!request.path.endsWith("/")) { + request.path += "/"; + } + request.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`; + request.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`; + if (this.awsQueryCompatible) { + request.headers["x-amzn-query-mode"] = "true"; + } + if (deref(operationSchema.input) === "unit" || !request.body) { + request.body = "{}"; + } + return request; + } + getPayloadCodec() { + return this.codec; + } + async handleError(operationSchema, context, response, dataObject, metadata) { + const { awsQueryCompatible } = this; + if (awsQueryCompatible) { + this.mixin.setQueryCompatError(dataObject, response); + } + const errorIdentifier = loadJsonRpcErrorCode(response, dataObject, awsQueryCompatible) ?? "Unknown"; + this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined); + const ns = NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "UnknownError"; + const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor({}); + const output = {}; + const errorDeserializer = this.codec.createDeserializer(); + for (const [name, member] of ns.structIterator()) { + if (dataObject[name] != null) { + output[name] = errorDeserializer.readObject(member, dataObject[name]); + } + } + if (awsQueryCompatible) { + this.mixin.queryCompatOutput(dataObject, output); + } + throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message + }, output), dataObject); + } + } + + class AwsJson1_0Protocol extends AwsJsonRpcProtocol { + constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec }) { + super({ + defaultNamespace, + errorTypeRegistries, + serviceTarget, + awsQueryCompatible, + jsonCodec + }); + } + getShapeId() { + return "aws.protocols#awsJson1_0"; + } + getJsonRpcVersion() { + return "1.0"; + } + getDefaultContentType() { + return "application/x-amz-json-1.0"; + } + } + + class AwsJson1_1Protocol extends AwsJsonRpcProtocol { + constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec }) { + super({ + defaultNamespace, + errorTypeRegistries, + serviceTarget, + awsQueryCompatible, + jsonCodec + }); + } + getShapeId() { + return "aws.protocols#awsJson1_1"; + } + getJsonRpcVersion() { + return "1.1"; + } + getDefaultContentType() { + return "application/x-amz-json-1.1"; + } + } + + class AwsRestJsonProtocol extends HttpBindingProtocol { + serializer; + deserializer; + codec; + mixin = new ProtocolLib; + constructor({ defaultNamespace, errorTypeRegistries, jsonCodec }) { + super({ + defaultNamespace, + errorTypeRegistries + }); + const settings = { + timestampFormat: { + useTrait: true, + default: 7 + }, + httpBindings: true, + jsonName: true + }; + this.codec = jsonCodec ?? new JsonCodec2(settings); + this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); + } + getShapeId() { + return "aws.protocols#restJson1"; + } + getPayloadCodec() { + return this.codec; + } + setSerdeContext(serdeContext) { + this.codec.setSerdeContext(serdeContext); + super.setSerdeContext(serdeContext); + } + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + const inputSchema = NormalizedSchema.of(operationSchema.input); + if (!request.headers["content-type"]) { + const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema); + if (contentType) { + request.headers["content-type"] = contentType; + } + } + if (request.body == null && request.headers["content-type"] === this.getDefaultContentType()) { + request.body = "{}"; + } + return request; + } + async deserializeResponse(operationSchema, context, response) { + const output = await super.deserializeResponse(operationSchema, context, response); + const outputSchema = NormalizedSchema.of(operationSchema.output); + for (const [name, member] of outputSchema.structIterator()) { + if (member.getMemberTraits().httpPayload && !(name in output)) { + output[name] = null; + } + } + return output; + } + async handleError(operationSchema, context, response, dataObject, metadata) { + const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; + this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); + const ns = NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "UnknownError"; + const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor({}); + await this.deserializeHttpMessage(errorSchema, context, response, dataObject); + const output = {}; + const errorDeserializer = this.codec.createDeserializer(); + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().jsonName ?? name; + output[name] = errorDeserializer.readObject(member, dataObject[target]); + } + throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message + }, output), dataObject); + } + getDefaultContentType() { + return "application/json"; + } + } + + class JsonShapeDeserializer extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + async read(schema, data) { + const reviver = needsReviver(schema) ? jsonReviver : undefined; + return this._read(schema, typeof data === "string" ? JSON.parse(data, reviver) : await parseJsonBody(data, this.serdeContext, schema)); + } + readObject(schema, data) { + return this._read(schema, data); + } + _read(schema, value) { + const isObject = value !== null && typeof value === "object"; + const ns = NormalizedSchema.of(schema); + if (isObject) { + if (ns.isStructSchema()) { + const record = value; + const union = ns.isUnionSchema(); + const out = {}; + let nameMap = undefined; + const { jsonName } = this.settings; + if (jsonName) { + nameMap = {}; + } + let unionSerde; + if (union) { + unionSerde = new UnionSerde(record, out); + } + for (const [memberName, memberSchema] of ns.structIterator()) { + let fromKey = memberName; + if (jsonName) { + fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey; + nameMap[fromKey] = memberName; + } + if (union) { + unionSerde.mark(fromKey); + } + if (record[fromKey] != null) { + out[memberName] = this._read(memberSchema, record[fromKey]); + } + } + if (union) { + unionSerde.writeUnknown(); + } else if (typeof record.__type === "string") { + for (const k in record) { + const v = record[k]; + const t = jsonName ? nameMap[k] ?? k : k; + if (!(t in out)) { + out[t] = v; + } + } + } + return out; + } + if (Array.isArray(value) && ns.isListSchema()) { + const listMember = ns.getValueSchema(); + const out = []; + for (const item of value) { + out.push(this._read(listMember, item)); + } + return out; + } + if (ns.isMapSchema()) { + const mapMember = ns.getValueSchema(); + const out = {}; + for (const _k in value) { + if (_k === "__proto__") { + writeKey(out); + } + out[_k] = this._read(mapMember, value[_k]); + } + return out; + } + } + if (ns.isBlobSchema() && typeof value === "string") { + return fromBase64(value); + } + const mediaType = ns.getMergedTraits().mediaType; + if (ns.isStringSchema() && typeof value === "string" && mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + return LazyJsonString.from(value); + } + return value; + } + if (ns.isTimestampSchema() && value != null) { + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + return parseRfc3339DateTimeWithOffset(value); + case 6: + return parseRfc7231DateTime(value); + case 7: + return parseEpochTimestamp(value); + default: + console.warn("Missing timestamp format, parsing value with Date constructor:", value); + return new Date(value); + } + } + if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) { + return BigInt(value); + } + if (ns.isBigDecimalSchema() && value != null) { + if (value instanceof NumericValue) { + return value; + } + const untyped = value; + if (untyped.type === "bigDecimal" && "string" in untyped) { + return new NumericValue(untyped.string, untyped.type); + } + return new NumericValue(String(value), "bigDecimal"); + } + if (ns.isNumericSchema() && typeof value === "string") { + switch (value) { + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + case "NaN": + return NaN; + } + return value; + } + if (ns.isDocumentSchema()) { + if (isObject) { + const out = Array.isArray(value) ? [] : {}; + for (const k in value) { + if (k === "__proto__") { + writeKey(out); + } + const v = value[k]; + if (v instanceof NumericValue) { + out[k] = v; + } else { + out[k] = this._read(ns, v); + } + } + return out; + } else { + return structuredClone(value); + } + } + return value; + } + } + var NUMERIC_CONTROL_CHAR = String.fromCharCode(925); + + class JsonReplacer { + values = new Map; + counter = 0; + stage = 0; + createReplacer() { + if (this.stage === 1) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer already created."); + } + if (this.stage === 2) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted."); + } + this.stage = 1; + return (key, value) => { + if (value instanceof NumericValue) { + const v = `${NUMERIC_CONTROL_CHAR + "nv" + this.counter++}_` + value.string; + this.values.set(`"${v}"`, value.string); + return v; + } + if (typeof value === "bigint") { + const s = value.toString(); + const v = `${NUMERIC_CONTROL_CHAR + "b" + this.counter++}_` + s; + this.values.set(`"${v}"`, s); + return v; + } + return value; + }; + } + replaceInJson(json) { + if (this.stage === 0) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet."); + } + if (this.stage === 2) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted."); + } + this.stage = 2; + if (this.counter === 0) { + return json; + } + for (const [key, value] of this.values) { + json = json.replace(key, value); + } + return json; + } + } + + class JsonShapeSerializer extends SerdeContextConfig { + settings; + buffer; + useReplacer = false; + rootSchema; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + this.rootSchema = NormalizedSchema.of(schema); + this.buffer = this._write(this.rootSchema, value); + } + flush() { + const { rootSchema, useReplacer } = this; + this.rootSchema = undefined; + this.useReplacer = false; + if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) { + if (!useReplacer) { + return JSON.stringify(this.buffer); + } + const replacer = new JsonReplacer; + return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0)); + } + return this.buffer; + } + writeDiscriminatedDocument(schema, value) { + this.write(schema, value); + if (typeof this.buffer === "object") { + this.buffer.__type = NormalizedSchema.of(schema).getName(true); + } + } + _write(schema, value, container) { + const isObject = value !== null && typeof value === "object"; + const ns = NormalizedSchema.of(schema); + if (isObject) { + if (ns.isStructSchema()) { + const record = value; + const out = {}; + const { jsonName } = this.settings; + let nameMap = undefined; + if (jsonName) { + nameMap = {}; + } + let outCount = 0; + for (const [memberName, memberSchema] of ns.structIterator()) { + const serializableValue = this._write(memberSchema, record[memberName], ns); + if (serializableValue !== undefined) { + let targetKey = memberName; + if (jsonName) { + targetKey = memberSchema.getMergedTraits().jsonName ?? memberName; + nameMap[memberName] = targetKey; + } + out[targetKey] = serializableValue; + outCount++; + } + } + if (ns.isUnionSchema() && outCount === 0) { + const { $unknown } = record; + if (Array.isArray($unknown)) { + const [k, v] = $unknown; + if (k === "__proto__") { + writeKey(out); + } + out[k] = this._write(15, v); + } + } else if (typeof record.__type === "string") { + for (const k in record) { + const v = record[k]; + const targetKey = jsonName ? nameMap[k] ?? k : k; + if (!(targetKey in out)) { + out[targetKey] = this._write(15, v); + } + } + } + return out; + } + if (Array.isArray(value) && ns.isListSchema()) { + const listMember = ns.getValueSchema(); + const out = []; + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + if (sparse || item != null) { + out.push(this._write(listMember, item)); + } + } + return out; + } + if (ns.isMapSchema()) { + const mapMember = ns.getValueSchema(); + const out = {}; + const sparse = !!ns.getMergedTraits().sparse; + for (const _k in value) { + const _v = value[_k]; + if (sparse || _v != null) { + if (_k === "__proto__") { + writeKey(out); + } + out[_k] = this._write(mapMember, _v); + } + } + return out; + } + if (value instanceof Uint8Array && ns.isBlobSchema()) { + if (ns === this.rootSchema) { + return value; + } + return (this.serdeContext?.base64Encoder ?? toBase64)(value); + } + if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) { + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + return value.toISOString().replace(".000Z", "Z"); + case 6: + return dateToUtcString(value); + case 7: + return value.getTime() / 1000; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + return value.getTime() / 1000; + } + } + if (value instanceof NumericValue) { + this.useReplacer = true; + } + } + if (value === null && container?.isStructSchema()) { + return; + } + if (ns.isStringSchema()) { + if (typeof value === "undefined" && ns.isIdempotencyToken()) { + return generateIdempotencyToken(); + } + const mediaType = ns.getMergedTraits().mediaType; + if (value != null && mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + return LazyJsonString.from(value); + } + } + return value; + } + if (typeof value === "number") { + if (Math.abs(value) === Infinity || isNaN(value)) { + return String(value); + } + return value; + } + if (typeof value === "string" && ns.isBlobSchema()) { + if (ns === this.rootSchema) { + return value; + } + return (this.serdeContext?.base64Encoder ?? toBase64)(value); + } + if (typeof value === "bigint") { + this.useReplacer = true; + } + if (ns.isDocumentSchema()) { + if (isObject) { + if (value instanceof Uint8Array) { + return (this.serdeContext?.base64Encoder ?? toBase64)(value); + } + const out = Array.isArray(value) ? [] : {}; + for (const k in value) { + const v = value[k]; + if (k === "__proto__") { + writeKey(out); + } + if (v instanceof NumericValue) { + this.useReplacer = true; + out[k] = v; + } else { + out[k] = this._write(ns, v); + } + } + return out; + } else { + return structuredClone(value); + } + } + return value; + } + } + + class JsonCodec extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + createSerializer() { + const serializer = new JsonShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new JsonShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + } + + class XmlShapeDeserializer extends SerdeContextConfig { + settings; + stringDeserializer; + constructor(settings) { + super(); + this.settings = settings; + this.stringDeserializer = new FromStringShapeDeserializer(settings); + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.stringDeserializer.setSerdeContext(serdeContext); + } + read(schema, bytes, key) { + const ns = NormalizedSchema.of(schema); + const memberSchemas = ns.getMemberSchemas(); + const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => { + return !!memberNs.getMemberTraits().eventPayload; + }); + if (isEventPayload) { + const output = {}; + const memberName = Object.keys(memberSchemas)[0]; + const eventMemberSchema = memberSchemas[memberName]; + if (eventMemberSchema.isBlobSchema()) { + output[memberName] = bytes; + } else { + output[memberName] = this.read(memberSchemas[memberName], bytes); + } + return output; + } + const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes); + const parsedObject = this.parseXml(xmlString); + return this.readSchema(schema, key ? parsedObject[key] : parsedObject); + } + readSchema(_schema, value) { + const ns = NormalizedSchema.of(_schema); + if (ns.isUnitSchema()) { + return; + } + const traits = ns.getMergedTraits(); + if (ns.isListSchema() && !Array.isArray(value)) { + return this.readSchema(ns, [value]); + } + if (value == null) { + return value; + } + if (typeof value === "object") { + const flat = !!traits.xmlFlattened; + if (ns.isListSchema()) { + const listValue = ns.getValueSchema(); + const buffer = []; + const sourceKey = listValue.getMergedTraits().xmlName ?? "member"; + const source = flat ? value : (value[0] ?? value)[sourceKey]; + if (source == null) { + return buffer; + } + const sourceArray = Array.isArray(source) ? source : [source]; + for (const v of sourceArray) { + buffer.push(this.readSchema(listValue, v)); + } + return buffer; + } + const buffer = {}; + if (ns.isMapSchema()) { + const keyNs = ns.getKeySchema(); + const memberNs = ns.getValueSchema(); + let entries; + if (flat) { + entries = Array.isArray(value) ? value : [value]; + } else { + entries = Array.isArray(value.entry) ? value.entry : [value.entry]; + } + const keyProperty = keyNs.getMergedTraits().xmlName ?? "key"; + const valueProperty = memberNs.getMergedTraits().xmlName ?? "value"; + for (const entry of entries) { + const key = entry[keyProperty]; + const value = entry[valueProperty]; + if (key === "__proto__") { + writeKey(buffer); + } + buffer[key] = this.readSchema(memberNs, value); + } + return buffer; + } + if (ns.isStructSchema()) { + const union = ns.isUnionSchema(); + let unionSerde; + if (union) { + unionSerde = new UnionSerde(value, buffer); + } + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMergedTraits(); + const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName(); + if (union) { + unionSerde.mark(xmlObjectKey); + } + if (value[xmlObjectKey] != null) { + buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]); + } + } + if (union) { + unionSerde.writeUnknown(); + } + return buffer; + } + if (ns.isDocumentSchema()) { + return value; + } + throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`); + } + if (ns.isListSchema()) { + return []; + } + if (ns.isMapSchema() || ns.isStructSchema()) { + return {}; + } + return this.stringDeserializer.read(ns, value); + } + parseXml(xml) { + if (xml.length) { + let parsedObj; + try { + parsedObj = parseXML(xml); + } catch (e) { + if (e && typeof e === "object") { + Object.defineProperty(e, "$responseBodyText", { + value: xml + }); + } + throw e; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return getValueFromTextNode(parsedObjToReturn); + } + return {}; + } + } + + class QueryShapeSerializer extends SerdeContextConfig { + settings; + buffer; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value, prefix = "") { + if (this.buffer === undefined) { + this.buffer = ""; + } + const ns = NormalizedSchema.of(schema); + if (prefix && !prefix.endsWith(".")) { + prefix += "."; + } + if (ns.isBlobSchema()) { + if (typeof value === "string" || value instanceof Uint8Array) { + this.writeKey(prefix); + this.writeValue((this.serdeContext?.base64Encoder ?? toBase64)(value)); + } + } else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) { + if (value != null) { + this.writeKey(prefix); + this.writeValue(String(value)); + } else if (ns.isIdempotencyToken()) { + this.writeKey(prefix); + this.writeValue(generateIdempotencyToken()); + } + } else if (ns.isBigIntegerSchema()) { + if (value != null) { + this.writeKey(prefix); + this.writeValue(String(value)); + } + } else if (ns.isBigDecimalSchema()) { + if (value != null) { + this.writeKey(prefix); + this.writeValue(value instanceof NumericValue ? value.string : String(value)); + } + } else if (ns.isTimestampSchema()) { + if (value instanceof Date) { + this.writeKey(prefix); + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + this.writeValue(value.toISOString().replace(".000Z", "Z")); + break; + case 6: + this.writeValue(dateToUtcString(value)); + break; + case 7: + this.writeValue(String(value.getTime() / 1000)); + break; + } + } + } else if (ns.isDocumentSchema()) { + if (Array.isArray(value)) { + this.write(64 | 15, value, prefix); + } else if (value instanceof Date) { + this.write(4, value, prefix); + } else if (value instanceof Uint8Array) { + this.write(21, value, prefix); + } else if (value && typeof value === "object") { + this.write(128 | 15, value, prefix); + } else { + this.writeKey(prefix); + this.writeValue(String(value)); + } + } else if (ns.isListSchema()) { + if (Array.isArray(value)) { + if (value.length === 0) { + if (this.settings.serializeEmptyLists) { + this.writeKey(prefix); + this.writeValue(""); + } + } else { + const member = ns.getValueSchema(); + const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened; + let i = 1; + for (const item of value) { + if (item == null) { + continue; + } + const traits = member.getMergedTraits(); + const suffix = this.getKey("member", traits.xmlName, traits.ec2QueryName); + const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`; + this.write(member, item, key); + ++i; + } + } + } + } else if (ns.isMapSchema()) { + if (value && typeof value === "object") { + const keySchema = ns.getKeySchema(); + const memberSchema = ns.getValueSchema(); + const flat = ns.getMergedTraits().xmlFlattened; + let i = 1; + for (const k in value) { + const v = value[k]; + if (v == null) { + continue; + } + const keyTraits = keySchema.getMergedTraits(); + const keySuffix = this.getKey("key", keyTraits.xmlName, keyTraits.ec2QueryName); + const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`; + const valTraits = memberSchema.getMergedTraits(); + const valueSuffix = this.getKey("value", valTraits.xmlName, valTraits.ec2QueryName); + const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`; + this.write(keySchema, k, key); + this.write(memberSchema, v, valueKey); + ++i; + } + } + } else if (ns.isStructSchema()) { + if (value && typeof value === "object") { + let didWriteMember = false; + for (const [memberName, member] of ns.structIterator()) { + if (value[memberName] == null && !member.isIdempotencyToken()) { + continue; + } + const traits = member.getMergedTraits(); + const suffix = this.getKey(memberName, traits.xmlName, traits.ec2QueryName, "struct"); + const key = `${prefix}${suffix}`; + this.write(member, value[memberName], key); + didWriteMember = true; + } + if (!didWriteMember && ns.isUnionSchema()) { + const { $unknown } = value; + if (Array.isArray($unknown)) { + const [k, v] = $unknown; + const key = `${prefix}${k}`; + this.write(15, v, key); + } + } + } + } else if (ns.isUnitSchema()) + ; + else { + throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`); + } + } + flush() { + if (this.buffer === undefined) { + throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer."); + } + const str = this.buffer; + delete this.buffer; + return str; + } + getKey(memberName, xmlName, ec2QueryName, keySource) { + const { ec2, capitalizeKeys } = this.settings; + if (ec2 && ec2QueryName) { + return ec2QueryName; + } + const key = xmlName ?? memberName; + if (capitalizeKeys && keySource === "struct") { + return key[0].toUpperCase() + key.slice(1); + } + return key; + } + writeKey(key) { + if (key.endsWith(".")) { + key = key.slice(0, key.length - 1); + } + this.buffer += `&${extendedEncodeURIComponent(key)}=`; + } + writeValue(value) { + this.buffer += extendedEncodeURIComponent(value); + } + } + + class AwsQueryProtocol extends RpcProtocol { + options; + serializer; + deserializer; + mixin = new ProtocolLib; + constructor(options) { + super({ + defaultNamespace: options.defaultNamespace, + errorTypeRegistries: options.errorTypeRegistries + }); + this.options = options; + const settings = { + timestampFormat: { + useTrait: true, + default: 5 + }, + httpBindings: false, + xmlNamespace: options.xmlNamespace, + serviceNamespace: options.defaultNamespace, + serializeEmptyLists: true + }; + this.serializer = new QueryShapeSerializer(settings); + this.deserializer = new XmlShapeDeserializer(settings); + } + getShapeId() { + return "aws.protocols#awsQuery"; + } + setSerdeContext(serdeContext) { + this.serializer.setSerdeContext(serdeContext); + this.deserializer.setSerdeContext(serdeContext); + } + getPayloadCodec() { + throw new Error("AWSQuery protocol has no payload codec."); + } + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + if (!request.path.endsWith("/")) { + request.path += "/"; + } + request.headers["content-type"] = "application/x-www-form-urlencoded"; + if (deref(operationSchema.input) === "unit" || !request.body) { + request.body = ""; + } + const action = operationSchema.name.split("#")[1] ?? operationSchema.name; + request.body = `Action=${action}&Version=${this.options.version}` + request.body; + if (request.body.endsWith("&")) { + request.body = request.body.slice(-1); + } + return request; + } + async deserializeResponse(operationSchema, context, response) { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes = await collectBody(response.body, context); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(15, bytes)); + } + await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response)); + } + for (const header in response.headers) { + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name; + const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : undefined; + const bytes = await collectBody(response.body, context); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey)); + } + dataObject.$metadata = this.deserializeMetadata(response); + return dataObject; + } + useNestedResult() { + return true; + } + async handleError(operationSchema, context, response, dataObject, metadata) { + const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown"; + this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace); + const errorData = this.loadQueryError(dataObject) ?? {}; + const message = this.loadQueryErrorMessage(dataObject); + errorData.message = message; + errorData.Error = { + Type: errorData.Type, + Code: errorData.Code, + Message: message + }; + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError); + const ns = NormalizedSchema.of(errorSchema); + const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor({}); + const output = { + Type: errorData.Error.Type, + Code: errorData.Error.Code, + Error: errorData.Error + }; + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().xmlName ?? name; + const value = errorData[target] ?? dataObject[target]; + output[name] = this.deserializer.readSchema(member, value); + } + throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message + }, output), dataObject); + } + loadQueryErrorCode(output, data) { + const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code; + if (code !== undefined) { + return code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + } + loadQueryError(data) { + return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error; + } + loadQueryErrorMessage(data) { + const errorData = this.loadQueryError(data); + return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown"; + } + getDefaultContentType() { + return "application/x-www-form-urlencoded"; + } + } + + class AwsEc2QueryProtocol extends AwsQueryProtocol { + options; + constructor(options) { + super(options); + this.options = options; + const ec2Settings = { + capitalizeKeys: true, + flattenLists: true, + serializeEmptyLists: false, + ec2: true + }; + Object.assign(this.serializer.settings, ec2Settings); + } + getShapeId() { + return "aws.protocols#ec2Query"; + } + useNestedResult() { + return false; + } + } + var parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + let parsedObj; + try { + parsedObj = parseXML(encoded); + } catch (e) { + if (e && typeof e === "object") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded + }); + } + throw e; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return getValueFromTextNode(parsedObjToReturn); + } + return {}; + }); + var parseXmlErrorBody = async (errorBody, context) => { + const value = await parseXmlBody(errorBody, context); + if (value.Error) { + value.Error.message = value.Error.message ?? value.Error.Message; + } + return value; + }; + var loadRestXmlErrorCode = (output, data) => { + if (data?.Error?.Code !== undefined) { + return data.Error.Code; + } + if (data?.Code !== undefined) { + return data.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + }; + + class XmlShapeSerializer extends SerdeContextConfig { + settings; + stringBuffer; + byteBuffer; + buffer; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + if (ns.isStringSchema() && typeof value === "string") { + this.stringBuffer = value; + } else if (ns.isBlobSchema()) { + this.byteBuffer = "byteLength" in value ? value : (this.serdeContext?.base64Decoder ?? fromBase64)(value); + } else { + this.buffer = this.writeStruct(ns, value, undefined); + const traits = ns.getMergedTraits(); + if (traits.httpPayload && !traits.xmlName) { + this.buffer.withName(ns.getName()); + } + } + } + flush() { + if (this.byteBuffer !== undefined) { + const bytes = this.byteBuffer; + delete this.byteBuffer; + return bytes; + } + if (this.stringBuffer !== undefined) { + const str = this.stringBuffer; + delete this.stringBuffer; + return str; + } + const buffer = this.buffer; + if (this.settings.xmlNamespace) { + if (!buffer?.attributes?.["xmlns"]) { + buffer.addAttribute("xmlns", this.settings.xmlNamespace); + } + } + delete this.buffer; + return buffer.toString(); + } + writeStruct(ns, value, parentXmlns) { + const traits = ns.getMergedTraits(); + const name = ns.isMemberSchema() && !traits.httpPayload ? ns.getMemberTraits().xmlName ?? ns.getMemberName() : traits.xmlName ?? ns.getName(); + if (!name || !ns.isStructSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`); + } + const structXmlNode = XmlNode.of(name); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + for (const [memberName, memberSchema] of ns.structIterator()) { + const val = value[memberName]; + if (val != null || memberSchema.isIdempotencyToken()) { + if (memberSchema.getMergedTraits().xmlAttribute) { + structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val)); + continue; + } + if (memberSchema.isListSchema()) { + this.writeList(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isMapSchema()) { + this.writeMap(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isStructSchema()) { + structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns)); + } else { + const memberNode = XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName()); + this.writeSimpleInto(memberSchema, val, memberNode, xmlns); + structXmlNode.addChildNode(memberNode); + } + } + } + const { $unknown } = value; + if ($unknown && ns.isUnionSchema() && Array.isArray($unknown) && Object.keys(value).length === 1) { + const [k, v] = $unknown; + const node = XmlNode.of(k); + if (typeof v !== "string") { + if (value instanceof XmlNode || value instanceof XmlText) { + structXmlNode.addChildNode(value); + } else { + throw new Error(`@aws-sdk - $unknown union member in XML requires ` + `value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`); + } + } + this.writeSimpleInto(0, v, node, xmlns); + structXmlNode.addChildNode(node); + } + if (xmlns) { + structXmlNode.addAttribute(xmlnsAttr, xmlns); + } + return structXmlNode; + } + writeList(listMember, array, container, parentXmlns) { + if (!listMember.isMemberSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`); + } + const listTraits = listMember.getMergedTraits(); + const listValueSchema = listMember.getValueSchema(); + const listValueTraits = listValueSchema.getMergedTraits(); + const sparse = !!listValueTraits.sparse; + const flat = !!listTraits.xmlFlattened; + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns); + const writeItem = (container, value) => { + if (listValueSchema.isListSchema()) { + this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container, xmlns); + } else if (listValueSchema.isMapSchema()) { + this.writeMap(listValueSchema, value, container, xmlns); + } else if (listValueSchema.isStructSchema()) { + const struct = this.writeStruct(listValueSchema, value, xmlns); + container.addChildNode(struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member")); + } else { + const listItemNode = XmlNode.of(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member"); + this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns); + container.addChildNode(listItemNode); + } + }; + if (flat) { + for (const value of array) { + if (sparse || value != null) { + writeItem(container, value); + } + } + } else { + const listNode = XmlNode.of(listTraits.xmlName ?? listMember.getMemberName()); + if (xmlns) { + listNode.addAttribute(xmlnsAttr, xmlns); + } + for (const value of array) { + if (sparse || value != null) { + writeItem(listNode, value); + } + } + container.addChildNode(listNode); + } + } + writeMap(mapMember, map, container, parentXmlns, containerIsMap = false) { + if (!mapMember.isMemberSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`); + } + const mapTraits = mapMember.getMergedTraits(); + const mapKeySchema = mapMember.getKeySchema(); + const mapKeyTraits = mapKeySchema.getMergedTraits(); + const keyTag = mapKeyTraits.xmlName ?? "key"; + const mapValueSchema = mapMember.getValueSchema(); + const mapValueTraits = mapValueSchema.getMergedTraits(); + const valueTag = mapValueTraits.xmlName ?? "value"; + const sparse = !!mapValueTraits.sparse; + const flat = !!mapTraits.xmlFlattened; + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns); + const addKeyValue = (entry, key, val) => { + const keyNode = XmlNode.of(keyTag, key); + const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns); + if (keyXmlns) { + keyNode.addAttribute(keyXmlnsAttr, keyXmlns); + } + entry.addChildNode(keyNode); + let valueNode = XmlNode.of(valueTag); + if (mapValueSchema.isListSchema()) { + this.writeList(mapValueSchema, val, valueNode, xmlns); + } else if (mapValueSchema.isMapSchema()) { + this.writeMap(mapValueSchema, val, valueNode, xmlns, true); + } else if (mapValueSchema.isStructSchema()) { + valueNode = this.writeStruct(mapValueSchema, val, xmlns); + } else { + this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns); + } + entry.addChildNode(valueNode); + }; + if (flat) { + for (const key in map) { + const val = map[key]; + if (sparse || val != null) { + const entry = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + addKeyValue(entry, key, val); + container.addChildNode(entry); + } + } + } else { + let mapNode; + if (!containerIsMap) { + mapNode = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + if (xmlns) { + mapNode.addAttribute(xmlnsAttr, xmlns); + } + container.addChildNode(mapNode); + } + for (const key in map) { + const val = map[key]; + if (sparse || val != null) { + const entry = XmlNode.of("entry"); + addKeyValue(entry, key, val); + (containerIsMap ? container : mapNode).addChildNode(entry); + } + } + } + } + writeSimple(_schema, value) { + if (value === null) { + throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value."); + } + const ns = NormalizedSchema.of(_schema); + let nodeContents = null; + if (value && typeof value === "object") { + if (ns.isBlobSchema()) { + nodeContents = (this.serdeContext?.base64Encoder ?? toBase64)(value); + } else if (ns.isTimestampSchema() && value instanceof Date) { + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + nodeContents = value.toISOString().replace(".000Z", "Z"); + break; + case 6: + nodeContents = dateToUtcString(value); + break; + case 7: + nodeContents = String(value.getTime() / 1000); + break; + default: + console.warn("Missing timestamp format, using http date", value); + nodeContents = dateToUtcString(value); + break; + } + } else if (ns.isBigDecimalSchema() && value) { + if (value instanceof NumericValue) { + return value.string; + } + return String(value); + } else if (ns.isMapSchema() || ns.isListSchema()) { + throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."); + } else { + throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`); + } + } + if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) { + nodeContents = String(value); + } + if (ns.isStringSchema()) { + if (value === undefined && ns.isIdempotencyToken()) { + nodeContents = generateIdempotencyToken(); + } else { + nodeContents = String(value); + } + } + if (nodeContents === null) { + throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`); + } + return nodeContents; + } + writeSimpleInto(_schema, value, into, parentXmlns) { + const nodeContents = this.writeSimple(_schema, value); + const ns = NormalizedSchema.of(_schema); + const content = new XmlText(nodeContents); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + if (xmlns) { + into.addAttribute(xmlnsAttr, xmlns); + } + into.addChildNode(content); + } + getXmlnsAttribute(ns, parentXmlns) { + const traits = ns.getMergedTraits(); + const [prefix, xmlns] = traits.xmlNamespace ?? []; + if (xmlns && xmlns !== parentXmlns) { + return [prefix ? `xmlns:${prefix}` : "xmlns", xmlns]; + } + return [undefined, undefined]; + } + } + + class XmlCodec extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + createSerializer() { + const serializer = new XmlShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new XmlShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + } + + class AwsRestXmlProtocol extends HttpBindingProtocol { + codec; + serializer; + deserializer; + mixin = new ProtocolLib; + constructor(options) { + super(options); + const settings = { + timestampFormat: { + useTrait: true, + default: 5 + }, + httpBindings: true, + xmlNamespace: options.xmlNamespace, + serviceNamespace: options.defaultNamespace + }; + this.codec = new XmlCodec(settings); + this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); + } + getPayloadCodec() { + return this.codec; + } + getShapeId() { + return "aws.protocols#restXml"; + } + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + const inputSchema = NormalizedSchema.of(operationSchema.input); + if (!request.headers["content-type"]) { + const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema); + if (contentType) { + request.headers["content-type"] = contentType; + } + } + if (typeof request.body === "string" && request.headers["content-type"] === this.getDefaultContentType() && !request.body.startsWith("' + request.body; + } + return request; + } + async deserializeResponse(operationSchema, context, response) { + return super.deserializeResponse(operationSchema, context, response); + } + async handleError(operationSchema, context, response, dataObject, metadata) { + const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown"; + this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace); + if (dataObject.Error && typeof dataObject.Error === "object") { + for (const key of Object.keys(dataObject.Error)) { + dataObject[key] = dataObject.Error[key]; + if (key.toLowerCase() === "message") { + dataObject.message = dataObject.Error[key]; + } + } + } + if (dataObject.RequestId && !metadata.requestId) { + metadata.requestId = dataObject.RequestId; + } + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); + const ns = NormalizedSchema.of(errorSchema); + const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "UnknownError"; + const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor({}); + await this.deserializeHttpMessage(errorSchema, context, response, dataObject); + const output = {}; + const errorDeserializer = this.codec.createDeserializer(); + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().xmlName ?? name; + const value = dataObject.Error?.[target] ?? dataObject[target]; + output[name] = errorDeserializer.readSchema(member, value); + } + throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message + }, output), dataObject); + } + getDefaultContentType() { + return "application/xml"; + } + hasUnstructuredPayloadBinding(ns) { + for (const [, member] of ns.structIterator()) { + if (member.getMergedTraits().httpPayload) { + return !(member.isStructSchema() || member.isMapSchema() || member.isListSchema()); + } + } + return false; + } + } + var awsExpectUnion = (value) => { + if (value == null) { + return; + } + if (typeof value === "object" && "__type" in value) { + delete value.__type; + } + return expectUnion(value); + }; + var _toStr = (val) => { + if (val == null) { + return val; + } + if (typeof val === "number" || typeof val === "bigint") { + const warning = new Error(`Received number ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + if (typeof val === "boolean") { + const warning = new Error(`Received boolean ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + return val; + }; + var _toBool = (val) => { + if (val == null) { + return val; + } + if (typeof val === "string") { + const lowercase = val.toLowerCase(); + if (val !== "" && lowercase !== "false" && lowercase !== "true") { + const warning = new Error(`Received string "${val}" where a boolean was expected.`); + warning.name = "Warning"; + console.warn(warning); + } + return val !== "" && lowercase !== "false"; + } + return val; + }; + var _toNum = (val) => { + if (val == null) { + return val; + } + if (typeof val === "string") { + const num = Number(val); + if (num.toString() !== val) { + const warning = new Error(`Received string "${val}" where a number was expected.`); + warning.name = "Warning"; + console.warn(warning); + return val; + } + return num; + } + return val; + }; + exports.AwsEc2QueryProtocol = AwsEc2QueryProtocol; + exports.AwsJson1_0Protocol = AwsJson1_0Protocol; + exports.AwsJson1_1Protocol = AwsJson1_1Protocol; + exports.AwsJsonRpcProtocol = AwsJsonRpcProtocol; + exports.AwsQueryProtocol = AwsQueryProtocol; + exports.AwsRestJsonProtocol = AwsRestJsonProtocol; + exports.AwsRestXmlProtocol = AwsRestXmlProtocol; + exports.AwsSmithyRpcV2CborProtocol = AwsSmithyRpcV2CborProtocol; + exports.JsonCodec = JsonCodec; + exports.JsonCodec2 = JsonCodec2; + exports.JsonShapeDeserializer = JsonShapeDeserializer; + exports.JsonShapeDeserializer2 = JsonShapeDeserializer2; + exports.JsonShapeSerializer = JsonShapeSerializer; + exports.JsonShapeSerializer2 = JsonShapeSerializer2; + exports.QueryShapeSerializer = QueryShapeSerializer; + exports.XmlCodec = XmlCodec; + exports.XmlShapeDeserializer = XmlShapeDeserializer; + exports.XmlShapeSerializer = XmlShapeSerializer; + exports._toBool = _toBool; + exports._toNum = _toNum; + exports._toStr = _toStr; + exports.awsExpectUnion = awsExpectUnion; + exports.loadJsonRpcErrorCode = loadJsonRpcErrorCode; + exports.loadRestJsonErrorCode = loadRestJsonErrorCode; + exports.loadRestXmlErrorCode = loadRestXmlErrorCode; + exports.parseJsonBody = parseJsonBody; + exports.parseJsonErrorBody = parseJsonErrorBody; + exports.parseXmlBody = parseXmlBody; + exports.parseXmlErrorBody = parseXmlErrorBody; +}); + +// node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/submodules/s3/index.js +var require_s3 = __commonJS(function(exports) { + var { NoOpLogger, getSmithyContext } = require_client(); + var { HttpRequest, HttpResponse } = require_protocols(); + var { parseRfc7231DateTime } = require_serde(); + var { SignatureV4SignWithCredentials } = require_dist_cjs4(); + var { booleanSelector, SelectorType } = require_config(); + var { setFeature } = require_client2(); + var { httpSigningMiddlewareOptions } = require_dist_cjs2(); + var { Readable } = __require("node:stream"); + var { validate, parse } = require_util(); + var { AwsRestXmlProtocol } = require_protocols2(); + var { NormalizedSchema } = require_schema(); + var CONTENT_LENGTH_HEADER = "content-length"; + var DECODED_CONTENT_LENGTH_HEADER = "x-amz-decoded-content-length"; + function checkContentLengthHeader() { + return (next, context) => async (args) => { + const { request } = args; + if (HttpRequest.isInstance(request)) { + if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) { + const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`; + if (typeof context?.logger?.warn === "function" && !(context.logger instanceof NoOpLogger)) { + context.logger.warn(message); + } else { + console.warn(message); + } + } + } + return next({ ...args }); + }; + } + var checkContentLengthHeaderMiddlewareOptions = { + step: "finalizeRequest", + tags: ["CHECK_CONTENT_LENGTH_HEADER"], + name: "getCheckContentLengthHeaderPlugin", + override: true + }; + var getCheckContentLengthHeaderPlugin = (unused) => ({ + applyToStack: (clientStack) => { + clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions); + } + }); + var regionRedirectEndpointMiddleware = (config) => { + return (next, context) => async (args) => { + const originalRegion = await config.region(); + const regionProviderRef = config.region; + let unlock = () => {}; + if (context.__s3RegionRedirect) { + Object.defineProperty(config, "region", { + writable: false, + value: async () => { + return context.__s3RegionRedirect; + } + }); + unlock = () => Object.defineProperty(config, "region", { + writable: true, + value: regionProviderRef + }); + } + try { + const result = await next(args); + if (context.__s3RegionRedirect) { + unlock(); + const region = await config.region(); + if (originalRegion !== region) { + throw new Error("Region was not restored following S3 region redirect."); + } + } + return result; + } catch (e) { + unlock(); + throw e; + } + }; + }; + var regionRedirectEndpointMiddlewareOptions = { + tags: ["REGION_REDIRECT", "S3"], + name: "regionRedirectEndpointMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware" + }; + function regionRedirectMiddleware(clientConfig) { + return (next, context) => async (args) => { + try { + return await next(args); + } catch (err) { + if (clientConfig.followRegionRedirects) { + const statusCode = err?.$metadata?.httpStatusCode; + const isHeadBucket = context.commandName === "HeadBucketCommand"; + const bucketRegionHeader = err?.$response?.headers?.["x-amz-bucket-region"]; + if (bucketRegionHeader) { + if (statusCode === 301 || statusCode === 400 && (err?.name === "IllegalLocationConstraintException" || isHeadBucket)) { + try { + const actualRegion = bucketRegionHeader; + context.logger?.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`); + context.__s3RegionRedirect = actualRegion; + } catch (e) { + throw new Error("Region redirect failed: " + e); + } + return next(args); + } + } + } + throw err; + } + }; + } + var regionRedirectMiddlewareOptions = { + step: "initialize", + tags: ["REGION_REDIRECT", "S3"], + name: "regionRedirectMiddleware", + override: true + }; + var getRegionRedirectMiddlewarePlugin = (clientConfig) => ({ + applyToStack: (clientStack) => { + clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions); + clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions); + } + }); + + class S3ExpressIdentityCache { + data; + lastPurgeTime = Date.now(); + static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS = 30000; + constructor(data = {}) { + this.data = data; + } + get(key) { + const entry = this.data[key]; + if (!entry) { + return; + } + return entry; + } + set(key, entry) { + this.data[key] = entry; + return entry; + } + delete(key) { + delete this.data[key]; + } + async purgeExpired() { + const now = Date.now(); + if (this.lastPurgeTime + S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) { + return; + } + for (const key in this.data) { + const entry = this.data[key]; + if (!entry.isRefreshing) { + const credential = await entry.identity; + if (credential.expiration) { + if (credential.expiration.getTime() < now) { + delete this.data[key]; + } + } + } + } + } + } + + class S3ExpressIdentityCacheEntry { + _identity; + isRefreshing; + accessed; + constructor(_identity, isRefreshing = false, accessed = Date.now()) { + this._identity = _identity; + this.isRefreshing = isRefreshing; + this.accessed = accessed; + } + get identity() { + this.accessed = Date.now(); + return this._identity; + } + } + + class S3ExpressIdentityProviderImpl { + createSessionFn; + cache; + static REFRESH_WINDOW_MS = 60000; + constructor(createSessionFn, cache = new S3ExpressIdentityCache) { + this.createSessionFn = createSessionFn; + this.cache = cache; + } + async getS3ExpressIdentity(awsIdentity, identityProperties) { + const key = identityProperties.Bucket; + const { cache } = this; + const entry = cache.get(key); + if (entry) { + return entry.identity.then((identity) => { + const isExpired = (identity.expiration?.getTime() ?? 0) < Date.now(); + if (isExpired) { + return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; + } + const isExpiringSoon = (identity.expiration?.getTime() ?? 0) < Date.now() + S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS; + if (isExpiringSoon && !entry.isRefreshing) { + entry.isRefreshing = true; + this.getIdentity(key).then((id) => { + cache.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id))); + }); + } + return identity; + }); + } + return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; + } + async getIdentity(key) { + await this.cache.purgeExpired().catch((error) => { + console.warn(`Error while clearing expired entries in S3ExpressIdentityCache: +` + error); + }); + const session = await this.createSessionFn(key); + if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) { + throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey."); + } + const identity = { + accessKeyId: session.Credentials.AccessKeyId, + secretAccessKey: session.Credentials.SecretAccessKey, + sessionToken: session.Credentials.SessionToken, + expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : undefined + }; + return identity; + } + } + var resolveS3Config = (input, { session }) => { + const [s3ClientProvider, CreateSessionCommandCtor] = session; + const { forcePathStyle, useAccelerateEndpoint, disableMultiregionAccessPoints, followRegionRedirects, s3ExpressIdentityProvider, bucketEndpoint, expectContinueHeader } = input; + return Object.assign(input, { + forcePathStyle: forcePathStyle ?? false, + useAccelerateEndpoint: useAccelerateEndpoint ?? false, + disableMultiregionAccessPoints: disableMultiregionAccessPoints ?? false, + followRegionRedirects: followRegionRedirects ?? false, + s3ExpressIdentityProvider: s3ExpressIdentityProvider ?? new S3ExpressIdentityProviderImpl(async (key) => s3ClientProvider().send(new CreateSessionCommandCtor({ + Bucket: key + }))), + bucketEndpoint: bucketEndpoint ?? false, + expectContinueHeader: expectContinueHeader ?? 2097152 + }); + }; + var s3ExpiresMiddleware = (config) => { + return (next, context) => async (args) => { + const result = await next(args); + const { response } = result; + if (HttpResponse.isInstance(response)) { + if (response.headers.expires) { + response.headers.expiresstring = response.headers.expires; + try { + parseRfc7231DateTime(response.headers.expires); + } catch (e) { + context.logger?.warn(`AWS SDK Warning for ${context.clientName}::${context.commandName} response parsing (${response.headers.expires}): ${e}`); + delete response.headers.expires; + } + } + } + return result; + }; + }; + var s3ExpiresMiddlewareOptions = { + tags: ["S3"], + name: "s3ExpiresMiddleware", + override: true, + relation: "after", + toMiddleware: "deserializerMiddleware" + }; + var getS3ExpiresMiddlewarePlugin = (clientConfig) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(s3ExpiresMiddleware(), s3ExpiresMiddlewareOptions); + } + }); + + class SignatureV4S3Express extends SignatureV4SignWithCredentials { + } + var S3_EXPRESS_BUCKET_TYPE = "Directory"; + var S3_EXPRESS_BACKEND = "S3Express"; + var S3_EXPRESS_AUTH_SCHEME = "sigv4-s3express"; + var SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token"; + var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase(); + var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH"; + var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = "s3_disable_express_session_auth"; + var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = { + environmentVariableSelector: (env) => booleanSelector(env, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, SelectorType.CONFIG), + default: false + }; + var s3ExpressMiddleware = (options) => { + return (next, context) => async (args) => { + if (context.endpointV2) { + const endpoint = context.endpointV2; + const isS3ExpressAuth = endpoint.properties?.authSchemes?.[0]?.name === S3_EXPRESS_AUTH_SCHEME; + const isS3ExpressBucket = endpoint.properties?.backend === S3_EXPRESS_BACKEND || endpoint.properties?.bucketType === S3_EXPRESS_BUCKET_TYPE; + if (isS3ExpressBucket) { + setFeature(context, "S3_EXPRESS_BUCKET", "J"); + context.isS3ExpressBucket = true; + } + if (isS3ExpressAuth) { + const requestBucket = args.input.Bucket; + if (requestBucket) { + const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(await options.credentials(), { + Bucket: requestBucket + }); + context.s3ExpressIdentity = s3ExpressIdentity; + if (HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) { + args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken; + } + } + } + } + return next(args); + }; + }; + var s3ExpressMiddlewareOptions = { + name: "s3ExpressMiddleware", + step: "build", + tags: ["S3", "S3_EXPRESS"], + override: true + }; + var getS3ExpressPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions); + } + }); + var signS3Express = async (s3ExpressIdentity, signingOptions, request, sigV4MultiRegionSigner) => { + const signedRequest = await sigV4MultiRegionSigner.signWithCredentials(request, s3ExpressIdentity, {}); + if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) { + throw new Error("X-Amz-Security-Token must not be set for s3-express requests."); + } + return signedRequest; + }; + var defaultErrorHandler = (signingProperties) => (error) => { + throw error; + }; + var defaultSuccessHandler = (httpResponse, signingProperties) => {}; + var s3ExpressHttpSigningMiddlewareOptions = httpSigningMiddlewareOptions; + var s3ExpressHttpSigningMiddleware = (config) => (next, context) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = getSmithyContext(context); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme; + let request; + if (context.s3ExpressIdentity) { + request = await signS3Express(context.s3ExpressIdentity, signingProperties, args.request, await config.signer()); + } else { + request = await signer.sign(args.request, identity, signingProperties); + } + const output = await next({ + ...args, + request + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; + }; + var getS3ExpressHttpSigningPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(s3ExpressHttpSigningMiddleware(config), httpSigningMiddlewareOptions); + } + }); + function toStream(bytes) { + return Readable.from(Buffer.from(bytes)); + } + var THROW_IF_EMPTY_BODY = { + CopyObjectCommand: true, + UploadPartCopyCommand: true, + CompleteMultipartUploadCommand: true + }; + var throw200ExceptionsMiddleware = (config) => (next, context) => async (args) => { + const result = await next(args); + const { response } = result; + if (!HttpResponse.isInstance(response)) { + return result; + } + const { statusCode, body } = response; + if (statusCode < 200 || statusCode >= 300) { + return result; + } + const bodyBytes = await collectBody(body, config); + response.body = toStream(bodyBytes); + if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) { + const err = new Error("S3 aborted request"); + err.$metadata = { + httpStatusCode: 503 + }; + err.name = "InternalError"; + throw err; + } + const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16)); + if (bodyStringTail && bodyStringTail.endsWith("")) { + response.statusCode = 503; + } + return result; + }; + var collectBody = (streamBody = new Uint8Array, context) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array); + }; + var throw200ExceptionsMiddlewareOptions = { + relation: "after", + toMiddleware: "deserializerMiddleware", + tags: ["THROW_200_EXCEPTIONS", "S3"], + name: "throw200ExceptionsMiddleware", + override: true + }; + var getThrow200ExceptionsPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(throw200ExceptionsMiddleware(config), throw200ExceptionsMiddlewareOptions); + } + }); + function bucketEndpointMiddleware$1(options) { + return (next, context) => async (args) => { + if (options.bucketEndpoint) { + const endpoint = context.endpointV2; + if (endpoint) { + const bucket = args.input.Bucket; + if (typeof bucket === "string") { + try { + const bucketEndpointUrl = new URL(bucket); + context.endpointV2 = { + ...endpoint, + url: bucketEndpointUrl + }; + } catch (e) { + const warning = `@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${bucket} could not be parsed as URL.`; + if (context.logger?.constructor?.name === "NoOpLogger") { + console.warn(warning); + } else { + context.logger?.warn?.(warning); + } + throw e; + } + } + } + } + return next(args); + }; + } + var bucketEndpointMiddlewareOptions$1 = { + name: "bucketEndpointMiddleware", + override: true, + relation: "after", + toMiddleware: "endpointV2Middleware" + }; + function validateBucketNameMiddleware({ bucketEndpoint }) { + return (next) => async (args) => { + const { input: { Bucket } } = args; + if (!bucketEndpoint && typeof Bucket === "string" && !validate(Bucket) && Bucket.indexOf("/") >= 0) { + const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`); + err.name = "InvalidBucketName"; + throw err; + } + return next({ ...args }); + }; + } + var validateBucketNameMiddlewareOptions = { + step: "initialize", + tags: ["VALIDATE_BUCKET_NAME"], + name: "validateBucketNameMiddleware", + override: true + }; + var getValidateBucketNamePlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(validateBucketNameMiddleware(options), validateBucketNameMiddlewareOptions); + clientStack.addRelativeTo(bucketEndpointMiddleware$1(options), bucketEndpointMiddlewareOptions$1); + } + }); + + class S3RestXmlProtocol extends AwsRestXmlProtocol { + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + const ns = NormalizedSchema.of(operationSchema.input); + const staticStructureSchema = ns.getSchema(); + let bucketMemberIndex = 0; + const requiredMemberCount = staticStructureSchema[6] ?? 0; + if (input && typeof input === "object") { + for (const [memberName, memberNs] of ns.structIterator()) { + if (++bucketMemberIndex > requiredMemberCount) { + break; + } + if (memberName === "Bucket") { + if (!input.Bucket && memberNs.getMergedTraits().httpLabel) { + throw new Error(`No value provided for input HTTP label: Bucket.`); + } + break; + } + } + } + return request; + } + } + var NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME = "AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS"; + var NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME = "s3_disable_multiregion_access_points"; + var NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => booleanSelector(env, NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME, SelectorType.CONFIG), + default: false + }; + var NODE_USE_ARN_REGION_ENV_NAME = "AWS_S3_USE_ARN_REGION"; + var NODE_USE_ARN_REGION_INI_NAME = "s3_use_arn_region"; + var NODE_USE_ARN_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => booleanSelector(env, NODE_USE_ARN_REGION_ENV_NAME, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, NODE_USE_ARN_REGION_INI_NAME, SelectorType.CONFIG), + default: undefined + }; + var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; + var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; + var DOTS_PATTERN = /\.\./; + var DOT_PATTERN = /\./; + var S3_HOSTNAME_PATTERN = /^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./; + var S3_US_EAST_1_ALTNAME_PATTERN = /^s3(-external-1)?\.amazonaws\.com$/; + var AWS_PARTITION_SUFFIX = "amazonaws.com"; + var isBucketNameOptions = (options) => typeof options.bucketName === "string"; + var isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName); + var getRegionalSuffix = (hostname) => { + const parts = hostname.match(S3_HOSTNAME_PATTERN); + return [parts[4], hostname.replace(new RegExp(`^${parts[0]}`), "")]; + }; + var getSuffix = (hostname) => S3_US_EAST_1_ALTNAME_PATTERN.test(hostname) ? ["us-east-1", AWS_PARTITION_SUFFIX] : getRegionalSuffix(hostname); + var getSuffixForArnEndpoint = (hostname) => S3_US_EAST_1_ALTNAME_PATTERN.test(hostname) ? [hostname.replace(`.${AWS_PARTITION_SUFFIX}`, ""), AWS_PARTITION_SUFFIX] : getRegionalSuffix(hostname); + var validateArnEndpointOptions = (options) => { + if (options.pathStyleEndpoint) { + throw new Error("Path-style S3 endpoint is not supported when bucket is an ARN"); + } + if (options.accelerateEndpoint) { + throw new Error("Accelerate endpoint is not supported when bucket is an ARN"); + } + if (!options.tlsCompatible) { + throw new Error("HTTPS is required when bucket is an ARN"); + } + }; + var validateService = (service) => { + if (service !== "s3" && service !== "s3-outposts" && service !== "s3-object-lambda") { + throw new Error("Expect 's3' or 's3-outposts' or 's3-object-lambda' in ARN service component"); + } + }; + var validateS3Service = (service) => { + if (service !== "s3") { + throw new Error("Expect 's3' in Accesspoint ARN service component"); + } + }; + var validateOutpostService = (service) => { + if (service !== "s3-outposts") { + throw new Error("Expect 's3-posts' in Outpost ARN service component"); + } + }; + var validatePartition = (partition, options) => { + if (partition !== options.clientPartition) { + throw new Error(`Partition in ARN is incompatible, got "${partition}" but expected "${options.clientPartition}"`); + } + }; + var validateRegion = (region, options) => {}; + var validateRegionalClient = (region) => { + if (["s3-external-1", "aws-global"].includes(region)) { + throw new Error(`Client region ${region} is not regional`); + } + }; + var validateAccountId = (accountId) => { + if (!/[0-9]{12}/.exec(accountId)) { + throw new Error("Access point ARN accountID does not match regex '[0-9]{12}'"); + } + }; + var validateDNSHostLabel = (label, options = { tlsCompatible: true }) => { + if (label.length >= 64 || !/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(label) || /(\d+\.){3}\d+/.test(label) || /[.-]{2}/.test(label) || options?.tlsCompatible && DOT_PATTERN.test(label)) { + throw new Error(`Invalid DNS label ${label}`); + } + }; + var validateCustomEndpoint = (options) => { + if (options.isCustomEndpoint) { + if (options.dualstackEndpoint) + throw new Error("Dualstack endpoint is not supported with custom endpoint"); + if (options.accelerateEndpoint) + throw new Error("Accelerate endpoint is not supported with custom endpoint"); + } + }; + var getArnResources = (resource) => { + const delimiter = resource.includes(":") ? ":" : "/"; + const [resourceType, ...rest] = resource.split(delimiter); + if (resourceType === "accesspoint") { + if (rest.length !== 1 || rest[0] === "") { + throw new Error(`Access Point ARN should have one resource accesspoint${delimiter}{accesspointname}`); + } + return { accesspointName: rest[0] }; + } else if (resourceType === "outpost") { + if (!rest[0] || rest[1] !== "accesspoint" || !rest[2] || rest.length !== 3) { + throw new Error(`Outpost ARN should have resource outpost${delimiter}{outpostId}${delimiter}accesspoint${delimiter}{accesspointName}`); + } + const [outpostId, _, accesspointName] = rest; + return { outpostId, accesspointName }; + } else { + throw new Error(`ARN resource should begin with 'accesspoint${delimiter}' or 'outpost${delimiter}'`); + } + }; + var validateNoDualstack = (dualstackEndpoint) => {}; + var validateNoFIPS = (useFipsEndpoint) => { + if (useFipsEndpoint) + throw new Error(`FIPS region is not supported with Outpost.`); + }; + var validateMrapAlias = (name) => { + try { + name.split(".").forEach((label) => { + validateDNSHostLabel(label); + }); + } catch (e) { + throw new Error(`"${name}" is not a DNS compatible name.`); + } + }; + var bucketHostname = (options) => { + validateCustomEndpoint(options); + return isBucketNameOptions(options) ? getEndpointFromBucketName(options) : getEndpointFromArn(options); + }; + var getEndpointFromBucketName = ({ accelerateEndpoint = false, clientRegion: region, baseHostname, bucketName, dualstackEndpoint = false, fipsEndpoint = false, pathStyleEndpoint = false, tlsCompatible = true, isCustomEndpoint = false }) => { + const [clientRegion, hostnameSuffix] = isCustomEndpoint ? [region, baseHostname] : getSuffix(baseHostname); + if (pathStyleEndpoint || !isDnsCompatibleBucketName(bucketName) || tlsCompatible && DOT_PATTERN.test(bucketName)) { + return { + bucketEndpoint: false, + hostname: dualstackEndpoint ? `s3.dualstack.${clientRegion}.${hostnameSuffix}` : baseHostname + }; + } + if (accelerateEndpoint) { + baseHostname = `s3-accelerate${dualstackEndpoint ? ".dualstack" : ""}.${hostnameSuffix}`; + } else if (dualstackEndpoint) { + baseHostname = `s3.dualstack.${clientRegion}.${hostnameSuffix}`; + } + return { + bucketEndpoint: true, + hostname: `${bucketName}.${baseHostname}` + }; + }; + var getEndpointFromArn = (options) => { + const { isCustomEndpoint, baseHostname, clientRegion } = options; + const hostnameSuffix = isCustomEndpoint ? baseHostname : getSuffixForArnEndpoint(baseHostname)[1]; + const { pathStyleEndpoint, accelerateEndpoint = false, fipsEndpoint = false, tlsCompatible = true, bucketName, clientPartition = "aws" } = options; + validateArnEndpointOptions({ pathStyleEndpoint, accelerateEndpoint, tlsCompatible }); + const { service, partition, accountId, region, resource } = bucketName; + validateService(service); + validatePartition(partition, { clientPartition }); + validateAccountId(accountId); + const { accesspointName, outpostId } = getArnResources(resource); + if (service === "s3-object-lambda") { + return getEndpointFromObjectLambdaArn({ ...options, tlsCompatible, bucketName, accesspointName, hostnameSuffix }); + } + if (region === "") { + return getEndpointFromMRAPArn({ ...options, mrapAlias: accesspointName, hostnameSuffix }); + } + if (outpostId) { + return getEndpointFromOutpostArn({ ...options, clientRegion, outpostId, accesspointName, hostnameSuffix }); + } + return getEndpointFromAccessPointArn({ ...options, clientRegion, accesspointName, hostnameSuffix }); + }; + var getEndpointFromObjectLambdaArn = ({ dualstackEndpoint = false, fipsEndpoint = false, tlsCompatible = true, useArnRegion, clientRegion, clientSigningRegion = clientRegion, accesspointName, bucketName, hostnameSuffix }) => { + const { accountId, region, service } = bucketName; + validateRegionalClient(clientRegion); + const DNSHostLabel = `${accesspointName}-${accountId}`; + validateDNSHostLabel(DNSHostLabel, { tlsCompatible }); + const endpointRegion = useArnRegion ? region : clientRegion; + const signingRegion = useArnRegion ? region : clientSigningRegion; + return { + bucketEndpoint: true, + hostname: `${DNSHostLabel}.${service}${fipsEndpoint ? "-fips" : ""}.${endpointRegion}.${hostnameSuffix}`, + signingRegion, + signingService: service + }; + }; + var getEndpointFromMRAPArn = ({ disableMultiregionAccessPoints, dualstackEndpoint = false, isCustomEndpoint, mrapAlias, hostnameSuffix }) => { + if (disableMultiregionAccessPoints === true) { + throw new Error("SDK is attempting to use a MRAP ARN. Please enable to feature."); + } + validateMrapAlias(mrapAlias); + return { + bucketEndpoint: true, + hostname: `${mrapAlias}${isCustomEndpoint ? "" : `.accesspoint.s3-global`}.${hostnameSuffix}`, + signingRegion: "*" + }; + }; + var getEndpointFromOutpostArn = ({ useArnRegion, clientRegion, clientSigningRegion = clientRegion, bucketName, outpostId, dualstackEndpoint = false, fipsEndpoint = false, tlsCompatible = true, accesspointName, isCustomEndpoint, hostnameSuffix }) => { + validateRegionalClient(clientRegion); + const DNSHostLabel = `${accesspointName}-${bucketName.accountId}`; + validateDNSHostLabel(DNSHostLabel, { tlsCompatible }); + const endpointRegion = useArnRegion ? bucketName.region : clientRegion; + const signingRegion = useArnRegion ? bucketName.region : clientSigningRegion; + validateOutpostService(bucketName.service); + validateDNSHostLabel(outpostId, { tlsCompatible }); + validateNoFIPS(fipsEndpoint); + const hostnamePrefix = `${DNSHostLabel}.${outpostId}`; + return { + bucketEndpoint: true, + hostname: `${hostnamePrefix}${isCustomEndpoint ? "" : `.s3-outposts.${endpointRegion}`}.${hostnameSuffix}`, + signingRegion, + signingService: "s3-outposts" + }; + }; + var getEndpointFromAccessPointArn = ({ useArnRegion, clientRegion, clientSigningRegion = clientRegion, bucketName, dualstackEndpoint = false, fipsEndpoint = false, tlsCompatible = true, accesspointName, isCustomEndpoint, hostnameSuffix }) => { + validateRegionalClient(clientRegion); + const hostnamePrefix = `${accesspointName}-${bucketName.accountId}`; + validateDNSHostLabel(hostnamePrefix, { tlsCompatible }); + const endpointRegion = useArnRegion ? bucketName.region : clientRegion; + const signingRegion = useArnRegion ? bucketName.region : clientSigningRegion; + validateS3Service(bucketName.service); + return { + bucketEndpoint: true, + hostname: `${hostnamePrefix}${isCustomEndpoint ? "" : `.s3-accesspoint${fipsEndpoint ? "-fips" : ""}${dualstackEndpoint ? ".dualstack" : ""}.${endpointRegion}`}.${hostnameSuffix}`, + signingRegion + }; + }; + var bucketEndpointMiddleware = (options) => (next, context) => async (args) => { + const { Bucket: bucketName } = args.input; + let replaceBucketInPath = options.bucketEndpoint; + const request = args.request; + if (HttpRequest.isInstance(request)) { + if (options.bucketEndpoint) { + request.hostname = bucketName; + } else if (validate(bucketName)) { + const bucketArn = parse(bucketName); + const clientRegion = await options.region(); + const useDualstackEndpoint = await options.useDualstackEndpoint(); + const useFipsEndpoint = await options.useFipsEndpoint(); + const { partition, signingRegion = clientRegion } = await options.regionInfoProvider(clientRegion, { useDualstackEndpoint, useFipsEndpoint }) || {}; + const useArnRegion = await options.useArnRegion(); + const { hostname, bucketEndpoint, signingRegion: modifiedSigningRegion, signingService } = bucketHostname({ + bucketName: bucketArn, + baseHostname: request.hostname, + accelerateEndpoint: options.useAccelerateEndpoint, + dualstackEndpoint: useDualstackEndpoint, + fipsEndpoint: useFipsEndpoint, + pathStyleEndpoint: options.forcePathStyle, + tlsCompatible: request.protocol === "https:", + useArnRegion, + clientPartition: partition, + clientSigningRegion: signingRegion, + clientRegion, + isCustomEndpoint: options.isCustomEndpoint, + disableMultiregionAccessPoints: await options.disableMultiregionAccessPoints() + }); + if (modifiedSigningRegion && modifiedSigningRegion !== signingRegion) { + context["signing_region"] = modifiedSigningRegion; + } + if (signingService && signingService !== "s3") { + context["signing_service"] = signingService; + } + request.hostname = hostname; + replaceBucketInPath = bucketEndpoint; + } else { + const clientRegion = await options.region(); + const dualstackEndpoint = await options.useDualstackEndpoint(); + const fipsEndpoint = await options.useFipsEndpoint(); + const { hostname, bucketEndpoint } = bucketHostname({ + bucketName, + clientRegion, + baseHostname: request.hostname, + accelerateEndpoint: options.useAccelerateEndpoint, + dualstackEndpoint, + fipsEndpoint, + pathStyleEndpoint: options.forcePathStyle, + tlsCompatible: request.protocol === "https:", + isCustomEndpoint: options.isCustomEndpoint + }); + request.hostname = hostname; + replaceBucketInPath = bucketEndpoint; + } + if (replaceBucketInPath) { + request.path = request.path.replace(/^(\/)?[^\/]+/, ""); + if (request.path === "") { + request.path = "/"; + } + } + } + return next({ ...args, request }); + }; + var bucketEndpointMiddlewareOptions = { + tags: ["BUCKET_ENDPOINT"], + name: "bucketEndpointMiddleware", + relation: "before", + toMiddleware: "hostHeaderMiddleware", + override: true + }; + var getBucketEndpointPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions); + } + }); + function resolveBucketEndpointConfig(input) { + const { bucketEndpoint = false, forcePathStyle = false, useAccelerateEndpoint = false, useArnRegion, disableMultiregionAccessPoints = false } = input; + return Object.assign(input, { + bucketEndpoint, + forcePathStyle, + useAccelerateEndpoint, + useArnRegion: typeof useArnRegion === "function" ? useArnRegion : () => Promise.resolve(useArnRegion), + disableMultiregionAccessPoints: typeof disableMultiregionAccessPoints === "function" ? disableMultiregionAccessPoints : () => Promise.resolve(disableMultiregionAccessPoints) + }); + } + function addExpectContinueMiddleware(options) { + return (next) => async (args) => { + const { request } = args; + if (options.expectContinueHeader !== false && HttpRequest.isInstance(request) && request.body && options.runtime === "node" && options.requestHandler?.constructor?.name !== "FetchHttpHandler") { + let sendHeader = true; + if (typeof options.expectContinueHeader === "number") { + try { + const bodyLength = Number(request.headers?.["content-length"]) ?? options.bodyLengthChecker?.(request.body) ?? Infinity; + sendHeader = bodyLength >= options.expectContinueHeader; + } catch (e) {} + } else { + sendHeader = !!options.expectContinueHeader; + } + if (sendHeader) { + request.headers.Expect = "100-continue"; + } + } + return next({ + ...args, + request + }); + }; + } + var addExpectContinueMiddlewareOptions = { + step: "build", + tags: ["SET_EXPECT_HEADER", "EXPECT_HEADER"], + name: "addExpectContinueMiddleware", + override: true + }; + var getAddExpectContinuePlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions); + } + }); + function locationConstraintMiddleware(options) { + return (next) => async (args) => { + const { CreateBucketConfiguration } = args.input; + const region = await options.region(); + if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) { + if (region !== "us-east-1") { + args.input.CreateBucketConfiguration = args.input.CreateBucketConfiguration ?? {}; + args.input.CreateBucketConfiguration.LocationConstraint = region; + } + } + return next(args); + }; + } + var locationConstraintMiddlewareOptions = { + step: "initialize", + tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"], + name: "locationConstraintMiddleware", + override: true + }; + var getLocationConstraintPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.add(locationConstraintMiddleware(config), locationConstraintMiddlewareOptions); + } + }); + function resolveLocationConstraintConfig(input) { + return input; + } + function ssecMiddleware(options) { + return (next) => async (args) => { + const input = { ...args.input }; + const properties = [ + { + target: "SSECustomerKey", + hash: "SSECustomerKeyMD5" + }, + { + target: "CopySourceSSECustomerKey", + hash: "CopySourceSSECustomerKeyMD5" + } + ]; + for (const prop of properties) { + const value = input[prop.target]; + if (value) { + let valueForHash; + if (typeof value === "string") { + if (isValidBase64EncodedSSECustomerKey(value, options)) { + valueForHash = options.base64Decoder(value); + } else { + valueForHash = options.utf8Decoder(value); + input[prop.target] = options.base64Encoder(valueForHash); + } + } else { + valueForHash = ArrayBuffer.isView(value) ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength) : new Uint8Array(value); + input[prop.target] = options.base64Encoder(valueForHash); + } + const hash = new options.md5; + hash.update(valueForHash); + input[prop.hash] = options.base64Encoder(await hash.digest()); + } + } + return next({ + ...args, + input + }); + }; + } + var ssecMiddlewareOptions = { + name: "ssecMiddleware", + step: "initialize", + tags: ["SSE"], + override: true + }; + var getSsecPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.add(ssecMiddleware(config), ssecMiddlewareOptions); + } + }); + function isValidBase64EncodedSSECustomerKey(str, options) { + const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; + if (!base64Regex.test(str)) + return false; + try { + const decodedBytes = options.base64Decoder(str); + return decodedBytes.length === 32; + } catch { + return false; + } + } + exports.NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS = NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS; + exports.NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME = NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME; + exports.NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME = NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME; + exports.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS; + exports.NODE_USE_ARN_REGION_CONFIG_OPTIONS = NODE_USE_ARN_REGION_CONFIG_OPTIONS; + exports.NODE_USE_ARN_REGION_ENV_NAME = NODE_USE_ARN_REGION_ENV_NAME; + exports.NODE_USE_ARN_REGION_INI_NAME = NODE_USE_ARN_REGION_INI_NAME; + exports.S3ExpressIdentityCache = S3ExpressIdentityCache; + exports.S3ExpressIdentityCacheEntry = S3ExpressIdentityCacheEntry; + exports.S3ExpressIdentityProviderImpl = S3ExpressIdentityProviderImpl; + exports.S3RestXmlProtocol = S3RestXmlProtocol; + exports.SignatureV4S3Express = SignatureV4S3Express; + exports.addExpectContinueMiddleware = addExpectContinueMiddleware; + exports.addExpectContinueMiddlewareOptions = addExpectContinueMiddlewareOptions; + exports.bucketEndpointMiddleware = bucketEndpointMiddleware; + exports.bucketEndpointMiddlewareOptions = bucketEndpointMiddlewareOptions; + exports.bucketHostname = bucketHostname; + exports.checkContentLengthHeader = checkContentLengthHeader; + exports.checkContentLengthHeaderMiddlewareOptions = checkContentLengthHeaderMiddlewareOptions; + exports.getAddExpectContinuePlugin = getAddExpectContinuePlugin; + exports.getArnResources = getArnResources; + exports.getBucketEndpointPlugin = getBucketEndpointPlugin; + exports.getCheckContentLengthHeaderPlugin = getCheckContentLengthHeaderPlugin; + exports.getLocationConstraintPlugin = getLocationConstraintPlugin; + exports.getRegionRedirectMiddlewarePlugin = getRegionRedirectMiddlewarePlugin; + exports.getS3ExpiresMiddlewarePlugin = getS3ExpiresMiddlewarePlugin; + exports.getS3ExpressHttpSigningPlugin = getS3ExpressHttpSigningPlugin; + exports.getS3ExpressPlugin = getS3ExpressPlugin; + exports.getSsecPlugin = getSsecPlugin; + exports.getSuffixForArnEndpoint = getSuffixForArnEndpoint; + exports.getThrow200ExceptionsPlugin = getThrow200ExceptionsPlugin; + exports.getValidateBucketNamePlugin = getValidateBucketNamePlugin; + exports.isValidBase64EncodedSSECustomerKey = isValidBase64EncodedSSECustomerKey; + exports.locationConstraintMiddleware = locationConstraintMiddleware; + exports.locationConstraintMiddlewareOptions = locationConstraintMiddlewareOptions; + exports.regionRedirectEndpointMiddleware = regionRedirectEndpointMiddleware; + exports.regionRedirectEndpointMiddlewareOptions = regionRedirectEndpointMiddlewareOptions; + exports.regionRedirectMiddleware = regionRedirectMiddleware; + exports.regionRedirectMiddlewareOptions = regionRedirectMiddlewareOptions; + exports.resolveBucketEndpointConfig = resolveBucketEndpointConfig; + exports.resolveLocationConstraintConfig = resolveLocationConstraintConfig; + exports.resolveS3Config = resolveS3Config; + exports.s3ExpiresMiddleware = s3ExpiresMiddleware; + exports.s3ExpiresMiddlewareOptions = s3ExpiresMiddlewareOptions; + exports.s3ExpressHttpSigningMiddleware = s3ExpressHttpSigningMiddleware; + exports.s3ExpressHttpSigningMiddlewareOptions = s3ExpressHttpSigningMiddlewareOptions; + exports.s3ExpressMiddleware = s3ExpressMiddleware; + exports.s3ExpressMiddlewareOptions = s3ExpressMiddlewareOptions; + exports.ssecMiddleware = ssecMiddleware; + exports.ssecMiddlewareOptions = ssecMiddlewareOptions; + exports.throw200ExceptionsMiddleware = throw200ExceptionsMiddleware; + exports.throw200ExceptionsMiddlewareOptions = throw200ExceptionsMiddlewareOptions; + exports.validateAccountId = validateAccountId; + exports.validateBucketNameMiddleware = validateBucketNameMiddleware; + exports.validateBucketNameMiddlewareOptions = validateBucketNameMiddlewareOptions; + exports.validateDNSHostLabel = validateDNSHostLabel; + exports.validateNoDualstack = validateNoDualstack; + exports.validateNoFIPS = validateNoFIPS; + exports.validateOutpostService = validateOutpostService; + exports.validatePartition = validatePartition; + exports.validateRegion = validateRegion; +}); + +// node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +var require_httpAuthSchemes = __commonJS(function(exports) { + var { ProviderError, booleanSelector, SelectorType, loadConfig } = require_config(); + var { setCredentialFeature } = require_client2(); + var { normalizeProvider, memoizeIdentityProvider, isIdentityExpired, doesIdentityRequireRefresh } = require_dist_cjs2(); + var { SignatureV4 } = require_dist_cjs3(); + var { HttpResponse, HttpRequest } = require_protocols(); + var getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined; + var getAgeHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.age ?? response.headers?.Age : undefined; + var getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); + var getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset, timeRequestSent, ageHeader) => { + if (ageHeader !== undefined) { + return currentSystemClockOffset; + } + const serverTime = Date.parse(clockTime); + const timeResponseReceived = Date.now(); + if (timeRequestSent !== undefined && timeResponseReceived - timeRequestSent > 900000) { + return currentSystemClockOffset; + } + const candidateSkew = timeRequestSent !== undefined ? serverTime - (timeRequestSent + timeResponseReceived) / 2 : serverTime - timeResponseReceived; + return candidateSkew; + }; + var throwSigningPropertyError = (name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); + } + return property; + }; + var validateSigningProperties = async (signingProperties) => { + const context = throwSigningPropertyError("context", signingProperties.context); + const config = throwSigningPropertyError("config", signingProperties.config); + const authScheme = context.endpointV2?.properties?.authSchemes?.[0]; + const signerFunction = throwSigningPropertyError("signer", config.signer); + const signer = await signerFunction(authScheme); + const signingRegion = signingProperties?.signingRegion; + const signingRegionSet = signingProperties?.signingRegionSet; + const signingName = signingProperties?.signingName; + return { + config, + signer, + signingRegion, + signingRegionSet, + signingName + }; + }; + + class AwsSdkSigV4Signer { + async sign(httpRequest, identity, signingProperties) { + if (!HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const validatedProps = await validateSigningProperties(signingProperties); + const { config, signer } = validatedProps; + let { signingRegion, signingName } = validatedProps; + const handlerExecutionContext = signingProperties.context; + if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) { + const [first, second] = handlerExecutionContext.authSchemes; + if (first?.name === "sigv4a" && second?.name === "sigv4") { + signingRegion = second?.signingRegion ?? signingRegion; + signingName = second?.signingName ?? signingName; + } + } + const noSkewCorrection = await config.disableClockSkewCorrection?.() === true; + signingProperties._disableClockSkewCorrection = noSkewCorrection; + if (!noSkewCorrection) { + signingProperties._preRequestSystemClockOffset = config.systemClockOffset; + signingProperties._requestSentAt = Date.now(); + } + const signedRequest = await signer.sign(httpRequest, { + signingDate: noSkewCorrection ? new Date : getSkewCorrectedDate(config.systemClockOffset), + signingRegion, + signingService: signingName + }); + return signedRequest; + } + errorHandler(signingProperties) { + return (error) => { + const errorException = error; + if (!signingProperties._disableClockSkewCorrection) { + const serverTime = errorException.ServerTime ?? getDateHeader(errorException.$response); + if (serverTime) { + const config = throwSigningPropertyError("config", signingProperties.config); + const preRequestOffset = signingProperties._preRequestSystemClockOffset; + const timeRequestSent = signingProperties._requestSentAt; + const ageHeader = getAgeHeader(errorException.$response); + const newOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset, timeRequestSent, ageHeader); + config.systemClockOffset = newOffset; + const skewExceedsThreshold = Math.abs(newOffset) >= 240000; + const isLocalCorrection = newOffset !== preRequestOffset; + const isConcurrentCorrection = preRequestOffset !== undefined && preRequestOffset !== newOffset; + if (skewExceedsThreshold && (isLocalCorrection || isConcurrentCorrection) && errorException.$metadata) { + errorException.$metadata.clockSkewCorrected = true; + } + } + } + throw error; + }; + } + successHandler(httpResponse, signingProperties) { + if (signingProperties._disableClockSkewCorrection) { + return; + } + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config = throwSigningPropertyError("config", signingProperties.config); + const timeRequestSent = signingProperties._requestSentAt; + const ageHeader = getAgeHeader(httpResponse); + config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset, timeRequestSent, ageHeader); + } + } + } + var AWSSDKSigV4Signer = AwsSdkSigV4Signer; + + class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer { + async sign(httpRequest, identity, signingProperties) { + if (!HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties); + const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.(); + const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(","); + const noSkewCorrection = await config.disableClockSkewCorrection?.() === true; + signingProperties._disableClockSkewCorrection = noSkewCorrection; + if (!noSkewCorrection) { + signingProperties._preRequestSystemClockOffset = config.systemClockOffset; + signingProperties._requestSentAt = Date.now(); + } + const signedRequest = await signer.sign(httpRequest, { + signingDate: noSkewCorrection ? new Date : getSkewCorrectedDate(config.systemClockOffset), + signingRegion: multiRegionOverride, + signingService: signingName + }); + return signedRequest; + } + } + var getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : []; + var getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`; + var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE"; + var NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference"; + var NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = { + environmentVariableSelector: (env, options) => { + if (options?.signingName) { + const bearerTokenKey = getBearerTokenEnvKey(options.signingName); + if (bearerTokenKey in env) + return ["httpBearerAuth"]; + } + if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env)) + return; + return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]); + }, + configFileSelector: (profile) => { + if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) + return; + return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]); + }, + default: [] + }; + var resolveAwsSdkSigV4AConfig = (config) => { + config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet); + return config; + }; + var NODE_SIGV4A_CONFIG_OPTIONS = { + environmentVariableSelector(env) { + if (env.AWS_SIGV4A_SIGNING_REGION_SET) { + return env.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim()); + } + throw new ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", { + tryNextLink: true + }); + }, + configFileSelector(profile) { + if (profile.sigv4a_signing_region_set) { + return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim()); + } + throw new ProviderError("sigv4a_signing_region_set not set in profile.", { + tryNextLink: true + }); + }, + default: undefined + }; + var bindResolveAwsSdkSigV4Config = (defaultDisableClockSkewCorrection) => (config) => { + let inputCredentials = config.credentials; + let isUserSupplied = !!config.credentials; + let resolvedCredentials = undefined; + Object.defineProperty(config, "credentials", { + set(credentials) { + if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) { + isUserSupplied = true; + } + inputCredentials = credentials; + const memoizedProvider = normalizeCredentialProvider(config, { + credentials: inputCredentials, + credentialDefaultProvider: config.credentialDefaultProvider + }); + const boundProvider = bindCallerConfig(config, memoizedProvider); + if (isUserSupplied && !boundProvider.attributed) { + const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null; + resolvedCredentials = async (options) => { + const creds = await boundProvider(options); + const attributedCreds = creds; + if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) { + return setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e"); + } + return attributedCreds; + }; + resolvedCredentials.memoized = boundProvider.memoized; + resolvedCredentials.configBound = boundProvider.configBound; + resolvedCredentials.attributed = true; + } else { + resolvedCredentials = boundProvider; + } + }, + get() { + return resolvedCredentials; + }, + enumerable: true, + configurable: true + }); + config.credentials = inputCredentials; + const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256 } = config; + let signer; + if (config.signer) { + signer = normalizeProvider(config.signer); + } else if (config.regionInfoProvider) { + signer = () => normalizeProvider(config.region)().then(async (region) => [ + await config.regionInfoProvider(region, { + useFipsEndpoint: await config.useFipsEndpoint(), + useDualstackEndpoint: await config.useDualstackEndpoint() + }) || {}, + region + ]).then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + config.signingRegion = config.signingRegion || signingRegion || region; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: config.credentials, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config.signerConstructor || SignatureV4; + return new SignerCtor(params); + }); + } else { + signer = async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: config.signingName || config.defaultSigningName, + signingRegion: await normalizeProvider(config.region)(), + properties: {} + }, authScheme); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + config.signingRegion = config.signingRegion || signingRegion; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: config.credentials, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config.signerConstructor || SignatureV4; + return new SignerCtor(params); + }; + } + const resolvedConfig = Object.assign(config, { + systemClockOffset, + signingEscapePath, + signer, + disableClockSkewCorrection: normalizeProvider(config.disableClockSkewCorrection ?? defaultDisableClockSkewCorrection) + }); + return resolvedConfig; + }; + function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider }) { + let credentialsProvider; + if (credentials) { + if (!credentials?.memoized) { + credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh); + } else { + credentialsProvider = credentials; + } + } else { + if (credentialDefaultProvider) { + credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config, { + parentClientConfig: config + }))); + } else { + credentialsProvider = async () => { + throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured."); + }; + } + } + credentialsProvider.memoized = true; + return credentialsProvider; + } + function bindCallerConfig(config, credentialsProvider) { + if (credentialsProvider.configBound) { + return credentialsProvider; + } + const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config }); + fn.memoized = credentialsProvider.memoized; + fn.configBound = true; + return fn; + } + var ENV_DISABLE_CLOCK_SKEW_CORRECTION = "AWS_DISABLE_CLOCK_SKEW_CORRECTION"; + var CONFIG_DISABLE_CLOCK_SKEW_CORRECTION = "disable_clock_skew_correction"; + var NODE_DISABLE_CLOCK_SKEW_CORRECTION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => booleanSelector(env, ENV_DISABLE_CLOCK_SKEW_CORRECTION, SelectorType.ENV), + configFileSelector: (profile) => booleanSelector(profile, CONFIG_DISABLE_CLOCK_SKEW_CORRECTION, SelectorType.CONFIG), + default: false + }; + var DEFAULT_DISABLE_CLOCK_SKEW_CORRECTION = loadConfig(NODE_DISABLE_CLOCK_SKEW_CORRECTION_CONFIG_OPTIONS); + var resolveAwsSdkSigV4Config = bindResolveAwsSdkSigV4Config(DEFAULT_DISABLE_CLOCK_SKEW_CORRECTION); + var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; + exports.AWSSDKSigV4Signer = AWSSDKSigV4Signer; + exports.AwsSdkSigV4ASigner = AwsSdkSigV4ASigner; + exports.AwsSdkSigV4Signer = AwsSdkSigV4Signer; + exports.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = NODE_AUTH_SCHEME_PREFERENCE_OPTIONS; + exports.NODE_SIGV4A_CONFIG_OPTIONS = NODE_SIGV4A_CONFIG_OPTIONS; + exports.getBearerTokenEnvKey = getBearerTokenEnvKey; + exports.resolveAWSSDKSigV4Config = resolveAWSSDKSigV4Config; + exports.resolveAwsSdkSigV4AConfig = resolveAwsSdkSigV4AConfig; + exports.resolveAwsSdkSigV4Config = resolveAwsSdkSigV4Config; + exports.validateSigningProperties = validateSigningProperties; +}); + +// node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +var require_dist_cjs6 = __commonJS(function(exports) { + var { setCredentialFeature } = require_client2(); + var { CredentialsProviderError } = require_config(); + var ENV_KEY = "AWS_ACCESS_KEY_ID"; + var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; + var ENV_SESSION = "AWS_SESSION_TOKEN"; + var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; + var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; + var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; + var fromEnv = (init) => async () => { + init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); + const accessKeyId = process.env[ENV_KEY]; + const secretAccessKey = process.env[ENV_SECRET]; + const sessionToken = process.env[ENV_SESSION]; + const expiry = process.env[ENV_EXPIRATION]; + const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; + const accountId = process.env[ENV_ACCOUNT_ID]; + if (accessKeyId && secretAccessKey) { + const credentials = { + accessKeyId, + secretAccessKey, + ...sessionToken && { sessionToken }, + ...expiry && { expiration: new Date(expiry) }, + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; + setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g"); + return credentials; + } + throw new CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); + }; + exports.ENV_ACCOUNT_ID = ENV_ACCOUNT_ID; + exports.ENV_CREDENTIAL_SCOPE = ENV_CREDENTIAL_SCOPE; + exports.ENV_EXPIRATION = ENV_EXPIRATION; + exports.ENV_KEY = ENV_KEY; + exports.ENV_SECRET = ENV_SECRET; + exports.ENV_SESSION = ENV_SESSION; + exports.fromEnv = fromEnv; +}); + +// node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +var require_dist_cjs7 = __commonJS(function(exports) { + var { ProviderError, CredentialsProviderError, loadConfig } = require_config(); + var node_http = __require("node:http"); + var { parseUrl } = require_protocols(); + var isImdsCredentials = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string"; + var fromImdsCredentials = (creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration), + ...creds.AccountId && { accountId: creds.AccountId } + }); + var DEFAULT_TIMEOUT = 1000; + var DEFAULT_MAX_RETRIES = 0; + var providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT }) => ({ maxRetries, timeout }); + function httpRequest(options) { + return new Promise((resolve, reject) => { + const req = node_http.request({ + method: "GET", + ...options, + hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1") + }); + req.on("error", (err) => { + reject(Object.assign(new ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); + }); + req.on("timeout", () => { + reject(new ProviderError("TimeoutError from instance metadata service")); + req.destroy(); + }); + req.on("response", (res) => { + const { statusCode = 400 } = res; + if (statusCode < 200 || 300 <= statusCode) { + reject(Object.assign(new ProviderError("Error response received from instance metadata service"), { statusCode })); + req.destroy(); + } + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); + }); + res.on("end", () => { + resolve(Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); + } + var retry = (toRetry, maxRetries) => { + let promise = toRetry(); + for (let i = 0;i < maxRetries; i++) { + promise = promise.catch(toRetry); + } + return promise; + }; + var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; + var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; + var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; + var fromContainerMetadata = (init = {}) => { + const { timeout, maxRetries } = providerConfigFromInit(init); + return () => retry(async () => { + const requestOptions = await getCmdsUri({ logger: init.logger }); + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); + if (!isImdsCredentials(credsResponse)) { + throw new CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); + } + return fromImdsCredentials(credsResponse); + }, maxRetries); + }; + var requestFromEcsImds = async (timeout, options) => { + if (process.env[ENV_CMDS_AUTH_TOKEN]) { + options.headers = { + ...options.headers, + Authorization: process.env[ENV_CMDS_AUTH_TOKEN] + }; + } + const buffer = await httpRequest({ + ...options, + timeout + }); + return buffer.toString(); + }; + var CMDS_IP = "169.254.170.2"; + var GREENGRASS_HOSTS = new Set(["localhost", "127.0.0.1"]); + var GREENGRASS_PROTOCOLS = new Set(["http:", "https:"]); + var getCmdsUri = async ({ logger }) => { + if (process.env[ENV_CMDS_RELATIVE_URI]) { + return { + hostname: CMDS_IP, + path: process.env[ENV_CMDS_RELATIVE_URI] + }; + } + if (process.env[ENV_CMDS_FULL_URI]) { + let parsed; + try { + parsed = new URL(process.env[ENV_CMDS_FULL_URI]); + } catch { + throw new CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger }); + } + if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) { + throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, { + tryNextLink: false, + logger + }); + } + if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) { + throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, { + tryNextLink: false, + logger + }); + } + return { + protocol: parsed.protocol, + hostname: parsed.hostname, + path: parsed.pathname + parsed.search, + port: parsed.port ? parseInt(parsed.port, 10) : undefined + }; + } + throw new CredentialsProviderError("The container metadata credential provider cannot be used unless" + ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` + " variable is set", { + tryNextLink: false, + logger + }); + }; + + class InstanceMetadataV1FallbackError extends CredentialsProviderError { + tryNextLink; + name = "InstanceMetadataV1FallbackError"; + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype); + } + } + var Endpoint; + (function(Endpoint) { + Endpoint["IPv4"] = "http://169.254.169.254"; + Endpoint["IPv6"] = "http://[fd00:ec2::254]"; + })(Endpoint || (Endpoint = {})); + var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; + var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; + var ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], + default: undefined + }; + var EndpointMode; + (function(EndpointMode) { + EndpointMode["IPv4"] = "IPv4"; + EndpointMode["IPv6"] = "IPv6"; + })(EndpointMode || (EndpointMode = {})); + var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; + var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; + var ENDPOINT_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], + default: EndpointMode.IPv4 + }; + var getInstanceMetadataEndpoint = async () => parseUrl(await getFromEndpointConfig() || await getFromEndpointModeConfig()); + var getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)(); + var getFromEndpointModeConfig = async () => { + const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case EndpointMode.IPv4: + return Endpoint.IPv4; + case EndpointMode.IPv6: + return Endpoint.IPv6; + default: + throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`); + } + }; + var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; + var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; + var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; + var getExtendedInstanceMetadataCredentials = (credentials, logger) => { + const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); + const newExpiration = new Date(Date.now() + refreshInterval * 1000); + logger.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these " + `credentials will be attempted after ${new Date(newExpiration)}. +For more information, please visit: ` + STATIC_STABILITY_DOC_URL); + const originalExpiration = credentials.originalExpiration ?? credentials.expiration; + return { + ...credentials, + ...originalExpiration ? { originalExpiration } : {}, + expiration: newExpiration + }; + }; + var staticStabilityProvider = (provider, options = {}) => { + const logger = options?.logger || console; + let pastCredentials; + return async () => { + let credentials; + try { + credentials = await provider(); + if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { + credentials = getExtendedInstanceMetadataCredentials(credentials, logger); + } + } catch (e) { + if (pastCredentials) { + logger.warn("Credential renew failed: ", e); + credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger); + } else { + throw e; + } + } + pastCredentials = credentials; + return credentials; + }; + }; + var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; + var IMDS_TOKEN_PATH = "/latest/api/token"; + var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; + var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; + var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; + var fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }); + var getInstanceMetadataProvider = (init = {}) => { + let disableFetchToken = false; + const { logger, profile } = init; + const { timeout, maxRetries } = providerConfigFromInit(init); + const getCredentials = async (maxRetries, options) => { + const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null; + if (isImdsV1Fallback) { + let fallbackBlockedFromProfile = false; + let fallbackBlockedFromProcessEnv = false; + const configValue = await loadConfig({ + environmentVariableSelector: (env) => { + const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; + if (envValue === undefined) { + throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger }); + } + return fallbackBlockedFromProcessEnv; + }, + configFileSelector: (profile) => { + const profileValue = profile[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; + return fallbackBlockedFromProfile; + }, + default: false + }, { + profile + })(); + if (init.ec2MetadataV1Disabled || configValue) { + const causes = []; + if (init.ec2MetadataV1Disabled) + causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); + if (fallbackBlockedFromProfile) + causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); + if (fallbackBlockedFromProcessEnv) + causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); + throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(", ")}].`); + } + } + const imdsProfile = (await retry(async () => { + let profile; + try { + profile = await getProfile(options); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return profile; + }, maxRetries)).trim(); + return retry(async () => { + let creds; + try { + creds = await getCredentialsFromProfile(imdsProfile, options, init); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return creds; + }, maxRetries); + }; + return async () => { + const endpoint = await getInstanceMetadataEndpoint(); + if (disableFetchToken) { + logger?.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } else { + let token; + try { + token = (await getMetadataToken({ ...endpoint, timeout })).toString(); + } catch (error) { + if (error?.statusCode === 400) { + throw Object.assign(error, { + message: "EC2 Metadata token request returned error" + }); + } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { + disableFetchToken = true; + } + logger?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + return getCredentials(maxRetries, { + ...endpoint, + headers: { + [X_AWS_EC2_METADATA_TOKEN]: token + }, + timeout + }); + } + }; + }; + var getMetadataToken = async (options) => httpRequest({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600" + } + }); + var getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(); + var getCredentialsFromProfile = async (profile, options, init) => { + const credentialsResponse = JSON.parse((await httpRequest({ + ...options, + path: IMDS_PATH + profile + })).toString()); + if (!isImdsCredentials(credentialsResponse)) { + throw new CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); + } + return fromImdsCredentials(credentialsResponse); + }; + exports.DEFAULT_MAX_RETRIES = DEFAULT_MAX_RETRIES; + exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT; + exports.ENV_CMDS_AUTH_TOKEN = ENV_CMDS_AUTH_TOKEN; + exports.ENV_CMDS_FULL_URI = ENV_CMDS_FULL_URI; + exports.ENV_CMDS_RELATIVE_URI = ENV_CMDS_RELATIVE_URI; + exports.Endpoint = Endpoint; + exports.fromContainerMetadata = fromContainerMetadata; + exports.fromInstanceMetadata = fromInstanceMetadata; + exports.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint; + exports.httpRequest = httpRequest; + exports.providerConfigFromInit = providerConfigFromInit; +}); + +// node_modules/@smithy/node-http-handler/dist-cjs/index.js +var require_dist_cjs8 = __commonJS(function(exports) { + var { hasOwn } = require_serde(); + var { streamCollector } = require_serde(); + exports.streamCollector = streamCollector; + var { buildQueryString, HttpResponse } = require_protocols(); + var node_https = __require("node:https"); + var { Readable } = __require("node:stream"); + var http2 = __require("node:http2"); + function buildAbortError(abortSignal) { + const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : undefined; + if (reason) { + if (reason instanceof Error) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + abortError.cause = reason; + return abortError; + } + const abortError = new Error(String(reason)); + abortError.name = "AbortError"; + return abortError; + } + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return abortError; + } + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + var getTransformedHeaders = (headers) => { + const transformedHeaders = {}; + for (const name in headers) { + if (!hasOwn(headers, name)) + continue; + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; + }; + var timing = { + setTimeout: (cb, ms) => setTimeout(cb, ms), + clearTimeout: (timeoutId) => clearTimeout(timeoutId) + }; + var DEFER_EVENT_LISTENER_TIME$2 = 1000; + var setConnectionTimeout = (request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; + } + const registerTimeout = (offset) => { + const timeoutId = timing.setTimeout(() => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), { + name: "TimeoutError" + })); + }, timeoutInMs - offset); + const doWithSocket = (socket) => { + if (socket?.connecting) { + socket.on("connect", () => { + timing.clearTimeout(timeoutId); + }); + } else { + timing.clearTimeout(timeoutId); + } + }; + if (request.socket) { + doWithSocket(request.socket); + } else { + request.on("socket", doWithSocket); + } + }; + if (timeoutInMs < 2000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2); + }; + var setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => { + if (timeoutInMs) { + return timing.setTimeout(() => { + let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`; + if (throwOnRequestTimeout) { + const error = Object.assign(new Error(msg), { + name: "TimeoutError", + code: "ETIMEDOUT" + }); + req.destroy(error); + reject(error); + } else { + msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`; + logger?.warn?.(msg); + } + }, timeoutInMs); + } + return -1; + }; + var DEFER_EVENT_LISTENER_TIME$1 = 3000; + var setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => { + if (keepAlive !== true) { + return -1; + } + const registerListener = () => { + if (request.socket) { + request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } else { + request.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); + } + }; + if (deferTimeMs === 0) { + registerListener(); + return 0; + } + return timing.setTimeout(registerListener, deferTimeMs); + }; + var DEFER_EVENT_LISTENER_TIME = 3000; + var setSocketTimeout = (request, reject, timeoutInMs = 0) => { + const registerTimeout = (offset) => { + const timeout = timeoutInMs - offset; + const onTimeout = () => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" })); + }; + if (request.socket) { + request.socket.setTimeout(timeout, onTimeout); + request.on("close", () => request.socket?.removeListener("timeout", onTimeout)); + } else { + request.setTimeout(timeout, onTimeout); + } + }; + if (0 < timeoutInMs && timeoutInMs < 6000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); + }; + var MIN_WAIT_TIME = 6000; + async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) { + const headers = request.headers; + const expect = headers ? headers.Expect || headers.expect : undefined; + let timeoutId = -1; + let sendBody = true; + if (!externalAgent && expect === "100-continue") { + sendBody = await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + timing.clearTimeout(timeoutId); + resolve(true); + }); + httpRequest.on("response", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + httpRequest.on("error", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + }) + ]); + } + if (sendBody) { + writeBody(httpRequest, request.body); + } + } + function writeBody(httpRequest, body) { + if (body instanceof Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + const isBuffer = Buffer.isBuffer(body); + const isString = typeof body === "string"; + if (isBuffer || isString) { + if (isBuffer && body.byteLength === 0) { + httpRequest.end(); + } else { + httpRequest.end(body); + } + return; + } + const uint8 = body; + if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; + } + httpRequest.end(); + } + var DEFAULT_REQUEST_TIMEOUT = 0; + var hAgent = undefined; + var hRequest = undefined; + + class NodeHttpHandler { + config; + configProvider; + socketWarningTimestamp = 0; + externalAgent = false; + metadata = { handlerProtocol: "http/1.1" }; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttpHandler(instanceOrOptions); + } + static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15000; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + if (!hasOwn(sockets, origin)) + continue; + const socketsInUse = sockets[origin]?.length ?? 0; + const requestsEnqueued = requests[origin]?.length ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`); + return Date.now(); + } + } + } + return socketWarningTimestamp; + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }).catch(reject); + } else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + destroy() { + this.config?.httpAgent?.destroy(); + this.config?.httpsAgent?.destroy(); + } + async handle(request2, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const config = this.config; + const logger = config.logger; + const isSSL = request2.protocol === "https:"; + if (!isSSL && !this.config.httpAgent) { + this.config.httpAgent = await this.config.httpAgentProvider(); + } + return new Promise((_resolve, _reject) => { + let writeRequestBodyPromise = undefined; + let socketWarningTimeoutId = -1; + let connectionTimeoutId = -1; + let requestTimeoutId = -1; + let socketTimeoutId = -1; + let keepAliveTimeoutId = -1; + const clearTimeouts = () => { + timing.clearTimeout(socketWarningTimeoutId); + timing.clearTimeout(connectionTimeoutId); + timing.clearTimeout(requestTimeoutId); + timing.clearTimeout(socketTimeoutId); + timing.clearTimeout(keepAliveTimeoutId); + }; + const resolve = async (arg) => { + await writeRequestBodyPromise; + clearTimeouts(); + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + clearTimeouts(); + _reject(arg); + }; + if (abortSignal?.aborted) { + const abortError = buildAbortError(abortSignal); + reject(abortError); + return; + } + const headers = request2.headers; + const expectContinue = headers ? (headers.Expect ?? headers.expect) === "100-continue" : false; + let agent = isSSL ? config.httpsAgent : config.httpAgent; + if (expectContinue && !this.externalAgent) { + agent = new (isSSL ? node_https.Agent : hAgent)({ + keepAlive: false, + maxSockets: Infinity + }); + } + socketWarningTimeoutId = timing.setTimeout(() => { + this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, logger); + }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000)); + const queryString = request2.query ? buildQueryString(request2.query) : ""; + let auth = undefined; + if (request2.username != null || request2.password != null) { + const username = request2.username ?? ""; + const password = request2.password ?? ""; + auth = `${username}:${password}`; + } + let path = request2.path; + if (queryString) { + path += `?${queryString}`; + } + if (request2.fragment) { + path += `#${request2.fragment}`; + } + let hostname = request2.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request2.hostname.slice(1, -1); + } else { + hostname = request2.hostname; + } + const nodeHttpsOptions = { + headers: request2.headers, + host: hostname, + method: request2.method, + path, + port: request2.port, + agent, + auth + }; + const requestFunc = isSSL ? node_https.request : hRequest; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } else { + reject(err); + } + }); + if (abortSignal) { + const onAbort = () => { + req.destroy(); + const abortError = buildAbortError(abortSignal); + reject(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } else { + abortSignal.onabort = onAbort; + } + } + const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout; + connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout); + requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, logger ?? console); + socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + keepAliveTimeoutId = setSocketKeepAlive(req, { + keepAlive: httpAgent.keepAlive, + keepAliveMsecs: httpAgent.keepAliveMsecs + }); + } + writeRequestBodyPromise = writeRequestBody(req, request2, effectiveRequestTimeout, this.externalAgent).catch((e) => { + clearTimeouts(); + return _reject(e); + }); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + if (key === Symbol.for("logger")) { + return { + ...config, + logger: config.logger ?? value + }; + } + return { + ...config, + [key]: value + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout, + socketTimeout, + socketAcquisitionWarningTimeout, + throwOnRequestTimeout, + httpAgentProvider: async () => { + const node_http = __require("node:http"); + const { Agent, request } = node_http.default ?? node_http; + hRequest = request; + hAgent = Agent; + if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") { + this.externalAgent = true; + return httpAgent; + } + return new hAgent({ keepAlive, maxSockets, ...httpAgent }); + }, + httpsAgent: (() => { + if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") { + this.externalAgent = true; + return httpsAgent; + } + return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger + }; + } + } + var ids = new Uint16Array(1); + + class ClientHttp2SessionRef { + id = ids[0]++; + total = 0; + max = 0; + session; + refs = 0; + constructor(session) { + session.unref(); + this.session = session; + } + retain() { + if (this.session.destroyed) { + throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session."); + } + this.refs += 1; + this.total += 1; + this.max = Math.max(this.refs, this.max); + this.session.ref(); + } + free() { + if (this.session.destroyed) { + return; + } + this.refs -= 1; + if (this.refs === 0) { + this.session.unref(); + } + if (this.refs < 0) { + throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement."); + } + } + deref() { + return this.session; + } + close() { + if (!this.session.closed) { + this.session.close(); + } + } + destroy() { + this.refs = 0; + if (!this.session.destroyed) { + this.session.setTimeout(0); + this.session.destroy(); + } + } + useCount() { + return this.refs; + } + } + + class NodeHttp2ConnectionPool { + sessions = []; + maxConcurrency = 0; + constructor(sessions) { + this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session)); + } + poll() { + let cleanup = false; + for (const session of this.sessions) { + if (session.deref().destroyed) { + cleanup = true; + continue; + } + if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) { + return session; + } + } + if (cleanup) { + for (const session of this.sessions) { + if (session.deref().destroyed) { + this.remove(session); + } + } + } + } + offerLast(ref) { + this.sessions.push(ref); + } + remove(ref) { + const ix = this.sessions.indexOf(ref); + if (ix > -1) { + this.sessions.splice(ix, 1); + } + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + setMaxConcurrency(maxConcurrency) { + this.maxConcurrency = maxConcurrency; + } + destroy(ref) { + this.remove(ref); + ref.destroy(); + } + } + + class NodeHttp2ConnectionManager { + config; + connectOptions; + connectionPools = new Map; + constructor(config) { + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } + } + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const pool = this.getPool(url); + if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) { + const available = pool.poll(); + if (available) { + available.retain(); + return available; + } + } + const ref = new ClientHttp2SessionRef(this.connect(url)); + const session = ref.deref(); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error("Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString()); + } + }); + } + const graceful = () => { + this.removeFromPoolAndClose(url, ref); + }; + const ensureDestroyed = () => { + this.removeFromPoolAndCheckedDestroy(url, ref); + }; + session.on("goaway", graceful); + session.on("error", ensureDestroyed); + session.on("frameError", ensureDestroyed); + session.on("close", ensureDestroyed); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed); + } + pool.offerLast(ref); + ref.retain(); + return ref; + } + release(_requestContext, ref) { + ref.free(); + } + createIsolatedSession(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const ref = new ClientHttp2SessionRef(this.connect(url)); + const session = ref.deref(); + session.settings({ maxConcurrentStreams: 1 }); + const ensureDestroyed = () => { + ref.destroy(); + }; + session.on("error", ensureDestroyed); + session.on("frameError", ensureDestroyed); + session.on("close", ensureDestroyed); + const timeout = connectionConfiguration.requestTimeout ?? 300000; + session.setTimeout(timeout, ensureDestroyed); + ref.retain(); + return ref; + } + destroy() { + for (const [url, connectionPool] of this.connectionPools) { + for (const session of [...connectionPool]) { + session.destroy(); + } + this.connectionPools.delete(url); + } + } + setMaxConcurrentStreams(maxConcurrentStreams) { + if (maxConcurrentStreams && maxConcurrentStreams <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; + for (const pool of this.connectionPools.values()) { + pool.setMaxConcurrency(maxConcurrentStreams); + } + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions) { + this.connectOptions = nodeHttp2ConnectOptions; + } + debug() { + const pools = {}; + for (const [url, pool] of this.connectionPools) { + const sessions = []; + for (const ref of pool) { + sessions.push({ + id: ref.id, + active: ref.useCount(), + maxConcurrent: ref.max, + totalRequests: ref.total + }); + } + pools[url] = { sessions }; + } + return pools; + } + removeFromPoolAndClose(authority, ref) { + this.connectionPools.get(authority)?.remove(ref); + ref.close(); + } + removeFromPoolAndCheckedDestroy(authority, ref) { + this.connectionPools.get(authority)?.remove(ref); + ref.destroy(); + } + getPool(url) { + if (!this.connectionPools.has(url)) { + const pool = new NodeHttp2ConnectionPool; + if (this.config.maxConcurrency) { + pool.setMaxConcurrency(this.config.maxConcurrency); + } + this.connectionPools.set(url, pool); + } + return this.connectionPools.get(url); + } + getUrlString(request) { + return request.destination.toString(); + } + connect(url) { + return this.connectOptions === undefined ? http2.connect(url) : http2.connect(url, this.connectOptions); + } + } + var { constants } = http2; + + class NodeHttp2Handler { + config; + configProvider; + metadata = { handlerProtocol: "h2" }; + connectionManager = new NodeHttp2ConnectionManager({}); + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttp2Handler(instanceOrOptions); + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((opts) => { + resolve(opts || {}); + }).catch(reject); + } else { + resolve(options || {}); + } + }); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) { + if (!this.config) { + this.config = await this.configProvider; + const { disableConcurrentStreams, maxConcurrentStreams, nodeHttp2ConnectOptions } = this.config; + this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams ?? false); + if (maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams); + } + if (nodeHttp2ConnectOptions) { + this.connectionManager.setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions); + } + } + const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; + const useIsolatedSession = disableConcurrentStreams || isEventStream; + const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; + return new Promise((_resolve, _reject) => { + let fulfilled = false; + let writeRequestBodyPromise = undefined; + const resolve = async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }; + if (abortSignal?.aborted) { + fulfilled = true; + const abortError = buildAbortError(abortSignal); + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request; + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const connectConfig = { + requestTimeout: this.config?.sessionTimeout, + isEventStream + }; + const ref = useIsolatedSession ? this.connectionManager.createIsolatedSession(requestContext, connectConfig) : this.connectionManager.lease(requestContext, connectConfig); + const session = ref.deref(); + const rejectWithDestroy = (err) => { + if (useIsolatedSession) { + ref.destroy(); + } + fulfilled = true; + reject(err); + }; + const queryString = query ? buildQueryString(query) : ""; + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + const clientHttp2Stream = session.request({ + ...request.headers, + [constants.HTTP2_HEADER_PATH]: path, + [constants.HTTP2_HEADER_METHOD]: method + }); + if (effectiveRequestTimeout) { + clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => { + clientHttp2Stream.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = () => { + clientHttp2Stream.close(); + const abortError = buildAbortError(abortSignal); + rejectWithDestroy(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + clientHttp2Stream.once("close", () => signal.removeEventListener("abort", onAbort)); + } else { + abortSignal.onabort = onAbort; + } + } + clientHttp2Stream.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + clientHttp2Stream.on("error", rejectWithDestroy); + clientHttp2Stream.on("aborted", () => { + rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`)); + }); + clientHttp2Stream.on("response", (headers) => { + const httpResponse = new HttpResponse({ + statusCode: headers[":status"] ?? -1, + headers: getTransformedHeaders(headers), + body: clientHttp2Stream + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (useIsolatedSession) { + session.close(); + clientHttp2Stream.on("end", () => { + ref.destroy(); + }); + } + }); + clientHttp2Stream.on("close", () => { + if (useIsolatedSession) { + ref.destroy(); + } else { + this.connectionManager.release(requestContext, ref); + } + if (!fulfilled) { + const error = new Error("Unexpected error: http2 request did not get a response"); + if (session.destroyed) { + error.name = "TimeoutError"; + } + rejectWithDestroy(error); + } + }); + writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + } + exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; + exports.NodeHttp2Handler = NodeHttp2Handler; + exports.NodeHttpHandler = NodeHttpHandler; +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +var require_dist_cjs9 = __commonJS(function(exports) { + var { setCredentialFeature } = require_client2(); + var { CredentialsProviderError } = require_config(); + var { NodeHttpHandler } = require_dist_cjs8(); + var fs = __require("node:fs/promises"); + var { HttpRequest } = require_protocols(); + var { sdkStreamMixin, parseRfc3339DateTime } = require_serde(); + var ECS_CONTAINER_HOST = "169.254.170.2"; + var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; + var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; + var checkUrl = (url, logger) => { + if (url.protocol === "https:") { + return; + } + if (url.hostname === ECS_CONTAINER_HOST || url.hostname === EKS_CONTAINER_HOST_IPv4 || url.hostname === EKS_CONTAINER_HOST_IPv6) { + return; + } + if (url.hostname.includes("[")) { + if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") { + return; + } + } else { + if (url.hostname === "localhost") { + return; + } + const ipComponents = url.hostname.split("."); + const inRange = (component) => { + const num = parseInt(component, 10); + return 0 <= num && num <= 255; + }; + if (ipComponents[0] === "127" && inRange(ipComponents[1]) && inRange(ipComponents[2]) && inRange(ipComponents[3]) && ipComponents.length === 4) { + return; + } + } + throw new CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following: + - loopback CIDR 127.0.0.0/8 or [::1/128] + - ECS container host 169.254.170.2 + - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger }); + }; + function createGetRequest(url) { + return new HttpRequest({ + protocol: url.protocol, + hostname: url.hostname, + port: Number(url.port), + path: url.pathname, + query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => { + acc[k] = v; + return acc; + }, {}), + fragment: url.hash + }); + } + async function getCredentials(response, logger) { + const stream = sdkStreamMixin(response.body); + const str = await stream.transformToString(); + if (response.statusCode === 200) { + const parsed = JSON.parse(str); + if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") { + throw new CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " + "{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger }); + } + return { + accessKeyId: parsed.AccessKeyId, + secretAccessKey: parsed.SecretAccessKey, + sessionToken: parsed.Token, + expiration: parseRfc3339DateTime(parsed.Expiration) + }; + } + if (response.statusCode >= 400 && response.statusCode < 500) { + let parsedBody = {}; + try { + parsedBody = JSON.parse(str); + } catch (e) {} + throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), { + Code: parsedBody.Code, + Message: parsedBody.Message + }); + } + throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }); + } + var retryWrapper = (toRetry, maxRetries, delayMs) => { + return async () => { + for (let i = 0;i < maxRetries; ++i) { + try { + return await toRetry(); + } catch (e) { + await new Promise((resolve) => setTimeout(resolve, delayMs)); + } + } + return await toRetry(); + }; + }; + var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; + var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; + var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; + var AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; + var AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; + var fromHttp = (options = {}) => { + options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp"); + let host; + const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI]; + const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; + const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; + const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; + const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn ? console.warn : options.logger.warn.bind(options.logger); + if (relative && full) { + warn("@aws-sdk/credential-provider-http: " + "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); + warn("awsContainerCredentialsRelativeUri will take precedence."); + } + if (token && tokenFile) { + warn("@aws-sdk/credential-provider-http: " + "you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); + warn("awsContainerAuthorizationTokenFile will take precedence."); + } + if (relative) { + host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; + } else if (full) { + host = full; + } else { + throw new CredentialsProviderError(`No HTTP credential provider host provided. +Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger }); + } + const url = new URL(host); + checkUrl(url, options.logger); + const requestHandler = NodeHttpHandler.create({ connectionTimeout: options.timeout ?? 1000 }); + const requestTimeout = options.timeout ?? 1000; + const provider = retryWrapper(async () => { + const request = createGetRequest(url); + if (tokenFile) { + request.headers.Authorization = validateToken((await fs.readFile(tokenFile)).toString()); + } else if (token) { + request.headers.Authorization = validateToken(token); + } + try { + const result = await requestHandler.handle(request, { requestTimeout }); + return getCredentials(result.response).then((creds) => setCredentialFeature(creds, "CREDENTIALS_HTTP", "z")); + } catch (e) { + throw new CredentialsProviderError(String(e), { logger: options.logger }); + } + }, options.maxRetries ?? 3, options.timeout ?? 1000); + return async () => { + try { + return await provider(); + } finally { + requestHandler.destroy?.(); + } + }; + }; + var validateToken = (token) => { + if (token.includes(`\r +`)) { + throw new CredentialsProviderError("Authorization token contains invalid \\r\\n sequence."); + } + return token; + }; + exports.fromHttp = fromHttp; +}); + +// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +var require_sso_oidc = __commonJS(function(exports) { + var { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client2(); + var { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs2(); + var { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require_client(); + var { Command: $Command } = require_client(); + exports.$Command = $Command; + exports.__Client = Client; + var { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require_config(); + var { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require_endpoints(); + var { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols(); + var { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require_retry(); + var { TypeRegistry, getSchemaSerdePlugin } = require_schema(); + var { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes(); + var { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require_serde(); + var { streamCollector, NodeHttpHandler } = require_dist_cjs8(); + var { AwsRestJsonProtocol } = require_protocols2(); + var { Sha256 } = require_checksum(); + var defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: getSmithyContext(context).operation, + region: await normalizeProvider(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sso-oauth", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; + } + function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; + } + var defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "CreateToken": { + options.push(createSmithyApiNoAuthHttpAuthOption()); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; + }; + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = resolveAwsSdkSigV4Config(config); + return Object.assign(config_0, { + authSchemePreference: normalizeProvider(config.authSchemePreference ?? []) + }); + }; + var resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "sso-oauth" + }); + }; + var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var version = "3.997.43"; + var packageInfo = { + version + }; + var k = "ref"; + var a = -1; + var b = true; + var c = "isSet"; + var d = "PartitionResult"; + var e = "booleanEquals"; + var f = "getAttr"; + var g = { [k]: "Endpoint" }; + var h = { [k]: d }; + var i = {}; + var j = [{ [k]: "Region" }]; + var _data = { + conditions: [ + [c, [g]], + [c, j], + ["aws.partition", j, d], + [e, [{ [k]: "UseFIPS" }, b]], + [e, [{ [k]: "UseDualStack" }, b]], + [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]], + [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]], + ["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws-us-gov"]] + ], + results: [ + [a], + [a, "Invalid Configuration: FIPS and custom endpoint are not supported"], + [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"], + [g, i], + ["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i], + [a, "FIPS and DualStack are enabled, but this partition does not support one or both"], + ["https://oidc.{Region}.amazonaws.com", i], + ["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", i], + [a, "FIPS is enabled but this partition does not support FIPS"], + ["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", i], + [a, "DualStack is enabled but this partition does not support DualStack"], + ["https://oidc.{Region}.{PartitionResult#dnsSuffix}", i], + [a, "Invalid Configuration: Missing Region"] + ] + }; + var root = 2; + var r = 1e8; + var nodes = new Int32Array([ + -1, + 1, + -1, + 0, + 13, + 3, + 1, + 4, + r + 12, + 2, + 5, + r + 12, + 3, + 8, + 6, + 4, + 7, + r + 11, + 5, + r + 9, + r + 10, + 4, + 11, + 9, + 6, + 10, + r + 8, + 7, + r + 6, + r + 7, + 5, + 12, + r + 5, + 6, + r + 4, + r + 5, + 3, + r + 1, + 14, + 4, + r + 2, + r + 3 + ]); + var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results); + var cache = new EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"] + }); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return cache.get(endpointParams, () => decideEndpoint(bdd, { + endpointParams, + logger: context.logger + })); + }; + customEndpointFunctions.aws = awsEndpointFunctions; + + class SSOOIDCServiceException extends ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, SSOOIDCServiceException.prototype); + } + } + + class AccessDeniedException extends SSOOIDCServiceException { + name = "AccessDeniedException"; + $fault = "client"; + error; + reason; + error_description; + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + this.error = opts.error; + this.reason = opts.reason; + this.error_description = opts.error_description; + } + } + + class AuthorizationPendingException extends SSOOIDCServiceException { + name = "AuthorizationPendingException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "AuthorizationPendingException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AuthorizationPendingException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + } + + class ExpiredTokenException extends SSOOIDCServiceException { + name = "ExpiredTokenException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ExpiredTokenException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + } + + class InternalServerException extends SSOOIDCServiceException { + name = "InternalServerException"; + $fault = "server"; + error; + error_description; + constructor(opts) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts + }); + Object.setPrototypeOf(this, InternalServerException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + } + + class InvalidClientException extends SSOOIDCServiceException { + name = "InvalidClientException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "InvalidClientException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidClientException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + } + + class InvalidGrantException extends SSOOIDCServiceException { + name = "InvalidGrantException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "InvalidGrantException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidGrantException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + } + + class InvalidRequestException extends SSOOIDCServiceException { + name = "InvalidRequestException"; + $fault = "client"; + error; + reason; + error_description; + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidRequestException.prototype); + this.error = opts.error; + this.reason = opts.reason; + this.error_description = opts.error_description; + } + } + + class InvalidScopeException extends SSOOIDCServiceException { + name = "InvalidScopeException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "InvalidScopeException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidScopeException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + } + + class SlowDownException extends SSOOIDCServiceException { + name = "SlowDownException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "SlowDownException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, SlowDownException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + } + + class UnauthorizedClientException extends SSOOIDCServiceException { + name = "UnauthorizedClientException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "UnauthorizedClientException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, UnauthorizedClientException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + } + + class UnsupportedGrantTypeException extends SSOOIDCServiceException { + name = "UnsupportedGrantTypeException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "UnsupportedGrantTypeException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + } + var _ADE = "AccessDeniedException"; + var _APE = "AuthorizationPendingException"; + var _AT = "AccessToken"; + var _CS = "ClientSecret"; + var _CT = "CreateToken"; + var _CTR = "CreateTokenRequest"; + var _CTRr = "CreateTokenResponse"; + var _CV = "CodeVerifier"; + var _ETE = "ExpiredTokenException"; + var _ICE = "InvalidClientException"; + var _IGE = "InvalidGrantException"; + var _IRE = "InvalidRequestException"; + var _ISE = "InternalServerException"; + var _ISEn = "InvalidScopeException"; + var _IT = "IdToken"; + var _RT = "RefreshToken"; + var _SDE = "SlowDownException"; + var _UCE = "UnauthorizedClientException"; + var _UGTE = "UnsupportedGrantTypeException"; + var _aT = "accessToken"; + var _c = "client"; + var _cI = "clientId"; + var _cS = "clientSecret"; + var _cV = "codeVerifier"; + var _co = "code"; + var _dC = "deviceCode"; + var _e = "error"; + var _eI = "expiresIn"; + var _ed = "error_description"; + var _gT = "grantType"; + var _h = "http"; + var _hE = "httpError"; + var _iT = "idToken"; + var _r = "reason"; + var _rT = "refreshToken"; + var _rU = "redirectUri"; + var _s = "smithy.ts.sdk.synthetic.com.amazonaws.ssooidc"; + var _sc = "scope"; + var _se = "server"; + var _tT = "tokenType"; + var n0 = "com.amazonaws.ssooidc"; + var _s_registry = TypeRegistry.for(_s); + var SSOOIDCServiceException$ = [-3, _s, "SSOOIDCServiceException", 0, [], []]; + _s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException); + var n0_registry = TypeRegistry.for(n0); + var AccessDeniedException$ = [ + -3, + n0, + _ADE, + { [_e]: _c, [_hE]: 400 }, + [_e, _r, _ed], + [0, 0, 0] + ]; + n0_registry.registerError(AccessDeniedException$, AccessDeniedException); + var AuthorizationPendingException$ = [ + -3, + n0, + _APE, + { [_e]: _c, [_hE]: 400 }, + [_e, _ed], + [0, 0] + ]; + n0_registry.registerError(AuthorizationPendingException$, AuthorizationPendingException); + var ExpiredTokenException$ = [ + -3, + n0, + _ETE, + { [_e]: _c, [_hE]: 400 }, + [_e, _ed], + [0, 0] + ]; + n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException); + var InternalServerException$ = [ + -3, + n0, + _ISE, + { [_e]: _se, [_hE]: 500 }, + [_e, _ed], + [0, 0] + ]; + n0_registry.registerError(InternalServerException$, InternalServerException); + var InvalidClientException$ = [ + -3, + n0, + _ICE, + { [_e]: _c, [_hE]: 401 }, + [_e, _ed], + [0, 0] + ]; + n0_registry.registerError(InvalidClientException$, InvalidClientException); + var InvalidGrantException$ = [ + -3, + n0, + _IGE, + { [_e]: _c, [_hE]: 400 }, + [_e, _ed], + [0, 0] + ]; + n0_registry.registerError(InvalidGrantException$, InvalidGrantException); + var InvalidRequestException$ = [ + -3, + n0, + _IRE, + { [_e]: _c, [_hE]: 400 }, + [_e, _r, _ed], + [0, 0, 0] + ]; + n0_registry.registerError(InvalidRequestException$, InvalidRequestException); + var InvalidScopeException$ = [ + -3, + n0, + _ISEn, + { [_e]: _c, [_hE]: 400 }, + [_e, _ed], + [0, 0] + ]; + n0_registry.registerError(InvalidScopeException$, InvalidScopeException); + var SlowDownException$ = [ + -3, + n0, + _SDE, + { [_e]: _c, [_hE]: 400 }, + [_e, _ed], + [0, 0] + ]; + n0_registry.registerError(SlowDownException$, SlowDownException); + var UnauthorizedClientException$ = [ + -3, + n0, + _UCE, + { [_e]: _c, [_hE]: 400 }, + [_e, _ed], + [0, 0] + ]; + n0_registry.registerError(UnauthorizedClientException$, UnauthorizedClientException); + var UnsupportedGrantTypeException$ = [ + -3, + n0, + _UGTE, + { [_e]: _c, [_hE]: 400 }, + [_e, _ed], + [0, 0] + ]; + n0_registry.registerError(UnsupportedGrantTypeException$, UnsupportedGrantTypeException); + var errorTypeRegistries = [ + _s_registry, + n0_registry + ]; + var AccessToken = [0, n0, _AT, 8, 0]; + var ClientSecret = [0, n0, _CS, 8, 0]; + var CodeVerifier = [0, n0, _CV, 8, 0]; + var IdToken = [0, n0, _IT, 8, 0]; + var RefreshToken = [0, n0, _RT, 8, 0]; + var CreateTokenRequest$ = [ + 3, + n0, + _CTR, + 0, + [_cI, _cS, _gT, _dC, _co, _rT, _sc, _rU, _cV], + [0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]], + 3 + ]; + var CreateTokenResponse$ = [ + 3, + n0, + _CTRr, + 0, + [_aT, _tT, _eI, _rT, _iT], + [[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]] + ]; + var CreateToken$ = [ + 9, + n0, + _CT, + { [_h]: ["POST", "/token", 200] }, + () => CreateTokenRequest$, + () => CreateTokenResponse$ + ]; + var getRuntimeConfig$1 = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner + } + ], + logger: config?.logger ?? new NoOpLogger, + protocol: config?.protocol ?? AwsRestJsonProtocol, + protocolSettings: config?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.ssooidc", + errorTypeRegistries, + version: "2019-06-10", + serviceTarget: "AWSSSOOIDCService" + }, + serviceId: config?.serviceId ?? "SSO OIDC", + sha256: config?.sha256 ?? Sha256, + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8 + }; + }; + var getRuntimeConfig = (config) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig$1(config); + emitWarningIfUnsupportedVersion$1(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? loadConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE + }, config), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + var getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }; + var resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; + }; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); + }; + + class SSOOIDCClient extends Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveUserAgentConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveRegionConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveEndpointConfig(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use(getSchemaSerdePlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + } + var command = makeBuilder(commonParams, "AWSSSOOIDCService", "SSOOIDCClient", getEndpointPlugin); + var _ep0 = {}; + var _mw0 = (Command, cs, config, o) => []; + + class CreateTokenCommand extends command(_ep0, _mw0, "CreateToken", CreateToken$) { + } + var commands = { + CreateTokenCommand + }; + + class SSOOIDC extends SSOOIDCClient { + } + createAggregatedClient(commands, SSOOIDC); + var AccessDeniedExceptionReason = { + KMS_ACCESS_DENIED: "KMS_AccessDeniedException" + }; + var InvalidRequestExceptionReason = { + KMS_DISABLED_KEY: "KMS_DisabledException", + KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException", + KMS_INVALID_STATE: "KMS_InvalidStateException", + KMS_KEY_NOT_FOUND: "KMS_NotFoundException" + }; + exports.AccessDeniedException = AccessDeniedException; + exports.AccessDeniedException$ = AccessDeniedException$; + exports.AccessDeniedExceptionReason = AccessDeniedExceptionReason; + exports.AuthorizationPendingException = AuthorizationPendingException; + exports.AuthorizationPendingException$ = AuthorizationPendingException$; + exports.CreateToken$ = CreateToken$; + exports.CreateTokenCommand = CreateTokenCommand; + exports.CreateTokenRequest$ = CreateTokenRequest$; + exports.CreateTokenResponse$ = CreateTokenResponse$; + exports.ExpiredTokenException = ExpiredTokenException; + exports.ExpiredTokenException$ = ExpiredTokenException$; + exports.InternalServerException = InternalServerException; + exports.InternalServerException$ = InternalServerException$; + exports.InvalidClientException = InvalidClientException; + exports.InvalidClientException$ = InvalidClientException$; + exports.InvalidGrantException = InvalidGrantException; + exports.InvalidGrantException$ = InvalidGrantException$; + exports.InvalidRequestException = InvalidRequestException; + exports.InvalidRequestException$ = InvalidRequestException$; + exports.InvalidRequestExceptionReason = InvalidRequestExceptionReason; + exports.InvalidScopeException = InvalidScopeException; + exports.InvalidScopeException$ = InvalidScopeException$; + exports.SSOOIDC = SSOOIDC; + exports.SSOOIDCClient = SSOOIDCClient; + exports.SSOOIDCServiceException = SSOOIDCServiceException; + exports.SSOOIDCServiceException$ = SSOOIDCServiceException$; + exports.SlowDownException = SlowDownException; + exports.SlowDownException$ = SlowDownException$; + exports.UnauthorizedClientException = UnauthorizedClientException; + exports.UnauthorizedClientException$ = UnauthorizedClientException$; + exports.UnsupportedGrantTypeException = UnsupportedGrantTypeException; + exports.UnsupportedGrantTypeException$ = UnsupportedGrantTypeException$; + exports.errorTypeRegistries = errorTypeRegistries; +}); + +// node_modules/@aws-sdk/token-providers/dist-cjs/index.js +var require_dist_cjs10 = __commonJS(function(exports) { + var { setTokenFeature } = require_client2(); + var { getBearerTokenEnvKey } = require_httpAuthSchemes(); + var { TokenProviderError, getSSOTokenFilepath, parseKnownFiles, getProfileName, loadSsoSessionData, getSSOTokenFromFile, memoize, chain } = require_config(); + var { promises } = __require("node:fs"); + var fromEnvSigningName = ({ logger, signingName } = {}) => async () => { + logger?.debug?.("@aws-sdk/token-providers - fromEnvSigningName"); + if (!signingName) { + throw new TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger }); + } + const bearerTokenKey = getBearerTokenEnvKey(signingName); + if (!(bearerTokenKey in process.env)) { + throw new TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger }); + } + const token = { token: process.env[bearerTokenKey] }; + setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3"); + return token; + }; + var EXPIRE_WINDOW_MS = 5 * 60 * 1000; + var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; + var getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => { + const { SSOOIDCClient } = require_sso_oidc(); + const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop]; + const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, { + region: ssoRegion ?? init.clientConfig?.region, + logger: coalesce("logger"), + userAgentAppId: coalesce("userAgentAppId") + })); + return ssoOidcClient; + }; + var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => { + const { CreateTokenCommand } = require_sso_oidc(); + const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig); + return ssoOidcClient.send(new CreateTokenCommand({ + clientId: ssoToken.clientId, + clientSecret: ssoToken.clientSecret, + refreshToken: ssoToken.refreshToken, + grantType: "refresh_token" + })); + }; + var validateTokenExpiry = (token) => { + if (token.expiration && token.expiration.getTime() < Date.now()) { + throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); + } + }; + var validateTokenKey = (key, value, forRefresh = false) => { + if (typeof value === "undefined") { + throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false); + } + }; + var { writeFile } = promises; + var writeSSOTokenToFile = (id, ssoToken) => { + const tokenFilepath = getSSOTokenFilepath(id); + const tokenString = JSON.stringify(ssoToken, null, 2); + return writeFile(tokenFilepath, tokenString); + }; + var lastRefreshAttemptTimes = new Map; + var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => { + init.logger?.debug("@aws-sdk/token-providers - fromSso"); + const profiles = await parseKnownFiles(init); + const profileName = getProfileName({ + profile: init.profile ?? callerClientConfig?.profile + }); + const profile = profiles[profileName]; + if (!profile) { + throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); + } else if (!profile["sso_session"]) { + throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); + } + const ssoSessionName = profile["sso_session"]; + const ssoSessions = await loadSsoSessionData(init); + const ssoSession = ssoSessions[ssoSessionName]; + if (!ssoSession) { + throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false); + } + for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) { + if (!ssoSession[ssoSessionRequiredKey]) { + throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false); + } + } + ssoSession["sso_start_url"]; + const ssoRegion = ssoSession["sso_region"]; + let ssoToken; + try { + ssoToken = await getSSOTokenFromFile(ssoSessionName); + } catch (e) { + throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false); + } + validateTokenKey("accessToken", ssoToken.accessToken); + validateTokenKey("expiresAt", ssoToken.expiresAt); + const { accessToken, expiresAt } = ssoToken; + const existingToken = { + token: accessToken, + expiration: new Date(expiresAt) + }; + if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) { + return existingToken; + } + const lastRefreshAttemptTime = lastRefreshAttemptTimes.get(ssoSessionName) ?? 0; + if (Date.now() - lastRefreshAttemptTime < 30 * 1000) { + validateTokenExpiry(existingToken); + return existingToken; + } + validateTokenKey("clientId", ssoToken.clientId, true); + validateTokenKey("clientSecret", ssoToken.clientSecret, true); + validateTokenKey("refreshToken", ssoToken.refreshToken, true); + try { + lastRefreshAttemptTimes.set(ssoSessionName, Date.now()); + const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig); + validateTokenKey("accessToken", newSsoOidcToken.accessToken); + validateTokenKey("expiresIn", newSsoOidcToken.expiresIn); + const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000); + try { + await writeSSOTokenToFile(ssoSessionName, { + ...ssoToken, + accessToken: newSsoOidcToken.accessToken, + expiresAt: newTokenExpiration.toISOString(), + refreshToken: newSsoOidcToken.refreshToken + }); + } catch (error) {} + return { + token: newSsoOidcToken.accessToken, + expiration: newTokenExpiration + }; + } catch (error) { + validateTokenExpiry(existingToken); + return existingToken; + } + }; + var fromStatic = ({ token, logger }) => async () => { + logger?.debug("@aws-sdk/token-providers - fromStatic"); + if (!token || !token.token) { + throw new TokenProviderError(`Please pass a valid token to fromStatic`, false); + } + return token; + }; + var nodeProvider = (init = {}) => memoize(chain(fromSso(init), async () => { + throw new TokenProviderError("Could not load token from any providers", false); + }), (token) => token.expiration !== undefined && token.expiration.getTime() - Date.now() < 300000, (token) => token.expiration !== undefined); + exports.fromEnvSigningName = fromEnvSigningName; + exports.fromSso = fromSso; + exports.fromStatic = fromStatic; + exports.nodeProvider = nodeProvider; +}); + +// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +var require_sso = __commonJS(function(exports) { + var { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client2(); + var { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs2(); + var { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require_client(); + var { Command: $Command } = require_client(); + exports.$Command = $Command; + exports.__Client = Client; + var { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require_config(); + var { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require_endpoints(); + var { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols(); + var { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require_retry(); + var { TypeRegistry, getSchemaSerdePlugin } = require_schema(); + var { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes(); + var { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require_serde(); + var { streamCollector, NodeHttpHandler } = require_dist_cjs8(); + var { AwsRestJsonProtocol } = require_protocols2(); + var { Sha256 } = require_checksum(); + var defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: getSmithyContext(context).operation, + region: await normalizeProvider(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "awsssoportal", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; + } + function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; + } + var defaultSSOHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "GetRoleCredentials": { + options.push(createSmithyApiNoAuthHttpAuthOption()); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; + }; + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = resolveAwsSdkSigV4Config(config); + return Object.assign(config_0, { + authSchemePreference: normalizeProvider(config.authSchemePreference ?? []) + }); + }; + var resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "awsssoportal" + }); + }; + var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var version = "3.997.43"; + var packageInfo = { + version + }; + var k = "ref"; + var a = -1; + var b = true; + var c = "isSet"; + var d = "PartitionResult"; + var e = "booleanEquals"; + var f = "getAttr"; + var g = { [k]: "Endpoint" }; + var h = { [k]: d }; + var i = {}; + var j = [{ [k]: "Region" }]; + var _data = { + conditions: [ + [c, [g]], + [c, j], + ["aws.partition", j, d], + [e, [{ [k]: "UseFIPS" }, b]], + [e, [{ [k]: "UseDualStack" }, b]], + [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]], + [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]], + ["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws-us-gov"]] + ], + results: [ + [a], + [a, "Invalid Configuration: FIPS and custom endpoint are not supported"], + [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"], + [g, i], + ["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i], + [a, "FIPS and DualStack are enabled, but this partition does not support one or both"], + ["https://portal.sso.{Region}.amazonaws.com", i], + ["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", i], + [a, "FIPS is enabled but this partition does not support FIPS"], + ["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", i], + [a, "DualStack is enabled but this partition does not support DualStack"], + ["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", i], + [a, "Invalid Configuration: Missing Region"] + ] + }; + var root = 2; + var r = 1e8; + var nodes = new Int32Array([ + -1, + 1, + -1, + 0, + 13, + 3, + 1, + 4, + r + 12, + 2, + 5, + r + 12, + 3, + 8, + 6, + 4, + 7, + r + 11, + 5, + r + 9, + r + 10, + 4, + 11, + 9, + 6, + 10, + r + 8, + 7, + r + 6, + r + 7, + 5, + 12, + r + 5, + 6, + r + 4, + r + 5, + 3, + r + 1, + 14, + 4, + r + 2, + r + 3 + ]); + var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results); + var cache = new EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"] + }); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return cache.get(endpointParams, () => decideEndpoint(bdd, { + endpointParams, + logger: context.logger + })); + }; + customEndpointFunctions.aws = awsEndpointFunctions; + + class SSOServiceException extends ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, SSOServiceException.prototype); + } + } + + class InvalidRequestException extends SSOServiceException { + name = "InvalidRequestException"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidRequestException.prototype); + } + } + + class ResourceNotFoundException extends SSOServiceException { + name = "ResourceNotFoundException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + } + } + + class TooManyRequestsException extends SSOServiceException { + name = "TooManyRequestsException"; + $fault = "client"; + constructor(opts) { + super({ + name: "TooManyRequestsException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, TooManyRequestsException.prototype); + } + } + + class UnauthorizedException extends SSOServiceException { + name = "UnauthorizedException"; + $fault = "client"; + constructor(opts) { + super({ + name: "UnauthorizedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, UnauthorizedException.prototype); + } + } + var _ATT = "AccessTokenType"; + var _GRC = "GetRoleCredentials"; + var _GRCR = "GetRoleCredentialsRequest"; + var _GRCRe = "GetRoleCredentialsResponse"; + var _IRE = "InvalidRequestException"; + var _RC = "RoleCredentials"; + var _RNFE = "ResourceNotFoundException"; + var _SAKT = "SecretAccessKeyType"; + var _STT = "SessionTokenType"; + var _TMRE = "TooManyRequestsException"; + var _UE = "UnauthorizedException"; + var _aI = "accountId"; + var _aKI = "accessKeyId"; + var _aT = "accessToken"; + var _ai = "account_id"; + var _c = "client"; + var _e = "error"; + var _ex = "expiration"; + var _h = "http"; + var _hE = "httpError"; + var _hH = "httpHeader"; + var _hQ = "httpQuery"; + var _m = "message"; + var _rC = "roleCredentials"; + var _rN = "roleName"; + var _rn = "role_name"; + var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso"; + var _sAK = "secretAccessKey"; + var _sT = "sessionToken"; + var _xasbt = "x-amz-sso_bearer_token"; + var n0 = "com.amazonaws.sso"; + var _s_registry = TypeRegistry.for(_s); + var SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []]; + _s_registry.registerError(SSOServiceException$, SSOServiceException); + var n0_registry = TypeRegistry.for(n0); + var InvalidRequestException$ = [ + -3, + n0, + _IRE, + { [_e]: _c, [_hE]: 400 }, + [_m], + [0] + ]; + n0_registry.registerError(InvalidRequestException$, InvalidRequestException); + var ResourceNotFoundException$ = [ + -3, + n0, + _RNFE, + { [_e]: _c, [_hE]: 404 }, + [_m], + [0] + ]; + n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException); + var TooManyRequestsException$ = [ + -3, + n0, + _TMRE, + { [_e]: _c, [_hE]: 429 }, + [_m], + [0] + ]; + n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException); + var UnauthorizedException$ = [ + -3, + n0, + _UE, + { [_e]: _c, [_hE]: 401 }, + [_m], + [0] + ]; + n0_registry.registerError(UnauthorizedException$, UnauthorizedException); + var errorTypeRegistries = [ + _s_registry, + n0_registry + ]; + var AccessTokenType = [0, n0, _ATT, 8, 0]; + var SecretAccessKeyType = [0, n0, _SAKT, 8, 0]; + var SessionTokenType = [0, n0, _STT, 8, 0]; + var GetRoleCredentialsRequest$ = [ + 3, + n0, + _GRCR, + 0, + [_rN, _aI, _aT], + [[0, { [_hQ]: _rn }], [0, { [_hQ]: _ai }], [() => AccessTokenType, { [_hH]: _xasbt }]], + 3 + ]; + var GetRoleCredentialsResponse$ = [ + 3, + n0, + _GRCRe, + 0, + [_rC], + [[() => RoleCredentials$, 0]] + ]; + var RoleCredentials$ = [ + 3, + n0, + _RC, + 0, + [_aKI, _sAK, _sT, _ex], + [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1] + ]; + var GetRoleCredentials$ = [ + 9, + n0, + _GRC, + { [_h]: ["GET", "/federation/credentials", 200] }, + () => GetRoleCredentialsRequest$, + () => GetRoleCredentialsResponse$ + ]; + var getRuntimeConfig$1 = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner + } + ], + logger: config?.logger ?? new NoOpLogger, + protocol: config?.protocol ?? AwsRestJsonProtocol, + protocolSettings: config?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.sso", + errorTypeRegistries, + version: "2019-06-10", + serviceTarget: "SWBPortalService" + }, + serviceId: config?.serviceId ?? "SSO", + sha256: config?.sha256 ?? Sha256, + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8 + }; + }; + var getRuntimeConfig = (config) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig$1(config); + emitWarningIfUnsupportedVersion$1(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? loadConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE + }, config), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + var getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }; + var resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; + }; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); + }; + + class SSOClient extends Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveUserAgentConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveRegionConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveEndpointConfig(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use(getSchemaSerdePlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + } + var command = makeBuilder(commonParams, "SWBPortalService", "SSOClient", getEndpointPlugin); + var _ep0 = {}; + var _mw0 = (Command, cs, config, o) => []; + + class GetRoleCredentialsCommand extends command(_ep0, _mw0, "GetRoleCredentials", GetRoleCredentials$) { + } + var commands = { + GetRoleCredentialsCommand + }; + + class SSO extends SSOClient { + } + createAggregatedClient(commands, SSO); + exports.GetRoleCredentials$ = GetRoleCredentials$; + exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand; + exports.GetRoleCredentialsRequest$ = GetRoleCredentialsRequest$; + exports.GetRoleCredentialsResponse$ = GetRoleCredentialsResponse$; + exports.InvalidRequestException = InvalidRequestException; + exports.InvalidRequestException$ = InvalidRequestException$; + exports.ResourceNotFoundException = ResourceNotFoundException; + exports.ResourceNotFoundException$ = ResourceNotFoundException$; + exports.RoleCredentials$ = RoleCredentials$; + exports.SSO = SSO; + exports.SSOClient = SSOClient; + exports.SSOServiceException = SSOServiceException; + exports.SSOServiceException$ = SSOServiceException$; + exports.TooManyRequestsException = TooManyRequestsException; + exports.TooManyRequestsException$ = TooManyRequestsException$; + exports.UnauthorizedException = UnauthorizedException; + exports.UnauthorizedException$ = UnauthorizedException$; + exports.errorTypeRegistries = errorTypeRegistries; +}); + +// node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js +var require_loadSso_BGYXHf8s = __commonJS(function(exports) { + var { GetRoleCredentialsCommand, SSOClient } = require_sso(); + exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand; + exports.SSOClient = SSOClient; +}); + +// node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +var require_dist_cjs11 = __commonJS(function(exports) { + var { CredentialsProviderError, getSSOTokenFromFile, getProfileName, parseKnownFiles, loadSsoSessionData } = require_config(); + var { setCredentialFeature } = require_client2(); + var { fromSso } = require_dist_cjs10(); + var isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"); + var SHOULD_FAIL_CREDENTIAL_CHAIN = false; + var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger }) => { + let token; + const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; + if (ssoSession) { + try { + const _token = await fromSso({ + profile, + filepath, + configFilepath, + ignoreCache, + clientConfig, + parentClientConfig, + logger + })({ callerClientConfig }); + token = { + accessToken: _token.token, + expiresAt: new Date(_token.expiration).toISOString() + }; + } catch (e) { + throw new CredentialsProviderError(e.message, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); + } + } else { + try { + token = await getSSOTokenFromFile(ssoStartUrl); + } catch (e) { + throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); + } + } + if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { + throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); + } + const { accessToken } = token; + const { SSOClient, GetRoleCredentialsCommand } = require_loadSso_BGYXHf8s(); + const sso = ssoClient || new SSOClient(Object.assign({}, clientConfig ?? {}, { + logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger, + region: clientConfig?.region ?? ssoRegion, + userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId + })); + let ssoResp; + try { + ssoResp = await sso.send(new GetRoleCredentialsCommand({ + accountId: ssoAccountId, + roleName: ssoRoleName, + accessToken + })); + } catch (e) { + throw new CredentialsProviderError(e, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); + } + const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} } = ssoResp; + if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { + throw new CredentialsProviderError("SSO returns an invalid temporary credential.", { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); + } + const credentials = { + accessKeyId, + secretAccessKey, + sessionToken, + expiration: new Date(expiration), + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; + if (ssoSession) { + setCredentialFeature(credentials, "CREDENTIALS_SSO", "s"); + } else { + setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u"); + } + return credentials; + }; + var validateSsoProfile = (profile, logger) => { + const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile; + if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) { + throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` + `"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")} +Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger }); + } + return profile; + }; + var fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => { + init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + const { ssoClient } = init; + const profileName = getProfileName({ + profile: init.profile ?? callerClientConfig?.profile + }); + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + const profiles = await parseKnownFiles(init); + const profile = profiles[profileName]; + if (!profile) { + throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger }); + } + if (!isSsoProfile(profile)) { + throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, { + logger: init.logger + }); + } + if (profile?.sso_session) { + const ssoSessions = await loadSsoSessionData(init); + const session = ssoSessions[profile.sso_session]; + const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`; + if (ssoRegion && ssoRegion !== session.sso_region) { + throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, { + tryNextLink: false, + logger: init.logger + }); + } + if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { + throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, { + tryNextLink: false, + logger: init.logger + }); + } + profile.sso_region = session.sso_region; + profile.sso_start_url = session.sso_start_url; + } + const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger); + return resolveSSOCredentials({ + ssoStartUrl: sso_start_url, + ssoSession: sso_session, + ssoAccountId: sso_account_id, + ssoRegion: sso_region, + ssoRoleName: sso_role_name, + ssoClient, + clientConfig: init.clientConfig, + parentClientConfig: init.parentClientConfig, + callerClientConfig: init.callerClientConfig, + profile: profileName, + filepath: init.filepath, + configFilepath: init.configFilepath, + ignoreCache: init.ignoreCache, + logger: init.logger + }); + } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { + throw new CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " + '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger }); + } else { + return resolveSSOCredentials({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig: init.clientConfig, + parentClientConfig: init.parentClientConfig, + callerClientConfig: init.callerClientConfig, + profile: profileName, + filepath: init.filepath, + configFilepath: init.configFilepath, + ignoreCache: init.ignoreCache, + logger: init.logger + }); + } + }; + exports.fromSSO = fromSSO; + exports.isSsoProfile = isSsoProfile; + exports.validateSsoProfile = validateSsoProfile; +}); + +// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +var require_sts = __commonJS(function(exports) { + var { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, setCredentialFeature, stsRegionDefaultResolver } = require_client2(); + var { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs2(); + var { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require_client(); + var { Command: $Command } = require_client(); + exports.$Command = $Command; + exports.__Client = Client; + var { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require_config(); + var { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveParams, resolveEndpointConfig, getEndpointPlugin } = require_endpoints(); + var { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols(); + var { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require_retry(); + var { TypeRegistry, getSchemaSerdePlugin } = require_schema(); + var { resolveAwsSdkSigV4Config, resolveAwsSdkSigV4AConfig, AwsSdkSigV4Signer, AwsSdkSigV4ASigner, NODE_SIGV4A_CONFIG_OPTIONS, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes(); + var { SignatureV4MultiRegion } = require_dist_cjs4(); + var { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require_serde(); + var { streamCollector, NodeHttpHandler } = require_dist_cjs8(); + var { AwsQueryProtocol } = require_protocols2(); + var { Sha256 } = require_checksum(); + var q = "ref"; + var a = -1; + var b = true; + var c = "isSet"; + var d = "PartitionResult"; + var e = "booleanEquals"; + var f = "stringEquals"; + var g = "getAttr"; + var h = "us-east-1"; + var i = "sigv4"; + var j = "sts"; + var k = "https://sts.{Region}.{PartitionResult#dnsSuffix}"; + var l = { [q]: "Endpoint" }; + var m = { [q]: "Region" }; + var n = { [q]: d }; + var o = {}; + var p = [m]; + var _data = { + conditions: [ + [c, [l]], + [c, p], + ["aws.partition", p, d], + [e, [{ [q]: "UseFIPS" }, b]], + [e, [{ [q]: "UseDualStack" }, b]], + [f, [m, "aws-global"]], + [e, [{ [q]: "UseGlobalEndpoint" }, b]], + [f, [m, "eu-central-1"]], + [e, [{ fn: g, argv: [n, "supportsDualStack"] }, b]], + [e, [{ fn: g, argv: [n, "supportsFIPS"] }, b]], + [f, [m, "ap-south-1"]], + [f, [m, "eu-north-1"]], + [f, [m, "eu-west-1"]], + [f, [m, "eu-west-2"]], + [f, [m, "eu-west-3"]], + [f, [m, "sa-east-1"]], + [f, [m, h]], + [f, [m, "us-east-2"]], + [f, [m, "us-west-2"]], + [f, [m, "us-west-1"]], + [f, [m, "ca-central-1"]], + [f, [m, "ap-southeast-1"]], + [f, [m, "ap-northeast-1"]], + [f, [m, "ap-southeast-2"]], + [f, [{ fn: g, argv: [n, "name"] }, "aws-us-gov"]] + ], + results: [ + [a], + ["https://sts.amazonaws.com", { authSchemes: [{ name: i, signingName: j, signingRegion: h }] }], + [k, { authSchemes: [{ name: i, signingName: j, signingRegion: "{Region}" }] }], + [a, "Invalid Configuration: FIPS and custom endpoint are not supported"], + [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"], + [l, o], + ["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", o], + [a, "FIPS and DualStack are enabled, but this partition does not support one or both"], + ["https://sts.{Region}.amazonaws.com", o], + ["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", o], + [a, "FIPS is enabled but this partition does not support FIPS"], + ["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", o], + [a, "DualStack is enabled but this partition does not support DualStack"], + [k, o], + [a, "Invalid Configuration: Missing Region"] + ] + }; + var root = 2; + var r = 1e8; + var nodes = new Int32Array([ + -1, + 1, + -1, + 0, + 30, + 3, + 1, + 4, + r + 14, + 2, + 5, + r + 14, + 3, + 25, + 6, + 4, + 24, + 7, + 5, + r + 1, + 8, + 6, + 9, + r + 13, + 7, + r + 1, + 10, + 10, + r + 1, + 11, + 11, + r + 1, + 12, + 12, + r + 1, + 13, + 13, + r + 1, + 14, + 14, + r + 1, + 15, + 15, + r + 1, + 16, + 16, + r + 1, + 17, + 17, + r + 1, + 18, + 18, + r + 1, + 19, + 19, + r + 1, + 20, + 20, + r + 1, + 21, + 21, + r + 1, + 22, + 22, + r + 1, + 23, + 23, + r + 1, + r + 2, + 8, + r + 11, + r + 12, + 4, + 28, + 26, + 9, + 27, + r + 10, + 24, + r + 8, + r + 9, + 8, + 29, + r + 7, + 9, + r + 6, + r + 7, + 3, + r + 3, + 31, + 4, + r + 4, + r + 5 + ]); + var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results); + var cache = new EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"] + }); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return cache.get(endpointParams, () => decideEndpoint(bdd, { + endpointParams, + logger: context.logger + })); + }; + customEndpointFunctions.aws = awsEndpointFunctions; + var createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => { + if (!input) { + throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`"); + } + const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input); + const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor?.getEndpointParameterInstructions; + if (!instructionsFn) { + throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`); + } + const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config); + return Object.assign(defaultParameters, endpointParameters); + }; + var _defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: getSmithyContext(context).operation, + region: await normalizeProvider(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + var defaultSTSHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultSTSHttpAuthSchemeParametersProvider); + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sts", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; + } + function createAwsAuthSigv4aHttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4a", + signingProperties: { + name: "sts", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; + } + function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; + } + var createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => { + const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => { + const endpoint = defaultEndpointResolver(authParameters); + const authSchemes = endpoint.properties?.authSchemes; + if (!authSchemes) { + return defaultHttpAuthSchemeResolver(authParameters); + } + const options = []; + for (const scheme of authSchemes) { + const { name: resolvedName, properties = {}, ...rest } = scheme; + const name = resolvedName.toLowerCase(); + if (resolvedName !== name) { + console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`); + } + let schemeId; + if (name === "sigv4a") { + schemeId = "aws.auth#sigv4a"; + const sigv4Present = authSchemes.find((s) => { + const name = s.name.toLowerCase(); + return name !== "sigv4a" && name.startsWith("sigv4"); + }); + if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) { + continue; + } + } else if (name.startsWith("sigv4")) { + schemeId = "aws.auth#sigv4"; + } else { + throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`); + } + const createOption = createHttpAuthOptionFunctions[schemeId]; + if (!createOption) { + throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`); + } + const option = createOption(authParameters); + option.schemeId = schemeId; + option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties }; + options.push(option); + } + return options; + }; + return endpointRuleSetHttpAuthSchemeProvider; + }; + var _defaultSTSHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "AssumeRoleWithWebIdentity": { + options.push(createSmithyApiNoAuthHttpAuthOption()); + options.push(createAwsAuthSigv4aHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + options.push(createAwsAuthSigv4aHttpAuthOption(authParameters)); + } + } + return options; + }; + var defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSTSHttpAuthSchemeProvider, { + "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption, + "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption, + "smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption + }); + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = resolveAwsSdkSigV4Config(config); + const config_1 = resolveAwsSdkSigV4AConfig(config_0); + return Object.assign(config_1, { + authSchemePreference: normalizeProvider(config.authSchemePreference ?? []) + }); + }; + var resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + defaultSigningName: "sts" + }); + }; + var commonParams = { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var version = "3.997.43"; + var packageInfo = { + version + }; + + class STSServiceException extends ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, STSServiceException.prototype); + } + } + + class ExpiredTokenException extends STSServiceException { + name = "ExpiredTokenException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ExpiredTokenException.prototype); + } + } + + class MalformedPolicyDocumentException extends STSServiceException { + name = "MalformedPolicyDocumentException"; + $fault = "client"; + constructor(opts) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype); + } + } + + class PackedPolicyTooLargeException extends STSServiceException { + name = "PackedPolicyTooLargeException"; + $fault = "client"; + constructor(opts) { + super({ + name: "PackedPolicyTooLargeException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype); + } + } + + class RegionDisabledException extends STSServiceException { + name = "RegionDisabledException"; + $fault = "client"; + constructor(opts) { + super({ + name: "RegionDisabledException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, RegionDisabledException.prototype); + } + } + + class IDPRejectedClaimException extends STSServiceException { + name = "IDPRejectedClaimException"; + $fault = "client"; + constructor(opts) { + super({ + name: "IDPRejectedClaimException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, IDPRejectedClaimException.prototype); + } + } + + class InvalidIdentityTokenException extends STSServiceException { + name = "InvalidIdentityTokenException"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidIdentityTokenException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype); + } + } + + class IDPCommunicationErrorException extends STSServiceException { + name = "IDPCommunicationErrorException"; + $fault = "client"; + $retryable = {}; + constructor(opts) { + super({ + name: "IDPCommunicationErrorException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype); + } + } + var _A = "Arn"; + var _AKI = "AccessKeyId"; + var _AR = "AssumeRole"; + var _ARI = "AssumedRoleId"; + var _ARR = "AssumeRoleRequest"; + var _ARRs = "AssumeRoleResponse"; + var _ARU = "AssumedRoleUser"; + var _ARWWI = "AssumeRoleWithWebIdentity"; + var _ARWWIR = "AssumeRoleWithWebIdentityRequest"; + var _ARWWIRs = "AssumeRoleWithWebIdentityResponse"; + var _Au = "Audience"; + var _C = "Credentials"; + var _CA = "ContextAssertion"; + var _DS = "DurationSeconds"; + var _E = "Expiration"; + var _EI = "ExternalId"; + var _ETE = "ExpiredTokenException"; + var _IDPCEE = "IDPCommunicationErrorException"; + var _IDPRCE = "IDPRejectedClaimException"; + var _IITE = "InvalidIdentityTokenException"; + var _K = "Key"; + var _MPDE = "MalformedPolicyDocumentException"; + var _P = "Policy"; + var _PA = "PolicyArns"; + var _PAr = "ProviderArn"; + var _PC = "ProvidedContexts"; + var _PCLT = "ProvidedContextsListType"; + var _PCr = "ProvidedContext"; + var _PDT = "PolicyDescriptorType"; + var _PI = "ProviderId"; + var _PPS = "PackedPolicySize"; + var _PPTLE = "PackedPolicyTooLargeException"; + var _Pr = "Provider"; + var _RA = "RoleArn"; + var _RDE = "RegionDisabledException"; + var _RSN = "RoleSessionName"; + var _SAK = "SecretAccessKey"; + var _SFWIT = "SubjectFromWebIdentityToken"; + var _SI = "SourceIdentity"; + var _SN = "SerialNumber"; + var _ST = "SessionToken"; + var _T = "Tags"; + var _TC = "TokenCode"; + var _TTK = "TransitiveTagKeys"; + var _Ta = "Tag"; + var _V = "Value"; + var _WIT = "WebIdentityToken"; + var _a = "arn"; + var _aKST = "accessKeySecretType"; + var _aQE = "awsQueryError"; + var _c = "client"; + var _cTT = "clientTokenType"; + var _e = "error"; + var _hE = "httpError"; + var _m = "message"; + var _pDLT = "policyDescriptorListType"; + var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts"; + var _tLT = "tagListType"; + var n0 = "com.amazonaws.sts"; + var _s_registry = TypeRegistry.for(_s); + var STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []]; + _s_registry.registerError(STSServiceException$, STSServiceException); + var n0_registry = TypeRegistry.for(n0); + var ExpiredTokenException$ = [ + -3, + n0, + _ETE, + { [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0] + ]; + n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException); + var IDPCommunicationErrorException$ = [ + -3, + n0, + _IDPCEE, + { [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0] + ]; + n0_registry.registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException); + var IDPRejectedClaimException$ = [ + -3, + n0, + _IDPRCE, + { [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 }, + [_m], + [0] + ]; + n0_registry.registerError(IDPRejectedClaimException$, IDPRejectedClaimException); + var InvalidIdentityTokenException$ = [ + -3, + n0, + _IITE, + { [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0] + ]; + n0_registry.registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException); + var MalformedPolicyDocumentException$ = [ + -3, + n0, + _MPDE, + { [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0] + ]; + n0_registry.registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException); + var PackedPolicyTooLargeException$ = [ + -3, + n0, + _PPTLE, + { [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0] + ]; + n0_registry.registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException); + var RegionDisabledException$ = [ + -3, + n0, + _RDE, + { [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 }, + [_m], + [0] + ]; + n0_registry.registerError(RegionDisabledException$, RegionDisabledException); + var errorTypeRegistries = [ + _s_registry, + n0_registry + ]; + var accessKeySecretType = [0, n0, _aKST, 8, 0]; + var clientTokenType = [0, n0, _cTT, 8, 0]; + var AssumedRoleUser$ = [ + 3, + n0, + _ARU, + 0, + [_ARI, _A], + [0, 0], + 2 + ]; + var AssumeRoleRequest$ = [ + 3, + n0, + _ARR, + 0, + [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC], + [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType], + 2 + ]; + var AssumeRoleResponse$ = [ + 3, + n0, + _ARRs, + 0, + [_C, _ARU, _PPS, _SI], + [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0] + ]; + var AssumeRoleWithWebIdentityRequest$ = [ + 3, + n0, + _ARWWIR, + 0, + [_RA, _RSN, _WIT, _PI, _PA, _P, _DS], + [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1], + 3 + ]; + var AssumeRoleWithWebIdentityResponse$ = [ + 3, + n0, + _ARWWIRs, + 0, + [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI], + [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0] + ]; + var Credentials$ = [ + 3, + n0, + _C, + 0, + [_AKI, _SAK, _ST, _E], + [0, [() => accessKeySecretType, 0], 0, 4], + 4 + ]; + var PolicyDescriptorType$ = [ + 3, + n0, + _PDT, + 0, + [_a], + [0] + ]; + var ProvidedContext$ = [ + 3, + n0, + _PCr, + 0, + [_PAr, _CA], + [0, 0] + ]; + var Tag$ = [ + 3, + n0, + _Ta, + 0, + [_K, _V], + [0, 0], + 2 + ]; + var policyDescriptorListType = [ + 1, + n0, + _pDLT, + 0, + () => PolicyDescriptorType$ + ]; + var ProvidedContextsListType = [ + 1, + n0, + _PCLT, + 0, + () => ProvidedContext$ + ]; + var tagListType = [ + 1, + n0, + _tLT, + 0, + () => Tag$ + ]; + var AssumeRole$ = [ + 9, + n0, + _AR, + 0, + () => AssumeRoleRequest$, + () => AssumeRoleResponse$ + ]; + var AssumeRoleWithWebIdentity$ = [ + 9, + n0, + _ARWWI, + 0, + () => AssumeRoleWithWebIdentityRequest$, + () => AssumeRoleWithWebIdentityResponse$ + ]; + var getRuntimeConfig$1 = (config) => { + return { + apiVersion: "2011-06-15", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer + }, + { + schemeId: "aws.auth#sigv4a", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"), + signer: new AwsSdkSigV4ASigner + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner + } + ], + logger: config?.logger ?? new NoOpLogger, + protocol: config?.protocol ?? AwsQueryProtocol, + protocolSettings: config?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.sts", + errorTypeRegistries, + xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/", + version: "2011-06-15", + serviceTarget: "AWSSecurityTokenServiceV20110615" + }, + serviceId: config?.serviceId ?? "STS", + sha256: config?.sha256 ?? Sha256, + signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion, + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8 + }; + }; + var getRuntimeConfig = (config) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig$1(config); + emitWarningIfUnsupportedVersion$1(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()), + signer: new AwsSdkSigV4Signer + }, + { + schemeId: "aws.auth#sigv4a", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"), + signer: new AwsSdkSigV4ASigner + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner + } + ], + maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? loadConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE + }, config), + sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + var getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }; + var resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; + }; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); + }; + + class STSClient extends Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveUserAgentConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveRegionConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveEndpointConfig(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use(getSchemaSerdePlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + "aws.auth#sigv4a": config.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + } + var command = makeBuilder(commonParams, "AWSSecurityTokenServiceV20110615", "STSClient", getEndpointPlugin); + var _ep0 = {}; + var _mw0 = (Command, cs, config, o) => []; + + class AssumeRoleCommand extends command(_ep0, _mw0, "AssumeRole", AssumeRole$) { + } + + class AssumeRoleWithWebIdentityCommand extends command(_ep0, _mw0, "AssumeRoleWithWebIdentity", AssumeRoleWithWebIdentity$) { + } + var commands = { + AssumeRoleCommand, + AssumeRoleWithWebIdentityCommand + }; + + class STS extends STSClient { + } + createAggregatedClient(commands, STS); + var getAccountIdFromAssumedRoleUser = (assumedRoleUser) => { + if (typeof assumedRoleUser?.Arn === "string") { + const arnComponents = assumedRoleUser.Arn.split(":"); + if (arnComponents.length > 4 && arnComponents[4] !== "") { + return arnComponents[4]; + } + } + return; + }; + var resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => { + const region = typeof _region === "function" ? await _region() : _region; + const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; + let stsDefaultRegion = ""; + const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)()); + credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`); + return resolvedRegion; + }; + var getDefaultRoleAssumer$1 = (stsOptions, STSClient) => { + let stsClient; + let closureSourceCreds; + return async (sourceCreds, params) => { + closureSourceCreds = sourceCreds; + if (!stsClient) { + const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions; + const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, { + logger, + profile + }); + const isCompatibleRequestHandler = !isH2(requestHandler); + stsClient = new STSClient({ + ...stsOptions, + userAgentAppId, + profile, + credentialDefaultProvider: () => async () => closureSourceCreds, + region: resolvedRegion, + requestHandler: isCompatibleRequestHandler ? requestHandler : undefined, + logger + }); + } + const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params)); + if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); + } + const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser); + const credentials = { + accessKeyId: Credentials.AccessKeyId, + secretAccessKey: Credentials.SecretAccessKey, + sessionToken: Credentials.SessionToken, + expiration: Credentials.Expiration, + ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }, + ...accountId && { accountId } + }; + setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i"); + return credentials; + }; + }; + var getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => { + let stsClient; + return async (params) => { + if (!stsClient) { + const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions; + const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, { + logger, + profile + }); + const isCompatibleRequestHandler = !isH2(requestHandler); + stsClient = new STSClient({ + ...stsOptions, + userAgentAppId, + profile, + region: resolvedRegion, + requestHandler: isCompatibleRequestHandler ? requestHandler : undefined, + logger + }); + } + const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params)); + if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); + } + const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser); + const credentials = { + accessKeyId: Credentials.AccessKeyId, + secretAccessKey: Credentials.SecretAccessKey, + sessionToken: Credentials.SessionToken, + expiration: Credentials.Expiration, + ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }, + ...accountId && { accountId } + }; + if (accountId) { + setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T"); + } + setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k"); + return credentials; + }; + }; + var isH2 = (requestHandler) => { + return requestHandler?.metadata?.handlerProtocol === "h2"; + }; + var getCustomizableStsClientCtor = (baseCtor, customizations) => { + if (!customizations) + return baseCtor; + else + return class CustomizableSTSClient extends baseCtor { + constructor(config) { + super(config); + for (const customization of customizations) { + this.middlewareStack.use(customization); + } + } + }; + }; + var getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins)); + var getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins)); + var decorateDefaultCredentialProvider = (provider) => (input) => provider({ + roleAssumer: getDefaultRoleAssumer(input), + roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input), + ...input + }); + exports.AssumeRole$ = AssumeRole$; + exports.AssumeRoleCommand = AssumeRoleCommand; + exports.AssumeRoleRequest$ = AssumeRoleRequest$; + exports.AssumeRoleResponse$ = AssumeRoleResponse$; + exports.AssumeRoleWithWebIdentity$ = AssumeRoleWithWebIdentity$; + exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand; + exports.AssumeRoleWithWebIdentityRequest$ = AssumeRoleWithWebIdentityRequest$; + exports.AssumeRoleWithWebIdentityResponse$ = AssumeRoleWithWebIdentityResponse$; + exports.AssumedRoleUser$ = AssumedRoleUser$; + exports.Credentials$ = Credentials$; + exports.ExpiredTokenException = ExpiredTokenException; + exports.ExpiredTokenException$ = ExpiredTokenException$; + exports.IDPCommunicationErrorException = IDPCommunicationErrorException; + exports.IDPCommunicationErrorException$ = IDPCommunicationErrorException$; + exports.IDPRejectedClaimException = IDPRejectedClaimException; + exports.IDPRejectedClaimException$ = IDPRejectedClaimException$; + exports.InvalidIdentityTokenException = InvalidIdentityTokenException; + exports.InvalidIdentityTokenException$ = InvalidIdentityTokenException$; + exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException; + exports.MalformedPolicyDocumentException$ = MalformedPolicyDocumentException$; + exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException; + exports.PackedPolicyTooLargeException$ = PackedPolicyTooLargeException$; + exports.PolicyDescriptorType$ = PolicyDescriptorType$; + exports.ProvidedContext$ = ProvidedContext$; + exports.RegionDisabledException = RegionDisabledException; + exports.RegionDisabledException$ = RegionDisabledException$; + exports.STS = STS; + exports.STSClient = STSClient; + exports.STSServiceException = STSServiceException; + exports.STSServiceException$ = STSServiceException$; + exports.Tag$ = Tag$; + exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider; + exports.errorTypeRegistries = errorTypeRegistries; + exports.getDefaultRoleAssumer = getDefaultRoleAssumer; + exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity; +}); + +// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +var require_signin = __commonJS(function(exports) { + var { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client2(); + var { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs2(); + var { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require_client(); + var { Command: $Command } = require_client(); + exports.$Command = $Command; + exports.__Client = Client; + var { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require_config(); + var { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require_endpoints(); + var { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols(); + var { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require_retry(); + var { TypeRegistry, getSchemaSerdePlugin } = require_schema(); + var { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes(); + var { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require_serde(); + var { streamCollector, NodeHttpHandler } = require_dist_cjs8(); + var { AwsRestJsonProtocol } = require_protocols2(); + var { Sha256 } = require_checksum(); + var defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: getSmithyContext(context).operation, + region: await normalizeProvider(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "signin", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; + } + function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; + } + var defaultSigninHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "CreateOAuth2Token": { + options.push(createSmithyApiNoAuthHttpAuthOption()); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; + }; + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = resolveAwsSdkSigV4Config(config); + return Object.assign(config_0, { + authSchemePreference: normalizeProvider(config.authSchemePreference ?? []) + }); + }; + var resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "signin" + }); + }; + var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var version = "3.997.43"; + var packageInfo = { + version + }; + var s = "ref"; + var a = -1; + var b = false; + var c = true; + var d = "isSet"; + var e = "booleanEquals"; + var f = "coalesce"; + var g = "PartitionResult"; + var h = "stringEquals"; + var i = "getAttr"; + var j = "https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}"; + var k = { [s]: "Endpoint" }; + var l = { fn: i, argv: [{ [s]: g }, "name"] }; + var m = { [s]: "Region" }; + var n = { [s]: g }; + var o = { authSchemes: [{ name: "sigv4", signingName: "signin", signingRegion: "{Region}" }] }; + var p = {}; + var q = [m]; + var _data = { + conditions: [ + [d, q], + [e, [{ fn: f, argv: [{ [s]: "IsControlPlane" }, b] }, c]], + [d, [k]], + ["aws.partition", q, g], + [e, [{ [s]: "UseFIPS" }, c]], + [h, [l, "aws"]], + [e, [{ fn: f, argv: [{ [s]: "IsOAuthEndpoint" }, b] }, c]], + [e, [{ [s]: "UseDualStack" }, c]], + [h, [l, "aws-cn"]], + [h, [m, "us-gov-west-1"]], + [h, [l, "aws-us-gov"]], + [e, [{ fn: i, argv: [n, "supportsFIPS"] }, c]], + [h, [l, "aws-iso"]], + [h, [l, "aws-iso-b"]], + [h, [l, "aws-iso-f"]], + [h, [l, "aws-iso-e"]], + [h, [l, "aws-eusc"]], + [e, [{ fn: i, argv: [n, "supportsDualStack"] }, c]] + ], + results: [ + [a], + ["https://signin.{Region}.api.aws", o], + ["https://signin.{Region}.api.amazonwebservices.com.cn", o], + [j, o], + [a, "FIPS endpoints are not supported for OAuth operations. Disable FIPS or use a non-OAuth operation."], + ["https://{Region}.oauth.signin.aws", o], + ["https://{Region}.signin.aws.amazon.com", p], + ["https://{Region}.signin.amazonaws.cn", p], + ["https://{Region}.signin.amazonaws-us-gov.com", p], + ["https://{Region}.signin.c2shome.ic.gov", p], + ["https://{Region}.signin.sc2shome.sgov.gov", p], + ["https://{Region}.signin.csphome.hci.ic.gov", p], + ["https://{Region}.signin.csphome.adc-e.uk", p], + ["https://{Region}.signin.amazonaws-eusc.eu", p], + ["https://signin-fips.amazonaws-us-gov.com", p], + ["https://{Region}.signin-fips.amazonaws-us-gov.com", p], + ["https://{Region}.signin.{PartitionResult#dnsSuffix}", p], + [a, "Invalid Configuration: FIPS and custom endpoint are not supported"], + [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"], + [k, p], + ["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", p], + [a, "FIPS and DualStack are enabled, but this partition does not support one or both"], + ["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}", p], + [a, "FIPS is enabled but this partition does not support FIPS"], + [j, p], + [a, "DualStack is enabled but this partition does not support DualStack"], + ["https://signin.{Region}.{PartitionResult#dnsSuffix}", p], + [a, "Invalid Configuration: Missing Region"] + ] + }; + var root = 2; + var r = 1e8; + var nodes = new Int32Array([ + -1, + 1, + -1, + 0, + 6, + 3, + 2, + 36, + 4, + 4, + 5, + r + 27, + 6, + r + 4, + r + 27, + 1, + 29, + 7, + 2, + 36, + 8, + 3, + 9, + 31, + 4, + 22, + 10, + 5, + 19, + 11, + 7, + 21, + 12, + 8, + r + 7, + 13, + 10, + r + 8, + 14, + 12, + r + 9, + 15, + 13, + r + 10, + 16, + 14, + r + 11, + 17, + 15, + r + 12, + 18, + 16, + r + 13, + r + 16, + 6, + r + 5, + 20, + 7, + 21, + r + 6, + 17, + r + 24, + r + 25, + 6, + r + 4, + 23, + 7, + 27, + 24, + 9, + r + 14, + 25, + 10, + r + 15, + 26, + 11, + r + 22, + r + 23, + 11, + 28, + r + 21, + 17, + r + 20, + r + 21, + 2, + 35, + 30, + 3, + 39, + 31, + 4, + 32, + r + 27, + 6, + r + 4, + 33, + 7, + r + 27, + 34, + 9, + r + 14, + r + 27, + 3, + 39, + 36, + 4, + 38, + 37, + 7, + r + 18, + r + 19, + 6, + r + 4, + r + 17, + 5, + r + 1, + 40, + 8, + r + 2, + r + 3 + ]); + var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results); + var cache = new EndpointCache({ + size: 50, + params: ["Endpoint", "IsControlPlane", "IsOAuthEndpoint", "Region", "UseDualStack", "UseFIPS"] + }); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return cache.get(endpointParams, () => decideEndpoint(bdd, { + endpointParams, + logger: context.logger + })); + }; + customEndpointFunctions.aws = awsEndpointFunctions; + + class SigninServiceException extends ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, SigninServiceException.prototype); + } + } + + class AccessDeniedException extends SigninServiceException { + name = "AccessDeniedException"; + $fault = "client"; + error; + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + this.error = opts.error; + } + } + + class InternalServerException extends SigninServiceException { + name = "InternalServerException"; + $fault = "server"; + error; + constructor(opts) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts + }); + Object.setPrototypeOf(this, InternalServerException.prototype); + this.error = opts.error; + } + } + + class TooManyRequestsError extends SigninServiceException { + name = "TooManyRequestsError"; + $fault = "client"; + error; + constructor(opts) { + super({ + name: "TooManyRequestsError", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, TooManyRequestsError.prototype); + this.error = opts.error; + } + } + + class ValidationException extends SigninServiceException { + name = "ValidationException"; + $fault = "client"; + error; + constructor(opts) { + super({ + name: "ValidationException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ValidationException.prototype); + this.error = opts.error; + } + } + var _ADE = "AccessDeniedException"; + var _AT = "AccessToken"; + var _COAT = "CreateOAuth2Token"; + var _COATR = "CreateOAuth2TokenRequest"; + var _COATRB = "CreateOAuth2TokenRequestBody"; + var _COATRBr = "CreateOAuth2TokenResponseBody"; + var _COATRr = "CreateOAuth2TokenResponse"; + var _COATWIAM = "CreateOAuth2TokenWithIAM"; + var _COATWIAMR = "CreateOAuth2TokenWithIAMRequest"; + var _COATWIAMRr = "CreateOAuth2TokenWithIAMResponse"; + var _ISE = "InternalServerException"; + var _OAAT = "OAuthAccessToken"; + var _RT = "RefreshToken"; + var _TMRE = "TooManyRequestsError"; + var _VE = "ValidationException"; + var _aKI = "accessKeyId"; + var _aT = "accessToken"; + var _at = "access_token"; + var _c = "client"; + var _cI = "clientId"; + var _cV = "codeVerifier"; + var _co = "code"; + var _e = "error"; + var _eI = "expiresIn"; + var _ei = "expires_in"; + var _gT = "grantType"; + var _gt = "grant_type"; + var _h = "http"; + var _hE = "httpError"; + var _iT = "idToken"; + var _jN = "jsonName"; + var _m = "message"; + var _r = "resource"; + var _rT = "refreshToken"; + var _rU = "redirectUri"; + var _s = "smithy.ts.sdk.synthetic.com.amazonaws.signin"; + var _sAK = "secretAccessKey"; + var _sT = "sessionToken"; + var _se = "server"; + var _tI = "tokenInput"; + var _tO = "tokenOutput"; + var _tT = "tokenType"; + var _tt = "token_type"; + var n0 = "com.amazonaws.signin"; + var _s_registry = TypeRegistry.for(_s); + var SigninServiceException$ = [-3, _s, "SigninServiceException", 0, [], []]; + _s_registry.registerError(SigninServiceException$, SigninServiceException); + var n0_registry = TypeRegistry.for(n0); + var AccessDeniedException$ = [ + -3, + n0, + _ADE, + { [_e]: _c }, + [_e, _m], + [0, 0], + 2 + ]; + n0_registry.registerError(AccessDeniedException$, AccessDeniedException); + var InternalServerException$ = [ + -3, + n0, + _ISE, + { [_e]: _se, [_hE]: 500 }, + [_e, _m], + [0, 0], + 2 + ]; + n0_registry.registerError(InternalServerException$, InternalServerException); + var TooManyRequestsError$ = [ + -3, + n0, + _TMRE, + { [_e]: _c, [_hE]: 429 }, + [_e, _m], + [0, 0], + 2 + ]; + n0_registry.registerError(TooManyRequestsError$, TooManyRequestsError); + var ValidationException$ = [ + -3, + n0, + _VE, + { [_e]: _c, [_hE]: 400 }, + [_e, _m], + [0, 0], + 2 + ]; + n0_registry.registerError(ValidationException$, ValidationException); + var errorTypeRegistries = [ + _s_registry, + n0_registry + ]; + var OAuthAccessToken = [0, n0, _OAAT, 8, 0]; + var RefreshToken = [0, n0, _RT, 8, 0]; + var AccessToken$ = [ + 3, + n0, + _AT, + 8, + [_aKI, _sAK, _sT], + [[0, { [_jN]: _aKI }], [0, { [_jN]: _sAK }], [0, { [_jN]: _sT }]], + 3 + ]; + var CreateOAuth2TokenRequest$ = [ + 3, + n0, + _COATR, + 0, + [_tI], + [[() => CreateOAuth2TokenRequestBody$, 16]], + 1 + ]; + var CreateOAuth2TokenRequestBody$ = [ + 3, + n0, + _COATRB, + 0, + [_cI, _gT, _co, _rU, _cV, _rT], + [[0, { [_jN]: _cI }], [0, { [_jN]: _gT }], 0, [0, { [_jN]: _rU }], [0, { [_jN]: _cV }], [() => RefreshToken, { [_jN]: _rT }]], + 2 + ]; + var CreateOAuth2TokenResponse$ = [ + 3, + n0, + _COATRr, + 0, + [_tO], + [[() => CreateOAuth2TokenResponseBody$, 16]], + 1 + ]; + var CreateOAuth2TokenResponseBody$ = [ + 3, + n0, + _COATRBr, + 0, + [_aT, _tT, _eI, _rT, _iT], + [[() => AccessToken$, { [_jN]: _aT }], [0, { [_jN]: _tT }], [1, { [_jN]: _eI }], [() => RefreshToken, { [_jN]: _rT }], [0, { [_jN]: _iT }]], + 4 + ]; + var CreateOAuth2TokenWithIAMRequest$ = [ + 3, + n0, + _COATWIAMR, + 0, + [_gT, _r], + [[0, { [_jN]: _gt }], 0], + 2 + ]; + var CreateOAuth2TokenWithIAMResponse$ = [ + 3, + n0, + _COATWIAMRr, + 0, + [_aT, _tT, _eI], + [[() => OAuthAccessToken, { [_jN]: _at }], [0, { [_jN]: _tt }], [1, { [_jN]: _ei }]], + 3 + ]; + var CreateOAuth2Token$ = [ + 9, + n0, + _COAT, + { [_h]: ["POST", "/v1/token", 200] }, + () => CreateOAuth2TokenRequest$, + () => CreateOAuth2TokenResponse$ + ]; + var CreateOAuth2TokenWithIAM$ = [ + 9, + n0, + _COATWIAM, + { [_h]: ["POST", "/v1/token?x-amz-client-auth-method=iam", 200] }, + () => CreateOAuth2TokenWithIAMRequest$, + () => CreateOAuth2TokenWithIAMResponse$ + ]; + var getRuntimeConfig$1 = (config) => { + return { + apiVersion: "2023-01-01", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSigninHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner + } + ], + logger: config?.logger ?? new NoOpLogger, + protocol: config?.protocol ?? AwsRestJsonProtocol, + protocolSettings: config?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.signin", + errorTypeRegistries, + version: "2023-01-01", + serviceTarget: "Signin" + }, + serviceId: config?.serviceId ?? "Signin", + sha256: config?.sha256 ?? Sha256, + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8 + }; + }; + var getRuntimeConfig = (config) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig$1(config); + emitWarningIfUnsupportedVersion$1(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? loadConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE + }, config), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + var getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }; + var resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; + }; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); + }; + + class SigninClient extends Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveUserAgentConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveRegionConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveEndpointConfig(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use(getSchemaSerdePlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultSigninHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + } + var command = makeBuilder(commonParams, "Signin", "SigninClient", getEndpointPlugin); + var _ep0 = { + IsControlPlane: { type: "staticContextParams", value: false } + }; + var _ep1 = { + IsOAuthEndpoint: { type: "staticContextParams", value: true } + }; + var _mw0 = (Command, cs, config, o) => []; + + class CreateOAuth2TokenCommand extends command(_ep0, _mw0, "CreateOAuth2Token", CreateOAuth2Token$) { + } + + class CreateOAuth2TokenWithIAMCommand extends command(_ep1, _mw0, "CreateOAuth2TokenWithIAM", CreateOAuth2TokenWithIAM$) { + } + var commands = { + CreateOAuth2TokenCommand, + CreateOAuth2TokenWithIAMCommand + }; + + class Signin extends SigninClient { + } + createAggregatedClient(commands, Signin); + var OAuth2ErrorCode = { + AUTHCODE_EXPIRED: "AUTHCODE_EXPIRED", + CONFLICT: "CONFLICT", + INSUFFICIENT_PERMISSIONS: "INSUFFICIENT_PERMISSIONS", + INVALID_REQUEST: "INVALID_REQUEST", + RESOURCE_NOT_FOUND: "RESOURCE_NOT_FOUND", + SERVER_ERROR: "server_error", + SERVICE_QUOTA_EXCEEDED: "SERVICE_QUOTA_EXCEEDED", + TOKEN_EXPIRED: "TOKEN_EXPIRED", + USER_CREDENTIALS_CHANGED: "USER_CREDENTIALS_CHANGED" + }; + exports.AccessDeniedException = AccessDeniedException; + exports.AccessDeniedException$ = AccessDeniedException$; + exports.AccessToken$ = AccessToken$; + exports.CreateOAuth2Token$ = CreateOAuth2Token$; + exports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand; + exports.CreateOAuth2TokenRequest$ = CreateOAuth2TokenRequest$; + exports.CreateOAuth2TokenRequestBody$ = CreateOAuth2TokenRequestBody$; + exports.CreateOAuth2TokenResponse$ = CreateOAuth2TokenResponse$; + exports.CreateOAuth2TokenResponseBody$ = CreateOAuth2TokenResponseBody$; + exports.CreateOAuth2TokenWithIAM$ = CreateOAuth2TokenWithIAM$; + exports.CreateOAuth2TokenWithIAMCommand = CreateOAuth2TokenWithIAMCommand; + exports.CreateOAuth2TokenWithIAMRequest$ = CreateOAuth2TokenWithIAMRequest$; + exports.CreateOAuth2TokenWithIAMResponse$ = CreateOAuth2TokenWithIAMResponse$; + exports.InternalServerException = InternalServerException; + exports.InternalServerException$ = InternalServerException$; + exports.OAuth2ErrorCode = OAuth2ErrorCode; + exports.Signin = Signin; + exports.SigninClient = SigninClient; + exports.SigninServiceException = SigninServiceException; + exports.SigninServiceException$ = SigninServiceException$; + exports.TooManyRequestsError = TooManyRequestsError; + exports.TooManyRequestsError$ = TooManyRequestsError$; + exports.ValidationException = ValidationException; + exports.ValidationException$ = ValidationException$; + exports.errorTypeRegistries = errorTypeRegistries; +}); + +// node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +var require_dist_cjs12 = __commonJS(function(exports) { + var { setCredentialFeature } = require_client2(); + var { CredentialsProviderError, parseKnownFiles, getProfileName } = require_config(); + var { HttpRequest } = require_protocols(); + var { createHash, createPrivateKey, createPublicKey, sign } = __require("node:crypto"); + var { promises } = __require("node:fs"); + var { homedir } = __require("node:os"); + var { dirname, join } = __require("node:path"); + + class LoginCredentialsFetcher { + profileData; + init; + callerClientConfig; + static REFRESH_THRESHOLD = 5 * 60 * 1000; + constructor(profileData, init, callerClientConfig) { + this.profileData = profileData; + this.init = init; + this.callerClientConfig = callerClientConfig; + } + async loadCredentials() { + const token = await this.loadToken(); + if (!token) { + throw new CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger }); + } + const accessToken = token.accessToken; + const now = Date.now(); + const expiryTime = new Date(accessToken.expiresAt).getTime(); + const timeUntilExpiry = expiryTime - now; + if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) { + return this.refresh(token); + } + return this.toCredentials(token.accessToken); + } + get logger() { + return this.init?.logger; + } + get loginSession() { + return this.profileData.login_session; + } + toCredentials(token) { + return { + accessKeyId: token.accessKeyId, + secretAccessKey: token.secretAccessKey, + sessionToken: token.sessionToken, + accountId: token.accountId, + expiration: new Date(token.expiresAt) + }; + } + async refresh(token) { + const diskToken = await this.loadToken().catch(() => token); + const now = Date.now(); + const diskExpiry = new Date(diskToken.accessToken.expiresAt).getTime(); + const tokenExpiry = new Date(token.accessToken.expiresAt).getTime(); + const freshToken = diskExpiry <= now && tokenExpiry > now ? token : diskToken; + const freshExpiry = new Date(freshToken.accessToken.expiresAt).getTime(); + if (freshExpiry - Date.now() > LoginCredentialsFetcher.REFRESH_THRESHOLD) { + return this.toCredentials(freshToken.accessToken); + } + const { SigninClient, CreateOAuth2TokenCommand } = require_signin(); + const { logger, userAgentAppId } = this.callerClientConfig ?? {}; + const isH2 = (requestHandler) => { + return requestHandler?.metadata?.handlerProtocol === "h2"; + }; + const requestHandler = isH2(this.callerClientConfig?.requestHandler) ? undefined : this.callerClientConfig?.requestHandler; + const region = this.profileData.region ?? await this.callerClientConfig?.region?.() ?? process.env.AWS_REGION; + const client = new SigninClient({ + credentials: { + accessKeyId: "", + secretAccessKey: "" + }, + region, + requestHandler, + logger, + userAgentAppId, + ...this.init?.clientConfig + }); + this.createDPoPInterceptor(client.middlewareStack); + const commandInput = { + tokenInput: { + clientId: freshToken.clientId, + refreshToken: freshToken.refreshToken, + grantType: "refresh_token" + } + }; + try { + const response = await client.send(new CreateOAuth2TokenCommand(commandInput)); + const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {}; + const { refreshToken, expiresIn } = response.tokenOutput ?? {}; + if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) { + throw new CredentialsProviderError("Token refresh response missing required fields", { + logger: this.logger, + tryNextLink: false + }); + } + const expiresInMs = (expiresIn ?? 900) * 1000; + const expiration = new Date(Date.now() + expiresInMs); + const updatedToken = { + ...freshToken, + accessToken: { + ...freshToken.accessToken, + accessKeyId, + secretAccessKey, + sessionToken, + expiresAt: expiration.toISOString() + }, + refreshToken + }; + await this.saveToken(updatedToken); + return this.toCredentials(updatedToken.accessToken); + } catch (error) { + if (error.name === "AccessDeniedException") { + const errorType = error.error; + let message; + switch (errorType) { + case "TOKEN_EXPIRED": + message = "Your session has expired. Please reauthenticate."; + break; + case "USER_CREDENTIALS_CHANGED": + message = "Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password."; + break; + case "INSUFFICIENT_PERMISSIONS": + message = "Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action."; + break; + default: + message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \`aws login\``; + } + throw new CredentialsProviderError(message, { + logger: this.logger, + tryNextLink: false + }); + } + const tokenExpiry = new Date(freshToken.accessToken.expiresAt).getTime(); + if (tokenExpiry > Date.now()) { + this.logger?.warn?.(`Failed to refresh token: ${String(error)}. Using existing token until expiry.`); + return this.toCredentials(freshToken.accessToken); + } + throw new CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger }); + } + } + async loadToken() { + const tokenFilePath = this.getTokenFilePath(); + try { + const tokenData = await promises.readFile(tokenFilePath, "utf8"); + const token = JSON.parse(tokenData); + const missingFields = ["accessToken", "clientId", "refreshToken", "dpopKey"].filter((k) => !token[k]); + if (!token.accessToken?.accountId) { + missingFields.push("accountId"); + } + if (missingFields.length > 0) { + throw new CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, { + logger: this.logger, + tryNextLink: false + }); + } + return token; + } catch (error) { + throw new CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, { + logger: this.logger, + tryNextLink: false + }); + } + } + async saveToken(token) { + const tokenFilePath = this.getTokenFilePath(); + const directory = dirname(tokenFilePath); + try { + await promises.mkdir(directory, { recursive: true }); + } catch (error) {} + await promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8"); + } + getTokenFilePath() { + const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join(homedir(), ".aws", "login", "cache"); + const loginSessionBytes = Buffer.from(this.loginSession, "utf8"); + const loginSessionSha256 = createHash("sha256").update(loginSessionBytes).digest("hex"); + return join(directory, `${loginSessionSha256}.json`); + } + derToRawSignature(derSignature) { + let offset = 2; + if (derSignature[offset] !== 2) { + throw new Error("Invalid DER signature"); + } + offset++; + const rLength = derSignature[offset++]; + let r = derSignature.subarray(offset, offset + rLength); + offset += rLength; + if (derSignature[offset] !== 2) { + throw new Error("Invalid DER signature"); + } + offset++; + const sLength = derSignature[offset++]; + let s = derSignature.subarray(offset, offset + sLength); + r = r[0] === 0 ? r.subarray(1) : r; + s = s[0] === 0 ? s.subarray(1) : s; + const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]); + const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]); + return Buffer.concat([rPadded, sPadded]); + } + createDPoPInterceptor(middlewareStack) { + middlewareStack.add((next) => async (args) => { + if (HttpRequest.isInstance(args.request)) { + const request = args.request; + const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : ""}${request.path}`; + const dpop = await this.generateDpop(request.method, actualEndpoint); + request.headers = { + ...request.headers, + DPoP: dpop + }; + } + return next(args); + }, { + step: "finalizeRequest", + name: "dpopInterceptor", + override: true + }); + } + async generateDpop(method = "POST", endpoint) { + const token = await this.loadToken(); + try { + const privateKey = createPrivateKey({ + key: token.dpopKey, + format: "pem", + type: "sec1" + }); + const publicKey = createPublicKey(privateKey); + const publicDer = publicKey.export({ format: "der", type: "spki" }); + let pointStart = -1; + for (let i = 0;i < publicDer.length; i++) { + if (publicDer[i] === 4) { + pointStart = i; + break; + } + } + const x = publicDer.slice(pointStart + 1, pointStart + 33); + const y = publicDer.slice(pointStart + 33, pointStart + 65); + const header = { + alg: "ES256", + typ: "dpop+jwt", + jwk: { + kty: "EC", + crv: "P-256", + x: x.toString("base64url"), + y: y.toString("base64url") + } + }; + const payload = { + jti: crypto.randomUUID(), + htm: method, + htu: endpoint, + iat: Math.floor(Date.now() / 1000) + }; + const headerB64 = Buffer.from(JSON.stringify(header)).toString("base64url"); + const payloadB64 = Buffer.from(JSON.stringify(payload)).toString("base64url"); + const message = `${headerB64}.${payloadB64}`; + const asn1Signature = sign("sha256", Buffer.from(message), privateKey); + const rawSignature = this.derToRawSignature(asn1Signature); + const signatureB64 = rawSignature.toString("base64url"); + return `${message}.${signatureB64}`; + } catch (error) { + throw new CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false }); + } + } + } + var fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => { + init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials"); + const profiles = await parseKnownFiles(init || {}); + const profileName = getProfileName({ + profile: init?.profile ?? callerClientConfig?.profile + }); + const profile = profiles[profileName]; + if (!profile?.login_session) { + throw new CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, { + tryNextLink: true, + logger: init?.logger + }); + } + const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig); + const credentials = await fetcher.loadCredentials(); + return setCredentialFeature(credentials, "CREDENTIALS_LOGIN", "AD"); + }; + exports.fromLoginCredentials = fromLoginCredentials; +}); + +// node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +var require_dist_cjs13 = __commonJS(function(exports) { + var { externalDataInterceptor, CredentialsProviderError, parseKnownFiles, getProfileName } = require_config(); + var { exec } = __require("node:child_process"); + var { promisify } = __require("node:util"); + var { setCredentialFeature } = require_client2(); + var getValidatedProcessCredentials = (profileName, data, profiles) => { + if (data.Version !== 1) { + throw Error(`Profile ${profileName} credential_process did not return Version 1.`); + } + if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) { + throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); + } + if (data.Expiration) { + const currentTime = new Date; + const expireTime = new Date(data.Expiration); + if (expireTime < currentTime) { + throw Error(`Profile ${profileName} credential_process returned expired credentials.`); + } + } + let accountId = data.AccountId; + if (!accountId && profiles?.[profileName]?.aws_account_id) { + accountId = profiles[profileName].aws_account_id; + } + const credentials = { + accessKeyId: data.AccessKeyId, + secretAccessKey: data.SecretAccessKey, + ...data.SessionToken && { sessionToken: data.SessionToken }, + ...data.Expiration && { expiration: new Date(data.Expiration) }, + ...data.CredentialScope && { credentialScope: data.CredentialScope }, + ...accountId && { accountId } + }; + setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w"); + return credentials; + }; + var resolveProcessCredentials = async (profileName, profiles, logger) => { + const profile = profiles[profileName]; + if (profiles[profileName]) { + const credentialProcess = profile["credential_process"]; + if (credentialProcess !== undefined) { + const execPromise = promisify(externalDataInterceptor?.getTokenRecord?.().exec ?? exec); + try { + const { stdout } = await execPromise(credentialProcess); + let data; + try { + data = JSON.parse(stdout.trim()); + } catch { + throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); + } + return getValidatedProcessCredentials(profileName, data, profiles); + } catch (error) { + throw new CredentialsProviderError(error.message, { logger }); + } + } else { + throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger }); + } + } else { + throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, { + logger + }); + } + }; + var fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => { + init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess"); + const profiles = await parseKnownFiles(init); + return resolveProcessCredentials(getProfileName({ + profile: init.profile ?? callerClientConfig?.profile + }), profiles, init.logger); + }; + exports.fromProcess = fromProcess; +}); + +// node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +var require_dist_cjs14 = __commonJS(function(exports) { + var { setCredentialFeature } = require_client2(); + var { CredentialsProviderError, externalDataInterceptor } = require_config(); + var { readFileSync } = __require("node:fs"); + var fromWebToken = (init) => async (awsIdentityProperties) => { + init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken"); + const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init; + let { roleAssumerWithWebIdentity } = init; + if (!roleAssumerWithWebIdentity) { + const { getDefaultRoleAssumerWithWebIdentity } = require_sts(); + roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({ + ...init.clientConfig, + credentialProviderLogger: init.logger, + parentClientConfig: { + ...awsIdentityProperties?.callerClientConfig, + ...init.parentClientConfig + } + }, init.clientPlugins); + } + return roleAssumerWithWebIdentity({ + RoleArn: roleArn, + RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`, + WebIdentityToken: webIdentityToken, + ProviderId: providerId, + PolicyArns: policyArns, + Policy: policy, + DurationSeconds: durationSeconds + }); + }; + var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; + var ENV_ROLE_ARN = "AWS_ROLE_ARN"; + var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; + var fromTokenFile = (init = {}) => async (awsIdentityProperties) => { + init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile"); + const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE]; + const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN]; + const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME]; + if (!webIdentityTokenFile || !roleArn) { + throw new CredentialsProviderError("Web identity configuration not specified", { + logger: init.logger + }); + } + const credentials = await fromWebToken({ + ...init, + webIdentityToken: externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? readFileSync(webIdentityTokenFile, { encoding: "ascii" }), + roleArn, + roleSessionName + })(awsIdentityProperties); + if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) { + setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h"); + } + return credentials; + }; + exports.fromTokenFile = fromTokenFile; + exports.fromWebToken = fromWebToken; +}); + +// node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +var require_dist_cjs15 = __commonJS(function(exports) { + var { CredentialsProviderError, chain, getProfileName, parseKnownFiles } = require_config(); + var { setCredentialFeature } = require_client2(); + var resolveCredentialSource = (credentialSource, profileName, logger) => { + const sourceProvidersMap = { + EcsContainer: async (options) => { + const { fromHttp } = require_dist_cjs9(); + const { fromContainerMetadata } = require_dist_cjs7(); + logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"); + return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider); + }, + Ec2InstanceMetadata: async (options) => { + logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata"); + const { fromInstanceMetadata } = require_dist_cjs7(); + return async () => fromInstanceMetadata(options)().then(setNamedProvider); + }, + Environment: async (options) => { + logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment"); + const { fromEnv } = require_dist_cjs6(); + return async () => fromEnv(options)().then(setNamedProvider); + } + }; + if (credentialSource in sourceProvidersMap) { + return sourceProvidersMap[credentialSource]; + } else { + throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` + `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger }); + } + }; + var setNamedProvider = (creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p"); + var isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => { + return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })); + }; + var isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => { + const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined"; + if (withSourceProfile) { + logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`); + } + return withSourceProfile; + }; + var isCredentialSourceProfile = (arg, { profile, logger }) => { + const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined"; + if (withProviderProfile) { + logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`); + } + return withProviderProfile; + }; + var resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => { + options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)"); + const profileData = profiles[profileName]; + const { source_profile, region } = profileData; + if (!options.roleAssumer) { + const { getDefaultRoleAssumer } = require_sts(); + options.roleAssumer = getDefaultRoleAssumer({ + ...options.clientConfig, + credentialProviderLogger: options.logger, + parentClientConfig: { + ...callerClientConfig, + ...options?.parentClientConfig, + region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region + } + }, options.clientPlugins); + } + if (source_profile && source_profile in visitedProfiles) { + throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` + ` ${getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger }); + } + options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`); + const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, callerClientConfig, { + ...visitedProfiles, + [source_profile]: true + }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))(); + if (isCredentialSourceWithoutRoleArn(profileData)) { + return sourceCredsProvider.then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o")); + } else { + const params = { + RoleArn: profileData.role_arn, + RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`, + ExternalId: profileData.external_id, + DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10) + }; + const { mfa_serial } = profileData; + if (mfa_serial) { + if (!options.mfaCodeProvider) { + throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false }); + } + params.SerialNumber = mfa_serial; + params.TokenCode = await options.mfaCodeProvider(mfa_serial); + } + const sourceCreds = await sourceCredsProvider; + return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o")); + } + }; + var isCredentialSourceWithoutRoleArn = (section) => { + return !section.role_arn && !!section.credential_source; + }; + var isLoginProfile = (data) => { + return Boolean(data && data.login_session); + }; + var resolveLoginCredentials = async (profileName, options, callerClientConfig) => { + const { fromLoginCredentials } = require_dist_cjs12(); + const credentials = await fromLoginCredentials({ + ...options, + profile: profileName + })({ callerClientConfig }); + return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC"); + }; + var isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string"; + var resolveProcessCredentials = async (options, profile) => { + const { fromProcess } = require_dist_cjs13(); + const credentials = await fromProcess({ + ...options, + profile + })(); + return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_PROCESS", "v"); + }; + var resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => { + const { fromSSO } = require_dist_cjs11(); + return fromSSO({ + profile, + logger: options.logger, + parentClientConfig: options.parentClientConfig, + clientConfig: options.clientConfig + })({ + callerClientConfig + }).then((creds) => { + if (profileData.sso_session) { + return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r"); + } else { + return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t"); + } + }); + }; + var isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"); + var isStaticCredsProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1; + var resolveStaticCredentials = async (profile, options) => { + options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"); + const credentials = { + accessKeyId: profile.aws_access_key_id, + secretAccessKey: profile.aws_secret_access_key, + sessionToken: profile.aws_session_token, + ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }, + ...profile.aws_account_id && { accountId: profile.aws_account_id } + }; + return setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n"); + }; + var isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1; + var resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => { + const { fromTokenFile } = require_dist_cjs14(); + const credentials = await fromTokenFile({ + webIdentityTokenFile: profile.web_identity_token_file, + roleArn: profile.role_arn, + roleSessionName: profile.role_session_name, + roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity, + logger: options.logger, + parentClientConfig: options.parentClientConfig + })({ + callerClientConfig + }); + return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q"); + }; + var resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => { + const data = profiles[profileName]; + if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) { + return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData); + } + if (isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isWebIdentityProfile(data)) { + return resolveWebIdentityCredentials(data, options, callerClientConfig); + } + if (isProcessProfile(data)) { + return resolveProcessCredentials(options, profileName); + } + if (isSsoProfile(data)) { + return await resolveSsoCredentials(profileName, data, options, callerClientConfig); + } + if (isLoginProfile(data)) { + return resolveLoginCredentials(profileName, options, callerClientConfig); + } + throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger }); + }; + var fromIni = (init = {}) => async ({ callerClientConfig } = {}) => { + init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni"); + const profiles = await parseKnownFiles(init); + return resolveProfileData(getProfileName({ + profile: init.profile ?? callerClientConfig?.profile + }), profiles, init, callerClientConfig); + }; + exports.fromIni = fromIni; +}); + +// node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +var require_dist_cjs16 = __commonJS(function(exports) { + var { ENV_KEY, ENV_SECRET, fromEnv } = require_dist_cjs6(); + var { chain, CredentialsProviderError, ENV_PROFILE } = require_config(); + var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; + var remoteProvider = async (init) => { + const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = require_dist_cjs7(); + if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) { + init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata"); + const { fromHttp } = require_dist_cjs9(); + return chain(fromHttp(init), fromContainerMetadata(init)); + } + if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") { + return async () => { + throw new CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger }); + }; + } + init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"); + return fromInstanceMetadata(init); + }; + function memoizeChain(providers, treatAsExpired) { + const chain = internalCreateChain(providers); + let activeLock; + let passiveLock; + let credentials; + let forceRefreshLock; + const provider = async (options) => { + if (options?.forceRefresh) { + if (!forceRefreshLock) { + forceRefreshLock = chain(options).then((c) => { + credentials = c; + }).finally(() => { + forceRefreshLock = undefined; + }); + } + await forceRefreshLock; + return credentials; + } + if (credentials?.expiration) { + if (credentials?.expiration?.getTime() < Date.now()) { + credentials = undefined; + } + } + if (activeLock) { + await activeLock; + } else if (!credentials || treatAsExpired?.(credentials)) { + if (credentials) { + if (!passiveLock) { + passiveLock = chain(options).then((c) => { + credentials = c; + }).catch(() => {}).finally(() => { + passiveLock = undefined; + }); + } + } else { + activeLock = chain(options).then((c) => { + credentials = c; + }).finally(() => { + activeLock = undefined; + }); + return provider(options); + } + } + return credentials; + }; + return provider; + } + var internalCreateChain = (providers) => async (awsIdentityProperties) => { + let lastProviderError; + for (const provider of providers) { + try { + return await provider(awsIdentityProperties); + } catch (err) { + lastProviderError = err; + if (err?.tryNextLink) { + continue; + } + throw err; + } + } + throw lastProviderError; + }; + var multipleCredentialSourceWarningEmitted = false; + var defaultProvider = (init = {}) => memoizeChain([ + async () => { + const profile = init.profile ?? process.env[ENV_PROFILE]; + if (profile) { + const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET]; + if (envStaticCredentialsAreSet) { + if (!multipleCredentialSourceWarningEmitted) { + const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn.bind(init.logger) : console.warn; + warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING: + Multiple credential sources detected: + Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set. + This SDK will proceed with the AWS_PROFILE value. + + However, a future version may change this behavior to prefer the ENV static credentials. + Please ensure that your environment only sets either the AWS_PROFILE or the + AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair. +`); + multipleCredentialSourceWarningEmitted = true; + } + } + throw new CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", { + logger: init.logger, + tryNextLink: true + }); + } + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"); + return fromEnv(init)(); + }, + async (awsIdentityProperties) => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + throw new CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger }); + } + const { fromSSO } = require_dist_cjs11(); + return fromSSO(init)(awsIdentityProperties); + }, + async (awsIdentityProperties) => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni"); + const { fromIni } = require_dist_cjs15(); + return fromIni(init)(awsIdentityProperties); + }, + async (awsIdentityProperties) => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess"); + const { fromProcess } = require_dist_cjs13(); + return fromProcess(init)(awsIdentityProperties); + }, + async (awsIdentityProperties) => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile"); + const { fromTokenFile } = require_dist_cjs14(); + return fromTokenFile(init)(awsIdentityProperties); + }, + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"); + return (await remoteProvider(init))(); + }, + async () => { + throw new CredentialsProviderError("Could not load credentials from any providers", { + tryNextLink: false, + logger: init.logger + }); + } + ], credentialsTreatedAsExpired); + var credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined; + var credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000; + exports.credentialsTreatedAsExpired = credentialsTreatedAsExpired; + exports.credentialsWillNeedRefresh = credentialsWillNeedRefresh; + exports.defaultProvider = defaultProvider; +}); + +// node_modules/@aws-sdk/checksums/dist-cjs/submodules/sha/index.js +var require_sha = __commonJS(function(exports) { + var { toUint8Array, concatBytes } = require_serde(); + var { createHmac, createHash } = __require("node:crypto"); + var { Sha256, Sha256Js, Sha256Node } = require_checksum(); + exports.Sha256 = Sha256; + exports.Sha256Js = Sha256Js; + exports.Sha256Node = Sha256Node; + var BLOCK = 64; + var DIGEST_LENGTH = 20; + var INIT = new Int32Array([1732584193, 4023233417, 2562383102, 271733878, 3285377520]); + var K = new Int32Array([1518500249, 1859775393, 2400959708, 3395469782]); + + class Sha1Js { + digestLength = DIGEST_LENGTH; + state = Int32Array.from(INIT); + w; + buffer = new Uint8Array(BLOCK); + bufferLength = 0; + bytesHashed = 0; + finished = false; + inner; + outer; + constructor(secret) { + if (secret) { + const key = Sha1Js.normalizeKey(secret); + this.inner = new Sha1Js; + this.outer = new Sha1Js; + const pad = new Uint8Array(BLOCK * 2); + for (let i = 0;i < BLOCK; ++i) { + pad[i] = 54 ^ key[i]; + pad[i + BLOCK] = 92 ^ key[i]; + } + this.inner.update(pad.subarray(0, BLOCK)); + this.outer.update(pad.subarray(BLOCK)); + } + } + update(data) { + if (this.finished) { + throw new Error("Attempted to update an already finished HMAC."); + } + if (this.inner) { + this.inner.update(data); + return; + } + let pos = 0; + let { length } = data; + this.bytesHashed += length; + if (this.bufferLength > 0) { + while (length > 0 && this.bufferLength < BLOCK) { + this.buffer[this.bufferLength++] = data[pos++]; + --length; + } + if (this.bufferLength === BLOCK) { + this.hashBuffer(this.buffer, 0); + this.bufferLength = 0; + } + } + while (length >= BLOCK) { + this.hashBuffer(data, pos); + pos += BLOCK; + length -= BLOCK; + } + while (length > 0) { + this.buffer[this.bufferLength++] = data[pos++]; + --length; + } + } + async digest() { + if (this.inner && this.outer) { + if (this.finished) { + throw new Error("Attempted to digest an already finished HMAC."); + } + this.finished = true; + const innerDigest = this.inner.digestSync(); + this.outer.update(innerDigest); + return this.outer.digestSync(); + } + return this.digestSync(); + } + reset() { + this.state = Int32Array.from(INIT); + this.buffer = new Uint8Array(BLOCK); + this.bufferLength = 0; + this.bytesHashed = 0; + } + digestSync() { + const state = this.state.slice(); + const buffer = this.buffer.slice(); + let bufferLength = this.bufferLength; + const bitsHi = this.bytesHashed / 536870912 | 0; + const bitsLo = this.bytesHashed << 3; + buffer[bufferLength++] = 128; + if (bufferLength > BLOCK - 8) { + for (let i = bufferLength;i < BLOCK; ++i) { + buffer[i] = 0; + } + this.hashBufferWith(state, buffer, 0); + bufferLength = 0; + } + for (let i = bufferLength;i < BLOCK - 8; ++i) { + buffer[i] = 0; + } + const v = new DataView(buffer.buffer, buffer.byteOffset, BLOCK); + v.setUint32(BLOCK - 8, bitsHi, false); + v.setUint32(BLOCK - 4, bitsLo, false); + this.hashBufferWith(state, buffer, 0); + const out = new Uint8Array(DIGEST_LENGTH); + out[0] = state[0] >>> 24 & 255; + out[1] = state[0] >>> 16 & 255; + out[2] = state[0] >>> 8 & 255; + out[3] = state[0] & 255; + out[4] = state[1] >>> 24 & 255; + out[5] = state[1] >>> 16 & 255; + out[6] = state[1] >>> 8 & 255; + out[7] = state[1] & 255; + out[8] = state[2] >>> 24 & 255; + out[9] = state[2] >>> 16 & 255; + out[10] = state[2] >>> 8 & 255; + out[11] = state[2] & 255; + out[12] = state[3] >>> 24 & 255; + out[13] = state[3] >>> 16 & 255; + out[14] = state[3] >>> 8 & 255; + out[15] = state[3] & 255; + out[16] = state[4] >>> 24 & 255; + out[17] = state[4] >>> 16 & 255; + out[18] = state[4] >>> 8 & 255; + out[19] = state[4] & 255; + return out; + } + static normalizeKey(secret) { + const key = toUint8Array(secret); + if (key.byteLength > BLOCK) { + const h = new Sha1Js; + h.update(key); + const digest = h.digestSync(); + const padded = new Uint8Array(BLOCK); + padded.set(digest); + return padded; + } + const padded = new Uint8Array(BLOCK); + padded.set(key); + return padded; + } + hashBuffer(data, offset) { + this.hashBufferWith(this.state, data, offset); + } + hashBufferWith(state, data, offset) { + const w = this.w ??= new Int32Array(80); + let s0 = state[0], s1 = state[1], s2 = state[2], s3 = state[3], s4 = state[4]; + for (let t = 0;t < 16; ++t) { + w[t] = (data[offset + t * 4] & 255) << 24 | (data[offset + t * 4 + 1] & 255) << 16 | (data[offset + t * 4 + 2] & 255) << 8 | data[offset + t * 4 + 3] & 255; + } + for (let t = 16;t < 80; ++t) { + const x = w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]; + w[t] = x << 1 | x >>> 31; + } + for (let t = 0;t < 80; ++t) { + const r = t < 20 ? 0 : t < 40 ? 1 : t < 60 ? 2 : 3; + const temp = ((s0 << 5 | s0 >>> 27) + (r === 0 ? s1 & s2 ^ ~s1 & s3 : r === 2 ? s1 & s2 ^ s1 & s3 ^ s2 & s3 : s1 ^ s2 ^ s3) | 0) + (s4 + (K[r] + w[t] | 0) | 0) | 0; + s4 = s3; + s3 = s2; + s2 = s1 << 30 | s1 >>> 2; + s1 = s0; + s0 = temp; + } + state[0] = state[0] + s0 | 0; + state[1] = state[1] + s1 | 0; + state[2] = state[2] + s2 | 0; + state[3] = state[3] + s3 | 0; + state[4] = state[4] + s4 | 0; + } + } + var hasNativeCrypto = (() => { + try { + createHash("sha1"); + return true; + } catch { + return false; + } + })(); + var Sha1Node = hasNativeCrypto ? buildNativeClass() : Sha1Js; + function buildNativeClass() { + return class Sha1Node { + digestLength = 20; + secret; + hash; + isHmac; + finished = false; + constructor(secret) { + this.secret = secret; + this.isHmac = !!secret; + this.hash = this.createHash(); + } + update(data) { + if (this.finished) { + throw new Error("Attempted to update an already finished hash."); + } + this.hash.update(data); + } + async digest() { + let buf; + if (this.isHmac) { + this.finished = true; + buf = this.hash.digest(); + } else { + buf = this.hash.copy().digest(); + } + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + reset() { + this.hash = this.createHash(); + this.finished = false; + } + createHash() { + return this.secret ? createHmac("sha1", toBuffer(this.secret)) : createHash("sha1"); + } + }; + } + function toBuffer(data) { + if (typeof data === "string") { + return data; + } + if (ArrayBuffer.isView(data)) { + return Buffer.from(data.buffer, data.byteOffset, data.byteLength); + } + return Buffer.from(data); + } + var { digest, sign, importKey } = globalThis?.crypto?.subtle ?? {}; + var subtle = typeof digest === "function" && typeof sign === "function" && typeof importKey === "function" ? globalThis.crypto.subtle : undefined; + var MAX_PENDING_BYTES = 8 * 1024 * 1024; + + class Sha1WebCrypto { + digestLength = 20; + secret; + pending = []; + pendingBytes = 0; + fallback; + finished = false; + constructor(secret) { + if (secret) { + this.secret = toUint8Array(secret); + } + } + update(data) { + if (this.finished) { + throw new Error("Attempted to update an already finished HMAC."); + } + if (this.fallback) { + this.fallback.update(data); + return; + } + this.pending.push(data.slice()); + this.pendingBytes += data.byteLength; + if (this.pendingBytes >= MAX_PENDING_BYTES) { + this.switchToFallback(); + } + } + async digest() { + if (this.fallback) { + return this.fallback.digest(); + } + if (this.secret && this.finished) { + throw new Error("Attempted to digest an already finished HMAC."); + } + const data = concatBytes(this.pending); + if (subtle) { + if (this.secret) { + this.finished = true; + const key = await subtle.importKey("raw", this.secret, { name: "HMAC", hash: "SHA-1" }, false, ["sign"]); + const sig = await subtle.sign("HMAC", key, data); + return new Uint8Array(sig); + } + const hash = await subtle.digest("SHA-1", data); + return new Uint8Array(hash); + } + const sha1 = new Sha1Js(this.secret); + sha1.update(data); + return sha1.digest(); + } + reset() { + this.pending = []; + this.pendingBytes = 0; + this.fallback = undefined; + this.finished = false; + } + switchToFallback() { + const sha1Js = new Sha1Js(this.secret); + for (const chunk of this.pending) { + sha1Js.update(chunk); + } + this.fallback = sha1Js; + this.pending = []; + this.pendingBytes = 0; + } + } + exports.Sha1 = Sha1Node; + exports.Sha1Js = Sha1Js; + exports.Sha1Node = Sha1Node; + exports.Sha1WebCrypto = Sha1WebCrypto; +}); + +// node_modules/@aws-sdk/client-s3/dist-cjs/index.js +var require_dist_cjs17 = __commonJS(function(exports) { + var { getFlexibleChecksumsPlugin, NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS, NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, resolveFlexibleChecksumsConfig } = require_flexible_checksums(); + var { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client2(); + var { getThrow200ExceptionsPlugin, getSsecPlugin, getLocationConstraintPlugin, getS3ExpiresMiddlewarePlugin, getCheckContentLengthHeaderPlugin, S3RestXmlProtocol, NODE_USE_ARN_REGION_CONFIG_OPTIONS, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, resolveS3Config, getValidateBucketNamePlugin, getAddExpectContinuePlugin, getRegionRedirectMiddlewarePlugin, getS3ExpressPlugin, getS3ExpressHttpSigningPlugin } = require_s3(); + var { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require_dist_cjs2(); + var { normalizeProvider, getSmithyContext, makeBuilder, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, createWaiter, checkExceptions, WaiterState, createAggregatedClient } = require_client(); + var { Command: $Command } = require_client(); + exports.$Command = $Command; + exports.__Client = Client; + var { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require_config(); + var { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveParams, getEndpointPlugin, resolveEndpointConfig } = require_endpoints(); + var { eventStreamSerdeProvider, resolveEventStreamSerdeConfig } = require_event_streams(); + var { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols(); + var { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require_retry(); + var { TypeRegistry, getSchemaSerdePlugin } = require_schema(); + var { resolveAwsSdkSigV4Config, resolveAwsSdkSigV4AConfig, AwsSdkSigV4Signer, AwsSdkSigV4ASigner, NODE_SIGV4A_CONFIG_OPTIONS, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes(); + var { SignatureV4MultiRegion } = require_dist_cjs4(); + var { defaultProvider } = require_dist_cjs16(); + var { Sha256, Md5, readableStreamHasher } = require_checksum(); + var { toUtf8, fromUtf8, sdkStreamMixin, getAwsChunkedEncodingStream, toBase64, fromBase64, calculateBodyLength } = require_serde(); + var { streamCollector, NodeHttpHandler } = require_dist_cjs8(); + var { Sha1 } = require_sha(); + var aw = "ref"; + var ax = "argv"; + var ay = "backend"; + var az = "authSchemes"; + var aA = "disableDoubleEncoding"; + var aB = "signingName"; + var aC = "signingRegion"; + var aD = "signingRegionSet"; + var a = -1; + var b = true; + var c = false; + var d = "isSet"; + var e = "booleanEquals"; + var f = "stringEquals"; + var g = "coalesce"; + var h = "substring"; + var i = ""; + var j = "aws.partition"; + var k = "partitionResult"; + var l = "accessPointSuffix"; + var m = "regionPrefix"; + var n = (n) => "outpostId_ssa_" + n + i; + var o = "hardwareType"; + var p = "ite"; + var q = "isValidHostLabel"; + var s = "sigv4"; + var t = "aws.isVirtualHostableS3Bucket"; + var u = "url"; + var v = "getAttr"; + var w = "bucketArn"; + var x = "--"; + var y = "arnType"; + var z = "accesspoint"; + var A = (n) => "accessPointName_ssa_" + n + i; + var B = "s3-object-lambda"; + var C = "s3-outposts"; + var D = "bucketPartition"; + var E = "us-east-1"; + var F = "outpostType"; + var G = "name"; + var H = "s3"; + var I = "{url#scheme}://{Bucket}.{url#authority}{url#path}"; + var J = "{url#scheme}://{url#authority}{url#path}"; + var K = "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}"; + var L = "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}"; + var M = "https://{Bucket}.s3.{partitionResult#dnsSuffix}"; + var N = (n) => "{url#scheme}://{accessPointName_ssa_" + n + "}-{bucketArn#accountId}.{url#authority}{url#path}"; + var O = (n) => "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName_ssa_" + n + "}`"; + var P = "sigv4a"; + var Q = "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}"; + var R = "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}"; + var S = "https://s3.{partitionResult#dnsSuffix}"; + var T = { [aw]: "UseFIPS" }; + var U = { [aw]: "UseDualStack" }; + var V = { [aw]: "Bucket" }; + var W = { fn: v, [ax]: [{ [aw]: k }, G] }; + var X = { [aw]: u }; + var Y = { [aw]: "Region" }; + var Z = { [aw]: w }; + var aa = { [aw]: y }; + var ab = { [aw]: "accessPointName_ssa_1" }; + var ac = { fn: v, [ax]: [Z, "region"] }; + var ad = { [aw]: o }; + var ae = { fn: v, [ax]: [Z, "service"] }; + var af = { fn: v, [ax]: [Z, "accountId"] }; + var ag = { [ay]: "S3Express", [az]: [{ [aA]: true, [G]: "{_s3e_auth}", [aB]: "s3express", [aC]: "{Region}" }] }; + var ah = { [ay]: "S3Express", [az]: [{ [aA]: true, [G]: s, [aB]: "s3express", [aC]: "{Region}" }] }; + var ai = { [az]: [{ [aA]: true, [G]: P, [aB]: C, [aD]: ["*"] }, { [aA]: true, [G]: s, [aB]: C, [aC]: "{Region}" }] }; + var aj = { [az]: [{ [aA]: true, [G]: s, [aB]: H, [aC]: E }] }; + var ak = { [az]: [{ [aA]: true, [G]: s, [aB]: H, [aC]: "{Region}" }] }; + var al = { [az]: [{ [aA]: true, [G]: s, [aB]: B, [aC]: "{bucketArn#region}" }] }; + var am = { [az]: [{ [aA]: true, [G]: s, [aB]: H, [aC]: "{bucketArn#region}" }] }; + var an = { [az]: [{ [aA]: true, [G]: P, [aB]: C, [aD]: ["*"] }, { [aA]: true, [G]: s, [aB]: C, [aC]: "{bucketArn#region}" }] }; + var ao = { [az]: [{ [aA]: true, [G]: s, [aB]: B, [aC]: "{Region}" }] }; + var ap = [Y]; + var aq = [{ [aw]: "Endpoint" }]; + var as = [V]; + var at = [V, 0, 7, true]; + var au = [Z, "resourceId[1]"]; + var av = ["*"]; + var _data = { + conditions: [ + [d, ap], + [e, [{ [aw]: "Accelerate" }, b]], + [e, [T, b]], + [e, [U, b]], + [d, aq], + [d, as], + [f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 0, 6, b] }, i] }, "--x-s3"]], + [f, [{ fn: g, [ax]: [{ fn: h, [ax]: at }, i] }, "--xa-s3"]], + [j, ap, k], + [h, at, l], + [f, [{ [aw]: l }, "--op-s3"]], + [h, [V, 8, 12, b], m], + [h, [V, 32, 49, b], n(2)], + [h, [V, 49, 50, b], o], + [e, [{ [aw]: "ForcePathStyle" }, b]], + [f, [W, "aws-cn"]], + [p, [U, ".dualstack", i], "_s3e_ds"], + [q, [{ [aw]: n(2) }, c]], + [p, [T, "-fips", i], "_s3e_fips"], + [p, [{ fn: g, [ax]: [{ [aw]: "DisableS3ExpressSessionAuth" }, c] }, s, "sigv4-s3express"], "_s3e_auth"], + [t, [V, c]], + ["parseURL", aq, u], + [e, [{ fn: g, [ax]: [{ [aw]: "UseS3ExpressControlEndpoint" }, c] }, b]], + [t, [V, b]], + [f, [{ fn: v, [ax]: [X, "scheme"] }, "http"]], + [q, [Y, c]], + ["aws.parseArn", as, w], + [v, [{ fn: "split", [ax]: [V, x, 0] }, "[-2]"], "s3expressAvailabilityZoneId"], + [f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 0, 4, c] }, i] }, "arn:"]], + [f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 16, 18, b] }, i] }, x]], + [e, [{ fn: v, [ax]: [X, "isIp"] }, b]], + [f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 21, 23, b] }, i] }, x]], + [f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 27, 29, b] }, i] }, x]], + [f, [{ [aw]: m }, "beta"]], + ["uriEncode", as, "uri_encoded_bucket"], + [q, [Y, b]], + [e, [{ fn: g, [ax]: [{ [aw]: "UseObjectLambdaEndpoint" }, c] }, b]], + [v, [Z, "resourceId[0]"], y], + [f, [aa, i]], + [f, [aa, z]], + [v, au, A(1)], + [f, [ab, i]], + [f, [ac, i]], + [f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 14, 16, b] }, i] }, x]], + [f, [ad, "e"]], + [f, [ad, "o"]], + [f, [Y, "aws-global"]], + [f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 19, 21, b] }, i] }, x]], + [f, [ae, B]], + [e, [{ fn: g, [ax]: [{ [aw]: "DisableAccessPoints" }, c] }, b]], + [f, [ae, C]], + [j, [ac], D], + [q, [ab, b]], + [f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 26, 28, b] }, i] }, x]], + [f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 15, 17, b] }, i] }, x]], + [v, [Z, "resourceId[4]"]], + [f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 20, 22, b] }, i] }, x]], + [e, [{ [aw]: "UseGlobalEndpoint" }, b]], + [f, [Y, E]], + [v, au, n(1)], + [e, [{ fn: g, [ax]: [{ [aw]: "UseArnRegion" }, b] }, b]], + [q, [{ [aw]: n(1) }, c]], + [v, [Z, "resourceId[2]"], F], + [f, [Y, ac]], + [f, [{ fn: v, [ax]: [{ [aw]: D }, G] }, W]], + [e, [{ [aw]: "DisableMultiRegionAccessPoints" }, b]], + [q, [ac, b]], + [f, [{ fn: v, [ax]: [Z, "partition"] }, W]], + [f, [af, i]], + [f, [ae, H]], + [q, [af, c]], + [v, [Z, "resourceId[3]"], A(2)], + [q, [ab, c]], + [f, [{ [aw]: F }, z]], + [q, [{ [aw]: A(2) }, c]] + ], + results: [ + [a], + [a, "Accelerate cannot be used with FIPS"], + [a, "Cannot set dual-stack in combination with a custom endpoint."], + [a, "A custom endpoint cannot be combined with FIPS"], + [a, "A custom endpoint cannot be combined with S3 Accelerate"], + [a, "Partition does not support FIPS"], + [a, "S3Express does not support S3 Accelerate."], + ["{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", ag], + [I, ag], + [a, "S3Express bucket name is not a valid virtual hostable name."], + ["https://s3express-control{_s3e_fips}{_s3e_ds}.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", ah], + ["https://{Bucket}.s3express{_s3e_fips}-{s3expressAvailabilityZoneId}{_s3e_ds}.{Region}.{partitionResult#dnsSuffix}", ag], + [a, "Unrecognized S3Express bucket name format."], + [J, ag], + ["https://s3express-control{_s3e_fips}{_s3e_ds}.{Region}.{partitionResult#dnsSuffix}", ah], + [a, "Expected a endpoint to be specified but no endpoint was found"], + ["https://{Bucket}.ec2.{url#authority}", ai], + ["https://{Bucket}.ec2.s3-outposts.{Region}.{partitionResult#dnsSuffix}", ai], + ["https://{Bucket}.op-{outpostId_ssa_2}.{url#authority}", ai], + ["https://{Bucket}.op-{outpostId_ssa_2}.s3-outposts.{Region}.{partitionResult#dnsSuffix}", ai], + [a, 'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"'], + [a, "Invalid Outposts Bucket alias - it must be a valid bucket name."], + [a, "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`."], + [a, "Custom endpoint `{Endpoint}` was not a valid URI"], + [a, "S3 Accelerate cannot be used in this region"], + ["https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", aj], + ["https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", ak], + ["https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", aj], + ["https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", ak], + ["https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", aj], + ["https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", ak], + ["https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", aj], + ["https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", ak], + [K, aj], + [I, aj], + [K, ak], + [I, ak], + [L, aj], + [L, ak], + [M, aj], + [M, ak], + ["https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", ak], + [a, "Invalid region: region was not a valid DNS name."], + [a, "S3 Object Lambda does not support Dual-stack"], + [a, "S3 Object Lambda does not support S3 Accelerate"], + [a, "Access points are not supported for this operation"], + [a, "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`"], + [a, "Invalid ARN: Missing account id"], + [N(1), al], + ["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", al], + ["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", al], + [a, O(1)], + [a, "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`"], + [a, "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)"], + [a, "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`"], + [a, "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."], + [a, "Invalid ARN: bucket ARN is missing a region"], + [a, "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided"], + [a, "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`"], + [a, "Access Points do not support S3 Accelerate"], + ["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", am], + ["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", am], + ["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", am], + [N(1), am], + ["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", am], + [a, "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}"], + [a, "S3 MRAP does not support dual-stack"], + [a, "S3 MRAP does not support FIPS"], + [a, "S3 MRAP does not support S3 Accelerate"], + [a, "Invalid configuration: Multi-Region Access Point ARNs are disabled."], + ["https://{accessPointName_ssa_1}.accesspoint.s3-global.{partitionResult#dnsSuffix}", { [az]: [{ [aA]: b, name: P, [aB]: H, [aD]: av }] }], + [a, "Client was configured for partition `{partitionResult#name}` but bucket referred to partition `{bucketArn#partition}`"], + [a, "Invalid Access Point Name"], + [a, "S3 Outposts does not support Dual-stack"], + [a, "S3 Outposts does not support FIPS"], + [a, "S3 Outposts does not support S3 Accelerate"], + [a, "Invalid Arn: Outpost Access Point ARN contains sub resources"], + ["https://{accessPointName_ssa_2}-{bucketArn#accountId}.{outpostId_ssa_1}.{url#authority}", an], + ["https://{accessPointName_ssa_2}-{bucketArn#accountId}.{outpostId_ssa_1}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", an], + [a, O(2)], + [a, "Expected an outpost type `accesspoint`, found {outpostType}"], + [a, "Invalid ARN: expected an access point name"], + [a, "Invalid ARN: Expected a 4-component resource"], + [a, "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId_ssa_1}`"], + [a, "Invalid ARN: The Outpost Id was not set"], + [a, "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})"], + [a, "Invalid ARN: No ARN type specified"], + [a, "Invalid ARN: `{Bucket}` was not a valid ARN"], + [a, "Path-style addressing cannot be used with ARN buckets"], + ["https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", aj], + ["https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", ak], + ["https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", aj], + ["https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", ak], + ["https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", aj], + ["https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", ak], + [Q, aj], + [Q, ak], + [R, aj], + [R, ak], + ["https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", ak], + [a, "Path-style addressing cannot be used with S3 Accelerate"], + [J, ao], + ["https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", ao], + ["https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", ao], + ["https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", aj], + ["https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", ak], + ["https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", aj], + ["https://s3-fips.{Region}.{partitionResult#dnsSuffix}", ak], + ["https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", aj], + ["https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", ak], + [J, aj], + [J, ak], + [S, aj], + [S, ak], + ["https://s3.{Region}.{partitionResult#dnsSuffix}", ak], + [a, "A region must be set when sending requests to S3."] + ] + }; + var root = 2; + var r = 1e8; + var nodes = new Int32Array([ + -1, + 1, + -1, + 0, + 3, + r + 115, + 1, + 424, + 4, + 2, + 272, + 5, + 3, + 233, + 6, + 4, + 85, + 7, + 5, + 15, + 8, + 8, + 9, + r + 115, + 16, + 10, + 13, + 18, + 11, + 13, + 19, + 12, + 13, + 22, + r + 14, + 13, + 35, + 14, + r + 42, + 36, + r + 103, + 435, + 6, + 271, + 16, + 7, + 270, + 17, + 8, + 19, + 18, + 14, + 501, + 106, + 9, + 20, + 24, + 10, + 21, + 24, + 11, + 22, + 24, + 12, + 23, + 24, + 13, + 547, + 24, + 14, + 77, + 25, + 20, + 73, + 26, + 26, + 27, + 78, + 37, + 28, + r + 86, + 38, + r + 86, + 29, + 39, + 47, + 30, + 48, + r + 58, + 31, + 50, + 32, + r + 85, + 51, + 33, + 136, + 55, + r + 76, + 34, + 59, + 35, + r + 84, + 60, + 39, + 36, + 61, + 37, + r + 83, + 62, + 38, + 146, + 63, + 41, + r + 46, + 61, + 40, + r + 83, + 62, + 41, + 150, + 64, + 42, + r + 54, + 66, + 43, + r + 53, + 70, + 44, + r + 52, + 71, + 45, + r + 81, + 73, + 46, + r + 80, + 74, + r + 78, + r + 79, + 40, + 48, + r + 57, + 41, + r + 57, + 49, + 42, + 185, + 50, + 48, + 62, + 51, + 49, + r + 45, + 52, + 51, + 53, + 526, + 60, + 56, + 54, + 62, + r + 55, + 55, + 63, + 57, + r + 46, + 62, + r + 55, + 57, + 64, + 58, + r + 54, + 66, + 59, + r + 53, + 69, + 60, + r + 65, + 70, + 61, + r + 52, + 72, + r + 64, + r + 51, + 49, + r + 45, + 63, + 51, + 64, + 526, + 60, + 67, + 65, + 62, + r + 55, + 66, + 63, + 68, + r + 46, + 62, + r + 55, + 68, + 64, + 69, + r + 54, + 66, + 70, + r + 53, + 68, + r + 47, + 71, + 70, + 72, + r + 52, + 72, + r + 50, + r + 51, + 25, + 74, + r + 42, + 46, + r + 39, + 75, + 57, + 76, + r + 41, + 58, + r + 40, + r + 41, + 26, + r + 88, + 78, + 28, + r + 87, + 79, + 34, + 82, + 80, + 35, + 81, + 545, + 36, + r + 103, + r + 115, + 46, + r + 97, + 83, + 57, + 84, + r + 99, + 58, + r + 98, + r + 99, + 5, + 101, + 86, + 8, + 87, + r + 115, + 16, + 88, + 89, + 18, + 91, + 89, + 19, + 90, + 92, + 21, + 97, + 95, + 19, + 93, + 92, + 21, + 98, + 95, + 21, + 97, + 94, + 22, + r + 14, + 95, + 35, + 96, + r + 42, + 36, + r + 103, + r + 42, + 22, + r + 13, + 98, + 35, + 99, + r + 42, + 36, + r + 101, + 100, + 46, + r + 110, + r + 111, + 6, + 214, + 102, + 7, + 208, + 103, + 8, + 119, + 104, + 14, + 118, + 105, + 21, + 106, + r + 23, + 26, + 107, + 502, + 37, + 108, + r + 86, + 38, + r + 86, + 109, + 39, + 112, + 110, + 48, + r + 58, + 111, + 50, + 136, + r + 85, + 40, + 113, + r + 57, + 41, + r + 57, + 114, + 42, + 115, + 500, + 48, + r + 56, + 116, + 52, + 117, + r + 72, + 65, + r + 69, + r + 72, + 21, + 501, + r + 23, + 9, + 120, + 124, + 10, + 121, + 124, + 11, + 122, + 124, + 12, + 123, + 124, + 13, + 202, + 124, + 14, + 195, + 125, + 20, + 190, + 126, + 21, + 127, + r + 23, + 23, + 128, + 129, + 24, + 189, + 129, + 26, + 130, + 197, + 37, + 131, + r + 86, + 38, + r + 86, + 132, + 39, + 159, + 133, + 48, + r + 58, + 134, + 50, + 135, + r + 85, + 51, + 141, + 136, + 55, + r + 76, + 137, + 59, + 138, + r + 84, + 60, + r + 83, + 139, + 61, + 140, + r + 83, + 63, + r + 83, + r + 46, + 55, + r + 76, + 142, + 59, + 143, + r + 84, + 60, + 148, + 144, + 61, + 145, + r + 83, + 62, + 147, + 146, + 63, + 150, + r + 46, + 63, + 153, + r + 46, + 61, + 149, + r + 83, + 62, + 153, + 150, + 64, + 151, + r + 54, + 66, + 152, + r + 53, + 70, + r + 82, + r + 52, + 64, + 154, + r + 54, + 66, + 155, + r + 53, + 70, + 156, + r + 52, + 71, + 157, + r + 81, + 73, + 158, + r + 80, + 74, + r + 77, + r + 79, + 40, + 160, + r + 57, + 41, + r + 57, + 161, + 42, + 185, + 162, + 48, + 174, + 163, + 49, + r + 45, + 164, + 51, + 165, + 526, + 60, + 168, + 166, + 62, + r + 55, + 167, + 63, + 169, + r + 46, + 62, + r + 55, + 169, + 64, + 170, + r + 54, + 66, + 171, + r + 53, + 69, + 172, + r + 65, + 70, + 173, + r + 52, + 72, + r + 63, + r + 51, + 49, + r + 45, + 175, + 51, + 176, + 526, + 60, + 179, + 177, + 62, + r + 55, + 178, + 63, + 180, + r + 46, + 62, + r + 55, + 180, + 64, + 181, + r + 54, + 66, + 182, + r + 53, + 68, + r + 47, + 183, + 70, + 184, + r + 52, + 72, + r + 48, + r + 51, + 48, + r + 56, + 186, + 52, + 187, + r + 72, + 65, + r + 69, + 188, + 67, + r + 70, + r + 71, + 25, + r + 36, + r + 42, + 21, + 191, + r + 23, + 25, + 192, + r + 42, + 30, + 194, + 193, + 46, + r + 34, + r + 36, + 46, + r + 33, + r + 35, + 21, + 196, + r + 23, + 26, + r + 88, + 197, + 28, + r + 87, + 198, + 34, + 201, + 199, + 35, + 200, + 545, + 36, + r + 101, + r + 115, + 46, + r + 95, + r + 96, + 17, + 203, + r + 22, + 20, + 204, + r + 21, + 21, + 205, + 550, + 33, + 206, + 550, + 44, + r + 16, + 207, + 45, + r + 18, + r + 20, + 8, + 209, + 215, + 16, + 210, + 220, + 18, + 211, + 220, + 19, + 212, + 224, + 20, + 213, + 227, + 21, + 231, + 401, + 8, + 218, + 215, + 19, + 216, + r + 9, + 20, + 217, + 227, + 21, + 231, + r + 9, + 16, + 219, + 220, + 18, + 223, + 220, + 19, + 221, + 224, + 20, + 222, + 227, + 21, + 231, + r + 12, + 19, + 226, + 224, + 20, + 225, + r + 9, + 21, + r + 9, + r + 12, + 20, + 230, + 227, + 21, + 228, + r + 9, + 30, + 229, + r + 9, + 34, + r + 7, + r + 9, + 21, + 231, + 415, + 30, + 232, + r + 8, + 34, + r + 7, + r + 8, + 4, + r + 2, + 234, + 5, + 235, + 480, + 6, + 271, + 236, + 7, + 270, + 237, + 8, + 238, + 491, + 9, + 239, + 243, + 10, + 240, + 243, + 11, + 241, + 243, + 12, + 242, + 243, + 13, + 547, + 243, + 14, + 266, + 244, + 20, + 264, + 245, + 26, + 246, + 267, + 37, + 247, + r + 86, + 38, + r + 86, + 248, + 39, + 249, + 518, + 40, + 250, + r + 57, + 41, + r + 57, + 251, + 42, + 538, + 252, + 48, + r + 43, + 253, + 49, + r + 45, + 254, + 51, + 255, + 526, + 60, + 258, + 256, + 62, + r + 55, + 257, + 63, + 259, + r + 46, + 62, + r + 55, + 259, + 64, + 260, + r + 54, + 66, + 261, + r + 53, + 69, + 262, + r + 65, + 70, + 263, + r + 52, + 72, + r + 62, + r + 51, + 25, + 265, + r + 42, + 46, + r + 31, + r + 32, + 26, + r + 88, + 267, + 28, + r + 87, + 268, + 34, + 269, + 544, + 46, + r + 93, + r + 94, + 8, + 397, + r + 9, + 8, + 407, + r + 9, + 3, + 346, + 273, + 4, + r + 3, + 274, + 5, + 284, + 275, + 8, + 276, + r + 115, + 15, + r + 5, + 277, + 16, + 278, + 281, + 18, + 279, + 281, + 19, + 280, + 281, + 22, + r + 14, + 281, + 35, + 282, + r + 42, + 36, + r + 102, + 283, + 46, + r + 106, + r + 107, + 6, + 405, + 285, + 7, + 395, + 286, + 8, + 295, + 287, + 14, + 501, + 288, + 26, + 289, + 502, + 37, + 290, + r + 86, + 38, + r + 86, + 291, + 39, + 292, + 307, + 40, + 293, + r + 57, + 41, + r + 57, + 294, + 42, + 335, + 500, + 9, + 296, + 300, + 10, + 297, + 300, + 11, + 298, + 300, + 12, + 299, + 300, + 13, + 394, + 300, + 14, + 339, + 301, + 15, + r + 5, + 302, + 20, + 337, + 303, + 26, + 304, + 341, + 37, + 305, + r + 86, + 38, + r + 86, + 306, + 39, + 309, + 307, + 48, + r + 58, + 308, + 50, + r + 74, + r + 85, + 40, + 310, + r + 57, + 41, + r + 57, + 311, + 42, + 335, + 312, + 48, + 324, + 313, + 49, + r + 45, + 314, + 51, + 315, + 526, + 60, + 318, + 316, + 62, + r + 55, + 317, + 63, + 319, + r + 46, + 62, + r + 55, + 319, + 64, + 320, + r + 54, + 66, + 321, + r + 53, + 69, + 322, + r + 65, + 70, + 323, + r + 52, + 72, + r + 61, + r + 51, + 49, + r + 45, + 325, + 51, + 326, + 526, + 60, + 329, + 327, + 62, + r + 55, + 328, + 63, + 330, + r + 46, + 62, + r + 55, + 330, + 64, + 331, + r + 54, + 66, + 332, + r + 53, + 68, + r + 47, + 333, + 70, + 334, + r + 52, + 72, + r + 49, + r + 51, + 48, + r + 56, + 336, + 52, + r + 67, + r + 72, + 25, + 338, + r + 42, + 46, + r + 27, + r + 28, + 15, + r + 5, + 340, + 26, + r + 88, + 341, + 28, + r + 87, + 342, + 34, + 345, + 343, + 35, + 344, + 545, + 36, + r + 102, + r + 115, + 46, + r + 91, + r + 92, + 4, + r + 2, + 347, + 5, + 357, + 348, + 8, + 349, + r + 115, + 15, + r + 5, + 350, + 16, + 351, + 354, + 18, + 352, + 354, + 19, + 353, + 354, + 22, + r + 14, + 354, + 35, + 355, + r + 42, + 36, + r + 43, + 356, + 46, + r + 104, + r + 105, + 6, + 405, + 358, + 7, + 395, + 359, + 8, + 360, + 491, + 9, + 361, + 365, + 10, + 362, + 365, + 11, + 363, + 365, + 12, + 364, + 365, + 13, + 394, + 365, + 14, + 389, + 366, + 15, + r + 5, + 367, + 20, + 387, + 368, + 26, + 369, + 391, + 37, + 370, + r + 86, + 38, + r + 86, + 371, + 39, + 372, + 518, + 40, + 373, + r + 57, + 41, + r + 57, + 374, + 42, + 538, + 375, + 48, + r + 43, + 376, + 49, + r + 45, + 377, + 51, + 378, + 526, + 60, + 381, + 379, + 62, + r + 55, + 380, + 63, + 382, + r + 46, + 62, + r + 55, + 382, + 64, + 383, + r + 54, + 66, + 384, + r + 53, + 69, + 385, + r + 65, + 70, + 386, + r + 52, + 72, + r + 60, + r + 51, + 25, + 388, + r + 42, + 46, + r + 25, + r + 26, + 15, + r + 5, + 390, + 26, + r + 88, + 391, + 28, + r + 87, + 392, + 34, + 393, + 544, + 46, + r + 89, + r + 90, + 15, + r + 5, + 547, + 8, + 396, + r + 9, + 15, + r + 5, + 397, + 16, + 398, + 410, + 18, + 399, + 410, + 19, + 400, + 410, + 20, + 401, + r + 9, + 27, + 402, + r + 12, + 29, + r + 11, + 403, + 31, + r + 11, + 404, + 32, + r + 11, + 422, + 8, + 406, + r + 9, + 15, + r + 5, + 407, + 16, + 408, + 410, + 18, + 409, + 410, + 19, + 411, + 410, + 20, + r + 12, + r + 9, + 20, + 414, + 412, + 22, + 413, + r + 9, + 34, + r + 10, + r + 9, + 22, + 416, + 415, + 27, + 419, + r + 12, + 27, + 418, + 417, + 34, + r + 10, + r + 12, + 34, + r + 10, + 419, + 43, + r + 11, + 420, + 47, + r + 11, + 421, + 53, + r + 11, + 422, + 54, + r + 11, + 423, + 56, + r + 11, + r + 12, + 2, + r + 1, + 425, + 3, + 478, + 426, + 4, + r + 4, + 427, + 5, + 438, + 428, + 8, + 429, + r + 115, + 16, + 430, + 433, + 18, + 431, + 433, + 19, + 432, + 433, + 22, + r + 14, + 433, + 35, + 434, + r + 42, + 36, + r + 44, + 435, + 46, + r + 112, + 436, + 57, + 437, + r + 114, + 58, + r + 113, + r + 114, + 6, + r + 6, + 439, + 7, + r + 6, + 440, + 8, + 450, + 441, + 14, + 501, + 442, + 26, + 443, + 502, + 37, + 444, + r + 86, + 38, + r + 86, + 445, + 39, + 446, + 465, + 40, + 447, + r + 57, + 41, + r + 57, + 448, + 42, + 471, + 449, + 48, + r + 44, + 500, + 9, + 451, + 455, + 10, + 452, + 455, + 11, + 453, + 455, + 12, + 454, + 455, + 13, + 547, + 455, + 14, + 473, + 456, + 15, + 460, + 457, + 20, + 458, + 461, + 25, + 459, + r + 42, + 46, + r + 37, + r + 38, + 20, + 540, + 461, + 26, + 462, + 474, + 37, + 463, + r + 86, + 38, + r + 86, + 464, + 39, + 467, + 465, + 48, + r + 58, + 466, + 50, + r + 75, + r + 85, + 40, + 468, + r + 57, + 41, + r + 57, + 469, + 42, + 471, + 470, + 48, + r + 44, + 524, + 48, + r + 44, + 472, + 52, + r + 68, + r + 72, + 26, + r + 88, + 474, + 28, + r + 87, + 475, + 34, + r + 100, + 476, + 35, + 477, + 545, + 36, + r + 44, + r + 115, + 4, + r + 2, + 479, + 5, + 488, + 480, + 8, + 481, + r + 115, + 16, + 482, + 485, + 18, + 483, + 485, + 19, + 484, + 485, + 22, + r + 14, + 485, + 35, + 486, + r + 42, + 36, + r + 43, + 487, + 46, + r + 108, + r + 109, + 6, + r + 6, + 489, + 7, + r + 6, + 490, + 8, + 503, + 491, + 14, + 501, + 492, + 26, + 493, + 502, + 37, + 494, + r + 86, + 38, + r + 86, + 495, + 39, + 496, + 518, + 40, + 497, + r + 57, + 41, + r + 57, + 498, + 42, + 538, + 499, + 48, + r + 43, + 500, + 49, + r + 45, + 526, + 26, + r + 88, + 502, + 28, + r + 87, + r + 115, + 9, + 504, + 508, + 10, + 505, + 508, + 11, + 506, + 508, + 12, + 507, + 508, + 13, + 547, + 508, + 14, + 541, + 509, + 15, + 513, + 510, + 20, + 511, + 514, + 25, + 512, + r + 42, + 46, + r + 29, + r + 30, + 20, + 540, + 514, + 26, + 515, + 542, + 37, + 516, + r + 86, + 38, + r + 86, + 517, + 39, + 520, + 518, + 48, + r + 58, + 519, + 50, + r + 73, + r + 85, + 40, + 521, + r + 57, + 41, + r + 57, + 522, + 42, + 538, + 523, + 48, + r + 43, + 524, + 49, + r + 45, + 525, + 51, + 529, + 526, + 60, + r + 55, + 527, + 62, + r + 55, + 528, + 63, + r + 55, + r + 46, + 60, + 532, + 530, + 62, + r + 55, + 531, + 63, + 533, + r + 46, + 62, + r + 55, + 533, + 64, + 534, + r + 54, + 66, + 535, + r + 53, + 69, + 536, + r + 65, + 70, + 537, + r + 52, + 72, + r + 59, + r + 51, + 48, + r + 43, + 539, + 52, + r + 66, + r + 72, + 25, + r + 24, + r + 42, + 26, + r + 88, + 542, + 28, + r + 87, + 543, + 34, + r + 100, + 544, + 35, + 546, + 545, + 36, + r + 42, + r + 115, + 36, + r + 43, + r + 115, + 17, + 548, + r + 22, + 20, + 549, + r + 21, + 33, + 552, + 550, + 44, + r + 17, + 551, + 45, + r + 19, + r + 20, + 44, + r + 15, + 553, + 45, + r + 15, + r + 20 + ]); + var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results); + var cache = new EndpointCache({ + size: 50, + params: [ + "Accelerate", + "Bucket", + "DisableAccessPoints", + "DisableMultiRegionAccessPoints", + "DisableS3ExpressSessionAuth", + "Endpoint", + "ForcePathStyle", + "Region", + "UseArnRegion", + "UseDualStack", + "UseFIPS", + "UseGlobalEndpoint", + "UseObjectLambdaEndpoint", + "UseS3ExpressControlEndpoint" + ] + }); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return cache.get(endpointParams, () => decideEndpoint(bdd, { + endpointParams, + logger: context.logger + })); + }; + customEndpointFunctions.aws = awsEndpointFunctions; + var createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => { + if (!input) { + throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`"); + } + const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input); + const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor?.getEndpointParameterInstructions; + if (!instructionsFn) { + throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`); + } + const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config); + return Object.assign(defaultParameters, endpointParameters); + }; + var _defaultS3HttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: getSmithyContext(context).operation, + region: await normalizeProvider(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + var defaultS3HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider); + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "s3", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; + } + function createAwsAuthSigv4aHttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4a", + signingProperties: { + name: "s3", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; + } + var createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => { + const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => { + const endpoint = defaultEndpointResolver(authParameters); + const authSchemes = endpoint.properties?.authSchemes; + if (!authSchemes) { + return defaultHttpAuthSchemeResolver(authParameters); + } + const options = []; + for (const scheme of authSchemes) { + const { name: resolvedName, properties = {}, ...rest } = scheme; + const name = resolvedName.toLowerCase(); + if (resolvedName !== name) { + console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`); + } + let schemeId; + if (name === "sigv4a") { + schemeId = "aws.auth#sigv4a"; + const sigv4Present = authSchemes.find((s) => { + const name = s.name.toLowerCase(); + return name !== "sigv4a" && name.startsWith("sigv4"); + }); + if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) { + continue; + } + } else if (name.startsWith("sigv4")) { + schemeId = "aws.auth#sigv4"; + } else { + throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`); + } + const createOption = createHttpAuthOptionFunctions[schemeId]; + if (!createOption) { + throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`); + } + const option = createOption(authParameters); + option.schemeId = schemeId; + option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties }; + options.push(option); + } + return options; + }; + return endpointRuleSetHttpAuthSchemeProvider; + }; + var _defaultS3HttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + options.push(createAwsAuthSigv4aHttpAuthOption(authParameters)); + } + } + return options; + }; + var defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, { + "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption, + "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption + }); + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = resolveAwsSdkSigV4Config(config); + const config_1 = resolveAwsSdkSigV4AConfig(config_0); + return Object.assign(config_1, { + authSchemePreference: normalizeProvider(config.authSchemePreference ?? []) + }); + }; + var resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useFipsEndpoint: options.useFipsEndpoint ?? false, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + forcePathStyle: options.forcePathStyle ?? false, + useAccelerateEndpoint: options.useAccelerateEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + disableMultiregionAccessPoints: options.disableMultiregionAccessPoints ?? false, + defaultSigningName: "s3", + clientContextParams: options.clientContextParams ?? {} + }); + }; + var commonParams = { + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var command = makeBuilder(commonParams, "AmazonS3", "S3Client", getEndpointPlugin); + var _ep0 = { + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }; + var _ep1 = { + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + CopySource: { type: "contextParams", name: "CopySource" } + }; + var _ep2 = { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + DisableAccessPoints: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }; + var _ep3 = { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }; + var _ep4 = { + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }; + var _ep5 = { + Bucket: { type: "contextParams", name: "Bucket" } + }; + var _ep6 = {}; + var _ep7 = { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true } + }; + var _ep8 = { + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }; + var _ep9 = { + UseObjectLambdaEndpoint: { type: "staticContextParams", value: true } + }; + var _mw0 = (Command, cs, config, o) => [ + getThrow200ExceptionsPlugin(config) + ]; + var _mw1 = (Command, cs, config, o) => [ + getThrow200ExceptionsPlugin(config), + getSsecPlugin(config) + ]; + var _mw2 = (Command, cs, config, o) => [ + getThrow200ExceptionsPlugin(config), + getLocationConstraintPlugin(config) + ]; + var _mw3 = (Command, cs, config, o) => [ + getFlexibleChecksumsPlugin(config, { + requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + var _mw4 = (Command, cs, config, o) => []; + var _mw5 = (Command, cs, config, o) => [ + getFlexibleChecksumsPlugin(config, { + requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config) + ]; + var _mw6 = (Command, cs, config, o) => [ + getFlexibleChecksumsPlugin(config, { + requestChecksumRequired: false, + requestValidationModeMember: "ChecksumMode", + responseAlgorithms: ["CRC64NVME", "CRC32", "CRC32C", "SHA256", "SHA1", "SHA512", "MD5", "XXHASH64", "XXHASH3", "XXHASH128"] + }) + ]; + var _mw7 = (Command, cs, config, o) => [ + getFlexibleChecksumsPlugin(config, { + requestChecksumRequired: false, + requestValidationModeMember: "ChecksumMode", + responseAlgorithms: ["CRC64NVME", "CRC32", "CRC32C", "SHA256", "SHA1", "SHA512", "MD5", "XXHASH64", "XXHASH3", "XXHASH128"] + }), + getSsecPlugin(config), + getS3ExpiresMiddlewarePlugin(config) + ]; + var _mw8 = (Command, cs, config, o) => [ + getThrow200ExceptionsPlugin(config), + getSsecPlugin(config), + getS3ExpiresMiddlewarePlugin(config) + ]; + var _mw9 = (Command, cs, config, o) => [ + getFlexibleChecksumsPlugin(config, { + requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, + requestChecksumRequired: false + }) + ]; + var _mw10 = (Command, cs, config, o) => [ + getFlexibleChecksumsPlugin(config, { + requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getThrow200ExceptionsPlugin(config) + ]; + var _mw11 = (Command, cs, config, o) => [ + getFlexibleChecksumsPlugin(config, { + requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getCheckContentLengthHeaderPlugin(config), + getThrow200ExceptionsPlugin(config), + getSsecPlugin(config) + ]; + var _mw12 = (Command, cs, config, o) => [ + getSsecPlugin(config) + ]; + var _mw13 = (Command, cs, config, o) => [ + getFlexibleChecksumsPlugin(config, { + requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getThrow200ExceptionsPlugin(config), + getSsecPlugin(config) + ]; + + class S3ServiceException extends ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, S3ServiceException.prototype); + } + } + + class NoSuchUpload extends S3ServiceException { + name = "NoSuchUpload"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchUpload", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchUpload.prototype); + } + } + + class AccessDenied extends S3ServiceException { + name = "AccessDenied"; + $fault = "client"; + constructor(opts) { + super({ + name: "AccessDenied", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AccessDenied.prototype); + } + } + + class ObjectNotInActiveTierError extends S3ServiceException { + name = "ObjectNotInActiveTierError"; + $fault = "client"; + constructor(opts) { + super({ + name: "ObjectNotInActiveTierError", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ObjectNotInActiveTierError.prototype); + } + } + + class BucketAlreadyExists extends S3ServiceException { + name = "BucketAlreadyExists"; + $fault = "client"; + constructor(opts) { + super({ + name: "BucketAlreadyExists", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, BucketAlreadyExists.prototype); + } + } + + class BucketAlreadyOwnedByYou extends S3ServiceException { + name = "BucketAlreadyOwnedByYou"; + $fault = "client"; + constructor(opts) { + super({ + name: "BucketAlreadyOwnedByYou", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, BucketAlreadyOwnedByYou.prototype); + } + } + + class NoSuchBucket extends S3ServiceException { + name = "NoSuchBucket"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchBucket", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchBucket.prototype); + } + } + + class NoSuchKey extends S3ServiceException { + name = "NoSuchKey"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchKey", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchKey.prototype); + } + } + + class InvalidObjectState extends S3ServiceException { + name = "InvalidObjectState"; + $fault = "client"; + StorageClass; + AccessTier; + constructor(opts) { + super({ + name: "InvalidObjectState", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidObjectState.prototype); + this.StorageClass = opts.StorageClass; + this.AccessTier = opts.AccessTier; + } + } + + class NoSuchAnnotation extends S3ServiceException { + name = "NoSuchAnnotation"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchAnnotation", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchAnnotation.prototype); + } + } + + class NotFound extends S3ServiceException { + name = "NotFound"; + $fault = "client"; + constructor(opts) { + super({ + name: "NotFound", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NotFound.prototype); + } + } + + class InvalidPrefix extends S3ServiceException { + name = "InvalidPrefix"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidPrefix", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidPrefix.prototype); + } + } + + class EncryptionTypeMismatch extends S3ServiceException { + name = "EncryptionTypeMismatch"; + $fault = "client"; + constructor(opts) { + super({ + name: "EncryptionTypeMismatch", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, EncryptionTypeMismatch.prototype); + } + } + + class InvalidRequest extends S3ServiceException { + name = "InvalidRequest"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidRequest", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidRequest.prototype); + } + } + + class InvalidWriteOffset extends S3ServiceException { + name = "InvalidWriteOffset"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidWriteOffset", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidWriteOffset.prototype); + } + } + + class TooManyParts extends S3ServiceException { + name = "TooManyParts"; + $fault = "client"; + constructor(opts) { + super({ + name: "TooManyParts", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, TooManyParts.prototype); + } + } + + class AnnotationLimitExceeded extends S3ServiceException { + name = "AnnotationLimitExceeded"; + $fault = "client"; + constructor(opts) { + super({ + name: "AnnotationLimitExceeded", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AnnotationLimitExceeded.prototype); + } + } + + class AnnotationNameTooLong extends S3ServiceException { + name = "AnnotationNameTooLong"; + $fault = "client"; + constructor(opts) { + super({ + name: "AnnotationNameTooLong", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AnnotationNameTooLong.prototype); + } + } + + class InvalidAnnotationName extends S3ServiceException { + name = "InvalidAnnotationName"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidAnnotationName", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidAnnotationName.prototype); + } + } + + class UnsupportedMediaType extends S3ServiceException { + name = "UnsupportedMediaType"; + $fault = "client"; + constructor(opts) { + super({ + name: "UnsupportedMediaType", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, UnsupportedMediaType.prototype); + } + } + + class IdempotencyParameterMismatch extends S3ServiceException { + name = "IdempotencyParameterMismatch"; + $fault = "client"; + constructor(opts) { + super({ + name: "IdempotencyParameterMismatch", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, IdempotencyParameterMismatch.prototype); + } + } + + class ObjectAlreadyInActiveTierError extends S3ServiceException { + name = "ObjectAlreadyInActiveTierError"; + $fault = "client"; + constructor(opts) { + super({ + name: "ObjectAlreadyInActiveTierError", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ObjectAlreadyInActiveTierError.prototype); + } + } + var _A = "Account"; + var _AAO = "AnalyticsAndOperator"; + var _AC = "AccelerateConfiguration"; + var _ACL = "AccessControlList"; + var _ACL_ = "ACL"; + var _ACLn = "AnalyticsConfigurationList"; + var _ACP = "AccessControlPolicy"; + var _ACT = "AccessControlTranslation"; + var _ACn = "AnalyticsConfiguration"; + var _ACnn = "AnnotationCount"; + var _AD = "AccessDenied"; + var _ADb = "AbortDate"; + var _ADn = "AnnotationDirective"; + var _AE = "AnnotationEntry"; + var _AED = "AnalyticsExportDestination"; + var _AF = "AnalyticsFilter"; + var _AH = "AllowedHeaders"; + var _AHl = "AllowedHeader"; + var _AI = "AccountId"; + var _AIMU = "AbortIncompleteMultipartUpload"; + var _AKI = "AccessKeyId"; + var _AL = "AnnotationList"; + var _ALE = "AnnotationLimitExceeded"; + var _AM = "AllowedMethods"; + var _AMU = "AbortMultipartUpload"; + var _AMUO = "AbortMultipartUploadOutput"; + var _AMUR = "AbortMultipartUploadRequest"; + var _AMl = "AllowedMethod"; + var _AN = "AnnotationName"; + var _ANTL = "AnnotationNameTooLong"; + var _AO = "AllowedOrigins"; + var _AOl = "AllowedOrigin"; + var _AP = "AnnotationPayload"; + var _APA = "AccessPointAlias"; + var _APAc = "AccessPointArn"; + var _APn = "AnnotationPrefix"; + var _AQRD = "AllowQuotedRecordDelimiter"; + var _AR = "AcceptRanges"; + var _ARI = "AbortRuleId"; + var _AS = "AbacStatus"; + var _ASBD = "AnalyticsS3BucketDestination"; + var _ASSEBD = "ApplyServerSideEncryptionByDefault"; + var _ASr = "ArchiveStatus"; + var _AT = "AccessTier"; + var _ATC = "AnnotationTableConfiguration"; + var _ATCR = "AnnotationTableConfigurationResult"; + var _ATCU = "AnnotationTableConfigurationUpdates"; + var _An = "And"; + var _Ann = "Annotations"; + var _B = "Bucket"; + var _BA = "BucketArn"; + var _BAE = "BucketAlreadyExists"; + var _BAI = "BucketAccountId"; + var _BAOBY = "BucketAlreadyOwnedByYou"; + var _BET = "BlockedEncryptionTypes"; + var _BGR = "BypassGovernanceRetention"; + var _BI = "BucketInfo"; + var _BKE = "BucketKeyEnabled"; + var _BLC = "BucketLifecycleConfiguration"; + var _BLN = "BucketLocationName"; + var _BLS = "BucketLoggingStatus"; + var _BLT = "BucketLocationType"; + var _BN = "BucketNamespace"; + var _BNu = "BucketName"; + var _BP = "BytesProcessed"; + var _BPA = "BlockPublicAcls"; + var _BPP = "BlockPublicPolicy"; + var _BR = "BucketRegion"; + var _BRy = "BytesReturned"; + var _BS = "BytesScanned"; + var _Bo = "Body"; + var _Bu = "Buckets"; + var _C = "Checksum"; + var _CA = "ChecksumAlgorithm"; + var _CACL = "CannedACL"; + var _CB = "CreateBucket"; + var _CBC = "CreateBucketConfiguration"; + var _CBMC = "CreateBucketMetadataConfiguration"; + var _CBMCR = "CreateBucketMetadataConfigurationRequest"; + var _CBMTC = "CreateBucketMetadataTableConfiguration"; + var _CBMTCR = "CreateBucketMetadataTableConfigurationRequest"; + var _CBO = "CreateBucketOutput"; + var _CBR = "CreateBucketRequest"; + var _CC = "CacheControl"; + var _CCRC = "ChecksumCRC32"; + var _CCRCC = "ChecksumCRC32C"; + var _CCRCNVME = "ChecksumCRC64NVME"; + var _CC_ = "Cache-Control"; + var _CD = "CreationDate"; + var _CD_ = "Content-Disposition"; + var _CDo = "ContentDisposition"; + var _CE = "ContinuationEvent"; + var _CE_ = "Content-Encoding"; + var _CEo = "ContentEncoding"; + var _CF = "CloudFunction"; + var _CFC = "CloudFunctionConfiguration"; + var _CL = "ContentLanguage"; + var _CL_ = "Content-Language"; + var _CL__ = "Content-Length"; + var _CLo = "ContentLength"; + var _CM = "Content-MD5"; + var _CMD = "ChecksumMD5"; + var _CMDo = "ContentMD5"; + var _CMU = "CompletedMultipartUpload"; + var _CMUO = "CompleteMultipartUploadOutput"; + var _CMUOr = "CreateMultipartUploadOutput"; + var _CMUR = "CompleteMultipartUploadResult"; + var _CMURo = "CompleteMultipartUploadRequest"; + var _CMURr = "CreateMultipartUploadRequest"; + var _CMUo = "CompleteMultipartUpload"; + var _CMUr = "CreateMultipartUpload"; + var _CMh = "ChecksumMode"; + var _CO = "CopyObject"; + var _COO = "CopyObjectOutput"; + var _COR = "CopyObjectResult"; + var _CORSC = "CORSConfiguration"; + var _CORSR = "CORSRules"; + var _CORSRu = "CORSRule"; + var _CORo = "CopyObjectRequest"; + var _CP = "CommonPrefix"; + var _CPL = "CommonPrefixList"; + var _CPLo = "CompletedPartList"; + var _CPR = "CopyPartResult"; + var _CPo = "CompletedPart"; + var _CPom = "CommonPrefixes"; + var _CR = "ContentRange"; + var _CRSBA = "ConfirmRemoveSelfBucketAccess"; + var _CR_ = "Content-Range"; + var _CS = "ConfigurationState"; + var _CSHA = "ChecksumSHA1"; + var _CSHAh = "ChecksumSHA256"; + var _CSHAhe = "ChecksumSHA512"; + var _CSIM = "CopySourceIfMatch"; + var _CSIMS = "CopySourceIfModifiedSince"; + var _CSINM = "CopySourceIfNoneMatch"; + var _CSIUS = "CopySourceIfUnmodifiedSince"; + var _CSO = "CreateSessionOutput"; + var _CSR = "CreateSessionResult"; + var _CSRo = "CopySourceRange"; + var _CSRr = "CreateSessionRequest"; + var _CSSSECA = "CopySourceSSECustomerAlgorithm"; + var _CSSSECK = "CopySourceSSECustomerKey"; + var _CSSSECKMD = "CopySourceSSECustomerKeyMD5"; + var _CSV = "CSV"; + var _CSVI = "CopySourceVersionId"; + var _CSVIn = "CSVInput"; + var _CSVO = "CSVOutput"; + var _CSo = "CopySource"; + var _CSr = "CreateSession"; + var _CT = "ChecksumType"; + var _CT_ = "Content-Type"; + var _CTl = "ClientToken"; + var _CTo = "ContentType"; + var _CTom = "CompressionType"; + var _CTon = "ContinuationToken"; + var _CXXHASH = "ChecksumXXHASH64"; + var _CXXHASHh = "ChecksumXXHASH3"; + var _CXXHASHhe = "ChecksumXXHASH128"; + var _Co = "Condition"; + var _Cod = "Code"; + var _Com = "Comments"; + var _Con = "Contents"; + var _Cont = "Cont"; + var _Cr = "Credentials"; + var _D = "Days"; + var _DAI = "DaysAfterInitiation"; + var _DB = "DeleteBucket"; + var _DBAC = "DeleteBucketAnalyticsConfiguration"; + var _DBACR = "DeleteBucketAnalyticsConfigurationRequest"; + var _DBC = "DeleteBucketCors"; + var _DBCR = "DeleteBucketCorsRequest"; + var _DBE = "DeleteBucketEncryption"; + var _DBER = "DeleteBucketEncryptionRequest"; + var _DBIC = "DeleteBucketInventoryConfiguration"; + var _DBICR = "DeleteBucketInventoryConfigurationRequest"; + var _DBITC = "DeleteBucketIntelligentTieringConfiguration"; + var _DBITCR = "DeleteBucketIntelligentTieringConfigurationRequest"; + var _DBL = "DeleteBucketLifecycle"; + var _DBLR = "DeleteBucketLifecycleRequest"; + var _DBMC = "DeleteBucketMetadataConfiguration"; + var _DBMCR = "DeleteBucketMetadataConfigurationRequest"; + var _DBMCRe = "DeleteBucketMetricsConfigurationRequest"; + var _DBMCe = "DeleteBucketMetricsConfiguration"; + var _DBMTC = "DeleteBucketMetadataTableConfiguration"; + var _DBMTCR = "DeleteBucketMetadataTableConfigurationRequest"; + var _DBOC = "DeleteBucketOwnershipControls"; + var _DBOCR = "DeleteBucketOwnershipControlsRequest"; + var _DBP = "DeleteBucketPolicy"; + var _DBPR = "DeleteBucketPolicyRequest"; + var _DBR = "DeleteBucketRequest"; + var _DBRR = "DeleteBucketReplicationRequest"; + var _DBRe = "DeleteBucketReplication"; + var _DBT = "DeleteBucketTagging"; + var _DBTR = "DeleteBucketTaggingRequest"; + var _DBW = "DeleteBucketWebsite"; + var _DBWR = "DeleteBucketWebsiteRequest"; + var _DE = "DataExport"; + var _DIM = "DestinationIfMatch"; + var _DIMS = "DestinationIfModifiedSince"; + var _DINM = "DestinationIfNoneMatch"; + var _DIUS = "DestinationIfUnmodifiedSince"; + var _DM = "DeleteMarker"; + var _DME = "DeleteMarkerEntry"; + var _DMR = "DeleteMarkerReplication"; + var _DMVI = "DeleteMarkerVersionId"; + var _DMe = "DeleteMarkers"; + var _DN = "DisplayName"; + var _DO = "DeletedObject"; + var _DOA = "DeleteObjectAnnotation"; + var _DOAO = "DeleteObjectAnnotationOutput"; + var _DOAR = "DeleteObjectAnnotationRequest"; + var _DOO = "DeleteObjectOutput"; + var _DOOe = "DeleteObjectsOutput"; + var _DOR = "DeleteObjectRequest"; + var _DORe = "DeleteObjectsRequest"; + var _DOT = "DeleteObjectTagging"; + var _DOTO = "DeleteObjectTaggingOutput"; + var _DOTR = "DeleteObjectTaggingRequest"; + var _DOe = "DeletedObjects"; + var _DOel = "DeleteObject"; + var _DOele = "DeleteObjects"; + var _DPAB = "DeletePublicAccessBlock"; + var _DPABR = "DeletePublicAccessBlockRequest"; + var _DR = "DataRedundancy"; + var _DRe = "DefaultRetention"; + var _DRel = "DeleteResult"; + var _DRes = "DestinationResult"; + var _Da = "Date"; + var _De = "Delete"; + var _Del = "Deleted"; + var _Deli = "Delimiter"; + var _Des = "Destination"; + var _Desc = "Description"; + var _Det = "Details"; + var _E = "Error"; + var _EA = "EmailAddress"; + var _EBC = "EventBridgeConfiguration"; + var _EBO = "ExpectedBucketOwner"; + var _EC = "EncryptionConfiguration"; + var _ECr = "ErrorCode"; + var _ED = "ErrorDetails"; + var _EDr = "ErrorDocument"; + var _EE = "EndEvent"; + var _EH = "ExposeHeaders"; + var _EHx = "ExposeHeader"; + var _EM = "ErrorMessage"; + var _EODM = "ExpiredObjectDeleteMarker"; + var _EOR = "ExistingObjectReplication"; + var _ES = "ExpiresString"; + var _ESBO = "ExpectedSourceBucketOwner"; + var _ET = "ETag"; + var _ETL = "EncryptionTypeList"; + var _ETM = "EncryptionTypeMismatch"; + var _ETn = "EncryptionType"; + var _ETnc = "EncodingType"; + var _ETv = "EventThreshold"; + var _ETx = "ExpressionType"; + var _En = "Encryption"; + var _Ena = "Enabled"; + var _End = "End"; + var _Er = "Errors"; + var _Ev = "Events"; + var _Eve = "Event"; + var _Ex = "Expiration"; + var _Exp = "Expires"; + var _Expr = "Expression"; + var _F = "Filter"; + var _FD = "FieldDelimiter"; + var _FHI = "FileHeaderInfo"; + var _FO = "FetchOwner"; + var _FR = "FilterRule"; + var _FRL = "FilterRuleList"; + var _FRi = "FilterRules"; + var _Fi = "Field"; + var _Fo = "Format"; + var _Fr = "Frequency"; + var _G = "Grants"; + var _GBA = "GetBucketAbac"; + var _GBAC = "GetBucketAccelerateConfiguration"; + var _GBACO = "GetBucketAccelerateConfigurationOutput"; + var _GBACOe = "GetBucketAnalyticsConfigurationOutput"; + var _GBACR = "GetBucketAccelerateConfigurationRequest"; + var _GBACRe = "GetBucketAnalyticsConfigurationRequest"; + var _GBACe = "GetBucketAnalyticsConfiguration"; + var _GBAO = "GetBucketAbacOutput"; + var _GBAOe = "GetBucketAclOutput"; + var _GBAR = "GetBucketAbacRequest"; + var _GBARe = "GetBucketAclRequest"; + var _GBAe = "GetBucketAcl"; + var _GBC = "GetBucketCors"; + var _GBCO = "GetBucketCorsOutput"; + var _GBCR = "GetBucketCorsRequest"; + var _GBE = "GetBucketEncryption"; + var _GBEO = "GetBucketEncryptionOutput"; + var _GBER = "GetBucketEncryptionRequest"; + var _GBIC = "GetBucketInventoryConfiguration"; + var _GBICO = "GetBucketInventoryConfigurationOutput"; + var _GBICR = "GetBucketInventoryConfigurationRequest"; + var _GBITC = "GetBucketIntelligentTieringConfiguration"; + var _GBITCO = "GetBucketIntelligentTieringConfigurationOutput"; + var _GBITCR = "GetBucketIntelligentTieringConfigurationRequest"; + var _GBL = "GetBucketLocation"; + var _GBLC = "GetBucketLifecycleConfiguration"; + var _GBLCO = "GetBucketLifecycleConfigurationOutput"; + var _GBLCR = "GetBucketLifecycleConfigurationRequest"; + var _GBLO = "GetBucketLocationOutput"; + var _GBLOe = "GetBucketLoggingOutput"; + var _GBLR = "GetBucketLocationRequest"; + var _GBLRe = "GetBucketLoggingRequest"; + var _GBLe = "GetBucketLogging"; + var _GBMC = "GetBucketMetadataConfiguration"; + var _GBMCO = "GetBucketMetadataConfigurationOutput"; + var _GBMCOe = "GetBucketMetricsConfigurationOutput"; + var _GBMCR = "GetBucketMetadataConfigurationResult"; + var _GBMCRe = "GetBucketMetadataConfigurationRequest"; + var _GBMCRet = "GetBucketMetricsConfigurationRequest"; + var _GBMCe = "GetBucketMetricsConfiguration"; + var _GBMTC = "GetBucketMetadataTableConfiguration"; + var _GBMTCO = "GetBucketMetadataTableConfigurationOutput"; + var _GBMTCR = "GetBucketMetadataTableConfigurationResult"; + var _GBMTCRe = "GetBucketMetadataTableConfigurationRequest"; + var _GBNC = "GetBucketNotificationConfiguration"; + var _GBNCR = "GetBucketNotificationConfigurationRequest"; + var _GBOC = "GetBucketOwnershipControls"; + var _GBOCO = "GetBucketOwnershipControlsOutput"; + var _GBOCR = "GetBucketOwnershipControlsRequest"; + var _GBP = "GetBucketPolicy"; + var _GBPO = "GetBucketPolicyOutput"; + var _GBPR = "GetBucketPolicyRequest"; + var _GBPS = "GetBucketPolicyStatus"; + var _GBPSO = "GetBucketPolicyStatusOutput"; + var _GBPSR = "GetBucketPolicyStatusRequest"; + var _GBR = "GetBucketReplication"; + var _GBRO = "GetBucketReplicationOutput"; + var _GBRP = "GetBucketRequestPayment"; + var _GBRPO = "GetBucketRequestPaymentOutput"; + var _GBRPR = "GetBucketRequestPaymentRequest"; + var _GBRR = "GetBucketReplicationRequest"; + var _GBT = "GetBucketTagging"; + var _GBTO = "GetBucketTaggingOutput"; + var _GBTR = "GetBucketTaggingRequest"; + var _GBV = "GetBucketVersioning"; + var _GBVO = "GetBucketVersioningOutput"; + var _GBVR = "GetBucketVersioningRequest"; + var _GBW = "GetBucketWebsite"; + var _GBWO = "GetBucketWebsiteOutput"; + var _GBWR = "GetBucketWebsiteRequest"; + var _GFC = "GrantFullControl"; + var _GJP = "GlacierJobParameters"; + var _GO = "GetObject"; + var _GOA = "GetObjectAcl"; + var _GOAO = "GetObjectAclOutput"; + var _GOAOe = "GetObjectAnnotationOutput"; + var _GOAOet = "GetObjectAttributesOutput"; + var _GOAP = "GetObjectAttributesParts"; + var _GOAR = "GetObjectAclRequest"; + var _GOARe = "GetObjectAnnotationRequest"; + var _GOARet = "GetObjectAttributesResponse"; + var _GOARetb = "GetObjectAttributesRequest"; + var _GOAe = "GetObjectAnnotation"; + var _GOAet = "GetObjectAttributes"; + var _GOLC = "GetObjectLockConfiguration"; + var _GOLCO = "GetObjectLockConfigurationOutput"; + var _GOLCR = "GetObjectLockConfigurationRequest"; + var _GOLH = "GetObjectLegalHold"; + var _GOLHO = "GetObjectLegalHoldOutput"; + var _GOLHR = "GetObjectLegalHoldRequest"; + var _GOO = "GetObjectOutput"; + var _GOR = "GetObjectRequest"; + var _GORO = "GetObjectRetentionOutput"; + var _GORR = "GetObjectRetentionRequest"; + var _GORe = "GetObjectRetention"; + var _GOT = "GetObjectTagging"; + var _GOTO = "GetObjectTaggingOutput"; + var _GOTOe = "GetObjectTorrentOutput"; + var _GOTR = "GetObjectTaggingRequest"; + var _GOTRe = "GetObjectTorrentRequest"; + var _GOTe = "GetObjectTorrent"; + var _GPAB = "GetPublicAccessBlock"; + var _GPABO = "GetPublicAccessBlockOutput"; + var _GPABR = "GetPublicAccessBlockRequest"; + var _GR = "GrantRead"; + var _GRACP = "GrantReadACP"; + var _GW = "GrantWrite"; + var _GWACP = "GrantWriteACP"; + var _Gr = "Grant"; + var _Gra = "Grantee"; + var _HB = "HeadBucket"; + var _HBO = "HeadBucketOutput"; + var _HBR = "HeadBucketRequest"; + var _HECRE = "HttpErrorCodeReturnedEquals"; + var _HN = "HostName"; + var _HO = "HeadObject"; + var _HOO = "HeadObjectOutput"; + var _HOR = "HeadObjectRequest"; + var _HRC = "HttpRedirectCode"; + var _I = "Id"; + var _IAN = "InvalidAnnotationName"; + var _IC = "InventoryConfiguration"; + var _ICL = "InventoryConfigurationList"; + var _ID = "ID"; + var _IDn = "IndexDocument"; + var _IDnv = "InventoryDestination"; + var _IE = "IsEnabled"; + var _IEn = "InventoryEncryption"; + var _IF = "InventoryFilter"; + var _IL = "IsLatest"; + var _IM = "IfMatch"; + var _IMIT = "IfMatchInitiatedTime"; + var _IMLMT = "IfMatchLastModifiedTime"; + var _IMS = "IfMatchSize"; + var _IMS_ = "If-Modified-Since"; + var _IMSf = "IfModifiedSince"; + var _IMUR = "InitiateMultipartUploadResult"; + var _IM_ = "If-Match"; + var _INM = "IfNoneMatch"; + var _INM_ = "If-None-Match"; + var _IOF = "InventoryOptionalFields"; + var _IOS = "InvalidObjectState"; + var _IOV = "IncludedObjectVersions"; + var _IP = "InvalidPrefix"; + var _IPA = "IgnorePublicAcls"; + var _IPM = "IdempotencyParameterMismatch"; + var _IPs = "IsPublic"; + var _IR = "InvalidRequest"; + var _IRIP = "IsRestoreInProgress"; + var _IS = "InputSerialization"; + var _ISBD = "InventoryS3BucketDestination"; + var _ISn = "InventorySchedule"; + var _IT = "IsTruncated"; + var _ITAO = "IntelligentTieringAndOperator"; + var _ITC = "IntelligentTieringConfiguration"; + var _ITCL = "IntelligentTieringConfigurationList"; + var _ITCR = "InventoryTableConfigurationResult"; + var _ITCU = "InventoryTableConfigurationUpdates"; + var _ITCn = "InventoryTableConfiguration"; + var _ITF = "IntelligentTieringFilter"; + var _IUS = "IfUnmodifiedSince"; + var _IUS_ = "If-Unmodified-Since"; + var _IWO = "InvalidWriteOffset"; + var _In = "Initiator"; + var _Ini = "Initiated"; + var _JSON = "JSON"; + var _JSONI = "JSONInput"; + var _JSONO = "JSONOutput"; + var _JTC = "JournalTableConfiguration"; + var _JTCR = "JournalTableConfigurationResult"; + var _JTCU = "JournalTableConfigurationUpdates"; + var _K = "Key"; + var _KC = "KeyCount"; + var _KI = "KeyId"; + var _KKA = "KmsKeyArn"; + var _KM = "KeyMarker"; + var _KMSC = "KMSContext"; + var _KMSKA = "KMSKeyArn"; + var _KMSKI = "KMSKeyId"; + var _KMSMKID = "KMSMasterKeyID"; + var _KPE = "KeyPrefixEquals"; + var _L = "Location"; + var _LAMBR = "ListAllMyBucketsResult"; + var _LAMDBR = "ListAllMyDirectoryBucketsResult"; + var _LB = "ListBuckets"; + var _LBAC = "ListBucketAnalyticsConfigurations"; + var _LBACO = "ListBucketAnalyticsConfigurationsOutput"; + var _LBACR = "ListBucketAnalyticsConfigurationResult"; + var _LBACRi = "ListBucketAnalyticsConfigurationsRequest"; + var _LBIC = "ListBucketInventoryConfigurations"; + var _LBICO = "ListBucketInventoryConfigurationsOutput"; + var _LBICR = "ListBucketInventoryConfigurationsRequest"; + var _LBITC = "ListBucketIntelligentTieringConfigurations"; + var _LBITCO = "ListBucketIntelligentTieringConfigurationsOutput"; + var _LBITCR = "ListBucketIntelligentTieringConfigurationsRequest"; + var _LBMC = "ListBucketMetricsConfigurations"; + var _LBMCO = "ListBucketMetricsConfigurationsOutput"; + var _LBMCR = "ListBucketMetricsConfigurationsRequest"; + var _LBO = "ListBucketsOutput"; + var _LBR = "ListBucketsRequest"; + var _LBRi = "ListBucketResult"; + var _LC = "LocationConstraint"; + var _LCi = "LifecycleConfiguration"; + var _LDB = "ListDirectoryBuckets"; + var _LDBO = "ListDirectoryBucketsOutput"; + var _LDBR = "ListDirectoryBucketsRequest"; + var _LE = "LoggingEnabled"; + var _LEi = "LifecycleExpiration"; + var _LFA = "LambdaFunctionArn"; + var _LFC = "LambdaFunctionConfiguration"; + var _LFCL = "LambdaFunctionConfigurationList"; + var _LFCa = "LambdaFunctionConfigurations"; + var _LH = "LegalHold"; + var _LI = "LocationInfo"; + var _LICR = "ListInventoryConfigurationsResult"; + var _LM = "LastModified"; + var _LMCR = "ListMetricsConfigurationsResult"; + var _LMT = "LastModifiedTime"; + var _LMU = "ListMultipartUploads"; + var _LMUO = "ListMultipartUploadsOutput"; + var _LMUR = "ListMultipartUploadsResult"; + var _LMURi = "ListMultipartUploadsRequest"; + var _LM_ = "Last-Modified"; + var _LO = "ListObjects"; + var _LOA = "ListObjectAnnotations"; + var _LOAO = "ListObjectAnnotationsOutput"; + var _LOAR = "ListObjectAnnotationsRequest"; + var _LOO = "ListObjectsOutput"; + var _LOR = "ListObjectsRequest"; + var _LOV = "ListObjectsV2"; + var _LOVO = "ListObjectsV2Output"; + var _LOVOi = "ListObjectVersionsOutput"; + var _LOVR = "ListObjectsV2Request"; + var _LOVRi = "ListObjectVersionsRequest"; + var _LOVi = "ListObjectVersions"; + var _LP = "ListParts"; + var _LPO = "ListPartsOutput"; + var _LPR = "ListPartsResult"; + var _LPRi = "ListPartsRequest"; + var _LR = "LifecycleRule"; + var _LRAO = "LifecycleRuleAndOperator"; + var _LRF = "LifecycleRuleFilter"; + var _LRi = "LifecycleRules"; + var _LVR = "ListVersionsResult"; + var _M = "Metadata"; + var _MAO = "MetricsAndOperator"; + var _MAR = "MaxAnnotationResults"; + var _MAS = "MaxAgeSeconds"; + var _MB = "MaxBuckets"; + var _MC = "MetadataConfiguration"; + var _MCL = "MetricsConfigurationList"; + var _MCR = "MetadataConfigurationResult"; + var _MCe = "MetricsConfiguration"; + var _MD = "MetadataDirective"; + var _MDB = "MaxDirectoryBuckets"; + var _MDf = "MfaDelete"; + var _ME = "MetadataEntry"; + var _MF = "MetricsFilter"; + var _MFA = "MFA"; + var _MFAD = "MFADelete"; + var _MK = "MaxKeys"; + var _MM = "MissingMeta"; + var _MOS = "MpuObjectSize"; + var _MP = "MaxParts"; + var _MTC = "MetadataTableConfiguration"; + var _MTCR = "MetadataTableConfigurationResult"; + var _MTEC = "MetadataTableEncryptionConfiguration"; + var _MU = "MultipartUpload"; + var _MUL = "MultipartUploadList"; + var _MUa = "MaxUploads"; + var _Ma = "Marker"; + var _Me = "Metrics"; + var _Mes = "Message"; + var _Mi = "Minutes"; + var _Mo = "Mode"; + var _N = "Name"; + var _NC = "NotificationConfiguration"; + var _NCF = "NotificationConfigurationFilter"; + var _NCT = "NextContinuationToken"; + var _ND = "NoncurrentDays"; + var _NEKKAS = "NonEmptyKmsKeyArnString"; + var _NF = "NotFound"; + var _NKM = "NextKeyMarker"; + var _NM = "NextMarker"; + var _NNV = "NewerNoncurrentVersions"; + var _NPNM = "NextPartNumberMarker"; + var _NSA = "NoSuchAnnotation"; + var _NSB = "NoSuchBucket"; + var _NSK = "NoSuchKey"; + var _NSU = "NoSuchUpload"; + var _NUIM = "NextUploadIdMarker"; + var _NVE = "NoncurrentVersionExpiration"; + var _NVIM = "NextVersionIdMarker"; + var _NVT = "NoncurrentVersionTransitions"; + var _NVTL = "NoncurrentVersionTransitionList"; + var _NVTo = "NoncurrentVersionTransition"; + var _O = "Owner"; + var _OA = "ObjectAttributes"; + var _OAIATE = "ObjectAlreadyInActiveTierError"; + var _OC = "OwnershipControls"; + var _OCR = "OwnershipControlsRule"; + var _OCRw = "OwnershipControlsRules"; + var _OE = "ObjectEncryption"; + var _OF = "OptionalFields"; + var _OI = "ObjectIdentifier"; + var _OIL = "ObjectIdentifierList"; + var _OIM = "ObjectIfMatch"; + var _OL = "OutputLocation"; + var _OLC = "ObjectLockConfiguration"; + var _OLE = "ObjectLockEnabled"; + var _OLEFB = "ObjectLockEnabledForBucket"; + var _OLLH = "ObjectLockLegalHold"; + var _OLLHS = "ObjectLockLegalHoldStatus"; + var _OLM = "ObjectLockMode"; + var _OLR = "ObjectLockRetention"; + var _OLRUD = "ObjectLockRetainUntilDate"; + var _OLRb = "ObjectLockRule"; + var _OLb = "ObjectList"; + var _ONIATE = "ObjectNotInActiveTierError"; + var _OO = "ObjectOwnership"; + var _OOA = "OptionalObjectAttributes"; + var _OP = "ObjectParts"; + var _OPb = "ObjectPart"; + var _OS = "ObjectSize"; + var _OSGT = "ObjectSizeGreaterThan"; + var _OSLT = "ObjectSizeLessThan"; + var _OSV = "OutputSchemaVersion"; + var _OSu = "OutputSerialization"; + var _OV = "ObjectVersion"; + var _OVI = "ObjectVersionId"; + var _OVL = "ObjectVersionList"; + var _Ob = "Objects"; + var _Obj = "Object"; + var _P = "Prefix"; + var _PABC = "PublicAccessBlockConfiguration"; + var _PBA = "PutBucketAbac"; + var _PBAC = "PutBucketAccelerateConfiguration"; + var _PBACR = "PutBucketAccelerateConfigurationRequest"; + var _PBACRu = "PutBucketAnalyticsConfigurationRequest"; + var _PBACu = "PutBucketAnalyticsConfiguration"; + var _PBAR = "PutBucketAbacRequest"; + var _PBARu = "PutBucketAclRequest"; + var _PBAu = "PutBucketAcl"; + var _PBC = "PutBucketCors"; + var _PBCR = "PutBucketCorsRequest"; + var _PBE = "PutBucketEncryption"; + var _PBER = "PutBucketEncryptionRequest"; + var _PBIC = "PutBucketInventoryConfiguration"; + var _PBICR = "PutBucketInventoryConfigurationRequest"; + var _PBITC = "PutBucketIntelligentTieringConfiguration"; + var _PBITCR = "PutBucketIntelligentTieringConfigurationRequest"; + var _PBL = "PutBucketLogging"; + var _PBLC = "PutBucketLifecycleConfiguration"; + var _PBLCO = "PutBucketLifecycleConfigurationOutput"; + var _PBLCR = "PutBucketLifecycleConfigurationRequest"; + var _PBLR = "PutBucketLoggingRequest"; + var _PBMC = "PutBucketMetricsConfiguration"; + var _PBMCR = "PutBucketMetricsConfigurationRequest"; + var _PBNC = "PutBucketNotificationConfiguration"; + var _PBNCR = "PutBucketNotificationConfigurationRequest"; + var _PBOC = "PutBucketOwnershipControls"; + var _PBOCR = "PutBucketOwnershipControlsRequest"; + var _PBP = "PutBucketPolicy"; + var _PBPR = "PutBucketPolicyRequest"; + var _PBR = "PutBucketReplication"; + var _PBRP = "PutBucketRequestPayment"; + var _PBRPR = "PutBucketRequestPaymentRequest"; + var _PBRR = "PutBucketReplicationRequest"; + var _PBT = "PutBucketTagging"; + var _PBTR = "PutBucketTaggingRequest"; + var _PBV = "PutBucketVersioning"; + var _PBVR = "PutBucketVersioningRequest"; + var _PBW = "PutBucketWebsite"; + var _PBWR = "PutBucketWebsiteRequest"; + var _PC = "PartsCount"; + var _PDS = "PartitionDateSource"; + var _PE = "ProgressEvent"; + var _PI = "ParquetInput"; + var _PL = "PartsList"; + var _PN = "PartNumber"; + var _PNM = "PartNumberMarker"; + var _PO = "PutObject"; + var _POA = "PutObjectAcl"; + var _POAO = "PutObjectAclOutput"; + var _POAOu = "PutObjectAnnotationOutput"; + var _POAR = "PutObjectAclRequest"; + var _POARu = "PutObjectAnnotationRequest"; + var _POAu = "PutObjectAnnotation"; + var _POLC = "PutObjectLockConfiguration"; + var _POLCO = "PutObjectLockConfigurationOutput"; + var _POLCR = "PutObjectLockConfigurationRequest"; + var _POLH = "PutObjectLegalHold"; + var _POLHO = "PutObjectLegalHoldOutput"; + var _POLHR = "PutObjectLegalHoldRequest"; + var _POO = "PutObjectOutput"; + var _POR = "PutObjectRequest"; + var _PORO = "PutObjectRetentionOutput"; + var _PORR = "PutObjectRetentionRequest"; + var _PORu = "PutObjectRetention"; + var _POT = "PutObjectTagging"; + var _POTO = "PutObjectTaggingOutput"; + var _POTR = "PutObjectTaggingRequest"; + var _PP = "PartitionedPrefix"; + var _PPAB = "PutPublicAccessBlock"; + var _PPABR = "PutPublicAccessBlockRequest"; + var _PS = "PolicyStatus"; + var _Pa = "Parts"; + var _Par = "Part"; + var _Parq = "Parquet"; + var _Pay = "Payer"; + var _Payl = "Payload"; + var _Pe = "Permission"; + var _Po = "Policy"; + var _Pr = "Progress"; + var _Pri = "Priority"; + var _Pro = "Protocol"; + var _Q = "Quiet"; + var _QA = "QueueArn"; + var _QC = "QuoteCharacter"; + var _QCL = "QueueConfigurationList"; + var _QCu = "QueueConfigurations"; + var _QCue = "QueueConfiguration"; + var _QEC = "QuoteEscapeCharacter"; + var _QF = "QuoteFields"; + var _Qu = "Queue"; + var _R = "Role"; + var _RART = "RedirectAllRequestsTo"; + var _RC = "RequestCharged"; + var _RCC = "ResponseCacheControl"; + var _RCD = "ResponseContentDisposition"; + var _RCE = "ResponseContentEncoding"; + var _RCL = "ResponseContentLanguage"; + var _RCT = "ResponseContentType"; + var _RCe = "ReplicationConfiguration"; + var _RD = "RecordDelimiter"; + var _RE = "ResponseExpires"; + var _RED = "RestoreExpiryDate"; + var _REe = "RecordExpiration"; + var _REec = "RecordsEvent"; + var _RKKID = "ReplicaKmsKeyID"; + var _RKPW = "ReplaceKeyPrefixWith"; + var _RKW = "ReplaceKeyWith"; + var _RM = "ReplicaModifications"; + var _RO = "RenameObject"; + var _ROO = "RenameObjectOutput"; + var _ROOe = "RestoreObjectOutput"; + var _ROP = "RestoreOutputPath"; + var _ROR = "RenameObjectRequest"; + var _RORe = "RestoreObjectRequest"; + var _ROe = "RestoreObject"; + var _RP = "RequestPayer"; + var _RPB = "RestrictPublicBuckets"; + var _RPC = "RequestPaymentConfiguration"; + var _RPe = "RequestProgress"; + var _RR = "RoutingRules"; + var _RRAO = "ReplicationRuleAndOperator"; + var _RRF = "ReplicationRuleFilter"; + var _RRe = "ReplicationRule"; + var _RRep = "ReplicationRules"; + var _RReq = "RequestRoute"; + var _RRes = "RestoreRequest"; + var _RRo = "RoutingRule"; + var _RS = "ReplicationStatus"; + var _RSe = "RestoreStatus"; + var _RSen = "RenameSource"; + var _RT = "ReplicationTime"; + var _RTV = "ReplicationTimeValue"; + var _RTe = "RequestToken"; + var _RUD = "RetainUntilDate"; + var _Ra = "Range"; + var _Re = "Restore"; + var _Rec = "Records"; + var _Red = "Redirect"; + var _Ret = "Retention"; + var _Ru = "Rules"; + var _Rul = "Rule"; + var _S = "Status"; + var _SA = "StartAfter"; + var _SAK = "SecretAccessKey"; + var _SAs = "SseAlgorithm"; + var _SB = "StreamingBlob"; + var _SBD = "S3BucketDestination"; + var _SC = "StorageClass"; + var _SCA = "StorageClassAnalysis"; + var _SCADE = "StorageClassAnalysisDataExport"; + var _SCV = "SessionCredentialValue"; + var _SCe = "SessionCredentials"; + var _SCt = "StatusCode"; + var _SDV = "SkipDestinationValidation"; + var _SE = "StatsEvent"; + var _SIM = "SourceIfMatch"; + var _SIMS = "SourceIfModifiedSince"; + var _SINM = "SourceIfNoneMatch"; + var _SIUS = "SourceIfUnmodifiedSince"; + var _SK = "SSE-KMS"; + var _SKEO = "SseKmsEncryptedObjects"; + var _SKF = "S3KeyFilter"; + var _SKe = "S3Key"; + var _SL = "S3Location"; + var _SM = "SessionMode"; + var _SOC = "SelectObjectContent"; + var _SOCES = "SelectObjectContentEventStream"; + var _SOCO = "SelectObjectContentOutput"; + var _SOCR = "SelectObjectContentRequest"; + var _SP = "SelectParameters"; + var _SPi = "SimplePrefix"; + var _SR = "ScanRange"; + var _SS = "SSE-S3"; + var _SSC = "SourceSelectionCriteria"; + var _SSE = "ServerSideEncryption"; + var _SSEA = "SSEAlgorithm"; + var _SSEBD = "ServerSideEncryptionByDefault"; + var _SSEC = "ServerSideEncryptionConfiguration"; + var _SSECA = "SSECustomerAlgorithm"; + var _SSECK = "SSECustomerKey"; + var _SSECKMD = "SSECustomerKeyMD5"; + var _SSEKMS = "SSEKMS"; + var _SSEKMSE = "SSEKMSEncryption"; + var _SSEKMSEC = "SSEKMSEncryptionContext"; + var _SSEKMSKI = "SSEKMSKeyId"; + var _SSER = "ServerSideEncryptionRule"; + var _SSERe = "ServerSideEncryptionRules"; + var _SSES = "SSES3"; + var _ST = "SessionToken"; + var _STD = "S3TablesDestination"; + var _STDR = "S3TablesDestinationResult"; + var _S_ = "S3"; + var _Sc = "Schedule"; + var _Si = "Size"; + var _St = "Start"; + var _Sta = "Stats"; + var _Su = "Suffix"; + var _T = "Tags"; + var _TA = "TableArn"; + var _TAo = "TopicArn"; + var _TB = "TargetBucket"; + var _TBA = "TableBucketArn"; + var _TBT = "TableBucketType"; + var _TC = "TagCount"; + var _TCL = "TopicConfigurationList"; + var _TCo = "TopicConfigurations"; + var _TCop = "TopicConfiguration"; + var _TD = "TaggingDirective"; + var _TDMOS = "TransitionDefaultMinimumObjectSize"; + var _TG = "TargetGrants"; + var _TGa = "TargetGrant"; + var _TL = "TieringList"; + var _TLr = "TransitionList"; + var _TMP = "TooManyParts"; + var _TN = "TableName"; + var _TNa = "TableNamespace"; + var _TOKF = "TargetObjectKeyFormat"; + var _TP = "TargetPrefix"; + var _TPC = "TotalPartsCount"; + var _TS = "TableStatus"; + var _TSa = "TagSet"; + var _Ta = "Tag"; + var _Tag = "Tagging"; + var _Ti = "Tier"; + var _Tie = "Tierings"; + var _Tier = "Tiering"; + var _Tim = "Time"; + var _To = "Token"; + var _Top = "Topic"; + var _Tr = "Transitions"; + var _Tra = "Transition"; + var _Ty = "Type"; + var _U = "Uploads"; + var _UBMATC = "UpdateBucketMetadataAnnotationTableConfiguration"; + var _UBMATCR = "UpdateBucketMetadataAnnotationTableConfigurationRequest"; + var _UBMITC = "UpdateBucketMetadataInventoryTableConfiguration"; + var _UBMITCR = "UpdateBucketMetadataInventoryTableConfigurationRequest"; + var _UBMJTC = "UpdateBucketMetadataJournalTableConfiguration"; + var _UBMJTCR = "UpdateBucketMetadataJournalTableConfigurationRequest"; + var _UI = "UploadId"; + var _UIM = "UploadIdMarker"; + var _UM = "UserMetadata"; + var _UMT = "UnsupportedMediaType"; + var _UOE = "UpdateObjectEncryption"; + var _UOER = "UpdateObjectEncryptionRequest"; + var _UOERp = "UpdateObjectEncryptionResponse"; + var _UP = "UploadPart"; + var _UPC = "UploadPartCopy"; + var _UPCO = "UploadPartCopyOutput"; + var _UPCR = "UploadPartCopyRequest"; + var _UPO = "UploadPartOutput"; + var _UPR = "UploadPartRequest"; + var _URI = "URI"; + var _Up = "Upload"; + var _V = "Value"; + var _VC = "VersioningConfiguration"; + var _VI = "VersionId"; + var _VIM = "VersionIdMarker"; + var _Ve = "Versions"; + var _Ver = "Version"; + var _WC = "WebsiteConfiguration"; + var _WGOR = "WriteGetObjectResponse"; + var _WGORR = "WriteGetObjectResponseRequest"; + var _WOB = "WriteOffsetBytes"; + var _WRL = "WebsiteRedirectLocation"; + var _Y = "Years"; + var _aN = "annotationName"; + var _ap = "annotation-prefix"; + var _ar = "accept-ranges"; + var _br = "bucket-region"; + var _c = "client"; + var _ct = "continuation-token"; + var _d = "delimiter"; + var _e = "error"; + var _eP = "eventPayload"; + var _en = "endpoint"; + var _et = "encoding-type"; + var _fo = "fetch-owner"; + var _h = "http"; + var _hC = "httpChecksum"; + var _hE = "httpError"; + var _hH = "httpHeader"; + var _hL = "hostLabel"; + var _hP = "httpPayload"; + var _hPH = "httpPrefixHeaders"; + var _hQ = "httpQuery"; + var _hi = "http://www.w3.org/2001/XMLSchema-instance"; + var _i = "id"; + var _iT = "idempotencyToken"; + var _km = "key-marker"; + var _m = "marker"; + var _mar = "max-annotation-results"; + var _mb = "max-buckets"; + var _mdb = "max-directory-buckets"; + var _mk = "max-keys"; + var _mp = "max-parts"; + var _mu = "max-uploads"; + var _p = "prefix"; + var _pN = "partNumber"; + var _pnm = "part-number-marker"; + var _rcc = "response-cache-control"; + var _rcd = "response-content-disposition"; + var _rce = "response-content-encoding"; + var _rcl = "response-content-language"; + var _rct = "response-content-type"; + var _re = "response-expires"; + var _s = "smithy.ts.sdk.synthetic.com.amazonaws.s3"; + var _sa = "start-after"; + var _st = "streaming"; + var _uI = "uploadId"; + var _uim = "upload-id-marker"; + var _vI = "versionId"; + var _vim = "version-id-marker"; + var _x = "xsi"; + var _xA = "xmlAttribute"; + var _xF = "xmlFlattened"; + var _xN = "xmlName"; + var _xNm = "xmlNamespace"; + var _xaa = "x-amz-acl"; + var _xaad = "x-amz-abort-date"; + var _xaapa = "x-amz-access-point-alias"; + var _xaari = "x-amz-abort-rule-id"; + var _xaas = "x-amz-archive-status"; + var _xaba = "x-amz-bucket-arn"; + var _xabgr = "x-amz-bypass-governance-retention"; + var _xabln = "x-amz-bucket-location-name"; + var _xablt = "x-amz-bucket-location-type"; + var _xabn = "x-amz-bucket-namespace"; + var _xabole = "x-amz-bucket-object-lock-enabled"; + var _xabolt = "x-amz-bucket-object-lock-token"; + var _xabr = "x-amz-bucket-region"; + var _xaca = "x-amz-checksum-algorithm"; + var _xacc = "x-amz-checksum-crc32"; + var _xacc_ = "x-amz-checksum-crc32c"; + var _xacc__ = "x-amz-checksum-crc64nvme"; + var _xacm = "x-amz-checksum-md5"; + var _xacm_ = "x-amz-checksum-mode"; + var _xacrsba = "x-amz-confirm-remove-self-bucket-access"; + var _xacs = "x-amz-checksum-sha1"; + var _xacs_ = "x-amz-checksum-sha256"; + var _xacs__ = "x-amz-checksum-sha512"; + var _xacs___ = "x-amz-copy-source"; + var _xacsim = "x-amz-copy-source-if-match"; + var _xacsims = "x-amz-copy-source-if-modified-since"; + var _xacsinm = "x-amz-copy-source-if-none-match"; + var _xacsius = "x-amz-copy-source-if-unmodified-since"; + var _xacsm = "x-amz-create-session-mode"; + var _xacsr = "x-amz-copy-source-range"; + var _xacssseca = "x-amz-copy-source-server-side-encryption-customer-algorithm"; + var _xacssseck = "x-amz-copy-source-server-side-encryption-customer-key"; + var _xacssseckM = "x-amz-copy-source-server-side-encryption-customer-key-MD5"; + var _xacsvi = "x-amz-copy-source-version-id"; + var _xact = "x-amz-checksum-type"; + var _xact_ = "x-amz-client-token"; + var _xacx = "x-amz-checksum-xxhash64"; + var _xacx_ = "x-amz-checksum-xxhash3"; + var _xacx__ = "x-amz-checksum-xxhash128"; + var _xadm = "x-amz-delete-marker"; + var _xae = "x-amz-expiration"; + var _xaebo = "x-amz-expected-bucket-owner"; + var _xafec = "x-amz-fwd-error-code"; + var _xafem = "x-amz-fwd-error-message"; + var _xafhCC = "x-amz-fwd-header-Cache-Control"; + var _xafhCD = "x-amz-fwd-header-Content-Disposition"; + var _xafhCE = "x-amz-fwd-header-Content-Encoding"; + var _xafhCL = "x-amz-fwd-header-Content-Language"; + var _xafhCR = "x-amz-fwd-header-Content-Range"; + var _xafhCT = "x-amz-fwd-header-Content-Type"; + var _xafhE = "x-amz-fwd-header-ETag"; + var _xafhE_ = "x-amz-fwd-header-Expires"; + var _xafhLM = "x-amz-fwd-header-Last-Modified"; + var _xafhar = "x-amz-fwd-header-accept-ranges"; + var _xafhxacc = "x-amz-fwd-header-x-amz-checksum-crc32"; + var _xafhxacc_ = "x-amz-fwd-header-x-amz-checksum-crc32c"; + var _xafhxacc__ = "x-amz-fwd-header-x-amz-checksum-crc64nvme"; + var _xafhxacm = "x-amz-fwd-header-x-amz-checksum-md5"; + var _xafhxacs = "x-amz-fwd-header-x-amz-checksum-sha1"; + var _xafhxacs_ = "x-amz-fwd-header-x-amz-checksum-sha256"; + var _xafhxacs__ = "x-amz-fwd-header-x-amz-checksum-sha512"; + var _xafhxacx = "x-amz-fwd-header-x-amz-checksum-xxhash64"; + var _xafhxacx_ = "x-amz-fwd-header-x-amz-checksum-xxhash3"; + var _xafhxacx__ = "x-amz-fwd-header-x-amz-checksum-xxhash128"; + var _xafhxadm = "x-amz-fwd-header-x-amz-delete-marker"; + var _xafhxae = "x-amz-fwd-header-x-amz-expiration"; + var _xafhxamm = "x-amz-fwd-header-x-amz-missing-meta"; + var _xafhxampc = "x-amz-fwd-header-x-amz-mp-parts-count"; + var _xafhxaollh = "x-amz-fwd-header-x-amz-object-lock-legal-hold"; + var _xafhxaolm = "x-amz-fwd-header-x-amz-object-lock-mode"; + var _xafhxaolrud = "x-amz-fwd-header-x-amz-object-lock-retain-until-date"; + var _xafhxar = "x-amz-fwd-header-x-amz-restore"; + var _xafhxarc = "x-amz-fwd-header-x-amz-request-charged"; + var _xafhxars = "x-amz-fwd-header-x-amz-replication-status"; + var _xafhxasc = "x-amz-fwd-header-x-amz-storage-class"; + var _xafhxasse = "x-amz-fwd-header-x-amz-server-side-encryption"; + var _xafhxasseakki = "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"; + var _xafhxassebke = "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"; + var _xafhxasseca = "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"; + var _xafhxasseckM = "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"; + var _xafhxatc = "x-amz-fwd-header-x-amz-tagging-count"; + var _xafhxavi = "x-amz-fwd-header-x-amz-version-id"; + var _xafs = "x-amz-fwd-status"; + var _xagfc = "x-amz-grant-full-control"; + var _xagr = "x-amz-grant-read"; + var _xagra = "x-amz-grant-read-acp"; + var _xagw = "x-amz-grant-write"; + var _xagwa = "x-amz-grant-write-acp"; + var _xaimit = "x-amz-if-match-initiated-time"; + var _xaimlmt = "x-amz-if-match-last-modified-time"; + var _xaims = "x-amz-if-match-size"; + var _xam = "x-amz-meta-"; + var _xam_ = "x-amz-mfa"; + var _xamd = "x-amz-metadata-directive"; + var _xamm = "x-amz-missing-meta"; + var _xamos = "x-amz-mp-object-size"; + var _xamp = "x-amz-max-parts"; + var _xampc = "x-amz-mp-parts-count"; + var _xaoa = "x-amz-object-attributes"; + var _xaoad = "x-amz-object-annotation-directive"; + var _xaoim = "x-amz-object-if-match"; + var _xaollh = "x-amz-object-lock-legal-hold"; + var _xaolm = "x-amz-object-lock-mode"; + var _xaolrud = "x-amz-object-lock-retain-until-date"; + var _xaoo = "x-amz-object-ownership"; + var _xaooa = "x-amz-optional-object-attributes"; + var _xaos = "x-amz-object-size"; + var _xaovi = "x-amz-object-version-id"; + var _xapnm = "x-amz-part-number-marker"; + var _xar = "x-amz-restore"; + var _xarc = "x-amz-request-charged"; + var _xarop = "x-amz-restore-output-path"; + var _xarp = "x-amz-request-payer"; + var _xarr = "x-amz-request-route"; + var _xars = "x-amz-replication-status"; + var _xars_ = "x-amz-rename-source"; + var _xarsim = "x-amz-rename-source-if-match"; + var _xarsims = "x-amz-rename-source-if-modified-since"; + var _xarsinm = "x-amz-rename-source-if-none-match"; + var _xarsius = "x-amz-rename-source-if-unmodified-since"; + var _xart = "x-amz-request-token"; + var _xasc = "x-amz-storage-class"; + var _xasca = "x-amz-sdk-checksum-algorithm"; + var _xasdv = "x-amz-skip-destination-validation"; + var _xasebo = "x-amz-source-expected-bucket-owner"; + var _xasse = "x-amz-server-side-encryption"; + var _xasseakki = "x-amz-server-side-encryption-aws-kms-key-id"; + var _xassebke = "x-amz-server-side-encryption-bucket-key-enabled"; + var _xassec = "x-amz-server-side-encryption-context"; + var _xasseca = "x-amz-server-side-encryption-customer-algorithm"; + var _xasseck = "x-amz-server-side-encryption-customer-key"; + var _xasseckM = "x-amz-server-side-encryption-customer-key-MD5"; + var _xat = "x-amz-tagging"; + var _xatc = "x-amz-tagging-count"; + var _xatd = "x-amz-tagging-directive"; + var _xatdmos = "x-amz-transition-default-minimum-object-size"; + var _xavi = "x-amz-version-id"; + var _xawob = "x-amz-write-offset-bytes"; + var _xawrl = "x-amz-website-redirect-location"; + var _xs = "xsi:type"; + var n0 = "com.amazonaws.s3"; + var _s_registry = TypeRegistry.for(_s); + var S3ServiceException$ = [-3, _s, "S3ServiceException", 0, [], []]; + _s_registry.registerError(S3ServiceException$, S3ServiceException); + var n0_registry = TypeRegistry.for(n0); + var AccessDenied$ = [ + -3, + n0, + _AD, + { [_e]: _c, [_hE]: 403 }, + [], + [] + ]; + n0_registry.registerError(AccessDenied$, AccessDenied); + var AnnotationLimitExceeded$ = [ + -3, + n0, + _ALE, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(AnnotationLimitExceeded$, AnnotationLimitExceeded); + var AnnotationNameTooLong$ = [ + -3, + n0, + _ANTL, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(AnnotationNameTooLong$, AnnotationNameTooLong); + var BucketAlreadyExists$ = [ + -3, + n0, + _BAE, + { [_e]: _c, [_hE]: 409 }, + [], + [] + ]; + n0_registry.registerError(BucketAlreadyExists$, BucketAlreadyExists); + var BucketAlreadyOwnedByYou$ = [ + -3, + n0, + _BAOBY, + { [_e]: _c, [_hE]: 409 }, + [], + [] + ]; + n0_registry.registerError(BucketAlreadyOwnedByYou$, BucketAlreadyOwnedByYou); + var EncryptionTypeMismatch$ = [ + -3, + n0, + _ETM, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(EncryptionTypeMismatch$, EncryptionTypeMismatch); + var IdempotencyParameterMismatch$ = [ + -3, + n0, + _IPM, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(IdempotencyParameterMismatch$, IdempotencyParameterMismatch); + var InvalidAnnotationName$ = [ + -3, + n0, + _IAN, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(InvalidAnnotationName$, InvalidAnnotationName); + var InvalidObjectState$ = [ + -3, + n0, + _IOS, + { [_e]: _c, [_hE]: 403 }, + [_SC, _AT], + [0, 0] + ]; + n0_registry.registerError(InvalidObjectState$, InvalidObjectState); + var InvalidPrefix$ = [ + -3, + n0, + _IP, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(InvalidPrefix$, InvalidPrefix); + var InvalidRequest$ = [ + -3, + n0, + _IR, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(InvalidRequest$, InvalidRequest); + var InvalidWriteOffset$ = [ + -3, + n0, + _IWO, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(InvalidWriteOffset$, InvalidWriteOffset); + var NoSuchAnnotation$ = [ + -3, + n0, + _NSA, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchAnnotation$, NoSuchAnnotation); + var NoSuchBucket$ = [ + -3, + n0, + _NSB, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchBucket$, NoSuchBucket); + var NoSuchKey$ = [ + -3, + n0, + _NSK, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchKey$, NoSuchKey); + var NoSuchUpload$ = [ + -3, + n0, + _NSU, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchUpload$, NoSuchUpload); + var NotFound$ = [ + -3, + n0, + _NF, + { [_e]: _c }, + [], + [] + ]; + n0_registry.registerError(NotFound$, NotFound); + var ObjectAlreadyInActiveTierError$ = [ + -3, + n0, + _OAIATE, + { [_e]: _c, [_hE]: 403 }, + [], + [] + ]; + n0_registry.registerError(ObjectAlreadyInActiveTierError$, ObjectAlreadyInActiveTierError); + var ObjectNotInActiveTierError$ = [ + -3, + n0, + _ONIATE, + { [_e]: _c, [_hE]: 403 }, + [], + [] + ]; + n0_registry.registerError(ObjectNotInActiveTierError$, ObjectNotInActiveTierError); + var TooManyParts$ = [ + -3, + n0, + _TMP, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(TooManyParts$, TooManyParts); + var UnsupportedMediaType$ = [ + -3, + n0, + _UMT, + { [_e]: _c, [_hE]: 415 }, + [], + [] + ]; + n0_registry.registerError(UnsupportedMediaType$, UnsupportedMediaType); + var errorTypeRegistries = [ + _s_registry, + n0_registry + ]; + var CopySourceSSECustomerKey = [0, n0, _CSSSECK, 8, 0]; + var NonEmptyKmsKeyArnString = [0, n0, _NEKKAS, 8, 0]; + var SessionCredentialValue = [0, n0, _SCV, 8, 0]; + var SSECustomerKey = [0, n0, _SSECK, 8, 0]; + var SSEKMSEncryptionContext = [0, n0, _SSEKMSEC, 8, 0]; + var SSEKMSKeyId = [0, n0, _SSEKMSKI, 8, 0]; + var StreamingBlob = [0, n0, _SB, { [_st]: 1 }, 42]; + var AbacStatus$ = [ + 3, + n0, + _AS, + 0, + [_S], + [0] + ]; + var AbortIncompleteMultipartUpload$ = [ + 3, + n0, + _AIMU, + 0, + [_DAI], + [1] + ]; + var AbortMultipartUploadOutput$ = [ + 3, + n0, + _AMUO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + var AbortMultipartUploadRequest$ = [ + 3, + n0, + _AMUR, + 0, + [_B, _K, _UI, _RP, _EBO, _IMIT], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [6, { [_hH]: _xaimit }]], + 3 + ]; + var AccelerateConfiguration$ = [ + 3, + n0, + _AC, + 0, + [_S], + [0] + ]; + var AccessControlPolicy$ = [ + 3, + n0, + _ACP, + 0, + [_G, _O], + [[() => Grants, { [_xN]: _ACL }], () => Owner$] + ]; + var AccessControlTranslation$ = [ + 3, + n0, + _ACT, + 0, + [_O], + [0], + 1 + ]; + var AnalyticsAndOperator$ = [ + 3, + n0, + _AAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] + ]; + var AnalyticsConfiguration$ = [ + 3, + n0, + _ACn, + 0, + [_I, _SCA, _F], + [0, () => StorageClassAnalysis$, [() => AnalyticsFilter$, 0]], + 2 + ]; + var AnalyticsExportDestination$ = [ + 3, + n0, + _AED, + 0, + [_SBD], + [() => AnalyticsS3BucketDestination$], + 1 + ]; + var AnalyticsS3BucketDestination$ = [ + 3, + n0, + _ASBD, + 0, + [_Fo, _B, _BAI, _P], + [0, 0, 0, 0], + 2 + ]; + var AnnotationEntry$ = [ + 3, + n0, + _AE, + 0, + [_AN, _LM, _Si, _ET, _CA, _RS], + [0, 4, 1, 0, [64 | 0, { [_xF]: 1 }], 0], + 3 + ]; + var AnnotationTableConfiguration$ = [ + 3, + n0, + _ATC, + 0, + [_CS, _EC, _R], + [0, () => MetadataTableEncryptionConfiguration$, 0], + 1 + ]; + var AnnotationTableConfigurationResult$ = [ + 3, + n0, + _ATCR, + 0, + [_CS, _TS, _E, _TN, _TA, _R], + [0, 0, () => ErrorDetails$, 0, 0, 0], + 1 + ]; + var AnnotationTableConfigurationUpdates$ = [ + 3, + n0, + _ATCU, + 0, + [_CS, _EC, _R], + [0, () => MetadataTableEncryptionConfiguration$, 0], + 1 + ]; + var BlockedEncryptionTypes$ = [ + 3, + n0, + _BET, + 0, + [_ETn], + [[() => EncryptionTypeList, { [_xF]: 1 }]] + ]; + var Bucket$ = [ + 3, + n0, + _B, + 0, + [_N, _CD, _BR, _BA], + [0, 4, 0, 0] + ]; + var BucketInfo$ = [ + 3, + n0, + _BI, + 0, + [_DR, _Ty], + [0, 0] + ]; + var BucketLifecycleConfiguration$ = [ + 3, + n0, + _BLC, + 0, + [_Ru], + [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Rul }]], + 1 + ]; + var BucketLoggingStatus$ = [ + 3, + n0, + _BLS, + 0, + [_LE], + [[() => LoggingEnabled$, 0]] + ]; + var Checksum$ = [ + 3, + n0, + _C, + 0, + [_CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _CT], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ]; + var CommonPrefix$ = [ + 3, + n0, + _CP, + 0, + [_P], + [0] + ]; + var CompletedMultipartUpload$ = [ + 3, + n0, + _CMU, + 0, + [_Pa], + [[() => CompletedPartList, { [_xF]: 1, [_xN]: _Par }]] + ]; + var CompletedPart$ = [ + 3, + n0, + _CPo, + 0, + [_ET, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _PN], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] + ]; + var CompleteMultipartUploadOutput$ = [ + 3, + n0, + _CMUO, + { [_xN]: _CMUR }, + [_L, _B, _K, _Ex, _ET, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _CT, _SSE, _VI, _SSEKMSKI, _BKE, _RC], + [0, 0, 0, [0, { [_hH]: _xae }], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + var CompleteMultipartUploadRequest$ = [ + 3, + n0, + _CMURo, + 0, + [_B, _K, _UI, _MU, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _CT, _MOS, _RP, _EBO, _IM, _INM, _SSECA, _SSECK, _SSECKMD], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [() => CompletedMultipartUpload$, { [_hP]: 1, [_xN]: _CMUo }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xacs__ }], [0, { [_hH]: _xacm }], [0, { [_hH]: _xacx }], [0, { [_hH]: _xacx_ }], [0, { [_hH]: _xacx__ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamos }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], + 3 + ]; + var Condition$ = [ + 3, + n0, + _Co, + 0, + [_HECRE, _KPE], + [0, 0] + ]; + var ContinuationEvent$ = [ + 3, + n0, + _CE, + 0, + [], + [] + ]; + var CopyObjectOutput$ = [ + 3, + n0, + _COO, + 0, + [_COR, _Ex, _CSVI, _VI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC], + [[() => CopyObjectResult$, 16], [0, { [_hH]: _xae }], [0, { [_hH]: _xacsvi }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + var CopyObjectRequest$ = [ + 3, + n0, + _CORo, + 0, + [_B, _CSo, _K, _ACL_, _CC, _CA, _CDo, _CEo, _CL, _CTo, _CSIM, _CSIMS, _CSINM, _CSIUS, _Exp, _GFC, _GR, _GRACP, _GWACP, _IM, _INM, _M, _MD, _TD, _ADn, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _ESBO], + [[0, 1], [0, { [_hH]: _xacs___ }], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _xaca }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [4, { [_hH]: _Exp }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xamd }], [0, { [_hH]: _xatd }], [0, { [_hH]: _xaoad }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], + 3 + ]; + var CopyObjectResult$ = [ + 3, + n0, + _COR, + 0, + [_ET, _LM, _CT, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe], + [0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ]; + var CopyPartResult$ = [ + 3, + n0, + _CPR, + 0, + [_ET, _LM, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe], + [0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ]; + var CORSConfiguration$ = [ + 3, + n0, + _CORSC, + 0, + [_CORSR], + [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]], + 1 + ]; + var CORSRule$ = [ + 3, + n0, + _CORSRu, + 0, + [_AM, _AO, _ID, _AH, _EH, _MAS], + [[64 | 0, { [_xF]: 1, [_xN]: _AMl }], [64 | 0, { [_xF]: 1, [_xN]: _AOl }], 0, [64 | 0, { [_xF]: 1, [_xN]: _AHl }], [64 | 0, { [_xF]: 1, [_xN]: _EHx }], 1], + 2 + ]; + var CreateBucketConfiguration$ = [ + 3, + n0, + _CBC, + 0, + [_LC, _L, _B, _T], + [0, () => LocationInfo$, () => BucketInfo$, [() => TagSet, 0]] + ]; + var CreateBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _CBMCR, + 0, + [_B, _MC, _CMDo, _CA, _EBO], + [[0, 1], [() => MetadataConfiguration$, { [_hP]: 1, [_xN]: _MC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var CreateBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _CBMTCR, + 0, + [_B, _MTC, _CMDo, _CA, _EBO], + [[0, 1], [() => MetadataTableConfiguration$, { [_hP]: 1, [_xN]: _MTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var CreateBucketOutput$ = [ + 3, + n0, + _CBO, + 0, + [_L, _BA], + [[0, { [_hH]: _L }], [0, { [_hH]: _xaba }]] + ]; + var CreateBucketRequest$ = [ + 3, + n0, + _CBR, + 0, + [_B, _ACL_, _CBC, _GFC, _GR, _GRACP, _GW, _GWACP, _OLEFB, _OO, _BN], + [[0, 1], [0, { [_hH]: _xaa }], [() => CreateBucketConfiguration$, { [_hP]: 1, [_xN]: _CBC }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [2, { [_hH]: _xabole }], [0, { [_hH]: _xaoo }], [0, { [_hH]: _xabn }]], + 1 + ]; + var CreateMultipartUploadOutput$ = [ + 3, + n0, + _CMUOr, + { [_xN]: _IMUR }, + [_ADb, _ARI, _B, _K, _UI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC, _CA, _CT], + [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], [0, { [_xN]: _B }], 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]] + ]; + var CreateMultipartUploadRequest$ = [ + 3, + n0, + _CMURr, + 0, + [_B, _K, _ACL_, _CC, _CDo, _CEo, _CL, _CTo, _Exp, _GFC, _GR, _GRACP, _GWACP, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _CA, _CT], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Exp }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]], + 2 + ]; + var CreateSessionOutput$ = [ + 3, + n0, + _CSO, + { [_xN]: _CSR }, + [_Cr, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE], + [[() => SessionCredentials$, { [_xN]: _Cr }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], + 1 + ]; + var CreateSessionRequest$ = [ + 3, + n0, + _CSRr, + 0, + [_B, _SM, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE], + [[0, 1], [0, { [_hH]: _xacsm }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], + 1 + ]; + var CSVInput$ = [ + 3, + n0, + _CSVIn, + 0, + [_FHI, _Com, _QEC, _RD, _FD, _QC, _AQRD], + [0, 0, 0, 0, 0, 0, 2] + ]; + var CSVOutput$ = [ + 3, + n0, + _CSVO, + 0, + [_QF, _QEC, _RD, _FD, _QC], + [0, 0, 0, 0, 0] + ]; + var DefaultRetention$ = [ + 3, + n0, + _DRe, + 0, + [_Mo, _D, _Y], + [0, 1, 1] + ]; + var Delete$ = [ + 3, + n0, + _De, + 0, + [_Ob, _Q], + [[() => ObjectIdentifierList, { [_xF]: 1, [_xN]: _Obj }], 2], + 1 + ]; + var DeleteBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _DBACR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var DeleteBucketCorsRequest$ = [ + 3, + n0, + _DBCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var DeleteBucketEncryptionRequest$ = [ + 3, + n0, + _DBER, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var DeleteBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _DBITCR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var DeleteBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _DBICR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var DeleteBucketLifecycleRequest$ = [ + 3, + n0, + _DBLR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var DeleteBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _DBMCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var DeleteBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _DBMTCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var DeleteBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _DBMCRe, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var DeleteBucketOwnershipControlsRequest$ = [ + 3, + n0, + _DBOCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var DeleteBucketPolicyRequest$ = [ + 3, + n0, + _DBPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var DeleteBucketReplicationRequest$ = [ + 3, + n0, + _DBRR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var DeleteBucketRequest$ = [ + 3, + n0, + _DBR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var DeleteBucketTaggingRequest$ = [ + 3, + n0, + _DBTR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var DeleteBucketWebsiteRequest$ = [ + 3, + n0, + _DBWR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var DeletedObject$ = [ + 3, + n0, + _DO, + 0, + [_K, _VI, _DM, _DMVI], + [0, 0, 2, 0] + ]; + var DeleteMarkerEntry$ = [ + 3, + n0, + _DME, + 0, + [_O, _K, _VI, _IL, _LM], + [() => Owner$, 0, 0, 2, 4] + ]; + var DeleteMarkerReplication$ = [ + 3, + n0, + _DMR, + 0, + [_S], + [0] + ]; + var DeleteObjectAnnotationOutput$ = [ + 3, + n0, + _DOAO, + 0, + [_OVI, _RC], + [[0, { [_hH]: _xaovi }], [0, { [_hH]: _xarc }]] + ]; + var DeleteObjectAnnotationRequest$ = [ + 3, + n0, + _DOAR, + 0, + [_B, _K, _AN, _VI, _RP, _EBO, _OIM], + [[0, 1], [0, 1], [0, { [_hQ]: _aN }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xaoim }]], + 3 + ]; + var DeleteObjectOutput$ = [ + 3, + n0, + _DOO, + 0, + [_DM, _VI, _RC], + [[2, { [_hH]: _xadm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }]] + ]; + var DeleteObjectRequest$ = [ + 3, + n0, + _DOR, + 0, + [_B, _K, _MFA, _VI, _RP, _BGR, _EBO, _IM, _IMLMT, _IMS], + [[0, 1], [0, 1], [0, { [_hH]: _xam_ }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [6, { [_hH]: _xaimlmt }], [1, { [_hH]: _xaims }]], + 2 + ]; + var DeleteObjectsOutput$ = [ + 3, + n0, + _DOOe, + { [_xN]: _DRel }, + [_Del, _RC, _Er], + [[() => DeletedObjects, { [_xF]: 1 }], [0, { [_hH]: _xarc }], [() => Errors, { [_xF]: 1, [_xN]: _E }]] + ]; + var DeleteObjectsRequest$ = [ + 3, + n0, + _DORe, + 0, + [_B, _De, _MFA, _RP, _BGR, _EBO, _CA], + [[0, 1], [() => Delete$, { [_hP]: 1, [_xN]: _De }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 + ]; + var DeleteObjectTaggingOutput$ = [ + 3, + n0, + _DOTO, + 0, + [_VI], + [[0, { [_hH]: _xavi }]] + ]; + var DeleteObjectTaggingRequest$ = [ + 3, + n0, + _DOTR, + 0, + [_B, _K, _VI, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var DeletePublicAccessBlockRequest$ = [ + 3, + n0, + _DPABR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var Destination$ = [ + 3, + n0, + _Des, + 0, + [_B, _A, _SC, _ACT, _EC, _RT, _Me], + [0, 0, 0, () => AccessControlTranslation$, () => EncryptionConfiguration$, () => ReplicationTime$, () => Metrics$], + 1 + ]; + var DestinationResult$ = [ + 3, + n0, + _DRes, + 0, + [_TBT, _TBA, _TNa], + [0, 0, 0] + ]; + var Encryption$ = [ + 3, + n0, + _En, + 0, + [_ETn, _KMSKI, _KMSC], + [0, [() => SSEKMSKeyId, 0], 0], + 1 + ]; + var EncryptionConfiguration$ = [ + 3, + n0, + _EC, + 0, + [_RKKID], + [0] + ]; + var EndEvent$ = [ + 3, + n0, + _EE, + 0, + [], + [] + ]; + var _Error$ = [ + 3, + n0, + _E, + 0, + [_K, _VI, _Cod, _Mes], + [0, 0, 0, 0] + ]; + var ErrorDetails$ = [ + 3, + n0, + _ED, + 0, + [_ECr, _EM], + [0, 0] + ]; + var ErrorDocument$ = [ + 3, + n0, + _EDr, + 0, + [_K], + [0], + 1 + ]; + var EventBridgeConfiguration$ = [ + 3, + n0, + _EBC, + 0, + [], + [] + ]; + var ExistingObjectReplication$ = [ + 3, + n0, + _EOR, + 0, + [_S], + [0], + 1 + ]; + var FilterRule$ = [ + 3, + n0, + _FR, + 0, + [_N, _V], + [0, 0] + ]; + var GetBucketAbacOutput$ = [ + 3, + n0, + _GBAO, + 0, + [_AS], + [[() => AbacStatus$, 16]] + ]; + var GetBucketAbacRequest$ = [ + 3, + n0, + _GBAR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketAccelerateConfigurationOutput$ = [ + 3, + n0, + _GBACO, + { [_xN]: _AC }, + [_S, _RC], + [0, [0, { [_hH]: _xarc }]] + ]; + var GetBucketAccelerateConfigurationRequest$ = [ + 3, + n0, + _GBACR, + 0, + [_B, _EBO, _RP], + [[0, 1], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 1 + ]; + var GetBucketAclOutput$ = [ + 3, + n0, + _GBAOe, + { [_xN]: _ACP }, + [_O, _G], + [() => Owner$, [() => Grants, { [_xN]: _ACL }]] + ]; + var GetBucketAclRequest$ = [ + 3, + n0, + _GBARe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketAnalyticsConfigurationOutput$ = [ + 3, + n0, + _GBACOe, + 0, + [_ACn], + [[() => AnalyticsConfiguration$, 16]] + ]; + var GetBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _GBACRe, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var GetBucketCorsOutput$ = [ + 3, + n0, + _GBCO, + { [_xN]: _CORSC }, + [_CORSR], + [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]] + ]; + var GetBucketCorsRequest$ = [ + 3, + n0, + _GBCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketEncryptionOutput$ = [ + 3, + n0, + _GBEO, + 0, + [_SSEC], + [[() => ServerSideEncryptionConfiguration$, 16]] + ]; + var GetBucketEncryptionRequest$ = [ + 3, + n0, + _GBER, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketIntelligentTieringConfigurationOutput$ = [ + 3, + n0, + _GBITCO, + 0, + [_ITC], + [[() => IntelligentTieringConfiguration$, 16]] + ]; + var GetBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _GBITCR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var GetBucketInventoryConfigurationOutput$ = [ + 3, + n0, + _GBICO, + 0, + [_IC], + [[() => InventoryConfiguration$, 16]] + ]; + var GetBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _GBICR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var GetBucketLifecycleConfigurationOutput$ = [ + 3, + n0, + _GBLCO, + { [_xN]: _LCi }, + [_Ru, _TDMOS], + [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Rul }], [0, { [_hH]: _xatdmos }]] + ]; + var GetBucketLifecycleConfigurationRequest$ = [ + 3, + n0, + _GBLCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketLocationOutput$ = [ + 3, + n0, + _GBLO, + { [_xN]: _LC }, + [_LC], + [0] + ]; + var GetBucketLocationRequest$ = [ + 3, + n0, + _GBLR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketLoggingOutput$ = [ + 3, + n0, + _GBLOe, + { [_xN]: _BLS }, + [_LE], + [[() => LoggingEnabled$, 0]] + ]; + var GetBucketLoggingRequest$ = [ + 3, + n0, + _GBLRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketMetadataConfigurationOutput$ = [ + 3, + n0, + _GBMCO, + 0, + [_GBMCR], + [[() => GetBucketMetadataConfigurationResult$, 16]] + ]; + var GetBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _GBMCRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketMetadataConfigurationResult$ = [ + 3, + n0, + _GBMCR, + 0, + [_MCR], + [() => MetadataConfigurationResult$], + 1 + ]; + var GetBucketMetadataTableConfigurationOutput$ = [ + 3, + n0, + _GBMTCO, + 0, + [_GBMTCR], + [[() => GetBucketMetadataTableConfigurationResult$, 16]] + ]; + var GetBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _GBMTCRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketMetadataTableConfigurationResult$ = [ + 3, + n0, + _GBMTCR, + 0, + [_MTCR, _S, _E], + [() => MetadataTableConfigurationResult$, 0, () => ErrorDetails$], + 2 + ]; + var GetBucketMetricsConfigurationOutput$ = [ + 3, + n0, + _GBMCOe, + 0, + [_MCe], + [[() => MetricsConfiguration$, 16]] + ]; + var GetBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _GBMCRet, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var GetBucketNotificationConfigurationRequest$ = [ + 3, + n0, + _GBNCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketOwnershipControlsOutput$ = [ + 3, + n0, + _GBOCO, + 0, + [_OC], + [[() => OwnershipControls$, 16]] + ]; + var GetBucketOwnershipControlsRequest$ = [ + 3, + n0, + _GBOCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketPolicyOutput$ = [ + 3, + n0, + _GBPO, + 0, + [_Po], + [[0, 16]] + ]; + var GetBucketPolicyRequest$ = [ + 3, + n0, + _GBPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketPolicyStatusOutput$ = [ + 3, + n0, + _GBPSO, + 0, + [_PS], + [[() => PolicyStatus$, 16]] + ]; + var GetBucketPolicyStatusRequest$ = [ + 3, + n0, + _GBPSR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketReplicationOutput$ = [ + 3, + n0, + _GBRO, + 0, + [_RCe], + [[() => ReplicationConfiguration$, 16]] + ]; + var GetBucketReplicationRequest$ = [ + 3, + n0, + _GBRR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketRequestPaymentOutput$ = [ + 3, + n0, + _GBRPO, + { [_xN]: _RPC }, + [_Pay], + [0] + ]; + var GetBucketRequestPaymentRequest$ = [ + 3, + n0, + _GBRPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketTaggingOutput$ = [ + 3, + n0, + _GBTO, + { [_xN]: _Tag }, + [_TSa], + [[() => TagSet, 0]], + 1 + ]; + var GetBucketTaggingRequest$ = [ + 3, + n0, + _GBTR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketVersioningOutput$ = [ + 3, + n0, + _GBVO, + { [_xN]: _VC }, + [_S, _MFAD], + [0, [0, { [_xN]: _MDf }]] + ]; + var GetBucketVersioningRequest$ = [ + 3, + n0, + _GBVR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetBucketWebsiteOutput$ = [ + 3, + n0, + _GBWO, + { [_xN]: _WC }, + [_RART, _IDn, _EDr, _RR], + [() => RedirectAllRequestsTo$, () => IndexDocument$, () => ErrorDocument$, [() => RoutingRules, 0]] + ]; + var GetBucketWebsiteRequest$ = [ + 3, + n0, + _GBWR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetObjectAclOutput$ = [ + 3, + n0, + _GOAO, + { [_xN]: _ACP }, + [_O, _G, _RC], + [() => Owner$, [() => Grants, { [_xN]: _ACL }], [0, { [_hH]: _xarc }]] + ]; + var GetObjectAclRequest$ = [ + 3, + n0, + _GOAR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var GetObjectAnnotationOutput$ = [ + 3, + n0, + _GOAOe, + 0, + [_AP, _OVI, _LM, _CLo, _ET, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _CT, _SSE, _RC, _RS], + [[() => StreamingBlob, 16], [0, { [_hH]: _xaovi }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _ET }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xacs__ }], [0, { [_hH]: _xacm }], [0, { [_hH]: _xacx }], [0, { [_hH]: _xacx_ }], [0, { [_hH]: _xacx__ }], [0, { [_hH]: _xact }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }]] + ]; + var GetObjectAnnotationRequest$ = [ + 3, + n0, + _GOARe, + 0, + [_B, _K, _AN, _VI, _RP, _EBO, _CMh], + [[0, 1], [0, 1], [0, { [_hQ]: _aN }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm_ }]], + 3 + ]; + var GetObjectAttributesOutput$ = [ + 3, + n0, + _GOAOet, + { [_xN]: _GOARet }, + [_DM, _LM, _VI, _RC, _ET, _C, _OP, _SC, _OS], + [[2, { [_hH]: _xadm }], [4, { [_hH]: _LM_ }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }], 0, () => Checksum$, [() => GetObjectAttributesParts$, 0], 0, 1] + ]; + var GetObjectAttributesParts$ = [ + 3, + n0, + _GOAP, + 0, + [_TPC, _PNM, _NPNM, _MP, _IT, _Pa], + [[1, { [_xN]: _PC }], 0, 0, 1, 2, [() => PartsList, { [_xF]: 1, [_xN]: _Par }]] + ]; + var GetObjectAttributesRequest$ = [ + 3, + n0, + _GOARetb, + 0, + [_B, _K, _OA, _VI, _MP, _PNM, _SSECA, _SSECK, _SSECKMD, _RP, _EBO], + [[0, 1], [0, 1], [64 | 0, { [_hH]: _xaoa }], [0, { [_hQ]: _vI }], [1, { [_hH]: _xamp }], [0, { [_hH]: _xapnm }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 3 + ]; + var GetObjectLegalHoldOutput$ = [ + 3, + n0, + _GOLHO, + 0, + [_LH], + [[() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }]] + ]; + var GetObjectLegalHoldRequest$ = [ + 3, + n0, + _GOLHR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var GetObjectLockConfigurationOutput$ = [ + 3, + n0, + _GOLCO, + 0, + [_OLC], + [[() => ObjectLockConfiguration$, 16]] + ]; + var GetObjectLockConfigurationRequest$ = [ + 3, + n0, + _GOLCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GetObjectOutput$ = [ + 3, + n0, + _GOO, + 0, + [_Bo, _DM, _AR, _Ex, _Re, _LM, _CLo, _ET, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _CT, _MM, _VI, _CC, _CDo, _CEo, _CL, _CR, _CTo, _Exp, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS], + [[() => StreamingBlob, 16], [2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _ET }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xacs__ }], [0, { [_hH]: _xacm }], [0, { [_hH]: _xacx }], [0, { [_hH]: _xacx_ }], [0, { [_hH]: _xacx__ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CR_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Exp }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]] + ]; + var GetObjectRequest$ = [ + 3, + n0, + _GOR, + 0, + [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh], + [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm_ }]], + 2 + ]; + var GetObjectRetentionOutput$ = [ + 3, + n0, + _GORO, + 0, + [_Ret], + [[() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }]] + ]; + var GetObjectRetentionRequest$ = [ + 3, + n0, + _GORR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var GetObjectTaggingOutput$ = [ + 3, + n0, + _GOTO, + { [_xN]: _Tag }, + [_TSa, _VI], + [[() => TagSet, 0], [0, { [_hH]: _xavi }]], + 1 + ]; + var GetObjectTaggingRequest$ = [ + 3, + n0, + _GOTR, + 0, + [_B, _K, _VI, _EBO, _RP], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 2 + ]; + var GetObjectTorrentOutput$ = [ + 3, + n0, + _GOTOe, + 0, + [_Bo, _RC], + [[() => StreamingBlob, 16], [0, { [_hH]: _xarc }]] + ]; + var GetObjectTorrentRequest$ = [ + 3, + n0, + _GOTRe, + 0, + [_B, _K, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var GetPublicAccessBlockOutput$ = [ + 3, + n0, + _GPABO, + 0, + [_PABC], + [[() => PublicAccessBlockConfiguration$, 16]] + ]; + var GetPublicAccessBlockRequest$ = [ + 3, + n0, + _GPABR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var GlacierJobParameters$ = [ + 3, + n0, + _GJP, + 0, + [_Ti], + [0], + 1 + ]; + var Grant$ = [ + 3, + n0, + _Gr, + 0, + [_Gra, _Pe], + [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0] + ]; + var Grantee$ = [ + 3, + n0, + _Gra, + 0, + [_Ty, _DN, _EA, _ID, _URI], + [[0, { [_xA]: 1, [_xN]: _xs }], 0, 0, 0, 0], + 1 + ]; + var HeadBucketOutput$ = [ + 3, + n0, + _HBO, + 0, + [_BA, _BLT, _BLN, _BR, _APA], + [[0, { [_hH]: _xaba }], [0, { [_hH]: _xablt }], [0, { [_hH]: _xabln }], [0, { [_hH]: _xabr }], [2, { [_hH]: _xaapa }]] + ]; + var HeadBucketRequest$ = [ + 3, + n0, + _HBR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + var HeadObjectOutput$ = [ + 3, + n0, + _HOO, + 0, + [_DM, _AR, _Ex, _Re, _ASr, _LM, _CLo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _CT, _ET, _MM, _VI, _CC, _CDo, _CEo, _CL, _CTo, _CR, _Exp, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS], + [[2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [0, { [_hH]: _xaas }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xacs__ }], [0, { [_hH]: _xacm }], [0, { [_hH]: _xacx }], [0, { [_hH]: _xacx_ }], [0, { [_hH]: _xacx__ }], [0, { [_hH]: _xact }], [0, { [_hH]: _ET }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _CR_ }], [4, { [_hH]: _Exp }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]] + ]; + var HeadObjectRequest$ = [ + 3, + n0, + _HOR, + 0, + [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh], + [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm_ }]], + 2 + ]; + var IndexDocument$ = [ + 3, + n0, + _IDn, + 0, + [_Su], + [0], + 1 + ]; + var Initiator$ = [ + 3, + n0, + _In, + 0, + [_ID, _DN], + [0, 0] + ]; + var InputSerialization$ = [ + 3, + n0, + _IS, + 0, + [_CSV, _CTom, _JSON, _Parq], + [() => CSVInput$, 0, () => JSONInput$, () => ParquetInput$] + ]; + var IntelligentTieringAndOperator$ = [ + 3, + n0, + _ITAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] + ]; + var IntelligentTieringConfiguration$ = [ + 3, + n0, + _ITC, + 0, + [_I, _S, _Tie, _F], + [0, 0, [() => TieringList, { [_xF]: 1, [_xN]: _Tier }], [() => IntelligentTieringFilter$, 0]], + 3 + ]; + var IntelligentTieringFilter$ = [ + 3, + n0, + _ITF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => IntelligentTieringAndOperator$, 0]] + ]; + var InventoryConfiguration$ = [ + 3, + n0, + _IC, + 0, + [_Des, _IE, _I, _IOV, _Sc, _F, _OF], + [[() => InventoryDestination$, 0], 2, 0, 0, () => InventorySchedule$, () => InventoryFilter$, [() => InventoryOptionalFields, 0]], + 5 + ]; + var InventoryDestination$ = [ + 3, + n0, + _IDnv, + 0, + [_SBD], + [[() => InventoryS3BucketDestination$, 0]], + 1 + ]; + var InventoryEncryption$ = [ + 3, + n0, + _IEn, + 0, + [_SSES, _SSEKMS], + [[() => SSES3$, { [_xN]: _SS }], [() => SSEKMS$, { [_xN]: _SK }]] + ]; + var InventoryFilter$ = [ + 3, + n0, + _IF, + 0, + [_P], + [0], + 1 + ]; + var InventoryS3BucketDestination$ = [ + 3, + n0, + _ISBD, + 0, + [_B, _Fo, _AI, _P, _En], + [0, 0, 0, 0, [() => InventoryEncryption$, 0]], + 2 + ]; + var InventorySchedule$ = [ + 3, + n0, + _ISn, + 0, + [_Fr], + [0], + 1 + ]; + var InventoryTableConfiguration$ = [ + 3, + n0, + _ITCn, + 0, + [_CS, _EC], + [0, () => MetadataTableEncryptionConfiguration$], + 1 + ]; + var InventoryTableConfigurationResult$ = [ + 3, + n0, + _ITCR, + 0, + [_CS, _TS, _E, _TN, _TA], + [0, 0, () => ErrorDetails$, 0, 0], + 1 + ]; + var InventoryTableConfigurationUpdates$ = [ + 3, + n0, + _ITCU, + 0, + [_CS, _EC], + [0, () => MetadataTableEncryptionConfiguration$], + 1 + ]; + var JournalTableConfiguration$ = [ + 3, + n0, + _JTC, + 0, + [_REe, _EC], + [() => RecordExpiration$, () => MetadataTableEncryptionConfiguration$], + 1 + ]; + var JournalTableConfigurationResult$ = [ + 3, + n0, + _JTCR, + 0, + [_TS, _TN, _REe, _E, _TA], + [0, 0, () => RecordExpiration$, () => ErrorDetails$, 0], + 3 + ]; + var JournalTableConfigurationUpdates$ = [ + 3, + n0, + _JTCU, + 0, + [_REe], + [() => RecordExpiration$], + 1 + ]; + var JSONInput$ = [ + 3, + n0, + _JSONI, + 0, + [_Ty], + [0] + ]; + var JSONOutput$ = [ + 3, + n0, + _JSONO, + 0, + [_RD], + [0] + ]; + var LambdaFunctionConfiguration$ = [ + 3, + n0, + _LFC, + 0, + [_LFA, _Ev, _I, _F], + [[0, { [_xN]: _CF }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 + ]; + var LifecycleExpiration$ = [ + 3, + n0, + _LEi, + 0, + [_Da, _D, _EODM], + [5, 1, 2] + ]; + var LifecycleRule$ = [ + 3, + n0, + _LR, + 0, + [_S, _Ex, _ID, _P, _F, _Tr, _NVT, _NVE, _AIMU], + [0, () => LifecycleExpiration$, 0, 0, [() => LifecycleRuleFilter$, 0], [() => TransitionList, { [_xF]: 1, [_xN]: _Tra }], [() => NoncurrentVersionTransitionList, { [_xF]: 1, [_xN]: _NVTo }], () => NoncurrentVersionExpiration$, () => AbortIncompleteMultipartUpload$], + 1 + ]; + var LifecycleRuleAndOperator$ = [ + 3, + n0, + _LRAO, + 0, + [_P, _T, _OSGT, _OSLT], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 1, 1] + ]; + var LifecycleRuleFilter$ = [ + 3, + n0, + _LRF, + 0, + [_P, _Ta, _OSGT, _OSLT, _An], + [0, () => Tag$, 1, 1, [() => LifecycleRuleAndOperator$, 0]] + ]; + var ListBucketAnalyticsConfigurationsOutput$ = [ + 3, + n0, + _LBACO, + { [_xN]: _LBACR }, + [_IT, _CTon, _NCT, _ACLn], + [2, 0, 0, [() => AnalyticsConfigurationList, { [_xF]: 1, [_xN]: _ACn }]] + ]; + var ListBucketAnalyticsConfigurationsRequest$ = [ + 3, + n0, + _LBACRi, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + var ListBucketIntelligentTieringConfigurationsOutput$ = [ + 3, + n0, + _LBITCO, + 0, + [_IT, _CTon, _NCT, _ITCL], + [2, 0, 0, [() => IntelligentTieringConfigurationList, { [_xF]: 1, [_xN]: _ITC }]] + ]; + var ListBucketIntelligentTieringConfigurationsRequest$ = [ + 3, + n0, + _LBITCR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + var ListBucketInventoryConfigurationsOutput$ = [ + 3, + n0, + _LBICO, + { [_xN]: _LICR }, + [_CTon, _ICL, _IT, _NCT], + [0, [() => InventoryConfigurationList, { [_xF]: 1, [_xN]: _IC }], 2, 0] + ]; + var ListBucketInventoryConfigurationsRequest$ = [ + 3, + n0, + _LBICR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + var ListBucketMetricsConfigurationsOutput$ = [ + 3, + n0, + _LBMCO, + { [_xN]: _LMCR }, + [_IT, _CTon, _NCT, _MCL], + [2, 0, 0, [() => MetricsConfigurationList, { [_xF]: 1, [_xN]: _MCe }]] + ]; + var ListBucketMetricsConfigurationsRequest$ = [ + 3, + n0, + _LBMCR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + var ListBucketsOutput$ = [ + 3, + n0, + _LBO, + { [_xN]: _LAMBR }, + [_Bu, _O, _CTon, _P], + [[() => Buckets, 0], () => Owner$, 0, 0] + ]; + var ListBucketsRequest$ = [ + 3, + n0, + _LBR, + 0, + [_MB, _CTon, _P, _BR], + [[1, { [_hQ]: _mb }], [0, { [_hQ]: _ct }], [0, { [_hQ]: _p }], [0, { [_hQ]: _br }]] + ]; + var ListDirectoryBucketsOutput$ = [ + 3, + n0, + _LDBO, + { [_xN]: _LAMDBR }, + [_Bu, _CTon], + [[() => Buckets, 0], 0] + ]; + var ListDirectoryBucketsRequest$ = [ + 3, + n0, + _LDBR, + 0, + [_CTon, _MDB], + [[0, { [_hQ]: _ct }], [1, { [_hQ]: _mdb }]] + ]; + var ListMultipartUploadsOutput$ = [ + 3, + n0, + _LMUO, + { [_xN]: _LMUR }, + [_B, _KM, _UIM, _NKM, _P, _Deli, _NUIM, _MUa, _IT, _U, _CPom, _ETnc, _RC], + [0, 0, 0, 0, 0, 0, 0, 1, 2, [() => MultipartUploadList, { [_xF]: 1, [_xN]: _Up }], [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] + ]; + var ListMultipartUploadsRequest$ = [ + 3, + n0, + _LMURi, + 0, + [_B, _Deli, _ETnc, _KM, _MUa, _P, _UIM, _EBO, _RP], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mu }], [0, { [_hQ]: _p }], [0, { [_hQ]: _uim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 1 + ]; + var ListObjectAnnotationsOutput$ = [ + 3, + n0, + _LOAO, + 0, + [_Ann, _B, _K, _OVI, _APn, _MAR, _ACnn, _CTon, _NCT, _RC], + [[() => AnnotationList, 0], 0, 0, [0, { [_hH]: _xaovi }], 0, 1, 1, 0, 0, [0, { [_hH]: _xarc }]] + ]; + var ListObjectAnnotationsRequest$ = [ + 3, + n0, + _LOAR, + 0, + [_B, _K, _VI, _MAR, _APn, _CTon, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [1, { [_hQ]: _mar }], [0, { [_hQ]: _ap }], [0, { [_hQ]: _ct }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var ListObjectsOutput$ = [ + 3, + n0, + _LOO, + { [_xN]: _LBRi }, + [_IT, _Ma, _NM, _Con, _N, _P, _Deli, _MK, _CPom, _ETnc, _RC], + [2, 0, 0, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] + ]; + var ListObjectsRequest$ = [ + 3, + n0, + _LOR, + 0, + [_B, _Deli, _ETnc, _Ma, _MK, _P, _RP, _EBO, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _m }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], + 1 + ]; + var ListObjectsV2Output$ = [ + 3, + n0, + _LOVO, + { [_xN]: _LBRi }, + [_IT, _Con, _N, _P, _Deli, _MK, _CPom, _ETnc, _KC, _CTon, _NCT, _SA, _RC], + [2, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, 1, 0, 0, 0, [0, { [_hH]: _xarc }]] + ]; + var ListObjectsV2Request$ = [ + 3, + n0, + _LOVR, + 0, + [_B, _Deli, _ETnc, _MK, _P, _CTon, _FO, _SA, _RP, _EBO, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _ct }], [2, { [_hQ]: _fo }], [0, { [_hQ]: _sa }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], + 1 + ]; + var ListObjectVersionsOutput$ = [ + 3, + n0, + _LOVOi, + { [_xN]: _LVR }, + [_IT, _KM, _VIM, _NKM, _NVIM, _Ve, _DMe, _N, _P, _Deli, _MK, _CPom, _ETnc, _RC], + [2, 0, 0, 0, 0, [() => ObjectVersionList, { [_xF]: 1, [_xN]: _Ver }], [() => DeleteMarkers, { [_xF]: 1, [_xN]: _DM }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] + ]; + var ListObjectVersionsRequest$ = [ + 3, + n0, + _LOVRi, + 0, + [_B, _Deli, _ETnc, _KM, _MK, _P, _VIM, _EBO, _RP, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _vim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }], [64 | 0, { [_hH]: _xaooa }]], + 1 + ]; + var ListPartsOutput$ = [ + 3, + n0, + _LPO, + { [_xN]: _LPR }, + [_ADb, _ARI, _B, _K, _UI, _PNM, _NPNM, _MP, _IT, _Pa, _In, _O, _SC, _RC, _CA, _CT], + [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], 0, 0, 0, 0, 0, 1, 2, [() => Parts, { [_xF]: 1, [_xN]: _Par }], () => Initiator$, () => Owner$, 0, [0, { [_hH]: _xarc }], 0, 0] + ]; + var ListPartsRequest$ = [ + 3, + n0, + _LPRi, + 0, + [_B, _K, _UI, _MP, _PNM, _RP, _EBO, _SSECA, _SSECK, _SSECKMD], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [1, { [_hQ]: _mp }], [0, { [_hQ]: _pnm }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], + 3 + ]; + var LocationInfo$ = [ + 3, + n0, + _LI, + 0, + [_Ty, _N], + [0, 0] + ]; + var LoggingEnabled$ = [ + 3, + n0, + _LE, + 0, + [_TB, _TP, _TG, _TOKF], + [0, 0, [() => TargetGrants, 0], [() => TargetObjectKeyFormat$, 0]], + 2 + ]; + var MetadataConfiguration$ = [ + 3, + n0, + _MC, + 0, + [_JTC, _ITCn, _ATC], + [() => JournalTableConfiguration$, () => InventoryTableConfiguration$, () => AnnotationTableConfiguration$], + 1 + ]; + var MetadataConfigurationResult$ = [ + 3, + n0, + _MCR, + 0, + [_DRes, _JTCR, _ITCR, _ATCR], + [() => DestinationResult$, () => JournalTableConfigurationResult$, () => InventoryTableConfigurationResult$, () => AnnotationTableConfigurationResult$], + 1 + ]; + var MetadataEntry$ = [ + 3, + n0, + _ME, + 0, + [_N, _V], + [0, 0] + ]; + var MetadataTableConfiguration$ = [ + 3, + n0, + _MTC, + 0, + [_STD], + [() => S3TablesDestination$], + 1 + ]; + var MetadataTableConfigurationResult$ = [ + 3, + n0, + _MTCR, + 0, + [_STDR], + [() => S3TablesDestinationResult$], + 1 + ]; + var MetadataTableEncryptionConfiguration$ = [ + 3, + n0, + _MTEC, + 0, + [_SAs, _KKA], + [0, 0], + 1 + ]; + var Metrics$ = [ + 3, + n0, + _Me, + 0, + [_S, _ETv], + [0, () => ReplicationTimeValue$], + 1 + ]; + var MetricsAndOperator$ = [ + 3, + n0, + _MAO, + 0, + [_P, _T, _APAc], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 0] + ]; + var MetricsConfiguration$ = [ + 3, + n0, + _MCe, + 0, + [_I, _F], + [0, [() => MetricsFilter$, 0]], + 1 + ]; + var MultipartUpload$ = [ + 3, + n0, + _MU, + 0, + [_UI, _K, _Ini, _SC, _O, _In, _CA, _CT], + [0, 0, 4, 0, () => Owner$, () => Initiator$, 0, 0] + ]; + var NoncurrentVersionExpiration$ = [ + 3, + n0, + _NVE, + 0, + [_ND, _NNV], + [1, 1] + ]; + var NoncurrentVersionTransition$ = [ + 3, + n0, + _NVTo, + 0, + [_ND, _SC, _NNV], + [1, 0, 1] + ]; + var NotificationConfiguration$ = [ + 3, + n0, + _NC, + 0, + [_TCo, _QCu, _LFCa, _EBC], + [[() => TopicConfigurationList, { [_xF]: 1, [_xN]: _TCop }], [() => QueueConfigurationList, { [_xF]: 1, [_xN]: _QCue }], [() => LambdaFunctionConfigurationList, { [_xF]: 1, [_xN]: _CFC }], () => EventBridgeConfiguration$] + ]; + var NotificationConfigurationFilter$ = [ + 3, + n0, + _NCF, + 0, + [_K], + [[() => S3KeyFilter$, { [_xN]: _SKe }]] + ]; + var _Object$ = [ + 3, + n0, + _Obj, + 0, + [_K, _LM, _ET, _CA, _CT, _Si, _SC, _O, _RSe], + [0, 4, 0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, () => Owner$, () => RestoreStatus$] + ]; + var ObjectIdentifier$ = [ + 3, + n0, + _OI, + 0, + [_K, _VI, _ET, _LMT, _Si], + [0, 0, 0, 6, 1], + 1 + ]; + var ObjectLockConfiguration$ = [ + 3, + n0, + _OLC, + 0, + [_OLE, _Rul], + [0, () => ObjectLockRule$] + ]; + var ObjectLockLegalHold$ = [ + 3, + n0, + _OLLH, + 0, + [_S], + [0] + ]; + var ObjectLockRetention$ = [ + 3, + n0, + _OLR, + 0, + [_Mo, _RUD], + [0, 5] + ]; + var ObjectLockRule$ = [ + 3, + n0, + _OLRb, + 0, + [_DRe], + [() => DefaultRetention$] + ]; + var ObjectPart$ = [ + 3, + n0, + _OPb, + 0, + [_PN, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe], + [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ]; + var ObjectVersion$ = [ + 3, + n0, + _OV, + 0, + [_ET, _CA, _CT, _Si, _SC, _K, _VI, _IL, _LM, _O, _RSe], + [0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, 0, 0, 2, 4, () => Owner$, () => RestoreStatus$] + ]; + var OutputLocation$ = [ + 3, + n0, + _OL, + 0, + [_S_], + [[() => S3Location$, 0]] + ]; + var OutputSerialization$ = [ + 3, + n0, + _OSu, + 0, + [_CSV, _JSON], + [() => CSVOutput$, () => JSONOutput$] + ]; + var Owner$ = [ + 3, + n0, + _O, + 0, + [_DN, _ID], + [0, 0] + ]; + var OwnershipControls$ = [ + 3, + n0, + _OC, + 0, + [_Ru], + [[() => OwnershipControlsRules, { [_xF]: 1, [_xN]: _Rul }]], + 1 + ]; + var OwnershipControlsRule$ = [ + 3, + n0, + _OCR, + 0, + [_OO], + [0], + 1 + ]; + var ParquetInput$ = [ + 3, + n0, + _PI, + 0, + [], + [] + ]; + var Part$ = [ + 3, + n0, + _Par, + 0, + [_PN, _LM, _ET, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe], + [1, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ]; + var PartitionedPrefix$ = [ + 3, + n0, + _PP, + { [_xN]: _PP }, + [_PDS], + [0] + ]; + var PolicyStatus$ = [ + 3, + n0, + _PS, + 0, + [_IPs], + [[2, { [_xN]: _IPs }]] + ]; + var Progress$ = [ + 3, + n0, + _Pr, + 0, + [_BS, _BP, _BRy], + [1, 1, 1] + ]; + var ProgressEvent$ = [ + 3, + n0, + _PE, + 0, + [_Det], + [[() => Progress$, { [_eP]: 1 }]] + ]; + var PublicAccessBlockConfiguration$ = [ + 3, + n0, + _PABC, + 0, + [_BPA, _IPA, _BPP, _RPB], + [[2, { [_xN]: _BPA }], [2, { [_xN]: _IPA }], [2, { [_xN]: _BPP }], [2, { [_xN]: _RPB }]] + ]; + var PutBucketAbacRequest$ = [ + 3, + n0, + _PBAR, + 0, + [_B, _AS, _CMDo, _CA, _EBO], + [[0, 1], [() => AbacStatus$, { [_hP]: 1, [_xN]: _AS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutBucketAccelerateConfigurationRequest$ = [ + 3, + n0, + _PBACR, + 0, + [_B, _AC, _EBO, _CA], + [[0, 1], [() => AccelerateConfiguration$, { [_hP]: 1, [_xN]: _AC }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 + ]; + var PutBucketAclRequest$ = [ + 3, + n0, + _PBARu, + 0, + [_B, _ACL_, _ACP, _CMDo, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _EBO], + [[0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xaebo }]], + 1 + ]; + var PutBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _PBACRu, + 0, + [_B, _I, _ACn, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => AnalyticsConfiguration$, { [_hP]: 1, [_xN]: _ACn }], [0, { [_hH]: _xaebo }]], + 3 + ]; + var PutBucketCorsRequest$ = [ + 3, + n0, + _PBCR, + 0, + [_B, _CORSC, _CMDo, _CA, _EBO], + [[0, 1], [() => CORSConfiguration$, { [_hP]: 1, [_xN]: _CORSC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutBucketEncryptionRequest$ = [ + 3, + n0, + _PBER, + 0, + [_B, _SSEC, _CMDo, _CA, _EBO], + [[0, 1], [() => ServerSideEncryptionConfiguration$, { [_hP]: 1, [_xN]: _SSEC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _PBITCR, + 0, + [_B, _I, _ITC, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => IntelligentTieringConfiguration$, { [_hP]: 1, [_xN]: _ITC }], [0, { [_hH]: _xaebo }]], + 3 + ]; + var PutBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _PBICR, + 0, + [_B, _I, _IC, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => InventoryConfiguration$, { [_hP]: 1, [_xN]: _IC }], [0, { [_hH]: _xaebo }]], + 3 + ]; + var PutBucketLifecycleConfigurationOutput$ = [ + 3, + n0, + _PBLCO, + 0, + [_TDMOS], + [[0, { [_hH]: _xatdmos }]] + ]; + var PutBucketLifecycleConfigurationRequest$ = [ + 3, + n0, + _PBLCR, + 0, + [_B, _CA, _LCi, _EBO, _TDMOS], + [[0, 1], [0, { [_hH]: _xasca }], [() => BucketLifecycleConfiguration$, { [_hP]: 1, [_xN]: _LCi }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xatdmos }]], + 1 + ]; + var PutBucketLoggingRequest$ = [ + 3, + n0, + _PBLR, + 0, + [_B, _BLS, _CMDo, _CA, _EBO], + [[0, 1], [() => BucketLoggingStatus$, { [_hP]: 1, [_xN]: _BLS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _PBMCR, + 0, + [_B, _I, _MCe, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => MetricsConfiguration$, { [_hP]: 1, [_xN]: _MCe }], [0, { [_hH]: _xaebo }]], + 3 + ]; + var PutBucketNotificationConfigurationRequest$ = [ + 3, + n0, + _PBNCR, + 0, + [_B, _NC, _EBO, _SDV], + [[0, 1], [() => NotificationConfiguration$, { [_hP]: 1, [_xN]: _NC }], [0, { [_hH]: _xaebo }], [2, { [_hH]: _xasdv }]], + 2 + ]; + var PutBucketOwnershipControlsRequest$ = [ + 3, + n0, + _PBOCR, + 0, + [_B, _OC, _CMDo, _EBO, _CA], + [[0, 1], [() => OwnershipControls$, { [_hP]: 1, [_xN]: _OC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 + ]; + var PutBucketPolicyRequest$ = [ + 3, + n0, + _PBPR, + 0, + [_B, _Po, _CMDo, _CA, _CRSBA, _EBO], + [[0, 1], [0, 16], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [2, { [_hH]: _xacrsba }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutBucketReplicationRequest$ = [ + 3, + n0, + _PBRR, + 0, + [_B, _RCe, _CMDo, _CA, _To, _EBO], + [[0, 1], [() => ReplicationConfiguration$, { [_hP]: 1, [_xN]: _RCe }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutBucketRequestPaymentRequest$ = [ + 3, + n0, + _PBRPR, + 0, + [_B, _RPC, _CMDo, _CA, _EBO], + [[0, 1], [() => RequestPaymentConfiguration$, { [_hP]: 1, [_xN]: _RPC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutBucketTaggingRequest$ = [ + 3, + n0, + _PBTR, + 0, + [_B, _Tag, _CMDo, _CA, _EBO], + [[0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutBucketVersioningRequest$ = [ + 3, + n0, + _PBVR, + 0, + [_B, _VC, _CMDo, _CA, _MFA, _EBO], + [[0, 1], [() => VersioningConfiguration$, { [_hP]: 1, [_xN]: _VC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutBucketWebsiteRequest$ = [ + 3, + n0, + _PBWR, + 0, + [_B, _WC, _CMDo, _CA, _EBO], + [[0, 1], [() => WebsiteConfiguration$, { [_hP]: 1, [_xN]: _WC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutObjectAclOutput$ = [ + 3, + n0, + _POAO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + var PutObjectAclRequest$ = [ + 3, + n0, + _POAR, + 0, + [_B, _K, _ACL_, _ACP, _CMDo, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _RP, _VI, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutObjectAnnotationOutput$ = [ + 3, + n0, + _POAOu, + 0, + [_K, _AN, _OVI, _ET, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _CT, _SSE, _RC], + [0, 0, [0, { [_hH]: _xaovi }], [0, { [_hH]: _ET }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xacs__ }], [0, { [_hH]: _xacm }], [0, { [_hH]: _xacx }], [0, { [_hH]: _xacx_ }], [0, { [_hH]: _xacx__ }], [0, { [_hH]: _xact }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xarc }]] + ]; + var PutObjectAnnotationRequest$ = [ + 3, + n0, + _POARu, + 0, + [_B, _K, _AN, _AP, _VI, _OIM, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _CMDo, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _aN }], [() => StreamingBlob, 16], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaoim }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xacs__ }], [0, { [_hH]: _xacm }], [0, { [_hH]: _xacx }], [0, { [_hH]: _xacx_ }], [0, { [_hH]: _xacx__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 4 + ]; + var PutObjectLegalHoldOutput$ = [ + 3, + n0, + _POLHO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + var PutObjectLegalHoldRequest$ = [ + 3, + n0, + _POLHR, + 0, + [_B, _K, _LH, _RP, _VI, _CMDo, _CA, _EBO], + [[0, 1], [0, 1], [() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutObjectLockConfigurationOutput$ = [ + 3, + n0, + _POLCO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + var PutObjectLockConfigurationRequest$ = [ + 3, + n0, + _POLCR, + 0, + [_B, _OLC, _RP, _To, _CMDo, _CA, _EBO], + [[0, 1], [() => ObjectLockConfiguration$, { [_hP]: 1, [_xN]: _OLC }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 1 + ]; + var PutObjectOutput$ = [ + 3, + n0, + _POO, + 0, + [_Ex, _ET, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _CT, _SSE, _VI, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _Si, _RC], + [[0, { [_hH]: _xae }], [0, { [_hH]: _ET }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xacs__ }], [0, { [_hH]: _xacm }], [0, { [_hH]: _xacx }], [0, { [_hH]: _xacx_ }], [0, { [_hH]: _xacx__ }], [0, { [_hH]: _xact }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [1, { [_hH]: _xaos }], [0, { [_hH]: _xarc }]] + ]; + var PutObjectRequest$ = [ + 3, + n0, + _POR, + 0, + [_B, _K, _ACL_, _Bo, _CC, _CDo, _CEo, _CL, _CLo, _CMDo, _CTo, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _Exp, _IM, _INM, _GFC, _GR, _GRACP, _GWACP, _WOB, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => StreamingBlob, 16], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xacs__ }], [0, { [_hH]: _xacm }], [0, { [_hH]: _xacx }], [0, { [_hH]: _xacx_ }], [0, { [_hH]: _xacx__ }], [4, { [_hH]: _Exp }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [1, { [_hH]: _xawob }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutObjectRetentionOutput$ = [ + 3, + n0, + _PORO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + var PutObjectRetentionRequest$ = [ + 3, + n0, + _PORR, + 0, + [_B, _K, _Ret, _RP, _VI, _BGR, _CMDo, _CA, _EBO], + [[0, 1], [0, 1], [() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var PutObjectTaggingOutput$ = [ + 3, + n0, + _POTO, + 0, + [_VI], + [[0, { [_hH]: _xavi }]] + ]; + var PutObjectTaggingRequest$ = [ + 3, + n0, + _POTR, + 0, + [_B, _K, _Tag, _VI, _CMDo, _CA, _EBO, _RP], + [[0, 1], [0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 3 + ]; + var PutPublicAccessBlockRequest$ = [ + 3, + n0, + _PPABR, + 0, + [_B, _PABC, _CMDo, _CA, _EBO], + [[0, 1], [() => PublicAccessBlockConfiguration$, { [_hP]: 1, [_xN]: _PABC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var QueueConfiguration$ = [ + 3, + n0, + _QCue, + 0, + [_QA, _Ev, _I, _F], + [[0, { [_xN]: _Qu }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 + ]; + var RecordExpiration$ = [ + 3, + n0, + _REe, + 0, + [_Ex, _D], + [0, 1], + 1 + ]; + var RecordsEvent$ = [ + 3, + n0, + _REec, + 0, + [_Payl], + [[21, { [_eP]: 1 }]] + ]; + var Redirect$ = [ + 3, + n0, + _Red, + 0, + [_HN, _HRC, _Pro, _RKPW, _RKW], + [0, 0, 0, 0, 0] + ]; + var RedirectAllRequestsTo$ = [ + 3, + n0, + _RART, + 0, + [_HN, _Pro], + [0, 0], + 1 + ]; + var RenameObjectOutput$ = [ + 3, + n0, + _ROO, + 0, + [], + [] + ]; + var RenameObjectRequest$ = [ + 3, + n0, + _ROR, + 0, + [_B, _K, _RSen, _DIM, _DINM, _DIMS, _DIUS, _SIM, _SINM, _SIMS, _SIUS, _CTl], + [[0, 1], [0, 1], [0, { [_hH]: _xars_ }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IMS_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _xarsim }], [0, { [_hH]: _xarsinm }], [6, { [_hH]: _xarsims }], [6, { [_hH]: _xarsius }], [0, { [_hH]: _xact_, [_iT]: 1 }]], + 3 + ]; + var ReplicaModifications$ = [ + 3, + n0, + _RM, + 0, + [_S], + [0], + 1 + ]; + var ReplicationConfiguration$ = [ + 3, + n0, + _RCe, + 0, + [_R, _Ru], + [0, [() => ReplicationRules, { [_xF]: 1, [_xN]: _Rul }]], + 2 + ]; + var ReplicationRule$ = [ + 3, + n0, + _RRe, + 0, + [_S, _Des, _ID, _Pri, _P, _F, _SSC, _EOR, _DMR], + [0, () => Destination$, 0, 1, 0, [() => ReplicationRuleFilter$, 0], () => SourceSelectionCriteria$, () => ExistingObjectReplication$, () => DeleteMarkerReplication$], + 2 + ]; + var ReplicationRuleAndOperator$ = [ + 3, + n0, + _RRAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] + ]; + var ReplicationRuleFilter$ = [ + 3, + n0, + _RRF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => ReplicationRuleAndOperator$, 0]] + ]; + var ReplicationTime$ = [ + 3, + n0, + _RT, + 0, + [_S, _Tim], + [0, () => ReplicationTimeValue$], + 2 + ]; + var ReplicationTimeValue$ = [ + 3, + n0, + _RTV, + 0, + [_Mi], + [1] + ]; + var RequestPaymentConfiguration$ = [ + 3, + n0, + _RPC, + 0, + [_Pay], + [0], + 1 + ]; + var RequestProgress$ = [ + 3, + n0, + _RPe, + 0, + [_Ena], + [2] + ]; + var RestoreObjectOutput$ = [ + 3, + n0, + _ROOe, + 0, + [_RC, _ROP], + [[0, { [_hH]: _xarc }], [0, { [_hH]: _xarop }]] + ]; + var RestoreObjectRequest$ = [ + 3, + n0, + _RORe, + 0, + [_B, _K, _VI, _RRes, _RP, _CA, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [() => RestoreRequest$, { [_hP]: 1, [_xN]: _RRes }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var RestoreRequest$ = [ + 3, + n0, + _RRes, + 0, + [_D, _GJP, _Ty, _Ti, _Desc, _SP, _OL], + [1, () => GlacierJobParameters$, 0, 0, 0, () => SelectParameters$, [() => OutputLocation$, 0]] + ]; + var RestoreStatus$ = [ + 3, + n0, + _RSe, + 0, + [_IRIP, _RED], + [2, 4] + ]; + var RoutingRule$ = [ + 3, + n0, + _RRo, + 0, + [_Red, _Co], + [() => Redirect$, () => Condition$], + 1 + ]; + var S3KeyFilter$ = [ + 3, + n0, + _SKF, + 0, + [_FRi], + [[() => FilterRuleList, { [_xF]: 1, [_xN]: _FR }]] + ]; + var S3Location$ = [ + 3, + n0, + _SL, + 0, + [_BNu, _P, _En, _CACL, _ACL, _Tag, _UM, _SC], + [0, 0, [() => Encryption$, 0], 0, [() => Grants, 0], [() => Tagging$, 0], [() => UserMetadata, 0], 0], + 2 + ]; + var S3TablesDestination$ = [ + 3, + n0, + _STD, + 0, + [_TBA, _TN], + [0, 0], + 2 + ]; + var S3TablesDestinationResult$ = [ + 3, + n0, + _STDR, + 0, + [_TBA, _TN, _TA, _TNa], + [0, 0, 0, 0], + 4 + ]; + var ScanRange$ = [ + 3, + n0, + _SR, + 0, + [_St, _End], + [1, 1] + ]; + var SelectObjectContentOutput$ = [ + 3, + n0, + _SOCO, + 0, + [_Payl], + [[() => SelectObjectContentEventStream$, 16]] + ]; + var SelectObjectContentRequest$ = [ + 3, + n0, + _SOCR, + 0, + [_B, _K, _Expr, _ETx, _IS, _OSu, _SSECA, _SSECK, _SSECKMD, _RPe, _SR, _EBO], + [[0, 1], [0, 1], 0, 0, () => InputSerialization$, () => OutputSerialization$, [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], () => RequestProgress$, () => ScanRange$, [0, { [_hH]: _xaebo }]], + 6 + ]; + var SelectParameters$ = [ + 3, + n0, + _SP, + 0, + [_IS, _ETx, _Expr, _OSu], + [() => InputSerialization$, 0, 0, () => OutputSerialization$], + 4 + ]; + var ServerSideEncryptionByDefault$ = [ + 3, + n0, + _SSEBD, + 0, + [_SSEA, _KMSMKID], + [0, [() => SSEKMSKeyId, 0]], + 1 + ]; + var ServerSideEncryptionConfiguration$ = [ + 3, + n0, + _SSEC, + 0, + [_Ru], + [[() => ServerSideEncryptionRules, { [_xF]: 1, [_xN]: _Rul }]], + 1 + ]; + var ServerSideEncryptionRule$ = [ + 3, + n0, + _SSER, + 0, + [_ASSEBD, _BKE, _BET], + [[() => ServerSideEncryptionByDefault$, 0], 2, [() => BlockedEncryptionTypes$, 0]] + ]; + var SessionCredentials$ = [ + 3, + n0, + _SCe, + 0, + [_AKI, _SAK, _ST, _Ex], + [[0, { [_xN]: _AKI }], [() => SessionCredentialValue, { [_xN]: _SAK }], [() => SessionCredentialValue, { [_xN]: _ST }], [4, { [_xN]: _Ex }]], + 4 + ]; + var SimplePrefix$ = [ + 3, + n0, + _SPi, + { [_xN]: _SPi }, + [], + [] + ]; + var SourceSelectionCriteria$ = [ + 3, + n0, + _SSC, + 0, + [_SKEO, _RM], + [() => SseKmsEncryptedObjects$, () => ReplicaModifications$] + ]; + var SSEKMS$ = [ + 3, + n0, + _SSEKMS, + { [_xN]: _SK }, + [_KI], + [[() => SSEKMSKeyId, 0]], + 1 + ]; + var SseKmsEncryptedObjects$ = [ + 3, + n0, + _SKEO, + 0, + [_S], + [0], + 1 + ]; + var SSEKMSEncryption$ = [ + 3, + n0, + _SSEKMSE, + { [_xN]: _SK }, + [_KMSKA, _BKE], + [[() => NonEmptyKmsKeyArnString, 0], 2], + 1 + ]; + var SSES3$ = [ + 3, + n0, + _SSES, + { [_xN]: _SS }, + [], + [] + ]; + var Stats$ = [ + 3, + n0, + _Sta, + 0, + [_BS, _BP, _BRy], + [1, 1, 1] + ]; + var StatsEvent$ = [ + 3, + n0, + _SE, + 0, + [_Det], + [[() => Stats$, { [_eP]: 1 }]] + ]; + var StorageClassAnalysis$ = [ + 3, + n0, + _SCA, + 0, + [_DE], + [() => StorageClassAnalysisDataExport$] + ]; + var StorageClassAnalysisDataExport$ = [ + 3, + n0, + _SCADE, + 0, + [_OSV, _Des], + [0, () => AnalyticsExportDestination$], + 2 + ]; + var Tag$ = [ + 3, + n0, + _Ta, + 0, + [_K, _V], + [0, 0], + 2 + ]; + var Tagging$ = [ + 3, + n0, + _Tag, + 0, + [_TSa], + [[() => TagSet, 0]], + 1 + ]; + var TargetGrant$ = [ + 3, + n0, + _TGa, + 0, + [_Gra, _Pe], + [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0] + ]; + var TargetObjectKeyFormat$ = [ + 3, + n0, + _TOKF, + 0, + [_SPi, _PP], + [[() => SimplePrefix$, { [_xN]: _SPi }], [() => PartitionedPrefix$, { [_xN]: _PP }]] + ]; + var Tiering$ = [ + 3, + n0, + _Tier, + 0, + [_D, _AT], + [1, 0], + 2 + ]; + var TopicConfiguration$ = [ + 3, + n0, + _TCop, + 0, + [_TAo, _Ev, _I, _F], + [[0, { [_xN]: _Top }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 + ]; + var Transition$ = [ + 3, + n0, + _Tra, + 0, + [_Da, _D, _SC], + [5, 1, 0] + ]; + var UpdateBucketMetadataAnnotationTableConfigurationRequest$ = [ + 3, + n0, + _UBMATCR, + 0, + [_B, _ATC, _CMDo, _CA, _EBO], + [[0, 1], [() => AnnotationTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _ATC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var UpdateBucketMetadataInventoryTableConfigurationRequest$ = [ + 3, + n0, + _UBMITCR, + 0, + [_B, _ITCn, _CMDo, _CA, _EBO], + [[0, 1], [() => InventoryTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _ITCn }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var UpdateBucketMetadataJournalTableConfigurationRequest$ = [ + 3, + n0, + _UBMJTCR, + 0, + [_B, _JTC, _CMDo, _CA, _EBO], + [[0, 1], [() => JournalTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _JTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + var UpdateObjectEncryptionRequest$ = [ + 3, + n0, + _UOER, + 0, + [_B, _K, _OE, _VI, _RP, _EBO, _CMDo, _CA], + [[0, 1], [0, 1], [() => ObjectEncryption$, 16], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }]], + 3 + ]; + var UpdateObjectEncryptionResponse$ = [ + 3, + n0, + _UOERp, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + var UploadPartCopyOutput$ = [ + 3, + n0, + _UPCO, + 0, + [_CSVI, _CPR, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC], + [[0, { [_hH]: _xacsvi }], [() => CopyPartResult$, 16], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + var UploadPartCopyRequest$ = [ + 3, + n0, + _UPCR, + 0, + [_B, _CSo, _K, _PN, _UI, _CSIM, _CSIMS, _CSINM, _CSIUS, _CSRo, _SSECA, _SSECK, _SSECKMD, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _EBO, _ESBO], + [[0, 1], [0, { [_hH]: _xacs___ }], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [0, { [_hH]: _xacsr }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], + 5 + ]; + var UploadPartOutput$ = [ + 3, + n0, + _UPO, + 0, + [_SSE, _ET, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC], + [[0, { [_hH]: _xasse }], [0, { [_hH]: _ET }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xacs__ }], [0, { [_hH]: _xacm }], [0, { [_hH]: _xacx }], [0, { [_hH]: _xacx_ }], [0, { [_hH]: _xacx__ }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + var UploadPartRequest$ = [ + 3, + n0, + _UPR, + 0, + [_B, _K, _PN, _UI, _Bo, _CLo, _CMDo, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _SSECA, _SSECK, _SSECKMD, _RP, _EBO], + [[0, 1], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [() => StreamingBlob, 16], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xacs__ }], [0, { [_hH]: _xacm }], [0, { [_hH]: _xacx }], [0, { [_hH]: _xacx_ }], [0, { [_hH]: _xacx__ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 4 + ]; + var VersioningConfiguration$ = [ + 3, + n0, + _VC, + 0, + [_MFAD, _S], + [[0, { [_xN]: _MDf }], 0] + ]; + var WebsiteConfiguration$ = [ + 3, + n0, + _WC, + 0, + [_EDr, _IDn, _RART, _RR], + [() => ErrorDocument$, () => IndexDocument$, () => RedirectAllRequestsTo$, [() => RoutingRules, 0]] + ]; + var WriteGetObjectResponseRequest$ = [ + 3, + n0, + _WGORR, + 0, + [_RReq, _RTe, _Bo, _SCt, _ECr, _EM, _AR, _CC, _CDo, _CEo, _CL, _CLo, _CR, _CTo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CSHAhe, _CMD, _CXXHASH, _CXXHASHh, _CXXHASHhe, _DM, _ET, _Exp, _Ex, _LM, _MM, _M, _OLM, _OLLHS, _OLRUD, _PC, _RS, _RC, _Re, _SSE, _SSECA, _SSEKMSKI, _SSECKMD, _SC, _TC, _VI, _BKE], + [[0, { [_hL]: 1, [_hH]: _xarr }], [0, { [_hH]: _xart }], [() => StreamingBlob, 16], [1, { [_hH]: _xafs }], [0, { [_hH]: _xafec }], [0, { [_hH]: _xafem }], [0, { [_hH]: _xafhar }], [0, { [_hH]: _xafhCC }], [0, { [_hH]: _xafhCD }], [0, { [_hH]: _xafhCE }], [0, { [_hH]: _xafhCL }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xafhCR }], [0, { [_hH]: _xafhCT }], [0, { [_hH]: _xafhxacc }], [0, { [_hH]: _xafhxacc_ }], [0, { [_hH]: _xafhxacc__ }], [0, { [_hH]: _xafhxacs }], [0, { [_hH]: _xafhxacs_ }], [0, { [_hH]: _xafhxacs__ }], [0, { [_hH]: _xafhxacm }], [0, { [_hH]: _xafhxacx }], [0, { [_hH]: _xafhxacx_ }], [0, { [_hH]: _xafhxacx__ }], [2, { [_hH]: _xafhxadm }], [0, { [_hH]: _xafhE }], [4, { [_hH]: _xafhE_ }], [0, { [_hH]: _xafhxae }], [4, { [_hH]: _xafhLM }], [1, { [_hH]: _xafhxamm }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xafhxaolm }], [0, { [_hH]: _xafhxaollh }], [5, { [_hH]: _xafhxaolrud }], [1, { [_hH]: _xafhxampc }], [0, { [_hH]: _xafhxars }], [0, { [_hH]: _xafhxarc }], [0, { [_hH]: _xafhxar }], [0, { [_hH]: _xafhxasse }], [0, { [_hH]: _xafhxasseca }], [() => SSEKMSKeyId, { [_hH]: _xafhxasseakki }], [0, { [_hH]: _xafhxasseckM }], [0, { [_hH]: _xafhxasc }], [1, { [_hH]: _xafhxatc }], [0, { [_hH]: _xafhxavi }], [2, { [_hH]: _xafhxassebke }]], + 2 + ]; + var __Unit = "unit"; + var AnalyticsConfigurationList = [ + 1, + n0, + _ACLn, + 0, + [ + () => AnalyticsConfiguration$, + 0 + ] + ]; + var AnnotationList = [ + 1, + n0, + _AL, + 0, + [ + () => AnnotationEntry$, + { [_xN]: _AE } + ] + ]; + var Buckets = [ + 1, + n0, + _Bu, + 0, + [ + () => Bucket$, + { [_xN]: _B } + ] + ]; + var CommonPrefixList = [ + 1, + n0, + _CPL, + 0, + () => CommonPrefix$ + ]; + var CompletedPartList = [ + 1, + n0, + _CPLo, + 0, + () => CompletedPart$ + ]; + var CORSRules = [ + 1, + n0, + _CORSR, + 0, + [ + () => CORSRule$, + 0 + ] + ]; + var DeletedObjects = [ + 1, + n0, + _DOe, + 0, + () => DeletedObject$ + ]; + var DeleteMarkers = [ + 1, + n0, + _DMe, + 0, + () => DeleteMarkerEntry$ + ]; + var EncryptionTypeList = [ + 1, + n0, + _ETL, + 0, + [ + 0, + { [_xN]: _ETn } + ] + ]; + var Errors = [ + 1, + n0, + _Er, + 0, + () => _Error$ + ]; + var FilterRuleList = [ + 1, + n0, + _FRL, + 0, + () => FilterRule$ + ]; + var Grants = [ + 1, + n0, + _G, + 0, + [ + () => Grant$, + { [_xN]: _Gr } + ] + ]; + var IntelligentTieringConfigurationList = [ + 1, + n0, + _ITCL, + 0, + [ + () => IntelligentTieringConfiguration$, + 0 + ] + ]; + var InventoryConfigurationList = [ + 1, + n0, + _ICL, + 0, + [ + () => InventoryConfiguration$, + 0 + ] + ]; + var InventoryOptionalFields = [ + 1, + n0, + _IOF, + 0, + [ + 0, + { [_xN]: _Fi } + ] + ]; + var LambdaFunctionConfigurationList = [ + 1, + n0, + _LFCL, + 0, + [ + () => LambdaFunctionConfiguration$, + 0 + ] + ]; + var LifecycleRules = [ + 1, + n0, + _LRi, + 0, + [ + () => LifecycleRule$, + 0 + ] + ]; + var MetricsConfigurationList = [ + 1, + n0, + _MCL, + 0, + [ + () => MetricsConfiguration$, + 0 + ] + ]; + var MultipartUploadList = [ + 1, + n0, + _MUL, + 0, + () => MultipartUpload$ + ]; + var NoncurrentVersionTransitionList = [ + 1, + n0, + _NVTL, + 0, + () => NoncurrentVersionTransition$ + ]; + var ObjectIdentifierList = [ + 1, + n0, + _OIL, + 0, + () => ObjectIdentifier$ + ]; + var ObjectList = [ + 1, + n0, + _OLb, + 0, + [ + () => _Object$, + 0 + ] + ]; + var ObjectVersionList = [ + 1, + n0, + _OVL, + 0, + [ + () => ObjectVersion$, + 0 + ] + ]; + var OwnershipControlsRules = [ + 1, + n0, + _OCRw, + 0, + () => OwnershipControlsRule$ + ]; + var Parts = [ + 1, + n0, + _Pa, + 0, + () => Part$ + ]; + var PartsList = [ + 1, + n0, + _PL, + 0, + () => ObjectPart$ + ]; + var QueueConfigurationList = [ + 1, + n0, + _QCL, + 0, + [ + () => QueueConfiguration$, + 0 + ] + ]; + var ReplicationRules = [ + 1, + n0, + _RRep, + 0, + [ + () => ReplicationRule$, + 0 + ] + ]; + var RoutingRules = [ + 1, + n0, + _RR, + 0, + [ + () => RoutingRule$, + { [_xN]: _RRo } + ] + ]; + var ServerSideEncryptionRules = [ + 1, + n0, + _SSERe, + 0, + [ + () => ServerSideEncryptionRule$, + 0 + ] + ]; + var TagSet = [ + 1, + n0, + _TSa, + 0, + [ + () => Tag$, + { [_xN]: _Ta } + ] + ]; + var TargetGrants = [ + 1, + n0, + _TG, + 0, + [ + () => TargetGrant$, + { [_xN]: _Gr } + ] + ]; + var TieringList = [ + 1, + n0, + _TL, + 0, + () => Tiering$ + ]; + var TopicConfigurationList = [ + 1, + n0, + _TCL, + 0, + [ + () => TopicConfiguration$, + 0 + ] + ]; + var TransitionList = [ + 1, + n0, + _TLr, + 0, + () => Transition$ + ]; + var UserMetadata = [ + 1, + n0, + _UM, + 0, + [ + () => MetadataEntry$, + { [_xN]: _ME } + ] + ]; + var AnalyticsFilter$ = [ + 4, + n0, + _AF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => AnalyticsAndOperator$, 0]] + ]; + var MetricsFilter$ = [ + 4, + n0, + _MF, + 0, + [_P, _Ta, _APAc, _An], + [0, () => Tag$, 0, [() => MetricsAndOperator$, 0]] + ]; + var ObjectEncryption$ = [ + 4, + n0, + _OE, + 0, + [_SSEKMS], + [[() => SSEKMSEncryption$, { [_xN]: _SK }]] + ]; + var SelectObjectContentEventStream$ = [ + 4, + n0, + _SOCES, + { [_st]: 1 }, + [_Rec, _Sta, _Pr, _Cont, _End], + [[() => RecordsEvent$, 0], [() => StatsEvent$, 0], [() => ProgressEvent$, 0], () => ContinuationEvent$, () => EndEvent$] + ]; + var AbortMultipartUpload$ = [ + 9, + n0, + _AMU, + { [_h]: ["DELETE", "/{Key+}?x-id=AbortMultipartUpload", 204] }, + () => AbortMultipartUploadRequest$, + () => AbortMultipartUploadOutput$ + ]; + var CompleteMultipartUpload$ = [ + 9, + n0, + _CMUo, + { [_h]: ["POST", "/{Key+}", 200] }, + () => CompleteMultipartUploadRequest$, + () => CompleteMultipartUploadOutput$ + ]; + var CopyObject$ = [ + 9, + n0, + _CO, + { [_h]: ["PUT", "/{Key+}?x-id=CopyObject", 200] }, + () => CopyObjectRequest$, + () => CopyObjectOutput$ + ]; + var CreateBucket$ = [ + 9, + n0, + _CB, + { [_h]: ["PUT", "/", 200] }, + () => CreateBucketRequest$, + () => CreateBucketOutput$ + ]; + var CreateBucketMetadataConfiguration$ = [ + 9, + n0, + _CBMC, + { [_hC]: "-", [_h]: ["POST", "/?metadataConfiguration", 200] }, + () => CreateBucketMetadataConfigurationRequest$, + () => __Unit + ]; + var CreateBucketMetadataTableConfiguration$ = [ + 9, + n0, + _CBMTC, + { [_hC]: "-", [_h]: ["POST", "/?metadataTable", 200] }, + () => CreateBucketMetadataTableConfigurationRequest$, + () => __Unit + ]; + var CreateMultipartUpload$ = [ + 9, + n0, + _CMUr, + { [_h]: ["POST", "/{Key+}?uploads", 200] }, + () => CreateMultipartUploadRequest$, + () => CreateMultipartUploadOutput$ + ]; + var CreateSession$ = [ + 9, + n0, + _CSr, + { [_h]: ["GET", "/?session", 200] }, + () => CreateSessionRequest$, + () => CreateSessionOutput$ + ]; + var DeleteBucket$ = [ + 9, + n0, + _DB, + { [_h]: ["DELETE", "/", 204] }, + () => DeleteBucketRequest$, + () => __Unit + ]; + var DeleteBucketAnalyticsConfiguration$ = [ + 9, + n0, + _DBAC, + { [_h]: ["DELETE", "/?analytics", 204] }, + () => DeleteBucketAnalyticsConfigurationRequest$, + () => __Unit + ]; + var DeleteBucketCors$ = [ + 9, + n0, + _DBC, + { [_h]: ["DELETE", "/?cors", 204] }, + () => DeleteBucketCorsRequest$, + () => __Unit + ]; + var DeleteBucketEncryption$ = [ + 9, + n0, + _DBE, + { [_h]: ["DELETE", "/?encryption", 204] }, + () => DeleteBucketEncryptionRequest$, + () => __Unit + ]; + var DeleteBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _DBITC, + { [_h]: ["DELETE", "/?intelligent-tiering", 204] }, + () => DeleteBucketIntelligentTieringConfigurationRequest$, + () => __Unit + ]; + var DeleteBucketInventoryConfiguration$ = [ + 9, + n0, + _DBIC, + { [_h]: ["DELETE", "/?inventory", 204] }, + () => DeleteBucketInventoryConfigurationRequest$, + () => __Unit + ]; + var DeleteBucketLifecycle$ = [ + 9, + n0, + _DBL, + { [_h]: ["DELETE", "/?lifecycle", 204] }, + () => DeleteBucketLifecycleRequest$, + () => __Unit + ]; + var DeleteBucketMetadataConfiguration$ = [ + 9, + n0, + _DBMC, + { [_h]: ["DELETE", "/?metadataConfiguration", 204] }, + () => DeleteBucketMetadataConfigurationRequest$, + () => __Unit + ]; + var DeleteBucketMetadataTableConfiguration$ = [ + 9, + n0, + _DBMTC, + { [_h]: ["DELETE", "/?metadataTable", 204] }, + () => DeleteBucketMetadataTableConfigurationRequest$, + () => __Unit + ]; + var DeleteBucketMetricsConfiguration$ = [ + 9, + n0, + _DBMCe, + { [_h]: ["DELETE", "/?metrics", 204] }, + () => DeleteBucketMetricsConfigurationRequest$, + () => __Unit + ]; + var DeleteBucketOwnershipControls$ = [ + 9, + n0, + _DBOC, + { [_h]: ["DELETE", "/?ownershipControls", 204] }, + () => DeleteBucketOwnershipControlsRequest$, + () => __Unit + ]; + var DeleteBucketPolicy$ = [ + 9, + n0, + _DBP, + { [_h]: ["DELETE", "/?policy", 204] }, + () => DeleteBucketPolicyRequest$, + () => __Unit + ]; + var DeleteBucketReplication$ = [ + 9, + n0, + _DBRe, + { [_h]: ["DELETE", "/?replication", 204] }, + () => DeleteBucketReplicationRequest$, + () => __Unit + ]; + var DeleteBucketTagging$ = [ + 9, + n0, + _DBT, + { [_h]: ["DELETE", "/?tagging", 204] }, + () => DeleteBucketTaggingRequest$, + () => __Unit + ]; + var DeleteBucketWebsite$ = [ + 9, + n0, + _DBW, + { [_h]: ["DELETE", "/?website", 204] }, + () => DeleteBucketWebsiteRequest$, + () => __Unit + ]; + var DeleteObject$ = [ + 9, + n0, + _DOel, + { [_h]: ["DELETE", "/{Key+}?x-id=DeleteObject", 204] }, + () => DeleteObjectRequest$, + () => DeleteObjectOutput$ + ]; + var DeleteObjectAnnotation$ = [ + 9, + n0, + _DOA, + { [_h]: ["DELETE", "/{Key+}?annotation", 204] }, + () => DeleteObjectAnnotationRequest$, + () => DeleteObjectAnnotationOutput$ + ]; + var DeleteObjects$ = [ + 9, + n0, + _DOele, + { [_hC]: "-", [_h]: ["POST", "/?delete", 200] }, + () => DeleteObjectsRequest$, + () => DeleteObjectsOutput$ + ]; + var DeleteObjectTagging$ = [ + 9, + n0, + _DOT, + { [_h]: ["DELETE", "/{Key+}?tagging", 204] }, + () => DeleteObjectTaggingRequest$, + () => DeleteObjectTaggingOutput$ + ]; + var DeletePublicAccessBlock$ = [ + 9, + n0, + _DPAB, + { [_h]: ["DELETE", "/?publicAccessBlock", 204] }, + () => DeletePublicAccessBlockRequest$, + () => __Unit + ]; + var GetBucketAbac$ = [ + 9, + n0, + _GBA, + { [_h]: ["GET", "/?abac", 200] }, + () => GetBucketAbacRequest$, + () => GetBucketAbacOutput$ + ]; + var GetBucketAccelerateConfiguration$ = [ + 9, + n0, + _GBAC, + { [_h]: ["GET", "/?accelerate", 200] }, + () => GetBucketAccelerateConfigurationRequest$, + () => GetBucketAccelerateConfigurationOutput$ + ]; + var GetBucketAcl$ = [ + 9, + n0, + _GBAe, + { [_h]: ["GET", "/?acl", 200] }, + () => GetBucketAclRequest$, + () => GetBucketAclOutput$ + ]; + var GetBucketAnalyticsConfiguration$ = [ + 9, + n0, + _GBACe, + { [_h]: ["GET", "/?analytics&x-id=GetBucketAnalyticsConfiguration", 200] }, + () => GetBucketAnalyticsConfigurationRequest$, + () => GetBucketAnalyticsConfigurationOutput$ + ]; + var GetBucketCors$ = [ + 9, + n0, + _GBC, + { [_h]: ["GET", "/?cors", 200] }, + () => GetBucketCorsRequest$, + () => GetBucketCorsOutput$ + ]; + var GetBucketEncryption$ = [ + 9, + n0, + _GBE, + { [_h]: ["GET", "/?encryption", 200] }, + () => GetBucketEncryptionRequest$, + () => GetBucketEncryptionOutput$ + ]; + var GetBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _GBITC, + { [_h]: ["GET", "/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", 200] }, + () => GetBucketIntelligentTieringConfigurationRequest$, + () => GetBucketIntelligentTieringConfigurationOutput$ + ]; + var GetBucketInventoryConfiguration$ = [ + 9, + n0, + _GBIC, + { [_h]: ["GET", "/?inventory&x-id=GetBucketInventoryConfiguration", 200] }, + () => GetBucketInventoryConfigurationRequest$, + () => GetBucketInventoryConfigurationOutput$ + ]; + var GetBucketLifecycleConfiguration$ = [ + 9, + n0, + _GBLC, + { [_h]: ["GET", "/?lifecycle", 200] }, + () => GetBucketLifecycleConfigurationRequest$, + () => GetBucketLifecycleConfigurationOutput$ + ]; + var GetBucketLocation$ = [ + 9, + n0, + _GBL, + { [_h]: ["GET", "/?location", 200] }, + () => GetBucketLocationRequest$, + () => GetBucketLocationOutput$ + ]; + var GetBucketLogging$ = [ + 9, + n0, + _GBLe, + { [_h]: ["GET", "/?logging", 200] }, + () => GetBucketLoggingRequest$, + () => GetBucketLoggingOutput$ + ]; + var GetBucketMetadataConfiguration$ = [ + 9, + n0, + _GBMC, + { [_h]: ["GET", "/?metadataConfiguration", 200] }, + () => GetBucketMetadataConfigurationRequest$, + () => GetBucketMetadataConfigurationOutput$ + ]; + var GetBucketMetadataTableConfiguration$ = [ + 9, + n0, + _GBMTC, + { [_h]: ["GET", "/?metadataTable", 200] }, + () => GetBucketMetadataTableConfigurationRequest$, + () => GetBucketMetadataTableConfigurationOutput$ + ]; + var GetBucketMetricsConfiguration$ = [ + 9, + n0, + _GBMCe, + { [_h]: ["GET", "/?metrics&x-id=GetBucketMetricsConfiguration", 200] }, + () => GetBucketMetricsConfigurationRequest$, + () => GetBucketMetricsConfigurationOutput$ + ]; + var GetBucketNotificationConfiguration$ = [ + 9, + n0, + _GBNC, + { [_h]: ["GET", "/?notification", 200] }, + () => GetBucketNotificationConfigurationRequest$, + () => NotificationConfiguration$ + ]; + var GetBucketOwnershipControls$ = [ + 9, + n0, + _GBOC, + { [_h]: ["GET", "/?ownershipControls", 200] }, + () => GetBucketOwnershipControlsRequest$, + () => GetBucketOwnershipControlsOutput$ + ]; + var GetBucketPolicy$ = [ + 9, + n0, + _GBP, + { [_h]: ["GET", "/?policy", 200] }, + () => GetBucketPolicyRequest$, + () => GetBucketPolicyOutput$ + ]; + var GetBucketPolicyStatus$ = [ + 9, + n0, + _GBPS, + { [_h]: ["GET", "/?policyStatus", 200] }, + () => GetBucketPolicyStatusRequest$, + () => GetBucketPolicyStatusOutput$ + ]; + var GetBucketReplication$ = [ + 9, + n0, + _GBR, + { [_h]: ["GET", "/?replication", 200] }, + () => GetBucketReplicationRequest$, + () => GetBucketReplicationOutput$ + ]; + var GetBucketRequestPayment$ = [ + 9, + n0, + _GBRP, + { [_h]: ["GET", "/?requestPayment", 200] }, + () => GetBucketRequestPaymentRequest$, + () => GetBucketRequestPaymentOutput$ + ]; + var GetBucketTagging$ = [ + 9, + n0, + _GBT, + { [_h]: ["GET", "/?tagging", 200] }, + () => GetBucketTaggingRequest$, + () => GetBucketTaggingOutput$ + ]; + var GetBucketVersioning$ = [ + 9, + n0, + _GBV, + { [_h]: ["GET", "/?versioning", 200] }, + () => GetBucketVersioningRequest$, + () => GetBucketVersioningOutput$ + ]; + var GetBucketWebsite$ = [ + 9, + n0, + _GBW, + { [_h]: ["GET", "/?website", 200] }, + () => GetBucketWebsiteRequest$, + () => GetBucketWebsiteOutput$ + ]; + var GetObject$ = [ + 9, + n0, + _GO, + { [_hC]: "-", [_h]: ["GET", "/{Key+}?x-id=GetObject", 200] }, + () => GetObjectRequest$, + () => GetObjectOutput$ + ]; + var GetObjectAcl$ = [ + 9, + n0, + _GOA, + { [_h]: ["GET", "/{Key+}?acl", 200] }, + () => GetObjectAclRequest$, + () => GetObjectAclOutput$ + ]; + var GetObjectAnnotation$ = [ + 9, + n0, + _GOAe, + { [_hC]: "-", [_h]: ["GET", "/{Key+}?annotation&x-id=GetObjectAnnotation", 200] }, + () => GetObjectAnnotationRequest$, + () => GetObjectAnnotationOutput$ + ]; + var GetObjectAttributes$ = [ + 9, + n0, + _GOAet, + { [_h]: ["GET", "/{Key+}?attributes", 200] }, + () => GetObjectAttributesRequest$, + () => GetObjectAttributesOutput$ + ]; + var GetObjectLegalHold$ = [ + 9, + n0, + _GOLH, + { [_h]: ["GET", "/{Key+}?legal-hold", 200] }, + () => GetObjectLegalHoldRequest$, + () => GetObjectLegalHoldOutput$ + ]; + var GetObjectLockConfiguration$ = [ + 9, + n0, + _GOLC, + { [_h]: ["GET", "/?object-lock", 200] }, + () => GetObjectLockConfigurationRequest$, + () => GetObjectLockConfigurationOutput$ + ]; + var GetObjectRetention$ = [ + 9, + n0, + _GORe, + { [_h]: ["GET", "/{Key+}?retention", 200] }, + () => GetObjectRetentionRequest$, + () => GetObjectRetentionOutput$ + ]; + var GetObjectTagging$ = [ + 9, + n0, + _GOT, + { [_h]: ["GET", "/{Key+}?tagging", 200] }, + () => GetObjectTaggingRequest$, + () => GetObjectTaggingOutput$ + ]; + var GetObjectTorrent$ = [ + 9, + n0, + _GOTe, + { [_h]: ["GET", "/{Key+}?torrent", 200] }, + () => GetObjectTorrentRequest$, + () => GetObjectTorrentOutput$ + ]; + var GetPublicAccessBlock$ = [ + 9, + n0, + _GPAB, + { [_h]: ["GET", "/?publicAccessBlock", 200] }, + () => GetPublicAccessBlockRequest$, + () => GetPublicAccessBlockOutput$ + ]; + var HeadBucket$ = [ + 9, + n0, + _HB, + { [_h]: ["HEAD", "/", 200] }, + () => HeadBucketRequest$, + () => HeadBucketOutput$ + ]; + var HeadObject$ = [ + 9, + n0, + _HO, + { [_h]: ["HEAD", "/{Key+}", 200] }, + () => HeadObjectRequest$, + () => HeadObjectOutput$ + ]; + var ListBucketAnalyticsConfigurations$ = [ + 9, + n0, + _LBAC, + { [_h]: ["GET", "/?analytics&x-id=ListBucketAnalyticsConfigurations", 200] }, + () => ListBucketAnalyticsConfigurationsRequest$, + () => ListBucketAnalyticsConfigurationsOutput$ + ]; + var ListBucketIntelligentTieringConfigurations$ = [ + 9, + n0, + _LBITC, + { [_h]: ["GET", "/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", 200] }, + () => ListBucketIntelligentTieringConfigurationsRequest$, + () => ListBucketIntelligentTieringConfigurationsOutput$ + ]; + var ListBucketInventoryConfigurations$ = [ + 9, + n0, + _LBIC, + { [_h]: ["GET", "/?inventory&x-id=ListBucketInventoryConfigurations", 200] }, + () => ListBucketInventoryConfigurationsRequest$, + () => ListBucketInventoryConfigurationsOutput$ + ]; + var ListBucketMetricsConfigurations$ = [ + 9, + n0, + _LBMC, + { [_h]: ["GET", "/?metrics&x-id=ListBucketMetricsConfigurations", 200] }, + () => ListBucketMetricsConfigurationsRequest$, + () => ListBucketMetricsConfigurationsOutput$ + ]; + var ListBuckets$ = [ + 9, + n0, + _LB, + { [_h]: ["GET", "/?x-id=ListBuckets", 200] }, + () => ListBucketsRequest$, + () => ListBucketsOutput$ + ]; + var ListDirectoryBuckets$ = [ + 9, + n0, + _LDB, + { [_h]: ["GET", "/?x-id=ListDirectoryBuckets", 200] }, + () => ListDirectoryBucketsRequest$, + () => ListDirectoryBucketsOutput$ + ]; + var ListMultipartUploads$ = [ + 9, + n0, + _LMU, + { [_h]: ["GET", "/?uploads", 200] }, + () => ListMultipartUploadsRequest$, + () => ListMultipartUploadsOutput$ + ]; + var ListObjectAnnotations$ = [ + 9, + n0, + _LOA, + { [_h]: ["GET", "/{Key+}?annotation&x-id=ListObjectAnnotations", 200] }, + () => ListObjectAnnotationsRequest$, + () => ListObjectAnnotationsOutput$ + ]; + var ListObjects$ = [ + 9, + n0, + _LO, + { [_h]: ["GET", "/", 200] }, + () => ListObjectsRequest$, + () => ListObjectsOutput$ + ]; + var ListObjectsV2$ = [ + 9, + n0, + _LOV, + { [_h]: ["GET", "/?list-type=2", 200] }, + () => ListObjectsV2Request$, + () => ListObjectsV2Output$ + ]; + var ListObjectVersions$ = [ + 9, + n0, + _LOVi, + { [_h]: ["GET", "/?versions", 200] }, + () => ListObjectVersionsRequest$, + () => ListObjectVersionsOutput$ + ]; + var ListParts$ = [ + 9, + n0, + _LP, + { [_h]: ["GET", "/{Key+}?x-id=ListParts", 200] }, + () => ListPartsRequest$, + () => ListPartsOutput$ + ]; + var PutBucketAbac$ = [ + 9, + n0, + _PBA, + { [_hC]: "-", [_h]: ["PUT", "/?abac", 200] }, + () => PutBucketAbacRequest$, + () => __Unit + ]; + var PutBucketAccelerateConfiguration$ = [ + 9, + n0, + _PBAC, + { [_hC]: "-", [_h]: ["PUT", "/?accelerate", 200] }, + () => PutBucketAccelerateConfigurationRequest$, + () => __Unit + ]; + var PutBucketAcl$ = [ + 9, + n0, + _PBAu, + { [_hC]: "-", [_h]: ["PUT", "/?acl", 200] }, + () => PutBucketAclRequest$, + () => __Unit + ]; + var PutBucketAnalyticsConfiguration$ = [ + 9, + n0, + _PBACu, + { [_h]: ["PUT", "/?analytics", 200] }, + () => PutBucketAnalyticsConfigurationRequest$, + () => __Unit + ]; + var PutBucketCors$ = [ + 9, + n0, + _PBC, + { [_hC]: "-", [_h]: ["PUT", "/?cors", 200] }, + () => PutBucketCorsRequest$, + () => __Unit + ]; + var PutBucketEncryption$ = [ + 9, + n0, + _PBE, + { [_hC]: "-", [_h]: ["PUT", "/?encryption", 200] }, + () => PutBucketEncryptionRequest$, + () => __Unit + ]; + var PutBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _PBITC, + { [_h]: ["PUT", "/?intelligent-tiering", 200] }, + () => PutBucketIntelligentTieringConfigurationRequest$, + () => __Unit + ]; + var PutBucketInventoryConfiguration$ = [ + 9, + n0, + _PBIC, + { [_h]: ["PUT", "/?inventory", 200] }, + () => PutBucketInventoryConfigurationRequest$, + () => __Unit + ]; + var PutBucketLifecycleConfiguration$ = [ + 9, + n0, + _PBLC, + { [_hC]: "-", [_h]: ["PUT", "/?lifecycle", 200] }, + () => PutBucketLifecycleConfigurationRequest$, + () => PutBucketLifecycleConfigurationOutput$ + ]; + var PutBucketLogging$ = [ + 9, + n0, + _PBL, + { [_hC]: "-", [_h]: ["PUT", "/?logging", 200] }, + () => PutBucketLoggingRequest$, + () => __Unit + ]; + var PutBucketMetricsConfiguration$ = [ + 9, + n0, + _PBMC, + { [_h]: ["PUT", "/?metrics", 200] }, + () => PutBucketMetricsConfigurationRequest$, + () => __Unit + ]; + var PutBucketNotificationConfiguration$ = [ + 9, + n0, + _PBNC, + { [_h]: ["PUT", "/?notification", 200] }, + () => PutBucketNotificationConfigurationRequest$, + () => __Unit + ]; + var PutBucketOwnershipControls$ = [ + 9, + n0, + _PBOC, + { [_hC]: "-", [_h]: ["PUT", "/?ownershipControls", 200] }, + () => PutBucketOwnershipControlsRequest$, + () => __Unit + ]; + var PutBucketPolicy$ = [ + 9, + n0, + _PBP, + { [_hC]: "-", [_h]: ["PUT", "/?policy", 200] }, + () => PutBucketPolicyRequest$, + () => __Unit + ]; + var PutBucketReplication$ = [ + 9, + n0, + _PBR, + { [_hC]: "-", [_h]: ["PUT", "/?replication", 200] }, + () => PutBucketReplicationRequest$, + () => __Unit + ]; + var PutBucketRequestPayment$ = [ + 9, + n0, + _PBRP, + { [_hC]: "-", [_h]: ["PUT", "/?requestPayment", 200] }, + () => PutBucketRequestPaymentRequest$, + () => __Unit + ]; + var PutBucketTagging$ = [ + 9, + n0, + _PBT, + { [_hC]: "-", [_h]: ["PUT", "/?tagging", 200] }, + () => PutBucketTaggingRequest$, + () => __Unit + ]; + var PutBucketVersioning$ = [ + 9, + n0, + _PBV, + { [_hC]: "-", [_h]: ["PUT", "/?versioning", 200] }, + () => PutBucketVersioningRequest$, + () => __Unit + ]; + var PutBucketWebsite$ = [ + 9, + n0, + _PBW, + { [_hC]: "-", [_h]: ["PUT", "/?website", 200] }, + () => PutBucketWebsiteRequest$, + () => __Unit + ]; + var PutObject$ = [ + 9, + n0, + _PO, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?x-id=PutObject", 200] }, + () => PutObjectRequest$, + () => PutObjectOutput$ + ]; + var PutObjectAcl$ = [ + 9, + n0, + _POA, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?acl", 200] }, + () => PutObjectAclRequest$, + () => PutObjectAclOutput$ + ]; + var PutObjectAnnotation$ = [ + 9, + n0, + _POAu, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?annotation", 200] }, + () => PutObjectAnnotationRequest$, + () => PutObjectAnnotationOutput$ + ]; + var PutObjectLegalHold$ = [ + 9, + n0, + _POLH, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?legal-hold", 200] }, + () => PutObjectLegalHoldRequest$, + () => PutObjectLegalHoldOutput$ + ]; + var PutObjectLockConfiguration$ = [ + 9, + n0, + _POLC, + { [_hC]: "-", [_h]: ["PUT", "/?object-lock", 200] }, + () => PutObjectLockConfigurationRequest$, + () => PutObjectLockConfigurationOutput$ + ]; + var PutObjectRetention$ = [ + 9, + n0, + _PORu, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?retention", 200] }, + () => PutObjectRetentionRequest$, + () => PutObjectRetentionOutput$ + ]; + var PutObjectTagging$ = [ + 9, + n0, + _POT, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?tagging", 200] }, + () => PutObjectTaggingRequest$, + () => PutObjectTaggingOutput$ + ]; + var PutPublicAccessBlock$ = [ + 9, + n0, + _PPAB, + { [_hC]: "-", [_h]: ["PUT", "/?publicAccessBlock", 200] }, + () => PutPublicAccessBlockRequest$, + () => __Unit + ]; + var RenameObject$ = [ + 9, + n0, + _RO, + { [_h]: ["PUT", "/{Key+}?renameObject", 200] }, + () => RenameObjectRequest$, + () => RenameObjectOutput$ + ]; + var RestoreObject$ = [ + 9, + n0, + _ROe, + { [_hC]: "-", [_h]: ["POST", "/{Key+}?restore", 200] }, + () => RestoreObjectRequest$, + () => RestoreObjectOutput$ + ]; + var SelectObjectContent$ = [ + 9, + n0, + _SOC, + { [_h]: ["POST", "/{Key+}?select&select-type=2", 200] }, + () => SelectObjectContentRequest$, + () => SelectObjectContentOutput$ + ]; + var UpdateBucketMetadataAnnotationTableConfiguration$ = [ + 9, + n0, + _UBMATC, + { [_hC]: "-", [_h]: ["PUT", "/?metadataAnnotationTable", 200] }, + () => UpdateBucketMetadataAnnotationTableConfigurationRequest$, + () => __Unit + ]; + var UpdateBucketMetadataInventoryTableConfiguration$ = [ + 9, + n0, + _UBMITC, + { [_hC]: "-", [_h]: ["PUT", "/?metadataInventoryTable", 200] }, + () => UpdateBucketMetadataInventoryTableConfigurationRequest$, + () => __Unit + ]; + var UpdateBucketMetadataJournalTableConfiguration$ = [ + 9, + n0, + _UBMJTC, + { [_hC]: "-", [_h]: ["PUT", "/?metadataJournalTable", 200] }, + () => UpdateBucketMetadataJournalTableConfigurationRequest$, + () => __Unit + ]; + var UpdateObjectEncryption$ = [ + 9, + n0, + _UOE, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?encryption", 200] }, + () => UpdateObjectEncryptionRequest$, + () => UpdateObjectEncryptionResponse$ + ]; + var UploadPart$ = [ + 9, + n0, + _UP, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?x-id=UploadPart", 200] }, + () => UploadPartRequest$, + () => UploadPartOutput$ + ]; + var UploadPartCopy$ = [ + 9, + n0, + _UPC, + { [_h]: ["PUT", "/{Key+}?x-id=UploadPartCopy", 200] }, + () => UploadPartCopyRequest$, + () => UploadPartCopyOutput$ + ]; + var WriteGetObjectResponse$ = [ + 9, + n0, + _WGOR, + { [_en]: ["{RequestRoute}."], [_h]: ["POST", "/WriteGetObjectResponse", 200] }, + () => WriteGetObjectResponseRequest$, + () => __Unit + ]; + + class CreateSessionCommand extends command(_ep4, _mw0, "CreateSession", CreateSession$) { + } + var version = "3.1126.0"; + var packageInfo = { + version + }; + var getRuntimeConfig$1 = (config) => { + return { + apiVersion: "2006-03-01", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? getAwsChunkedEncodingStream, + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultS3HttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer + }, + { + schemeId: "aws.auth#sigv4a", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"), + signer: new AwsSdkSigV4ASigner + } + ], + logger: config?.logger ?? new NoOpLogger, + md5: config?.md5 ?? Md5, + protocol: config?.protocol ?? S3RestXmlProtocol, + protocolSettings: config?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.s3", + errorTypeRegistries, + xmlNamespace: "http://s3.amazonaws.com/doc/2006-03-01/", + version: "2006-03-01", + serviceTarget: "AmazonS3" + }, + sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin, + serviceId: config?.serviceId ?? "S3", + sha1: config?.sha1 ?? Sha1, + sha256: config?.sha256 ?? Sha256, + signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion, + signingEscapePath: config?.signingEscapePath ?? false, + urlParser: config?.urlParser ?? parseUrl, + useArnRegion: config?.useArnRegion ?? undefined, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8 + }; + }; + var getRuntimeConfig = (config) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig$1(config); + emitWarningIfUnsupportedVersion$1(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + disableS3ExpressSessionAuth: config?.disableS3ExpressSessionAuth ?? loadConfig(NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, loaderConfig), + eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, + maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestChecksumCalculation: config?.requestChecksumCalculation ?? loadConfig(NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, loaderConfig), + requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + responseChecksumValidation: config?.responseChecksumValidation ?? loadConfig(NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS, loaderConfig), + retryMode: config?.retryMode ?? loadConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE + }, config), + sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig), + streamCollector: config?.streamCollector ?? streamCollector, + streamHasher: config?.streamHasher ?? readableStreamHasher, + useArnRegion: config?.useArnRegion ?? loadConfig(NODE_USE_ARN_REGION_CONFIG_OPTIONS, loaderConfig), + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + var getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }; + var resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; + }; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); + }; + + class S3Client extends Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveUserAgentConfig(_config_1); + const _config_3 = resolveFlexibleChecksumsConfig(_config_2); + const _config_4 = resolveRetryConfig(_config_3); + const _config_5 = resolveRegionConfig(_config_4); + const _config_6 = resolveHostHeaderConfig(_config_5); + const _config_7 = resolveEndpointConfig(_config_6); + const _config_8 = resolveEventStreamSerdeConfig(_config_7); + const _config_9 = resolveHttpAuthSchemeConfig(_config_8); + const _config_10 = resolveS3Config(_config_9, { session: [() => this, CreateSessionCommand] }); + const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []); + this.config = _config_11; + this.middlewareStack.use(getSchemaSerdePlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultS3HttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + "aws.auth#sigv4a": config.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + this.middlewareStack.use(getValidateBucketNamePlugin(this.config)); + this.middlewareStack.use(getAddExpectContinuePlugin(this.config)); + this.middlewareStack.use(getRegionRedirectMiddlewarePlugin(this.config)); + this.middlewareStack.use(getS3ExpressPlugin(this.config)); + this.middlewareStack.use(getS3ExpressHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + } + + class AbortMultipartUploadCommand extends command(_ep0, _mw0, "AbortMultipartUpload", AbortMultipartUpload$) { + } + + class CompleteMultipartUploadCommand extends command(_ep0, _mw1, "CompleteMultipartUpload", CompleteMultipartUpload$) { + } + + class CopyObjectCommand extends command(_ep1, _mw1, "CopyObject", CopyObject$) { + } + + class CreateBucketCommand extends command(_ep2, _mw2, "CreateBucket", CreateBucket$) { + } + + class CreateBucketMetadataConfigurationCommand extends command(_ep3, _mw3, "CreateBucketMetadataConfiguration", CreateBucketMetadataConfiguration$) { + } + + class CreateBucketMetadataTableConfigurationCommand extends command(_ep3, _mw3, "CreateBucketMetadataTableConfiguration", CreateBucketMetadataTableConfiguration$) { + } + + class CreateMultipartUploadCommand extends command(_ep0, _mw1, "CreateMultipartUpload", CreateMultipartUpload$) { + } + + class DeleteBucketAnalyticsConfigurationCommand extends command(_ep3, _mw4, "DeleteBucketAnalyticsConfiguration", DeleteBucketAnalyticsConfiguration$) { + } + + class DeleteBucketCommand extends command(_ep3, _mw4, "DeleteBucket", DeleteBucket$) { + } + + class DeleteBucketCorsCommand extends command(_ep3, _mw4, "DeleteBucketCors", DeleteBucketCors$) { + } + + class DeleteBucketEncryptionCommand extends command(_ep3, _mw4, "DeleteBucketEncryption", DeleteBucketEncryption$) { + } + + class DeleteBucketIntelligentTieringConfigurationCommand extends command(_ep3, _mw4, "DeleteBucketIntelligentTieringConfiguration", DeleteBucketIntelligentTieringConfiguration$) { + } + + class DeleteBucketInventoryConfigurationCommand extends command(_ep3, _mw4, "DeleteBucketInventoryConfiguration", DeleteBucketInventoryConfiguration$) { + } + + class DeleteBucketLifecycleCommand extends command(_ep3, _mw4, "DeleteBucketLifecycle", DeleteBucketLifecycle$) { + } + + class DeleteBucketMetadataConfigurationCommand extends command(_ep3, _mw4, "DeleteBucketMetadataConfiguration", DeleteBucketMetadataConfiguration$) { + } + + class DeleteBucketMetadataTableConfigurationCommand extends command(_ep3, _mw4, "DeleteBucketMetadataTableConfiguration", DeleteBucketMetadataTableConfiguration$) { + } + + class DeleteBucketMetricsConfigurationCommand extends command(_ep3, _mw4, "DeleteBucketMetricsConfiguration", DeleteBucketMetricsConfiguration$) { + } + + class DeleteBucketOwnershipControlsCommand extends command(_ep3, _mw4, "DeleteBucketOwnershipControls", DeleteBucketOwnershipControls$) { + } + + class DeleteBucketPolicyCommand extends command(_ep3, _mw4, "DeleteBucketPolicy", DeleteBucketPolicy$) { + } + + class DeleteBucketReplicationCommand extends command(_ep3, _mw4, "DeleteBucketReplication", DeleteBucketReplication$) { + } + + class DeleteBucketTaggingCommand extends command(_ep3, _mw4, "DeleteBucketTagging", DeleteBucketTagging$) { + } + + class DeleteBucketWebsiteCommand extends command(_ep3, _mw4, "DeleteBucketWebsite", DeleteBucketWebsite$) { + } + + class DeleteObjectAnnotationCommand extends command(_ep5, _mw0, "DeleteObjectAnnotation", DeleteObjectAnnotation$) { + } + + class DeleteObjectCommand extends command(_ep0, _mw0, "DeleteObject", DeleteObject$) { + } + + class DeleteObjectsCommand extends command(_ep5, _mw5, "DeleteObjects", DeleteObjects$) { + } + + class DeleteObjectTaggingCommand extends command(_ep5, _mw0, "DeleteObjectTagging", DeleteObjectTagging$) { + } + + class DeletePublicAccessBlockCommand extends command(_ep3, _mw4, "DeletePublicAccessBlock", DeletePublicAccessBlock$) { + } + + class GetBucketAbacCommand extends command(_ep5, _mw0, "GetBucketAbac", GetBucketAbac$) { + } + + class GetBucketAccelerateConfigurationCommand extends command(_ep3, _mw0, "GetBucketAccelerateConfiguration", GetBucketAccelerateConfiguration$) { + } + + class GetBucketAclCommand extends command(_ep3, _mw0, "GetBucketAcl", GetBucketAcl$) { + } + + class GetBucketAnalyticsConfigurationCommand extends command(_ep3, _mw0, "GetBucketAnalyticsConfiguration", GetBucketAnalyticsConfiguration$) { + } + + class GetBucketCorsCommand extends command(_ep3, _mw0, "GetBucketCors", GetBucketCors$) { + } + + class GetBucketEncryptionCommand extends command(_ep3, _mw0, "GetBucketEncryption", GetBucketEncryption$) { + } + + class GetBucketIntelligentTieringConfigurationCommand extends command(_ep3, _mw0, "GetBucketIntelligentTieringConfiguration", GetBucketIntelligentTieringConfiguration$) { + } + + class GetBucketInventoryConfigurationCommand extends command(_ep3, _mw0, "GetBucketInventoryConfiguration", GetBucketInventoryConfiguration$) { + } + + class GetBucketLifecycleConfigurationCommand extends command(_ep3, _mw0, "GetBucketLifecycleConfiguration", GetBucketLifecycleConfiguration$) { + } + + class GetBucketLocationCommand extends command(_ep3, _mw0, "GetBucketLocation", GetBucketLocation$) { + } + + class GetBucketLoggingCommand extends command(_ep3, _mw0, "GetBucketLogging", GetBucketLogging$) { + } + + class GetBucketMetadataConfigurationCommand extends command(_ep3, _mw0, "GetBucketMetadataConfiguration", GetBucketMetadataConfiguration$) { + } + + class GetBucketMetadataTableConfigurationCommand extends command(_ep3, _mw0, "GetBucketMetadataTableConfiguration", GetBucketMetadataTableConfiguration$) { + } + + class GetBucketMetricsConfigurationCommand extends command(_ep3, _mw0, "GetBucketMetricsConfiguration", GetBucketMetricsConfiguration$) { + } + + class GetBucketNotificationConfigurationCommand extends command(_ep3, _mw0, "GetBucketNotificationConfiguration", GetBucketNotificationConfiguration$) { + } + + class GetBucketOwnershipControlsCommand extends command(_ep3, _mw0, "GetBucketOwnershipControls", GetBucketOwnershipControls$) { + } + + class GetBucketPolicyCommand extends command(_ep3, _mw4, "GetBucketPolicy", GetBucketPolicy$) { + } + + class GetBucketPolicyStatusCommand extends command(_ep3, _mw0, "GetBucketPolicyStatus", GetBucketPolicyStatus$) { + } + + class GetBucketReplicationCommand extends command(_ep3, _mw0, "GetBucketReplication", GetBucketReplication$) { + } + + class GetBucketRequestPaymentCommand extends command(_ep3, _mw0, "GetBucketRequestPayment", GetBucketRequestPayment$) { + } + + class GetBucketTaggingCommand extends command(_ep3, _mw0, "GetBucketTagging", GetBucketTagging$) { + } + + class GetBucketVersioningCommand extends command(_ep3, _mw0, "GetBucketVersioning", GetBucketVersioning$) { + } + + class GetBucketWebsiteCommand extends command(_ep3, _mw0, "GetBucketWebsite", GetBucketWebsite$) { + } + + class GetObjectAclCommand extends command(_ep0, _mw0, "GetObjectAcl", GetObjectAcl$) { + } + + class GetObjectAnnotationCommand extends command(_ep0, _mw6, "GetObjectAnnotation", GetObjectAnnotation$) { + } + + class GetObjectAttributesCommand extends command(_ep5, _mw1, "GetObjectAttributes", GetObjectAttributes$) { + } + + class GetObjectCommand extends command(_ep0, _mw7, "GetObject", GetObject$) { + } + + class GetObjectLegalHoldCommand extends command(_ep5, _mw0, "GetObjectLegalHold", GetObjectLegalHold$) { + } + + class GetObjectLockConfigurationCommand extends command(_ep5, _mw0, "GetObjectLockConfiguration", GetObjectLockConfiguration$) { + } + + class GetObjectRetentionCommand extends command(_ep5, _mw0, "GetObjectRetention", GetObjectRetention$) { + } + + class GetObjectTaggingCommand extends command(_ep5, _mw0, "GetObjectTagging", GetObjectTagging$) { + } + + class GetObjectTorrentCommand extends command(_ep5, _mw4, "GetObjectTorrent", GetObjectTorrent$) { + } + + class GetPublicAccessBlockCommand extends command(_ep3, _mw0, "GetPublicAccessBlock", GetPublicAccessBlock$) { + } + + class HeadBucketCommand extends command(_ep5, _mw0, "HeadBucket", HeadBucket$) { + } + + class HeadObjectCommand extends command(_ep0, _mw8, "HeadObject", HeadObject$) { + } + + class ListBucketAnalyticsConfigurationsCommand extends command(_ep3, _mw0, "ListBucketAnalyticsConfigurations", ListBucketAnalyticsConfigurations$) { + } + + class ListBucketIntelligentTieringConfigurationsCommand extends command(_ep3, _mw0, "ListBucketIntelligentTieringConfigurations", ListBucketIntelligentTieringConfigurations$) { + } + + class ListBucketInventoryConfigurationsCommand extends command(_ep3, _mw0, "ListBucketInventoryConfigurations", ListBucketInventoryConfigurations$) { + } + + class ListBucketMetricsConfigurationsCommand extends command(_ep3, _mw0, "ListBucketMetricsConfigurations", ListBucketMetricsConfigurations$) { + } + + class ListBucketsCommand extends command(_ep6, _mw0, "ListBuckets", ListBuckets$) { + } + + class ListDirectoryBucketsCommand extends command(_ep7, _mw0, "ListDirectoryBuckets", ListDirectoryBuckets$) { + } + + class ListMultipartUploadsCommand extends command(_ep8, _mw0, "ListMultipartUploads", ListMultipartUploads$) { + } + + class ListObjectAnnotationsCommand extends command(_ep5, _mw0, "ListObjectAnnotations", ListObjectAnnotations$) { + } + + class ListObjectsCommand extends command(_ep8, _mw0, "ListObjects", ListObjects$) { + } + + class ListObjectsV2Command extends command(_ep8, _mw0, "ListObjectsV2", ListObjectsV2$) { + } + + class ListObjectVersionsCommand extends command(_ep8, _mw0, "ListObjectVersions", ListObjectVersions$) { + } + + class ListPartsCommand extends command(_ep0, _mw1, "ListParts", ListParts$) { + } + + class PutBucketAbacCommand extends command(_ep5, _mw9, "PutBucketAbac", PutBucketAbac$) { + } + + class PutBucketAccelerateConfigurationCommand extends command(_ep3, _mw9, "PutBucketAccelerateConfiguration", PutBucketAccelerateConfiguration$) { + } + + class PutBucketAclCommand extends command(_ep3, _mw3, "PutBucketAcl", PutBucketAcl$) { + } + + class PutBucketAnalyticsConfigurationCommand extends command(_ep3, _mw4, "PutBucketAnalyticsConfiguration", PutBucketAnalyticsConfiguration$) { + } + + class PutBucketCorsCommand extends command(_ep3, _mw3, "PutBucketCors", PutBucketCors$) { + } + + class PutBucketEncryptionCommand extends command(_ep3, _mw3, "PutBucketEncryption", PutBucketEncryption$) { + } + + class PutBucketIntelligentTieringConfigurationCommand extends command(_ep3, _mw4, "PutBucketIntelligentTieringConfiguration", PutBucketIntelligentTieringConfiguration$) { + } + + class PutBucketInventoryConfigurationCommand extends command(_ep3, _mw4, "PutBucketInventoryConfiguration", PutBucketInventoryConfiguration$) { + } + + class PutBucketLifecycleConfigurationCommand extends command(_ep3, _mw5, "PutBucketLifecycleConfiguration", PutBucketLifecycleConfiguration$) { + } + + class PutBucketLoggingCommand extends command(_ep3, _mw3, "PutBucketLogging", PutBucketLogging$) { + } + + class PutBucketMetricsConfigurationCommand extends command(_ep3, _mw4, "PutBucketMetricsConfiguration", PutBucketMetricsConfiguration$) { + } + + class PutBucketNotificationConfigurationCommand extends command(_ep3, _mw4, "PutBucketNotificationConfiguration", PutBucketNotificationConfiguration$) { + } + + class PutBucketOwnershipControlsCommand extends command(_ep3, _mw3, "PutBucketOwnershipControls", PutBucketOwnershipControls$) { + } + + class PutBucketPolicyCommand extends command(_ep3, _mw3, "PutBucketPolicy", PutBucketPolicy$) { + } + + class PutBucketReplicationCommand extends command(_ep3, _mw3, "PutBucketReplication", PutBucketReplication$) { + } + + class PutBucketRequestPaymentCommand extends command(_ep3, _mw3, "PutBucketRequestPayment", PutBucketRequestPayment$) { + } + + class PutBucketTaggingCommand extends command(_ep3, _mw3, "PutBucketTagging", PutBucketTagging$) { + } + + class PutBucketVersioningCommand extends command(_ep3, _mw3, "PutBucketVersioning", PutBucketVersioning$) { + } + + class PutBucketWebsiteCommand extends command(_ep3, _mw3, "PutBucketWebsite", PutBucketWebsite$) { + } + + class PutObjectAclCommand extends command(_ep0, _mw5, "PutObjectAcl", PutObjectAcl$) { + } + + class PutObjectAnnotationCommand extends command(_ep0, _mw10, "PutObjectAnnotation", PutObjectAnnotation$) { + } + + class PutObjectCommand extends command(_ep0, _mw11, "PutObject", PutObject$) { + } + + class PutObjectLegalHoldCommand extends command(_ep5, _mw5, "PutObjectLegalHold", PutObjectLegalHold$) { + } + + class PutObjectLockConfigurationCommand extends command(_ep5, _mw5, "PutObjectLockConfiguration", PutObjectLockConfiguration$) { + } + + class PutObjectRetentionCommand extends command(_ep5, _mw5, "PutObjectRetention", PutObjectRetention$) { + } + + class PutObjectTaggingCommand extends command(_ep5, _mw5, "PutObjectTagging", PutObjectTagging$) { + } + + class PutPublicAccessBlockCommand extends command(_ep3, _mw3, "PutPublicAccessBlock", PutPublicAccessBlock$) { + } + + class RenameObjectCommand extends command(_ep0, _mw0, "RenameObject", RenameObject$) { + } + + class RestoreObjectCommand extends command(_ep5, _mw10, "RestoreObject", RestoreObject$) { + } + + class SelectObjectContentCommand extends command(_ep5, _mw12, "SelectObjectContent", SelectObjectContent$) { + } + + class UpdateBucketMetadataAnnotationTableConfigurationCommand extends command(_ep3, _mw3, "UpdateBucketMetadataAnnotationTableConfiguration", UpdateBucketMetadataAnnotationTableConfiguration$) { + } + + class UpdateBucketMetadataInventoryTableConfigurationCommand extends command(_ep3, _mw3, "UpdateBucketMetadataInventoryTableConfiguration", UpdateBucketMetadataInventoryTableConfiguration$) { + } + + class UpdateBucketMetadataJournalTableConfigurationCommand extends command(_ep3, _mw3, "UpdateBucketMetadataJournalTableConfiguration", UpdateBucketMetadataJournalTableConfiguration$) { + } + + class UpdateObjectEncryptionCommand extends command(_ep5, _mw5, "UpdateObjectEncryption", UpdateObjectEncryption$) { + } + + class UploadPartCommand extends command(_ep0, _mw13, "UploadPart", UploadPart$) { + } + + class UploadPartCopyCommand extends command(_ep4, _mw1, "UploadPartCopy", UploadPartCopy$) { + } + + class WriteGetObjectResponseCommand extends command(_ep9, _mw4, "WriteGetObjectResponse", WriteGetObjectResponse$) { + } + var paginateListBuckets = createPaginator(S3Client, ListBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxBuckets"); + var paginateListDirectoryBuckets = createPaginator(S3Client, ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets"); + var paginateListObjectAnnotations = createPaginator(S3Client, ListObjectAnnotationsCommand, "ContinuationToken", "NextContinuationToken", "MaxAnnotationResults"); + var paginateListObjectsV2 = createPaginator(S3Client, ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys"); + var paginateListParts = createPaginator(S3Client, ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts"); + var checkState$3 = async (client, input) => { + let reason; + try { + let result = await client.send(new HeadBucketCommand(input)); + reason = result; + return { state: WaiterState.SUCCESS, reason }; + } catch (exception) { + reason = exception; + if (exception.name === "NotFound") { + return { state: WaiterState.RETRY, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }; + var waitForBucketExists = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState$3); + }; + var waitUntilBucketExists = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$3); + return checkExceptions(result); + }; + var checkState$2 = async (client, input) => { + let reason; + try { + let result = await client.send(new HeadBucketCommand(input)); + reason = result; + } catch (exception) { + reason = exception; + if (exception.name === "NotFound") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }; + var waitForBucketNotExists = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState$2); + }; + var waitUntilBucketNotExists = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$2); + return checkExceptions(result); + }; + var checkState$1 = async (client, input) => { + let reason; + try { + let result = await client.send(new HeadObjectCommand(input)); + reason = result; + return { state: WaiterState.SUCCESS, reason }; + } catch (exception) { + reason = exception; + if (exception.name === "NotFound") { + return { state: WaiterState.RETRY, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }; + var waitForObjectExists = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState$1); + }; + var waitUntilObjectExists = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState$1); + return checkExceptions(result); + }; + var checkState = async (client, input) => { + let reason; + try { + let result = await client.send(new HeadObjectCommand(input)); + reason = result; + } catch (exception) { + reason = exception; + if (exception.name === "NotFound") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }; + var waitForObjectNotExists = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); + }; + var waitUntilObjectNotExists = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); + }; + var commands = { + AbortMultipartUploadCommand, + CompleteMultipartUploadCommand, + CopyObjectCommand, + CreateBucketCommand, + CreateBucketMetadataConfigurationCommand, + CreateBucketMetadataTableConfigurationCommand, + CreateMultipartUploadCommand, + CreateSessionCommand, + DeleteBucketCommand, + DeleteBucketAnalyticsConfigurationCommand, + DeleteBucketCorsCommand, + DeleteBucketEncryptionCommand, + DeleteBucketIntelligentTieringConfigurationCommand, + DeleteBucketInventoryConfigurationCommand, + DeleteBucketLifecycleCommand, + DeleteBucketMetadataConfigurationCommand, + DeleteBucketMetadataTableConfigurationCommand, + DeleteBucketMetricsConfigurationCommand, + DeleteBucketOwnershipControlsCommand, + DeleteBucketPolicyCommand, + DeleteBucketReplicationCommand, + DeleteBucketTaggingCommand, + DeleteBucketWebsiteCommand, + DeleteObjectCommand, + DeleteObjectAnnotationCommand, + DeleteObjectsCommand, + DeleteObjectTaggingCommand, + DeletePublicAccessBlockCommand, + GetBucketAbacCommand, + GetBucketAccelerateConfigurationCommand, + GetBucketAclCommand, + GetBucketAnalyticsConfigurationCommand, + GetBucketCorsCommand, + GetBucketEncryptionCommand, + GetBucketIntelligentTieringConfigurationCommand, + GetBucketInventoryConfigurationCommand, + GetBucketLifecycleConfigurationCommand, + GetBucketLocationCommand, + GetBucketLoggingCommand, + GetBucketMetadataConfigurationCommand, + GetBucketMetadataTableConfigurationCommand, + GetBucketMetricsConfigurationCommand, + GetBucketNotificationConfigurationCommand, + GetBucketOwnershipControlsCommand, + GetBucketPolicyCommand, + GetBucketPolicyStatusCommand, + GetBucketReplicationCommand, + GetBucketRequestPaymentCommand, + GetBucketTaggingCommand, + GetBucketVersioningCommand, + GetBucketWebsiteCommand, + GetObjectCommand, + GetObjectAclCommand, + GetObjectAnnotationCommand, + GetObjectAttributesCommand, + GetObjectLegalHoldCommand, + GetObjectLockConfigurationCommand, + GetObjectRetentionCommand, + GetObjectTaggingCommand, + GetObjectTorrentCommand, + GetPublicAccessBlockCommand, + HeadBucketCommand, + HeadObjectCommand, + ListBucketAnalyticsConfigurationsCommand, + ListBucketIntelligentTieringConfigurationsCommand, + ListBucketInventoryConfigurationsCommand, + ListBucketMetricsConfigurationsCommand, + ListBucketsCommand, + ListDirectoryBucketsCommand, + ListMultipartUploadsCommand, + ListObjectAnnotationsCommand, + ListObjectsCommand, + ListObjectsV2Command, + ListObjectVersionsCommand, + ListPartsCommand, + PutBucketAbacCommand, + PutBucketAccelerateConfigurationCommand, + PutBucketAclCommand, + PutBucketAnalyticsConfigurationCommand, + PutBucketCorsCommand, + PutBucketEncryptionCommand, + PutBucketIntelligentTieringConfigurationCommand, + PutBucketInventoryConfigurationCommand, + PutBucketLifecycleConfigurationCommand, + PutBucketLoggingCommand, + PutBucketMetricsConfigurationCommand, + PutBucketNotificationConfigurationCommand, + PutBucketOwnershipControlsCommand, + PutBucketPolicyCommand, + PutBucketReplicationCommand, + PutBucketRequestPaymentCommand, + PutBucketTaggingCommand, + PutBucketVersioningCommand, + PutBucketWebsiteCommand, + PutObjectCommand, + PutObjectAclCommand, + PutObjectAnnotationCommand, + PutObjectLegalHoldCommand, + PutObjectLockConfigurationCommand, + PutObjectRetentionCommand, + PutObjectTaggingCommand, + PutPublicAccessBlockCommand, + RenameObjectCommand, + RestoreObjectCommand, + SelectObjectContentCommand, + UpdateBucketMetadataAnnotationTableConfigurationCommand, + UpdateBucketMetadataInventoryTableConfigurationCommand, + UpdateBucketMetadataJournalTableConfigurationCommand, + UpdateObjectEncryptionCommand, + UploadPartCommand, + UploadPartCopyCommand, + WriteGetObjectResponseCommand + }; + var paginators = { + paginateListBuckets, + paginateListDirectoryBuckets, + paginateListObjectAnnotations, + paginateListObjectsV2, + paginateListParts + }; + var waiters = { + waitUntilBucketExists, + waitUntilBucketNotExists, + waitUntilObjectExists, + waitUntilObjectNotExists + }; + + class S3 extends S3Client { + } + createAggregatedClient(commands, S3, { paginators, waiters }); + var BucketAbacStatus = { + Disabled: "Disabled", + Enabled: "Enabled" + }; + var RequestCharged = { + requester: "requester" + }; + var RequestPayer = { + requester: "requester" + }; + var BucketAccelerateStatus = { + Enabled: "Enabled", + Suspended: "Suspended" + }; + var Type = { + AmazonCustomerByEmail: "AmazonCustomerByEmail", + CanonicalUser: "CanonicalUser", + Group: "Group" + }; + var Permission = { + FULL_CONTROL: "FULL_CONTROL", + READ: "READ", + READ_ACP: "READ_ACP", + WRITE: "WRITE", + WRITE_ACP: "WRITE_ACP" + }; + var OwnerOverride = { + Destination: "Destination" + }; + var ChecksumType = { + COMPOSITE: "COMPOSITE", + FULL_OBJECT: "FULL_OBJECT" + }; + var ServerSideEncryption = { + AES256: "AES256", + aws_backup: "aws:backup", + aws_fsx: "aws:fsx", + aws_kms: "aws:kms", + aws_kms_dsse: "aws:kms:dsse" + }; + var ObjectCannedACL = { + authenticated_read: "authenticated-read", + aws_exec_read: "aws-exec-read", + bucket_owner_full_control: "bucket-owner-full-control", + bucket_owner_read: "bucket-owner-read", + private: "private", + public_read: "public-read", + public_read_write: "public-read-write" + }; + var AnnotationDirective = { + COPY: "COPY", + EXCLUDE: "EXCLUDE" + }; + var ChecksumAlgorithm = { + CRC32: "CRC32", + CRC32C: "CRC32C", + CRC64NVME: "CRC64NVME", + MD5: "MD5", + SHA1: "SHA1", + SHA256: "SHA256", + SHA512: "SHA512", + XXHASH128: "XXHASH128", + XXHASH3: "XXHASH3", + XXHASH64: "XXHASH64" + }; + var MetadataDirective = { + COPY: "COPY", + REPLACE: "REPLACE" + }; + var ObjectLockLegalHoldStatus = { + OFF: "OFF", + ON: "ON" + }; + var ObjectLockMode = { + COMPLIANCE: "COMPLIANCE", + GOVERNANCE: "GOVERNANCE" + }; + var StorageClass = { + AWS_BACKUP_LOW_COST_WARM: "AWS_BACKUP_LOW_COST_WARM", + AWS_BACKUP_WARM: "AWS_BACKUP_WARM", + DEEP_ARCHIVE: "DEEP_ARCHIVE", + EXPRESS_ONEZONE: "EXPRESS_ONEZONE", + FSX_ONTAP: "FSX_ONTAP", + FSX_OPENZFS: "FSX_OPENZFS", + GLACIER: "GLACIER", + GLACIER_IR: "GLACIER_IR", + INTELLIGENT_TIERING: "INTELLIGENT_TIERING", + ONEZONE_IA: "ONEZONE_IA", + OUTPOSTS: "OUTPOSTS", + REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY", + SNOW: "SNOW", + STANDARD: "STANDARD", + STANDARD_IA: "STANDARD_IA" + }; + var TaggingDirective = { + COPY: "COPY", + REPLACE: "REPLACE" + }; + var BucketCannedACL = { + authenticated_read: "authenticated-read", + private: "private", + public_read: "public-read", + public_read_write: "public-read-write" + }; + var BucketNamespace = { + ACCOUNT_REGIONAL: "account-regional", + GLOBAL: "global" + }; + var DataRedundancy = { + SingleAvailabilityZone: "SingleAvailabilityZone", + SingleLocalZone: "SingleLocalZone" + }; + var BucketType = { + Directory: "Directory" + }; + var LocationType = { + AvailabilityZone: "AvailabilityZone", + LocalZone: "LocalZone" + }; + var BucketLocationConstraint = { + EU: "EU", + af_south_1: "af-south-1", + ap_east_1: "ap-east-1", + ap_east_2: "ap-east-2", + ap_northeast_1: "ap-northeast-1", + ap_northeast_2: "ap-northeast-2", + ap_northeast_3: "ap-northeast-3", + ap_south_1: "ap-south-1", + ap_south_2: "ap-south-2", + ap_southeast_1: "ap-southeast-1", + ap_southeast_2: "ap-southeast-2", + ap_southeast_3: "ap-southeast-3", + ap_southeast_4: "ap-southeast-4", + ap_southeast_5: "ap-southeast-5", + ap_southeast_6: "ap-southeast-6", + ap_southeast_7: "ap-southeast-7", + ca_central_1: "ca-central-1", + ca_west_1: "ca-west-1", + cn_north_1: "cn-north-1", + cn_northwest_1: "cn-northwest-1", + eu_central_1: "eu-central-1", + eu_central_2: "eu-central-2", + eu_north_1: "eu-north-1", + eu_south_1: "eu-south-1", + eu_south_2: "eu-south-2", + eu_west_1: "eu-west-1", + eu_west_2: "eu-west-2", + eu_west_3: "eu-west-3", + il_central_1: "il-central-1", + me_central_1: "me-central-1", + me_south_1: "me-south-1", + mx_central_1: "mx-central-1", + sa_east_1: "sa-east-1", + us_east_2: "us-east-2", + us_gov_east_1: "us-gov-east-1", + us_gov_west_1: "us-gov-west-1", + us_west_1: "us-west-1", + us_west_2: "us-west-2" + }; + var ObjectOwnership = { + BucketOwnerEnforced: "BucketOwnerEnforced", + BucketOwnerPreferred: "BucketOwnerPreferred", + ObjectWriter: "ObjectWriter" + }; + var AnnotationConfigurationState = { + DISABLED: "DISABLED", + ENABLED: "ENABLED" + }; + var TableSseAlgorithm = { + AES256: "AES256", + aws_kms: "aws:kms" + }; + var InventoryConfigurationState = { + DISABLED: "DISABLED", + ENABLED: "ENABLED" + }; + var ExpirationState = { + DISABLED: "DISABLED", + ENABLED: "ENABLED" + }; + var SessionMode = { + ReadOnly: "ReadOnly", + ReadWrite: "ReadWrite" + }; + var AnalyticsS3ExportFileFormat = { + CSV: "CSV" + }; + var StorageClassAnalysisSchemaVersion = { + V_1: "V_1" + }; + var EncryptionType = { + NONE: "NONE", + SSE_C: "SSE-C" + }; + var IntelligentTieringStatus = { + Disabled: "Disabled", + Enabled: "Enabled" + }; + var IntelligentTieringAccessTier = { + ARCHIVE_ACCESS: "ARCHIVE_ACCESS", + DEEP_ARCHIVE_ACCESS: "DEEP_ARCHIVE_ACCESS" + }; + var InventoryFormat = { + CSV: "CSV", + ORC: "ORC", + Parquet: "Parquet" + }; + var InventoryIncludedObjectVersions = { + All: "All", + Current: "Current" + }; + var InventoryOptionalField = { + BucketKeyStatus: "BucketKeyStatus", + ChecksumAlgorithm: "ChecksumAlgorithm", + ETag: "ETag", + EncryptionStatus: "EncryptionStatus", + IntelligentTieringAccessTier: "IntelligentTieringAccessTier", + IsMultipartUploaded: "IsMultipartUploaded", + LastModifiedDate: "LastModifiedDate", + LifecycleExpirationDate: "LifecycleExpirationDate", + ObjectAccessControlList: "ObjectAccessControlList", + ObjectLockLegalHoldStatus: "ObjectLockLegalHoldStatus", + ObjectLockMode: "ObjectLockMode", + ObjectLockRetainUntilDate: "ObjectLockRetainUntilDate", + ObjectOwner: "ObjectOwner", + ReplicationStatus: "ReplicationStatus", + Size: "Size", + StorageClass: "StorageClass" + }; + var InventoryFrequency = { + Daily: "Daily", + Weekly: "Weekly" + }; + var TransitionStorageClass = { + DEEP_ARCHIVE: "DEEP_ARCHIVE", + GLACIER: "GLACIER", + GLACIER_IR: "GLACIER_IR", + INTELLIGENT_TIERING: "INTELLIGENT_TIERING", + ONEZONE_IA: "ONEZONE_IA", + STANDARD_IA: "STANDARD_IA" + }; + var ExpirationStatus = { + Disabled: "Disabled", + Enabled: "Enabled" + }; + var TransitionDefaultMinimumObjectSize = { + all_storage_classes_128K: "all_storage_classes_128K", + varies_by_storage_class: "varies_by_storage_class" + }; + var BucketLogsPermission = { + FULL_CONTROL: "FULL_CONTROL", + READ: "READ", + WRITE: "WRITE" + }; + var PartitionDateSource = { + DeliveryTime: "DeliveryTime", + EventTime: "EventTime" + }; + var S3TablesBucketType = { + aws: "aws", + customer: "customer" + }; + var Event = { + s3_IntelligentTiering: "s3:IntelligentTiering", + s3_LifecycleExpiration_: "s3:LifecycleExpiration:*", + s3_LifecycleExpiration_Delete: "s3:LifecycleExpiration:Delete", + s3_LifecycleExpiration_DeleteMarkerCreated: "s3:LifecycleExpiration:DeleteMarkerCreated", + s3_LifecycleTransition: "s3:LifecycleTransition", + s3_ObjectAcl_Put: "s3:ObjectAcl:Put", + s3_ObjectAnnotation_: "s3:ObjectAnnotation:*", + s3_ObjectAnnotation_Delete: "s3:ObjectAnnotation:Delete", + s3_ObjectAnnotation_Put: "s3:ObjectAnnotation:Put", + s3_ObjectCreated_: "s3:ObjectCreated:*", + s3_ObjectCreated_CompleteMultipartUpload: "s3:ObjectCreated:CompleteMultipartUpload", + s3_ObjectCreated_Copy: "s3:ObjectCreated:Copy", + s3_ObjectCreated_Post: "s3:ObjectCreated:Post", + s3_ObjectCreated_Put: "s3:ObjectCreated:Put", + s3_ObjectRemoved_: "s3:ObjectRemoved:*", + s3_ObjectRemoved_Delete: "s3:ObjectRemoved:Delete", + s3_ObjectRemoved_DeleteMarkerCreated: "s3:ObjectRemoved:DeleteMarkerCreated", + s3_ObjectRestore_: "s3:ObjectRestore:*", + s3_ObjectRestore_Completed: "s3:ObjectRestore:Completed", + s3_ObjectRestore_Delete: "s3:ObjectRestore:Delete", + s3_ObjectRestore_Post: "s3:ObjectRestore:Post", + s3_ObjectTagging_: "s3:ObjectTagging:*", + s3_ObjectTagging_Delete: "s3:ObjectTagging:Delete", + s3_ObjectTagging_Put: "s3:ObjectTagging:Put", + s3_ReducedRedundancyLostObject: "s3:ReducedRedundancyLostObject", + s3_Replication_: "s3:Replication:*", + s3_Replication_OperationFailedReplication: "s3:Replication:OperationFailedReplication", + s3_Replication_OperationMissedThreshold: "s3:Replication:OperationMissedThreshold", + s3_Replication_OperationNotTracked: "s3:Replication:OperationNotTracked", + s3_Replication_OperationReplicatedAfterThreshold: "s3:Replication:OperationReplicatedAfterThreshold" + }; + var FilterRuleName = { + prefix: "prefix", + suffix: "suffix" + }; + var DeleteMarkerReplicationStatus = { + Disabled: "Disabled", + Enabled: "Enabled" + }; + var MetricsStatus = { + Disabled: "Disabled", + Enabled: "Enabled" + }; + var ReplicationTimeStatus = { + Disabled: "Disabled", + Enabled: "Enabled" + }; + var ExistingObjectReplicationStatus = { + Disabled: "Disabled", + Enabled: "Enabled" + }; + var ReplicaModificationsStatus = { + Disabled: "Disabled", + Enabled: "Enabled" + }; + var SseKmsEncryptedObjectsStatus = { + Disabled: "Disabled", + Enabled: "Enabled" + }; + var ReplicationRuleStatus = { + Disabled: "Disabled", + Enabled: "Enabled" + }; + var Payer = { + BucketOwner: "BucketOwner", + Requester: "Requester" + }; + var MFADeleteStatus = { + Disabled: "Disabled", + Enabled: "Enabled" + }; + var BucketVersioningStatus = { + Enabled: "Enabled", + Suspended: "Suspended" + }; + var Protocol = { + http: "http", + https: "https" + }; + var ReplicationStatus = { + COMPLETE: "COMPLETE", + COMPLETED: "COMPLETED", + FAILED: "FAILED", + PENDING: "PENDING", + REPLICA: "REPLICA" + }; + var ChecksumMode = { + ENABLED: "ENABLED" + }; + var ObjectAttributes = { + CHECKSUM: "Checksum", + ETAG: "ETag", + OBJECT_PARTS: "ObjectParts", + OBJECT_SIZE: "ObjectSize", + STORAGE_CLASS: "StorageClass" + }; + var ObjectLockEnabled = { + Enabled: "Enabled" + }; + var ObjectLockRetentionMode = { + COMPLIANCE: "COMPLIANCE", + GOVERNANCE: "GOVERNANCE" + }; + var ArchiveStatus = { + ARCHIVE_ACCESS: "ARCHIVE_ACCESS", + DEEP_ARCHIVE_ACCESS: "DEEP_ARCHIVE_ACCESS" + }; + var EncodingType = { + url: "url" + }; + var ObjectStorageClass = { + AWS_BACKUP_LOW_COST_WARM: "AWS_BACKUP_LOW_COST_WARM", + AWS_BACKUP_WARM: "AWS_BACKUP_WARM", + DEEP_ARCHIVE: "DEEP_ARCHIVE", + EXPRESS_ONEZONE: "EXPRESS_ONEZONE", + FSX_ONTAP: "FSX_ONTAP", + FSX_OPENZFS: "FSX_OPENZFS", + GLACIER: "GLACIER", + GLACIER_IR: "GLACIER_IR", + INTELLIGENT_TIERING: "INTELLIGENT_TIERING", + ONEZONE_IA: "ONEZONE_IA", + OUTPOSTS: "OUTPOSTS", + REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY", + SNOW: "SNOW", + STANDARD: "STANDARD", + STANDARD_IA: "STANDARD_IA" + }; + var OptionalObjectAttributes = { + RESTORE_STATUS: "RestoreStatus" + }; + var ObjectVersionStorageClass = { + STANDARD: "STANDARD" + }; + var MFADelete = { + Disabled: "Disabled", + Enabled: "Enabled" + }; + var Tier = { + Bulk: "Bulk", + Expedited: "Expedited", + Standard: "Standard" + }; + var ExpressionType = { + SQL: "SQL" + }; + var CompressionType = { + BZIP2: "BZIP2", + GZIP: "GZIP", + NONE: "NONE" + }; + var FileHeaderInfo = { + IGNORE: "IGNORE", + NONE: "NONE", + USE: "USE" + }; + var JSONType = { + DOCUMENT: "DOCUMENT", + LINES: "LINES" + }; + var QuoteFields = { + ALWAYS: "ALWAYS", + ASNEEDED: "ASNEEDED" + }; + var RestoreRequestType = { + SELECT: "SELECT" + }; + exports.AbacStatus$ = AbacStatus$; + exports.AbortIncompleteMultipartUpload$ = AbortIncompleteMultipartUpload$; + exports.AbortMultipartUpload$ = AbortMultipartUpload$; + exports.AbortMultipartUploadCommand = AbortMultipartUploadCommand; + exports.AbortMultipartUploadOutput$ = AbortMultipartUploadOutput$; + exports.AbortMultipartUploadRequest$ = AbortMultipartUploadRequest$; + exports.AccelerateConfiguration$ = AccelerateConfiguration$; + exports.AccessControlPolicy$ = AccessControlPolicy$; + exports.AccessControlTranslation$ = AccessControlTranslation$; + exports.AccessDenied = AccessDenied; + exports.AccessDenied$ = AccessDenied$; + exports.AnalyticsAndOperator$ = AnalyticsAndOperator$; + exports.AnalyticsConfiguration$ = AnalyticsConfiguration$; + exports.AnalyticsExportDestination$ = AnalyticsExportDestination$; + exports.AnalyticsFilter$ = AnalyticsFilter$; + exports.AnalyticsS3BucketDestination$ = AnalyticsS3BucketDestination$; + exports.AnalyticsS3ExportFileFormat = AnalyticsS3ExportFileFormat; + exports.AnnotationConfigurationState = AnnotationConfigurationState; + exports.AnnotationDirective = AnnotationDirective; + exports.AnnotationEntry$ = AnnotationEntry$; + exports.AnnotationLimitExceeded = AnnotationLimitExceeded; + exports.AnnotationLimitExceeded$ = AnnotationLimitExceeded$; + exports.AnnotationNameTooLong = AnnotationNameTooLong; + exports.AnnotationNameTooLong$ = AnnotationNameTooLong$; + exports.AnnotationTableConfiguration$ = AnnotationTableConfiguration$; + exports.AnnotationTableConfigurationResult$ = AnnotationTableConfigurationResult$; + exports.AnnotationTableConfigurationUpdates$ = AnnotationTableConfigurationUpdates$; + exports.ArchiveStatus = ArchiveStatus; + exports.BlockedEncryptionTypes$ = BlockedEncryptionTypes$; + exports.Bucket$ = Bucket$; + exports.BucketAbacStatus = BucketAbacStatus; + exports.BucketAccelerateStatus = BucketAccelerateStatus; + exports.BucketAlreadyExists = BucketAlreadyExists; + exports.BucketAlreadyExists$ = BucketAlreadyExists$; + exports.BucketAlreadyOwnedByYou = BucketAlreadyOwnedByYou; + exports.BucketAlreadyOwnedByYou$ = BucketAlreadyOwnedByYou$; + exports.BucketCannedACL = BucketCannedACL; + exports.BucketInfo$ = BucketInfo$; + exports.BucketLifecycleConfiguration$ = BucketLifecycleConfiguration$; + exports.BucketLocationConstraint = BucketLocationConstraint; + exports.BucketLoggingStatus$ = BucketLoggingStatus$; + exports.BucketLogsPermission = BucketLogsPermission; + exports.BucketNamespace = BucketNamespace; + exports.BucketType = BucketType; + exports.BucketVersioningStatus = BucketVersioningStatus; + exports.CORSConfiguration$ = CORSConfiguration$; + exports.CORSRule$ = CORSRule$; + exports.CSVInput$ = CSVInput$; + exports.CSVOutput$ = CSVOutput$; + exports.Checksum$ = Checksum$; + exports.ChecksumAlgorithm = ChecksumAlgorithm; + exports.ChecksumMode = ChecksumMode; + exports.ChecksumType = ChecksumType; + exports.CommonPrefix$ = CommonPrefix$; + exports.CompleteMultipartUpload$ = CompleteMultipartUpload$; + exports.CompleteMultipartUploadCommand = CompleteMultipartUploadCommand; + exports.CompleteMultipartUploadOutput$ = CompleteMultipartUploadOutput$; + exports.CompleteMultipartUploadRequest$ = CompleteMultipartUploadRequest$; + exports.CompletedMultipartUpload$ = CompletedMultipartUpload$; + exports.CompletedPart$ = CompletedPart$; + exports.CompressionType = CompressionType; + exports.Condition$ = Condition$; + exports.ContinuationEvent$ = ContinuationEvent$; + exports.CopyObject$ = CopyObject$; + exports.CopyObjectCommand = CopyObjectCommand; + exports.CopyObjectOutput$ = CopyObjectOutput$; + exports.CopyObjectRequest$ = CopyObjectRequest$; + exports.CopyObjectResult$ = CopyObjectResult$; + exports.CopyPartResult$ = CopyPartResult$; + exports.CreateBucket$ = CreateBucket$; + exports.CreateBucketCommand = CreateBucketCommand; + exports.CreateBucketConfiguration$ = CreateBucketConfiguration$; + exports.CreateBucketMetadataConfiguration$ = CreateBucketMetadataConfiguration$; + exports.CreateBucketMetadataConfigurationCommand = CreateBucketMetadataConfigurationCommand; + exports.CreateBucketMetadataConfigurationRequest$ = CreateBucketMetadataConfigurationRequest$; + exports.CreateBucketMetadataTableConfiguration$ = CreateBucketMetadataTableConfiguration$; + exports.CreateBucketMetadataTableConfigurationCommand = CreateBucketMetadataTableConfigurationCommand; + exports.CreateBucketMetadataTableConfigurationRequest$ = CreateBucketMetadataTableConfigurationRequest$; + exports.CreateBucketOutput$ = CreateBucketOutput$; + exports.CreateBucketRequest$ = CreateBucketRequest$; + exports.CreateMultipartUpload$ = CreateMultipartUpload$; + exports.CreateMultipartUploadCommand = CreateMultipartUploadCommand; + exports.CreateMultipartUploadOutput$ = CreateMultipartUploadOutput$; + exports.CreateMultipartUploadRequest$ = CreateMultipartUploadRequest$; + exports.CreateSession$ = CreateSession$; + exports.CreateSessionCommand = CreateSessionCommand; + exports.CreateSessionOutput$ = CreateSessionOutput$; + exports.CreateSessionRequest$ = CreateSessionRequest$; + exports.DataRedundancy = DataRedundancy; + exports.DefaultRetention$ = DefaultRetention$; + exports.Delete$ = Delete$; + exports.DeleteBucket$ = DeleteBucket$; + exports.DeleteBucketAnalyticsConfiguration$ = DeleteBucketAnalyticsConfiguration$; + exports.DeleteBucketAnalyticsConfigurationCommand = DeleteBucketAnalyticsConfigurationCommand; + exports.DeleteBucketAnalyticsConfigurationRequest$ = DeleteBucketAnalyticsConfigurationRequest$; + exports.DeleteBucketCommand = DeleteBucketCommand; + exports.DeleteBucketCors$ = DeleteBucketCors$; + exports.DeleteBucketCorsCommand = DeleteBucketCorsCommand; + exports.DeleteBucketCorsRequest$ = DeleteBucketCorsRequest$; + exports.DeleteBucketEncryption$ = DeleteBucketEncryption$; + exports.DeleteBucketEncryptionCommand = DeleteBucketEncryptionCommand; + exports.DeleteBucketEncryptionRequest$ = DeleteBucketEncryptionRequest$; + exports.DeleteBucketIntelligentTieringConfiguration$ = DeleteBucketIntelligentTieringConfiguration$; + exports.DeleteBucketIntelligentTieringConfigurationCommand = DeleteBucketIntelligentTieringConfigurationCommand; + exports.DeleteBucketIntelligentTieringConfigurationRequest$ = DeleteBucketIntelligentTieringConfigurationRequest$; + exports.DeleteBucketInventoryConfiguration$ = DeleteBucketInventoryConfiguration$; + exports.DeleteBucketInventoryConfigurationCommand = DeleteBucketInventoryConfigurationCommand; + exports.DeleteBucketInventoryConfigurationRequest$ = DeleteBucketInventoryConfigurationRequest$; + exports.DeleteBucketLifecycle$ = DeleteBucketLifecycle$; + exports.DeleteBucketLifecycleCommand = DeleteBucketLifecycleCommand; + exports.DeleteBucketLifecycleRequest$ = DeleteBucketLifecycleRequest$; + exports.DeleteBucketMetadataConfiguration$ = DeleteBucketMetadataConfiguration$; + exports.DeleteBucketMetadataConfigurationCommand = DeleteBucketMetadataConfigurationCommand; + exports.DeleteBucketMetadataConfigurationRequest$ = DeleteBucketMetadataConfigurationRequest$; + exports.DeleteBucketMetadataTableConfiguration$ = DeleteBucketMetadataTableConfiguration$; + exports.DeleteBucketMetadataTableConfigurationCommand = DeleteBucketMetadataTableConfigurationCommand; + exports.DeleteBucketMetadataTableConfigurationRequest$ = DeleteBucketMetadataTableConfigurationRequest$; + exports.DeleteBucketMetricsConfiguration$ = DeleteBucketMetricsConfiguration$; + exports.DeleteBucketMetricsConfigurationCommand = DeleteBucketMetricsConfigurationCommand; + exports.DeleteBucketMetricsConfigurationRequest$ = DeleteBucketMetricsConfigurationRequest$; + exports.DeleteBucketOwnershipControls$ = DeleteBucketOwnershipControls$; + exports.DeleteBucketOwnershipControlsCommand = DeleteBucketOwnershipControlsCommand; + exports.DeleteBucketOwnershipControlsRequest$ = DeleteBucketOwnershipControlsRequest$; + exports.DeleteBucketPolicy$ = DeleteBucketPolicy$; + exports.DeleteBucketPolicyCommand = DeleteBucketPolicyCommand; + exports.DeleteBucketPolicyRequest$ = DeleteBucketPolicyRequest$; + exports.DeleteBucketReplication$ = DeleteBucketReplication$; + exports.DeleteBucketReplicationCommand = DeleteBucketReplicationCommand; + exports.DeleteBucketReplicationRequest$ = DeleteBucketReplicationRequest$; + exports.DeleteBucketRequest$ = DeleteBucketRequest$; + exports.DeleteBucketTagging$ = DeleteBucketTagging$; + exports.DeleteBucketTaggingCommand = DeleteBucketTaggingCommand; + exports.DeleteBucketTaggingRequest$ = DeleteBucketTaggingRequest$; + exports.DeleteBucketWebsite$ = DeleteBucketWebsite$; + exports.DeleteBucketWebsiteCommand = DeleteBucketWebsiteCommand; + exports.DeleteBucketWebsiteRequest$ = DeleteBucketWebsiteRequest$; + exports.DeleteMarkerEntry$ = DeleteMarkerEntry$; + exports.DeleteMarkerReplication$ = DeleteMarkerReplication$; + exports.DeleteMarkerReplicationStatus = DeleteMarkerReplicationStatus; + exports.DeleteObject$ = DeleteObject$; + exports.DeleteObjectAnnotation$ = DeleteObjectAnnotation$; + exports.DeleteObjectAnnotationCommand = DeleteObjectAnnotationCommand; + exports.DeleteObjectAnnotationOutput$ = DeleteObjectAnnotationOutput$; + exports.DeleteObjectAnnotationRequest$ = DeleteObjectAnnotationRequest$; + exports.DeleteObjectCommand = DeleteObjectCommand; + exports.DeleteObjectOutput$ = DeleteObjectOutput$; + exports.DeleteObjectRequest$ = DeleteObjectRequest$; + exports.DeleteObjectTagging$ = DeleteObjectTagging$; + exports.DeleteObjectTaggingCommand = DeleteObjectTaggingCommand; + exports.DeleteObjectTaggingOutput$ = DeleteObjectTaggingOutput$; + exports.DeleteObjectTaggingRequest$ = DeleteObjectTaggingRequest$; + exports.DeleteObjects$ = DeleteObjects$; + exports.DeleteObjectsCommand = DeleteObjectsCommand; + exports.DeleteObjectsOutput$ = DeleteObjectsOutput$; + exports.DeleteObjectsRequest$ = DeleteObjectsRequest$; + exports.DeletePublicAccessBlock$ = DeletePublicAccessBlock$; + exports.DeletePublicAccessBlockCommand = DeletePublicAccessBlockCommand; + exports.DeletePublicAccessBlockRequest$ = DeletePublicAccessBlockRequest$; + exports.DeletedObject$ = DeletedObject$; + exports.Destination$ = Destination$; + exports.DestinationResult$ = DestinationResult$; + exports.EncodingType = EncodingType; + exports.Encryption$ = Encryption$; + exports.EncryptionConfiguration$ = EncryptionConfiguration$; + exports.EncryptionType = EncryptionType; + exports.EncryptionTypeMismatch = EncryptionTypeMismatch; + exports.EncryptionTypeMismatch$ = EncryptionTypeMismatch$; + exports.EndEvent$ = EndEvent$; + exports.ErrorDetails$ = ErrorDetails$; + exports.ErrorDocument$ = ErrorDocument$; + exports.Event = Event; + exports.EventBridgeConfiguration$ = EventBridgeConfiguration$; + exports.ExistingObjectReplication$ = ExistingObjectReplication$; + exports.ExistingObjectReplicationStatus = ExistingObjectReplicationStatus; + exports.ExpirationState = ExpirationState; + exports.ExpirationStatus = ExpirationStatus; + exports.ExpressionType = ExpressionType; + exports.FileHeaderInfo = FileHeaderInfo; + exports.FilterRule$ = FilterRule$; + exports.FilterRuleName = FilterRuleName; + exports.GetBucketAbac$ = GetBucketAbac$; + exports.GetBucketAbacCommand = GetBucketAbacCommand; + exports.GetBucketAbacOutput$ = GetBucketAbacOutput$; + exports.GetBucketAbacRequest$ = GetBucketAbacRequest$; + exports.GetBucketAccelerateConfiguration$ = GetBucketAccelerateConfiguration$; + exports.GetBucketAccelerateConfigurationCommand = GetBucketAccelerateConfigurationCommand; + exports.GetBucketAccelerateConfigurationOutput$ = GetBucketAccelerateConfigurationOutput$; + exports.GetBucketAccelerateConfigurationRequest$ = GetBucketAccelerateConfigurationRequest$; + exports.GetBucketAcl$ = GetBucketAcl$; + exports.GetBucketAclCommand = GetBucketAclCommand; + exports.GetBucketAclOutput$ = GetBucketAclOutput$; + exports.GetBucketAclRequest$ = GetBucketAclRequest$; + exports.GetBucketAnalyticsConfiguration$ = GetBucketAnalyticsConfiguration$; + exports.GetBucketAnalyticsConfigurationCommand = GetBucketAnalyticsConfigurationCommand; + exports.GetBucketAnalyticsConfigurationOutput$ = GetBucketAnalyticsConfigurationOutput$; + exports.GetBucketAnalyticsConfigurationRequest$ = GetBucketAnalyticsConfigurationRequest$; + exports.GetBucketCors$ = GetBucketCors$; + exports.GetBucketCorsCommand = GetBucketCorsCommand; + exports.GetBucketCorsOutput$ = GetBucketCorsOutput$; + exports.GetBucketCorsRequest$ = GetBucketCorsRequest$; + exports.GetBucketEncryption$ = GetBucketEncryption$; + exports.GetBucketEncryptionCommand = GetBucketEncryptionCommand; + exports.GetBucketEncryptionOutput$ = GetBucketEncryptionOutput$; + exports.GetBucketEncryptionRequest$ = GetBucketEncryptionRequest$; + exports.GetBucketIntelligentTieringConfiguration$ = GetBucketIntelligentTieringConfiguration$; + exports.GetBucketIntelligentTieringConfigurationCommand = GetBucketIntelligentTieringConfigurationCommand; + exports.GetBucketIntelligentTieringConfigurationOutput$ = GetBucketIntelligentTieringConfigurationOutput$; + exports.GetBucketIntelligentTieringConfigurationRequest$ = GetBucketIntelligentTieringConfigurationRequest$; + exports.GetBucketInventoryConfiguration$ = GetBucketInventoryConfiguration$; + exports.GetBucketInventoryConfigurationCommand = GetBucketInventoryConfigurationCommand; + exports.GetBucketInventoryConfigurationOutput$ = GetBucketInventoryConfigurationOutput$; + exports.GetBucketInventoryConfigurationRequest$ = GetBucketInventoryConfigurationRequest$; + exports.GetBucketLifecycleConfiguration$ = GetBucketLifecycleConfiguration$; + exports.GetBucketLifecycleConfigurationCommand = GetBucketLifecycleConfigurationCommand; + exports.GetBucketLifecycleConfigurationOutput$ = GetBucketLifecycleConfigurationOutput$; + exports.GetBucketLifecycleConfigurationRequest$ = GetBucketLifecycleConfigurationRequest$; + exports.GetBucketLocation$ = GetBucketLocation$; + exports.GetBucketLocationCommand = GetBucketLocationCommand; + exports.GetBucketLocationOutput$ = GetBucketLocationOutput$; + exports.GetBucketLocationRequest$ = GetBucketLocationRequest$; + exports.GetBucketLogging$ = GetBucketLogging$; + exports.GetBucketLoggingCommand = GetBucketLoggingCommand; + exports.GetBucketLoggingOutput$ = GetBucketLoggingOutput$; + exports.GetBucketLoggingRequest$ = GetBucketLoggingRequest$; + exports.GetBucketMetadataConfiguration$ = GetBucketMetadataConfiguration$; + exports.GetBucketMetadataConfigurationCommand = GetBucketMetadataConfigurationCommand; + exports.GetBucketMetadataConfigurationOutput$ = GetBucketMetadataConfigurationOutput$; + exports.GetBucketMetadataConfigurationRequest$ = GetBucketMetadataConfigurationRequest$; + exports.GetBucketMetadataConfigurationResult$ = GetBucketMetadataConfigurationResult$; + exports.GetBucketMetadataTableConfiguration$ = GetBucketMetadataTableConfiguration$; + exports.GetBucketMetadataTableConfigurationCommand = GetBucketMetadataTableConfigurationCommand; + exports.GetBucketMetadataTableConfigurationOutput$ = GetBucketMetadataTableConfigurationOutput$; + exports.GetBucketMetadataTableConfigurationRequest$ = GetBucketMetadataTableConfigurationRequest$; + exports.GetBucketMetadataTableConfigurationResult$ = GetBucketMetadataTableConfigurationResult$; + exports.GetBucketMetricsConfiguration$ = GetBucketMetricsConfiguration$; + exports.GetBucketMetricsConfigurationCommand = GetBucketMetricsConfigurationCommand; + exports.GetBucketMetricsConfigurationOutput$ = GetBucketMetricsConfigurationOutput$; + exports.GetBucketMetricsConfigurationRequest$ = GetBucketMetricsConfigurationRequest$; + exports.GetBucketNotificationConfiguration$ = GetBucketNotificationConfiguration$; + exports.GetBucketNotificationConfigurationCommand = GetBucketNotificationConfigurationCommand; + exports.GetBucketNotificationConfigurationRequest$ = GetBucketNotificationConfigurationRequest$; + exports.GetBucketOwnershipControls$ = GetBucketOwnershipControls$; + exports.GetBucketOwnershipControlsCommand = GetBucketOwnershipControlsCommand; + exports.GetBucketOwnershipControlsOutput$ = GetBucketOwnershipControlsOutput$; + exports.GetBucketOwnershipControlsRequest$ = GetBucketOwnershipControlsRequest$; + exports.GetBucketPolicy$ = GetBucketPolicy$; + exports.GetBucketPolicyCommand = GetBucketPolicyCommand; + exports.GetBucketPolicyOutput$ = GetBucketPolicyOutput$; + exports.GetBucketPolicyRequest$ = GetBucketPolicyRequest$; + exports.GetBucketPolicyStatus$ = GetBucketPolicyStatus$; + exports.GetBucketPolicyStatusCommand = GetBucketPolicyStatusCommand; + exports.GetBucketPolicyStatusOutput$ = GetBucketPolicyStatusOutput$; + exports.GetBucketPolicyStatusRequest$ = GetBucketPolicyStatusRequest$; + exports.GetBucketReplication$ = GetBucketReplication$; + exports.GetBucketReplicationCommand = GetBucketReplicationCommand; + exports.GetBucketReplicationOutput$ = GetBucketReplicationOutput$; + exports.GetBucketReplicationRequest$ = GetBucketReplicationRequest$; + exports.GetBucketRequestPayment$ = GetBucketRequestPayment$; + exports.GetBucketRequestPaymentCommand = GetBucketRequestPaymentCommand; + exports.GetBucketRequestPaymentOutput$ = GetBucketRequestPaymentOutput$; + exports.GetBucketRequestPaymentRequest$ = GetBucketRequestPaymentRequest$; + exports.GetBucketTagging$ = GetBucketTagging$; + exports.GetBucketTaggingCommand = GetBucketTaggingCommand; + exports.GetBucketTaggingOutput$ = GetBucketTaggingOutput$; + exports.GetBucketTaggingRequest$ = GetBucketTaggingRequest$; + exports.GetBucketVersioning$ = GetBucketVersioning$; + exports.GetBucketVersioningCommand = GetBucketVersioningCommand; + exports.GetBucketVersioningOutput$ = GetBucketVersioningOutput$; + exports.GetBucketVersioningRequest$ = GetBucketVersioningRequest$; + exports.GetBucketWebsite$ = GetBucketWebsite$; + exports.GetBucketWebsiteCommand = GetBucketWebsiteCommand; + exports.GetBucketWebsiteOutput$ = GetBucketWebsiteOutput$; + exports.GetBucketWebsiteRequest$ = GetBucketWebsiteRequest$; + exports.GetObject$ = GetObject$; + exports.GetObjectAcl$ = GetObjectAcl$; + exports.GetObjectAclCommand = GetObjectAclCommand; + exports.GetObjectAclOutput$ = GetObjectAclOutput$; + exports.GetObjectAclRequest$ = GetObjectAclRequest$; + exports.GetObjectAnnotation$ = GetObjectAnnotation$; + exports.GetObjectAnnotationCommand = GetObjectAnnotationCommand; + exports.GetObjectAnnotationOutput$ = GetObjectAnnotationOutput$; + exports.GetObjectAnnotationRequest$ = GetObjectAnnotationRequest$; + exports.GetObjectAttributes$ = GetObjectAttributes$; + exports.GetObjectAttributesCommand = GetObjectAttributesCommand; + exports.GetObjectAttributesOutput$ = GetObjectAttributesOutput$; + exports.GetObjectAttributesParts$ = GetObjectAttributesParts$; + exports.GetObjectAttributesRequest$ = GetObjectAttributesRequest$; + exports.GetObjectCommand = GetObjectCommand; + exports.GetObjectLegalHold$ = GetObjectLegalHold$; + exports.GetObjectLegalHoldCommand = GetObjectLegalHoldCommand; + exports.GetObjectLegalHoldOutput$ = GetObjectLegalHoldOutput$; + exports.GetObjectLegalHoldRequest$ = GetObjectLegalHoldRequest$; + exports.GetObjectLockConfiguration$ = GetObjectLockConfiguration$; + exports.GetObjectLockConfigurationCommand = GetObjectLockConfigurationCommand; + exports.GetObjectLockConfigurationOutput$ = GetObjectLockConfigurationOutput$; + exports.GetObjectLockConfigurationRequest$ = GetObjectLockConfigurationRequest$; + exports.GetObjectOutput$ = GetObjectOutput$; + exports.GetObjectRequest$ = GetObjectRequest$; + exports.GetObjectRetention$ = GetObjectRetention$; + exports.GetObjectRetentionCommand = GetObjectRetentionCommand; + exports.GetObjectRetentionOutput$ = GetObjectRetentionOutput$; + exports.GetObjectRetentionRequest$ = GetObjectRetentionRequest$; + exports.GetObjectTagging$ = GetObjectTagging$; + exports.GetObjectTaggingCommand = GetObjectTaggingCommand; + exports.GetObjectTaggingOutput$ = GetObjectTaggingOutput$; + exports.GetObjectTaggingRequest$ = GetObjectTaggingRequest$; + exports.GetObjectTorrent$ = GetObjectTorrent$; + exports.GetObjectTorrentCommand = GetObjectTorrentCommand; + exports.GetObjectTorrentOutput$ = GetObjectTorrentOutput$; + exports.GetObjectTorrentRequest$ = GetObjectTorrentRequest$; + exports.GetPublicAccessBlock$ = GetPublicAccessBlock$; + exports.GetPublicAccessBlockCommand = GetPublicAccessBlockCommand; + exports.GetPublicAccessBlockOutput$ = GetPublicAccessBlockOutput$; + exports.GetPublicAccessBlockRequest$ = GetPublicAccessBlockRequest$; + exports.GlacierJobParameters$ = GlacierJobParameters$; + exports.Grant$ = Grant$; + exports.Grantee$ = Grantee$; + exports.HeadBucket$ = HeadBucket$; + exports.HeadBucketCommand = HeadBucketCommand; + exports.HeadBucketOutput$ = HeadBucketOutput$; + exports.HeadBucketRequest$ = HeadBucketRequest$; + exports.HeadObject$ = HeadObject$; + exports.HeadObjectCommand = HeadObjectCommand; + exports.HeadObjectOutput$ = HeadObjectOutput$; + exports.HeadObjectRequest$ = HeadObjectRequest$; + exports.IdempotencyParameterMismatch = IdempotencyParameterMismatch; + exports.IdempotencyParameterMismatch$ = IdempotencyParameterMismatch$; + exports.IndexDocument$ = IndexDocument$; + exports.Initiator$ = Initiator$; + exports.InputSerialization$ = InputSerialization$; + exports.IntelligentTieringAccessTier = IntelligentTieringAccessTier; + exports.IntelligentTieringAndOperator$ = IntelligentTieringAndOperator$; + exports.IntelligentTieringConfiguration$ = IntelligentTieringConfiguration$; + exports.IntelligentTieringFilter$ = IntelligentTieringFilter$; + exports.IntelligentTieringStatus = IntelligentTieringStatus; + exports.InvalidAnnotationName = InvalidAnnotationName; + exports.InvalidAnnotationName$ = InvalidAnnotationName$; + exports.InvalidObjectState = InvalidObjectState; + exports.InvalidObjectState$ = InvalidObjectState$; + exports.InvalidPrefix = InvalidPrefix; + exports.InvalidPrefix$ = InvalidPrefix$; + exports.InvalidRequest = InvalidRequest; + exports.InvalidRequest$ = InvalidRequest$; + exports.InvalidWriteOffset = InvalidWriteOffset; + exports.InvalidWriteOffset$ = InvalidWriteOffset$; + exports.InventoryConfiguration$ = InventoryConfiguration$; + exports.InventoryConfigurationState = InventoryConfigurationState; + exports.InventoryDestination$ = InventoryDestination$; + exports.InventoryEncryption$ = InventoryEncryption$; + exports.InventoryFilter$ = InventoryFilter$; + exports.InventoryFormat = InventoryFormat; + exports.InventoryFrequency = InventoryFrequency; + exports.InventoryIncludedObjectVersions = InventoryIncludedObjectVersions; + exports.InventoryOptionalField = InventoryOptionalField; + exports.InventoryS3BucketDestination$ = InventoryS3BucketDestination$; + exports.InventorySchedule$ = InventorySchedule$; + exports.InventoryTableConfiguration$ = InventoryTableConfiguration$; + exports.InventoryTableConfigurationResult$ = InventoryTableConfigurationResult$; + exports.InventoryTableConfigurationUpdates$ = InventoryTableConfigurationUpdates$; + exports.JSONInput$ = JSONInput$; + exports.JSONOutput$ = JSONOutput$; + exports.JSONType = JSONType; + exports.JournalTableConfiguration$ = JournalTableConfiguration$; + exports.JournalTableConfigurationResult$ = JournalTableConfigurationResult$; + exports.JournalTableConfigurationUpdates$ = JournalTableConfigurationUpdates$; + exports.LambdaFunctionConfiguration$ = LambdaFunctionConfiguration$; + exports.LifecycleExpiration$ = LifecycleExpiration$; + exports.LifecycleRule$ = LifecycleRule$; + exports.LifecycleRuleAndOperator$ = LifecycleRuleAndOperator$; + exports.LifecycleRuleFilter$ = LifecycleRuleFilter$; + exports.ListBucketAnalyticsConfigurations$ = ListBucketAnalyticsConfigurations$; + exports.ListBucketAnalyticsConfigurationsCommand = ListBucketAnalyticsConfigurationsCommand; + exports.ListBucketAnalyticsConfigurationsOutput$ = ListBucketAnalyticsConfigurationsOutput$; + exports.ListBucketAnalyticsConfigurationsRequest$ = ListBucketAnalyticsConfigurationsRequest$; + exports.ListBucketIntelligentTieringConfigurations$ = ListBucketIntelligentTieringConfigurations$; + exports.ListBucketIntelligentTieringConfigurationsCommand = ListBucketIntelligentTieringConfigurationsCommand; + exports.ListBucketIntelligentTieringConfigurationsOutput$ = ListBucketIntelligentTieringConfigurationsOutput$; + exports.ListBucketIntelligentTieringConfigurationsRequest$ = ListBucketIntelligentTieringConfigurationsRequest$; + exports.ListBucketInventoryConfigurations$ = ListBucketInventoryConfigurations$; + exports.ListBucketInventoryConfigurationsCommand = ListBucketInventoryConfigurationsCommand; + exports.ListBucketInventoryConfigurationsOutput$ = ListBucketInventoryConfigurationsOutput$; + exports.ListBucketInventoryConfigurationsRequest$ = ListBucketInventoryConfigurationsRequest$; + exports.ListBucketMetricsConfigurations$ = ListBucketMetricsConfigurations$; + exports.ListBucketMetricsConfigurationsCommand = ListBucketMetricsConfigurationsCommand; + exports.ListBucketMetricsConfigurationsOutput$ = ListBucketMetricsConfigurationsOutput$; + exports.ListBucketMetricsConfigurationsRequest$ = ListBucketMetricsConfigurationsRequest$; + exports.ListBuckets$ = ListBuckets$; + exports.ListBucketsCommand = ListBucketsCommand; + exports.ListBucketsOutput$ = ListBucketsOutput$; + exports.ListBucketsRequest$ = ListBucketsRequest$; + exports.ListDirectoryBuckets$ = ListDirectoryBuckets$; + exports.ListDirectoryBucketsCommand = ListDirectoryBucketsCommand; + exports.ListDirectoryBucketsOutput$ = ListDirectoryBucketsOutput$; + exports.ListDirectoryBucketsRequest$ = ListDirectoryBucketsRequest$; + exports.ListMultipartUploads$ = ListMultipartUploads$; + exports.ListMultipartUploadsCommand = ListMultipartUploadsCommand; + exports.ListMultipartUploadsOutput$ = ListMultipartUploadsOutput$; + exports.ListMultipartUploadsRequest$ = ListMultipartUploadsRequest$; + exports.ListObjectAnnotations$ = ListObjectAnnotations$; + exports.ListObjectAnnotationsCommand = ListObjectAnnotationsCommand; + exports.ListObjectAnnotationsOutput$ = ListObjectAnnotationsOutput$; + exports.ListObjectAnnotationsRequest$ = ListObjectAnnotationsRequest$; + exports.ListObjectVersions$ = ListObjectVersions$; + exports.ListObjectVersionsCommand = ListObjectVersionsCommand; + exports.ListObjectVersionsOutput$ = ListObjectVersionsOutput$; + exports.ListObjectVersionsRequest$ = ListObjectVersionsRequest$; + exports.ListObjects$ = ListObjects$; + exports.ListObjectsCommand = ListObjectsCommand; + exports.ListObjectsOutput$ = ListObjectsOutput$; + exports.ListObjectsRequest$ = ListObjectsRequest$; + exports.ListObjectsV2$ = ListObjectsV2$; + exports.ListObjectsV2Command = ListObjectsV2Command; + exports.ListObjectsV2Output$ = ListObjectsV2Output$; + exports.ListObjectsV2Request$ = ListObjectsV2Request$; + exports.ListParts$ = ListParts$; + exports.ListPartsCommand = ListPartsCommand; + exports.ListPartsOutput$ = ListPartsOutput$; + exports.ListPartsRequest$ = ListPartsRequest$; + exports.LocationInfo$ = LocationInfo$; + exports.LocationType = LocationType; + exports.LoggingEnabled$ = LoggingEnabled$; + exports.MFADelete = MFADelete; + exports.MFADeleteStatus = MFADeleteStatus; + exports.MetadataConfiguration$ = MetadataConfiguration$; + exports.MetadataConfigurationResult$ = MetadataConfigurationResult$; + exports.MetadataDirective = MetadataDirective; + exports.MetadataEntry$ = MetadataEntry$; + exports.MetadataTableConfiguration$ = MetadataTableConfiguration$; + exports.MetadataTableConfigurationResult$ = MetadataTableConfigurationResult$; + exports.MetadataTableEncryptionConfiguration$ = MetadataTableEncryptionConfiguration$; + exports.Metrics$ = Metrics$; + exports.MetricsAndOperator$ = MetricsAndOperator$; + exports.MetricsConfiguration$ = MetricsConfiguration$; + exports.MetricsFilter$ = MetricsFilter$; + exports.MetricsStatus = MetricsStatus; + exports.MultipartUpload$ = MultipartUpload$; + exports.NoSuchAnnotation = NoSuchAnnotation; + exports.NoSuchAnnotation$ = NoSuchAnnotation$; + exports.NoSuchBucket = NoSuchBucket; + exports.NoSuchBucket$ = NoSuchBucket$; + exports.NoSuchKey = NoSuchKey; + exports.NoSuchKey$ = NoSuchKey$; + exports.NoSuchUpload = NoSuchUpload; + exports.NoSuchUpload$ = NoSuchUpload$; + exports.NoncurrentVersionExpiration$ = NoncurrentVersionExpiration$; + exports.NoncurrentVersionTransition$ = NoncurrentVersionTransition$; + exports.NotFound = NotFound; + exports.NotFound$ = NotFound$; + exports.NotificationConfiguration$ = NotificationConfiguration$; + exports.NotificationConfigurationFilter$ = NotificationConfigurationFilter$; + exports.ObjectAlreadyInActiveTierError = ObjectAlreadyInActiveTierError; + exports.ObjectAlreadyInActiveTierError$ = ObjectAlreadyInActiveTierError$; + exports.ObjectAttributes = ObjectAttributes; + exports.ObjectCannedACL = ObjectCannedACL; + exports.ObjectEncryption$ = ObjectEncryption$; + exports.ObjectIdentifier$ = ObjectIdentifier$; + exports.ObjectLockConfiguration$ = ObjectLockConfiguration$; + exports.ObjectLockEnabled = ObjectLockEnabled; + exports.ObjectLockLegalHold$ = ObjectLockLegalHold$; + exports.ObjectLockLegalHoldStatus = ObjectLockLegalHoldStatus; + exports.ObjectLockMode = ObjectLockMode; + exports.ObjectLockRetention$ = ObjectLockRetention$; + exports.ObjectLockRetentionMode = ObjectLockRetentionMode; + exports.ObjectLockRule$ = ObjectLockRule$; + exports.ObjectNotInActiveTierError = ObjectNotInActiveTierError; + exports.ObjectNotInActiveTierError$ = ObjectNotInActiveTierError$; + exports.ObjectOwnership = ObjectOwnership; + exports.ObjectPart$ = ObjectPart$; + exports.ObjectStorageClass = ObjectStorageClass; + exports.ObjectVersion$ = ObjectVersion$; + exports.ObjectVersionStorageClass = ObjectVersionStorageClass; + exports.OptionalObjectAttributes = OptionalObjectAttributes; + exports.OutputLocation$ = OutputLocation$; + exports.OutputSerialization$ = OutputSerialization$; + exports.Owner$ = Owner$; + exports.OwnerOverride = OwnerOverride; + exports.OwnershipControls$ = OwnershipControls$; + exports.OwnershipControlsRule$ = OwnershipControlsRule$; + exports.ParquetInput$ = ParquetInput$; + exports.Part$ = Part$; + exports.PartitionDateSource = PartitionDateSource; + exports.PartitionedPrefix$ = PartitionedPrefix$; + exports.Payer = Payer; + exports.Permission = Permission; + exports.PolicyStatus$ = PolicyStatus$; + exports.Progress$ = Progress$; + exports.ProgressEvent$ = ProgressEvent$; + exports.Protocol = Protocol; + exports.PublicAccessBlockConfiguration$ = PublicAccessBlockConfiguration$; + exports.PutBucketAbac$ = PutBucketAbac$; + exports.PutBucketAbacCommand = PutBucketAbacCommand; + exports.PutBucketAbacRequest$ = PutBucketAbacRequest$; + exports.PutBucketAccelerateConfiguration$ = PutBucketAccelerateConfiguration$; + exports.PutBucketAccelerateConfigurationCommand = PutBucketAccelerateConfigurationCommand; + exports.PutBucketAccelerateConfigurationRequest$ = PutBucketAccelerateConfigurationRequest$; + exports.PutBucketAcl$ = PutBucketAcl$; + exports.PutBucketAclCommand = PutBucketAclCommand; + exports.PutBucketAclRequest$ = PutBucketAclRequest$; + exports.PutBucketAnalyticsConfiguration$ = PutBucketAnalyticsConfiguration$; + exports.PutBucketAnalyticsConfigurationCommand = PutBucketAnalyticsConfigurationCommand; + exports.PutBucketAnalyticsConfigurationRequest$ = PutBucketAnalyticsConfigurationRequest$; + exports.PutBucketCors$ = PutBucketCors$; + exports.PutBucketCorsCommand = PutBucketCorsCommand; + exports.PutBucketCorsRequest$ = PutBucketCorsRequest$; + exports.PutBucketEncryption$ = PutBucketEncryption$; + exports.PutBucketEncryptionCommand = PutBucketEncryptionCommand; + exports.PutBucketEncryptionRequest$ = PutBucketEncryptionRequest$; + exports.PutBucketIntelligentTieringConfiguration$ = PutBucketIntelligentTieringConfiguration$; + exports.PutBucketIntelligentTieringConfigurationCommand = PutBucketIntelligentTieringConfigurationCommand; + exports.PutBucketIntelligentTieringConfigurationRequest$ = PutBucketIntelligentTieringConfigurationRequest$; + exports.PutBucketInventoryConfiguration$ = PutBucketInventoryConfiguration$; + exports.PutBucketInventoryConfigurationCommand = PutBucketInventoryConfigurationCommand; + exports.PutBucketInventoryConfigurationRequest$ = PutBucketInventoryConfigurationRequest$; + exports.PutBucketLifecycleConfiguration$ = PutBucketLifecycleConfiguration$; + exports.PutBucketLifecycleConfigurationCommand = PutBucketLifecycleConfigurationCommand; + exports.PutBucketLifecycleConfigurationOutput$ = PutBucketLifecycleConfigurationOutput$; + exports.PutBucketLifecycleConfigurationRequest$ = PutBucketLifecycleConfigurationRequest$; + exports.PutBucketLogging$ = PutBucketLogging$; + exports.PutBucketLoggingCommand = PutBucketLoggingCommand; + exports.PutBucketLoggingRequest$ = PutBucketLoggingRequest$; + exports.PutBucketMetricsConfiguration$ = PutBucketMetricsConfiguration$; + exports.PutBucketMetricsConfigurationCommand = PutBucketMetricsConfigurationCommand; + exports.PutBucketMetricsConfigurationRequest$ = PutBucketMetricsConfigurationRequest$; + exports.PutBucketNotificationConfiguration$ = PutBucketNotificationConfiguration$; + exports.PutBucketNotificationConfigurationCommand = PutBucketNotificationConfigurationCommand; + exports.PutBucketNotificationConfigurationRequest$ = PutBucketNotificationConfigurationRequest$; + exports.PutBucketOwnershipControls$ = PutBucketOwnershipControls$; + exports.PutBucketOwnershipControlsCommand = PutBucketOwnershipControlsCommand; + exports.PutBucketOwnershipControlsRequest$ = PutBucketOwnershipControlsRequest$; + exports.PutBucketPolicy$ = PutBucketPolicy$; + exports.PutBucketPolicyCommand = PutBucketPolicyCommand; + exports.PutBucketPolicyRequest$ = PutBucketPolicyRequest$; + exports.PutBucketReplication$ = PutBucketReplication$; + exports.PutBucketReplicationCommand = PutBucketReplicationCommand; + exports.PutBucketReplicationRequest$ = PutBucketReplicationRequest$; + exports.PutBucketRequestPayment$ = PutBucketRequestPayment$; + exports.PutBucketRequestPaymentCommand = PutBucketRequestPaymentCommand; + exports.PutBucketRequestPaymentRequest$ = PutBucketRequestPaymentRequest$; + exports.PutBucketTagging$ = PutBucketTagging$; + exports.PutBucketTaggingCommand = PutBucketTaggingCommand; + exports.PutBucketTaggingRequest$ = PutBucketTaggingRequest$; + exports.PutBucketVersioning$ = PutBucketVersioning$; + exports.PutBucketVersioningCommand = PutBucketVersioningCommand; + exports.PutBucketVersioningRequest$ = PutBucketVersioningRequest$; + exports.PutBucketWebsite$ = PutBucketWebsite$; + exports.PutBucketWebsiteCommand = PutBucketWebsiteCommand; + exports.PutBucketWebsiteRequest$ = PutBucketWebsiteRequest$; + exports.PutObject$ = PutObject$; + exports.PutObjectAcl$ = PutObjectAcl$; + exports.PutObjectAclCommand = PutObjectAclCommand; + exports.PutObjectAclOutput$ = PutObjectAclOutput$; + exports.PutObjectAclRequest$ = PutObjectAclRequest$; + exports.PutObjectAnnotation$ = PutObjectAnnotation$; + exports.PutObjectAnnotationCommand = PutObjectAnnotationCommand; + exports.PutObjectAnnotationOutput$ = PutObjectAnnotationOutput$; + exports.PutObjectAnnotationRequest$ = PutObjectAnnotationRequest$; + exports.PutObjectCommand = PutObjectCommand; + exports.PutObjectLegalHold$ = PutObjectLegalHold$; + exports.PutObjectLegalHoldCommand = PutObjectLegalHoldCommand; + exports.PutObjectLegalHoldOutput$ = PutObjectLegalHoldOutput$; + exports.PutObjectLegalHoldRequest$ = PutObjectLegalHoldRequest$; + exports.PutObjectLockConfiguration$ = PutObjectLockConfiguration$; + exports.PutObjectLockConfigurationCommand = PutObjectLockConfigurationCommand; + exports.PutObjectLockConfigurationOutput$ = PutObjectLockConfigurationOutput$; + exports.PutObjectLockConfigurationRequest$ = PutObjectLockConfigurationRequest$; + exports.PutObjectOutput$ = PutObjectOutput$; + exports.PutObjectRequest$ = PutObjectRequest$; + exports.PutObjectRetention$ = PutObjectRetention$; + exports.PutObjectRetentionCommand = PutObjectRetentionCommand; + exports.PutObjectRetentionOutput$ = PutObjectRetentionOutput$; + exports.PutObjectRetentionRequest$ = PutObjectRetentionRequest$; + exports.PutObjectTagging$ = PutObjectTagging$; + exports.PutObjectTaggingCommand = PutObjectTaggingCommand; + exports.PutObjectTaggingOutput$ = PutObjectTaggingOutput$; + exports.PutObjectTaggingRequest$ = PutObjectTaggingRequest$; + exports.PutPublicAccessBlock$ = PutPublicAccessBlock$; + exports.PutPublicAccessBlockCommand = PutPublicAccessBlockCommand; + exports.PutPublicAccessBlockRequest$ = PutPublicAccessBlockRequest$; + exports.QueueConfiguration$ = QueueConfiguration$; + exports.QuoteFields = QuoteFields; + exports.RecordExpiration$ = RecordExpiration$; + exports.RecordsEvent$ = RecordsEvent$; + exports.Redirect$ = Redirect$; + exports.RedirectAllRequestsTo$ = RedirectAllRequestsTo$; + exports.RenameObject$ = RenameObject$; + exports.RenameObjectCommand = RenameObjectCommand; + exports.RenameObjectOutput$ = RenameObjectOutput$; + exports.RenameObjectRequest$ = RenameObjectRequest$; + exports.ReplicaModifications$ = ReplicaModifications$; + exports.ReplicaModificationsStatus = ReplicaModificationsStatus; + exports.ReplicationConfiguration$ = ReplicationConfiguration$; + exports.ReplicationRule$ = ReplicationRule$; + exports.ReplicationRuleAndOperator$ = ReplicationRuleAndOperator$; + exports.ReplicationRuleFilter$ = ReplicationRuleFilter$; + exports.ReplicationRuleStatus = ReplicationRuleStatus; + exports.ReplicationStatus = ReplicationStatus; + exports.ReplicationTime$ = ReplicationTime$; + exports.ReplicationTimeStatus = ReplicationTimeStatus; + exports.ReplicationTimeValue$ = ReplicationTimeValue$; + exports.RequestCharged = RequestCharged; + exports.RequestPayer = RequestPayer; + exports.RequestPaymentConfiguration$ = RequestPaymentConfiguration$; + exports.RequestProgress$ = RequestProgress$; + exports.RestoreObject$ = RestoreObject$; + exports.RestoreObjectCommand = RestoreObjectCommand; + exports.RestoreObjectOutput$ = RestoreObjectOutput$; + exports.RestoreObjectRequest$ = RestoreObjectRequest$; + exports.RestoreRequest$ = RestoreRequest$; + exports.RestoreRequestType = RestoreRequestType; + exports.RestoreStatus$ = RestoreStatus$; + exports.RoutingRule$ = RoutingRule$; + exports.S3 = S3; + exports.S3Client = S3Client; + exports.S3KeyFilter$ = S3KeyFilter$; + exports.S3Location$ = S3Location$; + exports.S3ServiceException = S3ServiceException; + exports.S3ServiceException$ = S3ServiceException$; + exports.S3TablesBucketType = S3TablesBucketType; + exports.S3TablesDestination$ = S3TablesDestination$; + exports.S3TablesDestinationResult$ = S3TablesDestinationResult$; + exports.SSEKMS$ = SSEKMS$; + exports.SSEKMSEncryption$ = SSEKMSEncryption$; + exports.SSES3$ = SSES3$; + exports.ScanRange$ = ScanRange$; + exports.SelectObjectContent$ = SelectObjectContent$; + exports.SelectObjectContentCommand = SelectObjectContentCommand; + exports.SelectObjectContentEventStream$ = SelectObjectContentEventStream$; + exports.SelectObjectContentOutput$ = SelectObjectContentOutput$; + exports.SelectObjectContentRequest$ = SelectObjectContentRequest$; + exports.SelectParameters$ = SelectParameters$; + exports.ServerSideEncryption = ServerSideEncryption; + exports.ServerSideEncryptionByDefault$ = ServerSideEncryptionByDefault$; + exports.ServerSideEncryptionConfiguration$ = ServerSideEncryptionConfiguration$; + exports.ServerSideEncryptionRule$ = ServerSideEncryptionRule$; + exports.SessionCredentials$ = SessionCredentials$; + exports.SessionMode = SessionMode; + exports.SimplePrefix$ = SimplePrefix$; + exports.SourceSelectionCriteria$ = SourceSelectionCriteria$; + exports.SseKmsEncryptedObjects$ = SseKmsEncryptedObjects$; + exports.SseKmsEncryptedObjectsStatus = SseKmsEncryptedObjectsStatus; + exports.Stats$ = Stats$; + exports.StatsEvent$ = StatsEvent$; + exports.StorageClass = StorageClass; + exports.StorageClassAnalysis$ = StorageClassAnalysis$; + exports.StorageClassAnalysisDataExport$ = StorageClassAnalysisDataExport$; + exports.StorageClassAnalysisSchemaVersion = StorageClassAnalysisSchemaVersion; + exports.TableSseAlgorithm = TableSseAlgorithm; + exports.Tag$ = Tag$; + exports.Tagging$ = Tagging$; + exports.TaggingDirective = TaggingDirective; + exports.TargetGrant$ = TargetGrant$; + exports.TargetObjectKeyFormat$ = TargetObjectKeyFormat$; + exports.Tier = Tier; + exports.Tiering$ = Tiering$; + exports.TooManyParts = TooManyParts; + exports.TooManyParts$ = TooManyParts$; + exports.TopicConfiguration$ = TopicConfiguration$; + exports.Transition$ = Transition$; + exports.TransitionDefaultMinimumObjectSize = TransitionDefaultMinimumObjectSize; + exports.TransitionStorageClass = TransitionStorageClass; + exports.Type = Type; + exports.UnsupportedMediaType = UnsupportedMediaType; + exports.UnsupportedMediaType$ = UnsupportedMediaType$; + exports.UpdateBucketMetadataAnnotationTableConfiguration$ = UpdateBucketMetadataAnnotationTableConfiguration$; + exports.UpdateBucketMetadataAnnotationTableConfigurationCommand = UpdateBucketMetadataAnnotationTableConfigurationCommand; + exports.UpdateBucketMetadataAnnotationTableConfigurationRequest$ = UpdateBucketMetadataAnnotationTableConfigurationRequest$; + exports.UpdateBucketMetadataInventoryTableConfiguration$ = UpdateBucketMetadataInventoryTableConfiguration$; + exports.UpdateBucketMetadataInventoryTableConfigurationCommand = UpdateBucketMetadataInventoryTableConfigurationCommand; + exports.UpdateBucketMetadataInventoryTableConfigurationRequest$ = UpdateBucketMetadataInventoryTableConfigurationRequest$; + exports.UpdateBucketMetadataJournalTableConfiguration$ = UpdateBucketMetadataJournalTableConfiguration$; + exports.UpdateBucketMetadataJournalTableConfigurationCommand = UpdateBucketMetadataJournalTableConfigurationCommand; + exports.UpdateBucketMetadataJournalTableConfigurationRequest$ = UpdateBucketMetadataJournalTableConfigurationRequest$; + exports.UpdateObjectEncryption$ = UpdateObjectEncryption$; + exports.UpdateObjectEncryptionCommand = UpdateObjectEncryptionCommand; + exports.UpdateObjectEncryptionRequest$ = UpdateObjectEncryptionRequest$; + exports.UpdateObjectEncryptionResponse$ = UpdateObjectEncryptionResponse$; + exports.UploadPart$ = UploadPart$; + exports.UploadPartCommand = UploadPartCommand; + exports.UploadPartCopy$ = UploadPartCopy$; + exports.UploadPartCopyCommand = UploadPartCopyCommand; + exports.UploadPartCopyOutput$ = UploadPartCopyOutput$; + exports.UploadPartCopyRequest$ = UploadPartCopyRequest$; + exports.UploadPartOutput$ = UploadPartOutput$; + exports.UploadPartRequest$ = UploadPartRequest$; + exports.VersioningConfiguration$ = VersioningConfiguration$; + exports.WebsiteConfiguration$ = WebsiteConfiguration$; + exports.WriteGetObjectResponse$ = WriteGetObjectResponse$; + exports.WriteGetObjectResponseCommand = WriteGetObjectResponseCommand; + exports.WriteGetObjectResponseRequest$ = WriteGetObjectResponseRequest$; + exports._Error$ = _Error$; + exports._Object$ = _Object$; + exports.errorTypeRegistries = errorTypeRegistries; + exports.paginateListBuckets = paginateListBuckets; + exports.paginateListDirectoryBuckets = paginateListDirectoryBuckets; + exports.paginateListObjectAnnotations = paginateListObjectAnnotations; + exports.paginateListObjectsV2 = paginateListObjectsV2; + exports.paginateListParts = paginateListParts; + exports.waitForBucketExists = waitForBucketExists; + exports.waitForBucketNotExists = waitForBucketNotExists; + exports.waitForObjectExists = waitForObjectExists; + exports.waitForObjectNotExists = waitForObjectNotExists; + exports.waitUntilBucketExists = waitUntilBucketExists; + exports.waitUntilBucketNotExists = waitUntilBucketNotExists; + exports.waitUntilObjectExists = waitUntilObjectExists; + exports.waitUntilObjectNotExists = waitUntilObjectNotExists; +}); + +// trigger-deployment-pipeline/src/main.ts +import { execFileSync } from "node:child_process"; +import { existsSync, readFileSync } from "node:fs"; +import { hostname, userInfo } from "node:os"; +import { parseArgs } from "node:util"; + +// lib/actions.ts +var runningInActions = () => process.env["GITHUB_ACTIONS"] === "true"; +function fail(message) { + process.stderr.write(`${message} +`); + process.exit(1); +} +var requireEnv = (name) => process.env[name] ?? fail(`Environment variable '${name}' is not set`); + +// lib/aws.ts +var import_client_s3 = __toESM(require_dist_cjs17(), 1); + +// node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +var { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client2(); +var { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require_dist_cjs2(); +var { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createWaiter, checkExceptions, WaiterState, createAggregatedClient } = require_client(); +var { Command: $Command } = require_client(); +var { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require_config(); +var { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require_endpoints(); +var { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require_protocols(); +var { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require_retry(); +var { TypeRegistry, getSchemaSerdePlugin } = require_schema(); +var { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require_httpAuthSchemes(); +var { defaultProvider } = require_dist_cjs16(); +var { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require_serde(); +var { streamCollector, NodeHttpHandler } = require_dist_cjs8(); +var { AwsJson1_1Protocol } = require_protocols2(); +var { Sha256 } = require_checksum(); +var defaultSSMHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: getSmithyContext(context).operation, + region: await normalizeProvider(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; +}; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "ssm", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; +} +var defaultSSMHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = resolveAwsSdkSigV4Config(config); + return Object.assign(config_0, { + authSchemePreference: normalizeProvider(config.authSchemePreference ?? []) + }); +}; +var resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "ssm" + }); +}; +var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } +}; +var version = "3.1126.0"; +var packageInfo = { + version +}; +var k = "ref"; +var a = -1; +var b = true; +var c = "isSet"; +var d = "PartitionResult"; +var e = "booleanEquals"; +var f = "getAttr"; +var g = { [k]: "Endpoint" }; +var h = { [k]: d }; +var i = {}; +var j = [{ [k]: "Region" }]; +var _data = { + conditions: [ + [c, [g]], + [c, j], + ["aws.partition", j, d], + [e, [{ [k]: "UseFIPS" }, b]], + [e, [{ [k]: "UseDualStack" }, b]], + [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]], + [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]], + ["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws-us-gov"]] + ], + results: [ + [a], + [a, "Invalid Configuration: FIPS and custom endpoint are not supported"], + [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"], + [g, i], + ["https://ssm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i], + [a, "FIPS and DualStack are enabled, but this partition does not support one or both"], + ["https://ssm.{Region}.amazonaws.com", i], + ["https://ssm-fips.{Region}.{PartitionResult#dnsSuffix}", i], + [a, "FIPS is enabled but this partition does not support FIPS"], + ["https://ssm.{Region}.{PartitionResult#dualStackDnsSuffix}", i], + [a, "DualStack is enabled but this partition does not support DualStack"], + ["https://ssm.{Region}.{PartitionResult#dnsSuffix}", i], + [a, "Invalid Configuration: Missing Region"] + ] +}; +var root = 2; +var r = 1e8; +var nodes = new Int32Array([ + -1, + 1, + -1, + 0, + 13, + 3, + 1, + 4, + r + 12, + 2, + 5, + r + 12, + 3, + 8, + 6, + 4, + 7, + r + 11, + 5, + r + 9, + r + 10, + 4, + 11, + 9, + 6, + 10, + r + 8, + 7, + r + 6, + r + 7, + 5, + 12, + r + 5, + 6, + r + 4, + r + 5, + 3, + r + 1, + 14, + 4, + r + 2, + r + 3 +]); +var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results); +var cache = new EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"] +}); +var defaultEndpointResolver = (endpointParams, context = {}) => { + return cache.get(endpointParams, () => decideEndpoint(bdd, { + endpointParams, + logger: context.logger + })); +}; +customEndpointFunctions.aws = awsEndpointFunctions; + +class SSMServiceException extends ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, SSMServiceException.prototype); + } +} + +class AccessDeniedException extends SSMServiceException { + name = "AccessDeniedException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + this.Message = opts.Message; + } +} + +class InternalServerError extends SSMServiceException { + name = "InternalServerError"; + $fault = "server"; + Message; + constructor(opts) { + super({ + name: "InternalServerError", + $fault: "server", + ...opts + }); + Object.setPrototypeOf(this, InternalServerError.prototype); + this.Message = opts.Message; + } +} + +class InvalidResourceId extends SSMServiceException { + name = "InvalidResourceId"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidResourceId", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidResourceId.prototype); + } +} + +class InvalidResourceType extends SSMServiceException { + name = "InvalidResourceType"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidResourceType", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidResourceType.prototype); + } +} + +class TooManyTagsError extends SSMServiceException { + name = "TooManyTagsError"; + $fault = "client"; + constructor(opts) { + super({ + name: "TooManyTagsError", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, TooManyTagsError.prototype); + } +} + +class TooManyUpdates extends SSMServiceException { + name = "TooManyUpdates"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "TooManyUpdates", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, TooManyUpdates.prototype); + this.Message = opts.Message; + } +} + +class AlreadyExistsException extends SSMServiceException { + name = "AlreadyExistsException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "AlreadyExistsException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AlreadyExistsException.prototype); + this.Message = opts.Message; + } +} + +class OpsItemConflictException extends SSMServiceException { + name = "OpsItemConflictException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "OpsItemConflictException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsItemConflictException.prototype); + this.Message = opts.Message; + } +} + +class OpsItemInvalidParameterException extends SSMServiceException { + name = "OpsItemInvalidParameterException"; + $fault = "client"; + ParameterNames; + Message; + constructor(opts) { + super({ + name: "OpsItemInvalidParameterException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsItemInvalidParameterException.prototype); + this.ParameterNames = opts.ParameterNames; + this.Message = opts.Message; + } +} + +class OpsItemLimitExceededException extends SSMServiceException { + name = "OpsItemLimitExceededException"; + $fault = "client"; + ResourceTypes; + Limit; + LimitType; + Message; + constructor(opts) { + super({ + name: "OpsItemLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsItemLimitExceededException.prototype); + this.ResourceTypes = opts.ResourceTypes; + this.Limit = opts.Limit; + this.LimitType = opts.LimitType; + this.Message = opts.Message; + } +} + +class OpsItemNotFoundException extends SSMServiceException { + name = "OpsItemNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "OpsItemNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsItemNotFoundException.prototype); + this.Message = opts.Message; + } +} + +class OpsItemRelatedItemAlreadyExistsException extends SSMServiceException { + name = "OpsItemRelatedItemAlreadyExistsException"; + $fault = "client"; + Message; + ResourceUri; + OpsItemId; + constructor(opts) { + super({ + name: "OpsItemRelatedItemAlreadyExistsException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsItemRelatedItemAlreadyExistsException.prototype); + this.Message = opts.Message; + this.ResourceUri = opts.ResourceUri; + this.OpsItemId = opts.OpsItemId; + } +} + +class DuplicateInstanceId extends SSMServiceException { + name = "DuplicateInstanceId"; + $fault = "client"; + constructor(opts) { + super({ + name: "DuplicateInstanceId", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, DuplicateInstanceId.prototype); + } +} + +class InvalidCommandId extends SSMServiceException { + name = "InvalidCommandId"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidCommandId", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidCommandId.prototype); + } +} + +class InvalidInstanceId extends SSMServiceException { + name = "InvalidInstanceId"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidInstanceId", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidInstanceId.prototype); + this.Message = opts.Message; + } +} + +class DoesNotExistException extends SSMServiceException { + name = "DoesNotExistException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "DoesNotExistException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, DoesNotExistException.prototype); + this.Message = opts.Message; + } +} + +class InvalidParameters extends SSMServiceException { + name = "InvalidParameters"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidParameters", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidParameters.prototype); + this.Message = opts.Message; + } +} + +class AssociationAlreadyExists extends SSMServiceException { + name = "AssociationAlreadyExists"; + $fault = "client"; + constructor(opts) { + super({ + name: "AssociationAlreadyExists", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AssociationAlreadyExists.prototype); + } +} + +class AssociationLimitExceeded extends SSMServiceException { + name = "AssociationLimitExceeded"; + $fault = "client"; + constructor(opts) { + super({ + name: "AssociationLimitExceeded", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AssociationLimitExceeded.prototype); + } +} + +class InvalidDocument extends SSMServiceException { + name = "InvalidDocument"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidDocument", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidDocument.prototype); + this.Message = opts.Message; + } +} + +class InvalidDocumentVersion extends SSMServiceException { + name = "InvalidDocumentVersion"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidDocumentVersion", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidDocumentVersion.prototype); + this.Message = opts.Message; + } +} + +class InvalidOutputLocation extends SSMServiceException { + name = "InvalidOutputLocation"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidOutputLocation", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidOutputLocation.prototype); + } +} + +class InvalidSchedule extends SSMServiceException { + name = "InvalidSchedule"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidSchedule", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidSchedule.prototype); + this.Message = opts.Message; + } +} + +class InvalidTag extends SSMServiceException { + name = "InvalidTag"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidTag", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidTag.prototype); + this.Message = opts.Message; + } +} + +class InvalidTarget extends SSMServiceException { + name = "InvalidTarget"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidTarget", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidTarget.prototype); + this.Message = opts.Message; + } +} + +class InvalidTargetMaps extends SSMServiceException { + name = "InvalidTargetMaps"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidTargetMaps", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidTargetMaps.prototype); + this.Message = opts.Message; + } +} + +class UnsupportedPlatformType extends SSMServiceException { + name = "UnsupportedPlatformType"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "UnsupportedPlatformType", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, UnsupportedPlatformType.prototype); + this.Message = opts.Message; + } +} + +class ConflictException extends SSMServiceException { + name = "ConflictException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ConflictException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ConflictException.prototype); + this.Message = opts.Message; + } +} + +class ServiceQuotaExceededException extends SSMServiceException { + name = "ServiceQuotaExceededException"; + $fault = "client"; + Message; + ResourceId; + ResourceType; + QuotaCode; + ServiceCode; + constructor(opts) { + super({ + name: "ServiceQuotaExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype); + this.Message = opts.Message; + this.ResourceId = opts.ResourceId; + this.ResourceType = opts.ResourceType; + this.QuotaCode = opts.QuotaCode; + this.ServiceCode = opts.ServiceCode; + } +} + +class DocumentAlreadyExists extends SSMServiceException { + name = "DocumentAlreadyExists"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "DocumentAlreadyExists", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, DocumentAlreadyExists.prototype); + this.Message = opts.Message; + } +} + +class DocumentLimitExceeded extends SSMServiceException { + name = "DocumentLimitExceeded"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "DocumentLimitExceeded", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, DocumentLimitExceeded.prototype); + this.Message = opts.Message; + } +} + +class InvalidDocumentContent extends SSMServiceException { + name = "InvalidDocumentContent"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidDocumentContent", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidDocumentContent.prototype); + this.Message = opts.Message; + } +} + +class InvalidDocumentSchemaVersion extends SSMServiceException { + name = "InvalidDocumentSchemaVersion"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidDocumentSchemaVersion", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidDocumentSchemaVersion.prototype); + this.Message = opts.Message; + } +} + +class MaxDocumentSizeExceeded extends SSMServiceException { + name = "MaxDocumentSizeExceeded"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "MaxDocumentSizeExceeded", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, MaxDocumentSizeExceeded.prototype); + this.Message = opts.Message; + } +} + +class NoLongerSupportedException extends SSMServiceException { + name = "NoLongerSupportedException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "NoLongerSupportedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoLongerSupportedException.prototype); + this.Message = opts.Message; + } +} + +class IdempotentParameterMismatch extends SSMServiceException { + name = "IdempotentParameterMismatch"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "IdempotentParameterMismatch", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, IdempotentParameterMismatch.prototype); + this.Message = opts.Message; + } +} + +class ResourceLimitExceededException extends SSMServiceException { + name = "ResourceLimitExceededException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ResourceLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourceLimitExceededException.prototype); + this.Message = opts.Message; + } +} + +class OpsItemAccessDeniedException extends SSMServiceException { + name = "OpsItemAccessDeniedException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "OpsItemAccessDeniedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsItemAccessDeniedException.prototype); + this.Message = opts.Message; + } +} + +class OpsItemAlreadyExistsException extends SSMServiceException { + name = "OpsItemAlreadyExistsException"; + $fault = "client"; + Message; + OpsItemId; + constructor(opts) { + super({ + name: "OpsItemAlreadyExistsException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsItemAlreadyExistsException.prototype); + this.Message = opts.Message; + this.OpsItemId = opts.OpsItemId; + } +} + +class OpsMetadataAlreadyExistsException extends SSMServiceException { + name = "OpsMetadataAlreadyExistsException"; + $fault = "client"; + constructor(opts) { + super({ + name: "OpsMetadataAlreadyExistsException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsMetadataAlreadyExistsException.prototype); + } +} + +class OpsMetadataInvalidArgumentException extends SSMServiceException { + name = "OpsMetadataInvalidArgumentException"; + $fault = "client"; + constructor(opts) { + super({ + name: "OpsMetadataInvalidArgumentException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsMetadataInvalidArgumentException.prototype); + } +} + +class OpsMetadataLimitExceededException extends SSMServiceException { + name = "OpsMetadataLimitExceededException"; + $fault = "client"; + constructor(opts) { + super({ + name: "OpsMetadataLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsMetadataLimitExceededException.prototype); + } +} + +class OpsMetadataTooManyUpdatesException extends SSMServiceException { + name = "OpsMetadataTooManyUpdatesException"; + $fault = "client"; + constructor(opts) { + super({ + name: "OpsMetadataTooManyUpdatesException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsMetadataTooManyUpdatesException.prototype); + } +} + +class ResourceDataSyncAlreadyExistsException extends SSMServiceException { + name = "ResourceDataSyncAlreadyExistsException"; + $fault = "client"; + SyncName; + constructor(opts) { + super({ + name: "ResourceDataSyncAlreadyExistsException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourceDataSyncAlreadyExistsException.prototype); + this.SyncName = opts.SyncName; + } +} + +class ResourceDataSyncCountExceededException extends SSMServiceException { + name = "ResourceDataSyncCountExceededException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ResourceDataSyncCountExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourceDataSyncCountExceededException.prototype); + this.Message = opts.Message; + } +} + +class ResourceDataSyncInvalidConfigurationException extends SSMServiceException { + name = "ResourceDataSyncInvalidConfigurationException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ResourceDataSyncInvalidConfigurationException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourceDataSyncInvalidConfigurationException.prototype); + this.Message = opts.Message; + } +} + +class InvalidActivation extends SSMServiceException { + name = "InvalidActivation"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidActivation", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidActivation.prototype); + this.Message = opts.Message; + } +} + +class InvalidActivationId extends SSMServiceException { + name = "InvalidActivationId"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidActivationId", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidActivationId.prototype); + this.Message = opts.Message; + } +} + +class AssociationDoesNotExist extends SSMServiceException { + name = "AssociationDoesNotExist"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "AssociationDoesNotExist", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AssociationDoesNotExist.prototype); + this.Message = opts.Message; + } +} + +class ResourceNotFoundException extends SSMServiceException { + name = "ResourceNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + this.Message = opts.Message; + } +} + +class AssociatedInstances extends SSMServiceException { + name = "AssociatedInstances"; + $fault = "client"; + constructor(opts) { + super({ + name: "AssociatedInstances", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AssociatedInstances.prototype); + } +} + +class InvalidDocumentOperation extends SSMServiceException { + name = "InvalidDocumentOperation"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidDocumentOperation", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidDocumentOperation.prototype); + this.Message = opts.Message; + } +} + +class InvalidDeleteInventoryParametersException extends SSMServiceException { + name = "InvalidDeleteInventoryParametersException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidDeleteInventoryParametersException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidDeleteInventoryParametersException.prototype); + this.Message = opts.Message; + } +} + +class InvalidInventoryRequestException extends SSMServiceException { + name = "InvalidInventoryRequestException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidInventoryRequestException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidInventoryRequestException.prototype); + this.Message = opts.Message; + } +} + +class InvalidOptionException extends SSMServiceException { + name = "InvalidOptionException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidOptionException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidOptionException.prototype); + this.Message = opts.Message; + } +} + +class InvalidTypeNameException extends SSMServiceException { + name = "InvalidTypeNameException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidTypeNameException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidTypeNameException.prototype); + this.Message = opts.Message; + } +} + +class OpsMetadataNotFoundException extends SSMServiceException { + name = "OpsMetadataNotFoundException"; + $fault = "client"; + constructor(opts) { + super({ + name: "OpsMetadataNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsMetadataNotFoundException.prototype); + } +} + +class ParameterNotFound extends SSMServiceException { + name = "ParameterNotFound"; + $fault = "client"; + constructor(opts) { + super({ + name: "ParameterNotFound", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ParameterNotFound.prototype); + } +} + +class ResourceInUseException extends SSMServiceException { + name = "ResourceInUseException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ResourceInUseException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourceInUseException.prototype); + this.Message = opts.Message; + } +} + +class ResourceDataSyncNotFoundException extends SSMServiceException { + name = "ResourceDataSyncNotFoundException"; + $fault = "client"; + SyncName; + SyncType; + Message; + constructor(opts) { + super({ + name: "ResourceDataSyncNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourceDataSyncNotFoundException.prototype); + this.SyncName = opts.SyncName; + this.SyncType = opts.SyncType; + this.Message = opts.Message; + } +} + +class MalformedResourcePolicyDocumentException extends SSMServiceException { + name = "MalformedResourcePolicyDocumentException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "MalformedResourcePolicyDocumentException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, MalformedResourcePolicyDocumentException.prototype); + this.Message = opts.Message; + } +} + +class ResourcePolicyConflictException extends SSMServiceException { + name = "ResourcePolicyConflictException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ResourcePolicyConflictException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourcePolicyConflictException.prototype); + this.Message = opts.Message; + } +} + +class ResourcePolicyInvalidParameterException extends SSMServiceException { + name = "ResourcePolicyInvalidParameterException"; + $fault = "client"; + ParameterNames; + Message; + constructor(opts) { + super({ + name: "ResourcePolicyInvalidParameterException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourcePolicyInvalidParameterException.prototype); + this.ParameterNames = opts.ParameterNames; + this.Message = opts.Message; + } +} + +class ResourcePolicyNotFoundException extends SSMServiceException { + name = "ResourcePolicyNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ResourcePolicyNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourcePolicyNotFoundException.prototype); + this.Message = opts.Message; + } +} + +class TargetInUseException extends SSMServiceException { + name = "TargetInUseException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "TargetInUseException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, TargetInUseException.prototype); + this.Message = opts.Message; + } +} + +class InvalidFilter extends SSMServiceException { + name = "InvalidFilter"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidFilter", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidFilter.prototype); + this.Message = opts.Message; + } +} + +class InvalidNextToken extends SSMServiceException { + name = "InvalidNextToken"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidNextToken", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidNextToken.prototype); + this.Message = opts.Message; + } +} + +class InvalidAssociationVersion extends SSMServiceException { + name = "InvalidAssociationVersion"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidAssociationVersion", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidAssociationVersion.prototype); + this.Message = opts.Message; + } +} + +class AssociationExecutionDoesNotExist extends SSMServiceException { + name = "AssociationExecutionDoesNotExist"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "AssociationExecutionDoesNotExist", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AssociationExecutionDoesNotExist.prototype); + this.Message = opts.Message; + } +} + +class InvalidFilterKey extends SSMServiceException { + name = "InvalidFilterKey"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidFilterKey", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidFilterKey.prototype); + } +} + +class InvalidFilterValue extends SSMServiceException { + name = "InvalidFilterValue"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidFilterValue", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidFilterValue.prototype); + this.Message = opts.Message; + } +} + +class AutomationExecutionNotFoundException extends SSMServiceException { + name = "AutomationExecutionNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "AutomationExecutionNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AutomationExecutionNotFoundException.prototype); + this.Message = opts.Message; + } +} + +class InvalidPermissionType extends SSMServiceException { + name = "InvalidPermissionType"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidPermissionType", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidPermissionType.prototype); + this.Message = opts.Message; + } +} + +class UnsupportedOperatingSystem extends SSMServiceException { + name = "UnsupportedOperatingSystem"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "UnsupportedOperatingSystem", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, UnsupportedOperatingSystem.prototype); + this.Message = opts.Message; + } +} + +class InvalidInstanceInformationFilterValue extends SSMServiceException { + name = "InvalidInstanceInformationFilterValue"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidInstanceInformationFilterValue", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidInstanceInformationFilterValue.prototype); + } +} + +class InvalidInstancePropertyFilterValue extends SSMServiceException { + name = "InvalidInstancePropertyFilterValue"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidInstancePropertyFilterValue", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidInstancePropertyFilterValue.prototype); + } +} + +class InvalidDeletionIdException extends SSMServiceException { + name = "InvalidDeletionIdException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidDeletionIdException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidDeletionIdException.prototype); + this.Message = opts.Message; + } +} + +class InvalidFilterOption extends SSMServiceException { + name = "InvalidFilterOption"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidFilterOption", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidFilterOption.prototype); + } +} + +class OpsItemRelatedItemAssociationNotFoundException extends SSMServiceException { + name = "OpsItemRelatedItemAssociationNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "OpsItemRelatedItemAssociationNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsItemRelatedItemAssociationNotFoundException.prototype); + this.Message = opts.Message; + } +} + +class ThrottlingException extends SSMServiceException { + name = "ThrottlingException"; + $fault = "client"; + Message; + QuotaCode; + ServiceCode; + constructor(opts) { + super({ + name: "ThrottlingException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ThrottlingException.prototype); + this.Message = opts.Message; + this.QuotaCode = opts.QuotaCode; + this.ServiceCode = opts.ServiceCode; + } +} + +class ValidationException extends SSMServiceException { + name = "ValidationException"; + $fault = "client"; + Message; + ReasonCode; + constructor(opts) { + super({ + name: "ValidationException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ValidationException.prototype); + this.Message = opts.Message; + this.ReasonCode = opts.ReasonCode; + } +} + +class InvalidDocumentType extends SSMServiceException { + name = "InvalidDocumentType"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidDocumentType", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidDocumentType.prototype); + this.Message = opts.Message; + } +} + +class UnsupportedCalendarException extends SSMServiceException { + name = "UnsupportedCalendarException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "UnsupportedCalendarException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, UnsupportedCalendarException.prototype); + this.Message = opts.Message; + } +} + +class InvalidPluginName extends SSMServiceException { + name = "InvalidPluginName"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidPluginName", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidPluginName.prototype); + } +} + +class InvocationDoesNotExist extends SSMServiceException { + name = "InvocationDoesNotExist"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvocationDoesNotExist", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvocationDoesNotExist.prototype); + } +} + +class UnsupportedFeatureRequiredException extends SSMServiceException { + name = "UnsupportedFeatureRequiredException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "UnsupportedFeatureRequiredException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, UnsupportedFeatureRequiredException.prototype); + this.Message = opts.Message; + } +} + +class InvalidAggregatorException extends SSMServiceException { + name = "InvalidAggregatorException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidAggregatorException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidAggregatorException.prototype); + this.Message = opts.Message; + } +} + +class InvalidInventoryGroupException extends SSMServiceException { + name = "InvalidInventoryGroupException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidInventoryGroupException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidInventoryGroupException.prototype); + this.Message = opts.Message; + } +} + +class InvalidResultAttributeException extends SSMServiceException { + name = "InvalidResultAttributeException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidResultAttributeException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidResultAttributeException.prototype); + this.Message = opts.Message; + } +} + +class InvalidKeyId extends SSMServiceException { + name = "InvalidKeyId"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidKeyId", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidKeyId.prototype); + } +} + +class ParameterVersionNotFound extends SSMServiceException { + name = "ParameterVersionNotFound"; + $fault = "client"; + constructor(opts) { + super({ + name: "ParameterVersionNotFound", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ParameterVersionNotFound.prototype); + } +} + +class ServiceSettingNotFound extends SSMServiceException { + name = "ServiceSettingNotFound"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ServiceSettingNotFound", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ServiceSettingNotFound.prototype); + this.Message = opts.Message; + } +} + +class ParameterVersionLabelLimitExceeded extends SSMServiceException { + name = "ParameterVersionLabelLimitExceeded"; + $fault = "client"; + constructor(opts) { + super({ + name: "ParameterVersionLabelLimitExceeded", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ParameterVersionLabelLimitExceeded.prototype); + } +} + +class UnsupportedOperationException extends SSMServiceException { + name = "UnsupportedOperationException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "UnsupportedOperationException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, UnsupportedOperationException.prototype); + this.Message = opts.Message; + } +} + +class DocumentPermissionLimit extends SSMServiceException { + name = "DocumentPermissionLimit"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "DocumentPermissionLimit", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, DocumentPermissionLimit.prototype); + this.Message = opts.Message; + } +} + +class ComplianceTypeCountLimitExceededException extends SSMServiceException { + name = "ComplianceTypeCountLimitExceededException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ComplianceTypeCountLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ComplianceTypeCountLimitExceededException.prototype); + this.Message = opts.Message; + } +} + +class InvalidItemContentException extends SSMServiceException { + name = "InvalidItemContentException"; + $fault = "client"; + TypeName; + Message; + constructor(opts) { + super({ + name: "InvalidItemContentException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidItemContentException.prototype); + this.TypeName = opts.TypeName; + this.Message = opts.Message; + } +} + +class ItemSizeLimitExceededException extends SSMServiceException { + name = "ItemSizeLimitExceededException"; + $fault = "client"; + TypeName; + Message; + constructor(opts) { + super({ + name: "ItemSizeLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ItemSizeLimitExceededException.prototype); + this.TypeName = opts.TypeName; + this.Message = opts.Message; + } +} + +class TotalSizeLimitExceededException extends SSMServiceException { + name = "TotalSizeLimitExceededException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "TotalSizeLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, TotalSizeLimitExceededException.prototype); + this.Message = opts.Message; + } +} + +class CustomSchemaCountLimitExceededException extends SSMServiceException { + name = "CustomSchemaCountLimitExceededException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "CustomSchemaCountLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, CustomSchemaCountLimitExceededException.prototype); + this.Message = opts.Message; + } +} + +class InvalidInventoryItemContextException extends SSMServiceException { + name = "InvalidInventoryItemContextException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidInventoryItemContextException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidInventoryItemContextException.prototype); + this.Message = opts.Message; + } +} + +class ItemContentMismatchException extends SSMServiceException { + name = "ItemContentMismatchException"; + $fault = "client"; + TypeName; + Message; + constructor(opts) { + super({ + name: "ItemContentMismatchException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ItemContentMismatchException.prototype); + this.TypeName = opts.TypeName; + this.Message = opts.Message; + } +} + +class SubTypeCountLimitExceededException extends SSMServiceException { + name = "SubTypeCountLimitExceededException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "SubTypeCountLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, SubTypeCountLimitExceededException.prototype); + this.Message = opts.Message; + } +} + +class UnsupportedInventoryItemContextException extends SSMServiceException { + name = "UnsupportedInventoryItemContextException"; + $fault = "client"; + TypeName; + Message; + constructor(opts) { + super({ + name: "UnsupportedInventoryItemContextException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, UnsupportedInventoryItemContextException.prototype); + this.TypeName = opts.TypeName; + this.Message = opts.Message; + } +} + +class UnsupportedInventorySchemaVersionException extends SSMServiceException { + name = "UnsupportedInventorySchemaVersionException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "UnsupportedInventorySchemaVersionException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, UnsupportedInventorySchemaVersionException.prototype); + this.Message = opts.Message; + } +} + +class HierarchyLevelLimitExceededException extends SSMServiceException { + name = "HierarchyLevelLimitExceededException"; + $fault = "client"; + constructor(opts) { + super({ + name: "HierarchyLevelLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, HierarchyLevelLimitExceededException.prototype); + } +} + +class HierarchyTypeMismatchException extends SSMServiceException { + name = "HierarchyTypeMismatchException"; + $fault = "client"; + constructor(opts) { + super({ + name: "HierarchyTypeMismatchException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, HierarchyTypeMismatchException.prototype); + } +} + +class IncompatiblePolicyException extends SSMServiceException { + name = "IncompatiblePolicyException"; + $fault = "client"; + constructor(opts) { + super({ + name: "IncompatiblePolicyException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, IncompatiblePolicyException.prototype); + } +} + +class InvalidAllowedPatternException extends SSMServiceException { + name = "InvalidAllowedPatternException"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidAllowedPatternException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidAllowedPatternException.prototype); + } +} + +class InvalidPolicyAttributeException extends SSMServiceException { + name = "InvalidPolicyAttributeException"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidPolicyAttributeException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidPolicyAttributeException.prototype); + } +} + +class InvalidPolicyTypeException extends SSMServiceException { + name = "InvalidPolicyTypeException"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidPolicyTypeException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidPolicyTypeException.prototype); + } +} + +class ParameterAlreadyExists extends SSMServiceException { + name = "ParameterAlreadyExists"; + $fault = "client"; + constructor(opts) { + super({ + name: "ParameterAlreadyExists", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ParameterAlreadyExists.prototype); + } +} + +class ParameterLimitExceeded extends SSMServiceException { + name = "ParameterLimitExceeded"; + $fault = "client"; + constructor(opts) { + super({ + name: "ParameterLimitExceeded", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ParameterLimitExceeded.prototype); + } +} + +class ParameterMaxVersionLimitExceeded extends SSMServiceException { + name = "ParameterMaxVersionLimitExceeded"; + $fault = "client"; + constructor(opts) { + super({ + name: "ParameterMaxVersionLimitExceeded", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ParameterMaxVersionLimitExceeded.prototype); + } +} + +class ParameterPatternMismatchException extends SSMServiceException { + name = "ParameterPatternMismatchException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ParameterPatternMismatchException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ParameterPatternMismatchException.prototype); + } +} + +class PoliciesLimitExceededException extends SSMServiceException { + name = "PoliciesLimitExceededException"; + $fault = "client"; + constructor(opts) { + super({ + name: "PoliciesLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, PoliciesLimitExceededException.prototype); + } +} + +class UnsupportedParameterType extends SSMServiceException { + name = "UnsupportedParameterType"; + $fault = "client"; + constructor(opts) { + super({ + name: "UnsupportedParameterType", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, UnsupportedParameterType.prototype); + } +} + +class ResourcePolicyLimitExceededException extends SSMServiceException { + name = "ResourcePolicyLimitExceededException"; + $fault = "client"; + Limit; + LimitType; + Message; + constructor(opts) { + super({ + name: "ResourcePolicyLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourcePolicyLimitExceededException.prototype); + this.Limit = opts.Limit; + this.LimitType = opts.LimitType; + this.Message = opts.Message; + } +} + +class FeatureNotAvailableException extends SSMServiceException { + name = "FeatureNotAvailableException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "FeatureNotAvailableException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, FeatureNotAvailableException.prototype); + this.Message = opts.Message; + } +} + +class AutomationStepNotFoundException extends SSMServiceException { + name = "AutomationStepNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "AutomationStepNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AutomationStepNotFoundException.prototype); + this.Message = opts.Message; + } +} + +class InvalidAutomationSignalException extends SSMServiceException { + name = "InvalidAutomationSignalException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidAutomationSignalException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidAutomationSignalException.prototype); + this.Message = opts.Message; + } +} + +class InvalidNotificationConfig extends SSMServiceException { + name = "InvalidNotificationConfig"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidNotificationConfig", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidNotificationConfig.prototype); + this.Message = opts.Message; + } +} + +class InvalidOutputFolder extends SSMServiceException { + name = "InvalidOutputFolder"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidOutputFolder", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidOutputFolder.prototype); + } +} + +class InvalidRole extends SSMServiceException { + name = "InvalidRole"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidRole", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidRole.prototype); + this.Message = opts.Message; + } +} + +class InvalidAssociation extends SSMServiceException { + name = "InvalidAssociation"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidAssociation", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidAssociation.prototype); + this.Message = opts.Message; + } +} + +class AutomationDefinitionNotFoundException extends SSMServiceException { + name = "AutomationDefinitionNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "AutomationDefinitionNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AutomationDefinitionNotFoundException.prototype); + this.Message = opts.Message; + } +} + +class AutomationDefinitionVersionNotFoundException extends SSMServiceException { + name = "AutomationDefinitionVersionNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "AutomationDefinitionVersionNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AutomationDefinitionVersionNotFoundException.prototype); + this.Message = opts.Message; + } +} + +class AutomationExecutionLimitExceededException extends SSMServiceException { + name = "AutomationExecutionLimitExceededException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "AutomationExecutionLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AutomationExecutionLimitExceededException.prototype); + this.Message = opts.Message; + } +} + +class InvalidAutomationExecutionParametersException extends SSMServiceException { + name = "InvalidAutomationExecutionParametersException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidAutomationExecutionParametersException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidAutomationExecutionParametersException.prototype); + this.Message = opts.Message; + } +} + +class AutomationDefinitionNotApprovedException extends SSMServiceException { + name = "AutomationDefinitionNotApprovedException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "AutomationDefinitionNotApprovedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AutomationDefinitionNotApprovedException.prototype); + this.Message = opts.Message; + } +} + +class TargetNotConnected extends SSMServiceException { + name = "TargetNotConnected"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "TargetNotConnected", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, TargetNotConnected.prototype); + this.Message = opts.Message; + } +} + +class InvalidAutomationStatusUpdateException extends SSMServiceException { + name = "InvalidAutomationStatusUpdateException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidAutomationStatusUpdateException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidAutomationStatusUpdateException.prototype); + this.Message = opts.Message; + } +} + +class AssociationVersionLimitExceeded extends SSMServiceException { + name = "AssociationVersionLimitExceeded"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "AssociationVersionLimitExceeded", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AssociationVersionLimitExceeded.prototype); + this.Message = opts.Message; + } +} + +class InvalidUpdate extends SSMServiceException { + name = "InvalidUpdate"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidUpdate", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidUpdate.prototype); + this.Message = opts.Message; + } +} + +class StatusUnchanged extends SSMServiceException { + name = "StatusUnchanged"; + $fault = "client"; + constructor(opts) { + super({ + name: "StatusUnchanged", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, StatusUnchanged.prototype); + } +} + +class DocumentVersionLimitExceeded extends SSMServiceException { + name = "DocumentVersionLimitExceeded"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "DocumentVersionLimitExceeded", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, DocumentVersionLimitExceeded.prototype); + this.Message = opts.Message; + } +} + +class DuplicateDocumentContent extends SSMServiceException { + name = "DuplicateDocumentContent"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "DuplicateDocumentContent", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, DuplicateDocumentContent.prototype); + this.Message = opts.Message; + } +} + +class DuplicateDocumentVersionName extends SSMServiceException { + name = "DuplicateDocumentVersionName"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "DuplicateDocumentVersionName", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, DuplicateDocumentVersionName.prototype); + this.Message = opts.Message; + } +} + +class OpsMetadataKeyLimitExceededException extends SSMServiceException { + name = "OpsMetadataKeyLimitExceededException"; + $fault = "client"; + constructor(opts) { + super({ + name: "OpsMetadataKeyLimitExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, OpsMetadataKeyLimitExceededException.prototype); + } +} + +class ResourceDataSyncConflictException extends SSMServiceException { + name = "ResourceDataSyncConflictException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ResourceDataSyncConflictException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ResourceDataSyncConflictException.prototype); + this.Message = opts.Message; + } +} +var _A = "Activation"; +var _AA = "AutoApprove"; +var _AAD = "ApproveAfterDays"; +var _AAE = "AssociationAlreadyExists"; +var _AC = "AlarmConfiguration"; +var _ACL = "AttachmentContentList"; +var _ACc = "ActivationCode"; +var _ACt = "AttachmentContent"; +var _ACtt = "AttachmentsContent"; +var _ACz = "AzureConfiguration"; +var _AD = "AssociationDescription"; +var _ADAR = "AssociationDispatchAssumeRole"; +var _ADE = "AccessDeniedException"; +var _ADL = "AssociationDescriptionList"; +var _ADN = "ApplicationDisplayName"; +var _ADNAE = "AutomationDefinitionNotApprovedException"; +var _ADNE = "AssociationDoesNotExist"; +var _ADNFE = "AutomationDefinitionNotFoundException"; +var _ADVNFE = "AutomationDefinitionVersionNotFoundException"; +var _ADp = "ApprovalDate"; +var _AE = "AssociationExecution"; +var _AEDNE = "AssociationExecutionDoesNotExist"; +var _AEE = "AlreadyExistsException"; +var _AEF = "AssociationExecutionFilter"; +var _AEFL = "AssociationExecutionFilterList"; +var _AEFLu = "AutomationExecutionFilterList"; +var _AEFu = "AutomationExecutionFilter"; +var _AEI = "AutomationExecutionId"; +var _AEIu = "AutomationExecutionInputs"; +var _AEL = "AssociationExecutionsList"; +var _AELEE = "AutomationExecutionLimitExceededException"; +var _AEM = "AutomationExecutionMetadata"; +var _AEML = "AutomationExecutionMetadataList"; +var _AENFE = "AutomationExecutionNotFoundException"; +var _AEP = "AutomationExecutionPreview"; +var _AES = "AutomationExecutionStatus"; +var _AET = "AssociationExecutionTarget"; +var _AETF = "AssociationExecutionTargetsFilter"; +var _AETFL = "AssociationExecutionTargetsFilterList"; +var _AETL = "AssociationExecutionTargetsList"; +var _AETc = "ActualEndTime"; +var _AETs = "AssociationExecutionTargets"; +var _AEs = "AssociationExecutions"; +var _AEu = "AutomationExecution"; +var _AF = "AssociationFilter"; +var _AFL = "AssociationFilterList"; +var _AI = "AssociatedInstances"; +var _AIL = "AccountIdList"; +var _AILt = "AttachmentInformationList"; +var _AITA = "AccountIdsToAdd"; +var _AITR = "AccountIdsToRemove"; +var _AIc = "AccountId"; +var _AIcc = "AccountIds"; +var _AIct = "ActivationId"; +var _AId = "AdditionalInfo"; +var _AIdv = "AdvisoryIds"; +var _AIp = "ApplicationId"; +var _AIs = "AssociationId"; +var _AIss = "AssociationIds"; +var _AIt = "AttachmentInformation"; +var _AItt = "AttachmentsInformation"; +var _AKI = "AccessKeyId"; +var _AKST = "AccessKeySecretType"; +var _AL = "ActivationList"; +var _ALE = "AssociationLimitExceeded"; +var _ALl = "AlarmList"; +var _ALs = "AssociationList"; +var _AN = "AssociationName"; +var _ANt = "AttributeName"; +var _AO = "AssociationOverview"; +var _AOACI = "ApplyOnlyAtCronInterval"; +var _AOIRI = "AssociateOpsItemRelatedItem"; +var _AOIRIR = "AssociateOpsItemRelatedItemRequest"; +var _AOIRIRs = "AssociateOpsItemRelatedItemResponse"; +var _AOS = "AwsOrganizationsSource"; +var _AP = "ApprovedPatches"; +var _APCL = "ApprovedPatchesComplianceLevel"; +var _APENS = "ApprovedPatchesEnableNonSecurity"; +var _APM = "AutomationParameterMap"; +var _APl = "AllowedPattern"; +var _AR = "ApprovalRules"; +var _ARI = "AccessRequestId"; +var _ARN = "ARN"; +var _ARS = "AccessRequestStatus"; +var _AS = "AssociationStatus"; +var _ASAC = "AssociationStatusAggregatedCount"; +var _ASI = "AccountSharingInfo"; +var _ASIL = "AccountSharingInfoList"; +var _ASILl = "AlarmStateInformationList"; +var _ASIl = "AlarmStateInformation"; +var _ASL = "AttachmentsSourceList"; +var _ASLz = "AzureSubscriptionList"; +var _ASNFE = "AutomationStepNotFoundException"; +var _AST = "ActualStartTime"; +var _ASUC = "AvailableSecurityUpdateCount"; +var _ASUCS = "AvailableSecurityUpdatesComplianceStatus"; +var _ASt = "AttachmentsSource"; +var _ASu = "AutomationSubtype"; +var _ASz = "AzureSubscription"; +var _AT = "AssociationType"; +var _ATPN = "AutomationTargetParameterName"; +var _ATTR = "AddTagsToResource"; +var _ATTRR = "AddTagsToResourceRequest"; +var _ATTRRd = "AddTagsToResourceResult"; +var _ATc = "AccessType"; +var _ATg = "AgentType"; +var _ATgg = "AggregatorType"; +var _ATt = "AtTime"; +var _ATu = "AutomationType"; +var _ATut = "AutomationTargets"; +var _AUD = "ApproveUntilDate"; +var _AUT = "AllowUnassociatedTargets"; +var _AV = "AssociationVersion"; +var _AVI = "AssociationVersionInfo"; +var _AVL = "AssociationVersionList"; +var _AVLE = "AssociationVersionLimitExceeded"; +var _AVg = "AgentVersion"; +var _AVp = "ApprovedVersion"; +var _AVs = "AssociationVersions"; +var _AWSKMSKARN = "AWSKMSKeyARN"; +var _AZ = "AvailabilityZone"; +var _AZI = "AvailabilityZoneId"; +var _Ac = "Action"; +var _Acc = "Accounts"; +var _Ag = "Aggregators"; +var _Agg = "Aggregator"; +var _Al = "Alarm"; +var _Ala = "Alarms"; +var _Ar = "Architecture"; +var _Arc = "Arch"; +var _Arn = "Arn"; +var _As = "Association"; +var _Ass = "Associations"; +var _At = "Attachments"; +var _Att = "Attributes"; +var _Attr = "Attribute"; +var _Au = "Author"; +var _Aut = "Automation"; +var _BD = "BaselineDescription"; +var _BI = "BaselineId"; +var _BIa = "BaselineIdentities"; +var _BIas = "BaselineIdentity"; +var _BIu = "BugzillaIds"; +var _BN = "BaselineName"; +var _BNu = "BucketName"; +var _BO = "BaselineOverride"; +var _C = "Command"; +var _CA = "CurrentAction"; +var _CAB = "CreateAssociationBatch"; +var _CABR = "CreateAssociationBatchRequest"; +var _CABRE = "CreateAssociationBatchRequestEntry"; +var _CABREr = "CreateAssociationBatchRequestEntries"; +var _CABRr = "CreateAssociationBatchResult"; +var _CAR = "CreateActivationRequest"; +var _CARr = "CreateActivationResult"; +var _CARre = "CreateAssociationRequest"; +var _CARrea = "CreateAssociationResult"; +var _CAr = "CreatedAt"; +var _CAre = "CreateActivation"; +var _CArea = "CreateAssociation"; +var _CB = "CutoffBehavior"; +var _CBr = "CreatedBy"; +var _CC = "CompletedCount"; +var _CCA = "ConfigConnectorArn"; +var _CCAl = "CloudConnectorArn"; +var _CCC = "CloudConnectorConfiguration"; +var _CCCR = "CreateCloudConnectorRequest"; +var _CCCRr = "CreateCloudConnectorResult"; +var _CCCr = "CreateCloudConnector"; +var _CCF = "CloudConnectorFilter"; +var _CCFL = "CloudConnectorFilterList"; +var _CCI = "CloudConnectorId"; +var _CCR = "CancelCommandRequest"; +var _CCRa = "CancelCommandResult"; +var _CCS = "CloudConnectorSummary"; +var _CCSL = "CloudConnectorSummaryList"; +var _CCa = "CancelCommand"; +var _CCl = "CloudConnectors"; +var _CCli = "ClientContext"; +var _CCo = "CompliantCount"; +var _CCr = "CriticalCount"; +var _CD = "CreatedDate"; +var _CDR = "CreateDocumentRequest"; +var _CDRr = "CreateDocumentResult"; +var _CDh = "ChangeDetails"; +var _CDr = "CreationDate"; +var _CDre = "CreateDocument"; +var _CE = "ConflictException"; +var _CES = "ComplianceExecutionSummary"; +var _CEa = "CategoryEnum"; +var _CF = "CommandFilter"; +var _CFL = "CommandFilterList"; +var _CFo = "ComplianceFilter"; +var _CH = "ContentHash"; +var _CI = "CommandId"; +var _CIE = "ComplianceItemEntry"; +var _CIEL = "ComplianceItemEntryList"; +var _CIL = "CommandInvocationList"; +var _CILo = "ComplianceItemList"; +var _CIo = "CommandInvocation"; +var _CIom = "ComplianceItem"; +var _CIomm = "CommandInvocations"; +var _CIomp = "ComplianceItems"; +var _CL = "ComplianceLevel"; +var _CLo = "CommandList"; +var _CMW = "CreateMaintenanceWindow"; +var _CMWE = "CancelMaintenanceWindowExecution"; +var _CMWER = "CancelMaintenanceWindowExecutionRequest"; +var _CMWERa = "CancelMaintenanceWindowExecutionResult"; +var _CMWR = "CreateMaintenanceWindowRequest"; +var _CMWRr = "CreateMaintenanceWindowResult"; +var _CN = "CalendarNames"; +var _CNCC = "CriticalNonCompliantCount"; +var _CNo = "ComputerName"; +var _COI = "CreateOpsItem"; +var _COIR = "CreateOpsItemRequest"; +var _COIRr = "CreateOpsItemResponse"; +var _COM = "CreateOpsMetadata"; +var _COMR = "CreateOpsMetadataRequest"; +var _COMRr = "CreateOpsMetadataResult"; +var _CP = "CommandPlugins"; +var _CPB = "CreatePatchBaseline"; +var _CPBR = "CreatePatchBaselineRequest"; +var _CPBRr = "CreatePatchBaselineResult"; +var _CPL = "CommandPluginList"; +var _CPo = "CommandPlugin"; +var _CRDS = "CreateResourceDataSync"; +var _CRDSR = "CreateResourceDataSyncRequest"; +var _CRDSRr = "CreateResourceDataSyncResult"; +var _CRN = "ChangeRequestName"; +var _CS = "ComplianceSeverity"; +var _CSCLEE = "CustomSchemaCountLimitExceededException"; +var _CSF = "ComplianceStringFilter"; +var _CSFL = "ComplianceStringFilterList"; +var _CSFVL = "ComplianceStringFilterValueList"; +var _CSI = "ComplianceSummaryItem"; +var _CSIL = "ComplianceSummaryItemList"; +var _CSIo = "ComplianceSummaryItems"; +var _CSN = "CurrentStepName"; +var _CSa = "CancelledSteps"; +var _CSo = "CompliantSummary"; +var _CT = "CreatedTime"; +var _CTCLEE = "ComplianceTypeCountLimitExceededException"; +var _CTa = "CaptureTime"; +var _CTl = "ClientToken"; +var _CTo = "ComplianceType"; +var _CTon = "ConfigurationTargets"; +var _CTr = "CreateTime"; +var _CU = "ContentUrl"; +var _CVEI = "CVEIds"; +var _CWLGN = "CloudWatchLogGroupName"; +var _CWOC = "CloudWatchOutputConfig"; +var _CWOE = "CloudWatchOutputEnabled"; +var _CWOU = "CloudWatchOutputUrl"; +var _Ca = "Category"; +var _Cl = "Classification"; +var _Co = "Comment"; +var _Cod = "Code"; +var _Com = "Commands"; +var _Con = "Configuration"; +var _Cont = "Content"; +var _Conte = "Context"; +var _Cou = "Count"; +var _Cr = "Credentials"; +var _Cu = "Cutoff"; +var _D = "Description"; +var _DA = "DeleteActivation"; +var _DAE = "DocumentAlreadyExists"; +var _DAER = "DescribeAssociationExecutionsRequest"; +var _DAERe = "DescribeAssociationExecutionsResult"; +var _DAERes = "DescribeAutomationExecutionsRequest"; +var _DAEResc = "DescribeAutomationExecutionsResult"; +var _DAET = "DescribeAssociationExecutionTargets"; +var _DAETR = "DescribeAssociationExecutionTargetsRequest"; +var _DAETRe = "DescribeAssociationExecutionTargetsResult"; +var _DAEe = "DescribeAssociationExecutions"; +var _DAEes = "DescribeAutomationExecutions"; +var _DAF = "DescribeActivationsFilter"; +var _DAFL = "DescribeActivationsFilterList"; +var _DAP = "DescribeAvailablePatches"; +var _DAPR = "DescribeAvailablePatchesRequest"; +var _DAPRe = "DescribeAvailablePatchesResult"; +var _DAR = "DeleteActivationRequest"; +var _DARe = "DeleteActivationResult"; +var _DARel = "DeleteAssociationRequest"; +var _DARele = "DeleteAssociationResult"; +var _DARes = "DescribeActivationsRequest"; +var _DAResc = "DescribeActivationsResult"; +var _DARescr = "DescribeAssociationRequest"; +var _DARescri = "DescribeAssociationResult"; +var _DASE = "DescribeAutomationStepExecutions"; +var _DASER = "DescribeAutomationStepExecutionsRequest"; +var _DASERe = "DescribeAutomationStepExecutionsResult"; +var _DAe = "DeleteAssociation"; +var _DAes = "DescribeActivations"; +var _DAesc = "DescribeAssociation"; +var _DB = "DefaultBaseline"; +var _DCC = "DeleteCloudConnector"; +var _DCCR = "DeleteCloudConnectorRequest"; +var _DCCRe = "DeleteCloudConnectorResult"; +var _DD = "DocumentDescription"; +var _DDC = "DuplicateDocumentContent"; +var _DDP = "DescribeDocumentPermission"; +var _DDPR = "DescribeDocumentPermissionRequest"; +var _DDPRe = "DescribeDocumentPermissionResponse"; +var _DDR = "DeleteDocumentRequest"; +var _DDRe = "DeleteDocumentResult"; +var _DDRes = "DescribeDocumentRequest"; +var _DDResc = "DescribeDocumentResult"; +var _DDS = "DestinationDataSharing"; +var _DDST = "DestinationDataSharingType"; +var _DDVD = "DocumentDefaultVersionDescription"; +var _DDVN = "DuplicateDocumentVersionName"; +var _DDe = "DeleteDocument"; +var _DDes = "DescribeDocument"; +var _DEIA = "DescribeEffectiveInstanceAssociations"; +var _DEIAR = "DescribeEffectiveInstanceAssociationsRequest"; +var _DEIARe = "DescribeEffectiveInstanceAssociationsResult"; +var _DEPFPB = "DescribeEffectivePatchesForPatchBaseline"; +var _DEPFPBR = "DescribeEffectivePatchesForPatchBaselineRequest"; +var _DEPFPBRe = "DescribeEffectivePatchesForPatchBaselineResult"; +var _DF = "DocumentFormat"; +var _DFL = "DocumentFilterList"; +var _DFo = "DocumentFilter"; +var _DH = "DocumentHash"; +var _DHT = "DocumentHashType"; +var _DI = "DeletionId"; +var _DIAS = "DescribeInstanceAssociationsStatus"; +var _DIASR = "DescribeInstanceAssociationsStatusRequest"; +var _DIASRe = "DescribeInstanceAssociationsStatusResult"; +var _DID = "DescribeInventoryDeletions"; +var _DIDR = "DescribeInventoryDeletionsRequest"; +var _DIDRe = "DescribeInventoryDeletionsResult"; +var _DII = "DuplicateInstanceId"; +var _DIIR = "DescribeInstanceInformationRequest"; +var _DIIRe = "DescribeInstanceInformationResult"; +var _DIIe = "DescribeInstanceInformation"; +var _DIL = "DocumentIdentifierList"; +var _DIN = "DefaultInstanceName"; +var _DIP = "DescribeInstancePatches"; +var _DIPR = "DescribeInstancePatchesRequest"; +var _DIPRe = "DescribeInstancePatchesResult"; +var _DIPRes = "DescribeInstancePropertiesRequest"; +var _DIPResc = "DescribeInstancePropertiesResult"; +var _DIPS = "DescribeInstancePatchStates"; +var _DIPSFPG = "DescribeInstancePatchStatesForPatchGroup"; +var _DIPSFPGR = "DescribeInstancePatchStatesForPatchGroupRequest"; +var _DIPSFPGRe = "DescribeInstancePatchStatesForPatchGroupResult"; +var _DIPSR = "DescribeInstancePatchStatesRequest"; +var _DIPSRe = "DescribeInstancePatchStatesResult"; +var _DIPe = "DescribeInstanceProperties"; +var _DIR = "DeleteInventoryRequest"; +var _DIRe = "DeleteInventoryResult"; +var _DIe = "DeleteInventory"; +var _DIo = "DocumentIdentifier"; +var _DIoc = "DocumentIdentifiers"; +var _DKVF = "DocumentKeyValuesFilter"; +var _DKVFL = "DocumentKeyValuesFilterList"; +var _DLE = "DocumentLimitExceeded"; +var _DMI = "DeregisterManagedInstance"; +var _DMIR = "DeregisterManagedInstanceRequest"; +var _DMIRe = "DeregisterManagedInstanceResult"; +var _DMRI = "DocumentMetadataResponseInfo"; +var _DMW = "DeleteMaintenanceWindow"; +var _DMWE = "DescribeMaintenanceWindowExecutions"; +var _DMWER = "DescribeMaintenanceWindowExecutionsRequest"; +var _DMWERe = "DescribeMaintenanceWindowExecutionsResult"; +var _DMWET = "DescribeMaintenanceWindowExecutionTasks"; +var _DMWETI = "DescribeMaintenanceWindowExecutionTaskInvocations"; +var _DMWETIR = "DescribeMaintenanceWindowExecutionTaskInvocationsRequest"; +var _DMWETIRe = "DescribeMaintenanceWindowExecutionTaskInvocationsResult"; +var _DMWETR = "DescribeMaintenanceWindowExecutionTasksRequest"; +var _DMWETRe = "DescribeMaintenanceWindowExecutionTasksResult"; +var _DMWFT = "DescribeMaintenanceWindowsForTarget"; +var _DMWFTR = "DescribeMaintenanceWindowsForTargetRequest"; +var _DMWFTRe = "DescribeMaintenanceWindowsForTargetResult"; +var _DMWR = "DeleteMaintenanceWindowRequest"; +var _DMWRe = "DeleteMaintenanceWindowResult"; +var _DMWRes = "DescribeMaintenanceWindowsRequest"; +var _DMWResc = "DescribeMaintenanceWindowsResult"; +var _DMWS = "DescribeMaintenanceWindowSchedule"; +var _DMWSR = "DescribeMaintenanceWindowScheduleRequest"; +var _DMWSRe = "DescribeMaintenanceWindowScheduleResult"; +var _DMWT = "DescribeMaintenanceWindowTargets"; +var _DMWTR = "DescribeMaintenanceWindowTargetsRequest"; +var _DMWTRe = "DescribeMaintenanceWindowTargetsResult"; +var _DMWTRes = "DescribeMaintenanceWindowTasksRequest"; +var _DMWTResc = "DescribeMaintenanceWindowTasksResult"; +var _DMWTe = "DescribeMaintenanceWindowTasks"; +var _DMWe = "DescribeMaintenanceWindows"; +var _DN = "DocumentName"; +var _DNEE = "DoesNotExistException"; +var _DNi = "DisplayName"; +var _DOI = "DeleteOpsItem"; +var _DOIR = "DeleteOpsItemRequest"; +var _DOIRI = "DisassociateOpsItemRelatedItem"; +var _DOIRIR = "DisassociateOpsItemRelatedItemRequest"; +var _DOIRIRi = "DisassociateOpsItemRelatedItemResponse"; +var _DOIRe = "DeleteOpsItemResponse"; +var _DOIRes = "DescribeOpsItemsRequest"; +var _DOIResc = "DescribeOpsItemsResponse"; +var _DOIe = "DescribeOpsItems"; +var _DOM = "DeleteOpsMetadata"; +var _DOMR = "DeleteOpsMetadataRequest"; +var _DOMRe = "DeleteOpsMetadataResult"; +var _DP = "DeletedParameters"; +var _DPB = "DeletePatchBaseline"; +var _DPBFPG = "DeregisterPatchBaselineForPatchGroup"; +var _DPBFPGR = "DeregisterPatchBaselineForPatchGroupRequest"; +var _DPBFPGRe = "DeregisterPatchBaselineForPatchGroupResult"; +var _DPBR = "DeletePatchBaselineRequest"; +var _DPBRe = "DeletePatchBaselineResult"; +var _DPBRes = "DescribePatchBaselinesRequest"; +var _DPBResc = "DescribePatchBaselinesResult"; +var _DPBe = "DescribePatchBaselines"; +var _DPG = "DescribePatchGroups"; +var _DPGR = "DescribePatchGroupsRequest"; +var _DPGRe = "DescribePatchGroupsResult"; +var _DPGS = "DescribePatchGroupState"; +var _DPGSR = "DescribePatchGroupStateRequest"; +var _DPGSRe = "DescribePatchGroupStateResult"; +var _DPL = "DocumentPermissionLimit"; +var _DPLo = "DocumentParameterList"; +var _DPP = "DescribePatchProperties"; +var _DPPR = "DescribePatchPropertiesRequest"; +var _DPPRe = "DescribePatchPropertiesResult"; +var _DPR = "DeleteParameterRequest"; +var _DPRe = "DeleteParameterResult"; +var _DPRel = "DeleteParametersRequest"; +var _DPRele = "DeleteParametersResult"; +var _DPRes = "DescribeParametersRequest"; +var _DPResc = "DescribeParametersResult"; +var _DPe = "DeleteParameter"; +var _DPel = "DeleteParameters"; +var _DPes = "DescribeParameters"; +var _DPo = "DocumentParameter"; +var _DR = "DryRun"; +var _DRCL = "DocumentReviewCommentList"; +var _DRCS = "DocumentReviewCommentSource"; +var _DRDS = "DeleteResourceDataSync"; +var _DRDSR = "DeleteResourceDataSyncRequest"; +var _DRDSRe = "DeleteResourceDataSyncResult"; +var _DRL = "DocumentRequiresList"; +var _DRP = "DeleteResourcePolicy"; +var _DRPR = "DeleteResourcePolicyRequest"; +var _DRPRe = "DeleteResourcePolicyResponse"; +var _DRRL = "DocumentReviewerResponseList"; +var _DRRS = "DocumentReviewerResponseSource"; +var _DRo = "DocumentRequires"; +var _DRoc = "DocumentReviews"; +var _DS = "DetailedStatus"; +var _DSR = "DescribeSessionsRequest"; +var _DSRe = "DescribeSessionsResponse"; +var _DST = "DeletionStartTime"; +var _DSe = "DeletionSummary"; +var _DSep = "DeploymentStatus"; +var _DSes = "DescribeSessions"; +var _DT = "DocumentType"; +var _DTFMW = "DeregisterTargetFromMaintenanceWindow"; +var _DTFMWR = "DeregisterTargetFromMaintenanceWindowRequest"; +var _DTFMWRe = "DeregisterTargetFromMaintenanceWindowResult"; +var _DTFMWRer = "DeregisterTaskFromMaintenanceWindowRequest"; +var _DTFMWRere = "DeregisterTaskFromMaintenanceWindowResult"; +var _DTFMWe = "DeregisterTaskFromMaintenanceWindow"; +var _DTOC = "DeliveryTimedOutCount"; +var _DTa = "DataType"; +var _DTe = "DetailType"; +var _DV = "DocumentVersion"; +var _DVI = "DocumentVersionInfo"; +var _DVL = "DocumentVersionList"; +var _DVLE = "DocumentVersionLimitExceeded"; +var _DVN = "DefaultVersionName"; +var _DVe = "DefaultVersion"; +var _DVef = "DefaultValue"; +var _DVo = "DocumentVersions"; +var _Da = "Date"; +var _Dat = "Data"; +var _De = "Details"; +var _Det = "Detail"; +var _Do = "Document"; +var _Du = "Duration"; +var _E = "Expired"; +var _EA = "ExpiresAfter"; +var _EAODS = "EnableAllOpsDataSources"; +var _EAn = "EndedAt"; +var _EAx = "ExcludeAccounts"; +var _EB = "ExecutedBy"; +var _EC = "ErrorCount"; +var _ECr = "ErrorCode"; +var _ED = "ExpirationDate"; +var _EDn = "EndDate"; +var _EDx = "ExecutionDate"; +var _EEDT = "ExecutionEndDateTime"; +var _EET = "ExecutionEndTime"; +var _EETx = "ExecutionElapsedTime"; +var _EI = "ExecutionId"; +var _EIv = "EventId"; +var _EIx = "ExecutionInputs"; +var _ENS = "EnableNonSecurity"; +var _EP = "EffectivePatches"; +var _EPI = "ExecutionPreviewId"; +var _EPL = "EffectivePatchList"; +var _EPf = "EffectivePatch"; +var _EPx = "ExecutionPreview"; +var _ERN = "ExecutionRoleName"; +var _ES = "ExecutionSummary"; +var _ESDT = "ExecutionStartDateTime"; +var _EST = "ExecutionStartTime"; +var _ET = "ExecutionTime"; +var _ETn = "EndTime"; +var _ETx = "ExecutionType"; +var _ETxp = "ExpirationTime"; +var _En = "Entries"; +var _Ena = "Enabled"; +var _Ent = "Entry"; +var _Enti = "Entities"; +var _Entit = "Entity"; +var _Ep = "Epoch"; +var _Ex = "Expression"; +var _F = "Failed"; +var _FC = "FailedCount"; +var _FCA = "FailedCreateAssociation"; +var _FCAE = "FailedCreateAssociationEntry"; +var _FCAL = "FailedCreateAssociationList"; +var _FD = "FailureDetails"; +var _FK = "FilterKey"; +var _FM = "FailureMessage"; +var _FNAE = "FeatureNotAvailableException"; +var _FS = "FailureStage"; +var _FSa = "FailedSteps"; +var _FT = "FailureType"; +var _FV = "FilterValues"; +var _FVi = "FilterValue"; +var _FWO = "FiltersWithOperator"; +var _Fa = "Fault"; +var _Fi = "Filters"; +var _Fo = "Force"; +var _G = "Groups"; +var _GAE = "GetAutomationExecution"; +var _GAER = "GetAutomationExecutionRequest"; +var _GAERe = "GetAutomationExecutionResult"; +var _GAT = "GetAccessToken"; +var _GATR = "GetAccessTokenRequest"; +var _GATRe = "GetAccessTokenResponse"; +var _GCC = "GetCloudConnector"; +var _GCCR = "GetCloudConnectorRequest"; +var _GCCRe = "GetCloudConnectorResult"; +var _GCI = "GetCommandInvocation"; +var _GCIR = "GetCommandInvocationRequest"; +var _GCIRe = "GetCommandInvocationResult"; +var _GCS = "GetCalendarState"; +var _GCSR = "GetCalendarStateRequest"; +var _GCSRe = "GetCalendarStateResponse"; +var _GCSRet = "GetConnectionStatusRequest"; +var _GCSReto = "GetConnectionStatusResponse"; +var _GCSe = "GetConnectionStatus"; +var _GD = "GetDocument"; +var _GDPB = "GetDefaultPatchBaseline"; +var _GDPBR = "GetDefaultPatchBaselineRequest"; +var _GDPBRe = "GetDefaultPatchBaselineResult"; +var _GDPSFI = "GetDeployablePatchSnapshotForInstance"; +var _GDPSFIR = "GetDeployablePatchSnapshotForInstanceRequest"; +var _GDPSFIRe = "GetDeployablePatchSnapshotForInstanceResult"; +var _GDR = "GetDocumentRequest"; +var _GDRe = "GetDocumentResult"; +var _GEP = "GetExecutionPreview"; +var _GEPR = "GetExecutionPreviewRequest"; +var _GEPRe = "GetExecutionPreviewResponse"; +var _GF = "GlobalFilters"; +var _GI = "GetInventory"; +var _GIR = "GetInventoryRequest"; +var _GIRe = "GetInventoryResult"; +var _GIS = "GetInventorySchema"; +var _GISR = "GetInventorySchemaRequest"; +var _GISRe = "GetInventorySchemaResult"; +var _GMW = "GetMaintenanceWindow"; +var _GMWE = "GetMaintenanceWindowExecution"; +var _GMWER = "GetMaintenanceWindowExecutionRequest"; +var _GMWERe = "GetMaintenanceWindowExecutionResult"; +var _GMWET = "GetMaintenanceWindowExecutionTask"; +var _GMWETI = "GetMaintenanceWindowExecutionTaskInvocation"; +var _GMWETIR = "GetMaintenanceWindowExecutionTaskInvocationRequest"; +var _GMWETIRe = "GetMaintenanceWindowExecutionTaskInvocationResult"; +var _GMWETR = "GetMaintenanceWindowExecutionTaskRequest"; +var _GMWETRe = "GetMaintenanceWindowExecutionTaskResult"; +var _GMWR = "GetMaintenanceWindowRequest"; +var _GMWRe = "GetMaintenanceWindowResult"; +var _GMWT = "GetMaintenanceWindowTask"; +var _GMWTR = "GetMaintenanceWindowTaskRequest"; +var _GMWTRe = "GetMaintenanceWindowTaskResult"; +var _GOI = "GetOpsItem"; +var _GOIR = "GetOpsItemRequest"; +var _GOIRe = "GetOpsItemResponse"; +var _GOM = "GetOpsMetadata"; +var _GOMR = "GetOpsMetadataRequest"; +var _GOMRe = "GetOpsMetadataResult"; +var _GOS = "GetOpsSummary"; +var _GOSR = "GetOpsSummaryRequest"; +var _GOSRe = "GetOpsSummaryResult"; +var _GP = "GetParameter"; +var _GPB = "GetPatchBaseline"; +var _GPBFPG = "GetPatchBaselineForPatchGroup"; +var _GPBFPGR = "GetPatchBaselineForPatchGroupRequest"; +var _GPBFPGRe = "GetPatchBaselineForPatchGroupResult"; +var _GPBP = "GetParametersByPath"; +var _GPBPR = "GetParametersByPathRequest"; +var _GPBPRe = "GetParametersByPathResult"; +var _GPBR = "GetPatchBaselineRequest"; +var _GPBRe = "GetPatchBaselineResult"; +var _GPH = "GetParameterHistory"; +var _GPHR = "GetParameterHistoryRequest"; +var _GPHRe = "GetParameterHistoryResult"; +var _GPR = "GetParameterRequest"; +var _GPRe = "GetParameterResult"; +var _GPRet = "GetParametersRequest"; +var _GPReta = "GetParametersResult"; +var _GPe = "GetParameters"; +var _GRP = "GetResourcePolicies"; +var _GRPR = "GetResourcePoliciesRequest"; +var _GRPRE = "GetResourcePoliciesResponseEntry"; +var _GRPREe = "GetResourcePoliciesResponseEntries"; +var _GRPRe = "GetResourcePoliciesResponse"; +var _GSS = "GetServiceSetting"; +var _GSSR = "GetServiceSettingRequest"; +var _GSSRe = "GetServiceSettingResult"; +var _H = "Hash"; +var _HC = "HighCount"; +var _HLLEE = "HierarchyLevelLimitExceededException"; +var _HT = "HashType"; +var _HTME = "HierarchyTypeMismatchException"; +var _I = "Id"; +var _IA = "InvalidActivation"; +var _IAAO = "InstanceAggregatedAssociationOverview"; +var _IAE = "InvalidAggregatorException"; +var _IAEPE = "InvalidAutomationExecutionParametersException"; +var _IAI = "InvalidActivationId"; +var _IAL = "InstanceAssociationList"; +var _IALn = "InventoryAggregatorList"; +var _IAOL = "InstanceAssociationOutputLocation"; +var _IAOU = "InstanceAssociationOutputUrl"; +var _IAPE = "InvalidAllowedPatternException"; +var _IASAC = "InstanceAssociationStatusAggregatedCount"; +var _IASE = "InvalidAutomationSignalException"; +var _IASI = "InstanceAssociationStatusInfos"; +var _IASIn = "InstanceAssociationStatusInfo"; +var _IASUE = "InvalidAutomationStatusUpdateException"; +var _IAV = "InvalidAssociationVersion"; +var _IAn = "InvalidAssociation"; +var _IAns = "InstanceAssociation"; +var _IAnv = "InventoryAggregator"; +var _IAp = "IpAddress"; +var _IC = "InstalledCount"; +var _ICH = "ItemContentHash"; +var _ICI = "InvalidCommandId"; +var _ICME = "ItemContentMismatchException"; +var _ICOU = "IncludeChildOrganizationUnits"; +var _ICn = "InformationalCount"; +var _ICs = "IsCritical"; +var _ID = "InvalidDocument"; +var _IDC = "InvalidDocumentContent"; +var _IDIE = "InvalidDeletionIdException"; +var _IDIPE = "InvalidDeleteInventoryParametersException"; +var _IDL = "InventoryDeletionsList"; +var _IDNE = "InvocationDoesNotExist"; +var _IDO = "InvalidDocumentOperation"; +var _IDS = "InventoryDeletionSummary"; +var _IDSI = "InventoryDeletionStatusItem"; +var _IDSIn = "InventoryDeletionSummaryItem"; +var _IDSInv = "InventoryDeletionSummaryItems"; +var _IDSV = "InvalidDocumentSchemaVersion"; +var _IDT = "InvalidDocumentType"; +var _IDV = "InvalidDocumentVersion"; +var _IDVs = "IsDefaultVersion"; +var _IDn = "InventoryDeletions"; +var _IE = "IsEnd"; +var _IF = "InvalidFilter"; +var _IFK = "InvalidFilterKey"; +var _IFL = "InventoryFilterList"; +var _IFO = "InvalidFilterOption"; +var _IFR = "IncludeFutureRegions"; +var _IFV = "InvalidFilterValue"; +var _IFVL = "InventoryFilterValueList"; +var _IFn = "InventoryFilter"; +var _IG = "InventoryGroup"; +var _IGL = "InventoryGroupList"; +var _II = "InstanceId"; +var _IIA = "InventoryItemAttribute"; +var _IIAL = "InventoryItemAttributeList"; +var _IICE = "InvalidItemContentException"; +var _IIEL = "InventoryItemEntryList"; +var _IIF = "InstanceInformationFilter"; +var _IIFL = "InstanceInformationFilterList"; +var _IIFV = "InstanceInformationFilterValue"; +var _IIFVS = "InstanceInformationFilterValueSet"; +var _IIGE = "InvalidInventoryGroupException"; +var _III = "InvalidInstanceId"; +var _IIICE = "InvalidInventoryItemContextException"; +var _IIIFV = "InvalidInstanceInformationFilterValue"; +var _IIL = "InstanceInformationList"; +var _IILn = "InventoryItemList"; +var _IIPFV = "InvalidInstancePropertyFilterValue"; +var _IIRE = "InvalidInventoryRequestException"; +var _IIS = "InventoryItemSchema"; +var _IISF = "InstanceInformationStringFilter"; +var _IISFL = "InstanceInformationStringFilterList"; +var _IISRL = "InventoryItemSchemaResultList"; +var _IIn = "InstanceIds"; +var _IIns = "InstanceInfo"; +var _IInst = "InstanceInformation"; +var _IInv = "InvocationId"; +var _IInve = "InventoryItem"; +var _IKI = "InvalidKeyId"; +var _IL = "InvalidLabels"; +var _ILV = "IsLatestVersion"; +var _IN = "InstanceName"; +var _INC = "InvalidNotificationConfig"; +var _INT = "InvalidNextToken"; +var _IOC = "InstalledOtherCount"; +var _IOE = "InvalidOptionException"; +var _IOF = "InvalidOutputFolder"; +var _IOL = "InvalidOutputLocation"; +var _IOLn = "InstallOverrideList"; +var _IP = "InvalidParameters"; +var _IPA = "IPAddress"; +var _IPAE = "InvalidPolicyAttributeException"; +var _IPAF = "IgnorePollAlarmFailure"; +var _IPE = "IncompatiblePolicyException"; +var _IPF = "InstancePropertyFilter"; +var _IPFL = "InstancePropertyFilterList"; +var _IPFV = "InstancePropertyFilterValue"; +var _IPFVS = "InstancePropertyFilterValueSet"; +var _IPM = "IdempotentParameterMismatch"; +var _IPN = "InvalidPluginName"; +var _IPRC = "InstalledPendingRebootCount"; +var _IPS = "InstancePatchStates"; +var _IPSF = "InstancePatchStateFilter"; +var _IPSFL = "InstancePatchStateFilterList"; +var _IPSFLn = "InstancePropertyStringFilterList"; +var _IPSFn = "InstancePropertyStringFilter"; +var _IPSL = "InstancePatchStateList"; +var _IPSLn = "InstancePatchStatesList"; +var _IPSn = "InstancePatchState"; +var _IPT = "InvalidPermissionType"; +var _IPTE = "InvalidPolicyTypeException"; +var _IPn = "InstanceProperties"; +var _IPns = "InstanceProperty"; +var _IR = "InvalidRole"; +var _IRAE = "InvalidResultAttributeException"; +var _IRC = "InstalledRejectedCount"; +var _IRE = "InventoryResultEntity"; +var _IREL = "InventoryResultEntityList"; +var _IRI = "InvalidResourceId"; +var _IRIM = "InventoryResultItemMap"; +var _IRIn = "InventoryResultItem"; +var _IRT = "InvalidResourceType"; +var _IRa = "IamRole"; +var _IRn = "InstanceRole"; +var _IS = "InvalidSchedule"; +var _ISE = "InternalServerError"; +var _ISLEE = "ItemSizeLimitExceededException"; +var _ISn = "InstanceStatus"; +var _ISns = "InstanceState"; +var _IT = "InvalidTag"; +var _ITM = "InvalidTargetMaps"; +var _ITNE = "InvalidTypeNameException"; +var _ITn = "InvalidTarget"; +var _ITns = "InstanceType"; +var _ITnst = "InstalledTime"; +var _IU = "InvalidUpdate"; +var _IV = "IteratorValue"; +var _IWASU = "InstancesWithAvailableSecurityUpdates"; +var _IWCNCP = "InstancesWithCriticalNonCompliantPatches"; +var _IWFP = "InstancesWithFailedPatches"; +var _IWIOP = "InstancesWithInstalledOtherPatches"; +var _IWIP = "InstancesWithInstalledPatches"; +var _IWIPRP = "InstancesWithInstalledPendingRebootPatches"; +var _IWIRP = "InstancesWithInstalledRejectedPatches"; +var _IWMP = "InstancesWithMissingPatches"; +var _IWNAP = "InstancesWithNotApplicablePatches"; +var _IWONCP = "InstancesWithOtherNonCompliantPatches"; +var _IWSNCP = "InstancesWithSecurityNonCompliantPatches"; +var _IWUNAP = "InstancesWithUnreportedNotApplicablePatches"; +var _In = "Instances"; +var _Inp = "Input"; +var _Inpu = "Inputs"; +var _Ins = "Instance"; +var _It = "Iteration"; +var _Ite = "Items"; +var _Item = "Item"; +var _K = "Key"; +var _KBI = "KBId"; +var _KI = "KeyId"; +var _KN = "KeyName"; +var _KNb = "KbNumber"; +var _KTD = "KeysToDelete"; +var _L = "Limit"; +var _LA = "ListAssociations"; +var _LAED = "LastAssociationExecutionDate"; +var _LAR = "ListAssociationsRequest"; +var _LARi = "ListAssociationsResult"; +var _LAV = "ListAssociationVersions"; +var _LAVR = "ListAssociationVersionsRequest"; +var _LAVRi = "ListAssociationVersionsResult"; +var _LC = "LowCount"; +var _LCC = "ListCloudConnectors"; +var _LCCR = "ListCloudConnectorsRequest"; +var _LCCRi = "ListCloudConnectorsResult"; +var _LCI = "ListCommandInvocations"; +var _LCIR = "ListCommandInvocationsRequest"; +var _LCIRi = "ListCommandInvocationsResult"; +var _LCIRis = "ListComplianceItemsRequest"; +var _LCIRist = "ListComplianceItemsResult"; +var _LCIi = "ListComplianceItems"; +var _LCR = "ListCommandsRequest"; +var _LCRi = "ListCommandsResult"; +var _LCS = "ListComplianceSummaries"; +var _LCSR = "ListComplianceSummariesRequest"; +var _LCSRi = "ListComplianceSummariesResult"; +var _LCi = "ListCommands"; +var _LD = "ListDocuments"; +var _LDMH = "ListDocumentMetadataHistory"; +var _LDMHR = "ListDocumentMetadataHistoryRequest"; +var _LDMHRi = "ListDocumentMetadataHistoryResponse"; +var _LDR = "ListDocumentsRequest"; +var _LDRi = "ListDocumentsResult"; +var _LDV = "ListDocumentVersions"; +var _LDVR = "ListDocumentVersionsRequest"; +var _LDVRi = "ListDocumentVersionsResult"; +var _LED = "LastExecutionDate"; +var _LF = "LogFile"; +var _LI = "LoggingInfo"; +var _LIE = "ListInventoryEntries"; +var _LIER = "ListInventoryEntriesRequest"; +var _LIERi = "ListInventoryEntriesResult"; +var _LMB = "LastModifiedBy"; +var _LMD = "LastModifiedDate"; +var _LMT = "LastModifiedTime"; +var _LMU = "LastModifiedUser"; +var _LN = "ListNodes"; +var _LNR = "ListNodesRequest"; +var _LNRIOT = "LastNoRebootInstallOperationTime"; +var _LNRi = "ListNodesResult"; +var _LNS = "ListNodesSummary"; +var _LNSR = "ListNodesSummaryRequest"; +var _LNSRi = "ListNodesSummaryResult"; +var _LOIE = "ListOpsItemEvents"; +var _LOIER = "ListOpsItemEventsRequest"; +var _LOIERi = "ListOpsItemEventsResponse"; +var _LOIRI = "ListOpsItemRelatedItems"; +var _LOIRIR = "ListOpsItemRelatedItemsRequest"; +var _LOIRIRi = "ListOpsItemRelatedItemsResponse"; +var _LOM = "ListOpsMetadata"; +var _LOMR = "ListOpsMetadataRequest"; +var _LOMRi = "ListOpsMetadataResult"; +var _LPDT = "LastPingDateTime"; +var _LPV = "LabelParameterVersion"; +var _LPVR = "LabelParameterVersionRequest"; +var _LPVRa = "LabelParameterVersionResult"; +var _LRCS = "ListResourceComplianceSummaries"; +var _LRCSR = "ListResourceComplianceSummariesRequest"; +var _LRCSRi = "ListResourceComplianceSummariesResult"; +var _LRDS = "ListResourceDataSync"; +var _LRDSR = "ListResourceDataSyncRequest"; +var _LRDSRi = "ListResourceDataSyncResult"; +var _LS = "LastStatus"; +var _LSAED = "LastSuccessfulAssociationExecutionDate"; +var _LSED = "LastSuccessfulExecutionDate"; +var _LSM = "LastStatusMessage"; +var _LSSM = "LastSyncStatusMessage"; +var _LSST = "LastSuccessfulSyncTime"; +var _LST = "LastSyncTime"; +var _LSUT = "LastStatusUpdateTime"; +var _LT = "LimitType"; +var _LTFR = "ListTagsForResource"; +var _LTFRR = "ListTagsForResourceRequest"; +var _LTFRRi = "ListTagsForResourceResult"; +var _LTa = "LaunchTime"; +var _LUAD = "LastUpdateAssociationDate"; +var _LV = "LatestVersion"; +var _La = "Labels"; +var _Lam = "Lambda"; +var _Lan = "Language"; +var _M = "Message"; +var _MA = "MaxAttempts"; +var _MC = "MaxConcurrency"; +var _MCe = "MediumCount"; +var _MCi = "MissingCount"; +var _MD = "ModifiedDate"; +var _MDP = "ModifyDocumentPermission"; +var _MDPR = "ModifyDocumentPermissionRequest"; +var _MDPRo = "ModifyDocumentPermissionResponse"; +var _MDSE = "MaxDocumentSizeExceeded"; +var _ME = "MaxErrors"; +var _MM = "MetadataMap"; +var _MN = "MsrcNumber"; +var _MR = "MaxResults"; +var _MRPDE = "MalformedResourcePolicyDocumentException"; +var _MS = "ManagedStatus"; +var _MSD = "MaxSessionDuration"; +var _MSs = "MsrcSeverity"; +var _MTU = "MetadataToUpdate"; +var _MV = "MetadataValue"; +var _MWAP = "MaintenanceWindowAutomationParameters"; +var _MWD = "MaintenanceWindowDescription"; +var _MWE = "MaintenanceWindowExecution"; +var _MWEL = "MaintenanceWindowExecutionList"; +var _MWETI = "MaintenanceWindowExecutionTaskIdentity"; +var _MWETII = "MaintenanceWindowExecutionTaskInvocationIdentity"; +var _MWETIIL = "MaintenanceWindowExecutionTaskInvocationIdentityList"; +var _MWETIL = "MaintenanceWindowExecutionTaskIdentityList"; +var _MWETIP = "MaintenanceWindowExecutionTaskInvocationParameters"; +var _MWF = "MaintenanceWindowFilter"; +var _MWFL = "MaintenanceWindowFilterList"; +var _MWFTL = "MaintenanceWindowsForTargetList"; +var _MWI = "MaintenanceWindowIdentity"; +var _MWIFT = "MaintenanceWindowIdentityForTarget"; +var _MWIL = "MaintenanceWindowIdentityList"; +var _MWLP = "MaintenanceWindowLambdaPayload"; +var _MWLPa = "MaintenanceWindowLambdaParameters"; +var _MWRCP = "MaintenanceWindowRunCommandParameters"; +var _MWSFI = "MaintenanceWindowStepFunctionsInput"; +var _MWSFP = "MaintenanceWindowStepFunctionsParameters"; +var _MWT = "MaintenanceWindowTarget"; +var _MWTIP = "MaintenanceWindowTaskInvocationParameters"; +var _MWTL = "MaintenanceWindowTargetList"; +var _MWTLa = "MaintenanceWindowTaskList"; +var _MWTP = "MaintenanceWindowTaskParameters"; +var _MWTPL = "MaintenanceWindowTaskParametersList"; +var _MWTPV = "MaintenanceWindowTaskParameterValue"; +var _MWTPVE = "MaintenanceWindowTaskParameterValueExpression"; +var _MWTPVL = "MaintenanceWindowTaskParameterValueList"; +var _MWTa = "MaintenanceWindowTask"; +var _Ma = "Mappings"; +var _Me = "Metadata"; +var _Mo = "Mode"; +var _N = "Name"; +var _NA = "NodeAggregator"; +var _NAC = "NotApplicableCount"; +var _NAL = "NodeAggregatorList"; +var _NAo = "NotificationArn"; +var _NC = "NotificationConfig"; +var _NCC = "NonCompliantCount"; +var _NCS = "NonCompliantSummary"; +var _NE = "NotificationEvents"; +var _NET = "NextExecutionTime"; +var _NF = "NodeFilter"; +var _NFL = "NodeFilterList"; +var _NFVL = "NodeFilterValueList"; +var _NL = "NodeList"; +var _NLSE = "NoLongerSupportedException"; +var _NOI = "NodeOwnerInfo"; +var _NS = "NextStep"; +var _NSL = "NodeSummaryList"; +var _NT = "NextToken"; +var _NTT = "NextTransitionTime"; +var _NTo = "NodeType"; +var _NTot = "NotificationType"; +var _Na = "Names"; +var _No = "Notifications"; +var _Nod = "Nodes"; +var _Node = "Node"; +var _O = "Overview"; +var _OA = "OpsAggregator"; +var _OAL = "OpsAggregatorList"; +var _OD = "OperationalData"; +var _ODTD = "OperationalDataToDelete"; +var _OE = "OpsEntity"; +var _OEI = "OpsEntityItem"; +var _OEIEL = "OpsEntityItemEntryList"; +var _OEIM = "OpsEntityItemMap"; +var _OEL = "OpsEntityList"; +var _OET = "OperationEndTime"; +var _OF = "OpsFilter"; +var _OFL = "OpsFilterList"; +var _OFVL = "OpsFilterValueList"; +var _OFn = "OnFailure"; +var _OI = "OwnerInformation"; +var _OIA = "OpsItemArn"; +var _OIADE = "OpsItemAccessDeniedException"; +var _OIAEE = "OpsItemAlreadyExistsException"; +var _OICE = "OpsItemConflictException"; +var _OIDV = "OpsItemDataValue"; +var _OIEF = "OpsItemEventFilter"; +var _OIEFp = "OpsItemEventFilters"; +var _OIES = "OpsItemEventSummary"; +var _OIESp = "OpsItemEventSummaries"; +var _OIF = "OpsItemFilters"; +var _OIFp = "OpsItemFilter"; +var _OII = "OpsItemId"; +var _OIIPE = "OpsItemInvalidParameterException"; +var _OIIp = "OpsItemIdentity"; +var _OILEE = "OpsItemLimitExceededException"; +var _OIN = "OpsItemNotification"; +var _OINFE = "OpsItemNotFoundException"; +var _OINp = "OpsItemNotifications"; +var _OIOD = "OpsItemOperationalData"; +var _OIRIAEE = "OpsItemRelatedItemAlreadyExistsException"; +var _OIRIANFE = "OpsItemRelatedItemAssociationNotFoundException"; +var _OIRIF = "OpsItemRelatedItemsFilter"; +var _OIRIFp = "OpsItemRelatedItemsFilters"; +var _OIRIS = "OpsItemRelatedItemSummary"; +var _OIRISp = "OpsItemRelatedItemSummaries"; +var _OIS = "OpsItemSummaries"; +var _OISp = "OpsItemSummary"; +var _OIT = "OpsItemType"; +var _OIp = "OpsItem"; +var _OL = "OutputLocation"; +var _OM = "OpsMetadata"; +var _OMA = "OpsMetadataArn"; +var _OMAEE = "OpsMetadataAlreadyExistsException"; +var _OMF = "OpsMetadataFilter"; +var _OMFL = "OpsMetadataFilterList"; +var _OMIAE = "OpsMetadataInvalidArgumentException"; +var _OMKLEE = "OpsMetadataKeyLimitExceededException"; +var _OML = "OpsMetadataList"; +var _OMLEE = "OpsMetadataLimitExceededException"; +var _OMNFE = "OpsMetadataNotFoundException"; +var _OMTMUE = "OpsMetadataTooManyUpdatesException"; +var _ONCC = "OtherNonCompliantCount"; +var _OP = "OverriddenParameters"; +var _ORA = "OpsResultAttribute"; +var _ORAL = "OpsResultAttributeList"; +var _OS = "OutputSource"; +var _OSBN = "OutputS3BucketName"; +var _OSI = "OutputSourceId"; +var _OSKP = "OutputS3KeyPrefix"; +var _OSR = "OutputS3Region"; +var _OST = "OperationStartTime"; +var _OSTr = "OrganizationSourceType"; +var _OSTu = "OutputSourceType"; +var _OSp = "OperatingSystem"; +var _OSv = "OverallSeverity"; +var _OU = "OutputUrl"; +var _OUI = "OrganizationalUnitId"; +var _OUP = "OrganizationalUnitPath"; +var _OUr = "OrganizationalUnits"; +var _Op = "Operation"; +var _Ope = "Operator"; +var _Opt = "Option"; +var _Ou = "Outputs"; +var _Out = "Output"; +var _Ov = "Overwrite"; +var _Ow = "Owner"; +var _P = "Parameters"; +var _PAE = "ParameterAlreadyExists"; +var _PAEI = "ParentAutomationExecutionId"; +var _PBI = "PatchBaselineIdentity"; +var _PBIL = "PatchBaselineIdentityList"; +var _PC = "ProgressCounters"; +var _PCD = "PatchComplianceData"; +var _PCDL = "PatchComplianceDataList"; +var _PCI = "PutComplianceItems"; +var _PCIR = "PutComplianceItemsRequest"; +var _PCIRu = "PutComplianceItemsResult"; +var _PET = "PlannedEndTime"; +var _PF = "ParameterFilters"; +var _PFG = "PatchFilterGroup"; +var _PFL = "ParametersFilterList"; +var _PFLa = "PatchFilterList"; +var _PFa = "ParametersFilter"; +var _PFat = "PatchFilter"; +var _PFatc = "PatchFilters"; +var _PFr = "ProductFamily"; +var _PG = "PatchGroup"; +var _PGPBM = "PatchGroupPatchBaselineMapping"; +var _PGPBML = "PatchGroupPatchBaselineMappingList"; +var _PGa = "PatchGroups"; +var _PH = "PolicyHash"; +var _PHL = "ParameterHistoryList"; +var _PHa = "ParameterHistory"; +var _PI = "PolicyId"; +var _PIP = "ParameterInlinePolicy"; +var _PIR = "PutInventoryRequest"; +var _PIRu = "PutInventoryResult"; +var _PIu = "PutInventory"; +var _PL = "ParameterList"; +var _PLE = "ParameterLimitExceeded"; +var _PLEE = "PoliciesLimitExceededException"; +var _PLa = "PatchList"; +var _PM = "ParameterMetadata"; +var _PML = "ParameterMetadataList"; +var _PMVLE = "ParameterMaxVersionLimitExceeded"; +var _PMr = "ProviderMessage"; +var _PN = "ParameterNames"; +var _PNF = "ParameterNotFound"; +var _PNl = "PluginName"; +var _PNla = "PlatformName"; +var _POF = "PatchOrchestratorFilter"; +var _POFL = "PatchOrchestratorFilterList"; +var _PP = "PutParameter"; +var _PPL = "PatchPropertiesList"; +var _PPLa = "ParameterPolicyList"; +var _PPME = "ParameterPatternMismatchException"; +var _PPR = "PutParameterRequest"; +var _PPRu = "PutParameterResult"; +var _PR = "PatchRule"; +var _PRG = "PatchRuleGroup"; +var _PRL = "PatchRuleList"; +var _PRP = "PutResourcePolicy"; +var _PRPR = "PutResourcePolicyRequest"; +var _PRPRu = "PutResourcePolicyResponse"; +var _PRV = "PendingReviewVersion"; +var _PRa = "PatchRules"; +var _PS = "PatchSet"; +var _PSC = "PatchSourceConfiguration"; +var _PSD = "ParentStepDetails"; +var _PSF = "ParameterStringFilter"; +var _PSFL = "ParameterStringFilterList"; +var _PSL = "PatchSourceList"; +var _PSPV = "PSParameterValue"; +var _PST = "PlannedStartTime"; +var _PSa = "PatchStatus"; +var _PSat = "PatchSource"; +var _PSi = "PingStatus"; +var _PSo = "PolicyStatus"; +var _PT = "PermissionType"; +var _PTL = "PlatformTypeList"; +var _PTl = "PlatformTypes"; +var _PTla = "PlatformType"; +var _PTo = "PolicyText"; +var _PTol = "PolicyType"; +var _PV = "PlatformVersion"; +var _PVLLE = "ParameterVersionLabelLimitExceeded"; +var _PVNF = "ParameterVersionNotFound"; +var _PVa = "ParameterVersion"; +var _PVar = "ParameterValues"; +var _Pa = "Patches"; +var _Par = "Parameter"; +var _Pat = "Patch"; +var _Path = "Path"; +var _Pay = "Payload"; +var _Po = "Policies"; +var _Pol = "Policy"; +var _Pr = "Priority"; +var _Pre = "Prefix"; +var _Pro = "Property"; +var _Prod = "Product"; +var _Produ = "Products"; +var _Prop = "Properties"; +var _Q = "Qualifier"; +var _QC = "QuotaCode"; +var _R = "Runbooks"; +var _RA = "RoleArn"; +var _RAL = "ResultAttributeList"; +var _RAe = "ResourceArn"; +var _RAes = "ResultAttributes"; +var _RAesu = "ResultAttribute"; +var _RC = "ReasonCode"; +var _RCBS = "ResourceCountByStatus"; +var _RCSI = "ResourceComplianceSummaryItems"; +var _RCSIL = "ResourceComplianceSummaryItemList"; +var _RCSIe = "ResourceComplianceSummaryItem"; +var _RCe = "RegistrationsCount"; +var _RCem = "RemainingCount"; +var _RCes = "ResponseCode"; +var _RCu = "RunCommand"; +var _RD = "RegistrationDate"; +var _RDPB = "RegisterDefaultPatchBaseline"; +var _RDPBR = "RegisterDefaultPatchBaselineRequest"; +var _RDPBRe = "RegisterDefaultPatchBaselineResult"; +var _RDSAEE = "ResourceDataSyncAlreadyExistsException"; +var _RDSAOS = "ResourceDataSyncAwsOrganizationsSource"; +var _RDSCE = "ResourceDataSyncConflictException"; +var _RDSCEE = "ResourceDataSyncCountExceededException"; +var _RDSDDS = "ResourceDataSyncDestinationDataSharing"; +var _RDSI = "ResourceDataSyncItems"; +var _RDSICE = "ResourceDataSyncInvalidConfigurationException"; +var _RDSIL = "ResourceDataSyncItemList"; +var _RDSIe = "ResourceDataSyncItem"; +var _RDSNFE = "ResourceDataSyncNotFoundException"; +var _RDSOU = "ResourceDataSyncOrganizationalUnit"; +var _RDSOUL = "ResourceDataSyncOrganizationalUnitList"; +var _RDSS = "ResourceDataSyncSource"; +var _RDSSD = "ResourceDataSyncS3Destination"; +var _RDSSWS = "ResourceDataSyncSourceWithState"; +var _RDT = "RequestedDateTime"; +var _RDe = "ReleaseDate"; +var _RFDT = "ResponseFinishDateTime"; +var _RI = "ResourceId"; +var _RIL = "ReviewInformationList"; +var _RIUE = "ResourceInUseException"; +var _RIe = "ReviewInformation"; +var _RIes = "ResourceIds"; +var _RL = "RegistrationLimit"; +var _RLEE = "ResourceLimitExceededException"; +var _RLe = "RemovedLabels"; +var _RM = "RegistrationMetadata"; +var _RMI = "RegistrationMetadataItem"; +var _RML = "RegistrationMetadataList"; +var _RNFE = "ResourceNotFoundException"; +var _RO = "ReverseOrder"; +var _ROI = "RelatedOpsItems"; +var _ROIe = "RelatedOpsItem"; +var _ROe = "RebootOption"; +var _RP = "RejectedPatches"; +var _RPA = "RejectedPatchesAction"; +var _RPBFPG = "RegisterPatchBaselineForPatchGroup"; +var _RPBFPGR = "RegisterPatchBaselineForPatchGroupRequest"; +var _RPBFPGRe = "RegisterPatchBaselineForPatchGroupResult"; +var _RPCE = "ResourcePolicyConflictException"; +var _RPIPE = "ResourcePolicyInvalidParameterException"; +var _RPLEE = "ResourcePolicyLimitExceededException"; +var _RPNFE = "ResourcePolicyNotFoundException"; +var _RR = "ReviewerResponse"; +var _RS = "ReviewStatus"; +var _RSDT = "ResponseStartDateTime"; +var _RSR = "ResumeSessionRequest"; +var _RSRe = "ResumeSessionResponse"; +var _RSS = "ResetServiceSetting"; +var _RSSR = "ResetServiceSettingRequest"; +var _RSSRe = "ResetServiceSettingResult"; +var _RSe = "ResumeSession"; +var _RT = "ResourceTypes"; +var _RTFR = "RemoveTagsFromResource"; +var _RTFRR = "RemoveTagsFromResourceRequest"; +var _RTFRRe = "RemoveTagsFromResourceResult"; +var _RTWMW = "RegisterTargetWithMaintenanceWindow"; +var _RTWMWR = "RegisterTargetWithMaintenanceWindowRequest"; +var _RTWMWRe = "RegisterTargetWithMaintenanceWindowResult"; +var _RTWMWReg = "RegisterTaskWithMaintenanceWindowRequest"; +var _RTWMWRegi = "RegisterTaskWithMaintenanceWindowResult"; +var _RTWMWe = "RegisterTaskWithMaintenanceWindow"; +var _RTe = "ResourceType"; +var _RTeq = "RequireType"; +var _RTes = "ResolvedTargets"; +var _RTev = "ReviewedTime"; +var _RU = "ResourceUri"; +var _Re = "Regions"; +var _Rea = "Reason"; +var _Rec = "Recursive"; +var _Reg = "Region"; +var _Rel = "Release"; +var _Rep = "Repository"; +var _Repl = "Replace"; +var _Req = "Requires"; +var _Res = "Response"; +var _Rev = "Reviewer"; +var _Ru = "Runbook"; +var _S = "State"; +var _SAE = "StartAutomationExecution"; +var _SAER = "StartAutomationExecutionRequest"; +var _SAERt = "StartAutomationExecutionResult"; +var _SAERto = "StopAutomationExecutionRequest"; +var _SAERtop = "StopAutomationExecutionResult"; +var _SAEt = "StopAutomationExecution"; +var _SAK = "SecretAccessKey"; +var _SAO = "StartAssociationsOnce"; +var _SAOR = "StartAssociationsOnceRequest"; +var _SAORt = "StartAssociationsOnceResult"; +var _SAR = "StartAccessRequest"; +var _SARR = "StartAccessRequestRequest"; +var _SARRt = "StartAccessRequestResponse"; +var _SAS = "SendAutomationSignal"; +var _SASR = "SendAutomationSignalRequest"; +var _SASRe = "SendAutomationSignalResult"; +var _SBN = "S3BucketName"; +var _SC = "ServiceCode"; +var _SCR = "SendCommandRequest"; +var _SCRE = "StartChangeRequestExecution"; +var _SCRER = "StartChangeRequestExecutionRequest"; +var _SCRERt = "StartChangeRequestExecutionResult"; +var _SCRe = "SendCommandResult"; +var _SCT = "SyncCreatedTime"; +var _SCe = "SendCommand"; +var _SCy = "SyncCompliance"; +var _SD = "StatusDetails"; +var _SDO = "SchemaDeleteOption"; +var _SDU = "SnapshotDownloadUrl"; +var _SDV = "SharedDocumentVersion"; +var _SDe = "S3Destination"; +var _SDt = "StartDate"; +var _SE = "ScheduleExpression"; +var _SEC = "StandardErrorContent"; +var _SEF = "StepExecutionFilter"; +var _SEFL = "StepExecutionFilterList"; +var _SEI = "StepExecutionId"; +var _SEL = "StepExecutionList"; +var _SEP = "StartExecutionPreview"; +var _SEPR = "StartExecutionPreviewRequest"; +var _SEPRt = "StartExecutionPreviewResponse"; +var _SET = "StepExecutionsTruncated"; +var _SETc = "ScheduledEndTime"; +var _SEU = "StandardErrorUrl"; +var _SEt = "StepExecutions"; +var _SEte = "StepExecution"; +var _SF = "StepFunctions"; +var _SFL = "SessionFilterList"; +var _SFe = "SessionFilter"; +var _SFy = "SyncFormat"; +var _SI = "StatusInformation"; +var _SIe = "SettingId"; +var _SIes = "SessionId"; +var _SIn = "SnapshotId"; +var _SIo = "SourceId"; +var _SIu = "SummaryItems"; +var _SKP = "S3KeyPrefix"; +var _SL = "S3Location"; +var _SLMT = "SyncLastModifiedTime"; +var _SLe = "SessionList"; +var _SLo = "SourceLocation"; +var _SM = "StatusMessage"; +var _SMOU = "SessionManagerOutputUrl"; +var _SMP = "SessionManagerParameters"; +var _SN = "SyncName"; +var _SNCC = "SecurityNonCompliantCount"; +var _SNt = "StepName"; +var _SO = "ScheduleOffset"; +var _SOC = "StandardOutputContent"; +var _SOL = "S3OutputLocation"; +var _SOU = "StandardOutputUrl"; +var _SOUu = "S3OutputUrl"; +var _SP = "StepPreviews"; +var _SQEE = "ServiceQuotaExceededException"; +var _SR = "ServiceRole"; +var _SRA = "ServiceRoleArn"; +var _SRe = "S3Region"; +var _SRo = "SourceResult"; +var _SRou = "SourceRegions"; +var _SS = "SeveritySummary"; +var _SSNF = "ServiceSettingNotFound"; +var _SSR = "StartSessionRequest"; +var _SSRt = "StartSessionResponse"; +var _SSe = "ServiceSetting"; +var _SSt = "StepStatus"; +var _SSta = "StartSession"; +var _SSu = "SuccessSteps"; +var _SSy = "SyncSource"; +var _ST = "SyncType"; +var _STCLEE = "SubTypeCountLimitExceededException"; +var _STT = "SessionTokenType"; +var _STc = "ScheduledTime"; +var _STch = "ScheduleTimezone"; +var _STe = "SessionToken"; +var _STi = "SignalType"; +var _STo = "SourceType"; +var _STt = "StartTime"; +var _STu = "SubType"; +var _SU = "StatusUnchanged"; +var _SUt = "StreamUrl"; +var _SV = "SchemaVersion"; +var _SVe = "SettingValue"; +var _SWE = "ScheduledWindowExecutions"; +var _SWEL = "ScheduledWindowExecutionList"; +var _SWEc = "ScheduledWindowExecution"; +var _Sa = "Safe"; +var _Sc = "Schedule"; +var _Sch = "Schemas"; +var _Sco = "Scope"; +var _Se = "Severity"; +var _Sel = "Selector"; +var _Ses = "Sessions"; +var _Sess = "Session"; +var _Sh = "Shared"; +var _Sha = "Sha1"; +var _Si = "Size"; +var _So = "Sources"; +var _Sou = "Source"; +var _St = "Status"; +var _Su = "Successful"; +var _Sub = "Subscriptions"; +var _Sum = "Summary"; +var _Summ = "Summaries"; +var _T = "Tags"; +var _TA = "TriggeredAlarms"; +var _TAa = "TaskArn"; +var _TAo = "TotalAccounts"; +var _TC = "TargetCount"; +var _TCo = "TotalCount"; +var _TDN = "TenantDisplayName"; +var _TE = "ThrottlingException"; +var _TEI = "TaskExecutionId"; +var _TI = "TenantId"; +var _TIP = "TaskInvocationParameters"; +var _TIUE = "TargetInUseException"; +var _TIa = "TaskId"; +var _TIas = "TaskIds"; +var _TK = "TagKeys"; +var _TL = "TargetLocations"; +var _TLAC = "TargetLocationAlarmConfiguration"; +var _TLMC = "TargetLocationMaxConcurrency"; +var _TLME = "TargetLocationMaxErrors"; +var _TLURL = "TargetLocationsURL"; +var _TLa = "TagList"; +var _TLar = "TargetLocation"; +var _TM = "TargetMaps"; +var _TMC = "TargetsMaxConcurrency"; +var _TME = "TargetsMaxErrors"; +var _TMTE = "TooManyTagsError"; +var _TMU = "TooManyUpdates"; +var _TMa = "TargetMap"; +var _TN = "TypeName"; +var _TNC = "TargetNotConnected"; +var _TO = "TraceOutput"; +var _TOS = "TimedOutSteps"; +var _TP = "TargetPreviews"; +var _TPL = "TargetPreviewList"; +var _TPN = "TargetParameterName"; +var _TPa = "TaskParameters"; +var _TPar = "TargetPreview"; +var _TS = "TimeoutSeconds"; +var _TSLEE = "TotalSizeLimitExceededException"; +var _TSR = "TerminateSessionRequest"; +var _TSRe = "TerminateSessionResponse"; +var _TSe = "TerminateSession"; +var _TSo = "TotalSteps"; +var _TT = "TargetType"; +var _TTa = "TaskType"; +var _TV = "TokenValue"; +var _Ta = "Targets"; +var _Tag = "Tag"; +var _Tar = "Target"; +var _Tas = "Tasks"; +var _Ti = "Title"; +var _Tie = "Tier"; +var _Tr = "Truncated"; +var _Ty = "Type"; +var _U = "Url"; +var _UA = "UpdatedAt"; +var _UAR = "UpdateAssociationRequest"; +var _UARp = "UpdateAssociationResult"; +var _UAS = "UpdateAssociationStatus"; +var _UASR = "UpdateAssociationStatusRequest"; +var _UASRp = "UpdateAssociationStatusResult"; +var _UAp = "UpdateAssociation"; +var _UC = "UnspecifiedCount"; +var _UCC = "UpdateCloudConnector"; +var _UCCR = "UpdateCloudConnectorRequest"; +var _UCCRp = "UpdateCloudConnectorResult"; +var _UCE = "UnsupportedCalendarException"; +var _UD = "UpdateDocument"; +var _UDDV = "UpdateDocumentDefaultVersion"; +var _UDDVR = "UpdateDocumentDefaultVersionRequest"; +var _UDDVRp = "UpdateDocumentDefaultVersionResult"; +var _UDM = "UpdateDocumentMetadata"; +var _UDMR = "UpdateDocumentMetadataRequest"; +var _UDMRp = "UpdateDocumentMetadataResponse"; +var _UDR = "UpdateDocumentRequest"; +var _UDRp = "UpdateDocumentResult"; +var _UFRE = "UnsupportedFeatureRequiredException"; +var _UIICE = "UnsupportedInventoryItemContextException"; +var _UISVE = "UnsupportedInventorySchemaVersionException"; +var _UMIR = "UpdateManagedInstanceRole"; +var _UMIRR = "UpdateManagedInstanceRoleRequest"; +var _UMIRRp = "UpdateManagedInstanceRoleResult"; +var _UMW = "UpdateMaintenanceWindow"; +var _UMWR = "UpdateMaintenanceWindowRequest"; +var _UMWRp = "UpdateMaintenanceWindowResult"; +var _UMWT = "UpdateMaintenanceWindowTarget"; +var _UMWTR = "UpdateMaintenanceWindowTargetRequest"; +var _UMWTRp = "UpdateMaintenanceWindowTargetResult"; +var _UMWTRpd = "UpdateMaintenanceWindowTaskRequest"; +var _UMWTRpda = "UpdateMaintenanceWindowTaskResult"; +var _UMWTp = "UpdateMaintenanceWindowTask"; +var _UNAC = "UnreportedNotApplicableCount"; +var _UOE = "UnsupportedOperationException"; +var _UOI = "UpdateOpsItem"; +var _UOIR = "UpdateOpsItemRequest"; +var _UOIRp = "UpdateOpsItemResponse"; +var _UOM = "UpdateOpsMetadata"; +var _UOMR = "UpdateOpsMetadataRequest"; +var _UOMRp = "UpdateOpsMetadataResult"; +var _UOS = "UnsupportedOperatingSystem"; +var _UPB = "UpdatePatchBaseline"; +var _UPBR = "UpdatePatchBaselineRequest"; +var _UPBRp = "UpdatePatchBaselineResult"; +var _UPT = "UnsupportedParameterType"; +var _UPTn = "UnsupportedPlatformType"; +var _UPV = "UnlabelParameterVersion"; +var _UPVR = "UnlabelParameterVersionRequest"; +var _UPVRn = "UnlabelParameterVersionResult"; +var _URDS = "UpdateResourceDataSync"; +var _URDSR = "UpdateResourceDataSyncRequest"; +var _URDSRp = "UpdateResourceDataSyncResult"; +var _USDSE = "UseS3DualStackEndpoint"; +var _USS = "UpdateServiceSetting"; +var _USSR = "UpdateServiceSettingRequest"; +var _USSRp = "UpdateServiceSettingResult"; +var _UT = "UpdatedTime"; +var _UTp = "UploadType"; +var _V = "Value"; +var _VCC = "ValidateCloudConnector"; +var _VCCR = "ValidateCloudConnectorRequest"; +var _VCCRa = "ValidateCloudConnectorResult"; +var _VE = "ValidationException"; +var _VF = "ValidationFindings"; +var _VFL = "ValidationFindingList"; +var _VFS = "ValidationFindingScope"; +var _VFa = "ValidationFinding"; +var _VN = "VersionName"; +var _VNS = "ValidNextSteps"; +var _Va = "Values"; +var _Var = "Variables"; +var _Ve = "Version"; +var _Ven = "Vendor"; +var _WD = "WithDecryption"; +var _WE = "WindowExecutions"; +var _WEI = "WindowExecutionId"; +var _WETI = "WindowExecutionTaskIdentities"; +var _WETII = "WindowExecutionTaskInvocationIdentities"; +var _WI = "WindowId"; +var _WIi = "WindowIdentities"; +var _WM = "WarningMessage"; +var _WTI = "WindowTargetId"; +var _WTIi = "WindowTaskId"; +var _aQE = "awsQueryError"; +var _c = "client"; +var _e = "error"; +var _en = "entries"; +var _k = "key"; +var _m = "message"; +var _s = "smithy.ts.sdk.synthetic.com.amazonaws.ssm"; +var _se = "server"; +var _v = "value"; +var _vS = "valueSet"; +var _xN = "xmlName"; +var n0 = "com.amazonaws.ssm"; +var _s_registry = TypeRegistry.for(_s); +var SSMServiceException$ = [-3, _s, "SSMServiceException", 0, [], []]; +_s_registry.registerError(SSMServiceException$, SSMServiceException); +var n0_registry = TypeRegistry.for(n0); +var AccessDeniedException$ = [ + -3, + n0, + _ADE, + { [_e]: _c }, + [_M], + [0], + 1 +]; +n0_registry.registerError(AccessDeniedException$, AccessDeniedException); +var AlreadyExistsException$ = [ + -3, + n0, + _AEE, + { [_aQE]: [`AlreadyExistsException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(AlreadyExistsException$, AlreadyExistsException); +var AssociatedInstances$ = [ + -3, + n0, + _AI, + { [_aQE]: [`AssociatedInstances`, 400], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(AssociatedInstances$, AssociatedInstances); +var AssociationAlreadyExists$ = [ + -3, + n0, + _AAE, + { [_aQE]: [`AssociationAlreadyExists`, 400], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(AssociationAlreadyExists$, AssociationAlreadyExists); +var AssociationDoesNotExist$ = [ + -3, + n0, + _ADNE, + { [_aQE]: [`AssociationDoesNotExist`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(AssociationDoesNotExist$, AssociationDoesNotExist); +var AssociationExecutionDoesNotExist$ = [ + -3, + n0, + _AEDNE, + { [_aQE]: [`AssociationExecutionDoesNotExist`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(AssociationExecutionDoesNotExist$, AssociationExecutionDoesNotExist); +var AssociationLimitExceeded$ = [ + -3, + n0, + _ALE, + { [_aQE]: [`AssociationLimitExceeded`, 400], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(AssociationLimitExceeded$, AssociationLimitExceeded); +var AssociationVersionLimitExceeded$ = [ + -3, + n0, + _AVLE, + { [_aQE]: [`AssociationVersionLimitExceeded`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(AssociationVersionLimitExceeded$, AssociationVersionLimitExceeded); +var AutomationDefinitionNotApprovedException$ = [ + -3, + n0, + _ADNAE, + { [_aQE]: [`AutomationDefinitionNotApproved`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(AutomationDefinitionNotApprovedException$, AutomationDefinitionNotApprovedException); +var AutomationDefinitionNotFoundException$ = [ + -3, + n0, + _ADNFE, + { [_aQE]: [`AutomationDefinitionNotFound`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(AutomationDefinitionNotFoundException$, AutomationDefinitionNotFoundException); +var AutomationDefinitionVersionNotFoundException$ = [ + -3, + n0, + _ADVNFE, + { [_aQE]: [`AutomationDefinitionVersionNotFound`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(AutomationDefinitionVersionNotFoundException$, AutomationDefinitionVersionNotFoundException); +var AutomationExecutionLimitExceededException$ = [ + -3, + n0, + _AELEE, + { [_aQE]: [`AutomationExecutionLimitExceeded`, 429], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(AutomationExecutionLimitExceededException$, AutomationExecutionLimitExceededException); +var AutomationExecutionNotFoundException$ = [ + -3, + n0, + _AENFE, + { [_aQE]: [`AutomationExecutionNotFound`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(AutomationExecutionNotFoundException$, AutomationExecutionNotFoundException); +var AutomationStepNotFoundException$ = [ + -3, + n0, + _ASNFE, + { [_aQE]: [`AutomationStepNotFoundException`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(AutomationStepNotFoundException$, AutomationStepNotFoundException); +var ComplianceTypeCountLimitExceededException$ = [ + -3, + n0, + _CTCLEE, + { [_aQE]: [`ComplianceTypeCountLimitExceeded`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(ComplianceTypeCountLimitExceededException$, ComplianceTypeCountLimitExceededException); +var ConflictException$ = [ + -3, + n0, + _CE, + { [_aQE]: [`ConflictException`, 409], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(ConflictException$, ConflictException); +var CustomSchemaCountLimitExceededException$ = [ + -3, + n0, + _CSCLEE, + { [_aQE]: [`CustomSchemaCountLimitExceeded`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(CustomSchemaCountLimitExceededException$, CustomSchemaCountLimitExceededException); +var DocumentAlreadyExists$ = [ + -3, + n0, + _DAE, + { [_aQE]: [`DocumentAlreadyExists`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(DocumentAlreadyExists$, DocumentAlreadyExists); +var DocumentLimitExceeded$ = [ + -3, + n0, + _DLE, + { [_aQE]: [`DocumentLimitExceeded`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(DocumentLimitExceeded$, DocumentLimitExceeded); +var DocumentPermissionLimit$ = [ + -3, + n0, + _DPL, + { [_aQE]: [`DocumentPermissionLimit`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(DocumentPermissionLimit$, DocumentPermissionLimit); +var DocumentVersionLimitExceeded$ = [ + -3, + n0, + _DVLE, + { [_aQE]: [`DocumentVersionLimitExceeded`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(DocumentVersionLimitExceeded$, DocumentVersionLimitExceeded); +var DoesNotExistException$ = [ + -3, + n0, + _DNEE, + { [_aQE]: [`DoesNotExistException`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(DoesNotExistException$, DoesNotExistException); +var DuplicateDocumentContent$ = [ + -3, + n0, + _DDC, + { [_aQE]: [`DuplicateDocumentContent`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(DuplicateDocumentContent$, DuplicateDocumentContent); +var DuplicateDocumentVersionName$ = [ + -3, + n0, + _DDVN, + { [_aQE]: [`DuplicateDocumentVersionName`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(DuplicateDocumentVersionName$, DuplicateDocumentVersionName); +var DuplicateInstanceId$ = [ + -3, + n0, + _DII, + { [_aQE]: [`DuplicateInstanceId`, 404], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(DuplicateInstanceId$, DuplicateInstanceId); +var FeatureNotAvailableException$ = [ + -3, + n0, + _FNAE, + { [_aQE]: [`FeatureNotAvailableException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(FeatureNotAvailableException$, FeatureNotAvailableException); +var HierarchyLevelLimitExceededException$ = [ + -3, + n0, + _HLLEE, + { [_aQE]: [`HierarchyLevelLimitExceededException`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(HierarchyLevelLimitExceededException$, HierarchyLevelLimitExceededException); +var HierarchyTypeMismatchException$ = [ + -3, + n0, + _HTME, + { [_aQE]: [`HierarchyTypeMismatchException`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(HierarchyTypeMismatchException$, HierarchyTypeMismatchException); +var IdempotentParameterMismatch$ = [ + -3, + n0, + _IPM, + { [_aQE]: [`IdempotentParameterMismatch`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(IdempotentParameterMismatch$, IdempotentParameterMismatch); +var IncompatiblePolicyException$ = [ + -3, + n0, + _IPE, + { [_aQE]: [`IncompatiblePolicyException`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(IncompatiblePolicyException$, IncompatiblePolicyException); +var InternalServerError$ = [ + -3, + n0, + _ISE, + { [_aQE]: [`InternalServerError`, 500], [_e]: _se }, + [_M], + [0] +]; +n0_registry.registerError(InternalServerError$, InternalServerError); +var InvalidActivation$ = [ + -3, + n0, + _IA, + { [_aQE]: [`InvalidActivation`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidActivation$, InvalidActivation); +var InvalidActivationId$ = [ + -3, + n0, + _IAI, + { [_aQE]: [`InvalidActivationId`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidActivationId$, InvalidActivationId); +var InvalidAggregatorException$ = [ + -3, + n0, + _IAE, + { [_aQE]: [`InvalidAggregator`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidAggregatorException$, InvalidAggregatorException); +var InvalidAllowedPatternException$ = [ + -3, + n0, + _IAPE, + { [_aQE]: [`InvalidAllowedPatternException`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(InvalidAllowedPatternException$, InvalidAllowedPatternException); +var InvalidAssociation$ = [ + -3, + n0, + _IAn, + { [_aQE]: [`InvalidAssociation`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidAssociation$, InvalidAssociation); +var InvalidAssociationVersion$ = [ + -3, + n0, + _IAV, + { [_aQE]: [`InvalidAssociationVersion`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidAssociationVersion$, InvalidAssociationVersion); +var InvalidAutomationExecutionParametersException$ = [ + -3, + n0, + _IAEPE, + { [_aQE]: [`InvalidAutomationExecutionParameters`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidAutomationExecutionParametersException$, InvalidAutomationExecutionParametersException); +var InvalidAutomationSignalException$ = [ + -3, + n0, + _IASE, + { [_aQE]: [`InvalidAutomationSignalException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidAutomationSignalException$, InvalidAutomationSignalException); +var InvalidAutomationStatusUpdateException$ = [ + -3, + n0, + _IASUE, + { [_aQE]: [`InvalidAutomationStatusUpdateException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidAutomationStatusUpdateException$, InvalidAutomationStatusUpdateException); +var InvalidCommandId$ = [ + -3, + n0, + _ICI, + { [_aQE]: [`InvalidCommandId`, 404], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(InvalidCommandId$, InvalidCommandId); +var InvalidDeleteInventoryParametersException$ = [ + -3, + n0, + _IDIPE, + { [_aQE]: [`InvalidDeleteInventoryParameters`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidDeleteInventoryParametersException$, InvalidDeleteInventoryParametersException); +var InvalidDeletionIdException$ = [ + -3, + n0, + _IDIE, + { [_aQE]: [`InvalidDeletionId`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidDeletionIdException$, InvalidDeletionIdException); +var InvalidDocument$ = [ + -3, + n0, + _ID, + { [_aQE]: [`InvalidDocument`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidDocument$, InvalidDocument); +var InvalidDocumentContent$ = [ + -3, + n0, + _IDC, + { [_aQE]: [`InvalidDocumentContent`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidDocumentContent$, InvalidDocumentContent); +var InvalidDocumentOperation$ = [ + -3, + n0, + _IDO, + { [_aQE]: [`InvalidDocumentOperation`, 403], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidDocumentOperation$, InvalidDocumentOperation); +var InvalidDocumentSchemaVersion$ = [ + -3, + n0, + _IDSV, + { [_aQE]: [`InvalidDocumentSchemaVersion`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidDocumentSchemaVersion$, InvalidDocumentSchemaVersion); +var InvalidDocumentType$ = [ + -3, + n0, + _IDT, + { [_aQE]: [`InvalidDocumentType`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidDocumentType$, InvalidDocumentType); +var InvalidDocumentVersion$ = [ + -3, + n0, + _IDV, + { [_aQE]: [`InvalidDocumentVersion`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidDocumentVersion$, InvalidDocumentVersion); +var InvalidFilter$ = [ + -3, + n0, + _IF, + { [_aQE]: [`InvalidFilter`, 441], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidFilter$, InvalidFilter); +var InvalidFilterKey$ = [ + -3, + n0, + _IFK, + { [_aQE]: [`InvalidFilterKey`, 400], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(InvalidFilterKey$, InvalidFilterKey); +var InvalidFilterOption$ = [ + -3, + n0, + _IFO, + { [_aQE]: [`InvalidFilterOption`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(InvalidFilterOption$, InvalidFilterOption); +var InvalidFilterValue$ = [ + -3, + n0, + _IFV, + { [_aQE]: [`InvalidFilterValue`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidFilterValue$, InvalidFilterValue); +var InvalidInstanceId$ = [ + -3, + n0, + _III, + { [_aQE]: [`InvalidInstanceId`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidInstanceId$, InvalidInstanceId); +var InvalidInstanceInformationFilterValue$ = [ + -3, + n0, + _IIIFV, + { [_aQE]: [`InvalidInstanceInformationFilterValue`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(InvalidInstanceInformationFilterValue$, InvalidInstanceInformationFilterValue); +var InvalidInstancePropertyFilterValue$ = [ + -3, + n0, + _IIPFV, + { [_aQE]: [`InvalidInstancePropertyFilterValue`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(InvalidInstancePropertyFilterValue$, InvalidInstancePropertyFilterValue); +var InvalidInventoryGroupException$ = [ + -3, + n0, + _IIGE, + { [_aQE]: [`InvalidInventoryGroup`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidInventoryGroupException$, InvalidInventoryGroupException); +var InvalidInventoryItemContextException$ = [ + -3, + n0, + _IIICE, + { [_aQE]: [`InvalidInventoryItemContext`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidInventoryItemContextException$, InvalidInventoryItemContextException); +var InvalidInventoryRequestException$ = [ + -3, + n0, + _IIRE, + { [_aQE]: [`InvalidInventoryRequest`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidInventoryRequestException$, InvalidInventoryRequestException); +var InvalidItemContentException$ = [ + -3, + n0, + _IICE, + { [_aQE]: [`InvalidItemContent`, 400], [_e]: _c }, + [_TN, _M], + [0, 0] +]; +n0_registry.registerError(InvalidItemContentException$, InvalidItemContentException); +var InvalidKeyId$ = [ + -3, + n0, + _IKI, + { [_aQE]: [`InvalidKeyId`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(InvalidKeyId$, InvalidKeyId); +var InvalidNextToken$ = [ + -3, + n0, + _INT, + { [_aQE]: [`InvalidNextToken`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidNextToken$, InvalidNextToken); +var InvalidNotificationConfig$ = [ + -3, + n0, + _INC, + { [_aQE]: [`InvalidNotificationConfig`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidNotificationConfig$, InvalidNotificationConfig); +var InvalidOptionException$ = [ + -3, + n0, + _IOE, + { [_aQE]: [`InvalidOption`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidOptionException$, InvalidOptionException); +var InvalidOutputFolder$ = [ + -3, + n0, + _IOF, + { [_aQE]: [`InvalidOutputFolder`, 400], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(InvalidOutputFolder$, InvalidOutputFolder); +var InvalidOutputLocation$ = [ + -3, + n0, + _IOL, + { [_aQE]: [`InvalidOutputLocation`, 400], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(InvalidOutputLocation$, InvalidOutputLocation); +var InvalidParameters$ = [ + -3, + n0, + _IP, + { [_aQE]: [`InvalidParameters`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidParameters$, InvalidParameters); +var InvalidPermissionType$ = [ + -3, + n0, + _IPT, + { [_aQE]: [`InvalidPermissionType`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidPermissionType$, InvalidPermissionType); +var InvalidPluginName$ = [ + -3, + n0, + _IPN, + { [_aQE]: [`InvalidPluginName`, 404], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(InvalidPluginName$, InvalidPluginName); +var InvalidPolicyAttributeException$ = [ + -3, + n0, + _IPAE, + { [_aQE]: [`InvalidPolicyAttributeException`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(InvalidPolicyAttributeException$, InvalidPolicyAttributeException); +var InvalidPolicyTypeException$ = [ + -3, + n0, + _IPTE, + { [_aQE]: [`InvalidPolicyTypeException`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(InvalidPolicyTypeException$, InvalidPolicyTypeException); +var InvalidResourceId$ = [ + -3, + n0, + _IRI, + { [_aQE]: [`InvalidResourceId`, 400], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(InvalidResourceId$, InvalidResourceId); +var InvalidResourceType$ = [ + -3, + n0, + _IRT, + { [_aQE]: [`InvalidResourceType`, 400], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(InvalidResourceType$, InvalidResourceType); +var InvalidResultAttributeException$ = [ + -3, + n0, + _IRAE, + { [_aQE]: [`InvalidResultAttribute`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidResultAttributeException$, InvalidResultAttributeException); +var InvalidRole$ = [ + -3, + n0, + _IR, + { [_aQE]: [`InvalidRole`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidRole$, InvalidRole); +var InvalidSchedule$ = [ + -3, + n0, + _IS, + { [_aQE]: [`InvalidSchedule`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidSchedule$, InvalidSchedule); +var InvalidTag$ = [ + -3, + n0, + _IT, + { [_aQE]: [`InvalidTag`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidTag$, InvalidTag); +var InvalidTarget$ = [ + -3, + n0, + _ITn, + { [_aQE]: [`InvalidTarget`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidTarget$, InvalidTarget); +var InvalidTargetMaps$ = [ + -3, + n0, + _ITM, + { [_aQE]: [`InvalidTargetMaps`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidTargetMaps$, InvalidTargetMaps); +var InvalidTypeNameException$ = [ + -3, + n0, + _ITNE, + { [_aQE]: [`InvalidTypeName`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidTypeNameException$, InvalidTypeNameException); +var InvalidUpdate$ = [ + -3, + n0, + _IU, + { [_aQE]: [`InvalidUpdate`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(InvalidUpdate$, InvalidUpdate); +var InvocationDoesNotExist$ = [ + -3, + n0, + _IDNE, + { [_aQE]: [`InvocationDoesNotExist`, 400], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(InvocationDoesNotExist$, InvocationDoesNotExist); +var ItemContentMismatchException$ = [ + -3, + n0, + _ICME, + { [_aQE]: [`ItemContentMismatch`, 400], [_e]: _c }, + [_TN, _M], + [0, 0] +]; +n0_registry.registerError(ItemContentMismatchException$, ItemContentMismatchException); +var ItemSizeLimitExceededException$ = [ + -3, + n0, + _ISLEE, + { [_aQE]: [`ItemSizeLimitExceeded`, 400], [_e]: _c }, + [_TN, _M], + [0, 0] +]; +n0_registry.registerError(ItemSizeLimitExceededException$, ItemSizeLimitExceededException); +var MalformedResourcePolicyDocumentException$ = [ + -3, + n0, + _MRPDE, + { [_aQE]: [`MalformedResourcePolicyDocumentException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(MalformedResourcePolicyDocumentException$, MalformedResourcePolicyDocumentException); +var MaxDocumentSizeExceeded$ = [ + -3, + n0, + _MDSE, + { [_aQE]: [`MaxDocumentSizeExceeded`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(MaxDocumentSizeExceeded$, MaxDocumentSizeExceeded); +var NoLongerSupportedException$ = [ + -3, + n0, + _NLSE, + { [_aQE]: [`NoLongerSupported`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(NoLongerSupportedException$, NoLongerSupportedException); +var OpsItemAccessDeniedException$ = [ + -3, + n0, + _OIADE, + { [_aQE]: [`OpsItemAccessDeniedException`, 403], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(OpsItemAccessDeniedException$, OpsItemAccessDeniedException); +var OpsItemAlreadyExistsException$ = [ + -3, + n0, + _OIAEE, + { [_aQE]: [`OpsItemAlreadyExistsException`, 400], [_e]: _c }, + [_M, _OII], + [0, 0] +]; +n0_registry.registerError(OpsItemAlreadyExistsException$, OpsItemAlreadyExistsException); +var OpsItemConflictException$ = [ + -3, + n0, + _OICE, + { [_aQE]: [`OpsItemConflictException`, 409], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(OpsItemConflictException$, OpsItemConflictException); +var OpsItemInvalidParameterException$ = [ + -3, + n0, + _OIIPE, + { [_aQE]: [`OpsItemInvalidParameterException`, 400], [_e]: _c }, + [_PN, _M], + [64 | 0, 0] +]; +n0_registry.registerError(OpsItemInvalidParameterException$, OpsItemInvalidParameterException); +var OpsItemLimitExceededException$ = [ + -3, + n0, + _OILEE, + { [_aQE]: [`OpsItemLimitExceededException`, 400], [_e]: _c }, + [_RT, _L, _LT, _M], + [64 | 0, 1, 0, 0] +]; +n0_registry.registerError(OpsItemLimitExceededException$, OpsItemLimitExceededException); +var OpsItemNotFoundException$ = [ + -3, + n0, + _OINFE, + { [_aQE]: [`OpsItemNotFoundException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(OpsItemNotFoundException$, OpsItemNotFoundException); +var OpsItemRelatedItemAlreadyExistsException$ = [ + -3, + n0, + _OIRIAEE, + { [_aQE]: [`OpsItemRelatedItemAlreadyExistsException`, 400], [_e]: _c }, + [_M, _RU, _OII], + [0, 0, 0] +]; +n0_registry.registerError(OpsItemRelatedItemAlreadyExistsException$, OpsItemRelatedItemAlreadyExistsException); +var OpsItemRelatedItemAssociationNotFoundException$ = [ + -3, + n0, + _OIRIANFE, + { [_aQE]: [`OpsItemRelatedItemAssociationNotFoundException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(OpsItemRelatedItemAssociationNotFoundException$, OpsItemRelatedItemAssociationNotFoundException); +var OpsMetadataAlreadyExistsException$ = [ + -3, + n0, + _OMAEE, + { [_aQE]: [`OpsMetadataAlreadyExistsException`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(OpsMetadataAlreadyExistsException$, OpsMetadataAlreadyExistsException); +var OpsMetadataInvalidArgumentException$ = [ + -3, + n0, + _OMIAE, + { [_aQE]: [`OpsMetadataInvalidArgumentException`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(OpsMetadataInvalidArgumentException$, OpsMetadataInvalidArgumentException); +var OpsMetadataKeyLimitExceededException$ = [ + -3, + n0, + _OMKLEE, + { [_aQE]: [`OpsMetadataKeyLimitExceededException`, 429], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(OpsMetadataKeyLimitExceededException$, OpsMetadataKeyLimitExceededException); +var OpsMetadataLimitExceededException$ = [ + -3, + n0, + _OMLEE, + { [_aQE]: [`OpsMetadataLimitExceededException`, 429], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(OpsMetadataLimitExceededException$, OpsMetadataLimitExceededException); +var OpsMetadataNotFoundException$ = [ + -3, + n0, + _OMNFE, + { [_aQE]: [`OpsMetadataNotFoundException`, 404], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(OpsMetadataNotFoundException$, OpsMetadataNotFoundException); +var OpsMetadataTooManyUpdatesException$ = [ + -3, + n0, + _OMTMUE, + { [_aQE]: [`OpsMetadataTooManyUpdatesException`, 429], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(OpsMetadataTooManyUpdatesException$, OpsMetadataTooManyUpdatesException); +var ParameterAlreadyExists$ = [ + -3, + n0, + _PAE, + { [_aQE]: [`ParameterAlreadyExists`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(ParameterAlreadyExists$, ParameterAlreadyExists); +var ParameterLimitExceeded$ = [ + -3, + n0, + _PLE, + { [_aQE]: [`ParameterLimitExceeded`, 429], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(ParameterLimitExceeded$, ParameterLimitExceeded); +var ParameterMaxVersionLimitExceeded$ = [ + -3, + n0, + _PMVLE, + { [_aQE]: [`ParameterMaxVersionLimitExceeded`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(ParameterMaxVersionLimitExceeded$, ParameterMaxVersionLimitExceeded); +var ParameterNotFound$ = [ + -3, + n0, + _PNF, + { [_aQE]: [`ParameterNotFound`, 404], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(ParameterNotFound$, ParameterNotFound); +var ParameterPatternMismatchException$ = [ + -3, + n0, + _PPME, + { [_aQE]: [`ParameterPatternMismatchException`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(ParameterPatternMismatchException$, ParameterPatternMismatchException); +var ParameterVersionLabelLimitExceeded$ = [ + -3, + n0, + _PVLLE, + { [_aQE]: [`ParameterVersionLabelLimitExceeded`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(ParameterVersionLabelLimitExceeded$, ParameterVersionLabelLimitExceeded); +var ParameterVersionNotFound$ = [ + -3, + n0, + _PVNF, + { [_aQE]: [`ParameterVersionNotFound`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(ParameterVersionNotFound$, ParameterVersionNotFound); +var PoliciesLimitExceededException$ = [ + -3, + n0, + _PLEE, + { [_aQE]: [`PoliciesLimitExceededException`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(PoliciesLimitExceededException$, PoliciesLimitExceededException); +var ResourceDataSyncAlreadyExistsException$ = [ + -3, + n0, + _RDSAEE, + { [_aQE]: [`ResourceDataSyncAlreadyExists`, 400], [_e]: _c }, + [_SN], + [0] +]; +n0_registry.registerError(ResourceDataSyncAlreadyExistsException$, ResourceDataSyncAlreadyExistsException); +var ResourceDataSyncConflictException$ = [ + -3, + n0, + _RDSCE, + { [_aQE]: [`ResourceDataSyncConflictException`, 409], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(ResourceDataSyncConflictException$, ResourceDataSyncConflictException); +var ResourceDataSyncCountExceededException$ = [ + -3, + n0, + _RDSCEE, + { [_aQE]: [`ResourceDataSyncCountExceeded`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(ResourceDataSyncCountExceededException$, ResourceDataSyncCountExceededException); +var ResourceDataSyncInvalidConfigurationException$ = [ + -3, + n0, + _RDSICE, + { [_aQE]: [`ResourceDataSyncInvalidConfiguration`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(ResourceDataSyncInvalidConfigurationException$, ResourceDataSyncInvalidConfigurationException); +var ResourceDataSyncNotFoundException$ = [ + -3, + n0, + _RDSNFE, + { [_aQE]: [`ResourceDataSyncNotFound`, 404], [_e]: _c }, + [_SN, _ST, _M], + [0, 0, 0] +]; +n0_registry.registerError(ResourceDataSyncNotFoundException$, ResourceDataSyncNotFoundException); +var ResourceInUseException$ = [ + -3, + n0, + _RIUE, + { [_aQE]: [`ResourceInUseException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(ResourceInUseException$, ResourceInUseException); +var ResourceLimitExceededException$ = [ + -3, + n0, + _RLEE, + { [_aQE]: [`ResourceLimitExceededException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(ResourceLimitExceededException$, ResourceLimitExceededException); +var ResourceNotFoundException$ = [ + -3, + n0, + _RNFE, + { [_aQE]: [`ResourceNotFoundException`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException); +var ResourcePolicyConflictException$ = [ + -3, + n0, + _RPCE, + { [_aQE]: [`ResourcePolicyConflictException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(ResourcePolicyConflictException$, ResourcePolicyConflictException); +var ResourcePolicyInvalidParameterException$ = [ + -3, + n0, + _RPIPE, + { [_aQE]: [`ResourcePolicyInvalidParameterException`, 400], [_e]: _c }, + [_PN, _M], + [64 | 0, 0] +]; +n0_registry.registerError(ResourcePolicyInvalidParameterException$, ResourcePolicyInvalidParameterException); +var ResourcePolicyLimitExceededException$ = [ + -3, + n0, + _RPLEE, + { [_aQE]: [`ResourcePolicyLimitExceededException`, 400], [_e]: _c }, + [_L, _LT, _M], + [1, 0, 0] +]; +n0_registry.registerError(ResourcePolicyLimitExceededException$, ResourcePolicyLimitExceededException); +var ResourcePolicyNotFoundException$ = [ + -3, + n0, + _RPNFE, + { [_aQE]: [`ResourcePolicyNotFoundException`, 404], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(ResourcePolicyNotFoundException$, ResourcePolicyNotFoundException); +var ServiceQuotaExceededException$ = [ + -3, + n0, + _SQEE, + { [_e]: _c }, + [_M, _QC, _SC, _RI, _RTe], + [0, 0, 0, 0, 0], + 3 +]; +n0_registry.registerError(ServiceQuotaExceededException$, ServiceQuotaExceededException); +var ServiceSettingNotFound$ = [ + -3, + n0, + _SSNF, + { [_aQE]: [`ServiceSettingNotFound`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(ServiceSettingNotFound$, ServiceSettingNotFound); +var StatusUnchanged$ = [ + -3, + n0, + _SU, + { [_aQE]: [`StatusUnchanged`, 400], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(StatusUnchanged$, StatusUnchanged); +var SubTypeCountLimitExceededException$ = [ + -3, + n0, + _STCLEE, + { [_aQE]: [`SubTypeCountLimitExceeded`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(SubTypeCountLimitExceededException$, SubTypeCountLimitExceededException); +var TargetInUseException$ = [ + -3, + n0, + _TIUE, + { [_aQE]: [`TargetInUseException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(TargetInUseException$, TargetInUseException); +var TargetNotConnected$ = [ + -3, + n0, + _TNC, + { [_aQE]: [`TargetNotConnected`, 430], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(TargetNotConnected$, TargetNotConnected); +var ThrottlingException$ = [ + -3, + n0, + _TE, + { [_e]: _c }, + [_M, _QC, _SC], + [0, 0, 0], + 1 +]; +n0_registry.registerError(ThrottlingException$, ThrottlingException); +var TooManyTagsError$ = [ + -3, + n0, + _TMTE, + { [_aQE]: [`TooManyTagsError`, 400], [_e]: _c }, + [], + [] +]; +n0_registry.registerError(TooManyTagsError$, TooManyTagsError); +var TooManyUpdates$ = [ + -3, + n0, + _TMU, + { [_aQE]: [`TooManyUpdates`, 429], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(TooManyUpdates$, TooManyUpdates); +var TotalSizeLimitExceededException$ = [ + -3, + n0, + _TSLEE, + { [_aQE]: [`TotalSizeLimitExceeded`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(TotalSizeLimitExceededException$, TotalSizeLimitExceededException); +var UnsupportedCalendarException$ = [ + -3, + n0, + _UCE, + { [_aQE]: [`UnsupportedCalendarException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(UnsupportedCalendarException$, UnsupportedCalendarException); +var UnsupportedFeatureRequiredException$ = [ + -3, + n0, + _UFRE, + { [_aQE]: [`UnsupportedFeatureRequiredException`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(UnsupportedFeatureRequiredException$, UnsupportedFeatureRequiredException); +var UnsupportedInventoryItemContextException$ = [ + -3, + n0, + _UIICE, + { [_aQE]: [`UnsupportedInventoryItemContext`, 400], [_e]: _c }, + [_TN, _M], + [0, 0] +]; +n0_registry.registerError(UnsupportedInventoryItemContextException$, UnsupportedInventoryItemContextException); +var UnsupportedInventorySchemaVersionException$ = [ + -3, + n0, + _UISVE, + { [_aQE]: [`UnsupportedInventorySchemaVersion`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(UnsupportedInventorySchemaVersionException$, UnsupportedInventorySchemaVersionException); +var UnsupportedOperatingSystem$ = [ + -3, + n0, + _UOS, + { [_aQE]: [`UnsupportedOperatingSystem`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(UnsupportedOperatingSystem$, UnsupportedOperatingSystem); +var UnsupportedOperationException$ = [ + -3, + n0, + _UOE, + { [_aQE]: [`UnsupportedOperation`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(UnsupportedOperationException$, UnsupportedOperationException); +var UnsupportedParameterType$ = [ + -3, + n0, + _UPT, + { [_aQE]: [`UnsupportedParameterType`, 400], [_e]: _c }, + [_m], + [0] +]; +n0_registry.registerError(UnsupportedParameterType$, UnsupportedParameterType); +var UnsupportedPlatformType$ = [ + -3, + n0, + _UPTn, + { [_aQE]: [`UnsupportedPlatformType`, 400], [_e]: _c }, + [_M], + [0] +]; +n0_registry.registerError(UnsupportedPlatformType$, UnsupportedPlatformType); +var ValidationException$ = [ + -3, + n0, + _VE, + { [_aQE]: [`ValidationException`, 400], [_e]: _c }, + [_M, _RC], + [0, 0] +]; +n0_registry.registerError(ValidationException$, ValidationException); +var errorTypeRegistries = [ + _s_registry, + n0_registry +]; +var AccessKeySecretType = [0, n0, _AKST, 8, 0]; +var IPAddress = [0, n0, _IPA, 8, 0]; +var MaintenanceWindowDescription = [0, n0, _MWD, 8, 0]; +var MaintenanceWindowExecutionTaskInvocationParameters = [0, n0, _MWETIP, 8, 0]; +var MaintenanceWindowLambdaPayload = [0, n0, _MWLP, 8, 21]; +var MaintenanceWindowStepFunctionsInput = [0, n0, _MWSFI, 8, 0]; +var MaintenanceWindowTaskParameterValue = [0, n0, _MWTPV, 8, 0]; +var OwnerInformation = [0, n0, _OI, 8, 0]; +var PatchSourceConfiguration = [0, n0, _PSC, 8, 0]; +var PSParameterValue = [0, n0, _PSPV, 8, 0]; +var SessionTokenType = [0, n0, _STT, 8, 0]; +var AccountSharingInfo$ = [ + 3, + n0, + _ASI, + 0, + [_AIc, _SDV], + [0, 0] +]; +var Activation$ = [ + 3, + n0, + _A, + 0, + [_AIct, _D, _DIN, _IRa, _RL, _RCe, _ED, _E, _CD, _T], + [0, 0, 0, 0, 1, 1, 4, 2, 4, () => TagList] +]; +var AddTagsToResourceRequest$ = [ + 3, + n0, + _ATTRR, + 0, + [_RTe, _RI, _T], + [0, 0, () => TagList], + 3 +]; +var AddTagsToResourceResult$ = [ + 3, + n0, + _ATTRRd, + 0, + [], + [] +]; +var Alarm$ = [ + 3, + n0, + _Al, + 0, + [_N], + [0], + 1 +]; +var AlarmConfiguration$ = [ + 3, + n0, + _AC, + 0, + [_Ala, _IPAF], + [() => AlarmList, 2], + 1 +]; +var AlarmStateInformation$ = [ + 3, + n0, + _ASIl, + 0, + [_N, _S], + [0, 0], + 2 +]; +var AssociateOpsItemRelatedItemRequest$ = [ + 3, + n0, + _AOIRIR, + 0, + [_OII, _AT, _RTe, _RU], + [0, 0, 0, 0], + 4 +]; +var AssociateOpsItemRelatedItemResponse$ = [ + 3, + n0, + _AOIRIRs, + 0, + [_AIs], + [0] +]; +var Association$ = [ + 3, + n0, + _As, + 0, + [_N, _II, _AIs, _AV, _DV, _Ta, _LED, _O, _SE, _AN, _SO, _Du, _TM], + [0, 0, 0, 0, 0, () => Targets, 4, () => AssociationOverview$, 0, 0, 1, 1, [1, n0, _TM, 0, [2, n0, _TMa, 0, 0, 64 | 0]]] +]; +var AssociationDescription$ = [ + 3, + n0, + _AD, + 0, + [_N, _II, _AV, _Da, _LUAD, _St, _O, _DV, _ATPN, _P, _AIs, _Ta, _SE, _OL, _LED, _LSED, _AN, _ME, _MC, _CS, _SCy, _AOACI, _CN, _TL, _SO, _Du, _TM, _AC, _TA, _ADAR], + [0, 0, 0, 4, 4, () => AssociationStatus$, () => AssociationOverview$, 0, 0, [() => _Parameters, 0], 0, () => Targets, 0, () => InstanceAssociationOutputLocation$, 4, 4, 0, 0, 0, 0, 0, 2, 64 | 0, () => TargetLocations, 1, 1, [1, n0, _TM, 0, [2, n0, _TMa, 0, 0, 64 | 0]], () => AlarmConfiguration$, () => AlarmStateInformationList, 0] +]; +var AssociationExecution$ = [ + 3, + n0, + _AE, + 0, + [_AIs, _AV, _EI, _St, _DS, _CT, _LED, _RCBS, _AC, _TA], + [0, 0, 0, 0, 0, 4, 4, 0, () => AlarmConfiguration$, () => AlarmStateInformationList] +]; +var AssociationExecutionFilter$ = [ + 3, + n0, + _AEF, + 0, + [_K, _V, _Ty], + [0, 0, 0], + 3 +]; +var AssociationExecutionTarget$ = [ + 3, + n0, + _AET, + 0, + [_AIs, _AV, _EI, _RI, _RTe, _St, _DS, _LED, _OS], + [0, 0, 0, 0, 0, 0, 0, 4, () => OutputSource$] +]; +var AssociationExecutionTargetsFilter$ = [ + 3, + n0, + _AETF, + 0, + [_K, _V], + [0, 0], + 2 +]; +var AssociationFilter$ = [ + 3, + n0, + _AF, + 0, + [_k, _v], + [0, 0], + 2 +]; +var AssociationOverview$ = [ + 3, + n0, + _AO, + 0, + [_St, _DS, _ASAC], + [0, 0, 128 | 1] +]; +var AssociationStatus$ = [ + 3, + n0, + _AS, + 0, + [_Da, _N, _M, _AId], + [4, 0, 0, 0], + 3 +]; +var AssociationVersionInfo$ = [ + 3, + n0, + _AVI, + 0, + [_AIs, _AV, _CD, _N, _DV, _P, _Ta, _SE, _OL, _AN, _ME, _MC, _CS, _SCy, _AOACI, _CN, _TL, _SO, _Du, _TM, _ADAR], + [0, 0, 4, 0, 0, [() => _Parameters, 0], () => Targets, 0, () => InstanceAssociationOutputLocation$, 0, 0, 0, 0, 0, 2, 64 | 0, () => TargetLocations, 1, 1, [1, n0, _TM, 0, [2, n0, _TMa, 0, 0, 64 | 0]], 0] +]; +var AttachmentContent$ = [ + 3, + n0, + _ACt, + 0, + [_N, _Si, _H, _HT, _U], + [0, 1, 0, 0, 0] +]; +var AttachmentInformation$ = [ + 3, + n0, + _AIt, + 0, + [_N], + [0] +]; +var AttachmentsSource$ = [ + 3, + n0, + _ASt, + 0, + [_K, _Va, _N], + [0, 64 | 0, 0] +]; +var AutomationExecution$ = [ + 3, + n0, + _AEu, + 0, + [_AEI, _DN, _DV, _EST, _EET, _AES, _SEt, _SET, _P, _Ou, _FM, _WM, _Mo, _PAEI, _EB, _CSN, _CA, _TPN, _Ta, _TM, _RTes, _MC, _ME, _Tar, _TL, _PC, _AC, _TA, _TLURL, _ASu, _STc, _R, _OII, _AIs, _CRN, _Var], + [0, 0, 0, 4, 4, 0, () => StepExecutionList, 2, [2, n0, _APM, 0, 0, 64 | 0], [2, n0, _APM, 0, 0, 64 | 0], 0, 0, 0, 0, 0, 0, 0, 0, () => Targets, [1, n0, _TM, 0, [2, n0, _TMa, 0, 0, 64 | 0]], () => ResolvedTargets$, 0, 0, 0, () => TargetLocations, () => ProgressCounters$, () => AlarmConfiguration$, () => AlarmStateInformationList, 0, 0, 4, () => Runbooks, 0, 0, 0, [2, n0, _APM, 0, 0, 64 | 0]] +]; +var AutomationExecutionFilter$ = [ + 3, + n0, + _AEFu, + 0, + [_K, _Va], + [0, 64 | 0], + 2 +]; +var AutomationExecutionInputs$ = [ + 3, + n0, + _AEIu, + 0, + [_P, _TPN, _Ta, _TM, _TL, _TLURL], + [[2, n0, _APM, 0, 0, 64 | 0], 0, () => AutomationTargets, [1, n0, _TM, 0, [2, n0, _TMa, 0, 0, 64 | 0]], () => TargetLocations, 0] +]; +var AutomationExecutionMetadata$ = [ + 3, + n0, + _AEM, + 0, + [_AEI, _DN, _DV, _AES, _EST, _EET, _EB, _LF, _Ou, _Mo, _PAEI, _CSN, _CA, _FM, _WM, _TPN, _Ta, _TM, _RTes, _MC, _ME, _Tar, _ATu, _AC, _TA, _TLURL, _ASu, _STc, _R, _OII, _AIs, _CRN], + [0, 0, 0, 0, 4, 4, 0, 0, [2, n0, _APM, 0, 0, 64 | 0], 0, 0, 0, 0, 0, 0, 0, () => Targets, [1, n0, _TM, 0, [2, n0, _TMa, 0, 0, 64 | 0]], () => ResolvedTargets$, 0, 0, 0, 0, () => AlarmConfiguration$, () => AlarmStateInformationList, 0, 0, 4, () => Runbooks, 0, 0, 0] +]; +var AutomationExecutionPreview$ = [ + 3, + n0, + _AEP, + 0, + [_SP, _Re, _TP, _TAo], + [128 | 1, 64 | 0, () => TargetPreviewList, 1] +]; +var AzureConfiguration$ = [ + 3, + n0, + _ACz, + 0, + [_TI, _AIp, _TDN, _ADN, _Ta], + [0, 0, 0, 0, () => ConfigurationTargets$], + 2 +]; +var AzureSubscription$ = [ + 3, + n0, + _ASz, + 0, + [_I, _DNi], + [0, 0], + 1 +]; +var BaselineOverride$ = [ + 3, + n0, + _BO, + 0, + [_OSp, _GF, _AR, _AP, _APCL, _RP, _RPA, _APENS, _So, _ASUCS], + [0, () => PatchFilterGroup$, () => PatchRuleGroup$, 64 | 0, 0, 64 | 0, 0, 2, [() => PatchSourceList, 0], 0] +]; +var CancelCommandRequest$ = [ + 3, + n0, + _CCR, + 0, + [_CI, _IIn], + [0, 64 | 0], + 1 +]; +var CancelCommandResult$ = [ + 3, + n0, + _CCRa, + 0, + [], + [] +]; +var CancelMaintenanceWindowExecutionRequest$ = [ + 3, + n0, + _CMWER, + 0, + [_WEI], + [0], + 1 +]; +var CancelMaintenanceWindowExecutionResult$ = [ + 3, + n0, + _CMWERa, + 0, + [_WEI], + [0] +]; +var CloudConnectorFilter$ = [ + 3, + n0, + _CCF, + 0, + [_FK, _FV], + [0, 64 | 0] +]; +var CloudConnectorSummary$ = [ + 3, + n0, + _CCS, + 0, + [_CCI, _DNi, _D, _RA, _CAr, _UA], + [0, 0, 0, 0, 4, 4] +]; +var CloudWatchOutputConfig$ = [ + 3, + n0, + _CWOC, + 0, + [_CWLGN, _CWOE], + [0, 2] +]; +var Command$ = [ + 3, + n0, + _C, + 0, + [_CI, _DN, _DV, _Co, _EA, _P, _IIn, _Ta, _RDT, _St, _SD, _OSR, _OSBN, _OSKP, _MC, _ME, _TC, _CC, _EC, _DTOC, _SR, _NC, _CWOC, _TS, _AC, _TA], + [0, 0, 0, 0, 4, [() => _Parameters, 0], 64 | 0, () => Targets, 4, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, () => NotificationConfig$, () => CloudWatchOutputConfig$, 1, () => AlarmConfiguration$, () => AlarmStateInformationList] +]; +var CommandFilter$ = [ + 3, + n0, + _CF, + 0, + [_k, _v], + [0, 0], + 2 +]; +var CommandInvocation$ = [ + 3, + n0, + _CIo, + 0, + [_CI, _II, _IN, _Co, _DN, _DV, _RDT, _St, _SD, _TO, _SOU, _SEU, _CP, _SR, _NC, _CWOC], + [0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, () => CommandPluginList, 0, () => NotificationConfig$, () => CloudWatchOutputConfig$] +]; +var CommandPlugin$ = [ + 3, + n0, + _CPo, + 0, + [_N, _St, _SD, _RCes, _RSDT, _RFDT, _Out, _SOU, _SEU, _OSR, _OSBN, _OSKP], + [0, 0, 0, 1, 4, 4, 0, 0, 0, 0, 0, 0] +]; +var ComplianceExecutionSummary$ = [ + 3, + n0, + _CES, + 0, + [_ET, _EI, _ETx], + [4, 0, 0], + 1 +]; +var ComplianceItem$ = [ + 3, + n0, + _CIom, + 0, + [_CTo, _RTe, _RI, _I, _Ti, _St, _Se, _ES, _De], + [0, 0, 0, 0, 0, 0, 0, () => ComplianceExecutionSummary$, 128 | 0] +]; +var ComplianceItemEntry$ = [ + 3, + n0, + _CIE, + 0, + [_Se, _St, _I, _Ti, _De], + [0, 0, 0, 0, 128 | 0], + 2 +]; +var ComplianceStringFilter$ = [ + 3, + n0, + _CSF, + 0, + [_K, _Va, _Ty], + [0, [() => ComplianceStringFilterValueList, 0], 0] +]; +var ComplianceSummaryItem$ = [ + 3, + n0, + _CSI, + 0, + [_CTo, _CSo, _NCS], + [0, () => CompliantSummary$, () => NonCompliantSummary$] +]; +var CompliantSummary$ = [ + 3, + n0, + _CSo, + 0, + [_CCo, _SS], + [1, () => SeveritySummary$] +]; +var CreateActivationRequest$ = [ + 3, + n0, + _CAR, + 0, + [_IRa, _D, _DIN, _RL, _ED, _T, _RM], + [0, 0, 0, 1, 4, () => TagList, () => RegistrationMetadataList], + 1 +]; +var CreateActivationResult$ = [ + 3, + n0, + _CARr, + 0, + [_AIct, _ACc], + [0, 0] +]; +var CreateAssociationBatchRequest$ = [ + 3, + n0, + _CABR, + 0, + [_En, _ADAR], + [[() => CreateAssociationBatchRequestEntries, 0], 0], + 1 +]; +var CreateAssociationBatchRequestEntry$ = [ + 3, + n0, + _CABRE, + 0, + [_N, _II, _P, _ATPN, _DV, _Ta, _SE, _OL, _AN, _ME, _MC, _CS, _SCy, _AOACI, _CN, _TL, _SO, _Du, _TM, _AC], + [0, 0, [() => _Parameters, 0], 0, 0, () => Targets, 0, () => InstanceAssociationOutputLocation$, 0, 0, 0, 0, 0, 2, 64 | 0, () => TargetLocations, 1, 1, [1, n0, _TM, 0, [2, n0, _TMa, 0, 0, 64 | 0]], () => AlarmConfiguration$], + 1 +]; +var CreateAssociationBatchResult$ = [ + 3, + n0, + _CABRr, + 0, + [_Su, _F], + [[() => AssociationDescriptionList, 0], [() => FailedCreateAssociationList, 0]] +]; +var CreateAssociationRequest$ = [ + 3, + n0, + _CARre, + 0, + [_N, _DV, _II, _P, _Ta, _SE, _OL, _AN, _ATPN, _ME, _MC, _CS, _SCy, _AOACI, _CN, _TL, _SO, _Du, _TM, _T, _AC, _ADAR], + [0, 0, 0, [() => _Parameters, 0], () => Targets, 0, () => InstanceAssociationOutputLocation$, 0, 0, 0, 0, 0, 0, 2, 64 | 0, () => TargetLocations, 1, 1, [1, n0, _TM, 0, [2, n0, _TMa, 0, 0, 64 | 0]], () => TagList, () => AlarmConfiguration$, 0], + 1 +]; +var CreateAssociationResult$ = [ + 3, + n0, + _CARrea, + 0, + [_AD], + [[() => AssociationDescription$, 0]] +]; +var CreateCloudConnectorRequest$ = [ + 3, + n0, + _CCCR, + 0, + [_DNi, _RA, _Con, _CCA, _D, _T], + [0, 0, () => CloudConnectorConfiguration$, 0, 0, () => TagList], + 4 +]; +var CreateCloudConnectorResult$ = [ + 3, + n0, + _CCCRr, + 0, + [_CCI], + [0] +]; +var CreateDocumentRequest$ = [ + 3, + n0, + _CDR, + 0, + [_Cont, _N, _Req, _At, _DNi, _VN, _DT, _DF, _TT, _T], + [0, 0, () => DocumentRequiresList, () => AttachmentsSourceList, 0, 0, 0, 0, 0, () => TagList], + 2 +]; +var CreateDocumentResult$ = [ + 3, + n0, + _CDRr, + 0, + [_DD], + [[() => DocumentDescription$, 0]] +]; +var CreateMaintenanceWindowRequest$ = [ + 3, + n0, + _CMWR, + 0, + [_N, _Sc, _Du, _Cu, _AUT, _D, _SDt, _EDn, _STch, _SO, _CTl, _T], + [0, 0, 1, 1, 2, [() => MaintenanceWindowDescription, 0], 0, 0, 0, 1, [0, 4], () => TagList], + 5 +]; +var CreateMaintenanceWindowResult$ = [ + 3, + n0, + _CMWRr, + 0, + [_WI], + [0] +]; +var CreateOpsItemRequest$ = [ + 3, + n0, + _COIR, + 0, + [_D, _Sou, _Ti, _OIT, _OD, _No, _Pr, _ROI, _T, _Ca, _Se, _AST, _AETc, _PST, _PET, _AIc], + [0, 0, 0, 0, () => OpsItemOperationalData, () => OpsItemNotifications, 1, () => RelatedOpsItems, () => TagList, 0, 0, 4, 4, 4, 4, 0], + 3 +]; +var CreateOpsItemResponse$ = [ + 3, + n0, + _COIRr, + 0, + [_OII, _OIA], + [0, 0] +]; +var CreateOpsMetadataRequest$ = [ + 3, + n0, + _COMR, + 0, + [_RI, _Me, _T], + [0, () => MetadataMap, () => TagList], + 1 +]; +var CreateOpsMetadataResult$ = [ + 3, + n0, + _COMRr, + 0, + [_OMA], + [0] +]; +var CreatePatchBaselineRequest$ = [ + 3, + n0, + _CPBR, + 0, + [_N, _OSp, _GF, _AR, _AP, _APCL, _APENS, _RP, _RPA, _D, _So, _ASUCS, _CTl, _T], + [0, 0, () => PatchFilterGroup$, () => PatchRuleGroup$, 64 | 0, 0, 2, 64 | 0, 0, 0, [() => PatchSourceList, 0], 0, [0, 4], () => TagList], + 1 +]; +var CreatePatchBaselineResult$ = [ + 3, + n0, + _CPBRr, + 0, + [_BI], + [0] +]; +var CreateResourceDataSyncRequest$ = [ + 3, + n0, + _CRDSR, + 0, + [_SN, _SDe, _ST, _SSy], + [0, () => ResourceDataSyncS3Destination$, 0, () => ResourceDataSyncSource$], + 1 +]; +var CreateResourceDataSyncResult$ = [ + 3, + n0, + _CRDSRr, + 0, + [], + [] +]; +var Credentials$ = [ + 3, + n0, + _Cr, + 0, + [_AKI, _SAK, _STe, _ETxp], + [0, [() => AccessKeySecretType, 0], [() => SessionTokenType, 0], 4], + 4 +]; +var DeleteActivationRequest$ = [ + 3, + n0, + _DAR, + 0, + [_AIct], + [0], + 1 +]; +var DeleteActivationResult$ = [ + 3, + n0, + _DARe, + 0, + [], + [] +]; +var DeleteAssociationRequest$ = [ + 3, + n0, + _DARel, + 0, + [_N, _II, _AIs], + [0, 0, 0] +]; +var DeleteAssociationResult$ = [ + 3, + n0, + _DARele, + 0, + [], + [] +]; +var DeleteCloudConnectorRequest$ = [ + 3, + n0, + _DCCR, + 0, + [_CCI], + [0], + 1 +]; +var DeleteCloudConnectorResult$ = [ + 3, + n0, + _DCCRe, + 0, + [_CCI], + [0] +]; +var DeleteDocumentRequest$ = [ + 3, + n0, + _DDR, + 0, + [_N, _DV, _VN, _Fo], + [0, 0, 0, 2], + 1 +]; +var DeleteDocumentResult$ = [ + 3, + n0, + _DDRe, + 0, + [], + [] +]; +var DeleteInventoryRequest$ = [ + 3, + n0, + _DIR, + 0, + [_TN, _SDO, _DR, _CTl], + [0, 0, 2, [0, 4]], + 1 +]; +var DeleteInventoryResult$ = [ + 3, + n0, + _DIRe, + 0, + [_DI, _TN, _DSe], + [0, 0, () => InventoryDeletionSummary$] +]; +var DeleteMaintenanceWindowRequest$ = [ + 3, + n0, + _DMWR, + 0, + [_WI], + [0], + 1 +]; +var DeleteMaintenanceWindowResult$ = [ + 3, + n0, + _DMWRe, + 0, + [_WI], + [0] +]; +var DeleteOpsItemRequest$ = [ + 3, + n0, + _DOIR, + 0, + [_OII], + [0], + 1 +]; +var DeleteOpsItemResponse$ = [ + 3, + n0, + _DOIRe, + 0, + [], + [] +]; +var DeleteOpsMetadataRequest$ = [ + 3, + n0, + _DOMR, + 0, + [_OMA], + [0], + 1 +]; +var DeleteOpsMetadataResult$ = [ + 3, + n0, + _DOMRe, + 0, + [], + [] +]; +var DeleteParameterRequest$ = [ + 3, + n0, + _DPR, + 0, + [_N], + [0], + 1 +]; +var DeleteParameterResult$ = [ + 3, + n0, + _DPRe, + 0, + [], + [] +]; +var DeleteParametersRequest$ = [ + 3, + n0, + _DPRel, + 0, + [_Na], + [64 | 0], + 1 +]; +var DeleteParametersResult$ = [ + 3, + n0, + _DPRele, + 0, + [_DP, _IP], + [64 | 0, 64 | 0] +]; +var DeletePatchBaselineRequest$ = [ + 3, + n0, + _DPBR, + 0, + [_BI], + [0], + 1 +]; +var DeletePatchBaselineResult$ = [ + 3, + n0, + _DPBRe, + 0, + [_BI], + [0] +]; +var DeleteResourceDataSyncRequest$ = [ + 3, + n0, + _DRDSR, + 0, + [_SN, _ST], + [0, 0], + 1 +]; +var DeleteResourceDataSyncResult$ = [ + 3, + n0, + _DRDSRe, + 0, + [], + [] +]; +var DeleteResourcePolicyRequest$ = [ + 3, + n0, + _DRPR, + 0, + [_RAe, _PI, _PH], + [0, 0, 0], + 3 +]; +var DeleteResourcePolicyResponse$ = [ + 3, + n0, + _DRPRe, + 0, + [], + [] +]; +var DeregisterManagedInstanceRequest$ = [ + 3, + n0, + _DMIR, + 0, + [_II], + [0], + 1 +]; +var DeregisterManagedInstanceResult$ = [ + 3, + n0, + _DMIRe, + 0, + [], + [] +]; +var DeregisterPatchBaselineForPatchGroupRequest$ = [ + 3, + n0, + _DPBFPGR, + 0, + [_BI, _PG], + [0, 0], + 2 +]; +var DeregisterPatchBaselineForPatchGroupResult$ = [ + 3, + n0, + _DPBFPGRe, + 0, + [_BI, _PG], + [0, 0] +]; +var DeregisterTargetFromMaintenanceWindowRequest$ = [ + 3, + n0, + _DTFMWR, + 0, + [_WI, _WTI, _Sa], + [0, 0, 2], + 2 +]; +var DeregisterTargetFromMaintenanceWindowResult$ = [ + 3, + n0, + _DTFMWRe, + 0, + [_WI, _WTI], + [0, 0] +]; +var DeregisterTaskFromMaintenanceWindowRequest$ = [ + 3, + n0, + _DTFMWRer, + 0, + [_WI, _WTIi], + [0, 0], + 2 +]; +var DeregisterTaskFromMaintenanceWindowResult$ = [ + 3, + n0, + _DTFMWRere, + 0, + [_WI, _WTIi], + [0, 0] +]; +var DescribeActivationsFilter$ = [ + 3, + n0, + _DAF, + 0, + [_FK, _FV], + [0, 64 | 0] +]; +var DescribeActivationsRequest$ = [ + 3, + n0, + _DARes, + 0, + [_Fi, _MR, _NT], + [() => DescribeActivationsFilterList, 1, 0] +]; +var DescribeActivationsResult$ = [ + 3, + n0, + _DAResc, + 0, + [_AL, _NT], + [() => ActivationList, 0] +]; +var DescribeAssociationExecutionsRequest$ = [ + 3, + n0, + _DAER, + 0, + [_AIs, _Fi, _MR, _NT], + [0, [() => AssociationExecutionFilterList, 0], 1, 0], + 1 +]; +var DescribeAssociationExecutionsResult$ = [ + 3, + n0, + _DAERe, + 0, + [_AEs, _NT], + [[() => AssociationExecutionsList, 0], 0] +]; +var DescribeAssociationExecutionTargetsRequest$ = [ + 3, + n0, + _DAETR, + 0, + [_AIs, _EI, _Fi, _MR, _NT], + [0, 0, [() => AssociationExecutionTargetsFilterList, 0], 1, 0], + 2 +]; +var DescribeAssociationExecutionTargetsResult$ = [ + 3, + n0, + _DAETRe, + 0, + [_AETs, _NT], + [[() => AssociationExecutionTargetsList, 0], 0] +]; +var DescribeAssociationRequest$ = [ + 3, + n0, + _DARescr, + 0, + [_N, _II, _AIs, _AV], + [0, 0, 0, 0] +]; +var DescribeAssociationResult$ = [ + 3, + n0, + _DARescri, + 0, + [_AD], + [[() => AssociationDescription$, 0]] +]; +var DescribeAutomationExecutionsRequest$ = [ + 3, + n0, + _DAERes, + 0, + [_Fi, _MR, _NT], + [() => AutomationExecutionFilterList, 1, 0] +]; +var DescribeAutomationExecutionsResult$ = [ + 3, + n0, + _DAEResc, + 0, + [_AEML, _NT], + [() => AutomationExecutionMetadataList, 0] +]; +var DescribeAutomationStepExecutionsRequest$ = [ + 3, + n0, + _DASER, + 0, + [_AEI, _Fi, _NT, _MR, _RO], + [0, () => StepExecutionFilterList, 0, 1, 2], + 1 +]; +var DescribeAutomationStepExecutionsResult$ = [ + 3, + n0, + _DASERe, + 0, + [_SEt, _NT], + [() => StepExecutionList, 0] +]; +var DescribeAvailablePatchesRequest$ = [ + 3, + n0, + _DAPR, + 0, + [_Fi, _MR, _NT], + [() => PatchOrchestratorFilterList, 1, 0] +]; +var DescribeAvailablePatchesResult$ = [ + 3, + n0, + _DAPRe, + 0, + [_Pa, _NT], + [() => PatchList, 0] +]; +var DescribeDocumentPermissionRequest$ = [ + 3, + n0, + _DDPR, + 0, + [_N, _PT, _MR, _NT], + [0, 0, 1, 0], + 2 +]; +var DescribeDocumentPermissionResponse$ = [ + 3, + n0, + _DDPRe, + 0, + [_AIcc, _ASIL, _NT], + [[() => AccountIdList, 0], [() => AccountSharingInfoList, 0], 0] +]; +var DescribeDocumentRequest$ = [ + 3, + n0, + _DDRes, + 0, + [_N, _DV, _VN], + [0, 0, 0], + 1 +]; +var DescribeDocumentResult$ = [ + 3, + n0, + _DDResc, + 0, + [_Do], + [[() => DocumentDescription$, 0]] +]; +var DescribeEffectiveInstanceAssociationsRequest$ = [ + 3, + n0, + _DEIAR, + 0, + [_II, _MR, _NT], + [0, 1, 0], + 1 +]; +var DescribeEffectiveInstanceAssociationsResult$ = [ + 3, + n0, + _DEIARe, + 0, + [_Ass, _NT], + [() => InstanceAssociationList, 0] +]; +var DescribeEffectivePatchesForPatchBaselineRequest$ = [ + 3, + n0, + _DEPFPBR, + 0, + [_BI, _MR, _NT], + [0, 1, 0], + 1 +]; +var DescribeEffectivePatchesForPatchBaselineResult$ = [ + 3, + n0, + _DEPFPBRe, + 0, + [_EP, _NT], + [() => EffectivePatchList, 0] +]; +var DescribeInstanceAssociationsStatusRequest$ = [ + 3, + n0, + _DIASR, + 0, + [_II, _MR, _NT], + [0, 1, 0], + 1 +]; +var DescribeInstanceAssociationsStatusResult$ = [ + 3, + n0, + _DIASRe, + 0, + [_IASI, _NT], + [() => InstanceAssociationStatusInfos, 0] +]; +var DescribeInstanceInformationRequest$ = [ + 3, + n0, + _DIIR, + 0, + [_IIFL, _Fi, _MR, _NT], + [[() => InstanceInformationFilterList, 0], [() => InstanceInformationStringFilterList, 0], 1, 0] +]; +var DescribeInstanceInformationResult$ = [ + 3, + n0, + _DIIRe, + 0, + [_IIL, _NT], + [[() => InstanceInformationList, 0], 0] +]; +var DescribeInstancePatchesRequest$ = [ + 3, + n0, + _DIPR, + 0, + [_II, _Fi, _NT, _MR], + [0, () => PatchOrchestratorFilterList, 0, 1], + 1 +]; +var DescribeInstancePatchesResult$ = [ + 3, + n0, + _DIPRe, + 0, + [_Pa, _NT], + [() => PatchComplianceDataList, 0] +]; +var DescribeInstancePatchStatesForPatchGroupRequest$ = [ + 3, + n0, + _DIPSFPGR, + 0, + [_PG, _Fi, _NT, _MR], + [0, () => InstancePatchStateFilterList, 0, 1], + 1 +]; +var DescribeInstancePatchStatesForPatchGroupResult$ = [ + 3, + n0, + _DIPSFPGRe, + 0, + [_IPS, _NT], + [[() => InstancePatchStatesList, 0], 0] +]; +var DescribeInstancePatchStatesRequest$ = [ + 3, + n0, + _DIPSR, + 0, + [_IIn, _NT, _MR], + [64 | 0, 0, 1], + 1 +]; +var DescribeInstancePatchStatesResult$ = [ + 3, + n0, + _DIPSRe, + 0, + [_IPS, _NT], + [[() => InstancePatchStateList, 0], 0] +]; +var DescribeInstancePropertiesRequest$ = [ + 3, + n0, + _DIPRes, + 0, + [_IPFL, _FWO, _MR, _NT], + [[() => InstancePropertyFilterList, 0], [() => InstancePropertyStringFilterList, 0], 1, 0] +]; +var DescribeInstancePropertiesResult$ = [ + 3, + n0, + _DIPResc, + 0, + [_IPn, _NT], + [[() => InstanceProperties, 0], 0] +]; +var DescribeInventoryDeletionsRequest$ = [ + 3, + n0, + _DIDR, + 0, + [_DI, _NT, _MR], + [0, 0, 1] +]; +var DescribeInventoryDeletionsResult$ = [ + 3, + n0, + _DIDRe, + 0, + [_IDn, _NT], + [() => InventoryDeletionsList, 0] +]; +var DescribeMaintenanceWindowExecutionsRequest$ = [ + 3, + n0, + _DMWER, + 0, + [_WI, _Fi, _MR, _NT], + [0, () => MaintenanceWindowFilterList, 1, 0], + 1 +]; +var DescribeMaintenanceWindowExecutionsResult$ = [ + 3, + n0, + _DMWERe, + 0, + [_WE, _NT], + [() => MaintenanceWindowExecutionList, 0] +]; +var DescribeMaintenanceWindowExecutionTaskInvocationsRequest$ = [ + 3, + n0, + _DMWETIR, + 0, + [_WEI, _TIa, _Fi, _MR, _NT], + [0, 0, () => MaintenanceWindowFilterList, 1, 0], + 2 +]; +var DescribeMaintenanceWindowExecutionTaskInvocationsResult$ = [ + 3, + n0, + _DMWETIRe, + 0, + [_WETII, _NT], + [[() => MaintenanceWindowExecutionTaskInvocationIdentityList, 0], 0] +]; +var DescribeMaintenanceWindowExecutionTasksRequest$ = [ + 3, + n0, + _DMWETR, + 0, + [_WEI, _Fi, _MR, _NT], + [0, () => MaintenanceWindowFilterList, 1, 0], + 1 +]; +var DescribeMaintenanceWindowExecutionTasksResult$ = [ + 3, + n0, + _DMWETRe, + 0, + [_WETI, _NT], + [() => MaintenanceWindowExecutionTaskIdentityList, 0] +]; +var DescribeMaintenanceWindowScheduleRequest$ = [ + 3, + n0, + _DMWSR, + 0, + [_WI, _Ta, _RTe, _Fi, _MR, _NT], + [0, () => Targets, 0, () => PatchOrchestratorFilterList, 1, 0] +]; +var DescribeMaintenanceWindowScheduleResult$ = [ + 3, + n0, + _DMWSRe, + 0, + [_SWE, _NT], + [() => ScheduledWindowExecutionList, 0] +]; +var DescribeMaintenanceWindowsForTargetRequest$ = [ + 3, + n0, + _DMWFTR, + 0, + [_Ta, _RTe, _MR, _NT], + [() => Targets, 0, 1, 0], + 2 +]; +var DescribeMaintenanceWindowsForTargetResult$ = [ + 3, + n0, + _DMWFTRe, + 0, + [_WIi, _NT], + [() => MaintenanceWindowsForTargetList, 0] +]; +var DescribeMaintenanceWindowsRequest$ = [ + 3, + n0, + _DMWRes, + 0, + [_Fi, _MR, _NT], + [() => MaintenanceWindowFilterList, 1, 0] +]; +var DescribeMaintenanceWindowsResult$ = [ + 3, + n0, + _DMWResc, + 0, + [_WIi, _NT], + [[() => MaintenanceWindowIdentityList, 0], 0] +]; +var DescribeMaintenanceWindowTargetsRequest$ = [ + 3, + n0, + _DMWTR, + 0, + [_WI, _Fi, _MR, _NT], + [0, () => MaintenanceWindowFilterList, 1, 0], + 1 +]; +var DescribeMaintenanceWindowTargetsResult$ = [ + 3, + n0, + _DMWTRe, + 0, + [_Ta, _NT], + [[() => MaintenanceWindowTargetList, 0], 0] +]; +var DescribeMaintenanceWindowTasksRequest$ = [ + 3, + n0, + _DMWTRes, + 0, + [_WI, _Fi, _MR, _NT], + [0, () => MaintenanceWindowFilterList, 1, 0], + 1 +]; +var DescribeMaintenanceWindowTasksResult$ = [ + 3, + n0, + _DMWTResc, + 0, + [_Tas, _NT], + [[() => MaintenanceWindowTaskList, 0], 0] +]; +var DescribeOpsItemsRequest$ = [ + 3, + n0, + _DOIRes, + 0, + [_OIF, _MR, _NT], + [() => OpsItemFilters, 1, 0] +]; +var DescribeOpsItemsResponse$ = [ + 3, + n0, + _DOIResc, + 0, + [_NT, _OIS], + [0, () => OpsItemSummaries] +]; +var DescribeParametersRequest$ = [ + 3, + n0, + _DPRes, + 0, + [_Fi, _PF, _MR, _NT, _Sh], + [() => ParametersFilterList, () => ParameterStringFilterList, 1, 0, 2] +]; +var DescribeParametersResult$ = [ + 3, + n0, + _DPResc, + 0, + [_P, _NT], + [() => ParameterMetadataList, 0] +]; +var DescribePatchBaselinesRequest$ = [ + 3, + n0, + _DPBRes, + 0, + [_Fi, _MR, _NT], + [() => PatchOrchestratorFilterList, 1, 0] +]; +var DescribePatchBaselinesResult$ = [ + 3, + n0, + _DPBResc, + 0, + [_BIa, _NT], + [() => PatchBaselineIdentityList, 0] +]; +var DescribePatchGroupsRequest$ = [ + 3, + n0, + _DPGR, + 0, + [_MR, _Fi, _NT], + [1, () => PatchOrchestratorFilterList, 0] +]; +var DescribePatchGroupsResult$ = [ + 3, + n0, + _DPGRe, + 0, + [_Ma, _NT], + [() => PatchGroupPatchBaselineMappingList, 0] +]; +var DescribePatchGroupStateRequest$ = [ + 3, + n0, + _DPGSR, + 0, + [_PG], + [0], + 1 +]; +var DescribePatchGroupStateResult$ = [ + 3, + n0, + _DPGSRe, + 0, + [_In, _IWIP, _IWIOP, _IWIPRP, _IWIRP, _IWMP, _IWFP, _IWNAP, _IWUNAP, _IWCNCP, _IWSNCP, _IWONCP, _IWASU], + [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] +]; +var DescribePatchPropertiesRequest$ = [ + 3, + n0, + _DPPR, + 0, + [_OSp, _Pro, _PS, _MR, _NT], + [0, 0, 0, 1, 0], + 2 +]; +var DescribePatchPropertiesResult$ = [ + 3, + n0, + _DPPRe, + 0, + [_Prop, _NT], + [[1, n0, _PPL, 0, 128 | 0], 0] +]; +var DescribeSessionsRequest$ = [ + 3, + n0, + _DSR, + 0, + [_S, _MR, _NT, _Fi], + [0, 1, 0, () => SessionFilterList], + 1 +]; +var DescribeSessionsResponse$ = [ + 3, + n0, + _DSRe, + 0, + [_Ses, _NT], + [() => SessionList, 0] +]; +var DisassociateOpsItemRelatedItemRequest$ = [ + 3, + n0, + _DOIRIR, + 0, + [_OII, _AIs], + [0, 0], + 2 +]; +var DisassociateOpsItemRelatedItemResponse$ = [ + 3, + n0, + _DOIRIRi, + 0, + [], + [] +]; +var DocumentDefaultVersionDescription$ = [ + 3, + n0, + _DDVD, + 0, + [_N, _DVe, _DVN], + [0, 0, 0] +]; +var DocumentDescription$ = [ + 3, + n0, + _DD, + 0, + [_Sha, _H, _HT, _N, _DNi, _VN, _Ow, _CD, _St, _SI, _DV, _D, _P, _PTl, _DT, _SV, _LV, _DVe, _DF, _TT, _T, _AItt, _Req, _Au, _RIe, _AVp, _PRV, _RS, _Ca, _CEa], + [0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, [() => DocumentParameterList, 0], [() => PlatformTypeList, 0], 0, 0, 0, 0, 0, 0, () => TagList, [() => AttachmentInformationList, 0], () => DocumentRequiresList, 0, [() => ReviewInformationList, 0], 0, 0, 0, 64 | 0, 64 | 0] +]; +var DocumentFilter$ = [ + 3, + n0, + _DFo, + 0, + [_k, _v], + [0, 0], + 2 +]; +var DocumentIdentifier$ = [ + 3, + n0, + _DIo, + 0, + [_N, _CD, _DNi, _Ow, _VN, _PTl, _DV, _DT, _SV, _DF, _TT, _T, _Req, _RS, _Au], + [0, 4, 0, 0, 0, [() => PlatformTypeList, 0], 0, 0, 0, 0, 0, () => TagList, () => DocumentRequiresList, 0, 0] +]; +var DocumentKeyValuesFilter$ = [ + 3, + n0, + _DKVF, + 0, + [_K, _Va], + [0, 64 | 0] +]; +var DocumentMetadataResponseInfo$ = [ + 3, + n0, + _DMRI, + 0, + [_RR], + [() => DocumentReviewerResponseList] +]; +var DocumentParameter$ = [ + 3, + n0, + _DPo, + 0, + [_N, _Ty, _D, _DVef], + [0, 0, 0, 0] +]; +var DocumentRequires$ = [ + 3, + n0, + _DRo, + 0, + [_N, _Ve, _RTeq, _VN], + [0, 0, 0, 0], + 1 +]; +var DocumentReviewCommentSource$ = [ + 3, + n0, + _DRCS, + 0, + [_Ty, _Cont], + [0, 0] +]; +var DocumentReviewerResponseSource$ = [ + 3, + n0, + _DRRS, + 0, + [_CTr, _UT, _RS, _Co, _Rev], + [4, 4, 0, () => DocumentReviewCommentList, 0] +]; +var DocumentReviews$ = [ + 3, + n0, + _DRoc, + 0, + [_Ac, _Co], + [0, () => DocumentReviewCommentList], + 1 +]; +var DocumentVersionInfo$ = [ + 3, + n0, + _DVI, + 0, + [_N, _DNi, _DV, _VN, _CD, _IDVs, _DF, _St, _SI, _RS], + [0, 0, 0, 0, 4, 2, 0, 0, 0, 0] +]; +var EffectivePatch$ = [ + 3, + n0, + _EPf, + 0, + [_Pat, _PSa], + [() => Patch$, () => PatchStatus$] +]; +var FailedCreateAssociation$ = [ + 3, + n0, + _FCA, + 0, + [_Ent, _M, _Fa], + [[() => CreateAssociationBatchRequestEntry$, 0], 0, 0] +]; +var FailureDetails$ = [ + 3, + n0, + _FD, + 0, + [_FS, _FT, _De], + [0, 0, [2, n0, _APM, 0, 0, 64 | 0]] +]; +var GetAccessTokenRequest$ = [ + 3, + n0, + _GATR, + 0, + [_ARI], + [0], + 1 +]; +var GetAccessTokenResponse$ = [ + 3, + n0, + _GATRe, + 0, + [_Cr, _ARS], + [[() => Credentials$, 0], 0] +]; +var GetAutomationExecutionRequest$ = [ + 3, + n0, + _GAER, + 0, + [_AEI], + [0], + 1 +]; +var GetAutomationExecutionResult$ = [ + 3, + n0, + _GAERe, + 0, + [_AEu], + [() => AutomationExecution$] +]; +var GetCalendarStateRequest$ = [ + 3, + n0, + _GCSR, + 0, + [_CN, _ATt], + [64 | 0, 0], + 1 +]; +var GetCalendarStateResponse$ = [ + 3, + n0, + _GCSRe, + 0, + [_S, _ATt, _NTT], + [0, 0, 0] +]; +var GetCloudConnectorRequest$ = [ + 3, + n0, + _GCCR, + 0, + [_CCI], + [0], + 1 +]; +var GetCloudConnectorResult$ = [ + 3, + n0, + _GCCRe, + 0, + [_CCAl, _DNi, _D, _RA, _Con, _CCA, _CAr, _UA], + [0, 0, 0, 0, () => CloudConnectorConfiguration$, 0, 4, 4] +]; +var GetCommandInvocationRequest$ = [ + 3, + n0, + _GCIR, + 0, + [_CI, _II, _PNl], + [0, 0, 0], + 2 +]; +var GetCommandInvocationResult$ = [ + 3, + n0, + _GCIRe, + 0, + [_CI, _II, _Co, _DN, _DV, _PNl, _RCes, _ESDT, _EETx, _EEDT, _St, _SD, _SOC, _SOU, _SEC, _SEU, _CWOC], + [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, () => CloudWatchOutputConfig$] +]; +var GetConnectionStatusRequest$ = [ + 3, + n0, + _GCSRet, + 0, + [_Tar], + [0], + 1 +]; +var GetConnectionStatusResponse$ = [ + 3, + n0, + _GCSReto, + 0, + [_Tar, _St], + [0, 0] +]; +var GetDefaultPatchBaselineRequest$ = [ + 3, + n0, + _GDPBR, + 0, + [_OSp], + [0] +]; +var GetDefaultPatchBaselineResult$ = [ + 3, + n0, + _GDPBRe, + 0, + [_BI, _OSp], + [0, 0] +]; +var GetDeployablePatchSnapshotForInstanceRequest$ = [ + 3, + n0, + _GDPSFIR, + 0, + [_II, _SIn, _BO, _USDSE], + [0, 0, [() => BaselineOverride$, 0], 2], + 2 +]; +var GetDeployablePatchSnapshotForInstanceResult$ = [ + 3, + n0, + _GDPSFIRe, + 0, + [_II, _SIn, _SDU, _Prod], + [0, 0, 0, 0] +]; +var GetDocumentRequest$ = [ + 3, + n0, + _GDR, + 0, + [_N, _VN, _DV, _DF], + [0, 0, 0, 0], + 1 +]; +var GetDocumentResult$ = [ + 3, + n0, + _GDRe, + 0, + [_N, _CD, _DNi, _VN, _DV, _St, _SI, _Cont, _DT, _DF, _Req, _ACtt, _RS], + [0, 4, 0, 0, 0, 0, 0, 0, 0, 0, () => DocumentRequiresList, [() => AttachmentContentList, 0], 0] +]; +var GetExecutionPreviewRequest$ = [ + 3, + n0, + _GEPR, + 0, + [_EPI], + [0], + 1 +]; +var GetExecutionPreviewResponse$ = [ + 3, + n0, + _GEPRe, + 0, + [_EPI, _EAn, _St, _SM, _EPx], + [0, 4, 0, 0, () => ExecutionPreview$] +]; +var GetInventoryRequest$ = [ + 3, + n0, + _GIR, + 0, + [_Fi, _Ag, _RAes, _NT, _MR], + [[() => InventoryFilterList, 0], [() => InventoryAggregatorList, 0], [() => ResultAttributeList, 0], 0, 1] +]; +var GetInventoryResult$ = [ + 3, + n0, + _GIRe, + 0, + [_Enti, _NT], + [[() => InventoryResultEntityList, 0], 0] +]; +var GetInventorySchemaRequest$ = [ + 3, + n0, + _GISR, + 0, + [_TN, _NT, _MR, _Agg, _STu], + [0, 0, 1, 2, 2] +]; +var GetInventorySchemaResult$ = [ + 3, + n0, + _GISRe, + 0, + [_Sch, _NT], + [[() => InventoryItemSchemaResultList, 0], 0] +]; +var GetMaintenanceWindowExecutionRequest$ = [ + 3, + n0, + _GMWER, + 0, + [_WEI], + [0], + 1 +]; +var GetMaintenanceWindowExecutionResult$ = [ + 3, + n0, + _GMWERe, + 0, + [_WEI, _TIas, _St, _SD, _STt, _ETn], + [0, 64 | 0, 0, 0, 4, 4] +]; +var GetMaintenanceWindowExecutionTaskInvocationRequest$ = [ + 3, + n0, + _GMWETIR, + 0, + [_WEI, _TIa, _IInv], + [0, 0, 0], + 3 +]; +var GetMaintenanceWindowExecutionTaskInvocationResult$ = [ + 3, + n0, + _GMWETIRe, + 0, + [_WEI, _TEI, _IInv, _EI, _TTa, _P, _St, _SD, _STt, _ETn, _OI, _WTI], + [0, 0, 0, 0, 0, [() => MaintenanceWindowExecutionTaskInvocationParameters, 0], 0, 0, 4, 4, [() => OwnerInformation, 0], 0] +]; +var GetMaintenanceWindowExecutionTaskRequest$ = [ + 3, + n0, + _GMWETR, + 0, + [_WEI, _TIa], + [0, 0], + 2 +]; +var GetMaintenanceWindowExecutionTaskResult$ = [ + 3, + n0, + _GMWETRe, + 0, + [_WEI, _TEI, _TAa, _SR, _Ty, _TPa, _Pr, _MC, _ME, _St, _SD, _STt, _ETn, _AC, _TA], + [0, 0, 0, 0, 0, [() => MaintenanceWindowTaskParametersList, 0], 1, 0, 0, 0, 0, 4, 4, () => AlarmConfiguration$, () => AlarmStateInformationList] +]; +var GetMaintenanceWindowRequest$ = [ + 3, + n0, + _GMWR, + 0, + [_WI], + [0], + 1 +]; +var GetMaintenanceWindowResult$ = [ + 3, + n0, + _GMWRe, + 0, + [_WI, _N, _D, _SDt, _EDn, _Sc, _STch, _SO, _NET, _Du, _Cu, _AUT, _Ena, _CD, _MD], + [0, 0, [() => MaintenanceWindowDescription, 0], 0, 0, 0, 0, 1, 0, 1, 1, 2, 2, 4, 4] +]; +var GetMaintenanceWindowTaskRequest$ = [ + 3, + n0, + _GMWTR, + 0, + [_WI, _WTIi], + [0, 0], + 2 +]; +var GetMaintenanceWindowTaskResult$ = [ + 3, + n0, + _GMWTRe, + 0, + [_WI, _WTIi, _Ta, _TAa, _SRA, _TTa, _TPa, _TIP, _Pr, _MC, _ME, _LI, _N, _D, _CB, _AC], + [0, 0, () => Targets, 0, 0, 0, [() => MaintenanceWindowTaskParameters, 0], [() => MaintenanceWindowTaskInvocationParameters$, 0], 1, 0, 0, () => LoggingInfo$, 0, [() => MaintenanceWindowDescription, 0], 0, () => AlarmConfiguration$] +]; +var GetOpsItemRequest$ = [ + 3, + n0, + _GOIR, + 0, + [_OII, _OIA], + [0, 0], + 1 +]; +var GetOpsItemResponse$ = [ + 3, + n0, + _GOIRe, + 0, + [_OIp], + [() => OpsItem$] +]; +var GetOpsMetadataRequest$ = [ + 3, + n0, + _GOMR, + 0, + [_OMA, _MR, _NT], + [0, 1, 0], + 1 +]; +var GetOpsMetadataResult$ = [ + 3, + n0, + _GOMRe, + 0, + [_RI, _Me, _NT], + [0, () => MetadataMap, 0] +]; +var GetOpsSummaryRequest$ = [ + 3, + n0, + _GOSR, + 0, + [_SN, _Fi, _Ag, _RAes, _NT, _MR], + [0, [() => OpsFilterList, 0], [() => OpsAggregatorList, 0], [() => OpsResultAttributeList, 0], 0, 1] +]; +var GetOpsSummaryResult$ = [ + 3, + n0, + _GOSRe, + 0, + [_Enti, _NT], + [[() => OpsEntityList, 0], 0] +]; +var GetParameterHistoryRequest$ = [ + 3, + n0, + _GPHR, + 0, + [_N, _WD, _MR, _NT], + [0, 2, 1, 0], + 1 +]; +var GetParameterHistoryResult$ = [ + 3, + n0, + _GPHRe, + 0, + [_P, _NT], + [[() => ParameterHistoryList, 0], 0] +]; +var GetParameterRequest$ = [ + 3, + n0, + _GPR, + 0, + [_N, _WD], + [0, 2], + 1 +]; +var GetParameterResult$ = [ + 3, + n0, + _GPRe, + 0, + [_Par], + [[() => Parameter$, 0]] +]; +var GetParametersByPathRequest$ = [ + 3, + n0, + _GPBPR, + 0, + [_Path, _Rec, _PF, _WD, _MR, _NT], + [0, 2, () => ParameterStringFilterList, 2, 1, 0], + 1 +]; +var GetParametersByPathResult$ = [ + 3, + n0, + _GPBPRe, + 0, + [_P, _NT], + [[() => ParameterList, 0], 0] +]; +var GetParametersRequest$ = [ + 3, + n0, + _GPRet, + 0, + [_Na, _WD], + [64 | 0, 2], + 1 +]; +var GetParametersResult$ = [ + 3, + n0, + _GPReta, + 0, + [_P, _IP], + [[() => ParameterList, 0], 64 | 0] +]; +var GetPatchBaselineForPatchGroupRequest$ = [ + 3, + n0, + _GPBFPGR, + 0, + [_PG, _OSp], + [0, 0], + 1 +]; +var GetPatchBaselineForPatchGroupResult$ = [ + 3, + n0, + _GPBFPGRe, + 0, + [_BI, _PG, _OSp], + [0, 0, 0] +]; +var GetPatchBaselineRequest$ = [ + 3, + n0, + _GPBR, + 0, + [_BI], + [0], + 1 +]; +var GetPatchBaselineResult$ = [ + 3, + n0, + _GPBRe, + 0, + [_BI, _N, _OSp, _GF, _AR, _AP, _APCL, _APENS, _RP, _RPA, _PGa, _CD, _MD, _D, _So, _ASUCS], + [0, 0, 0, () => PatchFilterGroup$, () => PatchRuleGroup$, 64 | 0, 0, 2, 64 | 0, 0, 64 | 0, 4, 4, 0, [() => PatchSourceList, 0], 0] +]; +var GetResourcePoliciesRequest$ = [ + 3, + n0, + _GRPR, + 0, + [_RAe, _NT, _MR], + [0, 0, 1], + 1 +]; +var GetResourcePoliciesResponse$ = [ + 3, + n0, + _GRPRe, + 0, + [_NT, _Po], + [0, () => GetResourcePoliciesResponseEntries] +]; +var GetResourcePoliciesResponseEntry$ = [ + 3, + n0, + _GRPRE, + 0, + [_PI, _PH, _Pol], + [0, 0, 0] +]; +var GetServiceSettingRequest$ = [ + 3, + n0, + _GSSR, + 0, + [_SIe], + [0], + 1 +]; +var GetServiceSettingResult$ = [ + 3, + n0, + _GSSRe, + 0, + [_SSe], + [() => ServiceSetting$] +]; +var InstanceAggregatedAssociationOverview$ = [ + 3, + n0, + _IAAO, + 0, + [_DS, _IASAC], + [0, 128 | 1] +]; +var InstanceAssociation$ = [ + 3, + n0, + _IAns, + 0, + [_AIs, _II, _Cont, _AV], + [0, 0, 0, 0] +]; +var InstanceAssociationOutputLocation$ = [ + 3, + n0, + _IAOL, + 0, + [_SL], + [() => S3OutputLocation$] +]; +var InstanceAssociationOutputUrl$ = [ + 3, + n0, + _IAOU, + 0, + [_SOUu], + [() => S3OutputUrl$] +]; +var InstanceAssociationStatusInfo$ = [ + 3, + n0, + _IASIn, + 0, + [_AIs, _N, _DV, _AV, _II, _EDx, _St, _DS, _ES, _ECr, _OU, _AN], + [0, 0, 0, 0, 0, 4, 0, 0, 0, 0, () => InstanceAssociationOutputUrl$, 0] +]; +var InstanceInfo$ = [ + 3, + n0, + _IIns, + 0, + [_ATg, _AVg, _CNo, _ISn, _IAp, _MS, _N, _PTla, _PNla, _PV, _RTe, _STo, _SIo, _SLo, _AZ, _AZI], + [0, 0, 0, 0, [() => IPAddress, 0], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +]; +var InstanceInformation$ = [ + 3, + n0, + _IInst, + 0, + [_II, _PSi, _LPDT, _AVg, _ILV, _PTla, _PNla, _PV, _AIct, _IRa, _RD, _RTe, _N, _IPA, _CNo, _AS, _LAED, _LSAED, _AO, _SIo, _STo, _SLo], + [0, 0, 4, 0, 2, 0, 0, 0, 0, 0, 4, 0, 0, [() => IPAddress, 0], 0, 0, 4, 4, () => InstanceAggregatedAssociationOverview$, 0, 0, 0] +]; +var InstanceInformationFilter$ = [ + 3, + n0, + _IIF, + 0, + [_k, _vS], + [0, [() => InstanceInformationFilterValueSet, 0]], + 2 +]; +var InstanceInformationStringFilter$ = [ + 3, + n0, + _IISF, + 0, + [_K, _Va], + [0, [() => InstanceInformationFilterValueSet, 0]], + 2 +]; +var InstancePatchState$ = [ + 3, + n0, + _IPSn, + 0, + [_II, _PG, _BI, _OST, _OET, _Op, _SIn, _IOLn, _OI, _IC, _IOC, _IPRC, _IRC, _MCi, _FC, _UNAC, _NAC, _ASUC, _LNRIOT, _ROe, _CNCC, _SNCC, _ONCC], + [0, 0, 0, 4, 4, 0, 0, 0, [() => OwnerInformation, 0], 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 0, 1, 1, 1], + 6 +]; +var InstancePatchStateFilter$ = [ + 3, + n0, + _IPSF, + 0, + [_K, _Va, _Ty], + [0, 64 | 0, 0], + 3 +]; +var InstanceProperty$ = [ + 3, + n0, + _IPns, + 0, + [_N, _II, _ITns, _IRn, _KN, _ISns, _Ar, _IPA, _LTa, _PSi, _LPDT, _AVg, _PTla, _PNla, _PV, _AIct, _IRa, _RD, _RTe, _CNo, _AS, _LAED, _LSAED, _AO, _SIo, _STo, _SLo, _AZ], + [0, 0, 0, 0, 0, 0, 0, [() => IPAddress, 0], 4, 0, 4, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 4, () => InstanceAggregatedAssociationOverview$, 0, 0, 0, 0] +]; +var InstancePropertyFilter$ = [ + 3, + n0, + _IPF, + 0, + [_k, _vS], + [0, [() => InstancePropertyFilterValueSet, 0]], + 2 +]; +var InstancePropertyStringFilter$ = [ + 3, + n0, + _IPSFn, + 0, + [_K, _Va, _Ope], + [0, [() => InstancePropertyFilterValueSet, 0], 0], + 2 +]; +var InventoryAggregator$ = [ + 3, + n0, + _IAnv, + 0, + [_Ex, _Ag, _G], + [0, [() => InventoryAggregatorList, 0], [() => InventoryGroupList, 0]] +]; +var InventoryDeletionStatusItem$ = [ + 3, + n0, + _IDSI, + 0, + [_DI, _TN, _DST, _LS, _LSM, _DSe, _LSUT], + [0, 0, 4, 0, 0, () => InventoryDeletionSummary$, 4] +]; +var InventoryDeletionSummary$ = [ + 3, + n0, + _IDS, + 0, + [_TCo, _RCem, _SIu], + [1, 1, () => InventoryDeletionSummaryItems] +]; +var InventoryDeletionSummaryItem$ = [ + 3, + n0, + _IDSIn, + 0, + [_Ve, _Cou, _RCem], + [0, 1, 1] +]; +var InventoryFilter$ = [ + 3, + n0, + _IFn, + 0, + [_K, _Va, _Ty], + [0, [() => InventoryFilterValueList, 0], 0], + 2 +]; +var InventoryGroup$ = [ + 3, + n0, + _IG, + 0, + [_N, _Fi], + [0, [() => InventoryFilterList, 0]], + 2 +]; +var InventoryItem$ = [ + 3, + n0, + _IInve, + 0, + [_TN, _SV, _CTa, _CH, _Cont, _Conte], + [0, 0, 0, 0, [1, n0, _IIEL, 0, 128 | 0], 128 | 0], + 3 +]; +var InventoryItemAttribute$ = [ + 3, + n0, + _IIA, + 0, + [_N, _DTa], + [0, 0], + 2 +]; +var InventoryItemSchema$ = [ + 3, + n0, + _IIS, + 0, + [_TN, _Att, _Ve, _DNi], + [0, [() => InventoryItemAttributeList, 0], 0, 0], + 2 +]; +var InventoryResultEntity$ = [ + 3, + n0, + _IRE, + 0, + [_I, _Dat], + [0, () => InventoryResultItemMap] +]; +var InventoryResultItem$ = [ + 3, + n0, + _IRIn, + 0, + [_TN, _SV, _Cont, _CTa, _CH], + [0, 0, [1, n0, _IIEL, 0, 128 | 0], 0, 0], + 3 +]; +var LabelParameterVersionRequest$ = [ + 3, + n0, + _LPVR, + 0, + [_N, _La, _PVa], + [0, 64 | 0, 1], + 2 +]; +var LabelParameterVersionResult$ = [ + 3, + n0, + _LPVRa, + 0, + [_IL, _PVa], + [64 | 0, 1] +]; +var ListAssociationsRequest$ = [ + 3, + n0, + _LAR, + 0, + [_AFL, _MR, _NT], + [[() => AssociationFilterList, 0], 1, 0] +]; +var ListAssociationsResult$ = [ + 3, + n0, + _LARi, + 0, + [_Ass, _NT], + [[() => AssociationList, 0], 0] +]; +var ListAssociationVersionsRequest$ = [ + 3, + n0, + _LAVR, + 0, + [_AIs, _MR, _NT], + [0, 1, 0], + 1 +]; +var ListAssociationVersionsResult$ = [ + 3, + n0, + _LAVRi, + 0, + [_AVs, _NT], + [[() => AssociationVersionList, 0], 0] +]; +var ListCloudConnectorsRequest$ = [ + 3, + n0, + _LCCR, + 0, + [_MR, _NT, _Fi], + [1, 0, () => CloudConnectorFilterList] +]; +var ListCloudConnectorsResult$ = [ + 3, + n0, + _LCCRi, + 0, + [_CCl, _NT], + [() => CloudConnectorSummaryList, 0] +]; +var ListCommandInvocationsRequest$ = [ + 3, + n0, + _LCIR, + 0, + [_CI, _II, _MR, _NT, _Fi, _De], + [0, 0, 1, 0, () => CommandFilterList, 2] +]; +var ListCommandInvocationsResult$ = [ + 3, + n0, + _LCIRi, + 0, + [_CIomm, _NT], + [() => CommandInvocationList, 0] +]; +var ListCommandsRequest$ = [ + 3, + n0, + _LCR, + 0, + [_CI, _II, _MR, _NT, _Fi], + [0, 0, 1, 0, () => CommandFilterList] +]; +var ListCommandsResult$ = [ + 3, + n0, + _LCRi, + 0, + [_Com, _NT], + [[() => CommandList, 0], 0] +]; +var ListComplianceItemsRequest$ = [ + 3, + n0, + _LCIRis, + 0, + [_Fi, _RIes, _RT, _NT, _MR], + [[() => ComplianceStringFilterList, 0], 64 | 0, 64 | 0, 0, 1] +]; +var ListComplianceItemsResult$ = [ + 3, + n0, + _LCIRist, + 0, + [_CIomp, _NT], + [[() => ComplianceItemList, 0], 0] +]; +var ListComplianceSummariesRequest$ = [ + 3, + n0, + _LCSR, + 0, + [_Fi, _NT, _MR], + [[() => ComplianceStringFilterList, 0], 0, 1] +]; +var ListComplianceSummariesResult$ = [ + 3, + n0, + _LCSRi, + 0, + [_CSIo, _NT], + [[() => ComplianceSummaryItemList, 0], 0] +]; +var ListDocumentMetadataHistoryRequest$ = [ + 3, + n0, + _LDMHR, + 0, + [_N, _Me, _DV, _NT, _MR], + [0, 0, 0, 0, 1], + 2 +]; +var ListDocumentMetadataHistoryResponse$ = [ + 3, + n0, + _LDMHRi, + 0, + [_N, _DV, _Au, _Me, _NT], + [0, 0, 0, () => DocumentMetadataResponseInfo$, 0] +]; +var ListDocumentsRequest$ = [ + 3, + n0, + _LDR, + 0, + [_DFL, _Fi, _MR, _NT], + [[() => DocumentFilterList, 0], () => DocumentKeyValuesFilterList, 1, 0] +]; +var ListDocumentsResult$ = [ + 3, + n0, + _LDRi, + 0, + [_DIoc, _NT], + [[() => DocumentIdentifierList, 0], 0] +]; +var ListDocumentVersionsRequest$ = [ + 3, + n0, + _LDVR, + 0, + [_N, _MR, _NT], + [0, 1, 0], + 1 +]; +var ListDocumentVersionsResult$ = [ + 3, + n0, + _LDVRi, + 0, + [_DVo, _NT], + [() => DocumentVersionList, 0] +]; +var ListInventoryEntriesRequest$ = [ + 3, + n0, + _LIER, + 0, + [_II, _TN, _Fi, _NT, _MR], + [0, 0, [() => InventoryFilterList, 0], 0, 1], + 2 +]; +var ListInventoryEntriesResult$ = [ + 3, + n0, + _LIERi, + 0, + [_TN, _II, _SV, _CTa, _En, _NT], + [0, 0, 0, 0, [1, n0, _IIEL, 0, 128 | 0], 0] +]; +var ListNodesRequest$ = [ + 3, + n0, + _LNR, + 0, + [_SN, _Fi, _NT, _MR], + [0, [() => NodeFilterList, 0], 0, 1] +]; +var ListNodesResult$ = [ + 3, + n0, + _LNRi, + 0, + [_Nod, _NT], + [[() => NodeList, 0], 0] +]; +var ListNodesSummaryRequest$ = [ + 3, + n0, + _LNSR, + 0, + [_Ag, _SN, _Fi, _NT, _MR], + [[() => NodeAggregatorList, 0], 0, [() => NodeFilterList, 0], 0, 1], + 1 +]; +var ListNodesSummaryResult$ = [ + 3, + n0, + _LNSRi, + 0, + [_Sum, _NT], + [[1, n0, _NSL, 0, 128 | 0], 0] +]; +var ListOpsItemEventsRequest$ = [ + 3, + n0, + _LOIER, + 0, + [_Fi, _MR, _NT], + [() => OpsItemEventFilters, 1, 0] +]; +var ListOpsItemEventsResponse$ = [ + 3, + n0, + _LOIERi, + 0, + [_NT, _Summ], + [0, () => OpsItemEventSummaries] +]; +var ListOpsItemRelatedItemsRequest$ = [ + 3, + n0, + _LOIRIR, + 0, + [_OII, _Fi, _MR, _NT], + [0, () => OpsItemRelatedItemsFilters, 1, 0] +]; +var ListOpsItemRelatedItemsResponse$ = [ + 3, + n0, + _LOIRIRi, + 0, + [_NT, _Summ], + [0, () => OpsItemRelatedItemSummaries] +]; +var ListOpsMetadataRequest$ = [ + 3, + n0, + _LOMR, + 0, + [_Fi, _MR, _NT], + [() => OpsMetadataFilterList, 1, 0] +]; +var ListOpsMetadataResult$ = [ + 3, + n0, + _LOMRi, + 0, + [_OML, _NT], + [() => OpsMetadataList, 0] +]; +var ListResourceComplianceSummariesRequest$ = [ + 3, + n0, + _LRCSR, + 0, + [_Fi, _NT, _MR], + [[() => ComplianceStringFilterList, 0], 0, 1] +]; +var ListResourceComplianceSummariesResult$ = [ + 3, + n0, + _LRCSRi, + 0, + [_RCSI, _NT], + [[() => ResourceComplianceSummaryItemList, 0], 0] +]; +var ListResourceDataSyncRequest$ = [ + 3, + n0, + _LRDSR, + 0, + [_ST, _NT, _MR], + [0, 0, 1] +]; +var ListResourceDataSyncResult$ = [ + 3, + n0, + _LRDSRi, + 0, + [_RDSI, _NT], + [() => ResourceDataSyncItemList, 0] +]; +var ListTagsForResourceRequest$ = [ + 3, + n0, + _LTFRR, + 0, + [_RTe, _RI], + [0, 0], + 2 +]; +var ListTagsForResourceResult$ = [ + 3, + n0, + _LTFRRi, + 0, + [_TLa], + [() => TagList] +]; +var LoggingInfo$ = [ + 3, + n0, + _LI, + 0, + [_SBN, _SRe, _SKP], + [0, 0, 0], + 2 +]; +var MaintenanceWindowAutomationParameters$ = [ + 3, + n0, + _MWAP, + 0, + [_DV, _P], + [0, [2, n0, _APM, 0, 0, 64 | 0]] +]; +var MaintenanceWindowExecution$ = [ + 3, + n0, + _MWE, + 0, + [_WI, _WEI, _St, _SD, _STt, _ETn], + [0, 0, 0, 0, 4, 4] +]; +var MaintenanceWindowExecutionTaskIdentity$ = [ + 3, + n0, + _MWETI, + 0, + [_WEI, _TEI, _St, _SD, _STt, _ETn, _TAa, _TTa, _AC, _TA], + [0, 0, 0, 0, 4, 4, 0, 0, () => AlarmConfiguration$, () => AlarmStateInformationList] +]; +var MaintenanceWindowExecutionTaskInvocationIdentity$ = [ + 3, + n0, + _MWETII, + 0, + [_WEI, _TEI, _IInv, _EI, _TTa, _P, _St, _SD, _STt, _ETn, _OI, _WTI], + [0, 0, 0, 0, 0, [() => MaintenanceWindowExecutionTaskInvocationParameters, 0], 0, 0, 4, 4, [() => OwnerInformation, 0], 0] +]; +var MaintenanceWindowFilter$ = [ + 3, + n0, + _MWF, + 0, + [_K, _Va], + [0, 64 | 0] +]; +var MaintenanceWindowIdentity$ = [ + 3, + n0, + _MWI, + 0, + [_WI, _N, _D, _Ena, _Du, _Cu, _Sc, _STch, _SO, _EDn, _SDt, _NET], + [0, 0, [() => MaintenanceWindowDescription, 0], 2, 1, 1, 0, 0, 1, 0, 0, 0] +]; +var MaintenanceWindowIdentityForTarget$ = [ + 3, + n0, + _MWIFT, + 0, + [_WI, _N], + [0, 0] +]; +var MaintenanceWindowLambdaParameters$ = [ + 3, + n0, + _MWLPa, + 0, + [_CCli, _Q, _Pay], + [0, 0, [() => MaintenanceWindowLambdaPayload, 0]] +]; +var MaintenanceWindowRunCommandParameters$ = [ + 3, + n0, + _MWRCP, + 0, + [_Co, _CWOC, _DH, _DHT, _DV, _NC, _OSBN, _OSKP, _P, _SRA, _TS], + [0, () => CloudWatchOutputConfig$, 0, 0, 0, () => NotificationConfig$, 0, 0, [() => _Parameters, 0], 0, 1] +]; +var MaintenanceWindowStepFunctionsParameters$ = [ + 3, + n0, + _MWSFP, + 0, + [_Inp, _N], + [[() => MaintenanceWindowStepFunctionsInput, 0], 0] +]; +var MaintenanceWindowTarget$ = [ + 3, + n0, + _MWT, + 0, + [_WI, _WTI, _RTe, _Ta, _OI, _N, _D], + [0, 0, 0, () => Targets, [() => OwnerInformation, 0], 0, [() => MaintenanceWindowDescription, 0]] +]; +var MaintenanceWindowTask$ = [ + 3, + n0, + _MWTa, + 0, + [_WI, _WTIi, _TAa, _Ty, _Ta, _TPa, _Pr, _LI, _SRA, _MC, _ME, _N, _D, _CB, _AC], + [0, 0, 0, 0, () => Targets, [() => MaintenanceWindowTaskParameters, 0], 1, () => LoggingInfo$, 0, 0, 0, 0, [() => MaintenanceWindowDescription, 0], 0, () => AlarmConfiguration$] +]; +var MaintenanceWindowTaskInvocationParameters$ = [ + 3, + n0, + _MWTIP, + 0, + [_RCu, _Aut, _SF, _Lam], + [[() => MaintenanceWindowRunCommandParameters$, 0], () => MaintenanceWindowAutomationParameters$, [() => MaintenanceWindowStepFunctionsParameters$, 0], [() => MaintenanceWindowLambdaParameters$, 0]] +]; +var MaintenanceWindowTaskParameterValueExpression$ = [ + 3, + n0, + _MWTPVE, + 8, + [_Va], + [[() => MaintenanceWindowTaskParameterValueList, 0]] +]; +var MetadataValue$ = [ + 3, + n0, + _MV, + 0, + [_V], + [0] +]; +var ModifyDocumentPermissionRequest$ = [ + 3, + n0, + _MDPR, + 0, + [_N, _PT, _AITA, _AITR, _SDV], + [0, 0, [() => AccountIdList, 0], [() => AccountIdList, 0], 0], + 2 +]; +var ModifyDocumentPermissionResponse$ = [ + 3, + n0, + _MDPRo, + 0, + [], + [] +]; +var Node$ = [ + 3, + n0, + _Node, + 0, + [_CTa, _I, _Ow, _Reg, _NTo], + [4, 0, () => NodeOwnerInfo$, 0, [() => NodeType$, 0]] +]; +var NodeAggregator$ = [ + 3, + n0, + _NA, + 0, + [_ATgg, _TN, _ANt, _Ag], + [0, 0, 0, [() => NodeAggregatorList, 0]], + 3 +]; +var NodeFilter$ = [ + 3, + n0, + _NF, + 0, + [_K, _Va, _Ty], + [0, [() => NodeFilterValueList, 0], 0], + 2 +]; +var NodeOwnerInfo$ = [ + 3, + n0, + _NOI, + 0, + [_AIc, _OUI, _OUP], + [0, 0, 0] +]; +var NonCompliantSummary$ = [ + 3, + n0, + _NCS, + 0, + [_NCC, _SS], + [1, () => SeveritySummary$] +]; +var NotificationConfig$ = [ + 3, + n0, + _NC, + 0, + [_NAo, _NE, _NTot], + [0, 64 | 0, 0] +]; +var OpsAggregator$ = [ + 3, + n0, + _OA, + 0, + [_ATgg, _TN, _ANt, _Va, _Fi, _Ag], + [0, 0, 0, 128 | 0, [() => OpsFilterList, 0], [() => OpsAggregatorList, 0]] +]; +var OpsEntity$ = [ + 3, + n0, + _OE, + 0, + [_I, _Dat], + [0, () => OpsEntityItemMap] +]; +var OpsEntityItem$ = [ + 3, + n0, + _OEI, + 0, + [_CTa, _Cont], + [0, [1, n0, _OEIEL, 0, 128 | 0]] +]; +var OpsFilter$ = [ + 3, + n0, + _OF, + 0, + [_K, _Va, _Ty], + [0, [() => OpsFilterValueList, 0], 0], + 2 +]; +var OpsItem$ = [ + 3, + n0, + _OIp, + 0, + [_CBr, _OIT, _CT, _D, _LMB, _LMT, _No, _Pr, _ROI, _St, _OII, _Ve, _Ti, _Sou, _OD, _Ca, _Se, _AST, _AETc, _PST, _PET, _OIA], + [0, 0, 4, 0, 0, 4, () => OpsItemNotifications, 1, () => RelatedOpsItems, 0, 0, 0, 0, 0, () => OpsItemOperationalData, 0, 0, 4, 4, 4, 4, 0] +]; +var OpsItemDataValue$ = [ + 3, + n0, + _OIDV, + 0, + [_V, _Ty], + [0, 0] +]; +var OpsItemEventFilter$ = [ + 3, + n0, + _OIEF, + 0, + [_K, _Va, _Ope], + [0, 64 | 0, 0], + 3 +]; +var OpsItemEventSummary$ = [ + 3, + n0, + _OIES, + 0, + [_OII, _EIv, _Sou, _DTe, _Det, _CBr, _CT], + [0, 0, 0, 0, 0, () => OpsItemIdentity$, 4] +]; +var OpsItemFilter$ = [ + 3, + n0, + _OIFp, + 0, + [_K, _Va, _Ope], + [0, 64 | 0, 0], + 3 +]; +var OpsItemIdentity$ = [ + 3, + n0, + _OIIp, + 0, + [_Arn], + [0] +]; +var OpsItemNotification$ = [ + 3, + n0, + _OIN, + 0, + [_Arn], + [0] +]; +var OpsItemRelatedItemsFilter$ = [ + 3, + n0, + _OIRIF, + 0, + [_K, _Va, _Ope], + [0, 64 | 0, 0], + 3 +]; +var OpsItemRelatedItemSummary$ = [ + 3, + n0, + _OIRIS, + 0, + [_OII, _AIs, _RTe, _AT, _RU, _CBr, _CT, _LMB, _LMT], + [0, 0, 0, 0, 0, () => OpsItemIdentity$, 4, () => OpsItemIdentity$, 4] +]; +var OpsItemSummary$ = [ + 3, + n0, + _OISp, + 0, + [_CBr, _CT, _LMB, _LMT, _Pr, _Sou, _St, _OII, _Ti, _OD, _Ca, _Se, _OIT, _AST, _AETc, _PST, _PET], + [0, 4, 0, 4, 1, 0, 0, 0, 0, () => OpsItemOperationalData, 0, 0, 0, 4, 4, 4, 4] +]; +var OpsMetadata$ = [ + 3, + n0, + _OM, + 0, + [_RI, _OMA, _LMD, _LMU, _CDr], + [0, 0, 4, 0, 4] +]; +var OpsMetadataFilter$ = [ + 3, + n0, + _OMF, + 0, + [_K, _Va], + [0, 64 | 0], + 2 +]; +var OpsResultAttribute$ = [ + 3, + n0, + _ORA, + 0, + [_TN], + [0], + 1 +]; +var OutputSource$ = [ + 3, + n0, + _OS, + 0, + [_OSI, _OSTu], + [0, 0] +]; +var Parameter$ = [ + 3, + n0, + _Par, + 0, + [_N, _Ty, _V, _Ve, _Sel, _SRo, _LMD, _ARN, _DTa], + [0, 0, [() => PSParameterValue, 0], 1, 0, 0, 4, 0, 0] +]; +var ParameterHistory$ = [ + 3, + n0, + _PHa, + 0, + [_N, _Ty, _KI, _LMD, _LMU, _D, _V, _APl, _Ve, _La, _Tie, _Po, _DTa], + [0, 0, 0, 4, 0, 0, [() => PSParameterValue, 0], 0, 1, 64 | 0, 0, () => ParameterPolicyList, 0] +]; +var ParameterInlinePolicy$ = [ + 3, + n0, + _PIP, + 0, + [_PTo, _PTol, _PSo], + [0, 0, 0] +]; +var ParameterMetadata$ = [ + 3, + n0, + _PM, + 0, + [_N, _ARN, _Ty, _KI, _LMD, _LMU, _D, _APl, _Ve, _Tie, _Po, _DTa], + [0, 0, 0, 0, 4, 0, 0, 0, 1, 0, () => ParameterPolicyList, 0] +]; +var ParametersFilter$ = [ + 3, + n0, + _PFa, + 0, + [_K, _Va], + [0, 64 | 0], + 2 +]; +var ParameterStringFilter$ = [ + 3, + n0, + _PSF, + 0, + [_K, _Opt, _Va], + [0, 0, 64 | 0], + 1 +]; +var ParentStepDetails$ = [ + 3, + n0, + _PSD, + 0, + [_SEI, _SNt, _Ac, _It, _IV], + [0, 0, 0, 1, 0] +]; +var Patch$ = [ + 3, + n0, + _Pat, + 0, + [_I, _RDe, _Ti, _D, _CU, _Ven, _PFr, _Prod, _Cl, _MSs, _KNb, _MN, _Lan, _AIdv, _BIu, _CVEI, _N, _Ep, _Ve, _Rel, _Arc, _Se, _Rep], + [0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64 | 0, 64 | 0, 64 | 0, 0, 1, 0, 0, 0, 0, 0] +]; +var PatchBaselineIdentity$ = [ + 3, + n0, + _PBI, + 0, + [_BI, _BN, _OSp, _BD, _DB], + [0, 0, 0, 0, 2] +]; +var PatchComplianceData$ = [ + 3, + n0, + _PCD, + 0, + [_Ti, _KBI, _Cl, _Se, _S, _ITnst, _CVEI], + [0, 0, 0, 0, 0, 4, 0], + 6 +]; +var PatchFilter$ = [ + 3, + n0, + _PFat, + 0, + [_K, _Va], + [0, 64 | 0], + 2 +]; +var PatchFilterGroup$ = [ + 3, + n0, + _PFG, + 0, + [_PFatc], + [() => PatchFilterList], + 1 +]; +var PatchGroupPatchBaselineMapping$ = [ + 3, + n0, + _PGPBM, + 0, + [_PG, _BIas], + [0, () => PatchBaselineIdentity$] +]; +var PatchOrchestratorFilter$ = [ + 3, + n0, + _POF, + 0, + [_K, _Va], + [0, 64 | 0] +]; +var PatchRule$ = [ + 3, + n0, + _PR, + 0, + [_PFG, _CL, _AAD, _AUD, _ENS], + [() => PatchFilterGroup$, 0, 1, 0, 2], + 1 +]; +var PatchRuleGroup$ = [ + 3, + n0, + _PRG, + 0, + [_PRa], + [() => PatchRuleList], + 1 +]; +var PatchSource$ = [ + 3, + n0, + _PSat, + 0, + [_N, _Produ, _Con], + [0, 64 | 0, [() => PatchSourceConfiguration, 0]], + 3 +]; +var PatchStatus$ = [ + 3, + n0, + _PSa, + 0, + [_DSep, _CL, _ADp], + [0, 0, 4] +]; +var ProgressCounters$ = [ + 3, + n0, + _PC, + 0, + [_TSo, _SSu, _FSa, _CSa, _TOS], + [1, 1, 1, 1, 1] +]; +var PutComplianceItemsRequest$ = [ + 3, + n0, + _PCIR, + 0, + [_RI, _RTe, _CTo, _ES, _Ite, _ICH, _UTp], + [0, 0, 0, () => ComplianceExecutionSummary$, () => ComplianceItemEntryList, 0, 0], + 5 +]; +var PutComplianceItemsResult$ = [ + 3, + n0, + _PCIRu, + 0, + [], + [] +]; +var PutInventoryRequest$ = [ + 3, + n0, + _PIR, + 0, + [_II, _Ite], + [0, [() => InventoryItemList, 0]], + 2 +]; +var PutInventoryResult$ = [ + 3, + n0, + _PIRu, + 0, + [_M], + [0] +]; +var PutParameterRequest$ = [ + 3, + n0, + _PPR, + 0, + [_N, _V, _D, _Ty, _KI, _Ov, _APl, _T, _Tie, _Po, _DTa], + [0, [() => PSParameterValue, 0], 0, 0, 0, 2, 0, () => TagList, 0, 0, 0], + 2 +]; +var PutParameterResult$ = [ + 3, + n0, + _PPRu, + 0, + [_Ve, _Tie], + [1, 0] +]; +var PutResourcePolicyRequest$ = [ + 3, + n0, + _PRPR, + 0, + [_RAe, _Pol, _PI, _PH], + [0, 0, 0, 0], + 2 +]; +var PutResourcePolicyResponse$ = [ + 3, + n0, + _PRPRu, + 0, + [_PI, _PH], + [0, 0] +]; +var RegisterDefaultPatchBaselineRequest$ = [ + 3, + n0, + _RDPBR, + 0, + [_BI], + [0], + 1 +]; +var RegisterDefaultPatchBaselineResult$ = [ + 3, + n0, + _RDPBRe, + 0, + [_BI], + [0] +]; +var RegisterPatchBaselineForPatchGroupRequest$ = [ + 3, + n0, + _RPBFPGR, + 0, + [_BI, _PG], + [0, 0], + 2 +]; +var RegisterPatchBaselineForPatchGroupResult$ = [ + 3, + n0, + _RPBFPGRe, + 0, + [_BI, _PG], + [0, 0] +]; +var RegisterTargetWithMaintenanceWindowRequest$ = [ + 3, + n0, + _RTWMWR, + 0, + [_WI, _RTe, _Ta, _OI, _N, _D, _CTl], + [0, 0, () => Targets, [() => OwnerInformation, 0], 0, [() => MaintenanceWindowDescription, 0], [0, 4]], + 3 +]; +var RegisterTargetWithMaintenanceWindowResult$ = [ + 3, + n0, + _RTWMWRe, + 0, + [_WTI], + [0] +]; +var RegisterTaskWithMaintenanceWindowRequest$ = [ + 3, + n0, + _RTWMWReg, + 0, + [_WI, _TAa, _TTa, _Ta, _SRA, _TPa, _TIP, _Pr, _MC, _ME, _LI, _N, _D, _CTl, _CB, _AC], + [0, 0, 0, () => Targets, 0, [() => MaintenanceWindowTaskParameters, 0], [() => MaintenanceWindowTaskInvocationParameters$, 0], 1, 0, 0, () => LoggingInfo$, 0, [() => MaintenanceWindowDescription, 0], [0, 4], 0, () => AlarmConfiguration$], + 3 +]; +var RegisterTaskWithMaintenanceWindowResult$ = [ + 3, + n0, + _RTWMWRegi, + 0, + [_WTIi], + [0] +]; +var RegistrationMetadataItem$ = [ + 3, + n0, + _RMI, + 0, + [_K, _V], + [0, 0], + 2 +]; +var RelatedOpsItem$ = [ + 3, + n0, + _ROIe, + 0, + [_OII], + [0], + 1 +]; +var RemoveTagsFromResourceRequest$ = [ + 3, + n0, + _RTFRR, + 0, + [_RTe, _RI, _TK], + [0, 0, 64 | 0], + 3 +]; +var RemoveTagsFromResourceResult$ = [ + 3, + n0, + _RTFRRe, + 0, + [], + [] +]; +var ResetServiceSettingRequest$ = [ + 3, + n0, + _RSSR, + 0, + [_SIe], + [0], + 1 +]; +var ResetServiceSettingResult$ = [ + 3, + n0, + _RSSRe, + 0, + [_SSe], + [() => ServiceSetting$] +]; +var ResolvedTargets$ = [ + 3, + n0, + _RTes, + 0, + [_PVar, _Tr], + [64 | 0, 2] +]; +var ResourceComplianceSummaryItem$ = [ + 3, + n0, + _RCSIe, + 0, + [_CTo, _RTe, _RI, _St, _OSv, _ES, _CSo, _NCS], + [0, 0, 0, 0, 0, () => ComplianceExecutionSummary$, () => CompliantSummary$, () => NonCompliantSummary$] +]; +var ResourceDataSyncAwsOrganizationsSource$ = [ + 3, + n0, + _RDSAOS, + 0, + [_OSTr, _OUr], + [0, () => ResourceDataSyncOrganizationalUnitList], + 1 +]; +var ResourceDataSyncDestinationDataSharing$ = [ + 3, + n0, + _RDSDDS, + 0, + [_DDST], + [0] +]; +var ResourceDataSyncItem$ = [ + 3, + n0, + _RDSIe, + 0, + [_SN, _ST, _SSy, _SDe, _LST, _LSST, _SLMT, _LS, _SCT, _LSSM], + [0, 0, () => ResourceDataSyncSourceWithState$, () => ResourceDataSyncS3Destination$, 4, 4, 4, 0, 4, 0] +]; +var ResourceDataSyncOrganizationalUnit$ = [ + 3, + n0, + _RDSOU, + 0, + [_OUI], + [0] +]; +var ResourceDataSyncS3Destination$ = [ + 3, + n0, + _RDSSD, + 0, + [_BNu, _SFy, _Reg, _Pre, _AWSKMSKARN, _DDS], + [0, 0, 0, 0, 0, () => ResourceDataSyncDestinationDataSharing$], + 3 +]; +var ResourceDataSyncSource$ = [ + 3, + n0, + _RDSS, + 0, + [_STo, _SRou, _AOS, _IFR, _EAODS], + [0, 64 | 0, () => ResourceDataSyncAwsOrganizationsSource$, 2, 2], + 2 +]; +var ResourceDataSyncSourceWithState$ = [ + 3, + n0, + _RDSSWS, + 0, + [_STo, _AOS, _SRou, _IFR, _S, _EAODS], + [0, () => ResourceDataSyncAwsOrganizationsSource$, 64 | 0, 2, 0, 2] +]; +var ResultAttribute$ = [ + 3, + n0, + _RAesu, + 0, + [_TN], + [0], + 1 +]; +var ResumeSessionRequest$ = [ + 3, + n0, + _RSR, + 0, + [_SIes], + [0], + 1 +]; +var ResumeSessionResponse$ = [ + 3, + n0, + _RSRe, + 0, + [_SIes, _TV, _SUt], + [0, 0, 0] +]; +var ReviewInformation$ = [ + 3, + n0, + _RIe, + 0, + [_RTev, _St, _Rev], + [4, 0, 0] +]; +var Runbook$ = [ + 3, + n0, + _Ru, + 0, + [_DN, _DV, _P, _TPN, _Ta, _TM, _MC, _ME, _TL], + [0, 0, [2, n0, _APM, 0, 0, 64 | 0], 0, () => Targets, [1, n0, _TM, 0, [2, n0, _TMa, 0, 0, 64 | 0]], 0, 0, () => TargetLocations], + 1 +]; +var S3OutputLocation$ = [ + 3, + n0, + _SOL, + 0, + [_OSR, _OSBN, _OSKP], + [0, 0, 0] +]; +var S3OutputUrl$ = [ + 3, + n0, + _SOUu, + 0, + [_OU], + [0] +]; +var ScheduledWindowExecution$ = [ + 3, + n0, + _SWEc, + 0, + [_WI, _N, _ET], + [0, 0, 0] +]; +var SendAutomationSignalRequest$ = [ + 3, + n0, + _SASR, + 0, + [_AEI, _STi, _Pay], + [0, 0, [2, n0, _APM, 0, 0, 64 | 0]], + 2 +]; +var SendAutomationSignalResult$ = [ + 3, + n0, + _SASRe, + 0, + [], + [] +]; +var SendCommandRequest$ = [ + 3, + n0, + _SCR, + 0, + [_DN, _IIn, _Ta, _DV, _DH, _DHT, _TS, _Co, _P, _OSR, _OSBN, _OSKP, _MC, _ME, _SRA, _NC, _CWOC, _AC], + [0, 64 | 0, () => Targets, 0, 0, 0, 1, 0, [() => _Parameters, 0], 0, 0, 0, 0, 0, 0, () => NotificationConfig$, () => CloudWatchOutputConfig$, () => AlarmConfiguration$], + 1 +]; +var SendCommandResult$ = [ + 3, + n0, + _SCRe, + 0, + [_C], + [[() => Command$, 0]] +]; +var ServiceSetting$ = [ + 3, + n0, + _SSe, + 0, + [_SIe, _SVe, _LMD, _LMU, _ARN, _St], + [0, 0, 4, 0, 0, 0] +]; +var Session$ = [ + 3, + n0, + _Sess, + 0, + [_SIes, _Tar, _St, _SDt, _EDn, _DN, _Ow, _Rea, _De, _OU, _MSD, _ATc], + [0, 0, 0, 4, 4, 0, 0, 0, 0, () => SessionManagerOutputUrl$, 0, 0] +]; +var SessionFilter$ = [ + 3, + n0, + _SFe, + 0, + [_k, _v], + [0, 0], + 2 +]; +var SessionManagerOutputUrl$ = [ + 3, + n0, + _SMOU, + 0, + [_SOUu, _CWOU], + [0, 0] +]; +var SeveritySummary$ = [ + 3, + n0, + _SS, + 0, + [_CCr, _HC, _MCe, _LC, _ICn, _UC], + [1, 1, 1, 1, 1, 1] +]; +var StartAccessRequestRequest$ = [ + 3, + n0, + _SARR, + 0, + [_Rea, _Ta, _T], + [0, () => Targets, () => TagList], + 2 +]; +var StartAccessRequestResponse$ = [ + 3, + n0, + _SARRt, + 0, + [_ARI], + [0] +]; +var StartAssociationsOnceRequest$ = [ + 3, + n0, + _SAOR, + 0, + [_AIss], + [64 | 0], + 1 +]; +var StartAssociationsOnceResult$ = [ + 3, + n0, + _SAORt, + 0, + [], + [] +]; +var StartAutomationExecutionRequest$ = [ + 3, + n0, + _SAER, + 0, + [_DN, _DV, _P, _CTl, _Mo, _TPN, _Ta, _TM, _MC, _ME, _TL, _T, _AC, _TLURL], + [0, 0, [2, n0, _APM, 0, 0, 64 | 0], 0, 0, 0, () => AutomationTargets, [1, n0, _TM, 0, [2, n0, _TMa, 0, 0, 64 | 0]], 0, 0, () => TargetLocations, () => TagList, () => AlarmConfiguration$, 0], + 1 +]; +var StartAutomationExecutionResult$ = [ + 3, + n0, + _SAERt, + 0, + [_AEI], + [0] +]; +var StartChangeRequestExecutionRequest$ = [ + 3, + n0, + _SCRER, + 0, + [_DN, _R, _STc, _DV, _P, _CRN, _CTl, _AA, _T, _SETc, _CDh], + [0, () => Runbooks, 4, 0, [2, n0, _APM, 0, 0, 64 | 0], 0, 0, 2, () => TagList, 4, 0], + 2 +]; +var StartChangeRequestExecutionResult$ = [ + 3, + n0, + _SCRERt, + 0, + [_AEI], + [0] +]; +var StartExecutionPreviewRequest$ = [ + 3, + n0, + _SEPR, + 0, + [_DN, _DV, _EIx], + [0, 0, () => ExecutionInputs$], + 1 +]; +var StartExecutionPreviewResponse$ = [ + 3, + n0, + _SEPRt, + 0, + [_EPI], + [0] +]; +var StartSessionRequest$ = [ + 3, + n0, + _SSR, + 0, + [_Tar, _DN, _Rea, _P], + [0, 0, 0, [2, n0, _SMP, 0, 0, 64 | 0]], + 1 +]; +var StartSessionResponse$ = [ + 3, + n0, + _SSRt, + 0, + [_SIes, _TV, _SUt], + [0, 0, 0] +]; +var StepExecution$ = [ + 3, + n0, + _SEte, + 0, + [_SNt, _Ac, _TS, _OFn, _MA, _EST, _EET, _SSt, _RCes, _Inpu, _Ou, _Res, _FM, _WM, _FD, _SEI, _OP, _IE, _NS, _ICs, _VNS, _Ta, _TLar, _TA, _PSD], + [0, 0, 1, 0, 1, 4, 4, 0, 0, 128 | 0, [2, n0, _APM, 0, 0, 64 | 0], 0, 0, 0, () => FailureDetails$, 0, [2, n0, _APM, 0, 0, 64 | 0], 2, 0, 2, 64 | 0, () => Targets, () => TargetLocation$, () => AlarmStateInformationList, () => ParentStepDetails$] +]; +var StepExecutionFilter$ = [ + 3, + n0, + _SEF, + 0, + [_K, _Va], + [0, 64 | 0], + 2 +]; +var StopAutomationExecutionRequest$ = [ + 3, + n0, + _SAERto, + 0, + [_AEI, _Ty], + [0, 0], + 1 +]; +var StopAutomationExecutionResult$ = [ + 3, + n0, + _SAERtop, + 0, + [], + [] +]; +var Tag$ = [ + 3, + n0, + _Tag, + 0, + [_K, _V], + [0, 0], + 2 +]; +var Target$ = [ + 3, + n0, + _Tar, + 0, + [_K, _Va], + [0, 64 | 0] +]; +var TargetLocation$ = [ + 3, + n0, + _TLar, + 0, + [_Acc, _Re, _TLMC, _TLME, _ERN, _TLAC, _ICOU, _EAx, _Ta, _TMC, _TME], + [64 | 0, 64 | 0, 0, 0, 0, () => AlarmConfiguration$, 2, 64 | 0, () => AutomationTargets, 0, 0] +]; +var TargetPreview$ = [ + 3, + n0, + _TPar, + 0, + [_Cou, _TT], + [1, 0] +]; +var TerminateSessionRequest$ = [ + 3, + n0, + _TSR, + 0, + [_SIes], + [0], + 1 +]; +var TerminateSessionResponse$ = [ + 3, + n0, + _TSRe, + 0, + [_SIes], + [0] +]; +var UnlabelParameterVersionRequest$ = [ + 3, + n0, + _UPVR, + 0, + [_N, _PVa, _La], + [0, 1, 64 | 0], + 3 +]; +var UnlabelParameterVersionResult$ = [ + 3, + n0, + _UPVRn, + 0, + [_RLe, _IL], + [64 | 0, 64 | 0] +]; +var UpdateAssociationRequest$ = [ + 3, + n0, + _UAR, + 0, + [_AIs, _P, _DV, _SE, _OL, _N, _Ta, _AN, _AV, _ATPN, _ME, _MC, _CS, _SCy, _AOACI, _CN, _TL, _SO, _Du, _TM, _AC, _ADAR], + [0, [() => _Parameters, 0], 0, 0, () => InstanceAssociationOutputLocation$, 0, () => Targets, 0, 0, 0, 0, 0, 0, 0, 2, 64 | 0, () => TargetLocations, 1, 1, [1, n0, _TM, 0, [2, n0, _TMa, 0, 0, 64 | 0]], () => AlarmConfiguration$, 0], + 1 +]; +var UpdateAssociationResult$ = [ + 3, + n0, + _UARp, + 0, + [_AD], + [[() => AssociationDescription$, 0]] +]; +var UpdateAssociationStatusRequest$ = [ + 3, + n0, + _UASR, + 0, + [_N, _II, _AS], + [0, 0, () => AssociationStatus$], + 3 +]; +var UpdateAssociationStatusResult$ = [ + 3, + n0, + _UASRp, + 0, + [_AD], + [[() => AssociationDescription$, 0]] +]; +var UpdateCloudConnectorRequest$ = [ + 3, + n0, + _UCCR, + 0, + [_CCI, _DNi, _Con, _D], + [0, 0, () => CloudConnectorConfiguration$, 0], + 1 +]; +var UpdateCloudConnectorResult$ = [ + 3, + n0, + _UCCRp, + 0, + [_CCI], + [0] +]; +var UpdateDocumentDefaultVersionRequest$ = [ + 3, + n0, + _UDDVR, + 0, + [_N, _DV], + [0, 0], + 2 +]; +var UpdateDocumentDefaultVersionResult$ = [ + 3, + n0, + _UDDVRp, + 0, + [_D], + [() => DocumentDefaultVersionDescription$] +]; +var UpdateDocumentMetadataRequest$ = [ + 3, + n0, + _UDMR, + 0, + [_N, _DRoc, _DV], + [0, () => DocumentReviews$, 0], + 2 +]; +var UpdateDocumentMetadataResponse$ = [ + 3, + n0, + _UDMRp, + 0, + [], + [] +]; +var UpdateDocumentRequest$ = [ + 3, + n0, + _UDR, + 0, + [_Cont, _N, _At, _DNi, _VN, _DV, _DF, _TT], + [0, 0, () => AttachmentsSourceList, 0, 0, 0, 0, 0], + 2 +]; +var UpdateDocumentResult$ = [ + 3, + n0, + _UDRp, + 0, + [_DD], + [[() => DocumentDescription$, 0]] +]; +var UpdateMaintenanceWindowRequest$ = [ + 3, + n0, + _UMWR, + 0, + [_WI, _N, _D, _SDt, _EDn, _Sc, _STch, _SO, _Du, _Cu, _AUT, _Ena, _Repl], + [0, 0, [() => MaintenanceWindowDescription, 0], 0, 0, 0, 0, 1, 1, 1, 2, 2, 2], + 1 +]; +var UpdateMaintenanceWindowResult$ = [ + 3, + n0, + _UMWRp, + 0, + [_WI, _N, _D, _SDt, _EDn, _Sc, _STch, _SO, _Du, _Cu, _AUT, _Ena], + [0, 0, [() => MaintenanceWindowDescription, 0], 0, 0, 0, 0, 1, 1, 1, 2, 2] +]; +var UpdateMaintenanceWindowTargetRequest$ = [ + 3, + n0, + _UMWTR, + 0, + [_WI, _WTI, _Ta, _OI, _N, _D, _Repl], + [0, 0, () => Targets, [() => OwnerInformation, 0], 0, [() => MaintenanceWindowDescription, 0], 2], + 2 +]; +var UpdateMaintenanceWindowTargetResult$ = [ + 3, + n0, + _UMWTRp, + 0, + [_WI, _WTI, _Ta, _OI, _N, _D], + [0, 0, () => Targets, [() => OwnerInformation, 0], 0, [() => MaintenanceWindowDescription, 0]] +]; +var UpdateMaintenanceWindowTaskRequest$ = [ + 3, + n0, + _UMWTRpd, + 0, + [_WI, _WTIi, _Ta, _TAa, _SRA, _TPa, _TIP, _Pr, _MC, _ME, _LI, _N, _D, _Repl, _CB, _AC], + [0, 0, () => Targets, 0, 0, [() => MaintenanceWindowTaskParameters, 0], [() => MaintenanceWindowTaskInvocationParameters$, 0], 1, 0, 0, () => LoggingInfo$, 0, [() => MaintenanceWindowDescription, 0], 2, 0, () => AlarmConfiguration$], + 2 +]; +var UpdateMaintenanceWindowTaskResult$ = [ + 3, + n0, + _UMWTRpda, + 0, + [_WI, _WTIi, _Ta, _TAa, _SRA, _TPa, _TIP, _Pr, _MC, _ME, _LI, _N, _D, _CB, _AC], + [0, 0, () => Targets, 0, 0, [() => MaintenanceWindowTaskParameters, 0], [() => MaintenanceWindowTaskInvocationParameters$, 0], 1, 0, 0, () => LoggingInfo$, 0, [() => MaintenanceWindowDescription, 0], 0, () => AlarmConfiguration$] +]; +var UpdateManagedInstanceRoleRequest$ = [ + 3, + n0, + _UMIRR, + 0, + [_II, _IRa], + [0, 0], + 2 +]; +var UpdateManagedInstanceRoleResult$ = [ + 3, + n0, + _UMIRRp, + 0, + [], + [] +]; +var UpdateOpsItemRequest$ = [ + 3, + n0, + _UOIR, + 0, + [_OII, _D, _OD, _ODTD, _No, _Pr, _ROI, _St, _Ti, _Ca, _Se, _AST, _AETc, _PST, _PET, _OIA], + [0, 0, () => OpsItemOperationalData, 64 | 0, () => OpsItemNotifications, 1, () => RelatedOpsItems, 0, 0, 0, 0, 4, 4, 4, 4, 0], + 1 +]; +var UpdateOpsItemResponse$ = [ + 3, + n0, + _UOIRp, + 0, + [], + [] +]; +var UpdateOpsMetadataRequest$ = [ + 3, + n0, + _UOMR, + 0, + [_OMA, _MTU, _KTD], + [0, () => MetadataMap, 64 | 0], + 1 +]; +var UpdateOpsMetadataResult$ = [ + 3, + n0, + _UOMRp, + 0, + [_OMA], + [0] +]; +var UpdatePatchBaselineRequest$ = [ + 3, + n0, + _UPBR, + 0, + [_BI, _N, _GF, _AR, _AP, _APCL, _APENS, _RP, _RPA, _D, _So, _ASUCS, _Repl], + [0, 0, () => PatchFilterGroup$, () => PatchRuleGroup$, 64 | 0, 0, 2, 64 | 0, 0, 0, [() => PatchSourceList, 0], 0, 2], + 1 +]; +var UpdatePatchBaselineResult$ = [ + 3, + n0, + _UPBRp, + 0, + [_BI, _N, _OSp, _GF, _AR, _AP, _APCL, _APENS, _RP, _RPA, _CD, _MD, _D, _So, _ASUCS], + [0, 0, 0, () => PatchFilterGroup$, () => PatchRuleGroup$, 64 | 0, 0, 2, 64 | 0, 0, 4, 4, 0, [() => PatchSourceList, 0], 0] +]; +var UpdateResourceDataSyncRequest$ = [ + 3, + n0, + _URDSR, + 0, + [_SN, _ST, _SSy], + [0, 0, () => ResourceDataSyncSource$], + 3 +]; +var UpdateResourceDataSyncResult$ = [ + 3, + n0, + _URDSRp, + 0, + [], + [] +]; +var UpdateServiceSettingRequest$ = [ + 3, + n0, + _USSR, + 0, + [_SIe, _SVe], + [0, 0], + 2 +]; +var UpdateServiceSettingResult$ = [ + 3, + n0, + _USSRp, + 0, + [], + [] +]; +var ValidateCloudConnectorRequest$ = [ + 3, + n0, + _VCCR, + 0, + [_CCI, _MR, _NT], + [0, 1, 0], + 1 +]; +var ValidateCloudConnectorResult$ = [ + 3, + n0, + _VCCRa, + 0, + [_VF, _NT], + [() => ValidationFindingList, 0] +]; +var ValidationFinding$ = [ + 3, + n0, + _VFa, + 0, + [_Ty, _Cod, _M, _PMr, _Sco], + [0, 0, 0, 0, () => ValidationFindingScope$] +]; +var ValidationFindingScope$ = [ + 3, + n0, + _VFS, + 0, + [_Ty, _I], + [0, 0] +]; +var AccountIdList = [ + 1, + n0, + _AIL, + 0, + [ + 0, + { [_xN]: _AIc } + ] +]; +var AccountSharingInfoList = [ + 1, + n0, + _ASIL, + 0, + [ + () => AccountSharingInfo$, + { [_xN]: _ASI } + ] +]; +var ActivationList = [ + 1, + n0, + _AL, + 0, + () => Activation$ +]; +var AlarmList = [ + 1, + n0, + _ALl, + 0, + () => Alarm$ +]; +var AlarmStateInformationList = [ + 1, + n0, + _ASILl, + 0, + () => AlarmStateInformation$ +]; +var AssociationDescriptionList = [ + 1, + n0, + _ADL, + 0, + [ + () => AssociationDescription$, + { [_xN]: _AD } + ] +]; +var AssociationExecutionFilterList = [ + 1, + n0, + _AEFL, + 0, + [ + () => AssociationExecutionFilter$, + { [_xN]: _AEF } + ] +]; +var AssociationExecutionsList = [ + 1, + n0, + _AEL, + 0, + [ + () => AssociationExecution$, + { [_xN]: _AE } + ] +]; +var AssociationExecutionTargetsFilterList = [ + 1, + n0, + _AETFL, + 0, + [ + () => AssociationExecutionTargetsFilter$, + { [_xN]: _AETF } + ] +]; +var AssociationExecutionTargetsList = [ + 1, + n0, + _AETL, + 0, + [ + () => AssociationExecutionTarget$, + { [_xN]: _AET } + ] +]; +var AssociationFilterList = [ + 1, + n0, + _AFL, + 0, + [ + () => AssociationFilter$, + { [_xN]: _AF } + ] +]; +var AssociationList = [ + 1, + n0, + _ALs, + 0, + [ + () => Association$, + { [_xN]: _As } + ] +]; +var AssociationVersionList = [ + 1, + n0, + _AVL, + 0, + [ + () => AssociationVersionInfo$, + 0 + ] +]; +var AttachmentContentList = [ + 1, + n0, + _ACL, + 0, + [ + () => AttachmentContent$, + { [_xN]: _ACt } + ] +]; +var AttachmentInformationList = [ + 1, + n0, + _AILt, + 0, + [ + () => AttachmentInformation$, + { [_xN]: _AIt } + ] +]; +var AttachmentsSourceList = [ + 1, + n0, + _ASL, + 0, + () => AttachmentsSource$ +]; +var AutomationExecutionFilterList = [ + 1, + n0, + _AEFLu, + 0, + () => AutomationExecutionFilter$ +]; +var AutomationExecutionMetadataList = [ + 1, + n0, + _AEML, + 0, + () => AutomationExecutionMetadata$ +]; +var AutomationTargets = [ + 1, + n0, + _ATut, + 0, + () => Target$ +]; +var AzureSubscriptionList = [ + 1, + n0, + _ASLz, + 0, + () => AzureSubscription$ +]; +var CloudConnectorFilterList = [ + 1, + n0, + _CCFL, + 0, + () => CloudConnectorFilter$ +]; +var CloudConnectorSummaryList = [ + 1, + n0, + _CCSL, + 0, + () => CloudConnectorSummary$ +]; +var CommandFilterList = [ + 1, + n0, + _CFL, + 0, + () => CommandFilter$ +]; +var CommandInvocationList = [ + 1, + n0, + _CIL, + 0, + () => CommandInvocation$ +]; +var CommandList = [ + 1, + n0, + _CLo, + 0, + [ + () => Command$, + 0 + ] +]; +var CommandPluginList = [ + 1, + n0, + _CPL, + 0, + () => CommandPlugin$ +]; +var ComplianceItemEntryList = [ + 1, + n0, + _CIEL, + 0, + () => ComplianceItemEntry$ +]; +var ComplianceItemList = [ + 1, + n0, + _CILo, + 0, + [ + () => ComplianceItem$, + { [_xN]: _Item } + ] +]; +var ComplianceStringFilterList = [ + 1, + n0, + _CSFL, + 0, + [ + () => ComplianceStringFilter$, + { [_xN]: _CFo } + ] +]; +var ComplianceStringFilterValueList = [ + 1, + n0, + _CSFVL, + 0, + [ + 0, + { [_xN]: _FVi } + ] +]; +var ComplianceSummaryItemList = [ + 1, + n0, + _CSIL, + 0, + [ + () => ComplianceSummaryItem$, + { [_xN]: _Item } + ] +]; +var CreateAssociationBatchRequestEntries = [ + 1, + n0, + _CABREr, + 0, + [ + () => CreateAssociationBatchRequestEntry$, + { [_xN]: _en } + ] +]; +var DescribeActivationsFilterList = [ + 1, + n0, + _DAFL, + 0, + () => DescribeActivationsFilter$ +]; +var DocumentFilterList = [ + 1, + n0, + _DFL, + 0, + [ + () => DocumentFilter$, + { [_xN]: _DFo } + ] +]; +var DocumentIdentifierList = [ + 1, + n0, + _DIL, + 0, + [ + () => DocumentIdentifier$, + { [_xN]: _DIo } + ] +]; +var DocumentKeyValuesFilterList = [ + 1, + n0, + _DKVFL, + 0, + () => DocumentKeyValuesFilter$ +]; +var DocumentParameterList = [ + 1, + n0, + _DPLo, + 0, + [ + () => DocumentParameter$, + { [_xN]: _DPo } + ] +]; +var DocumentRequiresList = [ + 1, + n0, + _DRL, + 0, + () => DocumentRequires$ +]; +var DocumentReviewCommentList = [ + 1, + n0, + _DRCL, + 0, + () => DocumentReviewCommentSource$ +]; +var DocumentReviewerResponseList = [ + 1, + n0, + _DRRL, + 0, + () => DocumentReviewerResponseSource$ +]; +var DocumentVersionList = [ + 1, + n0, + _DVL, + 0, + () => DocumentVersionInfo$ +]; +var EffectivePatchList = [ + 1, + n0, + _EPL, + 0, + () => EffectivePatch$ +]; +var FailedCreateAssociationList = [ + 1, + n0, + _FCAL, + 0, + [ + () => FailedCreateAssociation$, + { [_xN]: _FCAE } + ] +]; +var GetResourcePoliciesResponseEntries = [ + 1, + n0, + _GRPREe, + 0, + () => GetResourcePoliciesResponseEntry$ +]; +var InstanceAssociationList = [ + 1, + n0, + _IAL, + 0, + () => InstanceAssociation$ +]; +var InstanceAssociationStatusInfos = [ + 1, + n0, + _IASI, + 0, + () => InstanceAssociationStatusInfo$ +]; +var InstanceInformationFilterList = [ + 1, + n0, + _IIFL, + 0, + [ + () => InstanceInformationFilter$, + { [_xN]: _IIF } + ] +]; +var InstanceInformationFilterValueSet = [ + 1, + n0, + _IIFVS, + 0, + [ + 0, + { [_xN]: _IIFV } + ] +]; +var InstanceInformationList = [ + 1, + n0, + _IIL, + 0, + [ + () => InstanceInformation$, + { [_xN]: _IInst } + ] +]; +var InstanceInformationStringFilterList = [ + 1, + n0, + _IISFL, + 0, + [ + () => InstanceInformationStringFilter$, + { [_xN]: _IISF } + ] +]; +var InstancePatchStateFilterList = [ + 1, + n0, + _IPSFL, + 0, + () => InstancePatchStateFilter$ +]; +var InstancePatchStateList = [ + 1, + n0, + _IPSL, + 0, + [ + () => InstancePatchState$, + 0 + ] +]; +var InstancePatchStatesList = [ + 1, + n0, + _IPSLn, + 0, + [ + () => InstancePatchState$, + 0 + ] +]; +var InstanceProperties = [ + 1, + n0, + _IPn, + 0, + [ + () => InstanceProperty$, + { [_xN]: _IPns } + ] +]; +var InstancePropertyFilterList = [ + 1, + n0, + _IPFL, + 0, + [ + () => InstancePropertyFilter$, + { [_xN]: _IPF } + ] +]; +var InstancePropertyFilterValueSet = [ + 1, + n0, + _IPFVS, + 0, + [ + 0, + { [_xN]: _IPFV } + ] +]; +var InstancePropertyStringFilterList = [ + 1, + n0, + _IPSFLn, + 0, + [ + () => InstancePropertyStringFilter$, + { [_xN]: _IPSFn } + ] +]; +var InventoryAggregatorList = [ + 1, + n0, + _IALn, + 0, + [ + () => InventoryAggregator$, + { [_xN]: _Agg } + ] +]; +var InventoryDeletionsList = [ + 1, + n0, + _IDL, + 0, + () => InventoryDeletionStatusItem$ +]; +var InventoryDeletionSummaryItems = [ + 1, + n0, + _IDSInv, + 0, + () => InventoryDeletionSummaryItem$ +]; +var InventoryFilterList = [ + 1, + n0, + _IFL, + 0, + [ + () => InventoryFilter$, + { [_xN]: _IFn } + ] +]; +var InventoryFilterValueList = [ + 1, + n0, + _IFVL, + 0, + [ + 0, + { [_xN]: _FVi } + ] +]; +var InventoryGroupList = [ + 1, + n0, + _IGL, + 0, + [ + () => InventoryGroup$, + { [_xN]: _IG } + ] +]; +var InventoryItemAttributeList = [ + 1, + n0, + _IIAL, + 0, + [ + () => InventoryItemAttribute$, + { [_xN]: _Attr } + ] +]; +var InventoryItemList = [ + 1, + n0, + _IILn, + 0, + [ + () => InventoryItem$, + { [_xN]: _Item } + ] +]; +var InventoryItemSchemaResultList = [ + 1, + n0, + _IISRL, + 0, + [ + () => InventoryItemSchema$, + 0 + ] +]; +var InventoryResultEntityList = [ + 1, + n0, + _IREL, + 0, + [ + () => InventoryResultEntity$, + { [_xN]: _Entit } + ] +]; +var MaintenanceWindowExecutionList = [ + 1, + n0, + _MWEL, + 0, + () => MaintenanceWindowExecution$ +]; +var MaintenanceWindowExecutionTaskIdentityList = [ + 1, + n0, + _MWETIL, + 0, + () => MaintenanceWindowExecutionTaskIdentity$ +]; +var MaintenanceWindowExecutionTaskInvocationIdentityList = [ + 1, + n0, + _MWETIIL, + 0, + [ + () => MaintenanceWindowExecutionTaskInvocationIdentity$, + 0 + ] +]; +var MaintenanceWindowFilterList = [ + 1, + n0, + _MWFL, + 0, + () => MaintenanceWindowFilter$ +]; +var MaintenanceWindowIdentityList = [ + 1, + n0, + _MWIL, + 0, + [ + () => MaintenanceWindowIdentity$, + 0 + ] +]; +var MaintenanceWindowsForTargetList = [ + 1, + n0, + _MWFTL, + 0, + () => MaintenanceWindowIdentityForTarget$ +]; +var MaintenanceWindowTargetList = [ + 1, + n0, + _MWTL, + 0, + [ + () => MaintenanceWindowTarget$, + 0 + ] +]; +var MaintenanceWindowTaskList = [ + 1, + n0, + _MWTLa, + 0, + [ + () => MaintenanceWindowTask$, + 0 + ] +]; +var MaintenanceWindowTaskParametersList = [ + 1, + n0, + _MWTPL, + 8, + [ + () => MaintenanceWindowTaskParameters, + 0 + ] +]; +var MaintenanceWindowTaskParameterValueList = [ + 1, + n0, + _MWTPVL, + 8, + [ + () => MaintenanceWindowTaskParameterValue, + 0 + ] +]; +var NodeAggregatorList = [ + 1, + n0, + _NAL, + 0, + [ + () => NodeAggregator$, + { [_xN]: _NA } + ] +]; +var NodeFilterList = [ + 1, + n0, + _NFL, + 0, + [ + () => NodeFilter$, + { [_xN]: _NF } + ] +]; +var NodeFilterValueList = [ + 1, + n0, + _NFVL, + 0, + [ + 0, + { [_xN]: _FVi } + ] +]; +var NodeList = [ + 1, + n0, + _NL, + 0, + [ + () => Node$, + 0 + ] +]; +var OpsAggregatorList = [ + 1, + n0, + _OAL, + 0, + [ + () => OpsAggregator$, + { [_xN]: _Agg } + ] +]; +var OpsEntityList = [ + 1, + n0, + _OEL, + 0, + [ + () => OpsEntity$, + { [_xN]: _Entit } + ] +]; +var OpsFilterList = [ + 1, + n0, + _OFL, + 0, + [ + () => OpsFilter$, + { [_xN]: _OF } + ] +]; +var OpsFilterValueList = [ + 1, + n0, + _OFVL, + 0, + [ + 0, + { [_xN]: _FVi } + ] +]; +var OpsItemEventFilters = [ + 1, + n0, + _OIEFp, + 0, + () => OpsItemEventFilter$ +]; +var OpsItemEventSummaries = [ + 1, + n0, + _OIESp, + 0, + () => OpsItemEventSummary$ +]; +var OpsItemFilters = [ + 1, + n0, + _OIF, + 0, + () => OpsItemFilter$ +]; +var OpsItemNotifications = [ + 1, + n0, + _OINp, + 0, + () => OpsItemNotification$ +]; +var OpsItemRelatedItemsFilters = [ + 1, + n0, + _OIRIFp, + 0, + () => OpsItemRelatedItemsFilter$ +]; +var OpsItemRelatedItemSummaries = [ + 1, + n0, + _OIRISp, + 0, + () => OpsItemRelatedItemSummary$ +]; +var OpsItemSummaries = [ + 1, + n0, + _OIS, + 0, + () => OpsItemSummary$ +]; +var OpsMetadataFilterList = [ + 1, + n0, + _OMFL, + 0, + () => OpsMetadataFilter$ +]; +var OpsMetadataList = [ + 1, + n0, + _OML, + 0, + () => OpsMetadata$ +]; +var OpsResultAttributeList = [ + 1, + n0, + _ORAL, + 0, + [ + () => OpsResultAttribute$, + { [_xN]: _ORA } + ] +]; +var ParameterHistoryList = [ + 1, + n0, + _PHL, + 0, + [ + () => ParameterHistory$, + 0 + ] +]; +var ParameterList = [ + 1, + n0, + _PL, + 0, + [ + () => Parameter$, + 0 + ] +]; +var ParameterMetadataList = [ + 1, + n0, + _PML, + 0, + () => ParameterMetadata$ +]; +var ParameterPolicyList = [ + 1, + n0, + _PPLa, + 0, + () => ParameterInlinePolicy$ +]; +var ParametersFilterList = [ + 1, + n0, + _PFL, + 0, + () => ParametersFilter$ +]; +var ParameterStringFilterList = [ + 1, + n0, + _PSFL, + 0, + () => ParameterStringFilter$ +]; +var PatchBaselineIdentityList = [ + 1, + n0, + _PBIL, + 0, + () => PatchBaselineIdentity$ +]; +var PatchComplianceDataList = [ + 1, + n0, + _PCDL, + 0, + () => PatchComplianceData$ +]; +var PatchFilterList = [ + 1, + n0, + _PFLa, + 0, + () => PatchFilter$ +]; +var PatchGroupPatchBaselineMappingList = [ + 1, + n0, + _PGPBML, + 0, + () => PatchGroupPatchBaselineMapping$ +]; +var PatchList = [ + 1, + n0, + _PLa, + 0, + () => Patch$ +]; +var PatchOrchestratorFilterList = [ + 1, + n0, + _POFL, + 0, + () => PatchOrchestratorFilter$ +]; +var PatchRuleList = [ + 1, + n0, + _PRL, + 0, + () => PatchRule$ +]; +var PatchSourceList = [ + 1, + n0, + _PSL, + 0, + [ + () => PatchSource$, + 0 + ] +]; +var PlatformTypeList = [ + 1, + n0, + _PTL, + 0, + [ + 0, + { [_xN]: _PTla } + ] +]; +var RegistrationMetadataList = [ + 1, + n0, + _RML, + 0, + () => RegistrationMetadataItem$ +]; +var RelatedOpsItems = [ + 1, + n0, + _ROI, + 0, + () => RelatedOpsItem$ +]; +var ResourceComplianceSummaryItemList = [ + 1, + n0, + _RCSIL, + 0, + [ + () => ResourceComplianceSummaryItem$, + { [_xN]: _Item } + ] +]; +var ResourceDataSyncItemList = [ + 1, + n0, + _RDSIL, + 0, + () => ResourceDataSyncItem$ +]; +var ResourceDataSyncOrganizationalUnitList = [ + 1, + n0, + _RDSOUL, + 0, + () => ResourceDataSyncOrganizationalUnit$ +]; +var ResultAttributeList = [ + 1, + n0, + _RAL, + 0, + [ + () => ResultAttribute$, + { [_xN]: _RAesu } + ] +]; +var ReviewInformationList = [ + 1, + n0, + _RIL, + 0, + [ + () => ReviewInformation$, + { [_xN]: _RIe } + ] +]; +var Runbooks = [ + 1, + n0, + _R, + 0, + () => Runbook$ +]; +var ScheduledWindowExecutionList = [ + 1, + n0, + _SWEL, + 0, + () => ScheduledWindowExecution$ +]; +var SessionFilterList = [ + 1, + n0, + _SFL, + 0, + () => SessionFilter$ +]; +var SessionList = [ + 1, + n0, + _SLe, + 0, + () => Session$ +]; +var StepExecutionFilterList = [ + 1, + n0, + _SEFL, + 0, + () => StepExecutionFilter$ +]; +var StepExecutionList = [ + 1, + n0, + _SEL, + 0, + () => StepExecution$ +]; +var TagList = [ + 1, + n0, + _TLa, + 0, + () => Tag$ +]; +var TargetLocations = [ + 1, + n0, + _TL, + 0, + () => TargetLocation$ +]; +var TargetPreviewList = [ + 1, + n0, + _TPL, + 0, + () => TargetPreview$ +]; +var Targets = [ + 1, + n0, + _Ta, + 0, + () => Target$ +]; +var ValidationFindingList = [ + 1, + n0, + _VFL, + 0, + () => ValidationFinding$ +]; +var InventoryResultItemMap = [ + 2, + n0, + _IRIM, + 0, + 0, + () => InventoryResultItem$ +]; +var MaintenanceWindowTaskParameters = [ + 2, + n0, + _MWTP, + 8, + [ + 0, + 0 + ], + [ + () => MaintenanceWindowTaskParameterValueExpression$, + 0 + ] +]; +var MetadataMap = [ + 2, + n0, + _MM, + 0, + 0, + () => MetadataValue$ +]; +var OpsEntityItemMap = [ + 2, + n0, + _OEIM, + 0, + 0, + () => OpsEntityItem$ +]; +var OpsItemOperationalData = [ + 2, + n0, + _OIOD, + 0, + 0, + () => OpsItemDataValue$ +]; +var _Parameters = [ + 2, + n0, + _P, + 8, + 0, + 64 | 0 +]; +var CloudConnectorConfiguration$ = [ + 4, + n0, + _CCC, + 0, + [_ACz], + [() => AzureConfiguration$] +]; +var ConfigurationTargets$ = [ + 4, + n0, + _CTon, + 0, + [_Sub], + [() => AzureSubscriptionList] +]; +var ExecutionInputs$ = [ + 4, + n0, + _EIx, + 0, + [_Aut], + [() => AutomationExecutionInputs$] +]; +var ExecutionPreview$ = [ + 4, + n0, + _EPx, + 0, + [_Aut], + [() => AutomationExecutionPreview$] +]; +var NodeType$ = [ + 4, + n0, + _NTo, + 0, + [_Ins], + [[() => InstanceInfo$, 0]] +]; +var AddTagsToResource$ = [ + 9, + n0, + _ATTR, + 0, + () => AddTagsToResourceRequest$, + () => AddTagsToResourceResult$ +]; +var AssociateOpsItemRelatedItem$ = [ + 9, + n0, + _AOIRI, + 0, + () => AssociateOpsItemRelatedItemRequest$, + () => AssociateOpsItemRelatedItemResponse$ +]; +var CancelCommand$ = [ + 9, + n0, + _CCa, + 0, + () => CancelCommandRequest$, + () => CancelCommandResult$ +]; +var CancelMaintenanceWindowExecution$ = [ + 9, + n0, + _CMWE, + 0, + () => CancelMaintenanceWindowExecutionRequest$, + () => CancelMaintenanceWindowExecutionResult$ +]; +var CreateActivation$ = [ + 9, + n0, + _CAre, + 0, + () => CreateActivationRequest$, + () => CreateActivationResult$ +]; +var CreateAssociation$ = [ + 9, + n0, + _CArea, + 0, + () => CreateAssociationRequest$, + () => CreateAssociationResult$ +]; +var CreateAssociationBatch$ = [ + 9, + n0, + _CAB, + 0, + () => CreateAssociationBatchRequest$, + () => CreateAssociationBatchResult$ +]; +var CreateCloudConnector$ = [ + 9, + n0, + _CCCr, + 0, + () => CreateCloudConnectorRequest$, + () => CreateCloudConnectorResult$ +]; +var CreateDocument$ = [ + 9, + n0, + _CDre, + 0, + () => CreateDocumentRequest$, + () => CreateDocumentResult$ +]; +var CreateMaintenanceWindow$ = [ + 9, + n0, + _CMW, + 0, + () => CreateMaintenanceWindowRequest$, + () => CreateMaintenanceWindowResult$ +]; +var CreateOpsItem$ = [ + 9, + n0, + _COI, + 0, + () => CreateOpsItemRequest$, + () => CreateOpsItemResponse$ +]; +var CreateOpsMetadata$ = [ + 9, + n0, + _COM, + 0, + () => CreateOpsMetadataRequest$, + () => CreateOpsMetadataResult$ +]; +var CreatePatchBaseline$ = [ + 9, + n0, + _CPB, + 0, + () => CreatePatchBaselineRequest$, + () => CreatePatchBaselineResult$ +]; +var CreateResourceDataSync$ = [ + 9, + n0, + _CRDS, + 0, + () => CreateResourceDataSyncRequest$, + () => CreateResourceDataSyncResult$ +]; +var DeleteActivation$ = [ + 9, + n0, + _DA, + 0, + () => DeleteActivationRequest$, + () => DeleteActivationResult$ +]; +var DeleteAssociation$ = [ + 9, + n0, + _DAe, + 0, + () => DeleteAssociationRequest$, + () => DeleteAssociationResult$ +]; +var DeleteCloudConnector$ = [ + 9, + n0, + _DCC, + 0, + () => DeleteCloudConnectorRequest$, + () => DeleteCloudConnectorResult$ +]; +var DeleteDocument$ = [ + 9, + n0, + _DDe, + 0, + () => DeleteDocumentRequest$, + () => DeleteDocumentResult$ +]; +var DeleteInventory$ = [ + 9, + n0, + _DIe, + 0, + () => DeleteInventoryRequest$, + () => DeleteInventoryResult$ +]; +var DeleteMaintenanceWindow$ = [ + 9, + n0, + _DMW, + 0, + () => DeleteMaintenanceWindowRequest$, + () => DeleteMaintenanceWindowResult$ +]; +var DeleteOpsItem$ = [ + 9, + n0, + _DOI, + 0, + () => DeleteOpsItemRequest$, + () => DeleteOpsItemResponse$ +]; +var DeleteOpsMetadata$ = [ + 9, + n0, + _DOM, + 0, + () => DeleteOpsMetadataRequest$, + () => DeleteOpsMetadataResult$ +]; +var DeleteParameter$ = [ + 9, + n0, + _DPe, + 0, + () => DeleteParameterRequest$, + () => DeleteParameterResult$ +]; +var DeleteParameters$ = [ + 9, + n0, + _DPel, + 0, + () => DeleteParametersRequest$, + () => DeleteParametersResult$ +]; +var DeletePatchBaseline$ = [ + 9, + n0, + _DPB, + 0, + () => DeletePatchBaselineRequest$, + () => DeletePatchBaselineResult$ +]; +var DeleteResourceDataSync$ = [ + 9, + n0, + _DRDS, + 0, + () => DeleteResourceDataSyncRequest$, + () => DeleteResourceDataSyncResult$ +]; +var DeleteResourcePolicy$ = [ + 9, + n0, + _DRP, + 0, + () => DeleteResourcePolicyRequest$, + () => DeleteResourcePolicyResponse$ +]; +var DeregisterManagedInstance$ = [ + 9, + n0, + _DMI, + 0, + () => DeregisterManagedInstanceRequest$, + () => DeregisterManagedInstanceResult$ +]; +var DeregisterPatchBaselineForPatchGroup$ = [ + 9, + n0, + _DPBFPG, + 0, + () => DeregisterPatchBaselineForPatchGroupRequest$, + () => DeregisterPatchBaselineForPatchGroupResult$ +]; +var DeregisterTargetFromMaintenanceWindow$ = [ + 9, + n0, + _DTFMW, + 0, + () => DeregisterTargetFromMaintenanceWindowRequest$, + () => DeregisterTargetFromMaintenanceWindowResult$ +]; +var DeregisterTaskFromMaintenanceWindow$ = [ + 9, + n0, + _DTFMWe, + 0, + () => DeregisterTaskFromMaintenanceWindowRequest$, + () => DeregisterTaskFromMaintenanceWindowResult$ +]; +var DescribeActivations$ = [ + 9, + n0, + _DAes, + 0, + () => DescribeActivationsRequest$, + () => DescribeActivationsResult$ +]; +var DescribeAssociation$ = [ + 9, + n0, + _DAesc, + 0, + () => DescribeAssociationRequest$, + () => DescribeAssociationResult$ +]; +var DescribeAssociationExecutions$ = [ + 9, + n0, + _DAEe, + 0, + () => DescribeAssociationExecutionsRequest$, + () => DescribeAssociationExecutionsResult$ +]; +var DescribeAssociationExecutionTargets$ = [ + 9, + n0, + _DAET, + 0, + () => DescribeAssociationExecutionTargetsRequest$, + () => DescribeAssociationExecutionTargetsResult$ +]; +var DescribeAutomationExecutions$ = [ + 9, + n0, + _DAEes, + 0, + () => DescribeAutomationExecutionsRequest$, + () => DescribeAutomationExecutionsResult$ +]; +var DescribeAutomationStepExecutions$ = [ + 9, + n0, + _DASE, + 0, + () => DescribeAutomationStepExecutionsRequest$, + () => DescribeAutomationStepExecutionsResult$ +]; +var DescribeAvailablePatches$ = [ + 9, + n0, + _DAP, + 0, + () => DescribeAvailablePatchesRequest$, + () => DescribeAvailablePatchesResult$ +]; +var DescribeDocument$ = [ + 9, + n0, + _DDes, + 0, + () => DescribeDocumentRequest$, + () => DescribeDocumentResult$ +]; +var DescribeDocumentPermission$ = [ + 9, + n0, + _DDP, + 0, + () => DescribeDocumentPermissionRequest$, + () => DescribeDocumentPermissionResponse$ +]; +var DescribeEffectiveInstanceAssociations$ = [ + 9, + n0, + _DEIA, + 0, + () => DescribeEffectiveInstanceAssociationsRequest$, + () => DescribeEffectiveInstanceAssociationsResult$ +]; +var DescribeEffectivePatchesForPatchBaseline$ = [ + 9, + n0, + _DEPFPB, + 0, + () => DescribeEffectivePatchesForPatchBaselineRequest$, + () => DescribeEffectivePatchesForPatchBaselineResult$ +]; +var DescribeInstanceAssociationsStatus$ = [ + 9, + n0, + _DIAS, + 0, + () => DescribeInstanceAssociationsStatusRequest$, + () => DescribeInstanceAssociationsStatusResult$ +]; +var DescribeInstanceInformation$ = [ + 9, + n0, + _DIIe, + 0, + () => DescribeInstanceInformationRequest$, + () => DescribeInstanceInformationResult$ +]; +var DescribeInstancePatches$ = [ + 9, + n0, + _DIP, + 0, + () => DescribeInstancePatchesRequest$, + () => DescribeInstancePatchesResult$ +]; +var DescribeInstancePatchStates$ = [ + 9, + n0, + _DIPS, + 0, + () => DescribeInstancePatchStatesRequest$, + () => DescribeInstancePatchStatesResult$ +]; +var DescribeInstancePatchStatesForPatchGroup$ = [ + 9, + n0, + _DIPSFPG, + 0, + () => DescribeInstancePatchStatesForPatchGroupRequest$, + () => DescribeInstancePatchStatesForPatchGroupResult$ +]; +var DescribeInstanceProperties$ = [ + 9, + n0, + _DIPe, + 0, + () => DescribeInstancePropertiesRequest$, + () => DescribeInstancePropertiesResult$ +]; +var DescribeInventoryDeletions$ = [ + 9, + n0, + _DID, + 0, + () => DescribeInventoryDeletionsRequest$, + () => DescribeInventoryDeletionsResult$ +]; +var DescribeMaintenanceWindowExecutions$ = [ + 9, + n0, + _DMWE, + 0, + () => DescribeMaintenanceWindowExecutionsRequest$, + () => DescribeMaintenanceWindowExecutionsResult$ +]; +var DescribeMaintenanceWindowExecutionTaskInvocations$ = [ + 9, + n0, + _DMWETI, + 0, + () => DescribeMaintenanceWindowExecutionTaskInvocationsRequest$, + () => DescribeMaintenanceWindowExecutionTaskInvocationsResult$ +]; +var DescribeMaintenanceWindowExecutionTasks$ = [ + 9, + n0, + _DMWET, + 0, + () => DescribeMaintenanceWindowExecutionTasksRequest$, + () => DescribeMaintenanceWindowExecutionTasksResult$ +]; +var DescribeMaintenanceWindows$ = [ + 9, + n0, + _DMWe, + 0, + () => DescribeMaintenanceWindowsRequest$, + () => DescribeMaintenanceWindowsResult$ +]; +var DescribeMaintenanceWindowSchedule$ = [ + 9, + n0, + _DMWS, + 0, + () => DescribeMaintenanceWindowScheduleRequest$, + () => DescribeMaintenanceWindowScheduleResult$ +]; +var DescribeMaintenanceWindowsForTarget$ = [ + 9, + n0, + _DMWFT, + 0, + () => DescribeMaintenanceWindowsForTargetRequest$, + () => DescribeMaintenanceWindowsForTargetResult$ +]; +var DescribeMaintenanceWindowTargets$ = [ + 9, + n0, + _DMWT, + 0, + () => DescribeMaintenanceWindowTargetsRequest$, + () => DescribeMaintenanceWindowTargetsResult$ +]; +var DescribeMaintenanceWindowTasks$ = [ + 9, + n0, + _DMWTe, + 0, + () => DescribeMaintenanceWindowTasksRequest$, + () => DescribeMaintenanceWindowTasksResult$ +]; +var DescribeOpsItems$ = [ + 9, + n0, + _DOIe, + 0, + () => DescribeOpsItemsRequest$, + () => DescribeOpsItemsResponse$ +]; +var DescribeParameters$ = [ + 9, + n0, + _DPes, + 0, + () => DescribeParametersRequest$, + () => DescribeParametersResult$ +]; +var DescribePatchBaselines$ = [ + 9, + n0, + _DPBe, + 0, + () => DescribePatchBaselinesRequest$, + () => DescribePatchBaselinesResult$ +]; +var DescribePatchGroups$ = [ + 9, + n0, + _DPG, + 0, + () => DescribePatchGroupsRequest$, + () => DescribePatchGroupsResult$ +]; +var DescribePatchGroupState$ = [ + 9, + n0, + _DPGS, + 0, + () => DescribePatchGroupStateRequest$, + () => DescribePatchGroupStateResult$ +]; +var DescribePatchProperties$ = [ + 9, + n0, + _DPP, + 0, + () => DescribePatchPropertiesRequest$, + () => DescribePatchPropertiesResult$ +]; +var DescribeSessions$ = [ + 9, + n0, + _DSes, + 0, + () => DescribeSessionsRequest$, + () => DescribeSessionsResponse$ +]; +var DisassociateOpsItemRelatedItem$ = [ + 9, + n0, + _DOIRI, + 0, + () => DisassociateOpsItemRelatedItemRequest$, + () => DisassociateOpsItemRelatedItemResponse$ +]; +var GetAccessToken$ = [ + 9, + n0, + _GAT, + 0, + () => GetAccessTokenRequest$, + () => GetAccessTokenResponse$ +]; +var GetAutomationExecution$ = [ + 9, + n0, + _GAE, + 0, + () => GetAutomationExecutionRequest$, + () => GetAutomationExecutionResult$ +]; +var GetCalendarState$ = [ + 9, + n0, + _GCS, + 0, + () => GetCalendarStateRequest$, + () => GetCalendarStateResponse$ +]; +var GetCloudConnector$ = [ + 9, + n0, + _GCC, + 0, + () => GetCloudConnectorRequest$, + () => GetCloudConnectorResult$ +]; +var GetCommandInvocation$ = [ + 9, + n0, + _GCI, + 0, + () => GetCommandInvocationRequest$, + () => GetCommandInvocationResult$ +]; +var GetConnectionStatus$ = [ + 9, + n0, + _GCSe, + 0, + () => GetConnectionStatusRequest$, + () => GetConnectionStatusResponse$ +]; +var GetDefaultPatchBaseline$ = [ + 9, + n0, + _GDPB, + 0, + () => GetDefaultPatchBaselineRequest$, + () => GetDefaultPatchBaselineResult$ +]; +var GetDeployablePatchSnapshotForInstance$ = [ + 9, + n0, + _GDPSFI, + 0, + () => GetDeployablePatchSnapshotForInstanceRequest$, + () => GetDeployablePatchSnapshotForInstanceResult$ +]; +var GetDocument$ = [ + 9, + n0, + _GD, + 0, + () => GetDocumentRequest$, + () => GetDocumentResult$ +]; +var GetExecutionPreview$ = [ + 9, + n0, + _GEP, + 0, + () => GetExecutionPreviewRequest$, + () => GetExecutionPreviewResponse$ +]; +var GetInventory$ = [ + 9, + n0, + _GI, + 0, + () => GetInventoryRequest$, + () => GetInventoryResult$ +]; +var GetInventorySchema$ = [ + 9, + n0, + _GIS, + 0, + () => GetInventorySchemaRequest$, + () => GetInventorySchemaResult$ +]; +var GetMaintenanceWindow$ = [ + 9, + n0, + _GMW, + 0, + () => GetMaintenanceWindowRequest$, + () => GetMaintenanceWindowResult$ +]; +var GetMaintenanceWindowExecution$ = [ + 9, + n0, + _GMWE, + 0, + () => GetMaintenanceWindowExecutionRequest$, + () => GetMaintenanceWindowExecutionResult$ +]; +var GetMaintenanceWindowExecutionTask$ = [ + 9, + n0, + _GMWET, + 0, + () => GetMaintenanceWindowExecutionTaskRequest$, + () => GetMaintenanceWindowExecutionTaskResult$ +]; +var GetMaintenanceWindowExecutionTaskInvocation$ = [ + 9, + n0, + _GMWETI, + 0, + () => GetMaintenanceWindowExecutionTaskInvocationRequest$, + () => GetMaintenanceWindowExecutionTaskInvocationResult$ +]; +var GetMaintenanceWindowTask$ = [ + 9, + n0, + _GMWT, + 0, + () => GetMaintenanceWindowTaskRequest$, + () => GetMaintenanceWindowTaskResult$ +]; +var GetOpsItem$ = [ + 9, + n0, + _GOI, + 0, + () => GetOpsItemRequest$, + () => GetOpsItemResponse$ +]; +var GetOpsMetadata$ = [ + 9, + n0, + _GOM, + 0, + () => GetOpsMetadataRequest$, + () => GetOpsMetadataResult$ +]; +var GetOpsSummary$ = [ + 9, + n0, + _GOS, + 0, + () => GetOpsSummaryRequest$, + () => GetOpsSummaryResult$ +]; +var GetParameter$ = [ + 9, + n0, + _GP, + 0, + () => GetParameterRequest$, + () => GetParameterResult$ +]; +var GetParameterHistory$ = [ + 9, + n0, + _GPH, + 0, + () => GetParameterHistoryRequest$, + () => GetParameterHistoryResult$ +]; +var GetParameters$ = [ + 9, + n0, + _GPe, + 0, + () => GetParametersRequest$, + () => GetParametersResult$ +]; +var GetParametersByPath$ = [ + 9, + n0, + _GPBP, + 0, + () => GetParametersByPathRequest$, + () => GetParametersByPathResult$ +]; +var GetPatchBaseline$ = [ + 9, + n0, + _GPB, + 0, + () => GetPatchBaselineRequest$, + () => GetPatchBaselineResult$ +]; +var GetPatchBaselineForPatchGroup$ = [ + 9, + n0, + _GPBFPG, + 0, + () => GetPatchBaselineForPatchGroupRequest$, + () => GetPatchBaselineForPatchGroupResult$ +]; +var GetResourcePolicies$ = [ + 9, + n0, + _GRP, + 0, + () => GetResourcePoliciesRequest$, + () => GetResourcePoliciesResponse$ +]; +var GetServiceSetting$ = [ + 9, + n0, + _GSS, + 0, + () => GetServiceSettingRequest$, + () => GetServiceSettingResult$ +]; +var LabelParameterVersion$ = [ + 9, + n0, + _LPV, + 0, + () => LabelParameterVersionRequest$, + () => LabelParameterVersionResult$ +]; +var ListAssociations$ = [ + 9, + n0, + _LA, + 0, + () => ListAssociationsRequest$, + () => ListAssociationsResult$ +]; +var ListAssociationVersions$ = [ + 9, + n0, + _LAV, + 0, + () => ListAssociationVersionsRequest$, + () => ListAssociationVersionsResult$ +]; +var ListCloudConnectors$ = [ + 9, + n0, + _LCC, + 0, + () => ListCloudConnectorsRequest$, + () => ListCloudConnectorsResult$ +]; +var ListCommandInvocations$ = [ + 9, + n0, + _LCI, + 0, + () => ListCommandInvocationsRequest$, + () => ListCommandInvocationsResult$ +]; +var ListCommands$ = [ + 9, + n0, + _LCi, + 0, + () => ListCommandsRequest$, + () => ListCommandsResult$ +]; +var ListComplianceItems$ = [ + 9, + n0, + _LCIi, + 0, + () => ListComplianceItemsRequest$, + () => ListComplianceItemsResult$ +]; +var ListComplianceSummaries$ = [ + 9, + n0, + _LCS, + 0, + () => ListComplianceSummariesRequest$, + () => ListComplianceSummariesResult$ +]; +var ListDocumentMetadataHistory$ = [ + 9, + n0, + _LDMH, + 0, + () => ListDocumentMetadataHistoryRequest$, + () => ListDocumentMetadataHistoryResponse$ +]; +var ListDocuments$ = [ + 9, + n0, + _LD, + 0, + () => ListDocumentsRequest$, + () => ListDocumentsResult$ +]; +var ListDocumentVersions$ = [ + 9, + n0, + _LDV, + 0, + () => ListDocumentVersionsRequest$, + () => ListDocumentVersionsResult$ +]; +var ListInventoryEntries$ = [ + 9, + n0, + _LIE, + 0, + () => ListInventoryEntriesRequest$, + () => ListInventoryEntriesResult$ +]; +var ListNodes$ = [ + 9, + n0, + _LN, + 0, + () => ListNodesRequest$, + () => ListNodesResult$ +]; +var ListNodesSummary$ = [ + 9, + n0, + _LNS, + 0, + () => ListNodesSummaryRequest$, + () => ListNodesSummaryResult$ +]; +var ListOpsItemEvents$ = [ + 9, + n0, + _LOIE, + 0, + () => ListOpsItemEventsRequest$, + () => ListOpsItemEventsResponse$ +]; +var ListOpsItemRelatedItems$ = [ + 9, + n0, + _LOIRI, + 0, + () => ListOpsItemRelatedItemsRequest$, + () => ListOpsItemRelatedItemsResponse$ +]; +var ListOpsMetadata$ = [ + 9, + n0, + _LOM, + 0, + () => ListOpsMetadataRequest$, + () => ListOpsMetadataResult$ +]; +var ListResourceComplianceSummaries$ = [ + 9, + n0, + _LRCS, + 0, + () => ListResourceComplianceSummariesRequest$, + () => ListResourceComplianceSummariesResult$ +]; +var ListResourceDataSync$ = [ + 9, + n0, + _LRDS, + 0, + () => ListResourceDataSyncRequest$, + () => ListResourceDataSyncResult$ +]; +var ListTagsForResource$ = [ + 9, + n0, + _LTFR, + 0, + () => ListTagsForResourceRequest$, + () => ListTagsForResourceResult$ +]; +var ModifyDocumentPermission$ = [ + 9, + n0, + _MDP, + 0, + () => ModifyDocumentPermissionRequest$, + () => ModifyDocumentPermissionResponse$ +]; +var PutComplianceItems$ = [ + 9, + n0, + _PCI, + 0, + () => PutComplianceItemsRequest$, + () => PutComplianceItemsResult$ +]; +var PutInventory$ = [ + 9, + n0, + _PIu, + 0, + () => PutInventoryRequest$, + () => PutInventoryResult$ +]; +var PutParameter$ = [ + 9, + n0, + _PP, + 0, + () => PutParameterRequest$, + () => PutParameterResult$ +]; +var PutResourcePolicy$ = [ + 9, + n0, + _PRP, + 0, + () => PutResourcePolicyRequest$, + () => PutResourcePolicyResponse$ +]; +var RegisterDefaultPatchBaseline$ = [ + 9, + n0, + _RDPB, + 0, + () => RegisterDefaultPatchBaselineRequest$, + () => RegisterDefaultPatchBaselineResult$ +]; +var RegisterPatchBaselineForPatchGroup$ = [ + 9, + n0, + _RPBFPG, + 0, + () => RegisterPatchBaselineForPatchGroupRequest$, + () => RegisterPatchBaselineForPatchGroupResult$ +]; +var RegisterTargetWithMaintenanceWindow$ = [ + 9, + n0, + _RTWMW, + 0, + () => RegisterTargetWithMaintenanceWindowRequest$, + () => RegisterTargetWithMaintenanceWindowResult$ +]; +var RegisterTaskWithMaintenanceWindow$ = [ + 9, + n0, + _RTWMWe, + 0, + () => RegisterTaskWithMaintenanceWindowRequest$, + () => RegisterTaskWithMaintenanceWindowResult$ +]; +var RemoveTagsFromResource$ = [ + 9, + n0, + _RTFR, + 0, + () => RemoveTagsFromResourceRequest$, + () => RemoveTagsFromResourceResult$ +]; +var ResetServiceSetting$ = [ + 9, + n0, + _RSS, + 0, + () => ResetServiceSettingRequest$, + () => ResetServiceSettingResult$ +]; +var ResumeSession$ = [ + 9, + n0, + _RSe, + 0, + () => ResumeSessionRequest$, + () => ResumeSessionResponse$ +]; +var SendAutomationSignal$ = [ + 9, + n0, + _SAS, + 0, + () => SendAutomationSignalRequest$, + () => SendAutomationSignalResult$ +]; +var SendCommand$ = [ + 9, + n0, + _SCe, + 0, + () => SendCommandRequest$, + () => SendCommandResult$ +]; +var StartAccessRequest$ = [ + 9, + n0, + _SAR, + 0, + () => StartAccessRequestRequest$, + () => StartAccessRequestResponse$ +]; +var StartAssociationsOnce$ = [ + 9, + n0, + _SAO, + 0, + () => StartAssociationsOnceRequest$, + () => StartAssociationsOnceResult$ +]; +var StartAutomationExecution$ = [ + 9, + n0, + _SAE, + 0, + () => StartAutomationExecutionRequest$, + () => StartAutomationExecutionResult$ +]; +var StartChangeRequestExecution$ = [ + 9, + n0, + _SCRE, + 0, + () => StartChangeRequestExecutionRequest$, + () => StartChangeRequestExecutionResult$ +]; +var StartExecutionPreview$ = [ + 9, + n0, + _SEP, + 0, + () => StartExecutionPreviewRequest$, + () => StartExecutionPreviewResponse$ +]; +var StartSession$ = [ + 9, + n0, + _SSta, + 0, + () => StartSessionRequest$, + () => StartSessionResponse$ +]; +var StopAutomationExecution$ = [ + 9, + n0, + _SAEt, + 0, + () => StopAutomationExecutionRequest$, + () => StopAutomationExecutionResult$ +]; +var TerminateSession$ = [ + 9, + n0, + _TSe, + 0, + () => TerminateSessionRequest$, + () => TerminateSessionResponse$ +]; +var UnlabelParameterVersion$ = [ + 9, + n0, + _UPV, + 0, + () => UnlabelParameterVersionRequest$, + () => UnlabelParameterVersionResult$ +]; +var UpdateAssociation$ = [ + 9, + n0, + _UAp, + 0, + () => UpdateAssociationRequest$, + () => UpdateAssociationResult$ +]; +var UpdateAssociationStatus$ = [ + 9, + n0, + _UAS, + 0, + () => UpdateAssociationStatusRequest$, + () => UpdateAssociationStatusResult$ +]; +var UpdateCloudConnector$ = [ + 9, + n0, + _UCC, + 0, + () => UpdateCloudConnectorRequest$, + () => UpdateCloudConnectorResult$ +]; +var UpdateDocument$ = [ + 9, + n0, + _UD, + 0, + () => UpdateDocumentRequest$, + () => UpdateDocumentResult$ +]; +var UpdateDocumentDefaultVersion$ = [ + 9, + n0, + _UDDV, + 0, + () => UpdateDocumentDefaultVersionRequest$, + () => UpdateDocumentDefaultVersionResult$ +]; +var UpdateDocumentMetadata$ = [ + 9, + n0, + _UDM, + 0, + () => UpdateDocumentMetadataRequest$, + () => UpdateDocumentMetadataResponse$ +]; +var UpdateMaintenanceWindow$ = [ + 9, + n0, + _UMW, + 0, + () => UpdateMaintenanceWindowRequest$, + () => UpdateMaintenanceWindowResult$ +]; +var UpdateMaintenanceWindowTarget$ = [ + 9, + n0, + _UMWT, + 0, + () => UpdateMaintenanceWindowTargetRequest$, + () => UpdateMaintenanceWindowTargetResult$ +]; +var UpdateMaintenanceWindowTask$ = [ + 9, + n0, + _UMWTp, + 0, + () => UpdateMaintenanceWindowTaskRequest$, + () => UpdateMaintenanceWindowTaskResult$ +]; +var UpdateManagedInstanceRole$ = [ + 9, + n0, + _UMIR, + 0, + () => UpdateManagedInstanceRoleRequest$, + () => UpdateManagedInstanceRoleResult$ +]; +var UpdateOpsItem$ = [ + 9, + n0, + _UOI, + 0, + () => UpdateOpsItemRequest$, + () => UpdateOpsItemResponse$ +]; +var UpdateOpsMetadata$ = [ + 9, + n0, + _UOM, + 0, + () => UpdateOpsMetadataRequest$, + () => UpdateOpsMetadataResult$ +]; +var UpdatePatchBaseline$ = [ + 9, + n0, + _UPB, + 0, + () => UpdatePatchBaselineRequest$, + () => UpdatePatchBaselineResult$ +]; +var UpdateResourceDataSync$ = [ + 9, + n0, + _URDS, + 0, + () => UpdateResourceDataSyncRequest$, + () => UpdateResourceDataSyncResult$ +]; +var UpdateServiceSetting$ = [ + 9, + n0, + _USS, + 0, + () => UpdateServiceSettingRequest$, + () => UpdateServiceSettingResult$ +]; +var ValidateCloudConnector$ = [ + 9, + n0, + _VCC, + 0, + () => ValidateCloudConnectorRequest$, + () => ValidateCloudConnectorResult$ +]; +var getRuntimeConfig$1 = (config) => { + return { + apiVersion: "2014-11-06", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSMHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer + } + ], + logger: config?.logger ?? new NoOpLogger, + protocol: config?.protocol ?? AwsJson1_1Protocol, + protocolSettings: config?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.ssm", + errorTypeRegistries, + xmlNamespace: "http://ssm.amazonaws.com/doc/2014-11-06/", + version: "2014-11-06", + serviceTarget: "AmazonSSM" + }, + serviceId: config?.serviceId ?? "SSM", + sha256: config?.sha256 ?? Sha256, + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8 + }; +}; +var getRuntimeConfig = (config) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig$1(config); + emitWarningIfUnsupportedVersion$1(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? loadConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE + }, config), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; +}; +var getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; +}; +var resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; +}; +var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); +}; + +class SSMClient extends Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveUserAgentConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveRegionConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveEndpointConfig(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use(getSchemaSerdePlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultSSMHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } +} +var command = makeBuilder(commonParams, "AmazonSSM", "SSMClient", getEndpointPlugin); +var _ep0 = {}; +var _mw0 = (Command, cs, config, o) => []; + +class AddTagsToResourceCommand extends command(_ep0, _mw0, "AddTagsToResource", AddTagsToResource$) { +} + +class AssociateOpsItemRelatedItemCommand extends command(_ep0, _mw0, "AssociateOpsItemRelatedItem", AssociateOpsItemRelatedItem$) { +} + +class CancelCommandCommand extends command(_ep0, _mw0, "CancelCommand", CancelCommand$) { +} + +class CancelMaintenanceWindowExecutionCommand extends command(_ep0, _mw0, "CancelMaintenanceWindowExecution", CancelMaintenanceWindowExecution$) { +} + +class CreateActivationCommand extends command(_ep0, _mw0, "CreateActivation", CreateActivation$) { +} + +class CreateAssociationBatchCommand extends command(_ep0, _mw0, "CreateAssociationBatch", CreateAssociationBatch$) { +} + +class CreateAssociationCommand extends command(_ep0, _mw0, "CreateAssociation", CreateAssociation$) { +} + +class CreateCloudConnectorCommand extends command(_ep0, _mw0, "CreateCloudConnector", CreateCloudConnector$) { +} + +class CreateDocumentCommand extends command(_ep0, _mw0, "CreateDocument", CreateDocument$) { +} + +class CreateMaintenanceWindowCommand extends command(_ep0, _mw0, "CreateMaintenanceWindow", CreateMaintenanceWindow$) { +} + +class CreateOpsItemCommand extends command(_ep0, _mw0, "CreateOpsItem", CreateOpsItem$) { +} + +class CreateOpsMetadataCommand extends command(_ep0, _mw0, "CreateOpsMetadata", CreateOpsMetadata$) { +} + +class CreatePatchBaselineCommand extends command(_ep0, _mw0, "CreatePatchBaseline", CreatePatchBaseline$) { +} + +class CreateResourceDataSyncCommand extends command(_ep0, _mw0, "CreateResourceDataSync", CreateResourceDataSync$) { +} + +class DeleteActivationCommand extends command(_ep0, _mw0, "DeleteActivation", DeleteActivation$) { +} + +class DeleteAssociationCommand extends command(_ep0, _mw0, "DeleteAssociation", DeleteAssociation$) { +} + +class DeleteCloudConnectorCommand extends command(_ep0, _mw0, "DeleteCloudConnector", DeleteCloudConnector$) { +} + +class DeleteDocumentCommand extends command(_ep0, _mw0, "DeleteDocument", DeleteDocument$) { +} + +class DeleteInventoryCommand extends command(_ep0, _mw0, "DeleteInventory", DeleteInventory$) { +} + +class DeleteMaintenanceWindowCommand extends command(_ep0, _mw0, "DeleteMaintenanceWindow", DeleteMaintenanceWindow$) { +} + +class DeleteOpsItemCommand extends command(_ep0, _mw0, "DeleteOpsItem", DeleteOpsItem$) { +} + +class DeleteOpsMetadataCommand extends command(_ep0, _mw0, "DeleteOpsMetadata", DeleteOpsMetadata$) { +} + +class DeleteParameterCommand extends command(_ep0, _mw0, "DeleteParameter", DeleteParameter$) { +} + +class DeleteParametersCommand extends command(_ep0, _mw0, "DeleteParameters", DeleteParameters$) { +} + +class DeletePatchBaselineCommand extends command(_ep0, _mw0, "DeletePatchBaseline", DeletePatchBaseline$) { +} + +class DeleteResourceDataSyncCommand extends command(_ep0, _mw0, "DeleteResourceDataSync", DeleteResourceDataSync$) { +} + +class DeleteResourcePolicyCommand extends command(_ep0, _mw0, "DeleteResourcePolicy", DeleteResourcePolicy$) { +} + +class DeregisterManagedInstanceCommand extends command(_ep0, _mw0, "DeregisterManagedInstance", DeregisterManagedInstance$) { +} + +class DeregisterPatchBaselineForPatchGroupCommand extends command(_ep0, _mw0, "DeregisterPatchBaselineForPatchGroup", DeregisterPatchBaselineForPatchGroup$) { +} + +class DeregisterTargetFromMaintenanceWindowCommand extends command(_ep0, _mw0, "DeregisterTargetFromMaintenanceWindow", DeregisterTargetFromMaintenanceWindow$) { +} + +class DeregisterTaskFromMaintenanceWindowCommand extends command(_ep0, _mw0, "DeregisterTaskFromMaintenanceWindow", DeregisterTaskFromMaintenanceWindow$) { +} + +class DescribeActivationsCommand extends command(_ep0, _mw0, "DescribeActivations", DescribeActivations$) { +} + +class DescribeAssociationCommand extends command(_ep0, _mw0, "DescribeAssociation", DescribeAssociation$) { +} + +class DescribeAssociationExecutionsCommand extends command(_ep0, _mw0, "DescribeAssociationExecutions", DescribeAssociationExecutions$) { +} + +class DescribeAssociationExecutionTargetsCommand extends command(_ep0, _mw0, "DescribeAssociationExecutionTargets", DescribeAssociationExecutionTargets$) { +} + +class DescribeAutomationExecutionsCommand extends command(_ep0, _mw0, "DescribeAutomationExecutions", DescribeAutomationExecutions$) { +} + +class DescribeAutomationStepExecutionsCommand extends command(_ep0, _mw0, "DescribeAutomationStepExecutions", DescribeAutomationStepExecutions$) { +} + +class DescribeAvailablePatchesCommand extends command(_ep0, _mw0, "DescribeAvailablePatches", DescribeAvailablePatches$) { +} + +class DescribeDocumentCommand extends command(_ep0, _mw0, "DescribeDocument", DescribeDocument$) { +} + +class DescribeDocumentPermissionCommand extends command(_ep0, _mw0, "DescribeDocumentPermission", DescribeDocumentPermission$) { +} + +class DescribeEffectiveInstanceAssociationsCommand extends command(_ep0, _mw0, "DescribeEffectiveInstanceAssociations", DescribeEffectiveInstanceAssociations$) { +} + +class DescribeEffectivePatchesForPatchBaselineCommand extends command(_ep0, _mw0, "DescribeEffectivePatchesForPatchBaseline", DescribeEffectivePatchesForPatchBaseline$) { +} + +class DescribeInstanceAssociationsStatusCommand extends command(_ep0, _mw0, "DescribeInstanceAssociationsStatus", DescribeInstanceAssociationsStatus$) { +} + +class DescribeInstanceInformationCommand extends command(_ep0, _mw0, "DescribeInstanceInformation", DescribeInstanceInformation$) { +} + +class DescribeInstancePatchesCommand extends command(_ep0, _mw0, "DescribeInstancePatches", DescribeInstancePatches$) { +} + +class DescribeInstancePatchStatesCommand extends command(_ep0, _mw0, "DescribeInstancePatchStates", DescribeInstancePatchStates$) { +} + +class DescribeInstancePatchStatesForPatchGroupCommand extends command(_ep0, _mw0, "DescribeInstancePatchStatesForPatchGroup", DescribeInstancePatchStatesForPatchGroup$) { +} + +class DescribeInstancePropertiesCommand extends command(_ep0, _mw0, "DescribeInstanceProperties", DescribeInstanceProperties$) { +} + +class DescribeInventoryDeletionsCommand extends command(_ep0, _mw0, "DescribeInventoryDeletions", DescribeInventoryDeletions$) { +} + +class DescribeMaintenanceWindowExecutionsCommand extends command(_ep0, _mw0, "DescribeMaintenanceWindowExecutions", DescribeMaintenanceWindowExecutions$) { +} + +class DescribeMaintenanceWindowExecutionTaskInvocationsCommand extends command(_ep0, _mw0, "DescribeMaintenanceWindowExecutionTaskInvocations", DescribeMaintenanceWindowExecutionTaskInvocations$) { +} + +class DescribeMaintenanceWindowExecutionTasksCommand extends command(_ep0, _mw0, "DescribeMaintenanceWindowExecutionTasks", DescribeMaintenanceWindowExecutionTasks$) { +} +class DescribeMaintenanceWindowScheduleCommand extends command(_ep0, _mw0, "DescribeMaintenanceWindowSchedule", DescribeMaintenanceWindowSchedule$) { +} + +class DescribeMaintenanceWindowsCommand extends command(_ep0, _mw0, "DescribeMaintenanceWindows", DescribeMaintenanceWindows$) { +} + +class DescribeMaintenanceWindowsForTargetCommand extends command(_ep0, _mw0, "DescribeMaintenanceWindowsForTarget", DescribeMaintenanceWindowsForTarget$) { +} + +class DescribeMaintenanceWindowTargetsCommand extends command(_ep0, _mw0, "DescribeMaintenanceWindowTargets", DescribeMaintenanceWindowTargets$) { +} + +class DescribeMaintenanceWindowTasksCommand extends command(_ep0, _mw0, "DescribeMaintenanceWindowTasks", DescribeMaintenanceWindowTasks$) { +} + +class DescribeOpsItemsCommand extends command(_ep0, _mw0, "DescribeOpsItems", DescribeOpsItems$) { +} + +class DescribeParametersCommand extends command(_ep0, _mw0, "DescribeParameters", DescribeParameters$) { +} + +class DescribePatchBaselinesCommand extends command(_ep0, _mw0, "DescribePatchBaselines", DescribePatchBaselines$) { +} + +class DescribePatchGroupsCommand extends command(_ep0, _mw0, "DescribePatchGroups", DescribePatchGroups$) { +} + +class DescribePatchGroupStateCommand extends command(_ep0, _mw0, "DescribePatchGroupState", DescribePatchGroupState$) { +} + +class DescribePatchPropertiesCommand extends command(_ep0, _mw0, "DescribePatchProperties", DescribePatchProperties$) { +} + +class DescribeSessionsCommand extends command(_ep0, _mw0, "DescribeSessions", DescribeSessions$) { +} + +class DisassociateOpsItemRelatedItemCommand extends command(_ep0, _mw0, "DisassociateOpsItemRelatedItem", DisassociateOpsItemRelatedItem$) { +} + +class GetAccessTokenCommand extends command(_ep0, _mw0, "GetAccessToken", GetAccessToken$) { +} + +class GetAutomationExecutionCommand extends command(_ep0, _mw0, "GetAutomationExecution", GetAutomationExecution$) { +} + +class GetCalendarStateCommand extends command(_ep0, _mw0, "GetCalendarState", GetCalendarState$) { +} + +class GetCloudConnectorCommand extends command(_ep0, _mw0, "GetCloudConnector", GetCloudConnector$) { +} + +class GetCommandInvocationCommand extends command(_ep0, _mw0, "GetCommandInvocation", GetCommandInvocation$) { +} + +class GetConnectionStatusCommand extends command(_ep0, _mw0, "GetConnectionStatus", GetConnectionStatus$) { +} + +class GetDefaultPatchBaselineCommand extends command(_ep0, _mw0, "GetDefaultPatchBaseline", GetDefaultPatchBaseline$) { +} + +class GetDeployablePatchSnapshotForInstanceCommand extends command(_ep0, _mw0, "GetDeployablePatchSnapshotForInstance", GetDeployablePatchSnapshotForInstance$) { +} + +class GetDocumentCommand extends command(_ep0, _mw0, "GetDocument", GetDocument$) { +} + +class GetExecutionPreviewCommand extends command(_ep0, _mw0, "GetExecutionPreview", GetExecutionPreview$) { +} + +class GetInventoryCommand extends command(_ep0, _mw0, "GetInventory", GetInventory$) { +} + +class GetInventorySchemaCommand extends command(_ep0, _mw0, "GetInventorySchema", GetInventorySchema$) { +} + +class GetMaintenanceWindowCommand extends command(_ep0, _mw0, "GetMaintenanceWindow", GetMaintenanceWindow$) { +} + +class GetMaintenanceWindowExecutionCommand extends command(_ep0, _mw0, "GetMaintenanceWindowExecution", GetMaintenanceWindowExecution$) { +} + +class GetMaintenanceWindowExecutionTaskCommand extends command(_ep0, _mw0, "GetMaintenanceWindowExecutionTask", GetMaintenanceWindowExecutionTask$) { +} + +class GetMaintenanceWindowExecutionTaskInvocationCommand extends command(_ep0, _mw0, "GetMaintenanceWindowExecutionTaskInvocation", GetMaintenanceWindowExecutionTaskInvocation$) { +} + +class GetMaintenanceWindowTaskCommand extends command(_ep0, _mw0, "GetMaintenanceWindowTask", GetMaintenanceWindowTask$) { +} + +class GetOpsItemCommand extends command(_ep0, _mw0, "GetOpsItem", GetOpsItem$) { +} + +class GetOpsMetadataCommand extends command(_ep0, _mw0, "GetOpsMetadata", GetOpsMetadata$) { +} + +class GetOpsSummaryCommand extends command(_ep0, _mw0, "GetOpsSummary", GetOpsSummary$) { +} + +class GetParameterCommand extends command(_ep0, _mw0, "GetParameter", GetParameter$) { +} + +class GetParameterHistoryCommand extends command(_ep0, _mw0, "GetParameterHistory", GetParameterHistory$) { +} + +class GetParametersByPathCommand extends command(_ep0, _mw0, "GetParametersByPath", GetParametersByPath$) { +} + +class GetParametersCommand extends command(_ep0, _mw0, "GetParameters", GetParameters$) { +} + +class GetPatchBaselineCommand extends command(_ep0, _mw0, "GetPatchBaseline", GetPatchBaseline$) { +} + +class GetPatchBaselineForPatchGroupCommand extends command(_ep0, _mw0, "GetPatchBaselineForPatchGroup", GetPatchBaselineForPatchGroup$) { +} + +class GetResourcePoliciesCommand extends command(_ep0, _mw0, "GetResourcePolicies", GetResourcePolicies$) { +} + +class GetServiceSettingCommand extends command(_ep0, _mw0, "GetServiceSetting", GetServiceSetting$) { +} + +class LabelParameterVersionCommand extends command(_ep0, _mw0, "LabelParameterVersion", LabelParameterVersion$) { +} + +class ListAssociationsCommand extends command(_ep0, _mw0, "ListAssociations", ListAssociations$) { +} + +class ListAssociationVersionsCommand extends command(_ep0, _mw0, "ListAssociationVersions", ListAssociationVersions$) { +} + +class ListCloudConnectorsCommand extends command(_ep0, _mw0, "ListCloudConnectors", ListCloudConnectors$) { +} + +class ListCommandInvocationsCommand extends command(_ep0, _mw0, "ListCommandInvocations", ListCommandInvocations$) { +} + +class ListCommandsCommand extends command(_ep0, _mw0, "ListCommands", ListCommands$) { +} + +class ListComplianceItemsCommand extends command(_ep0, _mw0, "ListComplianceItems", ListComplianceItems$) { +} + +class ListComplianceSummariesCommand extends command(_ep0, _mw0, "ListComplianceSummaries", ListComplianceSummaries$) { +} + +class ListDocumentMetadataHistoryCommand extends command(_ep0, _mw0, "ListDocumentMetadataHistory", ListDocumentMetadataHistory$) { +} + +class ListDocumentsCommand extends command(_ep0, _mw0, "ListDocuments", ListDocuments$) { +} + +class ListDocumentVersionsCommand extends command(_ep0, _mw0, "ListDocumentVersions", ListDocumentVersions$) { +} + +class ListInventoryEntriesCommand extends command(_ep0, _mw0, "ListInventoryEntries", ListInventoryEntries$) { +} + +class ListNodesCommand extends command(_ep0, _mw0, "ListNodes", ListNodes$) { +} + +class ListNodesSummaryCommand extends command(_ep0, _mw0, "ListNodesSummary", ListNodesSummary$) { +} + +class ListOpsItemEventsCommand extends command(_ep0, _mw0, "ListOpsItemEvents", ListOpsItemEvents$) { +} + +class ListOpsItemRelatedItemsCommand extends command(_ep0, _mw0, "ListOpsItemRelatedItems", ListOpsItemRelatedItems$) { +} + +class ListOpsMetadataCommand extends command(_ep0, _mw0, "ListOpsMetadata", ListOpsMetadata$) { +} + +class ListResourceComplianceSummariesCommand extends command(_ep0, _mw0, "ListResourceComplianceSummaries", ListResourceComplianceSummaries$) { +} + +class ListResourceDataSyncCommand extends command(_ep0, _mw0, "ListResourceDataSync", ListResourceDataSync$) { +} + +class ListTagsForResourceCommand extends command(_ep0, _mw0, "ListTagsForResource", ListTagsForResource$) { +} + +class ModifyDocumentPermissionCommand extends command(_ep0, _mw0, "ModifyDocumentPermission", ModifyDocumentPermission$) { +} + +class PutComplianceItemsCommand extends command(_ep0, _mw0, "PutComplianceItems", PutComplianceItems$) { +} + +class PutInventoryCommand extends command(_ep0, _mw0, "PutInventory", PutInventory$) { +} + +class PutParameterCommand extends command(_ep0, _mw0, "PutParameter", PutParameter$) { +} + +class PutResourcePolicyCommand extends command(_ep0, _mw0, "PutResourcePolicy", PutResourcePolicy$) { +} + +class RegisterDefaultPatchBaselineCommand extends command(_ep0, _mw0, "RegisterDefaultPatchBaseline", RegisterDefaultPatchBaseline$) { +} + +class RegisterPatchBaselineForPatchGroupCommand extends command(_ep0, _mw0, "RegisterPatchBaselineForPatchGroup", RegisterPatchBaselineForPatchGroup$) { +} + +class RegisterTargetWithMaintenanceWindowCommand extends command(_ep0, _mw0, "RegisterTargetWithMaintenanceWindow", RegisterTargetWithMaintenanceWindow$) { +} + +class RegisterTaskWithMaintenanceWindowCommand extends command(_ep0, _mw0, "RegisterTaskWithMaintenanceWindow", RegisterTaskWithMaintenanceWindow$) { +} + +class RemoveTagsFromResourceCommand extends command(_ep0, _mw0, "RemoveTagsFromResource", RemoveTagsFromResource$) { +} + +class ResetServiceSettingCommand extends command(_ep0, _mw0, "ResetServiceSetting", ResetServiceSetting$) { +} + +class ResumeSessionCommand extends command(_ep0, _mw0, "ResumeSession", ResumeSession$) { +} + +class SendAutomationSignalCommand extends command(_ep0, _mw0, "SendAutomationSignal", SendAutomationSignal$) { +} + +class SendCommandCommand extends command(_ep0, _mw0, "SendCommand", SendCommand$) { +} + +class StartAccessRequestCommand extends command(_ep0, _mw0, "StartAccessRequest", StartAccessRequest$) { +} + +class StartAssociationsOnceCommand extends command(_ep0, _mw0, "StartAssociationsOnce", StartAssociationsOnce$) { +} + +class StartAutomationExecutionCommand extends command(_ep0, _mw0, "StartAutomationExecution", StartAutomationExecution$) { +} + +class StartChangeRequestExecutionCommand extends command(_ep0, _mw0, "StartChangeRequestExecution", StartChangeRequestExecution$) { +} + +class StartExecutionPreviewCommand extends command(_ep0, _mw0, "StartExecutionPreview", StartExecutionPreview$) { +} + +class StartSessionCommand extends command(_ep0, _mw0, "StartSession", StartSession$) { +} + +class StopAutomationExecutionCommand extends command(_ep0, _mw0, "StopAutomationExecution", StopAutomationExecution$) { +} + +class TerminateSessionCommand extends command(_ep0, _mw0, "TerminateSession", TerminateSession$) { +} + +class UnlabelParameterVersionCommand extends command(_ep0, _mw0, "UnlabelParameterVersion", UnlabelParameterVersion$) { +} + +class UpdateAssociationCommand extends command(_ep0, _mw0, "UpdateAssociation", UpdateAssociation$) { +} + +class UpdateAssociationStatusCommand extends command(_ep0, _mw0, "UpdateAssociationStatus", UpdateAssociationStatus$) { +} + +class UpdateCloudConnectorCommand extends command(_ep0, _mw0, "UpdateCloudConnector", UpdateCloudConnector$) { +} + +class UpdateDocumentCommand extends command(_ep0, _mw0, "UpdateDocument", UpdateDocument$) { +} + +class UpdateDocumentDefaultVersionCommand extends command(_ep0, _mw0, "UpdateDocumentDefaultVersion", UpdateDocumentDefaultVersion$) { +} + +class UpdateDocumentMetadataCommand extends command(_ep0, _mw0, "UpdateDocumentMetadata", UpdateDocumentMetadata$) { +} + +class UpdateMaintenanceWindowCommand extends command(_ep0, _mw0, "UpdateMaintenanceWindow", UpdateMaintenanceWindow$) { +} + +class UpdateMaintenanceWindowTargetCommand extends command(_ep0, _mw0, "UpdateMaintenanceWindowTarget", UpdateMaintenanceWindowTarget$) { +} + +class UpdateMaintenanceWindowTaskCommand extends command(_ep0, _mw0, "UpdateMaintenanceWindowTask", UpdateMaintenanceWindowTask$) { +} + +class UpdateManagedInstanceRoleCommand extends command(_ep0, _mw0, "UpdateManagedInstanceRole", UpdateManagedInstanceRole$) { +} + +class UpdateOpsItemCommand extends command(_ep0, _mw0, "UpdateOpsItem", UpdateOpsItem$) { +} + +class UpdateOpsMetadataCommand extends command(_ep0, _mw0, "UpdateOpsMetadata", UpdateOpsMetadata$) { +} + +class UpdatePatchBaselineCommand extends command(_ep0, _mw0, "UpdatePatchBaseline", UpdatePatchBaseline$) { +} + +class UpdateResourceDataSyncCommand extends command(_ep0, _mw0, "UpdateResourceDataSync", UpdateResourceDataSync$) { +} + +class UpdateServiceSettingCommand extends command(_ep0, _mw0, "UpdateServiceSetting", UpdateServiceSetting$) { +} + +class ValidateCloudConnectorCommand extends command(_ep0, _mw0, "ValidateCloudConnector", ValidateCloudConnector$) { +} +var paginateDescribeActivations = createPaginator(SSMClient, DescribeActivationsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeAssociationExecutions = createPaginator(SSMClient, DescribeAssociationExecutionsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeAssociationExecutionTargets = createPaginator(SSMClient, DescribeAssociationExecutionTargetsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeAutomationExecutions = createPaginator(SSMClient, DescribeAutomationExecutionsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeAutomationStepExecutions = createPaginator(SSMClient, DescribeAutomationStepExecutionsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeAvailablePatches = createPaginator(SSMClient, DescribeAvailablePatchesCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeEffectiveInstanceAssociations = createPaginator(SSMClient, DescribeEffectiveInstanceAssociationsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeEffectivePatchesForPatchBaseline = createPaginator(SSMClient, DescribeEffectivePatchesForPatchBaselineCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeInstanceAssociationsStatus = createPaginator(SSMClient, DescribeInstanceAssociationsStatusCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeInstanceInformation = createPaginator(SSMClient, DescribeInstanceInformationCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeInstancePatches = createPaginator(SSMClient, DescribeInstancePatchesCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeInstancePatchStatesForPatchGroup = createPaginator(SSMClient, DescribeInstancePatchStatesForPatchGroupCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeInstancePatchStates = createPaginator(SSMClient, DescribeInstancePatchStatesCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeInstanceProperties = createPaginator(SSMClient, DescribeInstancePropertiesCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeInventoryDeletions = createPaginator(SSMClient, DescribeInventoryDeletionsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeMaintenanceWindowExecutions = createPaginator(SSMClient, DescribeMaintenanceWindowExecutionsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeMaintenanceWindowExecutionTaskInvocations = createPaginator(SSMClient, DescribeMaintenanceWindowExecutionTaskInvocationsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeMaintenanceWindowExecutionTasks = createPaginator(SSMClient, DescribeMaintenanceWindowExecutionTasksCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeMaintenanceWindowSchedule = createPaginator(SSMClient, DescribeMaintenanceWindowScheduleCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeMaintenanceWindowsForTarget = createPaginator(SSMClient, DescribeMaintenanceWindowsForTargetCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeMaintenanceWindows = createPaginator(SSMClient, DescribeMaintenanceWindowsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeMaintenanceWindowTargets = createPaginator(SSMClient, DescribeMaintenanceWindowTargetsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeMaintenanceWindowTasks = createPaginator(SSMClient, DescribeMaintenanceWindowTasksCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeOpsItems = createPaginator(SSMClient, DescribeOpsItemsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeParameters = createPaginator(SSMClient, DescribeParametersCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribePatchBaselines = createPaginator(SSMClient, DescribePatchBaselinesCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribePatchGroups = createPaginator(SSMClient, DescribePatchGroupsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribePatchProperties = createPaginator(SSMClient, DescribePatchPropertiesCommand, "NextToken", "NextToken", "MaxResults"); +var paginateDescribeSessions = createPaginator(SSMClient, DescribeSessionsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateGetInventory = createPaginator(SSMClient, GetInventoryCommand, "NextToken", "NextToken", "MaxResults"); +var paginateGetInventorySchema = createPaginator(SSMClient, GetInventorySchemaCommand, "NextToken", "NextToken", "MaxResults"); +var paginateGetOpsSummary = createPaginator(SSMClient, GetOpsSummaryCommand, "NextToken", "NextToken", "MaxResults"); +var paginateGetParameterHistory = createPaginator(SSMClient, GetParameterHistoryCommand, "NextToken", "NextToken", "MaxResults"); +var paginateGetParametersByPath = createPaginator(SSMClient, GetParametersByPathCommand, "NextToken", "NextToken", "MaxResults"); +var paginateGetResourcePolicies = createPaginator(SSMClient, GetResourcePoliciesCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListAssociations = createPaginator(SSMClient, ListAssociationsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListAssociationVersions = createPaginator(SSMClient, ListAssociationVersionsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListCloudConnectors = createPaginator(SSMClient, ListCloudConnectorsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListCommandInvocations = createPaginator(SSMClient, ListCommandInvocationsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListCommands = createPaginator(SSMClient, ListCommandsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListComplianceItems = createPaginator(SSMClient, ListComplianceItemsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListComplianceSummaries = createPaginator(SSMClient, ListComplianceSummariesCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListDocuments = createPaginator(SSMClient, ListDocumentsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListDocumentVersions = createPaginator(SSMClient, ListDocumentVersionsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListNodes = createPaginator(SSMClient, ListNodesCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListNodesSummary = createPaginator(SSMClient, ListNodesSummaryCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListOpsItemEvents = createPaginator(SSMClient, ListOpsItemEventsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListOpsItemRelatedItems = createPaginator(SSMClient, ListOpsItemRelatedItemsCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListOpsMetadata = createPaginator(SSMClient, ListOpsMetadataCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListResourceComplianceSummaries = createPaginator(SSMClient, ListResourceComplianceSummariesCommand, "NextToken", "NextToken", "MaxResults"); +var paginateListResourceDataSync = createPaginator(SSMClient, ListResourceDataSyncCommand, "NextToken", "NextToken", "MaxResults"); +var paginateValidateCloudConnector = createPaginator(SSMClient, ValidateCloudConnectorCommand, "NextToken", "NextToken", "MaxResults"); +var checkState = async (client, input) => { + let reason; + try { + let result = await client.send(new GetCommandInvocationCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "Pending") { + return { state: WaiterState.RETRY, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "InProgress") { + return { state: WaiterState.RETRY, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "Delayed") { + return { state: WaiterState.RETRY, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "Success") { + return { state: WaiterState.SUCCESS, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "Cancelled") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "TimedOut") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "Failed") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.Status; + }; + if (returnComparator() === "Cancelling") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + if (exception.name === "InvocationDoesNotExist") { + return { state: WaiterState.RETRY, reason }; + } + } + return { state: WaiterState.RETRY, reason }; +}; +var waitUntilCommandExecuted = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; +var commands = { + AddTagsToResourceCommand, + AssociateOpsItemRelatedItemCommand, + CancelCommandCommand, + CancelMaintenanceWindowExecutionCommand, + CreateActivationCommand, + CreateAssociationCommand, + CreateAssociationBatchCommand, + CreateCloudConnectorCommand, + CreateDocumentCommand, + CreateMaintenanceWindowCommand, + CreateOpsItemCommand, + CreateOpsMetadataCommand, + CreatePatchBaselineCommand, + CreateResourceDataSyncCommand, + DeleteActivationCommand, + DeleteAssociationCommand, + DeleteCloudConnectorCommand, + DeleteDocumentCommand, + DeleteInventoryCommand, + DeleteMaintenanceWindowCommand, + DeleteOpsItemCommand, + DeleteOpsMetadataCommand, + DeleteParameterCommand, + DeleteParametersCommand, + DeletePatchBaselineCommand, + DeleteResourceDataSyncCommand, + DeleteResourcePolicyCommand, + DeregisterManagedInstanceCommand, + DeregisterPatchBaselineForPatchGroupCommand, + DeregisterTargetFromMaintenanceWindowCommand, + DeregisterTaskFromMaintenanceWindowCommand, + DescribeActivationsCommand, + DescribeAssociationCommand, + DescribeAssociationExecutionsCommand, + DescribeAssociationExecutionTargetsCommand, + DescribeAutomationExecutionsCommand, + DescribeAutomationStepExecutionsCommand, + DescribeAvailablePatchesCommand, + DescribeDocumentCommand, + DescribeDocumentPermissionCommand, + DescribeEffectiveInstanceAssociationsCommand, + DescribeEffectivePatchesForPatchBaselineCommand, + DescribeInstanceAssociationsStatusCommand, + DescribeInstanceInformationCommand, + DescribeInstancePatchesCommand, + DescribeInstancePatchStatesCommand, + DescribeInstancePatchStatesForPatchGroupCommand, + DescribeInstancePropertiesCommand, + DescribeInventoryDeletionsCommand, + DescribeMaintenanceWindowExecutionsCommand, + DescribeMaintenanceWindowExecutionTaskInvocationsCommand, + DescribeMaintenanceWindowExecutionTasksCommand, + DescribeMaintenanceWindowsCommand, + DescribeMaintenanceWindowScheduleCommand, + DescribeMaintenanceWindowsForTargetCommand, + DescribeMaintenanceWindowTargetsCommand, + DescribeMaintenanceWindowTasksCommand, + DescribeOpsItemsCommand, + DescribeParametersCommand, + DescribePatchBaselinesCommand, + DescribePatchGroupsCommand, + DescribePatchGroupStateCommand, + DescribePatchPropertiesCommand, + DescribeSessionsCommand, + DisassociateOpsItemRelatedItemCommand, + GetAccessTokenCommand, + GetAutomationExecutionCommand, + GetCalendarStateCommand, + GetCloudConnectorCommand, + GetCommandInvocationCommand, + GetConnectionStatusCommand, + GetDefaultPatchBaselineCommand, + GetDeployablePatchSnapshotForInstanceCommand, + GetDocumentCommand, + GetExecutionPreviewCommand, + GetInventoryCommand, + GetInventorySchemaCommand, + GetMaintenanceWindowCommand, + GetMaintenanceWindowExecutionCommand, + GetMaintenanceWindowExecutionTaskCommand, + GetMaintenanceWindowExecutionTaskInvocationCommand, + GetMaintenanceWindowTaskCommand, + GetOpsItemCommand, + GetOpsMetadataCommand, + GetOpsSummaryCommand, + GetParameterCommand, + GetParameterHistoryCommand, + GetParametersCommand, + GetParametersByPathCommand, + GetPatchBaselineCommand, + GetPatchBaselineForPatchGroupCommand, + GetResourcePoliciesCommand, + GetServiceSettingCommand, + LabelParameterVersionCommand, + ListAssociationsCommand, + ListAssociationVersionsCommand, + ListCloudConnectorsCommand, + ListCommandInvocationsCommand, + ListCommandsCommand, + ListComplianceItemsCommand, + ListComplianceSummariesCommand, + ListDocumentMetadataHistoryCommand, + ListDocumentsCommand, + ListDocumentVersionsCommand, + ListInventoryEntriesCommand, + ListNodesCommand, + ListNodesSummaryCommand, + ListOpsItemEventsCommand, + ListOpsItemRelatedItemsCommand, + ListOpsMetadataCommand, + ListResourceComplianceSummariesCommand, + ListResourceDataSyncCommand, + ListTagsForResourceCommand, + ModifyDocumentPermissionCommand, + PutComplianceItemsCommand, + PutInventoryCommand, + PutParameterCommand, + PutResourcePolicyCommand, + RegisterDefaultPatchBaselineCommand, + RegisterPatchBaselineForPatchGroupCommand, + RegisterTargetWithMaintenanceWindowCommand, + RegisterTaskWithMaintenanceWindowCommand, + RemoveTagsFromResourceCommand, + ResetServiceSettingCommand, + ResumeSessionCommand, + SendAutomationSignalCommand, + SendCommandCommand, + StartAccessRequestCommand, + StartAssociationsOnceCommand, + StartAutomationExecutionCommand, + StartChangeRequestExecutionCommand, + StartExecutionPreviewCommand, + StartSessionCommand, + StopAutomationExecutionCommand, + TerminateSessionCommand, + UnlabelParameterVersionCommand, + UpdateAssociationCommand, + UpdateAssociationStatusCommand, + UpdateCloudConnectorCommand, + UpdateDocumentCommand, + UpdateDocumentDefaultVersionCommand, + UpdateDocumentMetadataCommand, + UpdateMaintenanceWindowCommand, + UpdateMaintenanceWindowTargetCommand, + UpdateMaintenanceWindowTaskCommand, + UpdateManagedInstanceRoleCommand, + UpdateOpsItemCommand, + UpdateOpsMetadataCommand, + UpdatePatchBaselineCommand, + UpdateResourceDataSyncCommand, + UpdateServiceSettingCommand, + ValidateCloudConnectorCommand +}; +var paginators = { + paginateDescribeActivations, + paginateDescribeAssociationExecutions, + paginateDescribeAssociationExecutionTargets, + paginateDescribeAutomationExecutions, + paginateDescribeAutomationStepExecutions, + paginateDescribeAvailablePatches, + paginateDescribeEffectiveInstanceAssociations, + paginateDescribeEffectivePatchesForPatchBaseline, + paginateDescribeInstanceAssociationsStatus, + paginateDescribeInstanceInformation, + paginateDescribeInstancePatches, + paginateDescribeInstancePatchStates, + paginateDescribeInstancePatchStatesForPatchGroup, + paginateDescribeInstanceProperties, + paginateDescribeInventoryDeletions, + paginateDescribeMaintenanceWindowExecutions, + paginateDescribeMaintenanceWindowExecutionTaskInvocations, + paginateDescribeMaintenanceWindowExecutionTasks, + paginateDescribeMaintenanceWindows, + paginateDescribeMaintenanceWindowSchedule, + paginateDescribeMaintenanceWindowsForTarget, + paginateDescribeMaintenanceWindowTargets, + paginateDescribeMaintenanceWindowTasks, + paginateDescribeOpsItems, + paginateDescribeParameters, + paginateDescribePatchBaselines, + paginateDescribePatchGroups, + paginateDescribePatchProperties, + paginateDescribeSessions, + paginateGetInventory, + paginateGetInventorySchema, + paginateGetOpsSummary, + paginateGetParameterHistory, + paginateGetParametersByPath, + paginateGetResourcePolicies, + paginateListAssociations, + paginateListAssociationVersions, + paginateListCloudConnectors, + paginateListCommandInvocations, + paginateListCommands, + paginateListComplianceItems, + paginateListComplianceSummaries, + paginateListDocuments, + paginateListDocumentVersions, + paginateListNodes, + paginateListNodesSummary, + paginateListOpsItemEvents, + paginateListOpsItemRelatedItems, + paginateListOpsMetadata, + paginateListResourceComplianceSummaries, + paginateListResourceDataSync, + paginateValidateCloudConnector +}; +var waiters = { + waitUntilCommandExecuted +}; + +class SSM extends SSMClient { +} +createAggregatedClient(commands, SSM, { paginators, waiters }); +var $PutParameterCommand = PutParameterCommand; +var $SSMClient = SSMClient; + +// node_modules/@aws-sdk/lib-storage/dist-cjs/index.js +var { PutObjectCommand, ChecksumAlgorithm, CreateMultipartUploadCommand, AbortMultipartUploadCommand, UploadPartCommand, CompleteMultipartUploadCommand, PutObjectTaggingCommand } = require_dist_cjs17(); +var { toEndpointV1, getEndpointFromInstructions } = require_endpoints(); +var { extendedEncodeURIComponent } = require_protocols(); +var { EventEmitter } = __require("events"); +var { Buffer: Buffer2 } = __require("buffer"); +var { lstatSync, ReadStream } = __require("node:fs"); +var { Readable } = __require("stream"); +var runtimeConfigShared = { + lstatSync: () => {}, + isFileReadStream(f) { + return false; + } +}; +var runtimeConfig = { + ...runtimeConfigShared, + runtime: "node", + lstatSync, + isFileReadStream(f) { + return f instanceof ReadStream; + } +}; +var byteLength = (input) => { + if (input == null) { + return 0; + } + if (typeof input === "string") { + return Buffer2.byteLength(input); + } + if (typeof input.byteLength === "number") { + return input.byteLength; + } else if (typeof input.length === "number") { + return input.length; + } else if (typeof input.size === "number") { + return input.size; + } else if (typeof input.start === "number" && typeof input.end === "number") { + return input.end + 1 - input.start; + } else if (runtimeConfig.isFileReadStream(input)) { + try { + return runtimeConfig.lstatSync(input.path).size; + } catch (error) { + return; + } + } + return; +}; +var BYTE_LENGTH_SOURCE; +(function(BYTE_LENGTH_SOURCE) { + BYTE_LENGTH_SOURCE["EMPTY_INPUT"] = "a null or undefined Body"; + BYTE_LENGTH_SOURCE["CONTENT_LENGTH"] = "the ContentLength property of the params set by the caller"; + BYTE_LENGTH_SOURCE["STRING_LENGTH"] = "the encoded byte length of the Body string"; + BYTE_LENGTH_SOURCE["TYPED_ARRAY"] = "the byteLength of a typed byte array such as Uint8Array"; + BYTE_LENGTH_SOURCE["LENGTH"] = "the value of Body.length"; + BYTE_LENGTH_SOURCE["SIZE"] = "the value of Body.size"; + BYTE_LENGTH_SOURCE["START_END_DIFF"] = "the numeric difference between Body.start and Body.end"; + BYTE_LENGTH_SOURCE["LSTAT"] = "the size of the file given by Body.path on disk as reported by lstatSync"; +})(BYTE_LENGTH_SOURCE || (BYTE_LENGTH_SOURCE = {})); +var byteLengthSource = (input, override) => { + if (override != null) { + return BYTE_LENGTH_SOURCE.CONTENT_LENGTH; + } + if (input == null) { + return BYTE_LENGTH_SOURCE.EMPTY_INPUT; + } + if (typeof input === "string") { + return BYTE_LENGTH_SOURCE.STRING_LENGTH; + } + if (typeof input.byteLength === "number") { + return BYTE_LENGTH_SOURCE.TYPED_ARRAY; + } else if (typeof input.length === "number") { + return BYTE_LENGTH_SOURCE.LENGTH; + } else if (typeof input.size === "number") { + return BYTE_LENGTH_SOURCE.SIZE; + } else if (typeof input.start === "number" && typeof input.end === "number") { + return BYTE_LENGTH_SOURCE.START_END_DIFF; + } else if (runtimeConfig.isFileReadStream(input)) { + try { + runtimeConfig.lstatSync(input.path).size; + return BYTE_LENGTH_SOURCE.LSTAT; + } catch (error) { + return; + } + } + return; +}; +async function* getChunkStream(data, partSize, getNextData) { + let partNumber = 1; + const currentBuffer = { chunks: [], length: 0 }; + for await (const datum of getNextData(data)) { + currentBuffer.chunks.push(datum); + currentBuffer.length += datum.byteLength; + while (currentBuffer.length > partSize) { + const dataChunk = currentBuffer.chunks.length > 1 ? Buffer2.concat(currentBuffer.chunks) : currentBuffer.chunks[0]; + yield { + partNumber, + data: dataChunk.subarray(0, partSize) + }; + currentBuffer.chunks = [dataChunk.subarray(partSize)]; + currentBuffer.length = currentBuffer.chunks[0].byteLength; + partNumber += 1; + } + } + yield { + partNumber, + data: currentBuffer.chunks.length !== 1 ? Buffer2.concat(currentBuffer.chunks) : currentBuffer.chunks[0], + lastPart: true + }; +} +async function* getChunkUint8Array(data, partSize) { + let partNumber = 1; + let startByte = 0; + let endByte = partSize; + while (endByte < data.byteLength) { + yield { + partNumber, + data: data.subarray(startByte, endByte) + }; + partNumber += 1; + startByte = endByte; + endByte = startByte + partSize; + } + yield { + partNumber, + data: data.subarray(startByte), + lastPart: true + }; +} +async function* getDataReadable(data) { + for await (const chunk of data) { + if (Buffer2.isBuffer(chunk) || chunk instanceof Uint8Array) { + yield chunk; + } else { + yield Buffer2.from(chunk); + } + } +} +async function* getDataReadableStream(data) { + const reader = data.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + if (Buffer2.isBuffer(value) || value instanceof Uint8Array) { + yield value; + } else { + yield Buffer2.from(value); + } + } + } catch (e) { + throw e; + } finally { + reader.releaseLock(); + } +} +var getChunk = (data, partSize) => { + if (data instanceof Uint8Array) { + return getChunkUint8Array(data, partSize); + } + if (data instanceof Readable) { + return getChunkStream(data, partSize, getDataReadable); + } + if (data instanceof String || typeof data === "string") { + return getChunkUint8Array(Buffer2.from(data), partSize); + } + if (typeof data.stream === "function") { + return getChunkStream(data.stream(), partSize, getDataReadableStream); + } + if (data instanceof ReadableStream) { + return getChunkStream(data, partSize, getDataReadableStream); + } + throw new Error("Body Data is unsupported format, expected data to be one of: string | Uint8Array | Buffer | Readable | ReadableStream | Blob;."); +}; + +class Upload extends EventEmitter { + static MIN_PART_SIZE = 1024 * 1024 * 5; + MAX_PARTS = 1e4; + queueSize = 4; + partSize; + leavePartsOnError = false; + tags = []; + client; + params; + totalBytes; + totalBytesSource; + bytesUploadedSoFar; + abortController; + concurrentUploaders = []; + createMultiPartPromise; + abortMultipartUploadCommand = null; + uploadedParts = []; + uploadEnqueuedPartsCount = 0; + expectedPartsCount; + uploadId; + uploadEvent; + isMultiPart = true; + singleUploadResult; + sent = false; + constructor(options) { + super(); + this.queueSize = options.queueSize || this.queueSize; + this.leavePartsOnError = options.leavePartsOnError || this.leavePartsOnError; + this.tags = options.tags || this.tags; + this.client = options.client; + this.params = options.params; + if (!this.params) { + throw new Error(`InputError: Upload requires params to be passed to upload.`); + } + this.totalBytes = this.params.ContentLength ?? byteLength(this.params.Body); + this.totalBytesSource = byteLengthSource(this.params.Body, this.params.ContentLength); + this.bytesUploadedSoFar = 0; + this.abortController = options.abortController ?? new AbortController; + this.partSize = options.partSize || Math.max(Upload.MIN_PART_SIZE, Math.ceil((this.totalBytes || 0) / this.MAX_PARTS)); + if (this.totalBytes !== undefined) { + this.expectedPartsCount = Math.ceil(this.totalBytes / this.partSize); + } + this.__validateInput(); + } + async abort() { + this.abortController.abort(); + } + async done() { + if (this.sent) { + throw new Error("@aws-sdk/lib-storage: this instance of Upload has already executed .done(). Create a new instance."); + } + this.sent = true; + return await Promise.race([this.__doMultipartUpload(), this.__abortTimeout(this.abortController.signal)]); + } + on(event, listener) { + this.uploadEvent = event; + return super.on(event, listener); + } + async __uploadUsingPut(dataPart) { + this.isMultiPart = false; + const params = { ...this.params, Body: dataPart.data }; + const clientConfig = this.client.config; + const requestHandler = clientConfig.requestHandler; + const eventEmitter = requestHandler instanceof EventEmitter ? requestHandler : null; + const uploadEventListener = (event) => { + this.bytesUploadedSoFar = event.loaded; + this.totalBytes = event.total; + this.__notifyProgress({ + loaded: this.bytesUploadedSoFar, + total: this.totalBytes, + part: dataPart.partNumber, + Key: this.params.Key, + Bucket: this.params.Bucket + }); + }; + if (eventEmitter !== null) { + eventEmitter.on("xhr.upload.progress", uploadEventListener); + } + const resolved = await Promise.all([this.client.send(new PutObjectCommand(params)), clientConfig?.endpoint?.()]); + const putResult = resolved[0]; + let endpoint = resolved[1]; + if (!endpoint) { + endpoint = toEndpointV1(await getEndpointFromInstructions(params, PutObjectCommand, { + ...clientConfig + })); + } + if (!endpoint) { + throw new Error('Could not resolve endpoint from S3 "client.config.endpoint()" nor EndpointsV2.'); + } + if (eventEmitter !== null) { + eventEmitter.off("xhr.upload.progress", uploadEventListener); + } + const locationKey = this.params.Key.split("/").map((segment) => extendedEncodeURIComponent(segment)).join("/"); + const locationBucket = extendedEncodeURIComponent(this.params.Bucket); + const Location = (() => { + const endpointHostnameIncludesBucket = endpoint.hostname.startsWith(`${locationBucket}.`); + const forcePathStyle = this.client.config.forcePathStyle; + const optionalPort = endpoint.port ? `:${endpoint.port}` : ``; + if (forcePathStyle) { + return `${endpoint.protocol}//${endpoint.hostname}${optionalPort}/${locationBucket}/${locationKey}`; + } + if (endpointHostnameIncludesBucket) { + return `${endpoint.protocol}//${endpoint.hostname}${optionalPort}/${locationKey}`; + } + return `${endpoint.protocol}//${locationBucket}.${endpoint.hostname}${optionalPort}/${locationKey}`; + })(); + this.singleUploadResult = { + ...putResult, + Bucket: this.params.Bucket, + Key: this.params.Key, + Location + }; + const totalSize = byteLength(dataPart.data); + this.__notifyProgress({ + loaded: totalSize, + total: totalSize, + part: 1, + Key: this.params.Key, + Bucket: this.params.Bucket + }); + } + async __createMultipartUpload() { + const requestChecksumCalculation = await this.client.config.requestChecksumCalculation(); + if (!this.createMultiPartPromise) { + const createCommandParams = { ...this.params, Body: undefined }; + if (requestChecksumCalculation === "WHEN_SUPPORTED") { + createCommandParams.ChecksumAlgorithm = this.params.ChecksumAlgorithm || ChecksumAlgorithm.CRC32; + } + this.createMultiPartPromise = this.client.send(new CreateMultipartUploadCommand(createCommandParams)).then((createMpuResponse) => { + this.abortMultipartUploadCommand = new AbortMultipartUploadCommand({ + Bucket: this.params.Bucket, + Key: this.params.Key, + UploadId: createMpuResponse.UploadId + }); + return createMpuResponse; + }); + } + return this.createMultiPartPromise; + } + async __doConcurrentUpload(dataFeeder) { + for await (const dataPart of dataFeeder) { + if (this.uploadEnqueuedPartsCount > this.MAX_PARTS) { + throw new Error(`Exceeded ${this.MAX_PARTS} parts in multipart upload to Bucket: ${this.params.Bucket} Key: ${this.params.Key}.`); + } + if (this.abortController.signal.aborted) { + return; + } + if (dataPart.partNumber === 1 && dataPart.lastPart) { + return await this.__uploadUsingPut(dataPart); + } + if (!this.uploadId) { + const { UploadId } = await this.__createMultipartUpload(); + this.uploadId = UploadId; + if (this.abortController.signal.aborted) { + return; + } + } + const partSize = byteLength(dataPart.data) || 0; + const requestHandler = this.client.config.requestHandler; + const eventEmitter = requestHandler instanceof EventEmitter ? requestHandler : null; + let lastSeenBytes = 0; + const uploadEventListener = (event, request) => { + const requestPartSize = Number(request.query["partNumber"]) || -1; + if (requestPartSize !== dataPart.partNumber) { + return; + } + if (event.total && partSize) { + this.bytesUploadedSoFar += event.loaded - lastSeenBytes; + lastSeenBytes = event.loaded; + } + this.__notifyProgress({ + loaded: this.bytesUploadedSoFar, + total: this.totalBytes, + part: dataPart.partNumber, + Key: this.params.Key, + Bucket: this.params.Bucket + }); + }; + if (eventEmitter !== null) { + eventEmitter.on("xhr.upload.progress", uploadEventListener); + } + this.uploadEnqueuedPartsCount += 1; + this.__validateUploadPart(dataPart); + const partResult = await this.client.send(new UploadPartCommand({ + ...this.params, + ContentLength: undefined, + UploadId: this.uploadId, + Body: dataPart.data, + PartNumber: dataPart.partNumber + })); + if (eventEmitter !== null) { + eventEmitter.off("xhr.upload.progress", uploadEventListener); + } + if (this.abortController.signal.aborted) { + return; + } + if (!partResult.ETag) { + throw new Error(`Part ${dataPart.partNumber} is missing ETag in UploadPart response. Missing Bucket CORS configuration for ETag header?`); + } + this.uploadedParts.push({ + PartNumber: dataPart.partNumber, + ETag: partResult.ETag, + ...partResult.ChecksumCRC32 && { ChecksumCRC32: partResult.ChecksumCRC32 }, + ...partResult.ChecksumCRC32C && { ChecksumCRC32C: partResult.ChecksumCRC32C }, + ...partResult.ChecksumSHA1 && { ChecksumSHA1: partResult.ChecksumSHA1 }, + ...partResult.ChecksumSHA256 && { ChecksumSHA256: partResult.ChecksumSHA256 } + }); + if (eventEmitter === null) { + this.bytesUploadedSoFar += partSize; + } + this.__notifyProgress({ + loaded: this.bytesUploadedSoFar, + total: this.totalBytes, + part: dataPart.partNumber, + Key: this.params.Key, + Bucket: this.params.Bucket + }); + } + } + async __doMultipartUpload() { + const dataFeeder = getChunk(this.params.Body, this.partSize); + const concurrentUploaderFailures = []; + for (let index = 0;index < this.queueSize; index++) { + const currentUpload = this.__doConcurrentUpload(dataFeeder).catch((err) => { + concurrentUploaderFailures.push(err); + }); + this.concurrentUploaders.push(currentUpload); + } + await Promise.all(this.concurrentUploaders); + if (concurrentUploaderFailures.length >= 1) { + await this.markUploadAsAborted(); + throw concurrentUploaderFailures[0]; + } + if (this.abortController.signal.aborted) { + await this.markUploadAsAborted(); + throw Object.assign(new Error("Upload aborted."), { name: "AbortError" }); + } + let result; + if (this.isMultiPart) { + const { expectedPartsCount, uploadedParts, totalBytes, totalBytesSource } = this; + if (totalBytes !== undefined && expectedPartsCount !== undefined && uploadedParts.length !== expectedPartsCount) { + throw new Error(`Expected ${expectedPartsCount} part(s) but uploaded ${uploadedParts.length} part(s). +The expected part count is based on the byte-count of the input.params.Body, +which was read from ${totalBytesSource} and is ${totalBytes}. +If this is not correct, provide an override value by setting a number +to input.params.ContentLength in bytes. +`); + } + this.uploadedParts.sort((a, b) => a.PartNumber - b.PartNumber); + const uploadCompleteParams = { + ...this.params, + Body: undefined, + UploadId: this.uploadId, + MultipartUpload: { + Parts: this.uploadedParts + } + }; + result = await this.client.send(new CompleteMultipartUploadCommand(uploadCompleteParams)); + if (typeof result?.Location === "string" && result.Location.includes("%2F")) { + result.Location = result.Location.replace(/%2F/g, "/"); + } + } else { + result = this.singleUploadResult; + } + this.abortMultipartUploadCommand = null; + if (this.tags.length) { + await this.client.send(new PutObjectTaggingCommand({ + ...this.params, + Tagging: { + TagSet: this.tags + } + })); + } + return result; + } + async markUploadAsAborted() { + if (this.uploadId && !this.leavePartsOnError && this.abortMultipartUploadCommand !== null) { + await this.client.send(this.abortMultipartUploadCommand); + this.abortMultipartUploadCommand = null; + } + } + __notifyProgress(progress) { + if (this.uploadEvent) { + this.emit(this.uploadEvent, progress); + } + } + async __abortTimeout(abortSignal) { + return new Promise((resolve, reject) => { + abortSignal.onabort = () => { + const abortError = new Error("Upload aborted."); + abortError.name = "AbortError"; + reject(abortError); + }; + }); + } + __validateUploadPart(dataPart) { + const actualPartSize = byteLength(dataPart.data); + if (actualPartSize === undefined) { + throw new Error(`A dataPart was generated without a measurable data chunk size for part number ${dataPart.partNumber}`); + } + if (dataPart.partNumber === 1 && dataPart.lastPart) { + return; + } + if (!dataPart.lastPart && actualPartSize !== this.partSize) { + throw new Error(`The byte size for part number ${dataPart.partNumber}, size ${actualPartSize} does not match expected size ${this.partSize}`); + } + } + __validateInput() { + if (!this.client) { + throw new Error(`InputError: Upload requires a AWS client to do uploads with.`); + } + if (this.partSize < Upload.MIN_PART_SIZE) { + throw new Error(`EntityTooSmall: Your proposed upload part size [${this.partSize}] is smaller than the minimum allowed size [${Upload.MIN_PART_SIZE}] (5MB)`); + } + if (this.queueSize < 1) { + throw new Error(`Queue size: Must have at least one uploading queue.`); + } + } +} +var $Upload = Upload; + +// lib/aws.ts +var usesCustomEndpoint = () => (process.env["AWS_ENDPOINT_URL_S3"] ?? process.env["AWS_ENDPOINT_URL"] ?? "") !== ""; +var s3 = () => new import_client_s3.S3Client({ forcePathStyle: usesCustomEndpoint() }); +async function putObject(request) { + const upload = new $Upload({ + client: s3(), + params: { Bucket: request.bucket, Key: request.key, Body: request.body } + }); + const result = await upload.done(); + return result.VersionId; +} +async function putParameter(name, value) { + await new $SSMClient({}).send(new $PutParameterCommand({ Name: name, Value: value, Type: "String", Overwrite: true })); +} + +// lib/result.ts +var ok = (value) => ({ ok: true, value }); +var err = (error) => ({ ok: false, error }); + +// trigger-deployment-pipeline/src/trigger.ts +var TRIGGER_TYPES = ["cdk-source", "cloud-assembly", "artifact"]; +var ARTIFACT_PARAMETER_NAMESPACE = "/liflig-cdk/default/pipeline-variables"; +var words = (value) => value.split(/\s+/).filter(Boolean); +function parseArtifactParameter(word) { + const fields = word.split("="); + return fields.length === 1 ? { name: word, value: word } : { name: fields[0], value: fields[1] }; +} +function parseInputs(raw, fileExists) { + if (raw.bucket.trim() === "") + return err("Parameter 'aws-s3-bucket-name' is empty"); + if (raw.pipelines.trim() === "") + return err("Parameter 'pipelines' is empty"); + if (raw.triggerType.trim() === "") + return err("Parameter 'trigger-type' is empty"); + const triggerType = TRIGGER_TYPES.find((type) => type === raw.triggerType); + if (triggerType === undefined) { + return err(`Parameter 'trigger-type' must be one of ${TRIGGER_TYPES.map((t) => `'${t}'`).join(", ")}, got '${raw.triggerType}'`); + } + let metadataFile; + if (triggerType === "cdk-source") { + if (raw.cdkSourceMetadataFile === "") { + return err("Parameter 'cdk-source-metadata-file' must be set when parameter 'trigger-type' is 'cdk-source'"); + } + if (!fileExists(raw.cdkSourceMetadataFile)) { + return err(`File '${raw.cdkSourceMetadataFile}' describing the CDK source does not exist`); + } + metadataFile = raw.cdkSourceMetadataFile; + } + if (triggerType === "cloud-assembly") { + if (raw.cloudAssemblyMetadataFile === "") { + return err("Parameter 'cloud-assembly-metadata-file' must be set when parameter 'trigger-type' is 'cloud-assembly'"); + } + if (!fileExists(raw.cloudAssemblyMetadataFile)) { + return err(`File '${raw.cloudAssemblyMetadataFile}' describing the Cloud Assembly does not exist`); + } + metadataFile = raw.cloudAssemblyMetadataFile; + } + if (triggerType === "artifact" && raw.artifactParameters.trim() === "") { + return err("Parameter 'artifact-parameters' must be set when parameter 'trigger-type' is 'artifact'"); + } + return ok({ + bucket: raw.bucket, + pipelines: words(raw.pipelines), + triggerType, + metadataFile, + artifactParameters: triggerType === "artifact" ? words(raw.artifactParameters).map(parseArtifactParameter) : [] + }); +} +var branchFromRef = (ref) => ref.startsWith("refs/heads/") ? ref.slice("refs/heads/".length) : ref; +function splitRepository(repository) { + const slash = repository.indexOf("/"); + return slash === -1 ? { owner: repository, name: repository } : { owner: repository.slice(0, slash), name: repository.slice(slash + 1) }; +} +function repositoryFromRemote(remote) { + const match = /github\.com[/:](.*)\/(.*?)(\.git)?$/.exec(remote.trim()); + return match ? { owner: match[1], name: match[2] } : undefined; +} +var utcSeconds = (now) => `${now.toISOString().slice(0, 19)}Z`; +var looksLikeDate = (value) => /^[0-9]{4,}-/.test(value); +function buildTrigger(context) { + return `${JSON.stringify({ + version: "0.1", + ci: { + type: context.type, + triggeredBy: context.triggeredBy, + startTime: context.startTime, + stopTime: context.stopTime + }, + vcs: { + commitAuthor: context.commitAuthor, + branchName: context.branchName, + commitHash: context.commitHash, + repositoryName: context.repositoryName, + repositoryOwner: context.repositoryOwner + } + }, null, 2)} +`; +} +var METADATA_FILENAME = { + "cdk-source": "cdk-source.json", + "cloud-assembly": "cloud-assembly.json", + artifact: undefined +}; +var pipelinePrefix = (pipeline) => `pipelines/${pipeline}`; +var metadataKey = (pipeline, triggerType) => { + const filename = METADATA_FILENAME[triggerType]; + return filename === undefined ? undefined : `${pipelinePrefix(pipeline)}/${filename}`; +}; +var triggerKey = (pipeline) => `${pipelinePrefix(pipeline)}/trigger`; + +// trigger-deployment-pipeline/src/main.ts +var INPUT_NAMES = [ + "github-token", + "pipelines", + "aws-s3-bucket-name", + "trigger-type", + "cdk-source-metadata-file", + "cloud-assembly-metadata-file", + "artifact-parameters" +]; +var inActions = runningInActions(); +var fromEnvironment = () => Object.fromEntries(INPUT_NAMES.map((name) => { + const upper = name.toUpperCase(); + return [ + name, + process.env[`INPUT_${upper}`] ?? process.env[`INPUT_${upper.replace(/-/g, "_")}`] ?? "" + ]; +})); +function fromArgv() { + try { + const { values } = parseArgs({ + options: Object.fromEntries(INPUT_NAMES.map((name) => [name, { type: "string", default: "" }])) + }); + return values; + } catch (cause) { + fail(cause instanceof Error ? cause.message : String(cause)); + } +} +var git = (...args) => execFileSync("git", args, { encoding: "utf8" }).trim(); +var describe = (cause) => cause instanceof Error ? cause.message : String(cause); +async function runStartedAt(repository, runId, token) { + const apiUrl = process.env["GITHUB_API_URL"] ?? "https://api.github.com"; + let response; + try { + response = await fetch(`${apiUrl}/repos/${repository}/actions/runs/${runId}`, { + headers: { + Accept: "application/vnd.github+json", + Authorization: `Bearer ${token}`, + "X-GitHub-Api-Version": "2022-11-28" + } + }); + } catch (cause) { + fail(`Failed to fetch timing information for the current GitHub Actions workflow run: ${describe(cause)}`); + } + if (!response.ok) { + fail(`Failed to fetch timing information for the current GitHub Actions workflow run: ${response.status} ${response.statusText}`); + } + let createdAt; + try { + createdAt = (await response.json()).created_at; + } catch (cause) { + fail(`The workflow run could not be read: ${describe(cause)}`); + } + if (typeof createdAt !== "string" || !looksLikeDate(createdAt)) { + fail(`The workflow run reported no usable start time: ${JSON.stringify(createdAt)}`); + } + return createdAt; +} +async function contextFromActions(token) { + const repository = requireEnv("GITHUB_REPOSITORY"); + const { owner, name } = splitRepository(repository); + const startTime = await runStartedAt(repository, requireEnv("GITHUB_RUN_ID"), token); + return { + type: "GITHUB_ACTIONS", + triggeredBy: requireEnv("GITHUB_ACTOR"), + startTime, + stopTime: utcSeconds(new Date), + commitAuthor: git("show", "-s", "--format=%an"), + branchName: branchFromRef(requireEnv("GITHUB_REF")), + commitHash: requireEnv("GITHUB_SHA"), + repositoryName: name, + repositoryOwner: owner + }; +} +function contextFromGit() { + const remote = repositoryFromRemote(git("config", "--get", "remote.origin.url")); + return { + type: "LOCAL", + triggeredBy: `${userInfo().username}@${hostname()}`, + startTime: "", + stopTime: "", + commitAuthor: git("show", "-s", "--format=%an"), + branchName: git("rev-parse", "--abbrev-ref", "HEAD"), + commitHash: git("show", "-s", "--format=%H"), + repositoryName: remote?.name ?? "", + repositoryOwner: remote?.owner ?? "" + }; +} +var raw = inActions ? fromEnvironment() : fromArgv(); +var parsed = parseInputs({ + bucket: raw["aws-s3-bucket-name"] ?? "", + pipelines: raw["pipelines"] ?? "", + triggerType: raw["trigger-type"] ?? "", + cdkSourceMetadataFile: raw["cdk-source-metadata-file"] ?? "", + cloudAssemblyMetadataFile: raw["cloud-assembly-metadata-file"] ?? "", + artifactParameters: raw["artifact-parameters"] ?? "" +}, existsSync); +if (!parsed.ok) + fail(parsed.error); +var inputs = parsed.value; +var context; +try { + context = inActions ? await contextFromActions(raw["github-token"] ?? "") : contextFromGit(); +} catch (cause) { + fail(`Failed to read the commit being deployed: ${describe(cause)}`); +} +var trigger = new TextEncoder().encode(buildTrigger(context)); +process.stdout.write(`Triggering ${inputs.pipelines.length} pipeline(s) for ${context.commitHash} on ${context.branchName} (${inputs.triggerType}) +`); +for (const parameter of inputs.artifactParameters) { + const name = `${ARTIFACT_PARAMETER_NAMESPACE}/${parameter.name}`; + try { + await putParameter(name, parameter.value); + } catch (cause) { + fail(`Failed to write parameter '${name}': ${describe(cause)}`); + } + process.stdout.write(`Set ${name} +`); +} +var metadata = inputs.metadataFile === undefined ? undefined : new Uint8Array(readFileSync(inputs.metadataFile)); +for (const pipeline of inputs.pipelines) { + const key = metadataKey(pipeline, inputs.triggerType); + try { + if (key !== undefined && metadata !== undefined) { + await putObject({ bucket: inputs.bucket, key, body: metadata }); + } + await putObject({ bucket: inputs.bucket, key: triggerKey(pipeline), body: trigger }); + } catch (cause) { + fail(`Failed to trigger pipeline '${pipeline}': ${describe(cause)}`); + } + process.stdout.write(`Triggered pipeline '${pipeline}' +`); +} diff --git a/trigger-deployment-pipeline/src/main.ts b/trigger-deployment-pipeline/src/main.ts new file mode 100644 index 0000000..a949be4 --- /dev/null +++ b/trigger-deployment-pipeline/src/main.ts @@ -0,0 +1,192 @@ +import { execFileSync } from "node:child_process" +import { existsSync, readFileSync } from "node:fs" +import { hostname, userInfo } from "node:os" +import { parseArgs } from "node:util" + +import { fail, requireEnv, runningInActions } from "../../lib/actions.ts" +import { putObject, putParameter } from "../../lib/aws.ts" +import { + ARTIFACT_PARAMETER_NAMESPACE, + type TriggerContext, + branchFromRef, + buildTrigger, + looksLikeDate, + metadataKey, + parseInputs, + repositoryFromRemote, + splitRepository, + triggerKey, + utcSeconds, +} from "./trigger.ts" + +const INPUT_NAMES = [ + "github-token", + "pipelines", + "aws-s3-bucket-name", + "trigger-type", + "cdk-source-metadata-file", + "cloud-assembly-metadata-file", + "artifact-parameters", +] as const + +const inActions = runningInActions() + +const fromEnvironment = (): Record => + Object.fromEntries( + INPUT_NAMES.map((name) => { + const upper = name.toUpperCase() + return [ + name, + process.env[`INPUT_${upper}`] ?? + process.env[`INPUT_${upper.replace(/-/g, "_")}`] ?? + "", + ] + }), + ) + +function fromArgv(): Record { + try { + const { values } = parseArgs({ + options: Object.fromEntries( + INPUT_NAMES.map((name) => [name, { type: "string", default: "" }]), + ), + }) + return values as Record + } catch (cause) { + fail(cause instanceof Error ? cause.message : String(cause)) + } +} + +const git = (...args: string[]): string => + execFileSync("git", args, { encoding: "utf8" }).trim() + +const describe = (cause: unknown): string => + cause instanceof Error ? cause.message : String(cause) + +/** When the workflow run started, which the trigger reports as its start. */ +async function runStartedAt(repository: string, runId: string, token: string): Promise { + const apiUrl = process.env["GITHUB_API_URL"] ?? "https://api.github.com" + let response: Response + try { + response = await fetch(`${apiUrl}/repos/${repository}/actions/runs/${runId}`, { + headers: { + Accept: "application/vnd.github+json", + Authorization: `Bearer ${token}`, + "X-GitHub-Api-Version": "2022-11-28", + }, + }) + } catch (cause) { + fail( + `Failed to fetch timing information for the current GitHub Actions workflow run: ${describe(cause)}`, + ) + } + if (!response.ok) { + fail( + `Failed to fetch timing information for the current GitHub Actions workflow run: ${response.status} ${response.statusText}`, + ) + } + let createdAt: unknown + try { + createdAt = ((await response.json()) as { created_at?: unknown }).created_at + } catch (cause) { + fail(`The workflow run could not be read: ${describe(cause)}`) + } + if (typeof createdAt !== "string" || !looksLikeDate(createdAt)) { + fail(`The workflow run reported no usable start time: ${JSON.stringify(createdAt)}`) + } + return createdAt +} + +async function contextFromActions(token: string): Promise { + const repository = requireEnv("GITHUB_REPOSITORY") + const { owner, name } = splitRepository(repository) + const startTime = await runStartedAt(repository, requireEnv("GITHUB_RUN_ID"), token) + return { + type: "GITHUB_ACTIONS", + triggeredBy: requireEnv("GITHUB_ACTOR"), + startTime, + // One trigger file serves every pipeline, so this is stamped once, before + // any of them is started. + stopTime: utcSeconds(new Date()), + commitAuthor: git("show", "-s", "--format=%an"), + branchName: branchFromRef(requireEnv("GITHUB_REF")), + commitHash: requireEnv("GITHUB_SHA"), + repositoryName: name, + repositoryOwner: owner, + } +} + +function contextFromGit(): TriggerContext { + const remote = repositoryFromRemote(git("config", "--get", "remote.origin.url")) + return { + type: "LOCAL", + triggeredBy: `${userInfo().username}@${hostname()}`, + startTime: "", + stopTime: "", + commitAuthor: git("show", "-s", "--format=%an"), + branchName: git("rev-parse", "--abbrev-ref", "HEAD"), + commitHash: git("show", "-s", "--format=%H"), + repositoryName: remote?.name ?? "", + repositoryOwner: remote?.owner ?? "", + } +} + +const raw = inActions ? fromEnvironment() : fromArgv() + +const parsed = parseInputs( + { + bucket: raw["aws-s3-bucket-name"] ?? "", + pipelines: raw["pipelines"] ?? "", + triggerType: raw["trigger-type"] ?? "", + cdkSourceMetadataFile: raw["cdk-source-metadata-file"] ?? "", + cloudAssemblyMetadataFile: raw["cloud-assembly-metadata-file"] ?? "", + artifactParameters: raw["artifact-parameters"] ?? "", + }, + existsSync, +) +if (!parsed.ok) fail(parsed.error) +const inputs = parsed.value + +let context: TriggerContext +try { + context = inActions ? await contextFromActions(raw["github-token"] ?? "") : contextFromGit() +} catch (cause) { + fail(`Failed to read the commit being deployed: ${describe(cause)}`) +} +const trigger = new TextEncoder().encode(buildTrigger(context)) +// The file also names the commit author and whoever started the run, which the +// log has no need to repeat. +process.stdout.write( + `Triggering ${inputs.pipelines.length} pipeline(s) for ${context.commitHash} on ${context.branchName} (${inputs.triggerType})\n`, +) + +// Parameters go first: a pipeline started by its trigger reads them at once. +for (const parameter of inputs.artifactParameters) { + const name = `${ARTIFACT_PARAMETER_NAMESPACE}/${parameter.name}` + try { + await putParameter(name, parameter.value) + } catch (cause) { + fail(`Failed to write parameter '${name}': ${describe(cause)}`) + } + process.stdout.write(`Set ${name}\n`) +} + +const metadata = + inputs.metadataFile === undefined + ? undefined + : new Uint8Array(readFileSync(inputs.metadataFile)) + +// Sequential on purpose: each pipeline's metadata has to be in place before the +// trigger that starts it, and the upload of a trigger is what starts it. +for (const pipeline of inputs.pipelines) { + const key = metadataKey(pipeline, inputs.triggerType) + try { + if (key !== undefined && metadata !== undefined) { + await putObject({ bucket: inputs.bucket, key, body: metadata }) + } + await putObject({ bucket: inputs.bucket, key: triggerKey(pipeline), body: trigger }) + } catch (cause) { + fail(`Failed to trigger pipeline '${pipeline}': ${describe(cause)}`) + } + process.stdout.write(`Triggered pipeline '${pipeline}'\n`) +} diff --git a/trigger-deployment-pipeline/src/trigger.test.ts b/trigger-deployment-pipeline/src/trigger.test.ts new file mode 100644 index 0000000..36c60ac --- /dev/null +++ b/trigger-deployment-pipeline/src/trigger.test.ts @@ -0,0 +1,226 @@ +import { describe, expect, test } from "bun:test" + +import { + type RawInputs, + branchFromRef, + buildTrigger, + looksLikeDate, + metadataKey, + parseArtifactParameter, + parseInputs, + repositoryFromRemote, + splitRepository, + triggerKey, + utcSeconds, +} from "./trigger.ts" + +const raw = (overrides: Partial = {}): RawInputs => ({ + bucket: "artifacts", + pipelines: "apps-dev core-dev", + triggerType: "artifact", + cdkSourceMetadataFile: "", + cloudAssemblyMetadataFile: "", + artifactParameters: "devTag=abc", + ...overrides, +}) + +const exists = (present: string[]) => (path: string) => present.includes(path) + +const error = (result: ReturnType): string => { + if (result.ok) throw new Error("expected an error, got inputs") + return result.error +} + +describe("an artifact parameter", () => { + test("splits into a name and a value at the first =", () => { + expect(parseArtifactParameter("devTag=abc")).toEqual({ name: "devTag", value: "abc" }) + }) + + test("drops everything after a second =, as cut -f2 did", () => { + expect(parseArtifactParameter("key=a=b")).toEqual({ name: "key", value: "a" }) + }) + + test("is its own value when it has no =, as cut prints such a line whole", () => { + expect(parseArtifactParameter("lonely")).toEqual({ name: "lonely", value: "lonely" }) + }) + + test("can have an empty value", () => { + expect(parseArtifactParameter("empty=")).toEqual({ name: "empty", value: "" }) + }) +}) + +describe("inputs are accepted", () => { + test("for an artifact trigger, splitting both space-separated lists", () => { + const result = parseInputs(raw({ artifactParameters: "a=1 b=2" }), exists([])) + expect(result.ok && result.value.pipelines).toEqual(["apps-dev", "core-dev"]) + expect(result.ok && result.value.artifactParameters).toEqual([ + { name: "a", value: "1" }, + { name: "b", value: "2" }, + ]) + }) + + test("for a cdk-source trigger whose metadata file exists", () => { + const result = parseInputs( + raw({ triggerType: "cdk-source", cdkSourceMetadataFile: "/m.json" }), + exists(["/m.json"]), + ) + expect(result.ok && result.value.metadataFile).toBe("/m.json") + }) + + test("without setting any parameters when the trigger is not an artifact", () => { + const result = parseInputs( + raw({ triggerType: "cloud-assembly", cloudAssemblyMetadataFile: "/c.json" }), + exists(["/c.json"]), + ) + expect(result.ok && result.value.artifactParameters).toEqual([]) + }) +}) + +describe("inputs are rejected", () => { + test("when a required parameter is empty", () => { + expect(error(parseInputs(raw({ bucket: "" }), exists([])))).toBe( + "Parameter 'aws-s3-bucket-name' is empty", + ) + expect(error(parseInputs(raw({ pipelines: "" }), exists([])))).toBe( + "Parameter 'pipelines' is empty", + ) + expect(error(parseInputs(raw({ triggerType: "" }), exists([])))).toBe( + "Parameter 'trigger-type' is empty", + ) + }) + + test("when a required parameter is only whitespace, which names nothing", () => { + // It would otherwise pass, trigger no pipeline at all, and report success. + expect(error(parseInputs(raw({ pipelines: " " }), exists([])))).toBe( + "Parameter 'pipelines' is empty", + ) + expect(error(parseInputs(raw({ bucket: " " }), exists([])))).toBe( + "Parameter 'aws-s3-bucket-name' is empty", + ) + expect( + error(parseInputs(raw({ artifactParameters: " " }), exists([]))), + ).toContain("'artifact-parameters' must be set") + }) + + test("when the trigger type is not one the pipelines understand", () => { + expect(error(parseInputs(raw({ triggerType: "artefact" }), exists([])))).toContain( + "must be one of", + ) + }) + + test("when a cdk-source trigger names no metadata file", () => { + expect(error(parseInputs(raw({ triggerType: "cdk-source" }), exists([])))).toBe( + "Parameter 'cdk-source-metadata-file' must be set when parameter 'trigger-type' is 'cdk-source'", + ) + }) + + test("when the metadata file does not exist", () => { + expect( + error( + parseInputs( + raw({ triggerType: "cloud-assembly", cloudAssemblyMetadataFile: "/gone.json" }), + exists([]), + ), + ), + ).toBe("File '/gone.json' describing the Cloud Assembly does not exist") + }) + + test("when an artifact trigger carries no parameters", () => { + expect(error(parseInputs(raw({ artifactParameters: "" }), exists([])))).toBe( + "Parameter 'artifact-parameters' must be set when parameter 'trigger-type' is 'artifact'", + ) + }) +}) + +describe("the commit being deployed", () => { + test("is named by branch, with refs/heads/ stripped", () => { + expect(branchFromRef("refs/heads/main")).toBe("main") + }) + + test("keeps any other kind of ref as it is", () => { + expect(branchFromRef("refs/tags/v1")).toBe("refs/tags/v1") + expect(branchFromRef("refs/pull/7/merge")).toBe("refs/pull/7/merge") + }) + + test("belongs to the owner before the first slash of the repository", () => { + expect(splitRepository("an-org/my-repo")).toEqual({ owner: "an-org", name: "my-repo" }) + }) + + test("is found from either form of GitHub remote, without its .git suffix", () => { + for (const remote of [ + "git@github.com:an-org/my-repo.git", + "https://github.com/an-org/my-repo.git", + "https://github.com/an-org/my-repo", + ]) { + expect(repositoryFromRemote(remote)).toEqual({ owner: "an-org", name: "my-repo" }) + } + }) +}) + +describe("times in the trigger", () => { + test("are whole UTC seconds, as date -u printed them", () => { + expect(utcSeconds(new Date("2026-09-11T10:20:30.456Z"))).toBe("2026-09-11T10:20:30Z") + }) + + test("are accepted from the API only when they look like a date", () => { + expect(looksLikeDate("2026-09-11T10:00:00Z")).toBe(true) + expect(looksLikeDate("null")).toBe(false) + expect(looksLikeDate("")).toBe(false) + }) +}) + +describe("the trigger file", () => { + const context = { + type: "GITHUB_ACTIONS" as const, + triggeredBy: "someone", + startTime: "2026-09-11T10:00:00Z", + stopTime: "2026-09-11T10:05:00Z", + commitAuthor: "Some One", + branchName: "main", + commitHash: "abc123", + repositoryName: "my-repo", + repositoryOwner: "an-org", + } + + test("has the version the notification handler gates on", () => { + expect(JSON.parse(buildTrigger(context)).version).toBe("0.1") + }) + + test("carries every field the handler reads, where it reads it", () => { + expect(JSON.parse(buildTrigger(context))).toEqual({ + version: "0.1", + ci: { + type: "GITHUB_ACTIONS", + triggeredBy: "someone", + startTime: "2026-09-11T10:00:00Z", + stopTime: "2026-09-11T10:05:00Z", + }, + vcs: { + commitAuthor: "Some One", + branchName: "main", + commitHash: "abc123", + repositoryName: "my-repo", + repositoryOwner: "an-org", + }, + }) + }) + + test("stays valid JSON when a name contains a quote", () => { + // The shell built this with a heredoc, so a quote here broke the file. + expect(() => JSON.parse(buildTrigger({ ...context, commitAuthor: 'Ann "Nan" O' }))).not.toThrow() + }) +}) + +describe("S3 keys", () => { + test("put the trigger and its metadata under the pipeline's prefix", () => { + expect(triggerKey("apps-dev")).toBe("pipelines/apps-dev/trigger") + expect(metadataKey("apps-dev", "cdk-source")).toBe("pipelines/apps-dev/cdk-source.json") + expect(metadataKey("apps-dev", "cloud-assembly")).toBe( + "pipelines/apps-dev/cloud-assembly.json", + ) + }) + + test("upload no metadata for an artifact trigger", () => { + expect(metadataKey("apps-dev", "artifact")).toBeUndefined() + }) +}) diff --git a/trigger-deployment-pipeline/src/trigger.ts b/trigger-deployment-pipeline/src/trigger.ts new file mode 100644 index 0000000..30a484d --- /dev/null +++ b/trigger-deployment-pipeline/src/trigger.ts @@ -0,0 +1,199 @@ +import { type Result, err, ok } from "../../lib/result.ts" + +export const TRIGGER_TYPES = ["cdk-source", "cloud-assembly", "artifact"] as const +export type TriggerType = (typeof TRIGGER_TYPES)[number] + +/** Where the pipeline reads the variables an artifact trigger sets. */ +export const ARTIFACT_PARAMETER_NAMESPACE = "/liflig-cdk/default/pipeline-variables" + +export interface RawInputs { + readonly bucket: string + readonly pipelines: string + readonly triggerType: string + readonly cdkSourceMetadataFile: string + readonly cloudAssemblyMetadataFile: string + readonly artifactParameters: string +} + +export interface Inputs { + readonly bucket: string + readonly pipelines: readonly string[] + readonly triggerType: TriggerType + /** The metadata file uploaded beside each trigger, when the type has one. */ + readonly metadataFile: string | undefined + readonly artifactParameters: readonly ArtifactParameter[] +} + +export interface ArtifactParameter { + readonly name: string + readonly value: string +} + +/** Space-separated, as the inputs are written; runs of whitespace are one gap. */ +const words = (value: string): string[] => value.split(/\s+/).filter(Boolean) + +/** + * Splits `name=value` the way `cut -d= -f1` and `cut -d= -f2` did, which is + * narrower than it looks: a value containing `=` is cut at its first `=`, and a + * word with no `=` at all yields the whole word as both name and value, since + * `cut` prints a line without the delimiter unchanged. + */ +export function parseArtifactParameter(word: string): ArtifactParameter { + const fields = word.split("=") + return fields.length === 1 + ? { name: word, value: word } + : { name: fields[0] as string, value: fields[1] as string } +} + +export function parseInputs( + raw: RawInputs, + fileExists: (path: string) => boolean, +): Result { + // Trimmed, because a value that is only whitespace names no pipeline at all: + // it would otherwise pass here, trigger nothing, and report success. + if (raw.bucket.trim() === "") return err("Parameter 'aws-s3-bucket-name' is empty") + if (raw.pipelines.trim() === "") return err("Parameter 'pipelines' is empty") + if (raw.triggerType.trim() === "") return err("Parameter 'trigger-type' is empty") + + const triggerType = TRIGGER_TYPES.find((type) => type === raw.triggerType) + if (triggerType === undefined) { + return err( + `Parameter 'trigger-type' must be one of ${TRIGGER_TYPES.map((t) => `'${t}'`).join(", ")}, got '${raw.triggerType}'`, + ) + } + + let metadataFile: string | undefined + if (triggerType === "cdk-source") { + if (raw.cdkSourceMetadataFile === "") { + return err( + "Parameter 'cdk-source-metadata-file' must be set when parameter 'trigger-type' is 'cdk-source'", + ) + } + if (!fileExists(raw.cdkSourceMetadataFile)) { + return err( + `File '${raw.cdkSourceMetadataFile}' describing the CDK source does not exist`, + ) + } + metadataFile = raw.cdkSourceMetadataFile + } + if (triggerType === "cloud-assembly") { + if (raw.cloudAssemblyMetadataFile === "") { + return err( + "Parameter 'cloud-assembly-metadata-file' must be set when parameter 'trigger-type' is 'cloud-assembly'", + ) + } + if (!fileExists(raw.cloudAssemblyMetadataFile)) { + return err( + `File '${raw.cloudAssemblyMetadataFile}' describing the Cloud Assembly does not exist`, + ) + } + metadataFile = raw.cloudAssemblyMetadataFile + } + if (triggerType === "artifact" && raw.artifactParameters.trim() === "") { + return err( + "Parameter 'artifact-parameters' must be set when parameter 'trigger-type' is 'artifact'", + ) + } + + return ok({ + bucket: raw.bucket, + pipelines: words(raw.pipelines), + triggerType, + metadataFile, + artifactParameters: + triggerType === "artifact" + ? words(raw.artifactParameters).map(parseArtifactParameter) + : [], + }) +} + +/** `refs/heads/` is stripped; any other ref, a tag or a pull request, is kept. */ +export const branchFromRef = (ref: string): string => + ref.startsWith("refs/heads/") ? ref.slice("refs/heads/".length) : ref + +/** `owner/name`, where the name may itself contain slashes. */ +export function splitRepository(repository: string): { + owner: string + name: string +} { + const slash = repository.indexOf("/") + return slash === -1 + ? { owner: repository, name: repository } + : { owner: repository.slice(0, slash), name: repository.slice(slash + 1) } +} + +/** Owner and name from a GitHub remote, in either its SSH or its HTTPS form. */ +export function repositoryFromRemote( + remote: string, +): { owner: string; name: string } | undefined { + const match = /github\.com[/:](.*)\/(.*?)(\.git)?$/.exec(remote.trim()) + return match ? { owner: match[1] as string, name: match[2] as string } : undefined +} + +/** + * `date -u +'%Y-%m-%dT%H:%M:%SZ'`: whole seconds, which is what the consumers + * of the trigger file have always been given. + */ +export const utcSeconds = (now: Date): string => + `${now.toISOString().slice(0, 19)}Z` + +/** A deliberately loose check that what the API returned looks like a date. */ +export const looksLikeDate = (value: string): boolean => /^[0-9]{4,}-/.test(value) + +export interface TriggerContext { + readonly type: "GITHUB_ACTIONS" | "LOCAL" + readonly triggeredBy: string + readonly startTime: string + readonly stopTime: string + readonly commitAuthor: string + readonly branchName: string + readonly commitHash: string + readonly repositoryName: string + readonly repositoryOwner: string +} + +/** + * The file whose upload starts a pipeline. A deployed notification handler + * parses it and gates on `version`, so its shape is a contract, not a detail. + */ +export function buildTrigger(context: TriggerContext): string { + return `${JSON.stringify( + { + version: "0.1", + ci: { + type: context.type, + triggeredBy: context.triggeredBy, + startTime: context.startTime, + stopTime: context.stopTime, + }, + vcs: { + commitAuthor: context.commitAuthor, + branchName: context.branchName, + commitHash: context.commitHash, + repositoryName: context.repositoryName, + repositoryOwner: context.repositoryOwner, + }, + }, + null, + 2, + )}\n` +} + +const METADATA_FILENAME: Record = { + "cdk-source": "cdk-source.json", + "cloud-assembly": "cloud-assembly.json", + artifact: undefined, +} + +export const pipelinePrefix = (pipeline: string): string => `pipelines/${pipeline}` + +export const metadataKey = ( + pipeline: string, + triggerType: TriggerType, +): string | undefined => { + const filename = METADATA_FILENAME[triggerType] + return filename === undefined ? undefined : `${pipelinePrefix(pipeline)}/${filename}` +} + +export const triggerKey = (pipeline: string): string => + `${pipelinePrefix(pipeline)}/trigger`