diff --git a/dist/136.index.js b/dist/136.index.js index bc261fbe..d5c63561 100644 --- a/dist/136.index.js +++ b/dist/136.index.js @@ -3,27 +3,27 @@ exports.id = 136; exports.ids = [136]; exports.modules = { -/***/ 63723: +/***/ 3723: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.STSClient = exports.__Client = void 0; -const middleware_host_header_1 = __webpack_require__(52590); -const middleware_logger_1 = __webpack_require__(85242); -const middleware_recursion_detection_1 = __webpack_require__(81568); -const middleware_user_agent_1 = __webpack_require__(32959); -const config_resolver_1 = __webpack_require__(39316); -const core_1 = __webpack_require__(22743); -const middleware_content_length_1 = __webpack_require__(47212); -const middleware_endpoint_1 = __webpack_require__(42628); -const middleware_retry_1 = __webpack_require__(19618); -const smithy_client_1 = __webpack_require__(61411); +const middleware_host_header_1 = __webpack_require__(2590); +const middleware_logger_1 = __webpack_require__(5242); +const middleware_recursion_detection_1 = __webpack_require__(1568); +const middleware_user_agent_1 = __webpack_require__(2959); +const config_resolver_1 = __webpack_require__(9316); +const core_1 = __webpack_require__(402); +const middleware_content_length_1 = __webpack_require__(7212); +const middleware_endpoint_1 = __webpack_require__(99); +const middleware_retry_1 = __webpack_require__(9618); +const smithy_client_1 = __webpack_require__(1411); Object.defineProperty(exports, "__Client", ({ enumerable: true, get: function () { return smithy_client_1.Client; } })); -const httpAuthSchemeProvider_1 = __webpack_require__(27851); -const EndpointParameters_1 = __webpack_require__(76811); -const runtimeConfig_1 = __webpack_require__(36578); -const runtimeExtensions_1 = __webpack_require__(37742); +const httpAuthSchemeProvider_1 = __webpack_require__(7851); +const EndpointParameters_1 = __webpack_require__(6811); +const runtimeConfig_1 = __webpack_require__(6578); +const runtimeExtensions_1 = __webpack_require__(7742); class STSClient extends smithy_client_1.Client { config; constructor(...[configuration]) { @@ -62,7 +62,7 @@ exports.STSClient = STSClient; /***/ }), -/***/ 34532: +/***/ 4532: /***/ ((__unused_webpack_module, exports) => { @@ -112,15 +112,15 @@ exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig; /***/ }), -/***/ 27851: +/***/ 7851: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0; const core_1 = __webpack_require__(8704); -const util_middleware_1 = __webpack_require__(99755); -const STSClient_1 = __webpack_require__(63723); +const util_middleware_1 = __webpack_require__(6324); +const STSClient_1 = __webpack_require__(3723); const defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => { return { operation: (0, util_middleware_1.getSmithyContext)(context).operation, @@ -181,7 +181,7 @@ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; /***/ }), -/***/ 76811: +/***/ 6811: /***/ ((__unused_webpack_module, exports) => { @@ -207,15 +207,15 @@ exports.commonParams = { /***/ }), -/***/ 59765: +/***/ 9765: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __webpack_require__(83068); -const util_endpoints_2 = __webpack_require__(79674); -const ruleset_1 = __webpack_require__(31670); +const util_endpoints_1 = __webpack_require__(3068); +const util_endpoints_2 = __webpack_require__(9674); +const ruleset_1 = __webpack_require__(1670); const cache = new util_endpoints_2.EndpointCache({ size: 50, params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"], @@ -232,7 +232,7 @@ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunct /***/ }), -/***/ 31670: +/***/ 1670: /***/ ((__unused_webpack_module, exports) => { @@ -251,14 +251,15 @@ exports.ruleSet = _data; -var STSClient = __webpack_require__(63723); -var smithyClient = __webpack_require__(61411); -var middlewareEndpoint = __webpack_require__(42628); -var middlewareSerde = __webpack_require__(62654); -var EndpointParameters = __webpack_require__(76811); +var STSClient = __webpack_require__(3723); +var smithyClient = __webpack_require__(1411); +var middlewareEndpoint = __webpack_require__(99); +var middlewareSerde = __webpack_require__(3255); +var EndpointParameters = __webpack_require__(6811); var core = __webpack_require__(8704); -var protocolHttp = __webpack_require__(20843); +var protocolHttp = __webpack_require__(2356); var client = __webpack_require__(5152); +var regionConfigResolver = __webpack_require__(6463); class STSServiceException extends smithyClient.ServiceException { constructor(options) { @@ -930,7 +931,6 @@ class STS extends STSClient.STSClient { } smithyClient.createAggregatedClient(commands, STS); -const ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => { if (typeof assumedRoleUser?.Arn === "string") { const arnComponents = assumedRoleUser.Arn.split(":"); @@ -940,11 +940,12 @@ const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => { } return undefined; }; -const resolveRegion = async (_region, _parentRegion, credentialProviderLogger) => { +const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => { const region = typeof _region === "function" ? await _region() : _region; const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; - credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (provider)`, `${parentRegion} (parent client)`, `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`); - return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION; + const stsDefaultRegion = await regionConfigResolver.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 region ?? parentRegion ?? stsDefaultRegion; }; const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => { let stsClient; @@ -952,11 +953,15 @@ const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => { return async (sourceCreds, params) => { closureSourceCreds = sourceCreds; if (!stsClient) { - const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, } = stsOptions; - const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger); + const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, } = stsOptions; + const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, { + logger, + profile, + }); const isCompatibleRequestHandler = !isH2(requestHandler); stsClient = new STSClient({ - profile: stsOptions?.parentClientConfig?.profile, + ...stsOptions, + profile, credentialDefaultProvider: () => async () => closureSourceCreds, region: resolvedRegion, requestHandler: isCompatibleRequestHandler ? requestHandler : undefined, @@ -984,11 +989,15 @@ const getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => { let stsClient; return async (params) => { if (!stsClient) { - const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, } = stsOptions; - const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger); + const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, } = stsOptions; + const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, { + logger, + profile, + }); const isCompatibleRequestHandler = !isH2(requestHandler); stsClient = new STSClient({ - profile: stsOptions?.parentClientConfig?.profile, + ...stsOptions, + profile, region: resolvedRegion, requestHandler: isCompatibleRequestHandler ? requestHandler : undefined, logger: logger, @@ -1071,28 +1080,28 @@ Object.keys(STSClient).forEach(function (k) { /***/ }), -/***/ 36578: +/***/ 6578: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; -const tslib_1 = __webpack_require__(61860); -const package_json_1 = tslib_1.__importDefault(__webpack_require__(39955)); +const tslib_1 = __webpack_require__(1860); +const package_json_1 = tslib_1.__importDefault(__webpack_require__(9955)); const core_1 = __webpack_require__(8704); -const util_user_agent_node_1 = __webpack_require__(51656); -const config_resolver_1 = __webpack_require__(39316); -const core_2 = __webpack_require__(22743); +const util_user_agent_node_1 = __webpack_require__(1656); +const config_resolver_1 = __webpack_require__(9316); +const core_2 = __webpack_require__(402); const hash_node_1 = __webpack_require__(5092); -const middleware_retry_1 = __webpack_require__(19618); -const node_config_provider_1 = __webpack_require__(62021); -const node_http_handler_1 = __webpack_require__(82764); -const util_body_length_node_1 = __webpack_require__(13638); -const util_retry_1 = __webpack_require__(15518); -const runtimeConfig_shared_1 = __webpack_require__(24443); -const smithy_client_1 = __webpack_require__(61411); -const util_defaults_mode_node_1 = __webpack_require__(15435); -const smithy_client_2 = __webpack_require__(61411); +const middleware_retry_1 = __webpack_require__(9618); +const node_config_provider_1 = __webpack_require__(5704); +const node_http_handler_1 = __webpack_require__(1279); +const util_body_length_node_1 = __webpack_require__(3638); +const util_retry_1 = __webpack_require__(5518); +const runtimeConfig_shared_1 = __webpack_require__(4443); +const smithy_client_1 = __webpack_require__(1411); +const util_defaults_mode_node_1 = __webpack_require__(5435); +const smithy_client_2 = __webpack_require__(1411); const getRuntimeConfig = (config) => { (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); @@ -1146,20 +1155,20 @@ exports.getRuntimeConfig = getRuntimeConfig; /***/ }), -/***/ 24443: +/***/ 4443: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; const core_1 = __webpack_require__(8704); -const core_2 = __webpack_require__(22743); -const smithy_client_1 = __webpack_require__(61411); -const url_parser_1 = __webpack_require__(60043); -const util_base64_1 = __webpack_require__(72722); -const util_utf8_1 = __webpack_require__(46090); -const httpAuthSchemeProvider_1 = __webpack_require__(27851); -const endpointResolver_1 = __webpack_require__(59765); +const core_2 = __webpack_require__(402); +const smithy_client_1 = __webpack_require__(1411); +const url_parser_1 = __webpack_require__(4494); +const util_base64_1 = __webpack_require__(8385); +const util_utf8_1 = __webpack_require__(1577); +const httpAuthSchemeProvider_1 = __webpack_require__(7851); +const endpointResolver_1 = __webpack_require__(9765); const getRuntimeConfig = (config) => { return { apiVersion: "2011-06-15", @@ -1193,16 +1202,16 @@ exports.getRuntimeConfig = getRuntimeConfig; /***/ }), -/***/ 37742: +/***/ 7742: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveRuntimeExtensions = void 0; -const region_config_resolver_1 = __webpack_require__(36463); -const protocol_http_1 = __webpack_require__(20843); -const smithy_client_1 = __webpack_require__(61411); -const httpAuthExtensionConfiguration_1 = __webpack_require__(34532); +const region_config_resolver_1 = __webpack_require__(6463); +const protocol_http_1 = __webpack_require__(2356); +const smithy_client_1 = __webpack_require__(1411); +const httpAuthExtensionConfiguration_1 = __webpack_require__(4532); const resolveRuntimeExtensions = (runtimeConfig, extensions) => { const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)); extensions.forEach((extension) => extension.configure(extensionConfiguration)); @@ -1211,6 +1220,13 @@ const resolveRuntimeExtensions = (runtimeConfig, extensions) => { exports.resolveRuntimeExtensions = resolveRuntimeExtensions; +/***/ }), + +/***/ 9955: +/***/ ((module) => { + +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.921.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.921.0","@aws-sdk/middleware-host-header":"3.921.0","@aws-sdk/middleware-logger":"3.921.0","@aws-sdk/middleware-recursion-detection":"3.921.0","@aws-sdk/middleware-user-agent":"3.921.0","@aws-sdk/region-config-resolver":"3.921.0","@aws-sdk/types":"3.921.0","@aws-sdk/util-endpoints":"3.921.0","@aws-sdk/util-user-agent-browser":"3.921.0","@aws-sdk/util-user-agent-node":"3.921.0","@smithy/config-resolver":"^4.4.1","@smithy/core":"^3.17.2","@smithy/fetch-http-handler":"^5.3.5","@smithy/hash-node":"^4.2.4","@smithy/invalid-dependency":"^4.2.4","@smithy/middleware-content-length":"^4.2.4","@smithy/middleware-endpoint":"^4.3.6","@smithy/middleware-retry":"^4.4.6","@smithy/middleware-serde":"^4.2.4","@smithy/middleware-stack":"^4.2.4","@smithy/node-config-provider":"^4.3.4","@smithy/node-http-handler":"^4.4.4","@smithy/protocol-http":"^5.3.4","@smithy/smithy-client":"^4.9.2","@smithy/types":"^4.8.1","@smithy/url-parser":"^4.2.4","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.5","@smithy/util-defaults-mode-node":"^4.2.7","@smithy/util-endpoints":"^3.2.4","@smithy/util-middleware":"^4.2.4","@smithy/util-retry":"^4.2.4","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); + /***/ }) }; diff --git a/dist/163.index.js b/dist/163.index.js new file mode 100644 index 00000000..f80cd43e --- /dev/null +++ b/dist/163.index.js @@ -0,0 +1,225 @@ +"use strict"; +exports.id = 163; +exports.ids = [163]; +exports.modules = { + +/***/ 26163: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var sharedIniFileLoader = __webpack_require__(93438); +var propertyProvider = __webpack_require__(1104); +var client = __webpack_require__(17582); + +const resolveCredentialSource = (credentialSource, profileName, logger) => { + const sourceProvidersMap = { + EcsContainer: async (options) => { + const { fromHttp } = await __webpack_require__.e(/* import() */ 795).then(__webpack_require__.bind(__webpack_require__, 60795)); + const { fromContainerMetadata } = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 40566, 19)); + logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"); + return async () => propertyProvider.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider); + }, + Ec2InstanceMetadata: async (options) => { + logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata"); + const { fromInstanceMetadata } = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 40566, 19)); + return async () => fromInstanceMetadata(options)().then(setNamedProvider); + }, + Environment: async (options) => { + logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment"); + const { fromEnv } = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 56104, 19)); + return async () => fromEnv(options)().then(setNamedProvider); + }, + }; + if (credentialSource in sourceProvidersMap) { + return sourceProvidersMap[credentialSource]; + } + else { + throw new propertyProvider.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` + + `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger }); + } +}; +const setNamedProvider = (creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p"); + +const 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 }))); +}; +const 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; +}; +const 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; +}; +const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => { + options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)"); + const profileData = profiles[profileName]; + const { source_profile, region } = profileData; + if (!options.roleAssumer) { + const { getDefaultRoleAssumer } = await __webpack_require__.e(/* import() */ 58).then(__webpack_require__.t.bind(__webpack_require__, 31058, 23)); + options.roleAssumer = getDefaultRoleAssumer({ + ...options.clientConfig, + credentialProviderLogger: options.logger, + parentClientConfig: { + ...options?.parentClientConfig, + region: region ?? options?.parentClientConfig?.region, + }, + }, options.clientPlugins); + } + if (source_profile && source_profile in visitedProfiles) { + throw new propertyProvider.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` + + ` ${sharedIniFileLoader.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, { + ...visitedProfiles, + [source_profile]: true, + }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})) + : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))(); + if (isCredentialSourceWithoutRoleArn(profileData)) { + return sourceCredsProvider.then((creds) => client.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 propertyProvider.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) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o")); + } +}; +const isCredentialSourceWithoutRoleArn = (section) => { + return !section.role_arn && !!section.credential_source; +}; + +const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string"; +const resolveProcessCredentials = async (options, profile) => __webpack_require__.e(/* import() */ 630).then(__webpack_require__.t.bind(__webpack_require__, 15630, 19)).then(({ fromProcess }) => fromProcess({ + ...options, + profile, +})().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v"))); + +const resolveSsoCredentials = async (profile, profileData, options = {}) => { + const { fromSSO } = await __webpack_require__.e(/* import() */ 212).then(__webpack_require__.t.bind(__webpack_require__, 8212, 19)); + return fromSSO({ + profile, + logger: options.logger, + parentClientConfig: options.parentClientConfig, + clientConfig: options.clientConfig, + })().then((creds) => { + if (profileData.sso_session) { + return client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r"); + } + else { + return client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t"); + } + }); +}; +const 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"); + +const 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; +const 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 client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n"); +}; + +const 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; +const resolveWebIdentityCredentials = async (profile, options) => Promise.all(/* import() */[__webpack_require__.e(58), __webpack_require__.e(654)]).then(__webpack_require__.t.bind(__webpack_require__, 47654, 23)).then(({ fromTokenFile }) => 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, +})().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q"))); + +const resolveProfileData = async (profileName, profiles, options, 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, visitedProfiles); + } + if (isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isWebIdentityProfile(data)) { + return resolveWebIdentityCredentials(data, options); + } + if (isProcessProfile(data)) { + return resolveProcessCredentials(options, profileName); + } + if (isSsoProfile(data)) { + return await resolveSsoCredentials(profileName, data, options); + } + throw new propertyProvider.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger }); +}; + +const fromIni = (_init = {}) => async ({ callerClientConfig } = {}) => { + const init = { + ..._init, + parentClientConfig: { + ...callerClientConfig, + ..._init.parentClientConfig, + }, + }; + init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni"); + const profiles = await sharedIniFileLoader.parseKnownFiles(init); + return resolveProfileData(sharedIniFileLoader.getProfileName({ + profile: _init.profile ?? callerClientConfig?.profile, + }), profiles, init); +}; + +exports.fromIni = fromIni; + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/dist/212.index.js b/dist/212.index.js new file mode 100644 index 00000000..16c1a54c --- /dev/null +++ b/dist/212.index.js @@ -0,0 +1,1443 @@ +"use strict"; +exports.id = 212; +exports.ids = [212]; +exports.modules = { + +/***/ 50111: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0; +const core_1 = __webpack_require__(91446); +const util_middleware_1 = __webpack_require__(30954); +const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider; +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", + }; +} +const defaultSSOHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "GetRoleCredentials": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "ListAccountRoles": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "ListAccounts": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "Logout": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return Object.assign(config_0, { + authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []), + }); +}; +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + + +/***/ }), + +/***/ 57321: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = __webpack_require__(16158); +const util_endpoints_2 = __webpack_require__(79674); +const ruleset_1 = __webpack_require__(79170); +const cache = new util_endpoints_2.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], +}); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + })); +}; +exports.defaultEndpointResolver = defaultEndpointResolver; +util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + + +/***/ }), + +/***/ 79170: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ruleSet = void 0; +const u = "required", v = "fn", w = "argv", x = "ref"; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; +const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; +exports.ruleSet = _data; + + +/***/ }), + +/***/ 43628: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var middlewareHostHeader = __webpack_require__(25164); +var middlewareLogger = __webpack_require__(65832); +var middlewareRecursionDetection = __webpack_require__(39870); +var middlewareUserAgent = __webpack_require__(70997); +var configResolver = __webpack_require__(39316); +var core = __webpack_require__(22744); +var middlewareContentLength = __webpack_require__(47212); +var middlewareEndpoint = __webpack_require__(88205); +var middlewareRetry = __webpack_require__(19618); +var smithyClient = __webpack_require__(61411); +var httpAuthSchemeProvider = __webpack_require__(50111); +var runtimeConfig = __webpack_require__(88766); +var regionConfigResolver = __webpack_require__(26521); +var protocolHttp = __webpack_require__(13494); +var middlewareSerde = __webpack_require__(58305); +var core$1 = __webpack_require__(91446); + +const resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "awsssoportal", + }); +}; +const commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, +}; + +const 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; + }, + }; +}; +const resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; + +const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); +}; + +class SSOClient extends smithyClient.Client { + config; + constructor(...[configuration]) { + const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1); + const _config_3 = middlewareRetry.resolveRetryConfig(_config_2); + const _config_4 = configResolver.resolveRegionConfig(_config_3); + const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4); + const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5); + const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config)); + this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config)); + this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config)); + this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config)); + this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config)); + this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }), + })); + this.middlewareStack.use(core.getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } +} + +class SSOServiceException extends smithyClient.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); + } +} +const GetRoleCredentialsRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: smithyClient.SENSITIVE_STRING }), +}); +const RoleCredentialsFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.secretAccessKey && { secretAccessKey: smithyClient.SENSITIVE_STRING }), + ...(obj.sessionToken && { sessionToken: smithyClient.SENSITIVE_STRING }), +}); +const GetRoleCredentialsResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }), +}); +const ListAccountRolesRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: smithyClient.SENSITIVE_STRING }), +}); +const ListAccountsRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: smithyClient.SENSITIVE_STRING }), +}); +const LogoutRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: smithyClient.SENSITIVE_STRING }), +}); + +const se_GetRoleCredentialsCommand = async (input, context) => { + const b = core.requestBuilder(input, context); + const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, { + [_xasbt]: input[_aT], + }); + b.bp("/federation/credentials"); + const query = smithyClient.map({ + [_rn]: [, smithyClient.expectNonNull(input[_rN], `roleName`)], + [_ai]: [, smithyClient.expectNonNull(input[_aI], `accountId`)], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +const se_ListAccountRolesCommand = async (input, context) => { + const b = core.requestBuilder(input, context); + const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, { + [_xasbt]: input[_aT], + }); + b.bp("/assignment/roles"); + const query = smithyClient.map({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], + [_ai]: [, smithyClient.expectNonNull(input[_aI], `accountId`)], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +const se_ListAccountsCommand = async (input, context) => { + const b = core.requestBuilder(input, context); + const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, { + [_xasbt]: input[_aT], + }); + b.bp("/assignment/accounts"); + const query = smithyClient.map({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +const se_LogoutCommand = async (input, context) => { + const b = core.requestBuilder(input, context); + const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, { + [_xasbt]: input[_aT], + }); + b.bp("/logout"); + let body; + b.m("POST").h(headers).b(body); + return b.build(); +}; +const de_GetRoleCredentialsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = smithyClient.map({ + $metadata: deserializeMetadata(output), + }); + const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body"); + const doc = smithyClient.take(data, { + roleCredentials: smithyClient._json, + }); + Object.assign(contents, doc); + return contents; +}; +const de_ListAccountRolesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = smithyClient.map({ + $metadata: deserializeMetadata(output), + }); + const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body"); + const doc = smithyClient.take(data, { + nextToken: smithyClient.expectString, + roleList: smithyClient._json, + }); + Object.assign(contents, doc); + return contents; +}; +const de_ListAccountsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = smithyClient.map({ + $metadata: deserializeMetadata(output), + }); + const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body"); + const doc = smithyClient.take(data, { + accountList: smithyClient._json, + nextToken: smithyClient.expectString, + }); + Object.assign(contents, doc); + return contents; +}; +const de_LogoutCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = smithyClient.map({ + $metadata: deserializeMetadata(output), + }); + await smithyClient.collectBody(output.body, context); + return contents; +}; +const de_CommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await core$1.parseJsonErrorBody(output.body, context), + }; + const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidRequestException": + case "com.amazonaws.sso#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput); + case "ResourceNotFoundException": + case "com.amazonaws.sso#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput); + case "TooManyRequestsException": + case "com.amazonaws.sso#TooManyRequestsException": + throw await de_TooManyRequestsExceptionRes(parsedOutput); + case "UnauthorizedException": + case "com.amazonaws.sso#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; +const throwDefaultError = smithyClient.withBaseException(SSOServiceException); +const de_InvalidRequestExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + message: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + message: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + message: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new TooManyRequestsException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_UnauthorizedExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + message: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new UnauthorizedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const 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"], +}); +const _aI = "accountId"; +const _aT = "accessToken"; +const _ai = "account_id"; +const _mR = "maxResults"; +const _mr = "max_result"; +const _nT = "nextToken"; +const _nt = "next_token"; +const _rN = "roleName"; +const _rn = "role_name"; +const _xasbt = "x-amz-sso_bearer_token"; + +class GetRoleCredentialsCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("SWBPortalService", "GetRoleCredentials", {}) + .n("SSOClient", "GetRoleCredentialsCommand") + .f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog) + .ser(se_GetRoleCredentialsCommand) + .de(de_GetRoleCredentialsCommand) + .build() { +} + +class ListAccountRolesCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("SWBPortalService", "ListAccountRoles", {}) + .n("SSOClient", "ListAccountRolesCommand") + .f(ListAccountRolesRequestFilterSensitiveLog, void 0) + .ser(se_ListAccountRolesCommand) + .de(de_ListAccountRolesCommand) + .build() { +} + +class ListAccountsCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("SWBPortalService", "ListAccounts", {}) + .n("SSOClient", "ListAccountsCommand") + .f(ListAccountsRequestFilterSensitiveLog, void 0) + .ser(se_ListAccountsCommand) + .de(de_ListAccountsCommand) + .build() { +} + +class LogoutCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("SWBPortalService", "Logout", {}) + .n("SSOClient", "LogoutCommand") + .f(LogoutRequestFilterSensitiveLog, void 0) + .ser(se_LogoutCommand) + .de(de_LogoutCommand) + .build() { +} + +const commands = { + GetRoleCredentialsCommand, + ListAccountRolesCommand, + ListAccountsCommand, + LogoutCommand, +}; +class SSO extends SSOClient { +} +smithyClient.createAggregatedClient(commands, SSO); + +const paginateListAccountRoles = core.createPaginator(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); + +const paginateListAccounts = core.createPaginator(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); + +Object.defineProperty(exports, "$Command", ({ + enumerable: true, + get: function () { return smithyClient.Command; } +})); +Object.defineProperty(exports, "__Client", ({ + enumerable: true, + get: function () { return smithyClient.Client; } +})); +exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand; +exports.GetRoleCredentialsRequestFilterSensitiveLog = GetRoleCredentialsRequestFilterSensitiveLog; +exports.GetRoleCredentialsResponseFilterSensitiveLog = GetRoleCredentialsResponseFilterSensitiveLog; +exports.InvalidRequestException = InvalidRequestException; +exports.ListAccountRolesCommand = ListAccountRolesCommand; +exports.ListAccountRolesRequestFilterSensitiveLog = ListAccountRolesRequestFilterSensitiveLog; +exports.ListAccountsCommand = ListAccountsCommand; +exports.ListAccountsRequestFilterSensitiveLog = ListAccountsRequestFilterSensitiveLog; +exports.LogoutCommand = LogoutCommand; +exports.LogoutRequestFilterSensitiveLog = LogoutRequestFilterSensitiveLog; +exports.ResourceNotFoundException = ResourceNotFoundException; +exports.RoleCredentialsFilterSensitiveLog = RoleCredentialsFilterSensitiveLog; +exports.SSO = SSO; +exports.SSOClient = SSOClient; +exports.SSOServiceException = SSOServiceException; +exports.TooManyRequestsException = TooManyRequestsException; +exports.UnauthorizedException = UnauthorizedException; +exports.paginateListAccountRoles = paginateListAccountRoles; +exports.paginateListAccounts = paginateListAccounts; + + +/***/ }), + +/***/ 88766: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const tslib_1 = __webpack_require__(61860); +const package_json_1 = tslib_1.__importDefault(__webpack_require__(36948)); +const core_1 = __webpack_require__(91446); +const util_user_agent_node_1 = __webpack_require__(9082); +const config_resolver_1 = __webpack_require__(39316); +const hash_node_1 = __webpack_require__(5092); +const middleware_retry_1 = __webpack_require__(19618); +const node_config_provider_1 = __webpack_require__(61814); +const node_http_handler_1 = __webpack_require__(95493); +const util_body_length_node_1 = __webpack_require__(13638); +const util_retry_1 = __webpack_require__(15518); +const runtimeConfig_shared_1 = __webpack_require__(35831); +const smithy_client_1 = __webpack_require__(61411); +const util_defaults_mode_node_1 = __webpack_require__(15435); +const smithy_client_2 = __webpack_require__(61411); +const getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger, + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? + (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }, config), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 35831: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const core_1 = __webpack_require__(91446); +const core_2 = __webpack_require__(22744); +const smithy_client_1 = __webpack_require__(61411); +const url_parser_1 = __webpack_require__(85792); +const util_base64_1 = __webpack_require__(82763); +const util_utf8_1 = __webpack_require__(85339); +const httpAuthSchemeProvider_1 = __webpack_require__(50111); +const endpointResolver_1 = __webpack_require__(57321); +const getRuntimeConfig = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SSO", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 7321: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var protocolHttp = __webpack_require__(13494); +var core = __webpack_require__(22744); +var propertyProvider = __webpack_require__(1104); +var client = __webpack_require__(17582); +var signatureV4 = __webpack_require__(75118); + +const getDateHeader = (response) => protocolHttp.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined; + +const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); + +const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000; + +const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); + } + return currentSystemClockOffset; +}; + +const throwSigningPropertyError = (name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); + } + return property; +}; +const 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 (!protocolHttp.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 signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config.systemClockOffset), + signingRegion: signingRegion, + signingService: signingName, + }); + return signedRequest; + } + errorHandler(signingProperties) { + return (error) => { + const serverTime = error.ServerTime ?? getDateHeader(error.$response); + if (serverTime) { + const config = throwSigningPropertyError("config", signingProperties.config); + const initialSystemClockOffset = config.systemClockOffset; + config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); + const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && error.$metadata) { + error.$metadata.clockSkewCorrected = true; + } + } + throw error; + }; + } + successHandler(httpResponse, signingProperties) { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config = throwSigningPropertyError("config", signingProperties.config); + config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset); + } + } +} +const AWSSDKSigV4Signer = AwsSdkSigV4Signer; + +class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer { + async sign(httpRequest, identity, signingProperties) { + if (!protocolHttp.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 signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config.systemClockOffset), + signingRegion: multiRegionOverride, + signingService: signingName, + }); + return signedRequest; + } +} + +const getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : []; + +const getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`; + +const NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE"; +const NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference"; +const 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 undefined; + return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]); + }, + configFileSelector: (profile) => { + if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) + return undefined; + return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]); + }, + default: [], +}; + +const resolveAwsSdkSigV4AConfig = (config) => { + config.sigv4aSigningRegionSet = core.normalizeProvider(config.sigv4aSigningRegionSet); + return config; +}; +const 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 propertyProvider.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 propertyProvider.ProviderError("sigv4a_signing_region_set not set in profile.", { + tryNextLink: true, + }); + }, + default: undefined, +}; + +const resolveAwsSdkSigV4Config = (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) { + resolvedCredentials = async (options) => boundProvider(options).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_CODE", "e")); + 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 = core.normalizeProvider(config.signer); + } + else if (config.regionInfoProvider) { + signer = () => core.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.SignatureV4; + return new SignerCtor(params); + }); + } + else { + signer = async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: config.signingName || config.defaultSigningName, + signingRegion: await core.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.SignatureV4; + return new SignerCtor(params); + }; + } + const resolvedConfig = Object.assign(config, { + systemClockOffset, + signingEscapePath, + signer, + }); + return resolvedConfig; +}; +const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; +function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider, }) { + let credentialsProvider; + if (credentials) { + if (!credentials?.memoized) { + credentialsProvider = core.memoizeIdentityProvider(credentials, core.isIdentityExpired, core.doesIdentityRequireRefresh); + } + else { + credentialsProvider = credentials; + } + } + else { + if (credentialDefaultProvider) { + credentialsProvider = core.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; +} + +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; + + +/***/ }), + +/***/ 8212: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +var __webpack_unused_export__; + + +var propertyProvider = __webpack_require__(1104); +var sharedIniFileLoader = __webpack_require__(93438); +var client = __webpack_require__(17582); +var tokenProviders = __webpack_require__(88967); + +const 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"); + +const SHOULD_FAIL_CREDENTIAL_CHAIN = false; +const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, 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 tokenProviders.fromSso({ + profile, + filepath, + configFilepath, + ignoreCache, + })(); + token = { + accessToken: _token.token, + expiresAt: new Date(_token.expiration).toISOString(), + }; + } + catch (e) { + throw new propertyProvider.CredentialsProviderError(e.message, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger, + }); + } + } + else { + try { + token = await sharedIniFileLoader.getSSOTokenFromFile(ssoStartUrl); + } + catch (e) { + throw new propertyProvider.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 propertyProvider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger, + }); + } + const { accessToken } = token; + const { SSOClient, GetRoleCredentialsCommand } = await Promise.resolve().then(function () { return __webpack_require__(11031); }); + const sso = ssoClient || + new SSOClient(Object.assign({}, clientConfig ?? {}, { + logger: clientConfig?.logger ?? parentClientConfig?.logger, + region: clientConfig?.region ?? ssoRegion, + })); + let ssoResp; + try { + ssoResp = await sso.send(new GetRoleCredentialsCommand({ + accountId: ssoAccountId, + roleName: ssoRoleName, + accessToken, + })); + } + catch (e) { + throw new propertyProvider.CredentialsProviderError(e, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger, + }); + } + const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp; + if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { + throw new propertyProvider.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) { + client.setCredentialFeature(credentials, "CREDENTIALS_SSO", "s"); + } + else { + client.setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u"); + } + return credentials; +}; + +const 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 propertyProvider.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(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger }); + } + return profile; +}; + +const 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 = sharedIniFileLoader.getProfileName({ + profile: init.profile ?? callerClientConfig?.profile, + }); + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + const profiles = await sharedIniFileLoader.parseKnownFiles(init); + const profile = profiles[profileName]; + if (!profile) { + throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger }); + } + if (!isSsoProfile(profile)) { + throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, { + logger: init.logger, + }); + } + if (profile?.sso_session) { + const ssoSessions = await sharedIniFileLoader.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 propertyProvider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, { + tryNextLink: false, + logger: init.logger, + }); + } + if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { + throw new propertyProvider.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: ssoClient, + clientConfig: init.clientConfig, + parentClientConfig: init.parentClientConfig, + profile: profileName, + filepath: init.filepath, + configFilepath: init.configFilepath, + ignoreCache: init.ignoreCache, + logger: init.logger, + }); + } + else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { + throw new propertyProvider.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, + profile: profileName, + filepath: init.filepath, + configFilepath: init.configFilepath, + ignoreCache: init.ignoreCache, + logger: init.logger, + }); + } +}; + +exports.fromSSO = fromSSO; +__webpack_unused_export__ = isSsoProfile; +__webpack_unused_export__ = validateSsoProfile; + + +/***/ }), + +/***/ 11031: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var clientSso = __webpack_require__(43628); + + + +Object.defineProperty(exports, "GetRoleCredentialsCommand", ({ + enumerable: true, + get: function () { return clientSso.GetRoleCredentialsCommand; } +})); +Object.defineProperty(exports, "SSOClient", ({ + enumerable: true, + get: function () { return clientSso.SSOClient; } +})); + + +/***/ }), + +/***/ 88967: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var client = __webpack_require__(17582); +var httpAuthSchemes = __webpack_require__(7321); +var propertyProvider = __webpack_require__(1104); +var sharedIniFileLoader = __webpack_require__(93438); +var fs = __webpack_require__(79896); + +const fromEnvSigningName = ({ logger, signingName } = {}) => async () => { + logger?.debug?.("@aws-sdk/token-providers - fromEnvSigningName"); + if (!signingName) { + throw new propertyProvider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger }); + } + const bearerTokenKey = httpAuthSchemes.getBearerTokenEnvKey(signingName); + if (!(bearerTokenKey in process.env)) { + throw new propertyProvider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger }); + } + const token = { token: process.env[bearerTokenKey] }; + client.setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3"); + return token; +}; + +const EXPIRE_WINDOW_MS = 5 * 60 * 1000; +const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; + +const getSsoOidcClient = async (ssoRegion, init = {}) => { + const { SSOOIDCClient } = await __webpack_require__.e(/* import() */ 477).then(__webpack_require__.t.bind(__webpack_require__, 54477, 19)); + const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, { + region: ssoRegion ?? init.clientConfig?.region, + logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger, + })); + return ssoOidcClient; +}; + +const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => { + const { CreateTokenCommand } = await __webpack_require__.e(/* import() */ 477).then(__webpack_require__.t.bind(__webpack_require__, 54477, 19)); + const ssoOidcClient = await getSsoOidcClient(ssoRegion, init); + return ssoOidcClient.send(new CreateTokenCommand({ + clientId: ssoToken.clientId, + clientSecret: ssoToken.clientSecret, + refreshToken: ssoToken.refreshToken, + grantType: "refresh_token", + })); +}; + +const validateTokenExpiry = (token) => { + if (token.expiration && token.expiration.getTime() < Date.now()) { + throw new propertyProvider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); + } +}; + +const validateTokenKey = (key, value, forRefresh = false) => { + if (typeof value === "undefined") { + throw new propertyProvider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false); + } +}; + +const { writeFile } = fs.promises; +const writeSSOTokenToFile = (id, ssoToken) => { + const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id); + const tokenString = JSON.stringify(ssoToken, null, 2); + return writeFile(tokenFilepath, tokenString); +}; + +const lastRefreshAttemptTime = new Date(0); +const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => { + const init = { + ..._init, + parentClientConfig: { + ...callerClientConfig, + ..._init.parentClientConfig, + }, + }; + init.logger?.debug("@aws-sdk/token-providers - fromSso"); + const profiles = await sharedIniFileLoader.parseKnownFiles(init); + const profileName = sharedIniFileLoader.getProfileName({ + profile: init.profile ?? callerClientConfig?.profile, + }); + const profile = profiles[profileName]; + if (!profile) { + throw new propertyProvider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); + } + else if (!profile["sso_session"]) { + throw new propertyProvider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); + } + const ssoSessionName = profile["sso_session"]; + const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init); + const ssoSession = ssoSessions[ssoSessionName]; + if (!ssoSession) { + throw new propertyProvider.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 propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false); + } + } + ssoSession["sso_start_url"]; + const ssoRegion = ssoSession["sso_region"]; + let ssoToken; + try { + ssoToken = await sharedIniFileLoader.getSSOTokenFromFile(ssoSessionName); + } + catch (e) { + throw new propertyProvider.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; + } + if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) { + validateTokenExpiry(existingToken); + return existingToken; + } + validateTokenKey("clientId", ssoToken.clientId, true); + validateTokenKey("clientSecret", ssoToken.clientSecret, true); + validateTokenKey("refreshToken", ssoToken.refreshToken, true); + try { + lastRefreshAttemptTime.setTime(Date.now()); + const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init); + 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; + } +}; + +const fromStatic = ({ token, logger }) => async () => { + logger?.debug("@aws-sdk/token-providers - fromStatic"); + if (!token || !token.token) { + throw new propertyProvider.TokenProviderError(`Please pass a valid token to fromStatic`, false); + } + return token; +}; + +const nodeProvider = (init = {}) => propertyProvider.memoize(propertyProvider.chain(fromSso(init), async () => { + throw new propertyProvider.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; + + +/***/ }), + +/***/ 36948: +/***/ ((module) => { + +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.908.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.908.0","@aws-sdk/middleware-host-header":"3.901.0","@aws-sdk/middleware-logger":"3.901.0","@aws-sdk/middleware-recursion-detection":"3.901.0","@aws-sdk/middleware-user-agent":"3.908.0","@aws-sdk/region-config-resolver":"3.901.0","@aws-sdk/types":"3.901.0","@aws-sdk/util-endpoints":"3.901.0","@aws-sdk/util-user-agent-browser":"3.907.0","@aws-sdk/util-user-agent-node":"3.908.0","@smithy/config-resolver":"^4.3.0","@smithy/core":"^3.15.0","@smithy/fetch-http-handler":"^5.3.1","@smithy/hash-node":"^4.2.0","@smithy/invalid-dependency":"^4.2.0","@smithy/middleware-content-length":"^4.2.0","@smithy/middleware-endpoint":"^4.3.1","@smithy/middleware-retry":"^4.4.1","@smithy/middleware-serde":"^4.2.0","@smithy/middleware-stack":"^4.2.0","@smithy/node-config-provider":"^4.3.0","@smithy/node-http-handler":"^4.3.0","@smithy/protocol-http":"^5.3.0","@smithy/smithy-client":"^4.7.1","@smithy/types":"^4.6.0","@smithy/url-parser":"^4.2.0","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.0","@smithy/util-defaults-mode-node":"^4.2.1","@smithy/util-endpoints":"^3.2.0","@smithy/util-middleware":"^4.2.0","@smithy/util-retry":"^4.2.0","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}'); + +/***/ }) + +}; +; \ No newline at end of file diff --git a/dist/360.index.js b/dist/360.index.js index 52e407c1..fbad95c0 100644 --- a/dist/360.index.js +++ b/dist/360.index.js @@ -3,15 +3,15 @@ exports.id = 360; exports.ids = [360]; exports.modules = { -/***/ 75360: +/***/ 5360: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { -var sharedIniFileLoader = __webpack_require__(23074); -var propertyProvider = __webpack_require__(41508); -var child_process = __webpack_require__(35317); -var util = __webpack_require__(39023); +var sharedIniFileLoader = __webpack_require__(4964); +var propertyProvider = __webpack_require__(1238); +var child_process = __webpack_require__(5317); +var util = __webpack_require__(9023); var client = __webpack_require__(5152); const getValidatedProcessCredentials = (profileName, data, profiles) => { @@ -87,524 +87,6 @@ const fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => { exports.fromProcess = fromProcess; -/***/ }), - -/***/ 41508: -/***/ ((__unused_webpack_module, exports) => { - - - -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); - } -} - -const 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; -}; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const 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; - }; -}; - -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; - - -/***/ }), - -/***/ 53798: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __webpack_require__(70857); -const path_1 = __webpack_require__(16928); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; -}; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; -}; -exports.getHomeDir = getHomeDir; - - -/***/ }), - -/***/ 16335: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __webpack_require__(76982); -const path_1 = __webpack_require__(16928); -const getHomeDir_1 = __webpack_require__(53798); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); -}; -exports.getSSOTokenFilepath = getSSOTokenFilepath; - - -/***/ }), - -/***/ 66204: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; -const fs_1 = __webpack_require__(79896); -const getSSOTokenFilepath_1 = __webpack_require__(16335); -const { readFile } = fs_1.promises; -exports.tokenIntercept = {}; -const getSSOTokenFromFile = async (id) => { - if (exports.tokenIntercept[id]) { - return exports.tokenIntercept[id]; - } - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); -}; -exports.getSSOTokenFromFile = getSSOTokenFromFile; - - -/***/ }), - -/***/ 23074: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var getHomeDir = __webpack_require__(53798); -var getSSOTokenFilepath = __webpack_require__(16335); -var getSSOTokenFromFile = __webpack_require__(66204); -var path = __webpack_require__(16928); -var types = __webpack_require__(82688); -var slurpFile = __webpack_require__(16332); - -const ENV_PROFILE = "AWS_PROFILE"; -const DEFAULT_PROFILE = "default"; -const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; - -const CONFIG_PREFIX_SEPARATOR = "."; - -const getConfigData = (data) => Object.entries(data) - .filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; - } - return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}) - .reduce((acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; -}, { - ...(data.default && { default: data.default }), -}); - -const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); - -const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); - -const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -const profileNameBlockList = ["__proto__", "profile __proto__"]; -const 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(types.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; -}; - -const swallowError$1 = () => ({}); -const loadSharedConfigFiles = async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = getHomeDir.getHomeDir(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = path.join(homeDir, filepath.slice(2)); - } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); - } - const parsedFiles = await Promise.all([ - slurpFile.slurpFile(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .then(getConfigData) - .catch(swallowError$1), - slurpFile.slurpFile(resolvedFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .catch(swallowError$1), - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1], - }; -}; - -const getSsoSessionData = (data) => Object.entries(data) - .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) - .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); - -const swallowError = () => ({}); -const loadSsoSessionData = async (init = {}) => slurpFile.slurpFile(init.configFilepath ?? getConfigFilepath()) - .then(parseIni) - .then(getSsoSessionData) - .catch(swallowError); - -const 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; -}; - -const parseKnownFiles = async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); -}; - -const externalDataInterceptor = { - getFileRecord() { - return slurpFile.fileIntercept; - }, - interceptFile(path, contents) { - slurpFile.fileIntercept[path] = Promise.resolve(contents); - }, - getTokenRecord() { - return getSSOTokenFromFile.tokenIntercept; - }, - interceptToken(id, contents) { - getSSOTokenFromFile.tokenIntercept[id] = contents; - }, -}; - -Object.defineProperty(exports, "getSSOTokenFromFile", ({ - enumerable: true, - get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } -})); -exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; -exports.DEFAULT_PROFILE = DEFAULT_PROFILE; -exports.ENV_PROFILE = ENV_PROFILE; -exports.externalDataInterceptor = externalDataInterceptor; -exports.getProfileName = getProfileName; -exports.loadSharedConfigFiles = loadSharedConfigFiles; -exports.loadSsoSessionData = loadSsoSessionData; -exports.parseKnownFiles = parseKnownFiles; -Object.keys(getHomeDir).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getHomeDir[k]; } - }); -}); -Object.keys(getSSOTokenFilepath).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getSSOTokenFilepath[k]; } - }); -}); - - -/***/ }), - -/***/ 16332: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = void 0; -const fs_1 = __webpack_require__(79896); -const { readFile } = fs_1.promises; -exports.filePromisesHash = {}; -exports.fileIntercept = {}; -const slurpFile = (path, options) => { - if (exports.fileIntercept[path] !== undefined) { - return exports.fileIntercept[path]; - } - if (!exports.filePromisesHash[path] || options?.ignoreCache) { - exports.filePromisesHash[path] = readFile(path, "utf8"); - } - return exports.filePromisesHash[path]; -}; -exports.slurpFile = slurpFile; - - -/***/ }), - -/***/ 82688: -/***/ ((__unused_webpack_module, exports) => { - - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - /***/ }) }; diff --git a/dist/443.index.js b/dist/443.index.js index e7833881..4aca4dea 100644 --- a/dist/443.index.js +++ b/dist/443.index.js @@ -10,7 +10,7 @@ exports.modules = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0; const core_1 = __webpack_require__(8704); -const util_middleware_1 = __webpack_require__(99755); +const util_middleware_1 = __webpack_require__(6324); const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => { return { operation: (0, util_middleware_1.getSmithyContext)(context).operation, @@ -66,15 +66,15 @@ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; /***/ }), -/***/ 90546: +/***/ 546: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __webpack_require__(83068); -const util_endpoints_2 = __webpack_require__(79674); -const ruleset_1 = __webpack_require__(69947); +const util_endpoints_1 = __webpack_require__(3068); +const util_endpoints_2 = __webpack_require__(9674); +const ruleset_1 = __webpack_require__(9947); const cache = new util_endpoints_2.EndpointCache({ size: 50, params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], @@ -91,41 +91,41 @@ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunct /***/ }), -/***/ 69947: +/***/ 9947: /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ruleSet = void 0; const u = "required", v = "fn", w = "argv", x = "ref"; -const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "string" }, j = { [u]: true, "default": false, "type": "boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; exports.ruleSet = _data; /***/ }), -/***/ 89443: +/***/ 9443: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var __webpack_unused_export__; -var middlewareHostHeader = __webpack_require__(52590); -var middlewareLogger = __webpack_require__(85242); -var middlewareRecursionDetection = __webpack_require__(81568); -var middlewareUserAgent = __webpack_require__(32959); -var configResolver = __webpack_require__(39316); -var core = __webpack_require__(22743); -var middlewareContentLength = __webpack_require__(47212); -var middlewareEndpoint = __webpack_require__(42628); -var middlewareRetry = __webpack_require__(19618); -var smithyClient = __webpack_require__(61411); +var middlewareHostHeader = __webpack_require__(2590); +var middlewareLogger = __webpack_require__(5242); +var middlewareRecursionDetection = __webpack_require__(1568); +var middlewareUserAgent = __webpack_require__(2959); +var configResolver = __webpack_require__(9316); +var core = __webpack_require__(402); +var middlewareContentLength = __webpack_require__(7212); +var middlewareEndpoint = __webpack_require__(99); +var middlewareRetry = __webpack_require__(9618); +var smithyClient = __webpack_require__(1411); var httpAuthSchemeProvider = __webpack_require__(8396); -var runtimeConfig = __webpack_require__(16901); -var regionConfigResolver = __webpack_require__(36463); -var protocolHttp = __webpack_require__(20843); -var middlewareSerde = __webpack_require__(62654); +var runtimeConfig = __webpack_require__(6901); +var regionConfigResolver = __webpack_require__(6463); +var protocolHttp = __webpack_require__(2356); +var middlewareSerde = __webpack_require__(3255); var core$1 = __webpack_require__(8704); const resolveClientEndpointParameters = (options) => { @@ -737,27 +737,27 @@ __webpack_unused_export__ = UnsupportedGrantTypeException; /***/ }), -/***/ 16901: +/***/ 6901: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; -const tslib_1 = __webpack_require__(61860); -const package_json_1 = tslib_1.__importDefault(__webpack_require__(39955)); +const tslib_1 = __webpack_require__(1860); +const package_json_1 = tslib_1.__importDefault(__webpack_require__(9955)); const core_1 = __webpack_require__(8704); -const util_user_agent_node_1 = __webpack_require__(51656); -const config_resolver_1 = __webpack_require__(39316); +const util_user_agent_node_1 = __webpack_require__(1656); +const config_resolver_1 = __webpack_require__(9316); const hash_node_1 = __webpack_require__(5092); -const middleware_retry_1 = __webpack_require__(19618); -const node_config_provider_1 = __webpack_require__(62021); -const node_http_handler_1 = __webpack_require__(82764); -const util_body_length_node_1 = __webpack_require__(13638); -const util_retry_1 = __webpack_require__(15518); +const middleware_retry_1 = __webpack_require__(9618); +const node_config_provider_1 = __webpack_require__(5704); +const node_http_handler_1 = __webpack_require__(1279); +const util_body_length_node_1 = __webpack_require__(3638); +const util_retry_1 = __webpack_require__(5518); const runtimeConfig_shared_1 = __webpack_require__(1546); -const smithy_client_1 = __webpack_require__(61411); -const util_defaults_mode_node_1 = __webpack_require__(15435); -const smithy_client_2 = __webpack_require__(61411); +const smithy_client_1 = __webpack_require__(1411); +const util_defaults_mode_node_1 = __webpack_require__(5435); +const smithy_client_2 = __webpack_require__(1411); const getRuntimeConfig = (config) => { (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); @@ -805,13 +805,13 @@ exports.getRuntimeConfig = getRuntimeConfig; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; const core_1 = __webpack_require__(8704); -const core_2 = __webpack_require__(22743); -const smithy_client_1 = __webpack_require__(61411); -const url_parser_1 = __webpack_require__(60043); -const util_base64_1 = __webpack_require__(72722); -const util_utf8_1 = __webpack_require__(46090); +const core_2 = __webpack_require__(402); +const smithy_client_1 = __webpack_require__(1411); +const url_parser_1 = __webpack_require__(4494); +const util_base64_1 = __webpack_require__(8385); +const util_utf8_1 = __webpack_require__(1577); const httpAuthSchemeProvider_1 = __webpack_require__(8396); -const endpointResolver_1 = __webpack_require__(90546); +const endpointResolver_1 = __webpack_require__(546); const getRuntimeConfig = (config) => { return { apiVersion: "2019-06-10", @@ -843,6 +843,13 @@ const getRuntimeConfig = (config) => { exports.getRuntimeConfig = getRuntimeConfig; +/***/ }), + +/***/ 9955: +/***/ ((module) => { + +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.921.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.921.0","@aws-sdk/middleware-host-header":"3.921.0","@aws-sdk/middleware-logger":"3.921.0","@aws-sdk/middleware-recursion-detection":"3.921.0","@aws-sdk/middleware-user-agent":"3.921.0","@aws-sdk/region-config-resolver":"3.921.0","@aws-sdk/types":"3.921.0","@aws-sdk/util-endpoints":"3.921.0","@aws-sdk/util-user-agent-browser":"3.921.0","@aws-sdk/util-user-agent-node":"3.921.0","@smithy/config-resolver":"^4.4.1","@smithy/core":"^3.17.2","@smithy/fetch-http-handler":"^5.3.5","@smithy/hash-node":"^4.2.4","@smithy/invalid-dependency":"^4.2.4","@smithy/middleware-content-length":"^4.2.4","@smithy/middleware-endpoint":"^4.3.6","@smithy/middleware-retry":"^4.4.6","@smithy/middleware-serde":"^4.2.4","@smithy/middleware-stack":"^4.2.4","@smithy/node-config-provider":"^4.3.4","@smithy/node-http-handler":"^4.4.4","@smithy/protocol-http":"^5.3.4","@smithy/smithy-client":"^4.9.2","@smithy/types":"^4.8.1","@smithy/url-parser":"^4.2.4","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.5","@smithy/util-defaults-mode-node":"^4.2.7","@smithy/util-endpoints":"^3.2.4","@smithy/util-middleware":"^4.2.4","@smithy/util-retry":"^4.2.4","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); + /***/ }) }; diff --git a/dist/477.index.js b/dist/477.index.js new file mode 100644 index 00000000..4d32ef39 --- /dev/null +++ b/dist/477.index.js @@ -0,0 +1,856 @@ +"use strict"; +exports.id = 477; +exports.ids = [477]; +exports.modules = { + +/***/ 8014: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0; +const core_1 = __webpack_require__(91446); +const util_middleware_1 = __webpack_require__(30954); +const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider; +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", + }; +} +const defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "CreateToken": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +exports.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return Object.assign(config_0, { + authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []), + }); +}; +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + + +/***/ }), + +/***/ 42936: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = __webpack_require__(16158); +const util_endpoints_2 = __webpack_require__(79674); +const ruleset_1 = __webpack_require__(67605); +const cache = new util_endpoints_2.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], +}); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + })); +}; +exports.defaultEndpointResolver = defaultEndpointResolver; +util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + + +/***/ }), + +/***/ 67605: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ruleSet = void 0; +const u = "required", v = "fn", w = "argv", x = "ref"; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; +const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; +exports.ruleSet = _data; + + +/***/ }), + +/***/ 54477: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +var __webpack_unused_export__; + + +var middlewareHostHeader = __webpack_require__(25164); +var middlewareLogger = __webpack_require__(65832); +var middlewareRecursionDetection = __webpack_require__(39870); +var middlewareUserAgent = __webpack_require__(70997); +var configResolver = __webpack_require__(39316); +var core = __webpack_require__(22744); +var middlewareContentLength = __webpack_require__(47212); +var middlewareEndpoint = __webpack_require__(88205); +var middlewareRetry = __webpack_require__(19618); +var smithyClient = __webpack_require__(61411); +var httpAuthSchemeProvider = __webpack_require__(8014); +var runtimeConfig = __webpack_require__(22791); +var regionConfigResolver = __webpack_require__(26521); +var protocolHttp = __webpack_require__(13494); +var middlewareSerde = __webpack_require__(58305); +var core$1 = __webpack_require__(91446); + +const resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "sso-oauth", + }); +}; +const commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, +}; + +const 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; + }, + }; +}; +const resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; + +const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); +}; + +class SSOOIDCClient extends smithyClient.Client { + config; + constructor(...[configuration]) { + const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1); + const _config_3 = middlewareRetry.resolveRetryConfig(_config_2); + const _config_4 = configResolver.resolveRegionConfig(_config_3); + const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4); + const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5); + const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config)); + this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config)); + this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config)); + this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config)); + this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config)); + this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }), + })); + this.middlewareStack.use(core.getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } +} + +class SSOOIDCServiceException extends smithyClient.ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, SSOOIDCServiceException.prototype); + } +} + +const AccessDeniedExceptionReason = { + KMS_ACCESS_DENIED: "KMS_AccessDeniedException", +}; +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; + } +} +const CreateTokenRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.clientSecret && { clientSecret: smithyClient.SENSITIVE_STRING }), + ...(obj.refreshToken && { refreshToken: smithyClient.SENSITIVE_STRING }), + ...(obj.codeVerifier && { codeVerifier: smithyClient.SENSITIVE_STRING }), +}); +const CreateTokenResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: smithyClient.SENSITIVE_STRING }), + ...(obj.refreshToken && { refreshToken: smithyClient.SENSITIVE_STRING }), + ...(obj.idToken && { idToken: smithyClient.SENSITIVE_STRING }), +}); +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; + } +} +const InvalidRequestExceptionReason = { + KMS_DISABLED_KEY: "KMS_DisabledException", + KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException", + KMS_INVALID_STATE: "KMS_InvalidStateException", + KMS_KEY_NOT_FOUND: "KMS_NotFoundException", +}; +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; + } +} + +const se_CreateTokenCommand = async (input, context) => { + const b = core.requestBuilder(input, context); + const headers = { + "content-type": "application/json", + }; + b.bp("/token"); + let body; + body = JSON.stringify(smithyClient.take(input, { + clientId: [], + clientSecret: [], + code: [], + codeVerifier: [], + deviceCode: [], + grantType: [], + redirectUri: [], + refreshToken: [], + scope: (_) => smithyClient._json(_), + })); + b.m("POST").h(headers).b(body); + return b.build(); +}; +const de_CreateTokenCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = smithyClient.map({ + $metadata: deserializeMetadata(output), + }); + const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body"); + const doc = smithyClient.take(data, { + accessToken: smithyClient.expectString, + expiresIn: smithyClient.expectInt32, + idToken: smithyClient.expectString, + refreshToken: smithyClient.expectString, + tokenType: smithyClient.expectString, + }); + Object.assign(contents, doc); + return contents; +}; +const de_CommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await core$1.parseJsonErrorBody(output.body, context), + }; + const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.ssooidc#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput); + case "AuthorizationPendingException": + case "com.amazonaws.ssooidc#AuthorizationPendingException": + throw await de_AuthorizationPendingExceptionRes(parsedOutput); + case "ExpiredTokenException": + case "com.amazonaws.ssooidc#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput); + case "InternalServerException": + case "com.amazonaws.ssooidc#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput); + case "InvalidClientException": + case "com.amazonaws.ssooidc#InvalidClientException": + throw await de_InvalidClientExceptionRes(parsedOutput); + case "InvalidGrantException": + case "com.amazonaws.ssooidc#InvalidGrantException": + throw await de_InvalidGrantExceptionRes(parsedOutput); + case "InvalidRequestException": + case "com.amazonaws.ssooidc#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput); + case "InvalidScopeException": + case "com.amazonaws.ssooidc#InvalidScopeException": + throw await de_InvalidScopeExceptionRes(parsedOutput); + case "SlowDownException": + case "com.amazonaws.ssooidc#SlowDownException": + throw await de_SlowDownExceptionRes(parsedOutput); + case "UnauthorizedClientException": + case "com.amazonaws.ssooidc#UnauthorizedClientException": + throw await de_UnauthorizedClientExceptionRes(parsedOutput); + case "UnsupportedGrantTypeException": + case "com.amazonaws.ssooidc#UnsupportedGrantTypeException": + throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; +const throwDefaultError = smithyClient.withBaseException(SSOOIDCServiceException); +const de_AccessDeniedExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + error: smithyClient.expectString, + error_description: smithyClient.expectString, + reason: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + error: smithyClient.expectString, + error_description: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new AuthorizationPendingException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + error: smithyClient.expectString, + error_description: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new ExpiredTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_InternalServerExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + error: smithyClient.expectString, + error_description: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_InvalidClientExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + error: smithyClient.expectString, + error_description: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_InvalidGrantExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + error: smithyClient.expectString, + error_description: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidGrantException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_InvalidRequestExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + error: smithyClient.expectString, + error_description: smithyClient.expectString, + reason: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_InvalidScopeExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + error: smithyClient.expectString, + error_description: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidScopeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_SlowDownExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + error: smithyClient.expectString, + error_description: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new SlowDownException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + error: smithyClient.expectString, + error_description: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new UnauthorizedClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => { + const contents = smithyClient.map({}); + const data = parsedOutput.body; + const doc = smithyClient.take(data, { + error: smithyClient.expectString, + error_description: smithyClient.expectString, + }); + Object.assign(contents, doc); + const exception = new UnsupportedGrantTypeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return smithyClient.decorateServiceException(exception, parsedOutput.body); +}; +const 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"], +}); + +class CreateTokenCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSSOOIDCService", "CreateToken", {}) + .n("SSOOIDCClient", "CreateTokenCommand") + .f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog) + .ser(se_CreateTokenCommand) + .de(de_CreateTokenCommand) + .build() { +} + +const commands = { + CreateTokenCommand, +}; +class SSOOIDC extends SSOOIDCClient { +} +smithyClient.createAggregatedClient(commands, SSOOIDC); + +__webpack_unused_export__ = ({ + enumerable: true, + get: function () { return smithyClient.Command; } +}); +__webpack_unused_export__ = ({ + enumerable: true, + get: function () { return smithyClient.Client; } +}); +__webpack_unused_export__ = AccessDeniedException; +__webpack_unused_export__ = AccessDeniedExceptionReason; +__webpack_unused_export__ = AuthorizationPendingException; +exports.CreateTokenCommand = CreateTokenCommand; +__webpack_unused_export__ = CreateTokenRequestFilterSensitiveLog; +__webpack_unused_export__ = CreateTokenResponseFilterSensitiveLog; +__webpack_unused_export__ = ExpiredTokenException; +__webpack_unused_export__ = InternalServerException; +__webpack_unused_export__ = InvalidClientException; +__webpack_unused_export__ = InvalidGrantException; +__webpack_unused_export__ = InvalidRequestException; +__webpack_unused_export__ = InvalidRequestExceptionReason; +__webpack_unused_export__ = InvalidScopeException; +__webpack_unused_export__ = SSOOIDC; +exports.SSOOIDCClient = SSOOIDCClient; +__webpack_unused_export__ = SSOOIDCServiceException; +__webpack_unused_export__ = SlowDownException; +__webpack_unused_export__ = UnauthorizedClientException; +__webpack_unused_export__ = UnsupportedGrantTypeException; + + +/***/ }), + +/***/ 22791: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const tslib_1 = __webpack_require__(61860); +const package_json_1 = tslib_1.__importDefault(__webpack_require__(77507)); +const core_1 = __webpack_require__(91446); +const util_user_agent_node_1 = __webpack_require__(9082); +const config_resolver_1 = __webpack_require__(39316); +const hash_node_1 = __webpack_require__(5092); +const middleware_retry_1 = __webpack_require__(19618); +const node_config_provider_1 = __webpack_require__(61814); +const node_http_handler_1 = __webpack_require__(95493); +const util_body_length_node_1 = __webpack_require__(13638); +const util_retry_1 = __webpack_require__(15518); +const runtimeConfig_shared_1 = __webpack_require__(13892); +const smithy_client_1 = __webpack_require__(61411); +const util_defaults_mode_node_1 = __webpack_require__(15435); +const smithy_client_2 = __webpack_require__(61411); +const getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger, + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? + (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }, config), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 13892: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const core_1 = __webpack_require__(91446); +const core_2 = __webpack_require__(22744); +const smithy_client_1 = __webpack_require__(61411); +const url_parser_1 = __webpack_require__(85792); +const util_base64_1 = __webpack_require__(82763); +const util_utf8_1 = __webpack_require__(85339); +const httpAuthSchemeProvider_1 = __webpack_require__(8014); +const endpointResolver_1 = __webpack_require__(42936); +const getRuntimeConfig = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SSO OIDC", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 77507: +/***/ ((module) => { + +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.908.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.908.0","@aws-sdk/middleware-host-header":"3.901.0","@aws-sdk/middleware-logger":"3.901.0","@aws-sdk/middleware-recursion-detection":"3.901.0","@aws-sdk/middleware-user-agent":"3.908.0","@aws-sdk/region-config-resolver":"3.901.0","@aws-sdk/types":"3.901.0","@aws-sdk/util-endpoints":"3.901.0","@aws-sdk/util-user-agent-browser":"3.907.0","@aws-sdk/util-user-agent-node":"3.908.0","@smithy/config-resolver":"^4.3.0","@smithy/core":"^3.15.0","@smithy/fetch-http-handler":"^5.3.1","@smithy/hash-node":"^4.2.0","@smithy/invalid-dependency":"^4.2.0","@smithy/middleware-content-length":"^4.2.0","@smithy/middleware-endpoint":"^4.3.1","@smithy/middleware-retry":"^4.4.1","@smithy/middleware-serde":"^4.2.0","@smithy/middleware-stack":"^4.2.0","@smithy/node-config-provider":"^4.3.0","@smithy/node-http-handler":"^4.3.0","@smithy/protocol-http":"^5.3.0","@smithy/smithy-client":"^4.7.1","@smithy/types":"^4.6.0","@smithy/url-parser":"^4.2.0","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.0","@smithy/util-defaults-mode-node":"^4.2.1","@smithy/util-endpoints":"^3.2.0","@smithy/util-middleware":"^4.2.0","@smithy/util-retry":"^4.2.0","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); + +/***/ }) + +}; +; \ No newline at end of file diff --git a/dist/505.index.js b/dist/505.index.js new file mode 100644 index 00000000..1709a618 --- /dev/null +++ b/dist/505.index.js @@ -0,0 +1,226 @@ +"use strict"; +exports.id = 505; +exports.ids = [505]; +exports.modules = { + +/***/ 97505: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var utilUtf8 = __webpack_require__(85339); + +class EventStreamSerde { + marshaller; + serializer; + deserializer; + serdeContext; + defaultContentType; + constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) { + this.marshaller = marshaller; + this.serializer = serializer; + this.deserializer = deserializer; + this.serdeContext = serdeContext; + this.defaultContentType = defaultContentType; + } + async serializeEventStream({ eventStream, requestSchema, initialRequest, }) { + const marshaller = this.marshaller; + const eventStreamMember = requestSchema.getEventStreamMember(); + const unionSchema = requestSchema.getMemberSchema(eventStreamMember); + unionSchema.getMemberSchemas(); + 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: "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, + }; + } + const unionMember = Object.keys(event).find((key) => { + return key !== "__type"; + }) ?? ""; + 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, }) { + 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) => { + const unionMember = Object.keys(event).find((key) => { + return key !== "__type"; + }) ?? ""; + if (unionMember === "initial-response") { + const dataObject = await this.deserializer.read(responseSchema, event[unionMember].body); + delete dataObject[eventStreamMember]; + return { + [initialResponseMarker]: true, + ...dataObject, + }; + } + else if (unionMember in memberSchemas) { + const eventStreamSchema = memberSchemas[unionMember]; + return { + [unionMember]: await this.deserializer.read(eventStreamSchema, event[unionMember].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, value] of Object.entries(firstEvent.value)) { + initialResponseContainer[key] = value; + } + } + return { + async *[Symbol.asyncIterator]() { + if (!firstEvent?.value?.[initialResponseMarker]) { + yield firstEvent.value; + } + while (true) { + const { done, value } = await asyncIterator.next(); + if (done) { + break; + } + yield value; + } + }, + }; + } + writeEventBody(unionMember, unionSchema, event) { + const serializer = this.serializer; + let eventType = unionMember; + let explicitPayloadMember = null; + let explicitPayloadContentType; + const isKnownSchema = (() => { + const struct = unionSchema.getSchema(); + return struct.memberNames.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; + break; + } + 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 { + throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union."); + } + } + const messageSerialization = serializer.flush(); + const body = typeof messageSerialization === "string" + ? (this.serdeContext?.utf8Decoder ?? utilUtf8.fromUtf8)(messageSerialization) + : messageSerialization; + return { + body, + eventType, + explicitPayloadContentType, + additionalHeaders, + }; + } +} + +exports.EventStreamSerde = EventStreamSerde; + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/dist/566.index.js b/dist/566.index.js new file mode 100644 index 00000000..651d6dca --- /dev/null +++ b/dist/566.index.js @@ -0,0 +1,387 @@ +"use strict"; +exports.id = 566; +exports.ids = [566]; +exports.modules = { + +/***/ 566: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +var __webpack_unused_export__; + + +var propertyProvider = __webpack_require__(1238); +var url = __webpack_require__(7016); +var buffer = __webpack_require__(181); +var http = __webpack_require__(8611); +var nodeConfigProvider = __webpack_require__(5704); +var urlParser = __webpack_require__(4494); + +function httpRequest(options) { + return new Promise((resolve, reject) => { + const req = http.request({ + method: "GET", + ...options, + hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1"), + }); + req.on("error", (err) => { + reject(Object.assign(new propertyProvider.ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); + }); + req.on("timeout", () => { + reject(new propertyProvider.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 propertyProvider.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.Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); +} + +const isImdsCredentials = (arg) => Boolean(arg) && + typeof arg === "object" && + typeof arg.AccessKeyId === "string" && + typeof arg.SecretAccessKey === "string" && + typeof arg.Token === "string" && + typeof arg.Expiration === "string"; +const fromImdsCredentials = (creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration), + ...(creds.AccountId && { accountId: creds.AccountId }), +}); + +const DEFAULT_TIMEOUT = 1000; +const DEFAULT_MAX_RETRIES = 0; +const providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout }); + +const retry = (toRetry, maxRetries) => { + let promise = toRetry(); + for (let i = 0; i < maxRetries; i++) { + promise = promise.catch(toRetry); + } + return promise; +}; + +const ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; +const ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; +const ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; +const 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 propertyProvider.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger, + }); + } + return fromImdsCredentials(credsResponse); + }, maxRetries); +}; +const 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(); +}; +const CMDS_IP = "169.254.170.2"; +const GREENGRASS_HOSTS = { + localhost: true, + "127.0.0.1": true, +}; +const GREENGRASS_PROTOCOLS = { + "http:": true, + "https:": true, +}; +const 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]) { + const parsed = url.parse(process.env[ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { + throw new propertyProvider.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, { + tryNextLink: false, + logger, + }); + } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + throw new propertyProvider.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, { + tryNextLink: false, + logger, + }); + } + return { + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : undefined, + }; + } + throw new propertyProvider.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 propertyProvider.CredentialsProviderError { + tryNextLink; + name = "InstanceMetadataV1FallbackError"; + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype); + } +} + +exports.yI = void 0; +(function (Endpoint) { + Endpoint["IPv4"] = "http://169.254.169.254"; + Endpoint["IPv6"] = "http://[fd00:ec2::254]"; +})(exports.yI || (exports.yI = {})); + +const ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; +const CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; +const 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 = {})); + +const ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; +const CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; +const ENDPOINT_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], + default: EndpointMode.IPv4, +}; + +const getInstanceMetadataEndpoint = async () => urlParser.parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig())); +const getFromEndpointConfig = async () => nodeConfigProvider.loadConfig(ENDPOINT_CONFIG_OPTIONS)(); +const getFromEndpointModeConfig = async () => { + const endpointMode = await nodeConfigProvider.loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case EndpointMode.IPv4: + return exports.yI.IPv4; + case EndpointMode.IPv6: + return exports.yI.IPv6; + default: + throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`); + } +}; + +const STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; +const STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; +const STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; +const 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)}.\nFor more information, please visit: ` + + STATIC_STABILITY_DOC_URL); + const originalExpiration = credentials.originalExpiration ?? credentials.expiration; + return { + ...credentials, + ...(originalExpiration ? { originalExpiration } : {}), + expiration: newExpiration, + }; +}; + +const 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; + }; +}; + +const IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; +const IMDS_TOKEN_PATH = "/latest/api/token"; +const AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; +const PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; +const X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; +const fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }); +const 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 nodeConfigProvider.loadConfig({ + environmentVariableSelector: (env) => { + const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; + if (envValue === undefined) { + throw new propertyProvider.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, + }); + } + }; +}; +const getMetadataToken = async (options) => httpRequest({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600", + }, +}); +const getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(); +const getCredentialsFromProfile = async (profile, options, init) => { + const credentialsResponse = JSON.parse((await httpRequest({ + ...options, + path: IMDS_PATH + profile, + })).toString()); + if (!isImdsCredentials(credentialsResponse)) { + throw new propertyProvider.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger, + }); + } + return fromImdsCredentials(credentialsResponse); +}; + +__webpack_unused_export__ = DEFAULT_MAX_RETRIES; +__webpack_unused_export__ = DEFAULT_TIMEOUT; +__webpack_unused_export__ = ENV_CMDS_AUTH_TOKEN; +exports.ENV_CMDS_FULL_URI = ENV_CMDS_FULL_URI; +exports.ENV_CMDS_RELATIVE_URI = ENV_CMDS_RELATIVE_URI; +exports.fromContainerMetadata = fromContainerMetadata; +exports.fromInstanceMetadata = fromInstanceMetadata; +exports.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint; +exports.httpRequest = httpRequest; +__webpack_unused_export__ = providerConfigFromInit; + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/dist/579.index.js b/dist/579.index.js new file mode 100644 index 00000000..b155f767 --- /dev/null +++ b/dist/579.index.js @@ -0,0 +1,225 @@ +"use strict"; +exports.id = 579; +exports.ids = [579]; +exports.modules = { + +/***/ 6579: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var utilUtf8 = __webpack_require__(1577); + +class EventStreamSerde { + marshaller; + serializer; + deserializer; + serdeContext; + defaultContentType; + constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) { + this.marshaller = marshaller; + this.serializer = serializer; + this.deserializer = deserializer; + this.serdeContext = serdeContext; + this.defaultContentType = defaultContentType; + } + async serializeEventStream({ eventStream, requestSchema, initialRequest, }) { + 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: "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, + }; + } + const unionMember = Object.keys(event).find((key) => { + return key !== "__type"; + }) ?? ""; + 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, }) { + 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) => { + const unionMember = Object.keys(event).find((key) => { + return key !== "__type"; + }) ?? ""; + if (unionMember === "initial-response") { + const dataObject = await this.deserializer.read(responseSchema, event[unionMember].body); + delete dataObject[eventStreamMember]; + return { + [initialResponseMarker]: true, + ...dataObject, + }; + } + else if (unionMember in memberSchemas) { + const eventStreamSchema = memberSchemas[unionMember]; + return { + [unionMember]: await this.deserializer.read(eventStreamSchema, event[unionMember].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, value] of Object.entries(firstEvent.value)) { + initialResponseContainer[key] = value; + } + } + return { + async *[Symbol.asyncIterator]() { + if (!firstEvent?.value?.[initialResponseMarker]) { + yield firstEvent.value; + } + while (true) { + const { done, value } = await asyncIterator.next(); + if (done) { + break; + } + yield value; + } + }, + }; + } + 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; + break; + } + 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 { + throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union."); + } + } + const messageSerialization = serializer.flush(); + const body = typeof messageSerialization === "string" + ? (this.serdeContext?.utf8Decoder ?? utilUtf8.fromUtf8)(messageSerialization) + : messageSerialization; + return { + body, + eventType, + explicitPayloadContentType, + additionalHeaders, + }; + } +} + +exports.EventStreamSerde = EventStreamSerde; + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/dist/58.index.js b/dist/58.index.js new file mode 100644 index 00000000..4c69205c --- /dev/null +++ b/dist/58.index.js @@ -0,0 +1,1224 @@ +"use strict"; +exports.id = 58; +exports.ids = [58]; +exports.modules = { + +/***/ 56001: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.STSClient = exports.__Client = void 0; +const middleware_host_header_1 = __webpack_require__(25164); +const middleware_logger_1 = __webpack_require__(65832); +const middleware_recursion_detection_1 = __webpack_require__(39870); +const middleware_user_agent_1 = __webpack_require__(70997); +const config_resolver_1 = __webpack_require__(39316); +const core_1 = __webpack_require__(22744); +const middleware_content_length_1 = __webpack_require__(47212); +const middleware_endpoint_1 = __webpack_require__(88205); +const middleware_retry_1 = __webpack_require__(19618); +const smithy_client_1 = __webpack_require__(61411); +Object.defineProperty(exports, "__Client", ({ enumerable: true, get: function () { return smithy_client_1.Client; } })); +const httpAuthSchemeProvider_1 = __webpack_require__(5037); +const EndpointParameters_1 = __webpack_require__(64361); +const runtimeConfig_1 = __webpack_require__(18452); +const runtimeExtensions_1 = __webpack_require__(83488); +class STSClient extends smithy_client_1.Client { + config; + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); + const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2); + const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3); + const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5); + const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }), + })); + this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config)); + } + destroy() { + super.destroy(); + } +} +exports.STSClient = STSClient; + + +/***/ }), + +/***/ 54710: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0; +const 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; + }, + }; +}; +exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration; +const resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; +exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig; + + +/***/ }), + +/***/ 5037: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0; +const core_1 = __webpack_require__(91446); +const util_middleware_1 = __webpack_require__(30954); +const STSClient_1 = __webpack_require__(56001); +const defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +exports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sts", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth", + }; +} +const defaultSTSHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "AssumeRoleWithWebIdentity": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +exports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider; +const resolveStsAuthConfig = (input) => Object.assign(input, { + stsClientCtor: STSClient_1.STSClient, +}); +exports.resolveStsAuthConfig = resolveStsAuthConfig; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, exports.resolveStsAuthConfig)(config); + const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0); + return Object.assign(config_1, { + authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []), + }); +}; +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + + +/***/ }), + +/***/ 64361: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.commonParams = exports.resolveClientEndpointParameters = void 0; +const resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + defaultSigningName: "sts", + }); +}; +exports.resolveClientEndpointParameters = resolveClientEndpointParameters; +exports.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" }, +}; + + +/***/ }), + +/***/ 35075: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = __webpack_require__(16158); +const util_endpoints_2 = __webpack_require__(79674); +const ruleset_1 = __webpack_require__(79144); +const cache = new util_endpoints_2.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"], +}); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + })); +}; +exports.defaultEndpointResolver = defaultEndpointResolver; +util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + + +/***/ }), + +/***/ 79144: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ruleSet = void 0; +const F = "required", G = "type", H = "fn", I = "argv", J = "ref"; +const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "String" }, n = { [F]: true, "default": false, [G]: "Boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }, v = {}, w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y]; +const _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] }; +exports.ruleSet = _data; + + +/***/ }), + +/***/ 31058: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var STSClient = __webpack_require__(56001); +var smithyClient = __webpack_require__(61411); +var middlewareEndpoint = __webpack_require__(88205); +var middlewareSerde = __webpack_require__(58305); +var EndpointParameters = __webpack_require__(64361); +var core = __webpack_require__(91446); +var protocolHttp = __webpack_require__(13494); +var client = __webpack_require__(17582); + +class STSServiceException extends smithyClient.ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, STSServiceException.prototype); + } +} + +const CredentialsFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.SecretAccessKey && { SecretAccessKey: smithyClient.SENSITIVE_STRING }), +}); +const AssumeRoleResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }), +}); +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); + } +} +const AssumeRoleWithWebIdentityRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.WebIdentityToken && { WebIdentityToken: smithyClient.SENSITIVE_STRING }), +}); +const AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }), +}); +class IDPCommunicationErrorException extends STSServiceException { + name = "IDPCommunicationErrorException"; + $fault = "client"; + constructor(opts) { + super({ + name: "IDPCommunicationErrorException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype); + } +} + +const se_AssumeRoleCommand = async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleRequest(input), + [_A]: _AR, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_AssumeRoleWithWebIdentityCommand = async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleWithWebIdentityRequest(input), + [_A]: _ARWWI, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const de_AssumeRoleCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await core.parseXmlBody(output.body, context); + let contents = {}; + contents = de_AssumeRoleResponse(data.AssumeRoleResult); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_AssumeRoleWithWebIdentityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await core.parseXmlBody(output.body, context); + let contents = {}; + contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_CommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await core.parseXmlErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ExpiredTokenException": + case "com.amazonaws.sts#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput); + case "MalformedPolicyDocument": + case "com.amazonaws.sts#MalformedPolicyDocumentException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput); + case "PackedPolicyTooLarge": + case "com.amazonaws.sts#PackedPolicyTooLargeException": + throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput); + case "RegionDisabledException": + case "com.amazonaws.sts#RegionDisabledException": + throw await de_RegionDisabledExceptionRes(parsedOutput); + case "IDPCommunicationError": + case "com.amazonaws.sts#IDPCommunicationErrorException": + throw await de_IDPCommunicationErrorExceptionRes(parsedOutput); + case "IDPRejectedClaim": + case "com.amazonaws.sts#IDPRejectedClaimException": + throw await de_IDPRejectedClaimExceptionRes(parsedOutput); + case "InvalidIdentityToken": + case "com.amazonaws.sts#InvalidIdentityTokenException": + throw await de_InvalidIdentityTokenExceptionRes(parsedOutput); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; +const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_ExpiredTokenException(body.Error); + const exception = new ExpiredTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); +}; +const de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_IDPCommunicationErrorException(body.Error); + const exception = new IDPCommunicationErrorException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); +}; +const de_IDPRejectedClaimExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_IDPRejectedClaimException(body.Error); + const exception = new IDPRejectedClaimException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); +}; +const de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_InvalidIdentityTokenException(body.Error); + const exception = new InvalidIdentityTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); +}; +const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_MalformedPolicyDocumentException(body.Error); + const exception = new MalformedPolicyDocumentException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); +}; +const de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_PackedPolicyTooLargeException(body.Error); + const exception = new PackedPolicyTooLargeException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); +}; +const de_RegionDisabledExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_RegionDisabledException(body.Error); + const exception = new RegionDisabledException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); +}; +const se_AssumeRoleRequest = (input, context) => { + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA]); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T]); + if (input[_T]?.length === 0) { + entries.Tags = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + if (input[_TTK] != null) { + const memberEntries = se_tagKeyListType(input[_TTK]); + if (input[_TTK]?.length === 0) { + entries.TransitiveTagKeys = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `TransitiveTagKeys.${key}`; + entries[loc] = value; + }); + } + if (input[_EI] != null) { + entries[_EI] = input[_EI]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + if (input[_SI] != null) { + entries[_SI] = input[_SI]; + } + if (input[_PC] != null) { + const memberEntries = se_ProvidedContextsListType(input[_PC]); + if (input[_PC]?.length === 0) { + entries.ProvidedContexts = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ProvidedContexts.${key}`; + entries[loc] = value; + }); + } + return entries; +}; +const se_AssumeRoleWithWebIdentityRequest = (input, context) => { + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_WIT] != null) { + entries[_WIT] = input[_WIT]; + } + if (input[_PI] != null) { + entries[_PI] = input[_PI]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA]); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; +}; +const se_policyDescriptorListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_PolicyDescriptorType(entry); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const se_PolicyDescriptorType = (input, context) => { + const entries = {}; + if (input[_a] != null) { + entries[_a] = input[_a]; + } + return entries; +}; +const se_ProvidedContext = (input, context) => { + const entries = {}; + if (input[_PAr] != null) { + entries[_PAr] = input[_PAr]; + } + if (input[_CA] != null) { + entries[_CA] = input[_CA]; + } + return entries; +}; +const se_ProvidedContextsListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_ProvidedContext(entry); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const se_Tag = (input, context) => { + const entries = {}; + if (input[_K] != null) { + entries[_K] = input[_K]; + } + if (input[_Va] != null) { + entries[_Va] = input[_Va]; + } + return entries; +}; +const se_tagKeyListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const se_tagListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_Tag(entry); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const de_AssumedRoleUser = (output, context) => { + const contents = {}; + if (output[_ARI] != null) { + contents[_ARI] = smithyClient.expectString(output[_ARI]); + } + if (output[_Ar] != null) { + contents[_Ar] = smithyClient.expectString(output[_Ar]); + } + return contents; +}; +const de_AssumeRoleResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C]); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU]); + } + if (output[_PPS] != null) { + contents[_PPS] = smithyClient.strictParseInt32(output[_PPS]); + } + if (output[_SI] != null) { + contents[_SI] = smithyClient.expectString(output[_SI]); + } + return contents; +}; +const de_AssumeRoleWithWebIdentityResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C]); + } + if (output[_SFWIT] != null) { + contents[_SFWIT] = smithyClient.expectString(output[_SFWIT]); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU]); + } + if (output[_PPS] != null) { + contents[_PPS] = smithyClient.strictParseInt32(output[_PPS]); + } + if (output[_Pr] != null) { + contents[_Pr] = smithyClient.expectString(output[_Pr]); + } + if (output[_Au] != null) { + contents[_Au] = smithyClient.expectString(output[_Au]); + } + if (output[_SI] != null) { + contents[_SI] = smithyClient.expectString(output[_SI]); + } + return contents; +}; +const de_Credentials = (output, context) => { + const contents = {}; + if (output[_AKI] != null) { + contents[_AKI] = smithyClient.expectString(output[_AKI]); + } + if (output[_SAK] != null) { + contents[_SAK] = smithyClient.expectString(output[_SAK]); + } + if (output[_ST] != null) { + contents[_ST] = smithyClient.expectString(output[_ST]); + } + if (output[_E] != null) { + contents[_E] = smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(output[_E])); + } + return contents; +}; +const de_ExpiredTokenException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = smithyClient.expectString(output[_m]); + } + return contents; +}; +const de_IDPCommunicationErrorException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = smithyClient.expectString(output[_m]); + } + return contents; +}; +const de_IDPRejectedClaimException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = smithyClient.expectString(output[_m]); + } + return contents; +}; +const de_InvalidIdentityTokenException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = smithyClient.expectString(output[_m]); + } + return contents; +}; +const de_MalformedPolicyDocumentException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = smithyClient.expectString(output[_m]); + } + return contents; +}; +const de_PackedPolicyTooLargeException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = smithyClient.expectString(output[_m]); + } + return contents; +}; +const de_RegionDisabledException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = smithyClient.expectString(output[_m]); + } + return contents; +}; +const 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"], +}); +const throwDefaultError = smithyClient.withBaseException(STSServiceException); +const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers, + }; + if (body !== undefined) { + contents.body = body; + } + return new protocolHttp.HttpRequest(contents); +}; +const SHARED_HEADERS = { + "content-type": "application/x-www-form-urlencoded", +}; +const _ = "2011-06-15"; +const _A = "Action"; +const _AKI = "AccessKeyId"; +const _AR = "AssumeRole"; +const _ARI = "AssumedRoleId"; +const _ARU = "AssumedRoleUser"; +const _ARWWI = "AssumeRoleWithWebIdentity"; +const _Ar = "Arn"; +const _Au = "Audience"; +const _C = "Credentials"; +const _CA = "ContextAssertion"; +const _DS = "DurationSeconds"; +const _E = "Expiration"; +const _EI = "ExternalId"; +const _K = "Key"; +const _P = "Policy"; +const _PA = "PolicyArns"; +const _PAr = "ProviderArn"; +const _PC = "ProvidedContexts"; +const _PI = "ProviderId"; +const _PPS = "PackedPolicySize"; +const _Pr = "Provider"; +const _RA = "RoleArn"; +const _RSN = "RoleSessionName"; +const _SAK = "SecretAccessKey"; +const _SFWIT = "SubjectFromWebIdentityToken"; +const _SI = "SourceIdentity"; +const _SN = "SerialNumber"; +const _ST = "SessionToken"; +const _T = "Tags"; +const _TC = "TokenCode"; +const _TTK = "TransitiveTagKeys"; +const _V = "Version"; +const _Va = "Value"; +const _WIT = "WebIdentityToken"; +const _a = "arn"; +const _m = "message"; +const buildFormUrlencodedString = (formEntries) => Object.entries(formEntries) + .map(([key, value]) => smithyClient.extendedEncodeURIComponent(key) + "=" + smithyClient.extendedEncodeURIComponent(value)) + .join("&"); +const loadQueryErrorCode = (output, data) => { + if (data.Error?.Code !== undefined) { + return data.Error.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } +}; + +class AssumeRoleCommand extends smithyClient.Command + .classBuilder() + .ep(EndpointParameters.commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}) + .n("STSClient", "AssumeRoleCommand") + .f(void 0, AssumeRoleResponseFilterSensitiveLog) + .ser(se_AssumeRoleCommand) + .de(de_AssumeRoleCommand) + .build() { +} + +class AssumeRoleWithWebIdentityCommand extends smithyClient.Command + .classBuilder() + .ep(EndpointParameters.commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}) + .n("STSClient", "AssumeRoleWithWebIdentityCommand") + .f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog) + .ser(se_AssumeRoleWithWebIdentityCommand) + .de(de_AssumeRoleWithWebIdentityCommand) + .build() { +} + +const commands = { + AssumeRoleCommand, + AssumeRoleWithWebIdentityCommand, +}; +class STS extends STSClient.STSClient { +} +smithyClient.createAggregatedClient(commands, STS); + +const ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; +const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => { + if (typeof assumedRoleUser?.Arn === "string") { + const arnComponents = assumedRoleUser.Arn.split(":"); + if (arnComponents.length > 4 && arnComponents[4] !== "") { + return arnComponents[4]; + } + } + return undefined; +}; +const resolveRegion = async (_region, _parentRegion, credentialProviderLogger) => { + const region = typeof _region === "function" ? await _region() : _region; + const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; + credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (provider)`, `${parentRegion} (parent client)`, `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`); + return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION; +}; +const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => { + let stsClient; + let closureSourceCreds; + return async (sourceCreds, params) => { + closureSourceCreds = sourceCreds; + if (!stsClient) { + const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, } = stsOptions; + const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger); + const isCompatibleRequestHandler = !isH2(requestHandler); + stsClient = new STSClient({ + profile: stsOptions?.parentClientConfig?.profile, + credentialDefaultProvider: () => async () => closureSourceCreds, + region: resolvedRegion, + requestHandler: isCompatibleRequestHandler ? requestHandler : undefined, + logger: 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 }), + }; + client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i"); + return credentials; + }; +}; +const getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => { + let stsClient; + return async (params) => { + if (!stsClient) { + const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, } = stsOptions; + const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger); + const isCompatibleRequestHandler = !isH2(requestHandler); + stsClient = new STSClient({ + profile: stsOptions?.parentClientConfig?.profile, + region: resolvedRegion, + requestHandler: isCompatibleRequestHandler ? requestHandler : undefined, + logger: 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) { + client.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T"); + } + client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k"); + return credentials; + }; +}; +const isH2 = (requestHandler) => { + return requestHandler?.metadata?.handlerProtocol === "h2"; +}; + +const 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); + } + } + }; +}; +const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins)); +const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins)); +const decorateDefaultCredentialProvider = (provider) => (input) => provider({ + roleAssumer: getDefaultRoleAssumer(input), + roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input), + ...input, +}); + +Object.defineProperty(exports, "$Command", ({ + enumerable: true, + get: function () { return smithyClient.Command; } +})); +exports.AssumeRoleCommand = AssumeRoleCommand; +exports.AssumeRoleResponseFilterSensitiveLog = AssumeRoleResponseFilterSensitiveLog; +exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand; +exports.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = AssumeRoleWithWebIdentityRequestFilterSensitiveLog; +exports.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = AssumeRoleWithWebIdentityResponseFilterSensitiveLog; +exports.CredentialsFilterSensitiveLog = CredentialsFilterSensitiveLog; +exports.ExpiredTokenException = ExpiredTokenException; +exports.IDPCommunicationErrorException = IDPCommunicationErrorException; +exports.IDPRejectedClaimException = IDPRejectedClaimException; +exports.InvalidIdentityTokenException = InvalidIdentityTokenException; +exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException; +exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException; +exports.RegionDisabledException = RegionDisabledException; +exports.STS = STS; +exports.STSServiceException = STSServiceException; +exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider; +exports.getDefaultRoleAssumer = getDefaultRoleAssumer; +exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity; +Object.keys(STSClient).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return STSClient[k]; } + }); +}); + + +/***/ }), + +/***/ 18452: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const tslib_1 = __webpack_require__(61860); +const package_json_1 = tslib_1.__importDefault(__webpack_require__(77507)); +const core_1 = __webpack_require__(91446); +const util_user_agent_node_1 = __webpack_require__(9082); +const config_resolver_1 = __webpack_require__(39316); +const core_2 = __webpack_require__(22744); +const hash_node_1 = __webpack_require__(5092); +const middleware_retry_1 = __webpack_require__(19618); +const node_config_provider_1 = __webpack_require__(61814); +const node_http_handler_1 = __webpack_require__(95493); +const util_body_length_node_1 = __webpack_require__(13638); +const util_retry_1 = __webpack_require__(15518); +const runtimeConfig_shared_1 = __webpack_require__(79730); +const smithy_client_1 = __webpack_require__(61411); +const util_defaults_mode_node_1 = __webpack_require__(15435); +const smithy_client_2 = __webpack_require__(61411); +const getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger, + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || + (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? + (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }, config), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 79730: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const core_1 = __webpack_require__(91446); +const core_2 = __webpack_require__(22744); +const smithy_client_1 = __webpack_require__(61411); +const url_parser_1 = __webpack_require__(85792); +const util_base64_1 = __webpack_require__(82763); +const util_utf8_1 = __webpack_require__(85339); +const httpAuthSchemeProvider_1 = __webpack_require__(5037); +const endpointResolver_1 = __webpack_require__(35075); +const getRuntimeConfig = (config) => { + return { + apiVersion: "2011-06-15", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "STS", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 83488: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveRuntimeExtensions = void 0; +const region_config_resolver_1 = __webpack_require__(26521); +const protocol_http_1 = __webpack_require__(13494); +const smithy_client_1 = __webpack_require__(61411); +const httpAuthExtensionConfiguration_1 = __webpack_require__(54710); +const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration)); +}; +exports.resolveRuntimeExtensions = resolveRuntimeExtensions; + + +/***/ }), + +/***/ 77507: +/***/ ((module) => { + +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.908.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.908.0","@aws-sdk/middleware-host-header":"3.901.0","@aws-sdk/middleware-logger":"3.901.0","@aws-sdk/middleware-recursion-detection":"3.901.0","@aws-sdk/middleware-user-agent":"3.908.0","@aws-sdk/region-config-resolver":"3.901.0","@aws-sdk/types":"3.901.0","@aws-sdk/util-endpoints":"3.901.0","@aws-sdk/util-user-agent-browser":"3.907.0","@aws-sdk/util-user-agent-node":"3.908.0","@smithy/config-resolver":"^4.3.0","@smithy/core":"^3.15.0","@smithy/fetch-http-handler":"^5.3.1","@smithy/hash-node":"^4.2.0","@smithy/invalid-dependency":"^4.2.0","@smithy/middleware-content-length":"^4.2.0","@smithy/middleware-endpoint":"^4.3.1","@smithy/middleware-retry":"^4.4.1","@smithy/middleware-serde":"^4.2.0","@smithy/middleware-stack":"^4.2.0","@smithy/node-config-provider":"^4.3.0","@smithy/node-http-handler":"^4.3.0","@smithy/protocol-http":"^5.3.0","@smithy/smithy-client":"^4.7.1","@smithy/types":"^4.6.0","@smithy/url-parser":"^4.2.0","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.0","@smithy/util-defaults-mode-node":"^4.2.1","@smithy/util-endpoints":"^3.2.0","@smithy/util-middleware":"^4.2.0","@smithy/util-retry":"^4.2.0","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); + +/***/ }) + +}; +; \ No newline at end of file diff --git a/dist/605.index.js b/dist/605.index.js index f94e34cd..a54c54e9 100644 --- a/dist/605.index.js +++ b/dist/605.index.js @@ -9,7 +9,7 @@ exports.modules = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.checkUrl = void 0; -const property_provider_1 = __webpack_require__(56855); +const property_provider_1 = __webpack_require__(1238); const LOOPBACK_CIDR_IPv4 = "127.0.0.0/8"; const LOOPBACK_CIDR_IPv6 = "::1/128"; const ECS_CONTAINER_HOST = "169.254.170.2"; @@ -56,20 +56,20 @@ exports.checkUrl = checkUrl; /***/ }), -/***/ 68712: +/***/ 8712: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fromHttp = void 0; -const tslib_1 = __webpack_require__(61860); +const tslib_1 = __webpack_require__(1860); const client_1 = __webpack_require__(5152); -const node_http_handler_1 = __webpack_require__(42402); -const property_provider_1 = __webpack_require__(56855); -const promises_1 = tslib_1.__importDefault(__webpack_require__(91943)); +const node_http_handler_1 = __webpack_require__(1279); +const property_provider_1 = __webpack_require__(1238); +const promises_1 = tslib_1.__importDefault(__webpack_require__(1943)); const checkUrl_1 = __webpack_require__(1509); -const requestHelpers_1 = __webpack_require__(78914); -const retry_wrapper_1 = __webpack_require__(51122); +const requestHelpers_1 = __webpack_require__(8914); +const retry_wrapper_1 = __webpack_require__(1122); const AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; const DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; const AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; @@ -133,17 +133,17 @@ exports.fromHttp = fromHttp; /***/ }), -/***/ 78914: +/***/ 8914: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createGetRequest = createGetRequest; exports.getCredentials = getCredentials; -const property_provider_1 = __webpack_require__(56855); -const protocol_http_1 = __webpack_require__(8821); -const smithy_client_1 = __webpack_require__(61411); -const util_stream_1 = __webpack_require__(35121); +const property_provider_1 = __webpack_require__(1238); +const protocol_http_1 = __webpack_require__(2356); +const smithy_client_1 = __webpack_require__(1411); +const util_stream_1 = __webpack_require__(4252); function createGetRequest(url) { return new protocol_http_1.HttpRequest({ protocol: url.protocol, @@ -193,7 +193,7 @@ async function getCredentials(response, logger) { /***/ }), -/***/ 51122: +/***/ 1122: /***/ ((__unused_webpack_module, exports) => { @@ -217,2387 +217,17 @@ exports.retryWrapper = retryWrapper; /***/ }), -/***/ 98605: +/***/ 8605: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var __webpack_unused_export__; __webpack_unused_export__ = ({ value: true }); exports.fromHttp = void 0; -var fromHttp_1 = __webpack_require__(68712); +var fromHttp_1 = __webpack_require__(8712); Object.defineProperty(exports, "fromHttp", ({ enumerable: true, get: function () { return fromHttp_1.fromHttp; } })); -/***/ }), - -/***/ 91338: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var protocolHttp = __webpack_require__(8821); -var querystringBuilder = __webpack_require__(71649); -var utilBase64 = __webpack_require__(2564); - -function createRequest(url, requestOptions) { - return new Request(url, requestOptions); -} - -function requestTimeout(timeoutInMs = 0) { - return new Promise((resolve, reject) => { - if (timeoutInMs) { - setTimeout(() => { - const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); - timeoutError.name = "TimeoutError"; - reject(timeoutError); - }, timeoutInMs); - } - }); -} - -const keepAliveSupport = { - supported: undefined, -}; -class FetchHttpHandler { - config; - configProvider; - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new FetchHttpHandler(instanceOrOptions); - } - constructor(options) { - if (typeof options === "function") { - this.configProvider = options().then((opts) => opts || {}); - } - else { - this.config = options ?? {}; - this.configProvider = Promise.resolve(this.config); - } - if (keepAliveSupport.supported === undefined) { - keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]")); - } - } - destroy() { - } - async handle(request, { abortSignal, requestTimeout: requestTimeout$1 } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - const requestTimeoutInMs = requestTimeout$1 ?? this.config.requestTimeout; - const keepAlive = this.config.keepAlive === true; - const credentials = this.config.credentials; - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - return Promise.reject(abortError); - } - let path = request.path; - const queryString = querystringBuilder.buildQueryString(request.query || {}); - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let auth = ""; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}@`; - } - const { port, method } = request; - const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; - const body = method === "GET" || method === "HEAD" ? undefined : request.body; - const requestOptions = { - body, - headers: new Headers(request.headers), - method: method, - credentials, - }; - if (this.config?.cache) { - requestOptions.cache = this.config.cache; - } - if (body) { - requestOptions.duplex = "half"; - } - if (typeof AbortController !== "undefined") { - requestOptions.signal = abortSignal; - } - if (keepAliveSupport.supported) { - requestOptions.keepalive = keepAlive; - } - if (typeof this.config.requestInit === "function") { - Object.assign(requestOptions, this.config.requestInit(request)); - } - let removeSignalEventListener = () => { }; - const fetchRequest = createRequest(url, requestOptions); - const raceOfPromises = [ - fetch(fetchRequest).then((response) => { - const fetchHeaders = response.headers; - const transformedHeaders = {}; - for (const pair of fetchHeaders.entries()) { - transformedHeaders[pair[0]] = pair[1]; - } - const hasReadableStream = response.body != undefined; - if (!hasReadableStream) { - return response.blob().then((body) => ({ - response: new protocolHttp.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body, - }), - })); - } - return { - response: new protocolHttp.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body: response.body, - }), - }; - }), - requestTimeout(requestTimeoutInMs), - ]; - if (abortSignal) { - raceOfPromises.push(new Promise((resolve, reject) => { - const onAbort = () => { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - }; - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - removeSignalEventListener = () => signal.removeEventListener("abort", onAbort); - } - else { - abortSignal.onabort = onAbort; - } - })); - } - return Promise.race(raceOfPromises).finally(removeSignalEventListener); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - config[key] = value; - return config; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } -} - -const streamCollector = async (stream) => { - if ((typeof Blob === "function" && stream instanceof Blob) || stream.constructor?.name === "Blob") { - if (Blob.prototype.arrayBuffer !== undefined) { - return new Uint8Array(await stream.arrayBuffer()); - } - return collectBlob(stream); - } - return collectStream(stream); -}; -async function collectBlob(blob) { - const base64 = await readToBase64(blob); - const arrayBuffer = utilBase64.fromBase64(base64); - return new Uint8Array(arrayBuffer); -} -async function collectStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} -function readToBase64(blob) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onloadend = () => { - if (reader.readyState !== 2) { - return reject(new Error("Reader aborted too early")); - } - const result = (reader.result ?? ""); - const commaIndex = result.indexOf(","); - const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; - resolve(result.substring(dataOffset)); - }; - reader.onabort = () => reject(new Error("Read aborted")); - reader.onerror = () => reject(reader.error); - reader.readAsDataURL(blob); - }); -} - -exports.FetchHttpHandler = FetchHttpHandler; -exports.keepAliveSupport = keepAliveSupport; -exports.streamCollector = streamCollector; - - -/***/ }), - -/***/ 91447: -/***/ ((__unused_webpack_module, exports) => { - - - -const isArrayBuffer = (arg) => (typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer) || - Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; - -exports.isArrayBuffer = isArrayBuffer; - - -/***/ }), - -/***/ 42402: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var protocolHttp = __webpack_require__(8821); -var querystringBuilder = __webpack_require__(71649); -var http = __webpack_require__(58611); -var https = __webpack_require__(65692); -var stream = __webpack_require__(2203); -var http2 = __webpack_require__(85675); - -const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; - -const getTransformedHeaders = (headers) => { - const transformedHeaders = {}; - for (const name of Object.keys(headers)) { - const headerValues = headers[name]; - transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; - } - return transformedHeaders; -}; - -const timing = { - setTimeout: (cb, ms) => setTimeout(cb, ms), - clearTimeout: (timeoutId) => clearTimeout(timeoutId), -}; - -const DEFER_EVENT_LISTENER_TIME$2 = 1000; -const 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); -}; - -const 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; -}; - -const DEFER_EVENT_LISTENER_TIME$1 = 3000; -const 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); -}; - -const DEFER_EVENT_LISTENER_TIME = 3000; -const 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); -}; - -const MIN_WAIT_TIME = 6_000; -async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) { - const headers = request.headers ?? {}; - const expect = headers["Expect"] || headers["expect"]; - let timeoutId = -1; - let sendBody = true; - if (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 stream.Readable) { - body.pipe(httpRequest); - return; - } - if (body) { - if (Buffer.isBuffer(body) || typeof body === "string") { - 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(); -} - -const DEFAULT_REQUEST_TIMEOUT = 0; -class NodeHttpHandler { - config; - configProvider; - socketWarningTimestamp = 0; - 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 = 15_000; - if (Date.now() - interval < socketWarningTimestamp) { - return socketWarningTimestamp; - } - if (sockets && requests) { - for (const origin in sockets) { - 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)); - } - }); - } - resolveDefaultConfig(options) { - const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, } = options || {}; - const keepAlive = true; - const maxSockets = 50; - return { - connectionTimeout, - requestTimeout, - socketTimeout, - socketAcquisitionWarningTimeout, - throwOnRequestTimeout, - httpAgent: (() => { - if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { - return httpAgent; - } - return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); - })(), - httpsAgent: (() => { - if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { - return httpsAgent; - } - return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); - })(), - logger: console, - }; - } - destroy() { - this.config?.httpAgent?.destroy(); - this.config?.httpsAgent?.destroy(); - } - async handle(request, { abortSignal, requestTimeout } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - return new Promise((_resolve, _reject) => { - let writeRequestBodyPromise = undefined; - const timeouts = []; - const resolve = async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _resolve(arg); - }; - const reject = async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _reject(arg); - }; - if (!this.config) { - throw new Error("Node HTTP request handler config is not resolved"); - } - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; - } - const isSSL = request.protocol === "https:"; - const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; - timeouts.push(timing.setTimeout(() => { - this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, this.config.logger); - }, this.config.socketAcquisitionWarningTimeout ?? - (this.config.requestTimeout ?? 2000) + (this.config.connectionTimeout ?? 1000))); - const queryString = querystringBuilder.buildQueryString(request.query || {}); - let auth = undefined; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}`; - } - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let hostname = request.hostname ?? ""; - if (hostname[0] === "[" && hostname.endsWith("]")) { - hostname = request.hostname.slice(1, -1); - } - else { - hostname = request.hostname; - } - const nodeHttpsOptions = { - headers: request.headers, - host: hostname, - method: request.method, - path, - port: request.port, - agent, - auth, - }; - const requestFunc = isSSL ? https.request : http.request; - const req = requestFunc(nodeHttpsOptions, (res) => { - const httpResponse = new protocolHttp.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 = new Error("Request aborted"); - abortError.name = "AbortError"; - 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 ?? this.config.requestTimeout; - timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); - timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, this.config.throwOnRequestTimeout, this.config.logger ?? console)); - timeouts.push(setSocketTimeout(req, reject, this.config.socketTimeout)); - const httpAgent = nodeHttpsOptions.agent; - if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { - timeouts.push(setSocketKeepAlive(req, { - keepAlive: httpAgent.keepAlive, - keepAliveMsecs: httpAgent.keepAliveMsecs, - })); - } - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout).catch((e) => { - timeouts.forEach(timing.clearTimeout); - return _reject(e); - }); - }); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value, - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } -} - -class NodeHttp2ConnectionPool { - sessions = []; - constructor(sessions) { - this.sessions = sessions ?? []; - } - poll() { - if (this.sessions.length > 0) { - return this.sessions.shift(); - } - } - offerLast(session) { - this.sessions.push(session); - } - contains(session) { - return this.sessions.includes(session); - } - remove(session) { - this.sessions = this.sessions.filter((s) => s !== session); - } - [Symbol.iterator]() { - return this.sessions[Symbol.iterator](); - } - destroy(connection) { - for (const session of this.sessions) { - if (session === connection) { - if (!session.destroyed) { - session.destroy(); - } - } - } - } -} - -class NodeHttp2ConnectionManager { - constructor(config) { - this.config = config; - if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { - throw new RangeError("maxConcurrency must be greater than zero."); - } - } - config; - sessionCache = new Map(); - lease(requestContext, connectionConfiguration) { - const url = this.getUrlString(requestContext); - const existingPool = this.sessionCache.get(url); - if (existingPool) { - const existingSession = existingPool.poll(); - if (existingSession && !this.config.disableConcurrency) { - return existingSession; - } - } - const session = http2.connect(url); - 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()); - } - }); - } - session.unref(); - const destroySessionCb = () => { - session.destroy(); - this.deleteSession(url, session); - }; - session.on("goaway", destroySessionCb); - session.on("error", destroySessionCb); - session.on("frameError", destroySessionCb); - session.on("close", () => this.deleteSession(url, session)); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); - } - const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); - connectionPool.offerLast(session); - this.sessionCache.set(url, connectionPool); - return session; - } - deleteSession(authority, session) { - const existingConnectionPool = this.sessionCache.get(authority); - if (!existingConnectionPool) { - return; - } - if (!existingConnectionPool.contains(session)) { - return; - } - existingConnectionPool.remove(session); - this.sessionCache.set(authority, existingConnectionPool); - } - release(requestContext, session) { - const cacheKey = this.getUrlString(requestContext); - this.sessionCache.get(cacheKey)?.offerLast(session); - } - destroy() { - for (const [key, connectionPool] of this.sessionCache) { - for (const session of connectionPool) { - if (!session.destroyed) { - session.destroy(); - } - connectionPool.remove(session); - } - this.sessionCache.delete(key); - } - } - setMaxConcurrentStreams(maxConcurrentStreams) { - if (maxConcurrentStreams && maxConcurrentStreams <= 0) { - throw new RangeError("maxConcurrentStreams must be greater than zero."); - } - this.config.maxConcurrency = maxConcurrentStreams; - } - setDisableConcurrentStreams(disableConcurrentStreams) { - this.config.disableConcurrency = disableConcurrentStreams; - } - getUrlString(request) { - return request.destination.toString(); - } -} - -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 } = {}) { - if (!this.config) { - this.config = await this.configProvider; - this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); - if (this.config.maxConcurrentStreams) { - this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); - } - } - const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; - 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 = new Error("Request aborted"); - abortError.name = "AbortError"; - 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 session = this.connectionManager.lease(requestContext, { - requestTimeout: this.config?.sessionTimeout, - disableConcurrentStreams: disableConcurrentStreams || false, - }); - const rejectWithDestroy = (err) => { - if (disableConcurrentStreams) { - this.destroySession(session); - } - fulfilled = true; - reject(err); - }; - const queryString = querystringBuilder.buildQueryString(query || {}); - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - const req = session.request({ - ...request.headers, - [http2.constants.HTTP2_HEADER_PATH]: path, - [http2.constants.HTTP2_HEADER_METHOD]: method, - }); - session.ref(); - req.on("response", (headers) => { - const httpResponse = new protocolHttp.HttpResponse({ - statusCode: headers[":status"] || -1, - headers: getTransformedHeaders(headers), - body: req, - }); - fulfilled = true; - resolve({ response: httpResponse }); - if (disableConcurrentStreams) { - session.close(); - this.connectionManager.deleteSession(authority, session); - } - }); - if (effectiveRequestTimeout) { - req.setTimeout(effectiveRequestTimeout, () => { - req.close(); - const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); - timeoutError.name = "TimeoutError"; - rejectWithDestroy(timeoutError); - }); - } - if (abortSignal) { - const onAbort = () => { - req.close(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - rejectWithDestroy(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; - } - } - req.on("frameError", (type, code, id) => { - rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); - }); - req.on("error", rejectWithDestroy); - req.on("aborted", () => { - rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); - }); - req.on("close", () => { - session.unref(); - if (disableConcurrentStreams) { - session.destroy(); - } - if (!fulfilled) { - rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); - } - }); - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); - }); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value, - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } - destroySession(session) { - if (!session.destroyed) { - session.destroy(); - } - } -} - -class Collector extends stream.Writable { - bufferedBytes = []; - _write(chunk, encoding, callback) { - this.bufferedBytes.push(chunk); - callback(); - } -} - -const streamCollector = (stream) => { - if (isReadableStreamInstance(stream)) { - return collectReadableStream(stream); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); - resolve(bytes); - }); - }); -}; -const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; -async function collectReadableStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} - -exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; -exports.NodeHttp2Handler = NodeHttp2Handler; -exports.NodeHttpHandler = NodeHttpHandler; -exports.streamCollector = streamCollector; - - -/***/ }), - -/***/ 56855: -/***/ ((__unused_webpack_module, exports) => { - - - -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); - } -} - -const 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; -}; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const 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; - }; -}; - -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; - - -/***/ }), - -/***/ 8821: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var types = __webpack_require__(40367); - -const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - }, - }; -}; -const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler(), - }; -}; - -class Field { - name; - kind; - values; - constructor({ name, kind = types.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); - } -} - -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"; - } -} - -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} - -exports.Field = Field; -exports.Fields = Fields; -exports.HttpRequest = HttpRequest; -exports.HttpResponse = HttpResponse; -exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; -exports.isValidHostname = isValidHostname; -exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; - - -/***/ }), - -/***/ 71649: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var utilUriEscape = __webpack_require__(77291); - -function buildQueryString(query) { - const parts = []; - for (let key of Object.keys(query).sort()) { - const value = query[key]; - key = utilUriEscape.escapeUri(key); - if (Array.isArray(value)) { - for (let i = 0, iLen = value.length; i < iLen; i++) { - parts.push(`${key}=${utilUriEscape.escapeUri(value[i])}`); - } - } - else { - let qsEntry = key; - if (value || typeof value === "string") { - qsEntry += `=${utilUriEscape.escapeUri(value)}`; - } - parts.push(qsEntry); - } - } - return parts.join("&"); -} - -exports.buildQueryString = buildQueryString; - - -/***/ }), - -/***/ 40367: -/***/ ((__unused_webpack_module, exports) => { - - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - -/***/ }), - -/***/ 3825: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromBase64 = void 0; -const util_buffer_from_1 = __webpack_require__(98832); -const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; -const 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 = (0, util_buffer_from_1.fromString)(input, "base64"); - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); -}; -exports.fromBase64 = fromBase64; - - -/***/ }), - -/***/ 2564: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var fromBase64 = __webpack_require__(3825); -var toBase64 = __webpack_require__(54764); - - - -Object.keys(fromBase64).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return fromBase64[k]; } - }); -}); -Object.keys(toBase64).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return toBase64[k]; } - }); -}); - - -/***/ }), - -/***/ 54764: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toBase64 = void 0; -const util_buffer_from_1 = __webpack_require__(98832); -const util_utf8_1 = __webpack_require__(73676); -const toBase64 = (_input) => { - let input; - if (typeof _input === "string") { - input = (0, util_utf8_1.fromUtf8)(_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 (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); -}; -exports.toBase64 = toBase64; - - -/***/ }), - -/***/ 98832: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var isArrayBuffer = __webpack_require__(91447); -var buffer = __webpack_require__(20181); - -const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { - if (!isArrayBuffer.isArrayBuffer(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); - } - return buffer.Buffer.from(input, offset, length); -}; -const 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.Buffer.from(input, encoding) : buffer.Buffer.from(input); -}; - -exports.fromArrayBuffer = fromArrayBuffer; -exports.fromString = fromString; - - -/***/ }), - -/***/ 48686: -/***/ ((__unused_webpack_module, exports) => { - - - -const SHORT_TO_HEX = {}; -const 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; -} - -exports.fromHex = fromHex; -exports.toHex = toHex; - - -/***/ }), - -/***/ 16359: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ByteArrayCollector = void 0; -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; - } -} -exports.ByteArrayCollector = ByteArrayCollector; - - -/***/ }), - -/***/ 95068: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function () { }; -class ChecksumStream extends ReadableStreamRef { -} -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 59138: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const util_base64_1 = __webpack_require__(2564); -const stream_1 = __webpack_require__(2203); -class ChecksumStream extends stream_1.Duplex { - expectedChecksum; - checksumSourceLocation; - checksum; - source; - base64Encoder; - constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) { - super(); - if (typeof source.pipe === "function") { - this.source = source; - } - else { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); - } - this.base64Encoder = base64Encoder ?? util_base64_1.toBase64; - this.expectedChecksum = expectedChecksum; - this.checksum = checksum; - this.checksumSourceLocation = checksumSourceLocation; - this.source.pipe(this); - } - _read(size) { } - _write(chunk, encoding, callback) { - try { - this.checksum.update(chunk); - this.push(chunk); - } - catch (e) { - return callback(e); - } - return callback(); - } - async _final(callback) { - try { - const digest = await this.checksum.digest(); - const received = this.base64Encoder(digest); - if (this.expectedChecksum !== received) { - return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + - ` in response header "${this.checksumSourceLocation}".`)); - } - } - catch (e) { - return callback(e); - } - this.push(null); - return callback(); - } -} -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 19784: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = void 0; -const util_base64_1 = __webpack_require__(2564); -const stream_type_check_1 = __webpack_require__(89855); -const ChecksumStream_browser_1 = __webpack_require__(95068); -const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => { - if (!(0, stream_type_check_1.isReadableStream)(source)) { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); - } - const encoder = base64Encoder ?? util_base64_1.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_browser_1.ChecksumStream.prototype); - return readable; -}; -exports.createChecksumStream = createChecksumStream; - - -/***/ }), - -/***/ 57918: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = createChecksumStream; -const stream_type_check_1 = __webpack_require__(89855); -const ChecksumStream_1 = __webpack_require__(59138); -const createChecksumStream_browser_1 = __webpack_require__(19784); -function createChecksumStream(init) { - if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { - return (0, createChecksumStream_browser_1.createChecksumStream)(init); - } - return new ChecksumStream_1.ChecksumStream(init); -} - - -/***/ }), - -/***/ 66738: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = createBufferedReadable; -const node_stream_1 = __webpack_require__(57075); -const ByteArrayCollector_1 = __webpack_require__(16359); -const createBufferedReadableStream_1 = __webpack_require__(38802); -const stream_type_check_1 = __webpack_require__(89855); -function createBufferedReadable(upstream, size, logger) { - if ((0, stream_type_check_1.isReadableStream)(upstream)) { - return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger); - } - const downstream = new node_stream_1.Readable({ read() { } }); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = [ - "", - new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)), - new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))), - ]; - let mode = -1; - upstream.on("data", (chunk) => { - const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); - if (mode !== chunkMode) { - if (mode >= 0) { - downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - mode = chunkMode; - } - if (mode === -1) { - downstream.push(chunk); - return; - } - const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); - bytesSeen += chunkSize; - const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - downstream.push(chunk); - } - else { - const newSize = (0, createBufferedReadableStream_1.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((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - } - }); - upstream.on("end", () => { - if (mode !== -1) { - const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); - if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { - downstream.push(remainder); - } - } - downstream.push(null); - }); - return downstream; -} - - -/***/ }), - -/***/ 38802: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = void 0; -exports.createBufferedReadableStream = createBufferedReadableStream; -exports.merge = merge; -exports.flush = flush; -exports.sizeOf = sizeOf; -exports.modeOf = modeOf; -const ByteArrayCollector_1 = __webpack_require__(16359); -function createBufferedReadableStream(upstream, size, logger) { - const reader = upstream.getReader(); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = ["", new ByteArrayCollector_1.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, - }); -} -exports.createBufferedReadable = createBufferedReadableStream; -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; -} - - -/***/ }), - -/***/ 23927: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getAwsChunkedEncodingStream = void 0; -const stream_1 = __webpack_require__(2203); -const getAwsChunkedEncodingStream = (readableStream, options) => { - const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; - const checksumRequired = base64Encoder !== undefined && - checksumAlgorithmFn !== undefined && - checksumLocationName !== undefined && - streamHasher !== undefined; - const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; - const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } }); - readableStream.on("data", (data) => { - const length = bodyLengthChecker(data) || 0; - awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); - awsChunkedEncodingStream.push(data); - awsChunkedEncodingStream.push("\r\n"); - }); - readableStream.on("end", async () => { - awsChunkedEncodingStream.push(`0\r\n`); - if (checksumRequired) { - const checksum = base64Encoder(await digest); - awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); - awsChunkedEncodingStream.push(`\r\n`); - } - awsChunkedEncodingStream.push(null); - }); - return awsChunkedEncodingStream; -}; -exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; - - -/***/ }), - -/***/ 75469: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = headStream; -async function headStream(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; -} - - -/***/ }), - -/***/ 15139: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = void 0; -const stream_1 = __webpack_require__(2203); -const headStream_browser_1 = __webpack_require__(75469); -const stream_type_check_1 = __webpack_require__(89855); -const headStream = (stream, bytes) => { - if ((0, stream_type_check_1.isReadableStream)(stream)) { - return (0, headStream_browser_1.headStream)(stream, bytes); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - collector.limit = bytes; - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.buffers)); - resolve(bytes); - }); - }); -}; -exports.headStream = headStream; -class Collector extends stream_1.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(); - } -} - - -/***/ }), - -/***/ 35121: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var utilBase64 = __webpack_require__(2564); -var utilUtf8 = __webpack_require__(73676); -var ChecksumStream = __webpack_require__(59138); -var createChecksumStream = __webpack_require__(57918); -var createBufferedReadable = __webpack_require__(66738); -var getAwsChunkedEncodingStream = __webpack_require__(23927); -var headStream = __webpack_require__(15139); -var sdkStreamMixin = __webpack_require__(94202); -var splitStream = __webpack_require__(86557); -var streamTypeCheck = __webpack_require__(89855); - -class Uint8ArrayBlobAdapter extends Uint8Array { - static fromString(source, encoding = "utf-8") { - if (typeof source === "string") { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source)); - } - return Uint8ArrayBlobAdapter.mutate(utilUtf8.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 utilBase64.toBase64(this); - } - return utilUtf8.toUtf8(this); - } -} - -exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter; -Object.keys(ChecksumStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return ChecksumStream[k]; } - }); -}); -Object.keys(createChecksumStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return createChecksumStream[k]; } - }); -}); -Object.keys(createBufferedReadable).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return createBufferedReadable[k]; } - }); -}); -Object.keys(getAwsChunkedEncodingStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getAwsChunkedEncodingStream[k]; } - }); -}); -Object.keys(headStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return headStream[k]; } - }); -}); -Object.keys(sdkStreamMixin).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return sdkStreamMixin[k]; } - }); -}); -Object.keys(splitStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return splitStream[k]; } - }); -}); -Object.keys(streamTypeCheck).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return streamTypeCheck[k]; } - }); -}); - - -/***/ }), - -/***/ 6324: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const fetch_http_handler_1 = __webpack_require__(91338); -const util_base64_1 = __webpack_require__(2564); -const util_hex_encoding_1 = __webpack_require__(48686); -const util_utf8_1 = __webpack_require__(73676); -const stream_type_check_1 = __webpack_require__(89855); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - if (!isBlobInstance(stream) && !(0, stream_type_check_1.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); - } - transformed = true; - return await (0, fetch_http_handler_1.streamCollector)(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.\n" + - "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: transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === "base64") { - return (0, util_base64_1.toBase64)(buf); - } - else if (encoding === "hex") { - return (0, util_hex_encoding_1.toHex)(buf); - } - else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { - return (0, util_utf8_1.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); - } - transformed = true; - if (isBlobInstance(stream)) { - return blobToWebStream(stream); - } - else if ((0, stream_type_check_1.isReadableStream)(stream)) { - return stream; - } - else { - throw new Error(`Cannot transform payload to web stream, got ${stream}`); - } - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; -const isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; - - -/***/ }), - -/***/ 94202: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const node_http_handler_1 = __webpack_require__(42402); -const util_buffer_from_1 = __webpack_require__(98832); -const stream_1 = __webpack_require__(2203); -const sdk_stream_mixin_browser_1 = __webpack_require__(6324); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - if (!(stream instanceof stream_1.Readable)) { - try { - return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); - } - catch (e) { - 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 (0, node_http_handler_1.streamCollector)(stream); - }; - return Object.assign(stream, { - transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === undefined || Buffer.isEncoding(encoding)) { - return (0, util_buffer_from_1.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 stream_1.Readable.toWeb !== "function") { - throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); - } - transformed = true; - return stream_1.Readable.toWeb(stream); - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; - - -/***/ }), - -/***/ 80155: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -async function splitStream(stream) { - if (typeof stream.stream === "function") { - stream = stream.stream(); - } - const readableStream = stream; - return readableStream.tee(); -} - - -/***/ }), - -/***/ 86557: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -const stream_1 = __webpack_require__(2203); -const splitStream_browser_1 = __webpack_require__(80155); -const stream_type_check_1 = __webpack_require__(89855); -async function splitStream(stream) { - if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) { - return (0, splitStream_browser_1.splitStream)(stream); - } - const stream1 = new stream_1.PassThrough(); - const stream2 = new stream_1.PassThrough(); - stream.pipe(stream1); - stream.pipe(stream2); - return [stream1, stream2]; -} - - -/***/ }), - -/***/ 89855: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isBlob = exports.isReadableStream = void 0; -const isReadableStream = (stream) => typeof ReadableStream === "function" && - (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream); -exports.isReadableStream = isReadableStream; -const isBlob = (blob) => { - return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob); -}; -exports.isBlob = isBlob; - - -/***/ }), - -/***/ 77291: -/***/ ((__unused_webpack_module, exports) => { - - - -const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); -const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; - -const escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/"); - -exports.escapeUri = escapeUri; -exports.escapeUriPath = escapeUriPath; - - -/***/ }), - -/***/ 73676: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var utilBufferFrom = __webpack_require__(98832); - -const fromUtf8 = (input) => { - const buf = utilBufferFrom.fromString(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); -}; - -const toUint8Array = (data) => { - if (typeof data === "string") { - return fromUtf8(data); - } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data); -}; - -const 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 utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); -}; - -exports.fromUtf8 = fromUtf8; -exports.toUint8Array = toUint8Array; -exports.toUtf8 = toUtf8; - - /***/ }) }; diff --git a/dist/630.index.js b/dist/630.index.js new file mode 100644 index 00000000..4dbfc535 --- /dev/null +++ b/dist/630.index.js @@ -0,0 +1,93 @@ +"use strict"; +exports.id = 630; +exports.ids = [630]; +exports.modules = { + +/***/ 15630: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var sharedIniFileLoader = __webpack_require__(93438); +var propertyProvider = __webpack_require__(1104); +var child_process = __webpack_require__(35317); +var util = __webpack_require__(39023); +var client = __webpack_require__(17582); + +const 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 }), + }; + client.setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w"); + return credentials; +}; + +const resolveProcessCredentials = async (profileName, profiles, logger) => { + const profile = profiles[profileName]; + if (profiles[profileName]) { + const credentialProcess = profile["credential_process"]; + if (credentialProcess !== undefined) { + const execPromise = util.promisify(sharedIniFileLoader.externalDataInterceptor?.getTokenRecord?.().exec ?? child_process.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 propertyProvider.CredentialsProviderError(error.message, { logger }); + } + } + else { + throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger }); + } + } + else { + throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, { + logger, + }); + } +}; + +const fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => { + init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess"); + const profiles = await sharedIniFileLoader.parseKnownFiles(init); + return resolveProcessCredentials(sharedIniFileLoader.getProfileName({ + profile: init.profile ?? callerClientConfig?.profile, + }), profiles, init.logger); +}; + +exports.fromProcess = fromProcess; + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/dist/654.index.js b/dist/654.index.js new file mode 100644 index 00000000..7083c5d8 --- /dev/null +++ b/dist/654.index.js @@ -0,0 +1,143 @@ +"use strict"; +exports.id = 654; +exports.ids = [654]; +exports.modules = { + +/***/ 77753: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromTokenFile = void 0; +const client_1 = __webpack_require__(17582); +const property_provider_1 = __webpack_require__(1104); +const shared_ini_file_loader_1 = __webpack_require__(93438); +const fs_1 = __webpack_require__(79896); +const fromWebToken_1 = __webpack_require__(92543); +const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; +const ENV_ROLE_ARN = "AWS_ROLE_ARN"; +const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; +const fromTokenFile = (init = {}) => async () => { + 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 property_provider_1.CredentialsProviderError("Web identity configuration not specified", { + logger: init.logger, + }); + } + const credentials = await (0, fromWebToken_1.fromWebToken)({ + ...init, + webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? + (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), + roleArn, + roleSessionName, + })(); + if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) { + (0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h"); + } + return credentials; +}; +exports.fromTokenFile = fromTokenFile; + + +/***/ }), + +/***/ 92543: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromWebToken = void 0; +const 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 } = await Promise.resolve().then(() => __importStar(__webpack_require__(31058))); + 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, + }); +}; +exports.fromWebToken = fromWebToken; + + +/***/ }), + +/***/ 47654: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var fromTokenFile = __webpack_require__(77753); +var fromWebToken = __webpack_require__(92543); + + + +Object.keys(fromTokenFile).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return fromTokenFile[k]; } + }); +}); +Object.keys(fromWebToken).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return fromWebToken[k]; } + }); +}); + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/dist/795.index.js b/dist/795.index.js new file mode 100644 index 00000000..26bceadb --- /dev/null +++ b/dist/795.index.js @@ -0,0 +1,234 @@ +"use strict"; +exports.id = 795; +exports.ids = [795]; +exports.modules = { + +/***/ 24815: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkUrl = void 0; +const property_provider_1 = __webpack_require__(1104); +const LOOPBACK_CIDR_IPv4 = "127.0.0.0/8"; +const LOOPBACK_CIDR_IPv6 = "::1/128"; +const ECS_CONTAINER_HOST = "169.254.170.2"; +const EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; +const EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; +const 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 property_provider_1.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 }); +}; +exports.checkUrl = checkUrl; + + +/***/ }), + +/***/ 57030: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromHttp = void 0; +const tslib_1 = __webpack_require__(61860); +const client_1 = __webpack_require__(17582); +const node_http_handler_1 = __webpack_require__(95493); +const property_provider_1 = __webpack_require__(1104); +const promises_1 = tslib_1.__importDefault(__webpack_require__(91943)); +const checkUrl_1 = __webpack_require__(24815); +const requestHelpers_1 = __webpack_require__(94604); +const retry_wrapper_1 = __webpack_require__(98692); +const AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; +const DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; +const AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; +const AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; +const AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; +const 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("awsContainerCredentialsFullUri will take precedence."); + } + if (token && tokenFile) { + warn("@aws-sdk/credential-provider-http: " + + "you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); + warn("awsContainerAuthorizationToken will take precedence."); + } + if (full) { + host = full; + } + else if (relative) { + host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; + } + else { + throw new property_provider_1.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); + (0, checkUrl_1.checkUrl)(url, options.logger); + const requestHandler = node_http_handler_1.NodeHttpHandler.create({ + requestTimeout: options.timeout ?? 1000, + connectionTimeout: options.timeout ?? 1000, + }); + return (0, retry_wrapper_1.retryWrapper)(async () => { + const request = (0, requestHelpers_1.createGetRequest)(url); + if (token) { + request.headers.Authorization = token; + } + else if (tokenFile) { + request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); + } + try { + const result = await requestHandler.handle(request); + return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_HTTP", "z")); + } + catch (e) { + throw new property_provider_1.CredentialsProviderError(String(e), { logger: options.logger }); + } + }, options.maxRetries ?? 3, options.timeout ?? 1000); +}; +exports.fromHttp = fromHttp; + + +/***/ }), + +/***/ 94604: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createGetRequest = createGetRequest; +exports.getCredentials = getCredentials; +const property_provider_1 = __webpack_require__(1104); +const protocol_http_1 = __webpack_require__(13494); +const smithy_client_1 = __webpack_require__(61411); +const util_stream_1 = __webpack_require__(71914); +function createGetRequest(url) { + return new protocol_http_1.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 = (0, util_stream_1.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 property_provider_1.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: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration), + }; + } + if (response.statusCode >= 400 && response.statusCode < 500) { + let parsedBody = {}; + try { + parsedBody = JSON.parse(str); + } + catch (e) { } + throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), { + Code: parsedBody.Code, + Message: parsedBody.Message, + }); + } + throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }); +} + + +/***/ }), + +/***/ 98692: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.retryWrapper = void 0; +const 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(); + }; +}; +exports.retryWrapper = retryWrapper; + + +/***/ }), + +/***/ 60795: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +var __webpack_unused_export__; + +__webpack_unused_export__ = ({ value: true }); +exports.fromHttp = void 0; +var fromHttp_1 = __webpack_require__(57030); +Object.defineProperty(exports, "fromHttp", ({ enumerable: true, get: function () { return fromHttp_1.fromHttp; } })); + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/dist/869.index.js b/dist/869.index.js index abb9e14d..9dc6e6de 100644 --- a/dist/869.index.js +++ b/dist/869.index.js @@ -3,31 +3,31 @@ exports.id = 869; exports.ids = [869]; exports.modules = { -/***/ 75869: +/***/ 5869: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { -var sharedIniFileLoader = __webpack_require__(46459); -var propertyProvider = __webpack_require__(78215); +var sharedIniFileLoader = __webpack_require__(4964); +var propertyProvider = __webpack_require__(1238); var client = __webpack_require__(5152); const resolveCredentialSource = (credentialSource, profileName, logger) => { const sourceProvidersMap = { EcsContainer: async (options) => { - const { fromHttp } = await __webpack_require__.e(/* import() */ 605).then(__webpack_require__.bind(__webpack_require__, 98605)); - const { fromContainerMetadata } = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 40566, 19)); + const { fromHttp } = await __webpack_require__.e(/* import() */ 605).then(__webpack_require__.bind(__webpack_require__, 8605)); + const { fromContainerMetadata } = await __webpack_require__.e(/* import() */ 566).then(__webpack_require__.t.bind(__webpack_require__, 566, 19)); logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"); return async () => propertyProvider.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider); }, Ec2InstanceMetadata: async (options) => { logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata"); - const { fromInstanceMetadata } = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 40566, 19)); + const { fromInstanceMetadata } = await __webpack_require__.e(/* import() */ 566).then(__webpack_require__.t.bind(__webpack_require__, 566, 19)); return async () => fromInstanceMetadata(options)().then(setNamedProvider); }, Environment: async (options) => { logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment"); - const { fromEnv } = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 55606, 19)); + const { fromEnv } = await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 5606, 19)); return async () => fromEnv(options)().then(setNamedProvider); }, }; @@ -69,7 +69,7 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, visi const profileData = profiles[profileName]; const { source_profile, region } = profileData; if (!options.roleAssumer) { - const { getDefaultRoleAssumer } = await Promise.all(/* import() */[__webpack_require__.e(755), __webpack_require__.e(136)]).then(__webpack_require__.t.bind(__webpack_require__, 1136, 23)); + const { getDefaultRoleAssumer } = await __webpack_require__.e(/* import() */ 136).then(__webpack_require__.t.bind(__webpack_require__, 1136, 23)); options.roleAssumer = getDefaultRoleAssumer({ ...options.clientConfig, credentialProviderLogger: options.logger, @@ -118,13 +118,13 @@ const isCredentialSourceWithoutRoleArn = (section) => { }; const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string"; -const resolveProcessCredentials = async (options, profile) => __webpack_require__.e(/* import() */ 360).then(__webpack_require__.t.bind(__webpack_require__, 75360, 19)).then(({ fromProcess }) => fromProcess({ +const resolveProcessCredentials = async (options, profile) => __webpack_require__.e(/* import() */ 360).then(__webpack_require__.t.bind(__webpack_require__, 5360, 19)).then(({ fromProcess }) => fromProcess({ ...options, profile, })().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v"))); const resolveSsoCredentials = async (profile, profileData, options = {}) => { - const { fromSSO } = await __webpack_require__.e(/* import() */ 998).then(__webpack_require__.t.bind(__webpack_require__, 60998, 19)); + const { fromSSO } = await __webpack_require__.e(/* import() */ 998).then(__webpack_require__.t.bind(__webpack_require__, 998, 19)); return fromSSO({ profile, logger: options.logger, @@ -169,7 +169,7 @@ const isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1; -const resolveWebIdentityCredentials = async (profile, options) => Promise.all(/* import() */[__webpack_require__.e(755), __webpack_require__.e(136), __webpack_require__.e(956)]).then(__webpack_require__.t.bind(__webpack_require__, 29956, 23)).then(({ fromTokenFile }) => fromTokenFile({ +const resolveWebIdentityCredentials = async (profile, options) => Promise.all(/* import() */[__webpack_require__.e(136), __webpack_require__.e(956)]).then(__webpack_require__.t.bind(__webpack_require__, 9956, 23)).then(({ fromTokenFile }) => fromTokenFile({ webIdentityTokenFile: profile.web_identity_token_file, roleArn: profile.role_arn, roleSessionName: profile.role_session_name, @@ -219,524 +219,6 @@ const fromIni = (_init = {}) => async ({ callerClientConfig } = {}) => { exports.fromIni = fromIni; -/***/ }), - -/***/ 78215: -/***/ ((__unused_webpack_module, exports) => { - - - -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); - } -} - -const 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; -}; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const 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; - }; -}; - -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; - - -/***/ }), - -/***/ 27981: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __webpack_require__(70857); -const path_1 = __webpack_require__(16928); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; -}; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; -}; -exports.getHomeDir = getHomeDir; - - -/***/ }), - -/***/ 68282: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __webpack_require__(76982); -const path_1 = __webpack_require__(16928); -const getHomeDir_1 = __webpack_require__(27981); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); -}; -exports.getSSOTokenFilepath = getSSOTokenFilepath; - - -/***/ }), - -/***/ 33517: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; -const fs_1 = __webpack_require__(79896); -const getSSOTokenFilepath_1 = __webpack_require__(68282); -const { readFile } = fs_1.promises; -exports.tokenIntercept = {}; -const getSSOTokenFromFile = async (id) => { - if (exports.tokenIntercept[id]) { - return exports.tokenIntercept[id]; - } - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); -}; -exports.getSSOTokenFromFile = getSSOTokenFromFile; - - -/***/ }), - -/***/ 46459: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var getHomeDir = __webpack_require__(27981); -var getSSOTokenFilepath = __webpack_require__(68282); -var getSSOTokenFromFile = __webpack_require__(33517); -var path = __webpack_require__(16928); -var types = __webpack_require__(20351); -var slurpFile = __webpack_require__(31221); - -const ENV_PROFILE = "AWS_PROFILE"; -const DEFAULT_PROFILE = "default"; -const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; - -const CONFIG_PREFIX_SEPARATOR = "."; - -const getConfigData = (data) => Object.entries(data) - .filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; - } - return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}) - .reduce((acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; -}, { - ...(data.default && { default: data.default }), -}); - -const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); - -const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); - -const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -const profileNameBlockList = ["__proto__", "profile __proto__"]; -const 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(types.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; -}; - -const swallowError$1 = () => ({}); -const loadSharedConfigFiles = async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = getHomeDir.getHomeDir(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = path.join(homeDir, filepath.slice(2)); - } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); - } - const parsedFiles = await Promise.all([ - slurpFile.slurpFile(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .then(getConfigData) - .catch(swallowError$1), - slurpFile.slurpFile(resolvedFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .catch(swallowError$1), - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1], - }; -}; - -const getSsoSessionData = (data) => Object.entries(data) - .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) - .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); - -const swallowError = () => ({}); -const loadSsoSessionData = async (init = {}) => slurpFile.slurpFile(init.configFilepath ?? getConfigFilepath()) - .then(parseIni) - .then(getSsoSessionData) - .catch(swallowError); - -const 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; -}; - -const parseKnownFiles = async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); -}; - -const externalDataInterceptor = { - getFileRecord() { - return slurpFile.fileIntercept; - }, - interceptFile(path, contents) { - slurpFile.fileIntercept[path] = Promise.resolve(contents); - }, - getTokenRecord() { - return getSSOTokenFromFile.tokenIntercept; - }, - interceptToken(id, contents) { - getSSOTokenFromFile.tokenIntercept[id] = contents; - }, -}; - -Object.defineProperty(exports, "getSSOTokenFromFile", ({ - enumerable: true, - get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } -})); -exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; -exports.DEFAULT_PROFILE = DEFAULT_PROFILE; -exports.ENV_PROFILE = ENV_PROFILE; -exports.externalDataInterceptor = externalDataInterceptor; -exports.getProfileName = getProfileName; -exports.loadSharedConfigFiles = loadSharedConfigFiles; -exports.loadSsoSessionData = loadSsoSessionData; -exports.parseKnownFiles = parseKnownFiles; -Object.keys(getHomeDir).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getHomeDir[k]; } - }); -}); -Object.keys(getSSOTokenFilepath).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getSSOTokenFilepath[k]; } - }); -}); - - -/***/ }), - -/***/ 31221: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = void 0; -const fs_1 = __webpack_require__(79896); -const { readFile } = fs_1.promises; -exports.filePromisesHash = {}; -exports.fileIntercept = {}; -const slurpFile = (path, options) => { - if (exports.fileIntercept[path] !== undefined) { - return exports.fileIntercept[path]; - } - if (!exports.filePromisesHash[path] || options?.ignoreCache) { - exports.filePromisesHash[path] = readFile(path, "utf8"); - } - return exports.filePromisesHash[path]; -}; -exports.slurpFile = slurpFile; - - -/***/ }), - -/***/ 20351: -/***/ ((__unused_webpack_module, exports) => { - - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - /***/ }) }; diff --git a/dist/956.index.js b/dist/956.index.js index ad200dfc..35bfc9e7 100644 --- a/dist/956.index.js +++ b/dist/956.index.js @@ -3,21 +3,21 @@ exports.id = 956; exports.ids = [956]; exports.modules = { -/***/ 88079: +/***/ 8079: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fromTokenFile = void 0; const client_1 = __webpack_require__(5152); -const property_provider_1 = __webpack_require__(51264); -const shared_ini_file_loader_1 = __webpack_require__(3022); -const fs_1 = __webpack_require__(79896); -const fromWebToken_1 = __webpack_require__(34453); +const property_provider_1 = __webpack_require__(1238); +const shared_ini_file_loader_1 = __webpack_require__(4964); +const fs_1 = __webpack_require__(9896); +const fromWebToken_1 = __webpack_require__(4453); const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; const ENV_ROLE_ARN = "AWS_ROLE_ARN"; const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; -const fromTokenFile = (init = {}) => async () => { +const 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]; @@ -33,7 +33,7 @@ const fromTokenFile = (init = {}) => async () => { (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), roleArn, roleSessionName, - })(); + })(awsIdentityProperties); if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) { (0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h"); } @@ -44,7 +44,7 @@ exports.fromTokenFile = fromTokenFile; /***/ }), -/***/ 34453: +/***/ 4453: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { @@ -113,13 +113,13 @@ exports.fromWebToken = fromWebToken; /***/ }), -/***/ 29956: +/***/ 9956: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { -var fromTokenFile = __webpack_require__(88079); -var fromWebToken = __webpack_require__(34453); +var fromTokenFile = __webpack_require__(8079); +var fromWebToken = __webpack_require__(4453); @@ -137,524 +137,6 @@ Object.keys(fromWebToken).forEach(function (k) { }); -/***/ }), - -/***/ 51264: -/***/ ((__unused_webpack_module, exports) => { - - - -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); - } -} - -const 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; -}; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const 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; - }; -}; - -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; - - -/***/ }), - -/***/ 56442: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __webpack_require__(70857); -const path_1 = __webpack_require__(16928); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; -}; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; -}; -exports.getHomeDir = getHomeDir; - - -/***/ }), - -/***/ 77075: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __webpack_require__(76982); -const path_1 = __webpack_require__(16928); -const getHomeDir_1 = __webpack_require__(56442); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); -}; -exports.getSSOTokenFilepath = getSSOTokenFilepath; - - -/***/ }), - -/***/ 82112: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; -const fs_1 = __webpack_require__(79896); -const getSSOTokenFilepath_1 = __webpack_require__(77075); -const { readFile } = fs_1.promises; -exports.tokenIntercept = {}; -const getSSOTokenFromFile = async (id) => { - if (exports.tokenIntercept[id]) { - return exports.tokenIntercept[id]; - } - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); -}; -exports.getSSOTokenFromFile = getSSOTokenFromFile; - - -/***/ }), - -/***/ 3022: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var getHomeDir = __webpack_require__(56442); -var getSSOTokenFilepath = __webpack_require__(77075); -var getSSOTokenFromFile = __webpack_require__(82112); -var path = __webpack_require__(16928); -var types = __webpack_require__(12028); -var slurpFile = __webpack_require__(58552); - -const ENV_PROFILE = "AWS_PROFILE"; -const DEFAULT_PROFILE = "default"; -const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; - -const CONFIG_PREFIX_SEPARATOR = "."; - -const getConfigData = (data) => Object.entries(data) - .filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; - } - return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}) - .reduce((acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; -}, { - ...(data.default && { default: data.default }), -}); - -const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); - -const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); - -const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -const profileNameBlockList = ["__proto__", "profile __proto__"]; -const 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(types.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; -}; - -const swallowError$1 = () => ({}); -const loadSharedConfigFiles = async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = getHomeDir.getHomeDir(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = path.join(homeDir, filepath.slice(2)); - } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); - } - const parsedFiles = await Promise.all([ - slurpFile.slurpFile(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .then(getConfigData) - .catch(swallowError$1), - slurpFile.slurpFile(resolvedFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .catch(swallowError$1), - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1], - }; -}; - -const getSsoSessionData = (data) => Object.entries(data) - .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) - .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); - -const swallowError = () => ({}); -const loadSsoSessionData = async (init = {}) => slurpFile.slurpFile(init.configFilepath ?? getConfigFilepath()) - .then(parseIni) - .then(getSsoSessionData) - .catch(swallowError); - -const 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; -}; - -const parseKnownFiles = async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); -}; - -const externalDataInterceptor = { - getFileRecord() { - return slurpFile.fileIntercept; - }, - interceptFile(path, contents) { - slurpFile.fileIntercept[path] = Promise.resolve(contents); - }, - getTokenRecord() { - return getSSOTokenFromFile.tokenIntercept; - }, - interceptToken(id, contents) { - getSSOTokenFromFile.tokenIntercept[id] = contents; - }, -}; - -Object.defineProperty(exports, "getSSOTokenFromFile", ({ - enumerable: true, - get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } -})); -exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; -exports.DEFAULT_PROFILE = DEFAULT_PROFILE; -exports.ENV_PROFILE = ENV_PROFILE; -exports.externalDataInterceptor = externalDataInterceptor; -exports.getProfileName = getProfileName; -exports.loadSharedConfigFiles = loadSharedConfigFiles; -exports.loadSsoSessionData = loadSsoSessionData; -exports.parseKnownFiles = parseKnownFiles; -Object.keys(getHomeDir).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getHomeDir[k]; } - }); -}); -Object.keys(getSSOTokenFilepath).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getSSOTokenFilepath[k]; } - }); -}); - - -/***/ }), - -/***/ 58552: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = void 0; -const fs_1 = __webpack_require__(79896); -const { readFile } = fs_1.promises; -exports.filePromisesHash = {}; -exports.fileIntercept = {}; -const slurpFile = (path, options) => { - if (exports.fileIntercept[path] !== undefined) { - return exports.fileIntercept[path]; - } - if (!exports.filePromisesHash[path] || options?.ignoreCache) { - exports.filePromisesHash[path] = readFile(path, "utf8"); - } - return exports.filePromisesHash[path]; -}; -exports.slurpFile = slurpFile; - - -/***/ }), - -/***/ 12028: -/***/ ((__unused_webpack_module, exports) => { - - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - /***/ }) }; diff --git a/dist/998.index.js b/dist/998.index.js index c1f729b6..b3d43475 100644 --- a/dist/998.index.js +++ b/dist/998.index.js @@ -3,14 +3,14 @@ exports.id = 998; exports.ids = [998]; exports.modules = { -/***/ 62041: +/***/ 2041: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0; const core_1 = __webpack_require__(8704); -const util_middleware_1 = __webpack_require__(26252); +const util_middleware_1 = __webpack_require__(6324); const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => { return { operation: (0, util_middleware_1.getSmithyContext)(context).operation, @@ -78,15 +78,15 @@ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; /***/ }), -/***/ 13903: +/***/ 3903: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __webpack_require__(83068); -const util_endpoints_2 = __webpack_require__(79674); -const ruleset_1 = __webpack_require__(41308); +const util_endpoints_1 = __webpack_require__(3068); +const util_endpoints_2 = __webpack_require__(9674); +const ruleset_1 = __webpack_require__(1308); const cache = new util_endpoints_2.EndpointCache({ size: 50, params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], @@ -103,40 +103,40 @@ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunct /***/ }), -/***/ 41308: +/***/ 1308: /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ruleSet = void 0; const u = "required", v = "fn", w = "argv", x = "ref"; -const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "string" }, j = { [u]: true, "default": false, "type": "boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; exports.ruleSet = _data; /***/ }), -/***/ 62054: +/***/ 2054: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { -var middlewareHostHeader = __webpack_require__(52590); -var middlewareLogger = __webpack_require__(85242); -var middlewareRecursionDetection = __webpack_require__(81568); -var middlewareUserAgent = __webpack_require__(32959); -var configResolver = __webpack_require__(39316); -var core = __webpack_require__(3402); -var middlewareContentLength = __webpack_require__(47212); -var middlewareEndpoint = __webpack_require__(88075); -var middlewareRetry = __webpack_require__(19618); -var smithyClient = __webpack_require__(61411); -var httpAuthSchemeProvider = __webpack_require__(62041); -var runtimeConfig = __webpack_require__(82696); -var regionConfigResolver = __webpack_require__(36463); -var protocolHttp = __webpack_require__(46572); -var middlewareSerde = __webpack_require__(4783); +var middlewareHostHeader = __webpack_require__(2590); +var middlewareLogger = __webpack_require__(5242); +var middlewareRecursionDetection = __webpack_require__(1568); +var middlewareUserAgent = __webpack_require__(2959); +var configResolver = __webpack_require__(9316); +var core = __webpack_require__(402); +var middlewareContentLength = __webpack_require__(7212); +var middlewareEndpoint = __webpack_require__(99); +var middlewareRetry = __webpack_require__(9618); +var smithyClient = __webpack_require__(1411); +var httpAuthSchemeProvider = __webpack_require__(2041); +var runtimeConfig = __webpack_require__(2696); +var regionConfigResolver = __webpack_require__(6463); +var protocolHttp = __webpack_require__(2356); +var middlewareSerde = __webpack_require__(3255); var core$1 = __webpack_require__(8704); const resolveClientEndpointParameters = (options) => { @@ -631,27 +631,27 @@ exports.paginateListAccounts = paginateListAccounts; /***/ }), -/***/ 82696: +/***/ 2696: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; -const tslib_1 = __webpack_require__(61860); -const package_json_1 = tslib_1.__importDefault(__webpack_require__(45188)); +const tslib_1 = __webpack_require__(1860); +const package_json_1 = tslib_1.__importDefault(__webpack_require__(5188)); const core_1 = __webpack_require__(8704); -const util_user_agent_node_1 = __webpack_require__(51656); -const config_resolver_1 = __webpack_require__(39316); +const util_user_agent_node_1 = __webpack_require__(1656); +const config_resolver_1 = __webpack_require__(9316); const hash_node_1 = __webpack_require__(5092); -const middleware_retry_1 = __webpack_require__(19618); -const node_config_provider_1 = __webpack_require__(50240); -const node_http_handler_1 = __webpack_require__(60967); -const util_body_length_node_1 = __webpack_require__(13638); -const util_retry_1 = __webpack_require__(15518); +const middleware_retry_1 = __webpack_require__(9618); +const node_config_provider_1 = __webpack_require__(5704); +const node_http_handler_1 = __webpack_require__(1279); +const util_body_length_node_1 = __webpack_require__(3638); +const util_retry_1 = __webpack_require__(5518); const runtimeConfig_shared_1 = __webpack_require__(8073); -const smithy_client_1 = __webpack_require__(61411); -const util_defaults_mode_node_1 = __webpack_require__(15435); -const smithy_client_2 = __webpack_require__(61411); +const smithy_client_1 = __webpack_require__(1411); +const util_defaults_mode_node_1 = __webpack_require__(5435); +const smithy_client_2 = __webpack_require__(1411); const getRuntimeConfig = (config) => { (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); @@ -699,13 +699,13 @@ exports.getRuntimeConfig = getRuntimeConfig; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; const core_1 = __webpack_require__(8704); -const core_2 = __webpack_require__(3402); -const smithy_client_1 = __webpack_require__(61411); -const url_parser_1 = __webpack_require__(38006); -const util_base64_1 = __webpack_require__(76249); -const util_utf8_1 = __webpack_require__(55969); -const httpAuthSchemeProvider_1 = __webpack_require__(62041); -const endpointResolver_1 = __webpack_require__(13903); +const core_2 = __webpack_require__(402); +const smithy_client_1 = __webpack_require__(1411); +const url_parser_1 = __webpack_require__(4494); +const util_base64_1 = __webpack_require__(8385); +const util_utf8_1 = __webpack_require__(1577); +const httpAuthSchemeProvider_1 = __webpack_require__(2041); +const endpointResolver_1 = __webpack_require__(3903); const getRuntimeConfig = (config) => { return { apiVersion: "2019-06-10", @@ -739,5775 +739,16 @@ exports.getRuntimeConfig = getRuntimeConfig; /***/ }), -/***/ 3402: +/***/ 7523: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { -var types = __webpack_require__(42394); -var utilMiddleware = __webpack_require__(26252); -var middlewareSerde = __webpack_require__(4783); -var protocolHttp = __webpack_require__(46572); -var protocols = __webpack_require__(50678); - -const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); - -const 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; -} -const 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 = utilMiddleware.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("\n")); - } - return next(args); -}; - -const httpAuthSchemeEndpointRuleSetMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: "endpointV2Middleware", -}; -const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider, - }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); - }, -}); - -const httpAuthSchemeMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: middlewareSerde.serializerMiddlewareOption.name, -}; -const getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider, - }), httpAuthSchemeMiddlewareOptions); - }, -}); - -const defaultErrorHandler = (signingProperties) => (error) => { - throw error; -}; -const defaultSuccessHandler = (httpResponse, signingProperties) => { }; -const httpSigningMiddleware = (config) => (next, context) => async (args) => { - if (!protocolHttp.HttpRequest.isInstance(args.request)) { - return next(args); - } - const smithyContext = utilMiddleware.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; -}; - -const httpSigningMiddlewareOptions = { - step: "finalizeRequest", - tags: ["HTTP_SIGNING"], - name: "httpSigningMiddleware", - aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], - override: true, - relation: "after", - toMiddleware: "retryMiddleware", -}; -const getHttpSigningPlugin = (config) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpSigningMiddleware(), httpSigningMiddlewareOptions); - }, -}); - -const normalizeProvider = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; -}; - -const 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 undefined; - }; -} -const get = (fromObject, path) => { - let cursor = fromObject; - const pathComponents = path.split("."); - for (const step of pathComponents) { - if (!cursor || typeof cursor !== "object") { - return undefined; - } - 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, value] of Object.entries(config)) { - 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 = protocolHttp.HttpRequest.clone(httpRequest); - if (signingProperties.in === types.HttpApiKeyAuthLocation.QUERY) { - clonedRequest.query[signingProperties.name] = identity.apiKey; - } - else if (signingProperties.in === types.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 = protocolHttp.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; - } -} - -const createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired(identity) { - return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs; -}; -const EXPIRATION_MS = 300_000; -const isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); -const doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined; -const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => { - if (provider === undefined) { - return undefined; - } - 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; - }; -}; - -Object.defineProperty(exports, "requestBuilder", ({ - enumerable: true, - get: function () { return protocols.requestBuilder; } -})); -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.getSmithyContext = getSmithyContext; -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; - - -/***/ }), - -/***/ 50678: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var utilStream = __webpack_require__(64356); -var schema = __webpack_require__(52290); -var serde = __webpack_require__(24054); -var protocolHttp = __webpack_require__(46572); -var utilBase64 = __webpack_require__(76249); -var utilUtf8 = __webpack_require__(55969); - -const collectBody = async (streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return utilStream.Uint8ArrayBlobAdapter.mutate(streamBody); - } - if (!streamBody) { - return utilStream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); - } - const fromContext = context.streamCollector(streamBody); - return utilStream.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; - constructor(options) { - super(); - this.options = options; - } - getRequestType() { - return protocolHttp.HttpRequest; - } - getResponseType() { - return protocolHttp.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 || void 0; - request.username = endpoint.url.username || void 0; - request.password = endpoint.url.password || void 0; - if (!request.query) { - request.query = {}; - } - for (const [k, v] of endpoint.url.searchParams.entries()) { - request.query[k] = v; - } - 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, - }; - return request; - } - } - setHostPrefix(request, operationSchema, input) { - const inputNs = schema.NormalizedSchema.of(operationSchema.input); - const opTraits = schema.translateTraits(operationSchema.traits ?? {}); - if (opTraits.endpoint) { - let hostPrefix = opTraits.endpoint?.[0]; - if (typeof hostPrefix === "string") { - const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel); - for (const [name] of hostLabelInputs) { - 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; - } - } - } - 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 } = await __webpack_require__.e(/* import() */ 747).then(__webpack_require__.t.bind(__webpack_require__, 94747, 19)); - return new EventStreamSerde({ - marshaller: this.getEventStreamMarshaller(), - serializer: this.serializer, - deserializer: this.deserializer, - serdeContext: this.serdeContext, - defaultContentType: this.getDefaultContentType(), - }); - } - 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 ?? {}), - }; - const serializer = this.serializer; - const query = {}; - const headers = {}; - const endpoint = await context.endpoint(); - const ns = schema.NormalizedSchema.of(operationSchema?.input); - const schema$1 = ns.getSchema(); - let hasNonHttpBindingMember = false; - let payload; - const request = new protocolHttp.HttpRequest({ - protocol: "", - hostname: "", - port: undefined, - path: "", - fragment: undefined, - query: query, - headers: headers, - body: undefined, - }); - if (endpoint) { - this.updateServiceEndpoint(request, endpoint); - this.setHostPrefix(request, operationSchema, input); - const opTraits = schema.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 ?? ""); - Object.assign(query, Object.fromEntries(traitSearchParams)); - } - } - for (const [memberName, memberNs] of ns.structIterator()) { - const memberTraits = memberNs.getMergedTraits() ?? {}; - const inputMemberValue = input[memberName]; - if (inputMemberValue == null) { - 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(); - } - delete input[memberName]; - } - 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)); - } - delete input[memberName]; - } - else if (memberTraits.httpHeader) { - serializer.write(memberNs, inputMemberValue); - headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush()); - delete input[memberName]; - } - else if (typeof memberTraits.httpPrefixHeaders === "string") { - for (const [key, val] of Object.entries(inputMemberValue)) { - const amalgam = memberTraits.httpPrefixHeaders + key; - serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val); - headers[amalgam.toLowerCase()] = serializer.flush(); - } - delete input[memberName]; - } - else if (memberTraits.httpQuery || memberTraits.httpQueryParams) { - this.serializeQuery(memberNs, inputMemberValue, query); - delete input[memberName]; - } - else { - hasNonHttpBindingMember = true; - } - } - if (hasNonHttpBindingMember && input) { - serializer.write(schema$1, 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, val] of Object.entries(data)) { - if (!(key in query)) { - 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 = schema.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) { - 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) { - dataObject[member] = dataFromBody[member]; - } - } - } - dataObject.$metadata = this.deserializeMetadata(response); - return dataObject; - } - async deserializeHttpMessage(schema$1, context, response, arg4, arg5) { - let dataObject; - if (arg4 instanceof Set) { - dataObject = arg5; - } - else { - dataObject = arg4; - } - const deserializer = this.deserializer; - const ns = schema.NormalizedSchema.of(schema$1); - const nonHttpBindingMembers = []; - for (const [memberName, memberSchema] of ns.structIterator()) { - const memberTraits = memberSchema.getMemberTraits(); - if (memberTraits.httpPayload) { - const isStreaming = memberSchema.isStreaming(); - if (isStreaming) { - const isEventStream = memberSchema.isStructSchema(); - if (isEventStream) { - dataObject[memberName] = await this.deserializeEventStream({ - response, - responseSchema: ns, - }); - } - else { - dataObject[memberName] = utilStream.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 (null != value) { - if (memberSchema.isListSchema()) { - const headerListValueSchema = memberSchema.getValueSchema(); - headerListValueSchema.getMergedTraits().httpHeader = key; - let sections; - if (headerListValueSchema.isTimestampSchema() && - headerListValueSchema.getSchema() === 4) { - sections = serde.splitEvery(value, ",", 2); - } - else { - sections = serde.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, value] of Object.entries(response.headers)) { - if (header.startsWith(memberTraits.httpPrefixHeaders)) { - 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); - } - } - 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 = schema.NormalizedSchema.of(operationSchema?.input); - const schema$1 = ns.getSchema(); - let payload; - const request = new protocolHttp.HttpRequest({ - protocol: "", - hostname: "", - port: undefined, - path: "/", - fragment: undefined, - query: query, - headers: headers, - body: undefined, - }); - if (endpoint) { - this.updateServiceEndpoint(request, endpoint); - this.setHostPrefix(request, operationSchema, input); - } - const _input = { - ...input, - }; - if (input) { - const eventStreamMember = ns.getEventStreamMember(); - if (eventStreamMember) { - if (_input[eventStreamMember]) { - const initialRequest = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - if (memberName !== eventStreamMember && _input[memberName]) { - serializer.write(memberSchema, _input[memberName]); - initialRequest[memberName] = serializer.flush(); - } - } - payload = await this.serializeEventStream({ - eventStream: _input[eventStreamMember], - requestSchema: ns, - initialRequest, - }); - } - } - else { - serializer.write(schema$1, _input); - payload = serializer.flush(); - } - } - 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 = schema.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) { - 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; - } -} - -const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { - if (input != null && input[memberName] !== undefined) { - const labelValue = labelValueProvider(); - if (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 protocolHttp.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 = schema.NormalizedSchema.of(_schema); - if (ns.isListSchema()) { - return serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item)); - } - if (ns.isBlobSchema()) { - return (this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(data); - } - if (ns.isTimestampSchema()) { - const format = determineTimestampFormat(ns, this.settings); - switch (format) { - case 5: - return serde._parseRfc3339DateTimeWithOffset(data); - case 6: - return serde._parseRfc7231DateTime(data); - case 7: - return serde._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 = serde.LazyJsonString.from(intermediateValue); - } - return intermediateValue; - } - } - if (ns.isNumericSchema()) { - return Number(data); - } - if (ns.isBigIntegerSchema()) { - return BigInt(data); - } - if (ns.isBigDecimalSchema()) { - return new serde.NumericValue(data, "bigDecimal"); - } - if (ns.isBooleanSchema()) { - return String(data).toLowerCase() === "true"; - } - return data; - } - base64ToUtf8(base64String) { - return (this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8)((this.serdeContext?.base64Decoder ?? utilBase64.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$1, data) { - const ns = schema.NormalizedSchema.of(schema$1); - const traits = ns.getMergedTraits(); - const toString = this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8; - if (traits.httpHeader || traits.httpResponseCode) { - return this.stringDeserializer.read(ns, toString(data)); - } - if (traits.httpPayload) { - if (ns.isBlobSchema()) { - const toBytes = this.serdeContext?.utf8Decoder ?? utilUtf8.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$1, value) { - const ns = schema.NormalizedSchema.of(schema$1); - 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 = serde.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 ?? utilBase64.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 : serde.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 = serde.LazyJsonString.from(intermediateValue); - } - if (ns.getMergedTraits().httpHeader) { - this.stringBuffer = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(intermediateValue.toString()); - return; - } - } - this.stringBuffer = value; - break; - default: - 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$1, value) { - const ns = schema.NormalizedSchema.of(schema$1); - 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(); - } -} - -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.collectBody = collectBody; -exports.determineTimestampFormat = determineTimestampFormat; -exports.extendedEncodeURIComponent = extendedEncodeURIComponent; -exports.requestBuilder = requestBuilder; -exports.resolvedPath = resolvedPath; - - -/***/ }), - -/***/ 52290: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var protocolHttp = __webpack_require__(46572); -var utilMiddleware = __webpack_require__(26252); - -const deref = (schemaRef) => { - if (typeof schemaRef === "function") { - return schemaRef(); - } - return schemaRef; -}; - -const operation = (namespace, name, traits, input, output) => ({ - name, - namespace, - traits, - input, - output, -}); - -const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { - const { response } = await next(args); - const { operationSchema } = utilMiddleware.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, - }); - 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 += "\n " + hint; - } - catch (e) { - 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 (protocolHttp.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 (e) { - } - } - throw error; - } -}; -const findHeader = (pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; -}; - -const schemaSerializationMiddleware = (config) => (next, context) => async (args) => { - const { operationSchema } = utilMiddleware.getSmithyContext(context); - const [, ns, n, t, i, o] = operationSchema ?? []; - const endpoint = context.endpointV2?.url && config.urlParser - ? async () => config.urlParser(context.endpointV2.url) - : config.endpoint; - const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, { - ...config, - ...context, - endpoint, - }); - return next({ - ...args, - request, - }); -}; - -const deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true, -}; -const 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"); - name; - traits; - valueSchema; - symbol = ListSchema.symbol; -} -const list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), { - name, - namespace, - traits, - valueSchema, -}); - -class MapSchema extends Schema { - static symbol = Symbol.for("@smithy/map"); - name; - traits; - keySchema; - valueSchema; - symbol = MapSchema.symbol; -} -const 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"); - name; - traits; - input; - output; - symbol = OperationSchema.symbol; -} -const 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"); - name; - traits; - memberNames; - memberList; - symbol = StructureSchema.symbol; -} -const 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; -} -const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { - name, - namespace, - traits, - memberNames, - memberList, - ctor: null, -}); - -function translateTraits(indicator) { - if (typeof indicator === "object") { - return indicator; - } - indicator = indicator | 0; - 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 traits; -} - -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 = void 0; - 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 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)}.`); - } - return new NormalizedSchema(sc); - } - getSchema() { - const sc = this.schema; - if (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 <= 0b1111_1111 - : sc[0] === 2; - } - isStructSchema() { - const sc = this.getSchema(); - return (sc[0] === 3 || - sc[0] === -3); - } - 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() { - const match = (traits) => (traits & 0b0100) === 0b0100 || - !!traits?.idempotencyToken; - const { normalizedTraits, traits, memberTraits } = this; - return match(normalizedTraits) || match(traits) || match(memberTraits); - } - 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" - ? 0b0011_1111 & sc - : sc && typeof sc === "object" && (isMap || isList) - ? sc[3 + sc[0]] - : isDoc - ? 15 - : void 0; - 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 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(); - for (let i = 0; i < struct[4].length; ++i) { - yield [struct[4][i], member([struct[5][i], 0], struct[4][i])]; - } - } -} -function member(memberSchema, memberName) { - if (memberSchema instanceof NormalizedSchema) { - return Object.assign(memberSchema, { - memberName, - _isMemberSchema: true, - }); - } - const internalCtorAccess = NormalizedSchema; - return new internalCtorAccess(memberSchema, memberName); -} -const isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2; -const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5; - -class SimpleSchema extends Schema { - static symbol = Symbol.for("@smithy/sim"); - name; - schemaRef; - traits; - symbol = SimpleSchema.symbol; -} -const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef, -}); -const simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef, -}); - -const SCHEMA = { - BLOB: 0b0001_0101, - STREAMING_BLOB: 0b0010_1010, - BOOLEAN: 0b0000_0010, - STRING: 0b0000_0000, - NUMERIC: 0b0000_0001, - BIG_INTEGER: 0b0001_0001, - BIG_DECIMAL: 0b0001_0011, - DOCUMENT: 0b0000_1111, - TIMESTAMP_DEFAULT: 0b0000_0100, - TIMESTAMP_DATE_TIME: 0b0000_0101, - TIMESTAMP_HTTP_DATE: 0b0000_0110, - TIMESTAMP_EPOCH_SECONDS: 0b0000_0111, - LIST_MODIFIER: 0b0100_0000, - MAP_MODIFIER: 0b1000_0000, -}; - -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); - } - register(shapeId, schema) { - const qualifiedName = this.normalizeShapeId(shapeId); - const registry = TypeRegistry.for(qualifiedName.split("#")[0]); - registry.schemas.set(qualifiedName, schema); - } - getSchema(shapeId) { - const id = this.normalizeShapeId(shapeId); - if (!this.schemas.has(id)) { - throw new Error(`@smithy/core/schema - schema not found for ${id}`); - } - return this.schemas.get(id); - } - registerError(es, ctor) { - const $error = es; - const registry = TypeRegistry.for($error[1]); - registry.schemas.set($error[1] + "#" + $error[2], $error); - registry.exceptions.set($error, ctor); - } - getErrorCtor(es) { - const $error = es; - const registry = TypeRegistry.for($error[1]); - return registry.exceptions.get($error); - } - 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 undefined; - } - find(predicate) { - return [...this.schemas.values()].find(predicate); - } - 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.struct = struct; -exports.translateTraits = translateTraits; - - -/***/ }), - -/***/ 24054: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var uuid = __webpack_require__(90266); - -const copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source; - -const parseBoolean = (value) => { - switch (value) { - case "true": - return true; - case "false": - return false; - default: - throw new Error(`Unable to parse boolean value "${value}"`); - } -}; -const expectBoolean = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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}`); -}; -const expectNumber = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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}`); -}; -const MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); -const 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; -}; -const expectLong = (value) => { - if (value === null || value === undefined) { - return undefined; - } - if (Number.isInteger(value) && !Number.isNaN(value)) { - return value; - } - throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); -}; -const expectInt = expectLong; -const expectInt32 = (value) => expectSizedInt(value, 32); -const expectShort = (value) => expectSizedInt(value, 16); -const expectByte = (value) => expectSizedInt(value, 8); -const 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; -}; -const 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]; - } -}; -const 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; -}; -const expectObject = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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}`); -}; -const expectString = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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}`); -}; -const expectUnion = (value) => { - if (value === null || value === undefined) { - return undefined; - } - const asObject = expectObject(value); - const setKeys = Object.entries(asObject) - .filter(([, v]) => v != null) - .map(([k]) => 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; -}; -const strictParseDouble = (value) => { - if (typeof value == "string") { - return expectNumber(parseNumber(value)); - } - return expectNumber(value); -}; -const strictParseFloat = strictParseDouble; -const strictParseFloat32 = (value) => { - if (typeof value == "string") { - return expectFloat32(parseNumber(value)); - } - return expectFloat32(value); -}; -const NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; -const 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); -}; -const limitedParseDouble = (value) => { - if (typeof value == "string") { - return parseFloatString(value); - } - return expectNumber(value); -}; -const handleFloat = limitedParseDouble; -const limitedParseFloat = limitedParseDouble; -const limitedParseFloat32 = (value) => { - if (typeof value == "string") { - return parseFloatString(value); - } - return expectFloat32(value); -}; -const 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}`); - } -}; -const strictParseLong = (value) => { - if (typeof value === "string") { - return expectLong(parseNumber(value)); - } - return expectLong(value); -}; -const strictParseInt = strictParseLong; -const strictParseInt32 = (value) => { - if (typeof value === "string") { - return expectInt32(parseNumber(value)); - } - return expectInt32(value); -}; -const strictParseShort = (value) => { - if (typeof value === "string") { - return expectShort(parseNumber(value)); - } - return expectShort(value); -}; -const strictParseByte = (value) => { - if (typeof value === "string") { - return expectByte(parseNumber(value)); - } - return expectByte(value); -}; -const stackTraceWarning = (message) => { - return String(new TypeError(message).stack || message) - .split("\n") - .slice(0, 5) - .filter((s) => !s.includes("stackTraceWarning")) - .join("\n"); -}; -const logger = { - warn: console.warn, -}; - -const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; -const 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`; -} -const RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); -const parseRfc3339DateTime = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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 }); -}; -const 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])$/); -const parseRfc3339DateTimeWithOffset = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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; -}; -const 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$/); -const 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$/); -const 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})$/); -const parseRfc7231DateTime = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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"); -}; -const parseEpochTimestamp = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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)); -}; -const 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))); -}; -const 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; -}; -const FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000; -const 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; -}; -const parseMonthByShortName = (value) => { - const monthIdx = MONTHS.indexOf(value); - if (monthIdx < 0) { - throw new TypeError(`Invalid month: ${value}`); - } - return monthIdx + 1; -}; -const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -const 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}`); - } -}; -const isLeapYear = (year) => { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -}; -const 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; -}; -const parseMilliseconds = (value) => { - if (value === null || value === undefined) { - return 0; - } - return strictParseFloat32("0." + value) * 1000; -}; -const 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; -}; -const stripLeadingZeroes = (value) => { - let idx = 0; - while (idx < value.length - 1 && value.charAt(idx) === "0") { - idx++; - } - if (idx === 0) { - return value; - } - return value.slice(idx); -}; - -const 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; -} - -const ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`; -const mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`; -const time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`; -const date = `(\\d?\\d)`; -const year = `(\\d{4})`; -const RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/); -const IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`); -const RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`); -const ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`); -const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; -const _parseEpochTimestamp = (value) => { - if (value == null) { - return void 0; - } - 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)); -}; -const _parseRfc3339DateTimeWithOffset = (value) => { - if (value == null) { - return void 0; - } - 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.setUTCFullYear(Number(yearStr), Number(monthStr) - 1, Number(dayStr)); - date.setUTCHours(Number(hours)); - date.setUTCMinutes(Number(minutes)); - date.setUTCSeconds(Number(seconds)); - date.setUTCMilliseconds(Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0); - if (offsetStr.toUpperCase() != "Z") { - const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0]; - const scalar = sign === "-" ? 1 : -1; - date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000)); - } - return date; -}; -const _parseRfc7231DateTime = (value) => { - if (value == null) { - return void 0; - } - 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 date = new Date(); - date.setUTCFullYear(Number(year)); - date.setUTCMonth(months.indexOf(month)); - range(day, 1, 31); - date.setUTCDate(Number(day)); - range(hour, 0, 23); - date.setUTCHours(Number(hour)); - range(minute, 0, 59); - date.setUTCMinutes(Number(minute)); - range(second, 0, 60); - date.setUTCSeconds(Number(second)); - date.setUTCMilliseconds(fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0); - 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; -} - -const 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, '"'); - }); -}; - -const format = /^-?\d*(\.\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 must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`); - } - } - 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"); -} - -Object.defineProperty(exports, "generateIdempotencyToken", ({ - enumerable: true, - get: function () { return uuid.v4; } -})); -exports.LazyJsonString = LazyJsonString; -exports.NumericValue = NumericValue; -exports._parseEpochTimestamp = _parseEpochTimestamp; -exports._parseRfc3339DateTimeWithOffset = _parseRfc3339DateTimeWithOffset; -exports._parseRfc7231DateTime = _parseRfc7231DateTime; -exports.copyDocumentWithTransform = copyDocumentWithTransform; -exports.dateToUtcString = dateToUtcString; -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.handleFloat = handleFloat; -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.splitEvery = splitEvery; -exports.splitHeader = splitHeader; -exports.strictParseByte = strictParseByte; -exports.strictParseDouble = strictParseDouble; -exports.strictParseFloat = strictParseFloat; -exports.strictParseFloat32 = strictParseFloat32; -exports.strictParseInt = strictParseInt; -exports.strictParseInt32 = strictParseInt32; -exports.strictParseLong = strictParseLong; -exports.strictParseShort = strictParseShort; - - -/***/ }), - -/***/ 90793: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var protocolHttp = __webpack_require__(46572); -var querystringBuilder = __webpack_require__(36600); -var utilBase64 = __webpack_require__(76249); - -function createRequest(url, requestOptions) { - return new Request(url, requestOptions); -} - -function requestTimeout(timeoutInMs = 0) { - return new Promise((resolve, reject) => { - if (timeoutInMs) { - setTimeout(() => { - const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); - timeoutError.name = "TimeoutError"; - reject(timeoutError); - }, timeoutInMs); - } - }); -} - -const keepAliveSupport = { - supported: undefined, -}; -class FetchHttpHandler { - config; - configProvider; - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new FetchHttpHandler(instanceOrOptions); - } - constructor(options) { - if (typeof options === "function") { - this.configProvider = options().then((opts) => opts || {}); - } - else { - this.config = options ?? {}; - this.configProvider = Promise.resolve(this.config); - } - if (keepAliveSupport.supported === undefined) { - keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]")); - } - } - destroy() { - } - async handle(request, { abortSignal, requestTimeout: requestTimeout$1 } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - const requestTimeoutInMs = requestTimeout$1 ?? this.config.requestTimeout; - const keepAlive = this.config.keepAlive === true; - const credentials = this.config.credentials; - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - return Promise.reject(abortError); - } - let path = request.path; - const queryString = querystringBuilder.buildQueryString(request.query || {}); - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let auth = ""; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}@`; - } - const { port, method } = request; - const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; - const body = method === "GET" || method === "HEAD" ? undefined : request.body; - const requestOptions = { - body, - headers: new Headers(request.headers), - method: method, - credentials, - }; - if (this.config?.cache) { - requestOptions.cache = this.config.cache; - } - if (body) { - requestOptions.duplex = "half"; - } - if (typeof AbortController !== "undefined") { - requestOptions.signal = abortSignal; - } - if (keepAliveSupport.supported) { - requestOptions.keepalive = keepAlive; - } - if (typeof this.config.requestInit === "function") { - Object.assign(requestOptions, this.config.requestInit(request)); - } - let removeSignalEventListener = () => { }; - const fetchRequest = createRequest(url, requestOptions); - const raceOfPromises = [ - fetch(fetchRequest).then((response) => { - const fetchHeaders = response.headers; - const transformedHeaders = {}; - for (const pair of fetchHeaders.entries()) { - transformedHeaders[pair[0]] = pair[1]; - } - const hasReadableStream = response.body != undefined; - if (!hasReadableStream) { - return response.blob().then((body) => ({ - response: new protocolHttp.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body, - }), - })); - } - return { - response: new protocolHttp.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body: response.body, - }), - }; - }), - requestTimeout(requestTimeoutInMs), - ]; - if (abortSignal) { - raceOfPromises.push(new Promise((resolve, reject) => { - const onAbort = () => { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - }; - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - removeSignalEventListener = () => signal.removeEventListener("abort", onAbort); - } - else { - abortSignal.onabort = onAbort; - } - })); - } - return Promise.race(raceOfPromises).finally(removeSignalEventListener); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - config[key] = value; - return config; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } -} - -const streamCollector = async (stream) => { - if ((typeof Blob === "function" && stream instanceof Blob) || stream.constructor?.name === "Blob") { - if (Blob.prototype.arrayBuffer !== undefined) { - return new Uint8Array(await stream.arrayBuffer()); - } - return collectBlob(stream); - } - return collectStream(stream); -}; -async function collectBlob(blob) { - const base64 = await readToBase64(blob); - const arrayBuffer = utilBase64.fromBase64(base64); - return new Uint8Array(arrayBuffer); -} -async function collectStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} -function readToBase64(blob) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onloadend = () => { - if (reader.readyState !== 2) { - return reject(new Error("Reader aborted too early")); - } - const result = (reader.result ?? ""); - const commaIndex = result.indexOf(","); - const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; - resolve(result.substring(dataOffset)); - }; - reader.onabort = () => reject(new Error("Read aborted")); - reader.onerror = () => reject(reader.error); - reader.readAsDataURL(blob); - }); -} - -exports.FetchHttpHandler = FetchHttpHandler; -exports.keepAliveSupport = keepAliveSupport; -exports.streamCollector = streamCollector; - - -/***/ }), - -/***/ 56186: -/***/ ((__unused_webpack_module, exports) => { - - - -const isArrayBuffer = (arg) => (typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer) || - Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; - -exports.isArrayBuffer = isArrayBuffer; - - -/***/ }), - -/***/ 57217: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEndpointFromConfig = void 0; -const node_config_provider_1 = __webpack_require__(50240); -const getEndpointUrlConfig_1 = __webpack_require__(6416); -const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId ?? ""))(); -exports.getEndpointFromConfig = getEndpointFromConfig; - - -/***/ }), - -/***/ 6416: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEndpointUrlConfig = void 0; -const shared_ini_file_loader_1 = __webpack_require__(56700); -const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; -const CONFIG_ENDPOINT_URL = "endpoint_url"; -const 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 undefined; - }, - configFileSelector: (profile, config) => { - if (config && profile.services) { - const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (servicesSection) { - const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); - const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (endpointUrl) - return endpointUrl; - } - } - const endpointUrl = profile[CONFIG_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return undefined; - }, - default: undefined, -}); -exports.getEndpointUrlConfig = getEndpointUrlConfig; - - -/***/ }), - -/***/ 88075: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var getEndpointFromConfig = __webpack_require__(57217); -var urlParser = __webpack_require__(38006); -var core = __webpack_require__(3402); -var utilMiddleware = __webpack_require__(26252); -var middlewareSerde = __webpack_require__(4783); - -const 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; -}; -const DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; -const IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; -const DOTS_PATTERN = /\.\./; -const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName); -const 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; -}; - -const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config) => { - const configProvider = async () => { - const 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 undefined; - } - 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; -}; - -const toEndpointV1 = (endpoint) => { - if (typeof endpoint === "object") { - if ("url" in endpoint) { - return urlParser.parseUrl(endpoint.url); - } - return endpoint; - } - return urlParser.parseUrl(endpoint); -}; - -const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => { - if (!clientConfig.isCustomEndpoint) { - let endpointFromConfig; - if (clientConfig.serviceConfiguredEndpoint) { - endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); - } - else { - endpointFromConfig = await getEndpointFromConfig.getEndpointFromConfig(clientConfig.serviceId); - } - if (endpointFromConfig) { - clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); - clientConfig.isCustomEndpoint = true; - } - } - 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); - return endpoint; -}; -const 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)(); - 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; -}; - -const endpointMiddleware = ({ config, instructions, }) => { - return (next, context) => async (args) => { - if (config.isCustomEndpoint) { - core.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 = utilMiddleware.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, - }); - }; -}; - -const endpointMiddlewareOptions = { - step: "serialize", - tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], - name: "endpointV2Middleware", - override: true, - relation: "before", - toMiddleware: middlewareSerde.serializerMiddlewareOption.name, -}; -const getEndpointPlugin = (config, instructions) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(endpointMiddleware({ - config, - instructions, - }), endpointMiddlewareOptions); - }, -}); - -const resolveEndpointConfig = (input) => { - const tls = input.tls ?? true; - const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; - const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await utilMiddleware.normalizeProvider(endpoint)()) : undefined; - const isCustomEndpoint = !!endpoint; - const resolvedConfig = Object.assign(input, { - endpoint: customEndpointProvider, - tls, - isCustomEndpoint, - useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false), - useFipsEndpoint: utilMiddleware.normalizeProvider(useFipsEndpoint ?? false), - }); - let configuredEndpointPromise = undefined; - resolvedConfig.serviceConfiguredEndpoint = async () => { - if (input.serviceId && !configuredEndpointPromise) { - configuredEndpointPromise = getEndpointFromConfig.getEndpointFromConfig(input.serviceId); - } - return configuredEndpointPromise; - }; - return resolvedConfig; -}; - -const 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; -}; - -exports.endpointMiddleware = endpointMiddleware; -exports.endpointMiddlewareOptions = endpointMiddlewareOptions; -exports.getEndpointFromInstructions = getEndpointFromInstructions; -exports.getEndpointPlugin = getEndpointPlugin; -exports.resolveEndpointConfig = resolveEndpointConfig; -exports.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig; -exports.resolveParams = resolveParams; -exports.toEndpointV1 = toEndpointV1; - - -/***/ }), - -/***/ 4783: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var protocolHttp = __webpack_require__(46572); - -const 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, - }); - 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 += "\n " + hint; - } - catch (e) { - 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 (protocolHttp.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 (e) { - } - } - throw error; - } -}; -const findHeader = (pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; -}; - -const serializerMiddleware = (options, serializer) => (next, context) => async (args) => { - const endpointConfig = options; - const endpoint = context.endpointV2?.url && endpointConfig.urlParser - ? async () => endpointConfig.urlParser(context.endpointV2.url) - : endpointConfig.endpoint; - if (!endpoint) { - throw new Error("No valid endpoint provider available."); - } - const request = await serializer(args.input, { ...options, endpoint }); - return next({ - ...args, - request, - }); -}; - -const deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true, -}; -const 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); - }, - }; -} - -exports.deserializerMiddleware = deserializerMiddleware; -exports.deserializerMiddlewareOption = deserializerMiddlewareOption; -exports.getSerdePlugin = getSerdePlugin; -exports.serializerMiddleware = serializerMiddleware; -exports.serializerMiddlewareOption = serializerMiddlewareOption; - - -/***/ }), - -/***/ 50240: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var propertyProvider = __webpack_require__(74558); -var sharedIniFileLoader = __webpack_require__(56700); - -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 (e) { - return functionString; - } -} - -const fromEnv = (envVarSelector, options) => async () => { - try { - const config = envVarSelector(process.env, options); - if (config === undefined) { - throw new Error(); - } - return config; - } - catch (e) { - throw new propertyProvider.CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger }); - } -}; - -const fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { - const profile = sharedIniFileLoader.getProfileName(init); - const { configFile, credentialsFile } = await sharedIniFileLoader.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 propertyProvider.CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger }); - } -}; - -const isFunction = (func) => typeof func === "function"; -const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue); - -const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { - const { signingName, logger } = configuration; - const envOptions = { signingName, logger }; - return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))); -}; - -exports.loadConfig = loadConfig; - - -/***/ }), - -/***/ 60967: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var protocolHttp = __webpack_require__(46572); -var querystringBuilder = __webpack_require__(36600); -var http = __webpack_require__(58611); -var https = __webpack_require__(65692); -var stream = __webpack_require__(2203); -var http2 = __webpack_require__(85675); - -const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; - -const getTransformedHeaders = (headers) => { - const transformedHeaders = {}; - for (const name of Object.keys(headers)) { - const headerValues = headers[name]; - transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; - } - return transformedHeaders; -}; - -const timing = { - setTimeout: (cb, ms) => setTimeout(cb, ms), - clearTimeout: (timeoutId) => clearTimeout(timeoutId), -}; - -const DEFER_EVENT_LISTENER_TIME$2 = 1000; -const 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); -}; - -const 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; -}; - -const DEFER_EVENT_LISTENER_TIME$1 = 3000; -const 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); -}; - -const DEFER_EVENT_LISTENER_TIME = 3000; -const 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); -}; - -const MIN_WAIT_TIME = 6_000; -async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) { - const headers = request.headers ?? {}; - const expect = headers["Expect"] || headers["expect"]; - let timeoutId = -1; - let sendBody = true; - if (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 stream.Readable) { - body.pipe(httpRequest); - return; - } - if (body) { - if (Buffer.isBuffer(body) || typeof body === "string") { - 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(); -} - -const DEFAULT_REQUEST_TIMEOUT = 0; -class NodeHttpHandler { - config; - configProvider; - socketWarningTimestamp = 0; - 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 = 15_000; - if (Date.now() - interval < socketWarningTimestamp) { - return socketWarningTimestamp; - } - if (sockets && requests) { - for (const origin in sockets) { - 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)); - } - }); - } - resolveDefaultConfig(options) { - const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, } = options || {}; - const keepAlive = true; - const maxSockets = 50; - return { - connectionTimeout, - requestTimeout, - socketTimeout, - socketAcquisitionWarningTimeout, - throwOnRequestTimeout, - httpAgent: (() => { - if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { - return httpAgent; - } - return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); - })(), - httpsAgent: (() => { - if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { - return httpsAgent; - } - return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); - })(), - logger: console, - }; - } - destroy() { - this.config?.httpAgent?.destroy(); - this.config?.httpsAgent?.destroy(); - } - async handle(request, { abortSignal, requestTimeout } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - return new Promise((_resolve, _reject) => { - let writeRequestBodyPromise = undefined; - const timeouts = []; - const resolve = async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _resolve(arg); - }; - const reject = async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _reject(arg); - }; - if (!this.config) { - throw new Error("Node HTTP request handler config is not resolved"); - } - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; - } - const isSSL = request.protocol === "https:"; - const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; - timeouts.push(timing.setTimeout(() => { - this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, this.config.logger); - }, this.config.socketAcquisitionWarningTimeout ?? - (this.config.requestTimeout ?? 2000) + (this.config.connectionTimeout ?? 1000))); - const queryString = querystringBuilder.buildQueryString(request.query || {}); - let auth = undefined; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}`; - } - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let hostname = request.hostname ?? ""; - if (hostname[0] === "[" && hostname.endsWith("]")) { - hostname = request.hostname.slice(1, -1); - } - else { - hostname = request.hostname; - } - const nodeHttpsOptions = { - headers: request.headers, - host: hostname, - method: request.method, - path, - port: request.port, - agent, - auth, - }; - const requestFunc = isSSL ? https.request : http.request; - const req = requestFunc(nodeHttpsOptions, (res) => { - const httpResponse = new protocolHttp.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 = new Error("Request aborted"); - abortError.name = "AbortError"; - 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 ?? this.config.requestTimeout; - timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); - timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, this.config.throwOnRequestTimeout, this.config.logger ?? console)); - timeouts.push(setSocketTimeout(req, reject, this.config.socketTimeout)); - const httpAgent = nodeHttpsOptions.agent; - if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { - timeouts.push(setSocketKeepAlive(req, { - keepAlive: httpAgent.keepAlive, - keepAliveMsecs: httpAgent.keepAliveMsecs, - })); - } - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout).catch((e) => { - timeouts.forEach(timing.clearTimeout); - return _reject(e); - }); - }); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value, - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } -} - -class NodeHttp2ConnectionPool { - sessions = []; - constructor(sessions) { - this.sessions = sessions ?? []; - } - poll() { - if (this.sessions.length > 0) { - return this.sessions.shift(); - } - } - offerLast(session) { - this.sessions.push(session); - } - contains(session) { - return this.sessions.includes(session); - } - remove(session) { - this.sessions = this.sessions.filter((s) => s !== session); - } - [Symbol.iterator]() { - return this.sessions[Symbol.iterator](); - } - destroy(connection) { - for (const session of this.sessions) { - if (session === connection) { - if (!session.destroyed) { - session.destroy(); - } - } - } - } -} - -class NodeHttp2ConnectionManager { - constructor(config) { - this.config = config; - if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { - throw new RangeError("maxConcurrency must be greater than zero."); - } - } - config; - sessionCache = new Map(); - lease(requestContext, connectionConfiguration) { - const url = this.getUrlString(requestContext); - const existingPool = this.sessionCache.get(url); - if (existingPool) { - const existingSession = existingPool.poll(); - if (existingSession && !this.config.disableConcurrency) { - return existingSession; - } - } - const session = http2.connect(url); - 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()); - } - }); - } - session.unref(); - const destroySessionCb = () => { - session.destroy(); - this.deleteSession(url, session); - }; - session.on("goaway", destroySessionCb); - session.on("error", destroySessionCb); - session.on("frameError", destroySessionCb); - session.on("close", () => this.deleteSession(url, session)); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); - } - const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); - connectionPool.offerLast(session); - this.sessionCache.set(url, connectionPool); - return session; - } - deleteSession(authority, session) { - const existingConnectionPool = this.sessionCache.get(authority); - if (!existingConnectionPool) { - return; - } - if (!existingConnectionPool.contains(session)) { - return; - } - existingConnectionPool.remove(session); - this.sessionCache.set(authority, existingConnectionPool); - } - release(requestContext, session) { - const cacheKey = this.getUrlString(requestContext); - this.sessionCache.get(cacheKey)?.offerLast(session); - } - destroy() { - for (const [key, connectionPool] of this.sessionCache) { - for (const session of connectionPool) { - if (!session.destroyed) { - session.destroy(); - } - connectionPool.remove(session); - } - this.sessionCache.delete(key); - } - } - setMaxConcurrentStreams(maxConcurrentStreams) { - if (maxConcurrentStreams && maxConcurrentStreams <= 0) { - throw new RangeError("maxConcurrentStreams must be greater than zero."); - } - this.config.maxConcurrency = maxConcurrentStreams; - } - setDisableConcurrentStreams(disableConcurrentStreams) { - this.config.disableConcurrency = disableConcurrentStreams; - } - getUrlString(request) { - return request.destination.toString(); - } -} - -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 } = {}) { - if (!this.config) { - this.config = await this.configProvider; - this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); - if (this.config.maxConcurrentStreams) { - this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); - } - } - const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; - 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 = new Error("Request aborted"); - abortError.name = "AbortError"; - 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 session = this.connectionManager.lease(requestContext, { - requestTimeout: this.config?.sessionTimeout, - disableConcurrentStreams: disableConcurrentStreams || false, - }); - const rejectWithDestroy = (err) => { - if (disableConcurrentStreams) { - this.destroySession(session); - } - fulfilled = true; - reject(err); - }; - const queryString = querystringBuilder.buildQueryString(query || {}); - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - const req = session.request({ - ...request.headers, - [http2.constants.HTTP2_HEADER_PATH]: path, - [http2.constants.HTTP2_HEADER_METHOD]: method, - }); - session.ref(); - req.on("response", (headers) => { - const httpResponse = new protocolHttp.HttpResponse({ - statusCode: headers[":status"] || -1, - headers: getTransformedHeaders(headers), - body: req, - }); - fulfilled = true; - resolve({ response: httpResponse }); - if (disableConcurrentStreams) { - session.close(); - this.connectionManager.deleteSession(authority, session); - } - }); - if (effectiveRequestTimeout) { - req.setTimeout(effectiveRequestTimeout, () => { - req.close(); - const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); - timeoutError.name = "TimeoutError"; - rejectWithDestroy(timeoutError); - }); - } - if (abortSignal) { - const onAbort = () => { - req.close(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - rejectWithDestroy(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; - } - } - req.on("frameError", (type, code, id) => { - rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); - }); - req.on("error", rejectWithDestroy); - req.on("aborted", () => { - rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); - }); - req.on("close", () => { - session.unref(); - if (disableConcurrentStreams) { - session.destroy(); - } - if (!fulfilled) { - rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); - } - }); - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); - }); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value, - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } - destroySession(session) { - if (!session.destroyed) { - session.destroy(); - } - } -} - -class Collector extends stream.Writable { - bufferedBytes = []; - _write(chunk, encoding, callback) { - this.bufferedBytes.push(chunk); - callback(); - } -} - -const streamCollector = (stream) => { - if (isReadableStreamInstance(stream)) { - return collectReadableStream(stream); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); - resolve(bytes); - }); - }); -}; -const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; -async function collectReadableStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} - -exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; -exports.NodeHttp2Handler = NodeHttp2Handler; -exports.NodeHttpHandler = NodeHttpHandler; -exports.streamCollector = streamCollector; - - -/***/ }), - -/***/ 74558: -/***/ ((__unused_webpack_module, exports) => { - - - -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); - } -} - -const 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; -}; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const 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; - }; -}; - -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; - - -/***/ }), - -/***/ 46572: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var types = __webpack_require__(42394); - -const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - }, - }; -}; -const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler(), - }; -}; - -class Field { - name; - kind; - values; - constructor({ name, kind = types.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); - } -} - -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"; - } -} - -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} - -exports.Field = Field; -exports.Fields = Fields; -exports.HttpRequest = HttpRequest; -exports.HttpResponse = HttpResponse; -exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; -exports.isValidHostname = isValidHostname; -exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; - - -/***/ }), - -/***/ 36600: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var utilUriEscape = __webpack_require__(54474); - -function buildQueryString(query) { - const parts = []; - for (let key of Object.keys(query).sort()) { - const value = query[key]; - key = utilUriEscape.escapeUri(key); - if (Array.isArray(value)) { - for (let i = 0, iLen = value.length; i < iLen; i++) { - parts.push(`${key}=${utilUriEscape.escapeUri(value[i])}`); - } - } - else { - let qsEntry = key; - if (value || typeof value === "string") { - qsEntry += `=${utilUriEscape.escapeUri(value)}`; - } - parts.push(qsEntry); - } - } - return parts.join("&"); -} - -exports.buildQueryString = buildQueryString; - - -/***/ }), - -/***/ 83966: -/***/ ((__unused_webpack_module, exports) => { - - - -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; -} - -exports.parseQueryString = parseQueryString; - - -/***/ }), - -/***/ 59652: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __webpack_require__(70857); -const path_1 = __webpack_require__(16928); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; -}; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; -}; -exports.getHomeDir = getHomeDir; - - -/***/ }), - -/***/ 17621: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __webpack_require__(76982); -const path_1 = __webpack_require__(16928); -const getHomeDir_1 = __webpack_require__(59652); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); -}; -exports.getSSOTokenFilepath = getSSOTokenFilepath; - - -/***/ }), - -/***/ 81910: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; -const fs_1 = __webpack_require__(79896); -const getSSOTokenFilepath_1 = __webpack_require__(17621); -const { readFile } = fs_1.promises; -exports.tokenIntercept = {}; -const getSSOTokenFromFile = async (id) => { - if (exports.tokenIntercept[id]) { - return exports.tokenIntercept[id]; - } - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); -}; -exports.getSSOTokenFromFile = getSSOTokenFromFile; - - -/***/ }), - -/***/ 56700: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var getHomeDir = __webpack_require__(59652); -var getSSOTokenFilepath = __webpack_require__(17621); -var getSSOTokenFromFile = __webpack_require__(81910); -var path = __webpack_require__(16928); -var types = __webpack_require__(42394); -var slurpFile = __webpack_require__(89198); - -const ENV_PROFILE = "AWS_PROFILE"; -const DEFAULT_PROFILE = "default"; -const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; - -const CONFIG_PREFIX_SEPARATOR = "."; - -const getConfigData = (data) => Object.entries(data) - .filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; - } - return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}) - .reduce((acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; -}, { - ...(data.default && { default: data.default }), -}); - -const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); - -const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); - -const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -const profileNameBlockList = ["__proto__", "profile __proto__"]; -const 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(types.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; -}; - -const swallowError$1 = () => ({}); -const loadSharedConfigFiles = async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = getHomeDir.getHomeDir(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = path.join(homeDir, filepath.slice(2)); - } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); - } - const parsedFiles = await Promise.all([ - slurpFile.slurpFile(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .then(getConfigData) - .catch(swallowError$1), - slurpFile.slurpFile(resolvedFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .catch(swallowError$1), - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1], - }; -}; - -const getSsoSessionData = (data) => Object.entries(data) - .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) - .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); - -const swallowError = () => ({}); -const loadSsoSessionData = async (init = {}) => slurpFile.slurpFile(init.configFilepath ?? getConfigFilepath()) - .then(parseIni) - .then(getSsoSessionData) - .catch(swallowError); - -const 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; -}; - -const parseKnownFiles = async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); -}; - -const externalDataInterceptor = { - getFileRecord() { - return slurpFile.fileIntercept; - }, - interceptFile(path, contents) { - slurpFile.fileIntercept[path] = Promise.resolve(contents); - }, - getTokenRecord() { - return getSSOTokenFromFile.tokenIntercept; - }, - interceptToken(id, contents) { - getSSOTokenFromFile.tokenIntercept[id] = contents; - }, -}; - -Object.defineProperty(exports, "getSSOTokenFromFile", ({ - enumerable: true, - get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } -})); -exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; -exports.DEFAULT_PROFILE = DEFAULT_PROFILE; -exports.ENV_PROFILE = ENV_PROFILE; -exports.externalDataInterceptor = externalDataInterceptor; -exports.getProfileName = getProfileName; -exports.loadSharedConfigFiles = loadSharedConfigFiles; -exports.loadSsoSessionData = loadSsoSessionData; -exports.parseKnownFiles = parseKnownFiles; -Object.keys(getHomeDir).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getHomeDir[k]; } - }); -}); -Object.keys(getSSOTokenFilepath).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getSSOTokenFilepath[k]; } - }); -}); - - -/***/ }), - -/***/ 89198: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = void 0; -const fs_1 = __webpack_require__(79896); -const { readFile } = fs_1.promises; -exports.filePromisesHash = {}; -exports.fileIntercept = {}; -const slurpFile = (path, options) => { - if (exports.fileIntercept[path] !== undefined) { - return exports.fileIntercept[path]; - } - if (!exports.filePromisesHash[path] || options?.ignoreCache) { - exports.filePromisesHash[path] = readFile(path, "utf8"); - } - return exports.filePromisesHash[path]; -}; -exports.slurpFile = slurpFile; - - -/***/ }), - -/***/ 42394: -/***/ ((__unused_webpack_module, exports) => { - - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - -/***/ }), - -/***/ 38006: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var querystringParser = __webpack_require__(83966); - -const parseUrl = (url) => { - if (typeof url === "string") { - return parseUrl(new URL(url)); - } - const { hostname, pathname, port, protocol, search } = url; - let query; - if (search) { - query = querystringParser.parseQueryString(search); - } - return { - hostname, - port: port ? parseInt(port) : undefined, - protocol, - path: pathname, - query, - }; -}; - -exports.parseUrl = parseUrl; - - -/***/ }), - -/***/ 38330: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromBase64 = void 0; -const util_buffer_from_1 = __webpack_require__(54351); -const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; -const 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 = (0, util_buffer_from_1.fromString)(input, "base64"); - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); -}; -exports.fromBase64 = fromBase64; - - -/***/ }), - -/***/ 76249: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var fromBase64 = __webpack_require__(38330); -var toBase64 = __webpack_require__(97055); - - - -Object.keys(fromBase64).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return fromBase64[k]; } - }); -}); -Object.keys(toBase64).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return toBase64[k]; } - }); -}); - - -/***/ }), - -/***/ 97055: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toBase64 = void 0; -const util_buffer_from_1 = __webpack_require__(54351); -const util_utf8_1 = __webpack_require__(55969); -const toBase64 = (_input) => { - let input; - if (typeof _input === "string") { - input = (0, util_utf8_1.fromUtf8)(_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 (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); -}; -exports.toBase64 = toBase64; - - -/***/ }), - -/***/ 54351: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var isArrayBuffer = __webpack_require__(56186); -var buffer = __webpack_require__(20181); - -const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { - if (!isArrayBuffer.isArrayBuffer(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); - } - return buffer.Buffer.from(input, offset, length); -}; -const 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.Buffer.from(input, encoding) : buffer.Buffer.from(input); -}; - -exports.fromArrayBuffer = fromArrayBuffer; -exports.fromString = fromString; - - -/***/ }), - -/***/ 61307: -/***/ ((__unused_webpack_module, exports) => { - - - -const SHORT_TO_HEX = {}; -const 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; -} - -exports.fromHex = fromHex; -exports.toHex = toHex; - - -/***/ }), - -/***/ 26252: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var types = __webpack_require__(42394); - -const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); - -const normalizeProvider = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; -}; - -exports.getSmithyContext = getSmithyContext; -exports.normalizeProvider = normalizeProvider; - - -/***/ }), - -/***/ 47324: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ByteArrayCollector = void 0; -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; - } -} -exports.ByteArrayCollector = ByteArrayCollector; - - -/***/ }), - -/***/ 75233: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function () { }; -class ChecksumStream extends ReadableStreamRef { -} -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 97975: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const util_base64_1 = __webpack_require__(76249); -const stream_1 = __webpack_require__(2203); -class ChecksumStream extends stream_1.Duplex { - expectedChecksum; - checksumSourceLocation; - checksum; - source; - base64Encoder; - constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) { - super(); - if (typeof source.pipe === "function") { - this.source = source; - } - else { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); - } - this.base64Encoder = base64Encoder ?? util_base64_1.toBase64; - this.expectedChecksum = expectedChecksum; - this.checksum = checksum; - this.checksumSourceLocation = checksumSourceLocation; - this.source.pipe(this); - } - _read(size) { } - _write(chunk, encoding, callback) { - try { - this.checksum.update(chunk); - this.push(chunk); - } - catch (e) { - return callback(e); - } - return callback(); - } - async _final(callback) { - try { - const digest = await this.checksum.digest(); - const received = this.base64Encoder(digest); - if (this.expectedChecksum !== received) { - return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + - ` in response header "${this.checksumSourceLocation}".`)); - } - } - catch (e) { - return callback(e); - } - this.push(null); - return callback(); - } -} -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 58473: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = void 0; -const util_base64_1 = __webpack_require__(76249); -const stream_type_check_1 = __webpack_require__(17782); -const ChecksumStream_browser_1 = __webpack_require__(75233); -const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => { - if (!(0, stream_type_check_1.isReadableStream)(source)) { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); - } - const encoder = base64Encoder ?? util_base64_1.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_browser_1.ChecksumStream.prototype); - return readable; -}; -exports.createChecksumStream = createChecksumStream; - - -/***/ }), - -/***/ 53535: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = createChecksumStream; -const stream_type_check_1 = __webpack_require__(17782); -const ChecksumStream_1 = __webpack_require__(97975); -const createChecksumStream_browser_1 = __webpack_require__(58473); -function createChecksumStream(init) { - if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { - return (0, createChecksumStream_browser_1.createChecksumStream)(init); - } - return new ChecksumStream_1.ChecksumStream(init); -} - - -/***/ }), - -/***/ 76861: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = createBufferedReadable; -const node_stream_1 = __webpack_require__(57075); -const ByteArrayCollector_1 = __webpack_require__(47324); -const createBufferedReadableStream_1 = __webpack_require__(74381); -const stream_type_check_1 = __webpack_require__(17782); -function createBufferedReadable(upstream, size, logger) { - if ((0, stream_type_check_1.isReadableStream)(upstream)) { - return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger); - } - const downstream = new node_stream_1.Readable({ read() { } }); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = [ - "", - new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)), - new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))), - ]; - let mode = -1; - upstream.on("data", (chunk) => { - const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); - if (mode !== chunkMode) { - if (mode >= 0) { - downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - mode = chunkMode; - } - if (mode === -1) { - downstream.push(chunk); - return; - } - const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); - bytesSeen += chunkSize; - const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - downstream.push(chunk); - } - else { - const newSize = (0, createBufferedReadableStream_1.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((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - } - }); - upstream.on("end", () => { - if (mode !== -1) { - const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); - if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { - downstream.push(remainder); - } - } - downstream.push(null); - }); - return downstream; -} - - -/***/ }), - -/***/ 74381: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = void 0; -exports.createBufferedReadableStream = createBufferedReadableStream; -exports.merge = merge; -exports.flush = flush; -exports.sizeOf = sizeOf; -exports.modeOf = modeOf; -const ByteArrayCollector_1 = __webpack_require__(47324); -function createBufferedReadableStream(upstream, size, logger) { - const reader = upstream.getReader(); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = ["", new ByteArrayCollector_1.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, - }); -} -exports.createBufferedReadable = createBufferedReadableStream; -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; -} - - -/***/ }), - -/***/ 42098: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getAwsChunkedEncodingStream = void 0; -const stream_1 = __webpack_require__(2203); -const getAwsChunkedEncodingStream = (readableStream, options) => { - const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; - const checksumRequired = base64Encoder !== undefined && - checksumAlgorithmFn !== undefined && - checksumLocationName !== undefined && - streamHasher !== undefined; - const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; - const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } }); - readableStream.on("data", (data) => { - const length = bodyLengthChecker(data) || 0; - awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); - awsChunkedEncodingStream.push(data); - awsChunkedEncodingStream.push("\r\n"); - }); - readableStream.on("end", async () => { - awsChunkedEncodingStream.push(`0\r\n`); - if (checksumRequired) { - const checksum = base64Encoder(await digest); - awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); - awsChunkedEncodingStream.push(`\r\n`); - } - awsChunkedEncodingStream.push(null); - }); - return awsChunkedEncodingStream; -}; -exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; - - -/***/ }), - -/***/ 39562: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = headStream; -async function headStream(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; -} - - -/***/ }), - -/***/ 53188: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = void 0; -const stream_1 = __webpack_require__(2203); -const headStream_browser_1 = __webpack_require__(39562); -const stream_type_check_1 = __webpack_require__(17782); -const headStream = (stream, bytes) => { - if ((0, stream_type_check_1.isReadableStream)(stream)) { - return (0, headStream_browser_1.headStream)(stream, bytes); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - collector.limit = bytes; - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.buffers)); - resolve(bytes); - }); - }); -}; -exports.headStream = headStream; -class Collector extends stream_1.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(); - } -} - - -/***/ }), - -/***/ 64356: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var utilBase64 = __webpack_require__(76249); -var utilUtf8 = __webpack_require__(55969); -var ChecksumStream = __webpack_require__(97975); -var createChecksumStream = __webpack_require__(53535); -var createBufferedReadable = __webpack_require__(76861); -var getAwsChunkedEncodingStream = __webpack_require__(42098); -var headStream = __webpack_require__(53188); -var sdkStreamMixin = __webpack_require__(23657); -var splitStream = __webpack_require__(60964); -var streamTypeCheck = __webpack_require__(17782); - -class Uint8ArrayBlobAdapter extends Uint8Array { - static fromString(source, encoding = "utf-8") { - if (typeof source === "string") { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source)); - } - return Uint8ArrayBlobAdapter.mutate(utilUtf8.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 utilBase64.toBase64(this); - } - return utilUtf8.toUtf8(this); - } -} - -exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter; -Object.keys(ChecksumStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return ChecksumStream[k]; } - }); -}); -Object.keys(createChecksumStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return createChecksumStream[k]; } - }); -}); -Object.keys(createBufferedReadable).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return createBufferedReadable[k]; } - }); -}); -Object.keys(getAwsChunkedEncodingStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getAwsChunkedEncodingStream[k]; } - }); -}); -Object.keys(headStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return headStream[k]; } - }); -}); -Object.keys(sdkStreamMixin).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return sdkStreamMixin[k]; } - }); -}); -Object.keys(splitStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return splitStream[k]; } - }); -}); -Object.keys(streamTypeCheck).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return streamTypeCheck[k]; } - }); -}); - - -/***/ }), - -/***/ 9655: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const fetch_http_handler_1 = __webpack_require__(90793); -const util_base64_1 = __webpack_require__(76249); -const util_hex_encoding_1 = __webpack_require__(61307); -const util_utf8_1 = __webpack_require__(55969); -const stream_type_check_1 = __webpack_require__(17782); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - if (!isBlobInstance(stream) && !(0, stream_type_check_1.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); - } - transformed = true; - return await (0, fetch_http_handler_1.streamCollector)(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.\n" + - "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: transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === "base64") { - return (0, util_base64_1.toBase64)(buf); - } - else if (encoding === "hex") { - return (0, util_hex_encoding_1.toHex)(buf); - } - else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { - return (0, util_utf8_1.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); - } - transformed = true; - if (isBlobInstance(stream)) { - return blobToWebStream(stream); - } - else if ((0, stream_type_check_1.isReadableStream)(stream)) { - return stream; - } - else { - throw new Error(`Cannot transform payload to web stream, got ${stream}`); - } - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; -const isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; - - -/***/ }), - -/***/ 23657: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const node_http_handler_1 = __webpack_require__(60967); -const util_buffer_from_1 = __webpack_require__(54351); -const stream_1 = __webpack_require__(2203); -const sdk_stream_mixin_browser_1 = __webpack_require__(9655); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - if (!(stream instanceof stream_1.Readable)) { - try { - return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); - } - catch (e) { - 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 (0, node_http_handler_1.streamCollector)(stream); - }; - return Object.assign(stream, { - transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === undefined || Buffer.isEncoding(encoding)) { - return (0, util_buffer_from_1.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 stream_1.Readable.toWeb !== "function") { - throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); - } - transformed = true; - return stream_1.Readable.toWeb(stream); - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; - - -/***/ }), - -/***/ 36874: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -async function splitStream(stream) { - if (typeof stream.stream === "function") { - stream = stream.stream(); - } - const readableStream = stream; - return readableStream.tee(); -} - - -/***/ }), - -/***/ 60964: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -const stream_1 = __webpack_require__(2203); -const splitStream_browser_1 = __webpack_require__(36874); -const stream_type_check_1 = __webpack_require__(17782); -async function splitStream(stream) { - if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) { - return (0, splitStream_browser_1.splitStream)(stream); - } - const stream1 = new stream_1.PassThrough(); - const stream2 = new stream_1.PassThrough(); - stream.pipe(stream1); - stream.pipe(stream2); - return [stream1, stream2]; -} - - -/***/ }), - -/***/ 17782: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isBlob = exports.isReadableStream = void 0; -const isReadableStream = (stream) => typeof ReadableStream === "function" && - (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream); -exports.isReadableStream = isReadableStream; -const isBlob = (blob) => { - return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob); -}; -exports.isBlob = isBlob; - - -/***/ }), - -/***/ 54474: -/***/ ((__unused_webpack_module, exports) => { - - - -const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); -const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; - -const escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/"); - -exports.escapeUri = escapeUri; -exports.escapeUriPath = escapeUriPath; - - -/***/ }), - -/***/ 55969: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var utilBufferFrom = __webpack_require__(54351); - -const fromUtf8 = (input) => { - const buf = utilBufferFrom.fromString(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); -}; - -const toUint8Array = (data) => { - if (typeof data === "string") { - return fromUtf8(data); - } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data); -}; - -const 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 utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); -}; - -exports.fromUtf8 = fromUtf8; -exports.toUint8Array = toUint8Array; -exports.toUtf8 = toUtf8; - - -/***/ }), - -/***/ 97523: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var protocolHttp = __webpack_require__(17898); -var core = __webpack_require__(88180); -var propertyProvider = __webpack_require__(6180); +var protocolHttp = __webpack_require__(2356); +var core = __webpack_require__(402); +var propertyProvider = __webpack_require__(1238); var client = __webpack_require__(5152); -var signatureV4 = __webpack_require__(75118); +var signatureV4 = __webpack_require__(5118); const getDateHeader = (response) => protocolHttp.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined; @@ -6804,16 +1045,16 @@ exports.validateSigningProperties = validateSigningProperties; /***/ }), -/***/ 60998: +/***/ 998: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var __webpack_unused_export__; -var propertyProvider = __webpack_require__(38430); -var sharedIniFileLoader = __webpack_require__(14876); +var propertyProvider = __webpack_require__(1238); +var sharedIniFileLoader = __webpack_require__(4964); var client = __webpack_require__(5152); -var tokenProviders = __webpack_require__(75433); +var tokenProviders = __webpack_require__(5433); const isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || @@ -6864,7 +1105,7 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss }); } const { accessToken } = token; - const { SSOClient, GetRoleCredentialsCommand } = await Promise.resolve().then(function () { return __webpack_require__(16553); }); + const { SSOClient, GetRoleCredentialsCommand } = await Promise.resolve().then(function () { return __webpack_require__(6553); }); const sso = ssoClient || new SSOClient(Object.assign({}, clientConfig ?? {}, { logger: clientConfig?.logger ?? parentClientConfig?.logger, @@ -6980,576 +1221,58 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => { ssoStartUrl, ssoSession, ssoAccountId, - ssoRegion, - ssoRoleName, - ssoClient, - clientConfig: init.clientConfig, - parentClientConfig: init.parentClientConfig, - profile: profileName, - filepath: init.filepath, - configFilepath: init.configFilepath, - ignoreCache: init.ignoreCache, - logger: init.logger, - }); - } -}; - -exports.fromSSO = fromSSO; -__webpack_unused_export__ = isSsoProfile; -__webpack_unused_export__ = validateSsoProfile; - - -/***/ }), - -/***/ 16553: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var clientSso = __webpack_require__(62054); - - - -Object.defineProperty(exports, "GetRoleCredentialsCommand", ({ - enumerable: true, - get: function () { return clientSso.GetRoleCredentialsCommand; } -})); -Object.defineProperty(exports, "SSOClient", ({ - enumerable: true, - get: function () { return clientSso.SSOClient; } -})); - - -/***/ }), - -/***/ 38430: -/***/ ((__unused_webpack_module, exports) => { - - - -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); - } -} - -const 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; -}; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const 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; - }; -}; - -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; - - -/***/ }), - -/***/ 4484: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __webpack_require__(70857); -const path_1 = __webpack_require__(16928); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; -}; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; -}; -exports.getHomeDir = getHomeDir; - - -/***/ }), - -/***/ 66773: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __webpack_require__(76982); -const path_1 = __webpack_require__(16928); -const getHomeDir_1 = __webpack_require__(4484); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); -}; -exports.getSSOTokenFilepath = getSSOTokenFilepath; - - -/***/ }), - -/***/ 26518: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; -const fs_1 = __webpack_require__(79896); -const getSSOTokenFilepath_1 = __webpack_require__(66773); -const { readFile } = fs_1.promises; -exports.tokenIntercept = {}; -const getSSOTokenFromFile = async (id) => { - if (exports.tokenIntercept[id]) { - return exports.tokenIntercept[id]; - } - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); -}; -exports.getSSOTokenFromFile = getSSOTokenFromFile; - - -/***/ }), - -/***/ 14876: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var getHomeDir = __webpack_require__(4484); -var getSSOTokenFilepath = __webpack_require__(66773); -var getSSOTokenFromFile = __webpack_require__(26518); -var path = __webpack_require__(16928); -var types = __webpack_require__(30650); -var slurpFile = __webpack_require__(67438); - -const ENV_PROFILE = "AWS_PROFILE"; -const DEFAULT_PROFILE = "default"; -const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; - -const CONFIG_PREFIX_SEPARATOR = "."; - -const getConfigData = (data) => Object.entries(data) - .filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; - } - return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}) - .reduce((acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; -}, { - ...(data.default && { default: data.default }), -}); - -const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); - -const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); - -const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -const profileNameBlockList = ["__proto__", "profile __proto__"]; -const 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(types.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; -}; - -const swallowError$1 = () => ({}); -const loadSharedConfigFiles = async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = getHomeDir.getHomeDir(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = path.join(homeDir, filepath.slice(2)); - } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); - } - const parsedFiles = await Promise.all([ - slurpFile.slurpFile(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .then(getConfigData) - .catch(swallowError$1), - slurpFile.slurpFile(resolvedFilepath, { + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig: init.clientConfig, + parentClientConfig: init.parentClientConfig, + profile: profileName, + filepath: init.filepath, + configFilepath: init.configFilepath, ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .catch(swallowError$1), - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1], - }; -}; - -const getSsoSessionData = (data) => Object.entries(data) - .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) - .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); - -const swallowError = () => ({}); -const loadSsoSessionData = async (init = {}) => slurpFile.slurpFile(init.configFilepath ?? getConfigFilepath()) - .then(parseIni) - .then(getSsoSessionData) - .catch(swallowError); - -const 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; - } - } + logger: init.logger, + }); } - return merged; -}; - -const parseKnownFiles = async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); -}; - -const externalDataInterceptor = { - getFileRecord() { - return slurpFile.fileIntercept; - }, - interceptFile(path, contents) { - slurpFile.fileIntercept[path] = Promise.resolve(contents); - }, - getTokenRecord() { - return getSSOTokenFromFile.tokenIntercept; - }, - interceptToken(id, contents) { - getSSOTokenFromFile.tokenIntercept[id] = contents; - }, }; -Object.defineProperty(exports, "getSSOTokenFromFile", ({ - enumerable: true, - get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } -})); -exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; -exports.DEFAULT_PROFILE = DEFAULT_PROFILE; -exports.ENV_PROFILE = ENV_PROFILE; -exports.externalDataInterceptor = externalDataInterceptor; -exports.getProfileName = getProfileName; -exports.loadSharedConfigFiles = loadSharedConfigFiles; -exports.loadSsoSessionData = loadSsoSessionData; -exports.parseKnownFiles = parseKnownFiles; -Object.keys(getHomeDir).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getHomeDir[k]; } - }); -}); -Object.keys(getSSOTokenFilepath).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getSSOTokenFilepath[k]; } - }); -}); +exports.fromSSO = fromSSO; +__webpack_unused_export__ = isSsoProfile; +__webpack_unused_export__ = validateSsoProfile; /***/ }), -/***/ 67438: +/***/ 6553: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = void 0; -const fs_1 = __webpack_require__(79896); -const { readFile } = fs_1.promises; -exports.filePromisesHash = {}; -exports.fileIntercept = {}; -const slurpFile = (path, options) => { - if (exports.fileIntercept[path] !== undefined) { - return exports.fileIntercept[path]; - } - if (!exports.filePromisesHash[path] || options?.ignoreCache) { - exports.filePromisesHash[path] = readFile(path, "utf8"); - } - return exports.filePromisesHash[path]; -}; -exports.slurpFile = slurpFile; - - -/***/ }), - -/***/ 30650: -/***/ ((__unused_webpack_module, exports) => { - - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); -const SMITHY_CONTEXT_KEY = "__smithy_context"; +var clientSso = __webpack_require__(2054); -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; +Object.defineProperty(exports, "GetRoleCredentialsCommand", ({ + enumerable: true, + get: function () { return clientSso.GetRoleCredentialsCommand; } +})); +Object.defineProperty(exports, "SSOClient", ({ + enumerable: true, + get: function () { return clientSso.SSOClient; } +})); /***/ }), -/***/ 75433: +/***/ 5433: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var client = __webpack_require__(5152); -var httpAuthSchemes = __webpack_require__(97523); -var propertyProvider = __webpack_require__(51515); -var sharedIniFileLoader = __webpack_require__(10751); -var fs = __webpack_require__(79896); +var httpAuthSchemes = __webpack_require__(7523); +var propertyProvider = __webpack_require__(1238); +var sharedIniFileLoader = __webpack_require__(4964); +var fs = __webpack_require__(9896); const fromEnvSigningName = ({ logger, signingName } = {}) => async () => { logger?.debug?.("@aws-sdk/token-providers - fromEnvSigningName"); @@ -7569,7 +1292,7 @@ const EXPIRE_WINDOW_MS = 5 * 60 * 1000; const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; const getSsoOidcClient = async (ssoRegion, init = {}) => { - const { SSOOIDCClient } = await Promise.all(/* import() */[__webpack_require__.e(755), __webpack_require__.e(443)]).then(__webpack_require__.t.bind(__webpack_require__, 89443, 19)); + const { SSOOIDCClient } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 9443, 19)); const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, { region: ssoRegion ?? init.clientConfig?.region, logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger, @@ -7578,7 +1301,7 @@ const getSsoOidcClient = async (ssoRegion, init = {}) => { }; const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => { - const { CreateTokenCommand } = await Promise.all(/* import() */[__webpack_require__.e(755), __webpack_require__.e(443)]).then(__webpack_require__.t.bind(__webpack_require__, 89443, 19)); + const { CreateTokenCommand } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 9443, 19)); const ssoOidcClient = await getSsoOidcClient(ssoRegion, init); return ssoOidcClient.send(new CreateTokenCommand({ clientId: ssoToken.clientId, @@ -7709,528 +1432,10 @@ exports.nodeProvider = nodeProvider; /***/ }), -/***/ 51515: -/***/ ((__unused_webpack_module, exports) => { - - - -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); - } -} - -const 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; -}; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const 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; - }; -}; - -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; - - -/***/ }), - -/***/ 11593: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __webpack_require__(70857); -const path_1 = __webpack_require__(16928); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; -}; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; -}; -exports.getHomeDir = getHomeDir; - - -/***/ }), - -/***/ 77366: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __webpack_require__(76982); -const path_1 = __webpack_require__(16928); -const getHomeDir_1 = __webpack_require__(11593); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); -}; -exports.getSSOTokenFilepath = getSSOTokenFilepath; - - -/***/ }), - -/***/ 93897: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; -const fs_1 = __webpack_require__(79896); -const getSSOTokenFilepath_1 = __webpack_require__(77366); -const { readFile } = fs_1.promises; -exports.tokenIntercept = {}; -const getSSOTokenFromFile = async (id) => { - if (exports.tokenIntercept[id]) { - return exports.tokenIntercept[id]; - } - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); -}; -exports.getSSOTokenFromFile = getSSOTokenFromFile; - - -/***/ }), - -/***/ 10751: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var getHomeDir = __webpack_require__(11593); -var getSSOTokenFilepath = __webpack_require__(77366); -var getSSOTokenFromFile = __webpack_require__(93897); -var path = __webpack_require__(16928); -var types = __webpack_require__(54387); -var slurpFile = __webpack_require__(69545); - -const ENV_PROFILE = "AWS_PROFILE"; -const DEFAULT_PROFILE = "default"; -const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; - -const CONFIG_PREFIX_SEPARATOR = "."; - -const getConfigData = (data) => Object.entries(data) - .filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; - } - return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}) - .reduce((acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; -}, { - ...(data.default && { default: data.default }), -}); - -const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); - -const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); - -const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -const profileNameBlockList = ["__proto__", "profile __proto__"]; -const 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(types.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; -}; - -const swallowError$1 = () => ({}); -const loadSharedConfigFiles = async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = getHomeDir.getHomeDir(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = path.join(homeDir, filepath.slice(2)); - } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); - } - const parsedFiles = await Promise.all([ - slurpFile.slurpFile(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .then(getConfigData) - .catch(swallowError$1), - slurpFile.slurpFile(resolvedFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .catch(swallowError$1), - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1], - }; -}; - -const getSsoSessionData = (data) => Object.entries(data) - .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) - .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); - -const swallowError = () => ({}); -const loadSsoSessionData = async (init = {}) => slurpFile.slurpFile(init.configFilepath ?? getConfigFilepath()) - .then(parseIni) - .then(getSsoSessionData) - .catch(swallowError); - -const 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; -}; - -const parseKnownFiles = async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); -}; - -const externalDataInterceptor = { - getFileRecord() { - return slurpFile.fileIntercept; - }, - interceptFile(path, contents) { - slurpFile.fileIntercept[path] = Promise.resolve(contents); - }, - getTokenRecord() { - return getSSOTokenFromFile.tokenIntercept; - }, - interceptToken(id, contents) { - getSSOTokenFromFile.tokenIntercept[id] = contents; - }, -}; - -Object.defineProperty(exports, "getSSOTokenFromFile", ({ - enumerable: true, - get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } -})); -exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; -exports.DEFAULT_PROFILE = DEFAULT_PROFILE; -exports.ENV_PROFILE = ENV_PROFILE; -exports.externalDataInterceptor = externalDataInterceptor; -exports.getProfileName = getProfileName; -exports.loadSharedConfigFiles = loadSharedConfigFiles; -exports.loadSsoSessionData = loadSsoSessionData; -exports.parseKnownFiles = parseKnownFiles; -Object.keys(getHomeDir).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getHomeDir[k]; } - }); -}); -Object.keys(getSSOTokenFilepath).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getSSOTokenFilepath[k]; } - }); -}); - - -/***/ }), - -/***/ 69545: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = void 0; -const fs_1 = __webpack_require__(79896); -const { readFile } = fs_1.promises; -exports.filePromisesHash = {}; -exports.fileIntercept = {}; -const slurpFile = (path, options) => { - if (exports.fileIntercept[path] !== undefined) { - return exports.fileIntercept[path]; - } - if (!exports.filePromisesHash[path] || options?.ignoreCache) { - exports.filePromisesHash[path] = readFile(path, "utf8"); - } - return exports.filePromisesHash[path]; -}; -exports.slurpFile = slurpFile; - - -/***/ }), - -/***/ 54387: -/***/ ((__unused_webpack_module, exports) => { - - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - -/***/ }), - -/***/ 45188: +/***/ 5188: /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.911.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.911.0","@aws-sdk/middleware-host-header":"3.910.0","@aws-sdk/middleware-logger":"3.910.0","@aws-sdk/middleware-recursion-detection":"3.910.0","@aws-sdk/middleware-user-agent":"3.911.0","@aws-sdk/region-config-resolver":"3.910.0","@aws-sdk/types":"3.910.0","@aws-sdk/util-endpoints":"3.910.0","@aws-sdk/util-user-agent-browser":"3.910.0","@aws-sdk/util-user-agent-node":"3.911.0","@smithy/config-resolver":"^4.3.2","@smithy/core":"^3.16.1","@smithy/fetch-http-handler":"^5.3.3","@smithy/hash-node":"^4.2.2","@smithy/invalid-dependency":"^4.2.2","@smithy/middleware-content-length":"^4.2.2","@smithy/middleware-endpoint":"^4.3.3","@smithy/middleware-retry":"^4.4.3","@smithy/middleware-serde":"^4.2.2","@smithy/middleware-stack":"^4.2.2","@smithy/node-config-provider":"^4.3.2","@smithy/node-http-handler":"^4.4.1","@smithy/protocol-http":"^5.3.2","@smithy/smithy-client":"^4.8.1","@smithy/types":"^4.7.1","@smithy/url-parser":"^4.2.2","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.2","@smithy/util-defaults-mode-node":"^4.2.3","@smithy/util-endpoints":"^3.2.2","@smithy/util-middleware":"^4.2.2","@smithy/util-retry":"^4.2.2","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.921.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.921.0","@aws-sdk/middleware-host-header":"3.921.0","@aws-sdk/middleware-logger":"3.921.0","@aws-sdk/middleware-recursion-detection":"3.921.0","@aws-sdk/middleware-user-agent":"3.921.0","@aws-sdk/region-config-resolver":"3.921.0","@aws-sdk/types":"3.921.0","@aws-sdk/util-endpoints":"3.921.0","@aws-sdk/util-user-agent-browser":"3.921.0","@aws-sdk/util-user-agent-node":"3.921.0","@smithy/config-resolver":"^4.4.1","@smithy/core":"^3.17.2","@smithy/fetch-http-handler":"^5.3.5","@smithy/hash-node":"^4.2.4","@smithy/invalid-dependency":"^4.2.4","@smithy/middleware-content-length":"^4.2.4","@smithy/middleware-endpoint":"^4.3.6","@smithy/middleware-retry":"^4.4.6","@smithy/middleware-serde":"^4.2.4","@smithy/middleware-stack":"^4.2.4","@smithy/node-config-provider":"^4.3.4","@smithy/node-http-handler":"^4.4.4","@smithy/protocol-http":"^5.3.4","@smithy/smithy-client":"^4.9.2","@smithy/types":"^4.8.1","@smithy/url-parser":"^4.2.4","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.5","@smithy/util-defaults-mode-node":"^4.2.7","@smithy/util-endpoints":"^3.2.4","@smithy/util-middleware":"^4.2.4","@smithy/util-retry":"^4.2.4","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}'); /***/ }) diff --git a/dist/index.js b/dist/index.js index 31beb576..05792295 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,16 +1,16 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 46136: +/***/ 6136: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const path = __nccwpck_require__(16928); -const core = __nccwpck_require__(37484); -const { CodeDeploy, waitUntilDeploymentSuccessful } = __nccwpck_require__(17507); -const { ECS, waitUntilServicesStable, waitUntilTasksStopped } = __nccwpck_require__(80212); -const yaml = __nccwpck_require__(38815); -const fs = __nccwpck_require__(79896); -const crypto = __nccwpck_require__(76982); +const path = __nccwpck_require__(6928); +const core = __nccwpck_require__(7484); +const { CodeDeploy, waitUntilDeploymentSuccessful } = __nccwpck_require__(7507); +const { ECS, waitUntilServicesStable, waitUntilTasksStopped } = __nccwpck_require__(212); +const yaml = __nccwpck_require__(8815); +const fs = __nccwpck_require__(9896); +const crypto = __nccwpck_require__(6982); const MAX_WAIT_MINUTES = 360; // 6 hours const WAIT_DEFAULT_DELAY_SEC = 15; @@ -593,7 +593,7 @@ if (require.main === require.cache[eval('__filename')]) { /***/ }), -/***/ 44914: +/***/ 4914: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -623,8 +623,8 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.issue = exports.issueCommand = void 0; -const os = __importStar(__nccwpck_require__(70857)); -const utils_1 = __nccwpck_require__(30302); +const os = __importStar(__nccwpck_require__(857)); +const utils_1 = __nccwpck_require__(302); /** * Commands * @@ -696,7 +696,7 @@ function escapeProperty(s) { /***/ }), -/***/ 37484: +/***/ 7484: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -735,12 +735,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -const command_1 = __nccwpck_require__(44914); -const file_command_1 = __nccwpck_require__(24753); -const utils_1 = __nccwpck_require__(30302); -const os = __importStar(__nccwpck_require__(70857)); -const path = __importStar(__nccwpck_require__(16928)); -const oidc_utils_1 = __nccwpck_require__(35306); +const command_1 = __nccwpck_require__(4914); +const file_command_1 = __nccwpck_require__(4753); +const utils_1 = __nccwpck_require__(302); +const os = __importStar(__nccwpck_require__(857)); +const path = __importStar(__nccwpck_require__(6928)); +const oidc_utils_1 = __nccwpck_require__(5306); /** * The code to exit an action */ @@ -1025,29 +1025,29 @@ exports.getIDToken = getIDToken; /** * Summary exports */ -var summary_1 = __nccwpck_require__(71847); +var summary_1 = __nccwpck_require__(1847); Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); /** * @deprecated use core.summary */ -var summary_2 = __nccwpck_require__(71847); +var summary_2 = __nccwpck_require__(1847); Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); /** * Path exports */ -var path_utils_1 = __nccwpck_require__(31976); +var path_utils_1 = __nccwpck_require__(1976); Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); /** * Platform utilities exports */ -exports.platform = __importStar(__nccwpck_require__(18968)); +exports.platform = __importStar(__nccwpck_require__(8968)); //# sourceMappingURL=core.js.map /***/ }), -/***/ 24753: +/***/ 4753: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1080,10 +1080,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ -const crypto = __importStar(__nccwpck_require__(76982)); -const fs = __importStar(__nccwpck_require__(79896)); -const os = __importStar(__nccwpck_require__(70857)); -const utils_1 = __nccwpck_require__(30302); +const crypto = __importStar(__nccwpck_require__(6982)); +const fs = __importStar(__nccwpck_require__(9896)); +const os = __importStar(__nccwpck_require__(857)); +const utils_1 = __nccwpck_require__(302); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { @@ -1116,7 +1116,7 @@ exports.prepareKeyValueMessage = prepareKeyValueMessage; /***/ }), -/***/ 35306: +/***/ 5306: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1132,9 +1132,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(54844); -const auth_1 = __nccwpck_require__(44552); -const core_1 = __nccwpck_require__(37484); +const http_client_1 = __nccwpck_require__(4844); +const auth_1 = __nccwpck_require__(4552); +const core_1 = __nccwpck_require__(7484); class OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { @@ -1200,7 +1200,7 @@ exports.OidcClient = OidcClient; /***/ }), -/***/ 31976: +/***/ 1976: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1230,7 +1230,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; -const path = __importStar(__nccwpck_require__(16928)); +const path = __importStar(__nccwpck_require__(6928)); /** * toPosixPath converts the given path to the posix form. On Windows, \\ will be * replaced with /. @@ -1269,7 +1269,7 @@ exports.toPlatformPath = toPlatformPath; /***/ }), -/***/ 18968: +/***/ 8968: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1311,8 +1311,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; -const os_1 = __importDefault(__nccwpck_require__(70857)); -const exec = __importStar(__nccwpck_require__(95236)); +const os_1 = __importDefault(__nccwpck_require__(857)); +const exec = __importStar(__nccwpck_require__(5236)); const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { silent: true @@ -1370,7 +1370,7 @@ exports.getDetails = getDetails; /***/ }), -/***/ 71847: +/***/ 1847: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1386,8 +1386,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; -const os_1 = __nccwpck_require__(70857); -const fs_1 = __nccwpck_require__(79896); +const os_1 = __nccwpck_require__(857); +const fs_1 = __nccwpck_require__(9896); const { access, appendFile, writeFile } = fs_1.promises; exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; @@ -1660,7 +1660,7 @@ exports.summary = _summary; /***/ }), -/***/ 30302: +/***/ 302: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -1707,7 +1707,7 @@ exports.toCommandProperties = toCommandProperties; /***/ }), -/***/ 95236: +/***/ 5236: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1742,7 +1742,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getExecOutput = exports.exec = void 0; -const string_decoder_1 = __nccwpck_require__(13193); +const string_decoder_1 = __nccwpck_require__(3193); const tr = __importStar(__nccwpck_require__(6665)); /** * Exec a command. @@ -1852,13 +1852,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.argStringToArray = exports.ToolRunner = void 0; -const os = __importStar(__nccwpck_require__(70857)); -const events = __importStar(__nccwpck_require__(24434)); -const child = __importStar(__nccwpck_require__(35317)); -const path = __importStar(__nccwpck_require__(16928)); -const io = __importStar(__nccwpck_require__(94994)); -const ioUtil = __importStar(__nccwpck_require__(75207)); -const timers_1 = __nccwpck_require__(53557); +const os = __importStar(__nccwpck_require__(857)); +const events = __importStar(__nccwpck_require__(4434)); +const child = __importStar(__nccwpck_require__(5317)); +const path = __importStar(__nccwpck_require__(6928)); +const io = __importStar(__nccwpck_require__(4994)); +const ioUtil = __importStar(__nccwpck_require__(5207)); +const timers_1 = __nccwpck_require__(3557); /* eslint-disable @typescript-eslint/unbound-method */ const IS_WINDOWS = process.platform === 'win32'; /* @@ -2442,7 +2442,7 @@ class ExecState extends events.EventEmitter { /***/ }), -/***/ 44552: +/***/ 4552: /***/ (function(__unused_webpack_module, exports) { "use strict"; @@ -2530,7 +2530,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand /***/ }), -/***/ 54844: +/***/ 4844: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2570,11 +2570,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; -const http = __importStar(__nccwpck_require__(58611)); -const https = __importStar(__nccwpck_require__(65692)); -const pm = __importStar(__nccwpck_require__(54988)); -const tunnel = __importStar(__nccwpck_require__(20770)); -const undici_1 = __nccwpck_require__(46752); +const http = __importStar(__nccwpck_require__(8611)); +const https = __importStar(__nccwpck_require__(5692)); +const pm = __importStar(__nccwpck_require__(4988)); +const tunnel = __importStar(__nccwpck_require__(770)); +const undici_1 = __nccwpck_require__(6752); var HttpCodes; (function (HttpCodes) { HttpCodes[HttpCodes["OK"] = 200] = "OK"; @@ -3189,7 +3189,7 @@ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCa /***/ }), -/***/ 54988: +/***/ 4988: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -3291,7 +3291,7 @@ class DecodedURL extends URL { /***/ }), -/***/ 75207: +/***/ 5207: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3327,8 +3327,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; -const fs = __importStar(__nccwpck_require__(79896)); -const path = __importStar(__nccwpck_require__(16928)); +const fs = __importStar(__nccwpck_require__(9896)); +const path = __importStar(__nccwpck_require__(6928)); _a = fs.promises // export const {open} = 'fs' , exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; @@ -3481,7 +3481,7 @@ exports.getCmdPath = getCmdPath; /***/ }), -/***/ 94994: +/***/ 4994: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3516,9 +3516,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; -const assert_1 = __nccwpck_require__(42613); -const path = __importStar(__nccwpck_require__(16928)); -const ioUtil = __importStar(__nccwpck_require__(75207)); +const assert_1 = __nccwpck_require__(2613); +const path = __importStar(__nccwpck_require__(6928)); +const ioUtil = __importStar(__nccwpck_require__(5207)); /** * Copies a file or folder. * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js @@ -3787,7 +3787,7 @@ function copyFile(srcFile, destFile, force) { /***/ }), -/***/ 45324: +/***/ 5324: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -3795,7 +3795,7 @@ function copyFile(srcFile, destFile, force) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveHttpAuthSchemeConfig = exports.defaultCodeDeployHttpAuthSchemeProvider = exports.defaultCodeDeployHttpAuthSchemeParametersProvider = void 0; const core_1 = __nccwpck_require__(8704); -const util_middleware_1 = __nccwpck_require__(25695); +const util_middleware_1 = __nccwpck_require__(6324); const defaultCodeDeployHttpAuthSchemeParametersProvider = async (config, context, input) => { return { operation: (0, util_middleware_1.getSmithyContext)(context).operation, @@ -3842,16 +3842,16 @@ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; /***/ }), -/***/ 44242: +/***/ 4242: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(83068); -const util_endpoints_2 = __nccwpck_require__(79674); -const ruleset_1 = __nccwpck_require__(88635); +const util_endpoints_1 = __nccwpck_require__(3068); +const util_endpoints_2 = __nccwpck_require__(9674); +const ruleset_1 = __nccwpck_require__(8635); const cache = new util_endpoints_2.EndpointCache({ size: 50, params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], @@ -3868,7 +3868,7 @@ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunct /***/ }), -/***/ 88635: +/***/ 8635: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -3876,36 +3876,36 @@ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunct Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ruleSet = void 0; const s = "required", t = "fn", u = "argv", v = "ref"; -const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "String" }, i = { [s]: true, "default": false, "type": "Boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }]; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "string" }, i = { [s]: true, "default": false, "type": "boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }]; const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }, { conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ endpoint: { url: "https://codedeploy-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ endpoint: { url: "https://codedeploy-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ endpoint: { url: "https://codedeploy.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://codedeploy.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; exports.ruleSet = _data; /***/ }), -/***/ 17507: +/***/ 7507: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var middlewareHostHeader = __nccwpck_require__(52590); -var middlewareLogger = __nccwpck_require__(85242); -var middlewareRecursionDetection = __nccwpck_require__(81568); -var middlewareUserAgent = __nccwpck_require__(32959); -var configResolver = __nccwpck_require__(39316); -var core = __nccwpck_require__(90475); -var middlewareContentLength = __nccwpck_require__(47212); -var middlewareEndpoint = __nccwpck_require__(53152); -var middlewareRetry = __nccwpck_require__(19618); -var smithyClient = __nccwpck_require__(61411); -var httpAuthSchemeProvider = __nccwpck_require__(45324); -var runtimeConfig = __nccwpck_require__(74277); -var regionConfigResolver = __nccwpck_require__(36463); -var protocolHttp = __nccwpck_require__(5559); -var middlewareSerde = __nccwpck_require__(29514); +var middlewareHostHeader = __nccwpck_require__(2590); +var middlewareLogger = __nccwpck_require__(5242); +var middlewareRecursionDetection = __nccwpck_require__(1568); +var middlewareUserAgent = __nccwpck_require__(2959); +var configResolver = __nccwpck_require__(9316); +var core = __nccwpck_require__(402); +var middlewareContentLength = __nccwpck_require__(7212); +var middlewareEndpoint = __nccwpck_require__(99); +var middlewareRetry = __nccwpck_require__(9618); +var smithyClient = __nccwpck_require__(1411); +var httpAuthSchemeProvider = __nccwpck_require__(5324); +var runtimeConfig = __nccwpck_require__(4277); +var regionConfigResolver = __nccwpck_require__(6463); +var protocolHttp = __nccwpck_require__(2356); +var middlewareSerde = __nccwpck_require__(3255); var core$1 = __nccwpck_require__(8704); -var utilWaiter = __nccwpck_require__(95290); +var utilWaiter = __nccwpck_require__(5290); const resolveClientEndpointParameters = (options) => { return Object.assign(options, { @@ -9281,29 +9281,29 @@ exports.waitUntilDeploymentSuccessful = waitUntilDeploymentSuccessful; /***/ }), -/***/ 74277: +/***/ 4277: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(61860); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(30909)); +const tslib_1 = __nccwpck_require__(1860); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(909)); const core_1 = __nccwpck_require__(8704); const credential_provider_node_1 = __nccwpck_require__(5861); -const util_user_agent_node_1 = __nccwpck_require__(51656); -const config_resolver_1 = __nccwpck_require__(39316); +const util_user_agent_node_1 = __nccwpck_require__(1656); +const config_resolver_1 = __nccwpck_require__(9316); const hash_node_1 = __nccwpck_require__(5092); -const middleware_retry_1 = __nccwpck_require__(19618); -const node_config_provider_1 = __nccwpck_require__(44297); -const node_http_handler_1 = __nccwpck_require__(11176); -const util_body_length_node_1 = __nccwpck_require__(13638); -const util_retry_1 = __nccwpck_require__(15518); +const middleware_retry_1 = __nccwpck_require__(9618); +const node_config_provider_1 = __nccwpck_require__(5704); +const node_http_handler_1 = __nccwpck_require__(1279); +const util_body_length_node_1 = __nccwpck_require__(3638); +const util_retry_1 = __nccwpck_require__(5518); const runtimeConfig_shared_1 = __nccwpck_require__(4938); -const smithy_client_1 = __nccwpck_require__(61411); -const util_defaults_mode_node_1 = __nccwpck_require__(15435); -const smithy_client_2 = __nccwpck_require__(61411); +const smithy_client_1 = __nccwpck_require__(1411); +const util_defaults_mode_node_1 = __nccwpck_require__(5435); +const smithy_client_2 = __nccwpck_require__(1411); const getRuntimeConfig = (config) => { (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); @@ -9353,12 +9353,12 @@ exports.getRuntimeConfig = getRuntimeConfig; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; const core_1 = __nccwpck_require__(8704); -const smithy_client_1 = __nccwpck_require__(61411); -const url_parser_1 = __nccwpck_require__(81983); -const util_base64_1 = __nccwpck_require__(26262); -const util_utf8_1 = __nccwpck_require__(21038); -const httpAuthSchemeProvider_1 = __nccwpck_require__(45324); -const endpointResolver_1 = __nccwpck_require__(44242); +const smithy_client_1 = __nccwpck_require__(1411); +const url_parser_1 = __nccwpck_require__(4494); +const util_base64_1 = __nccwpck_require__(8385); +const util_utf8_1 = __nccwpck_require__(1577); +const httpAuthSchemeProvider_1 = __nccwpck_require__(5324); +const endpointResolver_1 = __nccwpck_require__(4242); const getRuntimeConfig = (config) => { return { apiVersion: "2014-10-06", @@ -9387,44810 +9387,12676 @@ exports.getRuntimeConfig = getRuntimeConfig; /***/ }), -/***/ 90475: +/***/ 1367: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -var types = __nccwpck_require__(20873); -var utilMiddleware = __nccwpck_require__(25695); -var middlewareSerde = __nccwpck_require__(29514); -var protocolHttp = __nccwpck_require__(5559); -var protocols = __nccwpck_require__(50029); - -const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); - -const 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; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveHttpAuthSchemeConfig = exports.defaultECSHttpAuthSchemeProvider = exports.defaultECSHttpAuthSchemeParametersProvider = void 0; +const core_1 = __nccwpck_require__(8704); +const util_middleware_1 = __nccwpck_require__(6324); +const defaultECSHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; }; - -function convertHttpAuthSchemesToMap(httpAuthSchemes) { - const map = new Map(); - for (const scheme of httpAuthSchemes) { - map.set(scheme.schemeId, scheme); - } - return map; +exports.defaultECSHttpAuthSchemeParametersProvider = defaultECSHttpAuthSchemeParametersProvider; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "ecs", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; } -const 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 = utilMiddleware.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 defaultECSHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); } - 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("\n")); - } - return next(args); + return options; }; - -const httpAuthSchemeEndpointRuleSetMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: "endpointV2Middleware", +exports.defaultECSHttpAuthSchemeProvider = defaultECSHttpAuthSchemeProvider; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return Object.assign(config_0, { + authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []), + }); }; -const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider, - }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); - }, -}); +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; -const httpAuthSchemeMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: middlewareSerde.serializerMiddlewareOption.name, -}; -const getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider, - }), httpAuthSchemeMiddlewareOptions); - }, -}); -const defaultErrorHandler = (signingProperties) => (error) => { - throw error; -}; -const defaultSuccessHandler = (httpResponse, signingProperties) => { }; -const httpSigningMiddleware = (config) => (next, context) => async (args) => { - if (!protocolHttp.HttpRequest.isInstance(args.request)) { - return next(args); - } - const smithyContext = utilMiddleware.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; -}; +/***/ }), -const httpSigningMiddlewareOptions = { - step: "finalizeRequest", - tags: ["HTTP_SIGNING"], - name: "httpSigningMiddleware", - aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], - override: true, - relation: "after", - toMiddleware: "retryMiddleware", -}; -const getHttpSigningPlugin = (config) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpSigningMiddleware(), httpSigningMiddlewareOptions); - }, -}); +/***/ 6161: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -const normalizeProvider = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; -}; +"use strict"; -const 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 undefined; - }; -} -const get = (fromObject, path) => { - let cursor = fromObject; - const pathComponents = path.split("."); - for (const step of pathComponents) { - if (!cursor || typeof cursor !== "object") { - return undefined; - } - cursor = cursor[step]; - } - return cursor; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = __nccwpck_require__(3068); +const util_endpoints_2 = __nccwpck_require__(9674); +const ruleset_1 = __nccwpck_require__(4282); +const cache = new util_endpoints_2.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], +}); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + })); }; +exports.defaultEndpointResolver = defaultEndpointResolver; +util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; -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, value] of Object.entries(config)) { - 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 = protocolHttp.HttpRequest.clone(httpRequest); - if (signingProperties.in === types.HttpApiKeyAuthLocation.QUERY) { - clonedRequest.query[signingProperties.name] = identity.apiKey; - } - else if (signingProperties.in === types.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 = protocolHttp.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; - } -} +/***/ 4282: +/***/ ((__unused_webpack_module, exports) => { -const createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired(identity) { - return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs; -}; -const EXPIRATION_MS = 300_000; -const isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); -const doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined; -const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => { - if (provider === undefined) { - return undefined; - } - 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; - }; -}; +"use strict"; -Object.defineProperty(exports, "requestBuilder", ({ - enumerable: true, - get: function () { return protocols.requestBuilder; } -})); -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.getSmithyContext = getSmithyContext; -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; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ruleSet = void 0; +const s = "required", t = "fn", u = "argv", v = "ref"; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "string" }, i = { [s]: true, "default": false, "type": "boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }]; +const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }, { conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ endpoint: { url: "https://ecs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ endpoint: { url: "https://ecs-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ endpoint: { url: "https://ecs.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://ecs.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; +exports.ruleSet = _data; /***/ }), -/***/ 50029: +/***/ 212: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var utilStream = __nccwpck_require__(71975); -var schema = __nccwpck_require__(93247); -var serde = __nccwpck_require__(38669); -var protocolHttp = __nccwpck_require__(5559); -var utilBase64 = __nccwpck_require__(26262); -var utilUtf8 = __nccwpck_require__(21038); +var middlewareHostHeader = __nccwpck_require__(2590); +var middlewareLogger = __nccwpck_require__(5242); +var middlewareRecursionDetection = __nccwpck_require__(1568); +var middlewareUserAgent = __nccwpck_require__(2959); +var configResolver = __nccwpck_require__(9316); +var core = __nccwpck_require__(402); +var middlewareContentLength = __nccwpck_require__(7212); +var middlewareEndpoint = __nccwpck_require__(99); +var middlewareRetry = __nccwpck_require__(9618); +var smithyClient = __nccwpck_require__(1411); +var httpAuthSchemeProvider = __nccwpck_require__(1367); +var runtimeConfig = __nccwpck_require__(1142); +var regionConfigResolver = __nccwpck_require__(6463); +var protocolHttp = __nccwpck_require__(2356); +var middlewareSerde = __nccwpck_require__(3255); +var core$1 = __nccwpck_require__(8704); +var uuid = __nccwpck_require__(266); +var utilWaiter = __nccwpck_require__(5290); -const collectBody = async (streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return utilStream.Uint8ArrayBlobAdapter.mutate(streamBody); - } - if (!streamBody) { - return utilStream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); - } - const fromContext = context.streamCollector(streamBody); - return utilStream.Uint8ArrayBlobAdapter.mutate(await fromContext); +const resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "ecs", + }); +}; +const commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; -function extendedEncodeURIComponent(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} +const 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; + }, + }; +}; +const resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; -class SerdeContext { - serdeContext; - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; +const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); +}; + +class ECSClient extends smithyClient.Client { + config; + constructor(...[configuration]) { + const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1); + const _config_3 = middlewareRetry.resolveRetryConfig(_config_2); + const _config_4 = configResolver.resolveRegionConfig(_config_3); + const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4); + const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5); + const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config)); + this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config)); + this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config)); + this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config)); + this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config)); + this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultECSHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }), + })); + this.middlewareStack.use(core.getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); } } -class HttpProtocol extends SerdeContext { - options; +class ECSServiceException extends smithyClient.ServiceException { constructor(options) { - super(); - this.options = options; - } - getRequestType() { - return protocolHttp.HttpRequest; - } - getResponseType() { - return protocolHttp.HttpResponse; + super(options); + Object.setPrototypeOf(this, ECSServiceException.prototype); + } +} + +const AcceleratorManufacturer = { + AMAZON_WEB_SERVICES: "amazon-web-services", + AMD: "amd", + HABANA: "habana", + NVIDIA: "nvidia", + XILINX: "xilinx", +}; +const AcceleratorName = { + A100: "a100", + A10G: "a10g", + H100: "h100", + INFERENTIA: "inferentia", + K520: "k520", + K80: "k80", + M60: "m60", + RADEON_PRO_V520: "radeon-pro-v520", + T4: "t4", + T4G: "t4g", + V100: "v100", + VU9P: "vu9p", +}; +const AcceleratorType = { + FPGA: "fpga", + GPU: "gpu", + INFERENCE: "inference", +}; +class AccessDeniedException extends ECSServiceException { + name = "AccessDeniedException"; + $fault = "client"; + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); } - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; - this.serializer.setSerdeContext(serdeContext); - this.deserializer.setSerdeContext(serdeContext); - if (this.getPayloadCodec()) { - this.getPayloadCodec().setSerdeContext(serdeContext); - } +} +const AgentUpdateStatus = { + FAILED: "FAILED", + PENDING: "PENDING", + STAGED: "STAGED", + STAGING: "STAGING", + UPDATED: "UPDATED", + UPDATING: "UPDATING", +}; +class ClientException extends ECSServiceException { + name = "ClientException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ClientException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ClientException.prototype); } - 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 || void 0; - request.username = endpoint.url.username || void 0; - request.password = endpoint.url.password || void 0; - if (!request.query) { - request.query = {}; - } - for (const [k, v] of endpoint.url.searchParams.entries()) { - request.query[k] = v; - } - 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, - }; - return request; - } +} +class ClusterNotFoundException extends ECSServiceException { + name = "ClusterNotFoundException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ClusterNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ClusterNotFoundException.prototype); + } +} +const ManagedDraining = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +}; +const ManagedScalingStatus = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +}; +const ManagedTerminationProtection = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +}; +const BareMetal = { + EXCLUDED: "excluded", + INCLUDED: "included", + REQUIRED: "required", +}; +const BurstablePerformance = { + EXCLUDED: "excluded", + INCLUDED: "included", + REQUIRED: "required", +}; +const CpuManufacturer = { + AMAZON_WEB_SERVICES: "amazon-web-services", + AMD: "amd", + INTEL: "intel", +}; +const InstanceGeneration = { + CURRENT: "current", + PREVIOUS: "previous", +}; +const LocalStorage = { + EXCLUDED: "excluded", + INCLUDED: "included", + REQUIRED: "required", +}; +const LocalStorageType = { + HDD: "hdd", + SSD: "ssd", +}; +const ManagedInstancesMonitoringOptions = { + BASIC: "BASIC", + DETAILED: "DETAILED", +}; +const PropagateMITags = { + CAPACITY_PROVIDER: "CAPACITY_PROVIDER", + NONE: "NONE", +}; +const CapacityProviderStatus = { + ACTIVE: "ACTIVE", + DEPROVISIONING: "DEPROVISIONING", + INACTIVE: "INACTIVE", + PROVISIONING: "PROVISIONING", +}; +const CapacityProviderType = { + EC2_AUTOSCALING: "EC2_AUTOSCALING", + FARGATE: "FARGATE", + FARGATE_SPOT: "FARGATE_SPOT", + MANAGED_INSTANCES: "MANAGED_INSTANCES", +}; +const CapacityProviderUpdateStatus = { + CREATE_COMPLETE: "CREATE_COMPLETE", + CREATE_FAILED: "CREATE_FAILED", + CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", + DELETE_COMPLETE: "DELETE_COMPLETE", + DELETE_FAILED: "DELETE_FAILED", + DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", + UPDATE_COMPLETE: "UPDATE_COMPLETE", + UPDATE_FAILED: "UPDATE_FAILED", + UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS", +}; +class InvalidParameterException extends ECSServiceException { + name = "InvalidParameterException"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidParameterException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidParameterException.prototype); } - setHostPrefix(request, operationSchema, input) { - const inputNs = schema.NormalizedSchema.of(operationSchema.input); - const opTraits = schema.translateTraits(operationSchema.traits ?? {}); - if (opTraits.endpoint) { - let hostPrefix = opTraits.endpoint?.[0]; - if (typeof hostPrefix === "string") { - const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel); - for (const [name] of hostLabelInputs) { - 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; - } - } +} +class LimitExceededException extends ECSServiceException { + name = "LimitExceededException"; + $fault = "client"; + constructor(opts) { + super({ + name: "LimitExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, LimitExceededException.prototype); } - 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"], - }; +} +class ServerException extends ECSServiceException { + name = "ServerException"; + $fault = "server"; + constructor(opts) { + super({ + name: "ServerException", + $fault: "server", + ...opts, + }); + Object.setPrototypeOf(this, ServerException.prototype); } - async serializeEventStream({ eventStream, requestSchema, initialRequest, }) { - const eventStreamSerde = await this.loadEventStreamCapability(); - return eventStreamSerde.serializeEventStream({ - eventStream, - requestSchema, - initialRequest, +} +class UnsupportedFeatureException extends ECSServiceException { + name = "UnsupportedFeatureException"; + $fault = "client"; + constructor(opts) { + super({ + name: "UnsupportedFeatureException", + $fault: "client", + ...opts, }); + Object.setPrototypeOf(this, UnsupportedFeatureException.prototype); } - async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) { - const eventStreamSerde = await this.loadEventStreamCapability(); - return eventStreamSerde.deserializeEventStream({ - response, - responseSchema, - initialResponseContainer, +} +class UpdateInProgressException extends ECSServiceException { + name = "UpdateInProgressException"; + $fault = "client"; + constructor(opts) { + super({ + name: "UpdateInProgressException", + $fault: "client", + ...opts, }); + Object.setPrototypeOf(this, UpdateInProgressException.prototype); } - async loadEventStreamCapability() { - const { EventStreamSerde } = await __nccwpck_require__.e(/* import() */ 644).then(__nccwpck_require__.t.bind(__nccwpck_require__, 97644, 19)); - return new EventStreamSerde({ - marshaller: this.getEventStreamMarshaller(), - serializer: this.serializer, - deserializer: this.deserializer, - serdeContext: this.serdeContext, - defaultContentType: this.getDefaultContentType(), +} +const ExecuteCommandLogging = { + DEFAULT: "DEFAULT", + NONE: "NONE", + OVERRIDE: "OVERRIDE", +}; +const ClusterSettingName = { + CONTAINER_INSIGHTS: "containerInsights", +}; +class NamespaceNotFoundException extends ECSServiceException { + name = "NamespaceNotFoundException"; + $fault = "client"; + constructor(opts) { + super({ + name: "NamespaceNotFoundException", + $fault: "client", + ...opts, }); + Object.setPrototypeOf(this, NamespaceNotFoundException.prototype); } - getDefaultContentType() { - throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`); +} +const AvailabilityZoneRebalancing = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +}; +const DeploymentLifecycleHookStage = { + POST_PRODUCTION_TRAFFIC_SHIFT: "POST_PRODUCTION_TRAFFIC_SHIFT", + POST_SCALE_UP: "POST_SCALE_UP", + POST_TEST_TRAFFIC_SHIFT: "POST_TEST_TRAFFIC_SHIFT", + PRE_SCALE_UP: "PRE_SCALE_UP", + PRODUCTION_TRAFFIC_SHIFT: "PRODUCTION_TRAFFIC_SHIFT", + RECONCILE_SERVICE: "RECONCILE_SERVICE", + TEST_TRAFFIC_SHIFT: "TEST_TRAFFIC_SHIFT", +}; +const DeploymentStrategy = { + BLUE_GREEN: "BLUE_GREEN", + CANARY: "CANARY", + LINEAR: "LINEAR", + ROLLING: "ROLLING", +}; +const DeploymentControllerType = { + CODE_DEPLOY: "CODE_DEPLOY", + ECS: "ECS", + EXTERNAL: "EXTERNAL", +}; +const LaunchType = { + EC2: "EC2", + EXTERNAL: "EXTERNAL", + FARGATE: "FARGATE", + MANAGED_INSTANCES: "MANAGED_INSTANCES", +}; +const AssignPublicIp = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +}; +const PlacementConstraintType = { + DISTINCT_INSTANCE: "distinctInstance", + MEMBER_OF: "memberOf", +}; +const PlacementStrategyType = { + BINPACK: "binpack", + RANDOM: "random", + SPREAD: "spread", +}; +const PropagateTags = { + NONE: "NONE", + SERVICE: "SERVICE", + TASK_DEFINITION: "TASK_DEFINITION", +}; +const SchedulingStrategy = { + DAEMON: "DAEMON", + REPLICA: "REPLICA", +}; +const ServiceConnectAccessLoggingFormat = { + JSON: "JSON", + TEXT: "TEXT", +}; +const ServiceConnectIncludeQueryParameters = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +}; +const LogDriver = { + AWSFIRELENS: "awsfirelens", + AWSLOGS: "awslogs", + FLUENTD: "fluentd", + GELF: "gelf", + JOURNALD: "journald", + JSON_FILE: "json-file", + SPLUNK: "splunk", + SYSLOG: "syslog", +}; +const TaskFilesystemType = { + EXT3: "ext3", + EXT4: "ext4", + NTFS: "ntfs", + XFS: "xfs", +}; +const EBSResourceType = { + VOLUME: "volume", +}; +const DeploymentRolloutState = { + COMPLETED: "COMPLETED", + FAILED: "FAILED", + IN_PROGRESS: "IN_PROGRESS", +}; +const ScaleUnit = { + PERCENT: "PERCENT", +}; +const StabilityStatus = { + STABILIZING: "STABILIZING", + STEADY_STATE: "STEADY_STATE", +}; +class PlatformTaskDefinitionIncompatibilityException extends ECSServiceException { + name = "PlatformTaskDefinitionIncompatibilityException"; + $fault = "client"; + constructor(opts) { + super({ + name: "PlatformTaskDefinitionIncompatibilityException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, PlatformTaskDefinitionIncompatibilityException.prototype); } - async deserializeHttpMessage(schema, context, response, arg4, arg5) { - return []; +} +class PlatformUnknownException extends ECSServiceException { + name = "PlatformUnknownException"; + $fault = "client"; + constructor(opts) { + super({ + name: "PlatformUnknownException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, PlatformUnknownException.prototype); } - getEventStreamMarshaller() { - const context = this.serdeContext; - if (!context.eventStreamMarshaller) { - throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext."); - } - return context.eventStreamMarshaller; +} +class ServiceNotActiveException extends ECSServiceException { + name = "ServiceNotActiveException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ServiceNotActiveException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ServiceNotActiveException.prototype); } } - -class HttpBindingProtocol extends HttpProtocol { - async serializeRequest(operationSchema, _input, context) { - const input = { - ...(_input ?? {}), - }; - const serializer = this.serializer; - const query = {}; - const headers = {}; - const endpoint = await context.endpoint(); - const ns = schema.NormalizedSchema.of(operationSchema?.input); - const schema$1 = ns.getSchema(); - let hasNonHttpBindingMember = false; - let payload; - const request = new protocolHttp.HttpRequest({ - protocol: "", - hostname: "", - port: undefined, - path: "", - fragment: undefined, - query: query, - headers: headers, - body: undefined, +class ServiceNotFoundException extends ECSServiceException { + name = "ServiceNotFoundException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ServiceNotFoundException", + $fault: "client", + ...opts, }); - if (endpoint) { - this.updateServiceEndpoint(request, endpoint); - this.setHostPrefix(request, operationSchema, input); - const opTraits = schema.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 ?? ""); - Object.assign(query, Object.fromEntries(traitSearchParams)); - } - } - for (const [memberName, memberNs] of ns.structIterator()) { - const memberTraits = memberNs.getMergedTraits() ?? {}; - const inputMemberValue = input[memberName]; - if (inputMemberValue == null) { - 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(); - } - delete input[memberName]; - } - 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)); - } - delete input[memberName]; - } - else if (memberTraits.httpHeader) { - serializer.write(memberNs, inputMemberValue); - headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush()); - delete input[memberName]; - } - else if (typeof memberTraits.httpPrefixHeaders === "string") { - for (const [key, val] of Object.entries(inputMemberValue)) { - const amalgam = memberTraits.httpPrefixHeaders + key; - serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val); - headers[amalgam.toLowerCase()] = serializer.flush(); - } - delete input[memberName]; - } - else if (memberTraits.httpQuery || memberTraits.httpQueryParams) { - this.serializeQuery(memberNs, inputMemberValue, query); - delete input[memberName]; - } - else { - hasNonHttpBindingMember = true; - } - } - if (hasNonHttpBindingMember && input) { - serializer.write(schema$1, input); - payload = serializer.flush(); - } - request.headers = headers; - request.query = query; - request.body = payload; - return request; + Object.setPrototypeOf(this, ServiceNotFoundException.prototype); } - serializeQuery(ns, data, query) { - const serializer = this.serializer; - const traits = ns.getMergedTraits(); - if (traits.httpQueryParams) { - for (const [key, val] of Object.entries(data)) { - if (!(key in query)) { - 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(); - } +} +const SettingName = { + AWSVPC_TRUNKING: "awsvpcTrunking", + CONTAINER_INSIGHTS: "containerInsights", + CONTAINER_INSTANCE_LONG_ARN_FORMAT: "containerInstanceLongArnFormat", + DEFAULT_LOG_DRIVER_MODE: "defaultLogDriverMode", + FARGATE_FIPS_MODE: "fargateFIPSMode", + FARGATE_TASK_RETIREMENT_WAIT_PERIOD: "fargateTaskRetirementWaitPeriod", + GUARD_DUTY_ACTIVATE: "guardDutyActivate", + SERVICE_LONG_ARN_FORMAT: "serviceLongArnFormat", + TAG_RESOURCE_AUTHORIZATION: "tagResourceAuthorization", + TASK_LONG_ARN_FORMAT: "taskLongArnFormat", +}; +const SettingType = { + AWS_MANAGED: "aws_managed", + USER: "user", +}; +const TargetType = { + CONTAINER_INSTANCE: "container-instance", +}; +class TargetNotFoundException extends ECSServiceException { + name = "TargetNotFoundException"; + $fault = "client"; + constructor(opts) { + super({ + name: "TargetNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, TargetNotFoundException.prototype); } - async deserializeResponse(operationSchema, context, response) { - const deserializer = this.deserializer; - const ns = schema.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) { - 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) { - dataObject[member] = dataFromBody[member]; - } - } - } - dataObject.$metadata = this.deserializeMetadata(response); - return dataObject; +} +class ClusterContainsCapacityProviderException extends ECSServiceException { + name = "ClusterContainsCapacityProviderException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ClusterContainsCapacityProviderException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ClusterContainsCapacityProviderException.prototype); } - async deserializeHttpMessage(schema$1, context, response, arg4, arg5) { - let dataObject; - if (arg4 instanceof Set) { - dataObject = arg5; - } - else { - dataObject = arg4; - } - const deserializer = this.deserializer; - const ns = schema.NormalizedSchema.of(schema$1); - const nonHttpBindingMembers = []; - for (const [memberName, memberSchema] of ns.structIterator()) { - const memberTraits = memberSchema.getMemberTraits(); - if (memberTraits.httpPayload) { - const isStreaming = memberSchema.isStreaming(); - if (isStreaming) { - const isEventStream = memberSchema.isStructSchema(); - if (isEventStream) { - dataObject[memberName] = await this.deserializeEventStream({ - response, - responseSchema: ns, - }); - } - else { - dataObject[memberName] = utilStream.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 (null != value) { - if (memberSchema.isListSchema()) { - const headerListValueSchema = memberSchema.getValueSchema(); - headerListValueSchema.getMergedTraits().httpHeader = key; - let sections; - if (headerListValueSchema.isTimestampSchema() && - headerListValueSchema.getSchema() === 4) { - sections = serde.splitEvery(value, ",", 2); - } - else { - sections = serde.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, value] of Object.entries(response.headers)) { - if (header.startsWith(memberTraits.httpPrefixHeaders)) { - 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); - } - } - return nonHttpBindingMembers; +} +class ClusterContainsContainerInstancesException extends ECSServiceException { + name = "ClusterContainsContainerInstancesException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ClusterContainsContainerInstancesException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ClusterContainsContainerInstancesException.prototype); } } - -class RpcProtocol extends HttpProtocol { - async serializeRequest(operationSchema, input, context) { - const serializer = this.serializer; - const query = {}; - const headers = {}; - const endpoint = await context.endpoint(); - const ns = schema.NormalizedSchema.of(operationSchema?.input); - const schema$1 = ns.getSchema(); - let payload; - const request = new protocolHttp.HttpRequest({ - protocol: "", - hostname: "", - port: undefined, - path: "/", - fragment: undefined, - query: query, - headers: headers, - body: undefined, +class ClusterContainsServicesException extends ECSServiceException { + name = "ClusterContainsServicesException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ClusterContainsServicesException", + $fault: "client", + ...opts, }); - if (endpoint) { - this.updateServiceEndpoint(request, endpoint); - this.setHostPrefix(request, operationSchema, input); - } - const _input = { - ...input, - }; - if (input) { - const eventStreamMember = ns.getEventStreamMember(); - if (eventStreamMember) { - if (_input[eventStreamMember]) { - const initialRequest = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - if (memberName !== eventStreamMember && _input[memberName]) { - serializer.write(memberSchema, _input[memberName]); - initialRequest[memberName] = serializer.flush(); - } - } - payload = await this.serializeEventStream({ - eventStream: _input[eventStreamMember], - requestSchema: ns, - initialRequest, - }); - } - } - else { - serializer.write(schema$1, _input); - payload = serializer.flush(); - } - } - request.headers = headers; - request.query = query; - request.body = payload; - request.method = "POST"; - return request; + Object.setPrototypeOf(this, ClusterContainsServicesException.prototype); } - async deserializeResponse(operationSchema, context, response) { - const deserializer = this.deserializer; - const ns = schema.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) { - 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; - } -} - -const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { - if (input != null && input[memberName] !== undefined) { - const labelValue = labelValueProvider(); - if (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 protocolHttp.HttpRequest({ - protocol, - hostname: this.hostname || hostname, - port, - method: this.method, - path: this.path, - query: this.query, - body: this.body, - headers: this.headers, +class ClusterContainsTasksException extends ECSServiceException { + name = "ClusterContainsTasksException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ClusterContainsTasksException", + $fault: "client", + ...opts, }); - } - hn(hostname) { - this.hostname = hostname; - return this; - } - bp(uriLabel) { - this.resolvePathStack.push((basePath) => { - this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; + Object.setPrototypeOf(this, ClusterContainsTasksException.prototype); + } +} +const Compatibility = { + EC2: "EC2", + EXTERNAL: "EXTERNAL", + FARGATE: "FARGATE", + MANAGED_INSTANCES: "MANAGED_INSTANCES", +}; +const ContainerCondition = { + COMPLETE: "COMPLETE", + HEALTHY: "HEALTHY", + START: "START", + SUCCESS: "SUCCESS", +}; +const EnvironmentFileType = { + S3: "s3", +}; +const FirelensConfigurationType = { + FLUENTBIT: "fluentbit", + FLUENTD: "fluentd", +}; +const DeviceCgroupPermission = { + MKNOD: "mknod", + READ: "read", + WRITE: "write", +}; +const ApplicationProtocol = { + GRPC: "grpc", + HTTP: "http", + HTTP2: "http2", +}; +const TransportProtocol = { + TCP: "tcp", + UDP: "udp", +}; +const ResourceType = { + GPU: "GPU", + INFERENCE_ACCELERATOR: "InferenceAccelerator", +}; +const UlimitName = { + CORE: "core", + CPU: "cpu", + DATA: "data", + FSIZE: "fsize", + LOCKS: "locks", + MEMLOCK: "memlock", + MSGQUEUE: "msgqueue", + NICE: "nice", + NOFILE: "nofile", + NPROC: "nproc", + RSS: "rss", + RTPRIO: "rtprio", + RTTIME: "rttime", + SIGPENDING: "sigpending", + STACK: "stack", +}; +const VersionConsistency = { + DISABLED: "disabled", + ENABLED: "enabled", +}; +const IpcMode = { + HOST: "host", + NONE: "none", + TASK: "task", +}; +const NetworkMode = { + AWSVPC: "awsvpc", + BRIDGE: "bridge", + HOST: "host", + NONE: "none", +}; +const PidMode = { + HOST: "host", + TASK: "task", +}; +const TaskDefinitionPlacementConstraintType = { + MEMBER_OF: "memberOf", +}; +const ProxyConfigurationType = { + APPMESH: "APPMESH", +}; +const CPUArchitecture = { + ARM64: "ARM64", + X86_64: "X86_64", +}; +const OSFamily = { + LINUX: "LINUX", + WINDOWS_SERVER_2004_CORE: "WINDOWS_SERVER_2004_CORE", + WINDOWS_SERVER_2016_FULL: "WINDOWS_SERVER_2016_FULL", + WINDOWS_SERVER_2019_CORE: "WINDOWS_SERVER_2019_CORE", + WINDOWS_SERVER_2019_FULL: "WINDOWS_SERVER_2019_FULL", + WINDOWS_SERVER_2022_CORE: "WINDOWS_SERVER_2022_CORE", + WINDOWS_SERVER_2022_FULL: "WINDOWS_SERVER_2022_FULL", + WINDOWS_SERVER_2025_CORE: "WINDOWS_SERVER_2025_CORE", + WINDOWS_SERVER_2025_FULL: "WINDOWS_SERVER_2025_FULL", + WINDOWS_SERVER_20H2_CORE: "WINDOWS_SERVER_20H2_CORE", +}; +const TaskDefinitionStatus = { + ACTIVE: "ACTIVE", + DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", + INACTIVE: "INACTIVE", +}; +const Scope = { + SHARED: "shared", + TASK: "task", +}; +const EFSAuthorizationConfigIAM = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +}; +const EFSTransitEncryption = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +}; +class TaskSetNotFoundException extends ECSServiceException { + name = "TaskSetNotFoundException"; + $fault = "client"; + constructor(opts) { + super({ + name: "TaskSetNotFoundException", + $fault: "client", + ...opts, }); - return this; - } - p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { - this.resolvePathStack.push((path) => { - this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); + Object.setPrototypeOf(this, TaskSetNotFoundException.prototype); + } +} +const InstanceHealthCheckState = { + IMPAIRED: "IMPAIRED", + INITIALIZING: "INITIALIZING", + INSUFFICIENT_DATA: "INSUFFICIENT_DATA", + OK: "OK", +}; +const InstanceHealthCheckType = { + CONTAINER_RUNTIME: "CONTAINER_RUNTIME", +}; +const CapacityProviderField = { + TAGS: "TAGS", +}; +const ClusterField = { + ATTACHMENTS: "ATTACHMENTS", + CONFIGURATIONS: "CONFIGURATIONS", + SETTINGS: "SETTINGS", + STATISTICS: "STATISTICS", + TAGS: "TAGS", +}; +const ContainerInstanceField = { + CONTAINER_INSTANCE_HEALTH: "CONTAINER_INSTANCE_HEALTH", + TAGS: "TAGS", +}; +const ServiceDeploymentRollbackMonitorsStatus = { + DISABLED: "DISABLED", + MONITORING: "MONITORING", + MONITORING_COMPLETE: "MONITORING_COMPLETE", + TRIGGERED: "TRIGGERED", +}; +const ServiceDeploymentLifecycleStage = { + BAKE_TIME: "BAKE_TIME", + CLEAN_UP: "CLEAN_UP", + POST_PRODUCTION_TRAFFIC_SHIFT: "POST_PRODUCTION_TRAFFIC_SHIFT", + POST_SCALE_UP: "POST_SCALE_UP", + POST_TEST_TRAFFIC_SHIFT: "POST_TEST_TRAFFIC_SHIFT", + PRE_SCALE_UP: "PRE_SCALE_UP", + PRODUCTION_TRAFFIC_SHIFT: "PRODUCTION_TRAFFIC_SHIFT", + RECONCILE_SERVICE: "RECONCILE_SERVICE", + SCALE_UP: "SCALE_UP", + TEST_TRAFFIC_SHIFT: "TEST_TRAFFIC_SHIFT", +}; +const ServiceDeploymentStatus = { + IN_PROGRESS: "IN_PROGRESS", + PENDING: "PENDING", + ROLLBACK_FAILED: "ROLLBACK_FAILED", + ROLLBACK_IN_PROGRESS: "ROLLBACK_IN_PROGRESS", + ROLLBACK_REQUESTED: "ROLLBACK_REQUESTED", + ROLLBACK_SUCCESSFUL: "ROLLBACK_SUCCESSFUL", + STOPPED: "STOPPED", + STOP_REQUESTED: "STOP_REQUESTED", + SUCCESSFUL: "SUCCESSFUL", +}; +const ServiceField = { + TAGS: "TAGS", +}; +const TaskDefinitionField = { + TAGS: "TAGS", +}; +const TaskField = { + TAGS: "TAGS", +}; +const Connectivity = { + CONNECTED: "CONNECTED", + DISCONNECTED: "DISCONNECTED", +}; +const HealthStatus = { + HEALTHY: "HEALTHY", + UNHEALTHY: "UNHEALTHY", + UNKNOWN: "UNKNOWN", +}; +const ManagedAgentName = { + ExecuteCommandAgent: "ExecuteCommandAgent", +}; +const TaskStopCode = { + ESSENTIAL_CONTAINER_EXITED: "EssentialContainerExited", + SERVICE_SCHEDULER_INITIATED: "ServiceSchedulerInitiated", + SPOT_INTERRUPTION: "SpotInterruption", + TASK_FAILED_TO_START: "TaskFailedToStart", + TERMINATION_NOTICE: "TerminationNotice", + USER_INITIATED: "UserInitiated", +}; +const TaskSetField = { + TAGS: "TAGS", +}; +class TargetNotConnectedException extends ECSServiceException { + name = "TargetNotConnectedException"; + $fault = "client"; + constructor(opts) { + super({ + name: "TargetNotConnectedException", + $fault: "client", + ...opts, }); - 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; + Object.setPrototypeOf(this, TargetNotConnectedException.prototype); } } - -function determineTimestampFormat(ns, settings) { - if (settings.timestampFormat.useTrait) { - if (ns.isTimestampSchema() && - (ns.getSchema() === 5 || - ns.getSchema() === 6 || - ns.getSchema() === 7)) { - return ns.getSchema(); - } +class ResourceNotFoundException extends ECSServiceException { + name = "ResourceNotFoundException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); } - 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; } +const ContainerInstanceStatus = { + ACTIVE: "ACTIVE", + DEREGISTERING: "DEREGISTERING", + DRAINING: "DRAINING", + REGISTERING: "REGISTERING", + REGISTRATION_FAILED: "REGISTRATION_FAILED", +}; +const TaskDefinitionFamilyStatus = { + ACTIVE: "ACTIVE", + ALL: "ALL", + INACTIVE: "INACTIVE", +}; +const SortOrder = { + ASC: "ASC", + DESC: "DESC", +}; +const SessionFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.tokenValue && { tokenValue: smithyClient.SENSITIVE_STRING }), +}); +const ExecuteCommandResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.session && { session: SessionFilterSensitiveLog(obj.session) }), +}); -class FromStringShapeDeserializer extends SerdeContext { - settings; - constructor(settings) { - super(); - this.settings = settings; - } - read(_schema, data) { - const ns = schema.NormalizedSchema.of(_schema); - if (ns.isListSchema()) { - return serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item)); - } - if (ns.isBlobSchema()) { - return (this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(data); - } - if (ns.isTimestampSchema()) { - const format = determineTimestampFormat(ns, this.settings); - switch (format) { - case 5: - return serde._parseRfc3339DateTimeWithOffset(data); - case 6: - return serde._parseRfc7231DateTime(data); - case 7: - return serde._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 = serde.LazyJsonString.from(intermediateValue); - } - return intermediateValue; - } - } - if (ns.isNumericSchema()) { - return Number(data); - } - if (ns.isBigIntegerSchema()) { - return BigInt(data); - } - if (ns.isBigDecimalSchema()) { - return new serde.NumericValue(data, "bigDecimal"); - } - if (ns.isBooleanSchema()) { - return String(data).toLowerCase() === "true"; - } - return data; - } - base64ToUtf8(base64String) { - return (this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8)((this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(base64String)); +const DesiredStatus = { + PENDING: "PENDING", + RUNNING: "RUNNING", + STOPPED: "STOPPED", +}; +class AttributeLimitExceededException extends ECSServiceException { + name = "AttributeLimitExceededException"; + $fault = "client"; + constructor(opts) { + super({ + name: "AttributeLimitExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AttributeLimitExceededException.prototype); } } - -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$1, data) { - const ns = schema.NormalizedSchema.of(schema$1); - const traits = ns.getMergedTraits(); - const toString = this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8; - if (traits.httpHeader || traits.httpResponseCode) { - return this.stringDeserializer.read(ns, toString(data)); - } - if (traits.httpPayload) { - if (ns.isBlobSchema()) { - const toBytes = this.serdeContext?.utf8Decoder ?? utilUtf8.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 ResourceInUseException extends ECSServiceException { + name = "ResourceInUseException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ResourceInUseException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceInUseException.prototype); } } - -class ToStringShapeSerializer extends SerdeContext { - settings; - stringBuffer = ""; - constructor(settings) { - super(); - this.settings = settings; - } - write(schema$1, value) { - const ns = schema.NormalizedSchema.of(schema$1); - 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 = serde.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 ?? utilBase64.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 : serde.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 = serde.LazyJsonString.from(intermediateValue); - } - if (ns.getMergedTraits().httpHeader) { - this.stringBuffer = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(intermediateValue.toString()); - return; - } - } - this.stringBuffer = value; - break; - default: - this.stringBuffer = String(value); - } - } - flush() { - const buffer = this.stringBuffer; - this.stringBuffer = ""; - return buffer; +const PlatformDeviceType = { + GPU: "GPU", +}; +class BlockedException extends ECSServiceException { + name = "BlockedException"; + $fault = "client"; + constructor(opts) { + super({ + name: "BlockedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, BlockedException.prototype); } } - -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$1, value) { - const ns = schema.NormalizedSchema.of(schema$1); - 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 ConflictException extends ECSServiceException { + name = "ConflictException"; + $fault = "client"; + resourceIds; + constructor(opts) { + super({ + name: "ConflictException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ConflictException.prototype); + this.resourceIds = opts.resourceIds; } } - -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.collectBody = collectBody; -exports.determineTimestampFormat = determineTimestampFormat; -exports.extendedEncodeURIComponent = extendedEncodeURIComponent; -exports.requestBuilder = requestBuilder; -exports.resolvedPath = resolvedPath; - - -/***/ }), - -/***/ 93247: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var protocolHttp = __nccwpck_require__(5559); -var utilMiddleware = __nccwpck_require__(25695); - -const deref = (schemaRef) => { - if (typeof schemaRef === "function") { - return schemaRef(); +class ServiceDeploymentNotFoundException extends ECSServiceException { + name = "ServiceDeploymentNotFoundException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ServiceDeploymentNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ServiceDeploymentNotFoundException.prototype); } - return schemaRef; +} +const StopServiceDeploymentStopType = { + ABORT: "ABORT", + ROLLBACK: "ROLLBACK", }; - -const operation = (namespace, name, traits, input, output) => ({ - name, - namespace, - traits, - input, - output, -}); - -const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { - const { response } = await next(args); - const { operationSchema } = utilMiddleware.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, - }; +class MissingVersionException extends ECSServiceException { + name = "MissingVersionException"; + $fault = "client"; + constructor(opts) { + super({ + name: "MissingVersionException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, MissingVersionException.prototype); } - catch (error) { - Object.defineProperty(error, "$response", { - value: response, +} +class NoUpdateAvailableException extends ECSServiceException { + name = "NoUpdateAvailableException"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoUpdateAvailableException", + $fault: "client", + ...opts, }); - 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 += "\n " + hint; - } - catch (e) { - 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 (protocolHttp.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 (e) { - } - } - throw error; + Object.setPrototypeOf(this, NoUpdateAvailableException.prototype); } +} + +const se_CreateCapacityProviderCommand = async (input, context) => { + const headers = sharedHeaders("CreateCapacityProvider"); + let body; + body = JSON.stringify(se_CreateCapacityProviderRequest(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); }; -const findHeader = (pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; +const se_CreateClusterCommand = async (input, context) => { + const headers = sharedHeaders("CreateCluster"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); }; - -const schemaSerializationMiddleware = (config) => (next, context) => async (args) => { - const { operationSchema } = utilMiddleware.getSmithyContext(context); - const [, ns, n, t, i, o] = operationSchema ?? []; - const endpoint = context.endpointV2?.url && config.urlParser - ? async () => config.urlParser(context.endpointV2.url) - : config.endpoint; - const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, { - ...config, - ...context, - endpoint, - }); - return next({ - ...args, - request, - }); +const se_CreateServiceCommand = async (input, context) => { + const headers = sharedHeaders("CreateService"); + let body; + body = JSON.stringify(se_CreateServiceRequest(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); }; - -const deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true, +const se_CreateTaskSetCommand = async (input, context) => { + const headers = sharedHeaders("CreateTaskSet"); + let body; + body = JSON.stringify(se_CreateTaskSetRequest(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); }; -const serializerMiddlewareOption = { - name: "serializerMiddleware", - step: "serialize", - tags: ["SERIALIZER"], - override: true, +const se_DeleteAccountSettingCommand = async (input, context) => { + const headers = sharedHeaders("DeleteAccountSetting"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); }; -function getSchemaSerdePlugin(config) { - return { - applyToStack: (commandStack) => { - commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption); - commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption); - config.protocol.setSerdeContext(config); - }, +const se_DeleteAttributesCommand = async (input, context) => { + const headers = sharedHeaders("DeleteAttributes"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DeleteCapacityProviderCommand = async (input, context) => { + const headers = sharedHeaders("DeleteCapacityProvider"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DeleteClusterCommand = async (input, context) => { + const headers = sharedHeaders("DeleteCluster"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DeleteServiceCommand = async (input, context) => { + const headers = sharedHeaders("DeleteService"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DeleteTaskDefinitionsCommand = async (input, context) => { + const headers = sharedHeaders("DeleteTaskDefinitions"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DeleteTaskSetCommand = async (input, context) => { + const headers = sharedHeaders("DeleteTaskSet"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DeregisterContainerInstanceCommand = async (input, context) => { + const headers = sharedHeaders("DeregisterContainerInstance"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DeregisterTaskDefinitionCommand = async (input, context) => { + const headers = sharedHeaders("DeregisterTaskDefinition"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DescribeCapacityProvidersCommand = async (input, context) => { + const headers = sharedHeaders("DescribeCapacityProviders"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DescribeClustersCommand = async (input, context) => { + const headers = sharedHeaders("DescribeClusters"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DescribeContainerInstancesCommand = async (input, context) => { + const headers = sharedHeaders("DescribeContainerInstances"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DescribeServiceDeploymentsCommand = async (input, context) => { + const headers = sharedHeaders("DescribeServiceDeployments"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DescribeServiceRevisionsCommand = async (input, context) => { + const headers = sharedHeaders("DescribeServiceRevisions"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DescribeServicesCommand = async (input, context) => { + const headers = sharedHeaders("DescribeServices"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DescribeTaskDefinitionCommand = async (input, context) => { + const headers = sharedHeaders("DescribeTaskDefinition"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DescribeTasksCommand = async (input, context) => { + const headers = sharedHeaders("DescribeTasks"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DescribeTaskSetsCommand = async (input, context) => { + const headers = sharedHeaders("DescribeTaskSets"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_DiscoverPollEndpointCommand = async (input, context) => { + const headers = sharedHeaders("DiscoverPollEndpoint"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_ExecuteCommandCommand = async (input, context) => { + const headers = sharedHeaders("ExecuteCommand"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_GetTaskProtectionCommand = async (input, context) => { + const headers = sharedHeaders("GetTaskProtection"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_ListAccountSettingsCommand = async (input, context) => { + const headers = sharedHeaders("ListAccountSettings"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_ListAttributesCommand = async (input, context) => { + const headers = sharedHeaders("ListAttributes"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_ListClustersCommand = async (input, context) => { + const headers = sharedHeaders("ListClusters"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_ListContainerInstancesCommand = async (input, context) => { + const headers = sharedHeaders("ListContainerInstances"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_ListServiceDeploymentsCommand = async (input, context) => { + const headers = sharedHeaders("ListServiceDeployments"); + let body; + body = JSON.stringify(se_ListServiceDeploymentsRequest(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_ListServicesCommand = async (input, context) => { + const headers = sharedHeaders("ListServices"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_ListServicesByNamespaceCommand = async (input, context) => { + const headers = sharedHeaders("ListServicesByNamespace"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_ListTagsForResourceCommand = async (input, context) => { + const headers = sharedHeaders("ListTagsForResource"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_ListTaskDefinitionFamiliesCommand = async (input, context) => { + const headers = sharedHeaders("ListTaskDefinitionFamilies"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_ListTaskDefinitionsCommand = async (input, context) => { + const headers = sharedHeaders("ListTaskDefinitions"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_ListTasksCommand = async (input, context) => { + const headers = sharedHeaders("ListTasks"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_PutAccountSettingCommand = async (input, context) => { + const headers = sharedHeaders("PutAccountSetting"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_PutAccountSettingDefaultCommand = async (input, context) => { + const headers = sharedHeaders("PutAccountSettingDefault"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_PutAttributesCommand = async (input, context) => { + const headers = sharedHeaders("PutAttributes"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_PutClusterCapacityProvidersCommand = async (input, context) => { + const headers = sharedHeaders("PutClusterCapacityProviders"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_RegisterContainerInstanceCommand = async (input, context) => { + const headers = sharedHeaders("RegisterContainerInstance"); + let body; + body = JSON.stringify(se_RegisterContainerInstanceRequest(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_RegisterTaskDefinitionCommand = async (input, context) => { + const headers = sharedHeaders("RegisterTaskDefinition"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_RunTaskCommand = async (input, context) => { + const headers = sharedHeaders("RunTask"); + let body; + body = JSON.stringify(se_RunTaskRequest(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_StartTaskCommand = async (input, context) => { + const headers = sharedHeaders("StartTask"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_StopServiceDeploymentCommand = async (input, context) => { + const headers = sharedHeaders("StopServiceDeployment"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_StopTaskCommand = async (input, context) => { + const headers = sharedHeaders("StopTask"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_SubmitAttachmentStateChangesCommand = async (input, context) => { + const headers = sharedHeaders("SubmitAttachmentStateChanges"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_SubmitContainerStateChangeCommand = async (input, context) => { + const headers = sharedHeaders("SubmitContainerStateChange"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_SubmitTaskStateChangeCommand = async (input, context) => { + const headers = sharedHeaders("SubmitTaskStateChange"); + let body; + body = JSON.stringify(se_SubmitTaskStateChangeRequest(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_TagResourceCommand = async (input, context) => { + const headers = sharedHeaders("TagResource"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_UntagResourceCommand = async (input, context) => { + const headers = sharedHeaders("UntagResource"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_UpdateCapacityProviderCommand = async (input, context) => { + const headers = sharedHeaders("UpdateCapacityProvider"); + let body; + body = JSON.stringify(se_UpdateCapacityProviderRequest(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_UpdateClusterCommand = async (input, context) => { + const headers = sharedHeaders("UpdateCluster"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_UpdateClusterSettingsCommand = async (input, context) => { + const headers = sharedHeaders("UpdateClusterSettings"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_UpdateContainerAgentCommand = async (input, context) => { + const headers = sharedHeaders("UpdateContainerAgent"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_UpdateContainerInstancesStateCommand = async (input, context) => { + const headers = sharedHeaders("UpdateContainerInstancesState"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_UpdateServiceCommand = async (input, context) => { + const headers = sharedHeaders("UpdateService"); + let body; + body = JSON.stringify(se_UpdateServiceRequest(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_UpdateServicePrimaryTaskSetCommand = async (input, context) => { + const headers = sharedHeaders("UpdateServicePrimaryTaskSet"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_UpdateTaskProtectionCommand = async (input, context) => { + const headers = sharedHeaders("UpdateTaskProtection"); + let body; + body = JSON.stringify(smithyClient._json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const se_UpdateTaskSetCommand = async (input, context) => { + const headers = sharedHeaders("UpdateTaskSet"); + let body; + body = JSON.stringify(se_UpdateTaskSetRequest(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +const de_CreateCapacityProviderCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_CreateCapacityProviderResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, }; -} - -class Schema { - name; - namespace; - traits; - static assign(instance, values) { - const schema = Object.assign(instance, values); - return schema; + return response; +}; +const de_CreateClusterCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - 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; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_CreateServiceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - getName() { - return this.namespace + "#" + this.name; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_CreateServiceResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_CreateTaskSetCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } -} - -class ListSchema extends Schema { - static symbol = Symbol.for("@smithy/lis"); - name; - traits; - valueSchema; - symbol = ListSchema.symbol; -} -const list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), { - name, - namespace, - traits, - valueSchema, -}); - -class MapSchema extends Schema { - static symbol = Symbol.for("@smithy/map"); - name; - traits; - keySchema; - valueSchema; - symbol = MapSchema.symbol; -} -const 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"); - name; - traits; - input; - output; - symbol = OperationSchema.symbol; -} -const 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"); - name; - traits; - memberNames; - memberList; - symbol = StructureSchema.symbol; -} -const 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; -} -const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { - name, - namespace, - traits, - memberNames, - memberList, - ctor: null, -}); - -function translateTraits(indicator) { - if (typeof indicator === "object") { - return indicator; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_CreateTaskSetResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DeleteAccountSettingCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - indicator = indicator | 0; - const traits = {}; - let i = 0; - for (const trait of [ - "httpLabel", - "idempotent", - "idempotencyToken", - "sensitive", - "httpPayload", - "httpResponseCode", - "httpQueryParams", - ]) { - if (((indicator >> i++) & 1) === 1) { - traits[trait] = 1; - } + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DeleteAttributesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return traits; -} - -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 = void 0; - 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.`); - } + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DeleteCapacityProviderCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - 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; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DeleteCapacityProviderResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DeleteClusterCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - static of(ref) { - 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)}.`); - } - return new NormalizedSchema(sc); - } - getSchema() { - const sc = this.schema; - if (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; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DeleteServiceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - getMemberName() { - return this.memberName; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DeleteServiceResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DeleteTaskDefinitionsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isMemberSchema() { - return this._isMemberSchema; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DeleteTaskDefinitionsResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DeleteTaskSetCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isListSchema() { - const sc = this.getSchema(); - return typeof sc === "number" - ? sc >= 64 && sc < 128 - : sc[0] === 1; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DeleteTaskSetResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DeregisterContainerInstanceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isMapSchema() { - const sc = this.getSchema(); - return typeof sc === "number" - ? sc >= 128 && sc <= 0b1111_1111 - : sc[0] === 2; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DeregisterContainerInstanceResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DeregisterTaskDefinitionCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isStructSchema() { - const sc = this.getSchema(); - return (sc[0] === 3 || - sc[0] === -3); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DeregisterTaskDefinitionResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DescribeCapacityProvidersCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isBlobSchema() { - const sc = this.getSchema(); - return sc === 21 || sc === 42; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DescribeCapacityProvidersResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DescribeClustersCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isTimestampSchema() { - const sc = this.getSchema(); - return (typeof sc === "number" && - sc >= 4 && - sc <= 7); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DescribeContainerInstancesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isUnitSchema() { - return this.getSchema() === "unit"; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DescribeContainerInstancesResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DescribeServiceDeploymentsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isDocumentSchema() { - return this.getSchema() === 15; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DescribeServiceDeploymentsResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DescribeServiceRevisionsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isStringSchema() { - return this.getSchema() === 0; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DescribeServiceRevisionsResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DescribeServicesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isBooleanSchema() { - return this.getSchema() === 2; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DescribeServicesResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DescribeTaskDefinitionCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isNumericSchema() { - return this.getSchema() === 1; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DescribeTaskDefinitionResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DescribeTasksCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isBigIntegerSchema() { - return this.getSchema() === 17; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DescribeTasksResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DescribeTaskSetsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isBigDecimalSchema() { - return this.getSchema() === 19; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_DescribeTaskSetsResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_DiscoverPollEndpointCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isStreaming() { - const { streaming } = this.getMergedTraits(); - return !!streaming || this.getSchema() === 42; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_ExecuteCommandCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - isIdempotencyToken() { - const match = (traits) => (traits & 0b0100) === 0b0100 || - !!traits?.idempotencyToken; - const { normalizedTraits, traits, memberTraits } = this; - return match(normalizedTraits) || match(traits) || match(memberTraits); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_GetTaskProtectionCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - getMergedTraits() { - return (this.normalizedTraits ?? - (this.normalizedTraits = { - ...this.getOwnTraits(), - ...this.getMemberTraits(), - })); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_GetTaskProtectionResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_ListAccountSettingsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - getMemberTraits() { - return translateTraits(this.memberTraits); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_ListAttributesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - getOwnTraits() { - return translateTraits(this.traits); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_ListClustersCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - 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"); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_ListContainerInstancesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - getValueSchema() { - const sc = this.getSchema(); - const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; - const memberSchema = typeof sc === "number" - ? 0b0011_1111 & sc - : sc && typeof sc === "object" && (isMap || isList) - ? sc[3 + sc[0]] - : isDoc - ? 15 - : void 0; - if (memberSchema != null) { - return member([memberSchema, 0], isMap ? "value" : "member"); - } - throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_ListServiceDeploymentsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - 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 no member=${memberName}.`); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_ListServiceDeploymentsResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_ListServicesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - getMemberSchemas() { - const buffer = {}; - try { - for (const [k, v] of this.structIterator()) { - buffer[k] = v; - } - } - catch (ignored) { } - return buffer; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_ListServicesByNamespaceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - getEventStreamMember() { - if (this.isStructSchema()) { - for (const [memberName, memberSchema] of this.structIterator()) { - if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { - return memberName; - } - } - } - return ""; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_ListTagsForResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - *structIterator() { - if (this.isUnitSchema()) { - return; - } - if (!this.isStructSchema()) { - throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); - } - const struct = this.getSchema(); - for (let i = 0; i < struct[4].length; ++i) { - yield [struct[4][i], member([struct[5][i], 0], struct[4][i])]; - } + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_ListTaskDefinitionFamiliesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } -} -function member(memberSchema, memberName) { - if (memberSchema instanceof NormalizedSchema) { - return Object.assign(memberSchema, { - memberName, - _isMemberSchema: true, - }); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_ListTaskDefinitionsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - const internalCtorAccess = NormalizedSchema; - return new internalCtorAccess(memberSchema, memberName); -} -const isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2; -const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5; - -class SimpleSchema extends Schema { - static symbol = Symbol.for("@smithy/sim"); - name; - schemaRef; - traits; - symbol = SimpleSchema.symbol; -} -const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef, -}); -const simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef, -}); - -const SCHEMA = { - BLOB: 0b0001_0101, - STREAMING_BLOB: 0b0010_1010, - BOOLEAN: 0b0000_0010, - STRING: 0b0000_0000, - NUMERIC: 0b0000_0001, - BIG_INTEGER: 0b0001_0001, - BIG_DECIMAL: 0b0001_0011, - DOCUMENT: 0b0000_1111, - TIMESTAMP_DEFAULT: 0b0000_0100, - TIMESTAMP_DATE_TIME: 0b0000_0101, - TIMESTAMP_HTTP_DATE: 0b0000_0110, - TIMESTAMP_EPOCH_SECONDS: 0b0000_0111, - LIST_MODIFIER: 0b0100_0000, - MAP_MODIFIER: 0b1000_0000, + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; - -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; +const de_ListTasksCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - static for(namespace) { - if (!TypeRegistry.registries.has(namespace)) { - TypeRegistry.registries.set(namespace, new TypeRegistry(namespace)); - } - return TypeRegistry.registries.get(namespace); - } - register(shapeId, schema) { - const qualifiedName = this.normalizeShapeId(shapeId); - const registry = TypeRegistry.for(qualifiedName.split("#")[0]); - registry.schemas.set(qualifiedName, schema); - } - getSchema(shapeId) { - const id = this.normalizeShapeId(shapeId); - if (!this.schemas.has(id)) { - throw new Error(`@smithy/core/schema - schema not found for ${id}`); - } - return this.schemas.get(id); - } - registerError(es, ctor) { - const $error = es; - const registry = TypeRegistry.for($error[1]); - registry.schemas.set($error[1] + "#" + $error[2], $error); - registry.exceptions.set($error, ctor); - } - getErrorCtor(es) { - const $error = es; - const registry = TypeRegistry.for($error[1]); - return registry.exceptions.get($error); - } - 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 undefined; - } - find(predicate) { - return [...this.schemas.values()].find(predicate); - } - 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.struct = struct; -exports.translateTraits = translateTraits; - - -/***/ }), - -/***/ 38669: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var uuid = __nccwpck_require__(90266); - -const copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source; - -const parseBoolean = (value) => { - switch (value) { - case "true": - return true; - case "false": - return false; - default: - throw new Error(`Unable to parse boolean value "${value}"`); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_PutAccountSettingCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const expectBoolean = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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; +const de_PutAccountSettingDefaultCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const expectNumber = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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; +const de_PutAttributesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - throw new TypeError(`Expected number, got ${typeof value}: ${value}`); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); -const 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}`); - } +const de_PutClusterCapacityProvidersCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return expected; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const expectLong = (value) => { - if (value === null || value === undefined) { - return undefined; - } - if (Number.isInteger(value) && !Number.isNaN(value)) { - return value; +const de_RegisterContainerInstanceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_RegisterContainerInstanceResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const expectInt = expectLong; -const expectInt32 = (value) => expectSizedInt(value, 32); -const expectShort = (value) => expectSizedInt(value, 16); -const expectByte = (value) => expectSizedInt(value, 8); -const expectSizedInt = (value, size) => { - const expected = expectLong(value); - if (expected !== undefined && castInt(expected, size) !== expected) { - throw new TypeError(`Expected ${size}-bit integer, got ${value}`); +const de_RegisterTaskDefinitionCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return expected; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_RegisterTaskDefinitionResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const 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]; +const de_RunTaskCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_RunTaskResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const 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"); +const de_StartTaskCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return value; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_StartTaskResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const expectObject = (value) => { - if (value === null || value === undefined) { - return undefined; - } - if (typeof value === "object" && !Array.isArray(value)) { - return value; +const de_StopServiceDeploymentCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - const receivedType = Array.isArray(value) ? "array" : typeof value; - throw new TypeError(`Expected object, got ${receivedType}: ${value}`); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const expectString = (value) => { - if (value === null || value === undefined) { - return undefined; +const de_StopTaskCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - if (typeof value === "string") { - return value; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_StopTaskResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_SubmitAttachmentStateChangesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - if (["boolean", "number", "bigint"].includes(typeof value)) { - logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); - return String(value); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_SubmitContainerStateChangeCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - throw new TypeError(`Expected string, got ${typeof value}: ${value}`); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const expectUnion = (value) => { - if (value === null || value === undefined) { - return undefined; +const de_SubmitTaskStateChangeCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - const asObject = expectObject(value); - const setKeys = Object.entries(asObject) - .filter(([, v]) => v != null) - .map(([k]) => k); - if (setKeys.length === 0) { - throw new TypeError(`Unions must have exactly one non-null member. None were found.`); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_TagResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - if (setKeys.length > 1) { - throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; +const de_UntagResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return asObject; + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const strictParseDouble = (value) => { - if (typeof value == "string") { - return expectNumber(parseNumber(value)); +const de_UpdateCapacityProviderCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return expectNumber(value); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_UpdateCapacityProviderResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const strictParseFloat = strictParseDouble; -const strictParseFloat32 = (value) => { - if (typeof value == "string") { - return expectFloat32(parseNumber(value)); +const de_UpdateClusterCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return expectFloat32(value); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; -const 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`); +const de_UpdateClusterSettingsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return parseFloat(value); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = smithyClient._json(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const limitedParseDouble = (value) => { - if (typeof value == "string") { - return parseFloatString(value); +const de_UpdateContainerAgentCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return expectNumber(value); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_UpdateContainerAgentResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const handleFloat = limitedParseDouble; -const limitedParseFloat = limitedParseDouble; -const limitedParseFloat32 = (value) => { - if (typeof value == "string") { - return parseFloatString(value); +const de_UpdateContainerInstancesStateCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return expectFloat32(value); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_UpdateContainerInstancesStateResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const 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}`); +const de_UpdateServiceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_UpdateServiceResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const strictParseLong = (value) => { - if (typeof value === "string") { - return expectLong(parseNumber(value)); +const de_UpdateServicePrimaryTaskSetCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return expectLong(value); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_UpdateServicePrimaryTaskSetResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const strictParseInt = strictParseLong; -const strictParseInt32 = (value) => { - if (typeof value === "string") { - return expectInt32(parseNumber(value)); +const de_UpdateTaskProtectionCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return expectInt32(value); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_UpdateTaskProtectionResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const strictParseShort = (value) => { - if (typeof value === "string") { - return expectShort(parseNumber(value)); +const de_UpdateTaskSetCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); } - return expectShort(value); + const data = await core$1.parseJsonBody(output.body, context); + let contents = {}; + contents = de_UpdateTaskSetResponse(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; }; -const strictParseByte = (value) => { - if (typeof value === "string") { - return expectByte(parseNumber(value)); +const de_CommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await core$1.parseJsonErrorBody(output.body, context), + }; + const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ClientException": + case "com.amazonaws.ecs#ClientException": + throw await de_ClientExceptionRes(parsedOutput); + case "ClusterNotFoundException": + case "com.amazonaws.ecs#ClusterNotFoundException": + throw await de_ClusterNotFoundExceptionRes(parsedOutput); + case "InvalidParameterException": + case "com.amazonaws.ecs#InvalidParameterException": + throw await de_InvalidParameterExceptionRes(parsedOutput); + case "LimitExceededException": + case "com.amazonaws.ecs#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput); + case "ServerException": + case "com.amazonaws.ecs#ServerException": + throw await de_ServerExceptionRes(parsedOutput); + case "UnsupportedFeatureException": + case "com.amazonaws.ecs#UnsupportedFeatureException": + throw await de_UnsupportedFeatureExceptionRes(parsedOutput); + case "UpdateInProgressException": + case "com.amazonaws.ecs#UpdateInProgressException": + throw await de_UpdateInProgressExceptionRes(parsedOutput); + case "NamespaceNotFoundException": + case "com.amazonaws.ecs#NamespaceNotFoundException": + throw await de_NamespaceNotFoundExceptionRes(parsedOutput); + case "AccessDeniedException": + case "com.amazonaws.ecs#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput); + case "PlatformTaskDefinitionIncompatibilityException": + case "com.amazonaws.ecs#PlatformTaskDefinitionIncompatibilityException": + throw await de_PlatformTaskDefinitionIncompatibilityExceptionRes(parsedOutput); + case "PlatformUnknownException": + case "com.amazonaws.ecs#PlatformUnknownException": + throw await de_PlatformUnknownExceptionRes(parsedOutput); + case "ServiceNotActiveException": + case "com.amazonaws.ecs#ServiceNotActiveException": + throw await de_ServiceNotActiveExceptionRes(parsedOutput); + case "ServiceNotFoundException": + case "com.amazonaws.ecs#ServiceNotFoundException": + throw await de_ServiceNotFoundExceptionRes(parsedOutput); + case "TargetNotFoundException": + case "com.amazonaws.ecs#TargetNotFoundException": + throw await de_TargetNotFoundExceptionRes(parsedOutput); + case "ClusterContainsCapacityProviderException": + case "com.amazonaws.ecs#ClusterContainsCapacityProviderException": + throw await de_ClusterContainsCapacityProviderExceptionRes(parsedOutput); + case "ClusterContainsContainerInstancesException": + case "com.amazonaws.ecs#ClusterContainsContainerInstancesException": + throw await de_ClusterContainsContainerInstancesExceptionRes(parsedOutput); + case "ClusterContainsServicesException": + case "com.amazonaws.ecs#ClusterContainsServicesException": + throw await de_ClusterContainsServicesExceptionRes(parsedOutput); + case "ClusterContainsTasksException": + case "com.amazonaws.ecs#ClusterContainsTasksException": + throw await de_ClusterContainsTasksExceptionRes(parsedOutput); + case "TaskSetNotFoundException": + case "com.amazonaws.ecs#TaskSetNotFoundException": + throw await de_TaskSetNotFoundExceptionRes(parsedOutput); + case "TargetNotConnectedException": + case "com.amazonaws.ecs#TargetNotConnectedException": + throw await de_TargetNotConnectedExceptionRes(parsedOutput); + case "ResourceNotFoundException": + case "com.amazonaws.ecs#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput); + case "AttributeLimitExceededException": + case "com.amazonaws.ecs#AttributeLimitExceededException": + throw await de_AttributeLimitExceededExceptionRes(parsedOutput); + case "ResourceInUseException": + case "com.amazonaws.ecs#ResourceInUseException": + throw await de_ResourceInUseExceptionRes(parsedOutput); + case "BlockedException": + case "com.amazonaws.ecs#BlockedException": + throw await de_BlockedExceptionRes(parsedOutput); + case "ConflictException": + case "com.amazonaws.ecs#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput); + case "ServiceDeploymentNotFoundException": + case "com.amazonaws.ecs#ServiceDeploymentNotFoundException": + throw await de_ServiceDeploymentNotFoundExceptionRes(parsedOutput); + case "MissingVersionException": + case "com.amazonaws.ecs#MissingVersionException": + throw await de_MissingVersionExceptionRes(parsedOutput); + case "NoUpdateAvailableException": + case "com.amazonaws.ecs#NoUpdateAvailableException": + throw await de_NoUpdateAvailableExceptionRes(parsedOutput); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); } - return expectByte(value); }; -const stackTraceWarning = (message) => { - return String(new TypeError(message).stack || message) - .split("\n") - .slice(0, 5) - .filter((s) => !s.includes("stackTraceWarning")) - .join("\n"); +const de_AccessDeniedExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const logger = { - warn: console.warn, +const de_AttributeLimitExceededExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new AttributeLimitExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; - -const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; -const 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`; -} -const RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); -const parseRfc3339DateTime = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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 }); +const de_BlockedExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new BlockedException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const 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])$/); -const parseRfc3339DateTimeWithOffset = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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; +const de_ClientExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const 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$/); -const 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$/); -const 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})$/); -const parseRfc7231DateTime = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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"); +const de_ClusterContainsCapacityProviderExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ClusterContainsCapacityProviderException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const parseEpochTimestamp = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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)); +const de_ClusterContainsContainerInstancesExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ClusterContainsContainerInstancesException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const 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))); +const de_ClusterContainsServicesExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ClusterContainsServicesException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const 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; +const de_ClusterContainsTasksExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ClusterContainsTasksException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000; -const 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; +const de_ClusterNotFoundExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ClusterNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const parseMonthByShortName = (value) => { - const monthIdx = MONTHS.indexOf(value); - if (monthIdx < 0) { - throw new TypeError(`Invalid month: ${value}`); - } - return monthIdx + 1; +const de_ConflictExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ConflictException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -const 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}`); - } +const de_InvalidParameterExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new InvalidParameterException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const isLeapYear = (year) => { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +const de_LimitExceededExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new LimitExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const 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; +const de_MissingVersionExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new MissingVersionException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const parseMilliseconds = (value) => { - if (value === null || value === undefined) { - return 0; - } - return strictParseFloat32("0." + value) * 1000; +const de_NamespaceNotFoundExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new NamespaceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const 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; +const de_NoUpdateAvailableExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new NoUpdateAvailableException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const stripLeadingZeroes = (value) => { - let idx = 0; - while (idx < value.length - 1 && value.charAt(idx) === "0") { - idx++; - } - if (idx === 0) { - return value; - } - return value.slice(idx); +const de_PlatformTaskDefinitionIncompatibilityExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new PlatformTaskDefinitionIncompatibilityException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; - -const 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); - }, +const de_PlatformUnknownExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new PlatformUnknownException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, }); - return str; + return smithyClient.decorateServiceException(exception, body); }; -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)); +const de_ResourceInUseExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ResourceInUseException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -LazyJsonString.fromObject = LazyJsonString.from; - -function quoteHeader(part) { - if (part.includes(",") || part.includes('"')) { - part = `"${part.replace(/"/g, '\\"')}"`; - } - return part; -} - -const ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`; -const mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`; -const time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`; -const date = `(\\d?\\d)`; -const year = `(\\d{4})`; -const RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/); -const IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`); -const RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`); -const ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`); -const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; -const _parseEpochTimestamp = (value) => { - if (value == null) { - return void 0; - } - 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)); +const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const _parseRfc3339DateTimeWithOffset = (value) => { - if (value == null) { - return void 0; - } - 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.setUTCFullYear(Number(yearStr), Number(monthStr) - 1, Number(dayStr)); - date.setUTCHours(Number(hours)); - date.setUTCMinutes(Number(minutes)); - date.setUTCSeconds(Number(seconds)); - date.setUTCMilliseconds(Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0); - if (offsetStr.toUpperCase() != "Z") { - const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0]; - const scalar = sign === "-" ? 1 : -1; - date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000)); - } - return date; +const de_ServerExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const _parseRfc7231DateTime = (value) => { - if (value == null) { - return void 0; - } - 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 date = new Date(); - date.setUTCFullYear(Number(year)); - date.setUTCMonth(months.indexOf(month)); - range(day, 1, 31); - date.setUTCDate(Number(day)); - range(hour, 0, 23); - date.setUTCHours(Number(hour)); - range(minute, 0, 59); - date.setUTCMinutes(Number(minute)); - range(second, 0, 60); - date.setUTCSeconds(Number(second)); - date.setUTCMilliseconds(fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0); - return date; - } - throw new TypeError(`Invalid RFC7231 date-time value ${value}.`); +const de_ServiceDeploymentNotFoundExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ServiceDeploymentNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -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; -} - -const 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, '"'); +const de_ServiceNotActiveExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ServiceNotActiveException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, }); + return smithyClient.decorateServiceException(exception, body); }; - -const format = /^-?\d*(\.\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 must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`); - } - } - 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"); -} - -Object.defineProperty(exports, "generateIdempotencyToken", ({ - enumerable: true, - get: function () { return uuid.v4; } -})); -exports.LazyJsonString = LazyJsonString; -exports.NumericValue = NumericValue; -exports._parseEpochTimestamp = _parseEpochTimestamp; -exports._parseRfc3339DateTimeWithOffset = _parseRfc3339DateTimeWithOffset; -exports._parseRfc7231DateTime = _parseRfc7231DateTime; -exports.copyDocumentWithTransform = copyDocumentWithTransform; -exports.dateToUtcString = dateToUtcString; -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.handleFloat = handleFloat; -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.splitEvery = splitEvery; -exports.splitHeader = splitHeader; -exports.strictParseByte = strictParseByte; -exports.strictParseDouble = strictParseDouble; -exports.strictParseFloat = strictParseFloat; -exports.strictParseFloat32 = strictParseFloat32; -exports.strictParseInt = strictParseInt; -exports.strictParseInt32 = strictParseInt32; -exports.strictParseLong = strictParseLong; -exports.strictParseShort = strictParseShort; - - -/***/ }), - -/***/ 8540: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var protocolHttp = __nccwpck_require__(5559); -var querystringBuilder = __nccwpck_require__(75547); -var utilBase64 = __nccwpck_require__(26262); - -function createRequest(url, requestOptions) { - return new Request(url, requestOptions); -} - -function requestTimeout(timeoutInMs = 0) { - return new Promise((resolve, reject) => { - if (timeoutInMs) { - setTimeout(() => { - const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); - timeoutError.name = "TimeoutError"; - reject(timeoutError); - }, timeoutInMs); - } +const de_ServiceNotFoundExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new ServiceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, }); -} - -const keepAliveSupport = { - supported: undefined, -}; -class FetchHttpHandler { - config; - configProvider; - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new FetchHttpHandler(instanceOrOptions); - } - constructor(options) { - if (typeof options === "function") { - this.configProvider = options().then((opts) => opts || {}); - } - else { - this.config = options ?? {}; - this.configProvider = Promise.resolve(this.config); - } - if (keepAliveSupport.supported === undefined) { - keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]")); - } - } - destroy() { - } - async handle(request, { abortSignal, requestTimeout: requestTimeout$1 } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - const requestTimeoutInMs = requestTimeout$1 ?? this.config.requestTimeout; - const keepAlive = this.config.keepAlive === true; - const credentials = this.config.credentials; - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - return Promise.reject(abortError); - } - let path = request.path; - const queryString = querystringBuilder.buildQueryString(request.query || {}); - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let auth = ""; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}@`; - } - const { port, method } = request; - const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; - const body = method === "GET" || method === "HEAD" ? undefined : request.body; - const requestOptions = { - body, - headers: new Headers(request.headers), - method: method, - credentials, - }; - if (this.config?.cache) { - requestOptions.cache = this.config.cache; - } - if (body) { - requestOptions.duplex = "half"; - } - if (typeof AbortController !== "undefined") { - requestOptions.signal = abortSignal; - } - if (keepAliveSupport.supported) { - requestOptions.keepalive = keepAlive; - } - if (typeof this.config.requestInit === "function") { - Object.assign(requestOptions, this.config.requestInit(request)); - } - let removeSignalEventListener = () => { }; - const fetchRequest = createRequest(url, requestOptions); - const raceOfPromises = [ - fetch(fetchRequest).then((response) => { - const fetchHeaders = response.headers; - const transformedHeaders = {}; - for (const pair of fetchHeaders.entries()) { - transformedHeaders[pair[0]] = pair[1]; - } - const hasReadableStream = response.body != undefined; - if (!hasReadableStream) { - return response.blob().then((body) => ({ - response: new protocolHttp.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body, - }), - })); - } - return { - response: new protocolHttp.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body: response.body, - }), - }; - }), - requestTimeout(requestTimeoutInMs), - ]; - if (abortSignal) { - raceOfPromises.push(new Promise((resolve, reject) => { - const onAbort = () => { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - }; - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - removeSignalEventListener = () => signal.removeEventListener("abort", onAbort); - } - else { - abortSignal.onabort = onAbort; - } - })); - } - return Promise.race(raceOfPromises).finally(removeSignalEventListener); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - config[key] = value; - return config; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } -} - -const streamCollector = async (stream) => { - if ((typeof Blob === "function" && stream instanceof Blob) || stream.constructor?.name === "Blob") { - if (Blob.prototype.arrayBuffer !== undefined) { - return new Uint8Array(await stream.arrayBuffer()); - } - return collectBlob(stream); - } - return collectStream(stream); + return smithyClient.decorateServiceException(exception, body); }; -async function collectBlob(blob) { - const base64 = await readToBase64(blob); - const arrayBuffer = utilBase64.fromBase64(base64); - return new Uint8Array(arrayBuffer); -} -async function collectStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} -function readToBase64(blob) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onloadend = () => { - if (reader.readyState !== 2) { - return reject(new Error("Reader aborted too early")); - } - const result = (reader.result ?? ""); - const commaIndex = result.indexOf(","); - const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; - resolve(result.substring(dataOffset)); - }; - reader.onabort = () => reject(new Error("Read aborted")); - reader.onerror = () => reject(reader.error); - reader.readAsDataURL(blob); +const de_TargetNotConnectedExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new TargetNotConnectedException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, }); -} - -exports.FetchHttpHandler = FetchHttpHandler; -exports.keepAliveSupport = keepAliveSupport; -exports.streamCollector = streamCollector; - - -/***/ }), - -/***/ 95697: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const isArrayBuffer = (arg) => (typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer) || - Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; - -exports.isArrayBuffer = isArrayBuffer; - - -/***/ }), - -/***/ 44412: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEndpointFromConfig = void 0; -const node_config_provider_1 = __nccwpck_require__(44297); -const getEndpointUrlConfig_1 = __nccwpck_require__(83135); -const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId ?? ""))(); -exports.getEndpointFromConfig = getEndpointFromConfig; - - -/***/ }), - -/***/ 83135: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEndpointUrlConfig = void 0; -const shared_ini_file_loader_1 = __nccwpck_require__(80213); -const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; -const CONFIG_ENDPOINT_URL = "endpoint_url"; -const 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 undefined; - }, - configFileSelector: (profile, config) => { - if (config && profile.services) { - const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (servicesSection) { - const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); - const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (endpointUrl) - return endpointUrl; - } - } - const endpointUrl = profile[CONFIG_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return undefined; - }, - default: undefined, -}); -exports.getEndpointUrlConfig = getEndpointUrlConfig; - - -/***/ }), - -/***/ 53152: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var getEndpointFromConfig = __nccwpck_require__(44412); -var urlParser = __nccwpck_require__(81983); -var core = __nccwpck_require__(90475); -var utilMiddleware = __nccwpck_require__(25695); -var middlewareSerde = __nccwpck_require__(29514); - -const 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; -}; -const DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; -const IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; -const DOTS_PATTERN = /\.\./; -const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName); -const 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; -}; - -const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config) => { - const configProvider = async () => { - const 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 undefined; - } - 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; + return smithyClient.decorateServiceException(exception, body); }; - -const toEndpointV1 = (endpoint) => { - if (typeof endpoint === "object") { - if ("url" in endpoint) { - return urlParser.parseUrl(endpoint.url); - } - return endpoint; - } - return urlParser.parseUrl(endpoint); +const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new TargetNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; - -const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => { - if (!clientConfig.isCustomEndpoint) { - let endpointFromConfig; - if (clientConfig.serviceConfiguredEndpoint) { - endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); - } - else { - endpointFromConfig = await getEndpointFromConfig.getEndpointFromConfig(clientConfig.serviceId); - } - if (endpointFromConfig) { - clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); - clientConfig.isCustomEndpoint = true; - } - } - 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); - return endpoint; +const de_TaskSetNotFoundExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new TaskSetNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; -const 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)(); - 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; +const de_UnsupportedFeatureExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new UnsupportedFeatureException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return smithyClient.decorateServiceException(exception, body); }; - -const endpointMiddleware = ({ config, instructions, }) => { - return (next, context) => async (args) => { - if (config.isCustomEndpoint) { - core.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 = utilMiddleware.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, - }); - }; -}; - -const endpointMiddlewareOptions = { - step: "serialize", - tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], - name: "endpointV2Middleware", - override: true, - relation: "before", - toMiddleware: middlewareSerde.serializerMiddlewareOption.name, -}; -const getEndpointPlugin = (config, instructions) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(endpointMiddleware({ - config, - instructions, - }), endpointMiddlewareOptions); - }, -}); - -const resolveEndpointConfig = (input) => { - const tls = input.tls ?? true; - const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; - const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await utilMiddleware.normalizeProvider(endpoint)()) : undefined; - const isCustomEndpoint = !!endpoint; - const resolvedConfig = Object.assign(input, { - endpoint: customEndpointProvider, - tls, - isCustomEndpoint, - useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false), - useFipsEndpoint: utilMiddleware.normalizeProvider(useFipsEndpoint ?? false), - }); - let configuredEndpointPromise = undefined; - resolvedConfig.serviceConfiguredEndpoint = async () => { - if (input.serviceId && !configuredEndpointPromise) { - configuredEndpointPromise = getEndpointFromConfig.getEndpointFromConfig(input.serviceId); - } - return configuredEndpointPromise; - }; - return resolvedConfig; -}; - -const 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; -}; - -exports.endpointMiddleware = endpointMiddleware; -exports.endpointMiddlewareOptions = endpointMiddlewareOptions; -exports.getEndpointFromInstructions = getEndpointFromInstructions; -exports.getEndpointPlugin = getEndpointPlugin; -exports.resolveEndpointConfig = resolveEndpointConfig; -exports.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig; -exports.resolveParams = resolveParams; -exports.toEndpointV1 = toEndpointV1; - - -/***/ }), - -/***/ 29514: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var protocolHttp = __nccwpck_require__(5559); - -const 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, - }); - 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 += "\n " + hint; - } - catch (e) { - 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 (protocolHttp.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 (e) { - } - } - throw error; - } -}; -const findHeader = (pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; -}; - -const serializerMiddleware = (options, serializer) => (next, context) => async (args) => { - const endpointConfig = options; - const endpoint = context.endpointV2?.url && endpointConfig.urlParser - ? async () => endpointConfig.urlParser(context.endpointV2.url) - : endpointConfig.endpoint; - if (!endpoint) { - throw new Error("No valid endpoint provider available."); - } - const request = await serializer(args.input, { ...options, endpoint }); - return next({ - ...args, - request, - }); -}; - -const deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true, -}; -const 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); - }, - }; -} - -exports.deserializerMiddleware = deserializerMiddleware; -exports.deserializerMiddlewareOption = deserializerMiddlewareOption; -exports.getSerdePlugin = getSerdePlugin; -exports.serializerMiddleware = serializerMiddleware; -exports.serializerMiddlewareOption = serializerMiddlewareOption; - - -/***/ }), - -/***/ 44297: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var propertyProvider = __nccwpck_require__(57745); -var sharedIniFileLoader = __nccwpck_require__(80213); - -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 (e) { - return functionString; - } -} - -const fromEnv = (envVarSelector, options) => async () => { - try { - const config = envVarSelector(process.env, options); - if (config === undefined) { - throw new Error(); - } - return config; - } - catch (e) { - throw new propertyProvider.CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger }); - } -}; - -const fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { - const profile = sharedIniFileLoader.getProfileName(init); - const { configFile, credentialsFile } = await sharedIniFileLoader.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 propertyProvider.CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger }); - } -}; - -const isFunction = (func) => typeof func === "function"; -const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue); - -const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { - const { signingName, logger } = configuration; - const envOptions = { signingName, logger }; - return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))); -}; - -exports.loadConfig = loadConfig; - - -/***/ }), - -/***/ 11176: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var protocolHttp = __nccwpck_require__(5559); -var querystringBuilder = __nccwpck_require__(75547); -var http = __nccwpck_require__(58611); -var https = __nccwpck_require__(65692); -var stream = __nccwpck_require__(2203); -var http2 = __nccwpck_require__(85675); - -const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; - -const getTransformedHeaders = (headers) => { - const transformedHeaders = {}; - for (const name of Object.keys(headers)) { - const headerValues = headers[name]; - transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; - } - return transformedHeaders; -}; - -const timing = { - setTimeout: (cb, ms) => setTimeout(cb, ms), - clearTimeout: (timeoutId) => clearTimeout(timeoutId), -}; - -const DEFER_EVENT_LISTENER_TIME$2 = 1000; -const 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); -}; - -const 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; -}; - -const DEFER_EVENT_LISTENER_TIME$1 = 3000; -const 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); -}; - -const DEFER_EVENT_LISTENER_TIME = 3000; -const 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); -}; - -const MIN_WAIT_TIME = 6_000; -async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) { - const headers = request.headers ?? {}; - const expect = headers["Expect"] || headers["expect"]; - let timeoutId = -1; - let sendBody = true; - if (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 stream.Readable) { - body.pipe(httpRequest); - return; - } - if (body) { - if (Buffer.isBuffer(body) || typeof body === "string") { - 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(); -} - -const DEFAULT_REQUEST_TIMEOUT = 0; -class NodeHttpHandler { - config; - configProvider; - socketWarningTimestamp = 0; - 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 = 15_000; - if (Date.now() - interval < socketWarningTimestamp) { - return socketWarningTimestamp; - } - if (sockets && requests) { - for (const origin in sockets) { - 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)); - } - }); - } - resolveDefaultConfig(options) { - const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, } = options || {}; - const keepAlive = true; - const maxSockets = 50; - return { - connectionTimeout, - requestTimeout, - socketTimeout, - socketAcquisitionWarningTimeout, - throwOnRequestTimeout, - httpAgent: (() => { - if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { - return httpAgent; - } - return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); - })(), - httpsAgent: (() => { - if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { - return httpsAgent; - } - return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); - })(), - logger: console, - }; - } - destroy() { - this.config?.httpAgent?.destroy(); - this.config?.httpsAgent?.destroy(); - } - async handle(request, { abortSignal, requestTimeout } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - return new Promise((_resolve, _reject) => { - let writeRequestBodyPromise = undefined; - const timeouts = []; - const resolve = async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _resolve(arg); - }; - const reject = async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _reject(arg); - }; - if (!this.config) { - throw new Error("Node HTTP request handler config is not resolved"); - } - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; - } - const isSSL = request.protocol === "https:"; - const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; - timeouts.push(timing.setTimeout(() => { - this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, this.config.logger); - }, this.config.socketAcquisitionWarningTimeout ?? - (this.config.requestTimeout ?? 2000) + (this.config.connectionTimeout ?? 1000))); - const queryString = querystringBuilder.buildQueryString(request.query || {}); - let auth = undefined; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}`; - } - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let hostname = request.hostname ?? ""; - if (hostname[0] === "[" && hostname.endsWith("]")) { - hostname = request.hostname.slice(1, -1); - } - else { - hostname = request.hostname; - } - const nodeHttpsOptions = { - headers: request.headers, - host: hostname, - method: request.method, - path, - port: request.port, - agent, - auth, - }; - const requestFunc = isSSL ? https.request : http.request; - const req = requestFunc(nodeHttpsOptions, (res) => { - const httpResponse = new protocolHttp.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 = new Error("Request aborted"); - abortError.name = "AbortError"; - 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 ?? this.config.requestTimeout; - timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); - timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, this.config.throwOnRequestTimeout, this.config.logger ?? console)); - timeouts.push(setSocketTimeout(req, reject, this.config.socketTimeout)); - const httpAgent = nodeHttpsOptions.agent; - if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { - timeouts.push(setSocketKeepAlive(req, { - keepAlive: httpAgent.keepAlive, - keepAliveMsecs: httpAgent.keepAliveMsecs, - })); - } - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout).catch((e) => { - timeouts.forEach(timing.clearTimeout); - return _reject(e); - }); - }); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value, - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } -} - -class NodeHttp2ConnectionPool { - sessions = []; - constructor(sessions) { - this.sessions = sessions ?? []; - } - poll() { - if (this.sessions.length > 0) { - return this.sessions.shift(); - } - } - offerLast(session) { - this.sessions.push(session); - } - contains(session) { - return this.sessions.includes(session); - } - remove(session) { - this.sessions = this.sessions.filter((s) => s !== session); - } - [Symbol.iterator]() { - return this.sessions[Symbol.iterator](); - } - destroy(connection) { - for (const session of this.sessions) { - if (session === connection) { - if (!session.destroyed) { - session.destroy(); - } - } - } - } -} - -class NodeHttp2ConnectionManager { - constructor(config) { - this.config = config; - if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { - throw new RangeError("maxConcurrency must be greater than zero."); - } - } - config; - sessionCache = new Map(); - lease(requestContext, connectionConfiguration) { - const url = this.getUrlString(requestContext); - const existingPool = this.sessionCache.get(url); - if (existingPool) { - const existingSession = existingPool.poll(); - if (existingSession && !this.config.disableConcurrency) { - return existingSession; - } - } - const session = http2.connect(url); - 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()); - } - }); - } - session.unref(); - const destroySessionCb = () => { - session.destroy(); - this.deleteSession(url, session); - }; - session.on("goaway", destroySessionCb); - session.on("error", destroySessionCb); - session.on("frameError", destroySessionCb); - session.on("close", () => this.deleteSession(url, session)); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); - } - const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); - connectionPool.offerLast(session); - this.sessionCache.set(url, connectionPool); - return session; - } - deleteSession(authority, session) { - const existingConnectionPool = this.sessionCache.get(authority); - if (!existingConnectionPool) { - return; - } - if (!existingConnectionPool.contains(session)) { - return; - } - existingConnectionPool.remove(session); - this.sessionCache.set(authority, existingConnectionPool); - } - release(requestContext, session) { - const cacheKey = this.getUrlString(requestContext); - this.sessionCache.get(cacheKey)?.offerLast(session); - } - destroy() { - for (const [key, connectionPool] of this.sessionCache) { - for (const session of connectionPool) { - if (!session.destroyed) { - session.destroy(); - } - connectionPool.remove(session); - } - this.sessionCache.delete(key); - } - } - setMaxConcurrentStreams(maxConcurrentStreams) { - if (maxConcurrentStreams && maxConcurrentStreams <= 0) { - throw new RangeError("maxConcurrentStreams must be greater than zero."); - } - this.config.maxConcurrency = maxConcurrentStreams; - } - setDisableConcurrentStreams(disableConcurrentStreams) { - this.config.disableConcurrency = disableConcurrentStreams; - } - getUrlString(request) { - return request.destination.toString(); - } -} - -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 } = {}) { - if (!this.config) { - this.config = await this.configProvider; - this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); - if (this.config.maxConcurrentStreams) { - this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); - } - } - const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; - 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 = new Error("Request aborted"); - abortError.name = "AbortError"; - 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 session = this.connectionManager.lease(requestContext, { - requestTimeout: this.config?.sessionTimeout, - disableConcurrentStreams: disableConcurrentStreams || false, - }); - const rejectWithDestroy = (err) => { - if (disableConcurrentStreams) { - this.destroySession(session); - } - fulfilled = true; - reject(err); - }; - const queryString = querystringBuilder.buildQueryString(query || {}); - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - const req = session.request({ - ...request.headers, - [http2.constants.HTTP2_HEADER_PATH]: path, - [http2.constants.HTTP2_HEADER_METHOD]: method, - }); - session.ref(); - req.on("response", (headers) => { - const httpResponse = new protocolHttp.HttpResponse({ - statusCode: headers[":status"] || -1, - headers: getTransformedHeaders(headers), - body: req, - }); - fulfilled = true; - resolve({ response: httpResponse }); - if (disableConcurrentStreams) { - session.close(); - this.connectionManager.deleteSession(authority, session); - } - }); - if (effectiveRequestTimeout) { - req.setTimeout(effectiveRequestTimeout, () => { - req.close(); - const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); - timeoutError.name = "TimeoutError"; - rejectWithDestroy(timeoutError); - }); - } - if (abortSignal) { - const onAbort = () => { - req.close(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - rejectWithDestroy(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; - } - } - req.on("frameError", (type, code, id) => { - rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); - }); - req.on("error", rejectWithDestroy); - req.on("aborted", () => { - rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); - }); - req.on("close", () => { - session.unref(); - if (disableConcurrentStreams) { - session.destroy(); - } - if (!fulfilled) { - rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); - } - }); - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); - }); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value, - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } - destroySession(session) { - if (!session.destroyed) { - session.destroy(); - } - } -} - -class Collector extends stream.Writable { - bufferedBytes = []; - _write(chunk, encoding, callback) { - this.bufferedBytes.push(chunk); - callback(); - } -} - -const streamCollector = (stream) => { - if (isReadableStreamInstance(stream)) { - return collectReadableStream(stream); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); - resolve(bytes); - }); - }); -}; -const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; -async function collectReadableStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} - -exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; -exports.NodeHttp2Handler = NodeHttp2Handler; -exports.NodeHttpHandler = NodeHttpHandler; -exports.streamCollector = streamCollector; - - -/***/ }), - -/***/ 57745: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -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); - } -} - -const 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; -}; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const 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; - }; -}; - -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; - - -/***/ }), - -/***/ 5559: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var types = __nccwpck_require__(20873); - -const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - }, - }; -}; -const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler(), - }; -}; - -class Field { - name; - kind; - values; - constructor({ name, kind = types.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); - } -} - -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"; - } -} - -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} - -exports.Field = Field; -exports.Fields = Fields; -exports.HttpRequest = HttpRequest; -exports.HttpResponse = HttpResponse; -exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; -exports.isValidHostname = isValidHostname; -exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; - - -/***/ }), - -/***/ 75547: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilUriEscape = __nccwpck_require__(5821); - -function buildQueryString(query) { - const parts = []; - for (let key of Object.keys(query).sort()) { - const value = query[key]; - key = utilUriEscape.escapeUri(key); - if (Array.isArray(value)) { - for (let i = 0, iLen = value.length; i < iLen; i++) { - parts.push(`${key}=${utilUriEscape.escapeUri(value[i])}`); - } - } - else { - let qsEntry = key; - if (value || typeof value === "string") { - qsEntry += `=${utilUriEscape.escapeUri(value)}`; - } - parts.push(qsEntry); - } - } - return parts.join("&"); -} - -exports.buildQueryString = buildQueryString; - - -/***/ }), - -/***/ 955: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -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; -} - -exports.parseQueryString = parseQueryString; - - -/***/ }), - -/***/ 93715: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __nccwpck_require__(70857); -const path_1 = __nccwpck_require__(16928); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; -}; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; -}; -exports.getHomeDir = getHomeDir; - - -/***/ }), - -/***/ 28224: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __nccwpck_require__(76982); -const path_1 = __nccwpck_require__(16928); -const getHomeDir_1 = __nccwpck_require__(93715); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); -}; -exports.getSSOTokenFilepath = getSSOTokenFilepath; - - -/***/ }), - -/***/ 54375: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; -const fs_1 = __nccwpck_require__(79896); -const getSSOTokenFilepath_1 = __nccwpck_require__(28224); -const { readFile } = fs_1.promises; -exports.tokenIntercept = {}; -const getSSOTokenFromFile = async (id) => { - if (exports.tokenIntercept[id]) { - return exports.tokenIntercept[id]; - } - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); -}; -exports.getSSOTokenFromFile = getSSOTokenFromFile; - - -/***/ }), - -/***/ 80213: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var getHomeDir = __nccwpck_require__(93715); -var getSSOTokenFilepath = __nccwpck_require__(28224); -var getSSOTokenFromFile = __nccwpck_require__(54375); -var path = __nccwpck_require__(16928); -var types = __nccwpck_require__(20873); -var slurpFile = __nccwpck_require__(96231); - -const ENV_PROFILE = "AWS_PROFILE"; -const DEFAULT_PROFILE = "default"; -const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; - -const CONFIG_PREFIX_SEPARATOR = "."; - -const getConfigData = (data) => Object.entries(data) - .filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; - } - return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}) - .reduce((acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; -}, { - ...(data.default && { default: data.default }), -}); - -const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); - -const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); - -const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -const profileNameBlockList = ["__proto__", "profile __proto__"]; -const 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(types.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; -}; - -const swallowError$1 = () => ({}); -const loadSharedConfigFiles = async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = getHomeDir.getHomeDir(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = path.join(homeDir, filepath.slice(2)); - } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); - } - const parsedFiles = await Promise.all([ - slurpFile.slurpFile(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .then(getConfigData) - .catch(swallowError$1), - slurpFile.slurpFile(resolvedFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .catch(swallowError$1), - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1], - }; -}; - -const getSsoSessionData = (data) => Object.entries(data) - .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) - .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); - -const swallowError = () => ({}); -const loadSsoSessionData = async (init = {}) => slurpFile.slurpFile(init.configFilepath ?? getConfigFilepath()) - .then(parseIni) - .then(getSsoSessionData) - .catch(swallowError); - -const 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; -}; - -const parseKnownFiles = async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); -}; - -const externalDataInterceptor = { - getFileRecord() { - return slurpFile.fileIntercept; - }, - interceptFile(path, contents) { - slurpFile.fileIntercept[path] = Promise.resolve(contents); - }, - getTokenRecord() { - return getSSOTokenFromFile.tokenIntercept; - }, - interceptToken(id, contents) { - getSSOTokenFromFile.tokenIntercept[id] = contents; - }, -}; - -Object.defineProperty(exports, "getSSOTokenFromFile", ({ - enumerable: true, - get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } -})); -exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; -exports.DEFAULT_PROFILE = DEFAULT_PROFILE; -exports.ENV_PROFILE = ENV_PROFILE; -exports.externalDataInterceptor = externalDataInterceptor; -exports.getProfileName = getProfileName; -exports.loadSharedConfigFiles = loadSharedConfigFiles; -exports.loadSsoSessionData = loadSsoSessionData; -exports.parseKnownFiles = parseKnownFiles; -Object.keys(getHomeDir).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getHomeDir[k]; } - }); -}); -Object.keys(getSSOTokenFilepath).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getSSOTokenFilepath[k]; } - }); -}); - - -/***/ }), - -/***/ 96231: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = void 0; -const fs_1 = __nccwpck_require__(79896); -const { readFile } = fs_1.promises; -exports.filePromisesHash = {}; -exports.fileIntercept = {}; -const slurpFile = (path, options) => { - if (exports.fileIntercept[path] !== undefined) { - return exports.fileIntercept[path]; - } - if (!exports.filePromisesHash[path] || options?.ignoreCache) { - exports.filePromisesHash[path] = readFile(path, "utf8"); - } - return exports.filePromisesHash[path]; -}; -exports.slurpFile = slurpFile; - - -/***/ }), - -/***/ 20873: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - -/***/ }), - -/***/ 81983: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var querystringParser = __nccwpck_require__(955); - -const parseUrl = (url) => { - if (typeof url === "string") { - return parseUrl(new URL(url)); - } - const { hostname, pathname, port, protocol, search } = url; - let query; - if (search) { - query = querystringParser.parseQueryString(search); - } - return { - hostname, - port: port ? parseInt(port) : undefined, - protocol, - path: pathname, - query, - }; -}; - -exports.parseUrl = parseUrl; - - -/***/ }), - -/***/ 17963: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(63718); -const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; -const 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 = (0, util_buffer_from_1.fromString)(input, "base64"); - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); -}; -exports.fromBase64 = fromBase64; - - -/***/ }), - -/***/ 26262: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var fromBase64 = __nccwpck_require__(17963); -var toBase64 = __nccwpck_require__(26078); - - - -Object.keys(fromBase64).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return fromBase64[k]; } - }); -}); -Object.keys(toBase64).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return toBase64[k]; } - }); -}); - - -/***/ }), - -/***/ 26078: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(63718); -const util_utf8_1 = __nccwpck_require__(21038); -const toBase64 = (_input) => { - let input; - if (typeof _input === "string") { - input = (0, util_utf8_1.fromUtf8)(_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 (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); -}; -exports.toBase64 = toBase64; - - -/***/ }), - -/***/ 63718: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var isArrayBuffer = __nccwpck_require__(95697); -var buffer = __nccwpck_require__(20181); - -const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { - if (!isArrayBuffer.isArrayBuffer(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); - } - return buffer.Buffer.from(input, offset, length); -}; -const 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.Buffer.from(input, encoding) : buffer.Buffer.from(input); -}; - -exports.fromArrayBuffer = fromArrayBuffer; -exports.fromString = fromString; - - -/***/ }), - -/***/ 27896: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const SHORT_TO_HEX = {}; -const 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; -} - -exports.fromHex = fromHex; -exports.toHex = toHex; - - -/***/ }), - -/***/ 25695: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var types = __nccwpck_require__(20873); - -const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); - -const normalizeProvider = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; -}; - -exports.getSmithyContext = getSmithyContext; -exports.normalizeProvider = normalizeProvider; - - -/***/ }), - -/***/ 73949: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ByteArrayCollector = void 0; -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; - } -} -exports.ByteArrayCollector = ByteArrayCollector; - - -/***/ }), - -/***/ 17766: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function () { }; -class ChecksumStream extends ReadableStreamRef { -} -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 36928: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(26262); -const stream_1 = __nccwpck_require__(2203); -class ChecksumStream extends stream_1.Duplex { - expectedChecksum; - checksumSourceLocation; - checksum; - source; - base64Encoder; - constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) { - super(); - if (typeof source.pipe === "function") { - this.source = source; - } - else { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); - } - this.base64Encoder = base64Encoder ?? util_base64_1.toBase64; - this.expectedChecksum = expectedChecksum; - this.checksum = checksum; - this.checksumSourceLocation = checksumSourceLocation; - this.source.pipe(this); - } - _read(size) { } - _write(chunk, encoding, callback) { - try { - this.checksum.update(chunk); - this.push(chunk); - } - catch (e) { - return callback(e); - } - return callback(); - } - async _final(callback) { - try { - const digest = await this.checksum.digest(); - const received = this.base64Encoder(digest); - if (this.expectedChecksum !== received) { - return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + - ` in response header "${this.checksumSourceLocation}".`)); - } - } - catch (e) { - return callback(e); - } - this.push(null); - return callback(); - } -} -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 77578: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(26262); -const stream_type_check_1 = __nccwpck_require__(99941); -const ChecksumStream_browser_1 = __nccwpck_require__(17766); -const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => { - if (!(0, stream_type_check_1.isReadableStream)(source)) { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); - } - const encoder = base64Encoder ?? util_base64_1.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_browser_1.ChecksumStream.prototype); - return readable; -}; -exports.createChecksumStream = createChecksumStream; - - -/***/ }), - -/***/ 37348: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = createChecksumStream; -const stream_type_check_1 = __nccwpck_require__(99941); -const ChecksumStream_1 = __nccwpck_require__(36928); -const createChecksumStream_browser_1 = __nccwpck_require__(77578); -function createChecksumStream(init) { - if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { - return (0, createChecksumStream_browser_1.createChecksumStream)(init); - } - return new ChecksumStream_1.ChecksumStream(init); -} - - -/***/ }), - -/***/ 61904: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = createBufferedReadable; -const node_stream_1 = __nccwpck_require__(57075); -const ByteArrayCollector_1 = __nccwpck_require__(73949); -const createBufferedReadableStream_1 = __nccwpck_require__(6560); -const stream_type_check_1 = __nccwpck_require__(99941); -function createBufferedReadable(upstream, size, logger) { - if ((0, stream_type_check_1.isReadableStream)(upstream)) { - return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger); - } - const downstream = new node_stream_1.Readable({ read() { } }); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = [ - "", - new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)), - new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))), - ]; - let mode = -1; - upstream.on("data", (chunk) => { - const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); - if (mode !== chunkMode) { - if (mode >= 0) { - downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - mode = chunkMode; - } - if (mode === -1) { - downstream.push(chunk); - return; - } - const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); - bytesSeen += chunkSize; - const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - downstream.push(chunk); - } - else { - const newSize = (0, createBufferedReadableStream_1.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((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - } - }); - upstream.on("end", () => { - if (mode !== -1) { - const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); - if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { - downstream.push(remainder); - } - } - downstream.push(null); - }); - return downstream; -} - - -/***/ }), - -/***/ 6560: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = void 0; -exports.createBufferedReadableStream = createBufferedReadableStream; -exports.merge = merge; -exports.flush = flush; -exports.sizeOf = sizeOf; -exports.modeOf = modeOf; -const ByteArrayCollector_1 = __nccwpck_require__(73949); -function createBufferedReadableStream(upstream, size, logger) { - const reader = upstream.getReader(); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = ["", new ByteArrayCollector_1.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, - }); -} -exports.createBufferedReadable = createBufferedReadableStream; -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; -} - - -/***/ }), - -/***/ 12285: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getAwsChunkedEncodingStream = void 0; -const stream_1 = __nccwpck_require__(2203); -const getAwsChunkedEncodingStream = (readableStream, options) => { - const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; - const checksumRequired = base64Encoder !== undefined && - checksumAlgorithmFn !== undefined && - checksumLocationName !== undefined && - streamHasher !== undefined; - const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; - const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } }); - readableStream.on("data", (data) => { - const length = bodyLengthChecker(data) || 0; - awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); - awsChunkedEncodingStream.push(data); - awsChunkedEncodingStream.push("\r\n"); - }); - readableStream.on("end", async () => { - awsChunkedEncodingStream.push(`0\r\n`); - if (checksumRequired) { - const checksum = base64Encoder(await digest); - awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); - awsChunkedEncodingStream.push(`\r\n`); - } - awsChunkedEncodingStream.push(null); - }); - return awsChunkedEncodingStream; -}; -exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; - - -/***/ }), - -/***/ 37455: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = headStream; -async function headStream(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; -} - - -/***/ }), - -/***/ 39137: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = void 0; -const stream_1 = __nccwpck_require__(2203); -const headStream_browser_1 = __nccwpck_require__(37455); -const stream_type_check_1 = __nccwpck_require__(99941); -const headStream = (stream, bytes) => { - if ((0, stream_type_check_1.isReadableStream)(stream)) { - return (0, headStream_browser_1.headStream)(stream, bytes); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - collector.limit = bytes; - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.buffers)); - resolve(bytes); - }); - }); -}; -exports.headStream = headStream; -class Collector extends stream_1.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(); - } -} - - -/***/ }), - -/***/ 71975: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilBase64 = __nccwpck_require__(26262); -var utilUtf8 = __nccwpck_require__(21038); -var ChecksumStream = __nccwpck_require__(36928); -var createChecksumStream = __nccwpck_require__(37348); -var createBufferedReadable = __nccwpck_require__(61904); -var getAwsChunkedEncodingStream = __nccwpck_require__(12285); -var headStream = __nccwpck_require__(39137); -var sdkStreamMixin = __nccwpck_require__(71396); -var splitStream = __nccwpck_require__(55379); -var streamTypeCheck = __nccwpck_require__(99941); - -class Uint8ArrayBlobAdapter extends Uint8Array { - static fromString(source, encoding = "utf-8") { - if (typeof source === "string") { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source)); - } - return Uint8ArrayBlobAdapter.mutate(utilUtf8.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 utilBase64.toBase64(this); - } - return utilUtf8.toUtf8(this); - } -} - -exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter; -Object.keys(ChecksumStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return ChecksumStream[k]; } - }); -}); -Object.keys(createChecksumStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return createChecksumStream[k]; } - }); -}); -Object.keys(createBufferedReadable).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return createBufferedReadable[k]; } - }); -}); -Object.keys(getAwsChunkedEncodingStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getAwsChunkedEncodingStream[k]; } - }); -}); -Object.keys(headStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return headStream[k]; } - }); -}); -Object.keys(sdkStreamMixin).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return sdkStreamMixin[k]; } - }); -}); -Object.keys(splitStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return splitStream[k]; } - }); -}); -Object.keys(streamTypeCheck).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return streamTypeCheck[k]; } - }); -}); - - -/***/ }), - -/***/ 64266: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const fetch_http_handler_1 = __nccwpck_require__(8540); -const util_base64_1 = __nccwpck_require__(26262); -const util_hex_encoding_1 = __nccwpck_require__(27896); -const util_utf8_1 = __nccwpck_require__(21038); -const stream_type_check_1 = __nccwpck_require__(99941); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - if (!isBlobInstance(stream) && !(0, stream_type_check_1.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); - } - transformed = true; - return await (0, fetch_http_handler_1.streamCollector)(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.\n" + - "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: transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === "base64") { - return (0, util_base64_1.toBase64)(buf); - } - else if (encoding === "hex") { - return (0, util_hex_encoding_1.toHex)(buf); - } - else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { - return (0, util_utf8_1.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); - } - transformed = true; - if (isBlobInstance(stream)) { - return blobToWebStream(stream); - } - else if ((0, stream_type_check_1.isReadableStream)(stream)) { - return stream; - } - else { - throw new Error(`Cannot transform payload to web stream, got ${stream}`); - } - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; -const isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; - - -/***/ }), - -/***/ 71396: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const node_http_handler_1 = __nccwpck_require__(11176); -const util_buffer_from_1 = __nccwpck_require__(63718); -const stream_1 = __nccwpck_require__(2203); -const sdk_stream_mixin_browser_1 = __nccwpck_require__(64266); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - if (!(stream instanceof stream_1.Readable)) { - try { - return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); - } - catch (e) { - 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 (0, node_http_handler_1.streamCollector)(stream); - }; - return Object.assign(stream, { - transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === undefined || Buffer.isEncoding(encoding)) { - return (0, util_buffer_from_1.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 stream_1.Readable.toWeb !== "function") { - throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); - } - transformed = true; - return stream_1.Readable.toWeb(stream); - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; - - -/***/ }), - -/***/ 97373: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -async function splitStream(stream) { - if (typeof stream.stream === "function") { - stream = stream.stream(); - } - const readableStream = stream; - return readableStream.tee(); -} - - -/***/ }), - -/***/ 55379: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -const stream_1 = __nccwpck_require__(2203); -const splitStream_browser_1 = __nccwpck_require__(97373); -const stream_type_check_1 = __nccwpck_require__(99941); -async function splitStream(stream) { - if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) { - return (0, splitStream_browser_1.splitStream)(stream); - } - const stream1 = new stream_1.PassThrough(); - const stream2 = new stream_1.PassThrough(); - stream.pipe(stream1); - stream.pipe(stream2); - return [stream1, stream2]; -} - - -/***/ }), - -/***/ 99941: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isBlob = exports.isReadableStream = void 0; -const isReadableStream = (stream) => typeof ReadableStream === "function" && - (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream); -exports.isReadableStream = isReadableStream; -const isBlob = (blob) => { - return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob); -}; -exports.isBlob = isBlob; - - -/***/ }), - -/***/ 5821: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); -const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; - -const escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/"); - -exports.escapeUri = escapeUri; -exports.escapeUriPath = escapeUriPath; - - -/***/ }), - -/***/ 21038: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilBufferFrom = __nccwpck_require__(63718); - -const fromUtf8 = (input) => { - const buf = utilBufferFrom.fromString(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); -}; - -const toUint8Array = (data) => { - if (typeof data === "string") { - return fromUtf8(data); - } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data); -}; - -const 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 utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); -}; - -exports.fromUtf8 = fromUtf8; -exports.toUint8Array = toUint8Array; -exports.toUtf8 = toUtf8; - - -/***/ }), - -/***/ 1367: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthSchemeConfig = exports.defaultECSHttpAuthSchemeProvider = exports.defaultECSHttpAuthSchemeParametersProvider = void 0; -const core_1 = __nccwpck_require__(91446); -const util_middleware_1 = __nccwpck_require__(30954); -const defaultECSHttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), - }; -}; -exports.defaultECSHttpAuthSchemeParametersProvider = defaultECSHttpAuthSchemeParametersProvider; -function createAwsAuthSigv4HttpAuthOption(authParameters) { - return { - schemeId: "aws.auth#sigv4", - signingProperties: { - name: "ecs", - region: authParameters.region, - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context, - }, - }), - }; -} -const defaultECSHttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - } - } - return options; -}; -exports.defaultECSHttpAuthSchemeProvider = defaultECSHttpAuthSchemeProvider; -const resolveHttpAuthSchemeConfig = (config) => { - const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); - return Object.assign(config_0, { - authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []), - }); -}; -exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; - - -/***/ }), - -/***/ 6161: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(16158); -const util_endpoints_2 = __nccwpck_require__(79674); -const ruleset_1 = __nccwpck_require__(94282); -const cache = new util_endpoints_2.EndpointCache({ - size: 50, - params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], -}); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - })); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; -util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; - - -/***/ }), - -/***/ 94282: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const s = "required", t = "fn", u = "argv", v = "ref"; -const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "String" }, i = { [s]: true, "default": false, "type": "Boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }]; -const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }, { conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ endpoint: { url: "https://ecs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ endpoint: { url: "https://ecs-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ endpoint: { url: "https://ecs.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://ecs.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; -exports.ruleSet = _data; - - -/***/ }), - -/***/ 80212: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - AccessDeniedException: () => AccessDeniedException, - AgentUpdateStatus: () => AgentUpdateStatus, - ApplicationProtocol: () => ApplicationProtocol, - AssignPublicIp: () => AssignPublicIp, - AttributeLimitExceededException: () => AttributeLimitExceededException, - AvailabilityZoneRebalancing: () => AvailabilityZoneRebalancing, - BlockedException: () => BlockedException, - CPUArchitecture: () => CPUArchitecture, - CapacityProviderField: () => CapacityProviderField, - CapacityProviderStatus: () => CapacityProviderStatus, - CapacityProviderUpdateStatus: () => CapacityProviderUpdateStatus, - ClientException: () => ClientException, - ClusterContainsContainerInstancesException: () => ClusterContainsContainerInstancesException, - ClusterContainsServicesException: () => ClusterContainsServicesException, - ClusterContainsTasksException: () => ClusterContainsTasksException, - ClusterField: () => ClusterField, - ClusterNotFoundException: () => ClusterNotFoundException, - ClusterSettingName: () => ClusterSettingName, - Compatibility: () => Compatibility, - ConflictException: () => ConflictException, - Connectivity: () => Connectivity, - ContainerCondition: () => ContainerCondition, - ContainerInstanceField: () => ContainerInstanceField, - ContainerInstanceStatus: () => ContainerInstanceStatus, - CreateCapacityProviderCommand: () => CreateCapacityProviderCommand, - CreateClusterCommand: () => CreateClusterCommand, - CreateServiceCommand: () => CreateServiceCommand, - CreateTaskSetCommand: () => CreateTaskSetCommand, - DeleteAccountSettingCommand: () => DeleteAccountSettingCommand, - DeleteAttributesCommand: () => DeleteAttributesCommand, - DeleteCapacityProviderCommand: () => DeleteCapacityProviderCommand, - DeleteClusterCommand: () => DeleteClusterCommand, - DeleteServiceCommand: () => DeleteServiceCommand, - DeleteTaskDefinitionsCommand: () => DeleteTaskDefinitionsCommand, - DeleteTaskSetCommand: () => DeleteTaskSetCommand, - DeploymentControllerType: () => DeploymentControllerType, - DeploymentLifecycleHookStage: () => DeploymentLifecycleHookStage, - DeploymentRolloutState: () => DeploymentRolloutState, - DeploymentStrategy: () => DeploymentStrategy, - DeregisterContainerInstanceCommand: () => DeregisterContainerInstanceCommand, - DeregisterTaskDefinitionCommand: () => DeregisterTaskDefinitionCommand, - DescribeCapacityProvidersCommand: () => DescribeCapacityProvidersCommand, - DescribeClustersCommand: () => DescribeClustersCommand, - DescribeContainerInstancesCommand: () => DescribeContainerInstancesCommand, - DescribeServiceDeploymentsCommand: () => DescribeServiceDeploymentsCommand, - DescribeServiceRevisionsCommand: () => DescribeServiceRevisionsCommand, - DescribeServicesCommand: () => DescribeServicesCommand, - DescribeTaskDefinitionCommand: () => DescribeTaskDefinitionCommand, - DescribeTaskSetsCommand: () => DescribeTaskSetsCommand, - DescribeTasksCommand: () => DescribeTasksCommand, - DesiredStatus: () => DesiredStatus, - DeviceCgroupPermission: () => DeviceCgroupPermission, - DiscoverPollEndpointCommand: () => DiscoverPollEndpointCommand, - EBSResourceType: () => EBSResourceType, - ECS: () => ECS, - ECSClient: () => ECSClient, - ECSServiceException: () => ECSServiceException, - EFSAuthorizationConfigIAM: () => EFSAuthorizationConfigIAM, - EFSTransitEncryption: () => EFSTransitEncryption, - EnvironmentFileType: () => EnvironmentFileType, - ExecuteCommandCommand: () => ExecuteCommandCommand, - ExecuteCommandLogging: () => ExecuteCommandLogging, - ExecuteCommandResponseFilterSensitiveLog: () => ExecuteCommandResponseFilterSensitiveLog, - FirelensConfigurationType: () => FirelensConfigurationType, - GetTaskProtectionCommand: () => GetTaskProtectionCommand, - HealthStatus: () => HealthStatus, - InstanceHealthCheckState: () => InstanceHealthCheckState, - InstanceHealthCheckType: () => InstanceHealthCheckType, - InvalidParameterException: () => InvalidParameterException, - IpcMode: () => IpcMode, - LaunchType: () => LaunchType, - LimitExceededException: () => LimitExceededException, - ListAccountSettingsCommand: () => ListAccountSettingsCommand, - ListAttributesCommand: () => ListAttributesCommand, - ListClustersCommand: () => ListClustersCommand, - ListContainerInstancesCommand: () => ListContainerInstancesCommand, - ListServiceDeploymentsCommand: () => ListServiceDeploymentsCommand, - ListServicesByNamespaceCommand: () => ListServicesByNamespaceCommand, - ListServicesCommand: () => ListServicesCommand, - ListTagsForResourceCommand: () => ListTagsForResourceCommand, - ListTaskDefinitionFamiliesCommand: () => ListTaskDefinitionFamiliesCommand, - ListTaskDefinitionsCommand: () => ListTaskDefinitionsCommand, - ListTasksCommand: () => ListTasksCommand, - LogDriver: () => LogDriver, - ManagedAgentName: () => ManagedAgentName, - ManagedDraining: () => ManagedDraining, - ManagedScalingStatus: () => ManagedScalingStatus, - ManagedTerminationProtection: () => ManagedTerminationProtection, - MissingVersionException: () => MissingVersionException, - NamespaceNotFoundException: () => NamespaceNotFoundException, - NetworkMode: () => NetworkMode, - NoUpdateAvailableException: () => NoUpdateAvailableException, - OSFamily: () => OSFamily, - PidMode: () => PidMode, - PlacementConstraintType: () => PlacementConstraintType, - PlacementStrategyType: () => PlacementStrategyType, - PlatformDeviceType: () => PlatformDeviceType, - PlatformTaskDefinitionIncompatibilityException: () => PlatformTaskDefinitionIncompatibilityException, - PlatformUnknownException: () => PlatformUnknownException, - PropagateTags: () => PropagateTags, - ProxyConfigurationType: () => ProxyConfigurationType, - PutAccountSettingCommand: () => PutAccountSettingCommand, - PutAccountSettingDefaultCommand: () => PutAccountSettingDefaultCommand, - PutAttributesCommand: () => PutAttributesCommand, - PutClusterCapacityProvidersCommand: () => PutClusterCapacityProvidersCommand, - RegisterContainerInstanceCommand: () => RegisterContainerInstanceCommand, - RegisterTaskDefinitionCommand: () => RegisterTaskDefinitionCommand, - ResourceInUseException: () => ResourceInUseException, - ResourceNotFoundException: () => ResourceNotFoundException, - ResourceType: () => ResourceType, - RunTaskCommand: () => RunTaskCommand, - ScaleUnit: () => ScaleUnit, - SchedulingStrategy: () => SchedulingStrategy, - Scope: () => Scope, - ServerException: () => ServerException, - ServiceDeploymentLifecycleStage: () => ServiceDeploymentLifecycleStage, - ServiceDeploymentNotFoundException: () => ServiceDeploymentNotFoundException, - ServiceDeploymentRollbackMonitorsStatus: () => ServiceDeploymentRollbackMonitorsStatus, - ServiceDeploymentStatus: () => ServiceDeploymentStatus, - ServiceField: () => ServiceField, - ServiceNotActiveException: () => ServiceNotActiveException, - ServiceNotFoundException: () => ServiceNotFoundException, - SessionFilterSensitiveLog: () => SessionFilterSensitiveLog, - SettingName: () => SettingName, - SettingType: () => SettingType, - SortOrder: () => SortOrder, - StabilityStatus: () => StabilityStatus, - StartTaskCommand: () => StartTaskCommand, - StopServiceDeploymentCommand: () => StopServiceDeploymentCommand, - StopServiceDeploymentStopType: () => StopServiceDeploymentStopType, - StopTaskCommand: () => StopTaskCommand, - SubmitAttachmentStateChangesCommand: () => SubmitAttachmentStateChangesCommand, - SubmitContainerStateChangeCommand: () => SubmitContainerStateChangeCommand, - SubmitTaskStateChangeCommand: () => SubmitTaskStateChangeCommand, - TagResourceCommand: () => TagResourceCommand, - TargetNotConnectedException: () => TargetNotConnectedException, - TargetNotFoundException: () => TargetNotFoundException, - TargetType: () => TargetType, - TaskDefinitionFamilyStatus: () => TaskDefinitionFamilyStatus, - TaskDefinitionField: () => TaskDefinitionField, - TaskDefinitionPlacementConstraintType: () => TaskDefinitionPlacementConstraintType, - TaskDefinitionStatus: () => TaskDefinitionStatus, - TaskField: () => TaskField, - TaskFilesystemType: () => TaskFilesystemType, - TaskSetField: () => TaskSetField, - TaskSetNotFoundException: () => TaskSetNotFoundException, - TaskStopCode: () => TaskStopCode, - TransportProtocol: () => TransportProtocol, - UlimitName: () => UlimitName, - UnsupportedFeatureException: () => UnsupportedFeatureException, - UntagResourceCommand: () => UntagResourceCommand, - UpdateCapacityProviderCommand: () => UpdateCapacityProviderCommand, - UpdateClusterCommand: () => UpdateClusterCommand, - UpdateClusterSettingsCommand: () => UpdateClusterSettingsCommand, - UpdateContainerAgentCommand: () => UpdateContainerAgentCommand, - UpdateContainerInstancesStateCommand: () => UpdateContainerInstancesStateCommand, - UpdateInProgressException: () => UpdateInProgressException, - UpdateServiceCommand: () => UpdateServiceCommand, - UpdateServicePrimaryTaskSetCommand: () => UpdateServicePrimaryTaskSetCommand, - UpdateTaskProtectionCommand: () => UpdateTaskProtectionCommand, - UpdateTaskSetCommand: () => UpdateTaskSetCommand, - VersionConsistency: () => VersionConsistency, - __Client: () => import_smithy_client.Client, - paginateListAccountSettings: () => paginateListAccountSettings, - paginateListAttributes: () => paginateListAttributes, - paginateListClusters: () => paginateListClusters, - paginateListContainerInstances: () => paginateListContainerInstances, - paginateListServices: () => paginateListServices, - paginateListServicesByNamespace: () => paginateListServicesByNamespace, - paginateListTaskDefinitionFamilies: () => paginateListTaskDefinitionFamilies, - paginateListTaskDefinitions: () => paginateListTaskDefinitions, - paginateListTasks: () => paginateListTasks, - waitForServicesInactive: () => waitForServicesInactive, - waitForServicesStable: () => waitForServicesStable, - waitForTasksRunning: () => waitForTasksRunning, - waitForTasksStopped: () => waitForTasksStopped, - waitUntilServicesInactive: () => waitUntilServicesInactive, - waitUntilServicesStable: () => waitUntilServicesStable, - waitUntilTasksRunning: () => waitUntilTasksRunning, - waitUntilTasksStopped: () => waitUntilTasksStopped -}); -module.exports = __toCommonJS(index_exports); - -// src/ECSClient.ts -var import_middleware_host_header = __nccwpck_require__(25164); -var import_middleware_logger = __nccwpck_require__(65832); -var import_middleware_recursion_detection = __nccwpck_require__(39870); -var import_middleware_user_agent = __nccwpck_require__(70997); -var import_config_resolver = __nccwpck_require__(39316); -var import_core = __nccwpck_require__(22744); -var import_middleware_content_length = __nccwpck_require__(47212); -var import_middleware_endpoint = __nccwpck_require__(88205); -var import_middleware_retry = __nccwpck_require__(19618); - -var import_httpAuthSchemeProvider = __nccwpck_require__(1367); - -// src/endpoint/EndpointParameters.ts -var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "ecs" - }); -}, "resolveClientEndpointParameters"); -var commonParams = { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } -}; - -// src/ECSClient.ts -var import_runtimeConfig = __nccwpck_require__(41142); - -// src/runtimeExtensions.ts -var import_region_config_resolver = __nccwpck_require__(26521); -var import_protocol_http = __nccwpck_require__(13494); -var import_smithy_client = __nccwpck_require__(61411); - -// src/auth/httpAuthExtensionConfiguration.ts -var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((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; - } - }; -}, "getHttpAuthExtensionConfiguration"); -var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - credentials: config.credentials() - }; -}, "resolveHttpAuthRuntimeConfig"); - -// src/runtimeExtensions.ts -var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign( - (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), - (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), - (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), - getHttpAuthExtensionConfiguration(runtimeConfig) - ); - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign( - runtimeConfig, - (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), - resolveHttpAuthRuntimeConfig(extensionConfiguration) - ); -}, "resolveRuntimeExtensions"); - -// src/ECSClient.ts -var ECSClient = class extends import_smithy_client.Client { - static { - __name(this, "ECSClient"); - } - /** - * The resolved configuration of ECSClient class. This is resolved and normalized from the {@link ECSClientConfig | constructor configuration interface}. - */ - config; - constructor(...[configuration]) { - const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); - super(_config_0); - this.initConfig = _config_0; - const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); - const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2); - const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); - const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); - const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); - const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); - this.config = _config_8; - this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use( - (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { - httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultECSHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config.credentials - }), "identityProviderConfigProvider") - }) - ); - this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); - } - /** - * Destroy underlying resources, like sockets. It's usually not necessary to do this. - * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. - * Otherwise, sockets might stay open for quite a long time before the server terminates them. - */ - destroy() { - super.destroy(); - } -}; - -// src/ECS.ts - - -// src/commands/CreateCapacityProviderCommand.ts - -var import_middleware_serde = __nccwpck_require__(58305); - - -// src/protocols/Aws_json1_1.ts -var import_core2 = __nccwpck_require__(91446); - - -var import_uuid = __nccwpck_require__(12048); - -// src/models/ECSServiceException.ts - -var ECSServiceException = class _ECSServiceException extends import_smithy_client.ServiceException { - static { - __name(this, "ECSServiceException"); - } - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _ECSServiceException.prototype); - } -}; - -// src/models/models_0.ts - -var AccessDeniedException = class _AccessDeniedException extends ECSServiceException { - static { - __name(this, "AccessDeniedException"); - } - name = "AccessDeniedException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "AccessDeniedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _AccessDeniedException.prototype); - } -}; -var AgentUpdateStatus = { - FAILED: "FAILED", - PENDING: "PENDING", - STAGED: "STAGED", - STAGING: "STAGING", - UPDATED: "UPDATED", - UPDATING: "UPDATING" -}; -var ClientException = class _ClientException extends ECSServiceException { - static { - __name(this, "ClientException"); - } - name = "ClientException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ClientException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ClientException.prototype); - } -}; -var ManagedDraining = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var ManagedScalingStatus = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var ManagedTerminationProtection = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var CapacityProviderStatus = { - ACTIVE: "ACTIVE", - INACTIVE: "INACTIVE" -}; -var CapacityProviderUpdateStatus = { - DELETE_COMPLETE: "DELETE_COMPLETE", - DELETE_FAILED: "DELETE_FAILED", - DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", - UPDATE_COMPLETE: "UPDATE_COMPLETE", - UPDATE_FAILED: "UPDATE_FAILED", - UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS" -}; -var InvalidParameterException = class _InvalidParameterException extends ECSServiceException { - static { - __name(this, "InvalidParameterException"); - } - name = "InvalidParameterException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidParameterException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidParameterException.prototype); - } -}; -var LimitExceededException = class _LimitExceededException extends ECSServiceException { - static { - __name(this, "LimitExceededException"); - } - name = "LimitExceededException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "LimitExceededException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _LimitExceededException.prototype); - } -}; -var ServerException = class _ServerException extends ECSServiceException { - static { - __name(this, "ServerException"); - } - name = "ServerException"; - $fault = "server"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ServerException", - $fault: "server", - ...opts - }); - Object.setPrototypeOf(this, _ServerException.prototype); - } -}; -var UpdateInProgressException = class _UpdateInProgressException extends ECSServiceException { - static { - __name(this, "UpdateInProgressException"); - } - name = "UpdateInProgressException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "UpdateInProgressException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _UpdateInProgressException.prototype); - } -}; -var ExecuteCommandLogging = { - DEFAULT: "DEFAULT", - NONE: "NONE", - OVERRIDE: "OVERRIDE" -}; -var ClusterSettingName = { - CONTAINER_INSIGHTS: "containerInsights" -}; -var NamespaceNotFoundException = class _NamespaceNotFoundException extends ECSServiceException { - static { - __name(this, "NamespaceNotFoundException"); - } - name = "NamespaceNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "NamespaceNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _NamespaceNotFoundException.prototype); - } -}; -var ClusterNotFoundException = class _ClusterNotFoundException extends ECSServiceException { - static { - __name(this, "ClusterNotFoundException"); - } - name = "ClusterNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ClusterNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ClusterNotFoundException.prototype); - } -}; -var AvailabilityZoneRebalancing = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var DeploymentLifecycleHookStage = { - POST_PRODUCTION_TRAFFIC_SHIFT: "POST_PRODUCTION_TRAFFIC_SHIFT", - POST_SCALE_UP: "POST_SCALE_UP", - POST_TEST_TRAFFIC_SHIFT: "POST_TEST_TRAFFIC_SHIFT", - PRE_SCALE_UP: "PRE_SCALE_UP", - PRODUCTION_TRAFFIC_SHIFT: "PRODUCTION_TRAFFIC_SHIFT", - RECONCILE_SERVICE: "RECONCILE_SERVICE", - TEST_TRAFFIC_SHIFT: "TEST_TRAFFIC_SHIFT" -}; -var DeploymentStrategy = { - BLUE_GREEN: "BLUE_GREEN", - ROLLING: "ROLLING" -}; -var DeploymentControllerType = { - CODE_DEPLOY: "CODE_DEPLOY", - ECS: "ECS", - EXTERNAL: "EXTERNAL" -}; -var LaunchType = { - EC2: "EC2", - EXTERNAL: "EXTERNAL", - FARGATE: "FARGATE" -}; -var AssignPublicIp = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var PlacementConstraintType = { - DISTINCT_INSTANCE: "distinctInstance", - MEMBER_OF: "memberOf" -}; -var PlacementStrategyType = { - BINPACK: "binpack", - RANDOM: "random", - SPREAD: "spread" -}; -var PropagateTags = { - NONE: "NONE", - SERVICE: "SERVICE", - TASK_DEFINITION: "TASK_DEFINITION" -}; -var SchedulingStrategy = { - DAEMON: "DAEMON", - REPLICA: "REPLICA" -}; -var LogDriver = { - AWSFIRELENS: "awsfirelens", - AWSLOGS: "awslogs", - FLUENTD: "fluentd", - GELF: "gelf", - JOURNALD: "journald", - JSON_FILE: "json-file", - SPLUNK: "splunk", - SYSLOG: "syslog" -}; -var TaskFilesystemType = { - EXT3: "ext3", - EXT4: "ext4", - NTFS: "ntfs", - XFS: "xfs" -}; -var EBSResourceType = { - VOLUME: "volume" -}; -var DeploymentRolloutState = { - COMPLETED: "COMPLETED", - FAILED: "FAILED", - IN_PROGRESS: "IN_PROGRESS" -}; -var ScaleUnit = { - PERCENT: "PERCENT" -}; -var StabilityStatus = { - STABILIZING: "STABILIZING", - STEADY_STATE: "STEADY_STATE" -}; -var PlatformTaskDefinitionIncompatibilityException = class _PlatformTaskDefinitionIncompatibilityException extends ECSServiceException { - static { - __name(this, "PlatformTaskDefinitionIncompatibilityException"); - } - name = "PlatformTaskDefinitionIncompatibilityException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "PlatformTaskDefinitionIncompatibilityException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _PlatformTaskDefinitionIncompatibilityException.prototype); - } -}; -var PlatformUnknownException = class _PlatformUnknownException extends ECSServiceException { - static { - __name(this, "PlatformUnknownException"); - } - name = "PlatformUnknownException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "PlatformUnknownException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _PlatformUnknownException.prototype); - } -}; -var UnsupportedFeatureException = class _UnsupportedFeatureException extends ECSServiceException { - static { - __name(this, "UnsupportedFeatureException"); - } - name = "UnsupportedFeatureException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "UnsupportedFeatureException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _UnsupportedFeatureException.prototype); - } -}; -var ServiceNotActiveException = class _ServiceNotActiveException extends ECSServiceException { - static { - __name(this, "ServiceNotActiveException"); - } - name = "ServiceNotActiveException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ServiceNotActiveException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ServiceNotActiveException.prototype); - } -}; -var ServiceNotFoundException = class _ServiceNotFoundException extends ECSServiceException { - static { - __name(this, "ServiceNotFoundException"); - } - name = "ServiceNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ServiceNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ServiceNotFoundException.prototype); - } -}; -var SettingName = { - AWSVPC_TRUNKING: "awsvpcTrunking", - CONTAINER_INSIGHTS: "containerInsights", - CONTAINER_INSTANCE_LONG_ARN_FORMAT: "containerInstanceLongArnFormat", - DEFAULT_LOG_DRIVER_MODE: "defaultLogDriverMode", - FARGATE_FIPS_MODE: "fargateFIPSMode", - FARGATE_TASK_RETIREMENT_WAIT_PERIOD: "fargateTaskRetirementWaitPeriod", - GUARD_DUTY_ACTIVATE: "guardDutyActivate", - SERVICE_LONG_ARN_FORMAT: "serviceLongArnFormat", - TAG_RESOURCE_AUTHORIZATION: "tagResourceAuthorization", - TASK_LONG_ARN_FORMAT: "taskLongArnFormat" -}; -var SettingType = { - AWS_MANAGED: "aws_managed", - USER: "user" -}; -var TargetType = { - CONTAINER_INSTANCE: "container-instance" -}; -var TargetNotFoundException = class _TargetNotFoundException extends ECSServiceException { - static { - __name(this, "TargetNotFoundException"); - } - name = "TargetNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TargetNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TargetNotFoundException.prototype); - } -}; -var ClusterContainsContainerInstancesException = class _ClusterContainsContainerInstancesException extends ECSServiceException { - static { - __name(this, "ClusterContainsContainerInstancesException"); - } - name = "ClusterContainsContainerInstancesException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ClusterContainsContainerInstancesException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ClusterContainsContainerInstancesException.prototype); - } -}; -var ClusterContainsServicesException = class _ClusterContainsServicesException extends ECSServiceException { - static { - __name(this, "ClusterContainsServicesException"); - } - name = "ClusterContainsServicesException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ClusterContainsServicesException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ClusterContainsServicesException.prototype); - } -}; -var ClusterContainsTasksException = class _ClusterContainsTasksException extends ECSServiceException { - static { - __name(this, "ClusterContainsTasksException"); - } - name = "ClusterContainsTasksException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ClusterContainsTasksException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ClusterContainsTasksException.prototype); - } -}; -var Compatibility = { - EC2: "EC2", - EXTERNAL: "EXTERNAL", - FARGATE: "FARGATE" -}; -var ContainerCondition = { - COMPLETE: "COMPLETE", - HEALTHY: "HEALTHY", - START: "START", - SUCCESS: "SUCCESS" -}; -var EnvironmentFileType = { - S3: "s3" -}; -var FirelensConfigurationType = { - FLUENTBIT: "fluentbit", - FLUENTD: "fluentd" -}; -var DeviceCgroupPermission = { - MKNOD: "mknod", - READ: "read", - WRITE: "write" -}; -var ApplicationProtocol = { - GRPC: "grpc", - HTTP: "http", - HTTP2: "http2" -}; -var TransportProtocol = { - TCP: "tcp", - UDP: "udp" -}; -var ResourceType = { - GPU: "GPU", - INFERENCE_ACCELERATOR: "InferenceAccelerator" -}; -var UlimitName = { - CORE: "core", - CPU: "cpu", - DATA: "data", - FSIZE: "fsize", - LOCKS: "locks", - MEMLOCK: "memlock", - MSGQUEUE: "msgqueue", - NICE: "nice", - NOFILE: "nofile", - NPROC: "nproc", - RSS: "rss", - RTPRIO: "rtprio", - RTTIME: "rttime", - SIGPENDING: "sigpending", - STACK: "stack" -}; -var VersionConsistency = { - DISABLED: "disabled", - ENABLED: "enabled" -}; -var IpcMode = { - HOST: "host", - NONE: "none", - TASK: "task" -}; -var NetworkMode = { - AWSVPC: "awsvpc", - BRIDGE: "bridge", - HOST: "host", - NONE: "none" -}; -var PidMode = { - HOST: "host", - TASK: "task" -}; -var TaskDefinitionPlacementConstraintType = { - MEMBER_OF: "memberOf" -}; -var ProxyConfigurationType = { - APPMESH: "APPMESH" -}; -var CPUArchitecture = { - ARM64: "ARM64", - X86_64: "X86_64" -}; -var OSFamily = { - LINUX: "LINUX", - WINDOWS_SERVER_2004_CORE: "WINDOWS_SERVER_2004_CORE", - WINDOWS_SERVER_2016_FULL: "WINDOWS_SERVER_2016_FULL", - WINDOWS_SERVER_2019_CORE: "WINDOWS_SERVER_2019_CORE", - WINDOWS_SERVER_2019_FULL: "WINDOWS_SERVER_2019_FULL", - WINDOWS_SERVER_2022_CORE: "WINDOWS_SERVER_2022_CORE", - WINDOWS_SERVER_2022_FULL: "WINDOWS_SERVER_2022_FULL", - WINDOWS_SERVER_2025_CORE: "WINDOWS_SERVER_2025_CORE", - WINDOWS_SERVER_2025_FULL: "WINDOWS_SERVER_2025_FULL", - WINDOWS_SERVER_20H2_CORE: "WINDOWS_SERVER_20H2_CORE" -}; -var TaskDefinitionStatus = { - ACTIVE: "ACTIVE", - DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", - INACTIVE: "INACTIVE" -}; -var Scope = { - SHARED: "shared", - TASK: "task" -}; -var EFSAuthorizationConfigIAM = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var EFSTransitEncryption = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var TaskSetNotFoundException = class _TaskSetNotFoundException extends ECSServiceException { - static { - __name(this, "TaskSetNotFoundException"); - } - name = "TaskSetNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TaskSetNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TaskSetNotFoundException.prototype); - } -}; -var InstanceHealthCheckState = { - IMPAIRED: "IMPAIRED", - INITIALIZING: "INITIALIZING", - INSUFFICIENT_DATA: "INSUFFICIENT_DATA", - OK: "OK" -}; -var InstanceHealthCheckType = { - CONTAINER_RUNTIME: "CONTAINER_RUNTIME" -}; -var CapacityProviderField = { - TAGS: "TAGS" -}; -var ClusterField = { - ATTACHMENTS: "ATTACHMENTS", - CONFIGURATIONS: "CONFIGURATIONS", - SETTINGS: "SETTINGS", - STATISTICS: "STATISTICS", - TAGS: "TAGS" -}; -var ContainerInstanceField = { - CONTAINER_INSTANCE_HEALTH: "CONTAINER_INSTANCE_HEALTH", - TAGS: "TAGS" -}; -var ServiceDeploymentRollbackMonitorsStatus = { - DISABLED: "DISABLED", - MONITORING: "MONITORING", - MONITORING_COMPLETE: "MONITORING_COMPLETE", - TRIGGERED: "TRIGGERED" -}; -var ServiceDeploymentLifecycleStage = { - BAKE_TIME: "BAKE_TIME", - CLEAN_UP: "CLEAN_UP", - POST_PRODUCTION_TRAFFIC_SHIFT: "POST_PRODUCTION_TRAFFIC_SHIFT", - POST_SCALE_UP: "POST_SCALE_UP", - POST_TEST_TRAFFIC_SHIFT: "POST_TEST_TRAFFIC_SHIFT", - PRE_SCALE_UP: "PRE_SCALE_UP", - PRODUCTION_TRAFFIC_SHIFT: "PRODUCTION_TRAFFIC_SHIFT", - RECONCILE_SERVICE: "RECONCILE_SERVICE", - SCALE_UP: "SCALE_UP", - TEST_TRAFFIC_SHIFT: "TEST_TRAFFIC_SHIFT" -}; -var ServiceDeploymentStatus = { - IN_PROGRESS: "IN_PROGRESS", - PENDING: "PENDING", - ROLLBACK_FAILED: "ROLLBACK_FAILED", - ROLLBACK_IN_PROGRESS: "ROLLBACK_IN_PROGRESS", - ROLLBACK_REQUESTED: "ROLLBACK_REQUESTED", - ROLLBACK_SUCCESSFUL: "ROLLBACK_SUCCESSFUL", - STOPPED: "STOPPED", - STOP_REQUESTED: "STOP_REQUESTED", - SUCCESSFUL: "SUCCESSFUL" -}; -var ServiceField = { - TAGS: "TAGS" -}; -var TaskDefinitionField = { - TAGS: "TAGS" -}; -var TaskField = { - TAGS: "TAGS" -}; -var Connectivity = { - CONNECTED: "CONNECTED", - DISCONNECTED: "DISCONNECTED" -}; -var HealthStatus = { - HEALTHY: "HEALTHY", - UNHEALTHY: "UNHEALTHY", - UNKNOWN: "UNKNOWN" -}; -var ManagedAgentName = { - ExecuteCommandAgent: "ExecuteCommandAgent" -}; -var TaskStopCode = { - ESSENTIAL_CONTAINER_EXITED: "EssentialContainerExited", - SERVICE_SCHEDULER_INITIATED: "ServiceSchedulerInitiated", - SPOT_INTERRUPTION: "SpotInterruption", - TASK_FAILED_TO_START: "TaskFailedToStart", - TERMINATION_NOTICE: "TerminationNotice", - USER_INITIATED: "UserInitiated" -}; -var TaskSetField = { - TAGS: "TAGS" -}; -var TargetNotConnectedException = class _TargetNotConnectedException extends ECSServiceException { - static { - __name(this, "TargetNotConnectedException"); - } - name = "TargetNotConnectedException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TargetNotConnectedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TargetNotConnectedException.prototype); - } -}; -var ResourceNotFoundException = class _ResourceNotFoundException extends ECSServiceException { - static { - __name(this, "ResourceNotFoundException"); - } - name = "ResourceNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); - } -}; -var ContainerInstanceStatus = { - ACTIVE: "ACTIVE", - DEREGISTERING: "DEREGISTERING", - DRAINING: "DRAINING", - REGISTERING: "REGISTERING", - REGISTRATION_FAILED: "REGISTRATION_FAILED" -}; -var TaskDefinitionFamilyStatus = { - ACTIVE: "ACTIVE", - ALL: "ALL", - INACTIVE: "INACTIVE" -}; -var SortOrder = { - ASC: "ASC", - DESC: "DESC" -}; -var DesiredStatus = { - PENDING: "PENDING", - RUNNING: "RUNNING", - STOPPED: "STOPPED" -}; -var AttributeLimitExceededException = class _AttributeLimitExceededException extends ECSServiceException { - static { - __name(this, "AttributeLimitExceededException"); - } - name = "AttributeLimitExceededException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "AttributeLimitExceededException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _AttributeLimitExceededException.prototype); - } -}; -var ResourceInUseException = class _ResourceInUseException extends ECSServiceException { - static { - __name(this, "ResourceInUseException"); - } - name = "ResourceInUseException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceInUseException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceInUseException.prototype); - } -}; -var PlatformDeviceType = { - GPU: "GPU" -}; -var BlockedException = class _BlockedException extends ECSServiceException { - static { - __name(this, "BlockedException"); - } - name = "BlockedException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "BlockedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _BlockedException.prototype); - } -}; -var ConflictException = class _ConflictException extends ECSServiceException { - static { - __name(this, "ConflictException"); - } - name = "ConflictException"; - $fault = "client"; - /** - *

The existing task ARNs which are already associated with the - * clientToken.

- * @public - */ - resourceIds; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ConflictException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ConflictException.prototype); - this.resourceIds = opts.resourceIds; - } -}; -var ServiceDeploymentNotFoundException = class _ServiceDeploymentNotFoundException extends ECSServiceException { - static { - __name(this, "ServiceDeploymentNotFoundException"); - } - name = "ServiceDeploymentNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ServiceDeploymentNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ServiceDeploymentNotFoundException.prototype); - } -}; -var StopServiceDeploymentStopType = { - ABORT: "ABORT", - ROLLBACK: "ROLLBACK" -}; -var SessionFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.tokenValue && { tokenValue: import_smithy_client.SENSITIVE_STRING } -}), "SessionFilterSensitiveLog"); -var ExecuteCommandResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.session && { session: SessionFilterSensitiveLog(obj.session) } -}), "ExecuteCommandResponseFilterSensitiveLog"); - -// src/models/models_1.ts -var MissingVersionException = class _MissingVersionException extends ECSServiceException { - static { - __name(this, "MissingVersionException"); - } - name = "MissingVersionException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "MissingVersionException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _MissingVersionException.prototype); - } -}; -var NoUpdateAvailableException = class _NoUpdateAvailableException extends ECSServiceException { - static { - __name(this, "NoUpdateAvailableException"); - } - name = "NoUpdateAvailableException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "NoUpdateAvailableException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _NoUpdateAvailableException.prototype); - } -}; - -// src/protocols/Aws_json1_1.ts -var se_CreateCapacityProviderCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateCapacityProvider"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateCapacityProviderCommand"); -var se_CreateClusterCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateCluster"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateClusterCommand"); -var se_CreateServiceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateService"); - let body; - body = JSON.stringify(se_CreateServiceRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateServiceCommand"); -var se_CreateTaskSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateTaskSet"); - let body; - body = JSON.stringify(se_CreateTaskSetRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateTaskSetCommand"); -var se_DeleteAccountSettingCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteAccountSetting"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteAccountSettingCommand"); -var se_DeleteAttributesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteAttributes"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteAttributesCommand"); -var se_DeleteCapacityProviderCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteCapacityProvider"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteCapacityProviderCommand"); -var se_DeleteClusterCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteCluster"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteClusterCommand"); -var se_DeleteServiceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteService"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteServiceCommand"); -var se_DeleteTaskDefinitionsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteTaskDefinitions"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteTaskDefinitionsCommand"); -var se_DeleteTaskSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteTaskSet"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteTaskSetCommand"); -var se_DeregisterContainerInstanceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeregisterContainerInstance"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeregisterContainerInstanceCommand"); -var se_DeregisterTaskDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeregisterTaskDefinition"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeregisterTaskDefinitionCommand"); -var se_DescribeCapacityProvidersCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeCapacityProviders"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeCapacityProvidersCommand"); -var se_DescribeClustersCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeClusters"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeClustersCommand"); -var se_DescribeContainerInstancesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeContainerInstances"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeContainerInstancesCommand"); -var se_DescribeServiceDeploymentsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeServiceDeployments"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeServiceDeploymentsCommand"); -var se_DescribeServiceRevisionsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeServiceRevisions"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeServiceRevisionsCommand"); -var se_DescribeServicesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeServices"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeServicesCommand"); -var se_DescribeTaskDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeTaskDefinition"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeTaskDefinitionCommand"); -var se_DescribeTasksCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeTasks"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeTasksCommand"); -var se_DescribeTaskSetsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeTaskSets"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeTaskSetsCommand"); -var se_DiscoverPollEndpointCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DiscoverPollEndpoint"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DiscoverPollEndpointCommand"); -var se_ExecuteCommandCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ExecuteCommand"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ExecuteCommandCommand"); -var se_GetTaskProtectionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetTaskProtection"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetTaskProtectionCommand"); -var se_ListAccountSettingsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListAccountSettings"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListAccountSettingsCommand"); -var se_ListAttributesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListAttributes"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListAttributesCommand"); -var se_ListClustersCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListClusters"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListClustersCommand"); -var se_ListContainerInstancesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListContainerInstances"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListContainerInstancesCommand"); -var se_ListServiceDeploymentsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListServiceDeployments"); - let body; - body = JSON.stringify(se_ListServiceDeploymentsRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListServiceDeploymentsCommand"); -var se_ListServicesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListServices"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListServicesCommand"); -var se_ListServicesByNamespaceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListServicesByNamespace"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListServicesByNamespaceCommand"); -var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListTagsForResource"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTagsForResourceCommand"); -var se_ListTaskDefinitionFamiliesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListTaskDefinitionFamilies"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTaskDefinitionFamiliesCommand"); -var se_ListTaskDefinitionsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListTaskDefinitions"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTaskDefinitionsCommand"); -var se_ListTasksCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListTasks"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTasksCommand"); -var se_PutAccountSettingCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutAccountSetting"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutAccountSettingCommand"); -var se_PutAccountSettingDefaultCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutAccountSettingDefault"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutAccountSettingDefaultCommand"); -var se_PutAttributesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutAttributes"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutAttributesCommand"); -var se_PutClusterCapacityProvidersCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutClusterCapacityProviders"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutClusterCapacityProvidersCommand"); -var se_RegisterContainerInstanceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("RegisterContainerInstance"); - let body; - body = JSON.stringify(se_RegisterContainerInstanceRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_RegisterContainerInstanceCommand"); -var se_RegisterTaskDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("RegisterTaskDefinition"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_RegisterTaskDefinitionCommand"); -var se_RunTaskCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("RunTask"); - let body; - body = JSON.stringify(se_RunTaskRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_RunTaskCommand"); -var se_StartTaskCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("StartTask"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_StartTaskCommand"); -var se_StopServiceDeploymentCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("StopServiceDeployment"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_StopServiceDeploymentCommand"); -var se_StopTaskCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("StopTask"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_StopTaskCommand"); -var se_SubmitAttachmentStateChangesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("SubmitAttachmentStateChanges"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_SubmitAttachmentStateChangesCommand"); -var se_SubmitContainerStateChangeCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("SubmitContainerStateChange"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_SubmitContainerStateChangeCommand"); -var se_SubmitTaskStateChangeCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("SubmitTaskStateChange"); - let body; - body = JSON.stringify(se_SubmitTaskStateChangeRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_SubmitTaskStateChangeCommand"); -var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("TagResource"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_TagResourceCommand"); -var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UntagResource"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UntagResourceCommand"); -var se_UpdateCapacityProviderCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateCapacityProvider"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateCapacityProviderCommand"); -var se_UpdateClusterCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateCluster"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateClusterCommand"); -var se_UpdateClusterSettingsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateClusterSettings"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateClusterSettingsCommand"); -var se_UpdateContainerAgentCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateContainerAgent"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateContainerAgentCommand"); -var se_UpdateContainerInstancesStateCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateContainerInstancesState"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateContainerInstancesStateCommand"); -var se_UpdateServiceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateService"); - let body; - body = JSON.stringify(se_UpdateServiceRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateServiceCommand"); -var se_UpdateServicePrimaryTaskSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateServicePrimaryTaskSet"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateServicePrimaryTaskSetCommand"); -var se_UpdateTaskProtectionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateTaskProtection"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateTaskProtectionCommand"); -var se_UpdateTaskSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateTaskSet"); - let body; - body = JSON.stringify(se_UpdateTaskSetRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateTaskSetCommand"); -var de_CreateCapacityProviderCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateCapacityProviderCommand"); -var de_CreateClusterCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateClusterCommand"); -var de_CreateServiceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_CreateServiceResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateServiceCommand"); -var de_CreateTaskSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_CreateTaskSetResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateTaskSetCommand"); -var de_DeleteAccountSettingCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteAccountSettingCommand"); -var de_DeleteAttributesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteAttributesCommand"); -var de_DeleteCapacityProviderCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteCapacityProviderCommand"); -var de_DeleteClusterCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteClusterCommand"); -var de_DeleteServiceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DeleteServiceResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteServiceCommand"); -var de_DeleteTaskDefinitionsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DeleteTaskDefinitionsResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteTaskDefinitionsCommand"); -var de_DeleteTaskSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DeleteTaskSetResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteTaskSetCommand"); -var de_DeregisterContainerInstanceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DeregisterContainerInstanceResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeregisterContainerInstanceCommand"); -var de_DeregisterTaskDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DeregisterTaskDefinitionResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeregisterTaskDefinitionCommand"); -var de_DescribeCapacityProvidersCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeCapacityProvidersCommand"); -var de_DescribeClustersCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeClustersCommand"); -var de_DescribeContainerInstancesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeContainerInstancesResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeContainerInstancesCommand"); -var de_DescribeServiceDeploymentsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeServiceDeploymentsResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeServiceDeploymentsCommand"); -var de_DescribeServiceRevisionsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeServiceRevisionsResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeServiceRevisionsCommand"); -var de_DescribeServicesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeServicesResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeServicesCommand"); -var de_DescribeTaskDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeTaskDefinitionResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeTaskDefinitionCommand"); -var de_DescribeTasksCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeTasksResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeTasksCommand"); -var de_DescribeTaskSetsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeTaskSetsResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeTaskSetsCommand"); -var de_DiscoverPollEndpointCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DiscoverPollEndpointCommand"); -var de_ExecuteCommandCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ExecuteCommandCommand"); -var de_GetTaskProtectionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_GetTaskProtectionResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetTaskProtectionCommand"); -var de_ListAccountSettingsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListAccountSettingsCommand"); -var de_ListAttributesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListAttributesCommand"); -var de_ListClustersCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListClustersCommand"); -var de_ListContainerInstancesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListContainerInstancesCommand"); -var de_ListServiceDeploymentsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_ListServiceDeploymentsResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListServiceDeploymentsCommand"); -var de_ListServicesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListServicesCommand"); -var de_ListServicesByNamespaceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListServicesByNamespaceCommand"); -var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTagsForResourceCommand"); -var de_ListTaskDefinitionFamiliesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTaskDefinitionFamiliesCommand"); -var de_ListTaskDefinitionsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTaskDefinitionsCommand"); -var de_ListTasksCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTasksCommand"); -var de_PutAccountSettingCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutAccountSettingCommand"); -var de_PutAccountSettingDefaultCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutAccountSettingDefaultCommand"); -var de_PutAttributesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutAttributesCommand"); -var de_PutClusterCapacityProvidersCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutClusterCapacityProvidersCommand"); -var de_RegisterContainerInstanceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_RegisterContainerInstanceResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_RegisterContainerInstanceCommand"); -var de_RegisterTaskDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_RegisterTaskDefinitionResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_RegisterTaskDefinitionCommand"); -var de_RunTaskCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_RunTaskResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_RunTaskCommand"); -var de_StartTaskCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_StartTaskResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_StartTaskCommand"); -var de_StopServiceDeploymentCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_StopServiceDeploymentCommand"); -var de_StopTaskCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_StopTaskResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_StopTaskCommand"); -var de_SubmitAttachmentStateChangesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_SubmitAttachmentStateChangesCommand"); -var de_SubmitContainerStateChangeCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_SubmitContainerStateChangeCommand"); -var de_SubmitTaskStateChangeCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_SubmitTaskStateChangeCommand"); -var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_TagResourceCommand"); -var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UntagResourceCommand"); -var de_UpdateCapacityProviderCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateCapacityProviderCommand"); -var de_UpdateClusterCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateClusterCommand"); -var de_UpdateClusterSettingsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateClusterSettingsCommand"); -var de_UpdateContainerAgentCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_UpdateContainerAgentResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateContainerAgentCommand"); -var de_UpdateContainerInstancesStateCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_UpdateContainerInstancesStateResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateContainerInstancesStateCommand"); -var de_UpdateServiceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_UpdateServiceResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateServiceCommand"); -var de_UpdateServicePrimaryTaskSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_UpdateServicePrimaryTaskSetResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateServicePrimaryTaskSetCommand"); -var de_UpdateTaskProtectionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_UpdateTaskProtectionResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateTaskProtectionCommand"); -var de_UpdateTaskSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_UpdateTaskSetResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateTaskSetCommand"); -var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonErrorBody)(output.body, context) - }; - const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); - switch (errorCode) { - case "ClientException": - case "com.amazonaws.ecs#ClientException": - throw await de_ClientExceptionRes(parsedOutput, context); - case "InvalidParameterException": - case "com.amazonaws.ecs#InvalidParameterException": - throw await de_InvalidParameterExceptionRes(parsedOutput, context); - case "LimitExceededException": - case "com.amazonaws.ecs#LimitExceededException": - throw await de_LimitExceededExceptionRes(parsedOutput, context); - case "ServerException": - case "com.amazonaws.ecs#ServerException": - throw await de_ServerExceptionRes(parsedOutput, context); - case "UpdateInProgressException": - case "com.amazonaws.ecs#UpdateInProgressException": - throw await de_UpdateInProgressExceptionRes(parsedOutput, context); - case "NamespaceNotFoundException": - case "com.amazonaws.ecs#NamespaceNotFoundException": - throw await de_NamespaceNotFoundExceptionRes(parsedOutput, context); - case "AccessDeniedException": - case "com.amazonaws.ecs#AccessDeniedException": - throw await de_AccessDeniedExceptionRes(parsedOutput, context); - case "ClusterNotFoundException": - case "com.amazonaws.ecs#ClusterNotFoundException": - throw await de_ClusterNotFoundExceptionRes(parsedOutput, context); - case "PlatformTaskDefinitionIncompatibilityException": - case "com.amazonaws.ecs#PlatformTaskDefinitionIncompatibilityException": - throw await de_PlatformTaskDefinitionIncompatibilityExceptionRes(parsedOutput, context); - case "PlatformUnknownException": - case "com.amazonaws.ecs#PlatformUnknownException": - throw await de_PlatformUnknownExceptionRes(parsedOutput, context); - case "UnsupportedFeatureException": - case "com.amazonaws.ecs#UnsupportedFeatureException": - throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context); - case "ServiceNotActiveException": - case "com.amazonaws.ecs#ServiceNotActiveException": - throw await de_ServiceNotActiveExceptionRes(parsedOutput, context); - case "ServiceNotFoundException": - case "com.amazonaws.ecs#ServiceNotFoundException": - throw await de_ServiceNotFoundExceptionRes(parsedOutput, context); - case "TargetNotFoundException": - case "com.amazonaws.ecs#TargetNotFoundException": - throw await de_TargetNotFoundExceptionRes(parsedOutput, context); - case "ClusterContainsContainerInstancesException": - case "com.amazonaws.ecs#ClusterContainsContainerInstancesException": - throw await de_ClusterContainsContainerInstancesExceptionRes(parsedOutput, context); - case "ClusterContainsServicesException": - case "com.amazonaws.ecs#ClusterContainsServicesException": - throw await de_ClusterContainsServicesExceptionRes(parsedOutput, context); - case "ClusterContainsTasksException": - case "com.amazonaws.ecs#ClusterContainsTasksException": - throw await de_ClusterContainsTasksExceptionRes(parsedOutput, context); - case "TaskSetNotFoundException": - case "com.amazonaws.ecs#TaskSetNotFoundException": - throw await de_TaskSetNotFoundExceptionRes(parsedOutput, context); - case "TargetNotConnectedException": - case "com.amazonaws.ecs#TargetNotConnectedException": - throw await de_TargetNotConnectedExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.ecs#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "AttributeLimitExceededException": - case "com.amazonaws.ecs#AttributeLimitExceededException": - throw await de_AttributeLimitExceededExceptionRes(parsedOutput, context); - case "ResourceInUseException": - case "com.amazonaws.ecs#ResourceInUseException": - throw await de_ResourceInUseExceptionRes(parsedOutput, context); - case "BlockedException": - case "com.amazonaws.ecs#BlockedException": - throw await de_BlockedExceptionRes(parsedOutput, context); - case "ConflictException": - case "com.amazonaws.ecs#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); - case "ServiceDeploymentNotFoundException": - case "com.amazonaws.ecs#ServiceDeploymentNotFoundException": - throw await de_ServiceDeploymentNotFoundExceptionRes(parsedOutput, context); - case "MissingVersionException": - case "com.amazonaws.ecs#MissingVersionException": - throw await de_MissingVersionExceptionRes(parsedOutput, context); - case "NoUpdateAvailableException": - case "com.amazonaws.ecs#NoUpdateAvailableException": - throw await de_NoUpdateAvailableExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } -}, "de_CommandError"); -var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new AccessDeniedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_AccessDeniedExceptionRes"); -var de_AttributeLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new AttributeLimitExceededException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_AttributeLimitExceededExceptionRes"); -var de_BlockedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new BlockedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_BlockedExceptionRes"); -var de_ClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ClientException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ClientExceptionRes"); -var de_ClusterContainsContainerInstancesExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ClusterContainsContainerInstancesException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ClusterContainsContainerInstancesExceptionRes"); -var de_ClusterContainsServicesExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ClusterContainsServicesException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ClusterContainsServicesExceptionRes"); -var de_ClusterContainsTasksExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ClusterContainsTasksException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ClusterContainsTasksExceptionRes"); -var de_ClusterNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ClusterNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ClusterNotFoundExceptionRes"); -var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ConflictException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ConflictExceptionRes"); -var de_InvalidParameterExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new InvalidParameterException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_InvalidParameterExceptionRes"); -var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new LimitExceededException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_LimitExceededExceptionRes"); -var de_MissingVersionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new MissingVersionException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_MissingVersionExceptionRes"); -var de_NamespaceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new NamespaceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_NamespaceNotFoundExceptionRes"); -var de_NoUpdateAvailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new NoUpdateAvailableException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_NoUpdateAvailableExceptionRes"); -var de_PlatformTaskDefinitionIncompatibilityExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new PlatformTaskDefinitionIncompatibilityException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_PlatformTaskDefinitionIncompatibilityExceptionRes"); -var de_PlatformUnknownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new PlatformUnknownException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_PlatformUnknownExceptionRes"); -var de_ResourceInUseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ResourceInUseException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ResourceInUseExceptionRes"); -var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ResourceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ResourceNotFoundExceptionRes"); -var de_ServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ServerException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ServerExceptionRes"); -var de_ServiceDeploymentNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ServiceDeploymentNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ServiceDeploymentNotFoundExceptionRes"); -var de_ServiceNotActiveExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ServiceNotActiveException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ServiceNotActiveExceptionRes"); -var de_ServiceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ServiceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ServiceNotFoundExceptionRes"); -var de_TargetNotConnectedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new TargetNotConnectedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_TargetNotConnectedExceptionRes"); -var de_TargetNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new TargetNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_TargetNotFoundExceptionRes"); -var de_TaskSetNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new TaskSetNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_TaskSetNotFoundExceptionRes"); -var de_UnsupportedFeatureExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new UnsupportedFeatureException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_UnsupportedFeatureExceptionRes"); -var de_UpdateInProgressExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new UpdateInProgressException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_UpdateInProgressExceptionRes"); -var se_CreatedAt = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - after: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "after"), - before: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "before") - }); -}, "se_CreatedAt"); -var se_CreateServiceRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - availabilityZoneRebalancing: [], - capacityProviderStrategy: import_smithy_client._json, - clientToken: [], - cluster: [], - deploymentConfiguration: /* @__PURE__ */ __name((_) => se_DeploymentConfiguration(_, context), "deploymentConfiguration"), - deploymentController: import_smithy_client._json, - desiredCount: [], - enableECSManagedTags: [], - enableExecuteCommand: [], - healthCheckGracePeriodSeconds: [], - launchType: [], - loadBalancers: import_smithy_client._json, - networkConfiguration: import_smithy_client._json, - placementConstraints: import_smithy_client._json, - placementStrategy: import_smithy_client._json, - platformVersion: [], - propagateTags: [], - role: [], - schedulingStrategy: [], - serviceConnectConfiguration: import_smithy_client._json, - serviceName: [], - serviceRegistries: import_smithy_client._json, - tags: import_smithy_client._json, - taskDefinition: [], - volumeConfigurations: import_smithy_client._json, - vpcLatticeConfigurations: import_smithy_client._json - }); -}, "se_CreateServiceRequest"); -var se_CreateTaskSetRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - capacityProviderStrategy: import_smithy_client._json, - clientToken: [], - cluster: [], - externalId: [], - launchType: [], - loadBalancers: import_smithy_client._json, - networkConfiguration: import_smithy_client._json, - platformVersion: [], - scale: /* @__PURE__ */ __name((_) => se_Scale(_, context), "scale"), - service: [], - serviceRegistries: import_smithy_client._json, - tags: import_smithy_client._json, - taskDefinition: [] - }); -}, "se_CreateTaskSetRequest"); -var se_DeploymentConfiguration = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - alarms: import_smithy_client._json, - bakeTimeInMinutes: [], - deploymentCircuitBreaker: import_smithy_client._json, - lifecycleHooks: /* @__PURE__ */ __name((_) => se_DeploymentLifecycleHookList(_, context), "lifecycleHooks"), - maximumPercent: [], - minimumHealthyPercent: [], - strategy: [] - }); -}, "se_DeploymentConfiguration"); -var se_DeploymentLifecycleHook = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - hookDetails: /* @__PURE__ */ __name((_) => se_HookDetails(_, context), "hookDetails"), - hookTargetArn: [], - lifecycleStages: import_smithy_client._json, - roleArn: [] - }); -}, "se_DeploymentLifecycleHook"); -var se_DeploymentLifecycleHookList = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - return se_DeploymentLifecycleHook(entry, context); - }); -}, "se_DeploymentLifecycleHookList"); -var se_HookDetails = /* @__PURE__ */ __name((input, context) => { - return input; -}, "se_HookDetails"); -var se_ListServiceDeploymentsRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - cluster: [], - createdAt: /* @__PURE__ */ __name((_) => se_CreatedAt(_, context), "createdAt"), - maxResults: [], - nextToken: [], - service: [], - status: import_smithy_client._json - }); -}, "se_ListServiceDeploymentsRequest"); -var se_RegisterContainerInstanceRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - attributes: import_smithy_client._json, - cluster: [], - containerInstanceArn: [], - instanceIdentityDocument: [], - instanceIdentityDocumentSignature: [], - platformDevices: import_smithy_client._json, - tags: import_smithy_client._json, - totalResources: /* @__PURE__ */ __name((_) => se_Resources(_, context), "totalResources"), - versionInfo: import_smithy_client._json - }); -}, "se_RegisterContainerInstanceRequest"); -var se_Resource = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - doubleValue: import_smithy_client.serializeFloat, - integerValue: [], - longValue: [], - name: [], - stringSetValue: import_smithy_client._json, - type: [] - }); -}, "se_Resource"); -var se_Resources = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - return se_Resource(entry, context); - }); -}, "se_Resources"); -var se_RunTaskRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - capacityProviderStrategy: import_smithy_client._json, - clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()], - cluster: [], - count: [], - enableECSManagedTags: [], - enableExecuteCommand: [], - group: [], - launchType: [], - networkConfiguration: import_smithy_client._json, - overrides: import_smithy_client._json, - placementConstraints: import_smithy_client._json, - placementStrategy: import_smithy_client._json, - platformVersion: [], - propagateTags: [], - referenceId: [], - startedBy: [], - tags: import_smithy_client._json, - taskDefinition: [], - volumeConfigurations: import_smithy_client._json - }); -}, "se_RunTaskRequest"); -var se_Scale = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - unit: [], - value: import_smithy_client.serializeFloat - }); -}, "se_Scale"); -var se_SubmitTaskStateChangeRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - attachments: import_smithy_client._json, - cluster: [], - containers: import_smithy_client._json, - executionStoppedAt: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "executionStoppedAt"), - managedAgents: import_smithy_client._json, - pullStartedAt: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "pullStartedAt"), - pullStoppedAt: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "pullStoppedAt"), - reason: [], - status: [], - task: [] - }); -}, "se_SubmitTaskStateChangeRequest"); -var se_UpdateServiceRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - availabilityZoneRebalancing: [], - capacityProviderStrategy: import_smithy_client._json, - cluster: [], - deploymentConfiguration: /* @__PURE__ */ __name((_) => se_DeploymentConfiguration(_, context), "deploymentConfiguration"), - deploymentController: import_smithy_client._json, - desiredCount: [], - enableECSManagedTags: [], - enableExecuteCommand: [], - forceNewDeployment: [], - healthCheckGracePeriodSeconds: [], - loadBalancers: import_smithy_client._json, - networkConfiguration: import_smithy_client._json, - placementConstraints: import_smithy_client._json, - placementStrategy: import_smithy_client._json, - platformVersion: [], - propagateTags: [], - service: [], - serviceConnectConfiguration: import_smithy_client._json, - serviceRegistries: import_smithy_client._json, - taskDefinition: [], - volumeConfigurations: import_smithy_client._json, - vpcLatticeConfigurations: import_smithy_client._json - }); -}, "se_UpdateServiceRequest"); -var se_UpdateTaskSetRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - cluster: [], - scale: /* @__PURE__ */ __name((_) => se_Scale(_, context), "scale"), - service: [], - taskSet: [] - }); -}, "se_UpdateTaskSetRequest"); -var de_Container = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - containerArn: import_smithy_client.expectString, - cpu: import_smithy_client.expectString, - exitCode: import_smithy_client.expectInt32, - gpuIds: import_smithy_client._json, - healthStatus: import_smithy_client.expectString, - image: import_smithy_client.expectString, - imageDigest: import_smithy_client.expectString, - lastStatus: import_smithy_client.expectString, - managedAgents: /* @__PURE__ */ __name((_) => de_ManagedAgents(_, context), "managedAgents"), - memory: import_smithy_client.expectString, - memoryReservation: import_smithy_client.expectString, - name: import_smithy_client.expectString, - networkBindings: import_smithy_client._json, - networkInterfaces: import_smithy_client._json, - reason: import_smithy_client.expectString, - runtimeId: import_smithy_client.expectString, - taskArn: import_smithy_client.expectString - }); -}, "de_Container"); -var de_ContainerInstance = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - agentConnected: import_smithy_client.expectBoolean, - agentUpdateStatus: import_smithy_client.expectString, - attachments: import_smithy_client._json, - attributes: import_smithy_client._json, - capacityProviderName: import_smithy_client.expectString, - containerInstanceArn: import_smithy_client.expectString, - ec2InstanceId: import_smithy_client.expectString, - healthStatus: /* @__PURE__ */ __name((_) => de_ContainerInstanceHealthStatus(_, context), "healthStatus"), - pendingTasksCount: import_smithy_client.expectInt32, - registeredAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "registeredAt"), - registeredResources: /* @__PURE__ */ __name((_) => de_Resources(_, context), "registeredResources"), - remainingResources: /* @__PURE__ */ __name((_) => de_Resources(_, context), "remainingResources"), - runningTasksCount: import_smithy_client.expectInt32, - status: import_smithy_client.expectString, - statusReason: import_smithy_client.expectString, - tags: import_smithy_client._json, - version: import_smithy_client.expectLong, - versionInfo: import_smithy_client._json - }); -}, "de_ContainerInstance"); -var de_ContainerInstanceHealthStatus = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - details: /* @__PURE__ */ __name((_) => de_InstanceHealthCheckResultList(_, context), "details"), - overallStatus: import_smithy_client.expectString - }); -}, "de_ContainerInstanceHealthStatus"); -var de_ContainerInstances = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ContainerInstance(entry, context); - }); - return retVal; -}, "de_ContainerInstances"); -var de_Containers = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_Container(entry, context); - }); - return retVal; -}, "de_Containers"); -var de_CreateServiceResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - service: /* @__PURE__ */ __name((_) => de_Service(_, context), "service") - }); -}, "de_CreateServiceResponse"); -var de_CreateTaskSetResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - taskSet: /* @__PURE__ */ __name((_) => de_TaskSet(_, context), "taskSet") - }); -}, "de_CreateTaskSetResponse"); -var de_DeleteServiceResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - service: /* @__PURE__ */ __name((_) => de_Service(_, context), "service") - }); -}, "de_DeleteServiceResponse"); -var de_DeleteTaskDefinitionsResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - taskDefinitions: /* @__PURE__ */ __name((_) => de_TaskDefinitionList(_, context), "taskDefinitions") - }); -}, "de_DeleteTaskDefinitionsResponse"); -var de_DeleteTaskSetResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - taskSet: /* @__PURE__ */ __name((_) => de_TaskSet(_, context), "taskSet") - }); -}, "de_DeleteTaskSetResponse"); -var de_Deployment = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - capacityProviderStrategy: import_smithy_client._json, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - desiredCount: import_smithy_client.expectInt32, - failedTasks: import_smithy_client.expectInt32, - fargateEphemeralStorage: import_smithy_client._json, - id: import_smithy_client.expectString, - launchType: import_smithy_client.expectString, - networkConfiguration: import_smithy_client._json, - pendingCount: import_smithy_client.expectInt32, - platformFamily: import_smithy_client.expectString, - platformVersion: import_smithy_client.expectString, - rolloutState: import_smithy_client.expectString, - rolloutStateReason: import_smithy_client.expectString, - runningCount: import_smithy_client.expectInt32, - serviceConnectConfiguration: import_smithy_client._json, - serviceConnectResources: import_smithy_client._json, - status: import_smithy_client.expectString, - taskDefinition: import_smithy_client.expectString, - updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt"), - volumeConfigurations: import_smithy_client._json, - vpcLatticeConfigurations: import_smithy_client._json - }); -}, "de_Deployment"); -var de_DeploymentConfiguration = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - alarms: import_smithy_client._json, - bakeTimeInMinutes: import_smithy_client.expectInt32, - deploymentCircuitBreaker: import_smithy_client._json, - lifecycleHooks: /* @__PURE__ */ __name((_) => de_DeploymentLifecycleHookList(_, context), "lifecycleHooks"), - maximumPercent: import_smithy_client.expectInt32, - minimumHealthyPercent: import_smithy_client.expectInt32, - strategy: import_smithy_client.expectString - }); -}, "de_DeploymentConfiguration"); -var de_DeploymentLifecycleHook = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - hookDetails: /* @__PURE__ */ __name((_) => de_HookDetails(_, context), "hookDetails"), - hookTargetArn: import_smithy_client.expectString, - lifecycleStages: import_smithy_client._json, - roleArn: import_smithy_client.expectString - }); -}, "de_DeploymentLifecycleHook"); -var de_DeploymentLifecycleHookList = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_DeploymentLifecycleHook(entry, context); - }); - return retVal; -}, "de_DeploymentLifecycleHookList"); -var de_Deployments = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_Deployment(entry, context); - }); - return retVal; -}, "de_Deployments"); -var de_DeregisterContainerInstanceResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - containerInstance: /* @__PURE__ */ __name((_) => de_ContainerInstance(_, context), "containerInstance") - }); -}, "de_DeregisterContainerInstanceResponse"); -var de_DeregisterTaskDefinitionResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - taskDefinition: /* @__PURE__ */ __name((_) => de_TaskDefinition(_, context), "taskDefinition") - }); -}, "de_DeregisterTaskDefinitionResponse"); -var de_DescribeContainerInstancesResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - containerInstances: /* @__PURE__ */ __name((_) => de_ContainerInstances(_, context), "containerInstances"), - failures: import_smithy_client._json - }); -}, "de_DescribeContainerInstancesResponse"); -var de_DescribeServiceDeploymentsResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - serviceDeployments: /* @__PURE__ */ __name((_) => de_ServiceDeployments(_, context), "serviceDeployments") - }); -}, "de_DescribeServiceDeploymentsResponse"); -var de_DescribeServiceRevisionsResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - serviceRevisions: /* @__PURE__ */ __name((_) => de_ServiceRevisions(_, context), "serviceRevisions") - }); -}, "de_DescribeServiceRevisionsResponse"); -var de_DescribeServicesResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - services: /* @__PURE__ */ __name((_) => de_Services(_, context), "services") - }); -}, "de_DescribeServicesResponse"); -var de_DescribeTaskDefinitionResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - tags: import_smithy_client._json, - taskDefinition: /* @__PURE__ */ __name((_) => de_TaskDefinition(_, context), "taskDefinition") - }); -}, "de_DescribeTaskDefinitionResponse"); -var de_DescribeTaskSetsResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - taskSets: /* @__PURE__ */ __name((_) => de_TaskSets(_, context), "taskSets") - }); -}, "de_DescribeTaskSetsResponse"); -var de_DescribeTasksResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - tasks: /* @__PURE__ */ __name((_) => de_Tasks(_, context), "tasks") - }); -}, "de_DescribeTasksResponse"); -var de_GetTaskProtectionResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - protectedTasks: /* @__PURE__ */ __name((_) => de_ProtectedTasks(_, context), "protectedTasks") - }); -}, "de_GetTaskProtectionResponse"); -var de_HookDetails = /* @__PURE__ */ __name((output, context) => { - return output; -}, "de_HookDetails"); -var de_InstanceHealthCheckResult = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - lastStatusChange: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "lastStatusChange"), - lastUpdated: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "lastUpdated"), - status: import_smithy_client.expectString, - type: import_smithy_client.expectString - }); -}, "de_InstanceHealthCheckResult"); -var de_InstanceHealthCheckResultList = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_InstanceHealthCheckResult(entry, context); - }); - return retVal; -}, "de_InstanceHealthCheckResultList"); -var de_ListServiceDeploymentsResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - nextToken: import_smithy_client.expectString, - serviceDeployments: /* @__PURE__ */ __name((_) => de_ServiceDeploymentsBrief(_, context), "serviceDeployments") - }); -}, "de_ListServiceDeploymentsResponse"); -var de_ManagedAgent = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - lastStartedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "lastStartedAt"), - lastStatus: import_smithy_client.expectString, - name: import_smithy_client.expectString, - reason: import_smithy_client.expectString - }); -}, "de_ManagedAgent"); -var de_ManagedAgents = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ManagedAgent(entry, context); - }); - return retVal; -}, "de_ManagedAgents"); -var de_ProtectedTask = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - expirationDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "expirationDate"), - protectionEnabled: import_smithy_client.expectBoolean, - taskArn: import_smithy_client.expectString - }); -}, "de_ProtectedTask"); -var de_ProtectedTasks = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ProtectedTask(entry, context); - }); - return retVal; -}, "de_ProtectedTasks"); -var de_RegisterContainerInstanceResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - containerInstance: /* @__PURE__ */ __name((_) => de_ContainerInstance(_, context), "containerInstance") - }); -}, "de_RegisterContainerInstanceResponse"); -var de_RegisterTaskDefinitionResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - tags: import_smithy_client._json, - taskDefinition: /* @__PURE__ */ __name((_) => de_TaskDefinition(_, context), "taskDefinition") - }); -}, "de_RegisterTaskDefinitionResponse"); -var de_Resource = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - doubleValue: import_smithy_client.limitedParseDouble, - integerValue: import_smithy_client.expectInt32, - longValue: import_smithy_client.expectLong, - name: import_smithy_client.expectString, - stringSetValue: import_smithy_client._json, - type: import_smithy_client.expectString - }); -}, "de_Resource"); -var de_Resources = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_Resource(entry, context); - }); - return retVal; -}, "de_Resources"); -var de_Rollback = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - reason: import_smithy_client.expectString, - serviceRevisionArn: import_smithy_client.expectString, - startedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startedAt") - }); -}, "de_Rollback"); -var de_RunTaskResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - tasks: /* @__PURE__ */ __name((_) => de_Tasks(_, context), "tasks") - }); -}, "de_RunTaskResponse"); -var de_Scale = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - unit: import_smithy_client.expectString, - value: import_smithy_client.limitedParseDouble - }); -}, "de_Scale"); -var de_Service = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - availabilityZoneRebalancing: import_smithy_client.expectString, - capacityProviderStrategy: import_smithy_client._json, - clusterArn: import_smithy_client.expectString, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - createdBy: import_smithy_client.expectString, - deploymentConfiguration: /* @__PURE__ */ __name((_) => de_DeploymentConfiguration(_, context), "deploymentConfiguration"), - deploymentController: import_smithy_client._json, - deployments: /* @__PURE__ */ __name((_) => de_Deployments(_, context), "deployments"), - desiredCount: import_smithy_client.expectInt32, - enableECSManagedTags: import_smithy_client.expectBoolean, - enableExecuteCommand: import_smithy_client.expectBoolean, - events: /* @__PURE__ */ __name((_) => de_ServiceEvents(_, context), "events"), - healthCheckGracePeriodSeconds: import_smithy_client.expectInt32, - launchType: import_smithy_client.expectString, - loadBalancers: import_smithy_client._json, - networkConfiguration: import_smithy_client._json, - pendingCount: import_smithy_client.expectInt32, - placementConstraints: import_smithy_client._json, - placementStrategy: import_smithy_client._json, - platformFamily: import_smithy_client.expectString, - platformVersion: import_smithy_client.expectString, - propagateTags: import_smithy_client.expectString, - roleArn: import_smithy_client.expectString, - runningCount: import_smithy_client.expectInt32, - schedulingStrategy: import_smithy_client.expectString, - serviceArn: import_smithy_client.expectString, - serviceName: import_smithy_client.expectString, - serviceRegistries: import_smithy_client._json, - status: import_smithy_client.expectString, - tags: import_smithy_client._json, - taskDefinition: import_smithy_client.expectString, - taskSets: /* @__PURE__ */ __name((_) => de_TaskSets(_, context), "taskSets") - }); -}, "de_Service"); -var de_ServiceDeployment = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - alarms: import_smithy_client._json, - clusterArn: import_smithy_client.expectString, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - deploymentCircuitBreaker: import_smithy_client._json, - deploymentConfiguration: /* @__PURE__ */ __name((_) => de_DeploymentConfiguration(_, context), "deploymentConfiguration"), - finishedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "finishedAt"), - lifecycleStage: import_smithy_client.expectString, - rollback: /* @__PURE__ */ __name((_) => de_Rollback(_, context), "rollback"), - serviceArn: import_smithy_client.expectString, - serviceDeploymentArn: import_smithy_client.expectString, - sourceServiceRevisions: import_smithy_client._json, - startedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startedAt"), - status: import_smithy_client.expectString, - statusReason: import_smithy_client.expectString, - stoppedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "stoppedAt"), - targetServiceRevision: import_smithy_client._json, - updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt") - }); -}, "de_ServiceDeployment"); -var de_ServiceDeploymentBrief = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - clusterArn: import_smithy_client.expectString, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - finishedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "finishedAt"), - serviceArn: import_smithy_client.expectString, - serviceDeploymentArn: import_smithy_client.expectString, - startedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startedAt"), - status: import_smithy_client.expectString, - statusReason: import_smithy_client.expectString, - targetServiceRevisionArn: import_smithy_client.expectString - }); -}, "de_ServiceDeploymentBrief"); -var de_ServiceDeployments = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ServiceDeployment(entry, context); - }); - return retVal; -}, "de_ServiceDeployments"); -var de_ServiceDeploymentsBrief = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ServiceDeploymentBrief(entry, context); - }); - return retVal; -}, "de_ServiceDeploymentsBrief"); -var de_ServiceEvent = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - id: import_smithy_client.expectString, - message: import_smithy_client.expectString - }); -}, "de_ServiceEvent"); -var de_ServiceEvents = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ServiceEvent(entry, context); - }); - return retVal; -}, "de_ServiceEvents"); -var de_ServiceRevision = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - capacityProviderStrategy: import_smithy_client._json, - clusterArn: import_smithy_client.expectString, - containerImages: import_smithy_client._json, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - fargateEphemeralStorage: import_smithy_client._json, - guardDutyEnabled: import_smithy_client.expectBoolean, - launchType: import_smithy_client.expectString, - loadBalancers: import_smithy_client._json, - networkConfiguration: import_smithy_client._json, - platformFamily: import_smithy_client.expectString, - platformVersion: import_smithy_client.expectString, - resolvedConfiguration: import_smithy_client._json, - serviceArn: import_smithy_client.expectString, - serviceConnectConfiguration: import_smithy_client._json, - serviceRegistries: import_smithy_client._json, - serviceRevisionArn: import_smithy_client.expectString, - taskDefinition: import_smithy_client.expectString, - volumeConfigurations: import_smithy_client._json, - vpcLatticeConfigurations: import_smithy_client._json - }); -}, "de_ServiceRevision"); -var de_ServiceRevisions = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ServiceRevision(entry, context); - }); - return retVal; -}, "de_ServiceRevisions"); -var de_Services = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_Service(entry, context); - }); - return retVal; -}, "de_Services"); -var de_StartTaskResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - tasks: /* @__PURE__ */ __name((_) => de_Tasks(_, context), "tasks") - }); -}, "de_StartTaskResponse"); -var de_StopTaskResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - task: /* @__PURE__ */ __name((_) => de_Task(_, context), "task") - }); -}, "de_StopTaskResponse"); -var de_Task = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - attachments: import_smithy_client._json, - attributes: import_smithy_client._json, - availabilityZone: import_smithy_client.expectString, - capacityProviderName: import_smithy_client.expectString, - clusterArn: import_smithy_client.expectString, - connectivity: import_smithy_client.expectString, - connectivityAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "connectivityAt"), - containerInstanceArn: import_smithy_client.expectString, - containers: /* @__PURE__ */ __name((_) => de_Containers(_, context), "containers"), - cpu: import_smithy_client.expectString, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - desiredStatus: import_smithy_client.expectString, - enableExecuteCommand: import_smithy_client.expectBoolean, - ephemeralStorage: import_smithy_client._json, - executionStoppedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "executionStoppedAt"), - fargateEphemeralStorage: import_smithy_client._json, - group: import_smithy_client.expectString, - healthStatus: import_smithy_client.expectString, - inferenceAccelerators: import_smithy_client._json, - lastStatus: import_smithy_client.expectString, - launchType: import_smithy_client.expectString, - memory: import_smithy_client.expectString, - overrides: import_smithy_client._json, - platformFamily: import_smithy_client.expectString, - platformVersion: import_smithy_client.expectString, - pullStartedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "pullStartedAt"), - pullStoppedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "pullStoppedAt"), - startedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startedAt"), - startedBy: import_smithy_client.expectString, - stopCode: import_smithy_client.expectString, - stoppedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "stoppedAt"), - stoppedReason: import_smithy_client.expectString, - stoppingAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "stoppingAt"), - tags: import_smithy_client._json, - taskArn: import_smithy_client.expectString, - taskDefinitionArn: import_smithy_client.expectString, - version: import_smithy_client.expectLong - }); -}, "de_Task"); -var de_TaskDefinition = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - compatibilities: import_smithy_client._json, - containerDefinitions: import_smithy_client._json, - cpu: import_smithy_client.expectString, - deregisteredAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "deregisteredAt"), - enableFaultInjection: import_smithy_client.expectBoolean, - ephemeralStorage: import_smithy_client._json, - executionRoleArn: import_smithy_client.expectString, - family: import_smithy_client.expectString, - inferenceAccelerators: import_smithy_client._json, - ipcMode: import_smithy_client.expectString, - memory: import_smithy_client.expectString, - networkMode: import_smithy_client.expectString, - pidMode: import_smithy_client.expectString, - placementConstraints: import_smithy_client._json, - proxyConfiguration: import_smithy_client._json, - registeredAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "registeredAt"), - registeredBy: import_smithy_client.expectString, - requiresAttributes: import_smithy_client._json, - requiresCompatibilities: import_smithy_client._json, - revision: import_smithy_client.expectInt32, - runtimePlatform: import_smithy_client._json, - status: import_smithy_client.expectString, - taskDefinitionArn: import_smithy_client.expectString, - taskRoleArn: import_smithy_client.expectString, - volumes: import_smithy_client._json - }); -}, "de_TaskDefinition"); -var de_TaskDefinitionList = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_TaskDefinition(entry, context); - }); - return retVal; -}, "de_TaskDefinitionList"); -var de_Tasks = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_Task(entry, context); - }); - return retVal; -}, "de_Tasks"); -var de_TaskSet = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - capacityProviderStrategy: import_smithy_client._json, - clusterArn: import_smithy_client.expectString, - computedDesiredCount: import_smithy_client.expectInt32, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - externalId: import_smithy_client.expectString, - fargateEphemeralStorage: import_smithy_client._json, - id: import_smithy_client.expectString, - launchType: import_smithy_client.expectString, - loadBalancers: import_smithy_client._json, - networkConfiguration: import_smithy_client._json, - pendingCount: import_smithy_client.expectInt32, - platformFamily: import_smithy_client.expectString, - platformVersion: import_smithy_client.expectString, - runningCount: import_smithy_client.expectInt32, - scale: /* @__PURE__ */ __name((_) => de_Scale(_, context), "scale"), - serviceArn: import_smithy_client.expectString, - serviceRegistries: import_smithy_client._json, - stabilityStatus: import_smithy_client.expectString, - stabilityStatusAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "stabilityStatusAt"), - startedBy: import_smithy_client.expectString, - status: import_smithy_client.expectString, - tags: import_smithy_client._json, - taskDefinition: import_smithy_client.expectString, - taskSetArn: import_smithy_client.expectString, - updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt") - }); -}, "de_TaskSet"); -var de_TaskSets = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_TaskSet(entry, context); - }); - return retVal; -}, "de_TaskSets"); -var de_UpdateContainerAgentResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - containerInstance: /* @__PURE__ */ __name((_) => de_ContainerInstance(_, context), "containerInstance") - }); -}, "de_UpdateContainerAgentResponse"); -var de_UpdateContainerInstancesStateResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - containerInstances: /* @__PURE__ */ __name((_) => de_ContainerInstances(_, context), "containerInstances"), - failures: import_smithy_client._json - }); -}, "de_UpdateContainerInstancesStateResponse"); -var de_UpdateServicePrimaryTaskSetResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - taskSet: /* @__PURE__ */ __name((_) => de_TaskSet(_, context), "taskSet") - }); -}, "de_UpdateServicePrimaryTaskSetResponse"); -var de_UpdateServiceResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - service: /* @__PURE__ */ __name((_) => de_Service(_, context), "service") - }); -}, "de_UpdateServiceResponse"); -var de_UpdateTaskProtectionResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - protectedTasks: /* @__PURE__ */ __name((_) => de_ProtectedTasks(_, context), "protectedTasks") - }); -}, "de_UpdateTaskProtectionResponse"); -var de_UpdateTaskSetResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - taskSet: /* @__PURE__ */ __name((_) => de_TaskSet(_, context), "taskSet") - }); -}, "de_UpdateTaskSetResponse"); -var deserializeMetadata = /* @__PURE__ */ __name((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"] -}), "deserializeMetadata"); -var throwDefaultError = (0, import_smithy_client.withBaseException)(ECSServiceException); -var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers - }; - if (resolvedHostname !== void 0) { - contents.hostname = resolvedHostname; - } - if (body !== void 0) { - contents.body = body; - } - return new import_protocol_http.HttpRequest(contents); -}, "buildHttpRpcRequest"); -function sharedHeaders(operation) { - return { - "content-type": "application/x-amz-json-1.1", - "x-amz-target": `AmazonEC2ContainerServiceV20141113.${operation}` - }; -} -__name(sharedHeaders, "sharedHeaders"); - -// src/commands/CreateCapacityProviderCommand.ts -var CreateCapacityProviderCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "CreateCapacityProvider", {}).n("ECSClient", "CreateCapacityProviderCommand").f(void 0, void 0).ser(se_CreateCapacityProviderCommand).de(de_CreateCapacityProviderCommand).build() { - static { - __name(this, "CreateCapacityProviderCommand"); - } -}; - -// src/commands/CreateClusterCommand.ts - - - -var CreateClusterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "CreateCluster", {}).n("ECSClient", "CreateClusterCommand").f(void 0, void 0).ser(se_CreateClusterCommand).de(de_CreateClusterCommand).build() { - static { - __name(this, "CreateClusterCommand"); - } -}; - -// src/commands/CreateServiceCommand.ts - - - -var CreateServiceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "CreateService", {}).n("ECSClient", "CreateServiceCommand").f(void 0, void 0).ser(se_CreateServiceCommand).de(de_CreateServiceCommand).build() { - static { - __name(this, "CreateServiceCommand"); - } -}; - -// src/commands/CreateTaskSetCommand.ts - - - -var CreateTaskSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "CreateTaskSet", {}).n("ECSClient", "CreateTaskSetCommand").f(void 0, void 0).ser(se_CreateTaskSetCommand).de(de_CreateTaskSetCommand).build() { - static { - __name(this, "CreateTaskSetCommand"); - } -}; - -// src/commands/DeleteAccountSettingCommand.ts - - - -var DeleteAccountSettingCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteAccountSetting", {}).n("ECSClient", "DeleteAccountSettingCommand").f(void 0, void 0).ser(se_DeleteAccountSettingCommand).de(de_DeleteAccountSettingCommand).build() { - static { - __name(this, "DeleteAccountSettingCommand"); - } -}; - -// src/commands/DeleteAttributesCommand.ts - - - -var DeleteAttributesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteAttributes", {}).n("ECSClient", "DeleteAttributesCommand").f(void 0, void 0).ser(se_DeleteAttributesCommand).de(de_DeleteAttributesCommand).build() { - static { - __name(this, "DeleteAttributesCommand"); - } -}; - -// src/commands/DeleteCapacityProviderCommand.ts - - - -var DeleteCapacityProviderCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteCapacityProvider", {}).n("ECSClient", "DeleteCapacityProviderCommand").f(void 0, void 0).ser(se_DeleteCapacityProviderCommand).de(de_DeleteCapacityProviderCommand).build() { - static { - __name(this, "DeleteCapacityProviderCommand"); - } -}; - -// src/commands/DeleteClusterCommand.ts - - - -var DeleteClusterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteCluster", {}).n("ECSClient", "DeleteClusterCommand").f(void 0, void 0).ser(se_DeleteClusterCommand).de(de_DeleteClusterCommand).build() { - static { - __name(this, "DeleteClusterCommand"); - } -}; - -// src/commands/DeleteServiceCommand.ts - - - -var DeleteServiceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteService", {}).n("ECSClient", "DeleteServiceCommand").f(void 0, void 0).ser(se_DeleteServiceCommand).de(de_DeleteServiceCommand).build() { - static { - __name(this, "DeleteServiceCommand"); - } -}; - -// src/commands/DeleteTaskDefinitionsCommand.ts - - - -var DeleteTaskDefinitionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteTaskDefinitions", {}).n("ECSClient", "DeleteTaskDefinitionsCommand").f(void 0, void 0).ser(se_DeleteTaskDefinitionsCommand).de(de_DeleteTaskDefinitionsCommand).build() { - static { - __name(this, "DeleteTaskDefinitionsCommand"); - } -}; - -// src/commands/DeleteTaskSetCommand.ts - - - -var DeleteTaskSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteTaskSet", {}).n("ECSClient", "DeleteTaskSetCommand").f(void 0, void 0).ser(se_DeleteTaskSetCommand).de(de_DeleteTaskSetCommand).build() { - static { - __name(this, "DeleteTaskSetCommand"); - } -}; - -// src/commands/DeregisterContainerInstanceCommand.ts - - - -var DeregisterContainerInstanceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeregisterContainerInstance", {}).n("ECSClient", "DeregisterContainerInstanceCommand").f(void 0, void 0).ser(se_DeregisterContainerInstanceCommand).de(de_DeregisterContainerInstanceCommand).build() { - static { - __name(this, "DeregisterContainerInstanceCommand"); - } -}; - -// src/commands/DeregisterTaskDefinitionCommand.ts - - - -var DeregisterTaskDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeregisterTaskDefinition", {}).n("ECSClient", "DeregisterTaskDefinitionCommand").f(void 0, void 0).ser(se_DeregisterTaskDefinitionCommand).de(de_DeregisterTaskDefinitionCommand).build() { - static { - __name(this, "DeregisterTaskDefinitionCommand"); - } -}; - -// src/commands/DescribeCapacityProvidersCommand.ts - - - -var DescribeCapacityProvidersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeCapacityProviders", {}).n("ECSClient", "DescribeCapacityProvidersCommand").f(void 0, void 0).ser(se_DescribeCapacityProvidersCommand).de(de_DescribeCapacityProvidersCommand).build() { - static { - __name(this, "DescribeCapacityProvidersCommand"); - } -}; - -// src/commands/DescribeClustersCommand.ts - - - -var DescribeClustersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeClusters", {}).n("ECSClient", "DescribeClustersCommand").f(void 0, void 0).ser(se_DescribeClustersCommand).de(de_DescribeClustersCommand).build() { - static { - __name(this, "DescribeClustersCommand"); - } -}; - -// src/commands/DescribeContainerInstancesCommand.ts - - - -var DescribeContainerInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeContainerInstances", {}).n("ECSClient", "DescribeContainerInstancesCommand").f(void 0, void 0).ser(se_DescribeContainerInstancesCommand).de(de_DescribeContainerInstancesCommand).build() { - static { - __name(this, "DescribeContainerInstancesCommand"); - } -}; - -// src/commands/DescribeServiceDeploymentsCommand.ts - - - -var DescribeServiceDeploymentsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeServiceDeployments", {}).n("ECSClient", "DescribeServiceDeploymentsCommand").f(void 0, void 0).ser(se_DescribeServiceDeploymentsCommand).de(de_DescribeServiceDeploymentsCommand).build() { - static { - __name(this, "DescribeServiceDeploymentsCommand"); - } -}; - -// src/commands/DescribeServiceRevisionsCommand.ts - - - -var DescribeServiceRevisionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeServiceRevisions", {}).n("ECSClient", "DescribeServiceRevisionsCommand").f(void 0, void 0).ser(se_DescribeServiceRevisionsCommand).de(de_DescribeServiceRevisionsCommand).build() { - static { - __name(this, "DescribeServiceRevisionsCommand"); - } -}; - -// src/commands/DescribeServicesCommand.ts - - - -var DescribeServicesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeServices", {}).n("ECSClient", "DescribeServicesCommand").f(void 0, void 0).ser(se_DescribeServicesCommand).de(de_DescribeServicesCommand).build() { - static { - __name(this, "DescribeServicesCommand"); - } -}; - -// src/commands/DescribeTaskDefinitionCommand.ts - - - -var DescribeTaskDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeTaskDefinition", {}).n("ECSClient", "DescribeTaskDefinitionCommand").f(void 0, void 0).ser(se_DescribeTaskDefinitionCommand).de(de_DescribeTaskDefinitionCommand).build() { - static { - __name(this, "DescribeTaskDefinitionCommand"); - } -}; - -// src/commands/DescribeTasksCommand.ts - - - -var DescribeTasksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeTasks", {}).n("ECSClient", "DescribeTasksCommand").f(void 0, void 0).ser(se_DescribeTasksCommand).de(de_DescribeTasksCommand).build() { - static { - __name(this, "DescribeTasksCommand"); - } -}; - -// src/commands/DescribeTaskSetsCommand.ts - - - -var DescribeTaskSetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeTaskSets", {}).n("ECSClient", "DescribeTaskSetsCommand").f(void 0, void 0).ser(se_DescribeTaskSetsCommand).de(de_DescribeTaskSetsCommand).build() { - static { - __name(this, "DescribeTaskSetsCommand"); - } -}; - -// src/commands/DiscoverPollEndpointCommand.ts - - - -var DiscoverPollEndpointCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DiscoverPollEndpoint", {}).n("ECSClient", "DiscoverPollEndpointCommand").f(void 0, void 0).ser(se_DiscoverPollEndpointCommand).de(de_DiscoverPollEndpointCommand).build() { - static { - __name(this, "DiscoverPollEndpointCommand"); - } -}; - -// src/commands/ExecuteCommandCommand.ts - - - -var ExecuteCommandCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ExecuteCommand", {}).n("ECSClient", "ExecuteCommandCommand").f(void 0, ExecuteCommandResponseFilterSensitiveLog).ser(se_ExecuteCommandCommand).de(de_ExecuteCommandCommand).build() { - static { - __name(this, "ExecuteCommandCommand"); - } -}; - -// src/commands/GetTaskProtectionCommand.ts - - - -var GetTaskProtectionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "GetTaskProtection", {}).n("ECSClient", "GetTaskProtectionCommand").f(void 0, void 0).ser(se_GetTaskProtectionCommand).de(de_GetTaskProtectionCommand).build() { - static { - __name(this, "GetTaskProtectionCommand"); - } -}; - -// src/commands/ListAccountSettingsCommand.ts - - - -var ListAccountSettingsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListAccountSettings", {}).n("ECSClient", "ListAccountSettingsCommand").f(void 0, void 0).ser(se_ListAccountSettingsCommand).de(de_ListAccountSettingsCommand).build() { - static { - __name(this, "ListAccountSettingsCommand"); - } -}; - -// src/commands/ListAttributesCommand.ts - - - -var ListAttributesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListAttributes", {}).n("ECSClient", "ListAttributesCommand").f(void 0, void 0).ser(se_ListAttributesCommand).de(de_ListAttributesCommand).build() { - static { - __name(this, "ListAttributesCommand"); - } -}; - -// src/commands/ListClustersCommand.ts - - - -var ListClustersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListClusters", {}).n("ECSClient", "ListClustersCommand").f(void 0, void 0).ser(se_ListClustersCommand).de(de_ListClustersCommand).build() { - static { - __name(this, "ListClustersCommand"); - } -}; - -// src/commands/ListContainerInstancesCommand.ts - - - -var ListContainerInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListContainerInstances", {}).n("ECSClient", "ListContainerInstancesCommand").f(void 0, void 0).ser(se_ListContainerInstancesCommand).de(de_ListContainerInstancesCommand).build() { - static { - __name(this, "ListContainerInstancesCommand"); - } -}; - -// src/commands/ListServiceDeploymentsCommand.ts - - - -var ListServiceDeploymentsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListServiceDeployments", {}).n("ECSClient", "ListServiceDeploymentsCommand").f(void 0, void 0).ser(se_ListServiceDeploymentsCommand).de(de_ListServiceDeploymentsCommand).build() { - static { - __name(this, "ListServiceDeploymentsCommand"); - } -}; - -// src/commands/ListServicesByNamespaceCommand.ts - - - -var ListServicesByNamespaceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListServicesByNamespace", {}).n("ECSClient", "ListServicesByNamespaceCommand").f(void 0, void 0).ser(se_ListServicesByNamespaceCommand).de(de_ListServicesByNamespaceCommand).build() { - static { - __name(this, "ListServicesByNamespaceCommand"); - } -}; - -// src/commands/ListServicesCommand.ts - - - -var ListServicesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListServices", {}).n("ECSClient", "ListServicesCommand").f(void 0, void 0).ser(se_ListServicesCommand).de(de_ListServicesCommand).build() { - static { - __name(this, "ListServicesCommand"); - } -}; - -// src/commands/ListTagsForResourceCommand.ts - - - -var ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListTagsForResource", {}).n("ECSClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() { - static { - __name(this, "ListTagsForResourceCommand"); - } -}; - -// src/commands/ListTaskDefinitionFamiliesCommand.ts - - - -var ListTaskDefinitionFamiliesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListTaskDefinitionFamilies", {}).n("ECSClient", "ListTaskDefinitionFamiliesCommand").f(void 0, void 0).ser(se_ListTaskDefinitionFamiliesCommand).de(de_ListTaskDefinitionFamiliesCommand).build() { - static { - __name(this, "ListTaskDefinitionFamiliesCommand"); - } -}; - -// src/commands/ListTaskDefinitionsCommand.ts - - - -var ListTaskDefinitionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListTaskDefinitions", {}).n("ECSClient", "ListTaskDefinitionsCommand").f(void 0, void 0).ser(se_ListTaskDefinitionsCommand).de(de_ListTaskDefinitionsCommand).build() { - static { - __name(this, "ListTaskDefinitionsCommand"); - } -}; - -// src/commands/ListTasksCommand.ts - - - -var ListTasksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListTasks", {}).n("ECSClient", "ListTasksCommand").f(void 0, void 0).ser(se_ListTasksCommand).de(de_ListTasksCommand).build() { - static { - __name(this, "ListTasksCommand"); - } -}; - -// src/commands/PutAccountSettingCommand.ts - - - -var PutAccountSettingCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "PutAccountSetting", {}).n("ECSClient", "PutAccountSettingCommand").f(void 0, void 0).ser(se_PutAccountSettingCommand).de(de_PutAccountSettingCommand).build() { - static { - __name(this, "PutAccountSettingCommand"); - } -}; - -// src/commands/PutAccountSettingDefaultCommand.ts - - - -var PutAccountSettingDefaultCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "PutAccountSettingDefault", {}).n("ECSClient", "PutAccountSettingDefaultCommand").f(void 0, void 0).ser(se_PutAccountSettingDefaultCommand).de(de_PutAccountSettingDefaultCommand).build() { - static { - __name(this, "PutAccountSettingDefaultCommand"); - } -}; - -// src/commands/PutAttributesCommand.ts - - - -var PutAttributesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "PutAttributes", {}).n("ECSClient", "PutAttributesCommand").f(void 0, void 0).ser(se_PutAttributesCommand).de(de_PutAttributesCommand).build() { - static { - __name(this, "PutAttributesCommand"); - } -}; - -// src/commands/PutClusterCapacityProvidersCommand.ts - - - -var PutClusterCapacityProvidersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "PutClusterCapacityProviders", {}).n("ECSClient", "PutClusterCapacityProvidersCommand").f(void 0, void 0).ser(se_PutClusterCapacityProvidersCommand).de(de_PutClusterCapacityProvidersCommand).build() { - static { - __name(this, "PutClusterCapacityProvidersCommand"); - } -}; - -// src/commands/RegisterContainerInstanceCommand.ts - - - -var RegisterContainerInstanceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "RegisterContainerInstance", {}).n("ECSClient", "RegisterContainerInstanceCommand").f(void 0, void 0).ser(se_RegisterContainerInstanceCommand).de(de_RegisterContainerInstanceCommand).build() { - static { - __name(this, "RegisterContainerInstanceCommand"); - } -}; - -// src/commands/RegisterTaskDefinitionCommand.ts - - - -var RegisterTaskDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "RegisterTaskDefinition", {}).n("ECSClient", "RegisterTaskDefinitionCommand").f(void 0, void 0).ser(se_RegisterTaskDefinitionCommand).de(de_RegisterTaskDefinitionCommand).build() { - static { - __name(this, "RegisterTaskDefinitionCommand"); - } -}; - -// src/commands/RunTaskCommand.ts - - - -var RunTaskCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "RunTask", {}).n("ECSClient", "RunTaskCommand").f(void 0, void 0).ser(se_RunTaskCommand).de(de_RunTaskCommand).build() { - static { - __name(this, "RunTaskCommand"); - } -}; - -// src/commands/StartTaskCommand.ts - - - -var StartTaskCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "StartTask", {}).n("ECSClient", "StartTaskCommand").f(void 0, void 0).ser(se_StartTaskCommand).de(de_StartTaskCommand).build() { - static { - __name(this, "StartTaskCommand"); - } -}; - -// src/commands/StopServiceDeploymentCommand.ts - - - -var StopServiceDeploymentCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "StopServiceDeployment", {}).n("ECSClient", "StopServiceDeploymentCommand").f(void 0, void 0).ser(se_StopServiceDeploymentCommand).de(de_StopServiceDeploymentCommand).build() { - static { - __name(this, "StopServiceDeploymentCommand"); - } -}; - -// src/commands/StopTaskCommand.ts - - - -var StopTaskCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "StopTask", {}).n("ECSClient", "StopTaskCommand").f(void 0, void 0).ser(se_StopTaskCommand).de(de_StopTaskCommand).build() { - static { - __name(this, "StopTaskCommand"); - } -}; - -// src/commands/SubmitAttachmentStateChangesCommand.ts - - - -var SubmitAttachmentStateChangesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "SubmitAttachmentStateChanges", {}).n("ECSClient", "SubmitAttachmentStateChangesCommand").f(void 0, void 0).ser(se_SubmitAttachmentStateChangesCommand).de(de_SubmitAttachmentStateChangesCommand).build() { - static { - __name(this, "SubmitAttachmentStateChangesCommand"); - } -}; - -// src/commands/SubmitContainerStateChangeCommand.ts - - - -var SubmitContainerStateChangeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "SubmitContainerStateChange", {}).n("ECSClient", "SubmitContainerStateChangeCommand").f(void 0, void 0).ser(se_SubmitContainerStateChangeCommand).de(de_SubmitContainerStateChangeCommand).build() { - static { - __name(this, "SubmitContainerStateChangeCommand"); - } -}; - -// src/commands/SubmitTaskStateChangeCommand.ts - - - -var SubmitTaskStateChangeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "SubmitTaskStateChange", {}).n("ECSClient", "SubmitTaskStateChangeCommand").f(void 0, void 0).ser(se_SubmitTaskStateChangeCommand).de(de_SubmitTaskStateChangeCommand).build() { - static { - __name(this, "SubmitTaskStateChangeCommand"); - } -}; - -// src/commands/TagResourceCommand.ts - - - -var TagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "TagResource", {}).n("ECSClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() { - static { - __name(this, "TagResourceCommand"); - } -}; - -// src/commands/UntagResourceCommand.ts - - - -var UntagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UntagResource", {}).n("ECSClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() { - static { - __name(this, "UntagResourceCommand"); - } -}; - -// src/commands/UpdateCapacityProviderCommand.ts - - - -var UpdateCapacityProviderCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateCapacityProvider", {}).n("ECSClient", "UpdateCapacityProviderCommand").f(void 0, void 0).ser(se_UpdateCapacityProviderCommand).de(de_UpdateCapacityProviderCommand).build() { - static { - __name(this, "UpdateCapacityProviderCommand"); - } -}; - -// src/commands/UpdateClusterCommand.ts - - - -var UpdateClusterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateCluster", {}).n("ECSClient", "UpdateClusterCommand").f(void 0, void 0).ser(se_UpdateClusterCommand).de(de_UpdateClusterCommand).build() { - static { - __name(this, "UpdateClusterCommand"); - } -}; - -// src/commands/UpdateClusterSettingsCommand.ts - - - -var UpdateClusterSettingsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateClusterSettings", {}).n("ECSClient", "UpdateClusterSettingsCommand").f(void 0, void 0).ser(se_UpdateClusterSettingsCommand).de(de_UpdateClusterSettingsCommand).build() { - static { - __name(this, "UpdateClusterSettingsCommand"); - } -}; - -// src/commands/UpdateContainerAgentCommand.ts - - - -var UpdateContainerAgentCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateContainerAgent", {}).n("ECSClient", "UpdateContainerAgentCommand").f(void 0, void 0).ser(se_UpdateContainerAgentCommand).de(de_UpdateContainerAgentCommand).build() { - static { - __name(this, "UpdateContainerAgentCommand"); - } -}; - -// src/commands/UpdateContainerInstancesStateCommand.ts - - - -var UpdateContainerInstancesStateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateContainerInstancesState", {}).n("ECSClient", "UpdateContainerInstancesStateCommand").f(void 0, void 0).ser(se_UpdateContainerInstancesStateCommand).de(de_UpdateContainerInstancesStateCommand).build() { - static { - __name(this, "UpdateContainerInstancesStateCommand"); - } -}; - -// src/commands/UpdateServiceCommand.ts - - - -var UpdateServiceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateService", {}).n("ECSClient", "UpdateServiceCommand").f(void 0, void 0).ser(se_UpdateServiceCommand).de(de_UpdateServiceCommand).build() { - static { - __name(this, "UpdateServiceCommand"); - } -}; - -// src/commands/UpdateServicePrimaryTaskSetCommand.ts - - - -var UpdateServicePrimaryTaskSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateServicePrimaryTaskSet", {}).n("ECSClient", "UpdateServicePrimaryTaskSetCommand").f(void 0, void 0).ser(se_UpdateServicePrimaryTaskSetCommand).de(de_UpdateServicePrimaryTaskSetCommand).build() { - static { - __name(this, "UpdateServicePrimaryTaskSetCommand"); - } -}; - -// src/commands/UpdateTaskProtectionCommand.ts - - - -var UpdateTaskProtectionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateTaskProtection", {}).n("ECSClient", "UpdateTaskProtectionCommand").f(void 0, void 0).ser(se_UpdateTaskProtectionCommand).de(de_UpdateTaskProtectionCommand).build() { - static { - __name(this, "UpdateTaskProtectionCommand"); - } -}; - -// src/commands/UpdateTaskSetCommand.ts - - - -var UpdateTaskSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateTaskSet", {}).n("ECSClient", "UpdateTaskSetCommand").f(void 0, void 0).ser(se_UpdateTaskSetCommand).de(de_UpdateTaskSetCommand).build() { - static { - __name(this, "UpdateTaskSetCommand"); - } -}; - -// src/ECS.ts -var commands = { - CreateCapacityProviderCommand, - CreateClusterCommand, - CreateServiceCommand, - CreateTaskSetCommand, - DeleteAccountSettingCommand, - DeleteAttributesCommand, - DeleteCapacityProviderCommand, - DeleteClusterCommand, - DeleteServiceCommand, - DeleteTaskDefinitionsCommand, - DeleteTaskSetCommand, - DeregisterContainerInstanceCommand, - DeregisterTaskDefinitionCommand, - DescribeCapacityProvidersCommand, - DescribeClustersCommand, - DescribeContainerInstancesCommand, - DescribeServiceDeploymentsCommand, - DescribeServiceRevisionsCommand, - DescribeServicesCommand, - DescribeTaskDefinitionCommand, - DescribeTasksCommand, - DescribeTaskSetsCommand, - DiscoverPollEndpointCommand, - ExecuteCommandCommand, - GetTaskProtectionCommand, - ListAccountSettingsCommand, - ListAttributesCommand, - ListClustersCommand, - ListContainerInstancesCommand, - ListServiceDeploymentsCommand, - ListServicesCommand, - ListServicesByNamespaceCommand, - ListTagsForResourceCommand, - ListTaskDefinitionFamiliesCommand, - ListTaskDefinitionsCommand, - ListTasksCommand, - PutAccountSettingCommand, - PutAccountSettingDefaultCommand, - PutAttributesCommand, - PutClusterCapacityProvidersCommand, - RegisterContainerInstanceCommand, - RegisterTaskDefinitionCommand, - RunTaskCommand, - StartTaskCommand, - StopServiceDeploymentCommand, - StopTaskCommand, - SubmitAttachmentStateChangesCommand, - SubmitContainerStateChangeCommand, - SubmitTaskStateChangeCommand, - TagResourceCommand, - UntagResourceCommand, - UpdateCapacityProviderCommand, - UpdateClusterCommand, - UpdateClusterSettingsCommand, - UpdateContainerAgentCommand, - UpdateContainerInstancesStateCommand, - UpdateServiceCommand, - UpdateServicePrimaryTaskSetCommand, - UpdateTaskProtectionCommand, - UpdateTaskSetCommand -}; -var ECS = class extends ECSClient { - static { - __name(this, "ECS"); - } -}; -(0, import_smithy_client.createAggregatedClient)(commands, ECS); - -// src/pagination/ListAccountSettingsPaginator.ts - -var paginateListAccountSettings = (0, import_core.createPaginator)(ECSClient, ListAccountSettingsCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListAttributesPaginator.ts - -var paginateListAttributes = (0, import_core.createPaginator)(ECSClient, ListAttributesCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListClustersPaginator.ts - -var paginateListClusters = (0, import_core.createPaginator)(ECSClient, ListClustersCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListContainerInstancesPaginator.ts - -var paginateListContainerInstances = (0, import_core.createPaginator)(ECSClient, ListContainerInstancesCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListServicesByNamespacePaginator.ts - -var paginateListServicesByNamespace = (0, import_core.createPaginator)(ECSClient, ListServicesByNamespaceCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListServicesPaginator.ts - -var paginateListServices = (0, import_core.createPaginator)(ECSClient, ListServicesCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListTaskDefinitionFamiliesPaginator.ts - -var paginateListTaskDefinitionFamilies = (0, import_core.createPaginator)(ECSClient, ListTaskDefinitionFamiliesCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListTaskDefinitionsPaginator.ts - -var paginateListTaskDefinitions = (0, import_core.createPaginator)(ECSClient, ListTaskDefinitionsCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListTasksPaginator.ts - -var paginateListTasks = (0, import_core.createPaginator)(ECSClient, ListTasksCommand, "nextToken", "nextToken", "maxResults"); - -// src/waiters/waitForServicesInactive.ts -var import_util_waiter = __nccwpck_require__(95290); -var checkState = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeServicesCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.failures); - const projection_3 = flat_1.map((element_2) => { - return element_2.reason; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "MISSING") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.services); - const projection_3 = flat_1.map((element_2) => { - return element_2.status; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "INACTIVE") { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } - } catch (e) { - } - } catch (exception) { - reason = exception; - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForServicesInactive = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 15, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState); -}, "waitForServicesInactive"); -var waitUntilServicesInactive = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 15, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilServicesInactive"); - -// src/waiters/waitForServicesStable.ts - -var checkState2 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeServicesCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.failures); - const projection_3 = flat_1.map((element_2) => { - return element_2.reason; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "MISSING") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.services); - const projection_3 = flat_1.map((element_2) => { - return element_2.status; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "DRAINING") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.services); - const projection_3 = flat_1.map((element_2) => { - return element_2.status; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "INACTIVE") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const filterRes_2 = result.services.filter((element_1) => { - return !(element_1.deployments.length == 1 && element_1.runningCount == element_1.desiredCount); - }); - return filterRes_2.length == 0; - }, "returnComparator"); - if (returnComparator() == true) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - } catch (exception) { - reason = exception; - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForServicesStable = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 15, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2); -}, "waitForServicesStable"); -var waitUntilServicesStable = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 15, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilServicesStable"); - -// src/waiters/waitForTasksRunning.ts - -var checkState3 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeTasksCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.tasks); - const projection_3 = flat_1.map((element_2) => { - return element_2.lastStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "STOPPED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.failures); - const projection_3 = flat_1.map((element_2) => { - return element_2.reason; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "MISSING") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.tasks); - const projection_3 = flat_1.map((element_2) => { - return element_2.lastStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "RUNNING"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - } catch (exception) { - reason = exception; - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForTasksRunning = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 6, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3); -}, "waitForTasksRunning"); -var waitUntilTasksRunning = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 6, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilTasksRunning"); - -// src/waiters/waitForTasksStopped.ts - -var checkState4 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeTasksCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.tasks); - const projection_3 = flat_1.map((element_2) => { - return element_2.lastStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "STOPPED"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - } catch (exception) { - reason = exception; - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForTasksStopped = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 6, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4); -}, "waitForTasksStopped"); -var waitUntilTasksStopped = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 6, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilTasksStopped"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 41142: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(61860); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(51194)); -const core_1 = __nccwpck_require__(91446); -const credential_provider_node_1 = __nccwpck_require__(60395); -const util_user_agent_node_1 = __nccwpck_require__(9082); -const config_resolver_1 = __nccwpck_require__(39316); -const hash_node_1 = __nccwpck_require__(5092); -const middleware_retry_1 = __nccwpck_require__(19618); -const node_config_provider_1 = __nccwpck_require__(61814); -const node_http_handler_1 = __nccwpck_require__(95493); -const util_body_length_node_1 = __nccwpck_require__(13638); -const util_retry_1 = __nccwpck_require__(15518); -const runtimeConfig_shared_1 = __nccwpck_require__(31519); -const smithy_client_1 = __nccwpck_require__(61411); -const util_defaults_mode_node_1 = __nccwpck_require__(15435); -const smithy_client_2 = __nccwpck_require__(61411); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const loaderConfig = { - profile: config?.profile, - logger: clientSharedValues.logger, - }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 31519: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(91446); -const smithy_client_1 = __nccwpck_require__(61411); -const url_parser_1 = __nccwpck_require__(85792); -const util_base64_1 = __nccwpck_require__(82763); -const util_utf8_1 = __nccwpck_require__(85339); -const httpAuthSchemeProvider_1 = __nccwpck_require__(1367); -const endpointResolver_1 = __nccwpck_require__(6161); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2014-11-13", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultECSHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "ECS", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 50111: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0; -const core_1 = __nccwpck_require__(91446); -const util_middleware_1 = __nccwpck_require__(30954); -const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), - }; -}; -exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider; -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", - }; -} -const defaultSSOHttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - case "GetRoleCredentials": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - case "ListAccountRoles": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - case "ListAccounts": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - case "Logout": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - } - } - return options; -}; -exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider; -const resolveHttpAuthSchemeConfig = (config) => { - const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); - return Object.assign(config_0, { - authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []), - }); -}; -exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; - - -/***/ }), - -/***/ 57321: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(16158); -const util_endpoints_2 = __nccwpck_require__(79674); -const ruleset_1 = __nccwpck_require__(79170); -const cache = new util_endpoints_2.EndpointCache({ - size: 50, - params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], -}); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - })); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; -util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; - - -/***/ }), - -/***/ 79170: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const u = "required", v = "fn", w = "argv", x = "ref"; -const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; -const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; -exports.ruleSet = _data; - - -/***/ }), - -/***/ 43628: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - GetRoleCredentialsCommand: () => GetRoleCredentialsCommand, - GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog, - GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog, - InvalidRequestException: () => InvalidRequestException, - ListAccountRolesCommand: () => ListAccountRolesCommand, - ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog, - ListAccountsCommand: () => ListAccountsCommand, - ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog, - LogoutCommand: () => LogoutCommand, - LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog, - ResourceNotFoundException: () => ResourceNotFoundException, - RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog, - SSO: () => SSO, - SSOClient: () => SSOClient, - SSOServiceException: () => SSOServiceException, - TooManyRequestsException: () => TooManyRequestsException, - UnauthorizedException: () => UnauthorizedException, - __Client: () => import_smithy_client.Client, - paginateListAccountRoles: () => paginateListAccountRoles, - paginateListAccounts: () => paginateListAccounts -}); -module.exports = __toCommonJS(index_exports); - -// src/SSOClient.ts -var import_middleware_host_header = __nccwpck_require__(25164); -var import_middleware_logger = __nccwpck_require__(65832); -var import_middleware_recursion_detection = __nccwpck_require__(39870); -var import_middleware_user_agent = __nccwpck_require__(70997); -var import_config_resolver = __nccwpck_require__(39316); -var import_core = __nccwpck_require__(22744); -var import_middleware_content_length = __nccwpck_require__(47212); -var import_middleware_endpoint = __nccwpck_require__(88205); -var import_middleware_retry = __nccwpck_require__(19618); - -var import_httpAuthSchemeProvider = __nccwpck_require__(50111); - -// src/endpoint/EndpointParameters.ts -var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "awsssoportal" - }); -}, "resolveClientEndpointParameters"); -var commonParams = { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } -}; - -// src/SSOClient.ts -var import_runtimeConfig = __nccwpck_require__(88766); - -// src/runtimeExtensions.ts -var import_region_config_resolver = __nccwpck_require__(26521); -var import_protocol_http = __nccwpck_require__(13494); -var import_smithy_client = __nccwpck_require__(61411); - -// src/auth/httpAuthExtensionConfiguration.ts -var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((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; - } - }; -}, "getHttpAuthExtensionConfiguration"); -var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - credentials: config.credentials() - }; -}, "resolveHttpAuthRuntimeConfig"); - -// src/runtimeExtensions.ts -var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign( - (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), - (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), - (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), - getHttpAuthExtensionConfiguration(runtimeConfig) - ); - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign( - runtimeConfig, - (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), - resolveHttpAuthRuntimeConfig(extensionConfiguration) - ); -}, "resolveRuntimeExtensions"); - -// src/SSOClient.ts -var SSOClient = class extends import_smithy_client.Client { - static { - __name(this, "SSOClient"); - } - /** - * The resolved configuration of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}. - */ - config; - constructor(...[configuration]) { - const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); - super(_config_0); - this.initConfig = _config_0; - const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); - const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2); - const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); - const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); - const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); - const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); - this.config = _config_8; - this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use( - (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { - httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config.credentials - }), "identityProviderConfigProvider") - }) - ); - this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); - } - /** - * Destroy underlying resources, like sockets. It's usually not necessary to do this. - * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. - * Otherwise, sockets might stay open for quite a long time before the server terminates them. - */ - destroy() { - super.destroy(); - } -}; - -// src/SSO.ts - - -// src/commands/GetRoleCredentialsCommand.ts - -var import_middleware_serde = __nccwpck_require__(58305); - - -// src/models/models_0.ts - - -// src/models/SSOServiceException.ts - -var SSOServiceException = class _SSOServiceException extends import_smithy_client.ServiceException { - static { - __name(this, "SSOServiceException"); - } - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _SSOServiceException.prototype); - } -}; - -// src/models/models_0.ts -var InvalidRequestException = class _InvalidRequestException extends SSOServiceException { - static { - __name(this, "InvalidRequestException"); - } - name = "InvalidRequestException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidRequestException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidRequestException.prototype); - } -}; -var ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException { - static { - __name(this, "ResourceNotFoundException"); - } - name = "ResourceNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); - } -}; -var TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException { - static { - __name(this, "TooManyRequestsException"); - } - name = "TooManyRequestsException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TooManyRequestsException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TooManyRequestsException.prototype); - } -}; -var UnauthorizedException = class _UnauthorizedException extends SSOServiceException { - static { - __name(this, "UnauthorizedException"); - } - name = "UnauthorizedException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "UnauthorizedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _UnauthorizedException.prototype); - } -}; -var GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING } -}), "GetRoleCredentialsRequestFilterSensitiveLog"); -var RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.secretAccessKey && { secretAccessKey: import_smithy_client.SENSITIVE_STRING }, - ...obj.sessionToken && { sessionToken: import_smithy_client.SENSITIVE_STRING } -}), "RoleCredentialsFilterSensitiveLog"); -var GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) } -}), "GetRoleCredentialsResponseFilterSensitiveLog"); -var ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING } -}), "ListAccountRolesRequestFilterSensitiveLog"); -var ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING } -}), "ListAccountsRequestFilterSensitiveLog"); -var LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING } -}), "LogoutRequestFilterSensitiveLog"); - -// src/protocols/Aws_restJson1.ts -var import_core2 = __nccwpck_require__(91446); - - -var se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xasbt]: input[_aT] - }); - b.bp("/federation/credentials"); - const query = (0, import_smithy_client.map)({ - [_rn]: [, (0, import_smithy_client.expectNonNull)(input[_rN], `roleName`)], - [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetRoleCredentialsCommand"); -var se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xasbt]: input[_aT] - }); - b.bp("/assignment/roles"); - const query = (0, import_smithy_client.map)({ - [_nt]: [, input[_nT]], - [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], - [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListAccountRolesCommand"); -var se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xasbt]: input[_aT] - }); - b.bp("/assignment/accounts"); - const query = (0, import_smithy_client.map)({ - [_nt]: [, input[_nT]], - [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListAccountsCommand"); -var se_LogoutCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xasbt]: input[_aT] - }); - b.bp("/logout"); - let body; - b.m("POST").h(headers).b(body); - return b.build(); -}, "se_LogoutCommand"); -var de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); - const doc = (0, import_smithy_client.take)(data, { - roleCredentials: import_smithy_client._json - }); - Object.assign(contents, doc); - return contents; -}, "de_GetRoleCredentialsCommand"); -var de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); - const doc = (0, import_smithy_client.take)(data, { - nextToken: import_smithy_client.expectString, - roleList: import_smithy_client._json - }); - Object.assign(contents, doc); - return contents; -}, "de_ListAccountRolesCommand"); -var de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); - const doc = (0, import_smithy_client.take)(data, { - accountList: import_smithy_client._json, - nextToken: import_smithy_client.expectString - }); - Object.assign(contents, doc); - return contents; -}, "de_ListAccountsCommand"); -var de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_LogoutCommand"); -var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonErrorBody)(output.body, context) - }; - const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); - switch (errorCode) { - case "InvalidRequestException": - case "com.amazonaws.sso#InvalidRequestException": - throw await de_InvalidRequestExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.sso#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "TooManyRequestsException": - case "com.amazonaws.sso#TooManyRequestsException": - throw await de_TooManyRequestsExceptionRes(parsedOutput, context); - case "UnauthorizedException": - case "com.amazonaws.sso#UnauthorizedException": - throw await de_UnauthorizedExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } -}, "de_CommandError"); -var throwDefaultError = (0, import_smithy_client.withBaseException)(SSOServiceException); -var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client.take)(data, { - message: import_smithy_client.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidRequestException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidRequestExceptionRes"); -var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client.take)(data, { - message: import_smithy_client.expectString - }); - Object.assign(contents, doc); - const exception = new ResourceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_ResourceNotFoundExceptionRes"); -var de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client.take)(data, { - message: import_smithy_client.expectString - }); - Object.assign(contents, doc); - const exception = new TooManyRequestsException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_TooManyRequestsExceptionRes"); -var de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client.take)(data, { - message: import_smithy_client.expectString - }); - Object.assign(contents, doc); - const exception = new UnauthorizedException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_UnauthorizedExceptionRes"); -var deserializeMetadata = /* @__PURE__ */ __name((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"] -}), "deserializeMetadata"); -var _aI = "accountId"; -var _aT = "accessToken"; -var _ai = "account_id"; -var _mR = "maxResults"; -var _mr = "max_result"; -var _nT = "nextToken"; -var _nt = "next_token"; -var _rN = "roleName"; -var _rn = "role_name"; -var _xasbt = "x-amz-sso_bearer_token"; - -// src/commands/GetRoleCredentialsCommand.ts -var GetRoleCredentialsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() { - static { - __name(this, "GetRoleCredentialsCommand"); - } -}; - -// src/commands/ListAccountRolesCommand.ts - - - -var ListAccountRolesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("SWBPortalService", "ListAccountRoles", {}).n("SSOClient", "ListAccountRolesCommand").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() { - static { - __name(this, "ListAccountRolesCommand"); - } -}; - -// src/commands/ListAccountsCommand.ts - - - -var ListAccountsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("SWBPortalService", "ListAccounts", {}).n("SSOClient", "ListAccountsCommand").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() { - static { - __name(this, "ListAccountsCommand"); - } -}; - -// src/commands/LogoutCommand.ts - - - -var LogoutCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("SWBPortalService", "Logout", {}).n("SSOClient", "LogoutCommand").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() { - static { - __name(this, "LogoutCommand"); - } -}; - -// src/SSO.ts -var commands = { - GetRoleCredentialsCommand, - ListAccountRolesCommand, - ListAccountsCommand, - LogoutCommand -}; -var SSO = class extends SSOClient { - static { - __name(this, "SSO"); - } -}; -(0, import_smithy_client.createAggregatedClient)(commands, SSO); - -// src/pagination/ListAccountRolesPaginator.ts - -var paginateListAccountRoles = (0, import_core.createPaginator)(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListAccountsPaginator.ts - -var paginateListAccounts = (0, import_core.createPaginator)(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 88766: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(61860); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(36948)); -const core_1 = __nccwpck_require__(91446); -const util_user_agent_node_1 = __nccwpck_require__(9082); -const config_resolver_1 = __nccwpck_require__(39316); -const hash_node_1 = __nccwpck_require__(5092); -const middleware_retry_1 = __nccwpck_require__(19618); -const node_config_provider_1 = __nccwpck_require__(61814); -const node_http_handler_1 = __nccwpck_require__(95493); -const util_body_length_node_1 = __nccwpck_require__(13638); -const util_retry_1 = __nccwpck_require__(15518); -const runtimeConfig_shared_1 = __nccwpck_require__(35831); -const smithy_client_1 = __nccwpck_require__(61411); -const util_defaults_mode_node_1 = __nccwpck_require__(15435); -const smithy_client_2 = __nccwpck_require__(61411); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const loaderConfig = { - profile: config?.profile, - logger: clientSharedValues.logger, - }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 35831: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(91446); -const core_2 = __nccwpck_require__(22744); -const smithy_client_1 = __nccwpck_require__(61411); -const url_parser_1 = __nccwpck_require__(85792); -const util_base64_1 = __nccwpck_require__(82763); -const util_utf8_1 = __nccwpck_require__(85339); -const httpAuthSchemeProvider_1 = __nccwpck_require__(50111); -const endpointResolver_1 = __nccwpck_require__(57321); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2019-06-10", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - { - schemeId: "smithy.api#noAuth", - identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), - signer: new core_2.NoAuthSigner(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "SSO", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 91446: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const tslib_1 = __nccwpck_require__(61860); -tslib_1.__exportStar(__nccwpck_require__(17582), exports); -tslib_1.__exportStar(__nccwpck_require__(7321), exports); -tslib_1.__exportStar(__nccwpck_require__(91914), exports); - - -/***/ }), - -/***/ 17582: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/client/index.ts -var index_exports = {}; -__export(index_exports, { - emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, - setCredentialFeature: () => setCredentialFeature, - setFeature: () => setFeature, - setTokenFeature: () => setTokenFeature, - state: () => state -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/client/emitWarningIfUnsupportedVersion.ts -var state = { - warningEmitted: false -}; -var emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => { - if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) { - state.warningEmitted = true; - process.emitWarning( - `NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will -no longer support Node.js 16.x on January 6, 2025. - -To continue receiving updates to AWS services, bug fixes, and security -updates please upgrade to a supported Node.js LTS version. - -More information can be found at: https://a.co/74kJMmI` - ); - } -}, "emitWarningIfUnsupportedVersion"); - -// src/submodules/client/setCredentialFeature.ts -function setCredentialFeature(credentials, feature, value) { - if (!credentials.$source) { - credentials.$source = {}; - } - credentials.$source[feature] = value; - return credentials; -} -__name(setCredentialFeature, "setCredentialFeature"); - -// src/submodules/client/setFeature.ts -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; -} -__name(setFeature, "setFeature"); - -// src/submodules/client/setTokenFeature.ts -function setTokenFeature(token, feature, value) { - if (!token.$source) { - token.$source = {}; - } - token.$source[feature] = value; - return token; -} -__name(setTokenFeature, "setTokenFeature"); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 7321: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/httpAuthSchemes/index.ts -var index_exports = {}; -__export(index_exports, { - AWSSDKSigV4Signer: () => AWSSDKSigV4Signer, - AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner, - AwsSdkSigV4Signer: () => AwsSdkSigV4Signer, - NODE_AUTH_SCHEME_PREFERENCE_OPTIONS: () => NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, - NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS, - getBearerTokenEnvKey: () => getBearerTokenEnvKey, - resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config, - resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig, - resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config, - validateSigningProperties: () => validateSigningProperties -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts -var import_protocol_http2 = __nccwpck_require__(13494); - -// src/submodules/httpAuthSchemes/utils/getDateHeader.ts -var import_protocol_http = __nccwpck_require__(13494); -var getDateHeader = /* @__PURE__ */ __name((response) => import_protocol_http.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0, "getDateHeader"); - -// src/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.ts -var getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate"); - -// src/submodules/httpAuthSchemes/utils/isClockSkewed.ts -var isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, "isClockSkewed"); - -// src/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts -var getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => { - const clockTimeInMs = Date.parse(clockTime); - if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { - return clockTimeInMs - Date.now(); - } - return currentSystemClockOffset; -}, "getUpdatedSystemClockOffset"); - -// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts -var throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => { - if (!property) { - throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); - } - return property; -}, "throwSigningPropertyError"); -var validateSigningProperties = /* @__PURE__ */ __name(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 - }; -}, "validateSigningProperties"); -var AwsSdkSigV4Signer = class { - static { - __name(this, "AwsSdkSigV4Signer"); - } - async sign(httpRequest, identity, signingProperties) { - if (!import_protocol_http2.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 signedRequest = await signer.sign(httpRequest, { - signingDate: getSkewCorrectedDate(config.systemClockOffset), - signingRegion, - signingService: signingName - }); - return signedRequest; - } - errorHandler(signingProperties) { - return (error) => { - const serverTime = error.ServerTime ?? getDateHeader(error.$response); - if (serverTime) { - const config = throwSigningPropertyError("config", signingProperties.config); - const initialSystemClockOffset = config.systemClockOffset; - config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); - const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset; - if (clockSkewCorrected && error.$metadata) { - error.$metadata.clockSkewCorrected = true; - } - } - throw error; - }; - } - successHandler(httpResponse, signingProperties) { - const dateHeader = getDateHeader(httpResponse); - if (dateHeader) { - const config = throwSigningPropertyError("config", signingProperties.config); - config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset); - } - } -}; -var AWSSDKSigV4Signer = AwsSdkSigV4Signer; - -// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.ts -var import_protocol_http3 = __nccwpck_require__(13494); -var AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer { - static { - __name(this, "AwsSdkSigV4ASigner"); - } - async sign(httpRequest, identity, signingProperties) { - if (!import_protocol_http3.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 signedRequest = await signer.sign(httpRequest, { - signingDate: getSkewCorrectedDate(config.systemClockOffset), - signingRegion: multiRegionOverride, - signingService: signingName - }); - return signedRequest; - } -}; - -// src/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.ts -var getArrayForCommaSeparatedString = /* @__PURE__ */ __name((str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : [], "getArrayForCommaSeparatedString"); - -// src/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.ts -var getBearerTokenEnvKey = /* @__PURE__ */ __name((signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`, "getBearerTokenEnvKey"); - -// src/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.ts -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 = { - /** - * Retrieves auth scheme preference from environment variables - * @param env - Node process environment object - * @returns Array of auth scheme strings if preference is set, undefined otherwise - */ - environmentVariableSelector: /* @__PURE__ */ __name((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 void 0; - return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]); - }, "environmentVariableSelector"), - /** - * Retrieves auth scheme preference from config file - * @param profile - Config profile object - * @returns Array of auth scheme strings if preference is set, undefined otherwise - */ - configFileSelector: /* @__PURE__ */ __name((profile) => { - if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) return void 0; - return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]); - }, "configFileSelector"), - /** - * Default auth scheme preference if not specified in environment or config - */ - default: [] -}; - -// src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.ts -var import_core = __nccwpck_require__(22744); -var import_property_provider = __nccwpck_require__(1104); -var resolveAwsSdkSigV4AConfig = /* @__PURE__ */ __name((config) => { - config.sigv4aSigningRegionSet = (0, import_core.normalizeProvider)(config.sigv4aSigningRegionSet); - return config; -}, "resolveAwsSdkSigV4AConfig"); -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 import_property_provider.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 import_property_provider.ProviderError("sigv4a_signing_region_set not set in profile.", { - tryNextLink: true - }); - }, - default: void 0 -}; - -// src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts -var import_client = __nccwpck_require__(17582); -var import_core2 = __nccwpck_require__(22744); -var import_signature_v4 = __nccwpck_require__(75118); -var resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => { - let inputCredentials = config.credentials; - let isUserSupplied = !!config.credentials; - let resolvedCredentials = void 0; - 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) { - resolvedCredentials = /* @__PURE__ */ __name(async (options) => boundProvider(options).then( - (creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_CODE", "e") - ), "resolvedCredentials"); - 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 { - // Default for signingEscapePath - signingEscapePath = true, - // Default for systemClockOffset - systemClockOffset = config.systemClockOffset || 0, - // No default for sha256 since it is platform dependent - sha256 - } = config; - let signer; - if (config.signer) { - signer = (0, import_core2.normalizeProvider)(config.signer); - } else if (config.regionInfoProvider) { - signer = /* @__PURE__ */ __name(() => (0, import_core2.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 || import_signature_v4.SignatureV4; - return new SignerCtor(params); - }), "signer"); - } else { - signer = /* @__PURE__ */ __name(async (authScheme) => { - authScheme = Object.assign( - {}, - { - name: "sigv4", - signingName: config.signingName || config.defaultSigningName, - signingRegion: await (0, import_core2.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 || import_signature_v4.SignatureV4; - return new SignerCtor(params); - }, "signer"); - } - const resolvedConfig = Object.assign(config, { - systemClockOffset, - signingEscapePath, - signer - }); - return resolvedConfig; -}, "resolveAwsSdkSigV4Config"); -var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; -function normalizeCredentialProvider(config, { - credentials, - credentialDefaultProvider -}) { - let credentialsProvider; - if (credentials) { - if (!credentials?.memoized) { - credentialsProvider = (0, import_core2.memoizeIdentityProvider)(credentials, import_core2.isIdentityExpired, import_core2.doesIdentityRequireRefresh); - } else { - credentialsProvider = credentials; - } - } else { - if (credentialDefaultProvider) { - credentialsProvider = (0, import_core2.normalizeProvider)( - credentialDefaultProvider( - Object.assign({}, config, { - parentClientConfig: config - }) - ) - ); - } else { - credentialsProvider = /* @__PURE__ */ __name(async () => { - throw new Error( - "@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured." - ); - }, "credentialsProvider"); - } - } - credentialsProvider.memoized = true; - return credentialsProvider; -} -__name(normalizeCredentialProvider, "normalizeCredentialProvider"); -function bindCallerConfig(config, credentialsProvider) { - if (credentialsProvider.configBound) { - return credentialsProvider; - } - const fn = /* @__PURE__ */ __name(async (options) => credentialsProvider({ ...options, callerClientConfig: config }), "fn"); - fn.memoized = credentialsProvider.memoized; - fn.configBound = true; - return fn; -} -__name(bindCallerConfig, "bindCallerConfig"); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 91914: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/protocols/index.ts -var index_exports = {}; -__export(index_exports, { - AwsEc2QueryProtocol: () => AwsEc2QueryProtocol, - AwsJson1_0Protocol: () => AwsJson1_0Protocol, - AwsJson1_1Protocol: () => AwsJson1_1Protocol, - AwsJsonRpcProtocol: () => AwsJsonRpcProtocol, - AwsQueryProtocol: () => AwsQueryProtocol, - AwsRestJsonProtocol: () => AwsRestJsonProtocol, - AwsRestXmlProtocol: () => AwsRestXmlProtocol, - AwsSmithyRpcV2CborProtocol: () => AwsSmithyRpcV2CborProtocol, - JsonCodec: () => JsonCodec, - JsonShapeDeserializer: () => JsonShapeDeserializer, - JsonShapeSerializer: () => JsonShapeSerializer, - XmlCodec: () => XmlCodec, - XmlShapeDeserializer: () => XmlShapeDeserializer, - XmlShapeSerializer: () => XmlShapeSerializer, - _toBool: () => _toBool, - _toNum: () => _toNum, - _toStr: () => _toStr, - awsExpectUnion: () => awsExpectUnion, - loadRestJsonErrorCode: () => loadRestJsonErrorCode, - loadRestXmlErrorCode: () => loadRestXmlErrorCode, - parseJsonBody: () => parseJsonBody, - parseJsonErrorBody: () => parseJsonErrorBody, - parseXmlBody: () => parseXmlBody, - parseXmlErrorBody: () => parseXmlErrorBody -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.ts -var import_cbor = __nccwpck_require__(91467); -var import_schema2 = __nccwpck_require__(41320); - -// src/submodules/protocols/ProtocolLib.ts -var import_schema = __nccwpck_require__(41320); -var import_util_body_length_browser = __nccwpck_require__(84916); -var ProtocolLib = class { - static { - __name(this, "ProtocolLib"); - } - /** - * @param body - to be inspected. - * @param serdeContext - this is a subset type but in practice is the client.config having a property called bodyLengthChecker. - * - * @returns content-length value for the body if possible. - * @throws Error and should be caught and handled if not possible to determine length. - */ - calculateContentLength(body, serdeContext) { - const bodyLengthCalculator = serdeContext?.bodyLengthChecker ?? import_util_body_length_browser.calculateBodyLength; - return String(bodyLengthCalculator(body)); - } - /** - * This is only for REST protocols. - * - * @param defaultContentType - of the protocol. - * @param inputSchema - schema for which to determine content type. - * - * @returns content-type header value or undefined when not applicable. - */ - 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 === void 0; - return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders; - }); - if (hasBody) { - return defaultContentType; - } - } - } - /** - * Shared code for finding error schema or throwing an unmodeled base error. - * @returns error schema and error metadata. - * - * @throws ServiceBaseException or generic Error if no error schema could be found. - */ - async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) { - let namespace = defaultNamespace; - let errorName = errorIdentifier; - if (errorIdentifier.includes("#")) { - [namespace, errorName] = errorIdentifier.split("#"); - } - const errorMetadata = { - $metadata: metadata, - $response: response, - $fault: response.statusCode < 500 ? "client" : "server" - }; - const registry = import_schema.TypeRegistry.for(namespace); - try { - const errorSchema = getErrorSchema?.(registry, errorName) ?? registry.getSchema(errorIdentifier); - return { errorSchema, errorMetadata }; - } catch (e) { - if (dataObject.Message) { - dataObject.message = dataObject.Message; - } - const baseExceptionSchema = import_schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); - if (baseExceptionSchema) { - const ErrorCtor = baseExceptionSchema.ctor; - throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject); - } - throw Object.assign(new Error(errorName), errorMetadata, dataObject); - } - } - /** - * Reads the x-amzn-query-error header for awsQuery compatibility. - * - * @param output - values that will be assigned to an error object. - * @param response - from which to read awsQueryError headers. - */ - setQueryCompatError(output, response) { - const queryErrorHeader = response.headers?.["x-amzn-query-error"]; - if (output !== void 0 && queryErrorHeader != null) { - const [Code, Type] = queryErrorHeader.split(";"); - const entries = Object.entries(output); - const Error2 = { - Code, - Type - }; - Object.assign(output, Error2); - for (const [k, v] of entries) { - Error2[k] = v; - } - delete Error2.__type; - output.Error = Error2; - } - } - /** - * Assigns Error, Type, Code from the awsQuery error object to the output error object. - * @param queryCompatErrorData - query compat error object. - * @param errorData - canonical error object returned to the caller. - */ - queryCompatOutput(queryCompatErrorData, errorData) { - if (queryCompatErrorData.Error) { - errorData.Error = queryCompatErrorData.Error; - } - if (queryCompatErrorData.Type) { - errorData.Type = queryCompatErrorData.Type; - } - if (queryCompatErrorData.Code) { - errorData.Code = queryCompatErrorData.Code; - } - } -}; - -// src/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.ts -var AwsSmithyRpcV2CborProtocol = class extends import_cbor.SmithyRpcV2CborProtocol { - static { - __name(this, "AwsSmithyRpcV2CborProtocol"); - } - awsQueryCompatible; - mixin = new ProtocolLib(); - constructor({ - defaultNamespace, - awsQueryCompatible - }) { - super({ defaultNamespace }); - this.awsQueryCompatible = !!awsQueryCompatible; - } - /** - * @override - */ - 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; - } - /** - * @override - */ - async handleError(operationSchema, context, response, dataObject, metadata) { - if (this.awsQueryCompatible) { - this.mixin.setQueryCompatError(dataObject, response); - } - const errorName = (0, import_cbor.loadSmithyRpcV2CborErrorCode)(response, dataObject) ?? "Unknown"; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( - errorName, - this.options.defaultNamespace, - response, - dataObject, - metadata - ); - const ns = import_schema2.NormalizedSchema.of(errorSchema); - const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const exception = new errorSchema.ctor(message); - const output = {}; - for (const [name, member] of ns.structIterator()) { - output[name] = this.deserializer.readValue(member, dataObject[name]); - } - if (this.awsQueryCompatible) { - this.mixin.queryCompatOutput(dataObject, output); - } - throw Object.assign( - exception, - errorMetadata, - { - $fault: ns.getMergedTraits().error, - message - }, - output - ); - } -}; - -// src/submodules/protocols/coercing-serializers.ts -var _toStr = /* @__PURE__ */ __name((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; -}, "_toStr"); -var _toBool = /* @__PURE__ */ __name((val) => { - if (val == null) { - return val; - } - if (typeof val === "number") { - } - 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; -}, "_toBool"); -var _toNum = /* @__PURE__ */ __name((val) => { - if (val == null) { - return val; - } - if (typeof val === "boolean") { - } - 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; -}, "_toNum"); - -// src/submodules/protocols/json/AwsJsonRpcProtocol.ts -var import_protocols3 = __nccwpck_require__(86752); -var import_schema5 = __nccwpck_require__(41320); - -// src/submodules/protocols/ConfigurableSerdeContext.ts -var SerdeContextConfig = class { - static { - __name(this, "SerdeContextConfig"); - } - serdeContext; - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; - } -}; - -// src/submodules/protocols/json/JsonShapeDeserializer.ts -var import_protocols = __nccwpck_require__(86752); -var import_schema3 = __nccwpck_require__(41320); -var import_serde2 = __nccwpck_require__(98520); -var import_util_base64 = __nccwpck_require__(82763); - -// src/submodules/protocols/json/jsonReviver.ts -var import_serde = __nccwpck_require__(98520); -function jsonReviver(key, value, context) { - if (context?.source) { - const numericString = context.source; - if (typeof value === "number") { - if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) { - const isFractional = numericString.includes("."); - if (isFractional) { - return new import_serde.NumericValue(numericString, "bigDecimal"); - } else { - return BigInt(numericString); - } - } - } - } - return value; -} -__name(jsonReviver, "jsonReviver"); - -// src/submodules/protocols/common.ts -var import_smithy_client = __nccwpck_require__(61411); -var import_util_utf8 = __nccwpck_require__(85339); -var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => (context?.utf8Encoder ?? import_util_utf8.toUtf8)(body)), "collectBodyString"); - -// src/submodules/protocols/json/parseJsonBody.ts -var parseJsonBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - try { - return JSON.parse(encoded); - } catch (e) { - if (e?.name === "SyntaxError") { - Object.defineProperty(e, "$responseBodyText", { - value: encoded - }); - } - throw e; - } - } - return {}; -}), "parseJsonBody"); -var parseJsonErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => { - const value = await parseJsonBody(errorBody, context); - value.message = value.message ?? value.Message; - return value; -}, "parseJsonErrorBody"); -var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => { - const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey"); - const sanitizeErrorCode = /* @__PURE__ */ __name((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; - }, "sanitizeErrorCode"); - const headerKey = findKey(output.headers, "x-amzn-errortype"); - if (headerKey !== void 0) { - return sanitizeErrorCode(output.headers[headerKey]); - } - if (data && typeof data === "object") { - const codeKey = findKey(data, "code"); - if (codeKey && data[codeKey] !== void 0) { - return sanitizeErrorCode(data[codeKey]); - } - if (data["__type"] !== void 0) { - return sanitizeErrorCode(data["__type"]); - } - } -}, "loadRestJsonErrorCode"); - -// src/submodules/protocols/json/JsonShapeDeserializer.ts -var JsonShapeDeserializer = class extends SerdeContextConfig { - constructor(settings) { - super(); - this.settings = settings; - } - static { - __name(this, "JsonShapeDeserializer"); - } - async read(schema, data) { - return this._read( - schema, - typeof data === "string" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext) - ); - } - readObject(schema, data) { - return this._read(schema, data); - } - _read(schema, value) { - const isObject = value !== null && typeof value === "object"; - const ns = import_schema3.NormalizedSchema.of(schema); - if (ns.isListSchema() && Array.isArray(value)) { - const listMember = ns.getValueSchema(); - const out = []; - const sparse = !!ns.getMergedTraits().sparse; - for (const item of value) { - if (sparse || item != null) { - out.push(this._read(listMember, item)); - } - } - return out; - } else if (ns.isMapSchema() && isObject) { - const mapMember = ns.getValueSchema(); - const out = {}; - const sparse = !!ns.getMergedTraits().sparse; - for (const [_k, _v] of Object.entries(value)) { - if (sparse || _v != null) { - out[_k] = this._read(mapMember, _v); - } - } - return out; - } else if (ns.isStructSchema() && isObject) { - const out = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; - const deserializedValue = this._read(memberSchema, value[fromKey]); - if (deserializedValue != null) { - out[memberName] = deserializedValue; - } - } - return out; - } - if (ns.isBlobSchema() && typeof value === "string") { - return (0, import_util_base64.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 import_serde2.LazyJsonString.from(value); - } - } - if (ns.isTimestampSchema() && value != null) { - const format = (0, import_protocols.determineTimestampFormat)(ns, this.settings); - switch (format) { - case import_schema3.SCHEMA.TIMESTAMP_DATE_TIME: - return (0, import_serde2.parseRfc3339DateTimeWithOffset)(value); - case import_schema3.SCHEMA.TIMESTAMP_HTTP_DATE: - return (0, import_serde2.parseRfc7231DateTime)(value); - case import_schema3.SCHEMA.TIMESTAMP_EPOCH_SECONDS: - return (0, import_serde2.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 != void 0) { - if (value instanceof import_serde2.NumericValue) { - return value; - } - const untyped = value; - if (untyped.type === "bigDecimal" && "string" in untyped) { - return new import_serde2.NumericValue(untyped.string, untyped.type); - } - return new import_serde2.NumericValue(String(value), "bigDecimal"); - } - if (ns.isNumericSchema() && typeof value === "string") { - switch (value) { - case "Infinity": - return Infinity; - case "-Infinity": - return -Infinity; - case "NaN": - return NaN; - } - } - if (ns.isDocumentSchema()) { - if (isObject) { - const out = Array.isArray(value) ? [] : {}; - for (const [k, v] of Object.entries(value)) { - if (v instanceof import_serde2.NumericValue) { - out[k] = v; - } else { - out[k] = this._read(ns, v); - } - } - return out; - } else { - return structuredClone(value); - } - } - return value; - } -}; - -// src/submodules/protocols/json/JsonShapeSerializer.ts -var import_protocols2 = __nccwpck_require__(86752); -var import_schema4 = __nccwpck_require__(41320); -var import_serde4 = __nccwpck_require__(98520); -var import_util_base642 = __nccwpck_require__(82763); - -// src/submodules/protocols/json/jsonReplacer.ts -var import_serde3 = __nccwpck_require__(98520); -var NUMERIC_CONTROL_CHAR = String.fromCharCode(925); -var JsonReplacer = class { - static { - __name(this, "JsonReplacer"); - } - /** - * Stores placeholder key to true serialized value lookup. - */ - values = /* @__PURE__ */ new Map(); - counter = 0; - stage = 0; - /** - * Creates a jsonReplacer function that reserves big integer and big decimal values - * for later replacement. - */ - 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 import_serde3.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; - }; - } - /** - * Replaces placeholder keys with their true values. - */ - 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; - } -}; - -// src/submodules/protocols/json/JsonShapeSerializer.ts -var JsonShapeSerializer = class extends SerdeContextConfig { - constructor(settings) { - super(); - this.settings = settings; - } - static { - __name(this, "JsonShapeSerializer"); - } - buffer; - rootSchema; - write(schema, value) { - this.rootSchema = import_schema4.NormalizedSchema.of(schema); - this.buffer = this._write(this.rootSchema, value); - } - /** - * @internal - */ - writeDiscriminatedDocument(schema, value) { - this.write(schema, value); - if (typeof this.buffer === "object") { - this.buffer.__type = import_schema4.NormalizedSchema.of(schema).getName(true); - } - } - flush() { - const { rootSchema } = this; - this.rootSchema = void 0; - if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) { - const replacer = new JsonReplacer(); - return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0)); - } - return this.buffer; - } - _write(schema, value, container) { - const isObject = value !== null && typeof value === "object"; - const ns = import_schema4.NormalizedSchema.of(schema); - if (ns.isListSchema() && Array.isArray(value)) { - 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; - } else if (ns.isMapSchema() && isObject) { - const mapMember = ns.getValueSchema(); - const out = {}; - const sparse = !!ns.getMergedTraits().sparse; - for (const [_k, _v] of Object.entries(value)) { - if (sparse || _v != null) { - out[_k] = this._write(mapMember, _v); - } - } - return out; - } else if (ns.isStructSchema() && isObject) { - const out = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; - const serializableValue = this._write(memberSchema, value[memberName], ns); - if (serializableValue !== void 0) { - out[targetKey] = serializableValue; - } - } - return out; - } - if (value === null && container?.isStructSchema()) { - return void 0; - } - if (ns.isBlobSchema() && (value instanceof Uint8Array || typeof value === "string") || ns.isDocumentSchema() && value instanceof Uint8Array) { - if (ns === this.rootSchema) { - return value; - } - if (!this.serdeContext?.base64Encoder) { - return (0, import_util_base642.toBase64)(value); - } - return this.serdeContext?.base64Encoder(value); - } - if ((ns.isTimestampSchema() || ns.isDocumentSchema()) && value instanceof Date) { - const format = (0, import_protocols2.determineTimestampFormat)(ns, this.settings); - switch (format) { - case import_schema4.SCHEMA.TIMESTAMP_DATE_TIME: - return value.toISOString().replace(".000Z", "Z"); - case import_schema4.SCHEMA.TIMESTAMP_HTTP_DATE: - return (0, import_serde4.dateToUtcString)(value); - case import_schema4.SCHEMA.TIMESTAMP_EPOCH_SECONDS: - return value.getTime() / 1e3; - default: - console.warn("Missing timestamp format, using epoch seconds", value); - return value.getTime() / 1e3; - } - } - if (ns.isNumericSchema() && typeof value === "number") { - if (Math.abs(value) === Infinity || isNaN(value)) { - return String(value); - } - } - if (ns.isStringSchema()) { - if (typeof value === "undefined" && ns.isIdempotencyToken()) { - return (0, import_serde4.generateIdempotencyToken)(); - } - const mediaType = ns.getMergedTraits().mediaType; - if (typeof value === "string" && mediaType) { - const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); - if (isJson) { - return import_serde4.LazyJsonString.from(value); - } - } - } - if (ns.isDocumentSchema()) { - if (isObject) { - const out = Array.isArray(value) ? [] : {}; - for (const [k, v] of Object.entries(value)) { - if (v instanceof import_serde4.NumericValue) { - out[k] = v; - } else { - out[k] = this._write(ns, v); - } - } - return out; - } else { - return structuredClone(value); - } - } - return value; - } -}; - -// src/submodules/protocols/json/JsonCodec.ts -var JsonCodec = class extends SerdeContextConfig { - constructor(settings) { - super(); - this.settings = settings; - } - static { - __name(this, "JsonCodec"); - } - 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; - } -}; - -// src/submodules/protocols/json/AwsJsonRpcProtocol.ts -var AwsJsonRpcProtocol = class extends import_protocols3.RpcProtocol { - static { - __name(this, "AwsJsonRpcProtocol"); - } - serializer; - deserializer; - serviceTarget; - codec; - mixin = new ProtocolLib(); - awsQueryCompatible; - constructor({ - defaultNamespace, - serviceTarget, - awsQueryCompatible - }) { - super({ - defaultNamespace - }); - this.serviceTarget = serviceTarget; - this.codec = new JsonCodec({ - timestampFormat: { - useTrait: true, - default: import_schema5.SCHEMA.TIMESTAMP_EPOCH_SECONDS - }, - jsonName: false - }); - this.serializer = this.codec.createSerializer(); - this.deserializer = this.codec.createDeserializer(); - this.awsQueryCompatible = !!awsQueryCompatible; - } - async serializeRequest(operationSchema, input, context) { - const request = await super.serializeRequest(operationSchema, input, context); - if (!request.path.endsWith("/")) { - request.path += "/"; - } - Object.assign(request.headers, { - "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`, - "x-amz-target": `${this.serviceTarget}.${import_schema5.NormalizedSchema.of(operationSchema).getName()}` - }); - if (this.awsQueryCompatible) { - request.headers["x-amzn-query-mode"] = "true"; - } - if ((0, import_schema5.deref)(operationSchema.input) === "unit" || !request.body) { - request.body = "{}"; - } - try { - request.headers["content-length"] = this.mixin.calculateContentLength(request.body, this.serdeContext); - } catch (e) { - } - return request; - } - getPayloadCodec() { - return this.codec; - } - async handleError(operationSchema, context, response, dataObject, metadata) { - if (this.awsQueryCompatible) { - this.mixin.setQueryCompatError(dataObject, response); - } - const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( - errorIdentifier, - this.options.defaultNamespace, - response, - dataObject, - metadata - ); - const ns = import_schema5.NormalizedSchema.of(errorSchema); - const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const exception = new errorSchema.ctor(message); - const output = {}; - for (const [name, member] of ns.structIterator()) { - const target = member.getMergedTraits().jsonName ?? name; - output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); - } - if (this.awsQueryCompatible) { - this.mixin.queryCompatOutput(dataObject, output); - } - throw Object.assign( - exception, - errorMetadata, - { - $fault: ns.getMergedTraits().error, - message - }, - output - ); - } -}; - -// src/submodules/protocols/json/AwsJson1_0Protocol.ts -var AwsJson1_0Protocol = class extends AwsJsonRpcProtocol { - static { - __name(this, "AwsJson1_0Protocol"); - } - constructor({ - defaultNamespace, - serviceTarget, - awsQueryCompatible - }) { - super({ - defaultNamespace, - serviceTarget, - awsQueryCompatible - }); - } - getShapeId() { - return "aws.protocols#awsJson1_0"; - } - getJsonRpcVersion() { - return "1.0"; - } - /** - * @override - */ - getDefaultContentType() { - return "application/x-amz-json-1.0"; - } -}; - -// src/submodules/protocols/json/AwsJson1_1Protocol.ts -var AwsJson1_1Protocol = class extends AwsJsonRpcProtocol { - static { - __name(this, "AwsJson1_1Protocol"); - } - constructor({ - defaultNamespace, - serviceTarget, - awsQueryCompatible - }) { - super({ - defaultNamespace, - serviceTarget, - awsQueryCompatible - }); - } - getShapeId() { - return "aws.protocols#awsJson1_1"; - } - getJsonRpcVersion() { - return "1.1"; - } - /** - * @override - */ - getDefaultContentType() { - return "application/x-amz-json-1.1"; - } -}; - -// src/submodules/protocols/json/AwsRestJsonProtocol.ts -var import_protocols4 = __nccwpck_require__(86752); -var import_schema6 = __nccwpck_require__(41320); -var AwsRestJsonProtocol = class extends import_protocols4.HttpBindingProtocol { - static { - __name(this, "AwsRestJsonProtocol"); - } - serializer; - deserializer; - codec; - mixin = new ProtocolLib(); - constructor({ defaultNamespace }) { - super({ - defaultNamespace - }); - const settings = { - timestampFormat: { - useTrait: true, - default: import_schema6.SCHEMA.TIMESTAMP_EPOCH_SECONDS - }, - httpBindings: true, - jsonName: true - }; - this.codec = new JsonCodec(settings); - this.serializer = new import_protocols4.HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); - this.deserializer = new import_protocols4.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 = import_schema6.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.headers["content-type"] && !request.body) { - request.body = "{}"; - } - if (request.body) { - try { - request.headers["content-length"] = this.mixin.calculateContentLength(request.body, this.serdeContext); - } catch (e) { - } - } - return request; - } - async handleError(operationSchema, context, response, dataObject, metadata) { - const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( - errorIdentifier, - this.options.defaultNamespace, - response, - dataObject, - metadata - ); - const ns = import_schema6.NormalizedSchema.of(errorSchema); - const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const exception = new errorSchema.ctor(message); - await this.deserializeHttpMessage(errorSchema, context, response, dataObject); - const output = {}; - for (const [name, member] of ns.structIterator()) { - const target = member.getMergedTraits().jsonName ?? name; - output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); - } - throw Object.assign( - exception, - errorMetadata, - { - $fault: ns.getMergedTraits().error, - message - }, - output - ); - } - /** - * @override - */ - getDefaultContentType() { - return "application/json"; - } -}; - -// src/submodules/protocols/json/awsExpectUnion.ts -var import_smithy_client2 = __nccwpck_require__(61411); -var awsExpectUnion = /* @__PURE__ */ __name((value) => { - if (value == null) { - return void 0; - } - if (typeof value === "object" && "__type" in value) { - delete value.__type; - } - return (0, import_smithy_client2.expectUnion)(value); -}, "awsExpectUnion"); - -// src/submodules/protocols/query/AwsQueryProtocol.ts -var import_protocols7 = __nccwpck_require__(86752); -var import_schema9 = __nccwpck_require__(41320); - -// src/submodules/protocols/xml/XmlShapeDeserializer.ts -var import_protocols5 = __nccwpck_require__(86752); -var import_schema7 = __nccwpck_require__(41320); -var import_smithy_client3 = __nccwpck_require__(61411); -var import_util_utf82 = __nccwpck_require__(85339); -var import_fast_xml_parser = __nccwpck_require__(50591); -var XmlShapeDeserializer = class extends SerdeContextConfig { - constructor(settings) { - super(); - this.settings = settings; - this.stringDeserializer = new import_protocols5.FromStringShapeDeserializer(settings); - } - static { - __name(this, "XmlShapeDeserializer"); - } - stringDeserializer; - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; - this.stringDeserializer.setSerdeContext(serdeContext); - } - /** - * @param schema - describing the data. - * @param bytes - serialized data. - * @param key - used by AwsQuery to step one additional depth into the object before reading it. - */ - read(schema, bytes, key) { - const ns = import_schema7.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 ?? import_util_utf82.toUtf8)(bytes); - const parsedObject = this.parseXml(xmlString); - return this.readSchema(schema, key ? parsedObject[key] : parsedObject); - } - readSchema(_schema, value) { - const ns = import_schema7.NormalizedSchema.of(_schema); - 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 sparse = !!traits.sparse; - const flat = !!traits.xmlFlattened; - if (ns.isListSchema()) { - const listValue = ns.getValueSchema(); - const buffer2 = []; - const sourceKey = listValue.getMergedTraits().xmlName ?? "member"; - const source = flat ? value : (value[0] ?? value)[sourceKey]; - const sourceArray = Array.isArray(source) ? source : [source]; - for (const v of sourceArray) { - if (v != null || sparse) { - buffer2.push(this.readSchema(listValue, v)); - } - } - return buffer2; - } - 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 value2 = entry[valueProperty]; - if (value2 != null || sparse) { - buffer[key] = this.readSchema(memberNs, value2); - } - } - return buffer; - } - if (ns.isStructSchema()) { - for (const [memberName, memberSchema] of ns.structIterator()) { - const memberTraits = memberSchema.getMergedTraits(); - const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName(); - if (value[xmlObjectKey] != null) { - buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]); - } - } - 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) { - const parser = new import_fast_xml_parser.XMLParser({ - attributeNamePrefix: "", - htmlEntities: true, - ignoreAttributes: false, - ignoreDeclaration: true, - parseTagValue: false, - trimValues: false, - tagValueProcessor: /* @__PURE__ */ __name((_, val) => val.trim() === "" && val.includes("\n") ? "" : void 0, "tagValueProcessor") - }); - parser.addEntity("#xD", "\r"); - parser.addEntity("#10", "\n"); - let parsedObj; - try { - parsedObj = parser.parse(xml, true); - } 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 (0, import_smithy_client3.getValueFromTextNode)(parsedObjToReturn); - } - return {}; - } -}; - -// src/submodules/protocols/query/QueryShapeSerializer.ts -var import_protocols6 = __nccwpck_require__(86752); -var import_schema8 = __nccwpck_require__(41320); -var import_serde5 = __nccwpck_require__(98520); -var import_smithy_client4 = __nccwpck_require__(61411); -var import_util_base643 = __nccwpck_require__(82763); -var QueryShapeSerializer = class extends SerdeContextConfig { - constructor(settings) { - super(); - this.settings = settings; - } - static { - __name(this, "QueryShapeSerializer"); - } - buffer; - write(schema, value, prefix = "") { - if (this.buffer === void 0) { - this.buffer = ""; - } - const ns = import_schema8.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 ?? import_util_base643.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((0, import_serde5.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 import_serde5.NumericValue ? value.string : String(value)); - } - } else if (ns.isTimestampSchema()) { - if (value instanceof Date) { - this.writeKey(prefix); - const format = (0, import_protocols6.determineTimestampFormat)(ns, this.settings); - switch (format) { - case import_schema8.SCHEMA.TIMESTAMP_DATE_TIME: - this.writeValue(value.toISOString().replace(".000Z", "Z")); - break; - case import_schema8.SCHEMA.TIMESTAMP_HTTP_DATE: - this.writeValue((0, import_smithy_client4.dateToUtcString)(value)); - break; - case import_schema8.SCHEMA.TIMESTAMP_EPOCH_SECONDS: - this.writeValue(String(value.getTime() / 1e3)); - break; - } - } - } else if (ns.isDocumentSchema()) { - throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${ns.getName(true)}`); - } 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 suffix = this.getKey("member", member.getMergedTraits().xmlName); - 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, v] of Object.entries(value)) { - if (v == null) { - continue; - } - const keySuffix = this.getKey("key", keySchema.getMergedTraits().xmlName); - const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`; - const valueSuffix = this.getKey("value", memberSchema.getMergedTraits().xmlName); - 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") { - for (const [memberName, member] of ns.structIterator()) { - if (value[memberName] == null && !member.isIdempotencyToken()) { - continue; - } - const suffix = this.getKey(memberName, member.getMergedTraits().xmlName); - const key = `${prefix}${suffix}`; - this.write(member, value[memberName], key); - } - } - } else if (ns.isUnitSchema()) { - } else { - throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`); - } - } - flush() { - if (this.buffer === void 0) { - 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) { - const key = xmlName ?? memberName; - if (this.settings.capitalizeKeys) { - return key[0].toUpperCase() + key.slice(1); - } - return key; - } - writeKey(key) { - if (key.endsWith(".")) { - key = key.slice(0, key.length - 1); - } - this.buffer += `&${(0, import_protocols6.extendedEncodeURIComponent)(key)}=`; - } - writeValue(value) { - this.buffer += (0, import_protocols6.extendedEncodeURIComponent)(value); - } -}; - -// src/submodules/protocols/query/AwsQueryProtocol.ts -var AwsQueryProtocol = class extends import_protocols7.RpcProtocol { - constructor(options) { - super({ - defaultNamespace: options.defaultNamespace - }); - this.options = options; - const settings = { - timestampFormat: { - useTrait: true, - default: import_schema9.SCHEMA.TIMESTAMP_DATE_TIME - }, - httpBindings: false, - xmlNamespace: options.xmlNamespace, - serviceNamespace: options.defaultNamespace, - serializeEmptyLists: true - }; - this.serializer = new QueryShapeSerializer(settings); - this.deserializer = new XmlShapeDeserializer(settings); - } - static { - __name(this, "AwsQueryProtocol"); - } - serializer; - deserializer; - mixin = new ProtocolLib(); - 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 += "/"; - } - Object.assign(request.headers, { - "content-type": `application/x-www-form-urlencoded` - }); - if ((0, import_schema9.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); - } - try { - request.headers["content-length"] = this.mixin.calculateContentLength(request.body, this.serdeContext); - } catch (e) { - } - return request; - } - async deserializeResponse(operationSchema, context, response) { - const deserializer = this.deserializer; - const ns = import_schema9.NormalizedSchema.of(operationSchema.output); - const dataObject = {}; - if (response.statusCode >= 300) { - const bytes2 = await (0, import_protocols7.collectBody)(response.body, context); - if (bytes2.byteLength > 0) { - Object.assign(dataObject, await deserializer.read(import_schema9.SCHEMA.DOCUMENT, bytes2)); - } - 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" : void 0; - const bytes = await (0, import_protocols7.collectBody)(response.body, context); - if (bytes.byteLength > 0) { - Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey)); - } - const output = { - $metadata: this.deserializeMetadata(response), - ...dataObject - }; - return output; - } - /** - * EC2 Query overrides this. - */ - useNestedResult() { - return true; - } - async handleError(operationSchema, context, response, dataObject, metadata) { - const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown"; - const errorData = this.loadQueryError(dataObject); - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( - errorIdentifier, - this.options.defaultNamespace, - response, - errorData, - metadata, - (registry, errorName) => registry.find( - (schema) => import_schema9.NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName - ) - ); - const ns = import_schema9.NormalizedSchema.of(errorSchema); - const message = this.loadQueryErrorMessage(dataObject); - const exception = new errorSchema.ctor(message); - const output = {}; - 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 Object.assign( - exception, - errorMetadata, - { - $fault: ns.getMergedTraits().error, - message - }, - output - ); - } - /** - * The variations in the error and error message locations are attributed to - * divergence between AWS Query and EC2 Query behavior. - */ - loadQueryErrorCode(output, data) { - const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code; - if (code !== void 0) { - 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"; - } - /** - * @override - */ - getDefaultContentType() { - return "application/x-www-form-urlencoded"; - } -}; - -// src/submodules/protocols/query/AwsEc2QueryProtocol.ts -var AwsEc2QueryProtocol = class extends AwsQueryProtocol { - constructor(options) { - super(options); - this.options = options; - const ec2Settings = { - capitalizeKeys: true, - flattenLists: true, - serializeEmptyLists: false - }; - Object.assign(this.serializer.settings, ec2Settings); - } - static { - __name(this, "AwsEc2QueryProtocol"); - } - /** - * EC2 Query reads XResponse.XResult instead of XResponse directly. - */ - useNestedResult() { - return false; - } -}; - -// src/submodules/protocols/xml/AwsRestXmlProtocol.ts -var import_protocols9 = __nccwpck_require__(86752); -var import_schema11 = __nccwpck_require__(41320); - -// src/submodules/protocols/xml/parseXmlBody.ts -var import_smithy_client5 = __nccwpck_require__(61411); -var import_fast_xml_parser2 = __nccwpck_require__(50591); -var parseXmlBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - const parser = new import_fast_xml_parser2.XMLParser({ - attributeNamePrefix: "", - htmlEntities: true, - ignoreAttributes: false, - ignoreDeclaration: true, - parseTagValue: false, - trimValues: false, - tagValueProcessor: /* @__PURE__ */ __name((_, val) => val.trim() === "" && val.includes("\n") ? "" : void 0, "tagValueProcessor") - }); - parser.addEntity("#xD", "\r"); - parser.addEntity("#10", "\n"); - let parsedObj; - try { - parsedObj = parser.parse(encoded, true); - } 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 (0, import_smithy_client5.getValueFromTextNode)(parsedObjToReturn); - } - return {}; -}), "parseXmlBody"); -var parseXmlErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => { - const value = await parseXmlBody(errorBody, context); - if (value.Error) { - value.Error.message = value.Error.message ?? value.Error.Message; - } - return value; -}, "parseXmlErrorBody"); -var loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => { - if (data?.Error?.Code !== void 0) { - return data.Error.Code; - } - if (data?.Code !== void 0) { - return data.Code; - } - if (output.statusCode == 404) { - return "NotFound"; - } -}, "loadRestXmlErrorCode"); - -// src/submodules/protocols/xml/XmlShapeSerializer.ts -var import_xml_builder = __nccwpck_require__(2344); -var import_protocols8 = __nccwpck_require__(86752); -var import_schema10 = __nccwpck_require__(41320); -var import_serde6 = __nccwpck_require__(98520); -var import_smithy_client6 = __nccwpck_require__(61411); -var import_util_base644 = __nccwpck_require__(82763); -var XmlShapeSerializer = class extends SerdeContextConfig { - constructor(settings) { - super(); - this.settings = settings; - } - static { - __name(this, "XmlShapeSerializer"); - } - stringBuffer; - byteBuffer; - buffer; - write(schema, value) { - const ns = import_schema10.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 ?? import_util_base644.fromBase64)(value); - } else { - this.buffer = this.writeStruct(ns, value, void 0); - const traits = ns.getMergedTraits(); - if (traits.httpPayload && !traits.xmlName) { - this.buffer.withName(ns.getName()); - } - } - } - flush() { - if (this.byteBuffer !== void 0) { - const bytes = this.byteBuffer; - delete this.byteBuffer; - return bytes; - } - if (this.stringBuffer !== void 0) { - 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 = import_xml_builder.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 = import_xml_builder.XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName()); - this.writeSimpleInto(memberSchema, val, memberNode, xmlns); - structXmlNode.addChildNode(memberNode); - } - } - } - 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 = /* @__PURE__ */ __name((container2, value) => { - if (listValueSchema.isListSchema()) { - this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container2, xmlns); - } else if (listValueSchema.isMapSchema()) { - this.writeMap(listValueSchema, value, container2, xmlns); - } else if (listValueSchema.isStructSchema()) { - const struct = this.writeStruct(listValueSchema, value, xmlns); - container2.addChildNode( - struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member") - ); - } else { - const listItemNode = import_xml_builder.XmlNode.of( - flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member" - ); - this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns); - container2.addChildNode(listItemNode); - } - }, "writeItem"); - if (flat) { - for (const value of array) { - if (sparse || value != null) { - writeItem(container, value); - } - } - } else { - const listNode = import_xml_builder.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 = /* @__PURE__ */ __name((entry, key, val) => { - const keyNode = import_xml_builder.XmlNode.of(keyTag, key); - const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns); - if (keyXmlns) { - keyNode.addAttribute(keyXmlnsAttr, keyXmlns); - } - entry.addChildNode(keyNode); - let valueNode = import_xml_builder.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); - }, "addKeyValue"); - if (flat) { - for (const [key, val] of Object.entries(map)) { - if (sparse || val != null) { - const entry = import_xml_builder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); - addKeyValue(entry, key, val); - container.addChildNode(entry); - } - } - } else { - let mapNode; - if (!containerIsMap) { - mapNode = import_xml_builder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); - if (xmlns) { - mapNode.addAttribute(xmlnsAttr, xmlns); - } - container.addChildNode(mapNode); - } - for (const [key, val] of Object.entries(map)) { - if (sparse || val != null) { - const entry = import_xml_builder.XmlNode.of("entry"); - addKeyValue(entry, key, val); - (containerIsMap ? container : mapNode).addChildNode(entry); - } - } - } - } - writeSimple(_schema, value) { - if (null === value) { - throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value."); - } - const ns = import_schema10.NormalizedSchema.of(_schema); - let nodeContents = null; - if (value && typeof value === "object") { - if (ns.isBlobSchema()) { - nodeContents = (this.serdeContext?.base64Encoder ?? import_util_base644.toBase64)(value); - } else if (ns.isTimestampSchema() && value instanceof Date) { - const format = (0, import_protocols8.determineTimestampFormat)(ns, this.settings); - switch (format) { - case import_schema10.SCHEMA.TIMESTAMP_DATE_TIME: - nodeContents = value.toISOString().replace(".000Z", "Z"); - break; - case import_schema10.SCHEMA.TIMESTAMP_HTTP_DATE: - nodeContents = (0, import_smithy_client6.dateToUtcString)(value); - break; - case import_schema10.SCHEMA.TIMESTAMP_EPOCH_SECONDS: - nodeContents = String(value.getTime() / 1e3); - break; - default: - console.warn("Missing timestamp format, using http date", value); - nodeContents = (0, import_smithy_client6.dateToUtcString)(value); - break; - } - } else if (ns.isBigDecimalSchema() && value) { - if (value instanceof import_serde6.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 === void 0 && ns.isIdempotencyToken()) { - nodeContents = (0, import_serde6.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 = import_schema10.NormalizedSchema.of(_schema); - const content = new import_xml_builder.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 [void 0, void 0]; - } -}; - -// src/submodules/protocols/xml/XmlCodec.ts -var XmlCodec = class extends SerdeContextConfig { - constructor(settings) { - super(); - this.settings = settings; - } - static { - __name(this, "XmlCodec"); - } - 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; - } -}; - -// src/submodules/protocols/xml/AwsRestXmlProtocol.ts -var AwsRestXmlProtocol = class extends import_protocols9.HttpBindingProtocol { - static { - __name(this, "AwsRestXmlProtocol"); - } - codec; - serializer; - deserializer; - mixin = new ProtocolLib(); - constructor(options) { - super(options); - const settings = { - timestampFormat: { - useTrait: true, - default: import_schema11.SCHEMA.TIMESTAMP_DATE_TIME - }, - httpBindings: true, - xmlNamespace: options.xmlNamespace, - serviceNamespace: options.defaultNamespace - }; - this.codec = new XmlCodec(settings); - this.serializer = new import_protocols9.HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); - this.deserializer = new import_protocols9.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 = import_schema11.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.headers["content-type"] === this.getDefaultContentType()) { - if (typeof request.body === "string") { - request.body = '' + request.body; - } - } - if (request.body) { - try { - request.headers["content-length"] = this.mixin.calculateContentLength(request.body, this.serdeContext); - } catch (e) { - } - } - 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"; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( - errorIdentifier, - this.options.defaultNamespace, - response, - dataObject, - metadata - ); - const ns = import_schema11.NormalizedSchema.of(errorSchema); - const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; - const exception = new errorSchema.ctor(message); - await this.deserializeHttpMessage(errorSchema, context, response, dataObject); - const output = {}; - for (const [name, member] of ns.structIterator()) { - const target = member.getMergedTraits().xmlName ?? name; - const value = dataObject.Error?.[target] ?? dataObject[target]; - output[name] = this.codec.createDeserializer().readSchema(member, value); - } - throw Object.assign( - exception, - errorMetadata, - { - $fault: ns.getMergedTraits().error, - message - }, - output - ); - } - /** - * @override - */ - getDefaultContentType() { - return "application/xml"; - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 56104: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, - ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, - ENV_EXPIRATION: () => ENV_EXPIRATION, - ENV_KEY: () => ENV_KEY, - ENV_SECRET: () => ENV_SECRET, - ENV_SESSION: () => ENV_SESSION, - fromEnv: () => fromEnv -}); -module.exports = __toCommonJS(index_exports); - -// src/fromEnv.ts -var import_client = __nccwpck_require__(17582); -var import_property_provider = __nccwpck_require__(1104); -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 = /* @__PURE__ */ __name((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 } - }; - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g"); - return credentials; - } - throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); -}, "fromEnv"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 24815: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.checkUrl = void 0; -const property_provider_1 = __nccwpck_require__(1104); -const LOOPBACK_CIDR_IPv4 = "127.0.0.0/8"; -const LOOPBACK_CIDR_IPv6 = "::1/128"; -const ECS_CONTAINER_HOST = "169.254.170.2"; -const EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; -const EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; -const 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 property_provider_1.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 }); -}; -exports.checkUrl = checkUrl; - - -/***/ }), - -/***/ 57030: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromHttp = void 0; -const tslib_1 = __nccwpck_require__(61860); -const client_1 = __nccwpck_require__(17582); -const node_http_handler_1 = __nccwpck_require__(95493); -const property_provider_1 = __nccwpck_require__(1104); -const promises_1 = tslib_1.__importDefault(__nccwpck_require__(91943)); -const checkUrl_1 = __nccwpck_require__(24815); -const requestHelpers_1 = __nccwpck_require__(94604); -const retry_wrapper_1 = __nccwpck_require__(98692); -const AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; -const DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; -const AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; -const AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; -const AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; -const 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("awsContainerCredentialsFullUri will take precedence."); - } - if (token && tokenFile) { - warn("@aws-sdk/credential-provider-http: " + - "you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); - warn("awsContainerAuthorizationToken will take precedence."); - } - if (full) { - host = full; - } - else if (relative) { - host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; - } - else { - throw new property_provider_1.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); - (0, checkUrl_1.checkUrl)(url, options.logger); - const requestHandler = new node_http_handler_1.NodeHttpHandler({ - requestTimeout: options.timeout ?? 1000, - connectionTimeout: options.timeout ?? 1000, - }); - return (0, retry_wrapper_1.retryWrapper)(async () => { - const request = (0, requestHelpers_1.createGetRequest)(url); - if (token) { - request.headers.Authorization = token; - } - else if (tokenFile) { - request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); - } - try { - const result = await requestHandler.handle(request); - return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_HTTP", "z")); - } - catch (e) { - throw new property_provider_1.CredentialsProviderError(String(e), { logger: options.logger }); - } - }, options.maxRetries ?? 3, options.timeout ?? 1000); -}; -exports.fromHttp = fromHttp; - - -/***/ }), - -/***/ 94604: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createGetRequest = createGetRequest; -exports.getCredentials = getCredentials; -const property_provider_1 = __nccwpck_require__(1104); -const protocol_http_1 = __nccwpck_require__(13494); -const smithy_client_1 = __nccwpck_require__(61411); -const util_stream_1 = __nccwpck_require__(71914); -function createGetRequest(url) { - return new protocol_http_1.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 = (0, util_stream_1.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 property_provider_1.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: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration), - }; - } - if (response.statusCode >= 400 && response.statusCode < 500) { - let parsedBody = {}; - try { - parsedBody = JSON.parse(str); - } - catch (e) { } - throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), { - Code: parsedBody.Code, - Message: parsedBody.Message, - }); - } - throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }); -} - - -/***/ }), - -/***/ 98692: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.retryWrapper = void 0; -const 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(); - }; -}; -exports.retryWrapper = retryWrapper; - - -/***/ }), - -/***/ 60795: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromHttp = void 0; -var fromHttp_1 = __nccwpck_require__(57030); -Object.defineProperty(exports, "fromHttp", ({ enumerable: true, get: function () { return fromHttp_1.fromHttp; } })); - - -/***/ }), - -/***/ 26163: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - fromIni: () => fromIni -}); -module.exports = __toCommonJS(index_exports); - -// src/fromIni.ts - - -// src/resolveProfileData.ts - - -// src/resolveAssumeRoleCredentials.ts - - -var import_shared_ini_file_loader = __nccwpck_require__(93438); - -// src/resolveCredentialSource.ts -var import_client = __nccwpck_require__(17582); -var import_property_provider = __nccwpck_require__(1104); -var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName, logger) => { - const sourceProvidersMap = { - EcsContainer: /* @__PURE__ */ __name(async (options) => { - const { fromHttp } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(60795))); - const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(40566))); - logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"); - return async () => (0, import_property_provider.chain)(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider); - }, "EcsContainer"), - Ec2InstanceMetadata: /* @__PURE__ */ __name(async (options) => { - logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata"); - const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(40566))); - return async () => fromInstanceMetadata(options)().then(setNamedProvider); - }, "Ec2InstanceMetadata"), - Environment: /* @__PURE__ */ __name(async (options) => { - logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment"); - const { fromEnv } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(56104))); - return async () => fromEnv(options)().then(setNamedProvider); - }, "Environment") - }; - if (credentialSource in sourceProvidersMap) { - return sourceProvidersMap[credentialSource]; - } else { - throw new import_property_provider.CredentialsProviderError( - `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, - { logger } - ); - } -}, "resolveCredentialSource"); -var setNamedProvider = /* @__PURE__ */ __name((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p"), "setNamedProvider"); - -// src/resolveAssumeRoleCredentials.ts -var isAssumeRoleProfile = /* @__PURE__ */ __name((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 })); -}, "isAssumeRoleProfile"); -var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((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; -}, "isAssumeRoleWithSourceProfile"); -var isCredentialSourceProfile = /* @__PURE__ */ __name((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; -}, "isCredentialSourceProfile"); -var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { - options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)"); - const profileData = profiles[profileName]; - const { source_profile, region } = profileData; - if (!options.roleAssumer) { - const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(31058))); - options.roleAssumer = getDefaultRoleAssumer( - { - ...options.clientConfig, - credentialProviderLogger: options.logger, - parentClientConfig: { - ...options?.parentClientConfig, - region: region ?? options?.parentClientConfig?.region - } - }, - options.clientPlugins - ); - } - if (source_profile && source_profile in visitedProfiles) { - throw new import_property_provider.CredentialsProviderError( - `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.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, - { - ...visitedProfiles, - [source_profile]: true - }, - isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}) - ) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))(); - if (isCredentialSourceWithoutRoleArn(profileData)) { - return sourceCredsProvider.then((creds) => (0, import_client.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 import_property_provider.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) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o") - ); - } -}, "resolveAssumeRoleCredentials"); -var isCredentialSourceWithoutRoleArn = /* @__PURE__ */ __name((section) => { - return !section.role_arn && !!section.credential_source; -}, "isCredentialSourceWithoutRoleArn"); - -// src/resolveProcessCredentials.ts - -var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile"); -var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(__nccwpck_require__(15630))).then( - ({ fromProcess }) => fromProcess({ - ...options, - profile - })().then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_PROCESS", "v")) -), "resolveProcessCredentials"); - -// src/resolveSsoCredentials.ts - -var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, profileData, options = {}) => { - const { fromSSO } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(8212))); - return fromSSO({ - profile, - logger: options.logger, - parentClientConfig: options.parentClientConfig, - clientConfig: options.clientConfig - })().then((creds) => { - if (profileData.sso_session) { - return (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO", "r"); - } else { - return (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t"); - } - }); -}, "resolveSsoCredentials"); -var isSsoProfile = /* @__PURE__ */ __name((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"), "isSsoProfile"); - -// src/resolveStaticCredentials.ts - -var isStaticCredsProfile = /* @__PURE__ */ __name((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, "isStaticCredsProfile"); -var resolveStaticCredentials = /* @__PURE__ */ __name(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 (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_PROFILE", "n"); -}, "resolveStaticCredentials"); - -// src/resolveWebIdentityCredentials.ts - -var isWebIdentityProfile = /* @__PURE__ */ __name((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, "isWebIdentityProfile"); -var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(__nccwpck_require__(47654))).then( - ({ fromTokenFile }) => 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 - })().then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")) -), "resolveWebIdentityCredentials"); - -// src/resolveProfileData.ts -var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, 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, visitedProfiles); - } - if (isStaticCredsProfile(data)) { - return resolveStaticCredentials(data, options); - } - if (isWebIdentityProfile(data)) { - return resolveWebIdentityCredentials(data, options); - } - if (isProcessProfile(data)) { - return resolveProcessCredentials(options, profileName); - } - if (isSsoProfile(data)) { - return await resolveSsoCredentials(profileName, data, options); - } - throw new import_property_provider.CredentialsProviderError( - `Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, - { logger: options.logger } - ); -}, "resolveProfileData"); - -// src/fromIni.ts -var fromIni = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => { - const init = { - ..._init, - parentClientConfig: { - ...callerClientConfig, - ..._init.parentClientConfig - } - }; - init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni"); - const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); - return resolveProfileData( - (0, import_shared_ini_file_loader.getProfileName)({ - profile: _init.profile ?? callerClientConfig?.profile - }), - profiles, - init - ); -}, "fromIni"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 60395: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - credentialsTreatedAsExpired: () => credentialsTreatedAsExpired, - credentialsWillNeedRefresh: () => credentialsWillNeedRefresh, - defaultProvider: () => defaultProvider -}); -module.exports = __toCommonJS(index_exports); - -// src/defaultProvider.ts -var import_credential_provider_env = __nccwpck_require__(56104); - -var import_shared_ini_file_loader = __nccwpck_require__(93438); - -// src/remoteProvider.ts -var import_property_provider = __nccwpck_require__(1104); -var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; -var remoteProvider = /* @__PURE__ */ __name(async (init) => { - const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(40566))); - 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 } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(60795))); - return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init)); - } - if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") { - return async () => { - throw new import_property_provider.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger }); - }; - } - init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"); - return fromInstanceMetadata(init); -}, "remoteProvider"); - -// src/defaultProvider.ts -var multipleCredentialSourceWarningEmitted = false; -var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)( - (0, import_property_provider.chain)( - async () => { - const profile = init.profile ?? process.env[import_shared_ini_file_loader.ENV_PROFILE]; - if (profile) { - const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_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 import_property_provider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", { - logger: init.logger, - tryNextLink: true - }); - } - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"); - return (0, import_credential_provider_env.fromEnv)(init)(); - }, - async () => { - 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 import_property_provider.CredentialsProviderError( - "Skipping SSO provider in default chain (inputs do not include SSO fields).", - { logger: init.logger } - ); - } - const { fromSSO } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(8212))); - return fromSSO(init)(); - }, - async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni"); - const { fromIni } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(26163))); - return fromIni(init)(); - }, - async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess"); - const { fromProcess } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(15630))); - return fromProcess(init)(); - }, - async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile"); - const { fromTokenFile } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(47654))); - return fromTokenFile(init)(); - }, - async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"); - return (await remoteProvider(init))(); - }, - async () => { - throw new import_property_provider.CredentialsProviderError("Could not load credentials from any providers", { - tryNextLink: false, - logger: init.logger - }); - } - ), - credentialsTreatedAsExpired, - credentialsWillNeedRefresh -), "defaultProvider"); -var credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0, "credentialsWillNeedRefresh"); -var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, "credentialsTreatedAsExpired"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 15630: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - fromProcess: () => fromProcess -}); -module.exports = __toCommonJS(index_exports); - -// src/fromProcess.ts -var import_shared_ini_file_loader = __nccwpck_require__(93438); - -// src/resolveProcessCredentials.ts -var import_property_provider = __nccwpck_require__(1104); -var import_child_process = __nccwpck_require__(35317); -var import_util = __nccwpck_require__(39023); - -// src/getValidatedProcessCredentials.ts -var import_client = __nccwpck_require__(17582); -var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => { - if (data.Version !== 1) { - throw Error(`Profile ${profileName} credential_process did not return Version 1.`); - } - if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) { - throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); - } - if (data.Expiration) { - const currentTime = /* @__PURE__ */ 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 } - }; - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_PROCESS", "w"); - return credentials; -}, "getValidatedProcessCredentials"); - -// src/resolveProcessCredentials.ts -var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger) => { - const profile = profiles[profileName]; - if (profiles[profileName]) { - const credentialProcess = profile["credential_process"]; - if (credentialProcess !== void 0) { - const execPromise = (0, import_util.promisify)(import_child_process.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 import_property_provider.CredentialsProviderError(error.message, { logger }); - } - } else { - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger }); - } - } else { - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, { - logger - }); - } -}, "resolveProcessCredentials"); - -// src/fromProcess.ts -var fromProcess = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => { - init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess"); - const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); - return resolveProcessCredentials( - (0, import_shared_ini_file_loader.getProfileName)({ - profile: init.profile ?? callerClientConfig?.profile - }), - profiles, - init.logger - ); -}, "fromProcess"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 8212: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/loadSso.ts -var loadSso_exports = {}; -__export(loadSso_exports, { - GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand, - SSOClient: () => import_client_sso.SSOClient -}); -var import_client_sso; -var init_loadSso = __esm({ - "src/loadSso.ts"() { - "use strict"; - import_client_sso = __nccwpck_require__(43628); - } -}); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - fromSSO: () => fromSSO, - isSsoProfile: () => isSsoProfile, - validateSsoProfile: () => validateSsoProfile -}); -module.exports = __toCommonJS(index_exports); - -// src/fromSSO.ts - - - -// src/isSsoProfile.ts -var isSsoProfile = /* @__PURE__ */ __name((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"), "isSsoProfile"); - -// src/resolveSSOCredentials.ts -var import_client = __nccwpck_require__(17582); -var import_token_providers = __nccwpck_require__(88967); -var import_property_provider = __nccwpck_require__(1104); -var import_shared_ini_file_loader = __nccwpck_require__(93438); -var SHOULD_FAIL_CREDENTIAL_CHAIN = false; -var resolveSSOCredentials = /* @__PURE__ */ __name(async ({ - ssoStartUrl, - ssoSession, - ssoAccountId, - ssoRegion, - ssoRoleName, - ssoClient, - clientConfig, - parentClientConfig, - profile, - logger -}) => { - let token; - const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; - if (ssoSession) { - try { - const _token = await (0, import_token_providers.fromSso)({ profile })(); - token = { - accessToken: _token.token, - expiresAt: new Date(_token.expiration).toISOString() - }; - } catch (e) { - throw new import_property_provider.CredentialsProviderError(e.message, { - tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, - logger - }); - } - } else { - try { - token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl); - } catch (e) { - throw new import_property_provider.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 import_property_provider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, { - tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, - logger - }); - } - const { accessToken } = token; - const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports)); - const sso = ssoClient || new SSOClient2( - Object.assign({}, clientConfig ?? {}, { - logger: clientConfig?.logger ?? parentClientConfig?.logger, - region: clientConfig?.region ?? ssoRegion - }) - ); - let ssoResp; - try { - ssoResp = await sso.send( - new GetRoleCredentialsCommand2({ - accountId: ssoAccountId, - roleName: ssoRoleName, - accessToken - }) - ); - } catch (e) { - throw new import_property_provider.CredentialsProviderError(e, { - tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, - logger - }); - } - const { - roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} - } = ssoResp; - if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { - throw new import_property_provider.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) { - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_SSO", "s"); - } else { - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_SSO_LEGACY", "u"); - } - return credentials; -}, "resolveSSOCredentials"); - -// src/validateSsoProfile.ts - -var validateSsoProfile = /* @__PURE__ */ __name((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 import_property_provider.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; -}, "validateSsoProfile"); - -// src/fromSSO.ts -var fromSSO = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => { - init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO"); - const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; - const { ssoClient } = init; - const profileName = (0, import_shared_ini_file_loader.getProfileName)({ - profile: init.profile ?? callerClientConfig?.profile - }); - if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { - const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); - const profile = profiles[profileName]; - if (!profile) { - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger }); - } - if (!isSsoProfile(profile)) { - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, { - logger: init.logger - }); - } - if (profile?.sso_session) { - const ssoSessions = await (0, import_shared_ini_file_loader.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 import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, { - tryNextLink: false, - logger: init.logger - }); - } - if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { - throw new import_property_provider.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, - profile: profileName - }); - } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { - throw new import_property_provider.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, - profile: profileName - }); - } -}, "fromSSO"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 77753: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromTokenFile = void 0; -const client_1 = __nccwpck_require__(17582); -const property_provider_1 = __nccwpck_require__(1104); -const fs_1 = __nccwpck_require__(79896); -const fromWebToken_1 = __nccwpck_require__(92543); -const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; -const ENV_ROLE_ARN = "AWS_ROLE_ARN"; -const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; -const fromTokenFile = (init = {}) => async () => { - 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 property_provider_1.CredentialsProviderError("Web identity configuration not specified", { - logger: init.logger, - }); - } - const credentials = await (0, fromWebToken_1.fromWebToken)({ - ...init, - webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), - roleArn, - roleSessionName, - })(); - if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) { - (0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h"); - } - return credentials; -}; -exports.fromTokenFile = fromTokenFile; - - -/***/ }), - -/***/ 92543: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromWebToken = void 0; -const 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 } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(31058))); - 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, - }); -}; -exports.fromWebToken = fromWebToken; - - -/***/ }), - -/***/ 47654: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -module.exports = __toCommonJS(index_exports); -__reExport(index_exports, __nccwpck_require__(77753), module.exports); -__reExport(index_exports, __nccwpck_require__(92543), module.exports); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 25164: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getHostHeaderPlugin: () => getHostHeaderPlugin, - hostHeaderMiddleware: () => hostHeaderMiddleware, - hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions, - resolveHostHeaderConfig: () => resolveHostHeaderConfig -}); -module.exports = __toCommonJS(index_exports); -var import_protocol_http = __nccwpck_require__(13494); -function resolveHostHeaderConfig(input) { - return input; -} -__name(resolveHostHeaderConfig, "resolveHostHeaderConfig"); -var hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { - if (!import_protocol_http.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); -}, "hostHeaderMiddleware"); -var hostHeaderMiddlewareOptions = { - name: "hostHeaderMiddleware", - step: "build", - priority: "low", - tags: ["HOST"], - override: true -}; -var getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); - }, "applyToStack") -}), "getHostHeaderPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 65832: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getLoggerPlugin: () => getLoggerPlugin, - loggerMiddleware: () => loggerMiddleware, - loggerMiddlewareOptions: () => loggerMiddlewareOptions -}); -module.exports = __toCommonJS(index_exports); - -// src/loggerMiddleware.ts -var loggerMiddleware = /* @__PURE__ */ __name(() => (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; - } -}, "loggerMiddleware"); -var loggerMiddlewareOptions = { - name: "loggerMiddleware", - tags: ["LOGGER"], - step: "initialize", - override: true -}; -var getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); - }, "applyToStack") -}), "getLoggerPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 39870: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getRecursionDetectionPlugin: () => getRecursionDetectionPlugin -}); -module.exports = __toCommonJS(index_exports); - -// src/configuration.ts -var recursionDetectionMiddlewareOptions = { - step: "build", - tags: ["RECURSION_DETECTION"], - name: "recursionDetectionMiddleware", - override: true, - priority: "low" -}; - -// src/getRecursionDetectionPlugin.ts -var import_recursionDetectionMiddleware = __nccwpck_require__(6971); -var getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add((0, import_recursionDetectionMiddleware.recursionDetectionMiddleware)(), recursionDetectionMiddlewareOptions); - }, "applyToStack") -}), "getRecursionDetectionPlugin"); - -// src/index.ts -__reExport(index_exports, __nccwpck_require__(6971), module.exports); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 6971: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.recursionDetectionMiddleware = void 0; -const lambda_invoke_store_1 = __nccwpck_require__(37453); -const protocol_http_1 = __nccwpck_require__(13494); -const TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; -const ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; -const ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; -const recursionDetectionMiddleware = () => (next) => async (args) => { - const { request } = args; - if (!protocol_http_1.HttpRequest.isInstance(request)) { - return next(args); - } - const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? - TRACE_ID_HEADER_NAME; - if (request.headers.hasOwnProperty(traceIdHeader)) { - return next(args); - } - const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; - const traceIdFromEnv = process.env[ENV_TRACE_ID]; - const traceIdFromInvokeStore = lambda_invoke_store_1.InvokeStore.getXRayTraceId(); - const traceId = traceIdFromInvokeStore ?? traceIdFromEnv; - const nonEmptyString = (str) => typeof str === "string" && str.length > 0; - if (nonEmptyString(functionName) && nonEmptyString(traceId)) { - request.headers[TRACE_ID_HEADER_NAME] = traceId; - } - return next({ - ...args, - request, - }); -}; -exports.recursionDetectionMiddleware = recursionDetectionMiddleware; - - -/***/ }), - -/***/ 70997: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - DEFAULT_UA_APP_ID: () => DEFAULT_UA_APP_ID, - getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions, - getUserAgentPlugin: () => getUserAgentPlugin, - resolveUserAgentConfig: () => resolveUserAgentConfig, - userAgentMiddleware: () => userAgentMiddleware -}); -module.exports = __toCommonJS(index_exports); - -// src/configurations.ts -var import_core = __nccwpck_require__(22744); -var DEFAULT_UA_APP_ID = void 0; -function isValidUserAgentAppId(appId) { - if (appId === void 0) { - return true; - } - return typeof appId === "string" && appId.length <= 50; -} -__name(isValidUserAgentAppId, "isValidUserAgentAppId"); -function resolveUserAgentConfig(input) { - const normalizedAppIdProvider = (0, import_core.normalizeProvider)(input.userAgentAppId ?? DEFAULT_UA_APP_ID); - const { customUserAgent } = input; - return Object.assign(input, { - customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent, - userAgentAppId: /* @__PURE__ */ __name(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; - }, "userAgentAppId") - }); -} -__name(resolveUserAgentConfig, "resolveUserAgentConfig"); - -// src/user-agent-middleware.ts -var import_util_endpoints = __nccwpck_require__(16158); -var import_protocol_http = __nccwpck_require__(13494); - -// src/check-features.ts -var import_core2 = __nccwpck_require__(91446); -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") { - (0, import_core2.setFeature)(context, "PROTOCOL_RPC_V2_CBOR", "M"); - } - if (typeof config.retryStrategy === "function") { - const retryStrategy = await config.retryStrategy(); - if (typeof retryStrategy.acquireInitialRetryToken === "function") { - if (retryStrategy.constructor?.name?.includes("Adaptive")) { - (0, import_core2.setFeature)(context, "RETRY_MODE_ADAPTIVE", "F"); - } else { - (0, import_core2.setFeature)(context, "RETRY_MODE_STANDARD", "E"); - } - } else { - (0, import_core2.setFeature)(context, "RETRY_MODE_LEGACY", "D"); - } - } - if (typeof config.accountIdEndpointMode === "function") { - const endpointV2 = context.endpointV2; - if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) { - (0, import_core2.setFeature)(context, "ACCOUNT_ID_ENDPOINT", "O"); - } - switch (await config.accountIdEndpointMode?.()) { - case "disabled": - (0, import_core2.setFeature)(context, "ACCOUNT_ID_MODE_DISABLED", "Q"); - break; - case "preferred": - (0, import_core2.setFeature)(context, "ACCOUNT_ID_MODE_PREFERRED", "P"); - break; - case "required": - (0, import_core2.setFeature)(context, "ACCOUNT_ID_MODE_REQUIRED", "R"); - break; - } - } - const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity; - if (identity?.$source) { - const credentials = identity; - if (credentials.accountId) { - (0, import_core2.setFeature)(context, "RESOLVED_ACCOUNT_ID", "T"); - } - for (const [key, value] of Object.entries(credentials.$source ?? {})) { - (0, import_core2.setFeature)(context, key, value); - } - } -} -__name(checkFeatures, "checkFeatures"); - -// src/constants.ts -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 = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; -var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; -var UA_ESCAPE_CHAR = "-"; - -// src/encode-features.ts -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; -} -__name(encodeFeatures, "encodeFeatures"); - -// src/user-agent-middleware.ts -var userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { - const { request } = args; - if (!import_protocol_http.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 = (0, import_util_endpoints.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 - }); -}, "userAgentMiddleware"); -var escapeUserAgent = /* @__PURE__ */ __name((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}`; - } - }, ""); -}, "escapeUserAgent"); -var getUserAgentMiddlewareOptions = { - name: "getUserAgentMiddleware", - step: "build", - priority: "low", - tags: ["SET_USER_AGENT", "USER_AGENT"], - override: true -}; -var getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions); - }, "applyToStack") -}), "getUserAgentPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 8014: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0; -const core_1 = __nccwpck_require__(91446); -const util_middleware_1 = __nccwpck_require__(30954); -const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), - }; -}; -exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider; -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", - }; -} -const defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - case "CreateToken": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - } - } - return options; -}; -exports.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider; -const resolveHttpAuthSchemeConfig = (config) => { - const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); - return Object.assign(config_0, { - authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []), - }); -}; -exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; - - -/***/ }), - -/***/ 42936: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(16158); -const util_endpoints_2 = __nccwpck_require__(79674); -const ruleset_1 = __nccwpck_require__(67605); -const cache = new util_endpoints_2.EndpointCache({ - size: 50, - params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], -}); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - })); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; -util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; - - -/***/ }), - -/***/ 67605: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const u = "required", v = "fn", w = "argv", x = "ref"; -const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; -const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; -exports.ruleSet = _data; - - -/***/ }), - -/***/ 54477: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/sso-oidc/index.ts -var index_exports = {}; -__export(index_exports, { - $Command: () => import_smithy_client6.Command, - AccessDeniedException: () => AccessDeniedException, - AuthorizationPendingException: () => AuthorizationPendingException, - CreateTokenCommand: () => CreateTokenCommand, - CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog, - CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog, - ExpiredTokenException: () => ExpiredTokenException, - InternalServerException: () => InternalServerException, - InvalidClientException: () => InvalidClientException, - InvalidGrantException: () => InvalidGrantException, - InvalidRequestException: () => InvalidRequestException, - InvalidScopeException: () => InvalidScopeException, - SSOOIDC: () => SSOOIDC, - SSOOIDCClient: () => SSOOIDCClient, - SSOOIDCServiceException: () => SSOOIDCServiceException, - SlowDownException: () => SlowDownException, - UnauthorizedClientException: () => UnauthorizedClientException, - UnsupportedGrantTypeException: () => UnsupportedGrantTypeException, - __Client: () => import_smithy_client2.Client -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/sso-oidc/SSOOIDCClient.ts -var import_middleware_host_header = __nccwpck_require__(25164); -var import_middleware_logger = __nccwpck_require__(65832); -var import_middleware_recursion_detection = __nccwpck_require__(39870); -var import_middleware_user_agent = __nccwpck_require__(70997); -var import_config_resolver = __nccwpck_require__(39316); -var import_core = __nccwpck_require__(22744); -var import_middleware_content_length = __nccwpck_require__(47212); -var import_middleware_endpoint = __nccwpck_require__(88205); -var import_middleware_retry = __nccwpck_require__(19618); -var import_smithy_client2 = __nccwpck_require__(61411); -var import_httpAuthSchemeProvider = __nccwpck_require__(8014); - -// src/submodules/sso-oidc/endpoint/EndpointParameters.ts -var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "sso-oauth" - }); -}, "resolveClientEndpointParameters"); -var commonParams = { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } -}; - -// src/submodules/sso-oidc/SSOOIDCClient.ts -var import_runtimeConfig = __nccwpck_require__(22791); - -// src/submodules/sso-oidc/runtimeExtensions.ts -var import_region_config_resolver = __nccwpck_require__(26521); -var import_protocol_http = __nccwpck_require__(13494); -var import_smithy_client = __nccwpck_require__(61411); - -// src/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.ts -var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((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; - } - }; -}, "getHttpAuthExtensionConfiguration"); -var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - credentials: config.credentials() - }; -}, "resolveHttpAuthRuntimeConfig"); - -// src/submodules/sso-oidc/runtimeExtensions.ts -var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign( - (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), - (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), - (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), - getHttpAuthExtensionConfiguration(runtimeConfig) - ); - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign( - runtimeConfig, - (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), - resolveHttpAuthRuntimeConfig(extensionConfiguration) - ); -}, "resolveRuntimeExtensions"); - -// src/submodules/sso-oidc/SSOOIDCClient.ts -var SSOOIDCClient = class extends import_smithy_client2.Client { - static { - __name(this, "SSOOIDCClient"); - } - /** - * The resolved configuration of SSOOIDCClient class. This is resolved and normalized from the {@link SSOOIDCClientConfig | constructor configuration interface}. - */ - config; - constructor(...[configuration]) { - const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); - super(_config_0); - this.initConfig = _config_0; - const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); - const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2); - const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); - const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); - const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); - const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); - this.config = _config_8; - this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use( - (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { - httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config.credentials - }), "identityProviderConfigProvider") - }) - ); - this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); - } - /** - * Destroy underlying resources, like sockets. It's usually not necessary to do this. - * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. - * Otherwise, sockets might stay open for quite a long time before the server terminates them. - */ - destroy() { - super.destroy(); - } -}; - -// src/submodules/sso-oidc/SSOOIDC.ts -var import_smithy_client7 = __nccwpck_require__(61411); - -// src/submodules/sso-oidc/commands/CreateTokenCommand.ts -var import_middleware_endpoint2 = __nccwpck_require__(88205); -var import_middleware_serde = __nccwpck_require__(58305); -var import_smithy_client6 = __nccwpck_require__(61411); - -// src/submodules/sso-oidc/models/models_0.ts -var import_smithy_client4 = __nccwpck_require__(61411); - -// src/submodules/sso-oidc/models/SSOOIDCServiceException.ts -var import_smithy_client3 = __nccwpck_require__(61411); -var SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client3.ServiceException { - static { - __name(this, "SSOOIDCServiceException"); - } - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); - } -}; - -// src/submodules/sso-oidc/models/models_0.ts -var AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException { - static { - __name(this, "AccessDeniedException"); - } - name = "AccessDeniedException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be access_denied.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "AccessDeniedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _AccessDeniedException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException { - static { - __name(this, "AuthorizationPendingException"); - } - name = "AuthorizationPendingException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be - * authorization_pending.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "AuthorizationPendingException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _AuthorizationPendingException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.clientSecret && { clientSecret: import_smithy_client4.SENSITIVE_STRING }, - ...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING }, - ...obj.codeVerifier && { codeVerifier: import_smithy_client4.SENSITIVE_STRING } -}), "CreateTokenRequestFilterSensitiveLog"); -var CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: import_smithy_client4.SENSITIVE_STRING }, - ...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING }, - ...obj.idToken && { idToken: import_smithy_client4.SENSITIVE_STRING } -}), "CreateTokenResponseFilterSensitiveLog"); -var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException { - static { - __name(this, "ExpiredTokenException"); - } - name = "ExpiredTokenException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be expired_token.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ExpiredTokenException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ExpiredTokenException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var InternalServerException = class _InternalServerException extends SSOOIDCServiceException { - static { - __name(this, "InternalServerException"); - } - name = "InternalServerException"; - $fault = "server"; - /** - *

Single error code. For this exception the value will be server_error.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InternalServerException", - $fault: "server", - ...opts - }); - Object.setPrototypeOf(this, _InternalServerException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException { - static { - __name(this, "InvalidClientException"); - } - name = "InvalidClientException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be - * invalid_client.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidClientException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidClientException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException { - static { - __name(this, "InvalidGrantException"); - } - name = "InvalidGrantException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be invalid_grant.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidGrantException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidGrantException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException { - static { - __name(this, "InvalidRequestException"); - } - name = "InvalidRequestException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be - * invalid_request.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidRequestException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidRequestException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException { - static { - __name(this, "InvalidScopeException"); - } - name = "InvalidScopeException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be invalid_scope.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidScopeException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidScopeException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var SlowDownException = class _SlowDownException extends SSOOIDCServiceException { - static { - __name(this, "SlowDownException"); - } - name = "SlowDownException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be slow_down.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "SlowDownException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _SlowDownException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException { - static { - __name(this, "UnauthorizedClientException"); - } - name = "UnauthorizedClientException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be - * unauthorized_client.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "UnauthorizedClientException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _UnauthorizedClientException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException { - static { - __name(this, "UnsupportedGrantTypeException"); - } - name = "UnsupportedGrantTypeException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be - * unsupported_grant_type.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "UnsupportedGrantTypeException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; - -// src/submodules/sso-oidc/protocols/Aws_restJson1.ts -var import_core2 = __nccwpck_require__(91446); -var import_core3 = __nccwpck_require__(22744); -var import_smithy_client5 = __nccwpck_require__(61411); -var se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core3.requestBuilder)(input, context); - const headers = { - "content-type": "application/json" - }; - b.bp("/token"); - let body; - body = JSON.stringify( - (0, import_smithy_client5.take)(input, { - clientId: [], - clientSecret: [], - code: [], - codeVerifier: [], - deviceCode: [], - grantType: [], - redirectUri: [], - refreshToken: [], - scope: /* @__PURE__ */ __name((_) => (0, import_smithy_client5._json)(_), "scope") - }) - ); - b.m("POST").h(headers).b(body); - return b.build(); -}, "se_CreateTokenCommand"); -var de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client5.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); - const doc = (0, import_smithy_client5.take)(data, { - accessToken: import_smithy_client5.expectString, - expiresIn: import_smithy_client5.expectInt32, - idToken: import_smithy_client5.expectString, - refreshToken: import_smithy_client5.expectString, - tokenType: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - return contents; -}, "de_CreateTokenCommand"); -var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonErrorBody)(output.body, context) - }; - const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); - switch (errorCode) { - case "AccessDeniedException": - case "com.amazonaws.ssooidc#AccessDeniedException": - throw await de_AccessDeniedExceptionRes(parsedOutput, context); - case "AuthorizationPendingException": - case "com.amazonaws.ssooidc#AuthorizationPendingException": - throw await de_AuthorizationPendingExceptionRes(parsedOutput, context); - case "ExpiredTokenException": - case "com.amazonaws.ssooidc#ExpiredTokenException": - throw await de_ExpiredTokenExceptionRes(parsedOutput, context); - case "InternalServerException": - case "com.amazonaws.ssooidc#InternalServerException": - throw await de_InternalServerExceptionRes(parsedOutput, context); - case "InvalidClientException": - case "com.amazonaws.ssooidc#InvalidClientException": - throw await de_InvalidClientExceptionRes(parsedOutput, context); - case "InvalidGrantException": - case "com.amazonaws.ssooidc#InvalidGrantException": - throw await de_InvalidGrantExceptionRes(parsedOutput, context); - case "InvalidRequestException": - case "com.amazonaws.ssooidc#InvalidRequestException": - throw await de_InvalidRequestExceptionRes(parsedOutput, context); - case "InvalidScopeException": - case "com.amazonaws.ssooidc#InvalidScopeException": - throw await de_InvalidScopeExceptionRes(parsedOutput, context); - case "SlowDownException": - case "com.amazonaws.ssooidc#SlowDownException": - throw await de_SlowDownExceptionRes(parsedOutput, context); - case "UnauthorizedClientException": - case "com.amazonaws.ssooidc#UnauthorizedClientException": - throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); - case "UnsupportedGrantTypeException": - case "com.amazonaws.ssooidc#UnsupportedGrantTypeException": - throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } -}, "de_CommandError"); -var throwDefaultError = (0, import_smithy_client5.withBaseException)(SSOOIDCServiceException); -var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new AccessDeniedException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_AccessDeniedExceptionRes"); -var de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new AuthorizationPendingException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_AuthorizationPendingExceptionRes"); -var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new ExpiredTokenException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_ExpiredTokenExceptionRes"); -var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new InternalServerException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_InternalServerExceptionRes"); -var de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidClientException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidClientExceptionRes"); -var de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidGrantException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidGrantExceptionRes"); -var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidRequestException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidRequestExceptionRes"); -var de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidScopeException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidScopeExceptionRes"); -var de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new SlowDownException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_SlowDownExceptionRes"); -var de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new UnauthorizedClientException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_UnauthorizedClientExceptionRes"); -var de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new UnsupportedGrantTypeException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_UnsupportedGrantTypeExceptionRes"); -var deserializeMetadata = /* @__PURE__ */ __name((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"] -}), "deserializeMetadata"); - -// src/submodules/sso-oidc/commands/CreateTokenCommand.ts -var CreateTokenCommand = class extends import_smithy_client6.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() { - static { - __name(this, "CreateTokenCommand"); - } -}; - -// src/submodules/sso-oidc/SSOOIDC.ts -var commands = { - CreateTokenCommand -}; -var SSOOIDC = class extends SSOOIDCClient { - static { - __name(this, "SSOOIDC"); - } -}; -(0, import_smithy_client7.createAggregatedClient)(commands, SSOOIDC); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 22791: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(61860); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(77507)); -const core_1 = __nccwpck_require__(91446); -const util_user_agent_node_1 = __nccwpck_require__(9082); -const config_resolver_1 = __nccwpck_require__(39316); -const hash_node_1 = __nccwpck_require__(5092); -const middleware_retry_1 = __nccwpck_require__(19618); -const node_config_provider_1 = __nccwpck_require__(61814); -const node_http_handler_1 = __nccwpck_require__(95493); -const util_body_length_node_1 = __nccwpck_require__(13638); -const util_retry_1 = __nccwpck_require__(15518); -const runtimeConfig_shared_1 = __nccwpck_require__(13892); -const smithy_client_1 = __nccwpck_require__(61411); -const util_defaults_mode_node_1 = __nccwpck_require__(15435); -const smithy_client_2 = __nccwpck_require__(61411); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const loaderConfig = { - profile: config?.profile, - logger: clientSharedValues.logger, - }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 13892: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(91446); -const core_2 = __nccwpck_require__(22744); -const smithy_client_1 = __nccwpck_require__(61411); -const url_parser_1 = __nccwpck_require__(85792); -const util_base64_1 = __nccwpck_require__(82763); -const util_utf8_1 = __nccwpck_require__(85339); -const httpAuthSchemeProvider_1 = __nccwpck_require__(8014); -const endpointResolver_1 = __nccwpck_require__(42936); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2019-06-10", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - { - schemeId: "smithy.api#noAuth", - identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), - signer: new core_2.NoAuthSigner(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "SSO OIDC", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 56001: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.STSClient = exports.__Client = void 0; -const middleware_host_header_1 = __nccwpck_require__(25164); -const middleware_logger_1 = __nccwpck_require__(65832); -const middleware_recursion_detection_1 = __nccwpck_require__(39870); -const middleware_user_agent_1 = __nccwpck_require__(70997); -const config_resolver_1 = __nccwpck_require__(39316); -const core_1 = __nccwpck_require__(22744); -const middleware_content_length_1 = __nccwpck_require__(47212); -const middleware_endpoint_1 = __nccwpck_require__(88205); -const middleware_retry_1 = __nccwpck_require__(19618); -const smithy_client_1 = __nccwpck_require__(61411); -Object.defineProperty(exports, "__Client", ({ enumerable: true, get: function () { return smithy_client_1.Client; } })); -const httpAuthSchemeProvider_1 = __nccwpck_require__(5037); -const EndpointParameters_1 = __nccwpck_require__(64361); -const runtimeConfig_1 = __nccwpck_require__(18452); -const runtimeExtensions_1 = __nccwpck_require__(83488); -class STSClient extends smithy_client_1.Client { - config; - constructor(...[configuration]) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); - super(_config_0); - this.initConfig = _config_0; - const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); - const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1); - const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2); - const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3); - const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5); - const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6); - const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); - this.config = _config_8; - this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); - this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { - httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config.credentials, - }), - })); - this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config)); - } - destroy() { - super.destroy(); - } -} -exports.STSClient = STSClient; - - -/***/ }), - -/***/ 54710: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0; -const 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; - }, - }; -}; -exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration; -const resolveHttpAuthRuntimeConfig = (config) => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - credentials: config.credentials(), - }; -}; -exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig; - - -/***/ }), - -/***/ 5037: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0; -const core_1 = __nccwpck_require__(91446); -const util_middleware_1 = __nccwpck_require__(30954); -const STSClient_1 = __nccwpck_require__(56001); -const defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), - }; -}; -exports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider; -function createAwsAuthSigv4HttpAuthOption(authParameters) { - return { - schemeId: "aws.auth#sigv4", - signingProperties: { - name: "sts", - region: authParameters.region, - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context, - }, - }), - }; -} -function createSmithyApiNoAuthHttpAuthOption(authParameters) { - return { - schemeId: "smithy.api#noAuth", - }; -} -const defaultSTSHttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - case "AssumeRoleWithWebIdentity": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - } - } - return options; -}; -exports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider; -const resolveStsAuthConfig = (input) => Object.assign(input, { - stsClientCtor: STSClient_1.STSClient, -}); -exports.resolveStsAuthConfig = resolveStsAuthConfig; -const resolveHttpAuthSchemeConfig = (config) => { - const config_0 = (0, exports.resolveStsAuthConfig)(config); - const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0); - return Object.assign(config_1, { - authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []), - }); -}; -exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; - - -/***/ }), - -/***/ 64361: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.commonParams = exports.resolveClientEndpointParameters = void 0; -const resolveClientEndpointParameters = (options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - useGlobalEndpoint: options.useGlobalEndpoint ?? false, - defaultSigningName: "sts", - }); -}; -exports.resolveClientEndpointParameters = resolveClientEndpointParameters; -exports.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" }, -}; - - -/***/ }), - -/***/ 35075: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(16158); -const util_endpoints_2 = __nccwpck_require__(79674); -const ruleset_1 = __nccwpck_require__(79144); -const cache = new util_endpoints_2.EndpointCache({ - size: 50, - params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"], -}); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - })); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; -util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; - - -/***/ }), - -/***/ 79144: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const F = "required", G = "type", H = "fn", I = "argv", J = "ref"; -const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "String" }, n = { [F]: true, "default": false, [G]: "Boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }, v = {}, w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y]; -const _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] }; -exports.ruleSet = _data; - - -/***/ }), - -/***/ 31058: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/sts/index.ts -var index_exports = {}; -__export(index_exports, { - AssumeRoleCommand: () => AssumeRoleCommand, - AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog, - AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand, - AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog, - AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog, - ClientInputEndpointParameters: () => import_EndpointParameters3.ClientInputEndpointParameters, - CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog, - ExpiredTokenException: () => ExpiredTokenException, - IDPCommunicationErrorException: () => IDPCommunicationErrorException, - IDPRejectedClaimException: () => IDPRejectedClaimException, - InvalidIdentityTokenException: () => InvalidIdentityTokenException, - MalformedPolicyDocumentException: () => MalformedPolicyDocumentException, - PackedPolicyTooLargeException: () => PackedPolicyTooLargeException, - RegionDisabledException: () => RegionDisabledException, - STS: () => STS, - STSServiceException: () => STSServiceException, - decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider, - getDefaultRoleAssumer: () => getDefaultRoleAssumer2, - getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2 -}); -module.exports = __toCommonJS(index_exports); -__reExport(index_exports, __nccwpck_require__(56001), module.exports); - -// src/submodules/sts/STS.ts -var import_smithy_client6 = __nccwpck_require__(61411); - -// src/submodules/sts/commands/AssumeRoleCommand.ts -var import_middleware_endpoint = __nccwpck_require__(88205); -var import_middleware_serde = __nccwpck_require__(58305); -var import_smithy_client4 = __nccwpck_require__(61411); -var import_EndpointParameters = __nccwpck_require__(64361); - -// src/submodules/sts/models/models_0.ts -var import_smithy_client2 = __nccwpck_require__(61411); - -// src/submodules/sts/models/STSServiceException.ts -var import_smithy_client = __nccwpck_require__(61411); -var STSServiceException = class _STSServiceException extends import_smithy_client.ServiceException { - static { - __name(this, "STSServiceException"); - } - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _STSServiceException.prototype); - } -}; - -// src/submodules/sts/models/models_0.ts -var CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client2.SENSITIVE_STRING } -}), "CredentialsFilterSensitiveLog"); -var AssumeRoleResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } -}), "AssumeRoleResponseFilterSensitiveLog"); -var ExpiredTokenException = class _ExpiredTokenException extends STSServiceException { - static { - __name(this, "ExpiredTokenException"); - } - name = "ExpiredTokenException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ExpiredTokenException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ExpiredTokenException.prototype); - } -}; -var MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException { - static { - __name(this, "MalformedPolicyDocumentException"); - } - name = "MalformedPolicyDocumentException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "MalformedPolicyDocumentException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype); - } -}; -var PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException { - static { - __name(this, "PackedPolicyTooLargeException"); - } - name = "PackedPolicyTooLargeException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "PackedPolicyTooLargeException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype); - } -}; -var RegionDisabledException = class _RegionDisabledException extends STSServiceException { - static { - __name(this, "RegionDisabledException"); - } - name = "RegionDisabledException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "RegionDisabledException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _RegionDisabledException.prototype); - } -}; -var IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException { - static { - __name(this, "IDPRejectedClaimException"); - } - name = "IDPRejectedClaimException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "IDPRejectedClaimException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype); - } -}; -var InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException { - static { - __name(this, "InvalidIdentityTokenException"); - } - name = "InvalidIdentityTokenException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidIdentityTokenException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype); - } -}; -var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client2.SENSITIVE_STRING } -}), "AssumeRoleWithWebIdentityRequestFilterSensitiveLog"); -var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } -}), "AssumeRoleWithWebIdentityResponseFilterSensitiveLog"); -var IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException { - static { - __name(this, "IDPCommunicationErrorException"); - } - name = "IDPCommunicationErrorException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "IDPCommunicationErrorException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype); - } -}; - -// src/submodules/sts/protocols/Aws_query.ts -var import_core = __nccwpck_require__(91446); -var import_protocol_http = __nccwpck_require__(13494); -var import_smithy_client3 = __nccwpck_require__(61411); -var se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_AssumeRoleRequest(input, context), - [_A]: _AR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_AssumeRoleCommand"); -var se_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_AssumeRoleWithWebIdentityRequest(input, context), - [_A]: _ARWWI, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_AssumeRoleWithWebIdentityCommand"); -var de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_AssumeRoleResponse(data.AssumeRoleResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_AssumeRoleCommand"); -var de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_AssumeRoleWithWebIdentityCommand"); -var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core.parseXmlErrorBody)(output.body, context) - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ExpiredTokenException": - case "com.amazonaws.sts#ExpiredTokenException": - throw await de_ExpiredTokenExceptionRes(parsedOutput, context); - case "MalformedPolicyDocument": - case "com.amazonaws.sts#MalformedPolicyDocumentException": - throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); - case "PackedPolicyTooLarge": - case "com.amazonaws.sts#PackedPolicyTooLargeException": - throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); - case "RegionDisabledException": - case "com.amazonaws.sts#RegionDisabledException": - throw await de_RegionDisabledExceptionRes(parsedOutput, context); - case "IDPCommunicationError": - case "com.amazonaws.sts#IDPCommunicationErrorException": - throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context); - case "IDPRejectedClaim": - case "com.amazonaws.sts#IDPRejectedClaimException": - throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context); - case "InvalidIdentityToken": - case "com.amazonaws.sts#InvalidIdentityTokenException": - throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode - }); - } -}, "de_CommandError"); -var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_ExpiredTokenException(body.Error, context); - const exception = new ExpiredTokenException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_ExpiredTokenExceptionRes"); -var de_IDPCommunicationErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_IDPCommunicationErrorException(body.Error, context); - const exception = new IDPCommunicationErrorException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_IDPCommunicationErrorExceptionRes"); -var de_IDPRejectedClaimExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_IDPRejectedClaimException(body.Error, context); - const exception = new IDPRejectedClaimException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_IDPRejectedClaimExceptionRes"); -var de_InvalidIdentityTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_InvalidIdentityTokenException(body.Error, context); - const exception = new InvalidIdentityTokenException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_InvalidIdentityTokenExceptionRes"); -var de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_MalformedPolicyDocumentException(body.Error, context); - const exception = new MalformedPolicyDocumentException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_MalformedPolicyDocumentExceptionRes"); -var de_PackedPolicyTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_PackedPolicyTooLargeException(body.Error, context); - const exception = new PackedPolicyTooLargeException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_PackedPolicyTooLargeExceptionRes"); -var de_RegionDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_RegionDisabledException(body.Error, context); - const exception = new RegionDisabledException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_RegionDisabledExceptionRes"); -var se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RA] != null) { - entries[_RA] = input[_RA]; - } - if (input[_RSN] != null) { - entries[_RSN] = input[_RSN]; - } - if (input[_PA] != null) { - const memberEntries = se_policyDescriptorListType(input[_PA], context); - if (input[_PA]?.length === 0) { - entries.PolicyArns = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `PolicyArns.${key}`; - entries[loc] = value; - }); - } - if (input[_P] != null) { - entries[_P] = input[_P]; - } - if (input[_DS] != null) { - entries[_DS] = input[_DS]; - } - if (input[_T] != null) { - const memberEntries = se_tagListType(input[_T], context); - if (input[_T]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - if (input[_TTK] != null) { - const memberEntries = se_tagKeyListType(input[_TTK], context); - if (input[_TTK]?.length === 0) { - entries.TransitiveTagKeys = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `TransitiveTagKeys.${key}`; - entries[loc] = value; - }); - } - if (input[_EI] != null) { - entries[_EI] = input[_EI]; - } - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_TC] != null) { - entries[_TC] = input[_TC]; - } - if (input[_SI] != null) { - entries[_SI] = input[_SI]; - } - if (input[_PC] != null) { - const memberEntries = se_ProvidedContextsListType(input[_PC], context); - if (input[_PC]?.length === 0) { - entries.ProvidedContexts = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ProvidedContexts.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_AssumeRoleRequest"); -var se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RA] != null) { - entries[_RA] = input[_RA]; - } - if (input[_RSN] != null) { - entries[_RSN] = input[_RSN]; - } - if (input[_WIT] != null) { - entries[_WIT] = input[_WIT]; - } - if (input[_PI] != null) { - entries[_PI] = input[_PI]; - } - if (input[_PA] != null) { - const memberEntries = se_policyDescriptorListType(input[_PA], context); - if (input[_PA]?.length === 0) { - entries.PolicyArns = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `PolicyArns.${key}`; - entries[loc] = value; - }); - } - if (input[_P] != null) { - entries[_P] = input[_P]; - } - if (input[_DS] != null) { - entries[_DS] = input[_DS]; - } - return entries; -}, "se_AssumeRoleWithWebIdentityRequest"); -var se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_PolicyDescriptorType(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_policyDescriptorListType"); -var se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_a] != null) { - entries[_a] = input[_a]; - } - return entries; -}, "se_PolicyDescriptorType"); -var se_ProvidedContext = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_PAr] != null) { - entries[_PAr] = input[_PAr]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_ProvidedContext"); -var se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_ProvidedContext(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_ProvidedContextsListType"); -var se_Tag = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_K] != null) { - entries[_K] = input[_K]; - } - if (input[_Va] != null) { - entries[_Va] = input[_Va]; - } - return entries; -}, "se_Tag"); -var se_tagKeyListType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_tagKeyListType"); -var se_tagListType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_Tag(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_tagListType"); -var de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ARI] != null) { - contents[_ARI] = (0, import_smithy_client3.expectString)(output[_ARI]); - } - if (output[_Ar] != null) { - contents[_Ar] = (0, import_smithy_client3.expectString)(output[_Ar]); - } - return contents; -}, "de_AssumedRoleUser"); -var de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_C] != null) { - contents[_C] = de_Credentials(output[_C], context); - } - if (output[_ARU] != null) { - contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); - } - if (output[_PPS] != null) { - contents[_PPS] = (0, import_smithy_client3.strictParseInt32)(output[_PPS]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client3.expectString)(output[_SI]); - } - return contents; -}, "de_AssumeRoleResponse"); -var de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_C] != null) { - contents[_C] = de_Credentials(output[_C], context); - } - if (output[_SFWIT] != null) { - contents[_SFWIT] = (0, import_smithy_client3.expectString)(output[_SFWIT]); - } - if (output[_ARU] != null) { - contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); - } - if (output[_PPS] != null) { - contents[_PPS] = (0, import_smithy_client3.strictParseInt32)(output[_PPS]); - } - if (output[_Pr] != null) { - contents[_Pr] = (0, import_smithy_client3.expectString)(output[_Pr]); - } - if (output[_Au] != null) { - contents[_Au] = (0, import_smithy_client3.expectString)(output[_Au]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client3.expectString)(output[_SI]); - } - return contents; -}, "de_AssumeRoleWithWebIdentityResponse"); -var de_Credentials = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_AKI] != null) { - contents[_AKI] = (0, import_smithy_client3.expectString)(output[_AKI]); - } - if (output[_SAK] != null) { - contents[_SAK] = (0, import_smithy_client3.expectString)(output[_SAK]); - } - if (output[_ST] != null) { - contents[_ST] = (0, import_smithy_client3.expectString)(output[_ST]); - } - if (output[_E] != null) { - contents[_E] = (0, import_smithy_client3.expectNonNull)((0, import_smithy_client3.parseRfc3339DateTimeWithOffset)(output[_E])); - } - return contents; -}, "de_Credentials"); -var de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_ExpiredTokenException"); -var de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_IDPCommunicationErrorException"); -var de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_IDPRejectedClaimException"); -var de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_InvalidIdentityTokenException"); -var de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_MalformedPolicyDocumentException"); -var de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_PackedPolicyTooLargeException"); -var de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_RegionDisabledException"); -var deserializeMetadata = /* @__PURE__ */ __name((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"] -}), "deserializeMetadata"); -var throwDefaultError = (0, import_smithy_client3.withBaseException)(STSServiceException); -var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers - }; - if (resolvedHostname !== void 0) { - contents.hostname = resolvedHostname; - } - if (body !== void 0) { - contents.body = body; - } - return new import_protocol_http.HttpRequest(contents); -}, "buildHttpRpcRequest"); -var SHARED_HEADERS = { - "content-type": "application/x-www-form-urlencoded" -}; -var _ = "2011-06-15"; -var _A = "Action"; -var _AKI = "AccessKeyId"; -var _AR = "AssumeRole"; -var _ARI = "AssumedRoleId"; -var _ARU = "AssumedRoleUser"; -var _ARWWI = "AssumeRoleWithWebIdentity"; -var _Ar = "Arn"; -var _Au = "Audience"; -var _C = "Credentials"; -var _CA = "ContextAssertion"; -var _DS = "DurationSeconds"; -var _E = "Expiration"; -var _EI = "ExternalId"; -var _K = "Key"; -var _P = "Policy"; -var _PA = "PolicyArns"; -var _PAr = "ProviderArn"; -var _PC = "ProvidedContexts"; -var _PI = "ProviderId"; -var _PPS = "PackedPolicySize"; -var _Pr = "Provider"; -var _RA = "RoleArn"; -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 _V = "Version"; -var _Va = "Value"; -var _WIT = "WebIdentityToken"; -var _a = "arn"; -var _m = "message"; -var buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client3.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client3.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString"); -var loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => { - if (data.Error?.Code !== void 0) { - return data.Error.Code; - } - if (output.statusCode == 404) { - return "NotFound"; - } -}, "loadQueryErrorCode"); - -// src/submodules/sts/commands/AssumeRoleCommand.ts -var AssumeRoleCommand = class extends import_smithy_client4.Command.classBuilder().ep(import_EndpointParameters.commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() { - static { - __name(this, "AssumeRoleCommand"); - } -}; - -// src/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.ts -var import_middleware_endpoint2 = __nccwpck_require__(88205); -var import_middleware_serde2 = __nccwpck_require__(58305); -var import_smithy_client5 = __nccwpck_require__(61411); -var import_EndpointParameters2 = __nccwpck_require__(64361); -var AssumeRoleWithWebIdentityCommand = class extends import_smithy_client5.Command.classBuilder().ep(import_EndpointParameters2.commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() { - static { - __name(this, "AssumeRoleWithWebIdentityCommand"); - } -}; - -// src/submodules/sts/STS.ts -var import_STSClient = __nccwpck_require__(56001); -var commands = { - AssumeRoleCommand, - AssumeRoleWithWebIdentityCommand -}; -var STS = class extends import_STSClient.STSClient { - static { - __name(this, "STS"); - } -}; -(0, import_smithy_client6.createAggregatedClient)(commands, STS); - -// src/submodules/sts/index.ts -var import_EndpointParameters3 = __nccwpck_require__(64361); - -// src/submodules/sts/defaultStsRoleAssumers.ts -var import_client = __nccwpck_require__(17582); -var ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; -var getAccountIdFromAssumedRoleUser = /* @__PURE__ */ __name((assumedRoleUser) => { - if (typeof assumedRoleUser?.Arn === "string") { - const arnComponents = assumedRoleUser.Arn.split(":"); - if (arnComponents.length > 4 && arnComponents[4] !== "") { - return arnComponents[4]; - } - } - return void 0; -}, "getAccountIdFromAssumedRoleUser"); -var resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => { - const region = typeof _region === "function" ? await _region() : _region; - const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; - credentialProviderLogger?.debug?.( - "@aws-sdk/client-sts::resolveRegion", - "accepting first of:", - `${region} (provider)`, - `${parentRegion} (parent client)`, - `${ASSUME_ROLE_DEFAULT_REGION} (STS default)` - ); - return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION; -}, "resolveRegion"); -var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, STSClient3) => { - let stsClient; - let closureSourceCreds; - return async (sourceCreds, params) => { - closureSourceCreds = sourceCreds; - if (!stsClient) { - const { - logger = stsOptions?.parentClientConfig?.logger, - region, - requestHandler = stsOptions?.parentClientConfig?.requestHandler, - credentialProviderLogger - } = stsOptions; - const resolvedRegion = await resolveRegion( - region, - stsOptions?.parentClientConfig?.region, - credentialProviderLogger - ); - const isCompatibleRequestHandler = !isH2(requestHandler); - stsClient = new STSClient3({ - profile: stsOptions?.parentClientConfig?.profile, - // A hack to make sts client uses the credential in current closure. - credentialDefaultProvider: /* @__PURE__ */ __name(() => async () => closureSourceCreds, "credentialDefaultProvider"), - region: resolvedRegion, - requestHandler: isCompatibleRequestHandler ? requestHandler : void 0, - logger - }); - } - const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params)); - if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { - throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); - } - const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2); - const credentials = { - accessKeyId: Credentials2.AccessKeyId, - secretAccessKey: Credentials2.SecretAccessKey, - sessionToken: Credentials2.SessionToken, - expiration: Credentials2.Expiration, - // TODO(credentialScope): access normally when shape is updated. - ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope }, - ...accountId && { accountId } - }; - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i"); - return credentials; - }; -}, "getDefaultRoleAssumer"); -var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, STSClient3) => { - let stsClient; - return async (params) => { - if (!stsClient) { - const { - logger = stsOptions?.parentClientConfig?.logger, - region, - requestHandler = stsOptions?.parentClientConfig?.requestHandler, - credentialProviderLogger - } = stsOptions; - const resolvedRegion = await resolveRegion( - region, - stsOptions?.parentClientConfig?.region, - credentialProviderLogger - ); - const isCompatibleRequestHandler = !isH2(requestHandler); - stsClient = new STSClient3({ - profile: stsOptions?.parentClientConfig?.profile, - region: resolvedRegion, - requestHandler: isCompatibleRequestHandler ? requestHandler : void 0, - logger - }); - } - const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params)); - if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { - throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); - } - const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2); - const credentials = { - accessKeyId: Credentials2.AccessKeyId, - secretAccessKey: Credentials2.SecretAccessKey, - sessionToken: Credentials2.SessionToken, - expiration: Credentials2.Expiration, - // TODO(credentialScope): access normally when shape is updated. - ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope }, - ...accountId && { accountId } - }; - if (accountId) { - (0, import_client.setCredentialFeature)(credentials, "RESOLVED_ACCOUNT_ID", "T"); - } - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k"); - return credentials; - }; -}, "getDefaultRoleAssumerWithWebIdentity"); -var isH2 = /* @__PURE__ */ __name((requestHandler) => { - return requestHandler?.metadata?.handlerProtocol === "h2"; -}, "isH2"); - -// src/submodules/sts/defaultRoleAssumers.ts -var import_STSClient2 = __nccwpck_require__(56001); -var getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => { - if (!customizations) return baseCtor; - else - return class CustomizableSTSClient extends baseCtor { - static { - __name(this, "CustomizableSTSClient"); - } - constructor(config) { - super(config); - for (const customization of customizations) { - this.middlewareStack.use(customization); - } - } - }; -}, "getCustomizableStsClientCtor"); -var getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumer"); -var getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumerWithWebIdentity"); -var decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({ - roleAssumer: getDefaultRoleAssumer2(input), - roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input), - ...input -}), "decorateDefaultCredentialProvider"); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 18452: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(61860); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(77507)); -const core_1 = __nccwpck_require__(91446); -const util_user_agent_node_1 = __nccwpck_require__(9082); -const config_resolver_1 = __nccwpck_require__(39316); -const core_2 = __nccwpck_require__(22744); -const hash_node_1 = __nccwpck_require__(5092); -const middleware_retry_1 = __nccwpck_require__(19618); -const node_config_provider_1 = __nccwpck_require__(61814); -const node_http_handler_1 = __nccwpck_require__(95493); -const util_body_length_node_1 = __nccwpck_require__(13638); -const util_retry_1 = __nccwpck_require__(15518); -const runtimeConfig_shared_1 = __nccwpck_require__(57349); -const smithy_client_1 = __nccwpck_require__(61411); -const util_defaults_mode_node_1 = __nccwpck_require__(15435); -const smithy_client_2 = __nccwpck_require__(61411); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const loaderConfig = { - profile: config?.profile, - logger: clientSharedValues.logger, - }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || - (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()), - signer: new core_1.AwsSdkSigV4Signer(), - }, - { - schemeId: "smithy.api#noAuth", - identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), - signer: new core_2.NoAuthSigner(), - }, - ], - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 57349: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(91446); -const core_2 = __nccwpck_require__(22744); -const smithy_client_1 = __nccwpck_require__(61411); -const url_parser_1 = __nccwpck_require__(85792); -const util_base64_1 = __nccwpck_require__(82763); -const util_utf8_1 = __nccwpck_require__(85339); -const httpAuthSchemeProvider_1 = __nccwpck_require__(5037); -const endpointResolver_1 = __nccwpck_require__(35075); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2011-06-15", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - { - schemeId: "smithy.api#noAuth", - identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), - signer: new core_2.NoAuthSigner(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "STS", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 83488: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveRuntimeExtensions = void 0; -const region_config_resolver_1 = __nccwpck_require__(26521); -const protocol_http_1 = __nccwpck_require__(13494); -const smithy_client_1 = __nccwpck_require__(61411); -const httpAuthExtensionConfiguration_1 = __nccwpck_require__(54710); -const resolveRuntimeExtensions = (runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)); - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration)); -}; -exports.resolveRuntimeExtensions = resolveRuntimeExtensions; - - -/***/ }), - -/***/ 26521: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, - NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, - REGION_ENV_NAME: () => REGION_ENV_NAME, - REGION_INI_NAME: () => REGION_INI_NAME, - getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration, - resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration, - resolveRegionConfig: () => resolveRegionConfig -}); -module.exports = __toCommonJS(index_exports); - -// src/extensions/index.ts -var getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return { - setRegion(region) { - runtimeConfig.region = region; - }, - region() { - return runtimeConfig.region; - } - }; -}, "getAwsRegionExtensionConfiguration"); -var resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { - return { - region: awsRegionExtensionConfiguration.region() - }; -}, "resolveAwsRegionExtensionConfiguration"); - -// src/regionConfig/config.ts -var REGION_ENV_NAME = "AWS_REGION"; -var REGION_INI_NAME = "region"; -var NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: /* @__PURE__ */ __name((env) => env[REGION_ENV_NAME], "environmentVariableSelector"), - configFileSelector: /* @__PURE__ */ __name((profile) => profile[REGION_INI_NAME], "configFileSelector"), - default: /* @__PURE__ */ __name(() => { - throw new Error("Region is missing"); - }, "default") -}; -var NODE_REGION_CONFIG_FILE_OPTIONS = { - preferredFile: "credentials" -}; - -// src/regionConfig/isFipsRegion.ts -var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); - -// src/regionConfig/getRealRegion.ts -var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); - -// src/regionConfig/resolveRegionConfig.ts -var resolveRegionConfig = /* @__PURE__ */ __name((input) => { - const { region, useFipsEndpoint } = input; - if (!region) { - throw new Error("Region is missing"); - } - return Object.assign(input, { - region: /* @__PURE__ */ __name(async () => { - if (typeof region === "string") { - return getRealRegion(region); - } - const providedRegion = await region(); - return getRealRegion(providedRegion); - }, "region"), - useFipsEndpoint: /* @__PURE__ */ __name(async () => { - const providedRegion = typeof region === "string" ? region : await region(); - if (isFipsRegion(providedRegion)) { - return true; - } - return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); - }, "useFipsEndpoint") - }); -}, "resolveRegionConfig"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 88967: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - fromEnvSigningName: () => fromEnvSigningName, - fromSso: () => fromSso, - fromStatic: () => fromStatic, - nodeProvider: () => nodeProvider -}); -module.exports = __toCommonJS(index_exports); - -// src/fromEnvSigningName.ts -var import_client = __nccwpck_require__(17582); -var import_httpAuthSchemes = __nccwpck_require__(7321); -var import_property_provider = __nccwpck_require__(1104); -var fromEnvSigningName = /* @__PURE__ */ __name(({ logger, signingName } = {}) => async () => { - logger?.debug?.("@aws-sdk/token-providers - fromEnvSigningName"); - if (!signingName) { - throw new import_property_provider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger }); - } - const bearerTokenKey = (0, import_httpAuthSchemes.getBearerTokenEnvKey)(signingName); - if (!(bearerTokenKey in process.env)) { - throw new import_property_provider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger }); - } - const token = { token: process.env[bearerTokenKey] }; - (0, import_client.setTokenFeature)(token, "BEARER_SERVICE_ENV_VARS", "3"); - return token; -}, "fromEnvSigningName"); - -// src/fromSso.ts - - - -// src/constants.ts -var EXPIRE_WINDOW_MS = 5 * 60 * 1e3; -var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; - -// src/getSsoOidcClient.ts -var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion, init = {}) => { - const { SSOOIDCClient } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(54477))); - const ssoOidcClient = new SSOOIDCClient( - Object.assign({}, init.clientConfig ?? {}, { - region: ssoRegion ?? init.clientConfig?.region, - logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger - }) - ); - return ssoOidcClient; -}, "getSsoOidcClient"); - -// src/getNewSsoOidcToken.ts -var getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion, init = {}) => { - const { CreateTokenCommand } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(54477))); - const ssoOidcClient = await getSsoOidcClient(ssoRegion, init); - return ssoOidcClient.send( - new CreateTokenCommand({ - clientId: ssoToken.clientId, - clientSecret: ssoToken.clientSecret, - refreshToken: ssoToken.refreshToken, - grantType: "refresh_token" - }) - ); -}, "getNewSsoOidcToken"); - -// src/validateTokenExpiry.ts - -var validateTokenExpiry = /* @__PURE__ */ __name((token) => { - if (token.expiration && token.expiration.getTime() < Date.now()) { - throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); - } -}, "validateTokenExpiry"); - -// src/validateTokenKey.ts - -var validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => { - if (typeof value === "undefined") { - throw new import_property_provider.TokenProviderError( - `Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, - false - ); - } -}, "validateTokenKey"); - -// src/writeSSOTokenToFile.ts -var import_shared_ini_file_loader = __nccwpck_require__(93438); -var import_fs = __nccwpck_require__(79896); -var { writeFile } = import_fs.promises; -var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => { - const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id); - const tokenString = JSON.stringify(ssoToken, null, 2); - return writeFile(tokenFilepath, tokenString); -}, "writeSSOTokenToFile"); - -// src/fromSso.ts -var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); -var fromSso = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => { - const init = { - ..._init, - parentClientConfig: { - ...callerClientConfig, - ..._init.parentClientConfig - } - }; - init.logger?.debug("@aws-sdk/token-providers - fromSso"); - const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); - const profileName = (0, import_shared_ini_file_loader.getProfileName)({ - profile: init.profile ?? callerClientConfig?.profile - }); - const profile = profiles[profileName]; - if (!profile) { - throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); - } else if (!profile["sso_session"]) { - throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); - } - const ssoSessionName = profile["sso_session"]; - const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); - const ssoSession = ssoSessions[ssoSessionName]; - if (!ssoSession) { - throw new import_property_provider.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 import_property_provider.TokenProviderError( - `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, - false - ); - } - } - const ssoStartUrl = ssoSession["sso_start_url"]; - const ssoRegion = ssoSession["sso_region"]; - let ssoToken; - try { - ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName); - } catch (e) { - throw new import_property_provider.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; - } - if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) { - validateTokenExpiry(existingToken); - return existingToken; - } - validateTokenKey("clientId", ssoToken.clientId, true); - validateTokenKey("clientSecret", ssoToken.clientSecret, true); - validateTokenKey("refreshToken", ssoToken.refreshToken, true); - try { - lastRefreshAttemptTime.setTime(Date.now()); - const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init); - validateTokenKey("accessToken", newSsoOidcToken.accessToken); - validateTokenKey("expiresIn", newSsoOidcToken.expiresIn); - const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3); - 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; - } -}, "fromSso"); - -// src/fromStatic.ts - -var fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => { - logger?.debug("@aws-sdk/token-providers - fromStatic"); - if (!token || !token.token) { - throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false); - } - return token; -}, "fromStatic"); - -// src/nodeProvider.ts - -var nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)( - (0, import_property_provider.chain)(fromSso(init), async () => { - throw new import_property_provider.TokenProviderError("Could not load token from any providers", false); - }), - (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, - (token) => token.expiration !== void 0 -), "nodeProvider"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 16158: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - ConditionObject: () => import_util_endpoints.ConditionObject, - DeprecatedObject: () => import_util_endpoints.DeprecatedObject, - EndpointError: () => import_util_endpoints.EndpointError, - EndpointObject: () => import_util_endpoints.EndpointObject, - EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders, - EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties, - EndpointParams: () => import_util_endpoints.EndpointParams, - EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions, - EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject, - ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject, - EvaluateOptions: () => import_util_endpoints.EvaluateOptions, - Expression: () => import_util_endpoints.Expression, - FunctionArgv: () => import_util_endpoints.FunctionArgv, - FunctionObject: () => import_util_endpoints.FunctionObject, - FunctionReturn: () => import_util_endpoints.FunctionReturn, - ParameterObject: () => import_util_endpoints.ParameterObject, - ReferenceObject: () => import_util_endpoints.ReferenceObject, - ReferenceRecord: () => import_util_endpoints.ReferenceRecord, - RuleSetObject: () => import_util_endpoints.RuleSetObject, - RuleSetRules: () => import_util_endpoints.RuleSetRules, - TreeRuleObject: () => import_util_endpoints.TreeRuleObject, - awsEndpointFunctions: () => awsEndpointFunctions, - getUserAgentPrefix: () => getUserAgentPrefix, - isIpAddress: () => import_util_endpoints.isIpAddress, - partition: () => partition, - resolveDefaultAwsRegionalEndpointsConfig: () => resolveDefaultAwsRegionalEndpointsConfig, - resolveEndpoint: () => import_util_endpoints.resolveEndpoint, - setPartitionInfo: () => setPartitionInfo, - toEndpointV1: () => toEndpointV1, - useDefaultPartitionInfo: () => useDefaultPartitionInfo -}); -module.exports = __toCommonJS(index_exports); - -// src/aws.ts - - -// src/lib/aws/isVirtualHostableS3Bucket.ts - - -// src/lib/isIpAddress.ts -var import_util_endpoints = __nccwpck_require__(79674); - -// src/lib/aws/isVirtualHostableS3Bucket.ts -var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { - if (allowSubDomains) { - for (const label of value.split(".")) { - if (!isVirtualHostableS3Bucket(label)) { - return false; - } - } - return true; - } - if (!(0, import_util_endpoints.isValidHostLabel)(value)) { - return false; - } - if (value.length < 3 || value.length > 63) { - return false; - } - if (value !== value.toLowerCase()) { - return false; - } - if ((0, import_util_endpoints.isIpAddress)(value)) { - return false; - } - return true; -}, "isVirtualHostableS3Bucket"); - -// src/lib/aws/parseArn.ts -var ARN_DELIMITER = ":"; -var RESOURCE_DELIMITER = "/"; -var parseArn = /* @__PURE__ */ __name((value) => { - const segments = value.split(ARN_DELIMITER); - if (segments.length < 6) return null; - const [arn, partition2, service, region, accountId, ...resourcePath] = segments; - if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") return null; - const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); - return { - partition: partition2, - service, - region, - accountId, - resourceId - }; -}, "parseArn"); - -// src/lib/aws/partitions.json -var partitions_default = { - 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: "EU (Germany)" - } - } - }, { - id: "aws-iso", - outputs: { - dnsSuffix: "c2s.ic.gov", - dualStackDnsSuffix: "api.aws.ic.gov", - implicitGlobalRegion: "us-iso-east-1", - name: "aws-iso", - supportsDualStack: false, - 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: false, - 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)" - } - } - }, { - 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: false, - 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: false, - 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" -}; - -// src/lib/aws/partition.ts -var selectedPartitionsInfo = partitions_default; -var selectedUserAgentPrefix = ""; -var partition = /* @__PURE__ */ __name((value) => { - const { partitions } = selectedPartitionsInfo; - for (const partition2 of partitions) { - const { regions, outputs } = partition2; - for (const [region, regionData] of Object.entries(regions)) { - if (region === value) { - return { - ...outputs, - ...regionData - }; - } - } - } - for (const partition2 of partitions) { - const { regionRegex, outputs } = partition2; - if (new RegExp(regionRegex).test(value)) { - return { - ...outputs - }; - } - } - const DEFAULT_PARTITION = partitions.find((partition2) => partition2.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 - }; -}, "partition"); -var setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = "") => { - selectedPartitionsInfo = partitionsInfo; - selectedUserAgentPrefix = userAgentPrefix; -}, "setPartitionInfo"); -var useDefaultPartitionInfo = /* @__PURE__ */ __name(() => { - setPartitionInfo(partitions_default, ""); -}, "useDefaultPartitionInfo"); -var getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); - -// src/aws.ts -var awsEndpointFunctions = { - isVirtualHostableS3Bucket, - parseArn, - partition -}; -import_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions; - -// src/resolveDefaultAwsRegionalEndpointsConfig.ts -var import_url_parser = __nccwpck_require__(85792); -var resolveDefaultAwsRegionalEndpointsConfig = /* @__PURE__ */ __name((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 === void 0) { - 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: void 0 - }, - { logger: input.logger } - ) - ); - }; - } - return input; -}, "resolveDefaultAwsRegionalEndpointsConfig"); -var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => (0, import_url_parser.parseUrl)(endpoint.url), "toEndpointV1"); - -// src/resolveEndpoint.ts - - -// src/types/EndpointError.ts - - -// src/types/EndpointRuleObject.ts - - -// src/types/ErrorRuleObject.ts - - -// src/types/RuleSetObject.ts - - -// src/types/TreeRuleObject.ts - - -// src/types/shared.ts - -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 9082: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - NODE_APP_ID_CONFIG_OPTIONS: () => NODE_APP_ID_CONFIG_OPTIONS, - UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME, - UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME, - createDefaultUserAgentProvider: () => createDefaultUserAgentProvider, - crtAvailability: () => crtAvailability, - defaultUserAgent: () => defaultUserAgent -}); -module.exports = __toCommonJS(index_exports); - -// src/defaultUserAgent.ts -var import_os = __nccwpck_require__(70857); -var import_process = __nccwpck_require__(932); - -// src/crt-availability.ts -var crtAvailability = { - isCrtAvailable: false -}; - -// src/is-crt-available.ts -var isCrtAvailable = /* @__PURE__ */ __name(() => { - if (crtAvailability.isCrtAvailable) { - return ["md/crt-avail"]; - } - return null; -}, "isCrtAvailable"); - -// src/defaultUserAgent.ts -var createDefaultUserAgentProvider = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => { - return async (config) => { - const sections = [ - // sdk-metadata - ["aws-sdk-js", clientVersion], - // ua-metadata - ["ua", "2.1"], - // os-metadata - [`os/${(0, import_os.platform)()}`, (0, import_os.release)()], - // language-metadata - // ECMAScript edition doesn't matter in JS, so no version needed. - ["lang/js"], - ["md/nodejs", `${import_process.versions.node}`] - ]; - const crtAvailable = isCrtAvailable(); - if (crtAvailable) { - sections.push(crtAvailable); - } - if (serviceId) { - sections.push([`api/${serviceId}`, clientVersion]); - } - if (import_process.env.AWS_EXECUTION_ENV) { - sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]); - } - const appId = await config?.userAgentAppId?.(); - const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; - return resolvedUserAgent; - }; -}, "createDefaultUserAgentProvider"); -var defaultUserAgent = createDefaultUserAgentProvider; - -// src/nodeAppIdConfigOptions.ts -var import_middleware_user_agent = __nccwpck_require__(70997); -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: /* @__PURE__ */ __name((env2) => env2[UA_APP_ID_ENV_NAME], "environmentVariableSelector"), - configFileSelector: /* @__PURE__ */ __name((profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], "configFileSelector"), - default: import_middleware_user_agent.DEFAULT_UA_APP_ID -}; -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 2344: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - XmlNode: () => XmlNode, - XmlText: () => XmlText -}); -module.exports = __toCommonJS(index_exports); - -// src/escape-attribute.ts -function escapeAttribute(value) { - return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); -} -__name(escapeAttribute, "escapeAttribute"); - -// src/escape-element.ts -function escapeElement(value) { - return value.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r/g, " ").replace(/\n/g, " ").replace(/\u0085/g, "…").replace(/\u2028/, "
"); -} -__name(escapeElement, "escapeElement"); - -// src/XmlText.ts -var XmlText = class { - constructor(value) { - this.value = value; - } - static { - __name(this, "XmlText"); - } - toString() { - return escapeElement("" + this.value); - } -}; - -// src/XmlNode.ts -var XmlNode = class _XmlNode { - constructor(name, children = []) { - this.name = name; - this.children = children; - } - static { - __name(this, "XmlNode"); - } - attributes = {}; - static of(name, childText, withName) { - const node = new _XmlNode(name); - if (childText !== void 0) { - node.addChildNode(new XmlText(childText)); - } - if (withName !== void 0) { - node.withName(withName); - } - return node; - } - 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; - } - /** - * @internal - * Alias of {@link XmlNode#withName(string)} for codegen brevity. - */ - n(name) { - this.name = name; - return this; - } - /** - * @internal - * Alias of {@link XmlNode#addChildNode(string)} for codegen brevity. - */ - c(child) { - this.children.push(child); - return this; - } - /** - * @internal - * Checked version of {@link XmlNode#addAttribute(string)} for codegen brevity. - */ - a(name, value) { - if (value != null) { - this.attributes[name] = value; - } - return this; - } - /** - * Create a child node. - * Used in serialization of string fields. - * @internal - */ - cc(input, field, withName = field) { - if (input[field] != null) { - const node = _XmlNode.of(field, input[field]).withName(withName); - this.c(node); - } - } - /** - * Creates list child nodes. - * @internal - */ - l(input, listName, memberName, valueProvider) { - if (input[listName] != null) { - const nodes = valueProvider(); - nodes.map((node) => { - node.withName(memberName); - this.c(node); - }); - } - } - /** - * Creates list child nodes with container. - * @internal - */ - 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("")}`; - } -}; -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 22744: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig, - EXPIRATION_MS: () => EXPIRATION_MS, - HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner, - HttpBearerAuthSigner: () => HttpBearerAuthSigner, - NoAuthSigner: () => NoAuthSigner, - createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction, - createPaginator: () => createPaginator, - doesIdentityRequireRefresh: () => doesIdentityRequireRefresh, - getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin, - getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin, - getHttpSigningPlugin: () => getHttpSigningPlugin, - getSmithyContext: () => getSmithyContext, - httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions, - httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware, - httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions, - httpSigningMiddleware: () => httpSigningMiddleware, - httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions, - isIdentityExpired: () => isIdentityExpired, - memoizeIdentityProvider: () => memoizeIdentityProvider, - normalizeProvider: () => normalizeProvider, - requestBuilder: () => import_protocols.requestBuilder, - setFeature: () => setFeature -}); -module.exports = __toCommonJS(index_exports); - -// src/getSmithyContext.ts -var import_types = __nccwpck_require__(50892); -var getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); - -// src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts -var import_util_middleware = __nccwpck_require__(30954); - -// src/middleware-http-auth-scheme/resolveAuthOptions.ts -var resolveAuthOptions = /* @__PURE__ */ __name((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; -}, "resolveAuthOptions"); - -// src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts -function convertHttpAuthSchemesToMap(httpAuthSchemes) { - const map = /* @__PURE__ */ new Map(); - for (const scheme of httpAuthSchemes) { - map.set(scheme.schemeId, scheme); - } - return map; -} -__name(convertHttpAuthSchemesToMap, "convertHttpAuthSchemesToMap"); -var httpAuthSchemeMiddleware = /* @__PURE__ */ __name((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 = (0, import_util_middleware.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("\n")); - } - return next(args); -}, "httpAuthSchemeMiddleware"); - -// src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts -var httpAuthSchemeEndpointRuleSetMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: "endpointV2Middleware" -}; -var getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider -}) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.addRelativeTo( - httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider - }), - httpAuthSchemeEndpointRuleSetMiddlewareOptions - ); - }, "applyToStack") -}), "getHttpAuthSchemeEndpointRuleSetPlugin"); - -// src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts -var import_middleware_serde = __nccwpck_require__(58305); -var httpAuthSchemeMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: import_middleware_serde.serializerMiddlewareOption.name -}; -var getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider -}) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.addRelativeTo( - httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider - }), - httpAuthSchemeMiddlewareOptions - ); - }, "applyToStack") -}), "getHttpAuthSchemePlugin"); - -// src/middleware-http-signing/httpSigningMiddleware.ts -var import_protocol_http = __nccwpck_require__(13494); - -var defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error) => { - throw error; -}, "defaultErrorHandler"); -var defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => { -}, "defaultSuccessHandler"); -var httpSigningMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => { - if (!import_protocol_http.HttpRequest.isInstance(args.request)) { - return next(args); - } - const smithyContext = (0, import_util_middleware.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; -}, "httpSigningMiddleware"); - -// src/middleware-http-signing/getHttpSigningMiddleware.ts -var httpSigningMiddlewareOptions = { - step: "finalizeRequest", - tags: ["HTTP_SIGNING"], - name: "httpSigningMiddleware", - aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], - override: true, - relation: "after", - toMiddleware: "retryMiddleware" -}; -var getHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions); - }, "applyToStack") -}), "getHttpSigningPlugin"); - -// src/normalizeProvider.ts -var normalizeProvider = /* @__PURE__ */ __name((input) => { - if (typeof input === "function") return input; - const promisified = Promise.resolve(input); - return () => promisified; -}, "normalizeProvider"); - -// src/pagination/createPaginator.ts -var makePagedClientRequest = /* @__PURE__ */ __name(async (CommandCtor, client, input, withCommand = (_) => _, ...args) => { - let command = new CommandCtor(input); - command = withCommand(command) ?? command; - return await client.send(command, ...args); -}, "makePagedClientRequest"); -function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { - return /* @__PURE__ */ __name(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 void 0; - }, "paginateOperation"); -} -__name(createPaginator, "createPaginator"); -var get = /* @__PURE__ */ __name((fromObject, path) => { - let cursor = fromObject; - const pathComponents = path.split("."); - for (const step of pathComponents) { - if (!cursor || typeof cursor !== "object") { - return void 0; - } - cursor = cursor[step]; - } - return cursor; -}, "get"); - -// src/protocols/requestBuilder.ts -var import_protocols = __nccwpck_require__(86752); - -// src/setFeature.ts -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; -} -__name(setFeature, "setFeature"); - -// src/util-identity-and-auth/DefaultIdentityProviderConfig.ts -var DefaultIdentityProviderConfig = class { - /** - * Creates an IdentityProviderConfig with a record of scheme IDs to identity providers. - * - * @param config scheme IDs and identity providers to configure - */ - constructor(config) { - this.authSchemes = /* @__PURE__ */ new Map(); - for (const [key, value] of Object.entries(config)) { - if (value !== void 0) { - this.authSchemes.set(key, value); - } - } - } - static { - __name(this, "DefaultIdentityProviderConfig"); - } - getIdentityProvider(schemeId) { - return this.authSchemes.get(schemeId); - } -}; - -// src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts - - -var HttpApiKeyAuthSigner = class { - static { - __name(this, "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 = import_protocol_http.HttpRequest.clone(httpRequest); - if (signingProperties.in === import_types.HttpApiKeyAuthLocation.QUERY) { - clonedRequest.query[signingProperties.name] = identity.apiKey; - } else if (signingProperties.in === import_types.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; - } -}; - -// src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts - -var HttpBearerAuthSigner = class { - static { - __name(this, "HttpBearerAuthSigner"); - } - async sign(httpRequest, identity, signingProperties) { - const clonedRequest = import_protocol_http.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; - } -}; - -// src/util-identity-and-auth/httpAuthSchemes/noAuth.ts -var NoAuthSigner = class { - static { - __name(this, "NoAuthSigner"); - } - async sign(httpRequest, identity, signingProperties) { - return httpRequest; - } -}; - -// src/util-identity-and-auth/memoizeIdentityProvider.ts -var createIsIdentityExpiredFunction = /* @__PURE__ */ __name((expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs, "createIsIdentityExpiredFunction"); -var EXPIRATION_MS = 3e5; -var isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); -var doesIdentityRequireRefresh = /* @__PURE__ */ __name((identity) => identity.expiration !== void 0, "doesIdentityRequireRefresh"); -var memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { - if (provider === void 0) { - return void 0; - } - const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; - let resolved; - let pending; - let hasResult; - let isConstant = false; - const coalesceProvider = /* @__PURE__ */ __name(async (options) => { - if (!pending) { - pending = normalizedProvider(options); - } - try { - resolved = await pending; - hasResult = true; - isConstant = false; - } finally { - pending = void 0; - } - return resolved; - }, "coalesceProvider"); - if (isExpired === void 0) { - 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; - }; -}, "memoizeIdentityProvider"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 91467: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/cbor/index.ts -var index_exports = {}; -__export(index_exports, { - CborCodec: () => CborCodec, - CborShapeDeserializer: () => CborShapeDeserializer, - CborShapeSerializer: () => CborShapeSerializer, - SmithyRpcV2CborProtocol: () => SmithyRpcV2CborProtocol, - buildHttpRpcRequest: () => buildHttpRpcRequest, - cbor: () => cbor, - checkCborResponse: () => checkCborResponse, - dateToTag: () => dateToTag, - loadSmithyRpcV2CborErrorCode: () => loadSmithyRpcV2CborErrorCode, - parseCborBody: () => parseCborBody, - parseCborErrorBody: () => parseCborErrorBody, - tag: () => tag, - tagSymbol: () => tagSymbol -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/cbor/cbor-decode.ts -var import_serde = __nccwpck_require__(98520); -var import_util_utf8 = __nccwpck_require__(85339); - -// src/submodules/cbor/cbor-types.ts -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(data2) { - data2[tagSymbol] = true; - return data2; -} - -// src/submodules/cbor/cbor-decode.ts -var USE_TEXT_DECODER = typeof TextDecoder !== "undefined"; -var USE_BUFFER = typeof Buffer !== "undefined"; -var payload = alloc(0); -var dataView = new DataView(payload.buffer, payload.byteOffset, payload.byteLength); -var textDecoder = USE_TEXT_DECODER ? new TextDecoder() : null; -var _offset = 0; -function setPayload(bytes) { - payload = bytes; - dataView = new DataView(payload.buffer, payload.byteOffset, payload.byteLength); -} -function decode(at, to) { - if (at >= to) { - throw new Error("unexpected end of (decode) payload."); - } - const major = (payload[at] & 224) >> 5; - const minor = payload[at] & 31; - switch (major) { - case majorUint64: - case majorNegativeInt64: - case majorTag: - let unsignedInt; - let offset; - if (minor < 24) { - unsignedInt = minor; - offset = 1; - } else { - switch (minor) { - case extendedOneByte: - case extendedFloat16: - case extendedFloat32: - case extendedFloat64: - const countLength = minorValueToArgumentLength[minor]; - const countOffset = countLength + 1; - offset = countOffset; - if (to - at < countOffset) { - throw new Error(`countLength ${countLength} greater than remaining buf len.`); - } - const countIndex = at + 1; - if (countLength === 1) { - unsignedInt = payload[countIndex]; - } else if (countLength === 2) { - unsignedInt = dataView.getUint16(countIndex); - } else if (countLength === 4) { - unsignedInt = dataView.getUint32(countIndex); - } else { - unsignedInt = dataView.getBigUint64(countIndex); - } - break; - default: - throw new Error(`unexpected minor value ${minor}.`); - } - } - if (major === majorUint64) { - _offset = offset; - return castBigInt(unsignedInt); - } else if (major === majorNegativeInt64) { - let negativeInt; - if (typeof unsignedInt === "bigint") { - negativeInt = BigInt(-1) - unsignedInt; - } else { - negativeInt = -1 - unsignedInt; - } - _offset = offset; - return castBigInt(negativeInt); - } else { - if (minor === 2 || minor === 3) { - const length = decodeCount(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[i]); - } - _offset = offset + _offset + length; - return minor === 3 ? -b - BigInt(1) : b; - } else if (minor === 4) { - const decimalFraction = decode(at + offset, to); - const [exponent, mantissa] = decimalFraction; - const normalizer = mantissa < 0 ? -1 : 1; - const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + String(BigInt(normalizer) * BigInt(mantissa)); - let numericString; - const sign = mantissa < 0 ? "-" : ""; - 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; - _offset = offset + _offset; - return (0, import_serde.nv)(numericString); - } else { - const value = decode(at + offset, to); - const valueOffset = _offset; - _offset = offset + valueOffset; - return tag({ tag: castBigInt(unsignedInt), value }); - } - } - case majorUtf8String: - case majorMap: - case majorList: - case majorUnstructuredByteString: - 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); - } - } else { - switch (major) { - 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 bytesToUtf8(bytes, at, to) { - if (USE_BUFFER && bytes.constructor?.name === "Buffer") { - return bytes.toString("utf-8", at, to); - } - if (textDecoder) { - return textDecoder.decode(bytes.subarray(at, to)); - } - return (0, import_util_utf8.toUtf8)(bytes.subarray(at, to)); -} -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; -} -var minorValueToArgumentLength = { - [extendedOneByte]: 1, - [extendedFloat16]: 2, - [extendedFloat32]: 4, - [extendedFloat64]: 8 -}; -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; - let exponentComponent; - let summation; - if (exponent === 0) { - if (fraction === 0) { - return 0; - } else { - exponentComponent = Math.pow(2, 1 - 15); - summation = 0; - } - } else if (exponent === 31) { - if (fraction === 0) { - return scalar * Infinity; - } else { - return NaN; - } - } else { - exponentComponent = Math.pow(2, exponent - 15); - summation = 1; - } - summation += fraction / 1024; - return scalar * (exponentComponent * summation); -} -function decodeCount(at, to) { - const minor = payload[at] & 31; - if (minor < 24) { - _offset = 1; - return minor; - } - if (minor === extendedOneByte || minor === extendedFloat16 || minor === extendedFloat32 || minor === extendedFloat64) { - const countLength = minorValueToArgumentLength[minor]; - _offset = countLength + 1; - if (to - at < _offset) { - throw new Error(`countLength ${countLength} greater than remaining buf len.`); - } - const countIndex = at + 1; - if (countLength === 1) { - return payload[countIndex]; - } else if (countLength === 2) { - return dataView.getUint16(countIndex); - } else if (countLength === 4) { - return dataView.getUint32(countIndex); - } - return demote(dataView.getBigUint64(countIndex)); - } - throw new Error(`unexpected minor value ${minor}.`); -} -function decodeUtf8String(at, to) { - const length = decodeCount(at, to); - const offset = _offset; - at += offset; - if (to - at < length) { - throw new Error(`string len ${length} greater than remaining buf len.`); - } - const value = bytesToUtf8(payload, at, at + length); - _offset = offset + length; - return value; -} -function decodeUtf8StringIndefinite(at, to) { - at += 1; - const vector = []; - for (const base = at; at < to; ) { - if (payload[at] === 255) { - const data2 = alloc(vector.length); - data2.set(vector, 0); - _offset = at - base + 2; - return bytesToUtf8(data2, 0, data2.length); - } - const major = (payload[at] & 224) >> 5; - const minor = payload[at] & 31; - if (major !== majorUtf8String) { - throw new Error(`unexpected major type ${major} in indefinite string.`); - } - 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 decodeUnstructuredByteString(at, to) { - const length = decodeCount(at, to); - const offset = _offset; - at += offset; - if (to - at < length) { - throw new Error(`unstructured byte string len ${length} greater than remaining buf len.`); - } - const value = payload.subarray(at, at + length); - _offset = offset + length; - return value; -} -function decodeUnstructuredByteStringIndefinite(at, to) { - at += 1; - const vector = []; - for (const base = at; at < to; ) { - if (payload[at] === 255) { - const data2 = alloc(vector.length); - data2.set(vector, 0); - _offset = at - base + 2; - return data2; - } - const major = (payload[at] & 224) >> 5; - const minor = payload[at] & 31; - if (major !== majorUnstructuredByteString) { - throw new Error(`unexpected major type ${major} in indefinite string.`); - } - 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 decodeList(at, to) { - const listDataLength = decodeCount(at, to); - const offset = _offset; - at += offset; - const base = at; - const list = Array(listDataLength); - for (let i = 0; i < listDataLength; ++i) { - const item = decode(at, to); - const itemOffset = _offset; - list[i] = item; - at += itemOffset; - } - _offset = offset + (at - base); - return list; -} -function decodeListIndefinite(at, to) { - at += 1; - const list = []; - for (const base = at; at < to; ) { - if (payload[at] === 255) { - _offset = at - base + 2; - return list; - } - const item = decode(at, to); - const n = _offset; - at += n; - list.push(item); - } - throw new Error("expected break marker."); -} -function decodeMap(at, to) { - const mapDataLength = decodeCount(at, to); - const offset = _offset; - at += offset; - const base = at; - const map = {}; - for (let i = 0; i < mapDataLength; ++i) { - if (at >= to) { - throw new Error("unexpected end of map payload."); - } - const major = (payload[at] & 224) >> 5; - if (major !== majorUtf8String) { - throw new Error(`unexpected major type ${major} for map key at index ${at}.`); - } - const key = decode(at, to); - at += _offset; - const value = decode(at, to); - at += _offset; - map[key] = value; - } - _offset = offset + (at - base); - return map; -} -function decodeMapIndefinite(at, to) { - at += 1; - const base = at; - const map = {}; - for (; at < to; ) { - if (at >= to) { - throw new Error("unexpected end of map payload."); - } - if (payload[at] === 255) { - _offset = at - base + 2; - return map; - } - const major = (payload[at] & 224) >> 5; - if (major !== majorUtf8String) { - throw new Error(`unexpected major type ${major} for map key.`); - } - const key = decode(at, to); - at += _offset; - const value = decode(at, to); - at += _offset; - map[key] = value; - } - throw new Error("expected break marker."); -} -function decodeSpecial(at, to) { - const minor = payload[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(payload[at + 1], payload[at + 2]); - case extendedFloat32: - if (to - at < 5) { - throw new Error("incomplete float32 at end of buf."); - } - _offset = 5; - return dataView.getFloat32(at + 1); - case extendedFloat64: - if (to - at < 9) { - throw new Error("incomplete float64 at end of buf."); - } - _offset = 9; - return dataView.getFloat64(at + 1); - default: - throw new Error(`unexpected minor value ${minor}.`); - } -} -function castBigInt(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; -} - -// src/submodules/cbor/cbor-encode.ts -var import_serde2 = __nccwpck_require__(98520); -var import_util_utf82 = __nccwpck_require__(85339); -var USE_BUFFER2 = typeof Buffer !== "undefined"; -var initialSize = 2048; -var data = alloc(initialSize); -var dataView2 = new DataView(data.buffer, data.byteOffset, data.byteLength); -var cursor = 0; -function ensureSpace(bytes) { - const remaining = data.byteLength - cursor; - if (remaining < bytes) { - if (cursor < 16e6) { - resize(Math.max(data.byteLength * 4, data.byteLength + bytes)); - } else { - resize(data.byteLength + bytes + 16e6); - } - } -} -function toUint8Array() { - const out = alloc(cursor); - out.set(data.subarray(0, cursor), 0); - cursor = 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); - } - } - dataView2 = new DataView(data.buffer, data.byteOffset, data.byteLength); -} -function encodeHeader(major, value) { - if (value < 24) { - data[cursor++] = major << 5 | value; - } else if (value < 1 << 8) { - data[cursor++] = major << 5 | 24; - data[cursor++] = value; - } else if (value < 1 << 16) { - data[cursor++] = major << 5 | extendedFloat16; - dataView2.setUint16(cursor, value); - cursor += 2; - } else if (value < 2 ** 32) { - data[cursor++] = major << 5 | extendedFloat32; - dataView2.setUint32(cursor, value); - cursor += 4; - } else { - data[cursor++] = major << 5 | extendedFloat64; - dataView2.setBigUint64(cursor, typeof value === "bigint" ? value : BigInt(value)); - cursor += 8; - } -} -function encode(_input) { - const encodeStack = [_input]; - while (encodeStack.length) { - const input = encodeStack.pop(); - ensureSpace(typeof input === "string" ? input.length * 4 : 64); - if (typeof input === "string") { - if (USE_BUFFER2) { - encodeHeader(majorUtf8String, Buffer.byteLength(input)); - cursor += data.write(input, cursor); - } else { - const bytes = (0, import_util_utf82.fromUtf8)(input); - encodeHeader(majorUtf8String, bytes.byteLength); - data.set(bytes, cursor); - cursor += bytes.byteLength; - } - continue; - } else if (typeof input === "number") { - if (Number.isInteger(input)) { - const nonNegative = input >= 0; - const major = nonNegative ? majorUint64 : majorNegativeInt64; - const value = nonNegative ? input : -input - 1; - if (value < 24) { - data[cursor++] = major << 5 | value; - } else if (value < 256) { - data[cursor++] = major << 5 | 24; - data[cursor++] = value; - } else if (value < 65536) { - data[cursor++] = major << 5 | extendedFloat16; - data[cursor++] = value >> 8; - data[cursor++] = value; - } else if (value < 4294967296) { - data[cursor++] = major << 5 | extendedFloat32; - dataView2.setUint32(cursor, value); - cursor += 4; - } else { - data[cursor++] = major << 5 | extendedFloat64; - dataView2.setBigUint64(cursor, BigInt(value)); - cursor += 8; - } - continue; - } - data[cursor++] = majorSpecial << 5 | extendedFloat64; - dataView2.setFloat64(cursor, input); - cursor += 8; - continue; - } else if (typeof input === "bigint") { - const nonNegative = input >= 0; - const major = nonNegative ? majorUint64 : majorNegativeInt64; - const value = nonNegative ? input : -input - BigInt(1); - const n = Number(value); - if (n < 24) { - data[cursor++] = major << 5 | n; - } else if (n < 256) { - data[cursor++] = major << 5 | 24; - data[cursor++] = n; - } else if (n < 65536) { - data[cursor++] = major << 5 | extendedFloat16; - data[cursor++] = n >> 8; - data[cursor++] = n & 255; - } else if (n < 4294967296) { - data[cursor++] = major << 5 | extendedFloat32; - dataView2.setUint32(cursor, n); - cursor += 4; - } else if (value < BigInt("18446744073709551616")) { - data[cursor++] = major << 5 | extendedFloat64; - dataView2.setBigUint64(cursor, value); - cursor += 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); - data[cursor++] = nonNegative ? 194 : 195; - if (USE_BUFFER2) { - encodeHeader(majorUnstructuredByteString, Buffer.byteLength(bigIntBytes)); - } else { - encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength); - } - data.set(bigIntBytes, cursor); - cursor += bigIntBytes.byteLength; - } - continue; - } else if (input === null) { - data[cursor++] = majorSpecial << 5 | specialNull; - continue; - } else if (typeof input === "boolean") { - data[cursor++] = 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)) { - for (let i = input.length - 1; i >= 0; --i) { - encodeStack.push(input[i]); - } - encodeHeader(majorList, input.length); - continue; - } else if (typeof input.byteLength === "number") { - ensureSpace(input.length * 2); - encodeHeader(majorUnstructuredByteString, input.length); - data.set(input, cursor); - cursor += input.byteLength; - continue; - } else if (typeof input === "object") { - if (input instanceof import_serde2.NumericValue) { - const decimalIndex = input.string.indexOf("."); - const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1; - const mantissa = BigInt(input.string.replace(".", "")); - data[cursor++] = 196; - encodeStack.push(mantissa); - encodeStack.push(exponent); - encodeHeader(majorList, 2); - continue; - } - if (input[tagSymbol]) { - if ("tag" in input && "value" in input) { - encodeStack.push(input.value); - encodeHeader(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); - for (let i = keys.length - 1; i >= 0; --i) { - const key = keys[i]; - encodeStack.push(input[key]); - encodeStack.push(key); - } - encodeHeader(majorMap, keys.length); - continue; - } - throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`); - } -} - -// src/submodules/cbor/cbor.ts -var cbor = { - deserialize(payload2) { - setPayload(payload2); - return decode(0, payload2.length); - }, - serialize(input) { - try { - encode(input); - return toUint8Array(); - } catch (e) { - toUint8Array(); - throw e; - } - }, - /** - * @public - * @param size - byte length to allocate. - * - * This may be used to garbage collect the CBOR - * shared encoding buffer space, - * e.g. resizeEncodingBuffer(0); - * - * This may also be used to pre-allocate more space for - * CBOR encoding, e.g. resizeEncodingBuffer(100_000_000); - */ - resizeEncodingBuffer(size) { - resize(size); - } -}; - -// src/submodules/cbor/parseCborBody.ts -var import_protocols = __nccwpck_require__(86752); -var import_protocol_http = __nccwpck_require__(13494); -var import_util_body_length_browser = __nccwpck_require__(84916); -var parseCborBody = (streamBody, context) => { - return (0, import_protocols.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() / 1e3 - }); -}; -var parseCborErrorBody = async (errorBody, context) => { - const value = await parseCborBody(errorBody, context); - value.message = value.message ?? value.Message; - return value; -}; -var loadSmithyRpcV2CborErrorCode = (output, data2) => { - 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 (data2["__type"] !== void 0) { - return sanitizeErrorCode(data2["__type"]); - } - const codeKey = Object.keys(data2).find((key) => key.toLowerCase() === "code"); - if (codeKey && data2[codeKey] !== void 0) { - return sanitizeErrorCode(data2[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 { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers: { - // intentional copy. - ...headers - } - }; - if (resolvedHostname !== void 0) { - contents.hostname = resolvedHostname; - } - if (body !== void 0) { - contents.body = body; - try { - contents.headers["content-length"] = String((0, import_util_body_length_browser.calculateBodyLength)(body)); - } catch (e) { - } - } - return new import_protocol_http.HttpRequest(contents); -}; - -// src/submodules/cbor/SmithyRpcV2CborProtocol.ts -var import_protocols2 = __nccwpck_require__(86752); -var import_schema2 = __nccwpck_require__(41320); -var import_util_middleware = __nccwpck_require__(30954); - -// src/submodules/cbor/CborCodec.ts -var import_schema = __nccwpck_require__(41320); -var import_serde3 = __nccwpck_require__(98520); -var import_util_base64 = __nccwpck_require__(82763); -var CborCodec = class { - createSerializer() { - const serializer = new CborShapeSerializer(); - serializer.setSerdeContext(this.serdeContext); - return serializer; - } - createDeserializer() { - const deserializer = new CborShapeDeserializer(); - deserializer.setSerdeContext(this.serdeContext); - return deserializer; - } - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; - } -}; -var CborShapeSerializer = class { - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; - } - write(schema, value) { - this.value = this.serialize(schema, value); - } - /** - * Recursive serializer transform that copies and prepares the user input object - * for CBOR serialization. - */ - serialize(schema, source) { - const ns = import_schema.NormalizedSchema.of(schema); - if (source == null) { - if (ns.isIdempotencyToken()) { - return (0, import_serde3.generateIdempotencyToken)(); - } - return source; - } - if (ns.isBlobSchema()) { - if (typeof source === "string") { - return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(source); - } - return source; - } - if (ns.isTimestampSchema()) { - if (typeof source === "number" || typeof source === "bigint") { - return dateToTag(new Date(Number(source) / 1e3 | 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 of Object.keys(sourceObject)) { - 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; - } - } - } else if (ns.isDocumentSchema()) { - for (const key of Object.keys(sourceObject)) { - newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]); - } - } - return newObject; - } - return source; - } - flush() { - const buffer = cbor.serialize(this.value); - this.value = void 0; - return buffer; - } -}; -var CborShapeDeserializer = class { - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; - } - read(schema, bytes) { - const data2 = cbor.deserialize(bytes); - return this.readValue(schema, data2); - } - /** - * Public because it's called by the protocol implementation to deserialize errors. - * @internal - */ - readValue(_schema, value) { - const ns = import_schema.NormalizedSchema.of(_schema); - if (ns.isTimestampSchema() && typeof value === "number") { - return (0, import_serde3.parseEpochTimestamp)(value); - } - if (ns.isBlobSchema()) { - if (typeof value === "string") { - return (this.serdeContext?.base64Decoder ?? import_util_base64.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 === "function" || 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(); - const sparse = !!ns.getMergedTraits().sparse; - for (const item of value) { - const itemValue = this.readValue(memberSchema, item); - if (itemValue != null || sparse) { - newArray.push(itemValue); - } - } - return newArray; - } - const newObject = {}; - if (ns.isMapSchema()) { - const sparse = !!ns.getMergedTraits().sparse; - const targetSchema = ns.getValueSchema(); - for (const key of Object.keys(value)) { - const itemValue = this.readValue(targetSchema, value[key]); - if (itemValue != null || sparse) { - newObject[key] = itemValue; - } - } - } else if (ns.isStructSchema()) { - for (const [key, memberSchema] of ns.structIterator()) { - newObject[key] = this.readValue(memberSchema, value[key]); - } - } - return newObject; - } else { - return value; - } - } -}; - -// src/submodules/cbor/SmithyRpcV2CborProtocol.ts -var SmithyRpcV2CborProtocol = class extends import_protocols2.RpcProtocol { - constructor({ defaultNamespace }) { - super({ defaultNamespace }); - this.codec = new CborCodec(); - this.serializer = this.codec.createSerializer(); - this.deserializer = this.codec.createDeserializer(); - } - 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 ((0, import_schema2.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(); - } - try { - request.headers["content-length"] = String(request.body.byteLength); - } catch (e) { - } - } - const { service, operation } = (0, import_util_middleware.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"; - let namespace = this.options.defaultNamespace; - if (errorName.includes("#")) { - [namespace] = errorName.split("#"); - } - const errorMetadata = { - $metadata: metadata, - $response: response, - $fault: response.statusCode <= 500 ? "client" : "server" - }; - const registry = import_schema2.TypeRegistry.for(namespace); - let errorSchema; - try { - errorSchema = registry.getSchema(errorName); - } catch (e) { - if (dataObject.Message) { - dataObject.message = dataObject.Message; - } - const baseExceptionSchema = import_schema2.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); - if (baseExceptionSchema) { - const ErrorCtor = baseExceptionSchema.ctor; - throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject); - } - throw Object.assign(new Error(errorName), errorMetadata, dataObject); - } - const ns = import_schema2.NormalizedSchema.of(errorSchema); - const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const exception = new errorSchema.ctor(message); - 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"; - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 97505: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/event-streams/index.ts -var index_exports = {}; -__export(index_exports, { - EventStreamSerde: () => EventStreamSerde -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/event-streams/EventStreamSerde.ts -var import_schema = __nccwpck_require__(41320); -var import_util_utf8 = __nccwpck_require__(85339); -var EventStreamSerde = class { - /** - * Properties are injected by the HttpProtocol. - */ - constructor({ - marshaller, - serializer, - deserializer, - serdeContext, - defaultContentType - }) { - this.marshaller = marshaller; - this.serializer = serializer; - this.deserializer = deserializer; - this.serdeContext = serdeContext; - this.defaultContentType = defaultContentType; - } - /** - * @param eventStream - the iterable provided by the caller. - * @param requestSchema - the schema of the event stream container (struct). - * @param [initialRequest] - only provided if the initial-request is part of the event stream (RPC). - * - * @returns a stream suitable for the HTTP body of a request. - */ - async serializeEventStream({ - eventStream, - requestSchema, - initialRequest - }) { - const marshaller = this.marshaller; - const eventStreamMember = requestSchema.getEventStreamMember(); - const unionSchema = requestSchema.getMemberSchema(eventStreamMember); - const memberSchemas = unionSchema.getMemberSchemas(); - 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: "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 - }; - } - const unionMember = Object.keys(event).find((key) => { - return key !== "__type"; - }) ?? ""; - 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 - }; - }); - } - /** - * @param response - http response from which to read the event stream. - * @param unionSchema - schema of the event stream container (struct). - * @param [initialResponseContainer] - provided and written to only if the initial response is part of the event stream (RPC). - * - * @returns the asyncIterable of the event stream for the end-user. - */ - async deserializeEventStream({ - response, - responseSchema, - initialResponseContainer - }) { - 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) => { - const unionMember = Object.keys(event).find((key) => { - return key !== "__type"; - }) ?? ""; - if (unionMember === "initial-response") { - const dataObject = await this.deserializer.read(responseSchema, event[unionMember].body); - delete dataObject[eventStreamMember]; - return { - [initialResponseMarker]: true, - ...dataObject - }; - } else if (unionMember in memberSchemas) { - const eventStreamSchema = memberSchemas[unionMember]; - return { - [unionMember]: await this.deserializer.read(eventStreamSchema, event[unionMember].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, value] of Object.entries(firstEvent.value)) { - initialResponseContainer[key] = value; - } - } - return { - async *[Symbol.asyncIterator]() { - if (!firstEvent?.value?.[initialResponseMarker]) { - yield firstEvent.value; - } - while (true) { - const { done, value } = await asyncIterator.next(); - if (done) { - break; - } - yield value; - } - } - }; - } - /** - * @param unionMember - member name within the structure that contains an event stream union. - * @param unionSchema - schema of the union. - * @param event - * - * @returns the event body (bytes) and event type (string). - */ - writeEventBody(unionMember, unionSchema, event) { - const serializer = this.serializer; - let eventType = unionMember; - let explicitPayloadMember = null; - let explicitPayloadContentType; - const isKnownSchema = unionSchema.hasMemberSchema(unionMember); - const additionalHeaders = {}; - if (!isKnownSchema) { - const [type, value] = event[unionMember]; - eventType = type; - serializer.write(import_schema.SCHEMA.DOCUMENT, 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; - break; - } 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 { - throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union."); - } - } - const messageSerialization = serializer.flush(); - const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? import_util_utf8.fromUtf8)(messageSerialization) : messageSerialization; - return { - body, - eventType, - explicitPayloadContentType, - additionalHeaders - }; - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 86752: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/protocols/index.ts -var index_exports = {}; -__export(index_exports, { - FromStringShapeDeserializer: () => FromStringShapeDeserializer, - HttpBindingProtocol: () => HttpBindingProtocol, - HttpInterceptingShapeDeserializer: () => HttpInterceptingShapeDeserializer, - HttpInterceptingShapeSerializer: () => HttpInterceptingShapeSerializer, - HttpProtocol: () => HttpProtocol, - RequestBuilder: () => RequestBuilder, - RpcProtocol: () => RpcProtocol, - ToStringShapeSerializer: () => ToStringShapeSerializer, - collectBody: () => collectBody, - determineTimestampFormat: () => determineTimestampFormat, - extendedEncodeURIComponent: () => extendedEncodeURIComponent, - requestBuilder: () => requestBuilder, - resolvedPath: () => resolvedPath -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/protocols/collect-stream-body.ts -var import_util_stream = __nccwpck_require__(71914); -var collectBody = async (streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody); - } - if (!streamBody) { - return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); - } - const fromContext = context.streamCollector(streamBody); - return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext); -}; - -// src/submodules/protocols/extended-encode-uri-component.ts -function extendedEncodeURIComponent(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} - -// src/submodules/protocols/HttpBindingProtocol.ts -var import_schema2 = __nccwpck_require__(41320); -var import_serde = __nccwpck_require__(98520); -var import_protocol_http2 = __nccwpck_require__(13494); -var import_util_stream2 = __nccwpck_require__(71914); - -// src/submodules/protocols/HttpProtocol.ts -var import_schema = __nccwpck_require__(41320); -var import_protocol_http = __nccwpck_require__(13494); -var HttpProtocol = class { - constructor(options) { - this.options = options; - } - getRequestType() { - return import_protocol_http.HttpRequest; - } - getResponseType() { - return import_protocol_http.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) : void 0; - request.path = endpoint.url.pathname; - request.fragment = endpoint.url.hash || void 0; - request.username = endpoint.url.username || void 0; - request.password = endpoint.url.password || void 0; - for (const [k, v] of endpoint.url.searchParams.entries()) { - if (!request.query) { - request.query = {}; - } - request.query[k] = v; - } - return request; - } else { - request.protocol = endpoint.protocol; - request.hostname = endpoint.hostname; - request.port = endpoint.port ? Number(endpoint.port) : void 0; - request.path = endpoint.path; - request.query = { - ...endpoint.query - }; - return request; - } - } - setHostPrefix(request, operationSchema, input) { - const operationNs = import_schema.NormalizedSchema.of(operationSchema); - const inputNs = import_schema.NormalizedSchema.of(operationSchema.input); - if (operationNs.getMergedTraits().endpoint) { - let hostPrefix = operationNs.getMergedTraits().endpoint?.[0]; - if (typeof hostPrefix === "string") { - const hostLabelInputs = [...inputNs.structIterator()].filter( - ([, member]) => member.getMergedTraits().hostLabel - ); - for (const [name] of hostLabelInputs) { - 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; - } - } - } - 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"] - }; - } - /** - * @param eventStream - the iterable provided by the caller. - * @param requestSchema - the schema of the event stream container (struct). - * @param [initialRequest] - only provided if the initial-request is part of the event stream (RPC). - * - * @returns a stream suitable for the HTTP body of a request. - */ - async serializeEventStream({ - eventStream, - requestSchema, - initialRequest - }) { - const eventStreamSerde = await this.loadEventStreamCapability(); - return eventStreamSerde.serializeEventStream({ - eventStream, - requestSchema, - initialRequest - }); - } - /** - * @param response - http response from which to read the event stream. - * @param unionSchema - schema of the event stream container (struct). - * @param [initialResponseContainer] - provided and written to only if the initial response is part of the event stream (RPC). - * - * @returns the asyncIterable of the event stream. - */ - async deserializeEventStream({ - response, - responseSchema, - initialResponseContainer - }) { - const eventStreamSerde = await this.loadEventStreamCapability(); - return eventStreamSerde.deserializeEventStream({ - response, - responseSchema, - initialResponseContainer - }); - } - /** - * Loads eventStream capability async (for chunking). - */ - async loadEventStreamCapability() { - const { EventStreamSerde } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(97505))); - return new EventStreamSerde({ - marshaller: this.getEventStreamMarshaller(), - serializer: this.serializer, - deserializer: this.deserializer, - serdeContext: this.serdeContext, - defaultContentType: this.getDefaultContentType() - }); - } - /** - * @returns content-type default header value for event stream events and other documents. - */ - getDefaultContentType() { - throw new Error( - `@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.` - ); - } - async deserializeHttpMessage(schema, context, response, arg4, arg5) { - void schema; - void context; - void response; - void arg4; - void arg5; - return []; - } - getEventStreamMarshaller() { - const context = this.serdeContext; - if (!context.eventStreamMarshaller) { - throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext."); - } - return context.eventStreamMarshaller; - } -}; - -// src/submodules/protocols/HttpBindingProtocol.ts -var HttpBindingProtocol = class extends HttpProtocol { - async serializeRequest(operationSchema, _input, context) { - const input = { - ..._input ?? {} - }; - const serializer = this.serializer; - const query = {}; - const headers = {}; - const endpoint = await context.endpoint(); - const ns = import_schema2.NormalizedSchema.of(operationSchema?.input); - const schema = ns.getSchema(); - let hasNonHttpBindingMember = false; - let payload; - const request = new import_protocol_http2.HttpRequest({ - protocol: "", - hostname: "", - port: void 0, - path: "", - fragment: void 0, - query, - headers, - body: void 0 - }); - if (endpoint) { - this.updateServiceEndpoint(request, endpoint); - this.setHostPrefix(request, operationSchema, input); - const opTraits = import_schema2.NormalizedSchema.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 ?? ""); - Object.assign(query, Object.fromEntries(traitSearchParams)); - } - } - for (const [memberName, memberNs] of ns.structIterator()) { - const memberTraits = memberNs.getMergedTraits() ?? {}; - const inputMemberValue = input[memberName]; - if (inputMemberValue == null) { - 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(); - } - delete input[memberName]; - } 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)); - } - delete input[memberName]; - } else if (memberTraits.httpHeader) { - serializer.write(memberNs, inputMemberValue); - headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush()); - delete input[memberName]; - } else if (typeof memberTraits.httpPrefixHeaders === "string") { - for (const [key, val] of Object.entries(inputMemberValue)) { - const amalgam = memberTraits.httpPrefixHeaders + key; - serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val); - headers[amalgam.toLowerCase()] = serializer.flush(); - } - delete input[memberName]; - } else if (memberTraits.httpQuery || memberTraits.httpQueryParams) { - this.serializeQuery(memberNs, inputMemberValue, query); - delete input[memberName]; - } else { - hasNonHttpBindingMember = true; - } - } - if (hasNonHttpBindingMember && input) { - serializer.write(schema, 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, val] of Object.entries(data)) { - if (!(key in query)) { - const valueSchema = ns.getValueSchema(); - Object.assign(valueSchema.getMergedTraits(), { - // We pass on the traits to the sub-schema - // because we are still in the process of serializing the map itself. - ...traits, - httpQuery: key, - httpQueryParams: void 0 - }); - 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 !== void 0) { - 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 = import_schema2.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(import_schema2.SCHEMA.DOCUMENT, 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) { - 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) { - dataObject[member] = dataFromBody[member]; - } - } - } - 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; - } - const deserializer = this.deserializer; - const ns = import_schema2.NormalizedSchema.of(schema); - const nonHttpBindingMembers = []; - for (const [memberName, memberSchema] of ns.structIterator()) { - const memberTraits = memberSchema.getMemberTraits(); - if (memberTraits.httpPayload) { - const isStreaming = memberSchema.isStreaming(); - if (isStreaming) { - const isEventStream = memberSchema.isStructSchema(); - if (isEventStream) { - dataObject[memberName] = await this.deserializeEventStream({ - response, - responseSchema: ns - }); - } else { - dataObject[memberName] = (0, import_util_stream2.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 (null != value) { - if (memberSchema.isListSchema()) { - const headerListValueSchema = memberSchema.getValueSchema(); - headerListValueSchema.getMergedTraits().httpHeader = key; - let sections; - if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === import_schema2.SCHEMA.TIMESTAMP_DEFAULT) { - sections = (0, import_serde.splitEvery)(value, ",", 2); - } else { - sections = (0, import_serde.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 !== void 0) { - dataObject[memberName] = {}; - for (const [header, value] of Object.entries(response.headers)) { - if (header.startsWith(memberTraits.httpPrefixHeaders)) { - 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); - } - } - return nonHttpBindingMembers; - } -}; - -// src/submodules/protocols/RpcProtocol.ts -var import_schema3 = __nccwpck_require__(41320); -var import_protocol_http3 = __nccwpck_require__(13494); -var RpcProtocol = class extends HttpProtocol { - async serializeRequest(operationSchema, input, context) { - const serializer = this.serializer; - const query = {}; - const headers = {}; - const endpoint = await context.endpoint(); - const ns = import_schema3.NormalizedSchema.of(operationSchema?.input); - const schema = ns.getSchema(); - let payload; - const request = new import_protocol_http3.HttpRequest({ - protocol: "", - hostname: "", - port: void 0, - path: "/", - fragment: void 0, - query, - headers, - body: void 0 - }); - if (endpoint) { - this.updateServiceEndpoint(request, endpoint); - this.setHostPrefix(request, operationSchema, input); - } - const _input = { - ...input - }; - if (input) { - const eventStreamMember = ns.getEventStreamMember(); - if (eventStreamMember) { - if (_input[eventStreamMember]) { - const initialRequest = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - if (memberName !== eventStreamMember && _input[memberName]) { - serializer.write(memberSchema, _input[memberName]); - initialRequest[memberName] = serializer.flush(); - } - } - payload = await this.serializeEventStream({ - eventStream: _input[eventStreamMember], - requestSchema: ns, - initialRequest - }); - } - } else { - serializer.write(schema, _input); - payload = serializer.flush(); - } - } - 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 = import_schema3.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(import_schema3.SCHEMA.DOCUMENT, 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) { - 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; - } -}; - -// src/submodules/protocols/requestBuilder.ts -var import_protocol_http4 = __nccwpck_require__(13494); - -// src/submodules/protocols/resolve-path.ts -var resolvedPath = (resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { - if (input != null && input[memberName] !== void 0) { - const labelValue = labelValueProvider(); - if (labelValue.length <= 0) { - throw new Error("Empty value provided for input HTTP label: " + memberName + "."); - } - resolvedPath2 = resolvedPath2.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 resolvedPath2; -}; - -// src/submodules/protocols/requestBuilder.ts -function requestBuilder(input, context) { - return new RequestBuilder(input, context); -} -var RequestBuilder = class { - constructor(input, context) { - this.input = input; - this.context = context; - this.query = {}; - this.method = ""; - this.headers = {}; - this.path = ""; - this.body = null; - this.hostname = ""; - this.resolvePathStack = []; - } - 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 import_protocol_http4.HttpRequest({ - protocol, - hostname: this.hostname || hostname, - port, - method: this.method, - path: this.path, - query: this.query, - body: this.body, - headers: this.headers - }); - } - /** - * Brevity setter for "hostname". - */ - hn(hostname) { - this.hostname = hostname; - return this; - } - /** - * Brevity initial builder for "basepath". - */ - bp(uriLabel) { - this.resolvePathStack.push((basePath) => { - this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; - }); - return this; - } - /** - * Brevity incremental builder for "path". - */ - p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { - this.resolvePathStack.push((path) => { - this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); - }); - return this; - } - /** - * Brevity setter for "headers". - */ - h(headers) { - this.headers = headers; - return this; - } - /** - * Brevity setter for "query". - */ - q(query) { - this.query = query; - return this; - } - /** - * Brevity setter for "body". - */ - b(body) { - this.body = body; - return this; - } - /** - * Brevity setter for "method". - */ - m(method) { - this.method = method; - return this; - } -}; - -// src/submodules/protocols/serde/FromStringShapeDeserializer.ts -var import_schema5 = __nccwpck_require__(41320); -var import_serde2 = __nccwpck_require__(98520); -var import_util_base64 = __nccwpck_require__(82763); -var import_util_utf8 = __nccwpck_require__(85339); - -// src/submodules/protocols/serde/determineTimestampFormat.ts -var import_schema4 = __nccwpck_require__(41320); -function determineTimestampFormat(ns, settings) { - if (settings.timestampFormat.useTrait) { - if (ns.isTimestampSchema() && (ns.getSchema() === import_schema4.SCHEMA.TIMESTAMP_DATE_TIME || ns.getSchema() === import_schema4.SCHEMA.TIMESTAMP_HTTP_DATE || ns.getSchema() === import_schema4.SCHEMA.TIMESTAMP_EPOCH_SECONDS)) { - return ns.getSchema(); - } - } - const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits(); - const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === "string" || Boolean(httpHeader) ? import_schema4.SCHEMA.TIMESTAMP_HTTP_DATE : Boolean(httpQuery) || Boolean(httpLabel) ? import_schema4.SCHEMA.TIMESTAMP_DATE_TIME : void 0 : void 0; - return bindingFormat ?? settings.timestampFormat.default; -} - -// src/submodules/protocols/serde/FromStringShapeDeserializer.ts -var FromStringShapeDeserializer = class { - constructor(settings) { - this.settings = settings; - } - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; - } - read(_schema, data) { - const ns = import_schema5.NormalizedSchema.of(_schema); - if (ns.isListSchema()) { - return (0, import_serde2.splitHeader)(data).map((item) => this.read(ns.getValueSchema(), item)); - } - if (ns.isBlobSchema()) { - return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(data); - } - if (ns.isTimestampSchema()) { - const format = determineTimestampFormat(ns, this.settings); - switch (format) { - case import_schema5.SCHEMA.TIMESTAMP_DATE_TIME: - return (0, import_serde2.parseRfc3339DateTimeWithOffset)(data); - case import_schema5.SCHEMA.TIMESTAMP_HTTP_DATE: - return (0, import_serde2.parseRfc7231DateTime)(data); - case import_schema5.SCHEMA.TIMESTAMP_EPOCH_SECONDS: - return (0, import_serde2.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 = import_serde2.LazyJsonString.from(intermediateValue); - } - return intermediateValue; - } - } - switch (true) { - case ns.isNumericSchema(): - return Number(data); - case ns.isBigIntegerSchema(): - return BigInt(data); - case ns.isBigDecimalSchema(): - return new import_serde2.NumericValue(data, "bigDecimal"); - case ns.isBooleanSchema(): - return String(data).toLowerCase() === "true"; - } - return data; - } - base64ToUtf8(base64String) { - return (this.serdeContext?.utf8Encoder ?? import_util_utf8.toUtf8)((this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(base64String)); - } -}; - -// src/submodules/protocols/serde/HttpInterceptingShapeDeserializer.ts -var import_schema6 = __nccwpck_require__(41320); -var import_util_utf82 = __nccwpck_require__(85339); -var HttpInterceptingShapeDeserializer = class { - constructor(codecDeserializer, codecSettings) { - 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 = import_schema6.NormalizedSchema.of(schema); - const traits = ns.getMergedTraits(); - const toString = this.serdeContext?.utf8Encoder ?? import_util_utf82.toUtf8; - if (traits.httpHeader || traits.httpResponseCode) { - return this.stringDeserializer.read(ns, toString(data)); - } - if (traits.httpPayload) { - if (ns.isBlobSchema()) { - const toBytes = this.serdeContext?.utf8Decoder ?? import_util_utf82.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); - } -}; - -// src/submodules/protocols/serde/HttpInterceptingShapeSerializer.ts -var import_schema8 = __nccwpck_require__(41320); - -// src/submodules/protocols/serde/ToStringShapeSerializer.ts -var import_schema7 = __nccwpck_require__(41320); -var import_serde3 = __nccwpck_require__(98520); -var import_util_base642 = __nccwpck_require__(82763); -var ToStringShapeSerializer = class { - constructor(settings) { - this.settings = settings; - this.stringBuffer = ""; - this.serdeContext = void 0; - } - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; - } - write(schema, value) { - const ns = import_schema7.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 import_schema7.SCHEMA.TIMESTAMP_DATE_TIME: - this.stringBuffer = value.toISOString().replace(".000Z", "Z"); - break; - case import_schema7.SCHEMA.TIMESTAMP_HTTP_DATE: - this.stringBuffer = (0, import_serde3.dateToUtcString)(value); - break; - case import_schema7.SCHEMA.TIMESTAMP_EPOCH_SECONDS: - this.stringBuffer = String(value.getTime() / 1e3); - break; - default: - console.warn("Missing timestamp format, using epoch seconds", value); - this.stringBuffer = String(value.getTime() / 1e3); - } - return; - } - if (ns.isBlobSchema() && "byteLength" in value) { - this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.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 : (0, import_serde3.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 = import_serde3.LazyJsonString.from(intermediateValue); - } - if (ns.getMergedTraits().httpHeader) { - this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(intermediateValue.toString()); - return; - } - } - this.stringBuffer = value; - break; - default: - this.stringBuffer = String(value); - } - } - flush() { - const buffer = this.stringBuffer; - this.stringBuffer = ""; - return buffer; - } -}; - -// src/submodules/protocols/serde/HttpInterceptingShapeSerializer.ts -var HttpInterceptingShapeSerializer = class { - 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 = import_schema8.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 !== void 0) { - const buffer = this.buffer; - this.buffer = void 0; - return buffer; - } - return this.codecSerializer.flush(); - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 41320: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/schema/index.ts -var index_exports = {}; -__export(index_exports, { - ErrorSchema: () => ErrorSchema, - ListSchema: () => ListSchema, - MapSchema: () => MapSchema, - NormalizedSchema: () => NormalizedSchema, - OperationSchema: () => OperationSchema, - SCHEMA: () => SCHEMA, - Schema: () => Schema, - SimpleSchema: () => SimpleSchema, - StructureSchema: () => StructureSchema, - TypeRegistry: () => TypeRegistry, - deref: () => deref, - deserializerMiddlewareOption: () => deserializerMiddlewareOption, - error: () => error, - getSchemaSerdePlugin: () => getSchemaSerdePlugin, - list: () => list, - map: () => map, - op: () => op, - serializerMiddlewareOption: () => serializerMiddlewareOption, - sim: () => sim, - struct: () => struct -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/schema/deref.ts -var deref = (schemaRef) => { - if (typeof schemaRef === "function") { - return schemaRef(); - } - return schemaRef; -}; - -// src/submodules/schema/middleware/schemaDeserializationMiddleware.ts -var import_protocol_http = __nccwpck_require__(13494); -var import_util_middleware = __nccwpck_require__(30954); -var schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { - const { response } = await next(args); - const { operationSchema } = (0, import_util_middleware.getSmithyContext)(context); - try { - const parsed = await config.protocol.deserializeResponse( - operationSchema, - { - ...config, - ...context - }, - response - ); - return { - response, - output: parsed - }; - } catch (error2) { - Object.defineProperty(error2, "$response", { - value: response - }); - if (!("$metadata" in error2)) { - const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; - try { - error2.message += "\n " + hint; - } catch (e) { - if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { - console.warn(hint); - } else { - context.logger?.warn?.(hint); - } - } - if (typeof error2.$responseBodyText !== "undefined") { - if (error2.$response) { - error2.$response.body = error2.$responseBodyText; - } - } - try { - if (import_protocol_http.HttpResponse.isInstance(response)) { - const { headers = {} } = response; - const headerEntries = Object.entries(headers); - error2.$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 (e) { - } - } - throw error2; - } -}; -var findHeader = (pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; -}; - -// src/submodules/schema/middleware/schemaSerializationMiddleware.ts -var import_util_middleware2 = __nccwpck_require__(30954); -var schemaSerializationMiddleware = (config) => (next, context) => async (args) => { - const { operationSchema } = (0, import_util_middleware2.getSmithyContext)(context); - const endpoint = context.endpointV2?.url && config.urlParser ? async () => config.urlParser(context.endpointV2.url) : config.endpoint; - const request = await config.protocol.serializeRequest(operationSchema, args.input, { - ...config, - ...context, - endpoint - }); - return next({ - ...args, - request - }); -}; - -// src/submodules/schema/middleware/getSchemaSerdePlugin.ts -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); - } - }; -} - -// src/submodules/schema/TypeRegistry.ts -var TypeRegistry = class _TypeRegistry { - constructor(namespace, schemas = /* @__PURE__ */ new Map()) { - this.namespace = namespace; - this.schemas = schemas; - } - static { - this.registries = /* @__PURE__ */ new Map(); - } - /** - * @param namespace - specifier. - * @returns the schema for that namespace, creating it if necessary. - */ - static for(namespace) { - if (!_TypeRegistry.registries.has(namespace)) { - _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace)); - } - return _TypeRegistry.registries.get(namespace); - } - /** - * Adds the given schema to a type registry with the same namespace. - * - * @param shapeId - to be registered. - * @param schema - to be registered. - */ - register(shapeId, schema) { - const qualifiedName = this.normalizeShapeId(shapeId); - const registry = _TypeRegistry.for(this.getNamespace(shapeId)); - registry.schemas.set(qualifiedName, schema); - } - /** - * @param shapeId - query. - * @returns the schema. - */ - getSchema(shapeId) { - const id = this.normalizeShapeId(shapeId); - if (!this.schemas.has(id)) { - throw new Error(`@smithy/core/schema - schema not found for ${id}`); - } - return this.schemas.get(id); - } - /** - * The smithy-typescript code generator generates a synthetic (i.e. unmodeled) base exception, - * because generated SDKs before the introduction of schemas have the notion of a ServiceBaseException, which - * is unique per service/model. - * - * This is generated under a unique prefix that is combined with the service namespace, and this - * method is used to retrieve it. - * - * The base exception synthetic schema is used when an error is returned by a service, but we cannot - * determine what existing schema to use to deserialize it. - * - * @returns the synthetic base exception of the service namespace associated with this registry instance. - */ - getBaseException() { - for (const [id, schema] of this.schemas.entries()) { - if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { - return schema; - } - } - return void 0; - } - /** - * @param predicate - criterion. - * @returns a schema in this registry matching the predicate. - */ - find(predicate) { - return [...this.schemas.values()].find(predicate); - } - /** - * Unloads the current TypeRegistry. - */ - destroy() { - _TypeRegistry.registries.delete(this.namespace); - this.schemas.clear(); - } - normalizeShapeId(shapeId) { - if (shapeId.includes("#")) { - return shapeId; - } - return this.namespace + "#" + shapeId; - } - getNamespace(shapeId) { - return this.normalizeShapeId(shapeId).split("#")[0]; - } -}; - -// src/submodules/schema/schemas/Schema.ts -var Schema = class { - static assign(instance, values) { - const schema = Object.assign(instance, values); - TypeRegistry.for(schema.namespace).register(schema.name, schema); - return schema; - } - static [Symbol.hasInstance](lhs) { - const isPrototype = this.prototype.isPrototypeOf(lhs); - if (!isPrototype && typeof lhs === "object" && lhs !== null) { - const list2 = lhs; - return list2.symbol === this.symbol; - } - return isPrototype; - } - getName() { - return this.namespace + "#" + this.name; - } -}; - -// src/submodules/schema/schemas/ListSchema.ts -var ListSchema = class _ListSchema extends Schema { - constructor() { - super(...arguments); - this.symbol = _ListSchema.symbol; - } - static { - this.symbol = Symbol.for("@smithy/lis"); - } -}; -var list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), { - name, - namespace, - traits, - valueSchema -}); - -// src/submodules/schema/schemas/MapSchema.ts -var MapSchema = class _MapSchema extends Schema { - constructor() { - super(...arguments); - this.symbol = _MapSchema.symbol; - } - static { - this.symbol = Symbol.for("@smithy/map"); - } -}; -var map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), { - name, - namespace, - traits, - keySchema, - valueSchema -}); - -// src/submodules/schema/schemas/OperationSchema.ts -var OperationSchema = class _OperationSchema extends Schema { - constructor() { - super(...arguments); - this.symbol = _OperationSchema.symbol; - } - static { - this.symbol = Symbol.for("@smithy/ope"); - } -}; -var op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), { - name, - namespace, - traits, - input, - output -}); - -// src/submodules/schema/schemas/StructureSchema.ts -var StructureSchema = class _StructureSchema extends Schema { - constructor() { - super(...arguments); - this.symbol = _StructureSchema.symbol; - } - static { - this.symbol = Symbol.for("@smithy/str"); - } -}; -var struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), { - name, - namespace, - traits, - memberNames, - memberList -}); - -// src/submodules/schema/schemas/ErrorSchema.ts -var ErrorSchema = class _ErrorSchema extends StructureSchema { - constructor() { - super(...arguments); - this.symbol = _ErrorSchema.symbol; - } - static { - this.symbol = Symbol.for("@smithy/err"); - } -}; -var error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { - name, - namespace, - traits, - memberNames, - memberList, - ctor -}); - -// src/submodules/schema/schemas/sentinels.ts -var SCHEMA = { - BLOB: 21, - // 21 - STREAMING_BLOB: 42, - // 42 - BOOLEAN: 2, - // 2 - STRING: 0, - // 0 - NUMERIC: 1, - // 1 - BIG_INTEGER: 17, - // 17 - BIG_DECIMAL: 19, - // 19 - DOCUMENT: 15, - // 15 - TIMESTAMP_DEFAULT: 4, - // 4 - TIMESTAMP_DATE_TIME: 5, - // 5 - TIMESTAMP_HTTP_DATE: 6, - // 6 - TIMESTAMP_EPOCH_SECONDS: 7, - // 7 - LIST_MODIFIER: 64, - // 64 - MAP_MODIFIER: 128 - // 128 -}; - -// src/submodules/schema/schemas/SimpleSchema.ts -var SimpleSchema = class _SimpleSchema extends Schema { - constructor() { - super(...arguments); - this.symbol = _SimpleSchema.symbol; - } - static { - this.symbol = Symbol.for("@smithy/sim"); - } -}; -var sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef -}); - -// src/submodules/schema/schemas/NormalizedSchema.ts -var NormalizedSchema = class _NormalizedSchema { - /** - * @param ref - a polymorphic SchemaRef to be dereferenced/normalized. - * @param memberName - optional memberName if this NormalizedSchema should be considered a member schema. - */ - constructor(ref, memberName) { - this.ref = ref; - this.memberName = memberName; - this.symbol = _NormalizedSchema.symbol; - const traitStack = []; - let _ref = ref; - let schema = ref; - this._isMemberSchema = false; - while (Array.isArray(_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, _NormalizedSchema.translateTraits(traitSet)); - } - } else { - this.memberTraits = 0; - } - if (schema instanceof _NormalizedSchema) { - Object.assign(this, schema); - this.memberTraits = Object.assign({}, schema.getMemberTraits(), this.getMemberTraits()); - this.normalizedTraits = void 0; - this.memberName = memberName ?? schema.memberName; - return; - } - this.schema = deref(schema); - if (this.schema && typeof this.schema === "object") { - this.traits = this.schema?.traits ?? {}; - } else { - this.traits = 0; - } - this.name = (this.schema instanceof Schema ? this.schema.getName?.() : void 0) ?? this.memberName ?? this.getSchemaName(); - if (this._isMemberSchema && !memberName) { - throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); - } - } - static { - this.symbol = Symbol.for("@smithy/nor"); - } - static [Symbol.hasInstance](lhs) { - return Schema[Symbol.hasInstance].bind(this)(lhs); - } - /** - * Static constructor that attempts to avoid wrapping a NormalizedSchema within another. - */ - static of(ref) { - if (ref instanceof _NormalizedSchema) { - return ref; - } - if (Array.isArray(ref)) { - const [ns, traits] = ref; - if (ns instanceof _NormalizedSchema) { - Object.assign(ns.getMergedTraits(), _NormalizedSchema.translateTraits(traits)); - return ns; - } - throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`); - } - return new _NormalizedSchema(ref); - } - /** - * @param indicator - numeric indicator for preset trait combination. - * @returns equivalent trait object. - */ - static translateTraits(indicator) { - if (typeof indicator === "object") { - return indicator; - } - indicator = indicator | 0; - 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 traits; - } - /** - * @returns the underlying non-normalized schema. - */ - getSchema() { - if (this.schema instanceof _NormalizedSchema) { - Object.assign(this, { schema: this.schema.getSchema() }); - return this.schema; - } - if (this.schema instanceof SimpleSchema) { - return deref(this.schema.schemaRef); - } - return deref(this.schema); - } - /** - * @param withNamespace - qualifies the name. - * @returns e.g. `MyShape` or `com.namespace#MyShape`. - */ - getName(withNamespace = false) { - if (!withNamespace) { - if (this.name && this.name.includes("#")) { - return this.name.split("#")[1]; - } - } - return this.name || void 0; - } - /** - * @returns the member name if the schema is a member schema. - * @throws Error when the schema isn't a member schema. - */ - getMemberName() { - if (!this.isMemberSchema()) { - throw new Error(`@smithy/core/schema - non-member schema: ${this.getName(true)}`); - } - return this.memberName; - } - isMemberSchema() { - return this._isMemberSchema; - } - isUnitSchema() { - return this.getSchema() === "unit"; - } - /** - * boolean methods on this class help control flow in shape serialization and deserialization. - */ - isListSchema() { - const inner = this.getSchema(); - if (typeof inner === "number") { - return inner >= SCHEMA.LIST_MODIFIER && inner < SCHEMA.MAP_MODIFIER; - } - return inner instanceof ListSchema; - } - isMapSchema() { - const inner = this.getSchema(); - if (typeof inner === "number") { - return inner >= SCHEMA.MAP_MODIFIER && inner <= 255; - } - return inner instanceof MapSchema; - } - isStructSchema() { - const inner = this.getSchema(); - return inner !== null && typeof inner === "object" && "members" in inner || inner instanceof StructureSchema; - } - isBlobSchema() { - return this.getSchema() === SCHEMA.BLOB || this.getSchema() === SCHEMA.STREAMING_BLOB; - } - isTimestampSchema() { - const schema = this.getSchema(); - return typeof schema === "number" && schema >= SCHEMA.TIMESTAMP_DEFAULT && schema <= SCHEMA.TIMESTAMP_EPOCH_SECONDS; - } - isDocumentSchema() { - return this.getSchema() === SCHEMA.DOCUMENT; - } - isStringSchema() { - return this.getSchema() === SCHEMA.STRING; - } - isBooleanSchema() { - return this.getSchema() === SCHEMA.BOOLEAN; - } - isNumericSchema() { - return this.getSchema() === SCHEMA.NUMERIC; - } - isBigIntegerSchema() { - return this.getSchema() === SCHEMA.BIG_INTEGER; - } - isBigDecimalSchema() { - return this.getSchema() === SCHEMA.BIG_DECIMAL; - } - isStreaming() { - const streaming = !!this.getMergedTraits().streaming; - if (streaming) { - return true; - } - return this.getSchema() === SCHEMA.STREAMING_BLOB; - } - /** - * This is a shortcut to avoid calling `getMergedTraits().idempotencyToken` on every string. - * @returns whether the schema has the idempotencyToken trait. - */ - isIdempotencyToken() { - if (typeof this.traits === "number") { - return (this.traits & 4) === 4; - } else if (typeof this.traits === "object") { - return !!this.traits.idempotencyToken; - } - return false; - } - /** - * @returns own traits merged with member traits, where member traits of the same trait key take priority. - * This method is cached. - */ - getMergedTraits() { - return this.normalizedTraits ?? (this.normalizedTraits = { - ...this.getOwnTraits(), - ...this.getMemberTraits() - }); - } - /** - * @returns only the member traits. If the schema is not a member, this returns empty. - */ - getMemberTraits() { - return _NormalizedSchema.translateTraits(this.memberTraits); - } - /** - * @returns only the traits inherent to the shape or member target shape if this schema is a member. - * If there are any member traits they are excluded. - */ - getOwnTraits() { - return _NormalizedSchema.translateTraits(this.traits); - } - /** - * @returns the map's key's schema. Returns a dummy Document schema if this schema is a Document. - * - * @throws Error if the schema is not a Map or Document. - */ - getKeySchema() { - if (this.isDocumentSchema()) { - return this.memberFrom([SCHEMA.DOCUMENT, 0], "key"); - } - if (!this.isMapSchema()) { - throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`); - } - const schema = this.getSchema(); - if (typeof schema === "number") { - return this.memberFrom([63 & schema, 0], "key"); - } - return this.memberFrom([schema.keySchema, 0], "key"); - } - /** - * @returns the schema of the map's value or list's member. - * Returns a dummy Document schema if this schema is a Document. - * - * @throws Error if the schema is not a Map, List, nor Document. - */ - getValueSchema() { - const schema = this.getSchema(); - if (typeof schema === "number") { - if (this.isMapSchema()) { - return this.memberFrom([63 & schema, 0], "value"); - } else if (this.isListSchema()) { - return this.memberFrom([63 & schema, 0], "member"); - } - } - if (schema && typeof schema === "object") { - if (this.isStructSchema()) { - throw new Error(`may not getValueSchema() on structure ${this.getName(true)}`); - } - const collection = schema; - if ("valueSchema" in collection) { - if (this.isMapSchema()) { - return this.memberFrom([collection.valueSchema, 0], "value"); - } else if (this.isListSchema()) { - return this.memberFrom([collection.valueSchema, 0], "member"); - } - } - } - if (this.isDocumentSchema()) { - return this.memberFrom([SCHEMA.DOCUMENT, 0], "value"); - } - throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); - } - /** - * @param member - to query. - * @returns whether there is a memberSchema with the given member name. False if not a structure (or union). - */ - hasMemberSchema(member) { - if (this.isStructSchema()) { - const struct2 = this.getSchema(); - return struct2.memberNames.includes(member); - } - return false; - } - /** - * @returns the NormalizedSchema for the given member name. The returned instance will return true for `isMemberSchema()` - * and will have the member name given. - * @param member - which member to retrieve and wrap. - * - * @throws Error if member does not exist or the schema is neither a document nor structure. - * Note that errors are assumed to be structures and unions are considered structures for these purposes. - */ - getMemberSchema(member) { - if (this.isStructSchema()) { - const struct2 = this.getSchema(); - if (!struct2.memberNames.includes(member)) { - throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${member}.`); - } - const i = struct2.memberNames.indexOf(member); - const memberSchema = struct2.memberList[i]; - return this.memberFrom(Array.isArray(memberSchema) ? memberSchema : [memberSchema, 0], member); - } - if (this.isDocumentSchema()) { - return this.memberFrom([SCHEMA.DOCUMENT, 0], member); - } - throw new Error(`@smithy/core/schema - ${this.getName(true)} has no members.`); - } - /** - * This can be used for checking the members as a hashmap. - * Prefer the structIterator method for iteration. - * - * This does NOT return list and map members, it is only for structures. - * - * @deprecated use (checked) structIterator instead. - * - * @returns a map of member names to member schemas (normalized). - */ - getMemberSchemas() { - const buffer = {}; - try { - for (const [k, v] of this.structIterator()) { - buffer[k] = v; - } - } catch (ignored) { - } - return buffer; - } - /** - * @returns member name of event stream or empty string indicating none exists or this - * isn't a structure schema. - */ - getEventStreamMember() { - if (this.isStructSchema()) { - for (const [memberName, memberSchema] of this.structIterator()) { - if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { - return memberName; - } - } - } - return ""; - } - /** - * Allows iteration over members of a structure schema. - * Each yield is a pair of the member name and member schema. - * - * This avoids the overhead of calling Object.entries(ns.getMemberSchemas()). - */ - *structIterator() { - if (this.isUnitSchema()) { - return; - } - if (!this.isStructSchema()) { - throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); - } - const struct2 = this.getSchema(); - for (let i = 0; i < struct2.memberNames.length; ++i) { - yield [struct2.memberNames[i], this.memberFrom([struct2.memberList[i], 0], struct2.memberNames[i])]; - } - } - /** - * Creates a normalized member schema from the given schema and member name. - */ - memberFrom(memberSchema, memberName) { - if (memberSchema instanceof _NormalizedSchema) { - return Object.assign(memberSchema, { - memberName, - _isMemberSchema: true - }); - } - return new _NormalizedSchema(memberSchema, memberName); - } - /** - * @returns a last-resort human-readable name for the schema if it has no other identifiers. - */ - getSchemaName() { - const schema = this.getSchema(); - if (typeof schema === "number") { - const _schema = 63 & schema; - const container = 192 & schema; - const type = Object.entries(SCHEMA).find(([, value]) => { - return value === _schema; - })?.[0] ?? "Unknown"; - switch (container) { - case SCHEMA.MAP_MODIFIER: - return `${type}Map`; - case SCHEMA.LIST_MODIFIER: - return `${type}List`; - case 0: - return type; - } - } - return "Unknown"; - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 98520: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/serde/index.ts -var index_exports = {}; -__export(index_exports, { - LazyJsonString: () => LazyJsonString, - NumericValue: () => NumericValue, - copyDocumentWithTransform: () => copyDocumentWithTransform, - dateToUtcString: () => dateToUtcString, - expectBoolean: () => expectBoolean, - expectByte: () => expectByte, - expectFloat32: () => expectFloat32, - expectInt: () => expectInt, - expectInt32: () => expectInt32, - expectLong: () => expectLong, - expectNonNull: () => expectNonNull, - expectNumber: () => expectNumber, - expectObject: () => expectObject, - expectShort: () => expectShort, - expectString: () => expectString, - expectUnion: () => expectUnion, - generateIdempotencyToken: () => import_uuid.v4, - handleFloat: () => handleFloat, - limitedParseDouble: () => limitedParseDouble, - limitedParseFloat: () => limitedParseFloat, - limitedParseFloat32: () => limitedParseFloat32, - logger: () => logger, - nv: () => nv, - parseBoolean: () => parseBoolean, - parseEpochTimestamp: () => parseEpochTimestamp, - parseRfc3339DateTime: () => parseRfc3339DateTime, - parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset, - parseRfc7231DateTime: () => parseRfc7231DateTime, - quoteHeader: () => quoteHeader, - splitEvery: () => splitEvery, - splitHeader: () => splitHeader, - strictParseByte: () => strictParseByte, - strictParseDouble: () => strictParseDouble, - strictParseFloat: () => strictParseFloat, - strictParseFloat32: () => strictParseFloat32, - strictParseInt: () => strictParseInt, - strictParseInt32: () => strictParseInt32, - strictParseLong: () => strictParseLong, - strictParseShort: () => strictParseShort -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/serde/copyDocumentWithTransform.ts -var copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source; - -// src/submodules/serde/parse-utils.ts -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 === void 0) { - return void 0; - } - 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 === void 0) { - return void 0; - } - 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 !== void 0 && !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 === void 0) { - return void 0; - } - 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 !== void 0 && 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 === void 0) { - 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 === void 0) { - return void 0; - } - 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 === void 0) { - return void 0; - } - 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 === void 0) { - return void 0; - } - const asObject = expectObject(value); - const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => 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("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n"); -}; -var logger = { - warn: console.warn -}; - -// src/submodules/serde/date-utils.ts -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 === void 0) { - return void 0; - } - 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 = 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 === void 0) { - return void 0; - } - if (typeof value !== "string") { - throw new TypeError("RFC-3339 date-times must be expressed as strings"); - } - const match = RFC3339_WITH_OFFSET.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 = 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 = 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 = 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 === void 0) { - return void 0; - } - if (typeof value !== "string") { - throw new TypeError("RFC-7231 date-times must be expressed as strings"); - } - let match = IMF_FIXDATE.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.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.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 === void 0) { - return void 0; - } - 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 * 1e3)); -}; -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), - // seconds can go up to 60 for leap seconds - parseDateValue(time.seconds, "seconds", 0, 60), - parseMilliseconds(time.fractionalMilliseconds) - ) - ); -}; -var parseTwoDigitYear = (value) => { - const thisYear = (/* @__PURE__ */ 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 * 1e3; -var adjustRfc850Year = (input) => { - if (input.getTime() - (/* @__PURE__ */ 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 === void 0) { - return 0; - } - return strictParseFloat32("0." + value) * 1e3; -}; -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 * 1e3; -}; -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); -}; - -// src/submodules/serde/generateIdempotencyToken.ts -var import_uuid = __nccwpck_require__(12048); - -// src/submodules/serde/lazy-json.ts -var LazyJsonString = function LazyJsonString2(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; - -// src/submodules/serde/quote-header.ts -function quoteHeader(part) { - if (part.includes(",") || part.includes('"')) { - part = `"${part.replace(/"/g, '\\"')}"`; - } - return part; -} - -// src/submodules/serde/split-every.ts -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; -} - -// src/submodules/serde/split-header.ts -var splitHeader = (value) => { - const z = value.length; - const values = []; - let withinQuotes = false; - let prevChar = void 0; - 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; - default: - } - prevChar = char; - } - values.push(value.slice(anchor)); - return values.map((v) => { - v = v.trim(); - const z2 = v.length; - if (z2 < 2) { - return v; - } - if (v[0] === `"` && v[z2 - 1] === `"`) { - v = v.slice(1, z2 - 1); - } - return v.replace(/\\"/g, '"'); - }); -}; - -// src/submodules/serde/value/NumericValue.ts -var NumericValue = class _NumericValue { - constructor(string, type) { - this.string = string; - this.type = type; - let dot = 0; - for (let i = 0; i < string.length; ++i) { - const char = string.charCodeAt(i); - if (i === 0 && char === 45) { - continue; - } - if (char === 46) { - if (dot) { - throw new Error("@smithy/core/serde - NumericValue must contain at most one decimal point."); - } - dot = 1; - continue; - } - if (char < 48 || char > 57) { - throw new Error( - `@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".` - ); - } - } - } - toString() { - return this.string; - } - static [Symbol.hasInstance](object) { - if (!object || typeof object !== "object") { - return false; - } - const _nv = object; - const prototypeMatch = _NumericValue.prototype.isPrototypeOf(object); - if (prototypeMatch) { - return prototypeMatch; - } - if (typeof _nv.string === "string" && typeof _nv.type === "string" && _nv.constructor?.name?.endsWith("NumericValue")) { - return true; - } - return prototypeMatch; - } -}; -function nv(input) { - return new NumericValue(String(input), "bigDecimal"); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 47299: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - FetchHttpHandler: () => FetchHttpHandler, - keepAliveSupport: () => keepAliveSupport, - streamCollector: () => streamCollector -}); -module.exports = __toCommonJS(index_exports); - -// src/fetch-http-handler.ts -var import_protocol_http = __nccwpck_require__(13494); -var import_querystring_builder = __nccwpck_require__(51346); - -// src/create-request.ts -function createRequest(url, requestOptions) { - return new Request(url, requestOptions); -} -__name(createRequest, "createRequest"); - -// src/request-timeout.ts -function requestTimeout(timeoutInMs = 0) { - return new Promise((resolve, reject) => { - if (timeoutInMs) { - setTimeout(() => { - const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); - timeoutError.name = "TimeoutError"; - reject(timeoutError); - }, timeoutInMs); - } - }); -} -__name(requestTimeout, "requestTimeout"); - -// src/fetch-http-handler.ts -var keepAliveSupport = { - supported: void 0 -}; -var FetchHttpHandler = class _FetchHttpHandler { - static { - __name(this, "FetchHttpHandler"); - } - /** - * @returns the input if it is an HttpHandler of any class, - * or instantiates a new instance of this handler. - */ - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new _FetchHttpHandler(instanceOrOptions); - } - constructor(options) { - if (typeof options === "function") { - this.configProvider = options().then((opts) => opts || {}); - } else { - this.config = options ?? {}; - this.configProvider = Promise.resolve(this.config); - } - if (keepAliveSupport.supported === void 0) { - keepAliveSupport.supported = Boolean( - typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]") - ); - } - } - destroy() { - } - async handle(request, { abortSignal, requestTimeout: requestTimeout2 } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - const requestTimeoutInMs = requestTimeout2 ?? this.config.requestTimeout; - const keepAlive = this.config.keepAlive === true; - const credentials = this.config.credentials; - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - return Promise.reject(abortError); - } - let path = request.path; - const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {}); - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let auth = ""; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}@`; - } - const { port, method } = request; - const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; - const body = method === "GET" || method === "HEAD" ? void 0 : request.body; - const requestOptions = { - body, - headers: new Headers(request.headers), - method, - credentials - }; - if (this.config?.cache) { - requestOptions.cache = this.config.cache; - } - if (body) { - requestOptions.duplex = "half"; - } - if (typeof AbortController !== "undefined") { - requestOptions.signal = abortSignal; - } - if (keepAliveSupport.supported) { - requestOptions.keepalive = keepAlive; - } - if (typeof this.config.requestInit === "function") { - Object.assign(requestOptions, this.config.requestInit(request)); - } - let removeSignalEventListener = /* @__PURE__ */ __name(() => { - }, "removeSignalEventListener"); - const fetchRequest = createRequest(url, requestOptions); - const raceOfPromises = [ - fetch(fetchRequest).then((response) => { - const fetchHeaders = response.headers; - const transformedHeaders = {}; - for (const pair of fetchHeaders.entries()) { - transformedHeaders[pair[0]] = pair[1]; - } - const hasReadableStream = response.body != void 0; - if (!hasReadableStream) { - return response.blob().then((body2) => ({ - response: new import_protocol_http.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body: body2 - }) - })); - } - return { - response: new import_protocol_http.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body: response.body - }) - }; - }), - requestTimeout(requestTimeoutInMs) - ]; - if (abortSignal) { - raceOfPromises.push( - new Promise((resolve, reject) => { - const onAbort = /* @__PURE__ */ __name(() => { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - }, "onAbort"); - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener"); - } else { - abortSignal.onabort = onAbort; - } - }) - ); - } - return Promise.race(raceOfPromises).finally(removeSignalEventListener); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - config[key] = value; - return config; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } -}; - -// src/stream-collector.ts -var import_util_base64 = __nccwpck_require__(82763); -var streamCollector = /* @__PURE__ */ __name(async (stream) => { - if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") { - if (Blob.prototype.arrayBuffer !== void 0) { - return new Uint8Array(await stream.arrayBuffer()); - } - return collectBlob(stream); - } - return collectStream(stream); -}, "streamCollector"); -async function collectBlob(blob) { - const base64 = await readToBase64(blob); - const arrayBuffer = (0, import_util_base64.fromBase64)(base64); - return new Uint8Array(arrayBuffer); -} -__name(collectBlob, "collectBlob"); -async function collectStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} -__name(collectStream, "collectStream"); -function readToBase64(blob) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onloadend = () => { - if (reader.readyState !== 2) { - return reject(new Error("Reader aborted too early")); - } - const result = reader.result ?? ""; - const commaIndex = result.indexOf(","); - const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; - resolve(result.substring(dataOffset)); - }; - reader.onabort = () => reject(new Error("Read aborted")); - reader.onerror = () => reject(reader.error); - reader.readAsDataURL(blob); - }); -} -__name(readToBase64, "readToBase64"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 67908: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - isArrayBuffer: () => isArrayBuffer -}); -module.exports = __toCommonJS(index_exports); -var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 8131: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEndpointFromConfig = void 0; -const node_config_provider_1 = __nccwpck_require__(61814); -const getEndpointUrlConfig_1 = __nccwpck_require__(75974); -const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId !== null && serviceId !== void 0 ? serviceId : ""))(); -exports.getEndpointFromConfig = getEndpointFromConfig; - - -/***/ }), - -/***/ 75974: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEndpointUrlConfig = void 0; -const shared_ini_file_loader_1 = __nccwpck_require__(93438); -const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; -const CONFIG_ENDPOINT_URL = "endpoint_url"; -const 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 undefined; - }, - configFileSelector: (profile, config) => { - if (config && profile.services) { - const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (servicesSection) { - const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); - const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (endpointUrl) - return endpointUrl; - } - } - const endpointUrl = profile[CONFIG_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return undefined; - }, - default: undefined, -}); -exports.getEndpointUrlConfig = getEndpointUrlConfig; - - -/***/ }), - -/***/ 88205: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - endpointMiddleware: () => endpointMiddleware, - endpointMiddlewareOptions: () => endpointMiddlewareOptions, - getEndpointFromInstructions: () => getEndpointFromInstructions, - getEndpointPlugin: () => getEndpointPlugin, - resolveEndpointConfig: () => resolveEndpointConfig, - resolveEndpointRequiredConfig: () => resolveEndpointRequiredConfig, - resolveParams: () => resolveParams, - toEndpointV1: () => toEndpointV1 -}); -module.exports = __toCommonJS(index_exports); - -// src/service-customizations/s3.ts -var resolveParamsForS3 = /* @__PURE__ */ __name(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; -}, "resolveParamsForS3"); -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 = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); -var isArnBucketName = /* @__PURE__ */ __name((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; -}, "isArnBucketName"); - -// src/adaptors/createConfigValueProvider.ts -var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => { - const configProvider = /* @__PURE__ */ __name(async () => { - const configValue = config[configKey] ?? config[canonicalEndpointParamKey]; - if (typeof configValue === "function") { - return configValue(); - } - return configValue; - }, "configProvider"); - 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 void 0; - } - 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; -}, "createConfigValueProvider"); - -// src/adaptors/getEndpointFromInstructions.ts -var import_getEndpointFromConfig = __nccwpck_require__(8131); - -// src/adaptors/toEndpointV1.ts -var import_url_parser = __nccwpck_require__(85792); -var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { - if (typeof endpoint === "object") { - if ("url" in endpoint) { - return (0, import_url_parser.parseUrl)(endpoint.url); - } - return endpoint; - } - return (0, import_url_parser.parseUrl)(endpoint); -}, "toEndpointV1"); - -// src/adaptors/getEndpointFromInstructions.ts -var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => { - if (!clientConfig.isCustomEndpoint) { - let endpointFromConfig; - if (clientConfig.serviceConfiguredEndpoint) { - endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); - } else { - endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId); - } - if (endpointFromConfig) { - clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); - clientConfig.isCustomEndpoint = true; - } - } - 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); - return endpoint; -}, "getEndpointFromInstructions"); -var resolveParams = /* @__PURE__ */ __name(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)(); - 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; -}, "resolveParams"); - -// src/endpointMiddleware.ts -var import_core = __nccwpck_require__(22744); -var import_util_middleware = __nccwpck_require__(30954); -var endpointMiddleware = /* @__PURE__ */ __name(({ - config, - instructions -}) => { - return (next, context) => async (args) => { - if (config.isCustomEndpoint) { - (0, import_core.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 = (0, import_util_middleware.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 - }); - }; -}, "endpointMiddleware"); - -// src/getEndpointPlugin.ts -var import_middleware_serde = __nccwpck_require__(58305); -var endpointMiddlewareOptions = { - step: "serialize", - tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], - name: "endpointV2Middleware", - override: true, - relation: "before", - toMiddleware: import_middleware_serde.serializerMiddlewareOption.name -}; -var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.addRelativeTo( - endpointMiddleware({ - config, - instructions - }), - endpointMiddlewareOptions - ); - }, "applyToStack") -}), "getEndpointPlugin"); - -// src/resolveEndpointConfig.ts - -var import_getEndpointFromConfig2 = __nccwpck_require__(8131); -var resolveEndpointConfig = /* @__PURE__ */ __name((input) => { - const tls = input.tls ?? true; - const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; - const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware.normalizeProvider)(endpoint)()) : void 0; - const isCustomEndpoint = !!endpoint; - const resolvedConfig = Object.assign(input, { - endpoint: customEndpointProvider, - tls, - isCustomEndpoint, - useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(useDualstackEndpoint ?? false), - useFipsEndpoint: (0, import_util_middleware.normalizeProvider)(useFipsEndpoint ?? false) - }); - let configuredEndpointPromise = void 0; - resolvedConfig.serviceConfiguredEndpoint = async () => { - if (input.serviceId && !configuredEndpointPromise) { - configuredEndpointPromise = (0, import_getEndpointFromConfig2.getEndpointFromConfig)(input.serviceId); - } - return configuredEndpointPromise; - }; - return resolvedConfig; -}, "resolveEndpointConfig"); - -// src/resolveEndpointRequiredConfig.ts -var resolveEndpointRequiredConfig = /* @__PURE__ */ __name((input) => { - const { endpoint } = input; - if (endpoint === void 0) { - input.endpoint = async () => { - throw new Error( - "@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint." - ); - }; - } - return input; -}, "resolveEndpointRequiredConfig"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 58305: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - deserializerMiddleware: () => deserializerMiddleware, - deserializerMiddlewareOption: () => deserializerMiddlewareOption, - getSerdePlugin: () => getSerdePlugin, - serializerMiddleware: () => serializerMiddleware, - serializerMiddlewareOption: () => serializerMiddlewareOption -}); -module.exports = __toCommonJS(index_exports); - -// src/deserializerMiddleware.ts -var import_protocol_http = __nccwpck_require__(13494); -var deserializerMiddleware = /* @__PURE__ */ __name((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 - }); - 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 += "\n " + hint; - } catch (e) { - 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 (import_protocol_http.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 (e) { - } - } - throw error; - } -}, "deserializerMiddleware"); -var findHeader = /* @__PURE__ */ __name((pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; -}, "findHeader"); - -// src/serializerMiddleware.ts -var serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => { - const endpointConfig = options; - const endpoint = context.endpointV2?.url && endpointConfig.urlParser ? async () => endpointConfig.urlParser(context.endpointV2.url) : endpointConfig.endpoint; - if (!endpoint) { - throw new Error("No valid endpoint provider available."); - } - const request = await serializer(args.input, { ...options, endpoint }); - return next({ - ...args, - request - }); -}, "serializerMiddleware"); - -// src/serdePlugin.ts -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: /* @__PURE__ */ __name((commandStack) => { - commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); - commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption); - }, "applyToStack") - }; -} -__name(getSerdePlugin, "getSerdePlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 61814: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - loadConfig: () => loadConfig -}); -module.exports = __toCommonJS(index_exports); - -// src/configLoader.ts - - -// src/fromEnv.ts -var import_property_provider = __nccwpck_require__(1104); - -// src/getSelectorName.ts -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 (e) { - return functionString; - } -} -__name(getSelectorName, "getSelectorName"); - -// src/fromEnv.ts -var fromEnv = /* @__PURE__ */ __name((envVarSelector, options) => async () => { - try { - const config = envVarSelector(process.env, options); - if (config === void 0) { - throw new Error(); - } - return config; - } catch (e) { - throw new import_property_provider.CredentialsProviderError( - e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, - { logger: options?.logger } - ); - } -}, "fromEnv"); - -// src/fromSharedConfigFiles.ts - -var import_shared_ini_file_loader = __nccwpck_require__(93438); -var fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = "config", ...init } = {}) => async () => { - const profile = (0, import_shared_ini_file_loader.getProfileName)(init); - const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.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 === void 0) { - throw new Error(); - } - return configValue; - } catch (e) { - throw new import_property_provider.CredentialsProviderError( - e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, - { logger: init.logger } - ); - } -}, "fromSharedConfigFiles"); - -// src/fromStatic.ts - -var isFunction = /* @__PURE__ */ __name((func) => typeof func === "function", "isFunction"); -var fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider.fromStatic)(defaultValue), "fromStatic"); - -// src/configLoader.ts -var loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { - const { signingName, logger } = configuration; - const envOptions = { signingName, logger }; - return (0, import_property_provider.memoize)( - (0, import_property_provider.chain)( - fromEnv(environmentVariableSelector, envOptions), - fromSharedConfigFiles(configFileSelector, configuration), - fromStatic(defaultValue) - ) - ); -}, "loadConfig"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 95493: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT, - NodeHttp2Handler: () => NodeHttp2Handler, - NodeHttpHandler: () => NodeHttpHandler, - streamCollector: () => streamCollector -}); -module.exports = __toCommonJS(index_exports); - -// src/node-http-handler.ts -var import_protocol_http = __nccwpck_require__(13494); -var import_querystring_builder = __nccwpck_require__(51346); -var import_http = __nccwpck_require__(58611); -var import_https = __nccwpck_require__(65692); - -// src/constants.ts -var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; - -// src/get-transformed-headers.ts -var getTransformedHeaders = /* @__PURE__ */ __name((headers) => { - const transformedHeaders = {}; - for (const name of Object.keys(headers)) { - const headerValues = headers[name]; - transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; - } - return transformedHeaders; -}, "getTransformedHeaders"); - -// src/timing.ts -var timing = { - setTimeout: /* @__PURE__ */ __name((cb, ms) => setTimeout(cb, ms), "setTimeout"), - clearTimeout: /* @__PURE__ */ __name((timeoutId) => clearTimeout(timeoutId), "clearTimeout") -}; - -// src/set-connection-timeout.ts -var DEFER_EVENT_LISTENER_TIME = 1e3; -var setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => { - if (!timeoutInMs) { - return -1; - } - const registerTimeout = /* @__PURE__ */ __name((offset) => { - const timeoutId = timing.setTimeout(() => { - request.destroy(); - reject( - Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { - name: "TimeoutError" - }) - ); - }, timeoutInMs - offset); - const doWithSocket = /* @__PURE__ */ __name((socket) => { - if (socket?.connecting) { - socket.on("connect", () => { - timing.clearTimeout(timeoutId); - }); - } else { - timing.clearTimeout(timeoutId); - } - }, "doWithSocket"); - if (request.socket) { - doWithSocket(request.socket); - } else { - request.on("socket", doWithSocket); - } - }, "registerTimeout"); - if (timeoutInMs < 2e3) { - registerTimeout(0); - return 0; - } - return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); -}, "setConnectionTimeout"); - -// src/set-socket-keep-alive.ts -var DEFER_EVENT_LISTENER_TIME2 = 3e3; -var setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => { - if (keepAlive !== true) { - return -1; - } - const registerListener = /* @__PURE__ */ __name(() => { - if (request.socket) { - request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); - } else { - request.on("socket", (socket) => { - socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); - }); - } - }, "registerListener"); - if (deferTimeMs === 0) { - registerListener(); - return 0; - } - return timing.setTimeout(registerListener, deferTimeMs); -}, "setSocketKeepAlive"); - -// src/set-socket-timeout.ts -var DEFER_EVENT_LISTENER_TIME3 = 3e3; -var setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => { - const registerTimeout = /* @__PURE__ */ __name((offset) => { - const timeout = timeoutInMs - offset; - const onTimeout = /* @__PURE__ */ __name(() => { - request.destroy(); - reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); - }, "onTimeout"); - if (request.socket) { - request.socket.setTimeout(timeout, onTimeout); - request.on("close", () => request.socket?.removeListener("timeout", onTimeout)); - } else { - request.setTimeout(timeout, onTimeout); - } - }, "registerTimeout"); - if (0 < timeoutInMs && timeoutInMs < 6e3) { - registerTimeout(0); - return 0; - } - return timing.setTimeout( - registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3), - DEFER_EVENT_LISTENER_TIME3 - ); -}, "setSocketTimeout"); - -// src/write-request-body.ts -var import_stream = __nccwpck_require__(2203); -var MIN_WAIT_TIME = 6e3; -async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) { - const headers = request.headers ?? {}; - const expect = headers["Expect"] || headers["expect"]; - let timeoutId = -1; - let sendBody = true; - if (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); - } -} -__name(writeRequestBody, "writeRequestBody"); -function writeBody(httpRequest, body) { - if (body instanceof import_stream.Readable) { - body.pipe(httpRequest); - return; - } - if (body) { - if (Buffer.isBuffer(body) || typeof body === "string") { - 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(); -} -__name(writeBody, "writeBody"); - -// src/node-http-handler.ts -var DEFAULT_REQUEST_TIMEOUT = 0; -var NodeHttpHandler = class _NodeHttpHandler { - constructor(options) { - this.socketWarningTimestamp = 0; - // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286 - this.metadata = { handlerProtocol: "http/1.1" }; - this.configProvider = new Promise((resolve, reject) => { - if (typeof options === "function") { - options().then((_options) => { - resolve(this.resolveDefaultConfig(_options)); - }).catch(reject); - } else { - resolve(this.resolveDefaultConfig(options)); - } - }); - } - static { - __name(this, "NodeHttpHandler"); - } - /** - * @returns the input if it is an HttpHandler of any class, - * or instantiates a new instance of this handler. - */ - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new _NodeHttpHandler(instanceOrOptions); - } - /** - * @internal - * - * @param agent - http(s) agent in use by the NodeHttpHandler instance. - * @param socketWarningTimestamp - last socket usage check timestamp. - * @param logger - channel for the warning. - * @returns timestamp of last emitted warning. - */ - static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { - const { sockets, requests, maxSockets } = agent; - if (typeof maxSockets !== "number" || maxSockets === Infinity) { - return socketWarningTimestamp; - } - const interval = 15e3; - if (Date.now() - interval < socketWarningTimestamp) { - return socketWarningTimestamp; - } - if (sockets && requests) { - for (const origin in sockets) { - 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; - } - resolveDefaultConfig(options) { - const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } = options || {}; - const keepAlive = true; - const maxSockets = 50; - return { - connectionTimeout, - requestTimeout: requestTimeout ?? socketTimeout, - socketAcquisitionWarningTimeout, - httpAgent: (() => { - if (httpAgent instanceof import_http.Agent || typeof httpAgent?.destroy === "function") { - return httpAgent; - } - return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent }); - })(), - httpsAgent: (() => { - if (httpsAgent instanceof import_https.Agent || typeof httpsAgent?.destroy === "function") { - return httpsAgent; - } - return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); - })(), - logger: console - }; - } - destroy() { - this.config?.httpAgent?.destroy(); - this.config?.httpsAgent?.destroy(); - } - async handle(request, { abortSignal, requestTimeout } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - return new Promise((_resolve, _reject) => { - let writeRequestBodyPromise = void 0; - const timeouts = []; - const resolve = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _resolve(arg); - }, "resolve"); - const reject = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _reject(arg); - }, "reject"); - if (!this.config) { - throw new Error("Node HTTP request handler config is not resolved"); - } - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; - } - const isSSL = request.protocol === "https:"; - const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; - timeouts.push( - timing.setTimeout( - () => { - this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage( - agent, - this.socketWarningTimestamp, - this.config.logger - ); - }, - this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3) - ) - ); - const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {}); - let auth = void 0; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}`; - } - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let hostname = request.hostname ?? ""; - if (hostname[0] === "[" && hostname.endsWith("]")) { - hostname = request.hostname.slice(1, -1); - } else { - hostname = request.hostname; - } - const nodeHttpsOptions = { - headers: request.headers, - host: hostname, - method: request.method, - path, - port: request.port, - agent, - auth - }; - const requestFunc = isSSL ? import_https.request : import_http.request; - const req = requestFunc(nodeHttpsOptions, (res) => { - const httpResponse = new import_protocol_http.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 = /* @__PURE__ */ __name(() => { - req.destroy(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - }, "onAbort"); - 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 ?? this.config.requestTimeout; - timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); - timeouts.push(setSocketTimeout(req, reject, effectiveRequestTimeout)); - const httpAgent = nodeHttpsOptions.agent; - if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { - timeouts.push( - setSocketKeepAlive(req, { - // @ts-expect-error keepAlive is not public on httpAgent. - keepAlive: httpAgent.keepAlive, - // @ts-expect-error keepAliveMsecs is not public on httpAgent. - keepAliveMsecs: httpAgent.keepAliveMsecs - }) - ); - } - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout).catch((e) => { - timeouts.forEach(timing.clearTimeout); - return _reject(e); - }); - }); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } -}; - -// src/node-http2-handler.ts - - -var import_http22 = __nccwpck_require__(85675); - -// src/node-http2-connection-manager.ts -var import_http2 = __toESM(__nccwpck_require__(85675)); - -// src/node-http2-connection-pool.ts -var NodeHttp2ConnectionPool = class { - constructor(sessions) { - this.sessions = []; - this.sessions = sessions ?? []; - } - static { - __name(this, "NodeHttp2ConnectionPool"); - } - poll() { - if (this.sessions.length > 0) { - return this.sessions.shift(); - } - } - offerLast(session) { - this.sessions.push(session); - } - contains(session) { - return this.sessions.includes(session); - } - remove(session) { - this.sessions = this.sessions.filter((s) => s !== session); - } - [Symbol.iterator]() { - return this.sessions[Symbol.iterator](); - } - destroy(connection) { - for (const session of this.sessions) { - if (session === connection) { - if (!session.destroyed) { - session.destroy(); - } - } - } - } -}; - -// src/node-http2-connection-manager.ts -var NodeHttp2ConnectionManager = class { - constructor(config) { - this.sessionCache = /* @__PURE__ */ new Map(); - this.config = config; - if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { - throw new RangeError("maxConcurrency must be greater than zero."); - } - } - static { - __name(this, "NodeHttp2ConnectionManager"); - } - lease(requestContext, connectionConfiguration) { - const url = this.getUrlString(requestContext); - const existingPool = this.sessionCache.get(url); - if (existingPool) { - const existingSession = existingPool.poll(); - if (existingSession && !this.config.disableConcurrency) { - return existingSession; - } - } - const session = import_http2.default.connect(url); - 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() - ); - } - }); - } - session.unref(); - const destroySessionCb = /* @__PURE__ */ __name(() => { - session.destroy(); - this.deleteSession(url, session); - }, "destroySessionCb"); - session.on("goaway", destroySessionCb); - session.on("error", destroySessionCb); - session.on("frameError", destroySessionCb); - session.on("close", () => this.deleteSession(url, session)); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); - } - const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); - connectionPool.offerLast(session); - this.sessionCache.set(url, connectionPool); - return session; - } - /** - * Delete a session from the connection pool. - * @param authority The authority of the session to delete. - * @param session The session to delete. - */ - deleteSession(authority, session) { - const existingConnectionPool = this.sessionCache.get(authority); - if (!existingConnectionPool) { - return; - } - if (!existingConnectionPool.contains(session)) { - return; - } - existingConnectionPool.remove(session); - this.sessionCache.set(authority, existingConnectionPool); - } - release(requestContext, session) { - const cacheKey = this.getUrlString(requestContext); - this.sessionCache.get(cacheKey)?.offerLast(session); - } - destroy() { - for (const [key, connectionPool] of this.sessionCache) { - for (const session of connectionPool) { - if (!session.destroyed) { - session.destroy(); - } - connectionPool.remove(session); - } - this.sessionCache.delete(key); - } - } - setMaxConcurrentStreams(maxConcurrentStreams) { - if (maxConcurrentStreams && maxConcurrentStreams <= 0) { - throw new RangeError("maxConcurrentStreams must be greater than zero."); - } - this.config.maxConcurrency = maxConcurrentStreams; - } - setDisableConcurrentStreams(disableConcurrentStreams) { - this.config.disableConcurrency = disableConcurrentStreams; - } - getUrlString(request) { - return request.destination.toString(); - } -}; - -// src/node-http2-handler.ts -var NodeHttp2Handler = class _NodeHttp2Handler { - constructor(options) { - this.metadata = { handlerProtocol: "h2" }; - this.connectionManager = new NodeHttp2ConnectionManager({}); - this.configProvider = new Promise((resolve, reject) => { - if (typeof options === "function") { - options().then((opts) => { - resolve(opts || {}); - }).catch(reject); - } else { - resolve(options || {}); - } - }); - } - static { - __name(this, "NodeHttp2Handler"); - } - /** - * @returns the input if it is an HttpHandler of any class, - * or instantiates a new instance of this handler. - */ - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new _NodeHttp2Handler(instanceOrOptions); - } - destroy() { - this.connectionManager.destroy(); - } - async handle(request, { abortSignal, requestTimeout } = {}) { - if (!this.config) { - this.config = await this.configProvider; - this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); - if (this.config.maxConcurrentStreams) { - this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); - } - } - const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; - const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; - return new Promise((_resolve, _reject) => { - let fulfilled = false; - let writeRequestBodyPromise = void 0; - const resolve = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - _resolve(arg); - }, "resolve"); - const reject = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - _reject(arg); - }, "reject"); - if (abortSignal?.aborted) { - fulfilled = true; - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - 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 session = this.connectionManager.lease(requestContext, { - requestTimeout: this.config?.sessionTimeout, - disableConcurrentStreams: disableConcurrentStreams || false - }); - const rejectWithDestroy = /* @__PURE__ */ __name((err) => { - if (disableConcurrentStreams) { - this.destroySession(session); - } - fulfilled = true; - reject(err); - }, "rejectWithDestroy"); - const queryString = (0, import_querystring_builder.buildQueryString)(query || {}); - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - const req = session.request({ - ...request.headers, - [import_http22.constants.HTTP2_HEADER_PATH]: path, - [import_http22.constants.HTTP2_HEADER_METHOD]: method - }); - session.ref(); - req.on("response", (headers) => { - const httpResponse = new import_protocol_http.HttpResponse({ - statusCode: headers[":status"] || -1, - headers: getTransformedHeaders(headers), - body: req - }); - fulfilled = true; - resolve({ response: httpResponse }); - if (disableConcurrentStreams) { - session.close(); - this.connectionManager.deleteSession(authority, session); - } - }); - if (effectiveRequestTimeout) { - req.setTimeout(effectiveRequestTimeout, () => { - req.close(); - const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); - timeoutError.name = "TimeoutError"; - rejectWithDestroy(timeoutError); - }); - } - if (abortSignal) { - const onAbort = /* @__PURE__ */ __name(() => { - req.close(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - rejectWithDestroy(abortError); - }, "onAbort"); - 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; - } - } - req.on("frameError", (type, code, id) => { - rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); - }); - req.on("error", rejectWithDestroy); - req.on("aborted", () => { - rejectWithDestroy( - new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`) - ); - }); - req.on("close", () => { - session.unref(); - if (disableConcurrentStreams) { - session.destroy(); - } - if (!fulfilled) { - rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); - } - }); - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); - }); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } - /** - * Destroys a session. - * @param session - the session to destroy. - */ - destroySession(session) { - if (!session.destroyed) { - session.destroy(); - } - } -}; - -// src/stream-collector/collector.ts - -var Collector = class extends import_stream.Writable { - constructor() { - super(...arguments); - this.bufferedBytes = []; - } - static { - __name(this, "Collector"); - } - _write(chunk, encoding, callback) { - this.bufferedBytes.push(chunk); - callback(); - } -}; - -// src/stream-collector/index.ts -var streamCollector = /* @__PURE__ */ __name((stream) => { - if (isReadableStreamInstance(stream)) { - return collectReadableStream(stream); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function() { - const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); - resolve(bytes); - }); - }); -}, "streamCollector"); -var isReadableStreamInstance = /* @__PURE__ */ __name((stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream, "isReadableStreamInstance"); -async function collectReadableStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} -__name(collectReadableStream, "collectReadableStream"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 1104: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - CredentialsProviderError: () => CredentialsProviderError, - ProviderError: () => ProviderError, - TokenProviderError: () => TokenProviderError, - chain: () => chain, - fromStatic: () => fromStatic, - memoize: () => memoize -}); -module.exports = __toCommonJS(index_exports); - -// src/ProviderError.ts -var ProviderError = class _ProviderError extends Error { - constructor(message, options = true) { - let logger; - let tryNextLink = true; - if (typeof options === "boolean") { - logger = void 0; - tryNextLink = options; - } else if (options != null && typeof options === "object") { - logger = options.logger; - tryNextLink = options.tryNextLink ?? true; - } - super(message); - this.name = "ProviderError"; - this.tryNextLink = tryNextLink; - Object.setPrototypeOf(this, _ProviderError.prototype); - logger?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); - } - static { - __name(this, "ProviderError"); - } - /** - * @deprecated use new operator. - */ - static from(error, options = true) { - return Object.assign(new this(error.message, options), error); - } -}; - -// src/CredentialsProviderError.ts -var CredentialsProviderError = class _CredentialsProviderError extends ProviderError { - /** - * @override - */ - constructor(message, options = true) { - super(message, options); - this.name = "CredentialsProviderError"; - Object.setPrototypeOf(this, _CredentialsProviderError.prototype); - } - static { - __name(this, "CredentialsProviderError"); - } -}; - -// src/TokenProviderError.ts -var TokenProviderError = class _TokenProviderError extends ProviderError { - /** - * @override - */ - constructor(message, options = true) { - super(message, options); - this.name = "TokenProviderError"; - Object.setPrototypeOf(this, _TokenProviderError.prototype); - } - static { - __name(this, "TokenProviderError"); - } -}; - -// src/chain.ts -var chain = /* @__PURE__ */ __name((...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; -}, "chain"); - -// src/fromStatic.ts -var fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), "fromStatic"); - -// src/memoize.ts -var memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { - let resolved; - let pending; - let hasResult; - let isConstant = false; - const coalesceProvider = /* @__PURE__ */ __name(async () => { - if (!pending) { - pending = provider(); - } - try { - resolved = await pending; - hasResult = true; - isConstant = false; - } finally { - pending = void 0; - } - return resolved; - }, "coalesceProvider"); - if (isExpired === void 0) { - 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; - }; -}, "memoize"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 13494: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Field: () => Field, - Fields: () => Fields, - HttpRequest: () => HttpRequest, - HttpResponse: () => HttpResponse, - IHttpRequest: () => import_types.HttpRequest, - getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration, - isValidHostname: () => isValidHostname, - resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig -}); -module.exports = __toCommonJS(index_exports); - -// src/extensions/httpExtensionConfiguration.ts -var getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - } - }; -}, "getHttpHandlerExtensionConfiguration"); -var resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler() - }; -}, "resolveHttpHandlerRuntimeConfig"); - -// src/Field.ts -var import_types = __nccwpck_require__(50892); -var Field = class { - static { - __name(this, "Field"); - } - constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) { - this.name = name; - this.kind = kind; - this.values = values; - } - /** - * Appends a value to the field. - * - * @param value The value to append. - */ - add(value) { - this.values.push(value); - } - /** - * Overwrite existing field values. - * - * @param values The new field values. - */ - set(values) { - this.values = values; - } - /** - * Remove all matching entries from list. - * - * @param value Value to remove. - */ - remove(value) { - this.values = this.values.filter((v) => v !== value); - } - /** - * Get comma-delimited string. - * - * @returns String representation of {@link Field}. - */ - toString() { - return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", "); - } - /** - * Get string values as a list - * - * @returns Values in {@link Field} as a list. - */ - get() { - return this.values; - } -}; - -// src/Fields.ts -var Fields = class { - constructor({ fields = [], encoding = "utf-8" }) { - this.entries = {}; - fields.forEach(this.setField.bind(this)); - this.encoding = encoding; - } - static { - __name(this, "Fields"); - } - /** - * Set entry for a {@link Field} name. The `name` - * attribute will be used to key the collection. - * - * @param field The {@link Field} to set. - */ - setField(field) { - this.entries[field.name.toLowerCase()] = field; - } - /** - * Retrieve {@link Field} entry by name. - * - * @param name The name of the {@link Field} entry - * to retrieve - * @returns The {@link Field} if it exists. - */ - getField(name) { - return this.entries[name.toLowerCase()]; - } - /** - * Delete entry from collection. - * - * @param name Name of the entry to delete. - */ - removeField(name) { - delete this.entries[name.toLowerCase()]; - } - /** - * Helper function for retrieving specific types of fields. - * Used to grab all headers or all trailers. - * - * @param kind {@link FieldPosition} of entries to retrieve. - * @returns The {@link Field} entries with the specified - * {@link FieldPosition}. - */ - getByType(kind) { - return Object.values(this.entries).filter((field) => field.kind === kind); - } -}; - -// src/httpRequest.ts - -var HttpRequest = class _HttpRequest { - static { - __name(this, "HttpRequest"); - } - 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; - } - /** - * Note: this does not deep-clone the body. - */ - static clone(request) { - const cloned = new _HttpRequest({ - ...request, - headers: { ...request.headers } - }); - if (cloned.query) { - cloned.query = cloneQuery(cloned.query); - } - return cloned; - } - /** - * This method only actually asserts that request is the interface {@link IHttpRequest}, - * and not necessarily this concrete class. Left in place for API stability. - * - * Do not call instance methods on the input of this function, and - * do not assume it has the HttpRequest prototype. - */ - 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"; - } - /** - * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call - * this method because {@link HttpRequest.isInstance} incorrectly - * asserts that IHttpRequest (interface) objects are of type HttpRequest (class). - */ - 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 - }; - }, {}); -} -__name(cloneQuery, "cloneQuery"); - -// src/httpResponse.ts -var HttpResponse = class { - static { - __name(this, "HttpResponse"); - } - 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"; - } -}; - -// src/isValidHostname.ts -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} -__name(isValidHostname, "isValidHostname"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 51346: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - buildQueryString: () => buildQueryString -}); -module.exports = __toCommonJS(index_exports); -var import_util_uri_escape = __nccwpck_require__(72644); -function buildQueryString(query) { - const parts = []; - for (let key of Object.keys(query).sort()) { - const value = query[key]; - key = (0, import_util_uri_escape.escapeUri)(key); - if (Array.isArray(value)) { - for (let i = 0, iLen = value.length; i < iLen; i++) { - parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`); - } - } else { - let qsEntry = key; - if (value || typeof value === "string") { - qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`; - } - parts.push(qsEntry); - } - } - return parts.join("&"); -} -__name(buildQueryString, "buildQueryString"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 18352: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - parseQueryString: () => parseQueryString -}); -module.exports = __toCommonJS(index_exports); -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; -} -__name(parseQueryString, "parseQueryString"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 91690: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __nccwpck_require__(70857); -const path_1 = __nccwpck_require__(16928); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; -}; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; -}; -exports.getHomeDir = getHomeDir; - - -/***/ }), - -/***/ 66531: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __nccwpck_require__(76982); -const path_1 = __nccwpck_require__(16928); -const getHomeDir_1 = __nccwpck_require__(91690); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); -}; -exports.getSSOTokenFilepath = getSSOTokenFilepath; - - -/***/ }), - -/***/ 83280: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; -const fs_1 = __nccwpck_require__(79896); -const getSSOTokenFilepath_1 = __nccwpck_require__(66531); -const { readFile } = fs_1.promises; -exports.tokenIntercept = {}; -const getSSOTokenFromFile = async (id) => { - if (exports.tokenIntercept[id]) { - return exports.tokenIntercept[id]; - } - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); -}; -exports.getSSOTokenFromFile = getSSOTokenFromFile; - - -/***/ }), - -/***/ 93438: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, - DEFAULT_PROFILE: () => DEFAULT_PROFILE, - ENV_PROFILE: () => ENV_PROFILE, - SSOToken: () => import_getSSOTokenFromFile2.SSOToken, - externalDataInterceptor: () => externalDataInterceptor, - getProfileName: () => getProfileName, - getSSOTokenFromFile: () => import_getSSOTokenFromFile2.getSSOTokenFromFile, - loadSharedConfigFiles: () => loadSharedConfigFiles, - loadSsoSessionData: () => loadSsoSessionData, - parseKnownFiles: () => parseKnownFiles -}); -module.exports = __toCommonJS(index_exports); -__reExport(index_exports, __nccwpck_require__(91690), module.exports); - -// src/getProfileName.ts -var ENV_PROFILE = "AWS_PROFILE"; -var DEFAULT_PROFILE = "default"; -var getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); - -// src/index.ts -__reExport(index_exports, __nccwpck_require__(66531), module.exports); -var import_getSSOTokenFromFile2 = __nccwpck_require__(83280); - -// src/loadSharedConfigFiles.ts - - -// src/getConfigData.ts -var import_types = __nccwpck_require__(50892); -var getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; - } - return Object.values(import_types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}).reduce( - (acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === import_types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; - }, - { - // Populate default profile, if present. - ...data.default && { default: data.default } - } -), "getConfigData"); - -// src/getConfigFilepath.ts -var import_path = __nccwpck_require__(16928); -var import_getHomeDir = __nccwpck_require__(91690); -var ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -var getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), ".aws", "config"), "getConfigFilepath"); - -// src/getCredentialsFilepath.ts - -var import_getHomeDir2 = __nccwpck_require__(91690); -var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -var getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), ".aws", "credentials"), "getCredentialsFilepath"); - -// src/loadSharedConfigFiles.ts -var import_getHomeDir3 = __nccwpck_require__(91690); - -// src/parseIni.ts - -var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -var profileNameBlockList = ["__proto__", "profile __proto__"]; -var parseIni = /* @__PURE__ */ __name((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 = void 0; - currentSubSection = void 0; - const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); - const matches = prefixKeyRegex.exec(sectionName); - if (matches) { - const [, prefix, , name] = matches; - if (Object.values(import_types.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 = void 0; - } - map[currentSection] = map[currentSection] || {}; - const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; - map[currentSection][key] = value; - } - } - } - } - return map; -}, "parseIni"); - -// src/loadSharedConfigFiles.ts -var import_slurpFile = __nccwpck_require__(95016); -var swallowError = /* @__PURE__ */ __name(() => ({}), "swallowError"); -var CONFIG_PREFIX_SEPARATOR = "."; -var loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = (0, import_getHomeDir3.getHomeDir)(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = (0, import_path.join)(homeDir, filepath.slice(2)); - } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = (0, import_path.join)(homeDir, configFilepath.slice(2)); - } - const parsedFiles = await Promise.all([ - (0, import_slurpFile.slurpFile)(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache - }).then(parseIni).then(getConfigData).catch(swallowError), - (0, import_slurpFile.slurpFile)(resolvedFilepath, { - ignoreCache: init.ignoreCache - }).then(parseIni).catch(swallowError) - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1] - }; -}, "loadSharedConfigFiles"); - -// src/getSsoSessionData.ts - -var getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), "getSsoSessionData"); - -// src/loadSsoSessionData.ts -var import_slurpFile2 = __nccwpck_require__(95016); -var swallowError2 = /* @__PURE__ */ __name(() => ({}), "swallowError"); -var loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), "loadSsoSessionData"); - -// src/mergeConfigFiles.ts -var mergeConfigFiles = /* @__PURE__ */ __name((...files) => { - const merged = {}; - for (const file of files) { - for (const [key, values] of Object.entries(file)) { - if (merged[key] !== void 0) { - Object.assign(merged[key], values); - } else { - merged[key] = values; - } - } - } - return merged; -}, "mergeConfigFiles"); - -// src/parseKnownFiles.ts -var parseKnownFiles = /* @__PURE__ */ __name(async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); -}, "parseKnownFiles"); - -// src/externalDataInterceptor.ts -var import_getSSOTokenFromFile = __nccwpck_require__(83280); -var import_slurpFile3 = __nccwpck_require__(95016); -var externalDataInterceptor = { - getFileRecord() { - return import_slurpFile3.fileIntercept; - }, - interceptFile(path, contents) { - import_slurpFile3.fileIntercept[path] = Promise.resolve(contents); - }, - getTokenRecord() { - return import_getSSOTokenFromFile.tokenIntercept; - }, - interceptToken(id, contents) { - import_getSSOTokenFromFile.tokenIntercept[id] = contents; - } -}; -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 95016: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = void 0; -const fs_1 = __nccwpck_require__(79896); -const { readFile } = fs_1.promises; -exports.filePromisesHash = {}; -exports.fileIntercept = {}; -const slurpFile = (path, options) => { - if (exports.fileIntercept[path] !== undefined) { - return exports.fileIntercept[path]; - } - if (!exports.filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) { - exports.filePromisesHash[path] = readFile(path, "utf8"); - } - return exports.filePromisesHash[path]; -}; -exports.slurpFile = slurpFile; - - -/***/ }), - -/***/ 50892: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - AlgorithmId: () => AlgorithmId, - EndpointURLScheme: () => EndpointURLScheme, - FieldPosition: () => FieldPosition, - HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation, - HttpAuthLocation: () => HttpAuthLocation, - IniSectionType: () => IniSectionType, - RequestHandlerProtocol: () => RequestHandlerProtocol, - SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY, - getDefaultClientConfiguration: () => getDefaultClientConfiguration, - resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig -}); -module.exports = __toCommonJS(index_exports); - -// src/auth/auth.ts -var HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => { - HttpAuthLocation2["HEADER"] = "header"; - HttpAuthLocation2["QUERY"] = "query"; - return HttpAuthLocation2; -})(HttpAuthLocation || {}); - -// src/auth/HttpApiKeyAuth.ts -var HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => { - HttpApiKeyAuthLocation2["HEADER"] = "header"; - HttpApiKeyAuthLocation2["QUERY"] = "query"; - return HttpApiKeyAuthLocation2; -})(HttpApiKeyAuthLocation || {}); - -// src/endpoint.ts -var EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => { - EndpointURLScheme2["HTTP"] = "http"; - EndpointURLScheme2["HTTPS"] = "https"; - return EndpointURLScheme2; -})(EndpointURLScheme || {}); - -// src/extensions/checksum.ts -var AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => { - AlgorithmId2["MD5"] = "md5"; - AlgorithmId2["CRC32"] = "crc32"; - AlgorithmId2["CRC32C"] = "crc32c"; - AlgorithmId2["SHA1"] = "sha1"; - AlgorithmId2["SHA256"] = "sha256"; - return AlgorithmId2; -})(AlgorithmId || {}); -var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== void 0) { - checksumAlgorithms.push({ - algorithmId: /* @__PURE__ */ __name(() => "sha256" /* SHA256 */, "algorithmId"), - checksumConstructor: /* @__PURE__ */ __name(() => runtimeConfig.sha256, "checksumConstructor") - }); - } - if (runtimeConfig.md5 != void 0) { - checksumAlgorithms.push({ - algorithmId: /* @__PURE__ */ __name(() => "md5" /* MD5 */, "algorithmId"), - checksumConstructor: /* @__PURE__ */ __name(() => runtimeConfig.md5, "checksumConstructor") - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - } - }; -}, "getChecksumConfiguration"); -var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}, "resolveChecksumRuntimeConfig"); - -// src/extensions/defaultClientConfiguration.ts -var getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}, "getDefaultClientConfiguration"); -var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { - return resolveChecksumRuntimeConfig(config); -}, "resolveDefaultRuntimeConfig"); - -// src/http.ts -var FieldPosition = /* @__PURE__ */ ((FieldPosition2) => { - FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; - FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; - return FieldPosition2; -})(FieldPosition || {}); - -// src/middleware.ts -var SMITHY_CONTEXT_KEY = "__smithy_context"; - -// src/profile.ts -var IniSectionType = /* @__PURE__ */ ((IniSectionType2) => { - IniSectionType2["PROFILE"] = "profile"; - IniSectionType2["SSO_SESSION"] = "sso-session"; - IniSectionType2["SERVICES"] = "services"; - return IniSectionType2; -})(IniSectionType || {}); - -// src/transfer.ts -var RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => { - RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; - return RequestHandlerProtocol2; -})(RequestHandlerProtocol || {}); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 85792: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - parseUrl: () => parseUrl -}); -module.exports = __toCommonJS(index_exports); -var import_querystring_parser = __nccwpck_require__(18352); -var parseUrl = /* @__PURE__ */ __name((url) => { - if (typeof url === "string") { - return parseUrl(new URL(url)); - } - const { hostname, pathname, port, protocol, search } = url; - let query; - if (search) { - query = (0, import_querystring_parser.parseQueryString)(search); - } - return { - hostname, - port: port ? parseInt(port) : void 0, - protocol, - path: pathname, - query - }; -}, "parseUrl"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 1724: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(40037); -const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; -const 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 = (0, util_buffer_from_1.fromString)(input, "base64"); - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); -}; -exports.fromBase64 = fromBase64; - - -/***/ }), - -/***/ 82763: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -module.exports = __toCommonJS(index_exports); -__reExport(index_exports, __nccwpck_require__(1724), module.exports); -__reExport(index_exports, __nccwpck_require__(99617), module.exports); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 99617: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(40037); -const util_utf8_1 = __nccwpck_require__(85339); -const toBase64 = (_input) => { - let input; - if (typeof _input === "string") { - input = (0, util_utf8_1.fromUtf8)(_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 (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); -}; -exports.toBase64 = toBase64; - - -/***/ }), - -/***/ 84916: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - calculateBodyLength: () => calculateBodyLength -}); -module.exports = __toCommonJS(index_exports); - -// src/calculateBodyLength.ts -var TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; -var calculateBodyLength = /* @__PURE__ */ __name((body) => { - if (typeof body === "string") { - if (TEXT_ENCODER) { - return TEXT_ENCODER.encode(body).byteLength; - } - let len = body.length; - for (let i = len - 1; i >= 0; i--) { - const code = body.charCodeAt(i); - if (code > 127 && code <= 2047) len++; - else if (code > 2047 && code <= 65535) len += 2; - if (code >= 56320 && code <= 57343) i--; - } - return len; - } else if (typeof body.byteLength === "number") { - return body.byteLength; - } else if (typeof body.size === "number") { - return body.size; - } - throw new Error(`Body Length computation failed for ${body}`); -}, "calculateBodyLength"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 40037: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - fromArrayBuffer: () => fromArrayBuffer, - fromString: () => fromString -}); -module.exports = __toCommonJS(index_exports); -var import_is_array_buffer = __nccwpck_require__(67908); -var import_buffer = __nccwpck_require__(20181); -var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { - if (!(0, import_is_array_buffer.isArrayBuffer)(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); - } - return import_buffer.Buffer.from(input, offset, length); -}, "fromArrayBuffer"); -var fromString = /* @__PURE__ */ __name((input, encoding) => { - if (typeof input !== "string") { - throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); - } - return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input); -}, "fromString"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 70397: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - fromHex: () => fromHex, - toHex: () => toHex -}); -module.exports = __toCommonJS(index_exports); -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; -} -__name(fromHex, "fromHex"); -function toHex(bytes) { - let out = ""; - for (let i = 0; i < bytes.byteLength; i++) { - out += SHORT_TO_HEX[bytes[i]]; - } - return out; -} -__name(toHex, "toHex"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 30954: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getSmithyContext: () => getSmithyContext, - normalizeProvider: () => normalizeProvider -}); -module.exports = __toCommonJS(index_exports); - -// src/getSmithyContext.ts -var import_types = __nccwpck_require__(50892); -var getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); - -// src/normalizeProvider.ts -var normalizeProvider = /* @__PURE__ */ __name((input) => { - if (typeof input === "function") return input; - const promisified = Promise.resolve(input); - return () => promisified; -}, "normalizeProvider"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 96338: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ByteArrayCollector = void 0; -class ByteArrayCollector { - constructor(allocByteArray) { - this.allocByteArray = allocByteArray; - this.byteLength = 0; - this.byteArrays = []; - } - 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; - } -} -exports.ByteArrayCollector = ByteArrayCollector; - - -/***/ }), - -/***/ 73787: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function () { }; -class ChecksumStream extends ReadableStreamRef { -} -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 13821: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(82763); -const stream_1 = __nccwpck_require__(2203); -class ChecksumStream extends stream_1.Duplex { - constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) { - var _a, _b; - super(); - if (typeof source.pipe === "function") { - this.source = source; - } - else { - throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`); - } - this.base64Encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64; - this.expectedChecksum = expectedChecksum; - this.checksum = checksum; - this.checksumSourceLocation = checksumSourceLocation; - this.source.pipe(this); - } - _read(size) { } - _write(chunk, encoding, callback) { - try { - this.checksum.update(chunk); - this.push(chunk); - } - catch (e) { - return callback(e); - } - return callback(); - } - async _final(callback) { - try { - const digest = await this.checksum.digest(); - const received = this.base64Encoder(digest); - if (this.expectedChecksum !== received) { - return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + - ` in response header "${this.checksumSourceLocation}".`)); - } - } - catch (e) { - return callback(e); - } - this.push(null); - return callback(); - } -} -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 17227: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(82763); -const stream_type_check_1 = __nccwpck_require__(68604); -const ChecksumStream_browser_1 = __nccwpck_require__(73787); -const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => { - var _a, _b; - if (!(0, stream_type_check_1.isReadableStream)(source)) { - throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`); - } - const encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.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_browser_1.ChecksumStream.prototype); - return readable; -}; -exports.createChecksumStream = createChecksumStream; - - -/***/ }), - -/***/ 5869: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = createChecksumStream; -const stream_type_check_1 = __nccwpck_require__(68604); -const ChecksumStream_1 = __nccwpck_require__(13821); -const createChecksumStream_browser_1 = __nccwpck_require__(17227); -function createChecksumStream(init) { - if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { - return (0, createChecksumStream_browser_1.createChecksumStream)(init); - } - return new ChecksumStream_1.ChecksumStream(init); -} - - -/***/ }), - -/***/ 77523: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = createBufferedReadable; -const node_stream_1 = __nccwpck_require__(57075); -const ByteArrayCollector_1 = __nccwpck_require__(96338); -const createBufferedReadableStream_1 = __nccwpck_require__(55971); -const stream_type_check_1 = __nccwpck_require__(68604); -function createBufferedReadable(upstream, size, logger) { - if ((0, stream_type_check_1.isReadableStream)(upstream)) { - return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger); - } - const downstream = new node_stream_1.Readable({ read() { } }); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = [ - "", - new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)), - new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))), - ]; - let mode = -1; - upstream.on("data", (chunk) => { - const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); - if (mode !== chunkMode) { - if (mode >= 0) { - downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - mode = chunkMode; - } - if (mode === -1) { - downstream.push(chunk); - return; - } - const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); - bytesSeen += chunkSize; - const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - downstream.push(chunk); - } - else { - const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk); - if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { - streamBufferingLoggedWarning = true; - logger === null || logger === void 0 ? void 0 : logger.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); - } - if (newSize >= size) { - downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - } - }); - upstream.on("end", () => { - if (mode !== -1) { - const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); - if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { - downstream.push(remainder); - } - } - downstream.push(null); - }); - return downstream; -} - - -/***/ }), - -/***/ 55971: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = void 0; -exports.createBufferedReadableStream = createBufferedReadableStream; -exports.merge = merge; -exports.flush = flush; -exports.sizeOf = sizeOf; -exports.modeOf = modeOf; -const ByteArrayCollector_1 = __nccwpck_require__(96338); -function createBufferedReadableStream(upstream, size, logger) { - const reader = upstream.getReader(); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = ["", new ByteArrayCollector_1.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 === null || logger === void 0 ? void 0 : 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, - }); -} -exports.createBufferedReadable = createBufferedReadableStream; -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) { - var _a, _b; - return (_b = (_a = chunk === null || chunk === void 0 ? void 0 : chunk.byteLength) !== null && _a !== void 0 ? _a : chunk === null || chunk === void 0 ? void 0 : chunk.length) !== null && _b !== void 0 ? _b : 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; -} - - -/***/ }), - -/***/ 25024: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getAwsChunkedEncodingStream = void 0; -const stream_1 = __nccwpck_require__(2203); -const getAwsChunkedEncodingStream = (readableStream, options) => { - const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; - const checksumRequired = base64Encoder !== undefined && - checksumAlgorithmFn !== undefined && - checksumLocationName !== undefined && - streamHasher !== undefined; - const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; - const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } }); - readableStream.on("data", (data) => { - const length = bodyLengthChecker(data) || 0; - awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); - awsChunkedEncodingStream.push(data); - awsChunkedEncodingStream.push("\r\n"); - }); - readableStream.on("end", async () => { - awsChunkedEncodingStream.push(`0\r\n`); - if (checksumRequired) { - const checksum = base64Encoder(await digest); - awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); - awsChunkedEncodingStream.push(`\r\n`); - } - awsChunkedEncodingStream.push(null); - }); - return awsChunkedEncodingStream; -}; -exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; - - -/***/ }), - -/***/ 46916: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = headStream; -async function headStream(stream, bytes) { - var _a; - 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 += (_a = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a !== void 0 ? _a : 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; -} - - -/***/ }), - -/***/ 66922: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = void 0; -const stream_1 = __nccwpck_require__(2203); -const headStream_browser_1 = __nccwpck_require__(46916); -const stream_type_check_1 = __nccwpck_require__(68604); -const headStream = (stream, bytes) => { - if ((0, stream_type_check_1.isReadableStream)(stream)) { - return (0, headStream_browser_1.headStream)(stream, bytes); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - collector.limit = bytes; - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.buffers)); - resolve(bytes); - }); - }); -}; -exports.headStream = headStream; -class Collector extends stream_1.Writable { - constructor() { - super(...arguments); - this.buffers = []; - this.limit = Infinity; - this.bytesBuffered = 0; - } - _write(chunk, encoding, callback) { - var _a; - this.buffers.push(chunk); - this.bytesBuffered += (_a = chunk.byteLength) !== null && _a !== void 0 ? _a : 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(); - } -} - - -/***/ }), - -/***/ 71914: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter -}); -module.exports = __toCommonJS(index_exports); - -// src/blob/transforms.ts -var import_util_base64 = __nccwpck_require__(82763); -var import_util_utf8 = __nccwpck_require__(85339); -function transformToString(payload, encoding = "utf-8") { - if (encoding === "base64") { - return (0, import_util_base64.toBase64)(payload); - } - return (0, import_util_utf8.toUtf8)(payload); -} -__name(transformToString, "transformToString"); -function transformFromString(str, encoding) { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str)); - } - return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str)); -} -__name(transformFromString, "transformFromString"); - -// src/blob/Uint8ArrayBlobAdapter.ts -var Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array { - static { - __name(this, "Uint8ArrayBlobAdapter"); - } - /** - * @param source - such as a string or Stream. - * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. - */ - static fromString(source, encoding = "utf-8") { - switch (typeof source) { - case "string": - return transformFromString(source, encoding); - default: - throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); - } - } - /** - * @param source - Uint8Array to be mutated. - * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. - */ - static mutate(source) { - Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype); - return source; - } - /** - * @param encoding - default 'utf-8'. - * @returns the blob as string. - */ - transformToString(encoding = "utf-8") { - return transformToString(this, encoding); - } -}; - -// src/index.ts -__reExport(index_exports, __nccwpck_require__(13821), module.exports); -__reExport(index_exports, __nccwpck_require__(5869), module.exports); -__reExport(index_exports, __nccwpck_require__(77523), module.exports); -__reExport(index_exports, __nccwpck_require__(25024), module.exports); -__reExport(index_exports, __nccwpck_require__(66922), module.exports); -__reExport(index_exports, __nccwpck_require__(51027), module.exports); -__reExport(index_exports, __nccwpck_require__(39346), module.exports); -__reExport(index_exports, __nccwpck_require__(68604), module.exports); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 60445: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const fetch_http_handler_1 = __nccwpck_require__(47299); -const util_base64_1 = __nccwpck_require__(82763); -const util_hex_encoding_1 = __nccwpck_require__(70397); -const util_utf8_1 = __nccwpck_require__(85339); -const stream_type_check_1 = __nccwpck_require__(68604); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - var _a, _b; - if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) { - const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.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); - } - transformed = true; - return await (0, fetch_http_handler_1.streamCollector)(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.\n" + - "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: transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === "base64") { - return (0, util_base64_1.toBase64)(buf); - } - else if (encoding === "hex") { - return (0, util_hex_encoding_1.toHex)(buf); - } - else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { - return (0, util_utf8_1.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); - } - transformed = true; - if (isBlobInstance(stream)) { - return blobToWebStream(stream); - } - else if ((0, stream_type_check_1.isReadableStream)(stream)) { - return stream; - } - else { - throw new Error(`Cannot transform payload to web stream, got ${stream}`); - } - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; -const isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; - - -/***/ }), - -/***/ 51027: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const node_http_handler_1 = __nccwpck_require__(95493); -const util_buffer_from_1 = __nccwpck_require__(40037); -const stream_1 = __nccwpck_require__(2203); -const sdk_stream_mixin_browser_1 = __nccwpck_require__(60445); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - var _a, _b; - if (!(stream instanceof stream_1.Readable)) { - try { - return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); - } - catch (e) { - const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.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 (0, node_http_handler_1.streamCollector)(stream); - }; - return Object.assign(stream, { - transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === undefined || Buffer.isEncoding(encoding)) { - return (0, util_buffer_from_1.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 stream_1.Readable.toWeb !== "function") { - throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); - } - transformed = true; - return stream_1.Readable.toWeb(stream); - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; - - -/***/ }), - -/***/ 70988: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -async function splitStream(stream) { - if (typeof stream.stream === "function") { - stream = stream.stream(); - } - const readableStream = stream; - return readableStream.tee(); -} - - -/***/ }), - -/***/ 39346: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -const stream_1 = __nccwpck_require__(2203); -const splitStream_browser_1 = __nccwpck_require__(70988); -const stream_type_check_1 = __nccwpck_require__(68604); -async function splitStream(stream) { - if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) { - return (0, splitStream_browser_1.splitStream)(stream); - } - const stream1 = new stream_1.PassThrough(); - const stream2 = new stream_1.PassThrough(); - stream.pipe(stream1); - stream.pipe(stream2); - return [stream1, stream2]; -} - - -/***/ }), - -/***/ 68604: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isBlob = exports.isReadableStream = void 0; -const isReadableStream = (stream) => { - var _a; - return typeof ReadableStream === "function" && - (((_a = stream === null || stream === void 0 ? void 0 : stream.constructor) === null || _a === void 0 ? void 0 : _a.name) === ReadableStream.name || stream instanceof ReadableStream); -}; -exports.isReadableStream = isReadableStream; -const isBlob = (blob) => { - var _a; - return typeof Blob === "function" && (((_a = blob === null || blob === void 0 ? void 0 : blob.constructor) === null || _a === void 0 ? void 0 : _a.name) === Blob.name || blob instanceof Blob); -}; -exports.isBlob = isBlob; - - -/***/ }), - -/***/ 72644: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - escapeUri: () => escapeUri, - escapeUriPath: () => escapeUriPath -}); -module.exports = __toCommonJS(index_exports); - -// src/escape-uri.ts -var escapeUri = /* @__PURE__ */ __name((uri) => ( - // AWS percent-encodes some extra non-standard characters in a URI - encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode) -), "escapeUri"); -var hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); - -// src/escape-uri-path.ts -var escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split("/").map(escapeUri).join("/"), "escapeUriPath"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 85339: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - fromUtf8: () => fromUtf8, - toUint8Array: () => toUint8Array, - toUtf8: () => toUtf8 -}); -module.exports = __toCommonJS(index_exports); - -// src/fromUtf8.ts -var import_util_buffer_from = __nccwpck_require__(40037); -var fromUtf8 = /* @__PURE__ */ __name((input) => { - const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); -}, "fromUtf8"); - -// src/toUint8Array.ts -var toUint8Array = /* @__PURE__ */ __name((data) => { - if (typeof data === "string") { - return fromUtf8(data); - } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data); -}, "toUint8Array"); - -// src/toUtf8.ts - -var toUtf8 = /* @__PURE__ */ __name((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 (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); -}, "toUtf8"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 8704: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var protocolHttp = __nccwpck_require__(17898); -var core = __nccwpck_require__(88180); -var propertyProvider = __nccwpck_require__(6180); -var client = __nccwpck_require__(5152); -var signatureV4 = __nccwpck_require__(75118); -var cbor = __nccwpck_require__(20695); -var schema = __nccwpck_require__(79724); -var protocols = __nccwpck_require__(97332); -var serde = __nccwpck_require__(99628); -var utilBase64 = __nccwpck_require__(96039); -var smithyClient = __nccwpck_require__(61411); -var utilUtf8 = __nccwpck_require__(60791); -var xmlBuilder = __nccwpck_require__(94274); - -const state = { - warningEmitted: false, -}; -const emitWarningIfUnsupportedVersion = (version) => { - if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) { - state.warningEmitted = true; - process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will -no longer support Node.js 16.x on January 6, 2025. - -To continue receiving updates to AWS services, bug fixes, and security -updates please upgrade to a supported Node.js LTS version. - -More information can be found at: https://a.co/74kJMmI`); - } -}; - -function setCredentialFeature(credentials, feature, value) { - if (!credentials.$source) { - credentials.$source = {}; - } - credentials.$source[feature] = value; - return credentials; -} - -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; -} - -const getDateHeader = (response) => protocolHttp.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined; - -const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); - -const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000; - -const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { - const clockTimeInMs = Date.parse(clockTime); - if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { - return clockTimeInMs - Date.now(); - } - return currentSystemClockOffset; -}; - -const throwSigningPropertyError = (name, property) => { - if (!property) { - throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); - } - return property; -}; -const 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 (!protocolHttp.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 signedRequest = await signer.sign(httpRequest, { - signingDate: getSkewCorrectedDate(config.systemClockOffset), - signingRegion: signingRegion, - signingService: signingName, - }); - return signedRequest; - } - errorHandler(signingProperties) { - return (error) => { - const serverTime = error.ServerTime ?? getDateHeader(error.$response); - if (serverTime) { - const config = throwSigningPropertyError("config", signingProperties.config); - const initialSystemClockOffset = config.systemClockOffset; - config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); - const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset; - if (clockSkewCorrected && error.$metadata) { - error.$metadata.clockSkewCorrected = true; - } - } - throw error; - }; - } - successHandler(httpResponse, signingProperties) { - const dateHeader = getDateHeader(httpResponse); - if (dateHeader) { - const config = throwSigningPropertyError("config", signingProperties.config); - config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset); - } - } -} -const AWSSDKSigV4Signer = AwsSdkSigV4Signer; - -class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer { - async sign(httpRequest, identity, signingProperties) { - if (!protocolHttp.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 signedRequest = await signer.sign(httpRequest, { - signingDate: getSkewCorrectedDate(config.systemClockOffset), - signingRegion: multiRegionOverride, - signingService: signingName, - }); - return signedRequest; - } -} - -const getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : []; - -const getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`; - -const NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE"; -const NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference"; -const 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 undefined; - return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]); - }, - configFileSelector: (profile) => { - if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) - return undefined; - return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]); - }, - default: [], -}; - -const resolveAwsSdkSigV4AConfig = (config) => { - config.sigv4aSigningRegionSet = core.normalizeProvider(config.sigv4aSigningRegionSet); - return config; -}; -const 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 propertyProvider.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 propertyProvider.ProviderError("sigv4a_signing_region_set not set in profile.", { - tryNextLink: true, - }); - }, - default: undefined, -}; - -const resolveAwsSdkSigV4Config = (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) { - resolvedCredentials = async (options) => boundProvider(options).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_CODE", "e")); - 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 = core.normalizeProvider(config.signer); - } - else if (config.regionInfoProvider) { - signer = () => core.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.SignatureV4; - return new SignerCtor(params); - }); - } - else { - signer = async (authScheme) => { - authScheme = Object.assign({}, { - name: "sigv4", - signingName: config.signingName || config.defaultSigningName, - signingRegion: await core.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.SignatureV4; - return new SignerCtor(params); - }; - } - const resolvedConfig = Object.assign(config, { - systemClockOffset, - signingEscapePath, - signer, - }); - return resolvedConfig; -}; -const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; -function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider, }) { - let credentialsProvider; - if (credentials) { - if (!credentials?.memoized) { - credentialsProvider = core.memoizeIdentityProvider(credentials, core.isIdentityExpired, core.doesIdentityRequireRefresh); - } - else { - credentialsProvider = credentials; - } - } - else { - if (credentialDefaultProvider) { - credentialsProvider = core.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; -} - -class ProtocolLib { - 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 === void 0; - return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders; - }); - if (hasBody) { - return defaultContentType; - } - } - } - async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) { - let namespace = defaultNamespace; - let errorName = errorIdentifier; - if (errorIdentifier.includes("#")) { - [namespace, errorName] = errorIdentifier.split("#"); - } - const errorMetadata = { - $metadata: metadata, - $response: response, - $fault: response.statusCode < 500 ? "client" : "server", - }; - const registry = schema.TypeRegistry.for(namespace); - try { - const errorSchema = getErrorSchema?.(registry, errorName) ?? registry.getSchema(errorIdentifier); - return { errorSchema, errorMetadata }; - } - catch (e) { - dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError"; - const synthetic = schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace); - const baseExceptionSchema = synthetic.getBaseException(); - if (baseExceptionSchema) { - const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error; - throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject); - } - throw Object.assign(new Error(errorName), errorMetadata, dataObject); - } - } - setQueryCompatError(output, response) { - const queryErrorHeader = response.headers?.["x-amzn-query-error"]; - if (output !== undefined && queryErrorHeader != null) { - const [Code, Type] = queryErrorHeader.split(";"); - const entries = Object.entries(output); - const Error = { - Code, - Type, - }; - Object.assign(output, Error); - for (const [k, v] of entries) { - Error[k] = v; - } - delete Error.__type; - output.Error = Error; - } - } - queryCompatOutput(queryCompatErrorData, errorData) { - if (queryCompatErrorData.Error) { - errorData.Error = queryCompatErrorData.Error; - } - if (queryCompatErrorData.Type) { - errorData.Type = queryCompatErrorData.Type; - } - if (queryCompatErrorData.Code) { - errorData.Code = queryCompatErrorData.Code; - } - } -} - -class AwsSmithyRpcV2CborProtocol extends cbor.SmithyRpcV2CborProtocol { - awsQueryCompatible; - mixin = new ProtocolLib(); - constructor({ defaultNamespace, awsQueryCompatible, }) { - super({ defaultNamespace }); - this.awsQueryCompatible = !!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 = cbor.loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown"; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata); - const ns = schema.NormalizedSchema.of(errorSchema); - const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; - const exception = new ErrorCtor(message); - const output = {}; - for (const [name, member] of ns.structIterator()) { - output[name] = this.deserializer.readValue(member, dataObject[name]); - } - if (this.awsQueryCompatible) { - this.mixin.queryCompatOutput(dataObject, output); - } - throw Object.assign(exception, errorMetadata, { - $fault: ns.getMergedTraits().error, - message, - }, output); - } -} - -const _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; -}; -const _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; -}; -const _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; -}; - -class SerdeContextConfig { - serdeContext; - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; - } -} - -function jsonReviver(key, value, context) { - if (context?.source) { - const numericString = context.source; - if (typeof value === "number") { - if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) { - const isFractional = numericString.includes("."); - if (isFractional) { - return new serde.NumericValue(numericString, "bigDecimal"); - } - else { - return BigInt(numericString); - } - } - } - } - return value; -} - -const collectBodyString = (streamBody, context) => smithyClient.collectBody(streamBody, context).then((body) => (context?.utf8Encoder ?? utilUtf8.toUtf8)(body)); - -const parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - try { - return JSON.parse(encoded); - } - catch (e) { - if (e?.name === "SyntaxError") { - Object.defineProperty(e, "$responseBodyText", { - value: encoded, - }); - } - throw e; - } - } - return {}; -}); -const parseJsonErrorBody = async (errorBody, context) => { - const value = await parseJsonBody(errorBody, context); - value.message = value.message ?? value.Message; - return value; -}; -const loadRestJsonErrorCode = (output, data) => { - const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); - 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; - }; - const headerKey = findKey(output.headers, "x-amzn-errortype"); - if (headerKey !== undefined) { - return sanitizeErrorCode(output.headers[headerKey]); - } - if (data && typeof data === "object") { - const codeKey = findKey(data, "code"); - if (codeKey && data[codeKey] !== undefined) { - return sanitizeErrorCode(data[codeKey]); - } - if (data["__type"] !== undefined) { - return sanitizeErrorCode(data["__type"]); - } - } -}; - -class JsonShapeDeserializer extends SerdeContextConfig { - settings; - constructor(settings) { - super(); - this.settings = settings; - } - async read(schema, data) { - return this._read(schema, typeof data === "string" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext)); - } - readObject(schema, data) { - return this._read(schema, data); - } - _read(schema$1, value) { - const isObject = value !== null && typeof value === "object"; - const ns = schema.NormalizedSchema.of(schema$1); - if (ns.isListSchema() && Array.isArray(value)) { - const listMember = ns.getValueSchema(); - const out = []; - const sparse = !!ns.getMergedTraits().sparse; - for (const item of value) { - if (sparse || item != null) { - out.push(this._read(listMember, item)); - } - } - return out; - } - else if (ns.isMapSchema() && isObject) { - const mapMember = ns.getValueSchema(); - const out = {}; - const sparse = !!ns.getMergedTraits().sparse; - for (const [_k, _v] of Object.entries(value)) { - if (sparse || _v != null) { - out[_k] = this._read(mapMember, _v); - } - } - return out; - } - else if (ns.isStructSchema() && isObject) { - const out = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; - const deserializedValue = this._read(memberSchema, value[fromKey]); - if (deserializedValue != null) { - out[memberName] = deserializedValue; - } - } - return out; - } - if (ns.isBlobSchema() && typeof value === "string") { - return utilBase64.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 serde.LazyJsonString.from(value); - } - } - if (ns.isTimestampSchema() && value != null) { - const format = protocols.determineTimestampFormat(ns, this.settings); - switch (format) { - case 5: - return serde.parseRfc3339DateTimeWithOffset(value); - case 6: - return serde.parseRfc7231DateTime(value); - case 7: - return serde.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 != undefined) { - if (value instanceof serde.NumericValue) { - return value; - } - const untyped = value; - if (untyped.type === "bigDecimal" && "string" in untyped) { - return new serde.NumericValue(untyped.string, untyped.type); - } - return new serde.NumericValue(String(value), "bigDecimal"); - } - if (ns.isNumericSchema() && typeof value === "string") { - switch (value) { - case "Infinity": - return Infinity; - case "-Infinity": - return -Infinity; - case "NaN": - return NaN; - } - } - if (ns.isDocumentSchema()) { - if (isObject) { - const out = Array.isArray(value) ? [] : {}; - for (const [k, v] of Object.entries(value)) { - if (v instanceof serde.NumericValue) { - out[k] = v; - } - else { - out[k] = this._read(ns, v); - } - } - return out; - } - else { - return structuredClone(value); - } - } - return value; - } -} - -const 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 serde.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; - rootSchema; - constructor(settings) { - super(); - this.settings = settings; - } - write(schema$1, value) { - this.rootSchema = schema.NormalizedSchema.of(schema$1); - this.buffer = this._write(this.rootSchema, value); - } - writeDiscriminatedDocument(schema$1, value) { - this.write(schema$1, value); - if (typeof this.buffer === "object") { - this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true); - } - } - flush() { - const { rootSchema } = this; - this.rootSchema = undefined; - if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) { - const replacer = new JsonReplacer(); - return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0)); - } - return this.buffer; - } - _write(schema$1, value, container) { - const isObject = value !== null && typeof value === "object"; - const ns = schema.NormalizedSchema.of(schema$1); - if (ns.isListSchema() && Array.isArray(value)) { - 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; - } - else if (ns.isMapSchema() && isObject) { - const mapMember = ns.getValueSchema(); - const out = {}; - const sparse = !!ns.getMergedTraits().sparse; - for (const [_k, _v] of Object.entries(value)) { - if (sparse || _v != null) { - out[_k] = this._write(mapMember, _v); - } - } - return out; - } - else if (ns.isStructSchema() && isObject) { - const out = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; - const serializableValue = this._write(memberSchema, value[memberName], ns); - if (serializableValue !== undefined) { - out[targetKey] = serializableValue; - } - } - return out; - } - if (value === null && container?.isStructSchema()) { - return void 0; - } - if ((ns.isBlobSchema() && (value instanceof Uint8Array || typeof value === "string")) || - (ns.isDocumentSchema() && value instanceof Uint8Array)) { - if (ns === this.rootSchema) { - return value; - } - if (!this.serdeContext?.base64Encoder) { - return utilBase64.toBase64(value); - } - return this.serdeContext?.base64Encoder(value); - } - if ((ns.isTimestampSchema() || ns.isDocumentSchema()) && value instanceof Date) { - const format = protocols.determineTimestampFormat(ns, this.settings); - switch (format) { - case 5: - return value.toISOString().replace(".000Z", "Z"); - case 6: - return serde.dateToUtcString(value); - case 7: - return value.getTime() / 1000; - default: - console.warn("Missing timestamp format, using epoch seconds", value); - return value.getTime() / 1000; - } - } - if (ns.isNumericSchema() && typeof value === "number") { - if (Math.abs(value) === Infinity || isNaN(value)) { - return String(value); - } - } - if (ns.isStringSchema()) { - if (typeof value === "undefined" && ns.isIdempotencyToken()) { - return serde.generateIdempotencyToken(); - } - const mediaType = ns.getMergedTraits().mediaType; - if (value != null && mediaType) { - const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); - if (isJson) { - return serde.LazyJsonString.from(value); - } - } - } - if (ns.isDocumentSchema()) { - if (isObject) { - const out = Array.isArray(value) ? [] : {}; - for (const [k, v] of Object.entries(value)) { - if (v instanceof serde.NumericValue) { - 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 AwsJsonRpcProtocol extends protocols.RpcProtocol { - serializer; - deserializer; - serviceTarget; - codec; - mixin = new ProtocolLib(); - awsQueryCompatible; - constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }) { - super({ - defaultNamespace, - }); - this.serviceTarget = serviceTarget; - this.codec = new JsonCodec({ - timestampFormat: { - useTrait: true, - default: 7, - }, - jsonName: false, - }); - this.serializer = this.codec.createSerializer(); - this.deserializer = this.codec.createDeserializer(); - this.awsQueryCompatible = !!awsQueryCompatible; - } - async serializeRequest(operationSchema, input, context) { - const request = await super.serializeRequest(operationSchema, input, context); - if (!request.path.endsWith("/")) { - request.path += "/"; - } - Object.assign(request.headers, { - "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`, - "x-amz-target": `${this.serviceTarget}.${operationSchema.name}`, - }); - if (this.awsQueryCompatible) { - request.headers["x-amzn-query-mode"] = "true"; - } - if (schema.deref(operationSchema.input) === "unit" || !request.body) { - request.body = "{}"; - } - return request; - } - getPayloadCodec() { - return this.codec; - } - async handleError(operationSchema, context, response, dataObject, metadata) { - if (this.awsQueryCompatible) { - this.mixin.setQueryCompatError(dataObject, response); - } - const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); - const ns = schema.NormalizedSchema.of(errorSchema); - const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; - const exception = new ErrorCtor(message); - const output = {}; - for (const [name, member] of ns.structIterator()) { - const target = member.getMergedTraits().jsonName ?? name; - output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); - } - if (this.awsQueryCompatible) { - this.mixin.queryCompatOutput(dataObject, output); - } - throw Object.assign(exception, errorMetadata, { - $fault: ns.getMergedTraits().error, - message, - }, output); - } -} - -class AwsJson1_0Protocol extends AwsJsonRpcProtocol { - constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }) { - super({ - defaultNamespace, - serviceTarget, - awsQueryCompatible, - }); - } - 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, serviceTarget, awsQueryCompatible, }) { - super({ - defaultNamespace, - serviceTarget, - awsQueryCompatible, - }); - } - getShapeId() { - return "aws.protocols#awsJson1_1"; - } - getJsonRpcVersion() { - return "1.1"; - } - getDefaultContentType() { - return "application/x-amz-json-1.1"; - } -} - -class AwsRestJsonProtocol extends protocols.HttpBindingProtocol { - serializer; - deserializer; - codec; - mixin = new ProtocolLib(); - constructor({ defaultNamespace }) { - super({ - defaultNamespace, - }); - const settings = { - timestampFormat: { - useTrait: true, - default: 7, - }, - httpBindings: true, - jsonName: true, - }; - this.codec = new JsonCodec(settings); - this.serializer = new protocols.HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); - this.deserializer = new protocols.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 = schema.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.headers["content-type"] && !request.body) { - request.body = "{}"; - } - return request; - } - async handleError(operationSchema, context, response, dataObject, metadata) { - const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); - const ns = schema.NormalizedSchema.of(errorSchema); - const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; - const exception = new ErrorCtor(message); - await this.deserializeHttpMessage(errorSchema, context, response, dataObject); - const output = {}; - for (const [name, member] of ns.structIterator()) { - const target = member.getMergedTraits().jsonName ?? name; - output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); - } - throw Object.assign(exception, errorMetadata, { - $fault: ns.getMergedTraits().error, - message, - }, output); - } - getDefaultContentType() { - return "application/json"; - } -} - -const awsExpectUnion = (value) => { - if (value == null) { - return undefined; - } - if (typeof value === "object" && "__type" in value) { - delete value.__type; - } - return smithyClient.expectUnion(value); -}; - -class XmlShapeDeserializer extends SerdeContextConfig { - settings; - stringDeserializer; - constructor(settings) { - super(); - this.settings = settings; - this.stringDeserializer = new protocols.FromStringShapeDeserializer(settings); - } - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; - this.stringDeserializer.setSerdeContext(serdeContext); - } - read(schema$1, bytes, key) { - const ns = schema.NormalizedSchema.of(schema$1); - 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 ?? utilUtf8.toUtf8)(bytes); - const parsedObject = this.parseXml(xmlString); - return this.readSchema(schema$1, key ? parsedObject[key] : parsedObject); - } - readSchema(_schema, value) { - const ns = schema.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 sparse = !!traits.sparse; - 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]; - const sourceArray = Array.isArray(source) ? source : [source]; - for (const v of sourceArray) { - if (v != null || sparse) { - 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 (value != null || sparse) { - buffer[key] = this.readSchema(memberNs, value); - } - } - return buffer; - } - if (ns.isStructSchema()) { - for (const [memberName, memberSchema] of ns.structIterator()) { - const memberTraits = memberSchema.getMergedTraits(); - const xmlObjectKey = !memberTraits.httpPayload - ? memberSchema.getMemberTraits().xmlName ?? memberName - : memberTraits.xmlName ?? memberSchema.getName(); - if (value[xmlObjectKey] != null) { - buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]); - } - } - 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 = xmlBuilder.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 smithyClient.getValueFromTextNode(parsedObjToReturn); - } - return {}; - } -} - -class QueryShapeSerializer extends SerdeContextConfig { - settings; - buffer; - constructor(settings) { - super(); - this.settings = settings; - } - write(schema$1, value, prefix = "") { - if (this.buffer === undefined) { - this.buffer = ""; - } - const ns = schema.NormalizedSchema.of(schema$1); - if (prefix && !prefix.endsWith(".")) { - prefix += "."; - } - if (ns.isBlobSchema()) { - if (typeof value === "string" || value instanceof Uint8Array) { - this.writeKey(prefix); - this.writeValue((this.serdeContext?.base64Encoder ?? utilBase64.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(serde.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 serde.NumericValue ? value.string : String(value)); - } - } - else if (ns.isTimestampSchema()) { - if (value instanceof Date) { - this.writeKey(prefix); - const format = protocols.determineTimestampFormat(ns, this.settings); - switch (format) { - case 5: - this.writeValue(value.toISOString().replace(".000Z", "Z")); - break; - case 6: - this.writeValue(smithyClient.dateToUtcString(value)); - break; - case 7: - this.writeValue(String(value.getTime() / 1000)); - break; - } - } - } - else if (ns.isDocumentSchema()) { - throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${ns.getName(true)}`); - } - 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 suffix = this.getKey("member", member.getMergedTraits().xmlName); - 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, v] of Object.entries(value)) { - if (v == null) { - continue; - } - const keySuffix = this.getKey("key", keySchema.getMergedTraits().xmlName); - const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`; - const valueSuffix = this.getKey("value", memberSchema.getMergedTraits().xmlName); - 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") { - for (const [memberName, member] of ns.structIterator()) { - if (value[memberName] == null && !member.isIdempotencyToken()) { - continue; - } - const suffix = this.getKey(memberName, member.getMergedTraits().xmlName); - const key = `${prefix}${suffix}`; - this.write(member, value[memberName], 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) { - const key = xmlName ?? memberName; - if (this.settings.capitalizeKeys) { - return key[0].toUpperCase() + key.slice(1); - } - return key; - } - writeKey(key) { - if (key.endsWith(".")) { - key = key.slice(0, key.length - 1); - } - this.buffer += `&${protocols.extendedEncodeURIComponent(key)}=`; - } - writeValue(value) { - this.buffer += protocols.extendedEncodeURIComponent(value); - } -} - -class AwsQueryProtocol extends protocols.RpcProtocol { - options; - serializer; - deserializer; - mixin = new ProtocolLib(); - constructor(options) { - super({ - defaultNamespace: options.defaultNamespace, - }); - 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 += "/"; - } - Object.assign(request.headers, { - "content-type": `application/x-www-form-urlencoded`, - }); - if (schema.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 = schema.NormalizedSchema.of(operationSchema.output); - const dataObject = {}; - if (response.statusCode >= 300) { - const bytes = await protocols.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 protocols.collectBody(response.body, context); - if (bytes.byteLength > 0) { - Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey)); - } - const output = { - $metadata: this.deserializeMetadata(response), - ...dataObject, - }; - return output; - } - useNestedResult() { - return true; - } - async handleError(operationSchema, context, response, dataObject, metadata) { - const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown"; - 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, (registry, errorName) => registry.find((schema$1) => schema.NormalizedSchema.of(schema$1).getMergedTraits().awsQueryError?.[0] === errorName)); - const ns = schema.NormalizedSchema.of(errorSchema); - const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; - const exception = new ErrorCtor(message); - const output = { - 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 Object.assign(exception, errorMetadata, { - $fault: ns.getMergedTraits().error, - message, - }, output); - } - 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, - }; - Object.assign(this.serializer.settings, ec2Settings); - } - useNestedResult() { - return false; - } -} - -const parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - let parsedObj; - try { - parsedObj = xmlBuilder.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 smithyClient.getValueFromTextNode(parsedObjToReturn); - } - return {}; -}); -const parseXmlErrorBody = async (errorBody, context) => { - const value = await parseXmlBody(errorBody, context); - if (value.Error) { - value.Error.message = value.Error.message ?? value.Error.Message; - } - return value; -}; -const 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$1, value) { - const ns = schema.NormalizedSchema.of(schema$1); - if (ns.isStringSchema() && typeof value === "string") { - this.stringBuffer = value; - } - else if (ns.isBlobSchema()) { - this.byteBuffer = - "byteLength" in value - ? value - : (this.serdeContext?.base64Decoder ?? utilBase64.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 = xmlBuilder.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 = xmlBuilder.XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName()); - this.writeSimpleInto(memberSchema, val, memberNode, xmlns); - structXmlNode.addChildNode(memberNode); - } - } - } - 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 = xmlBuilder.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 = xmlBuilder.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 = xmlBuilder.XmlNode.of(keyTag, key); - const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns); - if (keyXmlns) { - keyNode.addAttribute(keyXmlnsAttr, keyXmlns); - } - entry.addChildNode(keyNode); - let valueNode = xmlBuilder.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, val] of Object.entries(map)) { - if (sparse || val != null) { - const entry = xmlBuilder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); - addKeyValue(entry, key, val); - container.addChildNode(entry); - } - } - } - else { - let mapNode; - if (!containerIsMap) { - mapNode = xmlBuilder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); - if (xmlns) { - mapNode.addAttribute(xmlnsAttr, xmlns); - } - container.addChildNode(mapNode); - } - for (const [key, val] of Object.entries(map)) { - if (sparse || val != null) { - const entry = xmlBuilder.XmlNode.of("entry"); - addKeyValue(entry, key, val); - (containerIsMap ? container : mapNode).addChildNode(entry); - } - } - } - } - writeSimple(_schema, value) { - if (null === value) { - throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value."); - } - const ns = schema.NormalizedSchema.of(_schema); - let nodeContents = null; - if (value && typeof value === "object") { - if (ns.isBlobSchema()) { - nodeContents = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(value); - } - else if (ns.isTimestampSchema() && value instanceof Date) { - const format = protocols.determineTimestampFormat(ns, this.settings); - switch (format) { - case 5: - nodeContents = value.toISOString().replace(".000Z", "Z"); - break; - case 6: - nodeContents = smithyClient.dateToUtcString(value); - break; - case 7: - nodeContents = String(value.getTime() / 1000); - break; - default: - console.warn("Missing timestamp format, using http date", value); - nodeContents = smithyClient.dateToUtcString(value); - break; - } - } - else if (ns.isBigDecimalSchema() && value) { - if (value instanceof serde.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 = serde.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 = schema.NormalizedSchema.of(_schema); - const content = new xmlBuilder.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 [void 0, void 0]; - } -} - -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 protocols.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 protocols.HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); - this.deserializer = new protocols.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 = schema.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.headers["content-type"] === this.getDefaultContentType()) { - if (typeof request.body === "string") { - request.body = '' + 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"; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); - const ns = schema.NormalizedSchema.of(errorSchema); - const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; - const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; - const exception = new ErrorCtor(message); - await this.deserializeHttpMessage(errorSchema, context, response, dataObject); - const output = {}; - for (const [name, member] of ns.structIterator()) { - const target = member.getMergedTraits().xmlName ?? name; - const value = dataObject.Error?.[target] ?? dataObject[target]; - output[name] = this.codec.createDeserializer().readSchema(member, value); - } - throw Object.assign(exception, errorMetadata, { - $fault: ns.getMergedTraits().error, - message, - }, output); - } - getDefaultContentType() { - return "application/xml"; - } -} - -exports.AWSSDKSigV4Signer = AWSSDKSigV4Signer; -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.AwsSdkSigV4ASigner = AwsSdkSigV4ASigner; -exports.AwsSdkSigV4Signer = AwsSdkSigV4Signer; -exports.AwsSmithyRpcV2CborProtocol = AwsSmithyRpcV2CborProtocol; -exports.JsonCodec = JsonCodec; -exports.JsonShapeDeserializer = JsonShapeDeserializer; -exports.JsonShapeSerializer = JsonShapeSerializer; -exports.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = NODE_AUTH_SCHEME_PREFERENCE_OPTIONS; -exports.NODE_SIGV4A_CONFIG_OPTIONS = NODE_SIGV4A_CONFIG_OPTIONS; -exports.XmlCodec = XmlCodec; -exports.XmlShapeDeserializer = XmlShapeDeserializer; -exports.XmlShapeSerializer = XmlShapeSerializer; -exports._toBool = _toBool; -exports._toNum = _toNum; -exports._toStr = _toStr; -exports.awsExpectUnion = awsExpectUnion; -exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion; -exports.getBearerTokenEnvKey = getBearerTokenEnvKey; -exports.loadRestJsonErrorCode = loadRestJsonErrorCode; -exports.loadRestXmlErrorCode = loadRestXmlErrorCode; -exports.parseJsonBody = parseJsonBody; -exports.parseJsonErrorBody = parseJsonErrorBody; -exports.parseXmlBody = parseXmlBody; -exports.parseXmlErrorBody = parseXmlErrorBody; -exports.resolveAWSSDKSigV4Config = resolveAWSSDKSigV4Config; -exports.resolveAwsSdkSigV4AConfig = resolveAwsSdkSigV4AConfig; -exports.resolveAwsSdkSigV4Config = resolveAwsSdkSigV4Config; -exports.setCredentialFeature = setCredentialFeature; -exports.setFeature = setFeature; -exports.setTokenFeature = setTokenFeature; -exports.state = state; -exports.validateSigningProperties = validateSigningProperties; - - -/***/ }), - -/***/ 5152: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const state = { - warningEmitted: false, -}; -const emitWarningIfUnsupportedVersion = (version) => { - if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) { - state.warningEmitted = true; - process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will -no longer support Node.js 16.x on January 6, 2025. - -To continue receiving updates to AWS services, bug fixes, and security -updates please upgrade to a supported Node.js LTS version. - -More information can be found at: https://a.co/74kJMmI`); - } -}; - -function setCredentialFeature(credentials, feature, value) { - if (!credentials.$source) { - credentials.$source = {}; - } - credentials.$source[feature] = value; - return credentials; -} - -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; -} - -exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion; -exports.setCredentialFeature = setCredentialFeature; -exports.setFeature = setFeature; -exports.setTokenFeature = setTokenFeature; -exports.state = state; - - -/***/ }), - -/***/ 88180: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var types = __nccwpck_require__(34048); -var utilMiddleware = __nccwpck_require__(56182); -var middlewareSerde = __nccwpck_require__(88037); -var protocolHttp = __nccwpck_require__(17898); -var protocols = __nccwpck_require__(97332); - -const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); - -const 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; -} -const 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 = utilMiddleware.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("\n")); - } - return next(args); -}; - -const httpAuthSchemeEndpointRuleSetMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: "endpointV2Middleware", -}; -const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider, - }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); - }, -}); - -const httpAuthSchemeMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: middlewareSerde.serializerMiddlewareOption.name, -}; -const getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider, - }), httpAuthSchemeMiddlewareOptions); - }, -}); - -const defaultErrorHandler = (signingProperties) => (error) => { - throw error; -}; -const defaultSuccessHandler = (httpResponse, signingProperties) => { }; -const httpSigningMiddleware = (config) => (next, context) => async (args) => { - if (!protocolHttp.HttpRequest.isInstance(args.request)) { - return next(args); - } - const smithyContext = utilMiddleware.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; -}; - -const httpSigningMiddlewareOptions = { - step: "finalizeRequest", - tags: ["HTTP_SIGNING"], - name: "httpSigningMiddleware", - aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], - override: true, - relation: "after", - toMiddleware: "retryMiddleware", -}; -const getHttpSigningPlugin = (config) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpSigningMiddleware(), httpSigningMiddlewareOptions); - }, -}); - -const normalizeProvider = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; -}; - -const 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 undefined; - }; -} -const get = (fromObject, path) => { - let cursor = fromObject; - const pathComponents = path.split("."); - for (const step of pathComponents) { - if (!cursor || typeof cursor !== "object") { - return undefined; - } - 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, value] of Object.entries(config)) { - 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 = protocolHttp.HttpRequest.clone(httpRequest); - if (signingProperties.in === types.HttpApiKeyAuthLocation.QUERY) { - clonedRequest.query[signingProperties.name] = identity.apiKey; - } - else if (signingProperties.in === types.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 = protocolHttp.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; - } -} - -const createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired(identity) { - return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs; -}; -const EXPIRATION_MS = 300_000; -const isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); -const doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined; -const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => { - if (provider === undefined) { - return undefined; - } - 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; - }; -}; - -Object.defineProperty(exports, "requestBuilder", ({ - enumerable: true, - get: function () { return protocols.requestBuilder; } -})); -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.getSmithyContext = getSmithyContext; -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; - - -/***/ }), - -/***/ 20695: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var serde = __nccwpck_require__(99628); -var utilUtf8 = __nccwpck_require__(60791); -var protocols = __nccwpck_require__(97332); -var protocolHttp = __nccwpck_require__(17898); -var utilBodyLengthBrowser = __nccwpck_require__(24192); -var schema = __nccwpck_require__(79724); -var utilMiddleware = __nccwpck_require__(56182); -var utilBase64 = __nccwpck_require__(96039); - -const majorUint64 = 0; -const majorNegativeInt64 = 1; -const majorUnstructuredByteString = 2; -const majorUtf8String = 3; -const majorList = 4; -const majorMap = 5; -const majorTag = 6; -const majorSpecial = 7; -const specialFalse = 20; -const specialTrue = 21; -const specialNull = 22; -const specialUndefined = 23; -const extendedOneByte = 24; -const extendedFloat16 = 25; -const extendedFloat32 = 26; -const extendedFloat64 = 27; -const minorIndefinite = 31; -function alloc(size) { - return typeof Buffer !== "undefined" ? Buffer.alloc(size) : new Uint8Array(size); -} -const tagSymbol = Symbol("@smithy/core/cbor::tagSymbol"); -function tag(data) { - data[tagSymbol] = true; - return data; -} - -const USE_TEXT_DECODER = typeof TextDecoder !== "undefined"; -const USE_BUFFER$1 = typeof Buffer !== "undefined"; -let payload = alloc(0); -let dataView$1 = new DataView(payload.buffer, payload.byteOffset, payload.byteLength); -const textDecoder = USE_TEXT_DECODER ? new TextDecoder() : null; -let _offset = 0; -function setPayload(bytes) { - payload = bytes; - dataView$1 = new DataView(payload.buffer, payload.byteOffset, payload.byteLength); -} -function decode(at, to) { - if (at >= to) { - throw new Error("unexpected end of (decode) payload."); - } - const major = (payload[at] & 0b1110_0000) >> 5; - const minor = payload[at] & 0b0001_1111; - switch (major) { - case majorUint64: - case majorNegativeInt64: - case majorTag: - let unsignedInt; - let offset; - if (minor < 24) { - unsignedInt = minor; - offset = 1; - } - else { - switch (minor) { - case extendedOneByte: - case extendedFloat16: - case extendedFloat32: - case extendedFloat64: - const countLength = minorValueToArgumentLength[minor]; - const countOffset = (countLength + 1); - offset = countOffset; - if (to - at < countOffset) { - throw new Error(`countLength ${countLength} greater than remaining buf len.`); - } - const countIndex = at + 1; - if (countLength === 1) { - unsignedInt = payload[countIndex]; - } - else if (countLength === 2) { - unsignedInt = dataView$1.getUint16(countIndex); - } - else if (countLength === 4) { - unsignedInt = dataView$1.getUint32(countIndex); - } - else { - unsignedInt = dataView$1.getBigUint64(countIndex); - } - break; - default: - throw new Error(`unexpected minor value ${minor}.`); - } - } - if (major === majorUint64) { - _offset = offset; - return castBigInt(unsignedInt); - } - else if (major === majorNegativeInt64) { - let negativeInt; - if (typeof unsignedInt === "bigint") { - negativeInt = BigInt(-1) - unsignedInt; - } - else { - negativeInt = -1 - unsignedInt; - } - _offset = offset; - return castBigInt(negativeInt); - } - else { - if (minor === 2 || minor === 3) { - const length = decodeCount(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[i]); - } - _offset = offset + _offset + length; - return minor === 3 ? -b - BigInt(1) : b; - } - else if (minor === 4) { - const decimalFraction = decode(at + offset, to); - const [exponent, mantissa] = decimalFraction; - const normalizer = mantissa < 0 ? -1 : 1; - const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + String(BigInt(normalizer) * BigInt(mantissa)); - let numericString; - const sign = mantissa < 0 ? "-" : ""; - 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; - _offset = offset + _offset; - return serde.nv(numericString); - } - else { - const value = decode(at + offset, to); - const valueOffset = _offset; - _offset = offset + valueOffset; - return tag({ tag: castBigInt(unsignedInt), value }); - } - } - case majorUtf8String: - case majorMap: - case majorList: - case majorUnstructuredByteString: - 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); - } - } - else { - switch (major) { - 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 bytesToUtf8(bytes, at, to) { - if (USE_BUFFER$1 && bytes.constructor?.name === "Buffer") { - return bytes.toString("utf-8", at, to); - } - if (textDecoder) { - return textDecoder.decode(bytes.subarray(at, to)); - } - return utilUtf8.toUtf8(bytes.subarray(at, to)); -} -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; -} -const minorValueToArgumentLength = { - [extendedOneByte]: 1, - [extendedFloat16]: 2, - [extendedFloat32]: 4, - [extendedFloat64]: 8, -}; -function bytesToFloat16(a, b) { - const sign = a >> 7; - const exponent = (a & 0b0111_1100) >> 2; - const fraction = ((a & 0b0000_0011) << 8) | b; - const scalar = sign === 0 ? 1 : -1; - let exponentComponent; - let summation; - if (exponent === 0b00000) { - if (fraction === 0b00000_00000) { - return 0; - } - else { - exponentComponent = Math.pow(2, 1 - 15); - summation = 0; - } - } - else if (exponent === 0b11111) { - if (fraction === 0b00000_00000) { - return scalar * Infinity; - } - else { - return NaN; - } - } - else { - exponentComponent = Math.pow(2, exponent - 15); - summation = 1; - } - summation += fraction / 1024; - return scalar * (exponentComponent * summation); -} -function decodeCount(at, to) { - const minor = payload[at] & 0b0001_1111; - if (minor < 24) { - _offset = 1; - return minor; - } - if (minor === extendedOneByte || - minor === extendedFloat16 || - minor === extendedFloat32 || - minor === extendedFloat64) { - const countLength = minorValueToArgumentLength[minor]; - _offset = (countLength + 1); - if (to - at < _offset) { - throw new Error(`countLength ${countLength} greater than remaining buf len.`); - } - const countIndex = at + 1; - if (countLength === 1) { - return payload[countIndex]; - } - else if (countLength === 2) { - return dataView$1.getUint16(countIndex); - } - else if (countLength === 4) { - return dataView$1.getUint32(countIndex); - } - return demote(dataView$1.getBigUint64(countIndex)); - } - throw new Error(`unexpected minor value ${minor}.`); -} -function decodeUtf8String(at, to) { - const length = decodeCount(at, to); - const offset = _offset; - at += offset; - if (to - at < length) { - throw new Error(`string len ${length} greater than remaining buf len.`); - } - const value = bytesToUtf8(payload, at, at + length); - _offset = offset + length; - return value; -} -function decodeUtf8StringIndefinite(at, to) { - at += 1; - const vector = []; - for (const base = at; at < to;) { - if (payload[at] === 0b1111_1111) { - const data = alloc(vector.length); - data.set(vector, 0); - _offset = at - base + 2; - return bytesToUtf8(data, 0, data.length); - } - const major = (payload[at] & 0b1110_0000) >> 5; - const minor = payload[at] & 0b0001_1111; - if (major !== majorUtf8String) { - throw new Error(`unexpected major type ${major} in indefinite string.`); - } - 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 decodeUnstructuredByteString(at, to) { - const length = decodeCount(at, to); - const offset = _offset; - at += offset; - if (to - at < length) { - throw new Error(`unstructured byte string len ${length} greater than remaining buf len.`); - } - const value = payload.subarray(at, at + length); - _offset = offset + length; - return value; -} -function decodeUnstructuredByteStringIndefinite(at, to) { - at += 1; - const vector = []; - for (const base = at; at < to;) { - if (payload[at] === 0b1111_1111) { - const data = alloc(vector.length); - data.set(vector, 0); - _offset = at - base + 2; - return data; - } - const major = (payload[at] & 0b1110_0000) >> 5; - const minor = payload[at] & 0b0001_1111; - if (major !== majorUnstructuredByteString) { - throw new Error(`unexpected major type ${major} in indefinite string.`); - } - 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 decodeList(at, to) { - const listDataLength = decodeCount(at, to); - const offset = _offset; - at += offset; - const base = at; - const list = Array(listDataLength); - for (let i = 0; i < listDataLength; ++i) { - const item = decode(at, to); - const itemOffset = _offset; - list[i] = item; - at += itemOffset; - } - _offset = offset + (at - base); - return list; -} -function decodeListIndefinite(at, to) { - at += 1; - const list = []; - for (const base = at; at < to;) { - if (payload[at] === 0b1111_1111) { - _offset = at - base + 2; - return list; - } - const item = decode(at, to); - const n = _offset; - at += n; - list.push(item); - } - throw new Error("expected break marker."); -} -function decodeMap(at, to) { - const mapDataLength = decodeCount(at, to); - const offset = _offset; - at += offset; - const base = at; - const map = {}; - for (let i = 0; i < mapDataLength; ++i) { - if (at >= to) { - throw new Error("unexpected end of map payload."); - } - const major = (payload[at] & 0b1110_0000) >> 5; - if (major !== majorUtf8String) { - throw new Error(`unexpected major type ${major} for map key at index ${at}.`); - } - const key = decode(at, to); - at += _offset; - const value = decode(at, to); - at += _offset; - map[key] = value; - } - _offset = offset + (at - base); - return map; -} -function decodeMapIndefinite(at, to) { - at += 1; - const base = at; - const map = {}; - for (; at < to;) { - if (at >= to) { - throw new Error("unexpected end of map payload."); - } - if (payload[at] === 0b1111_1111) { - _offset = at - base + 2; - return map; - } - const major = (payload[at] & 0b1110_0000) >> 5; - if (major !== majorUtf8String) { - throw new Error(`unexpected major type ${major} for map key.`); - } - const key = decode(at, to); - at += _offset; - const value = decode(at, to); - at += _offset; - map[key] = value; - } - throw new Error("expected break marker."); -} -function decodeSpecial(at, to) { - const minor = payload[at] & 0b0001_1111; - 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(payload[at + 1], payload[at + 2]); - case extendedFloat32: - if (to - at < 5) { - throw new Error("incomplete float32 at end of buf."); - } - _offset = 5; - return dataView$1.getFloat32(at + 1); - case extendedFloat64: - if (to - at < 9) { - throw new Error("incomplete float64 at end of buf."); - } - _offset = 9; - return dataView$1.getFloat64(at + 1); - default: - throw new Error(`unexpected minor value ${minor}.`); - } -} -function castBigInt(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; -} - -const USE_BUFFER = typeof Buffer !== "undefined"; -const initialSize = 2048; -let data = alloc(initialSize); -let dataView = new DataView(data.buffer, data.byteOffset, data.byteLength); -let cursor = 0; -function ensureSpace(bytes) { - const remaining = data.byteLength - cursor; - if (remaining < bytes) { - if (cursor < 16_000_000) { - resize(Math.max(data.byteLength * 4, data.byteLength + bytes)); - } - else { - resize(data.byteLength + bytes + 16_000_000); - } - } -} -function toUint8Array() { - const out = alloc(cursor); - out.set(data.subarray(0, cursor), 0); - cursor = 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 = new DataView(data.buffer, data.byteOffset, data.byteLength); -} -function encodeHeader(major, value) { - if (value < 24) { - data[cursor++] = (major << 5) | value; - } - else if (value < 1 << 8) { - data[cursor++] = (major << 5) | 24; - data[cursor++] = value; - } - else if (value < 1 << 16) { - data[cursor++] = (major << 5) | extendedFloat16; - dataView.setUint16(cursor, value); - cursor += 2; - } - else if (value < 2 ** 32) { - data[cursor++] = (major << 5) | extendedFloat32; - dataView.setUint32(cursor, value); - cursor += 4; - } - else { - data[cursor++] = (major << 5) | extendedFloat64; - dataView.setBigUint64(cursor, typeof value === "bigint" ? value : BigInt(value)); - cursor += 8; - } -} -function encode(_input) { - const encodeStack = [_input]; - while (encodeStack.length) { - const input = encodeStack.pop(); - ensureSpace(typeof input === "string" ? input.length * 4 : 64); - if (typeof input === "string") { - if (USE_BUFFER) { - encodeHeader(majorUtf8String, Buffer.byteLength(input)); - cursor += data.write(input, cursor); - } - else { - const bytes = utilUtf8.fromUtf8(input); - encodeHeader(majorUtf8String, bytes.byteLength); - data.set(bytes, cursor); - cursor += bytes.byteLength; - } - continue; - } - else if (typeof input === "number") { - if (Number.isInteger(input)) { - const nonNegative = input >= 0; - const major = nonNegative ? majorUint64 : majorNegativeInt64; - const value = nonNegative ? input : -input - 1; - if (value < 24) { - data[cursor++] = (major << 5) | value; - } - else if (value < 256) { - data[cursor++] = (major << 5) | 24; - data[cursor++] = value; - } - else if (value < 65536) { - data[cursor++] = (major << 5) | extendedFloat16; - data[cursor++] = value >> 8; - data[cursor++] = value; - } - else if (value < 4294967296) { - data[cursor++] = (major << 5) | extendedFloat32; - dataView.setUint32(cursor, value); - cursor += 4; - } - else { - data[cursor++] = (major << 5) | extendedFloat64; - dataView.setBigUint64(cursor, BigInt(value)); - cursor += 8; - } - continue; - } - data[cursor++] = (majorSpecial << 5) | extendedFloat64; - dataView.setFloat64(cursor, input); - cursor += 8; - continue; - } - else if (typeof input === "bigint") { - const nonNegative = input >= 0; - const major = nonNegative ? majorUint64 : majorNegativeInt64; - const value = nonNegative ? input : -input - BigInt(1); - const n = Number(value); - if (n < 24) { - data[cursor++] = (major << 5) | n; - } - else if (n < 256) { - data[cursor++] = (major << 5) | 24; - data[cursor++] = n; - } - else if (n < 65536) { - data[cursor++] = (major << 5) | extendedFloat16; - data[cursor++] = n >> 8; - data[cursor++] = n & 0b1111_1111; - } - else if (n < 4294967296) { - data[cursor++] = (major << 5) | extendedFloat32; - dataView.setUint32(cursor, n); - cursor += 4; - } - else if (value < BigInt("18446744073709551616")) { - data[cursor++] = (major << 5) | extendedFloat64; - dataView.setBigUint64(cursor, value); - cursor += 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); - data[cursor++] = nonNegative ? 0b110_00010 : 0b110_00011; - if (USE_BUFFER) { - encodeHeader(majorUnstructuredByteString, Buffer.byteLength(bigIntBytes)); - } - else { - encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength); - } - data.set(bigIntBytes, cursor); - cursor += bigIntBytes.byteLength; - } - continue; - } - else if (input === null) { - data[cursor++] = (majorSpecial << 5) | specialNull; - continue; - } - else if (typeof input === "boolean") { - data[cursor++] = (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)) { - for (let i = input.length - 1; i >= 0; --i) { - encodeStack.push(input[i]); - } - encodeHeader(majorList, input.length); - continue; - } - else if (typeof input.byteLength === "number") { - ensureSpace(input.length * 2); - encodeHeader(majorUnstructuredByteString, input.length); - data.set(input, cursor); - cursor += input.byteLength; - continue; - } - else if (typeof input === "object") { - if (input instanceof serde.NumericValue) { - const decimalIndex = input.string.indexOf("."); - const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1; - const mantissa = BigInt(input.string.replace(".", "")); - data[cursor++] = 0b110_00100; - encodeStack.push(mantissa); - encodeStack.push(exponent); - encodeHeader(majorList, 2); - continue; - } - if (input[tagSymbol]) { - if ("tag" in input && "value" in input) { - encodeStack.push(input.value); - encodeHeader(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); - for (let i = keys.length - 1; i >= 0; --i) { - const key = keys[i]; - encodeStack.push(input[key]); - encodeStack.push(key); - } - encodeHeader(majorMap, keys.length); - continue; - } - throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`); - } -} - -const cbor = { - deserialize(payload) { - setPayload(payload); - return decode(0, payload.length); - }, - serialize(input) { - try { - encode(input); - return toUint8Array(); - } - catch (e) { - toUint8Array(); - throw e; - } - }, - resizeEncodingBuffer(size) { - resize(size); - }, -}; - -const parseCborBody = (streamBody, context) => { - return protocols.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 {}; - }); -}; -const dateToTag = (date) => { - return tag({ - tag: 1, - value: date.getTime() / 1000, - }); -}; -const parseCborErrorBody = async (errorBody, context) => { - const value = await parseCborBody(errorBody, context); - value.message = value.message ?? value.Message; - return value; -}; -const 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"]); - } - const codeKey = Object.keys(data).find((key) => key.toLowerCase() === "code"); - if (codeKey && data[codeKey] !== undefined) { - return sanitizeErrorCode(data[codeKey]); - } -}; -const checkCborResponse = (response) => { - if (String(response.headers["smithy-protocol"]).toLowerCase() !== "rpc-v2-cbor") { - throw new Error("Malformed RPCv2 CBOR response, status: " + response.statusCode); - } -}; -const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => { - const { hostname, protocol = "https", port, path: basePath } = await context.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 (body !== undefined) { - contents.body = body; - try { - contents.headers["content-length"] = String(utilBodyLengthBrowser.calculateBodyLength(body)); - } - catch (e) { } - } - return new protocolHttp.HttpRequest(contents); -}; - -class CborCodec extends protocols.SerdeContext { - createSerializer() { - const serializer = new CborShapeSerializer(); - serializer.setSerdeContext(this.serdeContext); - return serializer; - } - createDeserializer() { - const deserializer = new CborShapeDeserializer(); - deserializer.setSerdeContext(this.serdeContext); - return deserializer; - } -} -class CborShapeSerializer extends protocols.SerdeContext { - value; - write(schema, value) { - this.value = this.serialize(schema, value); - } - serialize(schema$1, source) { - const ns = schema.NormalizedSchema.of(schema$1); - if (source == null) { - if (ns.isIdempotencyToken()) { - return serde.generateIdempotencyToken(); - } - return source; - } - if (ns.isBlobSchema()) { - if (typeof source === "string") { - return (this.serdeContext?.base64Decoder ?? utilBase64.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 of Object.keys(sourceObject)) { - 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; - } - } - } - else if (ns.isDocumentSchema()) { - for (const key of Object.keys(sourceObject)) { - newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]); - } - } - return newObject; - } - return source; - } - flush() { - const buffer = cbor.serialize(this.value); - this.value = undefined; - return buffer; - } -} -class CborShapeDeserializer extends protocols.SerdeContext { - read(schema, bytes) { - const data = cbor.deserialize(bytes); - return this.readValue(schema, data); - } - readValue(_schema, value) { - const ns = schema.NormalizedSchema.of(_schema); - if (ns.isTimestampSchema() && typeof value === "number") { - return serde._parseEpochTimestamp(value); - } - if (ns.isBlobSchema()) { - if (typeof value === "string") { - return (this.serdeContext?.base64Decoder ?? utilBase64.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 === "function" || 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(); - const sparse = !!ns.getMergedTraits().sparse; - for (const item of value) { - const itemValue = this.readValue(memberSchema, item); - if (itemValue != null || sparse) { - newArray.push(itemValue); - } - } - return newArray; - } - const newObject = {}; - if (ns.isMapSchema()) { - const sparse = !!ns.getMergedTraits().sparse; - const targetSchema = ns.getValueSchema(); - for (const key of Object.keys(value)) { - const itemValue = this.readValue(targetSchema, value[key]); - if (itemValue != null || sparse) { - newObject[key] = itemValue; - } - } - } - else if (ns.isStructSchema()) { - for (const [key, memberSchema] of ns.structIterator()) { - newObject[key] = this.readValue(memberSchema, value[key]); - } - } - return newObject; - } - else { - return value; - } - } -} - -class SmithyRpcV2CborProtocol extends protocols.RpcProtocol { - codec = new CborCodec(); - serializer = this.codec.createSerializer(); - deserializer = this.codec.createDeserializer(); - constructor({ defaultNamespace }) { - super({ defaultNamespace }); - } - 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 (schema.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(); - } - try { - request.headers["content-length"] = String(request.body.byteLength); - } - catch (e) { } - } - const { service, operation } = utilMiddleware.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"; - let namespace = this.options.defaultNamespace; - if (errorName.includes("#")) { - [namespace] = errorName.split("#"); - } - const errorMetadata = { - $metadata: metadata, - $response: response, - $fault: response.statusCode <= 500 ? "client" : "server", - }; - const registry = schema.TypeRegistry.for(namespace); - let errorSchema; - try { - errorSchema = registry.getSchema(errorName); - } - catch (e) { - if (dataObject.Message) { - dataObject.message = dataObject.Message; - } - const synthetic = schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace); - const baseExceptionSchema = synthetic.getBaseException(); - if (baseExceptionSchema) { - const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema); - throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject); - } - throw Object.assign(new Error(errorName), errorMetadata, dataObject); - } - const ns = schema.NormalizedSchema.of(errorSchema); - const ErrorCtor = registry.getErrorCtor(errorSchema); - const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const exception = new ErrorCtor(message); - 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"; - } -} - -exports.CborCodec = CborCodec; -exports.CborShapeDeserializer = CborShapeDeserializer; -exports.CborShapeSerializer = CborShapeSerializer; -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; - - -/***/ }), - -/***/ 97332: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilStream = __nccwpck_require__(99542); -var schema = __nccwpck_require__(79724); -var serde = __nccwpck_require__(99628); -var protocolHttp = __nccwpck_require__(17898); -var utilBase64 = __nccwpck_require__(96039); -var utilUtf8 = __nccwpck_require__(60791); - -const collectBody = async (streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return utilStream.Uint8ArrayBlobAdapter.mutate(streamBody); - } - if (!streamBody) { - return utilStream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); - } - const fromContext = context.streamCollector(streamBody); - return utilStream.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; - constructor(options) { - super(); - this.options = options; - } - getRequestType() { - return protocolHttp.HttpRequest; - } - getResponseType() { - return protocolHttp.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 || void 0; - request.username = endpoint.url.username || void 0; - request.password = endpoint.url.password || void 0; - if (!request.query) { - request.query = {}; - } - for (const [k, v] of endpoint.url.searchParams.entries()) { - request.query[k] = v; - } - 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, - }; - return request; - } - } - setHostPrefix(request, operationSchema, input) { - const inputNs = schema.NormalizedSchema.of(operationSchema.input); - const opTraits = schema.translateTraits(operationSchema.traits ?? {}); - if (opTraits.endpoint) { - let hostPrefix = opTraits.endpoint?.[0]; - if (typeof hostPrefix === "string") { - const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel); - for (const [name] of hostLabelInputs) { - 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; - } - } - } - 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 } = await __nccwpck_require__.e(/* import() */ 333).then(__nccwpck_require__.t.bind(__nccwpck_require__, 13333, 19)); - return new EventStreamSerde({ - marshaller: this.getEventStreamMarshaller(), - serializer: this.serializer, - deserializer: this.deserializer, - serdeContext: this.serdeContext, - defaultContentType: this.getDefaultContentType(), - }); - } - 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 ?? {}), - }; - const serializer = this.serializer; - const query = {}; - const headers = {}; - const endpoint = await context.endpoint(); - const ns = schema.NormalizedSchema.of(operationSchema?.input); - const schema$1 = ns.getSchema(); - let hasNonHttpBindingMember = false; - let payload; - const request = new protocolHttp.HttpRequest({ - protocol: "", - hostname: "", - port: undefined, - path: "", - fragment: undefined, - query: query, - headers: headers, - body: undefined, - }); - if (endpoint) { - this.updateServiceEndpoint(request, endpoint); - this.setHostPrefix(request, operationSchema, input); - const opTraits = schema.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 ?? ""); - Object.assign(query, Object.fromEntries(traitSearchParams)); - } - } - for (const [memberName, memberNs] of ns.structIterator()) { - const memberTraits = memberNs.getMergedTraits() ?? {}; - const inputMemberValue = input[memberName]; - if (inputMemberValue == null) { - 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(); - } - delete input[memberName]; - } - 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)); - } - delete input[memberName]; - } - else if (memberTraits.httpHeader) { - serializer.write(memberNs, inputMemberValue); - headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush()); - delete input[memberName]; - } - else if (typeof memberTraits.httpPrefixHeaders === "string") { - for (const [key, val] of Object.entries(inputMemberValue)) { - const amalgam = memberTraits.httpPrefixHeaders + key; - serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val); - headers[amalgam.toLowerCase()] = serializer.flush(); - } - delete input[memberName]; - } - else if (memberTraits.httpQuery || memberTraits.httpQueryParams) { - this.serializeQuery(memberNs, inputMemberValue, query); - delete input[memberName]; - } - else { - hasNonHttpBindingMember = true; - } - } - if (hasNonHttpBindingMember && input) { - serializer.write(schema$1, 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, val] of Object.entries(data)) { - if (!(key in query)) { - 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 = schema.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) { - 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) { - dataObject[member] = dataFromBody[member]; - } - } - } - dataObject.$metadata = this.deserializeMetadata(response); - return dataObject; - } - async deserializeHttpMessage(schema$1, context, response, arg4, arg5) { - let dataObject; - if (arg4 instanceof Set) { - dataObject = arg5; - } - else { - dataObject = arg4; - } - const deserializer = this.deserializer; - const ns = schema.NormalizedSchema.of(schema$1); - const nonHttpBindingMembers = []; - for (const [memberName, memberSchema] of ns.structIterator()) { - const memberTraits = memberSchema.getMemberTraits(); - if (memberTraits.httpPayload) { - const isStreaming = memberSchema.isStreaming(); - if (isStreaming) { - const isEventStream = memberSchema.isStructSchema(); - if (isEventStream) { - dataObject[memberName] = await this.deserializeEventStream({ - response, - responseSchema: ns, - }); - } - else { - dataObject[memberName] = utilStream.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 (null != value) { - if (memberSchema.isListSchema()) { - const headerListValueSchema = memberSchema.getValueSchema(); - headerListValueSchema.getMergedTraits().httpHeader = key; - let sections; - if (headerListValueSchema.isTimestampSchema() && - headerListValueSchema.getSchema() === 4) { - sections = serde.splitEvery(value, ",", 2); - } - else { - sections = serde.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, value] of Object.entries(response.headers)) { - if (header.startsWith(memberTraits.httpPrefixHeaders)) { - 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); - } - } - 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 = schema.NormalizedSchema.of(operationSchema?.input); - const schema$1 = ns.getSchema(); - let payload; - const request = new protocolHttp.HttpRequest({ - protocol: "", - hostname: "", - port: undefined, - path: "/", - fragment: undefined, - query: query, - headers: headers, - body: undefined, - }); - if (endpoint) { - this.updateServiceEndpoint(request, endpoint); - this.setHostPrefix(request, operationSchema, input); - } - const _input = { - ...input, - }; - if (input) { - const eventStreamMember = ns.getEventStreamMember(); - if (eventStreamMember) { - if (_input[eventStreamMember]) { - const initialRequest = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - if (memberName !== eventStreamMember && _input[memberName]) { - serializer.write(memberSchema, _input[memberName]); - initialRequest[memberName] = serializer.flush(); - } - } - payload = await this.serializeEventStream({ - eventStream: _input[eventStreamMember], - requestSchema: ns, - initialRequest, - }); - } - } - else { - serializer.write(schema$1, _input); - payload = serializer.flush(); - } - } - 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 = schema.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) { - 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; - } -} - -const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { - if (input != null && input[memberName] !== undefined) { - const labelValue = labelValueProvider(); - if (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 protocolHttp.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 = schema.NormalizedSchema.of(_schema); - if (ns.isListSchema()) { - return serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item)); - } - if (ns.isBlobSchema()) { - return (this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(data); - } - if (ns.isTimestampSchema()) { - const format = determineTimestampFormat(ns, this.settings); - switch (format) { - case 5: - return serde._parseRfc3339DateTimeWithOffset(data); - case 6: - return serde._parseRfc7231DateTime(data); - case 7: - return serde._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 = serde.LazyJsonString.from(intermediateValue); - } - return intermediateValue; - } - } - if (ns.isNumericSchema()) { - return Number(data); - } - if (ns.isBigIntegerSchema()) { - return BigInt(data); - } - if (ns.isBigDecimalSchema()) { - return new serde.NumericValue(data, "bigDecimal"); - } - if (ns.isBooleanSchema()) { - return String(data).toLowerCase() === "true"; - } - return data; - } - base64ToUtf8(base64String) { - return (this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8)((this.serdeContext?.base64Decoder ?? utilBase64.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$1, data) { - const ns = schema.NormalizedSchema.of(schema$1); - const traits = ns.getMergedTraits(); - const toString = this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8; - if (traits.httpHeader || traits.httpResponseCode) { - return this.stringDeserializer.read(ns, toString(data)); - } - if (traits.httpPayload) { - if (ns.isBlobSchema()) { - const toBytes = this.serdeContext?.utf8Decoder ?? utilUtf8.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$1, value) { - const ns = schema.NormalizedSchema.of(schema$1); - 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 = serde.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 ?? utilBase64.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 : serde.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 = serde.LazyJsonString.from(intermediateValue); - } - if (ns.getMergedTraits().httpHeader) { - this.stringBuffer = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(intermediateValue.toString()); - return; - } - } - this.stringBuffer = value; - break; - default: - 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$1, value) { - const ns = schema.NormalizedSchema.of(schema$1); - 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(); - } -} - -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.collectBody = collectBody; -exports.determineTimestampFormat = determineTimestampFormat; -exports.extendedEncodeURIComponent = extendedEncodeURIComponent; -exports.requestBuilder = requestBuilder; -exports.resolvedPath = resolvedPath; - - -/***/ }), - -/***/ 79724: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var protocolHttp = __nccwpck_require__(17898); -var utilMiddleware = __nccwpck_require__(56182); - -const deref = (schemaRef) => { - if (typeof schemaRef === "function") { - return schemaRef(); - } - return schemaRef; -}; - -const operation = (namespace, name, traits, input, output) => ({ - name, - namespace, - traits, - input, - output, -}); - -const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { - const { response } = await next(args); - const { operationSchema } = utilMiddleware.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, - }); - 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 += "\n " + hint; - } - catch (e) { - 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 (protocolHttp.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 (e) { - } - } - throw error; - } -}; -const findHeader = (pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; -}; - -const schemaSerializationMiddleware = (config) => (next, context) => async (args) => { - const { operationSchema } = utilMiddleware.getSmithyContext(context); - const [, ns, n, t, i, o] = operationSchema ?? []; - const endpoint = context.endpointV2?.url && config.urlParser - ? async () => config.urlParser(context.endpointV2.url) - : config.endpoint; - const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, { - ...config, - ...context, - endpoint, - }); - return next({ - ...args, - request, - }); -}; - -const deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true, -}; -const 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"); - name; - traits; - valueSchema; - symbol = ListSchema.symbol; -} -const list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), { - name, - namespace, - traits, - valueSchema, -}); - -class MapSchema extends Schema { - static symbol = Symbol.for("@smithy/map"); - name; - traits; - keySchema; - valueSchema; - symbol = MapSchema.symbol; -} -const 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"); - name; - traits; - input; - output; - symbol = OperationSchema.symbol; -} -const 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"); - name; - traits; - memberNames; - memberList; - symbol = StructureSchema.symbol; -} -const 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; -} -const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { - name, - namespace, - traits, - memberNames, - memberList, - ctor: null, -}); - -function translateTraits(indicator) { - if (typeof indicator === "object") { - return indicator; - } - indicator = indicator | 0; - 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 traits; -} - -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 = void 0; - 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 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)}.`); - } - return new NormalizedSchema(sc); - } - getSchema() { - const sc = this.schema; - if (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 <= 0b1111_1111 - : sc[0] === 2; - } - isStructSchema() { - const sc = this.getSchema(); - return (sc[0] === 3 || - sc[0] === -3); - } - 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() { - const match = (traits) => (traits & 0b0100) === 0b0100 || - !!traits?.idempotencyToken; - const { normalizedTraits, traits, memberTraits } = this; - return match(normalizedTraits) || match(traits) || match(memberTraits); - } - 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" - ? 0b0011_1111 & sc - : sc && typeof sc === "object" && (isMap || isList) - ? sc[3 + sc[0]] - : isDoc - ? 15 - : void 0; - 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 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(); - for (let i = 0; i < struct[4].length; ++i) { - yield [struct[4][i], member([struct[5][i], 0], struct[4][i])]; - } - } -} -function member(memberSchema, memberName) { - if (memberSchema instanceof NormalizedSchema) { - return Object.assign(memberSchema, { - memberName, - _isMemberSchema: true, - }); - } - const internalCtorAccess = NormalizedSchema; - return new internalCtorAccess(memberSchema, memberName); -} -const isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2; -const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5; - -class SimpleSchema extends Schema { - static symbol = Symbol.for("@smithy/sim"); - name; - schemaRef; - traits; - symbol = SimpleSchema.symbol; -} -const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef, -}); -const simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef, -}); - -const SCHEMA = { - BLOB: 0b0001_0101, - STREAMING_BLOB: 0b0010_1010, - BOOLEAN: 0b0000_0010, - STRING: 0b0000_0000, - NUMERIC: 0b0000_0001, - BIG_INTEGER: 0b0001_0001, - BIG_DECIMAL: 0b0001_0011, - DOCUMENT: 0b0000_1111, - TIMESTAMP_DEFAULT: 0b0000_0100, - TIMESTAMP_DATE_TIME: 0b0000_0101, - TIMESTAMP_HTTP_DATE: 0b0000_0110, - TIMESTAMP_EPOCH_SECONDS: 0b0000_0111, - LIST_MODIFIER: 0b0100_0000, - MAP_MODIFIER: 0b1000_0000, -}; - -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); - } - register(shapeId, schema) { - const qualifiedName = this.normalizeShapeId(shapeId); - const registry = TypeRegistry.for(qualifiedName.split("#")[0]); - registry.schemas.set(qualifiedName, schema); - } - getSchema(shapeId) { - const id = this.normalizeShapeId(shapeId); - if (!this.schemas.has(id)) { - throw new Error(`@smithy/core/schema - schema not found for ${id}`); - } - return this.schemas.get(id); - } - registerError(es, ctor) { - const $error = es; - const registry = TypeRegistry.for($error[1]); - registry.schemas.set($error[1] + "#" + $error[2], $error); - registry.exceptions.set($error, ctor); - } - getErrorCtor(es) { - const $error = es; - const registry = TypeRegistry.for($error[1]); - return registry.exceptions.get($error); - } - 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 undefined; - } - find(predicate) { - return [...this.schemas.values()].find(predicate); - } - 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.struct = struct; -exports.translateTraits = translateTraits; - - -/***/ }), - -/***/ 99628: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var uuid = __nccwpck_require__(90266); - -const copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source; - -const parseBoolean = (value) => { - switch (value) { - case "true": - return true; - case "false": - return false; - default: - throw new Error(`Unable to parse boolean value "${value}"`); - } -}; -const expectBoolean = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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}`); -}; -const expectNumber = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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}`); -}; -const MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); -const 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; -}; -const expectLong = (value) => { - if (value === null || value === undefined) { - return undefined; - } - if (Number.isInteger(value) && !Number.isNaN(value)) { - return value; - } - throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); -}; -const expectInt = expectLong; -const expectInt32 = (value) => expectSizedInt(value, 32); -const expectShort = (value) => expectSizedInt(value, 16); -const expectByte = (value) => expectSizedInt(value, 8); -const 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; -}; -const 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]; - } -}; -const 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; -}; -const expectObject = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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}`); -}; -const expectString = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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}`); -}; -const expectUnion = (value) => { - if (value === null || value === undefined) { - return undefined; - } - const asObject = expectObject(value); - const setKeys = Object.entries(asObject) - .filter(([, v]) => v != null) - .map(([k]) => 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; -}; -const strictParseDouble = (value) => { - if (typeof value == "string") { - return expectNumber(parseNumber(value)); - } - return expectNumber(value); -}; -const strictParseFloat = strictParseDouble; -const strictParseFloat32 = (value) => { - if (typeof value == "string") { - return expectFloat32(parseNumber(value)); - } - return expectFloat32(value); -}; -const NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; -const 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); -}; -const limitedParseDouble = (value) => { - if (typeof value == "string") { - return parseFloatString(value); - } - return expectNumber(value); -}; -const handleFloat = limitedParseDouble; -const limitedParseFloat = limitedParseDouble; -const limitedParseFloat32 = (value) => { - if (typeof value == "string") { - return parseFloatString(value); - } - return expectFloat32(value); -}; -const 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}`); - } -}; -const strictParseLong = (value) => { - if (typeof value === "string") { - return expectLong(parseNumber(value)); - } - return expectLong(value); -}; -const strictParseInt = strictParseLong; -const strictParseInt32 = (value) => { - if (typeof value === "string") { - return expectInt32(parseNumber(value)); - } - return expectInt32(value); -}; -const strictParseShort = (value) => { - if (typeof value === "string") { - return expectShort(parseNumber(value)); - } - return expectShort(value); -}; -const strictParseByte = (value) => { - if (typeof value === "string") { - return expectByte(parseNumber(value)); - } - return expectByte(value); -}; -const stackTraceWarning = (message) => { - return String(new TypeError(message).stack || message) - .split("\n") - .slice(0, 5) - .filter((s) => !s.includes("stackTraceWarning")) - .join("\n"); -}; -const logger = { - warn: console.warn, -}; - -const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; -const 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`; -} -const RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); -const parseRfc3339DateTime = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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 }); -}; -const 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])$/); -const parseRfc3339DateTimeWithOffset = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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; -}; -const 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$/); -const 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$/); -const 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})$/); -const parseRfc7231DateTime = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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"); -}; -const parseEpochTimestamp = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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)); -}; -const 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))); -}; -const 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; -}; -const FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000; -const 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; -}; -const parseMonthByShortName = (value) => { - const monthIdx = MONTHS.indexOf(value); - if (monthIdx < 0) { - throw new TypeError(`Invalid month: ${value}`); - } - return monthIdx + 1; -}; -const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -const 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}`); - } -}; -const isLeapYear = (year) => { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -}; -const 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; -}; -const parseMilliseconds = (value) => { - if (value === null || value === undefined) { - return 0; - } - return strictParseFloat32("0." + value) * 1000; -}; -const 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; -}; -const stripLeadingZeroes = (value) => { - let idx = 0; - while (idx < value.length - 1 && value.charAt(idx) === "0") { - idx++; - } - if (idx === 0) { - return value; - } - return value.slice(idx); -}; - -const 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; -} - -const ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`; -const mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`; -const time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`; -const date = `(\\d?\\d)`; -const year = `(\\d{4})`; -const RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/); -const IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`); -const RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`); -const ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`); -const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; -const _parseEpochTimestamp = (value) => { - if (value == null) { - return void 0; - } - 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)); -}; -const _parseRfc3339DateTimeWithOffset = (value) => { - if (value == null) { - return void 0; - } - 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.setUTCFullYear(Number(yearStr), Number(monthStr) - 1, Number(dayStr)); - date.setUTCHours(Number(hours)); - date.setUTCMinutes(Number(minutes)); - date.setUTCSeconds(Number(seconds)); - date.setUTCMilliseconds(Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0); - if (offsetStr.toUpperCase() != "Z") { - const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0]; - const scalar = sign === "-" ? 1 : -1; - date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000)); - } - return date; -}; -const _parseRfc7231DateTime = (value) => { - if (value == null) { - return void 0; - } - 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 date = new Date(); - date.setUTCFullYear(Number(year)); - date.setUTCMonth(months.indexOf(month)); - range(day, 1, 31); - date.setUTCDate(Number(day)); - range(hour, 0, 23); - date.setUTCHours(Number(hour)); - range(minute, 0, 59); - date.setUTCMinutes(Number(minute)); - range(second, 0, 60); - date.setUTCSeconds(Number(second)); - date.setUTCMilliseconds(fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0); - 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; -} - -const 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, '"'); - }); -}; - -const format = /^-?\d*(\.\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 must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`); - } - } - 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"); -} - -Object.defineProperty(exports, "generateIdempotencyToken", ({ - enumerable: true, - get: function () { return uuid.v4; } -})); -exports.LazyJsonString = LazyJsonString; -exports.NumericValue = NumericValue; -exports._parseEpochTimestamp = _parseEpochTimestamp; -exports._parseRfc3339DateTimeWithOffset = _parseRfc3339DateTimeWithOffset; -exports._parseRfc7231DateTime = _parseRfc7231DateTime; -exports.copyDocumentWithTransform = copyDocumentWithTransform; -exports.dateToUtcString = dateToUtcString; -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.handleFloat = handleFloat; -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.splitEvery = splitEvery; -exports.splitHeader = splitHeader; -exports.strictParseByte = strictParseByte; -exports.strictParseDouble = strictParseDouble; -exports.strictParseFloat = strictParseFloat; -exports.strictParseFloat32 = strictParseFloat32; -exports.strictParseInt = strictParseInt; -exports.strictParseInt32 = strictParseInt32; -exports.strictParseLong = strictParseLong; -exports.strictParseShort = strictParseShort; - - -/***/ }), - -/***/ 83879: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var protocolHttp = __nccwpck_require__(17898); -var querystringBuilder = __nccwpck_require__(31622); -var utilBase64 = __nccwpck_require__(96039); - -function createRequest(url, requestOptions) { - return new Request(url, requestOptions); -} - -function requestTimeout(timeoutInMs = 0) { - return new Promise((resolve, reject) => { - if (timeoutInMs) { - setTimeout(() => { - const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); - timeoutError.name = "TimeoutError"; - reject(timeoutError); - }, timeoutInMs); - } - }); -} - -const keepAliveSupport = { - supported: undefined, -}; -class FetchHttpHandler { - config; - configProvider; - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new FetchHttpHandler(instanceOrOptions); - } - constructor(options) { - if (typeof options === "function") { - this.configProvider = options().then((opts) => opts || {}); - } - else { - this.config = options ?? {}; - this.configProvider = Promise.resolve(this.config); - } - if (keepAliveSupport.supported === undefined) { - keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]")); - } - } - destroy() { - } - async handle(request, { abortSignal, requestTimeout: requestTimeout$1 } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - const requestTimeoutInMs = requestTimeout$1 ?? this.config.requestTimeout; - const keepAlive = this.config.keepAlive === true; - const credentials = this.config.credentials; - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - return Promise.reject(abortError); - } - let path = request.path; - const queryString = querystringBuilder.buildQueryString(request.query || {}); - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let auth = ""; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}@`; - } - const { port, method } = request; - const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; - const body = method === "GET" || method === "HEAD" ? undefined : request.body; - const requestOptions = { - body, - headers: new Headers(request.headers), - method: method, - credentials, - }; - if (this.config?.cache) { - requestOptions.cache = this.config.cache; - } - if (body) { - requestOptions.duplex = "half"; - } - if (typeof AbortController !== "undefined") { - requestOptions.signal = abortSignal; - } - if (keepAliveSupport.supported) { - requestOptions.keepalive = keepAlive; - } - if (typeof this.config.requestInit === "function") { - Object.assign(requestOptions, this.config.requestInit(request)); - } - let removeSignalEventListener = () => { }; - const fetchRequest = createRequest(url, requestOptions); - const raceOfPromises = [ - fetch(fetchRequest).then((response) => { - const fetchHeaders = response.headers; - const transformedHeaders = {}; - for (const pair of fetchHeaders.entries()) { - transformedHeaders[pair[0]] = pair[1]; - } - const hasReadableStream = response.body != undefined; - if (!hasReadableStream) { - return response.blob().then((body) => ({ - response: new protocolHttp.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body, - }), - })); - } - return { - response: new protocolHttp.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body: response.body, - }), - }; - }), - requestTimeout(requestTimeoutInMs), - ]; - if (abortSignal) { - raceOfPromises.push(new Promise((resolve, reject) => { - const onAbort = () => { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - }; - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - removeSignalEventListener = () => signal.removeEventListener("abort", onAbort); - } - else { - abortSignal.onabort = onAbort; - } - })); - } - return Promise.race(raceOfPromises).finally(removeSignalEventListener); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - config[key] = value; - return config; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } -} - -const streamCollector = async (stream) => { - if ((typeof Blob === "function" && stream instanceof Blob) || stream.constructor?.name === "Blob") { - if (Blob.prototype.arrayBuffer !== undefined) { - return new Uint8Array(await stream.arrayBuffer()); - } - return collectBlob(stream); - } - return collectStream(stream); -}; -async function collectBlob(blob) { - const base64 = await readToBase64(blob); - const arrayBuffer = utilBase64.fromBase64(base64); - return new Uint8Array(arrayBuffer); -} -async function collectStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} -function readToBase64(blob) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onloadend = () => { - if (reader.readyState !== 2) { - return reject(new Error("Reader aborted too early")); - } - const result = (reader.result ?? ""); - const commaIndex = result.indexOf(","); - const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; - resolve(result.substring(dataOffset)); - }; - reader.onabort = () => reject(new Error("Read aborted")); - reader.onerror = () => reject(reader.error); - reader.readAsDataURL(blob); - }); -} - -exports.FetchHttpHandler = FetchHttpHandler; -exports.keepAliveSupport = keepAliveSupport; -exports.streamCollector = streamCollector; - - -/***/ }), - -/***/ 77544: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const isArrayBuffer = (arg) => (typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer) || - Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; - -exports.isArrayBuffer = isArrayBuffer; - - -/***/ }), - -/***/ 88037: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var protocolHttp = __nccwpck_require__(17898); - -const 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, - }); - 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 += "\n " + hint; - } - catch (e) { - 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 (protocolHttp.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 (e) { - } - } - throw error; - } -}; -const findHeader = (pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; -}; - -const serializerMiddleware = (options, serializer) => (next, context) => async (args) => { - const endpointConfig = options; - const endpoint = context.endpointV2?.url && endpointConfig.urlParser - ? async () => endpointConfig.urlParser(context.endpointV2.url) - : endpointConfig.endpoint; - if (!endpoint) { - throw new Error("No valid endpoint provider available."); - } - const request = await serializer(args.input, { ...options, endpoint }); - return next({ - ...args, - request, - }); -}; - -const deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true, -}; -const 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); - }, - }; -} - -exports.deserializerMiddleware = deserializerMiddleware; -exports.deserializerMiddlewareOption = deserializerMiddlewareOption; -exports.getSerdePlugin = getSerdePlugin; -exports.serializerMiddleware = serializerMiddleware; -exports.serializerMiddlewareOption = serializerMiddlewareOption; - - -/***/ }), - -/***/ 39417: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var protocolHttp = __nccwpck_require__(17898); -var querystringBuilder = __nccwpck_require__(31622); -var http = __nccwpck_require__(58611); -var https = __nccwpck_require__(65692); -var stream = __nccwpck_require__(2203); -var http2 = __nccwpck_require__(85675); - -const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; - -const getTransformedHeaders = (headers) => { - const transformedHeaders = {}; - for (const name of Object.keys(headers)) { - const headerValues = headers[name]; - transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; - } - return transformedHeaders; -}; - -const timing = { - setTimeout: (cb, ms) => setTimeout(cb, ms), - clearTimeout: (timeoutId) => clearTimeout(timeoutId), -}; - -const DEFER_EVENT_LISTENER_TIME$2 = 1000; -const 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); -}; - -const 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; -}; - -const DEFER_EVENT_LISTENER_TIME$1 = 3000; -const 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); -}; - -const DEFER_EVENT_LISTENER_TIME = 3000; -const 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); -}; - -const MIN_WAIT_TIME = 6_000; -async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) { - const headers = request.headers ?? {}; - const expect = headers["Expect"] || headers["expect"]; - let timeoutId = -1; - let sendBody = true; - if (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 stream.Readable) { - body.pipe(httpRequest); - return; - } - if (body) { - if (Buffer.isBuffer(body) || typeof body === "string") { - 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(); -} - -const DEFAULT_REQUEST_TIMEOUT = 0; -class NodeHttpHandler { - config; - configProvider; - socketWarningTimestamp = 0; - 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 = 15_000; - if (Date.now() - interval < socketWarningTimestamp) { - return socketWarningTimestamp; - } - if (sockets && requests) { - for (const origin in sockets) { - 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)); - } - }); - } - resolveDefaultConfig(options) { - const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, } = options || {}; - const keepAlive = true; - const maxSockets = 50; - return { - connectionTimeout, - requestTimeout, - socketTimeout, - socketAcquisitionWarningTimeout, - throwOnRequestTimeout, - httpAgent: (() => { - if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { - return httpAgent; - } - return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); - })(), - httpsAgent: (() => { - if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { - return httpsAgent; - } - return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); - })(), - logger: console, - }; - } - destroy() { - this.config?.httpAgent?.destroy(); - this.config?.httpsAgent?.destroy(); - } - async handle(request, { abortSignal, requestTimeout } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - return new Promise((_resolve, _reject) => { - let writeRequestBodyPromise = undefined; - const timeouts = []; - const resolve = async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _resolve(arg); - }; - const reject = async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _reject(arg); - }; - if (!this.config) { - throw new Error("Node HTTP request handler config is not resolved"); - } - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; - } - const isSSL = request.protocol === "https:"; - const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; - timeouts.push(timing.setTimeout(() => { - this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, this.config.logger); - }, this.config.socketAcquisitionWarningTimeout ?? - (this.config.requestTimeout ?? 2000) + (this.config.connectionTimeout ?? 1000))); - const queryString = querystringBuilder.buildQueryString(request.query || {}); - let auth = undefined; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}`; - } - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let hostname = request.hostname ?? ""; - if (hostname[0] === "[" && hostname.endsWith("]")) { - hostname = request.hostname.slice(1, -1); - } - else { - hostname = request.hostname; - } - const nodeHttpsOptions = { - headers: request.headers, - host: hostname, - method: request.method, - path, - port: request.port, - agent, - auth, - }; - const requestFunc = isSSL ? https.request : http.request; - const req = requestFunc(nodeHttpsOptions, (res) => { - const httpResponse = new protocolHttp.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 = new Error("Request aborted"); - abortError.name = "AbortError"; - 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 ?? this.config.requestTimeout; - timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); - timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, this.config.throwOnRequestTimeout, this.config.logger ?? console)); - timeouts.push(setSocketTimeout(req, reject, this.config.socketTimeout)); - const httpAgent = nodeHttpsOptions.agent; - if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { - timeouts.push(setSocketKeepAlive(req, { - keepAlive: httpAgent.keepAlive, - keepAliveMsecs: httpAgent.keepAliveMsecs, - })); - } - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout).catch((e) => { - timeouts.forEach(timing.clearTimeout); - return _reject(e); - }); - }); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value, - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } -} - -class NodeHttp2ConnectionPool { - sessions = []; - constructor(sessions) { - this.sessions = sessions ?? []; - } - poll() { - if (this.sessions.length > 0) { - return this.sessions.shift(); - } - } - offerLast(session) { - this.sessions.push(session); - } - contains(session) { - return this.sessions.includes(session); - } - remove(session) { - this.sessions = this.sessions.filter((s) => s !== session); - } - [Symbol.iterator]() { - return this.sessions[Symbol.iterator](); - } - destroy(connection) { - for (const session of this.sessions) { - if (session === connection) { - if (!session.destroyed) { - session.destroy(); - } - } - } - } -} - -class NodeHttp2ConnectionManager { - constructor(config) { - this.config = config; - if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { - throw new RangeError("maxConcurrency must be greater than zero."); - } - } - config; - sessionCache = new Map(); - lease(requestContext, connectionConfiguration) { - const url = this.getUrlString(requestContext); - const existingPool = this.sessionCache.get(url); - if (existingPool) { - const existingSession = existingPool.poll(); - if (existingSession && !this.config.disableConcurrency) { - return existingSession; - } - } - const session = http2.connect(url); - 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()); - } - }); - } - session.unref(); - const destroySessionCb = () => { - session.destroy(); - this.deleteSession(url, session); - }; - session.on("goaway", destroySessionCb); - session.on("error", destroySessionCb); - session.on("frameError", destroySessionCb); - session.on("close", () => this.deleteSession(url, session)); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); - } - const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); - connectionPool.offerLast(session); - this.sessionCache.set(url, connectionPool); - return session; - } - deleteSession(authority, session) { - const existingConnectionPool = this.sessionCache.get(authority); - if (!existingConnectionPool) { - return; - } - if (!existingConnectionPool.contains(session)) { - return; - } - existingConnectionPool.remove(session); - this.sessionCache.set(authority, existingConnectionPool); - } - release(requestContext, session) { - const cacheKey = this.getUrlString(requestContext); - this.sessionCache.get(cacheKey)?.offerLast(session); - } - destroy() { - for (const [key, connectionPool] of this.sessionCache) { - for (const session of connectionPool) { - if (!session.destroyed) { - session.destroy(); - } - connectionPool.remove(session); - } - this.sessionCache.delete(key); - } - } - setMaxConcurrentStreams(maxConcurrentStreams) { - if (maxConcurrentStreams && maxConcurrentStreams <= 0) { - throw new RangeError("maxConcurrentStreams must be greater than zero."); - } - this.config.maxConcurrency = maxConcurrentStreams; - } - setDisableConcurrentStreams(disableConcurrentStreams) { - this.config.disableConcurrency = disableConcurrentStreams; - } - getUrlString(request) { - return request.destination.toString(); - } -} - -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 } = {}) { - if (!this.config) { - this.config = await this.configProvider; - this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); - if (this.config.maxConcurrentStreams) { - this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); - } - } - const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; - 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 = new Error("Request aborted"); - abortError.name = "AbortError"; - 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 session = this.connectionManager.lease(requestContext, { - requestTimeout: this.config?.sessionTimeout, - disableConcurrentStreams: disableConcurrentStreams || false, - }); - const rejectWithDestroy = (err) => { - if (disableConcurrentStreams) { - this.destroySession(session); - } - fulfilled = true; - reject(err); - }; - const queryString = querystringBuilder.buildQueryString(query || {}); - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - const req = session.request({ - ...request.headers, - [http2.constants.HTTP2_HEADER_PATH]: path, - [http2.constants.HTTP2_HEADER_METHOD]: method, - }); - session.ref(); - req.on("response", (headers) => { - const httpResponse = new protocolHttp.HttpResponse({ - statusCode: headers[":status"] || -1, - headers: getTransformedHeaders(headers), - body: req, - }); - fulfilled = true; - resolve({ response: httpResponse }); - if (disableConcurrentStreams) { - session.close(); - this.connectionManager.deleteSession(authority, session); - } - }); - if (effectiveRequestTimeout) { - req.setTimeout(effectiveRequestTimeout, () => { - req.close(); - const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); - timeoutError.name = "TimeoutError"; - rejectWithDestroy(timeoutError); - }); - } - if (abortSignal) { - const onAbort = () => { - req.close(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - rejectWithDestroy(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; - } - } - req.on("frameError", (type, code, id) => { - rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); - }); - req.on("error", rejectWithDestroy); - req.on("aborted", () => { - rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); - }); - req.on("close", () => { - session.unref(); - if (disableConcurrentStreams) { - session.destroy(); - } - if (!fulfilled) { - rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); - } - }); - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); - }); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value, - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } - destroySession(session) { - if (!session.destroyed) { - session.destroy(); - } - } -} - -class Collector extends stream.Writable { - bufferedBytes = []; - _write(chunk, encoding, callback) { - this.bufferedBytes.push(chunk); - callback(); - } -} - -const streamCollector = (stream) => { - if (isReadableStreamInstance(stream)) { - return collectReadableStream(stream); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); - resolve(bytes); - }); - }); -}; -const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; -async function collectReadableStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} - -exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; -exports.NodeHttp2Handler = NodeHttp2Handler; -exports.NodeHttpHandler = NodeHttpHandler; -exports.streamCollector = streamCollector; - - -/***/ }), - -/***/ 6180: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -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); - } -} - -const 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; -}; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const 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; - }; -}; - -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; - - -/***/ }), - -/***/ 17898: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var types = __nccwpck_require__(34048); - -const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - }, - }; -}; -const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler(), - }; -}; - -class Field { - name; - kind; - values; - constructor({ name, kind = types.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); - } -} - -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"; - } -} - -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} - -exports.Field = Field; -exports.Fields = Fields; -exports.HttpRequest = HttpRequest; -exports.HttpResponse = HttpResponse; -exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; -exports.isValidHostname = isValidHostname; -exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; - - -/***/ }), - -/***/ 31622: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilUriEscape = __nccwpck_require__(13288); - -function buildQueryString(query) { - const parts = []; - for (let key of Object.keys(query).sort()) { - const value = query[key]; - key = utilUriEscape.escapeUri(key); - if (Array.isArray(value)) { - for (let i = 0, iLen = value.length; i < iLen; i++) { - parts.push(`${key}=${utilUriEscape.escapeUri(value[i])}`); - } - } - else { - let qsEntry = key; - if (value || typeof value === "string") { - qsEntry += `=${utilUriEscape.escapeUri(value)}`; - } - parts.push(qsEntry); - } - } - return parts.join("&"); -} - -exports.buildQueryString = buildQueryString; - - -/***/ }), - -/***/ 34048: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); +const de_UpdateInProgressExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = smithyClient._json(body); + const exception = new UpdateInProgressException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - -/***/ }), - -/***/ 73464: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(45217); -const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; -const 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 = (0, util_buffer_from_1.fromString)(input, "base64"); - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); -}; -exports.fromBase64 = fromBase64; - - -/***/ }), - -/***/ 96039: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var fromBase64 = __nccwpck_require__(73464); -var toBase64 = __nccwpck_require__(71189); - - - -Object.keys(fromBase64).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return fromBase64[k]; } - }); -}); -Object.keys(toBase64).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return toBase64[k]; } - }); -}); - - -/***/ }), - -/***/ 71189: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(45217); -const util_utf8_1 = __nccwpck_require__(60791); -const toBase64 = (_input) => { - let input; - if (typeof _input === "string") { - input = (0, util_utf8_1.fromUtf8)(_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 (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); -}; -exports.toBase64 = toBase64; - - -/***/ }), - -/***/ 24192: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; -const calculateBodyLength = (body) => { - if (typeof body === "string") { - if (TEXT_ENCODER) { - return TEXT_ENCODER.encode(body).byteLength; - } - let len = body.length; - for (let i = len - 1; i >= 0; i--) { - const code = body.charCodeAt(i); - if (code > 0x7f && code <= 0x7ff) - len++; - else if (code > 0x7ff && code <= 0xffff) - len += 2; - if (code >= 0xdc00 && code <= 0xdfff) - i--; - } - return len; - } - else if (typeof body.byteLength === "number") { - return body.byteLength; - } - else if (typeof body.size === "number") { - return body.size; - } - throw new Error(`Body Length computation failed for ${body}`); -}; - -exports.calculateBodyLength = calculateBodyLength; - - -/***/ }), - -/***/ 45217: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var isArrayBuffer = __nccwpck_require__(77544); -var buffer = __nccwpck_require__(20181); - -const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { - if (!isArrayBuffer.isArrayBuffer(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); - } - return buffer.Buffer.from(input, offset, length); -}; -const 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.Buffer.from(input, encoding) : buffer.Buffer.from(input); -}; - -exports.fromArrayBuffer = fromArrayBuffer; -exports.fromString = fromString; - - -/***/ }), - -/***/ 96369: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const SHORT_TO_HEX = {}; -const 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; -} - -exports.fromHex = fromHex; -exports.toHex = toHex; - - -/***/ }), - -/***/ 56182: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var types = __nccwpck_require__(34048); - -const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); - -const normalizeProvider = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; -}; - -exports.getSmithyContext = getSmithyContext; -exports.normalizeProvider = normalizeProvider; - - -/***/ }), - -/***/ 40238: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ByteArrayCollector = void 0; -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; - } -} -exports.ByteArrayCollector = ByteArrayCollector; - - -/***/ }), - -/***/ 96783: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function () { }; -class ChecksumStream extends ReadableStreamRef { -} -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 65697: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(96039); -const stream_1 = __nccwpck_require__(2203); -class ChecksumStream extends stream_1.Duplex { - expectedChecksum; - checksumSourceLocation; - checksum; - source; - base64Encoder; - constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) { - super(); - if (typeof source.pipe === "function") { - this.source = source; - } - else { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); - } - this.base64Encoder = base64Encoder ?? util_base64_1.toBase64; - this.expectedChecksum = expectedChecksum; - this.checksum = checksum; - this.checksumSourceLocation = checksumSourceLocation; - this.source.pipe(this); - } - _read(size) { } - _write(chunk, encoding, callback) { - try { - this.checksum.update(chunk); - this.push(chunk); - } - catch (e) { - return callback(e); - } - return callback(); - } - async _final(callback) { - try { - const digest = await this.checksum.digest(); - const received = this.base64Encoder(digest); - if (this.expectedChecksum !== received) { - return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + - ` in response header "${this.checksumSourceLocation}".`)); - } - } - catch (e) { - return callback(e); - } - this.push(null); - return callback(); - } -} -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 49671: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(96039); -const stream_type_check_1 = __nccwpck_require__(83040); -const ChecksumStream_browser_1 = __nccwpck_require__(96783); -const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => { - if (!(0, stream_type_check_1.isReadableStream)(source)) { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); - } - const encoder = base64Encoder ?? util_base64_1.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(); - } - }, + return smithyClient.decorateServiceException(exception, body); +}; +const se_CanaryConfiguration = (input, context) => { + return smithyClient.take(input, { + canaryBakeTimeInMinutes: [], + canaryPercent: smithyClient.serializeFloat, }); - source.pipeThrough(transform); - const readable = transform.readable; - Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype); - return readable; }; -exports.createChecksumStream = createChecksumStream; - - -/***/ }), - -/***/ 8921: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = createChecksumStream; -const stream_type_check_1 = __nccwpck_require__(83040); -const ChecksumStream_1 = __nccwpck_require__(65697); -const createChecksumStream_browser_1 = __nccwpck_require__(49671); -function createChecksumStream(init) { - if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { - return (0, createChecksumStream_browser_1.createChecksumStream)(init); - } - return new ChecksumStream_1.ChecksumStream(init); -} - - -/***/ }), - -/***/ 42823: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = createBufferedReadable; -const node_stream_1 = __nccwpck_require__(57075); -const ByteArrayCollector_1 = __nccwpck_require__(40238); -const createBufferedReadableStream_1 = __nccwpck_require__(80383); -const stream_type_check_1 = __nccwpck_require__(83040); -function createBufferedReadable(upstream, size, logger) { - if ((0, stream_type_check_1.isReadableStream)(upstream)) { - return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger); - } - const downstream = new node_stream_1.Readable({ read() { } }); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = [ - "", - new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)), - new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))), - ]; - let mode = -1; - upstream.on("data", (chunk) => { - const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); - if (mode !== chunkMode) { - if (mode >= 0) { - downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - mode = chunkMode; - } - if (mode === -1) { - downstream.push(chunk); - return; - } - const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); - bytesSeen += chunkSize; - const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - downstream.push(chunk); - } - else { - const newSize = (0, createBufferedReadableStream_1.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((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - } +const se_CreateCapacityProviderRequest = (input, context) => { + return smithyClient.take(input, { + autoScalingGroupProvider: smithyClient._json, + cluster: [], + managedInstancesProvider: (_) => se_CreateManagedInstancesProviderConfiguration(_), + name: [], + tags: smithyClient._json, }); - upstream.on("end", () => { - if (mode !== -1) { - const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); - if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { - downstream.push(remainder); - } - } - downstream.push(null); +}; +const se_CreatedAt = (input, context) => { + return smithyClient.take(input, { + after: (_) => _.getTime() / 1_000, + before: (_) => _.getTime() / 1_000, }); - return downstream; -} - - -/***/ }), - -/***/ 80383: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = void 0; -exports.createBufferedReadableStream = createBufferedReadableStream; -exports.merge = merge; -exports.flush = flush; -exports.sizeOf = sizeOf; -exports.modeOf = modeOf; -const ByteArrayCollector_1 = __nccwpck_require__(40238); -function createBufferedReadableStream(upstream, size, logger) { - const reader = upstream.getReader(); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = ["", new ByteArrayCollector_1.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, +}; +const se_CreateManagedInstancesProviderConfiguration = (input, context) => { + return smithyClient.take(input, { + infrastructureRoleArn: [], + instanceLaunchTemplate: (_) => se_InstanceLaunchTemplate(_), + propagateTags: [], }); -} -exports.createBufferedReadable = createBufferedReadableStream; -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; -} - - -/***/ }), - -/***/ 40588: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getAwsChunkedEncodingStream = void 0; -const stream_1 = __nccwpck_require__(2203); -const getAwsChunkedEncodingStream = (readableStream, options) => { - const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; - const checksumRequired = base64Encoder !== undefined && - checksumAlgorithmFn !== undefined && - checksumLocationName !== undefined && - streamHasher !== undefined; - const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; - const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } }); - readableStream.on("data", (data) => { - const length = bodyLengthChecker(data) || 0; - awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); - awsChunkedEncodingStream.push(data); - awsChunkedEncodingStream.push("\r\n"); +}; +const se_CreateServiceRequest = (input, context) => { + return smithyClient.take(input, { + availabilityZoneRebalancing: [], + capacityProviderStrategy: smithyClient._json, + clientToken: [], + cluster: [], + deploymentConfiguration: (_) => se_DeploymentConfiguration(_), + deploymentController: smithyClient._json, + desiredCount: [], + enableECSManagedTags: [], + enableExecuteCommand: [], + healthCheckGracePeriodSeconds: [], + launchType: [], + loadBalancers: smithyClient._json, + networkConfiguration: smithyClient._json, + placementConstraints: smithyClient._json, + placementStrategy: smithyClient._json, + platformVersion: [], + propagateTags: [], + role: [], + schedulingStrategy: [], + serviceConnectConfiguration: smithyClient._json, + serviceName: [], + serviceRegistries: smithyClient._json, + tags: smithyClient._json, + taskDefinition: [], + volumeConfigurations: smithyClient._json, + vpcLatticeConfigurations: smithyClient._json, }); - readableStream.on("end", async () => { - awsChunkedEncodingStream.push(`0\r\n`); - if (checksumRequired) { - const checksum = base64Encoder(await digest); - awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); - awsChunkedEncodingStream.push(`\r\n`); - } - awsChunkedEncodingStream.push(null); +}; +const se_CreateTaskSetRequest = (input, context) => { + return smithyClient.take(input, { + capacityProviderStrategy: smithyClient._json, + clientToken: [], + cluster: [], + externalId: [], + launchType: [], + loadBalancers: smithyClient._json, + networkConfiguration: smithyClient._json, + platformVersion: [], + scale: (_) => se_Scale(_), + service: [], + serviceRegistries: smithyClient._json, + tags: smithyClient._json, + taskDefinition: [], }); - return awsChunkedEncodingStream; }; -exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; - - -/***/ }), - -/***/ 44168: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = headStream; -async function headStream(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; -} - - -/***/ }), - -/***/ 91390: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = void 0; -const stream_1 = __nccwpck_require__(2203); -const headStream_browser_1 = __nccwpck_require__(44168); -const stream_type_check_1 = __nccwpck_require__(83040); -const headStream = (stream, bytes) => { - if ((0, stream_type_check_1.isReadableStream)(stream)) { - return (0, headStream_browser_1.headStream)(stream, bytes); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - collector.limit = bytes; - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.buffers)); - resolve(bytes); - }); +const se_DeploymentConfiguration = (input, context) => { + return smithyClient.take(input, { + alarms: smithyClient._json, + bakeTimeInMinutes: [], + canaryConfiguration: (_) => se_CanaryConfiguration(_), + deploymentCircuitBreaker: smithyClient._json, + lifecycleHooks: (_) => se_DeploymentLifecycleHookList(_), + linearConfiguration: (_) => se_LinearConfiguration(_), + maximumPercent: [], + minimumHealthyPercent: [], + strategy: [], + }); +}; +const se_DeploymentLifecycleHook = (input, context) => { + return smithyClient.take(input, { + hookDetails: (_) => se_HookDetails(_), + hookTargetArn: [], + lifecycleStages: smithyClient._json, + roleArn: [], }); }; -exports.headStream = headStream; -class Collector extends stream_1.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(); - } -} - - -/***/ }), - -/***/ 99542: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilBase64 = __nccwpck_require__(96039); -var utilUtf8 = __nccwpck_require__(60791); -var ChecksumStream = __nccwpck_require__(65697); -var createChecksumStream = __nccwpck_require__(8921); -var createBufferedReadable = __nccwpck_require__(42823); -var getAwsChunkedEncodingStream = __nccwpck_require__(40588); -var headStream = __nccwpck_require__(91390); -var sdkStreamMixin = __nccwpck_require__(34367); -var splitStream = __nccwpck_require__(32638); -var streamTypeCheck = __nccwpck_require__(83040); - -class Uint8ArrayBlobAdapter extends Uint8Array { - static fromString(source, encoding = "utf-8") { - if (typeof source === "string") { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source)); - } - return Uint8ArrayBlobAdapter.mutate(utilUtf8.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 utilBase64.toBase64(this); - } - return utilUtf8.toUtf8(this); - } -} - -exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter; -Object.keys(ChecksumStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return ChecksumStream[k]; } +const se_DeploymentLifecycleHookList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + return se_DeploymentLifecycleHook(entry); + }); +}; +const se_HookDetails = (input, context) => { + return input; +}; +const se_InstanceLaunchTemplate = (input, context) => { + return smithyClient.take(input, { + ec2InstanceProfileArn: [], + instanceRequirements: (_) => se_InstanceRequirementsRequest(_), + monitoring: [], + networkConfiguration: smithyClient._json, + storageConfiguration: smithyClient._json, + }); +}; +const se_InstanceLaunchTemplateUpdate = (input, context) => { + return smithyClient.take(input, { + ec2InstanceProfileArn: [], + instanceRequirements: (_) => se_InstanceRequirementsRequest(_), + monitoring: [], + networkConfiguration: smithyClient._json, + storageConfiguration: smithyClient._json, + }); +}; +const se_InstanceRequirementsRequest = (input, context) => { + return smithyClient.take(input, { + acceleratorCount: smithyClient._json, + acceleratorManufacturers: smithyClient._json, + acceleratorNames: smithyClient._json, + acceleratorTotalMemoryMiB: smithyClient._json, + acceleratorTypes: smithyClient._json, + allowedInstanceTypes: smithyClient._json, + bareMetal: [], + baselineEbsBandwidthMbps: smithyClient._json, + burstablePerformance: [], + cpuManufacturers: smithyClient._json, + excludedInstanceTypes: smithyClient._json, + instanceGenerations: smithyClient._json, + localStorage: [], + localStorageTypes: smithyClient._json, + maxSpotPriceAsPercentageOfOptimalOnDemandPrice: [], + memoryGiBPerVCpu: (_) => se_MemoryGiBPerVCpuRequest(_), + memoryMiB: smithyClient._json, + networkBandwidthGbps: (_) => se_NetworkBandwidthGbpsRequest(_), + networkInterfaceCount: smithyClient._json, + onDemandMaxPricePercentageOverLowestPrice: [], + requireHibernateSupport: [], + spotMaxPricePercentageOverLowestPrice: [], + totalLocalStorageGB: (_) => se_TotalLocalStorageGBRequest(_), + vCpuCount: smithyClient._json, + }); +}; +const se_LinearConfiguration = (input, context) => { + return smithyClient.take(input, { + stepBakeTimeInMinutes: [], + stepPercent: smithyClient.serializeFloat, + }); +}; +const se_ListServiceDeploymentsRequest = (input, context) => { + return smithyClient.take(input, { + cluster: [], + createdAt: (_) => se_CreatedAt(_), + maxResults: [], + nextToken: [], + service: [], + status: smithyClient._json, + }); +}; +const se_MemoryGiBPerVCpuRequest = (input, context) => { + return smithyClient.take(input, { + max: smithyClient.serializeFloat, + min: smithyClient.serializeFloat, + }); +}; +const se_NetworkBandwidthGbpsRequest = (input, context) => { + return smithyClient.take(input, { + max: smithyClient.serializeFloat, + min: smithyClient.serializeFloat, + }); +}; +const se_RegisterContainerInstanceRequest = (input, context) => { + return smithyClient.take(input, { + attributes: smithyClient._json, + cluster: [], + containerInstanceArn: [], + instanceIdentityDocument: [], + instanceIdentityDocumentSignature: [], + platformDevices: smithyClient._json, + tags: smithyClient._json, + totalResources: (_) => se_Resources(_), + versionInfo: smithyClient._json, + }); +}; +const se_Resource = (input, context) => { + return smithyClient.take(input, { + doubleValue: smithyClient.serializeFloat, + integerValue: [], + longValue: [], + name: [], + stringSetValue: smithyClient._json, + type: [], + }); +}; +const se_Resources = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + return se_Resource(entry); + }); +}; +const se_RunTaskRequest = (input, context) => { + return smithyClient.take(input, { + capacityProviderStrategy: smithyClient._json, + clientToken: [true, (_) => _ ?? uuid.v4()], + cluster: [], + count: [], + enableECSManagedTags: [], + enableExecuteCommand: [], + group: [], + launchType: [], + networkConfiguration: smithyClient._json, + overrides: smithyClient._json, + placementConstraints: smithyClient._json, + placementStrategy: smithyClient._json, + platformVersion: [], + propagateTags: [], + referenceId: [], + startedBy: [], + tags: smithyClient._json, + taskDefinition: [], + volumeConfigurations: smithyClient._json, + }); +}; +const se_Scale = (input, context) => { + return smithyClient.take(input, { + unit: [], + value: smithyClient.serializeFloat, + }); +}; +const se_SubmitTaskStateChangeRequest = (input, context) => { + return smithyClient.take(input, { + attachments: smithyClient._json, + cluster: [], + containers: smithyClient._json, + executionStoppedAt: (_) => _.getTime() / 1_000, + managedAgents: smithyClient._json, + pullStartedAt: (_) => _.getTime() / 1_000, + pullStoppedAt: (_) => _.getTime() / 1_000, + reason: [], + status: [], + task: [], + }); +}; +const se_TotalLocalStorageGBRequest = (input, context) => { + return smithyClient.take(input, { + max: smithyClient.serializeFloat, + min: smithyClient.serializeFloat, + }); +}; +const se_UpdateCapacityProviderRequest = (input, context) => { + return smithyClient.take(input, { + autoScalingGroupProvider: smithyClient._json, + cluster: [], + managedInstancesProvider: (_) => se_UpdateManagedInstancesProviderConfiguration(_), + name: [], + }); +}; +const se_UpdateManagedInstancesProviderConfiguration = (input, context) => { + return smithyClient.take(input, { + infrastructureRoleArn: [], + instanceLaunchTemplate: (_) => se_InstanceLaunchTemplateUpdate(_), + propagateTags: [], + }); +}; +const se_UpdateServiceRequest = (input, context) => { + return smithyClient.take(input, { + availabilityZoneRebalancing: [], + capacityProviderStrategy: smithyClient._json, + cluster: [], + deploymentConfiguration: (_) => se_DeploymentConfiguration(_), + deploymentController: smithyClient._json, + desiredCount: [], + enableECSManagedTags: [], + enableExecuteCommand: [], + forceNewDeployment: [], + healthCheckGracePeriodSeconds: [], + loadBalancers: smithyClient._json, + networkConfiguration: smithyClient._json, + placementConstraints: smithyClient._json, + placementStrategy: smithyClient._json, + platformVersion: [], + propagateTags: [], + service: [], + serviceConnectConfiguration: smithyClient._json, + serviceRegistries: smithyClient._json, + taskDefinition: [], + volumeConfigurations: smithyClient._json, + vpcLatticeConfigurations: smithyClient._json, + }); +}; +const se_UpdateTaskSetRequest = (input, context) => { + return smithyClient.take(input, { + cluster: [], + scale: (_) => se_Scale(_), + service: [], + taskSet: [], + }); +}; +const de_CanaryConfiguration = (output, context) => { + return smithyClient.take(output, { + canaryBakeTimeInMinutes: smithyClient.expectInt32, + canaryPercent: smithyClient.limitedParseDouble, + }); +}; +const de_CapacityProvider = (output, context) => { + return smithyClient.take(output, { + autoScalingGroupProvider: smithyClient._json, + capacityProviderArn: smithyClient.expectString, + cluster: smithyClient.expectString, + managedInstancesProvider: (_) => de_ManagedInstancesProvider(_), + name: smithyClient.expectString, + status: smithyClient.expectString, + tags: smithyClient._json, + type: smithyClient.expectString, + updateStatus: smithyClient.expectString, + updateStatusReason: smithyClient.expectString, + }); +}; +const de_CapacityProviders = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_CapacityProvider(entry); + }); + return retVal; +}; +const de_Container = (output, context) => { + return smithyClient.take(output, { + containerArn: smithyClient.expectString, + cpu: smithyClient.expectString, + exitCode: smithyClient.expectInt32, + gpuIds: smithyClient._json, + healthStatus: smithyClient.expectString, + image: smithyClient.expectString, + imageDigest: smithyClient.expectString, + lastStatus: smithyClient.expectString, + managedAgents: (_) => de_ManagedAgents(_), + memory: smithyClient.expectString, + memoryReservation: smithyClient.expectString, + name: smithyClient.expectString, + networkBindings: smithyClient._json, + networkInterfaces: smithyClient._json, + reason: smithyClient.expectString, + runtimeId: smithyClient.expectString, + taskArn: smithyClient.expectString, + }); +}; +const de_ContainerInstance = (output, context) => { + return smithyClient.take(output, { + agentConnected: smithyClient.expectBoolean, + agentUpdateStatus: smithyClient.expectString, + attachments: smithyClient._json, + attributes: smithyClient._json, + capacityProviderName: smithyClient.expectString, + containerInstanceArn: smithyClient.expectString, + ec2InstanceId: smithyClient.expectString, + healthStatus: (_) => de_ContainerInstanceHealthStatus(_), + pendingTasksCount: smithyClient.expectInt32, + registeredAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + registeredResources: (_) => de_Resources(_), + remainingResources: (_) => de_Resources(_), + runningTasksCount: smithyClient.expectInt32, + status: smithyClient.expectString, + statusReason: smithyClient.expectString, + tags: smithyClient._json, + version: smithyClient.expectLong, + versionInfo: smithyClient._json, + }); +}; +const de_ContainerInstanceHealthStatus = (output, context) => { + return smithyClient.take(output, { + details: (_) => de_InstanceHealthCheckResultList(_), + overallStatus: smithyClient.expectString, + }); +}; +const de_ContainerInstances = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_ContainerInstance(entry); + }); + return retVal; +}; +const de_Containers = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_Container(entry); + }); + return retVal; +}; +const de_CreateCapacityProviderResponse = (output, context) => { + return smithyClient.take(output, { + capacityProvider: (_) => de_CapacityProvider(_), + }); +}; +const de_CreateServiceResponse = (output, context) => { + return smithyClient.take(output, { + service: (_) => de_Service(_), + }); +}; +const de_CreateTaskSetResponse = (output, context) => { + return smithyClient.take(output, { + taskSet: (_) => de_TaskSet(_), + }); +}; +const de_DeleteCapacityProviderResponse = (output, context) => { + return smithyClient.take(output, { + capacityProvider: (_) => de_CapacityProvider(_), + }); +}; +const de_DeleteServiceResponse = (output, context) => { + return smithyClient.take(output, { + service: (_) => de_Service(_), + }); +}; +const de_DeleteTaskDefinitionsResponse = (output, context) => { + return smithyClient.take(output, { + failures: smithyClient._json, + taskDefinitions: (_) => de_TaskDefinitionList(_), + }); +}; +const de_DeleteTaskSetResponse = (output, context) => { + return smithyClient.take(output, { + taskSet: (_) => de_TaskSet(_), + }); +}; +const de_Deployment = (output, context) => { + return smithyClient.take(output, { + capacityProviderStrategy: smithyClient._json, + createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + desiredCount: smithyClient.expectInt32, + failedTasks: smithyClient.expectInt32, + fargateEphemeralStorage: smithyClient._json, + id: smithyClient.expectString, + launchType: smithyClient.expectString, + networkConfiguration: smithyClient._json, + pendingCount: smithyClient.expectInt32, + platformFamily: smithyClient.expectString, + platformVersion: smithyClient.expectString, + rolloutState: smithyClient.expectString, + rolloutStateReason: smithyClient.expectString, + runningCount: smithyClient.expectInt32, + serviceConnectConfiguration: smithyClient._json, + serviceConnectResources: smithyClient._json, + status: smithyClient.expectString, + taskDefinition: smithyClient.expectString, + updatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + volumeConfigurations: smithyClient._json, + vpcLatticeConfigurations: smithyClient._json, + }); +}; +const de_DeploymentConfiguration = (output, context) => { + return smithyClient.take(output, { + alarms: smithyClient._json, + bakeTimeInMinutes: smithyClient.expectInt32, + canaryConfiguration: (_) => de_CanaryConfiguration(_), + deploymentCircuitBreaker: smithyClient._json, + lifecycleHooks: (_) => de_DeploymentLifecycleHookList(_), + linearConfiguration: (_) => de_LinearConfiguration(_), + maximumPercent: smithyClient.expectInt32, + minimumHealthyPercent: smithyClient.expectInt32, + strategy: smithyClient.expectString, + }); +}; +const de_DeploymentLifecycleHook = (output, context) => { + return smithyClient.take(output, { + hookDetails: (_) => de_HookDetails(_), + hookTargetArn: smithyClient.expectString, + lifecycleStages: smithyClient._json, + roleArn: smithyClient.expectString, + }); +}; +const de_DeploymentLifecycleHookList = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_DeploymentLifecycleHook(entry); + }); + return retVal; +}; +const de_Deployments = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_Deployment(entry); + }); + return retVal; +}; +const de_DeregisterContainerInstanceResponse = (output, context) => { + return smithyClient.take(output, { + containerInstance: (_) => de_ContainerInstance(_), + }); +}; +const de_DeregisterTaskDefinitionResponse = (output, context) => { + return smithyClient.take(output, { + taskDefinition: (_) => de_TaskDefinition(_), + }); +}; +const de_DescribeCapacityProvidersResponse = (output, context) => { + return smithyClient.take(output, { + capacityProviders: (_) => de_CapacityProviders(_), + failures: smithyClient._json, + nextToken: smithyClient.expectString, + }); +}; +const de_DescribeContainerInstancesResponse = (output, context) => { + return smithyClient.take(output, { + containerInstances: (_) => de_ContainerInstances(_), + failures: smithyClient._json, + }); +}; +const de_DescribeServiceDeploymentsResponse = (output, context) => { + return smithyClient.take(output, { + failures: smithyClient._json, + serviceDeployments: (_) => de_ServiceDeployments(_), }); -}); -Object.keys(createChecksumStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return createChecksumStream[k]; } +}; +const de_DescribeServiceRevisionsResponse = (output, context) => { + return smithyClient.take(output, { + failures: smithyClient._json, + serviceRevisions: (_) => de_ServiceRevisions(_), }); -}); -Object.keys(createBufferedReadable).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return createBufferedReadable[k]; } +}; +const de_DescribeServicesResponse = (output, context) => { + return smithyClient.take(output, { + failures: smithyClient._json, + services: (_) => de_Services(_), }); -}); -Object.keys(getAwsChunkedEncodingStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getAwsChunkedEncodingStream[k]; } +}; +const de_DescribeTaskDefinitionResponse = (output, context) => { + return smithyClient.take(output, { + tags: smithyClient._json, + taskDefinition: (_) => de_TaskDefinition(_), }); -}); -Object.keys(headStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return headStream[k]; } +}; +const de_DescribeTaskSetsResponse = (output, context) => { + return smithyClient.take(output, { + failures: smithyClient._json, + taskSets: (_) => de_TaskSets(_), }); -}); -Object.keys(sdkStreamMixin).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return sdkStreamMixin[k]; } +}; +const de_DescribeTasksResponse = (output, context) => { + return smithyClient.take(output, { + failures: smithyClient._json, + tasks: (_) => de_Tasks(_), }); -}); -Object.keys(splitStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return splitStream[k]; } +}; +const de_GetTaskProtectionResponse = (output, context) => { + return smithyClient.take(output, { + failures: smithyClient._json, + protectedTasks: (_) => de_ProtectedTasks(_), }); -}); -Object.keys(streamTypeCheck).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return streamTypeCheck[k]; } +}; +const de_HookDetails = (output, context) => { + return output; +}; +const de_InstanceHealthCheckResult = (output, context) => { + return smithyClient.take(output, { + lastStatusChange: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + lastUpdated: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + status: smithyClient.expectString, + type: smithyClient.expectString, }); -}); - - -/***/ }), - -/***/ 51113: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const fetch_http_handler_1 = __nccwpck_require__(83879); -const util_base64_1 = __nccwpck_require__(96039); -const util_hex_encoding_1 = __nccwpck_require__(96369); -const util_utf8_1 = __nccwpck_require__(60791); -const stream_type_check_1 = __nccwpck_require__(83040); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - if (!isBlobInstance(stream) && !(0, stream_type_check_1.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); - } - transformed = true; - return await (0, fetch_http_handler_1.streamCollector)(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.\n" + - "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: transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === "base64") { - return (0, util_base64_1.toBase64)(buf); - } - else if (encoding === "hex") { - return (0, util_hex_encoding_1.toHex)(buf); - } - else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { - return (0, util_utf8_1.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); - } - transformed = true; - if (isBlobInstance(stream)) { - return blobToWebStream(stream); - } - else if ((0, stream_type_check_1.isReadableStream)(stream)) { - return stream; - } - else { - throw new Error(`Cannot transform payload to web stream, got ${stream}`); - } - }, +}; +const de_InstanceHealthCheckResultList = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_InstanceHealthCheckResult(entry); }); + return retVal; }; -exports.sdkStreamMixin = sdkStreamMixin; -const isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; - - -/***/ }), - -/***/ 34367: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const node_http_handler_1 = __nccwpck_require__(39417); -const util_buffer_from_1 = __nccwpck_require__(45217); -const stream_1 = __nccwpck_require__(2203); -const sdk_stream_mixin_browser_1 = __nccwpck_require__(51113); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - if (!(stream instanceof stream_1.Readable)) { - try { - return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); - } - catch (e) { - 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 (0, node_http_handler_1.streamCollector)(stream); - }; - return Object.assign(stream, { - transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === undefined || Buffer.isEncoding(encoding)) { - return (0, util_buffer_from_1.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 stream_1.Readable.toWeb !== "function") { - throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); - } - transformed = true; - return stream_1.Readable.toWeb(stream); - }, +const de_InstanceLaunchTemplate = (output, context) => { + return smithyClient.take(output, { + ec2InstanceProfileArn: smithyClient.expectString, + instanceRequirements: (_) => de_InstanceRequirementsRequest(_), + monitoring: smithyClient.expectString, + networkConfiguration: smithyClient._json, + storageConfiguration: smithyClient._json, }); }; -exports.sdkStreamMixin = sdkStreamMixin; - - -/***/ }), - -/***/ 13480: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -async function splitStream(stream) { - if (typeof stream.stream === "function") { - stream = stream.stream(); - } - const readableStream = stream; - return readableStream.tee(); -} - - -/***/ }), - -/***/ 32638: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -const stream_1 = __nccwpck_require__(2203); -const splitStream_browser_1 = __nccwpck_require__(13480); -const stream_type_check_1 = __nccwpck_require__(83040); -async function splitStream(stream) { - if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) { - return (0, splitStream_browser_1.splitStream)(stream); - } - const stream1 = new stream_1.PassThrough(); - const stream2 = new stream_1.PassThrough(); - stream.pipe(stream1); - stream.pipe(stream2); - return [stream1, stream2]; -} - - -/***/ }), - -/***/ 83040: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isBlob = exports.isReadableStream = void 0; -const isReadableStream = (stream) => typeof ReadableStream === "function" && - (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream); -exports.isReadableStream = isReadableStream; -const isBlob = (blob) => { - return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob); +const de_InstanceRequirementsRequest = (output, context) => { + return smithyClient.take(output, { + acceleratorCount: smithyClient._json, + acceleratorManufacturers: smithyClient._json, + acceleratorNames: smithyClient._json, + acceleratorTotalMemoryMiB: smithyClient._json, + acceleratorTypes: smithyClient._json, + allowedInstanceTypes: smithyClient._json, + bareMetal: smithyClient.expectString, + baselineEbsBandwidthMbps: smithyClient._json, + burstablePerformance: smithyClient.expectString, + cpuManufacturers: smithyClient._json, + excludedInstanceTypes: smithyClient._json, + instanceGenerations: smithyClient._json, + localStorage: smithyClient.expectString, + localStorageTypes: smithyClient._json, + maxSpotPriceAsPercentageOfOptimalOnDemandPrice: smithyClient.expectInt32, + memoryGiBPerVCpu: (_) => de_MemoryGiBPerVCpuRequest(_), + memoryMiB: smithyClient._json, + networkBandwidthGbps: (_) => de_NetworkBandwidthGbpsRequest(_), + networkInterfaceCount: smithyClient._json, + onDemandMaxPricePercentageOverLowestPrice: smithyClient.expectInt32, + requireHibernateSupport: smithyClient.expectBoolean, + spotMaxPricePercentageOverLowestPrice: smithyClient.expectInt32, + totalLocalStorageGB: (_) => de_TotalLocalStorageGBRequest(_), + vCpuCount: smithyClient._json, + }); +}; +const de_LinearConfiguration = (output, context) => { + return smithyClient.take(output, { + stepBakeTimeInMinutes: smithyClient.expectInt32, + stepPercent: smithyClient.limitedParseDouble, + }); }; -exports.isBlob = isBlob; - - -/***/ }), - -/***/ 13288: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); -const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; - -const escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/"); - -exports.escapeUri = escapeUri; -exports.escapeUriPath = escapeUriPath; - - -/***/ }), - -/***/ 60791: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilBufferFrom = __nccwpck_require__(45217); - -const fromUtf8 = (input) => { - const buf = utilBufferFrom.fromString(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); +const de_ListServiceDeploymentsResponse = (output, context) => { + return smithyClient.take(output, { + nextToken: smithyClient.expectString, + serviceDeployments: (_) => de_ServiceDeploymentsBrief(_), + }); }; - -const toUint8Array = (data) => { - if (typeof data === "string") { - return fromUtf8(data); - } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data); +const de_ManagedAgent = (output, context) => { + return smithyClient.take(output, { + lastStartedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + lastStatus: smithyClient.expectString, + name: smithyClient.expectString, + reason: smithyClient.expectString, + }); }; - -const 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 utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); +const de_ManagedAgents = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_ManagedAgent(entry); + }); + return retVal; }; - -exports.fromUtf8 = fromUtf8; -exports.toUint8Array = toUint8Array; -exports.toUtf8 = toUtf8; - - -/***/ }), - -/***/ 55606: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var client = __nccwpck_require__(5152); -var propertyProvider = __nccwpck_require__(29006); - -const ENV_KEY = "AWS_ACCESS_KEY_ID"; -const ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; -const ENV_SESSION = "AWS_SESSION_TOKEN"; -const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; -const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; -const ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; -const 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 }), - }; - client.setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g"); - return credentials; - } - throw new propertyProvider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); +const de_ManagedInstancesProvider = (output, context) => { + return smithyClient.take(output, { + infrastructureRoleArn: smithyClient.expectString, + instanceLaunchTemplate: (_) => de_InstanceLaunchTemplate(_), + propagateTags: smithyClient.expectString, + }); }; - -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; - - -/***/ }), - -/***/ 29006: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -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); - } -} - -const 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; +const de_MemoryGiBPerVCpuRequest = (output, context) => { + return smithyClient.take(output, { + max: smithyClient.limitedParseDouble, + min: smithyClient.limitedParseDouble, + }); }; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const 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; - }; +const de_NetworkBandwidthGbpsRequest = (output, context) => { + return smithyClient.take(output, { + max: smithyClient.limitedParseDouble, + min: smithyClient.limitedParseDouble, + }); +}; +const de_ProtectedTask = (output, context) => { + return smithyClient.take(output, { + expirationDate: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + protectionEnabled: smithyClient.expectBoolean, + taskArn: smithyClient.expectString, + }); +}; +const de_ProtectedTasks = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_ProtectedTask(entry); + }); + return retVal; +}; +const de_RegisterContainerInstanceResponse = (output, context) => { + return smithyClient.take(output, { + containerInstance: (_) => de_ContainerInstance(_), + }); +}; +const de_RegisterTaskDefinitionResponse = (output, context) => { + return smithyClient.take(output, { + tags: smithyClient._json, + taskDefinition: (_) => de_TaskDefinition(_), + }); +}; +const de_Resource = (output, context) => { + return smithyClient.take(output, { + doubleValue: smithyClient.limitedParseDouble, + integerValue: smithyClient.expectInt32, + longValue: smithyClient.expectLong, + name: smithyClient.expectString, + stringSetValue: smithyClient._json, + type: smithyClient.expectString, + }); +}; +const de_Resources = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_Resource(entry); + }); + return retVal; +}; +const de_Rollback = (output, context) => { + return smithyClient.take(output, { + reason: smithyClient.expectString, + serviceRevisionArn: smithyClient.expectString, + startedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + }); +}; +const de_RunTaskResponse = (output, context) => { + return smithyClient.take(output, { + failures: smithyClient._json, + tasks: (_) => de_Tasks(_), + }); +}; +const de_Scale = (output, context) => { + return smithyClient.take(output, { + unit: smithyClient.expectString, + value: smithyClient.limitedParseDouble, + }); +}; +const de_Service = (output, context) => { + return smithyClient.take(output, { + availabilityZoneRebalancing: smithyClient.expectString, + capacityProviderStrategy: smithyClient._json, + clusterArn: smithyClient.expectString, + createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + createdBy: smithyClient.expectString, + deploymentConfiguration: (_) => de_DeploymentConfiguration(_), + deploymentController: smithyClient._json, + deployments: (_) => de_Deployments(_), + desiredCount: smithyClient.expectInt32, + enableECSManagedTags: smithyClient.expectBoolean, + enableExecuteCommand: smithyClient.expectBoolean, + events: (_) => de_ServiceEvents(_), + healthCheckGracePeriodSeconds: smithyClient.expectInt32, + launchType: smithyClient.expectString, + loadBalancers: smithyClient._json, + networkConfiguration: smithyClient._json, + pendingCount: smithyClient.expectInt32, + placementConstraints: smithyClient._json, + placementStrategy: smithyClient._json, + platformFamily: smithyClient.expectString, + platformVersion: smithyClient.expectString, + propagateTags: smithyClient.expectString, + roleArn: smithyClient.expectString, + runningCount: smithyClient.expectInt32, + schedulingStrategy: smithyClient.expectString, + serviceArn: smithyClient.expectString, + serviceName: smithyClient.expectString, + serviceRegistries: smithyClient._json, + status: smithyClient.expectString, + tags: smithyClient._json, + taskDefinition: smithyClient.expectString, + taskSets: (_) => de_TaskSets(_), + }); +}; +const de_ServiceDeployment = (output, context) => { + return smithyClient.take(output, { + alarms: smithyClient._json, + clusterArn: smithyClient.expectString, + createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + deploymentCircuitBreaker: smithyClient._json, + deploymentConfiguration: (_) => de_DeploymentConfiguration(_), + finishedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + lifecycleStage: smithyClient.expectString, + rollback: (_) => de_Rollback(_), + serviceArn: smithyClient.expectString, + serviceDeploymentArn: smithyClient.expectString, + sourceServiceRevisions: (_) => de_ServiceRevisionsSummaryList(_), + startedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + status: smithyClient.expectString, + statusReason: smithyClient.expectString, + stoppedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + targetServiceRevision: (_) => de_ServiceRevisionSummary(_), + updatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + }); +}; +const de_ServiceDeploymentBrief = (output, context) => { + return smithyClient.take(output, { + clusterArn: smithyClient.expectString, + createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + finishedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + serviceArn: smithyClient.expectString, + serviceDeploymentArn: smithyClient.expectString, + startedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + status: smithyClient.expectString, + statusReason: smithyClient.expectString, + targetServiceRevisionArn: smithyClient.expectString, + }); }; - -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; - - -/***/ }), - -/***/ 5861: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var credentialProviderEnv = __nccwpck_require__(55606); -var propertyProvider = __nccwpck_require__(22335); -var sharedIniFileLoader = __nccwpck_require__(35); - -const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; -const remoteProvider = async (init) => { - const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve(/* import() */).then(__nccwpck_require__.t.bind(__nccwpck_require__, 40566, 19)); - 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 } = await __nccwpck_require__.e(/* import() */ 605).then(__nccwpck_require__.bind(__nccwpck_require__, 98605)); - return propertyProvider.chain(fromHttp(init), fromContainerMetadata(init)); - } - if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") { - return async () => { - throw new propertyProvider.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger }); - }; - } - init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"); - return fromInstanceMetadata(init); +const de_ServiceDeployments = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_ServiceDeployment(entry); + }); + return retVal; }; - -let multipleCredentialSourceWarningEmitted = false; -const defaultProvider = (init = {}) => propertyProvider.memoize(propertyProvider.chain(async () => { - const profile = init.profile ?? process.env[sharedIniFileLoader.ENV_PROFILE]; - if (profile) { - const envStaticCredentialsAreSet = process.env[credentialProviderEnv.ENV_KEY] && process.env[credentialProviderEnv.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 propertyProvider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", { - logger: init.logger, - tryNextLink: true, - }); - } - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"); - return credentialProviderEnv.fromEnv(init)(); -}, async () => { - 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 propertyProvider.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger }); - } - const { fromSSO } = await __nccwpck_require__.e(/* import() */ 998).then(__nccwpck_require__.t.bind(__nccwpck_require__, 60998, 19)); - return fromSSO(init)(); -}, async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni"); - const { fromIni } = await __nccwpck_require__.e(/* import() */ 869).then(__nccwpck_require__.t.bind(__nccwpck_require__, 75869, 19)); - return fromIni(init)(); -}, async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess"); - const { fromProcess } = await __nccwpck_require__.e(/* import() */ 360).then(__nccwpck_require__.t.bind(__nccwpck_require__, 75360, 19)); - return fromProcess(init)(); -}, async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile"); - const { fromTokenFile } = await Promise.all(/* import() */[__nccwpck_require__.e(755), __nccwpck_require__.e(136), __nccwpck_require__.e(956)]).then(__nccwpck_require__.t.bind(__nccwpck_require__, 29956, 23)); - return fromTokenFile(init)(); -}, async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"); - return (await remoteProvider(init))(); -}, async () => { - throw new propertyProvider.CredentialsProviderError("Could not load credentials from any providers", { - tryNextLink: false, - logger: init.logger, +const de_ServiceDeploymentsBrief = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_ServiceDeploymentBrief(entry); }); -}), credentialsTreatedAsExpired, credentialsWillNeedRefresh); -const credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined; -const credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000; - -exports.credentialsTreatedAsExpired = credentialsTreatedAsExpired; -exports.credentialsWillNeedRefresh = credentialsWillNeedRefresh; -exports.defaultProvider = defaultProvider; - - -/***/ }), - -/***/ 22335: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -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); - } -} - -const 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; + return retVal; }; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const 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; - }; +const de_ServiceEvent = (output, context) => { + return smithyClient.take(output, { + createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + id: smithyClient.expectString, + message: smithyClient.expectString, + }); }; - -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; - - -/***/ }), - -/***/ 63733: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __nccwpck_require__(70857); -const path_1 = __nccwpck_require__(16928); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; +const de_ServiceEvents = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_ServiceEvent(entry); + }); + return retVal; }; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; +const de_ServiceRevision = (output, context) => { + return smithyClient.take(output, { + capacityProviderStrategy: smithyClient._json, + clusterArn: smithyClient.expectString, + containerImages: smithyClient._json, + createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + fargateEphemeralStorage: smithyClient._json, + guardDutyEnabled: smithyClient.expectBoolean, + launchType: smithyClient.expectString, + loadBalancers: smithyClient._json, + networkConfiguration: smithyClient._json, + platformFamily: smithyClient.expectString, + platformVersion: smithyClient.expectString, + resolvedConfiguration: smithyClient._json, + serviceArn: smithyClient.expectString, + serviceConnectConfiguration: smithyClient._json, + serviceRegistries: smithyClient._json, + serviceRevisionArn: smithyClient.expectString, + taskDefinition: smithyClient.expectString, + volumeConfigurations: smithyClient._json, + vpcLatticeConfigurations: smithyClient._json, + }); +}; +const de_ServiceRevisions = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_ServiceRevision(entry); + }); + return retVal; }; -exports.getHomeDir = getHomeDir; - - -/***/ }), - -/***/ 51586: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __nccwpck_require__(76982); -const path_1 = __nccwpck_require__(16928); -const getHomeDir_1 = __nccwpck_require__(63733); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); +const de_ServiceRevisionsSummaryList = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_ServiceRevisionSummary(entry); + }); + return retVal; }; -exports.getSSOTokenFilepath = getSSOTokenFilepath; - - -/***/ }), - -/***/ 12197: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; -const fs_1 = __nccwpck_require__(79896); -const getSSOTokenFilepath_1 = __nccwpck_require__(51586); -const { readFile } = fs_1.promises; -exports.tokenIntercept = {}; -const getSSOTokenFromFile = async (id) => { - if (exports.tokenIntercept[id]) { - return exports.tokenIntercept[id]; - } - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); +const de_ServiceRevisionSummary = (output, context) => { + return smithyClient.take(output, { + arn: smithyClient.expectString, + pendingTaskCount: smithyClient.expectInt32, + requestedProductionTrafficWeight: smithyClient.limitedParseDouble, + requestedTaskCount: smithyClient.expectInt32, + requestedTestTrafficWeight: smithyClient.limitedParseDouble, + runningTaskCount: smithyClient.expectInt32, + }); }; -exports.getSSOTokenFromFile = getSSOTokenFromFile; - - -/***/ }), - -/***/ 35: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var getHomeDir = __nccwpck_require__(63733); -var getSSOTokenFilepath = __nccwpck_require__(51586); -var getSSOTokenFromFile = __nccwpck_require__(12197); -var path = __nccwpck_require__(16928); -var types = __nccwpck_require__(39831); -var slurpFile = __nccwpck_require__(31325); - -const ENV_PROFILE = "AWS_PROFILE"; -const DEFAULT_PROFILE = "default"; -const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; - -const CONFIG_PREFIX_SEPARATOR = "."; - -const getConfigData = (data) => Object.entries(data) - .filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; - } - return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}) - .reduce((acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; -}, { - ...(data.default && { default: data.default }), -}); - -const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); - -const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); - -const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -const profileNameBlockList = ["__proto__", "profile __proto__"]; -const 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(types.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; +const de_Services = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_Service(entry); + }); + return retVal; }; - -const swallowError$1 = () => ({}); -const loadSharedConfigFiles = async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = getHomeDir.getHomeDir(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = path.join(homeDir, filepath.slice(2)); - } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); - } - const parsedFiles = await Promise.all([ - slurpFile.slurpFile(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .then(getConfigData) - .catch(swallowError$1), - slurpFile.slurpFile(resolvedFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .catch(swallowError$1), - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1], - }; +const de_StartTaskResponse = (output, context) => { + return smithyClient.take(output, { + failures: smithyClient._json, + tasks: (_) => de_Tasks(_), + }); }; - -const getSsoSessionData = (data) => Object.entries(data) - .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) - .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); - -const swallowError = () => ({}); -const loadSsoSessionData = async (init = {}) => slurpFile.slurpFile(init.configFilepath ?? getConfigFilepath()) - .then(parseIni) - .then(getSsoSessionData) - .catch(swallowError); - -const 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; +const de_StopTaskResponse = (output, context) => { + return smithyClient.take(output, { + task: (_) => de_Task(_), + }); }; - -const parseKnownFiles = async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); +const de_Task = (output, context) => { + return smithyClient.take(output, { + attachments: smithyClient._json, + attributes: smithyClient._json, + availabilityZone: smithyClient.expectString, + capacityProviderName: smithyClient.expectString, + clusterArn: smithyClient.expectString, + connectivity: smithyClient.expectString, + connectivityAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + containerInstanceArn: smithyClient.expectString, + containers: (_) => de_Containers(_), + cpu: smithyClient.expectString, + createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + desiredStatus: smithyClient.expectString, + enableExecuteCommand: smithyClient.expectBoolean, + ephemeralStorage: smithyClient._json, + executionStoppedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + fargateEphemeralStorage: smithyClient._json, + group: smithyClient.expectString, + healthStatus: smithyClient.expectString, + inferenceAccelerators: smithyClient._json, + lastStatus: smithyClient.expectString, + launchType: smithyClient.expectString, + memory: smithyClient.expectString, + overrides: smithyClient._json, + platformFamily: smithyClient.expectString, + platformVersion: smithyClient.expectString, + pullStartedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + pullStoppedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + startedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + startedBy: smithyClient.expectString, + stopCode: smithyClient.expectString, + stoppedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + stoppedReason: smithyClient.expectString, + stoppingAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + tags: smithyClient._json, + taskArn: smithyClient.expectString, + taskDefinitionArn: smithyClient.expectString, + version: smithyClient.expectLong, + }); }; - -const externalDataInterceptor = { - getFileRecord() { - return slurpFile.fileIntercept; - }, - interceptFile(path, contents) { - slurpFile.fileIntercept[path] = Promise.resolve(contents); - }, - getTokenRecord() { - return getSSOTokenFromFile.tokenIntercept; - }, - interceptToken(id, contents) { - getSSOTokenFromFile.tokenIntercept[id] = contents; - }, +const de_TaskDefinition = (output, context) => { + return smithyClient.take(output, { + compatibilities: smithyClient._json, + containerDefinitions: smithyClient._json, + cpu: smithyClient.expectString, + deregisteredAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + enableFaultInjection: smithyClient.expectBoolean, + ephemeralStorage: smithyClient._json, + executionRoleArn: smithyClient.expectString, + family: smithyClient.expectString, + inferenceAccelerators: smithyClient._json, + ipcMode: smithyClient.expectString, + memory: smithyClient.expectString, + networkMode: smithyClient.expectString, + pidMode: smithyClient.expectString, + placementConstraints: smithyClient._json, + proxyConfiguration: smithyClient._json, + registeredAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + registeredBy: smithyClient.expectString, + requiresAttributes: smithyClient._json, + requiresCompatibilities: smithyClient._json, + revision: smithyClient.expectInt32, + runtimePlatform: smithyClient._json, + status: smithyClient.expectString, + taskDefinitionArn: smithyClient.expectString, + taskRoleArn: smithyClient.expectString, + volumes: smithyClient._json, + }); }; - -Object.defineProperty(exports, "getSSOTokenFromFile", ({ - enumerable: true, - get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } -})); -exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; -exports.DEFAULT_PROFILE = DEFAULT_PROFILE; -exports.ENV_PROFILE = ENV_PROFILE; -exports.externalDataInterceptor = externalDataInterceptor; -exports.getProfileName = getProfileName; -exports.loadSharedConfigFiles = loadSharedConfigFiles; -exports.loadSsoSessionData = loadSsoSessionData; -exports.parseKnownFiles = parseKnownFiles; -Object.keys(getHomeDir).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getHomeDir[k]; } +const de_TaskDefinitionList = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_TaskDefinition(entry); }); -}); -Object.keys(getSSOTokenFilepath).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getSSOTokenFilepath[k]; } + return retVal; +}; +const de_Tasks = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_Task(entry); }); -}); - - -/***/ }), - -/***/ 31325: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = void 0; -const fs_1 = __nccwpck_require__(79896); -const { readFile } = fs_1.promises; -exports.filePromisesHash = {}; -exports.fileIntercept = {}; -const slurpFile = (path, options) => { - if (exports.fileIntercept[path] !== undefined) { - return exports.fileIntercept[path]; - } - if (!exports.filePromisesHash[path] || options?.ignoreCache) { - exports.filePromisesHash[path] = readFile(path, "utf8"); - } - return exports.filePromisesHash[path]; + return retVal; +}; +const de_TaskSet = (output, context) => { + return smithyClient.take(output, { + capacityProviderStrategy: smithyClient._json, + clusterArn: smithyClient.expectString, + computedDesiredCount: smithyClient.expectInt32, + createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + externalId: smithyClient.expectString, + fargateEphemeralStorage: smithyClient._json, + id: smithyClient.expectString, + launchType: smithyClient.expectString, + loadBalancers: smithyClient._json, + networkConfiguration: smithyClient._json, + pendingCount: smithyClient.expectInt32, + platformFamily: smithyClient.expectString, + platformVersion: smithyClient.expectString, + runningCount: smithyClient.expectInt32, + scale: (_) => de_Scale(_), + serviceArn: smithyClient.expectString, + serviceRegistries: smithyClient._json, + stabilityStatus: smithyClient.expectString, + stabilityStatusAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + startedBy: smithyClient.expectString, + status: smithyClient.expectString, + tags: smithyClient._json, + taskDefinition: smithyClient.expectString, + taskSetArn: smithyClient.expectString, + updatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))), + }); +}; +const de_TaskSets = (output, context) => { + const retVal = (output || []) + .filter((e) => e != null) + .map((entry) => { + return de_TaskSet(entry); + }); + return retVal; }; -exports.slurpFile = slurpFile; - - -/***/ }), - -/***/ 39831: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; +const de_TotalLocalStorageGBRequest = (output, context) => { + return smithyClient.take(output, { + max: smithyClient.limitedParseDouble, + min: smithyClient.limitedParseDouble, + }); }; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); +const de_UpdateCapacityProviderResponse = (output, context) => { + return smithyClient.take(output, { + capacityProvider: (_) => de_CapacityProvider(_), }); - return runtimeConfig; }; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); +const de_UpdateContainerAgentResponse = (output, context) => { + return smithyClient.take(output, { + containerInstance: (_) => de_ContainerInstance(_), + }); }; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); +const de_UpdateContainerInstancesStateResponse = (output, context) => { + return smithyClient.take(output, { + containerInstances: (_) => de_ContainerInstances(_), + failures: smithyClient._json, + }); }; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - -/***/ }), - -/***/ 52590: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var protocolHttp = __nccwpck_require__(99252); - -function resolveHostHeaderConfig(input) { - return input; -} -const hostHeaderMiddleware = (options) => (next) => async (args) => { - if (!protocolHttp.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); +const de_UpdateServicePrimaryTaskSetResponse = (output, context) => { + return smithyClient.take(output, { + taskSet: (_) => de_TaskSet(_), + }); }; -const hostHeaderMiddlewareOptions = { - name: "hostHeaderMiddleware", - step: "build", - priority: "low", - tags: ["HOST"], - override: true, +const de_UpdateServiceResponse = (output, context) => { + return smithyClient.take(output, { + service: (_) => de_Service(_), + }); }; -const getHostHeaderPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); - }, +const de_UpdateTaskProtectionResponse = (output, context) => { + return smithyClient.take(output, { + failures: smithyClient._json, + protectedTasks: (_) => de_ProtectedTasks(_), + }); +}; +const de_UpdateTaskSetResponse = (output, context) => { + return smithyClient.take(output, { + taskSet: (_) => de_TaskSet(_), + }); +}; +const 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"], }); - -exports.getHostHeaderPlugin = getHostHeaderPlugin; -exports.hostHeaderMiddleware = hostHeaderMiddleware; -exports.hostHeaderMiddlewareOptions = hostHeaderMiddlewareOptions; -exports.resolveHostHeaderConfig = resolveHostHeaderConfig; - - -/***/ }), - -/***/ 99252: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var types = __nccwpck_require__(51026); - -const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - }, +const throwDefaultError = smithyClient.withBaseException(ECSServiceException); +const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers, }; + if (body !== undefined) { + contents.body = body; + } + return new protocolHttp.HttpRequest(contents); }; -const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { +function sharedHeaders(operation) { return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler(), + "content-type": "application/x-amz-json-1.1", + "x-amz-target": `AmazonEC2ContainerServiceV20141113.${operation}`, }; -}; - -class Field { - name; - kind; - values; - constructor({ name, kind = types.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); - } -} - -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"; - } +class CreateCapacityProviderCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "CreateCapacityProvider", {}) + .n("ECSClient", "CreateCapacityProviderCommand") + .f(void 0, void 0) + .ser(se_CreateCapacityProviderCommand) + .de(de_CreateCapacityProviderCommand) + .build() { } -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); +class CreateClusterCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "CreateCluster", {}) + .n("ECSClient", "CreateClusterCommand") + .f(void 0, void 0) + .ser(se_CreateClusterCommand) + .de(de_CreateClusterCommand) + .build() { } -exports.Field = Field; -exports.Fields = Fields; -exports.HttpRequest = HttpRequest; -exports.HttpResponse = HttpResponse; -exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; -exports.isValidHostname = isValidHostname; -exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; - - -/***/ }), - -/***/ 51026: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - -/***/ }), - -/***/ 85242: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const 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; - } -}; -const loggerMiddlewareOptions = { - name: "loggerMiddleware", - tags: ["LOGGER"], - step: "initialize", - override: true, -}; -const getLoggerPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); - }, -}); +class CreateServiceCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "CreateService", {}) + .n("ECSClient", "CreateServiceCommand") + .f(void 0, void 0) + .ser(se_CreateServiceCommand) + .de(de_CreateServiceCommand) + .build() { +} -exports.getLoggerPlugin = getLoggerPlugin; -exports.loggerMiddleware = loggerMiddleware; -exports.loggerMiddlewareOptions = loggerMiddlewareOptions; +class CreateTaskSetCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "CreateTaskSet", {}) + .n("ECSClient", "CreateTaskSetCommand") + .f(void 0, void 0) + .ser(se_CreateTaskSetCommand) + .de(de_CreateTaskSetCommand) + .build() { +} +class DeleteAccountSettingCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DeleteAccountSetting", {}) + .n("ECSClient", "DeleteAccountSettingCommand") + .f(void 0, void 0) + .ser(se_DeleteAccountSettingCommand) + .de(de_DeleteAccountSettingCommand) + .build() { +} -/***/ }), +class DeleteAttributesCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DeleteAttributes", {}) + .n("ECSClient", "DeleteAttributesCommand") + .f(void 0, void 0) + .ser(se_DeleteAttributesCommand) + .de(de_DeleteAttributesCommand) + .build() { +} -/***/ 81568: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +class DeleteCapacityProviderCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DeleteCapacityProvider", {}) + .n("ECSClient", "DeleteCapacityProviderCommand") + .f(void 0, void 0) + .ser(se_DeleteCapacityProviderCommand) + .de(de_DeleteCapacityProviderCommand) + .build() { +} -"use strict"; +class DeleteClusterCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DeleteCluster", {}) + .n("ECSClient", "DeleteClusterCommand") + .f(void 0, void 0) + .ser(se_DeleteClusterCommand) + .de(de_DeleteClusterCommand) + .build() { +} +class DeleteServiceCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DeleteService", {}) + .n("ECSClient", "DeleteServiceCommand") + .f(void 0, void 0) + .ser(se_DeleteServiceCommand) + .de(de_DeleteServiceCommand) + .build() { +} -var recursionDetectionMiddleware = __nccwpck_require__(22521); +class DeleteTaskDefinitionsCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DeleteTaskDefinitions", {}) + .n("ECSClient", "DeleteTaskDefinitionsCommand") + .f(void 0, void 0) + .ser(se_DeleteTaskDefinitionsCommand) + .de(de_DeleteTaskDefinitionsCommand) + .build() { +} -const recursionDetectionMiddlewareOptions = { - step: "build", - tags: ["RECURSION_DETECTION"], - name: "recursionDetectionMiddleware", - override: true, - priority: "low", -}; +class DeleteTaskSetCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DeleteTaskSet", {}) + .n("ECSClient", "DeleteTaskSetCommand") + .f(void 0, void 0) + .ser(se_DeleteTaskSetCommand) + .de(de_DeleteTaskSetCommand) + .build() { +} -const getRecursionDetectionPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.add(recursionDetectionMiddleware.recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions); - }, -}); +class DeregisterContainerInstanceCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DeregisterContainerInstance", {}) + .n("ECSClient", "DeregisterContainerInstanceCommand") + .f(void 0, void 0) + .ser(se_DeregisterContainerInstanceCommand) + .de(de_DeregisterContainerInstanceCommand) + .build() { +} -exports.getRecursionDetectionPlugin = getRecursionDetectionPlugin; -Object.keys(recursionDetectionMiddleware).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return recursionDetectionMiddleware[k]; } - }); -}); +class DeregisterTaskDefinitionCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DeregisterTaskDefinition", {}) + .n("ECSClient", "DeregisterTaskDefinitionCommand") + .f(void 0, void 0) + .ser(se_DeregisterTaskDefinitionCommand) + .de(de_DeregisterTaskDefinitionCommand) + .build() { +} +class DescribeCapacityProvidersCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DescribeCapacityProviders", {}) + .n("ECSClient", "DescribeCapacityProvidersCommand") + .f(void 0, void 0) + .ser(se_DescribeCapacityProvidersCommand) + .de(de_DescribeCapacityProvidersCommand) + .build() { +} -/***/ }), +class DescribeClustersCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DescribeClusters", {}) + .n("ECSClient", "DescribeClustersCommand") + .f(void 0, void 0) + .ser(se_DescribeClustersCommand) + .de(de_DescribeClustersCommand) + .build() { +} -/***/ 22521: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +class DescribeContainerInstancesCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DescribeContainerInstances", {}) + .n("ECSClient", "DescribeContainerInstancesCommand") + .f(void 0, void 0) + .ser(se_DescribeContainerInstancesCommand) + .de(de_DescribeContainerInstancesCommand) + .build() { +} -"use strict"; +class DescribeServiceDeploymentsCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DescribeServiceDeployments", {}) + .n("ECSClient", "DescribeServiceDeploymentsCommand") + .f(void 0, void 0) + .ser(se_DescribeServiceDeploymentsCommand) + .de(de_DescribeServiceDeploymentsCommand) + .build() { +} -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.recursionDetectionMiddleware = void 0; -const lambda_invoke_store_1 = __nccwpck_require__(37453); -const protocol_http_1 = __nccwpck_require__(24138); -const TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; -const ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; -const ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; -const recursionDetectionMiddleware = () => (next) => async (args) => { - const { request } = args; - if (!protocol_http_1.HttpRequest.isInstance(request)) { - return next(args); - } - const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? - TRACE_ID_HEADER_NAME; - if (request.headers.hasOwnProperty(traceIdHeader)) { - return next(args); - } - const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; - const traceIdFromEnv = process.env[ENV_TRACE_ID]; - const traceIdFromInvokeStore = lambda_invoke_store_1.InvokeStore.getXRayTraceId(); - const traceId = traceIdFromInvokeStore ?? traceIdFromEnv; - const nonEmptyString = (str) => typeof str === "string" && str.length > 0; - if (nonEmptyString(functionName) && nonEmptyString(traceId)) { - request.headers[TRACE_ID_HEADER_NAME] = traceId; - } - return next({ - ...args, - request, - }); -}; -exports.recursionDetectionMiddleware = recursionDetectionMiddleware; +class DescribeServiceRevisionsCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DescribeServiceRevisions", {}) + .n("ECSClient", "DescribeServiceRevisionsCommand") + .f(void 0, void 0) + .ser(se_DescribeServiceRevisionsCommand) + .de(de_DescribeServiceRevisionsCommand) + .build() { +} +class DescribeServicesCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DescribeServices", {}) + .n("ECSClient", "DescribeServicesCommand") + .f(void 0, void 0) + .ser(se_DescribeServicesCommand) + .de(de_DescribeServicesCommand) + .build() { +} -/***/ }), +class DescribeTaskDefinitionCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DescribeTaskDefinition", {}) + .n("ECSClient", "DescribeTaskDefinitionCommand") + .f(void 0, void 0) + .ser(se_DescribeTaskDefinitionCommand) + .de(de_DescribeTaskDefinitionCommand) + .build() { +} -/***/ 24138: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +class DescribeTasksCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DescribeTasks", {}) + .n("ECSClient", "DescribeTasksCommand") + .f(void 0, void 0) + .ser(se_DescribeTasksCommand) + .de(de_DescribeTasksCommand) + .build() { +} -"use strict"; +class DescribeTaskSetsCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DescribeTaskSets", {}) + .n("ECSClient", "DescribeTaskSetsCommand") + .f(void 0, void 0) + .ser(se_DescribeTaskSetsCommand) + .de(de_DescribeTaskSetsCommand) + .build() { +} +class DiscoverPollEndpointCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "DiscoverPollEndpoint", {}) + .n("ECSClient", "DiscoverPollEndpointCommand") + .f(void 0, void 0) + .ser(se_DiscoverPollEndpointCommand) + .de(de_DiscoverPollEndpointCommand) + .build() { +} -var types = __nccwpck_require__(24064); +class ExecuteCommandCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "ExecuteCommand", {}) + .n("ECSClient", "ExecuteCommandCommand") + .f(void 0, ExecuteCommandResponseFilterSensitiveLog) + .ser(se_ExecuteCommandCommand) + .de(de_ExecuteCommandCommand) + .build() { +} -const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - }, - }; -}; -const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler(), - }; -}; +class GetTaskProtectionCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "GetTaskProtection", {}) + .n("ECSClient", "GetTaskProtectionCommand") + .f(void 0, void 0) + .ser(se_GetTaskProtectionCommand) + .de(de_GetTaskProtectionCommand) + .build() { +} -class Field { - name; - kind; - values; - constructor({ name, kind = types.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 ListAccountSettingsCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "ListAccountSettings", {}) + .n("ECSClient", "ListAccountSettingsCommand") + .f(void 0, void 0) + .ser(se_ListAccountSettingsCommand) + .de(de_ListAccountSettingsCommand) + .build() { } -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); - } +class ListAttributesCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "ListAttributes", {}) + .n("ECSClient", "ListAttributesCommand") + .f(void 0, void 0) + .ser(se_ListAttributesCommand) + .de(de_ListAttributesCommand) + .build() { } -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); - } +class ListClustersCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "ListClusters", {}) + .n("ECSClient", "ListClustersCommand") + .f(void 0, void 0) + .ser(se_ListClustersCommand) + .de(de_ListClustersCommand) + .build() { } -function cloneQuery(query) { - return Object.keys(query).reduce((carry, paramName) => { - const param = query[paramName]; - return { - ...carry, - [paramName]: Array.isArray(param) ? [...param] : param, - }; - }, {}); + +class ListContainerInstancesCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "ListContainerInstances", {}) + .n("ECSClient", "ListContainerInstancesCommand") + .f(void 0, void 0) + .ser(se_ListContainerInstancesCommand) + .de(de_ListContainerInstancesCommand) + .build() { } -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"; - } +class ListServiceDeploymentsCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "ListServiceDeployments", {}) + .n("ECSClient", "ListServiceDeploymentsCommand") + .f(void 0, void 0) + .ser(se_ListServiceDeploymentsCommand) + .de(de_ListServiceDeploymentsCommand) + .build() { +} + +class ListServicesByNamespaceCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "ListServicesByNamespace", {}) + .n("ECSClient", "ListServicesByNamespaceCommand") + .f(void 0, void 0) + .ser(se_ListServicesByNamespaceCommand) + .de(de_ListServicesByNamespaceCommand) + .build() { } -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); +class ListServicesCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "ListServices", {}) + .n("ECSClient", "ListServicesCommand") + .f(void 0, void 0) + .ser(se_ListServicesCommand) + .de(de_ListServicesCommand) + .build() { } -exports.Field = Field; -exports.Fields = Fields; -exports.HttpRequest = HttpRequest; -exports.HttpResponse = HttpResponse; -exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; -exports.isValidHostname = isValidHostname; -exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; +class ListTagsForResourceCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "ListTagsForResource", {}) + .n("ECSClient", "ListTagsForResourceCommand") + .f(void 0, void 0) + .ser(se_ListTagsForResourceCommand) + .de(de_ListTagsForResourceCommand) + .build() { +} +class ListTaskDefinitionFamiliesCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "ListTaskDefinitionFamilies", {}) + .n("ECSClient", "ListTaskDefinitionFamiliesCommand") + .f(void 0, void 0) + .ser(se_ListTaskDefinitionFamiliesCommand) + .de(de_ListTaskDefinitionFamiliesCommand) + .build() { +} -/***/ }), +class ListTaskDefinitionsCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "ListTaskDefinitions", {}) + .n("ECSClient", "ListTaskDefinitionsCommand") + .f(void 0, void 0) + .ser(se_ListTaskDefinitionsCommand) + .de(de_ListTaskDefinitionsCommand) + .build() { +} -/***/ 24064: -/***/ ((__unused_webpack_module, exports) => { +class ListTasksCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "ListTasks", {}) + .n("ECSClient", "ListTasksCommand") + .f(void 0, void 0) + .ser(se_ListTasksCommand) + .de(de_ListTasksCommand) + .build() { +} -"use strict"; +class PutAccountSettingCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "PutAccountSetting", {}) + .n("ECSClient", "PutAccountSettingCommand") + .f(void 0, void 0) + .ser(se_PutAccountSettingCommand) + .de(de_PutAccountSettingCommand) + .build() { +} +class PutAccountSettingDefaultCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "PutAccountSettingDefault", {}) + .n("ECSClient", "PutAccountSettingDefaultCommand") + .f(void 0, void 0) + .ser(se_PutAccountSettingDefaultCommand) + .de(de_PutAccountSettingDefaultCommand) + .build() { +} -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); +class PutAttributesCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "PutAttributes", {}) + .n("ECSClient", "PutAttributesCommand") + .f(void 0, void 0) + .ser(se_PutAttributesCommand) + .de(de_PutAttributesCommand) + .build() { +} -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); +class PutClusterCapacityProvidersCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "PutClusterCapacityProviders", {}) + .n("ECSClient", "PutClusterCapacityProvidersCommand") + .f(void 0, void 0) + .ser(se_PutClusterCapacityProvidersCommand) + .de(de_PutClusterCapacityProvidersCommand) + .build() { +} -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); +class RegisterContainerInstanceCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "RegisterContainerInstance", {}) + .n("ECSClient", "RegisterContainerInstanceCommand") + .f(void 0, void 0) + .ser(se_RegisterContainerInstanceCommand) + .de(de_RegisterContainerInstanceCommand) + .build() { +} -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; +class RegisterTaskDefinitionCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "RegisterTaskDefinition", {}) + .n("ECSClient", "RegisterTaskDefinitionCommand") + .f(void 0, void 0) + .ser(se_RegisterTaskDefinitionCommand) + .de(de_RegisterTaskDefinitionCommand) + .build() { +} -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; +class RunTaskCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "RunTask", {}) + .n("ECSClient", "RunTaskCommand") + .f(void 0, void 0) + .ser(se_RunTaskCommand) + .de(de_RunTaskCommand) + .build() { +} -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); +class StartTaskCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "StartTask", {}) + .n("ECSClient", "StartTaskCommand") + .f(void 0, void 0) + .ser(se_StartTaskCommand) + .de(de_StartTaskCommand) + .build() { +} -const SMITHY_CONTEXT_KEY = "__smithy_context"; +class StopServiceDeploymentCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "StopServiceDeployment", {}) + .n("ECSClient", "StopServiceDeploymentCommand") + .f(void 0, void 0) + .ser(se_StopServiceDeploymentCommand) + .de(de_StopServiceDeploymentCommand) + .build() { +} -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); +class StopTaskCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "StopTask", {}) + .n("ECSClient", "StopTaskCommand") + .f(void 0, void 0) + .ser(se_StopTaskCommand) + .de(de_StopTaskCommand) + .build() { +} -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); +class SubmitAttachmentStateChangesCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "SubmitAttachmentStateChanges", {}) + .n("ECSClient", "SubmitAttachmentStateChangesCommand") + .f(void 0, void 0) + .ser(se_SubmitAttachmentStateChangesCommand) + .de(de_SubmitAttachmentStateChangesCommand) + .build() { +} -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; +class SubmitContainerStateChangeCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "SubmitContainerStateChange", {}) + .n("ECSClient", "SubmitContainerStateChangeCommand") + .f(void 0, void 0) + .ser(se_SubmitContainerStateChangeCommand) + .de(de_SubmitContainerStateChangeCommand) + .build() { +} +class SubmitTaskStateChangeCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "SubmitTaskStateChange", {}) + .n("ECSClient", "SubmitTaskStateChangeCommand") + .f(void 0, void 0) + .ser(se_SubmitTaskStateChangeCommand) + .de(de_SubmitTaskStateChangeCommand) + .build() { +} -/***/ }), +class TagResourceCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "TagResource", {}) + .n("ECSClient", "TagResourceCommand") + .f(void 0, void 0) + .ser(se_TagResourceCommand) + .de(de_TagResourceCommand) + .build() { +} -/***/ 32959: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +class UntagResourceCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "UntagResource", {}) + .n("ECSClient", "UntagResourceCommand") + .f(void 0, void 0) + .ser(se_UntagResourceCommand) + .de(de_UntagResourceCommand) + .build() { +} -"use strict"; +class UpdateCapacityProviderCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "UpdateCapacityProvider", {}) + .n("ECSClient", "UpdateCapacityProviderCommand") + .f(void 0, void 0) + .ser(se_UpdateCapacityProviderCommand) + .de(de_UpdateCapacityProviderCommand) + .build() { +} +class UpdateClusterCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "UpdateCluster", {}) + .n("ECSClient", "UpdateClusterCommand") + .f(void 0, void 0) + .ser(se_UpdateClusterCommand) + .de(de_UpdateClusterCommand) + .build() { +} -var core = __nccwpck_require__(31863); -var utilEndpoints = __nccwpck_require__(83068); -var protocolHttp = __nccwpck_require__(22475); -var core$1 = __nccwpck_require__(8704); +class UpdateClusterSettingsCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "UpdateClusterSettings", {}) + .n("ECSClient", "UpdateClusterSettingsCommand") + .f(void 0, void 0) + .ser(se_UpdateClusterSettingsCommand) + .de(de_UpdateClusterSettingsCommand) + .build() { +} -const DEFAULT_UA_APP_ID = undefined; -function isValidUserAgentAppId(appId) { - if (appId === undefined) { - return true; - } - return typeof appId === "string" && appId.length <= 50; +class UpdateContainerAgentCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "UpdateContainerAgent", {}) + .n("ECSClient", "UpdateContainerAgentCommand") + .f(void 0, void 0) + .ser(se_UpdateContainerAgentCommand) + .de(de_UpdateContainerAgentCommand) + .build() { } -function resolveUserAgentConfig(input) { - const normalizedAppIdProvider = core.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; - }, - }); + +class UpdateContainerInstancesStateCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "UpdateContainerInstancesState", {}) + .n("ECSClient", "UpdateContainerInstancesStateCommand") + .f(void 0, void 0) + .ser(se_UpdateContainerInstancesStateCommand) + .de(de_UpdateContainerInstancesStateCommand) + .build() { } -const 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") { - core$1.setFeature(context, "PROTOCOL_RPC_V2_CBOR", "M"); - } - if (typeof config.retryStrategy === "function") { - const retryStrategy = await config.retryStrategy(); - if (typeof retryStrategy.acquireInitialRetryToken === "function") { - if (retryStrategy.constructor?.name?.includes("Adaptive")) { - core$1.setFeature(context, "RETRY_MODE_ADAPTIVE", "F"); - } - else { - core$1.setFeature(context, "RETRY_MODE_STANDARD", "E"); - } - } - else { - core$1.setFeature(context, "RETRY_MODE_LEGACY", "D"); - } - } - if (typeof config.accountIdEndpointMode === "function") { - const endpointV2 = context.endpointV2; - if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) { - core$1.setFeature(context, "ACCOUNT_ID_ENDPOINT", "O"); - } - switch (await config.accountIdEndpointMode?.()) { - case "disabled": - core$1.setFeature(context, "ACCOUNT_ID_MODE_DISABLED", "Q"); - break; - case "preferred": - core$1.setFeature(context, "ACCOUNT_ID_MODE_PREFERRED", "P"); - break; - case "required": - core$1.setFeature(context, "ACCOUNT_ID_MODE_REQUIRED", "R"); - break; - } - } - const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity; - if (identity?.$source) { - const credentials = identity; - if (credentials.accountId) { - core$1.setFeature(context, "RESOLVED_ACCOUNT_ID", "T"); - } - for (const [key, value] of Object.entries(credentials.$source ?? {})) { - core$1.setFeature(context, key, value); - } - } +class UpdateServiceCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "UpdateService", {}) + .n("ECSClient", "UpdateServiceCommand") + .f(void 0, void 0) + .ser(se_UpdateServiceCommand) + .de(de_UpdateServiceCommand) + .build() { } -const USER_AGENT = "user-agent"; -const X_AMZ_USER_AGENT = "x-amz-user-agent"; -const SPACE = " "; -const UA_NAME_SEPARATOR = "/"; -const UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; -const UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; -const UA_ESCAPE_CHAR = "-"; +class UpdateServicePrimaryTaskSetCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "UpdateServicePrimaryTaskSet", {}) + .n("ECSClient", "UpdateServicePrimaryTaskSetCommand") + .f(void 0, void 0) + .ser(se_UpdateServicePrimaryTaskSetCommand) + .de(de_UpdateServicePrimaryTaskSetCommand) + .build() { +} -const 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; +class UpdateTaskProtectionCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "UpdateTaskProtection", {}) + .n("ECSClient", "UpdateTaskProtectionCommand") + .f(void 0, void 0) + .ser(se_UpdateTaskProtectionCommand) + .de(de_UpdateTaskProtectionCommand) + .build() { +} + +class UpdateTaskSetCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [ + middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize), + middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; +}) + .s("AmazonEC2ContainerServiceV20141113", "UpdateTaskSet", {}) + .n("ECSClient", "UpdateTaskSetCommand") + .f(void 0, void 0) + .ser(se_UpdateTaskSetCommand) + .de(de_UpdateTaskSetCommand) + .build() { } -const userAgentMiddleware = (options) => (next, context) => async (args) => { - const { request } = args; - if (!protocolHttp.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 = utilEndpoints.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, - }); -}; -const 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}`; - } - }, ""); -}; -const getUserAgentMiddlewareOptions = { - name: "getUserAgentMiddleware", - step: "build", - priority: "low", - tags: ["SET_USER_AGENT", "USER_AGENT"], - override: true, +const commands = { + CreateCapacityProviderCommand, + CreateClusterCommand, + CreateServiceCommand, + CreateTaskSetCommand, + DeleteAccountSettingCommand, + DeleteAttributesCommand, + DeleteCapacityProviderCommand, + DeleteClusterCommand, + DeleteServiceCommand, + DeleteTaskDefinitionsCommand, + DeleteTaskSetCommand, + DeregisterContainerInstanceCommand, + DeregisterTaskDefinitionCommand, + DescribeCapacityProvidersCommand, + DescribeClustersCommand, + DescribeContainerInstancesCommand, + DescribeServiceDeploymentsCommand, + DescribeServiceRevisionsCommand, + DescribeServicesCommand, + DescribeTaskDefinitionCommand, + DescribeTasksCommand, + DescribeTaskSetsCommand, + DiscoverPollEndpointCommand, + ExecuteCommandCommand, + GetTaskProtectionCommand, + ListAccountSettingsCommand, + ListAttributesCommand, + ListClustersCommand, + ListContainerInstancesCommand, + ListServiceDeploymentsCommand, + ListServicesCommand, + ListServicesByNamespaceCommand, + ListTagsForResourceCommand, + ListTaskDefinitionFamiliesCommand, + ListTaskDefinitionsCommand, + ListTasksCommand, + PutAccountSettingCommand, + PutAccountSettingDefaultCommand, + PutAttributesCommand, + PutClusterCapacityProvidersCommand, + RegisterContainerInstanceCommand, + RegisterTaskDefinitionCommand, + RunTaskCommand, + StartTaskCommand, + StopServiceDeploymentCommand, + StopTaskCommand, + SubmitAttachmentStateChangesCommand, + SubmitContainerStateChangeCommand, + SubmitTaskStateChangeCommand, + TagResourceCommand, + UntagResourceCommand, + UpdateCapacityProviderCommand, + UpdateClusterCommand, + UpdateClusterSettingsCommand, + UpdateContainerAgentCommand, + UpdateContainerInstancesStateCommand, + UpdateServiceCommand, + UpdateServicePrimaryTaskSetCommand, + UpdateTaskProtectionCommand, + UpdateTaskSetCommand, }; -const getUserAgentPlugin = (config) => ({ - applyToStack: (clientStack) => { - clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions); - }, -}); +class ECS extends ECSClient { +} +smithyClient.createAggregatedClient(commands, ECS); -exports.DEFAULT_UA_APP_ID = DEFAULT_UA_APP_ID; -exports.getUserAgentMiddlewareOptions = getUserAgentMiddlewareOptions; -exports.getUserAgentPlugin = getUserAgentPlugin; -exports.resolveUserAgentConfig = resolveUserAgentConfig; -exports.userAgentMiddleware = userAgentMiddleware; +const paginateListAccountSettings = core.createPaginator(ECSClient, ListAccountSettingsCommand, "nextToken", "nextToken", "maxResults"); +const paginateListAttributes = core.createPaginator(ECSClient, ListAttributesCommand, "nextToken", "nextToken", "maxResults"); -/***/ }), +const paginateListClusters = core.createPaginator(ECSClient, ListClustersCommand, "nextToken", "nextToken", "maxResults"); -/***/ 31863: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const paginateListContainerInstances = core.createPaginator(ECSClient, ListContainerInstancesCommand, "nextToken", "nextToken", "maxResults"); -"use strict"; +const paginateListServicesByNamespace = core.createPaginator(ECSClient, ListServicesByNamespaceCommand, "nextToken", "nextToken", "maxResults"); +const paginateListServices = core.createPaginator(ECSClient, ListServicesCommand, "nextToken", "nextToken", "maxResults"); -var types = __nccwpck_require__(14349); -var utilMiddleware = __nccwpck_require__(7403); -var middlewareSerde = __nccwpck_require__(93534); -var protocolHttp = __nccwpck_require__(22475); -var protocols = __nccwpck_require__(48977); +const paginateListTaskDefinitionFamilies = core.createPaginator(ECSClient, ListTaskDefinitionFamiliesCommand, "nextToken", "nextToken", "maxResults"); -const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); +const paginateListTaskDefinitions = core.createPaginator(ECSClient, ListTaskDefinitionsCommand, "nextToken", "nextToken", "maxResults"); -const 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; -}; +const paginateListTasks = core.createPaginator(ECSClient, ListTasksCommand, "nextToken", "nextToken", "maxResults"); -function convertHttpAuthSchemesToMap(httpAuthSchemes) { - const map = new Map(); - for (const scheme of httpAuthSchemes) { - map.set(scheme.schemeId, scheme); - } - return map; -} -const 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 = utilMiddleware.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 checkState$3 = async (client, input) => { + let reason; + try { + const result = await client.send(new DescribeServicesCommand(input)); + reason = result; + try { + const returnComparator = () => { + const flat_1 = [].concat(...result.failures); + const projection_3 = flat_1.map((element_2) => { + return element_2.reason; + }); + return projection_3; + }; + for (const anyStringEq_4 of returnComparator()) { + if (anyStringEq_4 == "MISSING") { + return { state: utilWaiter.WaiterState.FAILURE, reason }; + } + } } - const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config)); - if (!identityProvider) { - failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); - continue; + catch (e) { } + try { + const returnComparator = () => { + const flat_1 = [].concat(...result.services); + const projection_3 = flat_1.map((element_2) => { + return element_2.status; + }); + return projection_3; + }; + for (const anyStringEq_4 of returnComparator()) { + if (anyStringEq_4 == "INACTIVE") { + return { state: utilWaiter.WaiterState.SUCCESS, reason }; + } + } } - 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; + catch (e) { } } - if (!smithyContext.selectedHttpAuthScheme) { - throw new Error(failureReasons.join("\n")); + catch (exception) { + reason = exception; } - return next(args); + return { state: utilWaiter.WaiterState.RETRY, reason }; }; - -const httpAuthSchemeEndpointRuleSetMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: "endpointV2Middleware", +const waitForServicesInactive = async (params, input) => { + const serviceDefaults = { minDelay: 15, maxDelay: 120 }; + return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$3); }; -const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider, - }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); - }, -}); - -const httpAuthSchemeMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: middlewareSerde.serializerMiddlewareOption.name, +const waitUntilServicesInactive = async (params, input) => { + const serviceDefaults = { minDelay: 15, maxDelay: 120 }; + const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$3); + return utilWaiter.checkExceptions(result); }; -const getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider, - }), httpAuthSchemeMiddlewareOptions); - }, -}); -const defaultErrorHandler = (signingProperties) => (error) => { - throw error; -}; -const defaultSuccessHandler = (httpResponse, signingProperties) => { }; -const httpSigningMiddleware = (config) => (next, context) => async (args) => { - if (!protocolHttp.HttpRequest.isInstance(args.request)) { - return next(args); +const checkState$2 = async (client, input) => { + let reason; + try { + const result = await client.send(new DescribeServicesCommand(input)); + reason = result; + try { + const returnComparator = () => { + const flat_1 = [].concat(...result.failures); + const projection_3 = flat_1.map((element_2) => { + return element_2.reason; + }); + return projection_3; + }; + for (const anyStringEq_4 of returnComparator()) { + if (anyStringEq_4 == "MISSING") { + return { state: utilWaiter.WaiterState.FAILURE, reason }; + } + } + } + catch (e) { } + try { + const returnComparator = () => { + const flat_1 = [].concat(...result.services); + const projection_3 = flat_1.map((element_2) => { + return element_2.status; + }); + return projection_3; + }; + for (const anyStringEq_4 of returnComparator()) { + if (anyStringEq_4 == "DRAINING") { + return { state: utilWaiter.WaiterState.FAILURE, reason }; + } + } + } + catch (e) { } + try { + const returnComparator = () => { + const flat_1 = [].concat(...result.services); + const projection_3 = flat_1.map((element_2) => { + return element_2.status; + }); + return projection_3; + }; + for (const anyStringEq_4 of returnComparator()) { + if (anyStringEq_4 == "INACTIVE") { + return { state: utilWaiter.WaiterState.FAILURE, reason }; + } + } + } + catch (e) { } + try { + const returnComparator = () => { + const filterRes_2 = result.services.filter((element_1) => { + return !(element_1.deployments.length == 1.0 && element_1.runningCount == element_1.desiredCount); + }); + return filterRes_2.length == 0.0; + }; + if (returnComparator() == true) { + return { state: utilWaiter.WaiterState.SUCCESS, reason }; + } + } + catch (e) { } } - const smithyContext = utilMiddleware.getSmithyContext(context); - const scheme = smithyContext.selectedHttpAuthScheme; - if (!scheme) { - throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + catch (exception) { + reason = exception; } - 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; + return { state: utilWaiter.WaiterState.RETRY, reason }; }; - -const httpSigningMiddlewareOptions = { - step: "finalizeRequest", - tags: ["HTTP_SIGNING"], - name: "httpSigningMiddleware", - aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], - override: true, - relation: "after", - toMiddleware: "retryMiddleware", +const waitForServicesStable = async (params, input) => { + const serviceDefaults = { minDelay: 15, maxDelay: 120 }; + return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$2); }; -const getHttpSigningPlugin = (config) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpSigningMiddleware(), httpSigningMiddlewareOptions); - }, -}); - -const normalizeProvider = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; +const waitUntilServicesStable = async (params, input) => { + const serviceDefaults = { minDelay: 15, maxDelay: 120 }; + const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$2); + return utilWaiter.checkExceptions(result); }; -const 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); +const checkState$1 = async (client, input) => { + let reason; + try { + const result = await client.send(new DescribeTasksCommand(input)); + reason = result; + try { + const returnComparator = () => { + const flat_1 = [].concat(...result.tasks); + const projection_3 = flat_1.map((element_2) => { + return element_2.lastStatus; + }); + return projection_3; + }; + for (const anyStringEq_4 of returnComparator()) { + if (anyStringEq_4 == "STOPPED") { + return { state: utilWaiter.WaiterState.FAILURE, reason }; + } } - else { - throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); + } + catch (e) { } + try { + const returnComparator = () => { + const flat_1 = [].concat(...result.failures); + const projection_3 = flat_1.map((element_2) => { + return element_2.reason; + }); + return projection_3; + }; + for (const anyStringEq_4 of returnComparator()) { + if (anyStringEq_4 == "MISSING") { + return { state: utilWaiter.WaiterState.FAILURE, reason }; + } } - yield page; - const prevToken = token; - token = get(page, outputTokenName); - hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); } - return undefined; - }; -} -const get = (fromObject, path) => { - let cursor = fromObject; - const pathComponents = path.split("."); - for (const step of pathComponents) { - if (!cursor || typeof cursor !== "object") { - return undefined; + catch (e) { } + try { + const returnComparator = () => { + const flat_1 = [].concat(...result.tasks); + const projection_3 = flat_1.map((element_2) => { + return element_2.lastStatus; + }); + return projection_3; + }; + let allStringEq_5 = returnComparator().length > 0; + for (const element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && element_4 == "RUNNING"; + } + if (allStringEq_5) { + return { state: utilWaiter.WaiterState.SUCCESS, reason }; + } } - cursor = cursor[step]; - } - return cursor; -}; - -function setFeature(context, feature, value) { - if (!context.__smithy_context) { - context.__smithy_context = { - features: {}, - }; + catch (e) { } } - else if (!context.__smithy_context.features) { - context.__smithy_context.features = {}; + catch (exception) { + reason = exception; } - context.__smithy_context.features[feature] = value; -} + return { state: utilWaiter.WaiterState.RETRY, reason }; +}; +const waitForTasksRunning = async (params, input) => { + const serviceDefaults = { minDelay: 6, maxDelay: 120 }; + return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1); +}; +const waitUntilTasksRunning = async (params, input) => { + const serviceDefaults = { minDelay: 6, maxDelay: 120 }; + const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1); + return utilWaiter.checkExceptions(result); +}; -class DefaultIdentityProviderConfig { - authSchemes = new Map(); - constructor(config) { - for (const [key, value] of Object.entries(config)) { - if (value !== undefined) { - this.authSchemes.set(key, value); +const checkState = async (client, input) => { + let reason; + try { + const result = await client.send(new DescribeTasksCommand(input)); + reason = result; + try { + const returnComparator = () => { + const flat_1 = [].concat(...result.tasks); + const projection_3 = flat_1.map((element_2) => { + return element_2.lastStatus; + }); + return projection_3; + }; + let allStringEq_5 = returnComparator().length > 0; + for (const element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && element_4 == "STOPPED"; + } + if (allStringEq_5) { + return { state: utilWaiter.WaiterState.SUCCESS, reason }; } } + catch (e) { } } - 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 = protocolHttp.HttpRequest.clone(httpRequest); - if (signingProperties.in === types.HttpApiKeyAuthLocation.QUERY) { - clonedRequest.query[signingProperties.name] = identity.apiKey; - } - else if (signingProperties.in === types.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; + catch (exception) { + reason = exception; } -} + return { state: utilWaiter.WaiterState.RETRY, reason }; +}; +const waitForTasksStopped = async (params, input) => { + const serviceDefaults = { minDelay: 6, maxDelay: 120 }; + return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +const waitUntilTasksStopped = async (params, input) => { + const serviceDefaults = { minDelay: 6, maxDelay: 120 }; + const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return utilWaiter.checkExceptions(result); +}; -class HttpBearerAuthSigner { - async sign(httpRequest, identity, signingProperties) { - const clonedRequest = protocolHttp.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; - } -} +Object.defineProperty(exports, "$Command", ({ + enumerable: true, + get: function () { return smithyClient.Command; } +})); +Object.defineProperty(exports, "__Client", ({ + enumerable: true, + get: function () { return smithyClient.Client; } +})); +exports.AcceleratorManufacturer = AcceleratorManufacturer; +exports.AcceleratorName = AcceleratorName; +exports.AcceleratorType = AcceleratorType; +exports.AccessDeniedException = AccessDeniedException; +exports.AgentUpdateStatus = AgentUpdateStatus; +exports.ApplicationProtocol = ApplicationProtocol; +exports.AssignPublicIp = AssignPublicIp; +exports.AttributeLimitExceededException = AttributeLimitExceededException; +exports.AvailabilityZoneRebalancing = AvailabilityZoneRebalancing; +exports.BareMetal = BareMetal; +exports.BlockedException = BlockedException; +exports.BurstablePerformance = BurstablePerformance; +exports.CPUArchitecture = CPUArchitecture; +exports.CapacityProviderField = CapacityProviderField; +exports.CapacityProviderStatus = CapacityProviderStatus; +exports.CapacityProviderType = CapacityProviderType; +exports.CapacityProviderUpdateStatus = CapacityProviderUpdateStatus; +exports.ClientException = ClientException; +exports.ClusterContainsCapacityProviderException = ClusterContainsCapacityProviderException; +exports.ClusterContainsContainerInstancesException = ClusterContainsContainerInstancesException; +exports.ClusterContainsServicesException = ClusterContainsServicesException; +exports.ClusterContainsTasksException = ClusterContainsTasksException; +exports.ClusterField = ClusterField; +exports.ClusterNotFoundException = ClusterNotFoundException; +exports.ClusterSettingName = ClusterSettingName; +exports.Compatibility = Compatibility; +exports.ConflictException = ConflictException; +exports.Connectivity = Connectivity; +exports.ContainerCondition = ContainerCondition; +exports.ContainerInstanceField = ContainerInstanceField; +exports.ContainerInstanceStatus = ContainerInstanceStatus; +exports.CpuManufacturer = CpuManufacturer; +exports.CreateCapacityProviderCommand = CreateCapacityProviderCommand; +exports.CreateClusterCommand = CreateClusterCommand; +exports.CreateServiceCommand = CreateServiceCommand; +exports.CreateTaskSetCommand = CreateTaskSetCommand; +exports.DeleteAccountSettingCommand = DeleteAccountSettingCommand; +exports.DeleteAttributesCommand = DeleteAttributesCommand; +exports.DeleteCapacityProviderCommand = DeleteCapacityProviderCommand; +exports.DeleteClusterCommand = DeleteClusterCommand; +exports.DeleteServiceCommand = DeleteServiceCommand; +exports.DeleteTaskDefinitionsCommand = DeleteTaskDefinitionsCommand; +exports.DeleteTaskSetCommand = DeleteTaskSetCommand; +exports.DeploymentControllerType = DeploymentControllerType; +exports.DeploymentLifecycleHookStage = DeploymentLifecycleHookStage; +exports.DeploymentRolloutState = DeploymentRolloutState; +exports.DeploymentStrategy = DeploymentStrategy; +exports.DeregisterContainerInstanceCommand = DeregisterContainerInstanceCommand; +exports.DeregisterTaskDefinitionCommand = DeregisterTaskDefinitionCommand; +exports.DescribeCapacityProvidersCommand = DescribeCapacityProvidersCommand; +exports.DescribeClustersCommand = DescribeClustersCommand; +exports.DescribeContainerInstancesCommand = DescribeContainerInstancesCommand; +exports.DescribeServiceDeploymentsCommand = DescribeServiceDeploymentsCommand; +exports.DescribeServiceRevisionsCommand = DescribeServiceRevisionsCommand; +exports.DescribeServicesCommand = DescribeServicesCommand; +exports.DescribeTaskDefinitionCommand = DescribeTaskDefinitionCommand; +exports.DescribeTaskSetsCommand = DescribeTaskSetsCommand; +exports.DescribeTasksCommand = DescribeTasksCommand; +exports.DesiredStatus = DesiredStatus; +exports.DeviceCgroupPermission = DeviceCgroupPermission; +exports.DiscoverPollEndpointCommand = DiscoverPollEndpointCommand; +exports.EBSResourceType = EBSResourceType; +exports.ECS = ECS; +exports.ECSClient = ECSClient; +exports.ECSServiceException = ECSServiceException; +exports.EFSAuthorizationConfigIAM = EFSAuthorizationConfigIAM; +exports.EFSTransitEncryption = EFSTransitEncryption; +exports.EnvironmentFileType = EnvironmentFileType; +exports.ExecuteCommandCommand = ExecuteCommandCommand; +exports.ExecuteCommandLogging = ExecuteCommandLogging; +exports.ExecuteCommandResponseFilterSensitiveLog = ExecuteCommandResponseFilterSensitiveLog; +exports.FirelensConfigurationType = FirelensConfigurationType; +exports.GetTaskProtectionCommand = GetTaskProtectionCommand; +exports.HealthStatus = HealthStatus; +exports.InstanceGeneration = InstanceGeneration; +exports.InstanceHealthCheckState = InstanceHealthCheckState; +exports.InstanceHealthCheckType = InstanceHealthCheckType; +exports.InvalidParameterException = InvalidParameterException; +exports.IpcMode = IpcMode; +exports.LaunchType = LaunchType; +exports.LimitExceededException = LimitExceededException; +exports.ListAccountSettingsCommand = ListAccountSettingsCommand; +exports.ListAttributesCommand = ListAttributesCommand; +exports.ListClustersCommand = ListClustersCommand; +exports.ListContainerInstancesCommand = ListContainerInstancesCommand; +exports.ListServiceDeploymentsCommand = ListServiceDeploymentsCommand; +exports.ListServicesByNamespaceCommand = ListServicesByNamespaceCommand; +exports.ListServicesCommand = ListServicesCommand; +exports.ListTagsForResourceCommand = ListTagsForResourceCommand; +exports.ListTaskDefinitionFamiliesCommand = ListTaskDefinitionFamiliesCommand; +exports.ListTaskDefinitionsCommand = ListTaskDefinitionsCommand; +exports.ListTasksCommand = ListTasksCommand; +exports.LocalStorage = LocalStorage; +exports.LocalStorageType = LocalStorageType; +exports.LogDriver = LogDriver; +exports.ManagedAgentName = ManagedAgentName; +exports.ManagedDraining = ManagedDraining; +exports.ManagedInstancesMonitoringOptions = ManagedInstancesMonitoringOptions; +exports.ManagedScalingStatus = ManagedScalingStatus; +exports.ManagedTerminationProtection = ManagedTerminationProtection; +exports.MissingVersionException = MissingVersionException; +exports.NamespaceNotFoundException = NamespaceNotFoundException; +exports.NetworkMode = NetworkMode; +exports.NoUpdateAvailableException = NoUpdateAvailableException; +exports.OSFamily = OSFamily; +exports.PidMode = PidMode; +exports.PlacementConstraintType = PlacementConstraintType; +exports.PlacementStrategyType = PlacementStrategyType; +exports.PlatformDeviceType = PlatformDeviceType; +exports.PlatformTaskDefinitionIncompatibilityException = PlatformTaskDefinitionIncompatibilityException; +exports.PlatformUnknownException = PlatformUnknownException; +exports.PropagateMITags = PropagateMITags; +exports.PropagateTags = PropagateTags; +exports.ProxyConfigurationType = ProxyConfigurationType; +exports.PutAccountSettingCommand = PutAccountSettingCommand; +exports.PutAccountSettingDefaultCommand = PutAccountSettingDefaultCommand; +exports.PutAttributesCommand = PutAttributesCommand; +exports.PutClusterCapacityProvidersCommand = PutClusterCapacityProvidersCommand; +exports.RegisterContainerInstanceCommand = RegisterContainerInstanceCommand; +exports.RegisterTaskDefinitionCommand = RegisterTaskDefinitionCommand; +exports.ResourceInUseException = ResourceInUseException; +exports.ResourceNotFoundException = ResourceNotFoundException; +exports.ResourceType = ResourceType; +exports.RunTaskCommand = RunTaskCommand; +exports.ScaleUnit = ScaleUnit; +exports.SchedulingStrategy = SchedulingStrategy; +exports.Scope = Scope; +exports.ServerException = ServerException; +exports.ServiceConnectAccessLoggingFormat = ServiceConnectAccessLoggingFormat; +exports.ServiceConnectIncludeQueryParameters = ServiceConnectIncludeQueryParameters; +exports.ServiceDeploymentLifecycleStage = ServiceDeploymentLifecycleStage; +exports.ServiceDeploymentNotFoundException = ServiceDeploymentNotFoundException; +exports.ServiceDeploymentRollbackMonitorsStatus = ServiceDeploymentRollbackMonitorsStatus; +exports.ServiceDeploymentStatus = ServiceDeploymentStatus; +exports.ServiceField = ServiceField; +exports.ServiceNotActiveException = ServiceNotActiveException; +exports.ServiceNotFoundException = ServiceNotFoundException; +exports.SessionFilterSensitiveLog = SessionFilterSensitiveLog; +exports.SettingName = SettingName; +exports.SettingType = SettingType; +exports.SortOrder = SortOrder; +exports.StabilityStatus = StabilityStatus; +exports.StartTaskCommand = StartTaskCommand; +exports.StopServiceDeploymentCommand = StopServiceDeploymentCommand; +exports.StopServiceDeploymentStopType = StopServiceDeploymentStopType; +exports.StopTaskCommand = StopTaskCommand; +exports.SubmitAttachmentStateChangesCommand = SubmitAttachmentStateChangesCommand; +exports.SubmitContainerStateChangeCommand = SubmitContainerStateChangeCommand; +exports.SubmitTaskStateChangeCommand = SubmitTaskStateChangeCommand; +exports.TagResourceCommand = TagResourceCommand; +exports.TargetNotConnectedException = TargetNotConnectedException; +exports.TargetNotFoundException = TargetNotFoundException; +exports.TargetType = TargetType; +exports.TaskDefinitionFamilyStatus = TaskDefinitionFamilyStatus; +exports.TaskDefinitionField = TaskDefinitionField; +exports.TaskDefinitionPlacementConstraintType = TaskDefinitionPlacementConstraintType; +exports.TaskDefinitionStatus = TaskDefinitionStatus; +exports.TaskField = TaskField; +exports.TaskFilesystemType = TaskFilesystemType; +exports.TaskSetField = TaskSetField; +exports.TaskSetNotFoundException = TaskSetNotFoundException; +exports.TaskStopCode = TaskStopCode; +exports.TransportProtocol = TransportProtocol; +exports.UlimitName = UlimitName; +exports.UnsupportedFeatureException = UnsupportedFeatureException; +exports.UntagResourceCommand = UntagResourceCommand; +exports.UpdateCapacityProviderCommand = UpdateCapacityProviderCommand; +exports.UpdateClusterCommand = UpdateClusterCommand; +exports.UpdateClusterSettingsCommand = UpdateClusterSettingsCommand; +exports.UpdateContainerAgentCommand = UpdateContainerAgentCommand; +exports.UpdateContainerInstancesStateCommand = UpdateContainerInstancesStateCommand; +exports.UpdateInProgressException = UpdateInProgressException; +exports.UpdateServiceCommand = UpdateServiceCommand; +exports.UpdateServicePrimaryTaskSetCommand = UpdateServicePrimaryTaskSetCommand; +exports.UpdateTaskProtectionCommand = UpdateTaskProtectionCommand; +exports.UpdateTaskSetCommand = UpdateTaskSetCommand; +exports.VersionConsistency = VersionConsistency; +exports.paginateListAccountSettings = paginateListAccountSettings; +exports.paginateListAttributes = paginateListAttributes; +exports.paginateListClusters = paginateListClusters; +exports.paginateListContainerInstances = paginateListContainerInstances; +exports.paginateListServices = paginateListServices; +exports.paginateListServicesByNamespace = paginateListServicesByNamespace; +exports.paginateListTaskDefinitionFamilies = paginateListTaskDefinitionFamilies; +exports.paginateListTaskDefinitions = paginateListTaskDefinitions; +exports.paginateListTasks = paginateListTasks; +exports.waitForServicesInactive = waitForServicesInactive; +exports.waitForServicesStable = waitForServicesStable; +exports.waitForTasksRunning = waitForTasksRunning; +exports.waitForTasksStopped = waitForTasksStopped; +exports.waitUntilServicesInactive = waitUntilServicesInactive; +exports.waitUntilServicesStable = waitUntilServicesStable; +exports.waitUntilTasksRunning = waitUntilTasksRunning; +exports.waitUntilTasksStopped = waitUntilTasksStopped; + + +/***/ }), + +/***/ 1142: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -class NoAuthSigner { - async sign(httpRequest, identity, signingProperties) { - return httpRequest; - } -} +"use strict"; -const createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired(identity) { - return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs; -}; -const EXPIRATION_MS = 300_000; -const isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); -const doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined; -const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => { - if (provider === undefined) { - return undefined; - } - 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; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const tslib_1 = __nccwpck_require__(1860); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(1194)); +const core_1 = __nccwpck_require__(8704); +const credential_provider_node_1 = __nccwpck_require__(5861); +const util_user_agent_node_1 = __nccwpck_require__(1656); +const config_resolver_1 = __nccwpck_require__(9316); +const hash_node_1 = __nccwpck_require__(5092); +const middleware_retry_1 = __nccwpck_require__(9618); +const node_config_provider_1 = __nccwpck_require__(5704); +const node_http_handler_1 = __nccwpck_require__(1279); +const util_body_length_node_1 = __nccwpck_require__(3638); +const util_retry_1 = __nccwpck_require__(5518); +const runtimeConfig_shared_1 = __nccwpck_require__(1519); +const smithy_client_1 = __nccwpck_require__(1411); +const util_defaults_mode_node_1 = __nccwpck_require__(5435); +const smithy_client_2 = __nccwpck_require__(1411); +const getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger, + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? + (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }, config), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), }; }; +exports.getRuntimeConfig = getRuntimeConfig; -Object.defineProperty(exports, "requestBuilder", ({ - enumerable: true, - get: function () { return protocols.requestBuilder; } -})); -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.getSmithyContext = getSmithyContext; -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; + +/***/ }), + +/***/ 1519: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const core_1 = __nccwpck_require__(8704); +const smithy_client_1 = __nccwpck_require__(1411); +const url_parser_1 = __nccwpck_require__(4494); +const util_base64_1 = __nccwpck_require__(8385); +const util_utf8_1 = __nccwpck_require__(1577); +const httpAuthSchemeProvider_1 = __nccwpck_require__(1367); +const endpointResolver_1 = __nccwpck_require__(6161); +const getRuntimeConfig = (config) => { + return { + apiVersion: "2014-11-13", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultECSHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "ECS", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; /***/ }), -/***/ 48977: +/***/ 8704: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var utilStream = __nccwpck_require__(92723); -var schema = __nccwpck_require__(75987); -var serde = __nccwpck_require__(16705); -var protocolHttp = __nccwpck_require__(22475); -var utilBase64 = __nccwpck_require__(5074); -var utilUtf8 = __nccwpck_require__(21194); +var protocolHttp = __nccwpck_require__(2356); +var core = __nccwpck_require__(402); +var propertyProvider = __nccwpck_require__(1238); +var client = __nccwpck_require__(5152); +var signatureV4 = __nccwpck_require__(5118); +var cbor = __nccwpck_require__(4645); +var schema = __nccwpck_require__(6890); +var protocols = __nccwpck_require__(3422); +var serde = __nccwpck_require__(2430); +var utilBase64 = __nccwpck_require__(8385); +var smithyClient = __nccwpck_require__(1411); +var utilUtf8 = __nccwpck_require__(1577); +var xmlBuilder = __nccwpck_require__(4274); -const collectBody = async (streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return utilStream.Uint8ArrayBlobAdapter.mutate(streamBody); - } - if (!streamBody) { - return utilStream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); +const state = { + warningEmitted: false, +}; +const emitWarningIfUnsupportedVersion = (version) => { + if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) { + state.warningEmitted = true; + process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js 16.x on January 6, 2025. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to a supported Node.js LTS version. + +More information can be found at: https://a.co/74kJMmI`); } - const fromContext = context.streamCollector(streamBody); - return utilStream.Uint8ArrayBlobAdapter.mutate(await fromContext); }; -function extendedEncodeURIComponent(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); +function setCredentialFeature(credentials, feature, value) { + if (!credentials.$source) { + credentials.$source = {}; + } + credentials.$source[feature] = value; + return credentials; } -class SerdeContext { - serdeContext; - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; +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; } -class HttpProtocol extends SerdeContext { - options; - constructor(options) { - super(); - this.options = options; +function setTokenFeature(token, feature, value) { + if (!token.$source) { + token.$source = {}; } - getRequestType() { - return protocolHttp.HttpRequest; + token.$source[feature] = value; + return token; +} + +const getDateHeader = (response) => protocolHttp.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined; + +const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); + +const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000; + +const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); } - getResponseType() { - return protocolHttp.HttpResponse; + return currentSystemClockOffset; +}; + +const throwSigningPropertyError = (name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); } - setSerdeContext(serdeContext) { - this.serdeContext = serdeContext; - this.serializer.setSerdeContext(serdeContext); - this.deserializer.setSerdeContext(serdeContext); - if (this.getPayloadCodec()) { - this.getPayloadCodec().setSerdeContext(serdeContext); + return property; +}; +const 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 (!protocolHttp.HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); } - } - 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 || void 0; - request.username = endpoint.url.username || void 0; - request.password = endpoint.url.password || void 0; - if (!request.query) { - request.query = {}; - } - for (const [k, v] of endpoint.url.searchParams.entries()) { - request.query[k] = v; + 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; } - 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, - }; - return request; } + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config.systemClockOffset), + signingRegion: signingRegion, + signingService: signingName, + }); + return signedRequest; } - setHostPrefix(request, operationSchema, input) { - const inputNs = schema.NormalizedSchema.of(operationSchema.input); - const opTraits = schema.translateTraits(operationSchema.traits ?? {}); - if (opTraits.endpoint) { - let hostPrefix = opTraits.endpoint?.[0]; - if (typeof hostPrefix === "string") { - const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel); - for (const [name] of hostLabelInputs) { - 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); + errorHandler(signingProperties) { + return (error) => { + const serverTime = error.ServerTime ?? getDateHeader(error.$response); + if (serverTime) { + const config = throwSigningPropertyError("config", signingProperties.config); + const initialSystemClockOffset = config.systemClockOffset; + config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); + const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && error.$metadata) { + error.$metadata.clockSkewCorrected = true; } - request.hostname = hostPrefix + request.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"], + throw error; }; } - 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 } = await __nccwpck_require__.e(/* import() */ 472).then(__nccwpck_require__.t.bind(__nccwpck_require__, 59472, 19)); - return new EventStreamSerde({ - marshaller: this.getEventStreamMarshaller(), - serializer: this.serializer, - deserializer: this.deserializer, - serdeContext: this.serdeContext, - defaultContentType: this.getDefaultContentType(), - }); - } - 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."); + successHandler(httpResponse, signingProperties) { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config = throwSigningPropertyError("config", signingProperties.config); + config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset); } - return context.eventStreamMarshaller; } } +const AWSSDKSigV4Signer = AwsSdkSigV4Signer; -class HttpBindingProtocol extends HttpProtocol { - async serializeRequest(operationSchema, _input, context) { - const input = { - ...(_input ?? {}), - }; - const serializer = this.serializer; - const query = {}; - const headers = {}; - const endpoint = await context.endpoint(); - const ns = schema.NormalizedSchema.of(operationSchema?.input); - const schema$1 = ns.getSchema(); - let hasNonHttpBindingMember = false; - let payload; - const request = new protocolHttp.HttpRequest({ - protocol: "", - hostname: "", - port: undefined, - path: "", - fragment: undefined, - query: query, - headers: headers, - body: undefined, +class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer { + async sign(httpRequest, identity, signingProperties) { + if (!protocolHttp.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 signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config.systemClockOffset), + signingRegion: multiRegionOverride, + signingService: signingName, }); - if (endpoint) { - this.updateServiceEndpoint(request, endpoint); - this.setHostPrefix(request, operationSchema, input); - const opTraits = schema.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 ?? ""); - Object.assign(query, Object.fromEntries(traitSearchParams)); - } + return signedRequest; + } +} + +const getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : []; + +const getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`; + +const NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE"; +const NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference"; +const NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = { + environmentVariableSelector: (env, options) => { + if (options?.signingName) { + const bearerTokenKey = getBearerTokenEnvKey(options.signingName); + if (bearerTokenKey in env) + return ["httpBearerAuth"]; } - for (const [memberName, memberNs] of ns.structIterator()) { - const memberTraits = memberNs.getMergedTraits() ?? {}; - const inputMemberValue = input[memberName]; - if (inputMemberValue == null) { - 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(); - } - delete input[memberName]; - } - 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)); - } - delete input[memberName]; - } - else if (memberTraits.httpHeader) { - serializer.write(memberNs, inputMemberValue); - headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush()); - delete input[memberName]; - } - else if (typeof memberTraits.httpPrefixHeaders === "string") { - for (const [key, val] of Object.entries(inputMemberValue)) { - const amalgam = memberTraits.httpPrefixHeaders + key; - serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val); - headers[amalgam.toLowerCase()] = serializer.flush(); - } - delete input[memberName]; - } - else if (memberTraits.httpQuery || memberTraits.httpQueryParams) { - this.serializeQuery(memberNs, inputMemberValue, query); - delete input[memberName]; - } - else { - hasNonHttpBindingMember = true; - } + if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env)) + return undefined; + return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]); + }, + configFileSelector: (profile) => { + if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) + return undefined; + return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]); + }, + default: [], +}; + +const resolveAwsSdkSigV4AConfig = (config) => { + config.sigv4aSigningRegionSet = core.normalizeProvider(config.sigv4aSigningRegionSet); + return config; +}; +const NODE_SIGV4A_CONFIG_OPTIONS = { + environmentVariableSelector(env) { + if (env.AWS_SIGV4A_SIGNING_REGION_SET) { + return env.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim()); } - if (hasNonHttpBindingMember && input) { - serializer.write(schema$1, input); - payload = serializer.flush(); + throw new propertyProvider.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()); } - 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, val] of Object.entries(data)) { - if (!(key in query)) { - const valueSchema = ns.getValueSchema(); - Object.assign(valueSchema.getMergedTraits(), { - ...traits, - httpQuery: key, - httpQueryParams: undefined, - }); - this.serializeQuery(valueSchema, val, query); - } + throw new propertyProvider.ProviderError("sigv4a_signing_region_set not set in profile.", { + tryNextLink: true, + }); + }, + default: undefined, +}; + +const resolveAwsSdkSigV4Config = (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; } - 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); - } + inputCredentials = credentials; + const memoizedProvider = normalizeCredentialProvider(config, { + credentials: inputCredentials, + credentialDefaultProvider: config.credentialDefaultProvider, + }); + const boundProvider = bindCallerConfig(config, memoizedProvider); + if (isUserSupplied && !boundProvider.attributed) { + resolvedCredentials = async (options) => boundProvider(options).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_CODE", "e")); + resolvedCredentials.memoized = boundProvider.memoized; + resolvedCredentials.configBound = boundProvider.configBound; + resolvedCredentials.attributed = true; } - 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 = schema.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)); + else { + resolvedCredentials = boundProvider; } - 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) { - const value = response.headers[header]; - delete response.headers[header]; - response.headers[header.toLowerCase()] = value; + }, + 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 = core.normalizeProvider(config.signer); + } + else if (config.regionInfoProvider) { + signer = () => core.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.SignatureV4; + return new SignerCtor(params); + }); + } + else { + signer = async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: config.signingName || config.defaultSigningName, + signingRegion: await core.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.SignatureV4; + return new SignerCtor(params); + }; + } + const resolvedConfig = Object.assign(config, { + systemClockOffset, + signingEscapePath, + signer, + }); + return resolvedConfig; +}; +const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; +function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider, }) { + let credentialsProvider; + if (credentials) { + if (!credentials?.memoized) { + credentialsProvider = core.memoizeIdentityProvider(credentials, core.isIdentityExpired, core.doesIdentityRequireRefresh); } - 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) { - dataObject[member] = dataFromBody[member]; - } - } + else { + credentialsProvider = credentials; } - dataObject.$metadata = this.deserializeMetadata(response); - return dataObject; } - async deserializeHttpMessage(schema$1, context, response, arg4, arg5) { - let dataObject; - if (arg4 instanceof Set) { - dataObject = arg5; + else { + if (credentialDefaultProvider) { + credentialsProvider = core.normalizeProvider(credentialDefaultProvider(Object.assign({}, config, { + parentClientConfig: config, + }))); } else { - dataObject = arg4; + credentialsProvider = async () => { + throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured."); + }; } - const deserializer = this.deserializer; - const ns = schema.NormalizedSchema.of(schema$1); - const nonHttpBindingMembers = []; - for (const [memberName, memberSchema] of ns.structIterator()) { - const memberTraits = memberSchema.getMemberTraits(); - if (memberTraits.httpPayload) { - const isStreaming = memberSchema.isStreaming(); - if (isStreaming) { - const isEventStream = memberSchema.isStructSchema(); - if (isEventStream) { - dataObject[memberName] = await this.deserializeEventStream({ - response, - responseSchema: ns, - }); - } - else { - dataObject[memberName] = utilStream.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 (null != value) { - if (memberSchema.isListSchema()) { - const headerListValueSchema = memberSchema.getValueSchema(); - headerListValueSchema.getMergedTraits().httpHeader = key; - let sections; - if (headerListValueSchema.isTimestampSchema() && - headerListValueSchema.getSchema() === 4) { - sections = serde.splitEvery(value, ",", 2); - } - else { - sections = serde.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); - } - } + } + 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; +} + +class ProtocolLib { + 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 (memberTraits.httpPrefixHeaders !== undefined) { - dataObject[memberName] = {}; - for (const [header, value] of Object.entries(response.headers)) { - if (header.startsWith(memberTraits.httpPrefixHeaders)) { - const valueSchema = memberSchema.getValueSchema(); - valueSchema.getMergedTraits().httpHeader = header; - dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value); - } - } + else if (httpPayloadMember.isStringSchema()) { + return "text/plain"; } - else if (memberTraits.httpResponseCode) { - dataObject[memberName] = response.statusCode; + else if (httpPayloadMember.isBlobSchema()) { + return "application/octet-stream"; } else { - nonHttpBindingMembers.push(memberName); + return defaultContentType; + } + } + else if (!inputSchema.isUnitSchema()) { + const hasBody = Object.values(members).find((m) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits(); + const noPrefixHeaders = httpPrefixHeaders === void 0; + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders; + }); + if (hasBody) { + return defaultContentType; } } - 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 = schema.NormalizedSchema.of(operationSchema?.input); - const schema$1 = ns.getSchema(); - let payload; - const request = new protocolHttp.HttpRequest({ - protocol: "", - hostname: "", - port: undefined, - path: "/", - fragment: undefined, - query: query, - headers: headers, - body: undefined, - }); - if (endpoint) { - this.updateServiceEndpoint(request, endpoint); - this.setHostPrefix(request, operationSchema, input); + async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) { + let namespace = defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); } - const _input = { - ...input, + const errorMetadata = { + $metadata: metadata, + $response: response, + $fault: response.statusCode < 500 ? "client" : "server", }; - if (input) { - const eventStreamMember = ns.getEventStreamMember(); - if (eventStreamMember) { - if (_input[eventStreamMember]) { - const initialRequest = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - if (memberName !== eventStreamMember && _input[memberName]) { - serializer.write(memberSchema, _input[memberName]); - initialRequest[memberName] = serializer.flush(); - } - } - payload = await this.serializeEventStream({ - eventStream: _input[eventStreamMember], - requestSchema: ns, - initialRequest, - }); - } - } - else { - serializer.write(schema$1, _input); - payload = serializer.flush(); + const registry = schema.TypeRegistry.for(namespace); + try { + const errorSchema = getErrorSchema?.(registry, errorName) ?? registry.getSchema(errorIdentifier); + return { errorSchema, errorMetadata }; + } + catch (e) { + dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError"; + const synthetic = schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace); + const baseExceptionSchema = synthetic.getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error; + throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject); } + throw Object.assign(new Error(errorName), errorMetadata, dataObject); } - 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 = schema.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)); + setQueryCompatError(output, response) { + const queryErrorHeader = response.headers?.["x-amzn-query-error"]; + if (output !== undefined && queryErrorHeader != null) { + const [Code, Type] = queryErrorHeader.split(";"); + const entries = Object.entries(output); + const Error = { + Code, + Type, + }; + Object.assign(output, Error); + for (const [k, v] of entries) { + Error[k] = v; } - await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response)); - throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw."); + delete Error.__type; + output.Error = Error; } - for (const header in response.headers) { - const value = response.headers[header]; - delete response.headers[header]; - response.headers[header.toLowerCase()] = value; + } + queryCompatOutput(queryCompatErrorData, errorData) { + if (queryCompatErrorData.Error) { + errorData.Error = queryCompatErrorData.Error; } - const eventStreamMember = ns.getEventStreamMember(); - if (eventStreamMember) { - dataObject[eventStreamMember] = await this.deserializeEventStream({ - response, - responseSchema: ns, - initialResponseContainer: dataObject, - }); + if (queryCompatErrorData.Type) { + errorData.Type = queryCompatErrorData.Type; } - else { - const bytes = await collectBody(response.body, context); - if (bytes.byteLength > 0) { - Object.assign(dataObject, await deserializer.read(ns, bytes)); - } + if (queryCompatErrorData.Code) { + errorData.Code = queryCompatErrorData.Code; } - dataObject.$metadata = this.deserializeMetadata(response); - return dataObject; } } -const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { - if (input != null && input[memberName] !== undefined) { - const labelValue = labelValueProvider(); - if (labelValue.length <= 0) { - throw new Error("Empty value provided for input HTTP label: " + memberName + "."); +class AwsSmithyRpcV2CborProtocol extends cbor.SmithyRpcV2CborProtocol { + awsQueryCompatible; + mixin = new ProtocolLib(); + constructor({ defaultNamespace, awsQueryCompatible, }) { + super({ defaultNamespace }); + this.awsQueryCompatible = !!awsQueryCompatible; + } + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + if (this.awsQueryCompatible) { + request.headers["x-amzn-query-mode"] = "true"; } - resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel - ? labelValue - .split("/") - .map((segment) => extendedEncodeURIComponent(segment)) - .join("/") - : extendedEncodeURIComponent(labelValue)); + return request; } - else { - throw new Error("No value provided for input HTTP label: " + memberName + "."); + async handleError(operationSchema, context, response, dataObject, metadata) { + if (this.awsQueryCompatible) { + this.mixin.setQueryCompatError(dataObject, response); + } + const errorName = cbor.loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown"; + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata); + const ns = schema.NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor(message); + const output = {}; + for (const [name, member] of ns.structIterator()) { + output[name] = this.deserializer.readValue(member, dataObject[name]); + } + if (this.awsQueryCompatible) { + this.mixin.queryCompatOutput(dataObject, output); + } + throw Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message, + }, output); } - 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 protocolHttp.HttpRequest({ - protocol, - hostname: this.hostname || hostname, - port, - method: this.method, - path: this.path, - query: this.query, - body: this.body, - headers: this.headers, - }); + +const _toStr = (val) => { + if (val == null) { + return val; } - hn(hostname) { - this.hostname = hostname; - return this; + 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); } - bp(uriLabel) { - this.resolvePathStack.push((basePath) => { - this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; - }); - return this; + 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); } - p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { - this.resolvePathStack.push((path) => { - this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); - }); - return this; + return val; +}; +const _toBool = (val) => { + if (val == null) { + return val; } - h(headers) { - this.headers = headers; - return this; + 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"; } - q(query) { - this.query = query; - return this; + return val; +}; +const _toNum = (val) => { + if (val == null) { + return val; } - b(body) { - this.body = body; - return this; + 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; } - m(method) { - this.method = method; - return this; + return val; +}; + +class SerdeContextConfig { + serdeContext; + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; } } -function determineTimestampFormat(ns, settings) { - if (settings.timestampFormat.useTrait) { - if (ns.isTimestampSchema() && - (ns.getSchema() === 5 || - ns.getSchema() === 6 || - ns.getSchema() === 7)) { - return ns.getSchema(); +function jsonReviver(key, value, context) { + if (context?.source) { + const numericString = context.source; + if (typeof value === "number") { + if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) { + const isFractional = numericString.includes("."); + if (isFractional) { + return new serde.NumericValue(numericString, "bigDecimal"); + } + else { + return BigInt(numericString); + } + } } } - 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; + return value; } -class FromStringShapeDeserializer extends SerdeContext { +const collectBodyString = (streamBody, context) => smithyClient.collectBody(streamBody, context).then((body) => (context?.utf8Encoder ?? utilUtf8.toUtf8)(body)); + +const parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + try { + return JSON.parse(encoded); + } + catch (e) { + if (e?.name === "SyntaxError") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded, + }); + } + throw e; + } + } + return {}; +}); +const parseJsonErrorBody = async (errorBody, context) => { + const value = await parseJsonBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}; +const loadRestJsonErrorCode = (output, data) => { + const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + 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; + }; + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + if (data && typeof data === "object") { + const codeKey = findKey(data, "code"); + if (codeKey && data[codeKey] !== undefined) { + return sanitizeErrorCode(data[codeKey]); + } + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + } +}; + +class JsonShapeDeserializer extends SerdeContextConfig { settings; constructor(settings) { super(); this.settings = settings; } - read(_schema, data) { - const ns = schema.NormalizedSchema.of(_schema); - if (ns.isListSchema()) { - return serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item)); + async read(schema, data) { + return this._read(schema, typeof data === "string" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext)); + } + readObject(schema, data) { + return this._read(schema, data); + } + _read(schema$1, value) { + const isObject = value !== null && typeof value === "object"; + const ns = schema.NormalizedSchema.of(schema$1); + if (ns.isListSchema() && Array.isArray(value)) { + const listMember = ns.getValueSchema(); + const out = []; + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + if (sparse || item != null) { + out.push(this._read(listMember, item)); + } + } + return out; } - if (ns.isBlobSchema()) { - return (this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(data); + else if (ns.isMapSchema() && isObject) { + const mapMember = ns.getValueSchema(); + const out = {}; + const sparse = !!ns.getMergedTraits().sparse; + for (const [_k, _v] of Object.entries(value)) { + if (sparse || _v != null) { + out[_k] = this._read(mapMember, _v); + } + } + return out; } - if (ns.isTimestampSchema()) { - const format = determineTimestampFormat(ns, this.settings); + else if (ns.isStructSchema() && isObject) { + const out = {}; + for (const [memberName, memberSchema] of ns.structIterator()) { + const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; + const deserializedValue = this._read(memberSchema, value[fromKey]); + if (deserializedValue != null) { + out[memberName] = deserializedValue; + } + } + return out; + } + if (ns.isBlobSchema() && typeof value === "string") { + return utilBase64.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 serde.LazyJsonString.from(value); + } + } + if (ns.isTimestampSchema() && value != null) { + const format = protocols.determineTimestampFormat(ns, this.settings); switch (format) { case 5: - return serde._parseRfc3339DateTimeWithOffset(data); + return serde.parseRfc3339DateTimeWithOffset(value); case 6: - return serde._parseRfc7231DateTime(data); + return serde.parseRfc7231DateTime(value); case 7: - return serde._parseEpochTimestamp(data); + return serde.parseEpochTimestamp(value); 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 = serde.LazyJsonString.from(intermediateValue); - } - return intermediateValue; + console.warn("Missing timestamp format, parsing value with Date constructor:", value); + return new Date(value); } } - if (ns.isNumericSchema()) { - return Number(data); + if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) { + return BigInt(value); } - if (ns.isBigIntegerSchema()) { - return BigInt(data); + if (ns.isBigDecimalSchema() && value != undefined) { + if (value instanceof serde.NumericValue) { + return value; + } + const untyped = value; + if (untyped.type === "bigDecimal" && "string" in untyped) { + return new serde.NumericValue(untyped.string, untyped.type); + } + return new serde.NumericValue(String(value), "bigDecimal"); } - if (ns.isBigDecimalSchema()) { - return new serde.NumericValue(data, "bigDecimal"); + if (ns.isNumericSchema() && typeof value === "string") { + switch (value) { + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + case "NaN": + return NaN; + } } - if (ns.isBooleanSchema()) { - return String(data).toLowerCase() === "true"; + if (ns.isDocumentSchema()) { + if (isObject) { + const out = Array.isArray(value) ? [] : {}; + for (const [k, v] of Object.entries(value)) { + if (v instanceof serde.NumericValue) { + out[k] = v; + } + else { + out[k] = this._read(ns, v); + } + } + return out; + } + else { + return structuredClone(value); + } } - return data; - } - base64ToUtf8(base64String) { - return (this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8)((this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(base64String)); + return value; } } -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$1, data) { - const ns = schema.NormalizedSchema.of(schema$1); - const traits = ns.getMergedTraits(); - const toString = this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8; - if (traits.httpHeader || traits.httpResponseCode) { - return this.stringDeserializer.read(ns, toString(data)); +const 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 (traits.httpPayload) { - if (ns.isBlobSchema()) { - const toBytes = this.serdeContext?.utf8Decoder ?? utilUtf8.fromUtf8; - if (typeof data === "string") { - return toBytes(data); - } - return data; + if (this.stage === 2) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted."); + } + this.stage = 1; + return (key, value) => { + if (value instanceof serde.NumericValue) { + const v = `${NUMERIC_CONTROL_CHAR + "nv" + this.counter++}_` + value.string; + this.values.set(`"${v}"`, value.string); + return v; } - else if (ns.isStringSchema()) { - if ("byteLength" in data) { - return toString(data); - } - return data; + 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."); } - return this.codecDeserializer.read(ns, data); + 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 ToStringShapeSerializer extends SerdeContext { +class JsonShapeSerializer extends SerdeContextConfig { settings; - stringBuffer = ""; + buffer; + rootSchema; constructor(settings) { super(); this.settings = settings; } write(schema$1, value) { - const ns = schema.NormalizedSchema.of(schema$1); - 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 = serde.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 ?? utilBase64.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 : serde.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 = serde.LazyJsonString.from(intermediateValue); - } - if (ns.getMergedTraits().httpHeader) { - this.stringBuffer = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(intermediateValue.toString()); - return; - } - } - this.stringBuffer = value; - break; - default: - 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); + this.rootSchema = schema.NormalizedSchema.of(schema$1); + this.buffer = this._write(this.rootSchema, value); } - write(schema$1, value) { - const ns = schema.NormalizedSchema.of(schema$1); - const traits = ns.getMergedTraits(); - if (traits.httpHeader || traits.httpLabel || traits.httpQuery) { - this.stringSerializer.write(ns, value); - this.buffer = this.stringSerializer.flush(); - return; + writeDiscriminatedDocument(schema$1, value) { + this.write(schema$1, value); + if (typeof this.buffer === "object") { + this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true); } - return this.codecSerializer.write(ns, value); } flush() { - if (this.buffer !== undefined) { - const buffer = this.buffer; - this.buffer = undefined; - return buffer; + const { rootSchema } = this; + this.rootSchema = undefined; + if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) { + const replacer = new JsonReplacer(); + return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0)); } - return this.codecSerializer.flush(); - } -} - -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.collectBody = collectBody; -exports.determineTimestampFormat = determineTimestampFormat; -exports.extendedEncodeURIComponent = extendedEncodeURIComponent; -exports.requestBuilder = requestBuilder; -exports.resolvedPath = resolvedPath; - - -/***/ }), - -/***/ 75987: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var protocolHttp = __nccwpck_require__(22475); -var utilMiddleware = __nccwpck_require__(7403); - -const deref = (schemaRef) => { - if (typeof schemaRef === "function") { - return schemaRef(); - } - return schemaRef; -}; - -const operation = (namespace, name, traits, input, output) => ({ - name, - namespace, - traits, - input, - output, -}); - -const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { - const { response } = await next(args); - const { operationSchema } = utilMiddleware.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, - }; + return this.buffer; } - catch (error) { - Object.defineProperty(error, "$response", { - value: response, - }); - 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 += "\n " + hint; - } - catch (e) { - if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { - console.warn(hint); + _write(schema$1, value, container) { + const isObject = value !== null && typeof value === "object"; + const ns = schema.NormalizedSchema.of(schema$1); + if (ns.isListSchema() && Array.isArray(value)) { + 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)); } - else { - context.logger?.warn?.(hint); + } + return out; + } + else if (ns.isMapSchema() && isObject) { + const mapMember = ns.getValueSchema(); + const out = {}; + const sparse = !!ns.getMergedTraits().sparse; + for (const [_k, _v] of Object.entries(value)) { + if (sparse || _v != null) { + out[_k] = this._write(mapMember, _v); } } - if (typeof error.$responseBodyText !== "undefined") { - if (error.$response) { - error.$response.body = error.$responseBodyText; + return out; + } + else if (ns.isStructSchema() && isObject) { + const out = {}; + for (const [memberName, memberSchema] of ns.structIterator()) { + const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; + const serializableValue = this._write(memberSchema, value[memberName], ns); + if (serializableValue !== undefined) { + out[targetKey] = serializableValue; } } - try { - if (protocolHttp.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), - }; + return out; + } + if (value === null && container?.isStructSchema()) { + return void 0; + } + if ((ns.isBlobSchema() && (value instanceof Uint8Array || typeof value === "string")) || + (ns.isDocumentSchema() && value instanceof Uint8Array)) { + if (ns === this.rootSchema) { + return value; + } + if (!this.serdeContext?.base64Encoder) { + return utilBase64.toBase64(value); + } + return this.serdeContext?.base64Encoder(value); + } + if ((ns.isTimestampSchema() || ns.isDocumentSchema()) && value instanceof Date) { + const format = protocols.determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + return value.toISOString().replace(".000Z", "Z"); + case 6: + return serde.dateToUtcString(value); + case 7: + return value.getTime() / 1000; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + return value.getTime() / 1000; + } + } + if (ns.isNumericSchema() && typeof value === "number") { + if (Math.abs(value) === Infinity || isNaN(value)) { + return String(value); + } + } + if (ns.isStringSchema()) { + if (typeof value === "undefined" && ns.isIdempotencyToken()) { + return serde.generateIdempotencyToken(); + } + const mediaType = ns.getMergedTraits().mediaType; + if (value != null && mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + return serde.LazyJsonString.from(value); } } - catch (e) { + } + if (ns.isDocumentSchema()) { + if (isObject) { + const out = Array.isArray(value) ? [] : {}; + for (const [k, v] of Object.entries(value)) { + if (v instanceof serde.NumericValue) { + out[k] = v; + } + else { + out[k] = this._write(ns, v); + } + } + return out; + } + else { + return structuredClone(value); } } - throw error; + return value; } -}; -const findHeader = (pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; -}; - -const schemaSerializationMiddleware = (config) => (next, context) => async (args) => { - const { operationSchema } = utilMiddleware.getSmithyContext(context); - const [, ns, n, t, i, o] = operationSchema ?? []; - const endpoint = context.endpointV2?.url && config.urlParser - ? async () => config.urlParser(context.endpointV2.url) - : config.endpoint; - const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, { - ...config, - ...context, - endpoint, - }); - return next({ - ...args, - request, - }); -}; - -const deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true, -}; -const 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; +class JsonCodec extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; } - 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; + createSerializer() { + const serializer = new JsonShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext); + return serializer; } - getName() { - return this.namespace + "#" + this.name; + createDeserializer() { + const deserializer = new JsonShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; } } -class ListSchema extends Schema { - static symbol = Symbol.for("@smithy/lis"); - name; - traits; - valueSchema; - symbol = ListSchema.symbol; -} -const list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), { - name, - namespace, - traits, - valueSchema, -}); - -class MapSchema extends Schema { - static symbol = Symbol.for("@smithy/map"); - name; - traits; - keySchema; - valueSchema; - symbol = MapSchema.symbol; -} -const 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"); - name; - traits; - input; - output; - symbol = OperationSchema.symbol; -} -const 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"); - name; - traits; - memberNames; - memberList; - symbol = StructureSchema.symbol; -} -const 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; -} -const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { - name, - namespace, - traits, - memberNames, - memberList, - ctor: null, -}); - -function translateTraits(indicator) { - if (typeof indicator === "object") { - return indicator; - } - indicator = indicator | 0; - const traits = {}; - let i = 0; - for (const trait of [ - "httpLabel", - "idempotent", - "idempotencyToken", - "sensitive", - "httpPayload", - "httpResponseCode", - "httpQueryParams", - ]) { - if (((indicator >> i++) & 1) === 1) { - traits[trait] = 1; - } +class AwsJsonRpcProtocol extends protocols.RpcProtocol { + serializer; + deserializer; + serviceTarget; + codec; + mixin = new ProtocolLib(); + awsQueryCompatible; + constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }) { + super({ + defaultNamespace, + }); + this.serviceTarget = serviceTarget; + this.codec = new JsonCodec({ + timestampFormat: { + useTrait: true, + default: 7, + }, + jsonName: false, + }); + this.serializer = this.codec.createSerializer(); + this.deserializer = this.codec.createDeserializer(); + this.awsQueryCompatible = !!awsQueryCompatible; } - return traits; -} - -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 = void 0; - 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]; + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + if (!request.path.endsWith("/")) { + request.path += "/"; } - else { - this.name = this.memberName ?? String(schema); - this.traits = 0; + Object.assign(request.headers, { + "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`, + "x-amz-target": `${this.serviceTarget}.${operationSchema.name}`, + }); + if (this.awsQueryCompatible) { + request.headers["x-amzn-query-mode"] = "true"; } - if (this._isMemberSchema && !memberName) { - throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); + if (schema.deref(operationSchema.input) === "unit" || !request.body) { + request.body = "{}"; } + return request; } - 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; + getPayloadCodec() { + return this.codec; } - static of(ref) { - const sc = deref(ref); - if (sc instanceof NormalizedSchema) { - return sc; + async handleError(operationSchema, context, response, dataObject, metadata) { + if (this.awsQueryCompatible) { + this.mixin.setQueryCompatError(dataObject, response); } - 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 errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); + const ns = schema.NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor(message); + const output = {}; + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().jsonName ?? name; + output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); } - return new NormalizedSchema(sc); - } - getSchema() { - const sc = this.schema; - if (sc[0] === 0) { - return sc[4]; + if (this.awsQueryCompatible) { + this.mixin.queryCompatOutput(dataObject, output); } - return sc; - } - getName(withNamespace = false) { - const { name } = this; - const short = !withNamespace && name && name.includes("#"); - return short ? name.split("#")[1] : name || undefined; + throw Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message, + }, output); } - getMemberName() { - return this.memberName; +} + +class AwsJson1_0Protocol extends AwsJsonRpcProtocol { + constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }) { + super({ + defaultNamespace, + serviceTarget, + awsQueryCompatible, + }); } - isMemberSchema() { - return this._isMemberSchema; + getShapeId() { + return "aws.protocols#awsJson1_0"; } - isListSchema() { - const sc = this.getSchema(); - return typeof sc === "number" - ? sc >= 64 && sc < 128 - : sc[0] === 1; + getJsonRpcVersion() { + return "1.0"; } - isMapSchema() { - const sc = this.getSchema(); - return typeof sc === "number" - ? sc >= 128 && sc <= 0b1111_1111 - : sc[0] === 2; + getDefaultContentType() { + return "application/x-amz-json-1.0"; } - isStructSchema() { - const sc = this.getSchema(); - return (sc[0] === 3 || - sc[0] === -3); +} + +class AwsJson1_1Protocol extends AwsJsonRpcProtocol { + constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }) { + super({ + defaultNamespace, + serviceTarget, + awsQueryCompatible, + }); } - isBlobSchema() { - const sc = this.getSchema(); - return sc === 21 || sc === 42; + getShapeId() { + return "aws.protocols#awsJson1_1"; } - isTimestampSchema() { - const sc = this.getSchema(); - return (typeof sc === "number" && - sc >= 4 && - sc <= 7); + getJsonRpcVersion() { + return "1.1"; } - isUnitSchema() { - return this.getSchema() === "unit"; + getDefaultContentType() { + return "application/x-amz-json-1.1"; } - isDocumentSchema() { - return this.getSchema() === 15; +} + +class AwsRestJsonProtocol extends protocols.HttpBindingProtocol { + serializer; + deserializer; + codec; + mixin = new ProtocolLib(); + constructor({ defaultNamespace }) { + super({ + defaultNamespace, + }); + const settings = { + timestampFormat: { + useTrait: true, + default: 7, + }, + httpBindings: true, + jsonName: true, + }; + this.codec = new JsonCodec(settings); + this.serializer = new protocols.HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new protocols.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); } - isStringSchema() { - return this.getSchema() === 0; + getShapeId() { + return "aws.protocols#restJson1"; } - isBooleanSchema() { - return this.getSchema() === 2; + getPayloadCodec() { + return this.codec; } - isNumericSchema() { - return this.getSchema() === 1; + setSerdeContext(serdeContext) { + this.codec.setSerdeContext(serdeContext); + super.setSerdeContext(serdeContext); } - isBigIntegerSchema() { - return this.getSchema() === 17; + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + const inputSchema = schema.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.headers["content-type"] && !request.body) { + request.body = "{}"; + } + return request; } - isBigDecimalSchema() { - return this.getSchema() === 19; + async handleError(operationSchema, context, response, dataObject, metadata) { + const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); + const ns = schema.NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor(message); + await this.deserializeHttpMessage(errorSchema, context, response, dataObject); + const output = {}; + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().jsonName ?? name; + output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); + } + throw Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message, + }, output); } - isStreaming() { - const { streaming } = this.getMergedTraits(); - return !!streaming || this.getSchema() === 42; + getDefaultContentType() { + return "application/json"; } - isIdempotencyToken() { - const match = (traits) => (traits & 0b0100) === 0b0100 || - !!traits?.idempotencyToken; - const { normalizedTraits, traits, memberTraits } = this; - return match(normalizedTraits) || match(traits) || match(memberTraits); +} + +const awsExpectUnion = (value) => { + if (value == null) { + return undefined; } - getMergedTraits() { - return (this.normalizedTraits ?? - (this.normalizedTraits = { - ...this.getOwnTraits(), - ...this.getMemberTraits(), - })); + if (typeof value === "object" && "__type" in value) { + delete value.__type; } - getMemberTraits() { - return translateTraits(this.memberTraits); + return smithyClient.expectUnion(value); +}; + +class XmlShapeDeserializer extends SerdeContextConfig { + settings; + stringDeserializer; + constructor(settings) { + super(); + this.settings = settings; + this.stringDeserializer = new protocols.FromStringShapeDeserializer(settings); } - getOwnTraits() { - return translateTraits(this.traits); + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.stringDeserializer.setSerdeContext(serdeContext); } - 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)}`); + read(schema$1, bytes, key) { + const ns = schema.NormalizedSchema.of(schema$1); + 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 schema = this.getSchema(); - const memberSchema = isDoc - ? 15 - : schema[4] ?? 0; - return member([memberSchema, 0], "key"); + const xmlString = (this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8)(bytes); + const parsedObject = this.parseXml(xmlString); + return this.readSchema(schema$1, key ? parsedObject[key] : parsedObject); } - getValueSchema() { - const sc = this.getSchema(); - const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; - const memberSchema = typeof sc === "number" - ? 0b0011_1111 & sc - : sc && typeof sc === "object" && (isMap || isList) - ? sc[3 + sc[0]] - : isDoc - ? 15 - : void 0; - if (memberSchema != null) { - return member([memberSchema, 0], isMap ? "value" : "member"); + readSchema(_schema, value) { + const ns = schema.NormalizedSchema.of(_schema); + if (ns.isUnitSchema()) { + return; } - 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); + const traits = ns.getMergedTraits(); + if (ns.isListSchema() && !Array.isArray(value)) { + return this.readSchema(ns, [value]); } - if (this.isDocumentSchema()) { - return member([15, 0], memberName); + if (value == null) { + return value; } - throw new Error(`@smithy/core/schema - ${this.getName(true)} has no no member=${memberName}.`); - } - getMemberSchemas() { - const buffer = {}; - try { - for (const [k, v] of this.structIterator()) { - buffer[k] = v; + if (typeof value === "object") { + const sparse = !!traits.sparse; + 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]; + const sourceArray = Array.isArray(source) ? source : [source]; + for (const v of sourceArray) { + if (v != null || sparse) { + buffer.push(this.readSchema(listValue, v)); + } + } + return buffer; } - } - catch (ignored) { } - return buffer; - } - getEventStreamMember() { - if (this.isStructSchema()) { - for (const [memberName, memberSchema] of this.structIterator()) { - if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { - return memberName; + 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 (value != null || sparse) { + buffer[key] = this.readSchema(memberNs, value); + } } + return buffer; } + if (ns.isStructSchema()) { + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMergedTraits(); + const xmlObjectKey = !memberTraits.httpPayload + ? memberSchema.getMemberTraits().xmlName ?? memberName + : memberTraits.xmlName ?? memberSchema.getName(); + if (value[xmlObjectKey] != null) { + buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]); + } + } + return buffer; + } + if (ns.isDocumentSchema()) { + return value; + } + throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`); } - return ""; - } - *structIterator() { - if (this.isUnitSchema()) { - return; - } - if (!this.isStructSchema()) { - throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); + if (ns.isListSchema()) { + return []; } - const struct = this.getSchema(); - for (let i = 0; i < struct[4].length; ++i) { - yield [struct[4][i], member([struct[5][i], 0], struct[4][i])]; + if (ns.isMapSchema() || ns.isStructSchema()) { + return {}; } + return this.stringDeserializer.read(ns, value); } -} -function member(memberSchema, memberName) { - if (memberSchema instanceof NormalizedSchema) { - return Object.assign(memberSchema, { - memberName, - _isMemberSchema: true, - }); + parseXml(xml) { + if (xml.length) { + let parsedObj; + try { + parsedObj = xmlBuilder.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 smithyClient.getValueFromTextNode(parsedObjToReturn); + } + return {}; } - const internalCtorAccess = NormalizedSchema; - return new internalCtorAccess(memberSchema, memberName); -} -const isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2; -const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5; - -class SimpleSchema extends Schema { - static symbol = Symbol.for("@smithy/sim"); - name; - schemaRef; - traits; - symbol = SimpleSchema.symbol; } -const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef, -}); -const simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef, -}); - -const SCHEMA = { - BLOB: 0b0001_0101, - STREAMING_BLOB: 0b0010_1010, - BOOLEAN: 0b0000_0010, - STRING: 0b0000_0000, - NUMERIC: 0b0000_0001, - BIG_INTEGER: 0b0001_0001, - BIG_DECIMAL: 0b0001_0011, - DOCUMENT: 0b0000_1111, - TIMESTAMP_DEFAULT: 0b0000_0100, - TIMESTAMP_DATE_TIME: 0b0000_0101, - TIMESTAMP_HTTP_DATE: 0b0000_0110, - TIMESTAMP_EPOCH_SECONDS: 0b0000_0111, - LIST_MODIFIER: 0b0100_0000, - MAP_MODIFIER: 0b1000_0000, -}; -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; +class QueryShapeSerializer extends SerdeContextConfig { + settings; + buffer; + constructor(settings) { + super(); + this.settings = settings; } - static for(namespace) { - if (!TypeRegistry.registries.has(namespace)) { - TypeRegistry.registries.set(namespace, new TypeRegistry(namespace)); + write(schema$1, value, prefix = "") { + if (this.buffer === undefined) { + this.buffer = ""; } - return TypeRegistry.registries.get(namespace); - } - register(shapeId, schema) { - const qualifiedName = this.normalizeShapeId(shapeId); - const registry = TypeRegistry.for(qualifiedName.split("#")[0]); - registry.schemas.set(qualifiedName, schema); - } - getSchema(shapeId) { - const id = this.normalizeShapeId(shapeId); - if (!this.schemas.has(id)) { - throw new Error(`@smithy/core/schema - schema not found for ${id}`); + const ns = schema.NormalizedSchema.of(schema$1); + if (prefix && !prefix.endsWith(".")) { + prefix += "."; } - return this.schemas.get(id); - } - registerError(es, ctor) { - const $error = es; - const registry = TypeRegistry.for($error[1]); - registry.schemas.set($error[1] + "#" + $error[2], $error); - registry.exceptions.set($error, ctor); - } - getErrorCtor(es) { - const $error = es; - const registry = TypeRegistry.for($error[1]); - return registry.exceptions.get($error); - } - 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; + if (ns.isBlobSchema()) { + if (typeof value === "string" || value instanceof Uint8Array) { + this.writeKey(prefix); + this.writeValue((this.serdeContext?.base64Encoder ?? utilBase64.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(serde.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 serde.NumericValue ? value.string : String(value)); + } + } + else if (ns.isTimestampSchema()) { + if (value instanceof Date) { + this.writeKey(prefix); + const format = protocols.determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + this.writeValue(value.toISOString().replace(".000Z", "Z")); + break; + case 6: + this.writeValue(smithyClient.dateToUtcString(value)); + break; + case 7: + this.writeValue(String(value.getTime() / 1000)); + break; } } } - return undefined; + else if (ns.isDocumentSchema()) { + throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${ns.getName(true)}`); + } + 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 suffix = this.getKey("member", member.getMergedTraits().xmlName); + 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, v] of Object.entries(value)) { + if (v == null) { + continue; + } + const keySuffix = this.getKey("key", keySchema.getMergedTraits().xmlName); + const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`; + const valueSuffix = this.getKey("value", memberSchema.getMergedTraits().xmlName); + 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") { + for (const [memberName, member] of ns.structIterator()) { + if (value[memberName] == null && !member.isIdempotencyToken()) { + continue; + } + const suffix = this.getKey(memberName, member.getMergedTraits().xmlName); + const key = `${prefix}${suffix}`; + this.write(member, value[memberName], key); + } + } + } + else if (ns.isUnitSchema()) ; + else { + throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`); + } } - find(predicate) { - return [...this.schemas.values()].find(predicate); + 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; } - clear() { - this.schemas.clear(); - this.exceptions.clear(); + getKey(memberName, xmlName) { + const key = xmlName ?? memberName; + if (this.settings.capitalizeKeys) { + return key[0].toUpperCase() + key.slice(1); + } + return key; } - normalizeShapeId(shapeId) { - if (shapeId.includes("#")) { - return shapeId; + writeKey(key) { + if (key.endsWith(".")) { + key = key.slice(0, key.length - 1); } - return this.namespace + "#" + shapeId; + this.buffer += `&${protocols.extendedEncodeURIComponent(key)}=`; + } + writeValue(value) { + this.buffer += protocols.extendedEncodeURIComponent(value); } } -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.struct = struct; -exports.translateTraits = translateTraits; - - -/***/ }), - -/***/ 16705: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var uuid = __nccwpck_require__(90266); - -const copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source; - -const parseBoolean = (value) => { - switch (value) { - case "true": - return true; - case "false": - return false; - default: - throw new Error(`Unable to parse boolean value "${value}"`); +class AwsQueryProtocol extends protocols.RpcProtocol { + options; + serializer; + deserializer; + mixin = new ProtocolLib(); + constructor(options) { + super({ + defaultNamespace: options.defaultNamespace, + }); + 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); } -}; -const expectBoolean = (value) => { - if (value === null || value === undefined) { - return undefined; + getShapeId() { + return "aws.protocols#awsQuery"; } - if (typeof value === "number") { - if (value === 0 || value === 1) { - logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + 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 += "/"; } - if (value === 0) { - return false; + Object.assign(request.headers, { + "content-type": `application/x-www-form-urlencoded`, + }); + if (schema.deref(operationSchema.input) === "unit" || !request.body) { + request.body = ""; } - if (value === 1) { - return true; + 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; } - if (typeof value === "string") { - const lower = value.toLowerCase(); - if (lower === "false" || lower === "true") { - logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + async deserializeResponse(operationSchema, context, response) { + const deserializer = this.deserializer; + const ns = schema.NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes = await protocols.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)); } - if (lower === "false") { - return false; + for (const header in response.headers) { + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; } - if (lower === "true") { - return true; + const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name; + const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : undefined; + const bytes = await protocols.collectBody(response.body, context); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey)); } + const output = { + $metadata: this.deserializeMetadata(response), + ...dataObject, + }; + return output; } - if (typeof value === "boolean") { - return value; - } - throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); -}; -const expectNumber = (value) => { - if (value === null || value === undefined) { - return undefined; + useNestedResult() { + return true; } - 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; + async handleError(operationSchema, context, response, dataObject, metadata) { + const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown"; + 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, (registry, errorName) => registry.find((schema$1) => schema.NormalizedSchema.of(schema$1).getMergedTraits().awsQueryError?.[0] === errorName)); + const ns = schema.NormalizedSchema.of(errorSchema); + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor(message); + const output = { + 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 Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message, + }, output); } - if (typeof value === "number") { - return value; - } - throw new TypeError(`Expected number, got ${typeof value}: ${value}`); -}; -const MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); -const 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}`); + 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"; } } - return expected; -}; -const expectLong = (value) => { - if (value === null || value === undefined) { - return undefined; + loadQueryError(data) { + return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error; } - if (Number.isInteger(value) && !Number.isNaN(value)) { - return value; + loadQueryErrorMessage(data) { + const errorData = this.loadQueryError(data); + return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown"; } - throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); -}; -const expectInt = expectLong; -const expectInt32 = (value) => expectSizedInt(value, 32); -const expectShort = (value) => expectSizedInt(value, 16); -const expectByte = (value) => expectSizedInt(value, 8); -const expectSizedInt = (value, size) => { - const expected = expectLong(value); - if (expected !== undefined && castInt(expected, size) !== expected) { - throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + getDefaultContentType() { + return "application/x-www-form-urlencoded"; } - return expected; -}; -const 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]; +} + +class AwsEc2QueryProtocol extends AwsQueryProtocol { + options; + constructor(options) { + super(options); + this.options = options; + const ec2Settings = { + capitalizeKeys: true, + flattenLists: true, + serializeEmptyLists: false, + }; + Object.assign(this.serializer.settings, ec2Settings); } -}; -const 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"); + useNestedResult() { + return false; } - return value; -}; -const expectObject = (value) => { - if (value === null || value === undefined) { - return undefined; +} + +const parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + let parsedObj; + try { + parsedObj = xmlBuilder.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 smithyClient.getValueFromTextNode(parsedObjToReturn); } - if (typeof value === "object" && !Array.isArray(value)) { - return value; + return {}; +}); +const parseXmlErrorBody = async (errorBody, context) => { + const value = await parseXmlBody(errorBody, context); + if (value.Error) { + value.Error.message = value.Error.message ?? value.Error.Message; } - const receivedType = Array.isArray(value) ? "array" : typeof value; - throw new TypeError(`Expected object, got ${receivedType}: ${value}`); + return value; }; -const expectString = (value) => { - if (value === null || value === undefined) { - return undefined; +const loadRestXmlErrorCode = (output, data) => { + if (data?.Error?.Code !== undefined) { + return data.Error.Code; } - if (typeof value === "string") { - return value; + if (data?.Code !== undefined) { + return data.Code; } - if (["boolean", "number", "bigint"].includes(typeof value)) { - logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); - return String(value); + if (output.statusCode == 404) { + return "NotFound"; } - throw new TypeError(`Expected string, got ${typeof value}: ${value}`); }; -const expectUnion = (value) => { - if (value === null || value === undefined) { - return undefined; - } - const asObject = expectObject(value); - const setKeys = Object.entries(asObject) - .filter(([, v]) => v != null) - .map(([k]) => k); - if (setKeys.length === 0) { - throw new TypeError(`Unions must have exactly one non-null member. None were found.`); + +class XmlShapeSerializer extends SerdeContextConfig { + settings; + stringBuffer; + byteBuffer; + buffer; + constructor(settings) { + super(); + this.settings = settings; } - if (setKeys.length > 1) { - throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + write(schema$1, value) { + const ns = schema.NormalizedSchema.of(schema$1); + if (ns.isStringSchema() && typeof value === "string") { + this.stringBuffer = value; + } + else if (ns.isBlobSchema()) { + this.byteBuffer = + "byteLength" in value + ? value + : (this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(value); + } + else { + this.buffer = this.writeStruct(ns, value, undefined); + const traits = ns.getMergedTraits(); + if (traits.httpPayload && !traits.xmlName) { + this.buffer.withName(ns.getName()); + } + } } - return asObject; -}; -const strictParseDouble = (value) => { - if (typeof value == "string") { - return expectNumber(parseNumber(value)); + 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(); } - return expectNumber(value); -}; -const strictParseFloat = strictParseDouble; -const strictParseFloat32 = (value) => { - if (typeof value == "string") { - return expectFloat32(parseNumber(value)); + 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 = xmlBuilder.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 = xmlBuilder.XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName()); + this.writeSimpleInto(memberSchema, val, memberNode, xmlns); + structXmlNode.addChildNode(memberNode); + } + } + } + if (xmlns) { + structXmlNode.addAttribute(xmlnsAttr, xmlns); + } + return structXmlNode; } - return expectFloat32(value); -}; -const NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; -const 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`); + 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 = xmlBuilder.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 = xmlBuilder.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); + } } - return parseFloat(value); -}; -const limitedParseDouble = (value) => { - if (typeof value == "string") { - return parseFloatString(value); + 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 = xmlBuilder.XmlNode.of(keyTag, key); + const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns); + if (keyXmlns) { + keyNode.addAttribute(keyXmlnsAttr, keyXmlns); + } + entry.addChildNode(keyNode); + let valueNode = xmlBuilder.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, val] of Object.entries(map)) { + if (sparse || val != null) { + const entry = xmlBuilder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + addKeyValue(entry, key, val); + container.addChildNode(entry); + } + } + } + else { + let mapNode; + if (!containerIsMap) { + mapNode = xmlBuilder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + if (xmlns) { + mapNode.addAttribute(xmlnsAttr, xmlns); + } + container.addChildNode(mapNode); + } + for (const [key, val] of Object.entries(map)) { + if (sparse || val != null) { + const entry = xmlBuilder.XmlNode.of("entry"); + addKeyValue(entry, key, val); + (containerIsMap ? container : mapNode).addChildNode(entry); + } + } + } } - return expectNumber(value); -}; -const handleFloat = limitedParseDouble; -const limitedParseFloat = limitedParseDouble; -const limitedParseFloat32 = (value) => { - if (typeof value == "string") { - return parseFloatString(value); + writeSimple(_schema, value) { + if (null === value) { + throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value."); + } + const ns = schema.NormalizedSchema.of(_schema); + let nodeContents = null; + if (value && typeof value === "object") { + if (ns.isBlobSchema()) { + nodeContents = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(value); + } + else if (ns.isTimestampSchema() && value instanceof Date) { + const format = protocols.determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + nodeContents = value.toISOString().replace(".000Z", "Z"); + break; + case 6: + nodeContents = smithyClient.dateToUtcString(value); + break; + case 7: + nodeContents = String(value.getTime() / 1000); + break; + default: + console.warn("Missing timestamp format, using http date", value); + nodeContents = smithyClient.dateToUtcString(value); + break; + } + } + else if (ns.isBigDecimalSchema() && value) { + if (value instanceof serde.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 = serde.generateIdempotencyToken(); + } + else { + nodeContents = String(value); + } + } + if (nodeContents === null) { + throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`); + } + return nodeContents; } - return expectFloat32(value); -}; -const 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}`); + writeSimpleInto(_schema, value, into, parentXmlns) { + const nodeContents = this.writeSimple(_schema, value); + const ns = schema.NormalizedSchema.of(_schema); + const content = new xmlBuilder.XmlText(nodeContents); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + if (xmlns) { + into.addAttribute(xmlnsAttr, xmlns); + } + into.addChildNode(content); } -}; -const strictParseLong = (value) => { - if (typeof value === "string") { - return expectLong(parseNumber(value)); + getXmlnsAttribute(ns, parentXmlns) { + const traits = ns.getMergedTraits(); + const [prefix, xmlns] = traits.xmlNamespace ?? []; + if (xmlns && xmlns !== parentXmlns) { + return [prefix ? `xmlns:${prefix}` : "xmlns", xmlns]; + } + return [void 0, void 0]; } - return expectLong(value); -}; -const strictParseInt = strictParseLong; -const strictParseInt32 = (value) => { - if (typeof value === "string") { - return expectInt32(parseNumber(value)); +} + +class XmlCodec extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; } - return expectInt32(value); -}; -const strictParseShort = (value) => { - if (typeof value === "string") { - return expectShort(parseNumber(value)); + createSerializer() { + const serializer = new XmlShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext); + return serializer; } - return expectShort(value); -}; -const strictParseByte = (value) => { - if (typeof value === "string") { - return expectByte(parseNumber(value)); + createDeserializer() { + const deserializer = new XmlShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; } - return expectByte(value); -}; -const stackTraceWarning = (message) => { - return String(new TypeError(message).stack || message) - .split("\n") - .slice(0, 5) - .filter((s) => !s.includes("stackTraceWarning")) - .join("\n"); -}; -const logger = { - warn: console.warn, -}; - -const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; -const 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`; } -const RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); -const parseRfc3339DateTime = (value) => { - if (value === null || value === undefined) { - return undefined; + +class AwsRestXmlProtocol extends protocols.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 protocols.HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new protocols.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); } - if (typeof value !== "string") { - throw new TypeError("RFC-3339 date-times must be expressed as strings"); + getPayloadCodec() { + return this.codec; } - const match = RFC3339.exec(value); - if (!match) { - throw new TypeError("Invalid RFC-3339 date-time value"); + getShapeId() { + return "aws.protocols#restXml"; } - 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 }); -}; -const 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])$/); -const parseRfc3339DateTimeWithOffset = (value) => { - if (value === null || value === undefined) { - return undefined; + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + const inputSchema = schema.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.headers["content-type"] === this.getDefaultContentType()) { + if (typeof request.body === "string") { + request.body = '' + request.body; + } + } + return request; } - if (typeof value !== "string") { - throw new TypeError("RFC-3339 date-times must be expressed as strings"); + async deserializeResponse(operationSchema, context, response) { + return super.deserializeResponse(operationSchema, context, response); } - const match = RFC3339_WITH_OFFSET$1.exec(value); - if (!match) { - throw new TypeError("Invalid RFC-3339 date-time value"); + async handleError(operationSchema, context, response, dataObject, metadata) { + const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown"; + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); + const ns = schema.NormalizedSchema.of(errorSchema); + const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor(message); + await this.deserializeHttpMessage(errorSchema, context, response, dataObject); + const output = {}; + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().xmlName ?? name; + const value = dataObject.Error?.[target] ?? dataObject[target]; + output[name] = this.codec.createDeserializer().readSchema(member, value); + } + throw Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message, + }, output); } - 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)); + getDefaultContentType() { + return "application/xml"; } - return date; +} + +exports.AWSSDKSigV4Signer = AWSSDKSigV4Signer; +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.AwsSdkSigV4ASigner = AwsSdkSigV4ASigner; +exports.AwsSdkSigV4Signer = AwsSdkSigV4Signer; +exports.AwsSmithyRpcV2CborProtocol = AwsSmithyRpcV2CborProtocol; +exports.JsonCodec = JsonCodec; +exports.JsonShapeDeserializer = JsonShapeDeserializer; +exports.JsonShapeSerializer = JsonShapeSerializer; +exports.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = NODE_AUTH_SCHEME_PREFERENCE_OPTIONS; +exports.NODE_SIGV4A_CONFIG_OPTIONS = NODE_SIGV4A_CONFIG_OPTIONS; +exports.XmlCodec = XmlCodec; +exports.XmlShapeDeserializer = XmlShapeDeserializer; +exports.XmlShapeSerializer = XmlShapeSerializer; +exports._toBool = _toBool; +exports._toNum = _toNum; +exports._toStr = _toStr; +exports.awsExpectUnion = awsExpectUnion; +exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion; +exports.getBearerTokenEnvKey = getBearerTokenEnvKey; +exports.loadRestJsonErrorCode = loadRestJsonErrorCode; +exports.loadRestXmlErrorCode = loadRestXmlErrorCode; +exports.parseJsonBody = parseJsonBody; +exports.parseJsonErrorBody = parseJsonErrorBody; +exports.parseXmlBody = parseXmlBody; +exports.parseXmlErrorBody = parseXmlErrorBody; +exports.resolveAWSSDKSigV4Config = resolveAWSSDKSigV4Config; +exports.resolveAwsSdkSigV4AConfig = resolveAwsSdkSigV4AConfig; +exports.resolveAwsSdkSigV4Config = resolveAwsSdkSigV4Config; +exports.setCredentialFeature = setCredentialFeature; +exports.setFeature = setFeature; +exports.setTokenFeature = setTokenFeature; +exports.state = state; +exports.validateSigningProperties = validateSigningProperties; + + +/***/ }), + +/***/ 5152: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +const state = { + warningEmitted: false, }; -const 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$/); -const 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$/); -const 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})$/); -const parseRfc7231DateTime = (value) => { - if (value === null || value === undefined) { - return undefined; - } - 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 }); +const emitWarningIfUnsupportedVersion = (version) => { + if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) { + state.warningEmitted = true; + process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js 16.x on January 6, 2025. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to a supported Node.js LTS version. + +More information can be found at: https://a.co/74kJMmI`); } - throw new TypeError("Invalid RFC-7231 date-time value"); }; -const parseEpochTimestamp = (value) => { - if (value === null || value === undefined) { - return undefined; - } - let valueAsDouble; - if (typeof value === "number") { - valueAsDouble = value; + +function setCredentialFeature(credentials, feature, value) { + if (!credentials.$source) { + credentials.$source = {}; } - else if (typeof value === "string") { - valueAsDouble = strictParseDouble(value); + credentials.$source[feature] = value; + return credentials; +} + +function setFeature(context, feature, value) { + if (!context.__aws_sdk_context) { + context.__aws_sdk_context = { + features: {}, + }; } - else if (typeof value === "object" && value.tag === 1) { - valueAsDouble = value.value; + else if (!context.__aws_sdk_context.features) { + context.__aws_sdk_context.features = {}; } - else { - throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); + context.__aws_sdk_context.features[feature] = value; +} + +function setTokenFeature(token, feature, value) { + if (!token.$source) { + token.$source = {}; } - if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { - throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); + token.$source[feature] = value; + return token; +} + +exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion; +exports.setCredentialFeature = setCredentialFeature; +exports.setFeature = setFeature; +exports.setTokenFeature = setTokenFeature; +exports.state = state; + + +/***/ }), + +/***/ 5606: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var client = __nccwpck_require__(5152); +var propertyProvider = __nccwpck_require__(1238); + +const ENV_KEY = "AWS_ACCESS_KEY_ID"; +const ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; +const ENV_SESSION = "AWS_SESSION_TOKEN"; +const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; +const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; +const ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; +const 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 }), + }; + client.setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g"); + return credentials; } - return new Date(Math.round(valueAsDouble * 1000)); -}; -const 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))); + throw new propertyProvider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); }; -const parseTwoDigitYear = (value) => { - const thisYear = new Date().getUTCFullYear(); - const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); - if (valueInThisCentury < thisYear) { - return valueInThisCentury + 100; + +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; + + +/***/ }), + +/***/ 5861: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var credentialProviderEnv = __nccwpck_require__(5606); +var propertyProvider = __nccwpck_require__(1238); +var sharedIniFileLoader = __nccwpck_require__(4964); + +const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +const remoteProvider = async (init) => { + const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await __nccwpck_require__.e(/* import() */ 566).then(__nccwpck_require__.t.bind(__nccwpck_require__, 566, 19)); + 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 } = await __nccwpck_require__.e(/* import() */ 605).then(__nccwpck_require__.bind(__nccwpck_require__, 8605)); + return propertyProvider.chain(fromHttp(init), fromContainerMetadata(init)); } - return valueInThisCentury; -}; -const FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000; -const 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())); + if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") { + return async () => { + throw new propertyProvider.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger }); + }; } - return input; + init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"); + return fromInstanceMetadata(init); }; -const parseMonthByShortName = (value) => { - const monthIdx = MONTHS.indexOf(value); - if (monthIdx < 0) { - throw new TypeError(`Invalid month: ${value}`); + +function memoizeChain(providers, treatAsExpired) { + const chain = internalCreateChain(providers); + let activeLock; + let passiveLock; + let credentials; + const provider = async (options) => { + if (options?.forceRefresh) { + return await chain(options); + } + 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; + passiveLock = undefined; + }); + } + } + else { + activeLock = chain(options).then((c) => { + credentials = c; + activeLock = undefined; + }); + return provider(options); + } + } + return credentials; + }; + return provider; +} +const 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; + } } - return monthIdx + 1; + throw lastProviderError; }; -const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -const validateDayOfMonth = (year, month, day) => { - let maxDays = DAYS_IN_MONTH[month]; - if (month === 1 && isLeapYear(year)) { - maxDays = 29; + +let multipleCredentialSourceWarningEmitted = false; +const defaultProvider = (init = {}) => memoizeChain([ + async () => { + const profile = init.profile ?? process.env[sharedIniFileLoader.ENV_PROFILE]; + if (profile) { + const envStaticCredentialsAreSet = process.env[credentialProviderEnv.ENV_KEY] && process.env[credentialProviderEnv.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 propertyProvider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", { + logger: init.logger, + tryNextLink: true, + }); + } + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"); + return credentialProviderEnv.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 propertyProvider.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger }); + } + const { fromSSO } = await __nccwpck_require__.e(/* import() */ 998).then(__nccwpck_require__.t.bind(__nccwpck_require__, 998, 19)); + return fromSSO(init)(awsIdentityProperties); + }, + async (awsIdentityProperties) => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni"); + const { fromIni } = await __nccwpck_require__.e(/* import() */ 869).then(__nccwpck_require__.t.bind(__nccwpck_require__, 5869, 19)); + return fromIni(init)(awsIdentityProperties); + }, + async (awsIdentityProperties) => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess"); + const { fromProcess } = await __nccwpck_require__.e(/* import() */ 360).then(__nccwpck_require__.t.bind(__nccwpck_require__, 5360, 19)); + return fromProcess(init)(awsIdentityProperties); + }, + async (awsIdentityProperties) => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile"); + const { fromTokenFile } = await Promise.all(/* import() */[__nccwpck_require__.e(136), __nccwpck_require__.e(956)]).then(__nccwpck_require__.t.bind(__nccwpck_require__, 9956, 23)); + return fromTokenFile(init)(awsIdentityProperties); + }, + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"); + return (await remoteProvider(init))(); + }, + async () => { + throw new propertyProvider.CredentialsProviderError("Could not load credentials from any providers", { + tryNextLink: false, + logger: init.logger, + }); + }, +], credentialsTreatedAsExpired); +const credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined; +const credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000; + +exports.credentialsTreatedAsExpired = credentialsTreatedAsExpired; +exports.credentialsWillNeedRefresh = credentialsWillNeedRefresh; +exports.defaultProvider = defaultProvider; + + +/***/ }), + +/***/ 2590: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var protocolHttp = __nccwpck_require__(2356); + +function resolveHostHeaderConfig(input) { + return input; +} +const hostHeaderMiddleware = (options) => (next) => async (args) => { + if (!protocolHttp.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 : ""); } - if (day > maxDays) { - throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); + else if (!request.headers["host"]) { + let host = request.hostname; + if (request.port != null) + host += `:${request.port}`; + request.headers["host"] = host; } + return next(args); }; -const isLeapYear = (year) => { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +const hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true, }; -const 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`); +const getHostHeaderPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + }, +}); + +exports.getHostHeaderPlugin = getHostHeaderPlugin; +exports.hostHeaderMiddleware = hostHeaderMiddleware; +exports.hostHeaderMiddlewareOptions = hostHeaderMiddlewareOptions; +exports.resolveHostHeaderConfig = resolveHostHeaderConfig; + + +/***/ }), + +/***/ 5242: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +const 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; } - return dateVal; -}; -const parseMilliseconds = (value) => { - if (value === null || value === undefined) { - return 0; + 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; } - return strictParseFloat32("0." + value) * 1000; }; -const 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; +const loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true, }; -const stripLeadingZeroes = (value) => { - let idx = 0; - while (idx < value.length - 1 && value.charAt(idx) === "0") { - idx++; - } - if (idx === 0) { - return value; - } - return value.slice(idx); +const getLoggerPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); + }, +}); + +exports.getLoggerPlugin = getLoggerPlugin; +exports.loggerMiddleware = loggerMiddleware; +exports.loggerMiddlewareOptions = loggerMiddlewareOptions; + + +/***/ }), + +/***/ 1568: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var recursionDetectionMiddleware = __nccwpck_require__(2521); + +const recursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low", }; -const 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); - }, +const getRecursionDetectionPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(recursionDetectionMiddleware.recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions); + }, +}); + +exports.getRecursionDetectionPlugin = getRecursionDetectionPlugin; +Object.keys(recursionDetectionMiddleware).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return recursionDetectionMiddleware[k]; } }); - 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; -} -const ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`; -const mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`; -const time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`; -const date = `(\\d?\\d)`; -const year = `(\\d{4})`; -const RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/); -const IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`); -const RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`); -const ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`); -const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; -const _parseEpochTimestamp = (value) => { - if (value == null) { - return void 0; - } - 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)); -}; -const _parseRfc3339DateTimeWithOffset = (value) => { - if (value == null) { - return void 0; - } - 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.setUTCFullYear(Number(yearStr), Number(monthStr) - 1, Number(dayStr)); - date.setUTCHours(Number(hours)); - date.setUTCMinutes(Number(minutes)); - date.setUTCSeconds(Number(seconds)); - date.setUTCMilliseconds(Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0); - if (offsetStr.toUpperCase() != "Z") { - const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0]; - const scalar = sign === "-" ? 1 : -1; - date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000)); - } - return date; -}; -const _parseRfc7231DateTime = (value) => { - if (value == null) { - return void 0; - } - 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(); +/***/ }), + +/***/ 2521: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.recursionDetectionMiddleware = void 0; +const lambda_invoke_store_1 = __nccwpck_require__(9320); +const protocol_http_1 = __nccwpck_require__(2356); +const TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; +const ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; +const ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; +const recursionDetectionMiddleware = () => (next) => async (args) => { + const { request } = args; + if (!protocol_http_1.HttpRequest.isInstance(request)) { + return next(args); } - else if ((matches = ASC_TIME.exec(value))) { - [, month, day, hour, minute, second, fraction, year] = matches; + const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? + TRACE_ID_HEADER_NAME; + if (request.headers.hasOwnProperty(traceIdHeader)) { + return next(args); } - if (year && second) { - const date = new Date(); - date.setUTCFullYear(Number(year)); - date.setUTCMonth(months.indexOf(month)); - range(day, 1, 31); - date.setUTCDate(Number(day)); - range(hour, 0, 23); - date.setUTCHours(Number(hour)); - range(minute, 0, 59); - date.setUTCMinutes(Number(minute)); - range(second, 0, 60); - date.setUTCSeconds(Number(second)); - date.setUTCMilliseconds(fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0); - return date; + const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; + const traceIdFromEnv = process.env[ENV_TRACE_ID]; + const traceIdFromInvokeStore = lambda_invoke_store_1.InvokeStore.getXRayTraceId(); + const traceId = traceIdFromInvokeStore ?? traceIdFromEnv; + const nonEmptyString = (str) => typeof str === "string" && str.length > 0; + if (nonEmptyString(functionName) && nonEmptyString(traceId)) { + request.headers[TRACE_ID_HEADER_NAME] = traceId; } - throw new TypeError(`Invalid RFC7231 date-time value ${value}.`); + return next({ + ...args, + request, + }); }; -function range(v, min, max) { - const _v = Number(v); - if (_v < min || _v > max) { - throw new Error(`Value ${_v} out of range [${min}, ${max}]`); +exports.recursionDetectionMiddleware = recursionDetectionMiddleware; + + +/***/ }), + +/***/ 2959: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var core = __nccwpck_require__(402); +var utilEndpoints = __nccwpck_require__(3068); +var protocolHttp = __nccwpck_require__(2356); +var core$1 = __nccwpck_require__(8704); + +const 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 = core.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; + }, + }); } -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 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") { + core$1.setFeature(context, "PROTOCOL_RPC_V2_CBOR", "M"); } - const compoundSegments = []; - let currentSegment = ""; - for (let i = 0; i < segments.length; i++) { - if (currentSegment === "") { - currentSegment = segments[i]; + if (typeof config.retryStrategy === "function") { + const retryStrategy = await config.retryStrategy(); + if (typeof retryStrategy.acquireInitialRetryToken === "function") { + if (retryStrategy.constructor?.name?.includes("Adaptive")) { + core$1.setFeature(context, "RETRY_MODE_ADAPTIVE", "F"); + } + else { + core$1.setFeature(context, "RETRY_MODE_STANDARD", "E"); + } } else { - currentSegment += delimiter + segments[i]; - } - if ((i + 1) % numDelimiters === 0) { - compoundSegments.push(currentSegment); - currentSegment = ""; + core$1.setFeature(context, "RETRY_MODE_LEGACY", "D"); } } - if (currentSegment !== "") { - compoundSegments.push(currentSegment); - } - return compoundSegments; -} - -const 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; - } + if (typeof config.accountIdEndpointMode === "function") { + const endpointV2 = context.endpointV2; + if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) { + core$1.setFeature(context, "ACCOUNT_ID_ENDPOINT", "O"); + } + switch (await config.accountIdEndpointMode?.()) { + case "disabled": + core$1.setFeature(context, "ACCOUNT_ID_MODE_DISABLED", "Q"); break; - case ",": - if (!withinQuotes) { - values.push(value.slice(anchor, i)); - anchor = i + 1; - } + case "preferred": + core$1.setFeature(context, "ACCOUNT_ID_MODE_PREFERRED", "P"); + break; + case "required": + core$1.setFeature(context, "ACCOUNT_ID_MODE_REQUIRED", "R"); break; } - prevChar = char; } - values.push(value.slice(anchor)); - return values.map((v) => { - v = v.trim(); - const z = v.length; - if (z < 2) { - return v; + const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity; + if (identity?.$source) { + const credentials = identity; + if (credentials.accountId) { + core$1.setFeature(context, "RESOLVED_ACCOUNT_ID", "T"); } - if (v[0] === `"` && v[z - 1] === `"`) { - v = v.slice(1, z - 1); + for (const [key, value] of Object.entries(credentials.$source ?? {})) { + core$1.setFeature(context, key, value); } - return v.replace(/\\"/g, '"'); - }); -}; + } +} -const format = /^-?\d*(\.\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 must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`); +const USER_AGENT = "user-agent"; +const X_AMZ_USER_AGENT = "x-amz-user-agent"; +const SPACE = " "; +const UA_NAME_SEPARATOR = "/"; +const UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; +const UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; +const UA_ESCAPE_CHAR = "-"; + +const 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; } - toString() { - return this.string; + return buffer; +} + +const userAgentMiddleware = (options) => (next, context) => async (args) => { + const { request } = args; + if (!protocolHttp.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 = utilEndpoints.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, + }); +}; +const 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(); } - static [Symbol.hasInstance](object) { - if (!object || typeof object !== "object") { - return false; + 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}`; } - const _nv = object; - return NumericValue.prototype.isPrototypeOf(object) || (_nv.type === "bigDecimal" && format.test(_nv.string)); - } -} -function nv(input) { - return new NumericValue(String(input), "bigDecimal"); -} + }, ""); +}; +const getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true, +}; +const getUserAgentPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions); + }, +}); -Object.defineProperty(exports, "generateIdempotencyToken", ({ - enumerable: true, - get: function () { return uuid.v4; } -})); -exports.LazyJsonString = LazyJsonString; -exports.NumericValue = NumericValue; -exports._parseEpochTimestamp = _parseEpochTimestamp; -exports._parseRfc3339DateTimeWithOffset = _parseRfc3339DateTimeWithOffset; -exports._parseRfc7231DateTime = _parseRfc7231DateTime; -exports.copyDocumentWithTransform = copyDocumentWithTransform; -exports.dateToUtcString = dateToUtcString; -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.handleFloat = handleFloat; -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.splitEvery = splitEvery; -exports.splitHeader = splitHeader; -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.DEFAULT_UA_APP_ID = DEFAULT_UA_APP_ID; +exports.getUserAgentMiddlewareOptions = getUserAgentMiddlewareOptions; +exports.getUserAgentPlugin = getUserAgentPlugin; +exports.resolveUserAgentConfig = resolveUserAgentConfig; +exports.userAgentMiddleware = userAgentMiddleware; /***/ }), -/***/ 83952: +/***/ 6463: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var protocolHttp = __nccwpck_require__(22475); -var querystringBuilder = __nccwpck_require__(82543); -var utilBase64 = __nccwpck_require__(5074); +var configResolver = __nccwpck_require__(9316); +var stsRegionDefaultResolver = __nccwpck_require__(5779); -function createRequest(url, requestOptions) { - return new Request(url, requestOptions); -} +const getAwsRegionExtensionConfiguration = (runtimeConfig) => { + return { + setRegion(region) { + runtimeConfig.region = region; + }, + region() { + return runtimeConfig.region; + }, + }; +}; +const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region(), + }; +}; -function requestTimeout(timeoutInMs = 0) { - return new Promise((resolve, reject) => { - if (timeoutInMs) { - setTimeout(() => { - const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); - timeoutError.name = "TimeoutError"; - reject(timeoutError); - }, timeoutInMs); - } +Object.defineProperty(exports, "NODE_REGION_CONFIG_FILE_OPTIONS", ({ + enumerable: true, + get: function () { return configResolver.NODE_REGION_CONFIG_FILE_OPTIONS; } +})); +Object.defineProperty(exports, "NODE_REGION_CONFIG_OPTIONS", ({ + enumerable: true, + get: function () { return configResolver.NODE_REGION_CONFIG_OPTIONS; } +})); +Object.defineProperty(exports, "REGION_ENV_NAME", ({ + enumerable: true, + get: function () { return configResolver.REGION_ENV_NAME; } +})); +Object.defineProperty(exports, "REGION_INI_NAME", ({ + enumerable: true, + get: function () { return configResolver.REGION_INI_NAME; } +})); +Object.defineProperty(exports, "resolveRegionConfig", ({ + enumerable: true, + get: function () { return configResolver.resolveRegionConfig; } +})); +exports.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration; +exports.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration; +Object.keys(stsRegionDefaultResolver).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return stsRegionDefaultResolver[k]; } }); -} +}); -const keepAliveSupport = { - supported: undefined, + +/***/ }), + +/***/ 5779: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.warning = void 0; +exports.stsRegionDefaultResolver = stsRegionDefaultResolver; +const config_resolver_1 = __nccwpck_require__(9316); +const node_config_provider_1 = __nccwpck_require__(5704); +function stsRegionDefaultResolver(loaderConfig = {}) { + return (0, node_config_provider_1.loadConfig)({ + ...config_resolver_1.NODE_REGION_CONFIG_OPTIONS, + async default() { + if (!exports.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"; + }, + }, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }); +} +exports.warning = { + silence: false, }; -class FetchHttpHandler { - config; - configProvider; - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; + + +/***/ }), + +/***/ 3068: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var utilEndpoints = __nccwpck_require__(9674); +var urlParser = __nccwpck_require__(4494); + +const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } } - return new FetchHttpHandler(instanceOrOptions); + return true; } - constructor(options) { - if (typeof options === "function") { - this.configProvider = options().then((opts) => opts || {}); - } - else { - this.config = options ?? {}; - this.configProvider = Promise.resolve(this.config); - } - if (keepAliveSupport.supported === undefined) { - keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]")); - } + if (!utilEndpoints.isValidHostLabel(value)) { + return false; } - destroy() { + if (value.length < 3 || value.length > 63) { + return false; } - async handle(request, { abortSignal, requestTimeout: requestTimeout$1 } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - const requestTimeoutInMs = requestTimeout$1 ?? this.config.requestTimeout; - const keepAlive = this.config.keepAlive === true; - const credentials = this.config.credentials; - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - return Promise.reject(abortError); - } - let path = request.path; - const queryString = querystringBuilder.buildQueryString(request.query || {}); - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let auth = ""; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}@`; - } - const { port, method } = request; - const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; - const body = method === "GET" || method === "HEAD" ? undefined : request.body; - const requestOptions = { - body, - headers: new Headers(request.headers), - method: method, - credentials, - }; - if (this.config?.cache) { - requestOptions.cache = this.config.cache; - } - if (body) { - requestOptions.duplex = "half"; - } - if (typeof AbortController !== "undefined") { - requestOptions.signal = abortSignal; - } - if (keepAliveSupport.supported) { - requestOptions.keepalive = keepAlive; - } - if (typeof this.config.requestInit === "function") { - Object.assign(requestOptions, this.config.requestInit(request)); - } - let removeSignalEventListener = () => { }; - const fetchRequest = createRequest(url, requestOptions); - const raceOfPromises = [ - fetch(fetchRequest).then((response) => { - const fetchHeaders = response.headers; - const transformedHeaders = {}; - for (const pair of fetchHeaders.entries()) { - transformedHeaders[pair[0]] = pair[1]; - } - const hasReadableStream = response.body != undefined; - if (!hasReadableStream) { - return response.blob().then((body) => ({ - response: new protocolHttp.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body, - }), - })); - } + if (value !== value.toLowerCase()) { + return false; + } + if (utilEndpoints.isIpAddress(value)) { + return false; + } + return true; +}; + +const ARN_DELIMITER = ":"; +const RESOURCE_DELIMITER = "/"; +const 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 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: "EU (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)" + } + } + } +]; +var version = "1.1"; +var partitionsInfo = { + partitions: partitions, + version: version +}; + +let selectedPartitionsInfo = partitionsInfo; +let selectedUserAgentPrefix = ""; +const 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 { - response: new protocolHttp.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body: response.body, - }), - }; - }), - requestTimeout(requestTimeoutInMs), - ]; - if (abortSignal) { - raceOfPromises.push(new Promise((resolve, reject) => { - const onAbort = () => { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); + ...outputs, + ...regionData, }; - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - removeSignalEventListener = () => signal.removeEventListener("abort", onAbort); - } - else { - abortSignal.onabort = onAbort; - } - })); + } } - return Promise.race(raceOfPromises).finally(removeSignalEventListener); } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - config[key] = value; - return config; - }); + for (const partition of partitions) { + const { regionRegex, outputs } = partition; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs, + }; + } } - httpHandlerConfigs() { - return this.config ?? {}; + 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, + }; +}; +const setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; +}; +const useDefaultPartitionInfo = () => { + setPartitionInfo(partitionsInfo, ""); +}; +const getUserAgentPrefix = () => selectedUserAgentPrefix; -const streamCollector = async (stream) => { - if ((typeof Blob === "function" && stream instanceof Blob) || stream.constructor?.name === "Blob") { - if (Blob.prototype.arrayBuffer !== undefined) { - return new Uint8Array(await stream.arrayBuffer()); - } - return collectBlob(stream); - } - return collectStream(stream); +const awsEndpointFunctions = { + isVirtualHostableS3Bucket: isVirtualHostableS3Bucket, + parseArn: parseArn, + partition: partition, }; -async function collectBlob(blob) { - const base64 = await readToBase64(blob); - const arrayBuffer = utilBase64.fromBase64(base64); - return new Uint8Array(arrayBuffer); -} -async function collectStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; +utilEndpoints.customEndpointFunctions.aws = awsEndpointFunctions; + +const resolveDefaultAwsRegionalEndpointsConfig = (input) => { + if (typeof input.endpointProvider !== "function") { + throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); } - return collected; -} -function readToBase64(blob) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onloadend = () => { - if (reader.readyState !== 2) { - return reject(new Error("Reader aborted too early")); - } - const result = (reader.result ?? ""); - const commaIndex = result.indexOf(","); - const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; - resolve(result.substring(dataOffset)); + 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 })); }; - reader.onabort = () => reject(new Error("Read aborted")); - reader.onerror = () => reject(reader.error); - reader.readAsDataURL(blob); - }); -} - -exports.FetchHttpHandler = FetchHttpHandler; -exports.keepAliveSupport = keepAliveSupport; -exports.streamCollector = streamCollector; - - -/***/ }), - -/***/ 88245: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const isArrayBuffer = (arg) => (typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer) || - Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; + } + return input; +}; +const toEndpointV1 = (endpoint) => urlParser.parseUrl(endpoint.url); -exports.isArrayBuffer = isArrayBuffer; +Object.defineProperty(exports, "EndpointError", ({ + enumerable: true, + get: function () { return utilEndpoints.EndpointError; } +})); +Object.defineProperty(exports, "isIpAddress", ({ + enumerable: true, + get: function () { return utilEndpoints.isIpAddress; } +})); +Object.defineProperty(exports, "resolveEndpoint", ({ + enumerable: true, + get: function () { return utilEndpoints.resolveEndpoint; } +})); +exports.awsEndpointFunctions = awsEndpointFunctions; +exports.getUserAgentPrefix = getUserAgentPrefix; +exports.partition = partition; +exports.resolveDefaultAwsRegionalEndpointsConfig = resolveDefaultAwsRegionalEndpointsConfig; +exports.setPartitionInfo = setPartitionInfo; +exports.toEndpointV1 = toEndpointV1; +exports.useDefaultPartitionInfo = useDefaultPartitionInfo; /***/ }), -/***/ 93534: +/***/ 1656: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var protocolHttp = __nccwpck_require__(22475); +var os = __nccwpck_require__(857); +var process = __nccwpck_require__(932); +var middlewareUserAgent = __nccwpck_require__(2959); -const 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, - }); - 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 += "\n " + hint; - } - catch (e) { - 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 (protocolHttp.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 (e) { - } - } - throw error; - } -}; -const findHeader = (pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; +const crtAvailability = { + isCrtAvailable: false, }; -const serializerMiddleware = (options, serializer) => (next, context) => async (args) => { - const endpointConfig = options; - const endpoint = context.endpointV2?.url && endpointConfig.urlParser - ? async () => endpointConfig.urlParser(context.endpointV2.url) - : endpointConfig.endpoint; - if (!endpoint) { - throw new Error("No valid endpoint provider available."); +const isCrtAvailable = () => { + if (crtAvailability.isCrtAvailable) { + return ["md/crt-avail"]; } - const request = await serializer(args.input, { ...options, endpoint }); - return next({ - ...args, - request, - }); + return null; }; -const deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true, +const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => { + return async (config) => { + const sections = [ + ["aws-sdk-js", clientVersion], + ["ua", "2.1"], + [`os/${os.platform()}`, os.release()], + ["lang/js"], + ["md/nodejs", `${process.versions.node}`], + ]; + const crtAvailable = isCrtAvailable(); + if (crtAvailable) { + sections.push(crtAvailable); + } + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + if (process.env.AWS_EXECUTION_ENV) { + sections.push([`exec-env/${process.env.AWS_EXECUTION_ENV}`]); + } + const appId = await config?.userAgentAppId?.(); + const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; + return resolvedUserAgent; + }; }; -const serializerMiddlewareOption = { - name: "serializerMiddleware", - step: "serialize", - tags: ["SERIALIZER"], - override: true, +const defaultUserAgent = createDefaultUserAgentProvider; + +const UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; +const UA_APP_ID_INI_NAME = "sdk_ua_app_id"; +const UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id"; +const NODE_APP_ID_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[UA_APP_ID_ENV_NAME], + configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], + default: middlewareUserAgent.DEFAULT_UA_APP_ID, }; -function getSerdePlugin(config, serializer, deserializer) { - return { - applyToStack: (commandStack) => { - commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); - commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption); - }, - }; -} -exports.deserializerMiddleware = deserializerMiddleware; -exports.deserializerMiddlewareOption = deserializerMiddlewareOption; -exports.getSerdePlugin = getSerdePlugin; -exports.serializerMiddleware = serializerMiddleware; -exports.serializerMiddlewareOption = serializerMiddlewareOption; +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.createDefaultUserAgentProvider = createDefaultUserAgentProvider; +exports.crtAvailability = crtAvailability; +exports.defaultUserAgent = defaultUserAgent; /***/ }), -/***/ 9068: +/***/ 4274: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var protocolHttp = __nccwpck_require__(22475); -var querystringBuilder = __nccwpck_require__(82543); -var http = __nccwpck_require__(58611); -var https = __nccwpck_require__(65692); -var stream = __nccwpck_require__(2203); -var http2 = __nccwpck_require__(85675); - -const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; - -const getTransformedHeaders = (headers) => { - const transformedHeaders = {}; - for (const name of Object.keys(headers)) { - const headerValues = headers[name]; - transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; - } - return transformedHeaders; -}; - -const timing = { - setTimeout: (cb, ms) => setTimeout(cb, ms), - clearTimeout: (timeoutId) => clearTimeout(timeoutId), -}; - -const DEFER_EVENT_LISTENER_TIME$2 = 1000; -const 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); -}; - -const 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; -}; - -const DEFER_EVENT_LISTENER_TIME$1 = 3000; -const 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 xmlParser = __nccwpck_require__(3343); -const DEFER_EVENT_LISTENER_TIME = 3000; -const 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); -}; +function escapeAttribute(value) { + return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); +} -const MIN_WAIT_TIME = 6_000; -async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) { - const headers = request.headers ?? {}; - const expect = headers["Expect"] || headers["expect"]; - let timeoutId = -1; - let sendBody = true; - if (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 escapeElement(value) { + return value + .replace(/&/g, "&") + .replace(/"/g, """) + .replace(/'/g, "'") + .replace(//g, ">") + .replace(/\r/g, " ") + .replace(/\n/g, " ") + .replace(/\u0085/g, "…") + .replace(/\u2028/, "
"); } -function writeBody(httpRequest, body) { - if (body instanceof stream.Readable) { - body.pipe(httpRequest); - return; + +class XmlText { + value; + constructor(value) { + this.value = value; } - if (body) { - if (Buffer.isBuffer(body) || typeof body === "string") { - 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; + toString() { + return escapeElement("" + this.value); } - httpRequest.end(); } -const DEFAULT_REQUEST_TIMEOUT = 0; -class NodeHttpHandler { - config; - configProvider; - socketWarningTimestamp = 0; - 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 = 15_000; - if (Date.now() - interval < socketWarningTimestamp) { - return socketWarningTimestamp; +class XmlNode { + name; + children; + attributes = {}; + static of(name, childText, withName) { + const node = new XmlNode(name); + if (childText !== undefined) { + node.addChildNode(new XmlText(childText)); } - if (sockets && requests) { - for (const origin in sockets) { - 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(); - } - } + if (withName !== undefined) { + node.withName(withName); } - return socketWarningTimestamp; + return node; } - 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)); - } - }); + constructor(name, children = []) { + this.name = name; + this.children = children; } - resolveDefaultConfig(options) { - const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, } = options || {}; - const keepAlive = true; - const maxSockets = 50; - return { - connectionTimeout, - requestTimeout, - socketTimeout, - socketAcquisitionWarningTimeout, - throwOnRequestTimeout, - httpAgent: (() => { - if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { - return httpAgent; - } - return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); - })(), - httpsAgent: (() => { - if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { - return httpsAgent; - } - return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); - })(), - logger: console, - }; + withName(name) { + this.name = name; + return this; } - destroy() { - this.config?.httpAgent?.destroy(); - this.config?.httpsAgent?.destroy(); + addAttribute(name, value) { + this.attributes[name] = value; + return this; } - async handle(request, { abortSignal, requestTimeout } = {}) { - if (!this.config) { - this.config = await this.configProvider; + 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 new Promise((_resolve, _reject) => { - let writeRequestBodyPromise = undefined; - const timeouts = []; - const resolve = async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _resolve(arg); - }; - const reject = async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _reject(arg); - }; - if (!this.config) { - throw new Error("Node HTTP request handler config is not resolved"); - } - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; - } - const isSSL = request.protocol === "https:"; - const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; - timeouts.push(timing.setTimeout(() => { - this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, this.config.logger); - }, this.config.socketAcquisitionWarningTimeout ?? - (this.config.requestTimeout ?? 2000) + (this.config.connectionTimeout ?? 1000))); - const queryString = querystringBuilder.buildQueryString(request.query || {}); - let auth = undefined; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}`; - } - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let hostname = request.hostname ?? ""; - if (hostname[0] === "[" && hostname.endsWith("]")) { - hostname = request.hostname.slice(1, -1); - } - else { - hostname = request.hostname; - } - const nodeHttpsOptions = { - headers: request.headers, - host: hostname, - method: request.method, - path, - port: request.port, - agent, - auth, - }; - const requestFunc = isSSL ? https.request : http.request; - const req = requestFunc(nodeHttpsOptions, (res) => { - const httpResponse = new protocolHttp.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 = new Error("Request aborted"); - abortError.name = "AbortError"; - 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 ?? this.config.requestTimeout; - timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); - timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, this.config.throwOnRequestTimeout, this.config.logger ?? console)); - timeouts.push(setSocketTimeout(req, reject, this.config.socketTimeout)); - const httpAgent = nodeHttpsOptions.agent; - if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { - timeouts.push(setSocketKeepAlive(req, { - keepAlive: httpAgent.keepAlive, - keepAliveMsecs: httpAgent.keepAliveMsecs, - })); - } - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout).catch((e) => { - timeouts.forEach(timing.clearTimeout); - return _reject(e); + 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); }); - }); + } } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value, - }; - }); + 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); + } } - httpHandlerConfigs() { - return this.config ?? {}; + 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("")}`); } } -class NodeHttp2ConnectionPool { - sessions = []; - constructor(sessions) { - this.sessions = sessions ?? []; +Object.defineProperty(exports, "parseXML", ({ + enumerable: true, + get: function () { return xmlParser.parseXML; } +})); +exports.XmlNode = XmlNode; +exports.XmlText = XmlText; + + +/***/ }), + +/***/ 3343: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseXML = parseXML; +const fast_xml_parser_1 = __nccwpck_require__(591); +const parser = new fast_xml_parser_1.XMLParser({ + attributeNamePrefix: "", + htmlEntities: true, + ignoreAttributes: false, + ignoreDeclaration: true, + parseTagValue: false, + trimValues: false, + tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined), +}); +parser.addEntity("#xD", "\r"); +parser.addEntity("#10", "\n"); +function parseXML(xmlString) { + return parser.parse(xmlString, true); +} + + +/***/ }), + +/***/ 9320: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var async_hooks = __nccwpck_require__(290); + +const noGlobalAwsLambda = process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "1" || + process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "true"; +if (!noGlobalAwsLambda) { + globalThis.awslambda = globalThis.awslambda || {}; +} +const PROTECTED_KEYS = { + REQUEST_ID: Symbol("_AWS_LAMBDA_REQUEST_ID"), + X_RAY_TRACE_ID: Symbol("_AWS_LAMBDA_X_RAY_TRACE_ID"), + TENANT_ID: Symbol("_AWS_LAMBDA_TENANT_ID"), +}; +class InvokeStoreImpl { + static storage = new async_hooks.AsyncLocalStorage(); + static PROTECTED_KEYS = PROTECTED_KEYS; + static run(context, fn) { + return this.storage.run({ ...context }, fn); } - poll() { - if (this.sessions.length > 0) { - return this.sessions.shift(); + static getContext() { + return this.storage.getStore(); + } + static get(key) { + const context = this.storage.getStore(); + return context?.[key]; + } + static set(key, value) { + if (this.isProtectedKey(key)) { + throw new Error(`Cannot modify protected Lambda context field`); + } + const context = this.storage.getStore(); + if (context) { + context[key] = value; } } - offerLast(session) { - this.sessions.push(session); + static getRequestId() { + return this.get(this.PROTECTED_KEYS.REQUEST_ID) ?? "-"; } - contains(session) { - return this.sessions.includes(session); + static getXRayTraceId() { + return this.get(this.PROTECTED_KEYS.X_RAY_TRACE_ID); } - remove(session) { - this.sessions = this.sessions.filter((s) => s !== session); + static getTenantId() { + return this.get(this.PROTECTED_KEYS.TENANT_ID); } - [Symbol.iterator]() { - return this.sessions[Symbol.iterator](); + static hasContext() { + return this.storage.getStore() !== undefined; } - destroy(connection) { - for (const session of this.sessions) { - if (session === connection) { - if (!session.destroyed) { - session.destroy(); - } - } - } + static isProtectedKey(key) { + return (key === this.PROTECTED_KEYS.REQUEST_ID || + key === this.PROTECTED_KEYS.X_RAY_TRACE_ID); + } +} +let instance; +if (!noGlobalAwsLambda && globalThis.awslambda?.InvokeStore) { + instance = globalThis.awslambda.InvokeStore; +} +else { + instance = InvokeStoreImpl; + if (!noGlobalAwsLambda && globalThis.awslambda) { + globalThis.awslambda.InvokeStore = instance; } } +const InvokeStore = instance; -class NodeHttp2ConnectionManager { - constructor(config) { - this.config = config; - if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { - throw new RangeError("maxConcurrency must be greater than zero."); - } +exports.InvokeStore = InvokeStore; + + +/***/ }), + +/***/ 9316: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var utilConfigProvider = __nccwpck_require__(6716); +var utilMiddleware = __nccwpck_require__(6324); +var utilEndpoints = __nccwpck_require__(9674); + +const ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; +const CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; +const DEFAULT_USE_DUALSTACK_ENDPOINT = false; +const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.ENV), + configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.CONFIG), + default: false, +}; + +const ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; +const CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; +const DEFAULT_USE_FIPS_ENDPOINT = false; +const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, ENV_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.ENV), + configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.CONFIG), + default: false, +}; + +const resolveCustomEndpointsConfig = (input) => { + const { tls, endpoint, urlParser, useDualstackEndpoint } = input; + return Object.assign(input, { + tls: tls ?? true, + endpoint: utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), + isCustomEndpoint: true, + useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false), + }); +}; + +const 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"); } - config; - sessionCache = new Map(); - lease(requestContext, connectionConfiguration) { - const url = this.getUrlString(requestContext); - const existingPool = this.sessionCache.get(url); - if (existingPool) { - const existingSession = existingPool.poll(); - if (existingSession && !this.config.disableConcurrency) { - return existingSession; - } - } - const session = http2.connect(url); - 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()); - } - }); - } - session.unref(); - const destroySessionCb = () => { - session.destroy(); - this.deleteSession(url, session); - }; - session.on("goaway", destroySessionCb); - session.on("error", destroySessionCb); - session.on("frameError", destroySessionCb); - session.on("close", () => this.deleteSession(url, session)); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); - } - const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); - connectionPool.offerLast(session); - this.sessionCache.set(url, connectionPool); - return session; + 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}`); +}; + +const resolveEndpointsConfig = (input) => { + const useDualstackEndpoint = utilMiddleware.normalizeProvider(input.useDualstackEndpoint ?? false); + const { endpoint, useFipsEndpoint, urlParser, tls } = input; + return Object.assign(input, { + tls: tls ?? true, + endpoint: endpoint + ? utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) + : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: !!endpoint, + useDualstackEndpoint, + }); +}; + +const REGION_ENV_NAME = "AWS_REGION"; +const REGION_INI_NAME = "region"; +const NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + }, +}; +const NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials", +}; + +const validRegions = new Set(); +const checkRegion = (region, check = utilEndpoints.isValidHostLabel) => { + if (!validRegions.has(region) && !check(region)) { + throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`); } - deleteSession(authority, session) { - const existingConnectionPool = this.sessionCache.get(authority); - if (!existingConnectionPool) { - return; - } - if (!existingConnectionPool.contains(session)) { - return; - } - existingConnectionPool.remove(session); - this.sessionCache.set(authority, existingConnectionPool); + else { + validRegions.add(region); } - release(requestContext, session) { - const cacheKey = this.getUrlString(requestContext); - this.sessionCache.get(cacheKey)?.offerLast(session); +}; + +const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); + +const getRealRegion = (region) => isFipsRegion(region) + ? ["fips-aws-global", "aws-fips"].includes(region) + ? "us-east-1" + : region.replace(/fips-(dkr-|prod-)?|-fips/, "") + : region; + +const resolveRegionConfig = (input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); } - destroy() { - for (const [key, connectionPool] of this.sessionCache) { - for (const session of connectionPool) { - if (!session.destroyed) { - session.destroy(); - } - connectionPool.remove(session); + 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; } - this.sessionCache.delete(key); - } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + }, + }); +}; + +const getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))?.hostname; + +const getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname + ? regionHostname + : partitionHostname + ? partitionHostname.replace("{region}", resolvedRegion) + : undefined; + +const getResolvedPartition = (region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws"; + +const getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { + if (signingRegion) { + return signingRegion; } - setMaxConcurrentStreams(maxConcurrentStreams) { - if (maxConcurrentStreams && maxConcurrentStreams <= 0) { - throw new RangeError("maxConcurrentStreams must be greater than zero."); + else if (useFipsEndpoint) { + const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); + const regionRegexmatchArray = hostname.match(regionRegexJs); + if (regionRegexmatchArray) { + return regionRegexmatchArray[0].slice(1, -1); } - this.config.maxConcurrency = maxConcurrentStreams; - } - setDisableConcurrentStreams(disableConcurrentStreams) { - this.config.disableConcurrency = disableConcurrentStreams; - } - getUrlString(request) { - return request.destination.toString(); } -} +}; -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 || {}); - } - }); +const 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 }}`); } - destroy() { - this.connectionManager.destroy(); + 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, + }), + }; +}; + +exports.CONFIG_USE_DUALSTACK_ENDPOINT = CONFIG_USE_DUALSTACK_ENDPOINT; +exports.CONFIG_USE_FIPS_ENDPOINT = CONFIG_USE_FIPS_ENDPOINT; +exports.DEFAULT_USE_DUALSTACK_ENDPOINT = DEFAULT_USE_DUALSTACK_ENDPOINT; +exports.DEFAULT_USE_FIPS_ENDPOINT = DEFAULT_USE_FIPS_ENDPOINT; +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.REGION_ENV_NAME = REGION_ENV_NAME; +exports.REGION_INI_NAME = REGION_INI_NAME; +exports.getRegionInfo = getRegionInfo; +exports.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig; +exports.resolveEndpointsConfig = resolveEndpointsConfig; +exports.resolveRegionConfig = resolveRegionConfig; + + +/***/ }), + +/***/ 402: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var types = __nccwpck_require__(690); +var utilMiddleware = __nccwpck_require__(6324); +var middlewareSerde = __nccwpck_require__(3255); +var protocolHttp = __nccwpck_require__(2356); +var protocols = __nccwpck_require__(3422); + +const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); + +const resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => { + if (!authSchemePreference || authSchemePreference.length === 0) { + return candidateAuthOptions; } - async handle(request, { abortSignal, requestTimeout } = {}) { - if (!this.config) { - this.config = await this.configProvider; - this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); - if (this.config.maxConcurrentStreams) { - this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + const preferredAuthOptions = []; + for (const preferredSchemeName of authSchemePreference) { + for (const candidateAuthOption of candidateAuthOptions) { + const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1]; + if (candidateAuthSchemeName === preferredSchemeName) { + preferredAuthOptions.push(candidateAuthOption); } } - const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; - 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 = new Error("Request aborted"); - abortError.name = "AbortError"; - 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 session = this.connectionManager.lease(requestContext, { - requestTimeout: this.config?.sessionTimeout, - disableConcurrentStreams: disableConcurrentStreams || false, - }); - const rejectWithDestroy = (err) => { - if (disableConcurrentStreams) { - this.destroySession(session); - } - fulfilled = true; - reject(err); - }; - const queryString = querystringBuilder.buildQueryString(query || {}); - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - const req = session.request({ - ...request.headers, - [http2.constants.HTTP2_HEADER_PATH]: path, - [http2.constants.HTTP2_HEADER_METHOD]: method, - }); - session.ref(); - req.on("response", (headers) => { - const httpResponse = new protocolHttp.HttpResponse({ - statusCode: headers[":status"] || -1, - headers: getTransformedHeaders(headers), - body: req, - }); - fulfilled = true; - resolve({ response: httpResponse }); - if (disableConcurrentStreams) { - session.close(); - this.connectionManager.deleteSession(authority, session); - } - }); - if (effectiveRequestTimeout) { - req.setTimeout(effectiveRequestTimeout, () => { - req.close(); - const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); - timeoutError.name = "TimeoutError"; - rejectWithDestroy(timeoutError); - }); - } - if (abortSignal) { - const onAbort = () => { - req.close(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - rejectWithDestroy(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; - } - } - req.on("frameError", (type, code, id) => { - rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); - }); - req.on("error", rejectWithDestroy); - req.on("aborted", () => { - rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); - }); - req.on("close", () => { - session.unref(); - if (disableConcurrentStreams) { - session.destroy(); - } - if (!fulfilled) { - rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); - } - }); - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); - }); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value, - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; } - destroySession(session) { - if (!session.destroyed) { - session.destroy(); + for (const candidateAuthOption of candidateAuthOptions) { + if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) { + preferredAuthOptions.push(candidateAuthOption); } } -} + return preferredAuthOptions; +}; -class Collector extends stream.Writable { - bufferedBytes = []; - _write(chunk, encoding, callback) { - this.bufferedBytes.push(chunk); - callback(); +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map = new Map(); + for (const scheme of httpAuthSchemes) { + map.set(scheme.schemeId, scheme); } + return map; } - -const streamCollector = (stream) => { - if (isReadableStreamInstance(stream)) { - return collectReadableStream(stream); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); - resolve(bytes); - }); - }); -}; -const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; -async function collectReadableStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; +const 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 = utilMiddleware.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; } - isDone = done; + 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; } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join("\n")); } - return collected; -} - -exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; -exports.NodeHttp2Handler = NodeHttp2Handler; -exports.NodeHttpHandler = NodeHttpHandler; -exports.streamCollector = streamCollector; - + return next(args); +}; -/***/ }), +const httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware", +}; +const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider, + }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); + }, +}); -/***/ 22475: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const httpAuthSchemeMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: middlewareSerde.serializerMiddlewareOption.name, +}; +const getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider, + }), httpAuthSchemeMiddlewareOptions); + }, +}); -"use strict"; +const defaultErrorHandler = (signingProperties) => (error) => { + throw error; +}; +const defaultSuccessHandler = (httpResponse, signingProperties) => { }; +const httpSigningMiddleware = (config) => (next, context) => async (args) => { + if (!protocolHttp.HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = utilMiddleware.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; +}; +const httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: "retryMiddleware", +}; +const getHttpSigningPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(), httpSigningMiddlewareOptions); + }, +}); -var types = __nccwpck_require__(14349); +const normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; +}; -const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - }, - }; +const makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => { + let command = new CommandCtor(input); + command = withCommand(command) ?? command; + return await client.send(command, ...args); }; -const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler(), +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 undefined; }; +} +const get = (fromObject, path) => { + let cursor = fromObject; + const pathComponents = path.split("."); + for (const step of pathComponents) { + if (!cursor || typeof cursor !== "object") { + return undefined; + } + cursor = cursor[step]; + } + return cursor; }; -class Field { - name; - kind; - values; - constructor({ name, kind = types.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(", "); +function setFeature(context, feature, value) { + if (!context.__smithy_context) { + context.__smithy_context = { + features: {}, + }; } - get() { - return this.values; + else if (!context.__smithy_context.features) { + context.__smithy_context.features = {}; } + context.__smithy_context.features[feature] = value; } -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()]; +class DefaultIdentityProviderConfig { + authSchemes = new Map(); + constructor(config) { + for (const [key, value] of Object.entries(config)) { + if (value !== undefined) { + this.authSchemes.set(key, value); + } + } } - getByType(kind) { - return Object.values(this.entries).filter((field) => field.kind === kind); + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); } } -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); +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"); } - return cloned; - } - static isInstance(request) { - if (!request) { - return false; + if (!signingProperties.name) { + throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing"); } - 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); + 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 = protocolHttp.HttpRequest.clone(httpRequest); + if (signingProperties.in === types.HttpApiKeyAuthLocation.QUERY) { + clonedRequest.query[signingProperties.name] = identity.apiKey; + } + else if (signingProperties.in === types.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; } } -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"; +class HttpBearerAuthSigner { + async sign(httpRequest, identity, signingProperties) { + const clonedRequest = protocolHttp.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; } } -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} - -exports.Field = Field; -exports.Fields = Fields; -exports.HttpRequest = HttpRequest; -exports.HttpResponse = HttpResponse; -exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; -exports.isValidHostname = isValidHostname; -exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; - - -/***/ }), - -/***/ 82543: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilUriEscape = __nccwpck_require__(41617); - -function buildQueryString(query) { - const parts = []; - for (let key of Object.keys(query).sort()) { - const value = query[key]; - key = utilUriEscape.escapeUri(key); - if (Array.isArray(value)) { - for (let i = 0, iLen = value.length; i < iLen; i++) { - parts.push(`${key}=${utilUriEscape.escapeUri(value[i])}`); - } - } - else { - let qsEntry = key; - if (value || typeof value === "string") { - qsEntry += `=${utilUriEscape.escapeUri(value)}`; - } - parts.push(qsEntry); - } +class NoAuthSigner { + async sign(httpRequest, identity, signingProperties) { + return httpRequest; } - return parts.join("&"); } -exports.buildQueryString = buildQueryString; - - -/***/ }), - -/***/ 14349: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); +const createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired(identity) { + return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs; +}; +const EXPIRATION_MS = 300_000; +const isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); +const doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined; +const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => { + if (provider === undefined) { + return undefined; } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); + 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 { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, + 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; }; }; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; +Object.defineProperty(exports, "requestBuilder", ({ + enumerable: true, + get: function () { return protocols.requestBuilder; } +})); +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.getSmithyContext = getSmithyContext; +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; /***/ }), -/***/ 86103: +/***/ 4645: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(87186); -const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; -const fromBase64 = (input) => { - if ((input.length * 3) % 4 !== 0) { - throw new TypeError(`Incorrect padding on base64 string.`); + +var serde = __nccwpck_require__(2430); +var utilUtf8 = __nccwpck_require__(1577); +var protocols = __nccwpck_require__(3422); +var protocolHttp = __nccwpck_require__(2356); +var utilBodyLengthBrowser = __nccwpck_require__(2098); +var schema = __nccwpck_require__(6890); +var utilMiddleware = __nccwpck_require__(6324); +var utilBase64 = __nccwpck_require__(8385); + +const majorUint64 = 0; +const majorNegativeInt64 = 1; +const majorUnstructuredByteString = 2; +const majorUtf8String = 3; +const majorList = 4; +const majorMap = 5; +const majorTag = 6; +const majorSpecial = 7; +const specialFalse = 20; +const specialTrue = 21; +const specialNull = 22; +const specialUndefined = 23; +const extendedOneByte = 24; +const extendedFloat16 = 25; +const extendedFloat32 = 26; +const extendedFloat64 = 27; +const minorIndefinite = 31; +function alloc(size) { + return typeof Buffer !== "undefined" ? Buffer.alloc(size) : new Uint8Array(size); +} +const tagSymbol = Symbol("@smithy/core/cbor::tagSymbol"); +function tag(data) { + data[tagSymbol] = true; + return data; +} + +const USE_TEXT_DECODER = typeof TextDecoder !== "undefined"; +const USE_BUFFER$1 = typeof Buffer !== "undefined"; +let payload = alloc(0); +let dataView$1 = new DataView(payload.buffer, payload.byteOffset, payload.byteLength); +const textDecoder = USE_TEXT_DECODER ? new TextDecoder() : null; +let _offset = 0; +function setPayload(bytes) { + payload = bytes; + dataView$1 = new DataView(payload.buffer, payload.byteOffset, payload.byteLength); +} +function decode(at, to) { + if (at >= to) { + throw new Error("unexpected end of (decode) payload."); } - if (!BASE64_REGEX.exec(input)) { - throw new TypeError(`Invalid base64 string.`); + const major = (payload[at] & 0b1110_0000) >> 5; + const minor = payload[at] & 0b0001_1111; + switch (major) { + case majorUint64: + case majorNegativeInt64: + case majorTag: + let unsignedInt; + let offset; + if (minor < 24) { + unsignedInt = minor; + offset = 1; + } + else { + switch (minor) { + case extendedOneByte: + case extendedFloat16: + case extendedFloat32: + case extendedFloat64: + const countLength = minorValueToArgumentLength[minor]; + const countOffset = (countLength + 1); + offset = countOffset; + if (to - at < countOffset) { + throw new Error(`countLength ${countLength} greater than remaining buf len.`); + } + const countIndex = at + 1; + if (countLength === 1) { + unsignedInt = payload[countIndex]; + } + else if (countLength === 2) { + unsignedInt = dataView$1.getUint16(countIndex); + } + else if (countLength === 4) { + unsignedInt = dataView$1.getUint32(countIndex); + } + else { + unsignedInt = dataView$1.getBigUint64(countIndex); + } + break; + default: + throw new Error(`unexpected minor value ${minor}.`); + } + } + if (major === majorUint64) { + _offset = offset; + return castBigInt(unsignedInt); + } + else if (major === majorNegativeInt64) { + let negativeInt; + if (typeof unsignedInt === "bigint") { + negativeInt = BigInt(-1) - unsignedInt; + } + else { + negativeInt = -1 - unsignedInt; + } + _offset = offset; + return castBigInt(negativeInt); + } + else { + if (minor === 2 || minor === 3) { + const length = decodeCount(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[i]); + } + _offset = offset + _offset + length; + return minor === 3 ? -b - BigInt(1) : b; + } + else if (minor === 4) { + const decimalFraction = decode(at + offset, to); + const [exponent, mantissa] = decimalFraction; + const normalizer = mantissa < 0 ? -1 : 1; + const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + String(BigInt(normalizer) * BigInt(mantissa)); + let numericString; + const sign = mantissa < 0 ? "-" : ""; + 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; + _offset = offset + _offset; + return serde.nv(numericString); + } + else { + const value = decode(at + offset, to); + const valueOffset = _offset; + _offset = offset + valueOffset; + return tag({ tag: castBigInt(unsignedInt), value }); + } + } + case majorUtf8String: + case majorMap: + case majorList: + case majorUnstructuredByteString: + 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); + } + } + else { + switch (major) { + 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); } - const buffer = (0, util_buffer_from_1.fromString)(input, "base64"); - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); -}; -exports.fromBase64 = fromBase64; - - -/***/ }), - -/***/ 5074: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var fromBase64 = __nccwpck_require__(86103); -var toBase64 = __nccwpck_require__(22706); - - - -Object.keys(fromBase64).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return fromBase64[k]; } - }); -}); -Object.keys(toBase64).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return toBase64[k]; } - }); -}); - - -/***/ }), - -/***/ 22706: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(87186); -const util_utf8_1 = __nccwpck_require__(21194); -const toBase64 = (_input) => { - let input; - if (typeof _input === "string") { - input = (0, util_utf8_1.fromUtf8)(_input); +} +function bytesToUtf8(bytes, at, to) { + if (USE_BUFFER$1 && bytes.constructor?.name === "Buffer") { + return bytes.toString("utf-8", at, to); } - else { - input = _input; + if (textDecoder) { + return textDecoder.decode(bytes.subarray(at, to)); } - 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 utilUtf8.toUtf8(bytes.subarray(at, to)); +} +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 (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); + return num; +} +const minorValueToArgumentLength = { + [extendedOneByte]: 1, + [extendedFloat16]: 2, + [extendedFloat32]: 4, + [extendedFloat64]: 8, }; -exports.toBase64 = toBase64; - - -/***/ }), - -/***/ 87186: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var isArrayBuffer = __nccwpck_require__(88245); -var buffer = __nccwpck_require__(20181); - -const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { - if (!isArrayBuffer.isArrayBuffer(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); +function bytesToFloat16(a, b) { + const sign = a >> 7; + const exponent = (a & 0b0111_1100) >> 2; + const fraction = ((a & 0b0000_0011) << 8) | b; + const scalar = sign === 0 ? 1 : -1; + let exponentComponent; + let summation; + if (exponent === 0b00000) { + if (fraction === 0b00000_00000) { + return 0; + } + else { + exponentComponent = Math.pow(2, 1 - 15); + summation = 0; + } } - return buffer.Buffer.from(input, offset, length); -}; -const fromString = (input, encoding) => { - if (typeof input !== "string") { - throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + else if (exponent === 0b11111) { + if (fraction === 0b00000_00000) { + return scalar * Infinity; + } + else { + return NaN; + } } - return encoding ? buffer.Buffer.from(input, encoding) : buffer.Buffer.from(input); -}; - -exports.fromArrayBuffer = fromArrayBuffer; -exports.fromString = fromString; - - -/***/ }), - -/***/ 48908: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const SHORT_TO_HEX = {}; -const HEX_TO_SHORT = {}; -for (let i = 0; i < 256; i++) { - let encodedByte = i.toString(16).toLowerCase(); - if (encodedByte.length === 1) { - encodedByte = `0${encodedByte}`; + else { + exponentComponent = Math.pow(2, exponent - 15); + summation = 1; } - SHORT_TO_HEX[i] = encodedByte; - HEX_TO_SHORT[encodedByte] = i; + summation += fraction / 1024; + return scalar * (exponentComponent * summation); } -function fromHex(encoded) { - if (encoded.length % 2 !== 0) { - throw new Error("Hex encoded strings must have an even number length"); +function decodeCount(at, to) { + const minor = payload[at] & 0b0001_1111; + if (minor < 24) { + _offset = 1; + return minor; } - 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]; + if (minor === extendedOneByte || + minor === extendedFloat16 || + minor === extendedFloat32 || + minor === extendedFloat64) { + const countLength = minorValueToArgumentLength[minor]; + _offset = (countLength + 1); + if (to - at < _offset) { + throw new Error(`countLength ${countLength} greater than remaining buf len.`); } - else { - throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + const countIndex = at + 1; + if (countLength === 1) { + return payload[countIndex]; + } + else if (countLength === 2) { + return dataView$1.getUint16(countIndex); } + else if (countLength === 4) { + return dataView$1.getUint32(countIndex); + } + return demote(dataView$1.getBigUint64(countIndex)); } - return out; + throw new Error(`unexpected minor value ${minor}.`); } -function toHex(bytes) { - let out = ""; - for (let i = 0; i < bytes.byteLength; i++) { - out += SHORT_TO_HEX[bytes[i]]; +function decodeUtf8String(at, to) { + const length = decodeCount(at, to); + const offset = _offset; + at += offset; + if (to - at < length) { + throw new Error(`string len ${length} greater than remaining buf len.`); } - return out; + const value = bytesToUtf8(payload, at, at + length); + _offset = offset + length; + return value; } - -exports.fromHex = fromHex; -exports.toHex = toHex; - - -/***/ }), - -/***/ 7403: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var types = __nccwpck_require__(14349); - -const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); - -const normalizeProvider = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; -}; - -exports.getSmithyContext = getSmithyContext; -exports.normalizeProvider = normalizeProvider; - - -/***/ }), - -/***/ 55849: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ByteArrayCollector = void 0; -class ByteArrayCollector { - allocByteArray; - byteLength = 0; - byteArrays = []; - constructor(allocByteArray) { - this.allocByteArray = allocByteArray; +function decodeUtf8StringIndefinite(at, to) { + at += 1; + const vector = []; + for (const base = at; at < to;) { + if (payload[at] === 0b1111_1111) { + const data = alloc(vector.length); + data.set(vector, 0); + _offset = at - base + 2; + return bytesToUtf8(data, 0, data.length); + } + const major = (payload[at] & 0b1110_0000) >> 5; + const minor = payload[at] & 0b0001_1111; + if (major !== majorUtf8String) { + throw new Error(`unexpected major type ${major} in indefinite string.`); + } + 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]); + } } - push(byteArray) { - this.byteArrays.push(byteArray); - this.byteLength += byteArray.byteLength; + throw new Error("expected break marker."); +} +function decodeUnstructuredByteString(at, to) { + const length = decodeCount(at, to); + const offset = _offset; + at += offset; + if (to - at < length) { + throw new Error(`unstructured byte string len ${length} greater than remaining buf len.`); } - flush() { - if (this.byteArrays.length === 1) { - const bytes = this.byteArrays[0]; - this.reset(); - return bytes; + const value = payload.subarray(at, at + length); + _offset = offset + length; + return value; +} +function decodeUnstructuredByteStringIndefinite(at, to) { + at += 1; + const vector = []; + for (const base = at; at < to;) { + if (payload[at] === 0b1111_1111) { + const data = alloc(vector.length); + data.set(vector, 0); + _offset = at - base + 2; + return data; } - 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; + const major = (payload[at] & 0b1110_0000) >> 5; + const minor = payload[at] & 0b0001_1111; + if (major !== majorUnstructuredByteString) { + throw new Error(`unexpected major type ${major} in indefinite string.`); + } + 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]); } - this.reset(); - return aggregation; } - reset() { - this.byteArrays = []; - this.byteLength = 0; + throw new Error("expected break marker."); +} +function decodeList(at, to) { + const listDataLength = decodeCount(at, to); + const offset = _offset; + at += offset; + const base = at; + const list = Array(listDataLength); + for (let i = 0; i < listDataLength; ++i) { + const item = decode(at, to); + const itemOffset = _offset; + list[i] = item; + at += itemOffset; } + _offset = offset + (at - base); + return list; } -exports.ByteArrayCollector = ByteArrayCollector; - - -/***/ }), - -/***/ 74010: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function () { }; -class ChecksumStream extends ReadableStreamRef { +function decodeListIndefinite(at, to) { + at += 1; + const list = []; + for (const base = at; at < to;) { + if (payload[at] === 0b1111_1111) { + _offset = at - base + 2; + return list; + } + const item = decode(at, to); + const n = _offset; + at += n; + list.push(item); + } + throw new Error("expected break marker."); } -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 97972: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(5074); -const stream_1 = __nccwpck_require__(2203); -class ChecksumStream extends stream_1.Duplex { - expectedChecksum; - checksumSourceLocation; - checksum; - source; - base64Encoder; - constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) { - super(); - if (typeof source.pipe === "function") { - this.source = source; +function decodeMap(at, to) { + const mapDataLength = decodeCount(at, to); + const offset = _offset; + at += offset; + const base = at; + const map = {}; + for (let i = 0; i < mapDataLength; ++i) { + if (at >= to) { + throw new Error("unexpected end of map payload."); } - else { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); + const major = (payload[at] & 0b1110_0000) >> 5; + if (major !== majorUtf8String) { + throw new Error(`unexpected major type ${major} for map key at index ${at}.`); } - this.base64Encoder = base64Encoder ?? util_base64_1.toBase64; - this.expectedChecksum = expectedChecksum; - this.checksum = checksum; - this.checksumSourceLocation = checksumSourceLocation; - this.source.pipe(this); + const key = decode(at, to); + at += _offset; + const value = decode(at, to); + at += _offset; + map[key] = value; + } + _offset = offset + (at - base); + return map; +} +function decodeMapIndefinite(at, to) { + at += 1; + const base = at; + const map = {}; + for (; at < to;) { + if (at >= to) { + throw new Error("unexpected end of map payload."); + } + if (payload[at] === 0b1111_1111) { + _offset = at - base + 2; + return map; + } + const major = (payload[at] & 0b1110_0000) >> 5; + if (major !== majorUtf8String) { + throw new Error(`unexpected major type ${major} for map key.`); + } + const key = decode(at, to); + at += _offset; + const value = decode(at, to); + at += _offset; + map[key] = value; + } + throw new Error("expected break marker."); +} +function decodeSpecial(at, to) { + const minor = payload[at] & 0b0001_1111; + 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(payload[at + 1], payload[at + 2]); + case extendedFloat32: + if (to - at < 5) { + throw new Error("incomplete float32 at end of buf."); + } + _offset = 5; + return dataView$1.getFloat32(at + 1); + case extendedFloat64: + if (to - at < 9) { + throw new Error("incomplete float64 at end of buf."); + } + _offset = 9; + return dataView$1.getFloat64(at + 1); + default: + throw new Error(`unexpected minor value ${minor}.`); + } +} +function castBigInt(bigInt) { + if (typeof bigInt === "number") { + return bigInt; + } + const num = Number(bigInt); + if (Number.MIN_SAFE_INTEGER <= num && num <= Number.MAX_SAFE_INTEGER) { + return num; } - _read(size) { } - _write(chunk, encoding, callback) { - try { - this.checksum.update(chunk); - this.push(chunk); + return bigInt; +} + +const USE_BUFFER = typeof Buffer !== "undefined"; +const initialSize = 2048; +let data = alloc(initialSize); +let dataView = new DataView(data.buffer, data.byteOffset, data.byteLength); +let cursor = 0; +function ensureSpace(bytes) { + const remaining = data.byteLength - cursor; + if (remaining < bytes) { + if (cursor < 16_000_000) { + resize(Math.max(data.byteLength * 4, data.byteLength + bytes)); } - catch (e) { - return callback(e); + else { + resize(data.byteLength + bytes + 16_000_000); } - return callback(); } - async _final(callback) { - try { - const digest = await this.checksum.digest(); - const received = this.base64Encoder(digest); - if (this.expectedChecksum !== received) { - return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + - ` in response header "${this.checksumSourceLocation}".`)); - } +} +function toUint8Array() { + const out = alloc(cursor); + out.set(data.subarray(0, cursor), 0); + cursor = 0; + return out; +} +function resize(size) { + const old = data; + data = alloc(size); + if (old) { + if (old.copy) { + old.copy(data, 0, 0, old.byteLength); } - catch (e) { - return callback(e); + else { + data.set(old, 0); } - this.push(null); - return callback(); } + dataView = new DataView(data.buffer, data.byteOffset, data.byteLength); } -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 41670: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(5074); -const stream_type_check_1 = __nccwpck_require__(73593); -const ChecksumStream_browser_1 = __nccwpck_require__(74010); -const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => { - if (!(0, stream_type_check_1.isReadableStream)(source)) { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); +function encodeHeader(major, value) { + if (value < 24) { + data[cursor++] = (major << 5) | value; } - const encoder = base64Encoder ?? util_base64_1.toBase64; - if (typeof TransformStream !== "function") { - throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); + else if (value < 1 << 8) { + data[cursor++] = (major << 5) | 24; + data[cursor++] = value; } - 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_browser_1.ChecksumStream.prototype); - return readable; -}; -exports.createChecksumStream = createChecksumStream; - - -/***/ }), - -/***/ 46912: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = createChecksumStream; -const stream_type_check_1 = __nccwpck_require__(73593); -const ChecksumStream_1 = __nccwpck_require__(97972); -const createChecksumStream_browser_1 = __nccwpck_require__(41670); -function createChecksumStream(init) { - if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { - return (0, createChecksumStream_browser_1.createChecksumStream)(init); + else if (value < 1 << 16) { + data[cursor++] = (major << 5) | extendedFloat16; + dataView.setUint16(cursor, value); + cursor += 2; } - return new ChecksumStream_1.ChecksumStream(init); -} - - -/***/ }), - -/***/ 95940: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = createBufferedReadable; -const node_stream_1 = __nccwpck_require__(57075); -const ByteArrayCollector_1 = __nccwpck_require__(55849); -const createBufferedReadableStream_1 = __nccwpck_require__(68940); -const stream_type_check_1 = __nccwpck_require__(73593); -function createBufferedReadable(upstream, size, logger) { - if ((0, stream_type_check_1.isReadableStream)(upstream)) { - return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger); + else if (value < 2 ** 32) { + data[cursor++] = (major << 5) | extendedFloat32; + dataView.setUint32(cursor, value); + cursor += 4; } - const downstream = new node_stream_1.Readable({ read() { } }); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = [ - "", - new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)), - new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))), - ]; - let mode = -1; - upstream.on("data", (chunk) => { - const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); - if (mode !== chunkMode) { - if (mode >= 0) { - downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - mode = chunkMode; - } - if (mode === -1) { - downstream.push(chunk); - return; - } - const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); - bytesSeen += chunkSize; - const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - downstream.push(chunk); - } - else { - const newSize = (0, createBufferedReadableStream_1.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((0, createBufferedReadableStream_1.flush)(buffers, mode)); + else { + data[cursor++] = (major << 5) | extendedFloat64; + dataView.setBigUint64(cursor, typeof value === "bigint" ? value : BigInt(value)); + cursor += 8; + } +} +function encode(_input) { + const encodeStack = [_input]; + while (encodeStack.length) { + const input = encodeStack.pop(); + ensureSpace(typeof input === "string" ? input.length * 4 : 64); + if (typeof input === "string") { + if (USE_BUFFER) { + encodeHeader(majorUtf8String, Buffer.byteLength(input)); + cursor += data.write(input, cursor); } - } - }); - upstream.on("end", () => { - if (mode !== -1) { - const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); - if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { - downstream.push(remainder); + else { + const bytes = utilUtf8.fromUtf8(input); + encodeHeader(majorUtf8String, bytes.byteLength); + data.set(bytes, cursor); + cursor += bytes.byteLength; } + continue; } - downstream.push(null); - }); - return downstream; -} - - -/***/ }), - -/***/ 68940: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = void 0; -exports.createBufferedReadableStream = createBufferedReadableStream; -exports.merge = merge; -exports.flush = flush; -exports.sizeOf = sizeOf; -exports.modeOf = modeOf; -const ByteArrayCollector_1 = __nccwpck_require__(55849); -function createBufferedReadableStream(upstream, size, logger) { - const reader = upstream.getReader(); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = ["", new ByteArrayCollector_1.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); + else if (typeof input === "number") { + if (Number.isInteger(input)) { + const nonNegative = input >= 0; + const major = nonNegative ? majorUint64 : majorNegativeInt64; + const value = nonNegative ? input : -input - 1; + if (value < 24) { + data[cursor++] = (major << 5) | value; + } + else if (value < 256) { + data[cursor++] = (major << 5) | 24; + data[cursor++] = value; + } + else if (value < 65536) { + data[cursor++] = (major << 5) | extendedFloat16; + data[cursor++] = value >> 8; + data[cursor++] = value; + } + else if (value < 4294967296) { + data[cursor++] = (major << 5) | extendedFloat32; + dataView.setUint32(cursor, value); + cursor += 4; + } + else { + data[cursor++] = (major << 5) | extendedFloat64; + dataView.setBigUint64(cursor, BigInt(value)); + cursor += 8; } + continue; } - controller.close(); + data[cursor++] = (majorSpecial << 5) | extendedFloat64; + dataView.setFloat64(cursor, input); + cursor += 8; + continue; } - else { - const chunkMode = modeOf(chunk, false); - if (mode !== chunkMode) { - if (mode >= 0) { - controller.enqueue(flush(buffers, mode)); - } - mode = chunkMode; + else if (typeof input === "bigint") { + const nonNegative = input >= 0; + const major = nonNegative ? majorUint64 : majorNegativeInt64; + const value = nonNegative ? input : -input - BigInt(1); + const n = Number(value); + if (n < 24) { + data[cursor++] = (major << 5) | n; } - if (mode === -1) { - controller.enqueue(chunk); - return; + else if (n < 256) { + data[cursor++] = (major << 5) | 24; + data[cursor++] = n; } - const chunkSize = sizeOf(chunk); - bytesSeen += chunkSize; - const bufferSize = sizeOf(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - controller.enqueue(chunk); + else if (n < 65536) { + data[cursor++] = (major << 5) | extendedFloat16; + data[cursor++] = n >> 8; + data[cursor++] = n & 0b1111_1111; + } + else if (n < 4294967296) { + data[cursor++] = (major << 5) | extendedFloat32; + dataView.setUint32(cursor, n); + cursor += 4; + } + else if (value < BigInt("18446744073709551616")) { + data[cursor++] = (major << 5) | extendedFloat64; + dataView.setBigUint64(cursor, value); + cursor += 8; } 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.`); + 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); } - if (newSize >= size) { - controller.enqueue(flush(buffers, mode)); + ensureSpace(bigIntBytes.byteLength * 2); + data[cursor++] = nonNegative ? 0b110_00010 : 0b110_00011; + if (USE_BUFFER) { + encodeHeader(majorUnstructuredByteString, Buffer.byteLength(bigIntBytes)); } else { - await pull(controller); + encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength); } + data.set(bigIntBytes, cursor); + cursor += bigIntBytes.byteLength; } + continue; } - }; - return new ReadableStream({ - pull, - }); -} -exports.createBufferedReadable = createBufferedReadableStream; -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; + else if (input === null) { + data[cursor++] = (majorSpecial << 5) | specialNull; + continue; + } + else if (typeof input === "boolean") { + data[cursor++] = (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)) { + for (let i = input.length - 1; i >= 0; --i) { + encodeStack.push(input[i]); + } + encodeHeader(majorList, input.length); + continue; + } + else if (typeof input.byteLength === "number") { + ensureSpace(input.length * 2); + encodeHeader(majorUnstructuredByteString, input.length); + data.set(input, cursor); + cursor += input.byteLength; + continue; + } + else if (typeof input === "object") { + if (input instanceof serde.NumericValue) { + const decimalIndex = input.string.indexOf("."); + const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1; + const mantissa = BigInt(input.string.replace(".", "")); + data[cursor++] = 0b110_00100; + encodeStack.push(mantissa); + encodeStack.push(exponent); + encodeHeader(majorList, 2); + continue; + } + if (input[tagSymbol]) { + if ("tag" in input && "value" in input) { + encodeStack.push(input.value); + encodeHeader(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); + for (let i = keys.length - 1; i >= 0; --i) { + const key = keys[i]; + encodeStack.push(input[key]); + encodeStack.push(key); + } + encodeHeader(majorMap, keys.length); + continue; + } + throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`); } - return -1; } +const cbor = { + deserialize(payload) { + setPayload(payload); + return decode(0, payload.length); + }, + serialize(input) { + try { + encode(input); + return toUint8Array(); + } + catch (e) { + toUint8Array(); + throw e; + } + }, + resizeEncodingBuffer(size) { + resize(size); + }, +}; -/***/ }), - -/***/ 33257: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getAwsChunkedEncodingStream = void 0; -const stream_1 = __nccwpck_require__(2203); -const getAwsChunkedEncodingStream = (readableStream, options) => { - const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; - const checksumRequired = base64Encoder !== undefined && - checksumAlgorithmFn !== undefined && - checksumLocationName !== undefined && - streamHasher !== undefined; - const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; - const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } }); - readableStream.on("data", (data) => { - const length = bodyLengthChecker(data) || 0; - awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); - awsChunkedEncodingStream.push(data); - awsChunkedEncodingStream.push("\r\n"); - }); - readableStream.on("end", async () => { - awsChunkedEncodingStream.push(`0\r\n`); - if (checksumRequired) { - const checksum = base64Encoder(await digest); - awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); - awsChunkedEncodingStream.push(`\r\n`); +const parseCborBody = (streamBody, context) => { + return protocols.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; + } } - awsChunkedEncodingStream.push(null); + return {}; }); - return awsChunkedEncodingStream; }; -exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; - - -/***/ }), - -/***/ 5267: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = headStream; -async function headStream(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; +const dateToTag = (date) => { + return tag({ + tag: 1, + value: date.getTime() / 1000, + }); +}; +const parseCborErrorBody = async (errorBody, context) => { + const value = await parseCborBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}; +const loadSmithyRpcV2CborErrorCode = (output, data) => { + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); } - if (byteLengthCounter >= bytes) { - break; + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; } - 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; + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; } - else { - collected.set(chunk, offset); + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; } - offset += chunk.length; + return cleanValue; + }; + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); } - return collected; -} - - -/***/ }), - -/***/ 42837: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = void 0; -const stream_1 = __nccwpck_require__(2203); -const headStream_browser_1 = __nccwpck_require__(5267); -const stream_type_check_1 = __nccwpck_require__(73593); -const headStream = (stream, bytes) => { - if ((0, stream_type_check_1.isReadableStream)(stream)) { - return (0, headStream_browser_1.headStream)(stream, bytes); + const codeKey = Object.keys(data).find((key) => key.toLowerCase() === "code"); + if (codeKey && data[codeKey] !== undefined) { + return sanitizeErrorCode(data[codeKey]); } - return new Promise((resolve, reject) => { - const collector = new Collector(); - collector.limit = bytes; - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.buffers)); - resolve(bytes); - }); - }); }; -exports.headStream = headStream; -class Collector extends stream_1.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"); +const checkCborResponse = (response) => { + if (String(response.headers["smithy-protocol"]).toLowerCase() !== "rpc-v2-cbor") { + throw new Error("Malformed RPCv2 CBOR response, status: " + response.statusCode); + } +}; +const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.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 (body !== undefined) { + contents.body = body; + try { + contents.headers["content-length"] = String(utilBodyLengthBrowser.calculateBodyLength(body)); } - callback(); + catch (e) { } } -} - - -/***/ }), - -/***/ 92723: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilBase64 = __nccwpck_require__(5074); -var utilUtf8 = __nccwpck_require__(21194); -var ChecksumStream = __nccwpck_require__(97972); -var createChecksumStream = __nccwpck_require__(46912); -var createBufferedReadable = __nccwpck_require__(95940); -var getAwsChunkedEncodingStream = __nccwpck_require__(33257); -var headStream = __nccwpck_require__(42837); -var sdkStreamMixin = __nccwpck_require__(14048); -var splitStream = __nccwpck_require__(60527); -var streamTypeCheck = __nccwpck_require__(73593); + return new protocolHttp.HttpRequest(contents); +}; -class Uint8ArrayBlobAdapter extends Uint8Array { - static fromString(source, encoding = "utf-8") { - if (typeof source === "string") { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source)); +class CborCodec extends protocols.SerdeContext { + createSerializer() { + const serializer = new CborShapeSerializer(); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new CborShapeDeserializer(); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } +} +class CborShapeSerializer extends protocols.SerdeContext { + value; + write(schema, value) { + this.value = this.serialize(schema, value); + } + serialize(schema$1, source) { + const ns = schema.NormalizedSchema.of(schema$1); + if (source == null) { + if (ns.isIdempotencyToken()) { + return serde.generateIdempotencyToken(); } - return Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(source)); + return source; + } + if (ns.isBlobSchema()) { + if (typeof source === "string") { + return (this.serdeContext?.base64Decoder ?? utilBase64.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 of Object.keys(sourceObject)) { + 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; + } + } + } + else if (ns.isDocumentSchema()) { + for (const key of Object.keys(sourceObject)) { + newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]); + } + } + return newObject; } - 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 utilBase64.toBase64(this); - } - return utilUtf8.toUtf8(this); + flush() { + const buffer = cbor.serialize(this.value); + this.value = undefined; + return buffer; } } - -exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter; -Object.keys(ChecksumStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return ChecksumStream[k]; } - }); -}); -Object.keys(createChecksumStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return createChecksumStream[k]; } - }); -}); -Object.keys(createBufferedReadable).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return createBufferedReadable[k]; } - }); -}); -Object.keys(getAwsChunkedEncodingStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getAwsChunkedEncodingStream[k]; } - }); -}); -Object.keys(headStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return headStream[k]; } - }); -}); -Object.keys(sdkStreamMixin).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return sdkStreamMixin[k]; } - }); -}); -Object.keys(splitStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return splitStream[k]; } - }); -}); -Object.keys(streamTypeCheck).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return streamTypeCheck[k]; } - }); -}); - - -/***/ }), - -/***/ 32454: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const fetch_http_handler_1 = __nccwpck_require__(83952); -const util_base64_1 = __nccwpck_require__(5074); -const util_hex_encoding_1 = __nccwpck_require__(48908); -const util_utf8_1 = __nccwpck_require__(21194); -const stream_type_check_1 = __nccwpck_require__(73593); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) { - const name = stream?.__proto__?.constructor?.name || stream; - throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); +class CborShapeDeserializer extends protocols.SerdeContext { + read(schema, bytes) { + const data = cbor.deserialize(bytes); + return this.readValue(schema, data); } - let transformed = false; - const transformToByteArray = async () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - transformed = true; - return await (0, fetch_http_handler_1.streamCollector)(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.\n" + - "If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + readValue(_schema, value) { + const ns = schema.NormalizedSchema.of(_schema); + if (ns.isTimestampSchema() && typeof value === "number") { + return serde._parseEpochTimestamp(value); } - return blob.stream(); - }; - return Object.assign(stream, { - transformToByteArray: transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === "base64") { - return (0, util_base64_1.toBase64)(buf); - } - else if (encoding === "hex") { - return (0, util_hex_encoding_1.toHex)(buf); + if (ns.isBlobSchema()) { + if (typeof value === "string") { + return (this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(value); } - else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { - return (0, util_utf8_1.toUtf8)(buf); + 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 === "function" || typeof value === "object") { + if (value === null) { + return null; } - else if (typeof TextDecoder === "function") { - return new TextDecoder(encoding).decode(buf); + if ("byteLength" in value) { + return value; } - else { - throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + if (value instanceof Date) { + return value; } - }, - transformToWebStream: () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + if (ns.isDocumentSchema()) { + return value; } - transformed = true; - if (isBlobInstance(stream)) { - return blobToWebStream(stream); + if (ns.isListSchema()) { + const newArray = []; + const memberSchema = ns.getValueSchema(); + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + const itemValue = this.readValue(memberSchema, item); + if (itemValue != null || sparse) { + newArray.push(itemValue); + } + } + return newArray; } - else if ((0, stream_type_check_1.isReadableStream)(stream)) { - return stream; + const newObject = {}; + if (ns.isMapSchema()) { + const sparse = !!ns.getMergedTraits().sparse; + const targetSchema = ns.getValueSchema(); + for (const key of Object.keys(value)) { + const itemValue = this.readValue(targetSchema, value[key]); + if (itemValue != null || sparse) { + newObject[key] = itemValue; + } + } } - else { - throw new Error(`Cannot transform payload to web stream, got ${stream}`); + else if (ns.isStructSchema()) { + for (const [key, memberSchema] of ns.structIterator()) { + newObject[key] = this.readValue(memberSchema, value[key]); + } } - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; -const isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; - - -/***/ }), - -/***/ 14048: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const node_http_handler_1 = __nccwpck_require__(9068); -const util_buffer_from_1 = __nccwpck_require__(87186); -const stream_1 = __nccwpck_require__(2203); -const sdk_stream_mixin_browser_1 = __nccwpck_require__(32454); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - if (!(stream instanceof stream_1.Readable)) { - try { - return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); + return newObject; } - catch (e) { - const name = stream?.__proto__?.constructor?.name || stream; - throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); + else { + return value; } } - let transformed = false; - const transformToByteArray = async () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); +} + +class SmithyRpcV2CborProtocol extends protocols.RpcProtocol { + codec = new CborCodec(); + serializer = this.codec.createSerializer(); + deserializer = this.codec.createDeserializer(); + constructor({ defaultNamespace }) { + super({ defaultNamespace }); + } + 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 (schema.deref(operationSchema.input) === "unit") { + delete request.body; + delete request.headers["content-type"]; } - transformed = true; - return await (0, node_http_handler_1.streamCollector)(stream); - }; - return Object.assign(stream, { - transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === undefined || Buffer.isEncoding(encoding)) { - return (0, util_buffer_from_1.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."); + else { + if (!request.body) { + this.serializer.write(15, {}); + request.body = this.serializer.flush(); } - if (typeof stream_1.Readable.toWeb !== "function") { - throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); + try { + request.headers["content-length"] = String(request.body.byteLength); } - transformed = true; - return stream_1.Readable.toWeb(stream); - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; - - -/***/ }), - -/***/ 72729: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -async function splitStream(stream) { - if (typeof stream.stream === "function") { - stream = stream.stream(); + catch (e) { } + } + const { service, operation } = utilMiddleware.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"; + let namespace = this.options.defaultNamespace; + if (errorName.includes("#")) { + [namespace] = errorName.split("#"); + } + const errorMetadata = { + $metadata: metadata, + $response: response, + $fault: response.statusCode <= 500 ? "client" : "server", + }; + const registry = schema.TypeRegistry.for(namespace); + let errorSchema; + try { + errorSchema = registry.getSchema(errorName); + } + catch (e) { + if (dataObject.Message) { + dataObject.message = dataObject.Message; + } + const synthetic = schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace); + const baseExceptionSchema = synthetic.getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema); + throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject); + } + throw Object.assign(new Error(errorName), errorMetadata, dataObject); + } + const ns = schema.NormalizedSchema.of(errorSchema); + const ErrorCtor = registry.getErrorCtor(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new ErrorCtor(message); + 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); } - const readableStream = stream; - return readableStream.tee(); -} - - -/***/ }), - -/***/ 60527: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -const stream_1 = __nccwpck_require__(2203); -const splitStream_browser_1 = __nccwpck_require__(72729); -const stream_type_check_1 = __nccwpck_require__(73593); -async function splitStream(stream) { - if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) { - return (0, splitStream_browser_1.splitStream)(stream); + getDefaultContentType() { + return "application/cbor"; } - const stream1 = new stream_1.PassThrough(); - const stream2 = new stream_1.PassThrough(); - stream.pipe(stream1); - stream.pipe(stream2); - return [stream1, stream2]; } - -/***/ }), - -/***/ 73593: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isBlob = exports.isReadableStream = void 0; -const isReadableStream = (stream) => typeof ReadableStream === "function" && - (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream); -exports.isReadableStream = isReadableStream; -const isBlob = (blob) => { - return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob); -}; -exports.isBlob = isBlob; - - -/***/ }), - -/***/ 41617: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); -const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; - -const escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/"); - -exports.escapeUri = escapeUri; -exports.escapeUriPath = escapeUriPath; +exports.CborCodec = CborCodec; +exports.CborShapeDeserializer = CborShapeDeserializer; +exports.CborShapeSerializer = CborShapeSerializer; +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; /***/ }), -/***/ 21194: +/***/ 3422: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var utilBufferFrom = __nccwpck_require__(87186); - -const fromUtf8 = (input) => { - const buf = utilBufferFrom.fromString(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); -}; - -const toUint8Array = (data) => { - if (typeof data === "string") { - return fromUtf8(data); - } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data); -}; +var utilStream = __nccwpck_require__(4252); +var schema = __nccwpck_require__(6890); +var serde = __nccwpck_require__(2430); +var protocolHttp = __nccwpck_require__(2356); +var utilBase64 = __nccwpck_require__(8385); +var utilUtf8 = __nccwpck_require__(1577); -const toUtf8 = (input) => { - if (typeof input === "string") { - return input; +const collectBody = async (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return utilStream.Uint8ArrayBlobAdapter.mutate(streamBody); } - 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."); + if (!streamBody) { + return utilStream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); } - return utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); -}; - -exports.fromUtf8 = fromUtf8; -exports.toUint8Array = toUint8Array; -exports.toUtf8 = toUtf8; - - -/***/ }), - -/***/ 36463: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const getAwsRegionExtensionConfiguration = (runtimeConfig) => { - return { - setRegion(region) { - runtimeConfig.region = region; - }, - region() { - return runtimeConfig.region; - }, - }; -}; -const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => { - return { - region: awsRegionExtensionConfiguration.region(), - }; + const fromContext = context.streamCollector(streamBody); + return utilStream.Uint8ArrayBlobAdapter.mutate(await fromContext); }; -const REGION_ENV_NAME = "AWS_REGION"; -const REGION_INI_NAME = "region"; -const NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[REGION_ENV_NAME], - configFileSelector: (profile) => profile[REGION_INI_NAME], - default: () => { - throw new Error("Region is missing"); - }, -}; -const NODE_REGION_CONFIG_FILE_OPTIONS = { - preferredFile: "credentials", -}; +function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} -const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); +class SerdeContext { + serdeContext; + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } +} -const getRealRegion = (region) => isFipsRegion(region) - ? ["fips-aws-global", "aws-fips"].includes(region) - ? "us-east-1" - : region.replace(/fips-(dkr-|prod-)?|-fips/, "") - : region; +class HttpProtocol extends SerdeContext { + options; + constructor(options) { + super(); + this.options = options; + } + getRequestType() { + return protocolHttp.HttpRequest; + } + getResponseType() { + return protocolHttp.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 || void 0; + request.username = endpoint.url.username || void 0; + request.password = endpoint.url.password || void 0; + if (!request.query) { + request.query = {}; + } + for (const [k, v] of endpoint.url.searchParams.entries()) { + request.query[k] = v; + } + 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, + }; + return request; + } + } + setHostPrefix(request, operationSchema, input) { + const inputNs = schema.NormalizedSchema.of(operationSchema.input); + const opTraits = schema.translateTraits(operationSchema.traits ?? {}); + if (opTraits.endpoint) { + let hostPrefix = opTraits.endpoint?.[0]; + if (typeof hostPrefix === "string") { + const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel); + for (const [name] of hostLabelInputs) { + 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; + } + } + } + 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 } = await __nccwpck_require__.e(/* import() */ 579).then(__nccwpck_require__.t.bind(__nccwpck_require__, 6579, 19)); + return new EventStreamSerde({ + marshaller: this.getEventStreamMarshaller(), + serializer: this.serializer, + deserializer: this.deserializer, + serdeContext: this.serdeContext, + defaultContentType: this.getDefaultContentType(), + }); + } + 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; + } +} -const resolveRegionConfig = (input) => { - const { region, useFipsEndpoint } = input; - if (!region) { - throw new Error("Region is missing"); +class HttpBindingProtocol extends HttpProtocol { + async serializeRequest(operationSchema, _input, context) { + const input = { + ...(_input ?? {}), + }; + const serializer = this.serializer; + const query = {}; + const headers = {}; + const endpoint = await context.endpoint(); + const ns = schema.NormalizedSchema.of(operationSchema?.input); + const schema$1 = ns.getSchema(); + let hasNonHttpBindingMember = false; + let payload; + const request = new protocolHttp.HttpRequest({ + protocol: "", + hostname: "", + port: undefined, + path: "", + fragment: undefined, + query: query, + headers: headers, + body: undefined, + }); + if (endpoint) { + this.updateServiceEndpoint(request, endpoint); + this.setHostPrefix(request, operationSchema, input); + const opTraits = schema.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 ?? ""); + Object.assign(query, Object.fromEntries(traitSearchParams)); + } + } + for (const [memberName, memberNs] of ns.structIterator()) { + const memberTraits = memberNs.getMergedTraits() ?? {}; + const inputMemberValue = input[memberName]; + if (inputMemberValue == null) { + 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(); + } + delete input[memberName]; + } + 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)); + } + delete input[memberName]; + } + else if (memberTraits.httpHeader) { + serializer.write(memberNs, inputMemberValue); + headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush()); + delete input[memberName]; + } + else if (typeof memberTraits.httpPrefixHeaders === "string") { + for (const [key, val] of Object.entries(inputMemberValue)) { + const amalgam = memberTraits.httpPrefixHeaders + key; + serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val); + headers[amalgam.toLowerCase()] = serializer.flush(); + } + delete input[memberName]; + } + else if (memberTraits.httpQuery || memberTraits.httpQueryParams) { + this.serializeQuery(memberNs, inputMemberValue, query); + delete input[memberName]; + } + else { + hasNonHttpBindingMember = true; + } + } + if (hasNonHttpBindingMember && input) { + serializer.write(schema$1, input); + payload = serializer.flush(); + } + request.headers = headers; + request.query = query; + request.body = payload; + return request; } - return Object.assign(input, { - region: async () => { - if (typeof region === "string") { - return getRealRegion(region); + serializeQuery(ns, data, query) { + const serializer = this.serializer; + const traits = ns.getMergedTraits(); + if (traits.httpQueryParams) { + for (const [key, val] of Object.entries(data)) { + if (!(key in query)) { + 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 = schema.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) { + 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) { + dataObject[member] = dataFromBody[member]; + } + } + } + dataObject.$metadata = this.deserializeMetadata(response); + return dataObject; + } + async deserializeHttpMessage(schema$1, context, response, arg4, arg5) { + let dataObject; + if (arg4 instanceof Set) { + dataObject = arg5; + } + else { + dataObject = arg4; + } + const deserializer = this.deserializer; + const ns = schema.NormalizedSchema.of(schema$1); + const nonHttpBindingMembers = []; + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMemberTraits(); + if (memberTraits.httpPayload) { + const isStreaming = memberSchema.isStreaming(); + if (isStreaming) { + const isEventStream = memberSchema.isStructSchema(); + if (isEventStream) { + dataObject[memberName] = await this.deserializeEventStream({ + response, + responseSchema: ns, + }); + } + else { + dataObject[memberName] = utilStream.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 (null != value) { + if (memberSchema.isListSchema()) { + const headerListValueSchema = memberSchema.getValueSchema(); + headerListValueSchema.getMergedTraits().httpHeader = key; + let sections; + if (headerListValueSchema.isTimestampSchema() && + headerListValueSchema.getSchema() === 4) { + sections = serde.splitEvery(value, ",", 2); + } + else { + sections = serde.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); + } + } } - const providedRegion = await region(); - return getRealRegion(providedRegion); - }, - useFipsEndpoint: async () => { - const providedRegion = typeof region === "string" ? region : await region(); - if (isFipsRegion(providedRegion)) { - return true; + else if (memberTraits.httpPrefixHeaders !== undefined) { + dataObject[memberName] = {}; + for (const [header, value] of Object.entries(response.headers)) { + if (header.startsWith(memberTraits.httpPrefixHeaders)) { + const valueSchema = memberSchema.getValueSchema(); + valueSchema.getMergedTraits().httpHeader = header; + dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value); + } + } } - return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); - }, - }); -}; - -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.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration; -exports.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration; -exports.resolveRegionConfig = resolveRegionConfig; - - -/***/ }), - -/***/ 83068: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilEndpoints = __nccwpck_require__(79674); -var urlParser = __nccwpck_require__(67320); - -const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { - if (allowSubDomains) { - for (const label of value.split(".")) { - if (!isVirtualHostableS3Bucket(label)) { - return false; + else if (memberTraits.httpResponseCode) { + dataObject[memberName] = response.statusCode; + } + else { + nonHttpBindingMembers.push(memberName); } } - return true; + return nonHttpBindingMembers; } - if (!utilEndpoints.isValidHostLabel(value)) { - return false; +} + +class RpcProtocol extends HttpProtocol { + async serializeRequest(operationSchema, input, context) { + const serializer = this.serializer; + const query = {}; + const headers = {}; + const endpoint = await context.endpoint(); + const ns = schema.NormalizedSchema.of(operationSchema?.input); + const schema$1 = ns.getSchema(); + let payload; + const request = new protocolHttp.HttpRequest({ + protocol: "", + hostname: "", + port: undefined, + path: "/", + fragment: undefined, + query: query, + headers: headers, + body: undefined, + }); + if (endpoint) { + this.updateServiceEndpoint(request, endpoint); + this.setHostPrefix(request, operationSchema, input); + } + const _input = { + ...input, + }; + if (input) { + const eventStreamMember = ns.getEventStreamMember(); + if (eventStreamMember) { + if (_input[eventStreamMember]) { + const initialRequest = {}; + for (const [memberName, memberSchema] of ns.structIterator()) { + if (memberName !== eventStreamMember && _input[memberName]) { + serializer.write(memberSchema, _input[memberName]); + initialRequest[memberName] = serializer.flush(); + } + } + payload = await this.serializeEventStream({ + eventStream: _input[eventStreamMember], + requestSchema: ns, + initialRequest, + }); + } + } + else { + serializer.write(schema$1, _input); + payload = serializer.flush(); + } + } + request.headers = headers; + request.query = query; + request.body = payload; + request.method = "POST"; + return request; } - if (value.length < 3 || value.length > 63) { - return false; + async deserializeResponse(operationSchema, context, response) { + const deserializer = this.deserializer; + const ns = schema.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) { + 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; } - if (value !== value.toLowerCase()) { - return false; +} + +const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { + if (input != null && input[memberName] !== undefined) { + const labelValue = labelValueProvider(); + if (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)); } - if (utilEndpoints.isIpAddress(value)) { - return false; + else { + throw new Error("No value provided for input HTTP label: " + memberName + "."); } - return true; -}; - -const ARN_DELIMITER = ":"; -const RESOURCE_DELIMITER = "/"; -const 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 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: "EU (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)" - } - } - }, - { - 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)" - } - } - } -]; -var version = "1.1"; -var partitionsInfo = { - partitions: partitions, - version: version + return resolvedPath; }; -let selectedPartitionsInfo = partitionsInfo; -let selectedUserAgentPrefix = ""; -const 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, - }; - } - } +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; } - for (const partition of partitions) { - const { regionRegex, outputs } = partition; - if (new RegExp(regionRegex).test(value)) { - return { - ...outputs, - }; + 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 protocolHttp.HttpRequest({ + protocol, + hostname: this.hostname || hostname, + port, + method: this.method, + path: this.path, + query: this.query, + body: this.body, + headers: this.headers, + }); } - 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."); + hn(hostname) { + this.hostname = hostname; + return this; } - return { - ...DEFAULT_PARTITION.outputs, - }; -}; -const setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => { - selectedPartitionsInfo = partitionsInfo; - selectedUserAgentPrefix = userAgentPrefix; -}; -const useDefaultPartitionInfo = () => { - setPartitionInfo(partitionsInfo, ""); -}; -const getUserAgentPrefix = () => selectedUserAgentPrefix; - -const awsEndpointFunctions = { - isVirtualHostableS3Bucket: isVirtualHostableS3Bucket, - parseArn: parseArn, - partition: partition, -}; -utilEndpoints.customEndpointFunctions.aws = awsEndpointFunctions; - -const resolveDefaultAwsRegionalEndpointsConfig = (input) => { - if (typeof input.endpointProvider !== "function") { - throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); + bp(uriLabel) { + this.resolvePathStack.push((basePath) => { + this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; + }); + return this; } - 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 })); - }; + p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { + this.resolvePathStack.push((path) => { + this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); + }); + return this; } - return input; -}; -const toEndpointV1 = (endpoint) => urlParser.parseUrl(endpoint.url); - -Object.defineProperty(exports, "EndpointError", ({ - enumerable: true, - get: function () { return utilEndpoints.EndpointError; } -})); -Object.defineProperty(exports, "isIpAddress", ({ - enumerable: true, - get: function () { return utilEndpoints.isIpAddress; } -})); -Object.defineProperty(exports, "resolveEndpoint", ({ - enumerable: true, - get: function () { return utilEndpoints.resolveEndpoint; } -})); -exports.awsEndpointFunctions = awsEndpointFunctions; -exports.getUserAgentPrefix = getUserAgentPrefix; -exports.partition = partition; -exports.resolveDefaultAwsRegionalEndpointsConfig = resolveDefaultAwsRegionalEndpointsConfig; -exports.setPartitionInfo = setPartitionInfo; -exports.toEndpointV1 = toEndpointV1; -exports.useDefaultPartitionInfo = useDefaultPartitionInfo; - - -/***/ }), - -/***/ 8776: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; + 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; +} -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); +class FromStringShapeDeserializer extends SerdeContext { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + read(_schema, data) { + const ns = schema.NormalizedSchema.of(_schema); + if (ns.isListSchema()) { + return serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item)); + } + if (ns.isBlobSchema()) { + return (this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(data); + } + if (ns.isTimestampSchema()) { + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + return serde._parseRfc3339DateTimeWithOffset(data); + case 6: + return serde._parseRfc7231DateTime(data); + case 7: + return serde._parseEpochTimestamp(data); + default: + console.warn("Missing timestamp format, parsing value with Date constructor:", data); + return new Date(data); } - if (!(key in query)) { - query[key] = value; + } + 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 = serde.LazyJsonString.from(intermediateValue); + } + return intermediateValue; } - else if (Array.isArray(query[key])) { - query[key].push(value); + } + if (ns.isNumericSchema()) { + return Number(data); + } + if (ns.isBigIntegerSchema()) { + return BigInt(data); + } + if (ns.isBigDecimalSchema()) { + return new serde.NumericValue(data, "bigDecimal"); + } + if (ns.isBooleanSchema()) { + return String(data).toLowerCase() === "true"; + } + return data; + } + base64ToUtf8(base64String) { + return (this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8)((this.serdeContext?.base64Decoder ?? utilBase64.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$1, data) { + const ns = schema.NormalizedSchema.of(schema$1); + const traits = ns.getMergedTraits(); + const toString = this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8; + if (traits.httpHeader || traits.httpResponseCode) { + return this.stringDeserializer.read(ns, toString(data)); + } + if (traits.httpPayload) { + if (ns.isBlobSchema()) { + const toBytes = this.serdeContext?.utf8Decoder ?? utilUtf8.fromUtf8; + if (typeof data === "string") { + return toBytes(data); + } + return data; } - else { - query[key] = [query[key], value]; + else if (ns.isStringSchema()) { + if ("byteLength" in data) { + return toString(data); + } + return data; } } + return this.codecDeserializer.read(ns, data); } - return query; } -exports.parseQueryString = parseQueryString; - - -/***/ }), - -/***/ 67320: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var querystringParser = __nccwpck_require__(8776); +class ToStringShapeSerializer extends SerdeContext { + settings; + stringBuffer = ""; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema$1, value) { + const ns = schema.NormalizedSchema.of(schema$1); + 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 = serde.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 ?? utilBase64.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 : serde.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 = serde.LazyJsonString.from(intermediateValue); + } + if (ns.getMergedTraits().httpHeader) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(intermediateValue.toString()); + return; + } + } + this.stringBuffer = value; + break; + default: + this.stringBuffer = String(value); + } + } + flush() { + const buffer = this.stringBuffer; + this.stringBuffer = ""; + return buffer; + } +} -const parseUrl = (url) => { - if (typeof url === "string") { - return parseUrl(new URL(url)); +class HttpInterceptingShapeSerializer { + codecSerializer; + stringSerializer; + buffer; + constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) { + this.codecSerializer = codecSerializer; + this.stringSerializer = stringSerializer; } - const { hostname, pathname, port, protocol, search } = url; - let query; - if (search) { - query = querystringParser.parseQueryString(search); + setSerdeContext(serdeContext) { + this.codecSerializer.setSerdeContext(serdeContext); + this.stringSerializer.setSerdeContext(serdeContext); } - return { - hostname, - port: port ? parseInt(port) : undefined, - protocol, - path: pathname, - query, - }; -}; + write(schema$1, value) { + const ns = schema.NormalizedSchema.of(schema$1); + 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(); + } +} -exports.parseUrl = parseUrl; +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.collectBody = collectBody; +exports.determineTimestampFormat = determineTimestampFormat; +exports.extendedEncodeURIComponent = extendedEncodeURIComponent; +exports.requestBuilder = requestBuilder; +exports.resolvedPath = resolvedPath; /***/ }), -/***/ 51656: +/***/ 6890: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var os = __nccwpck_require__(70857); -var process = __nccwpck_require__(932); -var middlewareUserAgent = __nccwpck_require__(32959); - -const crtAvailability = { - isCrtAvailable: false, -}; +var protocolHttp = __nccwpck_require__(2356); +var utilMiddleware = __nccwpck_require__(6324); -const isCrtAvailable = () => { - if (crtAvailability.isCrtAvailable) { - return ["md/crt-avail"]; +const deref = (schemaRef) => { + if (typeof schemaRef === "function") { + return schemaRef(); } - return null; + return schemaRef; }; -const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => { - return async (config) => { - const sections = [ - ["aws-sdk-js", clientVersion], - ["ua", "2.1"], - [`os/${os.platform()}`, os.release()], - ["lang/js"], - ["md/nodejs", `${process.versions.node}`], - ]; - const crtAvailable = isCrtAvailable(); - if (crtAvailable) { - sections.push(crtAvailable); - } - if (serviceId) { - sections.push([`api/${serviceId}`, clientVersion]); - } - if (process.env.AWS_EXECUTION_ENV) { - sections.push([`exec-env/${process.env.AWS_EXECUTION_ENV}`]); +const operation = (namespace, name, traits, input, output) => ({ + name, + namespace, + traits, + input, + output, +}); + +const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { + const { response } = await next(args); + const { operationSchema } = utilMiddleware.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, + }); + 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 += "\n " + hint; + } + catch (e) { + 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 (protocolHttp.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 (e) { + } } - const appId = await config?.userAgentAppId?.(); - const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; - return resolvedUserAgent; - }; + throw error; + } +}; +const findHeader = (pattern, headers) => { + return (headers.find(([k]) => { + return k.match(pattern); + }) || [void 0, void 0])[1]; }; -const defaultUserAgent = createDefaultUserAgentProvider; -const UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; -const UA_APP_ID_INI_NAME = "sdk_ua_app_id"; -const UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id"; -const NODE_APP_ID_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[UA_APP_ID_ENV_NAME], - configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], - default: middlewareUserAgent.DEFAULT_UA_APP_ID, +const schemaSerializationMiddleware = (config) => (next, context) => async (args) => { + const { operationSchema } = utilMiddleware.getSmithyContext(context); + const [, ns, n, t, i, o] = operationSchema ?? []; + const endpoint = context.endpointV2?.url && config.urlParser + ? async () => config.urlParser(context.endpointV2.url) + : config.endpoint; + const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, { + ...config, + ...context, + endpoint, + }); + return next({ + ...args, + request, + }); }; -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.createDefaultUserAgentProvider = createDefaultUserAgentProvider; -exports.crtAvailability = crtAvailability; -exports.defaultUserAgent = defaultUserAgent; - - -/***/ }), +const deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true, +}; +const 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); + }, + }; +} -/***/ 94274: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +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; + } +} -"use strict"; +class ListSchema extends Schema { + static symbol = Symbol.for("@smithy/lis"); + name; + traits; + valueSchema; + symbol = ListSchema.symbol; +} +const list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), { + name, + namespace, + traits, + valueSchema, +}); +class MapSchema extends Schema { + static symbol = Symbol.for("@smithy/map"); + name; + traits; + keySchema; + valueSchema; + symbol = MapSchema.symbol; +} +const map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), { + name, + namespace, + traits, + keySchema, + valueSchema, +}); -var xmlParser = __nccwpck_require__(43343); +class OperationSchema extends Schema { + static symbol = Symbol.for("@smithy/ope"); + name; + traits; + input; + output; + symbol = OperationSchema.symbol; +} +const op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), { + name, + namespace, + traits, + input, + output, +}); -function escapeAttribute(value) { - return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); +class StructureSchema extends Schema { + static symbol = Symbol.for("@smithy/str"); + name; + traits; + memberNames; + memberList; + symbol = StructureSchema.symbol; } +const struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), { + name, + namespace, + traits, + memberNames, + memberList, +}); -function escapeElement(value) { - return value - .replace(/&/g, "&") - .replace(/"/g, """) - .replace(/'/g, "'") - .replace(//g, ">") - .replace(/\r/g, " ") - .replace(/\n/g, " ") - .replace(/\u0085/g, "…") - .replace(/\u2028/, "
"); +class ErrorSchema extends StructureSchema { + static symbol = Symbol.for("@smithy/err"); + ctor; + symbol = ErrorSchema.symbol; } +const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { + name, + namespace, + traits, + memberNames, + memberList, + ctor: null, +}); -class XmlText { - value; - constructor(value) { - this.value = value; +function translateTraits(indicator) { + if (typeof indicator === "object") { + return indicator; } - toString() { - return escapeElement("" + this.value); + indicator = indicator | 0; + 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 traits; } -class XmlNode { +class NormalizedSchema { + ref; + memberName; + static symbol = Symbol.for("@smithy/nor"); + symbol = NormalizedSchema.symbol; name; - children; - attributes = {}; - static of(name, childText, withName) { - const node = new XmlNode(name); - if (childText !== undefined) { - node.addChildNode(new XmlText(childText)); + 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 (withName !== undefined) { - node.withName(withName); + 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 = void 0; + 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.`); } - return node; } - constructor(name, children = []) { - this.name = name; - this.children = children; + 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; } - withName(name) { - this.name = name; - return this; + static of(ref) { + 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)}.`); + } + return new NormalizedSchema(sc); } - addAttribute(name, value) { - this.attributes[name] = value; - return this; + getSchema() { + const sc = this.schema; + if (sc[0] === 0) { + return sc[4]; + } + return sc; } - addChildNode(child) { - this.children.push(child); - return this; + getName(withNamespace = false) { + const { name } = this; + const short = !withNamespace && name && name.includes("#"); + return short ? name.split("#")[1] : name || undefined; } - removeAttribute(name) { - delete this.attributes[name]; - return this; + getMemberName() { + return this.memberName; } - n(name) { - this.name = name; - return this; + isMemberSchema() { + return this._isMemberSchema; } - c(child) { - this.children.push(child); - return this; + isListSchema() { + const sc = this.getSchema(); + return typeof sc === "number" + ? sc >= 64 && sc < 128 + : sc[0] === 1; } - a(name, value) { - if (value != null) { - this.attributes[name] = value; + isMapSchema() { + const sc = this.getSchema(); + return typeof sc === "number" + ? sc >= 128 && sc <= 0b1111_1111 + : sc[0] === 2; + } + isStructSchema() { + const sc = this.getSchema(); + return (sc[0] === 3 || + sc[0] === -3); + } + 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() { + const match = (traits) => (traits & 0b0100) === 0b0100 || + !!traits?.idempotencyToken; + const { normalizedTraits, traits, memberTraits } = this; + return match(normalizedTraits) || match(traits) || match(memberTraits); + } + 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)}`); } - return this; + const schema = this.getSchema(); + const memberSchema = isDoc + ? 15 + : schema[4] ?? 0; + return member([memberSchema, 0], "key"); } - cc(input, field, withName = field) { - if (input[field] != null) { - const node = XmlNode.of(field, input[field]).withName(withName); - this.c(node); + getValueSchema() { + const sc = this.getSchema(); + const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; + const memberSchema = typeof sc === "number" + ? 0b0011_1111 & sc + : sc && typeof sc === "object" && (isMap || isList) + ? sc[3 + sc[0]] + : isDoc + ? 15 + : void 0; + if (memberSchema != null) { + return member([memberSchema, 0], isMap ? "value" : "member"); } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); } - l(input, listName, memberName, valueProvider) { - if (input[listName] != null) { - const nodes = valueProvider(); - nodes.map((node) => { - node.withName(memberName); - this.c(node); - }); + 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 no member=${memberName}.`); } - 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); + getMemberSchemas() { + const buffer = {}; + try { + for (const [k, v] of this.structIterator()) { + buffer[k] = v; + } } + catch (ignored) { } + return buffer; } - 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)}"`; + getEventStreamMember() { + if (this.isStructSchema()) { + for (const [memberName, memberSchema] of this.structIterator()) { + if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { + return memberName; + } } } - return (xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}`); + return ""; + } + *structIterator() { + if (this.isUnitSchema()) { + return; + } + if (!this.isStructSchema()) { + throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); + } + const struct = this.getSchema(); + for (let i = 0; i < struct[4].length; ++i) { + yield [struct[4][i], member([struct[5][i], 0], struct[4][i])]; + } } } - -Object.defineProperty(exports, "parseXML", ({ - enumerable: true, - get: function () { return xmlParser.parseXML; } -})); -exports.XmlNode = XmlNode; -exports.XmlText = XmlText; - - -/***/ }), - -/***/ 43343: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseXML = parseXML; -const fast_xml_parser_1 = __nccwpck_require__(50591); -const parser = new fast_xml_parser_1.XMLParser({ - attributeNamePrefix: "", - htmlEntities: true, - ignoreAttributes: false, - ignoreDeclaration: true, - parseTagValue: false, - trimValues: false, - tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined), -}); -parser.addEntity("#xD", "\r"); -parser.addEntity("#10", "\n"); -function parseXML(xmlString) { - return parser.parse(xmlString, true); +function member(memberSchema, memberName) { + if (memberSchema instanceof NormalizedSchema) { + return Object.assign(memberSchema, { + memberName, + _isMemberSchema: true, + }); + } + const internalCtorAccess = NormalizedSchema; + return new internalCtorAccess(memberSchema, memberName); } +const isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2; +const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5; - -/***/ }), - -/***/ 37453: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InvokeStore = void 0; -const async_hooks_1 = __nccwpck_require__(90290); -// AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA provides an escape hatch since we're modifying the global object which may not be expected to a customer's handler. -const noGlobalAwsLambda = process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "1" || - process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "true"; -if (!noGlobalAwsLambda) { - globalThis.awslambda = globalThis.awslambda || {}; +class SimpleSchema extends Schema { + static symbol = Symbol.for("@smithy/sim"); + name; + schemaRef; + traits; + symbol = SimpleSchema.symbol; } -const PROTECTED_KEYS = { - REQUEST_ID: Symbol("_AWS_LAMBDA_REQUEST_ID"), - X_RAY_TRACE_ID: Symbol("_AWS_LAMBDA_X_RAY_TRACE_ID"), +const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { + name, + namespace, + traits, + schemaRef, +}); +const simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), { + name, + namespace, + traits, + schemaRef, +}); + +const SCHEMA = { + BLOB: 0b0001_0101, + STREAMING_BLOB: 0b0010_1010, + BOOLEAN: 0b0000_0010, + STRING: 0b0000_0000, + NUMERIC: 0b0000_0001, + BIG_INTEGER: 0b0001_0001, + BIG_DECIMAL: 0b0001_0011, + DOCUMENT: 0b0000_1111, + TIMESTAMP_DEFAULT: 0b0000_0100, + TIMESTAMP_DATE_TIME: 0b0000_0101, + TIMESTAMP_HTTP_DATE: 0b0000_0110, + TIMESTAMP_EPOCH_SECONDS: 0b0000_0111, + LIST_MODIFIER: 0b0100_0000, + MAP_MODIFIER: 0b1000_0000, }; -/** - * InvokeStore implementation class - */ -class InvokeStoreImpl { - static storage = new async_hooks_1.AsyncLocalStorage(); - // Protected keys for Lambda context fields - static PROTECTED_KEYS = PROTECTED_KEYS; - /** - * Initialize and run code within an invoke context - */ - static run(context, fn) { - return this.storage.run({ ...context }, fn); + +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; } - /** - * Get the complete current context - */ - static getContext() { - return this.storage.getStore(); + static for(namespace) { + if (!TypeRegistry.registries.has(namespace)) { + TypeRegistry.registries.set(namespace, new TypeRegistry(namespace)); + } + return TypeRegistry.registries.get(namespace); } - /** - * Get a specific value from the context by key - */ - static get(key) { - const context = this.storage.getStore(); - return context?.[key]; + register(shapeId, schema) { + const qualifiedName = this.normalizeShapeId(shapeId); + const registry = TypeRegistry.for(qualifiedName.split("#")[0]); + registry.schemas.set(qualifiedName, schema); } - /** - * Set a custom value in the current context - * Protected Lambda context fields cannot be overwritten - */ - static set(key, value) { - if (this.isProtectedKey(key)) { - throw new Error(`Cannot modify protected Lambda context field`); - } - const context = this.storage.getStore(); - if (context) { - context[key] = value; + getSchema(shapeId) { + const id = this.normalizeShapeId(shapeId); + if (!this.schemas.has(id)) { + throw new Error(`@smithy/core/schema - schema not found for ${id}`); } + return this.schemas.get(id); } - /** - * Get the current request ID - */ - static getRequestId() { - return this.get(this.PROTECTED_KEYS.REQUEST_ID) ?? "-"; + registerError(es, ctor) { + const $error = es; + const registry = TypeRegistry.for($error[1]); + registry.schemas.set($error[1] + "#" + $error[2], $error); + registry.exceptions.set($error, ctor); } - /** - * Get the current X-ray trace ID - */ - static getXRayTraceId() { - return this.get(this.PROTECTED_KEYS.X_RAY_TRACE_ID); + getErrorCtor(es) { + const $error = es; + const registry = TypeRegistry.for($error[1]); + return registry.exceptions.get($error); } - /** - * Check if we're currently within an invoke context - */ - static hasContext() { - return this.storage.getStore() !== undefined; + 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 undefined; } - /** - * Check if a key is protected (readonly Lambda context field) - */ - static isProtectedKey(key) { - return (key === this.PROTECTED_KEYS.REQUEST_ID || - key === this.PROTECTED_KEYS.X_RAY_TRACE_ID); + find(predicate) { + return [...this.schemas.values()].find(predicate); } -} -let instance; -if (!noGlobalAwsLambda && globalThis.awslambda?.InvokeStore) { - instance = globalThis.awslambda.InvokeStore; -} -else { - instance = InvokeStoreImpl; - if (!noGlobalAwsLambda && globalThis.awslambda) { - globalThis.awslambda.InvokeStore = instance; + clear() { + this.schemas.clear(); + this.exceptions.clear(); + } + normalizeShapeId(shapeId) { + if (shapeId.includes("#")) { + return shapeId; + } + return this.namespace + "#" + shapeId; } } -exports.InvokeStore = instance; + +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.struct = struct; +exports.translateTraits = translateTraits; /***/ }), -/***/ 39316: +/***/ 2430: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var utilConfigProvider = __nccwpck_require__(56716); -var utilMiddleware = __nccwpck_require__(42634); - -const ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; -const CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; -const DEFAULT_USE_DUALSTACK_ENDPOINT = false; -const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.ENV), - configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.CONFIG), - default: false, -}; +var uuid = __nccwpck_require__(266); -const ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; -const CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; -const DEFAULT_USE_FIPS_ENDPOINT = false; -const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, ENV_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.ENV), - configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.CONFIG), - default: false, -}; +const copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source; -const resolveCustomEndpointsConfig = (input) => { - const { tls, endpoint, urlParser, useDualstackEndpoint } = input; - return Object.assign(input, { - tls: tls ?? true, - endpoint: utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), - isCustomEndpoint: true, - useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false), - }); +const parseBoolean = (value) => { + switch (value) { + case "true": + return true; + case "false": + return false; + default: + throw new Error(`Unable to parse boolean value "${value}"`); + } }; - -const 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 expectBoolean = (value) => { + if (value === null || value === undefined) { + return undefined; } - 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"); + 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; + } } - return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); -}; - -const resolveEndpointsConfig = (input) => { - const useDualstackEndpoint = utilMiddleware.normalizeProvider(input.useDualstackEndpoint ?? false); - const { endpoint, useFipsEndpoint, urlParser, tls } = input; - return Object.assign(input, { - tls: tls ?? true, - endpoint: endpoint - ? utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) - : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), - isCustomEndpoint: !!endpoint, - useDualstackEndpoint, - }); -}; - -const REGION_ENV_NAME = "AWS_REGION"; -const REGION_INI_NAME = "region"; -const NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[REGION_ENV_NAME], - configFileSelector: (profile) => profile[REGION_INI_NAME], - default: () => { - throw new Error("Region is missing"); - }, -}; -const NODE_REGION_CONFIG_FILE_OPTIONS = { - preferredFile: "credentials", -}; - -const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); - -const getRealRegion = (region) => isFipsRegion(region) - ? ["fips-aws-global", "aws-fips"].includes(region) - ? "us-east-1" - : region.replace(/fips-(dkr-|prod-)?|-fips/, "") - : region; - -const resolveRegionConfig = (input) => { - const { region, useFipsEndpoint } = input; - if (!region) { - throw new Error("Region is missing"); + 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; + } } - return Object.assign(input, { - region: async () => { - if (typeof region === "string") { - return getRealRegion(region); - } - const providedRegion = await region(); - return getRealRegion(providedRegion); - }, - useFipsEndpoint: async () => { - const providedRegion = typeof region === "string" ? region : await region(); - if (isFipsRegion(providedRegion)) { - return true; - } - return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); - }, - }); + if (typeof value === "boolean") { + return value; + } + throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); }; - -const getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))?.hostname; - -const getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname - ? regionHostname - : partitionHostname - ? partitionHostname.replace("{region}", resolvedRegion) - : undefined; - -const getResolvedPartition = (region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws"; - -const getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { - if (signingRegion) { - return signingRegion; +const expectNumber = (value) => { + if (value === null || value === undefined) { + return undefined; } - else if (useFipsEndpoint) { - const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); - const regionRegexmatchArray = hostname.match(regionRegexJs); - if (regionRegexmatchArray) { - return regionRegexmatchArray[0].slice(1, -1); + 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}`); }; - -const 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 MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); +const 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}`); + } } - 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, - }), - }; + return expected; }; - -exports.CONFIG_USE_DUALSTACK_ENDPOINT = CONFIG_USE_DUALSTACK_ENDPOINT; -exports.CONFIG_USE_FIPS_ENDPOINT = CONFIG_USE_FIPS_ENDPOINT; -exports.DEFAULT_USE_DUALSTACK_ENDPOINT = DEFAULT_USE_DUALSTACK_ENDPOINT; -exports.DEFAULT_USE_FIPS_ENDPOINT = DEFAULT_USE_FIPS_ENDPOINT; -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.REGION_ENV_NAME = REGION_ENV_NAME; -exports.REGION_INI_NAME = REGION_INI_NAME; -exports.getRegionInfo = getRegionInfo; -exports.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig; -exports.resolveEndpointsConfig = resolveEndpointsConfig; -exports.resolveRegionConfig = resolveRegionConfig; - - -/***/ }), - -/***/ 12588: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); +const expectLong = (value) => { + if (value === null || value === undefined) { + return undefined; } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - -/***/ }), - -/***/ 42634: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var types = __nccwpck_require__(12588); - -const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); - -const normalizeProvider = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); }; - -exports.getSmithyContext = getSmithyContext; -exports.normalizeProvider = normalizeProvider; - - -/***/ }), - -/***/ 40566: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var propertyProvider = __nccwpck_require__(42382); -var url = __nccwpck_require__(87016); -var buffer = __nccwpck_require__(20181); -var http = __nccwpck_require__(58611); -var nodeConfigProvider = __nccwpck_require__(85744); -var urlParser = __nccwpck_require__(38118); - -function httpRequest(options) { - return new Promise((resolve, reject) => { - const req = http.request({ - method: "GET", - ...options, - hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1"), - }); - req.on("error", (err) => { - reject(Object.assign(new propertyProvider.ProviderError("Unable to connect to instance metadata service"), err)); - req.destroy(); - }); - req.on("timeout", () => { - reject(new propertyProvider.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 propertyProvider.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.Buffer.concat(chunks)); - req.destroy(); - }); - }); - req.end(); - }); -} - -const isImdsCredentials = (arg) => Boolean(arg) && - typeof arg === "object" && - typeof arg.AccessKeyId === "string" && - typeof arg.SecretAccessKey === "string" && - typeof arg.Token === "string" && - typeof arg.Expiration === "string"; -const fromImdsCredentials = (creds) => ({ - accessKeyId: creds.AccessKeyId, - secretAccessKey: creds.SecretAccessKey, - sessionToken: creds.Token, - expiration: new Date(creds.Expiration), - ...(creds.AccountId && { accountId: creds.AccountId }), -}); - -const DEFAULT_TIMEOUT = 1000; -const DEFAULT_MAX_RETRIES = 0; -const providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout }); - -const retry = (toRetry, maxRetries) => { - let promise = toRetry(); - for (let i = 0; i < maxRetries; i++) { - promise = promise.catch(toRetry); +const expectInt = expectLong; +const expectInt32 = (value) => expectSizedInt(value, 32); +const expectShort = (value) => expectSizedInt(value, 16); +const expectByte = (value) => expectSizedInt(value, 8); +const 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; +}; +const 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]; } - return promise; }; - -const ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; -const ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; -const ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; -const 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 propertyProvider.CredentialsProviderError("Invalid response received from instance metadata service.", { - logger: init.logger, - }); +const expectNonNull = (value, location) => { + if (value === null || value === undefined) { + if (location) { + throw new TypeError(`Expected a non-null value for ${location}`); } - return fromImdsCredentials(credsResponse); - }, maxRetries); + throw new TypeError("Expected a non-null value"); + } + return value; }; -const requestFromEcsImds = async (timeout, options) => { - if (process.env[ENV_CMDS_AUTH_TOKEN]) { - options.headers = { - ...options.headers, - Authorization: process.env[ENV_CMDS_AUTH_TOKEN], - }; +const expectObject = (value) => { + if (value === null || value === undefined) { + return undefined; } - const buffer = await httpRequest({ - ...options, - timeout, - }); - return buffer.toString(); + 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}`); }; -const CMDS_IP = "169.254.170.2"; -const GREENGRASS_HOSTS = { - localhost: true, - "127.0.0.1": true, +const expectString = (value) => { + if (value === null || value === undefined) { + return undefined; + } + 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}`); }; -const GREENGRASS_PROTOCOLS = { - "http:": true, - "https:": true, +const expectUnion = (value) => { + if (value === null || value === undefined) { + return undefined; + } + const asObject = expectObject(value); + const setKeys = Object.entries(asObject) + .filter(([, v]) => v != null) + .map(([k]) => 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; }; -const getCmdsUri = async ({ logger }) => { - if (process.env[ENV_CMDS_RELATIVE_URI]) { - return { - hostname: CMDS_IP, - path: process.env[ENV_CMDS_RELATIVE_URI], - }; +const strictParseDouble = (value) => { + if (typeof value == "string") { + return expectNumber(parseNumber(value)); } - if (process.env[ENV_CMDS_FULL_URI]) { - const parsed = url.parse(process.env[ENV_CMDS_FULL_URI]); - if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { - throw new propertyProvider.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, { - tryNextLink: false, - logger, - }); - } - if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { - throw new propertyProvider.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, { - tryNextLink: false, - logger, - }); - } - return { - ...parsed, - port: parsed.port ? parseInt(parsed.port, 10) : undefined, - }; + return expectNumber(value); +}; +const strictParseFloat = strictParseDouble; +const strictParseFloat32 = (value) => { + if (typeof value == "string") { + return expectFloat32(parseNumber(value)); } - throw new propertyProvider.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, - }); + return expectFloat32(value); }; - -class InstanceMetadataV1FallbackError extends propertyProvider.CredentialsProviderError { - tryNextLink; - name = "InstanceMetadataV1FallbackError"; - constructor(message, tryNextLink = true) { - super(message, tryNextLink); - this.tryNextLink = tryNextLink; - Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype); +const NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; +const 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`); } -} - -exports.Endpoint = void 0; -(function (Endpoint) { - Endpoint["IPv4"] = "http://169.254.169.254"; - Endpoint["IPv6"] = "http://[fd00:ec2::254]"; -})(exports.Endpoint || (exports.Endpoint = {})); - -const ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; -const CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; -const ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], - default: undefined, + return parseFloat(value); }; - -var EndpointMode; -(function (EndpointMode) { - EndpointMode["IPv4"] = "IPv4"; - EndpointMode["IPv6"] = "IPv6"; -})(EndpointMode || (EndpointMode = {})); - -const ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; -const CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; -const ENDPOINT_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], - default: EndpointMode.IPv4, -}; - -const getInstanceMetadataEndpoint = async () => urlParser.parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig())); -const getFromEndpointConfig = async () => nodeConfigProvider.loadConfig(ENDPOINT_CONFIG_OPTIONS)(); -const getFromEndpointModeConfig = async () => { - const endpointMode = await nodeConfigProvider.loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)(); - switch (endpointMode) { - case EndpointMode.IPv4: - return exports.Endpoint.IPv4; - case EndpointMode.IPv6: - return exports.Endpoint.IPv6; - default: - throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`); +const limitedParseDouble = (value) => { + if (typeof value == "string") { + return parseFloatString(value); } + return expectNumber(value); }; - -const STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; -const STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; -const STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; -const 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)}.\nFor more information, please visit: ` + - STATIC_STABILITY_DOC_URL); - const originalExpiration = credentials.originalExpiration ?? credentials.expiration; - return { - ...credentials, - ...(originalExpiration ? { originalExpiration } : {}), - expiration: newExpiration, - }; +const handleFloat = limitedParseDouble; +const limitedParseFloat = limitedParseDouble; +const limitedParseFloat32 = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectFloat32(value); }; - -const 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; - }; +const 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}`); + } }; - -const IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; -const IMDS_TOKEN_PATH = "/latest/api/token"; -const AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; -const PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; -const X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; -const fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }); -const 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 nodeConfigProvider.loadConfig({ - environmentVariableSelector: (env) => { - const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; - fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; - if (envValue === undefined) { - throw new propertyProvider.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, - }); - } - }; +const strictParseLong = (value) => { + if (typeof value === "string") { + return expectLong(parseNumber(value)); + } + return expectLong(value); }; -const getMetadataToken = async (options) => httpRequest({ - ...options, - path: IMDS_TOKEN_PATH, - method: "PUT", - headers: { - "x-aws-ec2-metadata-token-ttl-seconds": "21600", - }, -}); -const getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(); -const getCredentialsFromProfile = async (profile, options, init) => { - const credentialsResponse = JSON.parse((await httpRequest({ - ...options, - path: IMDS_PATH + profile, - })).toString()); - if (!isImdsCredentials(credentialsResponse)) { - throw new propertyProvider.CredentialsProviderError("Invalid response received from instance metadata service.", { - logger: init.logger, - }); +const strictParseInt = strictParseLong; +const strictParseInt32 = (value) => { + if (typeof value === "string") { + return expectInt32(parseNumber(value)); } - return fromImdsCredentials(credentialsResponse); + return expectInt32(value); }; - -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.fromContainerMetadata = fromContainerMetadata; -exports.fromInstanceMetadata = fromInstanceMetadata; -exports.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint; -exports.httpRequest = httpRequest; -exports.providerConfigFromInit = providerConfigFromInit; - - -/***/ }), - -/***/ 85744: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var propertyProvider = __nccwpck_require__(42382); -var sharedIniFileLoader = __nccwpck_require__(38924); - -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(", "); +const strictParseShort = (value) => { + if (typeof value === "string") { + return expectShort(parseNumber(value)); } - catch (e) { - return functionString; + return expectShort(value); +}; +const strictParseByte = (value) => { + if (typeof value === "string") { + return expectByte(parseNumber(value)); } -} + return expectByte(value); +}; +const stackTraceWarning = (message) => { + return String(new TypeError(message).stack || message) + .split("\n") + .slice(0, 5) + .filter((s) => !s.includes("stackTraceWarning")) + .join("\n"); +}; +const logger = { + warn: console.warn, +}; -const fromEnv = (envVarSelector, options) => async () => { - try { - const config = envVarSelector(process.env, options); - if (config === undefined) { - throw new Error(); - } - return config; +const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; +const 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`; +} +const RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); +const parseRfc3339DateTime = (value) => { + if (value === null || value === undefined) { + return undefined; } - catch (e) { - throw new propertyProvider.CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger }); + 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 }); }; - -const fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { - const profile = sharedIniFileLoader.getProfileName(init); - const { configFile, credentialsFile } = await sharedIniFileLoader.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; +const 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])$/); +const parseRfc3339DateTimeWithOffset = (value) => { + if (value === null || value === undefined) { + return undefined; } - catch (e) { - throw new propertyProvider.CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger }); + 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; }; - -const isFunction = (func) => typeof func === "function"; -const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue); - -const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { - const { signingName, logger } = configuration; - const envOptions = { signingName, logger }; - return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))); +const 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$/); +const 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$/); +const 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})$/); +const parseRfc7231DateTime = (value) => { + if (value === null || value === undefined) { + return undefined; + } + 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"); }; - -exports.loadConfig = loadConfig; - - -/***/ }), - -/***/ 42382: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -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}`); +const parseEpochTimestamp = (value) => { + if (value === null || value === undefined) { + return undefined; } - static from(error, options = true) { - return Object.assign(new this(error.message, options), error); + let valueAsDouble; + if (typeof value === "number") { + valueAsDouble = value; } -} - -class CredentialsProviderError extends ProviderError { - name = "CredentialsProviderError"; - constructor(message, options = true) { - super(message, options); - Object.setPrototypeOf(this, CredentialsProviderError.prototype); + else if (typeof value === "string") { + valueAsDouble = strictParseDouble(value); } -} - -class TokenProviderError extends ProviderError { - name = "TokenProviderError"; - constructor(message, options = true) { - super(message, options); - Object.setPrototypeOf(this, TokenProviderError.prototype); + else if (typeof value === "object" && value.tag === 1) { + valueAsDouble = value.value; } -} - -const chain = (...providers) => async () => { - if (providers.length === 0) { - throw new ProviderError("No providers in chain"); + else { + throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); } - let lastProviderError; - for (const provider of providers) { - try { - const credentials = await provider(); - return credentials; - } - catch (err) { - lastProviderError = err; - if (err?.tryNextLink) { - continue; - } - throw err; - } + if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { + throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); } - throw lastProviderError; + return new Date(Math.round(valueAsDouble * 1000)); }; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const 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; - }; +const 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))); +}; +const parseTwoDigitYear = (value) => { + const thisYear = new Date().getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; } - 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; - }; + return valueInThisCentury; }; - -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; - - -/***/ }), - -/***/ 39982: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -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]; - } - } +const FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000; +const 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; +}; +const parseMonthByShortName = (value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; +}; +const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +const validateDayOfMonth = (year, month, day) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year)) { + maxDays = 29; } - return query; -} - -exports.parseQueryString = parseQueryString; - - -/***/ }), - -/***/ 48660: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __nccwpck_require__(70857); -const path_1 = __nccwpck_require__(16928); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; + if (day > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); } - return "DEFAULT"; }; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; +const isLeapYear = (year) => { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); }; -exports.getHomeDir = getHomeDir; - - -/***/ }), - -/***/ 17669: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __nccwpck_require__(76982); -const path_1 = __nccwpck_require__(16928); -const getHomeDir_1 = __nccwpck_require__(48660); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); +const 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; }; -exports.getSSOTokenFilepath = getSSOTokenFilepath; - - -/***/ }), - -/***/ 88262: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; -const fs_1 = __nccwpck_require__(79896); -const getSSOTokenFilepath_1 = __nccwpck_require__(17669); -const { readFile } = fs_1.promises; -exports.tokenIntercept = {}; -const getSSOTokenFromFile = async (id) => { - if (exports.tokenIntercept[id]) { - return exports.tokenIntercept[id]; +const parseMilliseconds = (value) => { + if (value === null || value === undefined) { + return 0; } - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); + return strictParseFloat32("0." + value) * 1000; }; -exports.getSSOTokenFromFile = getSSOTokenFromFile; - - -/***/ }), - -/***/ 38924: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var getHomeDir = __nccwpck_require__(48660); -var getSSOTokenFilepath = __nccwpck_require__(17669); -var getSSOTokenFromFile = __nccwpck_require__(88262); -var path = __nccwpck_require__(16928); -var types = __nccwpck_require__(31242); -var slurpFile = __nccwpck_require__(91550); - -const ENV_PROFILE = "AWS_PROFILE"; -const DEFAULT_PROFILE = "default"; -const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; - -const CONFIG_PREFIX_SEPARATOR = "."; - -const getConfigData = (data) => Object.entries(data) - .filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; +const parseOffsetToMilliseconds = (value) => { + const directionStr = value[0]; + let direction = 1; + if (directionStr == "+") { + direction = 1; } - return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}) - .reduce((acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; -}, { - ...(data.default && { default: data.default }), -}); - -const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); - -const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); - -const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -const profileNameBlockList = ["__proto__", "profile __proto__"]; -const 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(types.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; - } - } - } + else if (directionStr == "-") { + direction = -1; } - return map; + 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; }; - -const swallowError$1 = () => ({}); -const loadSharedConfigFiles = async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = getHomeDir.getHomeDir(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = path.join(homeDir, filepath.slice(2)); +const stripLeadingZeroes = (value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); + if (idx === 0) { + return value; } - const parsedFiles = await Promise.all([ - slurpFile.slurpFile(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .then(getConfigData) - .catch(swallowError$1), - slurpFile.slurpFile(resolvedFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .catch(swallowError$1), - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1], - }; + return value.slice(idx); }; -const getSsoSessionData = (data) => Object.entries(data) - .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) - .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); +const 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; -const swallowError = () => ({}); -const loadSsoSessionData = async (init = {}) => slurpFile.slurpFile(init.configFilepath ?? getConfigFilepath()) - .then(parseIni) - .then(getSsoSessionData) - .catch(swallowError); +function quoteHeader(part) { + if (part.includes(",") || part.includes('"')) { + part = `"${part.replace(/"/g, '\\"')}"`; + } + return part; +} -const 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; - } +const ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`; +const mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`; +const time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`; +const date = `(\\d?\\d)`; +const year = `(\\d{4})`; +const RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/); +const IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`); +const RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`); +const ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`); +const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; +const _parseEpochTimestamp = (value) => { + if (value == null) { + return void 0; + } + 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); } - return merged; -}; - -const parseKnownFiles = async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); + 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)); }; - -const externalDataInterceptor = { - getFileRecord() { - return slurpFile.fileIntercept; - }, - interceptFile(path, contents) { - slurpFile.fileIntercept[path] = Promise.resolve(contents); - }, - getTokenRecord() { - return getSSOTokenFromFile.tokenIntercept; - }, - interceptToken(id, contents) { - getSSOTokenFromFile.tokenIntercept[id] = contents; - }, +const _parseRfc3339DateTimeWithOffset = (value) => { + if (value == null) { + return void 0; + } + 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) || [void 0, "+", 0, 0]; + const scalar = sign === "-" ? 1 : -1; + date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000)); + } + return date; }; - -Object.defineProperty(exports, "getSSOTokenFromFile", ({ - enumerable: true, - get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } -})); -exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; -exports.DEFAULT_PROFILE = DEFAULT_PROFILE; -exports.ENV_PROFILE = ENV_PROFILE; -exports.externalDataInterceptor = externalDataInterceptor; -exports.getProfileName = getProfileName; -exports.loadSharedConfigFiles = loadSharedConfigFiles; -exports.loadSsoSessionData = loadSsoSessionData; -exports.parseKnownFiles = parseKnownFiles; -Object.keys(getHomeDir).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getHomeDir[k]; } - }); -}); -Object.keys(getSSOTokenFilepath).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getSSOTokenFilepath[k]; } - }); -}); - - -/***/ }), - -/***/ 91550: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = void 0; -const fs_1 = __nccwpck_require__(79896); -const { readFile } = fs_1.promises; -exports.filePromisesHash = {}; -exports.fileIntercept = {}; -const slurpFile = (path, options) => { - if (exports.fileIntercept[path] !== undefined) { - return exports.fileIntercept[path]; +const _parseRfc7231DateTime = (value) => { + if (value == null) { + return void 0; } - if (!exports.filePromisesHash[path] || options?.ignoreCache) { - exports.filePromisesHash[path] = readFile(path, "utf8"); + if (typeof value !== "string") { + throw new TypeError("RFC7231 timestamps must be strings."); } - return exports.filePromisesHash[path]; + 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}.`); }; -exports.slurpFile = slurpFile; - - -/***/ }), - -/***/ 31242: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); +function range(v, min, max) { + const _v = Number(v); + if (_v < min || _v > max) { + throw new Error(`Value ${_v} out of range [${min}, ${max}]`); + } +} -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); +function splitEvery(value, delimiter, numDelimiters) { + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); + 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; +} + +const 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; } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + 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, '"'); }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); }; -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - -/***/ }), - -/***/ 38118: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var querystringParser = __nccwpck_require__(39982); - -const parseUrl = (url) => { - if (typeof url === "string") { - return parseUrl(new URL(url)); +const format = /^-?\d*(\.\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 must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`); + } } - const { hostname, pathname, port, protocol, search } = url; - let query; - if (search) { - query = querystringParser.parseQueryString(search); + toString() { + return this.string; } - return { - hostname, - port: port ? parseInt(port) : undefined, - protocol, - path: pathname, - query, - }; -}; + 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"); +} -exports.parseUrl = parseUrl; +Object.defineProperty(exports, "generateIdempotencyToken", ({ + enumerable: true, + get: function () { return uuid.v4; } +})); +exports.LazyJsonString = LazyJsonString; +exports.NumericValue = NumericValue; +exports._parseEpochTimestamp = _parseEpochTimestamp; +exports._parseRfc3339DateTimeWithOffset = _parseRfc3339DateTimeWithOffset; +exports._parseRfc7231DateTime = _parseRfc7231DateTime; +exports.copyDocumentWithTransform = copyDocumentWithTransform; +exports.dateToUtcString = dateToUtcString; +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.handleFloat = handleFloat; +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.splitEvery = splitEvery; +exports.splitHeader = splitHeader; +exports.strictParseByte = strictParseByte; +exports.strictParseDouble = strictParseDouble; +exports.strictParseFloat = strictParseFloat; +exports.strictParseFloat32 = strictParseFloat32; +exports.strictParseInt = strictParseInt; +exports.strictParseInt32 = strictParseInt32; +exports.strictParseLong = strictParseLong; +exports.strictParseShort = strictParseShort; /***/ }), -/***/ 47809: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 7809: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +"use strict"; -// src/index.ts -var src_exports = {}; -__export(src_exports, { - FetchHttpHandler: () => FetchHttpHandler, - keepAliveSupport: () => keepAliveSupport, - streamCollector: () => streamCollector -}); -module.exports = __toCommonJS(src_exports); -// src/fetch-http-handler.ts -var import_protocol_http = __nccwpck_require__(72356); -var import_querystring_builder = __nccwpck_require__(18256); +var protocolHttp = __nccwpck_require__(2356); +var querystringBuilder = __nccwpck_require__(8256); +var utilBase64 = __nccwpck_require__(8385); -// src/create-request.ts function createRequest(url, requestOptions) { - return new Request(url, requestOptions); + return new Request(url, requestOptions); } -__name(createRequest, "createRequest"); -// src/request-timeout.ts function requestTimeout(timeoutInMs = 0) { - return new Promise((resolve, reject) => { - if (timeoutInMs) { - setTimeout(() => { - const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); - timeoutError.name = "TimeoutError"; - reject(timeoutError); - }, timeoutInMs); - } - }); + return new Promise((resolve, reject) => { + if (timeoutInMs) { + setTimeout(() => { + const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }, timeoutInMs); + } + }); } -__name(requestTimeout, "requestTimeout"); -// src/fetch-http-handler.ts -var keepAliveSupport = { - supported: void 0 +const keepAliveSupport = { + supported: undefined, }; -var _FetchHttpHandler = class _FetchHttpHandler { - /** - * @returns the input if it is an HttpHandler of any class, - * or instantiates a new instance of this handler. - */ - static create(instanceOrOptions) { - if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { - return instanceOrOptions; - } - return new _FetchHttpHandler(instanceOrOptions); - } - constructor(options) { - if (typeof options === "function") { - this.configProvider = options().then((opts) => opts || {}); - } else { - this.config = options ?? {}; - this.configProvider = Promise.resolve(this.config); - } - if (keepAliveSupport.supported === void 0) { - keepAliveSupport.supported = Boolean( - typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]") - ); - } - } - destroy() { - } - async handle(request, { abortSignal } = {}) { - var _a; - if (!this.config) { - this.config = await this.configProvider; - } - const requestTimeoutInMs = this.config.requestTimeout; - const keepAlive = this.config.keepAlive === true; - const credentials = this.config.credentials; - if (abortSignal == null ? void 0 : abortSignal.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - return Promise.reject(abortError); - } - let path = request.path; - const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {}); - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let auth = ""; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}@`; +class FetchHttpHandler { + config; + configProvider; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new FetchHttpHandler(instanceOrOptions); } - const { port, method } = request; - const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; - const body = method === "GET" || method === "HEAD" ? void 0 : request.body; - const requestOptions = { - body, - headers: new Headers(request.headers), - method, - credentials - }; - if ((_a = this.config) == null ? void 0 : _a.cache) { - requestOptions.cache = this.config.cache; + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } + else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); + } + if (keepAliveSupport.supported === undefined) { + keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]")); + } } - if (body) { - requestOptions.duplex = "half"; + destroy() { } - if (typeof AbortController !== "undefined") { - requestOptions.signal = abortSignal; + async handle(request, { abortSignal, requestTimeout: requestTimeout$1 } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = requestTimeout$1 ?? this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + const credentials = this.config.credentials; + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return Promise.reject(abortError); + } + let path = request.path; + const queryString = querystringBuilder.buildQueryString(request.query || {}); + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const { port, method } = request; + const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; + const body = method === "GET" || method === "HEAD" ? undefined : request.body; + const requestOptions = { + body, + headers: new Headers(request.headers), + method: method, + credentials, + }; + if (this.config?.cache) { + requestOptions.cache = this.config.cache; + } + if (body) { + requestOptions.duplex = "half"; + } + if (typeof AbortController !== "undefined") { + requestOptions.signal = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions.keepalive = keepAlive; + } + if (typeof this.config.requestInit === "function") { + Object.assign(requestOptions, this.config.requestInit(request)); + } + let removeSignalEventListener = () => { }; + const fetchRequest = createRequest(url, requestOptions); + const raceOfPromises = [ + fetch(fetchRequest).then((response) => { + const fetchHeaders = response.headers; + const transformedHeaders = {}; + for (const pair of fetchHeaders.entries()) { + transformedHeaders[pair[0]] = pair[1]; + } + const hasReadableStream = response.body != undefined; + if (!hasReadableStream) { + return response.blob().then((body) => ({ + response: new protocolHttp.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body, + }), + })); + } + return { + response: new protocolHttp.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body, + }), + }; + }), + requestTimeout(requestTimeoutInMs), + ]; + if (abortSignal) { + raceOfPromises.push(new Promise((resolve, reject) => { + const onAbort = () => { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + removeSignalEventListener = () => signal.removeEventListener("abort", onAbort); + } + else { + abortSignal.onabort = onAbort; + } + })); + } + return Promise.race(raceOfPromises).finally(removeSignalEventListener); } - if (keepAliveSupport.supported) { - requestOptions.keepalive = keepAlive; + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + config[key] = value; + return config; + }); } - if (typeof this.config.requestInit === "function") { - Object.assign(requestOptions, this.config.requestInit(request)); + httpHandlerConfigs() { + return this.config ?? {}; } - let removeSignalEventListener = /* @__PURE__ */ __name(() => { - }, "removeSignalEventListener"); - const fetchRequest = createRequest(url, requestOptions); - const raceOfPromises = [ - fetch(fetchRequest).then((response) => { - const fetchHeaders = response.headers; - const transformedHeaders = {}; - for (const pair of fetchHeaders.entries()) { - transformedHeaders[pair[0]] = pair[1]; - } - const hasReadableStream = response.body != void 0; - if (!hasReadableStream) { - return response.blob().then((body2) => ({ - response: new import_protocol_http.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body: body2 - }) - })); +} + +const streamCollector = async (stream) => { + if ((typeof Blob === "function" && stream instanceof Blob) || stream.constructor?.name === "Blob") { + if (Blob.prototype.arrayBuffer !== undefined) { + return new Uint8Array(await stream.arrayBuffer()); } - return { - response: new import_protocol_http.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body: response.body - }) - }; - }), - requestTimeout(requestTimeoutInMs) - ]; - if (abortSignal) { - raceOfPromises.push( - new Promise((resolve, reject) => { - const onAbort = /* @__PURE__ */ __name(() => { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - }, "onAbort"); - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener"); - } else { - abortSignal.onabort = onAbort; - } - }) - ); + return collectBlob(stream); } - return Promise.race(raceOfPromises).finally(removeSignalEventListener); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - config[key] = value; - return config; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } + return collectStream(stream); }; -__name(_FetchHttpHandler, "FetchHttpHandler"); -var FetchHttpHandler = _FetchHttpHandler; - -// src/stream-collector.ts -var streamCollector = /* @__PURE__ */ __name(async (stream) => { - var _a; - if (typeof Blob === "function" && stream instanceof Blob || ((_a = stream.constructor) == null ? void 0 : _a.name) === "Blob") { - return new Uint8Array(await stream.arrayBuffer()); - } - return collectStream(stream); -}, "streamCollector"); +async function collectBlob(blob) { + const base64 = await readToBase64(blob); + const arrayBuffer = utilBase64.fromBase64(base64); + return new Uint8Array(arrayBuffer); +} async function collectStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; +} +function readToBase64(blob) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => { + if (reader.readyState !== 2) { + return reject(new Error("Reader aborted too early")); + } + const result = (reader.result ?? ""); + const commaIndex = result.indexOf(","); + const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; + resolve(result.substring(dataOffset)); + }; + reader.onabort = () => reject(new Error("Read aborted")); + reader.onerror = () => reject(reader.error); + reader.readAsDataURL(blob); + }); } -__name(collectStream, "collectStream"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); +exports.FetchHttpHandler = FetchHttpHandler; +exports.keepAliveSupport = keepAliveSupport; +exports.streamCollector = streamCollector; /***/ }), @@ -54201,10 +22067,10 @@ __name(collectStream, "collectStream"); "use strict"; -var utilBufferFrom = __nccwpck_require__(34677); -var utilUtf8 = __nccwpck_require__(82155); -var buffer = __nccwpck_require__(20181); -var crypto = __nccwpck_require__(76982); +var utilBufferFrom = __nccwpck_require__(4151); +var utilUtf8 = __nccwpck_require__(1577); +var buffer = __nccwpck_require__(181); +var crypto = __nccwpck_require__(6982); class Hash { algorithmIdentifier; @@ -54245,7 +22111,7 @@ exports.Hash = Hash; /***/ }), -/***/ 68628: +/***/ 6130: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -54259,829 +22125,1797 @@ exports.isArrayBuffer = isArrayBuffer; /***/ }), -/***/ 34677: +/***/ 7212: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var isArrayBuffer = __nccwpck_require__(68628); -var buffer = __nccwpck_require__(20181); +var protocolHttp = __nccwpck_require__(2356); -const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { - if (!isArrayBuffer.isArrayBuffer(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); +const CONTENT_LENGTH_HEADER = "content-length"; +function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request = args.request; + if (protocolHttp.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); + request.headers = { + ...request.headers, + [CONTENT_LENGTH_HEADER]: String(length), + }; + } + catch (error) { + } + } + } + return next({ + ...args, + request, + }); + }; +} +const contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true, +}; +const getContentLengthPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + }, +}); + +exports.contentLengthMiddleware = contentLengthMiddleware; +exports.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions; +exports.getContentLengthPlugin = getContentLengthPlugin; + + +/***/ }), + +/***/ 6041: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEndpointFromConfig = void 0; +const node_config_provider_1 = __nccwpck_require__(5704); +const getEndpointUrlConfig_1 = __nccwpck_require__(8008); +const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId ?? ""))(); +exports.getEndpointFromConfig = getEndpointFromConfig; + + +/***/ }), + +/***/ 8008: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEndpointUrlConfig = void 0; +const shared_ini_file_loader_1 = __nccwpck_require__(4964); +const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; +const CONFIG_ENDPOINT_URL = "endpoint_url"; +const 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 undefined; + }, + configFileSelector: (profile, config) => { + if (config && profile.services) { + const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (servicesSection) { + const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); + const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (endpointUrl) + return endpointUrl; + } + } + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + default: undefined, +}); +exports.getEndpointUrlConfig = getEndpointUrlConfig; + + +/***/ }), + +/***/ 99: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var getEndpointFromConfig = __nccwpck_require__(6041); +var urlParser = __nccwpck_require__(4494); +var core = __nccwpck_require__(402); +var utilMiddleware = __nccwpck_require__(6324); +var middlewareSerde = __nccwpck_require__(3255); + +const resolveParamsForS3 = async (endpointParams) => { + const bucket = endpointParams?.Bucket || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); } - return buffer.Buffer.from(input, offset, length); + 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; }; -const fromString = (input, encoding) => { - if (typeof input !== "string") { - throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); +const DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; +const IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; +const DOTS_PATTERN = /\.\./; +const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName); +const 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; +}; + +const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config) => { + const configProvider = async () => { + const 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 undefined; + } + 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; +}; + +const toEndpointV1 = (endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + return urlParser.parseUrl(endpoint.url); + } + return endpoint; + } + return urlParser.parseUrl(endpoint); +}; + +const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => { + if (!clientConfig.isCustomEndpoint) { + let endpointFromConfig; + if (clientConfig.serviceConfiguredEndpoint) { + endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); + } + else { + endpointFromConfig = await getEndpointFromConfig.getEndpointFromConfig(clientConfig.serviceId); + } + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + clientConfig.isCustomEndpoint = true; + } + } + 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); + return endpoint; +}; +const 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)(); + 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; +}; + +const endpointMiddleware = ({ config, instructions, }) => { + return (next, context) => async (args) => { + if (config.isCustomEndpoint) { + core.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 = utilMiddleware.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, + }); + }; +}; + +const endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: middlewareSerde.serializerMiddlewareOption.name, +}; +const getEndpointPlugin = (config, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(endpointMiddleware({ + config, + instructions, + }), endpointMiddlewareOptions); + }, +}); + +const resolveEndpointConfig = (input) => { + const tls = input.tls ?? true; + const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await utilMiddleware.normalizeProvider(endpoint)()) : undefined; + const isCustomEndpoint = !!endpoint; + const resolvedConfig = Object.assign(input, { + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false), + useFipsEndpoint: utilMiddleware.normalizeProvider(useFipsEndpoint ?? false), + }); + let configuredEndpointPromise = undefined; + resolvedConfig.serviceConfiguredEndpoint = async () => { + if (input.serviceId && !configuredEndpointPromise) { + configuredEndpointPromise = getEndpointFromConfig.getEndpointFromConfig(input.serviceId); + } + return configuredEndpointPromise; + }; + return resolvedConfig; +}; + +const 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; +}; + +exports.endpointMiddleware = endpointMiddleware; +exports.endpointMiddlewareOptions = endpointMiddlewareOptions; +exports.getEndpointFromInstructions = getEndpointFromInstructions; +exports.getEndpointPlugin = getEndpointPlugin; +exports.resolveEndpointConfig = resolveEndpointConfig; +exports.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig; +exports.resolveParams = resolveParams; +exports.toEndpointV1 = toEndpointV1; + + +/***/ }), + +/***/ 9618: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var utilRetry = __nccwpck_require__(5518); +var protocolHttp = __nccwpck_require__(2356); +var serviceErrorClassification = __nccwpck_require__(2058); +var uuid = __nccwpck_require__(266); +var utilMiddleware = __nccwpck_require__(6324); +var smithyClient = __nccwpck_require__(1411); +var isStreamingPayload = __nccwpck_require__(9831); + +const getDefaultRetryQuota = (initialRetryTokens, options) => { + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = utilRetry.NO_RETRY_INCREMENT; + const retryCost = utilRetry.RETRY_COST; + const timeoutRetryCost = utilRetry.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, + }); +}; + +const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(utilRetry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + +const defaultRetryDecider = (error) => { + if (!error) { + return false; + } + return serviceErrorClassification.isRetryableByTrait(error) || serviceErrorClassification.isClockSkewError(error) || serviceErrorClassification.isThrottlingError(error) || serviceErrorClassification.isTransientError(error); +}; + +const 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}`); +}; + +class StandardRetryStrategy { + maxAttemptsProvider; + retryDecider; + delayDecider; + retryQuota; + mode = utilRetry.RETRY_MODES.STANDARD; + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.retryDecider = options?.retryDecider ?? defaultRetryDecider; + this.delayDecider = options?.delayDecider ?? defaultDelayDecider; + this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(utilRetry.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 (error) { + maxAttempts = utilRetry.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 (protocolHttp.HttpRequest.isInstance(request)) { + request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4(); + } + while (true) { + try { + if (protocolHttp.HttpRequest.isInstance(request)) { + request.headers[utilRetry.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(serviceErrorClassification.isThrottlingError(err) ? utilRetry.THROTTLING_RETRY_DELAY_BASE : utilRetry.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; + } + } } - return encoding ? buffer.Buffer.from(input, encoding) : buffer.Buffer.from(input); -}; - -exports.fromArrayBuffer = fromArrayBuffer; -exports.fromString = fromString; - - -/***/ }), - -/***/ 82155: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilBufferFrom = __nccwpck_require__(34677); - -const fromUtf8 = (input) => { - const buf = utilBufferFrom.fromString(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); +} +const getDelayFromRetryAfterHeader = (response) => { + if (!protocolHttp.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 retryAfterSeconds * 1000; + const retryAfterDate = new Date(retryAfter); + return retryAfterDate.getTime() - Date.now(); }; -const toUint8Array = (data) => { - if (typeof data === "string") { - return fromUtf8(data); +class AdaptiveRetryStrategy extends StandardRetryStrategy { + rateLimiter; + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options ?? {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter ?? new utilRetry.DefaultRateLimiter(); + this.mode = utilRetry.RETRY_MODES.ADAPTIVE; } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); + }, + }); } - return new Uint8Array(data); -}; +} -const 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 utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); +const ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; +const CONFIG_MAX_ATTEMPTS = "max_attempts"; +const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + const value = env[ENV_MAX_ATTEMPTS]; + if (!value) + return undefined; + 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 undefined; + 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: utilRetry.DEFAULT_MAX_ATTEMPTS, }; - -exports.fromUtf8 = fromUtf8; -exports.toUint8Array = toUint8Array; -exports.toUtf8 = toUtf8; - - -/***/ }), - -/***/ 86130: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); +const resolveRetryConfig = (input) => { + const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input; + const maxAttempts = utilMiddleware.normalizeProvider(_maxAttempts ?? utilRetry.DEFAULT_MAX_ATTEMPTS); + return Object.assign(input, { + maxAttempts, + retryStrategy: async () => { + if (retryStrategy) { + return retryStrategy; + } + const retryMode = await utilMiddleware.normalizeProvider(_retryMode)(); + if (retryMode === utilRetry.RETRY_MODES.ADAPTIVE) { + return new utilRetry.AdaptiveRetryStrategy(maxAttempts); + } + return new utilRetry.StandardRetryStrategy(maxAttempts); + }, + }); }; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; +const ENV_RETRY_MODE = "AWS_RETRY_MODE"; +const CONFIG_RETRY_MODE = "retry_mode"; +const NODE_RETRY_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_RETRY_MODE], + configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + default: utilRetry.DEFAULT_RETRY_MODE, }; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var src_exports = {}; -__export(src_exports, { - isArrayBuffer: () => isArrayBuffer +const omitRetryHeadersMiddleware = () => (next) => async (args) => { + const { request } = args; + if (protocolHttp.HttpRequest.isInstance(request)) { + delete request.headers[utilRetry.INVOCATION_ID_HEADER]; + delete request.headers[utilRetry.REQUEST_HEADER]; + } + return next(args); +}; +const omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true, +}; +const getOmitRetryHeadersPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); + }, }); -module.exports = __toCommonJS(src_exports); -var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 47212: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -var protocolHttp = __nccwpck_require__(86382); - -const CONTENT_LENGTH_HEADER = "content-length"; -function contentLengthMiddleware(bodyLengthChecker) { - return (next) => async (args) => { - const request = args.request; - if (protocolHttp.HttpRequest.isInstance(request)) { - const { body, headers } = request; - if (body && - Object.keys(headers) - .map((str) => str.toLowerCase()) - .indexOf(CONTENT_LENGTH_HEADER) === -1) { +const retryMiddleware = (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"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request } = args; + const isRequest = protocolHttp.HttpRequest.isInstance(request); + if (isRequest) { + request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4(); + } + while (true) { + try { + if (isRequest) { + request.headers[utilRetry.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); + lastError = asSdkError(e); + if (isRequest && isStreamingPayload.isStreamingPayload(request)) { + (context.logger instanceof smithyClient.NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request."); + throw lastError; + } try { - const length = bodyLengthChecker(body); - request.headers = { - ...request.headers, - [CONTENT_LENGTH_HEADER]: String(length), - }; + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); } - catch (error) { + catch (refreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; } + attempts = retryToken.getRetryCount(); + const delay = retryToken.getRetryDelay(); + totalRetryDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); } } - return next({ - ...args, - request, - }); + } + else { + retryStrategy = retryStrategy; + if (retryStrategy?.mode) + context.userAgent = [...(context.userAgent || []), ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); + } +}; +const isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && + typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && + typeof retryStrategy.recordSuccess !== "undefined"; +const getRetryErrorInfo = (error) => { + const errorInfo = { + error, + errorType: getRetryErrorType(error), }; -} -const contentLengthMiddlewareOptions = { - step: "build", - tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], - name: "contentLengthMiddleware", + const retryAfterHint = getRetryAfterHint(error.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; +}; +const getRetryErrorType = (error) => { + if (serviceErrorClassification.isThrottlingError(error)) + return "THROTTLING"; + if (serviceErrorClassification.isTransientError(error)) + return "TRANSIENT"; + if (serviceErrorClassification.isServerError(error)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; +}; +const retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", override: true, }; -const getContentLengthPlugin = (options) => ({ +const getRetryPlugin = (options) => ({ applyToStack: (clientStack) => { - clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + clientStack.add(retryMiddleware(options), retryMiddlewareOptions); }, }); +const getRetryAfterHint = (response) => { + if (!protocolHttp.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 new Date(retryAfterSeconds * 1000); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; +}; -exports.contentLengthMiddleware = contentLengthMiddleware; -exports.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions; -exports.getContentLengthPlugin = getContentLengthPlugin; +exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy; +exports.CONFIG_MAX_ATTEMPTS = CONFIG_MAX_ATTEMPTS; +exports.CONFIG_RETRY_MODE = CONFIG_RETRY_MODE; +exports.ENV_MAX_ATTEMPTS = ENV_MAX_ATTEMPTS; +exports.ENV_RETRY_MODE = ENV_RETRY_MODE; +exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = NODE_MAX_ATTEMPT_CONFIG_OPTIONS; +exports.NODE_RETRY_MODE_CONFIG_OPTIONS = NODE_RETRY_MODE_CONFIG_OPTIONS; +exports.StandardRetryStrategy = StandardRetryStrategy; +exports.defaultDelayDecider = defaultDelayDecider; +exports.defaultRetryDecider = defaultRetryDecider; +exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin; +exports.getRetryAfterHint = getRetryAfterHint; +exports.getRetryPlugin = getRetryPlugin; +exports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware; +exports.omitRetryHeadersMiddlewareOptions = omitRetryHeadersMiddlewareOptions; +exports.resolveRetryConfig = resolveRetryConfig; +exports.retryMiddleware = retryMiddleware; +exports.retryMiddlewareOptions = retryMiddlewareOptions; /***/ }), -/***/ 86382: +/***/ 9831: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isStreamingPayload = void 0; +const stream_1 = __nccwpck_require__(2203); +const isStreamingPayload = (request) => request?.body instanceof stream_1.Readable || + (typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream); +exports.isStreamingPayload = isStreamingPayload; -var types = __nccwpck_require__(12276); -const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - }, - }; -}; -const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler(), - }; -}; +/***/ }), -class Field { - name; - kind; - values; - constructor({ name, kind = types.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; - } -} +/***/ 3255: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -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); - } -} +"use strict"; -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; + +var protocolHttp = __nccwpck_require__(2356); + +const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => { + const { response } = await next(args); + try { + const parsed = await deserializer(response, options); + return { + response, + output: parsed, + }; } - static clone(request) { - const cloned = new HttpRequest({ - ...request, - headers: { ...request.headers }, + catch (error) { + Object.defineProperty(error, "$response", { + value: response, }); - if (cloned.query) { - cloned.query = cloneQuery(cloned.query); - } - return cloned; - } - static isInstance(request) { - if (!request) { - return 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 += "\n " + hint; + } + catch (e) { + 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 (protocolHttp.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 (e) { + } } - 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; + throw error; } - static isInstance(response) { - if (!response) - return false; - const resp = response; - return typeof resp.statusCode === "number" && typeof resp.headers === "object"; +}; +const findHeader = (pattern, headers) => { + return (headers.find(([k]) => { + return k.match(pattern); + }) || [void 0, void 0])[1]; +}; + +const serializerMiddleware = (options, serializer) => (next, context) => async (args) => { + const endpointConfig = options; + const endpoint = context.endpointV2?.url && endpointConfig.urlParser + ? async () => endpointConfig.urlParser(context.endpointV2.url) + : endpointConfig.endpoint; + if (!endpoint) { + throw new Error("No valid endpoint provider available."); } -} + const request = await serializer(args.input, { ...options, endpoint }); + return next({ + ...args, + request, + }); +}; -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); +const deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true, +}; +const 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); + }, + }; } -exports.Field = Field; -exports.Fields = Fields; -exports.HttpRequest = HttpRequest; -exports.HttpResponse = HttpResponse; -exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; -exports.isValidHostname = isValidHostname; -exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; +exports.deserializerMiddleware = deserializerMiddleware; +exports.deserializerMiddlewareOption = deserializerMiddlewareOption; +exports.getSerdePlugin = getSerdePlugin; +exports.serializerMiddleware = serializerMiddleware; +exports.serializerMiddlewareOption = serializerMiddlewareOption; /***/ }), -/***/ 12276: -/***/ ((__unused_webpack_module, exports) => { +/***/ 5704: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); +var propertyProvider = __nccwpck_require__(1238); +var sharedIniFileLoader = __nccwpck_require__(4964); -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); +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 (e) { + return functionString; + } +} -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); +const fromEnv = (envVarSelector, options) => async () => { + try { + const config = envVarSelector(process.env, options); + if (config === undefined) { + throw new Error(); + } + return config; } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); + catch (e) { + throw new propertyProvider.CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger }); } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; }; -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); +const fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = sharedIniFileLoader.getProfileName(init); + const { configFile, credentialsFile } = await sharedIniFileLoader.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 propertyProvider.CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger }); + } }; -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); +const isFunction = (func) => typeof func === "function"; +const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue); -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); +const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { + const { signingName, logger } = configuration; + const envOptions = { signingName, logger }; + return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))); +}; -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; +exports.loadConfig = loadConfig; /***/ }), -/***/ 19618: +/***/ 1279: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var utilRetry = __nccwpck_require__(15518); -var protocolHttp = __nccwpck_require__(64864); -var serviceErrorClassification = __nccwpck_require__(42058); -var uuid = __nccwpck_require__(90266); -var utilMiddleware = __nccwpck_require__(73976); -var smithyClient = __nccwpck_require__(61411); -var isStreamingPayload = __nccwpck_require__(49831); +var protocolHttp = __nccwpck_require__(2356); +var querystringBuilder = __nccwpck_require__(8256); +var http = __nccwpck_require__(8611); +var https = __nccwpck_require__(5692); +var stream = __nccwpck_require__(2203); +var http2 = __nccwpck_require__(5675); + +const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + +const getTransformedHeaders = (headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; +}; + +const timing = { + setTimeout: (cb, ms) => setTimeout(cb, ms), + clearTimeout: (timeoutId) => clearTimeout(timeoutId), +}; + +const DEFER_EVENT_LISTENER_TIME$2 = 1000; +const 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); +}; + +const 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; +}; + +const DEFER_EVENT_LISTENER_TIME$1 = 3000; +const 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); +}; + +const DEFER_EVENT_LISTENER_TIME = 3000; +const 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); +}; + +const MIN_WAIT_TIME = 6_000; +async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) { + const headers = request.headers ?? {}; + const expect = headers.Expect || headers.expect; + 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 stream.Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + if (Buffer.isBuffer(body) || typeof body === "string") { + 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(); +} + +const DEFAULT_REQUEST_TIMEOUT = 0; +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 = 15_000; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + 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)); + } + }); + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout, + socketTimeout, + socketAcquisitionWarningTimeout, + throwOnRequestTimeout, + httpAgent: (() => { + if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { + this.externalAgent = true; + return httpAgent; + } + return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { + this.externalAgent = true; + return httpsAgent; + } + return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger: console, + }; + } + destroy() { + this.config?.httpAgent?.destroy(); + this.config?.httpsAgent?.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + return new Promise((_resolve, _reject) => { + const config = this.config; + let writeRequestBodyPromise = undefined; + const timeouts = []; + const resolve = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _reject(arg); + }; + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request.protocol === "https:"; + const headers = request.headers ?? {}; + const expectContinue = (headers.Expect ?? headers.expect) === "100-continue"; + let agent = isSSL ? config.httpsAgent : config.httpAgent; + if (expectContinue && !this.externalAgent) { + agent = new (isSSL ? https.Agent : http.Agent)({ + keepAlive: false, + maxSockets: Infinity, + }); + } + timeouts.push(timing.setTimeout(() => { + this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger); + }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000))); + const queryString = querystringBuilder.buildQueryString(request.query || {}); + let auth = undefined; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}`; + } + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let hostname = request.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request.hostname.slice(1, -1); + } + else { + hostname = request.hostname; + } + const nodeHttpsOptions = { + headers: request.headers, + host: hostname, + method: request.method, + path, + port: request.port, + agent, + auth, + }; + const requestFunc = isSSL ? https.request : http.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new protocolHttp.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 = new Error("Request aborted"); + abortError.name = "AbortError"; + 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; + timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout)); + timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console)); + timeouts.push(setSocketTimeout(req, reject, config.socketTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push(setSocketKeepAlive(req, { + keepAlive: httpAgent.keepAlive, + keepAliveMsecs: httpAgent.keepAliveMsecs, + })); + } + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => { + timeouts.forEach(timing.clearTimeout); + return _reject(e); + }); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } +} -const getDefaultRetryQuota = (initialRetryTokens, options) => { - const MAX_CAPACITY = initialRetryTokens; - const noRetryIncrement = utilRetry.NO_RETRY_INCREMENT; - const retryCost = utilRetry.RETRY_COST; - const timeoutRetryCost = utilRetry.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"); +class NodeHttp2ConnectionPool { + sessions = []; + constructor(sessions) { + this.sessions = sessions ?? []; + } + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); } - 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, - }); -}; - -const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(utilRetry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); - -const defaultRetryDecider = (error) => { - if (!error) { - return false; } - return serviceErrorClassification.isRetryableByTrait(error) || serviceErrorClassification.isClockSkewError(error) || serviceErrorClassification.isThrottlingError(error) || serviceErrorClassification.isTransientError(error); -}; - -const 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}`); -}; - -class StandardRetryStrategy { - maxAttemptsProvider; - retryDecider; - delayDecider; - retryQuota; - mode = utilRetry.RETRY_MODES.STANDARD; - constructor(maxAttemptsProvider, options) { - this.maxAttemptsProvider = maxAttemptsProvider; - this.retryDecider = options?.retryDecider ?? defaultRetryDecider; - this.delayDecider = options?.delayDecider ?? defaultDelayDecider; - this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(utilRetry.INITIAL_RETRY_TOKENS); + offerLast(session) { + this.sessions.push(session); } - shouldRetry(error, attempts, maxAttempts) { - return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); + contains(session) { + return this.sessions.includes(session); } - async getMaxAttempts() { - let maxAttempts; - try { - maxAttempts = await this.maxAttemptsProvider(); - } - catch (error) { - maxAttempts = utilRetry.DEFAULT_MAX_ATTEMPTS; + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } } - return maxAttempts; } - async retry(next, args, options) { - let retryTokenAmount; - let attempts = 0; - let totalDelay = 0; - const maxAttempts = await this.getMaxAttempts(); - const { request } = args; - if (protocolHttp.HttpRequest.isInstance(request)) { - request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4(); +} + +class NodeHttp2ConnectionManager { + constructor(config) { + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); } - while (true) { - try { - if (protocolHttp.HttpRequest.isInstance(request)) { - request.headers[utilRetry.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 }; + } + config; + sessionCache = new Map(); + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; } - catch (e) { - const err = asSdkError(e); - attempts++; - if (this.shouldRetry(err, attempts, maxAttempts)) { - retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); - const delayFromDecider = this.delayDecider(serviceErrorClassification.isThrottlingError(err) ? utilRetry.THROTTLING_RETRY_DELAY_BASE : utilRetry.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; + } + const session = http2.connect(url); + 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()); } - if (!err.$metadata) { - err.$metadata = {}; + }); + } + session.unref(); + const destroySessionCb = () => { + session.destroy(); + this.deleteSession(url, session); + }; + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url, connectionPool); + return session; + } + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); + } + release(requestContext, session) { + const cacheKey = this.getUrlString(requestContext); + this.sessionCache.get(cacheKey)?.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); } - err.$metadata.attempts = attempts; - err.$metadata.totalRetryDelay = totalDelay; - throw err; + connectionPool.remove(session); } + this.sessionCache.delete(key); } } -} -const getDelayFromRetryAfterHeader = (response) => { - if (!protocolHttp.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 retryAfterSeconds * 1000; - const retryAfterDate = new Date(retryAfter); - return retryAfterDate.getTime() - Date.now(); -}; - -class AdaptiveRetryStrategy extends StandardRetryStrategy { - rateLimiter; - constructor(maxAttemptsProvider, options) { - const { rateLimiter, ...superOptions } = options ?? {}; - super(maxAttemptsProvider, superOptions); - this.rateLimiter = rateLimiter ?? new utilRetry.DefaultRateLimiter(); - this.mode = utilRetry.RETRY_MODES.ADAPTIVE; + setMaxConcurrentStreams(maxConcurrentStreams) { + if (maxConcurrentStreams && maxConcurrentStreams <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; } - async retry(next, args) { - return super.retry(next, args, { - beforeRequest: async () => { - return this.rateLimiter.getSendToken(); - }, - afterRequest: (response) => { - this.rateLimiter.updateClientSendingRate(response); - }, - }); + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + getUrlString(request) { + return request.destination.toString(); } } -const ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; -const CONFIG_MAX_ATTEMPTS = "max_attempts"; -const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { - const value = env[ENV_MAX_ATTEMPTS]; - if (!value) - return undefined; - 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 undefined; - const maxAttempt = parseInt(value); - if (Number.isNaN(maxAttempt)) { - throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); +class NodeHttp2Handler { + config; + configProvider; + metadata = { handlerProtocol: "h2" }; + connectionManager = new NodeHttp2ConnectionManager({}); + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; } - return maxAttempt; - }, - default: utilRetry.DEFAULT_MAX_ATTEMPTS, -}; -const resolveRetryConfig = (input) => { - const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input; - const maxAttempts = utilMiddleware.normalizeProvider(_maxAttempts ?? utilRetry.DEFAULT_MAX_ATTEMPTS); - return Object.assign(input, { - maxAttempts, - retryStrategy: async () => { - if (retryStrategy) { - return retryStrategy; + return new NodeHttp2Handler(instanceOrOptions); + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((opts) => { + resolve(opts || {}); + }) + .catch(reject); } - const retryMode = await utilMiddleware.normalizeProvider(_retryMode)(); - if (retryMode === utilRetry.RETRY_MODES.ADAPTIVE) { - return new utilRetry.AdaptiveRetryStrategy(maxAttempts); + else { + resolve(options || {}); } - return new utilRetry.StandardRetryStrategy(maxAttempts); - }, - }); -}; -const ENV_RETRY_MODE = "AWS_RETRY_MODE"; -const CONFIG_RETRY_MODE = "retry_mode"; -const NODE_RETRY_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_RETRY_MODE], - configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], - default: utilRetry.DEFAULT_RETRY_MODE, -}; - -const omitRetryHeadersMiddleware = () => (next) => async (args) => { - const { request } = args; - if (protocolHttp.HttpRequest.isInstance(request)) { - delete request.headers[utilRetry.INVOCATION_ID_HEADER]; - delete request.headers[utilRetry.REQUEST_HEADER]; + }); } - return next(args); -}; -const omitRetryHeadersMiddlewareOptions = { - name: "omitRetryHeadersMiddleware", - tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], - relation: "before", - toMiddleware: "awsAuthMiddleware", - override: true, -}; -const getOmitRetryHeadersPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); - }, -}); - -const retryMiddleware = (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"]); - let lastError = new Error(); - let attempts = 0; - let totalRetryDelay = 0; - const { request } = args; - const isRequest = protocolHttp.HttpRequest.isInstance(request); - if (isRequest) { - request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4(); + destroy() { + this.connectionManager.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } } - while (true) { - try { - if (isRequest) { - request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; + 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 = new Error("Request aborted"); + abortError.name = "AbortError"; + 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 session = this.connectionManager.lease(requestContext, { + requestTimeout: this.config?.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false, + }); + const rejectWithDestroy = (err) => { + if (disableConcurrentStreams) { + this.destroySession(session); } - const { response, output } = await next(args); - retryStrategy.recordSuccess(retryToken); - output.$metadata.attempts = attempts + 1; - output.$metadata.totalRetryDelay = totalRetryDelay; - return { response, output }; + fulfilled = true; + reject(err); + }; + const queryString = querystringBuilder.buildQueryString(query || {}); + let path = request.path; + if (queryString) { + path += `?${queryString}`; } - catch (e) { - const retryErrorInfo = getRetryErrorInfo(e); - lastError = asSdkError(e); - if (isRequest && isStreamingPayload.isStreamingPayload(request)) { - (context.logger instanceof smithyClient.NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request."); - throw lastError; + if (request.fragment) { + path += `#${request.fragment}`; + } + const req = session.request({ + ...request.headers, + [http2.constants.HTTP2_HEADER_PATH]: path, + [http2.constants.HTTP2_HEADER_METHOD]: method, + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req, + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); } - try { - retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + }); + if (effectiveRequestTimeout) { + req.setTimeout(effectiveRequestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = () => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); } - catch (refreshError) { - if (!lastError.$metadata) { - lastError.$metadata = {}; - } - lastError.$metadata.attempts = attempts + 1; - lastError.$metadata.totalRetryDelay = totalRetryDelay; - throw lastError; + else { + abortSignal.onabort = onAbort; + } + } + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); } - attempts = retryToken.getRetryCount(); - const delay = retryToken.getRetryDelay(); - totalRetryDelay += delay; - await new Promise((resolve) => setTimeout(resolve, delay)); - } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + destroySession(session) { + if (!session.destroyed) { + session.destroy(); } } - else { - retryStrategy = retryStrategy; - if (retryStrategy?.mode) - context.userAgent = [...(context.userAgent || []), ["cfg/retry-mode", retryStrategy.mode]]; - return retryStrategy.retry(next, args); +} + +class Collector extends stream.Writable { + bufferedBytes = []; + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); } -}; -const isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && - typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && - typeof retryStrategy.recordSuccess !== "undefined"; -const getRetryErrorInfo = (error) => { - const errorInfo = { - error, - errorType: getRetryErrorType(error), - }; - const retryAfterHint = getRetryAfterHint(error.$response); - if (retryAfterHint) { - errorInfo.retryAfterHint = retryAfterHint; +} + +const streamCollector = (stream) => { + if (isReadableStreamInstance(stream)) { + return collectReadableStream(stream); } - return errorInfo; -}; -const getRetryErrorType = (error) => { - if (serviceErrorClassification.isThrottlingError(error)) - return "THROTTLING"; - if (serviceErrorClassification.isTransientError(error)) - return "TRANSIENT"; - if (serviceErrorClassification.isServerError(error)) - return "SERVER_ERROR"; - return "CLIENT_ERROR"; -}; -const retryMiddlewareOptions = { - name: "retryMiddleware", - tags: ["RETRY"], - step: "finalizeRequest", - priority: "high", - override: true, -}; -const getRetryPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.add(retryMiddleware(options), retryMiddlewareOptions); - }, -}); -const getRetryAfterHint = (response) => { - if (!protocolHttp.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 new Date(retryAfterSeconds * 1000); - const retryAfterDate = new Date(retryAfter); - return retryAfterDate; + return new Promise((resolve, reject) => { + const collector = new Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function () { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); + }); }; +const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; +async function collectReadableStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; +} -exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy; -exports.CONFIG_MAX_ATTEMPTS = CONFIG_MAX_ATTEMPTS; -exports.CONFIG_RETRY_MODE = CONFIG_RETRY_MODE; -exports.ENV_MAX_ATTEMPTS = ENV_MAX_ATTEMPTS; -exports.ENV_RETRY_MODE = ENV_RETRY_MODE; -exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = NODE_MAX_ATTEMPT_CONFIG_OPTIONS; -exports.NODE_RETRY_MODE_CONFIG_OPTIONS = NODE_RETRY_MODE_CONFIG_OPTIONS; -exports.StandardRetryStrategy = StandardRetryStrategy; -exports.defaultDelayDecider = defaultDelayDecider; -exports.defaultRetryDecider = defaultRetryDecider; -exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin; -exports.getRetryAfterHint = getRetryAfterHint; -exports.getRetryPlugin = getRetryPlugin; -exports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware; -exports.omitRetryHeadersMiddlewareOptions = omitRetryHeadersMiddlewareOptions; -exports.resolveRetryConfig = resolveRetryConfig; -exports.retryMiddleware = retryMiddleware; -exports.retryMiddlewareOptions = retryMiddlewareOptions; +exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; +exports.NodeHttp2Handler = NodeHttp2Handler; +exports.NodeHttpHandler = NodeHttpHandler; +exports.streamCollector = streamCollector; /***/ }), -/***/ 49831: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 1238: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isStreamingPayload = void 0; -const stream_1 = __nccwpck_require__(2203); -const isStreamingPayload = (request) => request?.body instanceof stream_1.Readable || - (typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream); -exports.isStreamingPayload = isStreamingPayload; + +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); + } +} + +const 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; +}; + +const fromStatic = (staticValue) => () => Promise.resolve(staticValue); + +const 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; + }; +}; + +exports.CredentialsProviderError = CredentialsProviderError; +exports.ProviderError = ProviderError; +exports.TokenProviderError = TokenProviderError; +exports.chain = chain; +exports.fromStatic = fromStatic; +exports.memoize = memoize; /***/ }), -/***/ 64864: +/***/ 2356: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var types = __nccwpck_require__(36158); +var types = __nccwpck_require__(690); const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { return { @@ -55252,1255 +24086,1026 @@ exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; /***/ }), -/***/ 36158: -/***/ ((__unused_webpack_module, exports) => { +/***/ 8256: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); +var utilUriEscape = __nccwpck_require__(146); -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); +function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = utilUriEscape.escapeUri(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length; i < iLen; i++) { + parts.push(`${key}=${utilUriEscape.escapeUri(value[i])}`); + } + } + else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${utilUriEscape.escapeUri(value)}`; + } + parts.push(qsEntry); + } + } + return parts.join("&"); +} -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); +exports.buildQueryString = buildQueryString; -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); + +/***/ }), + +/***/ 8822: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +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]; + } + } } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); + return query; +} + +exports.parseQueryString = parseQueryString; + + +/***/ }), + +/***/ 2058: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +const CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch", +]; +const THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException", +]; +const TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; +const TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; +const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; +const NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"]; + +const isRetryableByTrait = (error) => error?.$retryable !== undefined; +const isClockSkewError = (error) => CLOCK_SKEW_ERROR_CODES.includes(error.name); +const isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected; +const 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 { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; + return errorMessages.has(error.message); }; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; +const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 || + THROTTLING_ERROR_CODES.includes(error.name) || + error.$retryable?.throttling == true; +const isTransientError = (error, depth = 0) => isRetryableByTrait(error) || + isClockSkewCorrectedError(error) || + 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) || + (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1)); +const 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; }; -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); +exports.isBrowserNetworkError = isBrowserNetworkError; +exports.isClockSkewCorrectedError = isClockSkewCorrectedError; +exports.isClockSkewError = isClockSkewError; +exports.isRetryableByTrait = isRetryableByTrait; +exports.isServerError = isServerError; +exports.isThrottlingError = isThrottlingError; +exports.isTransientError = isTransientError; + + +/***/ }), + +/***/ 4172: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHomeDir = void 0; +const os_1 = __nccwpck_require__(857); +const path_1 = __nccwpck_require__(6928); +const homeDirCache = {}; +const getHomeDirCacheKey = () => { + if (process && process.geteuid) { + return `${process.geteuid()}`; + } + return "DEFAULT"; }; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); +const getHomeDir = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + const homeDirCacheKey = getHomeDirCacheKey(); + if (!homeDirCache[homeDirCacheKey]) + homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); + return homeDirCache[homeDirCacheKey]; }; +exports.getHomeDir = getHomeDir; -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); +/***/ }), -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); +/***/ 269: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSSOTokenFilepath = void 0; +const crypto_1 = __nccwpck_require__(6982); +const path_1 = __nccwpck_require__(6928); +const getHomeDir_1 = __nccwpck_require__(4172); +const getSSOTokenFilepath = (id) => { + const hasher = (0, crypto_1.createHash)("sha1"); + const cacheName = hasher.update(id).digest("hex"); + return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); +}; +exports.getSSOTokenFilepath = getSSOTokenFilepath; /***/ }), -/***/ 73976: +/***/ 1326: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; +const fs_1 = __nccwpck_require__(9896); +const getSSOTokenFilepath_1 = __nccwpck_require__(269); +const { readFile } = fs_1.promises; +exports.tokenIntercept = {}; +const getSSOTokenFromFile = async (id) => { + if (exports.tokenIntercept[id]) { + return exports.tokenIntercept[id]; + } + const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); + const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); +}; +exports.getSSOTokenFromFile = getSSOTokenFromFile; -var types = __nccwpck_require__(36158); -const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); +/***/ }), -const normalizeProvider = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; -}; +/***/ 4964: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -exports.getSmithyContext = getSmithyContext; -exports.normalizeProvider = normalizeProvider; +"use strict"; -/***/ }), +var getHomeDir = __nccwpck_require__(4172); +var getSSOTokenFilepath = __nccwpck_require__(269); +var getSSOTokenFromFile = __nccwpck_require__(1326); +var path = __nccwpck_require__(6928); +var types = __nccwpck_require__(690); +var slurpFile = __nccwpck_require__(4246); -/***/ 9208: -/***/ ((module) => { +const ENV_PROFILE = "AWS_PROFILE"; +const DEFAULT_PROFILE = "default"; +const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +const CONFIG_PREFIX_SEPARATOR = "."; -// src/index.ts -var src_exports = {}; -__export(src_exports, { - constructStack: () => constructStack +const getConfigData = (data) => Object.entries(data) + .filter(([key]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { + return false; + } + return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); +}) + .reduce((acc, [key, value]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; +}, { + ...(data.default && { default: data.default }), }); -module.exports = __toCommonJS(src_exports); -// src/MiddlewareStack.ts -var getAllAliases = /* @__PURE__ */ __name((name, aliases) => { - const _aliases = []; - if (name) { - _aliases.push(name); - } - if (aliases) { - for (const alias of aliases) { - _aliases.push(alias); - } - } - return _aliases; -}, "getAllAliases"); -var getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { - return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; -}, "getMiddlewareNameWithAliases"); -var constructStack = /* @__PURE__ */ __name(() => { - let absoluteEntries = []; - let relativeEntries = []; - let identifyOnResolve = false; - const entriesNameSet = /* @__PURE__ */ new Set(); - const sort = /* @__PURE__ */ __name((entries) => entries.sort( - (a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"] - ), "sort"); - const removeByName = /* @__PURE__ */ __name((toRemove) => { - let isRemoved = false; - const filterCb = /* @__PURE__ */ __name((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; - }, "filterCb"); - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }, "removeByName"); - const removeByReference = /* @__PURE__ */ __name((toRemove) => { - let isRemoved = false; - const filterCb = /* @__PURE__ */ __name((entry) => { - if (entry.middleware === toRemove) { - isRemoved = true; - for (const alias of getAllAliases(entry.name, entry.aliases)) { - entriesNameSet.delete(alias); - } - return false; - } - return true; - }, "filterCb"); - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }, "removeByReference"); - const cloneTo = /* @__PURE__ */ __name((toStack) => { - var _a; - absoluteEntries.forEach((entry) => { - toStack.add(entry.middleware, { ...entry }); - }); - relativeEntries.forEach((entry) => { - toStack.addRelativeTo(entry.middleware, { ...entry }); - }); - (_a = toStack.identifyOnResolve) == null ? void 0 : _a.call(toStack, stack.identifyOnResolve()); - return toStack; - }, "cloneTo"); - const expandRelativeMiddlewareList = /* @__PURE__ */ __name((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; - }, "expandRelativeMiddlewareList"); - const getMiddlewareList = /* @__PURE__ */ __name((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 === void 0) { - 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; - }, "getMiddlewareList"); - 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( - (entry2) => { - var _a; - return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.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.` - ); +const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; +const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); + +const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; +const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); + +const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; +const profileNameBlockList = ["__proto__", "profile __proto__"]; +const 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(types.IniSectionType).includes(prefix)) { + currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); + } } - 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( - (entry2) => { - var _a; - return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias)); - } - ); - if (toOverrideIndex === -1) { - continue; + else { + currentSection = sectionName; } - 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.` - ); + if (profileNameBlockList.includes(sectionName)) { + throw new Error(`Found invalid profile name "${sectionName}"`); } - 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 = /* @__PURE__ */ __name((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; + 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 true; - }, "filterCb"); - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }, - concat: (from) => { - var _a; - const cloned = cloneTo(constructStack()); - cloned.use(from); - cloned.identifyOnResolve( - identifyOnResolve || cloned.identifyOnResolve() || (((_a = from.identifyOnResolve) == null ? void 0 : _a.call(from)) ?? 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; -}, "constructStack"); -var stepWeights = { - initialize: 5, - serialize: 4, - build: 3, - finalizeRequest: 2, - deserialize: 1 -}; -var priorityWeights = { - high: 3, - normal: 2, - low: 1 + return map; }; -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - +const swallowError$1 = () => ({}); +const loadSharedConfigFiles = async (init = {}) => { + const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; + const homeDir = getHomeDir.getHomeDir(); + const relativeHomeDirPrefix = "~/"; + let resolvedFilepath = filepath; + if (filepath.startsWith(relativeHomeDirPrefix)) { + resolvedFilepath = path.join(homeDir, filepath.slice(2)); + } + let resolvedConfigFilepath = configFilepath; + if (configFilepath.startsWith(relativeHomeDirPrefix)) { + resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); + } + const parsedFiles = await Promise.all([ + slurpFile.slurpFile(resolvedConfigFilepath, { + ignoreCache: init.ignoreCache, + }) + .then(parseIni) + .then(getConfigData) + .catch(swallowError$1), + slurpFile.slurpFile(resolvedFilepath, { + ignoreCache: init.ignoreCache, + }) + .then(parseIni) + .catch(swallowError$1), + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1], + }; +}; -/***/ }), +const getSsoSessionData = (data) => Object.entries(data) + .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) + .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); -/***/ 61279: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const swallowError = () => ({}); +const loadSsoSessionData = async (init = {}) => slurpFile.slurpFile(init.configFilepath ?? getConfigFilepath()) + .then(parseIni) + .then(getSsoSessionData) + .catch(swallowError); -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); +const 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 __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; + +const parseKnownFiles = async (init) => { + const parsedFiles = await loadSharedConfigFiles(init); + return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); +}; + +const externalDataInterceptor = { + getFileRecord() { + return slurpFile.fileIntercept; + }, + interceptFile(path, contents) { + slurpFile.fileIntercept[path] = Promise.resolve(contents); + }, + getTokenRecord() { + return getSSOTokenFromFile.tokenIntercept; + }, + interceptToken(id, contents) { + getSSOTokenFromFile.tokenIntercept[id] = contents; + }, }; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var src_exports = {}; -__export(src_exports, { - DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT, - NodeHttp2Handler: () => NodeHttp2Handler, - NodeHttpHandler: () => NodeHttpHandler, - streamCollector: () => streamCollector +Object.defineProperty(exports, "getSSOTokenFromFile", ({ + enumerable: true, + get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } +})); +exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; +exports.DEFAULT_PROFILE = DEFAULT_PROFILE; +exports.ENV_PROFILE = ENV_PROFILE; +exports.externalDataInterceptor = externalDataInterceptor; +exports.getProfileName = getProfileName; +exports.loadSharedConfigFiles = loadSharedConfigFiles; +exports.loadSsoSessionData = loadSsoSessionData; +exports.parseKnownFiles = parseKnownFiles; +Object.keys(getHomeDir).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return getHomeDir[k]; } + }); +}); +Object.keys(getSSOTokenFilepath).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return getSSOTokenFilepath[k]; } + }); }); -module.exports = __toCommonJS(src_exports); -// src/node-http-handler.ts -var import_protocol_http = __nccwpck_require__(72356); -var import_querystring_builder = __nccwpck_require__(18256); -var import_http = __nccwpck_require__(58611); -var import_https = __nccwpck_require__(65692); -// src/constants.ts -var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; +/***/ }), -// src/get-transformed-headers.ts -var getTransformedHeaders = /* @__PURE__ */ __name((headers) => { - const transformedHeaders = {}; - for (const name of Object.keys(headers)) { - const headerValues = headers[name]; - transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; - } - return transformedHeaders; -}, "getTransformedHeaders"); +/***/ 4246: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// src/timing.ts -var timing = { - setTimeout: (cb, ms) => setTimeout(cb, ms), - clearTimeout: (timeoutId) => clearTimeout(timeoutId) -}; +"use strict"; -// src/set-connection-timeout.ts -var DEFER_EVENT_LISTENER_TIME = 1e3; -var setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => { - if (!timeoutInMs) { - return -1; - } - const registerTimeout = /* @__PURE__ */ __name((offset) => { - const timeoutId = timing.setTimeout(() => { - request.destroy(); - reject( - Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { - name: "TimeoutError" - }) - ); - }, timeoutInMs - offset); - const doWithSocket = /* @__PURE__ */ __name((socket) => { - if (socket == null ? void 0 : socket.connecting) { - socket.on("connect", () => { - timing.clearTimeout(timeoutId); - }); - } else { - timing.clearTimeout(timeoutId); - } - }, "doWithSocket"); - if (request.socket) { - doWithSocket(request.socket); - } else { - request.on("socket", doWithSocket); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = void 0; +const fs_1 = __nccwpck_require__(9896); +const { readFile } = fs_1.promises; +exports.filePromisesHash = {}; +exports.fileIntercept = {}; +const slurpFile = (path, options) => { + if (exports.fileIntercept[path] !== undefined) { + return exports.fileIntercept[path]; } - }, "registerTimeout"); - if (timeoutInMs < 2e3) { - registerTimeout(0); - return 0; - } - return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); -}, "setConnectionTimeout"); - -// src/set-socket-keep-alive.ts -var DEFER_EVENT_LISTENER_TIME2 = 3e3; -var setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => { - if (keepAlive !== true) { - return -1; - } - const registerListener = /* @__PURE__ */ __name(() => { - if (request.socket) { - request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); - } else { - request.on("socket", (socket) => { - socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); - }); + if (!exports.filePromisesHash[path] || options?.ignoreCache) { + exports.filePromisesHash[path] = readFile(path, "utf8"); } - }, "registerListener"); - if (deferTimeMs === 0) { - registerListener(); - return 0; - } - return timing.setTimeout(registerListener, deferTimeMs); -}, "setSocketKeepAlive"); + return exports.filePromisesHash[path]; +}; +exports.slurpFile = slurpFile; -// src/set-socket-timeout.ts -var DEFER_EVENT_LISTENER_TIME3 = 3e3; -var setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => { - const registerTimeout = /* @__PURE__ */ __name((offset) => { - request.setTimeout(timeoutInMs - offset, () => { - request.destroy(); - reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); - }); - }, "registerTimeout"); - if (0 < timeoutInMs && timeoutInMs < 6e3) { - registerTimeout(0); - return 0; - } - return timing.setTimeout( - registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3), - DEFER_EVENT_LISTENER_TIME3 - ); -}, "setSocketTimeout"); -// src/write-request-body.ts -var import_stream = __nccwpck_require__(2203); -var MIN_WAIT_TIME = 1e3; -async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) { - const headers = request.headers ?? {}; - const expect = headers["Expect"] || headers["expect"]; - let timeoutId = -1; - let sendBody = true; - if (expect === "100-continue") { - sendBody = await Promise.race([ - new Promise((resolve) => { - timeoutId = Number(timing.setTimeout(resolve, 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); - } -} -__name(writeRequestBody, "writeRequestBody"); -function writeBody(httpRequest, body) { - if (body instanceof import_stream.Readable) { - body.pipe(httpRequest); - return; - } - if (body) { - if (Buffer.isBuffer(body) || typeof body === "string") { - 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(); -} -__name(writeBody, "writeBody"); +/***/ }), -// src/node-http-handler.ts -var DEFAULT_REQUEST_TIMEOUT = 0; -var _NodeHttpHandler = class _NodeHttpHandler { - constructor(options) { - this.socketWarningTimestamp = 0; - // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286 - this.metadata = { handlerProtocol: "http/1.1" }; - this.configProvider = new Promise((resolve, reject) => { - if (typeof options === "function") { - options().then((_options) => { - resolve(this.resolveDefaultConfig(_options)); - }).catch(reject); - } else { - resolve(this.resolveDefaultConfig(options)); - } - }); - } - /** - * @returns the input if it is an HttpHandler of any class, - * or instantiates a new instance of this handler. - */ - static create(instanceOrOptions) { - if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { - return instanceOrOptions; - } - return new _NodeHttpHandler(instanceOrOptions); - } - /** - * @internal - * - * @param agent - http(s) agent in use by the NodeHttpHandler instance. - * @param socketWarningTimestamp - last socket usage check timestamp. - * @param logger - channel for the warning. - * @returns timestamp of last emitted warning. - */ - static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { - var _a, _b, _c; - const { sockets, requests, maxSockets } = agent; - if (typeof maxSockets !== "number" || maxSockets === Infinity) { - return socketWarningTimestamp; +/***/ 5118: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var utilHexEncoding = __nccwpck_require__(6435); +var utilUtf8 = __nccwpck_require__(1577); +var isArrayBuffer = __nccwpck_require__(6130); +var protocolHttp = __nccwpck_require__(2356); +var utilMiddleware = __nccwpck_require__(6324); +var utilUriEscape = __nccwpck_require__(146); + +const ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; +const CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; +const AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; +const SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; +const EXPIRES_QUERY_PARAM = "X-Amz-Expires"; +const SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; +const TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; +const REGION_SET_PARAM = "X-Amz-Region-Set"; +const AUTH_HEADER = "authorization"; +const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); +const DATE_HEADER = "date"; +const GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; +const SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); +const SHA256_HEADER = "x-amz-content-sha256"; +const TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); +const HOST_HEADER = "host"; +const 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, +}; +const PROXY_HEADER_PATTERN = /^proxy-/; +const SEC_HEADER_PATTERN = /^sec-/; +const UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i]; +const ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; +const ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256"; +const EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; +const UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; +const MAX_CACHE_SIZE = 50; +const KEY_TYPE_IDENTIFIER = "aws4_request"; +const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + +const signingKeyCache = {}; +const cacheQueue = []; +const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`; +const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${utilHexEncoding.toHex(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; } - const interval = 15e3; - if (Date.now() - interval < socketWarningTimestamp) { - return socketWarningTimestamp; + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; } - if (sockets && requests) { - for (const origin in sockets) { - const socketsInUse = ((_a = sockets[origin]) == null ? void 0 : _a.length) ?? 0; - const requestsEnqueued = ((_b = requests[origin]) == null ? void 0 : _b.length) ?? 0; - if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { - (_c = logger == null ? void 0 : logger.warn) == null ? void 0 : _c.call( - logger, - `@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(); - } - } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); } - return socketWarningTimestamp; - } - resolveDefaultConfig(options) { - const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {}; - const keepAlive = true; - const maxSockets = 50; - return { - connectionTimeout, - requestTimeout: requestTimeout ?? socketTimeout, - httpAgent: (() => { - if (httpAgent instanceof import_http.Agent || typeof (httpAgent == null ? void 0 : httpAgent.destroy) === "function") { - return httpAgent; + return (signingKeyCache[cacheKey] = key); +}; +const clearCredentialCache = () => { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); +}; +const hmac = (ctor, secret, data) => { + const hash = new ctor(secret); + hash.update(utilUtf8.toUint8Array(data)); + return hash.digest(); +}; + +const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == undefined) { + continue; } - return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent }); - })(), - httpsAgent: (() => { - if (httpsAgent instanceof import_https.Agent || typeof (httpsAgent == null ? void 0 : httpsAgent.destroy) === "function") { - return httpsAgent; + 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; + } } - return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); - })(), - logger: console - }; - } - destroy() { - var _a, _b, _c, _d; - (_b = (_a = this.config) == null ? void 0 : _a.httpAgent) == null ? void 0 : _b.destroy(); - (_d = (_c = this.config) == null ? void 0 : _c.httpsAgent) == null ? void 0 : _d.destroy(); - } - async handle(request, { abortSignal } = {}) { - if (!this.config) { - this.config = await this.configProvider; + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); } - return new Promise((_resolve, _reject) => { - let writeRequestBodyPromise = void 0; - const timeouts = []; - const resolve = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _resolve(arg); - }, "resolve"); - const reject = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _reject(arg); - }, "reject"); - if (!this.config) { - throw new Error("Node HTTP request handler config is not resolved"); - } - if (abortSignal == null ? void 0 : abortSignal.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; - } - const isSSL = request.protocol === "https:"; - const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; - timeouts.push( - timing.setTimeout( - () => { - this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage( - agent, - this.socketWarningTimestamp, - this.config.logger - ); - }, - this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3) - ) - ); - const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {}); - let auth = void 0; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}`; - } - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let hostname = request.hostname ?? ""; - if (hostname[0] === "[" && hostname.endsWith("]")) { - hostname = request.hostname.slice(1, -1); - } else { - hostname = request.hostname; - } - const nodeHttpsOptions = { - headers: request.headers, - host: hostname, - method: request.method, - path, - port: request.port, - agent, - auth - }; - const requestFunc = isSSL ? import_https.request : import_http.request; - const req = requestFunc(nodeHttpsOptions, (res) => { - const httpResponse = new import_protocol_http.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 = /* @__PURE__ */ __name(() => { - req.destroy(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - }, "onAbort"); - 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; + return canonical; +}; + +const getPayloadHash = async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; } - } - timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); - timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout)); - const httpAgent = nodeHttpsOptions.agent; - if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { - timeouts.push( - setSocketKeepAlive(req, { - // @ts-expect-error keepAlive is not public on httpAgent. - keepAlive: httpAgent.keepAlive, - // @ts-expect-error keepAliveMsecs is not public on httpAgent. - keepAliveMsecs: httpAgent.keepAliveMsecs - }) - ); - } - writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => { - timeouts.forEach(timing.clearTimeout); - return _reject(e); - }); - }); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } + } + if (body == undefined) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } + else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer.isArrayBuffer(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update(utilUtf8.toUint8Array(body)); + return utilHexEncoding.toHex(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; }; -__name(_NodeHttpHandler, "NodeHttpHandler"); -var NodeHttpHandler = _NodeHttpHandler; - -// src/node-http2-handler.ts +class HeaderFormatter { + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = utilUtf8.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 = utilUtf8.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(utilHexEncoding.fromHex(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } +} +const 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 > 9_223_372_036_854_775_807 || number < -9223372036854776e3) { + 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] & 0b10000000; + if (negative) { + negate(bytes); + } + return parseInt(utilHexEncoding.toHex(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } +} +function negate(bytes) { + for (let i = 0; i < 8; i++) { + bytes[i] ^= 0xff; + } + for (let i = 7; i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) + break; + } +} -var import_http22 = __nccwpck_require__(85675); - -// src/node-http2-connection-manager.ts -var import_http2 = __toESM(__nccwpck_require__(85675)); +const hasHeader = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; +}; -// src/node-http2-connection-pool.ts -var _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool { - constructor(sessions) { - this.sessions = []; - this.sessions = sessions ?? []; - } - poll() { - if (this.sessions.length > 0) { - return this.sessions.shift(); +const moveHeadersToQuery = (request, options = {}) => { + const { headers, query = {} } = protocolHttp.HttpRequest.clone(request); + for (const name of Object.keys(headers)) { + 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]; + } } - } - offerLast(session) { - this.sessions.push(session); - } - contains(session) { - return this.sessions.includes(session); - } - remove(session) { - this.sessions = this.sessions.filter((s) => s !== session); - } - [Symbol.iterator]() { - return this.sessions[Symbol.iterator](); - } - destroy(connection) { - for (const session of this.sessions) { - if (session === connection) { - if (!session.destroyed) { - session.destroy(); + return { + ...request, + headers, + query, + }; +}; + +const prepareRequest = (request) => { + request = protocolHttp.HttpRequest.clone(request); + for (const headerName of Object.keys(request.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request.headers[headerName]; } - } } - } + return request; }; -__name(_NodeHttp2ConnectionPool, "NodeHttp2ConnectionPool"); -var NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool; -// src/node-http2-connection-manager.ts -var _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager { - constructor(config) { - this.sessionCache = /* @__PURE__ */ new Map(); - this.config = config; - if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { - throw new RangeError("maxConcurrency must be greater than zero."); +const getCanonicalQuery = ({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query)) { + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; + } + const encodedKey = utilUriEscape.escapeUri(key); + keys.push(encodedKey); + const value = query[key]; + if (typeof value === "string") { + serialized[encodedKey] = `${encodedKey}=${utilUriEscape.escapeUri(value)}`; + } + else if (Array.isArray(value)) { + serialized[encodedKey] = value + .slice(0) + .reduce((encoded, value) => encoded.concat([`${encodedKey}=${utilUriEscape.escapeUri(value)}`]), []) + .sort() + .join("&"); + } } - } - lease(requestContext, connectionConfiguration) { - const url = this.getUrlString(requestContext); - const existingPool = this.sessionCache.get(url); - if (existingPool) { - const existingSession = existingPool.poll(); - if (existingSession && !this.config.disableConcurrency) { - return existingSession; - } + return keys + .sort() + .map((key) => serialized[key]) + .filter((serialized) => serialized) + .join("&"); +}; + +const iso8601 = (time) => toDate(time) + .toISOString() + .replace(/\.\d{3}Z$/, "Z"); +const toDate = (time) => { + if (typeof time === "number") { + return new Date(time * 1000); } - const session = import_http2.default.connect(url); - 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() - ); + if (typeof time === "string") { + if (Number(time)) { + return new Date(Number(time) * 1000); } - }); + return new Date(time); } - session.unref(); - const destroySessionCb = /* @__PURE__ */ __name(() => { - session.destroy(); - this.deleteSession(url, session); - }, "destroySessionCb"); - session.on("goaway", destroySessionCb); - session.on("error", destroySessionCb); - session.on("frameError", destroySessionCb); - session.on("close", () => this.deleteSession(url, session)); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + 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 = utilMiddleware.normalizeProvider(region); + this.credentialProvider = utilMiddleware.normalizeProvider(credentials); } - const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); - connectionPool.offerLast(session); - this.sessionCache.set(url, connectionPool); - return session; - } - /** - * Delete a session from the connection pool. - * @param authority The authority of the session to delete. - * @param session The session to delete. - */ - deleteSession(authority, session) { - const existingConnectionPool = this.sessionCache.get(authority); - if (!existingConnectionPool) { - return; + 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("\n")} + +${sortedHeaders.join(";")} +${payloadHash}`; } - if (!existingConnectionPool.contains(session)) { - return; + async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) { + const hash = new this.sha256(); + hash.update(utilUtf8.toUint8Array(canonicalRequest)); + const hashedRequest = await hash.digest(); + return `${algorithmIdentifier} +${longDate} +${credentialScope} +${utilHexEncoding.toHex(hashedRequest)}`; } - existingConnectionPool.remove(session); - this.sessionCache.set(authority, existingConnectionPool); - } - release(requestContext, session) { - var _a; - const cacheKey = this.getUrlString(requestContext); - (_a = this.sessionCache.get(cacheKey)) == null ? void 0 : _a.offerLast(session); - } - destroy() { - for (const [key, connectionPool] of this.sessionCache) { - for (const session of connectionPool) { - if (!session.destroyed) { - session.destroy(); + 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 = utilUriEscape.escapeUri(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); } - connectionPool.remove(session); - } - this.sessionCache.delete(key); + return path; } - } - setMaxConcurrentStreams(maxConcurrentStreams) { - if (maxConcurrentStreams && maxConcurrentStreams <= 0) { - throw new RangeError("maxConcurrentStreams must be greater than zero."); + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || + typeof credentials.accessKeyId !== "string" || + typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); + } } - this.config.maxConcurrency = maxConcurrentStreams; - } - setDisableConcurrentStreams(disableConcurrentStreams) { - this.config.disableConcurrency = disableConcurrentStreams; - } - getUrlString(request) { - return request.destination.toString(); - } -}; -__name(_NodeHttp2ConnectionManager, "NodeHttp2ConnectionManager"); -var NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager; + formatDate(now) { + const longDate = iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8), + }; + } + getCanonicalHeaderList(headers) { + return Object.keys(headers).sort().join(";"); + } +} -// src/node-http2-handler.ts -var _NodeHttp2Handler = class _NodeHttp2Handler { - constructor(options) { - this.metadata = { handlerProtocol: "h2" }; - this.connectionManager = new NodeHttp2ConnectionManager({}); - this.configProvider = new Promise((resolve, reject) => { - if (typeof options === "function") { - options().then((opts) => { - resolve(opts || {}); - }).catch(reject); - } else { - resolve(options || {}); - } - }); - } - /** - * @returns the input if it is an HttpHandler of any class, - * or instantiates a new instance of this handler. - */ - static create(instanceOrOptions) { - if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { - return instanceOrOptions; +class SignatureV4 extends SignatureV4Base { + headerFormatter = new HeaderFormatter(); + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) { + super({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath, + }); } - return new _NodeHttp2Handler(instanceOrOptions); - } - destroy() { - this.connectionManager.destroy(); - } - async handle(request, { abortSignal } = {}) { - if (!this.config) { - this.config = await this.configProvider; - this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); - if (this.config.maxConcurrentStreams) { - this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); - } + 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; } - const { requestTimeout, disableConcurrentStreams } = this.config; - return new Promise((_resolve, _reject) => { - var _a; - let fulfilled = false; - let writeRequestBodyPromise = void 0; - const resolve = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - _resolve(arg); - }, "resolve"); - const reject = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - _reject(arg); - }, "reject"); - if (abortSignal == null ? void 0 : abortSignal.aborted) { - fulfilled = true; - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - 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 session = this.connectionManager.lease(requestContext, { - requestTimeout: (_a = this.config) == null ? void 0 : _a.sessionTimeout, - disableConcurrentStreams: disableConcurrentStreams || false - }); - const rejectWithDestroy = /* @__PURE__ */ __name((err) => { - if (disableConcurrentStreams) { - this.destroySession(session); + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); } - fulfilled = true; - reject(err); - }, "rejectWithDestroy"); - const queryString = (0, import_querystring_builder.buildQueryString)(query || {}); - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - const req = session.request({ - ...request.headers, - [import_http22.constants.HTTP2_HEADER_PATH]: path, - [import_http22.constants.HTTP2_HEADER_METHOD]: method - }); - session.ref(); - req.on("response", (headers) => { - const httpResponse = new import_protocol_http.HttpResponse({ - statusCode: headers[":status"] || -1, - headers: getTransformedHeaders(headers), - body: req - }); - fulfilled = true; - resolve({ response: httpResponse }); - if (disableConcurrentStreams) { - session.close(); - this.connectionManager.deleteSession(authority, session); + else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); } - }); - if (requestTimeout) { - req.setTimeout(requestTimeout, () => { - req.close(); - const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`); - timeoutError.name = "TimeoutError"; - rejectWithDestroy(timeoutError); - }); - } - if (abortSignal) { - const onAbort = /* @__PURE__ */ __name(() => { - req.close(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - rejectWithDestroy(abortError); - }, "onAbort"); - 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; + else if (toSign.message) { + return this.signMessage(toSign, options); } - } - req.on("frameError", (type, code, id) => { - rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); - }); - req.on("error", rejectWithDestroy); - req.on("aborted", () => { - rejectWithDestroy( - new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`) - ); - }); - req.on("close", () => { - session.unref(); - if (disableConcurrentStreams) { - session.destroy(); + else { + return this.signRequest(toSign, options); } - if (!fulfilled) { - rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + async signEvent({ headers, payload }, { signingDate = new Date(), priorSignature, signingRegion, signingService }) { + 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 = utilHexEncoding.toHex(await hash.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload, + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signMessage(signableMessage, { signingDate = new Date(), signingRegion, signingService }) { + const promise = this.signEvent({ + headers: this.headerFormatter.format(signableMessage.message.headers), + payload: signableMessage.message.body, + }, { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature, + }); + return promise.then((signature) => { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) { + const credentials = 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(utilUtf8.toUint8Array(stringToSign)); + return utilHexEncoding.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; } - }); - writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout); - }); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } - /** - * Destroys a session. - * @param session The session to destroy. - */ - destroySession(session) { - if (!session.destroyed) { - session.destroy(); + 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; } - } -}; -__name(_NodeHttp2Handler, "NodeHttp2Handler"); -var NodeHttp2Handler = _NodeHttp2Handler; - -// src/stream-collector/collector.ts - -var _Collector = class _Collector extends import_stream.Writable { - constructor() { - super(...arguments); - this.bufferedBytes = []; - } - _write(chunk, encoding, callback) { - this.bufferedBytes.push(chunk); - callback(); - } -}; -__name(_Collector, "Collector"); -var Collector = _Collector; - -// src/stream-collector/index.ts -var streamCollector = /* @__PURE__ */ __name((stream) => { - if (isReadableStreamInstance(stream)) { - return collectReadableStream(stream); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function() { - const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); - resolve(bytes); - }); - }); -}, "streamCollector"); -var isReadableStreamInstance = /* @__PURE__ */ __name((stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream, "isReadableStreamInstance"); -async function collectReadableStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; + 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(utilUtf8.toUint8Array(stringToSign)); + return utilHexEncoding.toHex(await hash.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; } -__name(collectReadableStream, "collectReadableStream"); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); +const 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; /***/ }), -/***/ 72356: +/***/ 1411: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; @@ -56525,1395 +25130,1852 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { - Field: () => Field, - Fields: () => Fields, - HttpRequest: () => HttpRequest, - HttpResponse: () => HttpResponse, - IHttpRequest: () => import_types.HttpRequest, - getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration, - isValidHostname: () => isValidHostname, - resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig + Client: () => Client, + Command: () => Command, + LazyJsonString: () => LazyJsonString, + NoOpLogger: () => NoOpLogger, + SENSITIVE_STRING: () => SENSITIVE_STRING, + ServiceException: () => ServiceException, + StringWrapper: () => StringWrapper, + _json: () => _json, + collectBody: () => collectBody, + convertMap: () => convertMap, + createAggregatedClient: () => createAggregatedClient, + dateToUtcString: () => dateToUtcString, + decorateServiceException: () => decorateServiceException, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, + expectBoolean: () => expectBoolean, + expectByte: () => expectByte, + expectFloat32: () => expectFloat32, + expectInt: () => expectInt, + expectInt32: () => expectInt32, + expectLong: () => expectLong, + expectNonNull: () => expectNonNull, + expectNumber: () => expectNumber, + expectObject: () => expectObject, + expectShort: () => expectShort, + expectString: () => expectString, + expectUnion: () => expectUnion, + extendedEncodeURIComponent: () => extendedEncodeURIComponent, + getArrayIfSingleItem: () => getArrayIfSingleItem, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration, + getValueFromTextNode: () => getValueFromTextNode, + handleFloat: () => handleFloat, + isSerializableHeaderValue: () => isSerializableHeaderValue, + limitedParseDouble: () => limitedParseDouble, + limitedParseFloat: () => limitedParseFloat, + limitedParseFloat32: () => limitedParseFloat32, + loadConfigsForDefaultMode: () => loadConfigsForDefaultMode, + logger: () => logger, + map: () => map, + parseBoolean: () => parseBoolean, + parseEpochTimestamp: () => parseEpochTimestamp, + parseRfc3339DateTime: () => parseRfc3339DateTime, + parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset, + parseRfc7231DateTime: () => parseRfc7231DateTime, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig, + resolvedPath: () => resolvedPath, + serializeDateTime: () => serializeDateTime, + serializeFloat: () => serializeFloat, + splitEvery: () => splitEvery, + strictParseByte: () => strictParseByte, + strictParseDouble: () => strictParseDouble, + strictParseFloat: () => strictParseFloat, + strictParseFloat32: () => strictParseFloat32, + strictParseInt: () => strictParseInt, + strictParseInt32: () => strictParseInt32, + strictParseLong: () => strictParseLong, + strictParseShort: () => strictParseShort, + take: () => take, + throwDefaultError: () => throwDefaultError, + withBaseException: () => withBaseException }); module.exports = __toCommonJS(src_exports); -// src/extensions/httpExtensionConfiguration.ts -var getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - let httpHandler = runtimeConfig.httpHandler; - return { - setHttpHandler(handler) { - httpHandler = handler; - }, - httpHandler() { - return httpHandler; - }, - updateHttpClientConfig(key, value) { - httpHandler.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return httpHandler.httpHandlerConfigs(); +// src/client.ts +var import_middleware_stack = __nccwpck_require__(5697); +var _Client = class _Client { + constructor(config) { + this.config = config; + this.middlewareStack = (0, import_middleware_stack.constructStack)(); + } + send(command, optionsOrCb, cb) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; + const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true; + let handler; + if (useHandlerCache) { + if (!this.handlers) { + this.handlers = /* @__PURE__ */ 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( + // prevent any errors thrown in the callback from triggering an + // unhandled promise rejection + () => { + } + ); + } else { + return handler(command).then((result) => result.output); } - }; -}, "getHttpHandlerExtensionConfiguration"); -var resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler() - }; -}, "resolveHttpHandlerRuntimeConfig"); - -// src/Field.ts -var import_types = __nccwpck_require__(90690); -var _Field = class _Field { - constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) { - this.name = name; - this.kind = kind; - this.values = values; } - /** - * Appends a value to the field. - * - * @param value The value to append. - */ - add(value) { - this.values.push(value); + destroy() { + var _a, _b, _c; + (_c = (_b = (_a = this.config) == null ? void 0 : _a.requestHandler) == null ? void 0 : _b.destroy) == null ? void 0 : _c.call(_b); + delete this.handlers; } - /** - * Overwrite existing field values. - * - * @param values The new field values. - */ - set(values) { - this.values = values; +}; +__name(_Client, "Client"); +var Client = _Client; + +// src/collect-stream-body.ts +var import_util_stream = __nccwpck_require__(1975); +var collectBody = /* @__PURE__ */ __name(async (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody); } - /** - * Remove all matching entries from list. - * - * @param value Value to remove. - */ - remove(value) { - this.values = this.values.filter((v) => v !== value); + if (!streamBody) { + return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); + } + const fromContext = context.streamCollector(streamBody); + return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext); +}, "collectBody"); + +// src/command.ts + +var import_types = __nccwpck_require__(809); +var _Command = class _Command { + constructor() { + this.middlewareStack = (0, import_middleware_stack.constructStack)(); } /** - * Get comma-delimited string. - * - * @returns String representation of {@link Field}. + * Factory for Command ClassBuilder. + * @internal */ - toString() { - return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", "); + static classBuilder() { + return new ClassBuilder(); } /** - * Get string values as a list - * - * @returns Values in {@link Field} as a list. + * @internal */ - get() { - return this.values; + 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: logger2 } = configuration; + const handlerExecutionContext = { + logger: logger2, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [import_types.SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext + }, + ...additionalContext + }; + const { requestHandler } = configuration; + return stack.resolve( + (request) => requestHandler.handle(request.request, options || {}), + handlerExecutionContext + ); } }; -__name(_Field, "Field"); -var Field = _Field; - -// src/Fields.ts -var _Fields = class _Fields { - constructor({ fields = [], encoding = "utf-8" }) { - this.entries = {}; - fields.forEach(this.setField.bind(this)); - this.encoding = encoding; - } - /** - * Set entry for a {@link Field} name. The `name` - * attribute will be used to key the collection. - * - * @param field The {@link Field} to set. - */ - setField(field) { - this.entries[field.name.toLowerCase()] = field; +__name(_Command, "Command"); +var Command = _Command; +var _ClassBuilder = class _ClassBuilder { + constructor() { + this._init = () => { + }; + this._ep = {}; + this._middlewareFn = () => []; + this._commandName = ""; + this._clientName = ""; + this._additionalContext = {}; + this._smithyContext = {}; + this._inputFilterSensitiveLog = (_) => _; + this._outputFilterSensitiveLog = (_) => _; + this._serializer = null; + this._deserializer = null; } /** - * Retrieve {@link Field} entry by name. - * - * @param name The name of the {@link Field} entry - * to retrieve - * @returns The {@link Field} if it exists. + * Optional init callback. */ - getField(name) { - return this.entries[name.toLowerCase()]; + init(cb) { + this._init = cb; } /** - * Delete entry from collection. - * - * @param name Name of the entry to delete. + * Set the endpoint parameter instructions. */ - removeField(name) { - delete this.entries[name.toLowerCase()]; + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; } /** - * Helper function for retrieving specific types of fields. - * Used to grab all headers or all trailers. - * - * @param kind {@link FieldPosition} of entries to retrieve. - * @returns The {@link Field} entries with the specified - * {@link FieldPosition}. + * Add any number of middleware. */ - getByType(kind) { - return Object.values(this.entries).filter((field) => field.kind === kind); - } -}; -__name(_Fields, "Fields"); -var Fields = _Fields; - -// src/httpRequest.ts - -var _HttpRequest = class _HttpRequest { - 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; + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; } /** - * Note: this does not deep-clone the body. + * Set the initial handler execution context Smithy field. */ - static clone(request) { - const cloned = new _HttpRequest({ - ...request, - headers: { ...request.headers } - }); - if (cloned.query) { - cloned.query = cloneQuery(cloned.query); - } - return cloned; + s(service, operation, smithyContext = {}) { + this._smithyContext = { + service, + operation, + ...smithyContext + }; + return this; } /** - * This method only actually asserts that request is the interface {@link IHttpRequest}, - * and not necessarily this concrete class. Left in place for API stability. - * - * Do not call instance methods on the input of this function, and - * do not assume it has the HttpRequest prototype. + * Set the initial handler execution context. */ - 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"; + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; } /** - * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call - * this method because {@link HttpRequest.isInstance} incorrectly - * asserts that IHttpRequest (interface) objects are of type HttpRequest (class). + * Set constant string identifiers for the operation. */ - clone() { - return _HttpRequest.clone(this); + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; } -}; -__name(_HttpRequest, "HttpRequest"); -var HttpRequest = _HttpRequest; -function cloneQuery(query) { - return Object.keys(query).reduce((carry, paramName) => { - const param = query[paramName]; - return { - ...carry, - [paramName]: Array.isArray(param) ? [...param] : param - }; - }, {}); -} -__name(cloneQuery, "cloneQuery"); - -// src/httpResponse.ts -var _HttpResponse = class _HttpResponse { - constructor(options) { - this.statusCode = options.statusCode; - this.reason = options.reason; - this.headers = options.headers || {}; - this.body = options.body; + /** + * Set the input and output sensistive log filters. + */ + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; } - static isInstance(response) { - if (!response) - return false; - const resp = response; - return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + /** + * Sets the serializer. + */ + ser(serializer) { + this._serializer = serializer; + return this; } -}; -__name(_HttpResponse, "HttpResponse"); -var HttpResponse = _HttpResponse; - -// src/isValidHostname.ts -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} -__name(isValidHostname, "isValidHostname"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 18256: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + /** + * Sets the deserializer. + */ + de(deserializer) { + this._deserializer = deserializer; + return this; } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - buildQueryString: () => buildQueryString -}); -module.exports = __toCommonJS(src_exports); -var import_util_uri_escape = __nccwpck_require__(80146); -function buildQueryString(query) { - const parts = []; - for (let key of Object.keys(query).sort()) { - const value = query[key]; - key = (0, import_util_uri_escape.escapeUri)(key); - if (Array.isArray(value)) { - for (let i = 0, iLen = value.length; i < iLen; i++) { - parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`); + /** + * @returns a Command class with the classBuilder properties. + */ + build() { + var _a; + const closure = this; + let CommandRef; + return CommandRef = (_a = class extends Command { + /** + * @public + */ + constructor(...[input]) { + super(); + /** + * @internal + */ + // @ts-ignore used in middlewareFn closure. + this.serialize = closure._serializer; + /** + * @internal + */ + // @ts-ignore used in middlewareFn closure. + this.deserialize = closure._deserializer; + this.input = input ?? {}; + closure._init(this); } - } else { - let qsEntry = key; - if (value || typeof value === "string") { - qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`; + /** + * @public + */ + static getEndpointParameterInstructions() { + return closure._ep; } - parts.push(qsEntry); - } + /** + * @internal + */ + resolveMiddleware(stack, configuration, options) { + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog, + outputFilterSensitiveLog: closure._outputFilterSensitiveLog, + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); + } + }, __name(_a, "CommandRef"), _a); } - return parts.join("&"); -} -__name(buildQueryString, "buildQueryString"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 42058: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const CLOCK_SKEW_ERROR_CODES = [ - "AuthFailure", - "InvalidSignatureException", - "RequestExpired", - "RequestInTheFuture", - "RequestTimeTooSkewed", - "SignatureDoesNotMatch", -]; -const THROTTLING_ERROR_CODES = [ - "BandwidthLimitExceeded", - "EC2ThrottledException", - "LimitExceededException", - "PriorRequestNotComplete", - "ProvisionedThroughputExceededException", - "RequestLimitExceeded", - "RequestThrottled", - "RequestThrottledException", - "SlowDown", - "ThrottledException", - "Throttling", - "ThrottlingException", - "TooManyRequestsException", - "TransactionInProgressException", -]; -const TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; -const TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; -const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; -const NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"]; - -const isRetryableByTrait = (error) => error?.$retryable !== undefined; -const isClockSkewError = (error) => CLOCK_SKEW_ERROR_CODES.includes(error.name); -const isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected; -const 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); -}; -const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 || - THROTTLING_ERROR_CODES.includes(error.name) || - error.$retryable?.throttling == true; -const isTransientError = (error, depth = 0) => isRetryableByTrait(error) || - isClockSkewCorrectedError(error) || - 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) || - (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1)); -const 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; -}; - -exports.isBrowserNetworkError = isBrowserNetworkError; -exports.isClockSkewCorrectedError = isClockSkewCorrectedError; -exports.isClockSkewError = isClockSkewError; -exports.isRetryableByTrait = isRetryableByTrait; -exports.isServerError = isServerError; -exports.isThrottlingError = isThrottlingError; -exports.isTransientError = isTransientError; - - -/***/ }), - -/***/ 75118: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilHexEncoding = __nccwpck_require__(7299); -var utilUtf8 = __nccwpck_require__(67529); -var isArrayBuffer = __nccwpck_require__(52706); -var protocolHttp = __nccwpck_require__(74996); -var utilMiddleware = __nccwpck_require__(83732); -var utilUriEscape = __nccwpck_require__(87938); - -const ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; -const CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; -const AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; -const SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; -const EXPIRES_QUERY_PARAM = "X-Amz-Expires"; -const SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; -const TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; -const REGION_SET_PARAM = "X-Amz-Region-Set"; -const AUTH_HEADER = "authorization"; -const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); -const DATE_HEADER = "date"; -const GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; -const SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); -const SHA256_HEADER = "x-amz-content-sha256"; -const TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); -const HOST_HEADER = "host"; -const 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, -}; -const PROXY_HEADER_PATTERN = /^proxy-/; -const SEC_HEADER_PATTERN = /^sec-/; -const UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i]; -const ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; -const ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256"; -const EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; -const UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; -const MAX_CACHE_SIZE = 50; -const KEY_TYPE_IDENTIFIER = "aws4_request"; -const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; - -const signingKeyCache = {}; -const cacheQueue = []; -const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`; -const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => { - const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); - const cacheKey = `${shortDate}:${region}:${service}:${utilHexEncoding.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); -}; -const clearCredentialCache = () => { - cacheQueue.length = 0; - Object.keys(signingKeyCache).forEach((cacheKey) => { - delete signingKeyCache[cacheKey]; - }); -}; -const hmac = (ctor, secret, data) => { - const hash = new ctor(secret); - hash.update(utilUtf8.toUint8Array(data)); - return hash.digest(); -}; - -const 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; }; +__name(_ClassBuilder, "ClassBuilder"); +var ClassBuilder = _ClassBuilder; -const getPayloadHash = async ({ headers, body }, hashConstructor) => { - for (const headerName of Object.keys(headers)) { - if (headerName.toLowerCase() === SHA256_HEADER) { - return headers[headerName]; - } - } - if (body == undefined) { - return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; - } - else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer.isArrayBuffer(body)) { - const hashCtor = new hashConstructor(); - hashCtor.update(utilUtf8.toUint8Array(body)); - return utilHexEncoding.toHex(await hashCtor.digest()); - } - return UNSIGNED_PAYLOAD; -}; +// src/constants.ts +var SENSITIVE_STRING = "***SensitiveInformation***"; -class HeaderFormatter { - format(headers) { - const chunks = []; - for (const headerName of Object.keys(headers)) { - const bytes = utilUtf8.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 = utilUtf8.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(utilHexEncoding.fromHex(header.value.replace(/\-/g, "")), 1); - return uuidBytes; - } +// src/create-aggregated-client.ts +var createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => { + for (const command of Object.keys(commands)) { + const CommandCtor = commands[command]; + const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) { + const command2 = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command2, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command2, optionsOrCb || {}, cb); + } else { + return this.send(command2, optionsOrCb); + } + }, "methodImpl"); + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client2.prototype[methodName] = methodImpl; + } +}, "createAggregatedClient"); + +// src/parse-utils.ts +var parseBoolean = /* @__PURE__ */ __name((value) => { + switch (value) { + case "true": + return true; + case "false": + return false; + default: + throw new Error(`Unable to parse boolean value "${value}"`); + } +}, "parseBoolean"); +var expectBoolean = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "number") { + if (value === 0 || value === 1) { + logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); } -} -const 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"); - } + if (value === 0) { + return false; } - static fromNumber(number) { - if (number > 9_223_372_036_854_775_807 || number < -9223372036854776e3) { - 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); + if (value === 1) { + return true; } - valueOf() { - const bytes = this.bytes.slice(0); - const negative = bytes[0] & 0b10000000; - if (negative) { - negate(bytes); - } - return parseInt(utilHexEncoding.toHex(bytes), 16) * (negative ? -1 : 1); + } + if (typeof value === "string") { + const lower = value.toLowerCase(); + if (lower === "false" || lower === "true") { + logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); } - toString() { - return String(this.valueOf()); + if (lower === "false") { + return false; } -} -function negate(bytes) { - for (let i = 0; i < 8; i++) { - bytes[i] ^= 0xff; + if (lower === "true") { + return true; } - for (let i = 7; i > -1; i--) { - bytes[i]++; - if (bytes[i] !== 0) - break; + } + if (typeof value === "boolean") { + return value; + } + throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); +}, "expectBoolean"); +var expectNumber = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + 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; } -} - -const hasHeader = (soughtHeader, headers) => { - soughtHeader = soughtHeader.toLowerCase(); - for (const headerName of Object.keys(headers)) { - if (soughtHeader === headerName.toLowerCase()) { - return true; - } + } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); +}, "expectNumber"); +var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); +var expectFloat32 = /* @__PURE__ */ __name((value) => { + const expected = expectNumber(value); + if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); } - return false; + } + return expected; +}, "expectFloat32"); +var expectLong = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); +}, "expectLong"); +var expectInt = expectLong; +var expectInt32 = /* @__PURE__ */ __name((value) => expectSizedInt(value, 32), "expectInt32"); +var expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), "expectShort"); +var expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), "expectByte"); +var expectSizedInt = /* @__PURE__ */ __name((value, size) => { + const expected = expectLong(value); + if (expected !== void 0 && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; +}, "expectSizedInt"); +var castInt = /* @__PURE__ */ __name((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]; + } +}, "castInt"); +var expectNonNull = /* @__PURE__ */ __name((value, location) => { + if (value === null || value === void 0) { + if (location) { + throw new TypeError(`Expected a non-null value for ${location}`); + } + throw new TypeError("Expected a non-null value"); + } + return value; +}, "expectNonNull"); +var expectObject = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + 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}`); +}, "expectObject"); +var expectString = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + 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}`); +}, "expectString"); +var expectUnion = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + const asObject = expectObject(value); + const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => 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; +}, "expectUnion"); +var strictParseDouble = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return expectNumber(parseNumber(value)); + } + return expectNumber(value); +}, "strictParseDouble"); +var strictParseFloat = strictParseDouble; +var strictParseFloat32 = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return expectFloat32(parseNumber(value)); + } + return expectFloat32(value); +}, "strictParseFloat32"); +var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; +var parseNumber = /* @__PURE__ */ __name((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); +}, "parseNumber"); +var limitedParseDouble = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectNumber(value); +}, "limitedParseDouble"); +var handleFloat = limitedParseDouble; +var limitedParseFloat = limitedParseDouble; +var limitedParseFloat32 = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectFloat32(value); +}, "limitedParseFloat32"); +var parseFloatString = /* @__PURE__ */ __name((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}`); + } +}, "parseFloatString"); +var strictParseLong = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectLong(parseNumber(value)); + } + return expectLong(value); +}, "strictParseLong"); +var strictParseInt = strictParseLong; +var strictParseInt32 = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectInt32(parseNumber(value)); + } + return expectInt32(value); +}, "strictParseInt32"); +var strictParseShort = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectShort(parseNumber(value)); + } + return expectShort(value); +}, "strictParseShort"); +var strictParseByte = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectByte(parseNumber(value)); + } + return expectByte(value); +}, "strictParseByte"); +var stackTraceWarning = /* @__PURE__ */ __name((message) => { + return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n"); +}, "stackTraceWarning"); +var logger = { + warn: console.warn }; -const moveHeadersToQuery = (request, options = {}) => { - const { headers, query = {} } = protocolHttp.HttpRequest.clone(request); - for (const name of Object.keys(headers)) { - 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, - }; +// src/date-utils.ts +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`; +} +__name(dateToUtcString, "dateToUtcString"); +var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); +var parseRfc3339DateTime = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + 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 }); +}, "parseRfc3339DateTime"); +var RFC3339_WITH_OFFSET = new RegExp( + /^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/ +); +var parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339_WITH_OFFSET.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; +}, "parseRfc3339DateTimeWithOffset"); +var IMF_FIXDATE = 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 = 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 = 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 = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); + } + let match = IMF_FIXDATE.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.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.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"); +}, "parseRfc7231DateTime"); +var parseEpochTimestamp = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + 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 * 1e3)); +}, "parseEpochTimestamp"); +var buildDate = /* @__PURE__ */ __name((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), + // seconds can go up to 60 for leap seconds + parseDateValue(time.seconds, "seconds", 0, 60), + parseMilliseconds(time.fractionalMilliseconds) + ) + ); +}, "buildDate"); +var parseTwoDigitYear = /* @__PURE__ */ __name((value) => { + const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; +}, "parseTwoDigitYear"); +var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; +var adjustRfc850Year = /* @__PURE__ */ __name((input) => { + if (input.getTime() - (/* @__PURE__ */ 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; +}, "adjustRfc850Year"); +var parseMonthByShortName = /* @__PURE__ */ __name((value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; +}, "parseMonthByShortName"); +var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +var validateDayOfMonth = /* @__PURE__ */ __name((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}`); + } +}, "validateDayOfMonth"); +var isLeapYear = /* @__PURE__ */ __name((year) => { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +}, "isLeapYear"); +var parseDateValue = /* @__PURE__ */ __name((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; +}, "parseDateValue"); +var parseMilliseconds = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return 0; + } + return strictParseFloat32("0." + value) * 1e3; +}, "parseMilliseconds"); +var parseOffsetToMilliseconds = /* @__PURE__ */ __name((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 * 1e3; +}, "parseOffsetToMilliseconds"); +var stripLeadingZeroes = /* @__PURE__ */ __name((value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); +}, "stripLeadingZeroes"); + +// src/exceptions.ts +var _ServiceException = class _ServiceException extends Error { + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, _ServiceException.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } }; - -const prepareRequest = (request) => { - request = protocolHttp.HttpRequest.clone(request); - for (const headerName of Object.keys(request.headers)) { - if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { - delete request.headers[headerName]; - } +__name(_ServiceException, "ServiceException"); +var ServiceException = _ServiceException; +var decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { + Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => { + if (exception[k] == void 0 || exception[k] === "") { + exception[k] = v; } - return request; -}; + }); + const message = exception.message || exception.Message || "UnknownError"; + exception.message = message; + delete exception.Message; + return exception; +}, "decorateServiceException"); -const getCanonicalQuery = ({ query = {} }) => { - const keys = []; - const serialized = {}; - for (const key of Object.keys(query)) { - if (key.toLowerCase() === SIGNATURE_HEADER) { - continue; - } - const encodedKey = utilUriEscape.escapeUri(key); - keys.push(encodedKey); - const value = query[key]; - if (typeof value === "string") { - serialized[encodedKey] = `${encodedKey}=${utilUriEscape.escapeUri(value)}`; - } - else if (Array.isArray(value)) { - serialized[encodedKey] = value - .slice(0) - .reduce((encoded, value) => encoded.concat([`${encodedKey}=${utilUriEscape.escapeUri(value)}`]), []) - .sort() - .join("&"); - } - } - return keys - .sort() - .map((key) => serialized[key]) - .filter((serialized) => serialized) - .join("&"); -}; +// src/default-error-handler.ts +var throwDefaultError = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => { + const $metadata = deserializeMetadata(output); + const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; + const response = new exceptionCtor({ + name: (parsedBody == null ? void 0 : parsedBody.code) || (parsedBody == null ? void 0 : parsedBody.Code) || errorCode || statusCode || "UnknownError", + $fault: "client", + $metadata + }); + throw decorateServiceException(response, parsedBody); +}, "throwDefaultError"); +var withBaseException = /* @__PURE__ */ __name((ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; +}, "withBaseException"); +var deserializeMetadata = /* @__PURE__ */ __name((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"] +}), "deserializeMetadata"); -const iso8601 = (time) => toDate(time) - .toISOString() - .replace(/\.\d{3}Z$/, "Z"); -const 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; -}; +// src/defaults-mode.ts +var loadConfigsForDefaultMode = /* @__PURE__ */ __name((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: 3e4 + }; + default: + return {}; + } +}, "loadConfigsForDefaultMode"); -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 = utilMiddleware.normalizeProvider(region); - this.credentialProvider = utilMiddleware.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("\n")} +// src/emitWarningIfUnsupportedVersion.ts +var warningEmitted = false; +var emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { + warningEmitted = true; + } +}, "emitWarningIfUnsupportedVersion"); -${sortedHeaders.join(";")} -${payloadHash}`; - } - async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) { - const hash = new this.sha256(); - hash.update(utilUtf8.toUint8Array(canonicalRequest)); - const hashedRequest = await hash.digest(); - return `${algorithmIdentifier} -${longDate} -${credentialScope} -${utilHexEncoding.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 = utilUriEscape.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(";"); - } +// src/extended-encode-uri-component.ts +function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); } +__name(extendedEncodeURIComponent, "extendedEncodeURIComponent"); -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 }) { - 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 = utilHexEncoding.toHex(await hash.digest()); - const stringToSign = [ - EVENT_ALGORITHM_IDENTIFIER, - longDate, - scope, - priorSignature, - hashedHeaders, - hashedPayload, - ].join("\n"); - return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); - } - async signMessage(signableMessage, { signingDate = new Date(), signingRegion, signingService }) { - const promise = this.signEvent({ - headers: this.headerFormatter.format(signableMessage.message.headers), - payload: signableMessage.message.body, - }, { - signingDate, - signingRegion, - signingService, - priorSignature: signableMessage.priorSignature, - }); - return promise.then((signature) => { - return { message: signableMessage.message, signature }; - }); - } - async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) { - const credentials = 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(utilUtf8.toUint8Array(stringToSign)); - return utilHexEncoding.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(utilUtf8.toUint8Array(stringToSign)); - return utilHexEncoding.toHex(await hash.digest()); +// src/extensions/checksum.ts + +var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in import_types.AlgorithmId) { + const algorithmId = import_types.AlgorithmId[id]; + if (runtimeConfig[algorithmId] === void 0) { + continue; } - getSigningKey(credentials, region, shortDate, service) { - return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId] + }); + } + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; } -} - -const 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; - - -/***/ }), - -/***/ 52706: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const isArrayBuffer = (arg) => (typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer) || - Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; - -exports.isArrayBuffer = isArrayBuffer; - + }; +}, "getChecksumConfiguration"); +var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; +}, "resolveChecksumRuntimeConfig"); -/***/ }), +// src/extensions/retry.ts +var getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let _retryStrategy = runtimeConfig.retryStrategy; + return { + setRetryStrategy(retryStrategy) { + _retryStrategy = retryStrategy; + }, + retryStrategy() { + return _retryStrategy; + } + }; +}, "getRetryConfiguration"); +var resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; +}, "resolveRetryRuntimeConfig"); -/***/ 74996: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +// src/extensions/defaultExtensionConfiguration.ts +var getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + ...getChecksumConfiguration(runtimeConfig), + ...getRetryConfiguration(runtimeConfig) + }; +}, "getDefaultExtensionConfiguration"); +var getDefaultClientConfiguration = getDefaultExtensionConfiguration; +var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + ...resolveChecksumRuntimeConfig(config), + ...resolveRetryRuntimeConfig(config) + }; +}, "resolveDefaultRuntimeConfig"); -"use strict"; +// src/get-array-if-single-item.ts +var getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], "getArrayIfSingleItem"); +// src/get-value-from-text-node.ts +var getValueFromTextNode = /* @__PURE__ */ __name((obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { + obj[key] = obj[key][textNodeName]; + } else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode(obj[key]); + } + } + return obj; +}, "getValueFromTextNode"); -var types = __nccwpck_require__(59442); +// src/is-serializable-header-value.ts +var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => { + return value != null; +}, "isSerializableHeaderValue"); -const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - }, - }; +// src/lazy-json.ts +var StringWrapper = /* @__PURE__ */ __name(function() { + const Class = Object.getPrototypeOf(this).constructor; + const Constructor = Function.bind.apply(String, [null, ...arguments]); + const instance = new Constructor(); + Object.setPrototypeOf(instance, Class.prototype); + return instance; +}, "StringWrapper"); +StringWrapper.prototype = Object.create(String.prototype, { + constructor: { + value: StringWrapper, + enumerable: false, + writable: true, + configurable: true + } +}); +Object.setPrototypeOf(StringWrapper, String); +var _LazyJsonString = class _LazyJsonString extends StringWrapper { + deserializeJSON() { + return JSON.parse(super.toString()); + } + toJSON() { + return super.toString(); + } + static fromObject(object) { + if (object instanceof _LazyJsonString) { + return object; + } else if (object instanceof String || typeof object === "string") { + return new _LazyJsonString(object); + } + return new _LazyJsonString(JSON.stringify(object)); + } }; -const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler(), - }; +__name(_LazyJsonString, "LazyJsonString"); +var LazyJsonString = _LazyJsonString; + +// src/NoOpLogger.ts +var _NoOpLogger = class _NoOpLogger { + trace() { + } + debug() { + } + info() { + } + warn() { + } + error() { + } }; +__name(_NoOpLogger, "NoOpLogger"); +var NoOpLogger = _NoOpLogger; -class Field { - name; - kind; - values; - constructor({ name, kind = types.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(", "); +// src/object-mapping.ts +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; } - get() { - return this.values; + } + for (const key of Object.keys(instructions)) { + if (!Array.isArray(instructions[key])) { + target[key] = instructions[key]; + continue; } + applyInstruction(target, null, instructions, key); + } + return target; } - -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; +__name(map, "map"); +var convertMap = /* @__PURE__ */ __name((target) => { + const output = {}; + for (const [k, v] of Object.entries(target || {})) { + output[k] = [, v]; + } + return output; +}, "convertMap"); +var take = /* @__PURE__ */ __name((source, instructions) => { + const out = {}; + for (const key in instructions) { + applyInstruction(out, source, instructions, key); + } + return out; +}, "take"); +var mapWithFilter = /* @__PURE__ */ __name((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; + }, + {} + ) + ); +}, "mapWithFilter"); +var applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => { + if (source !== null) { + let instruction = instructions[targetKey]; + if (typeof instruction === "function") { + instruction = [, instruction]; } - getField(name) { - return this.entries[name.toLowerCase()]; + const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; + if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) { + target[targetKey] = valueFn(source[sourceKey]); } - removeField(name) { - delete this.entries[name.toLowerCase()]; + return; + } + let [filter, value] = instructions[targetKey]; + if (typeof value === "function") { + let _value; + const defaultFilterPassed = filter === void 0 && (_value = value()) != null; + const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter; + if (defaultFilterPassed) { + target[targetKey] = _value; + } else if (customFilterPassed) { + target[targetKey] = value(); } - getByType(kind) { - return Object.values(this.entries).filter((field) => field.kind === kind); + } else { + const defaultFilterPassed = filter === void 0 && value != null; + const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter; + if (defaultFilterPassed || customFilterPassed) { + target[targetKey] = value; } -} + } +}, "applyInstruction"); +var nonNullish = /* @__PURE__ */ __name((_) => _ != null, "nonNullish"); +var pass = /* @__PURE__ */ __name((_) => _, "pass"); -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"); +// src/resolve-path.ts +var resolvedPath = /* @__PURE__ */ __name((resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { + if (input != null && input[memberName] !== void 0) { + const labelValue = labelValueProvider(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: " + memberName + "."); } - clone() { - return HttpRequest.clone(this); + resolvedPath2 = resolvedPath2.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 resolvedPath2; +}, "resolvedPath"); + +// src/ser-utils.ts +var serializeFloat = /* @__PURE__ */ __name((value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } +}, "serializeFloat"); +var serializeDateTime = /* @__PURE__ */ __name((date) => date.toISOString().replace(".000Z", "Z"), "serializeDateTime"); + +// src/serde-json.ts +var _json = /* @__PURE__ */ __name((obj) => { + if (obj == null) { + return {}; + } + if (Array.isArray(obj)) { + return obj.filter((_) => _ != null).map(_json); + } + if (typeof obj === "object") { + const target = {}; + for (const key of Object.keys(obj)) { + if (obj[key] == null) { + continue; + } + target[key] = _json(obj[key]); } -} -function cloneQuery(query) { - return Object.keys(query).reduce((carry, paramName) => { - const param = query[paramName]; - return { - ...carry, - [paramName]: Array.isArray(param) ? [...param] : param, - }; - }, {}); -} + return target; + } + return obj; +}, "_json"); -class HttpResponse { - statusCode; - reason; - headers; - body; - constructor(options) { - this.statusCode = options.statusCode; - this.reason = options.reason; - this.headers = options.headers || {}; - this.body = options.body; +// src/split-every.ts +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]; } - static isInstance(response) { - if (!response) - return false; - const resp = response; - return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + if ((i + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; } + } + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; } +__name(splitEvery, "splitEvery"); +// Annotate the CommonJS export names for ESM import in node: -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} +0 && (0); -exports.Field = Field; -exports.Fields = Fields; -exports.HttpRequest = HttpRequest; -exports.HttpResponse = HttpResponse; -exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; -exports.isValidHostname = isValidHostname; -exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; /***/ }), -/***/ 59442: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); - } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; +/***/ 9388: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); }; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; }; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); - -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - - -/***/ }), - -/***/ 91207: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +// src/index.ts +var src_exports = {}; +__export(src_exports, { + FetchHttpHandler: () => FetchHttpHandler, + keepAliveSupport: () => keepAliveSupport, + streamCollector: () => streamCollector +}); +module.exports = __toCommonJS(src_exports); -"use strict"; +// src/fetch-http-handler.ts +var import_protocol_http = __nccwpck_require__(2359); +var import_querystring_builder = __nccwpck_require__(1163); +// src/create-request.ts +function createRequest(url, requestOptions) { + return new Request(url, requestOptions); +} +__name(createRequest, "createRequest"); -var isArrayBuffer = __nccwpck_require__(52706); -var buffer = __nccwpck_require__(20181); +// src/request-timeout.ts +function requestTimeout(timeoutInMs = 0) { + return new Promise((resolve, reject) => { + if (timeoutInMs) { + setTimeout(() => { + const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }, timeoutInMs); + } + }); +} +__name(requestTimeout, "requestTimeout"); -const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { - if (!isArrayBuffer.isArrayBuffer(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); +// src/fetch-http-handler.ts +var keepAliveSupport = { + supported: void 0 +}; +var _FetchHttpHandler = class _FetchHttpHandler { + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; + } + return new _FetchHttpHandler(instanceOrOptions); + } + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); + } + if (keepAliveSupport.supported === void 0) { + keepAliveSupport.supported = Boolean( + typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]") + ); + } + } + destroy() { + } + async handle(request, { abortSignal } = {}) { + var _a; + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + const credentials = this.config.credentials; + if (abortSignal == null ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return Promise.reject(abortError); } - return buffer.Buffer.from(input, offset, length); -}; -const fromString = (input, encoding) => { - if (typeof input !== "string") { - throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + let path = request.path; + const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {}); + if (queryString) { + path += `?${queryString}`; } - return encoding ? buffer.Buffer.from(input, encoding) : buffer.Buffer.from(input); -}; - -exports.fromArrayBuffer = fromArrayBuffer; -exports.fromString = fromString; - - -/***/ }), - -/***/ 7299: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const SHORT_TO_HEX = {}; -const HEX_TO_SHORT = {}; -for (let i = 0; i < 256; i++) { - let encodedByte = i.toString(16).toLowerCase(); - if (encodedByte.length === 1) { - encodedByte = `0${encodedByte}`; + if (request.fragment) { + path += `#${request.fragment}`; } - 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"); + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; } - 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]; + const { port, method } = request; + const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; + const body = method === "GET" || method === "HEAD" ? void 0 : request.body; + const requestOptions = { + body, + headers: new Headers(request.headers), + method, + credentials + }; + if ((_a = this.config) == null ? void 0 : _a.cache) { + requestOptions.cache = this.config.cache; + } + if (body) { + requestOptions.duplex = "half"; + } + if (typeof AbortController !== "undefined") { + requestOptions.signal = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions.keepalive = keepAlive; + } + if (typeof this.config.requestInit === "function") { + Object.assign(requestOptions, this.config.requestInit(request)); + } + let removeSignalEventListener = /* @__PURE__ */ __name(() => { + }, "removeSignalEventListener"); + const fetchRequest = createRequest(url, requestOptions); + const raceOfPromises = [ + fetch(fetchRequest).then((response) => { + const fetchHeaders = response.headers; + const transformedHeaders = {}; + for (const pair of fetchHeaders.entries()) { + transformedHeaders[pair[0]] = pair[1]; } - else { - throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + const hasReadableStream = response.body != void 0; + if (!hasReadableStream) { + return response.blob().then((body2) => ({ + response: new import_protocol_http.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: body2 + }) + })); } + return { + response: new import_protocol_http.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body + }) + }; + }), + requestTimeout(requestTimeoutInMs) + ]; + if (abortSignal) { + raceOfPromises.push( + new Promise((resolve, reject) => { + const onAbort = /* @__PURE__ */ __name(() => { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener"); + } else { + abortSignal.onabort = onAbort; + } + }) + ); } - return out; + return Promise.race(raceOfPromises).finally(removeSignalEventListener); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + config[key] = value; + return config; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } +}; +__name(_FetchHttpHandler, "FetchHttpHandler"); +var FetchHttpHandler = _FetchHttpHandler; + +// src/stream-collector.ts +var import_util_base64 = __nccwpck_require__(7030); +var streamCollector = /* @__PURE__ */ __name(async (stream) => { + var _a; + if (typeof Blob === "function" && stream instanceof Blob || ((_a = stream.constructor) == null ? void 0 : _a.name) === "Blob") { + if (Blob.prototype.arrayBuffer !== void 0) { + return new Uint8Array(await stream.arrayBuffer()); + } + return collectBlob(stream); + } + return collectStream(stream); +}, "streamCollector"); +async function collectBlob(blob) { + const base64 = await readToBase64(blob); + const arrayBuffer = (0, import_util_base64.fromBase64)(base64); + return new Uint8Array(arrayBuffer); } -function toHex(bytes) { - let out = ""; - for (let i = 0; i < bytes.byteLength; i++) { - out += SHORT_TO_HEX[bytes[i]]; +__name(collectBlob, "collectBlob"); +async function collectStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; } - return out; + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; } +__name(collectStream, "collectStream"); +function readToBase64(blob) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => { + if (reader.readyState !== 2) { + return reject(new Error("Reader aborted too early")); + } + const result = reader.result ?? ""; + const commaIndex = result.indexOf(","); + const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; + resolve(result.substring(dataOffset)); + }; + reader.onabort = () => reject(new Error("Read aborted")); + reader.onerror = () => reject(reader.error); + reader.readAsDataURL(blob); + }); +} +__name(readToBase64, "readToBase64"); +// Annotate the CommonJS export names for ESM import in node: -exports.fromHex = fromHex; -exports.toHex = toHex; - - -/***/ }), - -/***/ 83732: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var types = __nccwpck_require__(59442); - -const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); - -const normalizeProvider = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; -}; +0 && (0); -exports.getSmithyContext = getSmithyContext; -exports.normalizeProvider = normalizeProvider; /***/ }), -/***/ 87938: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; +/***/ 929: +/***/ ((module) => { +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); -const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; +// src/index.ts +var src_exports = {}; +__export(src_exports, { + isArrayBuffer: () => isArrayBuffer +}); +module.exports = __toCommonJS(src_exports); +var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); +// Annotate the CommonJS export names for ESM import in node: -const escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/"); +0 && (0); -exports.escapeUri = escapeUri; -exports.escapeUriPath = escapeUriPath; /***/ }), -/***/ 67529: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilBufferFrom = __nccwpck_require__(91207); +/***/ 5697: +/***/ ((module) => { -const fromUtf8 = (input) => { - const buf = utilBufferFrom.fromString(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; }; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -const toUint8Array = (data) => { - if (typeof data === "string") { - return fromUtf8(data); +// src/index.ts +var src_exports = {}; +__export(src_exports, { + constructStack: () => constructStack +}); +module.exports = __toCommonJS(src_exports); + +// src/MiddlewareStack.ts +var getAllAliases = /* @__PURE__ */ __name((name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); + } + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return _aliases; +}, "getAllAliases"); +var getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; +}, "getMiddlewareNameWithAliases"); +var constructStack = /* @__PURE__ */ __name(() => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = /* @__PURE__ */ new Set(); + const sort = /* @__PURE__ */ __name((entries) => entries.sort( + (a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"] + ), "sort"); + const removeByName = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((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; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByName"); + const removeByReference = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByReference"); + const cloneTo = /* @__PURE__ */ __name((toStack) => { + var _a; + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + (_a = toStack.identifyOnResolve) == null ? void 0 : _a.call(toStack, stack.identifyOnResolve()); + return toStack; + }, "cloneTo"); + const expandRelativeMiddlewareList = /* @__PURE__ */ __name((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; + }, "expandRelativeMiddlewareList"); + const getMiddlewareList = /* @__PURE__ */ __name((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 === void 0) { + 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; + }, "getMiddlewareList"); + 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( + (entry2) => { + var _a; + return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.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( + (entry2) => { + var _a; + return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.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 = /* @__PURE__ */ __name((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; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + var _a; + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve( + identifyOnResolve || cloned.identifyOnResolve() || (((_a = from.identifyOnResolve) == null ? void 0 : _a.call(from)) ?? 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 new Uint8Array(data); + }; + return stack; +}, "constructStack"); +var stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1 }; - -const 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 utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); +var priorityWeights = { + high: 3, + normal: 2, + low: 1 }; +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); -exports.fromUtf8 = fromUtf8; -exports.toUint8Array = toUint8Array; -exports.toUtf8 = toUtf8; /***/ }), -/***/ 61411: +/***/ 3992: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __export = (target, all) => { @@ -57928,1210 +26990,1097 @@ var __copyProps = (to, from, except, desc) => { } return to; }; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { - Client: () => Client, - Command: () => Command, - LazyJsonString: () => LazyJsonString, - NoOpLogger: () => NoOpLogger, - SENSITIVE_STRING: () => SENSITIVE_STRING, - ServiceException: () => ServiceException, - StringWrapper: () => StringWrapper, - _json: () => _json, - collectBody: () => collectBody, - convertMap: () => convertMap, - createAggregatedClient: () => createAggregatedClient, - dateToUtcString: () => dateToUtcString, - decorateServiceException: () => decorateServiceException, - emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, - expectBoolean: () => expectBoolean, - expectByte: () => expectByte, - expectFloat32: () => expectFloat32, - expectInt: () => expectInt, - expectInt32: () => expectInt32, - expectLong: () => expectLong, - expectNonNull: () => expectNonNull, - expectNumber: () => expectNumber, - expectObject: () => expectObject, - expectShort: () => expectShort, - expectString: () => expectString, - expectUnion: () => expectUnion, - extendedEncodeURIComponent: () => extendedEncodeURIComponent, - getArrayIfSingleItem: () => getArrayIfSingleItem, - getDefaultClientConfiguration: () => getDefaultClientConfiguration, - getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration, - getValueFromTextNode: () => getValueFromTextNode, - handleFloat: () => handleFloat, - isSerializableHeaderValue: () => isSerializableHeaderValue, - limitedParseDouble: () => limitedParseDouble, - limitedParseFloat: () => limitedParseFloat, - limitedParseFloat32: () => limitedParseFloat32, - loadConfigsForDefaultMode: () => loadConfigsForDefaultMode, - logger: () => logger, - map: () => map, - parseBoolean: () => parseBoolean, - parseEpochTimestamp: () => parseEpochTimestamp, - parseRfc3339DateTime: () => parseRfc3339DateTime, - parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset, - parseRfc7231DateTime: () => parseRfc7231DateTime, - resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig, - resolvedPath: () => resolvedPath, - serializeDateTime: () => serializeDateTime, - serializeFloat: () => serializeFloat, - splitEvery: () => splitEvery, - strictParseByte: () => strictParseByte, - strictParseDouble: () => strictParseDouble, - strictParseFloat: () => strictParseFloat, - strictParseFloat32: () => strictParseFloat32, - strictParseInt: () => strictParseInt, - strictParseInt32: () => strictParseInt32, - strictParseLong: () => strictParseLong, - strictParseShort: () => strictParseShort, - take: () => take, - throwDefaultError: () => throwDefaultError, - withBaseException: () => withBaseException + DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT, + NodeHttp2Handler: () => NodeHttp2Handler, + NodeHttpHandler: () => NodeHttpHandler, + streamCollector: () => streamCollector }); module.exports = __toCommonJS(src_exports); -// src/client.ts -var import_middleware_stack = __nccwpck_require__(9208); -var _Client = class _Client { - constructor(config) { - this.config = config; - this.middlewareStack = (0, import_middleware_stack.constructStack)(); - } - send(command, optionsOrCb, cb) { - const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; - const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; - const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true; - let handler; - if (useHandlerCache) { - if (!this.handlers) { - this.handlers = /* @__PURE__ */ 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( - // prevent any errors thrown in the callback from triggering an - // unhandled promise rejection - () => { - } - ); - } else { - return handler(command).then((result) => result.output); - } - } - destroy() { - var _a, _b, _c; - (_c = (_b = (_a = this.config) == null ? void 0 : _a.requestHandler) == null ? void 0 : _b.destroy) == null ? void 0 : _c.call(_b); - delete this.handlers; - } -}; -__name(_Client, "Client"); -var Client = _Client; - -// src/collect-stream-body.ts -var import_util_stream = __nccwpck_require__(4252); -var collectBody = /* @__PURE__ */ __name(async (streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody); - } - if (!streamBody) { - return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); - } - const fromContext = context.streamCollector(streamBody); - return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext); -}, "collectBody"); +// src/node-http-handler.ts +var import_protocol_http = __nccwpck_require__(2359); +var import_querystring_builder = __nccwpck_require__(1163); +var import_http = __nccwpck_require__(8611); +var import_https = __nccwpck_require__(5692); -// src/command.ts +// src/constants.ts +var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; -var import_types = __nccwpck_require__(90690); -var _Command = class _Command { - constructor() { - this.middlewareStack = (0, import_middleware_stack.constructStack)(); - } - /** - * Factory for Command ClassBuilder. - * @internal - */ - static classBuilder() { - return new ClassBuilder(); - } - /** - * @internal - */ - 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: logger2 } = configuration; - const handlerExecutionContext = { - logger: logger2, - clientName, - commandName, - inputFilterSensitiveLog, - outputFilterSensitiveLog, - [import_types.SMITHY_CONTEXT_KEY]: { - commandInstance: this, - ...smithyContext - }, - ...additionalContext - }; - const { requestHandler } = configuration; - return stack.resolve( - (request) => requestHandler.handle(request.request, options || {}), - handlerExecutionContext - ); +// src/get-transformed-headers.ts +var getTransformedHeaders = /* @__PURE__ */ __name((headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; } + return transformedHeaders; +}, "getTransformedHeaders"); + +// src/timing.ts +var timing = { + setTimeout: (cb, ms) => setTimeout(cb, ms), + clearTimeout: (timeoutId) => clearTimeout(timeoutId) }; -__name(_Command, "Command"); -var Command = _Command; -var _ClassBuilder = class _ClassBuilder { - constructor() { - this._init = () => { - }; - this._ep = {}; - this._middlewareFn = () => []; - this._commandName = ""; - this._clientName = ""; - this._additionalContext = {}; - this._smithyContext = {}; - this._inputFilterSensitiveLog = (_) => _; - this._outputFilterSensitiveLog = (_) => _; - this._serializer = null; - this._deserializer = null; - } - /** - * Optional init callback. - */ - init(cb) { - this._init = cb; - } - /** - * Set the endpoint parameter instructions. - */ - ep(endpointParameterInstructions) { - this._ep = endpointParameterInstructions; - return this; - } - /** - * Add any number of middleware. - */ - m(middlewareSupplier) { - this._middlewareFn = middlewareSupplier; - return this; - } - /** - * Set the initial handler execution context Smithy field. - */ - s(service, operation, smithyContext = {}) { - this._smithyContext = { - service, - operation, - ...smithyContext - }; - return this; - } - /** - * Set the initial handler execution context. - */ - c(additionalContext = {}) { - this._additionalContext = additionalContext; - return this; - } - /** - * Set constant string identifiers for the operation. - */ - n(clientName, commandName) { - this._clientName = clientName; - this._commandName = commandName; - return this; - } - /** - * Set the input and output sensistive log filters. - */ - f(inputFilter = (_) => _, outputFilter = (_) => _) { - this._inputFilterSensitiveLog = inputFilter; - this._outputFilterSensitiveLog = outputFilter; - return this; - } - /** - * Sets the serializer. - */ - ser(serializer) { - this._serializer = serializer; - return this; - } - /** - * Sets the deserializer. - */ - de(deserializer) { - this._deserializer = deserializer; - return this; + +// src/set-connection-timeout.ts +var DEFER_EVENT_LISTENER_TIME = 1e3; +var setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; } - /** - * @returns a Command class with the classBuilder properties. - */ - build() { - var _a; - const closure = this; - let CommandRef; - return CommandRef = (_a = class extends Command { - /** - * @public - */ - constructor(...[input]) { - super(); - /** - * @internal - */ - // @ts-ignore used in middlewareFn closure. - this.serialize = closure._serializer; - /** - * @internal - */ - // @ts-ignore used in middlewareFn closure. - this.deserialize = closure._deserializer; - this.input = input ?? {}; - closure._init(this); - } - /** - * @public - */ - static getEndpointParameterInstructions() { - return closure._ep; - } - /** - * @internal - */ - resolveMiddleware(stack, configuration, options) { - return this.resolveMiddlewareWithContext(stack, configuration, options, { - CommandCtor: CommandRef, - middlewareFn: closure._middlewareFn, - clientName: closure._clientName, - commandName: closure._commandName, - inputFilterSensitiveLog: closure._inputFilterSensitiveLog, - outputFilterSensitiveLog: closure._outputFilterSensitiveLog, - smithyContext: closure._smithyContext, - additionalContext: closure._additionalContext + const registerTimeout = /* @__PURE__ */ __name((offset) => { + const timeoutId = timing.setTimeout(() => { + request.destroy(); + reject( + Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { + name: "TimeoutError" + }) + ); + }, timeoutInMs - offset); + const doWithSocket = /* @__PURE__ */ __name((socket) => { + if (socket == null ? void 0 : socket.connecting) { + socket.on("connect", () => { + timing.clearTimeout(timeoutId); }); - } - }, __name(_a, "CommandRef"), _a); - } -}; -__name(_ClassBuilder, "ClassBuilder"); -var ClassBuilder = _ClassBuilder; - -// src/constants.ts -var SENSITIVE_STRING = "***SensitiveInformation***"; - -// src/create-aggregated-client.ts -var createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => { - for (const command of Object.keys(commands)) { - const CommandCtor = commands[command]; - const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) { - const command2 = new CommandCtor(args); - if (typeof optionsOrCb === "function") { - this.send(command2, optionsOrCb); - } else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expected http options but got ${typeof optionsOrCb}`); - this.send(command2, optionsOrCb || {}, cb); } else { - return this.send(command2, optionsOrCb); - } - }, "methodImpl"); - const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); - Client2.prototype[methodName] = methodImpl; - } -}, "createAggregatedClient"); - -// src/parse-utils.ts -var parseBoolean = /* @__PURE__ */ __name((value) => { - switch (value) { - case "true": - return true; - case "false": - return false; - default: - throw new Error(`Unable to parse boolean value "${value}"`); - } -}, "parseBoolean"); -var expectBoolean = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - 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}`); -}, "expectBoolean"); -var expectNumber = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - 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}`)); + timing.clearTimeout(timeoutId); } - return parsed; + }, "doWithSocket"); + if (request.socket) { + doWithSocket(request.socket); + } else { + request.on("socket", doWithSocket); } + }, "registerTimeout"); + if (timeoutInMs < 2e3) { + registerTimeout(0); + return 0; } - if (typeof value === "number") { - return value; + return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); +}, "setConnectionTimeout"); + +// src/set-socket-keep-alive.ts +var DEFER_EVENT_LISTENER_TIME2 = 3e3; +var setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => { + if (keepAlive !== true) { + return -1; } - throw new TypeError(`Expected number, got ${typeof value}: ${value}`); -}, "expectNumber"); -var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); -var expectFloat32 = /* @__PURE__ */ __name((value) => { - const expected = expectNumber(value); - if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { - if (Math.abs(expected) > MAX_FLOAT) { - throw new TypeError(`Expected 32-bit float, got ${value}`); + const registerListener = /* @__PURE__ */ __name(() => { + if (request.socket) { + request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } else { + request.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); } + }, "registerListener"); + if (deferTimeMs === 0) { + registerListener(); + return 0; } - return expected; -}, "expectFloat32"); -var expectLong = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - if (Number.isInteger(value) && !Number.isNaN(value)) { - return value; - } - throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); -}, "expectLong"); -var expectInt = expectLong; -var expectInt32 = /* @__PURE__ */ __name((value) => expectSizedInt(value, 32), "expectInt32"); -var expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), "expectShort"); -var expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), "expectByte"); -var expectSizedInt = /* @__PURE__ */ __name((value, size) => { - const expected = expectLong(value); - if (expected !== void 0 && castInt(expected, size) !== expected) { - throw new TypeError(`Expected ${size}-bit integer, got ${value}`); - } - return expected; -}, "expectSizedInt"); -var castInt = /* @__PURE__ */ __name((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]; - } -}, "castInt"); -var expectNonNull = /* @__PURE__ */ __name((value, location) => { - if (value === null || value === void 0) { - if (location) { - throw new TypeError(`Expected a non-null value for ${location}`); + return timing.setTimeout(registerListener, deferTimeMs); +}, "setSocketKeepAlive"); + +// src/set-socket-timeout.ts +var DEFER_EVENT_LISTENER_TIME3 = 3e3; +var setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => { + const registerTimeout = /* @__PURE__ */ __name((offset) => { + const timeout = timeoutInMs - offset; + const onTimeout = /* @__PURE__ */ __name(() => { + request.destroy(); + reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); + }, "onTimeout"); + if (request.socket) { + request.socket.setTimeout(timeout, onTimeout); + } else { + request.setTimeout(timeout, onTimeout); } - throw new TypeError("Expected a non-null value"); - } - return value; -}, "expectNonNull"); -var expectObject = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - 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}`); -}, "expectObject"); -var expectString = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - 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}`); -}, "expectString"); -var expectUnion = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - const asObject = expectObject(value); - const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => 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; -}, "expectUnion"); -var strictParseDouble = /* @__PURE__ */ __name((value) => { - if (typeof value == "string") { - return expectNumber(parseNumber(value)); - } - return expectNumber(value); -}, "strictParseDouble"); -var strictParseFloat = strictParseDouble; -var strictParseFloat32 = /* @__PURE__ */ __name((value) => { - if (typeof value == "string") { - return expectFloat32(parseNumber(value)); - } - return expectFloat32(value); -}, "strictParseFloat32"); -var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; -var parseNumber = /* @__PURE__ */ __name((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); -}, "parseNumber"); -var limitedParseDouble = /* @__PURE__ */ __name((value) => { - if (typeof value == "string") { - return parseFloatString(value); - } - return expectNumber(value); -}, "limitedParseDouble"); -var handleFloat = limitedParseDouble; -var limitedParseFloat = limitedParseDouble; -var limitedParseFloat32 = /* @__PURE__ */ __name((value) => { - if (typeof value == "string") { - return parseFloatString(value); - } - return expectFloat32(value); -}, "limitedParseFloat32"); -var parseFloatString = /* @__PURE__ */ __name((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}`); - } -}, "parseFloatString"); -var strictParseLong = /* @__PURE__ */ __name((value) => { - if (typeof value === "string") { - return expectLong(parseNumber(value)); - } - return expectLong(value); -}, "strictParseLong"); -var strictParseInt = strictParseLong; -var strictParseInt32 = /* @__PURE__ */ __name((value) => { - if (typeof value === "string") { - return expectInt32(parseNumber(value)); + }, "registerTimeout"); + if (0 < timeoutInMs && timeoutInMs < 6e3) { + registerTimeout(0); + return 0; } - return expectInt32(value); -}, "strictParseInt32"); -var strictParseShort = /* @__PURE__ */ __name((value) => { - if (typeof value === "string") { - return expectShort(parseNumber(value)); + return timing.setTimeout( + registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3), + DEFER_EVENT_LISTENER_TIME3 + ); +}, "setSocketTimeout"); + +// src/write-request-body.ts +var import_stream = __nccwpck_require__(2203); +var MIN_WAIT_TIME = 1e3; +async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) { + const headers = request.headers ?? {}; + const expect = headers["Expect"] || headers["expect"]; + let timeoutId = -1; + let sendBody = true; + if (expect === "100-continue") { + sendBody = await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(timing.setTimeout(resolve, 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); + }); + }) + ]); } - return expectShort(value); -}, "strictParseShort"); -var strictParseByte = /* @__PURE__ */ __name((value) => { - if (typeof value === "string") { - return expectByte(parseNumber(value)); + if (sendBody) { + writeBody(httpRequest, request.body); } - return expectByte(value); -}, "strictParseByte"); -var stackTraceWarning = /* @__PURE__ */ __name((message) => { - return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n"); -}, "stackTraceWarning"); -var logger = { - warn: console.warn -}; - -// src/date-utils.ts -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`; } -__name(dateToUtcString, "dateToUtcString"); -var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); -var parseRfc3339DateTime = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; +__name(writeRequestBody, "writeRequestBody"); +function writeBody(httpRequest, body) { + if (body instanceof import_stream.Readable) { + body.pipe(httpRequest); + return; } - if (typeof value !== "string") { - throw new TypeError("RFC-3339 date-times must be expressed as strings"); + if (body) { + if (Buffer.isBuffer(body) || typeof body === "string") { + 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; } - const match = RFC3339.exec(value); - if (!match) { - throw new TypeError("Invalid RFC-3339 date-time value"); + httpRequest.end(); +} +__name(writeBody, "writeBody"); + +// src/node-http-handler.ts +var DEFAULT_REQUEST_TIMEOUT = 0; +var _NodeHttpHandler = class _NodeHttpHandler { + constructor(options) { + this.socketWarningTimestamp = 0; + // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286 + this.metadata = { handlerProtocol: "http/1.1" }; + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }).catch(reject); + } else { + resolve(this.resolveDefaultConfig(options)); + } + }); } - 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 }); -}, "parseRfc3339DateTime"); -var RFC3339_WITH_OFFSET = new RegExp( - /^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/ -); -var parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; + } + return new _NodeHttpHandler(instanceOrOptions); } - if (typeof value !== "string") { - throw new TypeError("RFC-3339 date-times must be expressed as strings"); + /** + * @internal + * + * @param agent - http(s) agent in use by the NodeHttpHandler instance. + * @param socketWarningTimestamp - last socket usage check timestamp. + * @param logger - channel for the warning. + * @returns timestamp of last emitted warning. + */ + static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { + var _a, _b, _c; + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15e3; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = ((_a = sockets[origin]) == null ? void 0 : _a.length) ?? 0; + const requestsEnqueued = ((_b = requests[origin]) == null ? void 0 : _b.length) ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + (_c = logger == null ? void 0 : logger.warn) == null ? void 0 : _c.call( + logger, + `@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; } - const match = RFC3339_WITH_OFFSET.exec(value); - if (!match) { - throw new TypeError("Invalid RFC-3339 date-time value"); + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout: requestTimeout ?? socketTimeout, + httpAgent: (() => { + if (httpAgent instanceof import_http.Agent || typeof (httpAgent == null ? void 0 : httpAgent.destroy) === "function") { + return httpAgent; + } + return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof import_https.Agent || typeof (httpsAgent == null ? void 0 : httpsAgent.destroy) === "function") { + return httpsAgent; + } + return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger: console + }; } - 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)); + destroy() { + var _a, _b, _c, _d; + (_b = (_a = this.config) == null ? void 0 : _a.httpAgent) == null ? void 0 : _b.destroy(); + (_d = (_c = this.config) == null ? void 0 : _c.httpsAgent) == null ? void 0 : _d.destroy(); } - return date; -}, "parseRfc3339DateTimeWithOffset"); -var IMF_FIXDATE = 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 = 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 = 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 = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; + async handle(request, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + return new Promise((_resolve, _reject) => { + let writeRequestBodyPromise = void 0; + const timeouts = []; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _reject(arg); + }, "reject"); + if (!this.config) { + throw new Error("Node HTTP request handler config is not resolved"); + } + if (abortSignal == null ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request.protocol === "https:"; + const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; + timeouts.push( + timing.setTimeout( + () => { + this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage( + agent, + this.socketWarningTimestamp, + this.config.logger + ); + }, + this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3) + ) + ); + const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {}); + let auth = void 0; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}`; + } + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let hostname = request.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request.hostname.slice(1, -1); + } else { + hostname = request.hostname; + } + const nodeHttpsOptions = { + headers: request.headers, + host: hostname, + method: request.method, + path, + port: request.port, + agent, + auth + }; + const requestFunc = isSSL ? import_https.request : import_http.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new import_protocol_http.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 = /* @__PURE__ */ __name(() => { + req.destroy(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }, "onAbort"); + 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; + } + } + timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); + timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push( + setSocketKeepAlive(req, { + // @ts-expect-error keepAlive is not public on httpAgent. + keepAlive: httpAgent.keepAlive, + // @ts-expect-error keepAliveMsecs is not public on httpAgent. + keepAliveMsecs: httpAgent.keepAliveMsecs + }) + ); + } + writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => { + timeouts.forEach(timing.clearTimeout); + return _reject(e); + }); + }); } - if (typeof value !== "string") { - throw new TypeError("RFC-7231 date-times must be expressed as strings"); + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value + }; + }); } - let match = IMF_FIXDATE.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 } - ); + httpHandlerConfigs() { + return this.config ?? {}; } - match = RFC_850_DATE.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 - }) - ); +}; +__name(_NodeHttpHandler, "NodeHttpHandler"); +var NodeHttpHandler = _NodeHttpHandler; + +// src/node-http2-handler.ts + + +var import_http22 = __nccwpck_require__(5675); + +// src/node-http2-connection-manager.ts +var import_http2 = __toESM(__nccwpck_require__(5675)); + +// src/node-http2-connection-pool.ts +var _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool { + constructor(sessions) { + this.sessions = []; + this.sessions = sessions ?? []; } - match = ASC_TIME.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 } - ); + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); + } } - throw new TypeError("Invalid RFC-7231 date-time value"); -}, "parseRfc7231DateTime"); -var parseEpochTimestamp = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; + offerLast(session) { + this.sessions.push(session); } - 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"); + contains(session) { + return this.sessions.includes(session); } - if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { - throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); } - return new Date(Math.round(valueAsDouble * 1e3)); -}, "parseEpochTimestamp"); -var buildDate = /* @__PURE__ */ __name((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), - // seconds can go up to 60 for leap seconds - parseDateValue(time.seconds, "seconds", 0, 60), - parseMilliseconds(time.fractionalMilliseconds) - ) - ); -}, "buildDate"); -var parseTwoDigitYear = /* @__PURE__ */ __name((value) => { - const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); - const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); - if (valueInThisCentury < thisYear) { - return valueInThisCentury + 100; + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); } - return valueInThisCentury; -}, "parseTwoDigitYear"); -var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; -var adjustRfc850Year = /* @__PURE__ */ __name((input) => { - if (input.getTime() - (/* @__PURE__ */ 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() - ) - ); + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } + } } - return input; -}, "adjustRfc850Year"); -var parseMonthByShortName = /* @__PURE__ */ __name((value) => { - const monthIdx = MONTHS.indexOf(value); - if (monthIdx < 0) { - throw new TypeError(`Invalid month: ${value}`); +}; +__name(_NodeHttp2ConnectionPool, "NodeHttp2ConnectionPool"); +var NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool; + +// src/node-http2-connection-manager.ts +var _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager { + constructor(config) { + this.sessionCache = /* @__PURE__ */ new Map(); + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } } - return monthIdx + 1; -}, "parseMonthByShortName"); -var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -var validateDayOfMonth = /* @__PURE__ */ __name((year, month, day) => { - let maxDays = DAYS_IN_MONTH[month]; - if (month === 1 && isLeapYear(year)) { - maxDays = 29; + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } + } + const session = import_http2.default.connect(url); + 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() + ); + } + }); + } + session.unref(); + const destroySessionCb = /* @__PURE__ */ __name(() => { + session.destroy(); + this.deleteSession(url, session); + }, "destroySessionCb"); + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url, connectionPool); + return session; } - if (day > maxDays) { - throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); + /** + * Delete a session from the connection pool. + * @param authority The authority of the session to delete. + * @param session The session to delete. + */ + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); } -}, "validateDayOfMonth"); -var isLeapYear = /* @__PURE__ */ __name((year) => { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -}, "isLeapYear"); -var parseDateValue = /* @__PURE__ */ __name((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`); + release(requestContext, session) { + var _a; + const cacheKey = this.getUrlString(requestContext); + (_a = this.sessionCache.get(cacheKey)) == null ? void 0 : _a.offerLast(session); } - return dateVal; -}, "parseDateValue"); -var parseMilliseconds = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return 0; + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); + } + this.sessionCache.delete(key); + } } - return strictParseFloat32("0." + value) * 1e3; -}, "parseMilliseconds"); -var parseOffsetToMilliseconds = /* @__PURE__ */ __name((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 "-"`); + setMaxConcurrentStreams(maxConcurrentStreams) { + if (maxConcurrentStreams && maxConcurrentStreams <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; } - const hour = Number(value.substring(1, 3)); - const minute = Number(value.substring(4, 6)); - return direction * (hour * 60 + minute) * 60 * 1e3; -}, "parseOffsetToMilliseconds"); -var stripLeadingZeroes = /* @__PURE__ */ __name((value) => { - let idx = 0; - while (idx < value.length - 1 && value.charAt(idx) === "0") { - idx++; + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; } - if (idx === 0) { - return value; + getUrlString(request) { + return request.destination.toString(); } - return value.slice(idx); -}, "stripLeadingZeroes"); +}; +__name(_NodeHttp2ConnectionManager, "NodeHttp2ConnectionManager"); +var NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager; -// src/exceptions.ts -var _ServiceException = class _ServiceException extends Error { +// src/node-http2-handler.ts +var _NodeHttp2Handler = class _NodeHttp2Handler { constructor(options) { - super(options.message); - Object.setPrototypeOf(this, _ServiceException.prototype); - this.name = options.name; - this.$fault = options.$fault; - this.$metadata = options.$metadata; + this.metadata = { handlerProtocol: "h2" }; + this.connectionManager = new NodeHttp2ConnectionManager({}); + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((opts) => { + resolve(opts || {}); + }).catch(reject); + } else { + resolve(options || {}); + } + }); } -}; -__name(_ServiceException, "ServiceException"); -var ServiceException = _ServiceException; -var decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { - Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => { - if (exception[k] == void 0 || exception[k] === "") { - exception[k] = v; + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; } - }); - const message = exception.message || exception.Message || "UnknownError"; - exception.message = message; - delete exception.Message; - return exception; -}, "decorateServiceException"); - -// src/default-error-handler.ts -var throwDefaultError = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => { - const $metadata = deserializeMetadata(output); - const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; - const response = new exceptionCtor({ - name: (parsedBody == null ? void 0 : parsedBody.code) || (parsedBody == null ? void 0 : parsedBody.Code) || errorCode || statusCode || "UnknownError", - $fault: "client", - $metadata - }); - throw decorateServiceException(response, parsedBody); -}, "throwDefaultError"); -var withBaseException = /* @__PURE__ */ __name((ExceptionCtor) => { - return ({ output, parsedBody, errorCode }) => { - throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); - }; -}, "withBaseException"); -var deserializeMetadata = /* @__PURE__ */ __name((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"] -}), "deserializeMetadata"); - -// src/defaults-mode.ts -var loadConfigsForDefaultMode = /* @__PURE__ */ __name((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 new _NodeHttp2Handler(instanceOrOptions); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout, disableConcurrentStreams } = this.config; + return new Promise((_resolve, _reject) => { + var _a; + let fulfilled = false; + let writeRequestBodyPromise = void 0; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }, "reject"); + if (abortSignal == null ? void 0 : abortSignal.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + 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 session = this.connectionManager.lease(requestContext, { + requestTimeout: (_a = this.config) == null ? void 0 : _a.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false + }); + const rejectWithDestroy = /* @__PURE__ */ __name((err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }, "rejectWithDestroy"); + const queryString = (0, import_querystring_builder.buildQueryString)(query || {}); + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + const req = session.request({ + ...request.headers, + [import_http22.constants.HTTP2_HEADER_PATH]: path, + [import_http22.constants.HTTP2_HEADER_METHOD]: method + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new import_protocol_http.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (requestTimeout) { + req.setTimeout(requestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = /* @__PURE__ */ __name(() => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }, "onAbort"); + 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; + } + } + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy( + new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`) + ); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { return { - retryMode: "standard", - connectionTimeout: 3e4 + ...config, + [key]: value }; - default: - return {}; + }); } -}, "loadConfigsForDefaultMode"); + httpHandlerConfigs() { + return this.config ?? {}; + } + /** + * Destroys a session. + * @param session The session to destroy. + */ + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } + } +}; +__name(_NodeHttp2Handler, "NodeHttp2Handler"); +var NodeHttp2Handler = _NodeHttp2Handler; -// src/emitWarningIfUnsupportedVersion.ts -var warningEmitted = false; -var emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => { - if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { - warningEmitted = true; +// src/stream-collector/collector.ts + +var _Collector = class _Collector extends import_stream.Writable { + constructor() { + super(...arguments); + this.bufferedBytes = []; } -}, "emitWarningIfUnsupportedVersion"); + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } +}; +__name(_Collector, "Collector"); +var Collector = _Collector; -// src/extended-encode-uri-component.ts -function extendedEncodeURIComponent(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); +// src/stream-collector/index.ts +var streamCollector = /* @__PURE__ */ __name((stream) => { + if (isReadableStreamInstance(stream)) { + return collectReadableStream(stream); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); }); +}, "streamCollector"); +var isReadableStreamInstance = /* @__PURE__ */ __name((stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream, "isReadableStreamInstance"); +async function collectReadableStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; } -__name(extendedEncodeURIComponent, "extendedEncodeURIComponent"); +__name(collectReadableStream, "collectReadableStream"); +// Annotate the CommonJS export names for ESM import in node: -// src/extensions/checksum.ts +0 && (0); -var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const checksumAlgorithms = []; - for (const id in import_types.AlgorithmId) { - const algorithmId = import_types.AlgorithmId[id]; - if (runtimeConfig[algorithmId] === void 0) { - continue; - } - checksumAlgorithms.push({ - algorithmId: () => algorithmId, - checksumConstructor: () => runtimeConfig[algorithmId] - }); + + +/***/ }), + +/***/ 2359: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } - return { - _checksumAlgorithms: checksumAlgorithms, - addChecksumAlgorithm(algo) { - this._checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return this._checksumAlgorithms; - } - }; -}, "getChecksumConfiguration"); -var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}, "resolveChecksumRuntimeConfig"); + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/extensions/retry.ts -var getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - let _retryStrategy = runtimeConfig.retryStrategy; +// src/index.ts +var src_exports = {}; +__export(src_exports, { + Field: () => Field, + Fields: () => Fields, + HttpRequest: () => HttpRequest, + HttpResponse: () => HttpResponse, + IHttpRequest: () => import_types.HttpRequest, + getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration, + isValidHostname: () => isValidHostname, + resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig +}); +module.exports = __toCommonJS(src_exports); + +// src/extensions/httpExtensionConfiguration.ts +var getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let httpHandler = runtimeConfig.httpHandler; return { - setRetryStrategy(retryStrategy) { - _retryStrategy = retryStrategy; + setHttpHandler(handler) { + httpHandler = handler; }, - retryStrategy() { - return _retryStrategy; + httpHandler() { + return httpHandler; + }, + updateHttpClientConfig(key, value) { + httpHandler.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return httpHandler.httpHandlerConfigs(); } }; -}, "getRetryConfiguration"); -var resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { - const runtimeConfig = {}; - runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); - return runtimeConfig; -}, "resolveRetryRuntimeConfig"); - -// src/extensions/defaultExtensionConfiguration.ts -var getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return { - ...getChecksumConfiguration(runtimeConfig), - ...getRetryConfiguration(runtimeConfig) - }; -}, "getDefaultExtensionConfiguration"); -var getDefaultClientConfiguration = getDefaultExtensionConfiguration; -var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { +}, "getHttpHandlerExtensionConfiguration"); +var resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { return { - ...resolveChecksumRuntimeConfig(config), - ...resolveRetryRuntimeConfig(config) + httpHandler: httpHandlerExtensionConfiguration.httpHandler() }; -}, "resolveDefaultRuntimeConfig"); - -// src/get-array-if-single-item.ts -var getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], "getArrayIfSingleItem"); - -// src/get-value-from-text-node.ts -var getValueFromTextNode = /* @__PURE__ */ __name((obj) => { - const textNodeName = "#text"; - for (const key in obj) { - if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { - obj[key] = obj[key][textNodeName]; - } else if (typeof obj[key] === "object" && obj[key] !== null) { - obj[key] = getValueFromTextNode(obj[key]); - } - } - return obj; -}, "getValueFromTextNode"); - -// src/is-serializable-header-value.ts -var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => { - return value != null; -}, "isSerializableHeaderValue"); +}, "resolveHttpHandlerRuntimeConfig"); -// src/lazy-json.ts -var StringWrapper = /* @__PURE__ */ __name(function() { - const Class = Object.getPrototypeOf(this).constructor; - const Constructor = Function.bind.apply(String, [null, ...arguments]); - const instance = new Constructor(); - Object.setPrototypeOf(instance, Class.prototype); - return instance; -}, "StringWrapper"); -StringWrapper.prototype = Object.create(String.prototype, { - constructor: { - value: StringWrapper, - enumerable: false, - writable: true, - configurable: true - } -}); -Object.setPrototypeOf(StringWrapper, String); -var _LazyJsonString = class _LazyJsonString extends StringWrapper { - deserializeJSON() { - return JSON.parse(super.toString()); - } - toJSON() { - return super.toString(); - } - static fromObject(object) { - if (object instanceof _LazyJsonString) { - return object; - } else if (object instanceof String || typeof object === "string") { - return new _LazyJsonString(object); - } - return new _LazyJsonString(JSON.stringify(object)); +// src/Field.ts +var import_types = __nccwpck_require__(809); +var _Field = class _Field { + constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind; + this.values = values; } -}; -__name(_LazyJsonString, "LazyJsonString"); -var LazyJsonString = _LazyJsonString; - -// src/NoOpLogger.ts -var _NoOpLogger = class _NoOpLogger { - trace() { + /** + * Appends a value to the field. + * + * @param value The value to append. + */ + add(value) { + this.values.push(value); } - debug() { + /** + * Overwrite existing field values. + * + * @param values The new field values. + */ + set(values) { + this.values = values; } - info() { + /** + * Remove all matching entries from list. + * + * @param value Value to remove. + */ + remove(value) { + this.values = this.values.filter((v) => v !== value); } - warn() { + /** + * Get comma-delimited string. + * + * @returns String representation of {@link Field}. + */ + toString() { + return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", "); } - error() { + /** + * Get string values as a list + * + * @returns Values in {@link Field} as a list. + */ + get() { + return this.values; } }; -__name(_NoOpLogger, "NoOpLogger"); -var NoOpLogger = _NoOpLogger; +__name(_Field, "Field"); +var Field = _Field; -// src/object-mapping.ts -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 of Object.keys(instructions)) { - if (!Array.isArray(instructions[key])) { - target[key] = instructions[key]; - continue; - } - applyInstruction(target, null, instructions, key); - } - return target; -} -__name(map, "map"); -var convertMap = /* @__PURE__ */ __name((target) => { - const output = {}; - for (const [k, v] of Object.entries(target || {})) { - output[k] = [, v]; +// src/Fields.ts +var _Fields = class _Fields { + constructor({ fields = [], encoding = "utf-8" }) { + this.entries = {}; + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; } - return output; -}, "convertMap"); -var take = /* @__PURE__ */ __name((source, instructions) => { - const out = {}; - for (const key in instructions) { - applyInstruction(out, source, instructions, key); + /** + * Set entry for a {@link Field} name. The `name` + * attribute will be used to key the collection. + * + * @param field The {@link Field} to set. + */ + setField(field) { + this.entries[field.name.toLowerCase()] = field; } - return out; -}, "take"); -var mapWithFilter = /* @__PURE__ */ __name((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; - }, - {} - ) - ); -}, "mapWithFilter"); -var applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => { - if (source !== null) { - let instruction = instructions[targetKey]; - if (typeof instruction === "function") { - instruction = [, instruction]; - } - const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; - if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) { - target[targetKey] = valueFn(source[sourceKey]); - } - return; + /** + * Retrieve {@link Field} entry by name. + * + * @param name The name of the {@link Field} entry + * to retrieve + * @returns The {@link Field} if it exists. + */ + getField(name) { + return this.entries[name.toLowerCase()]; } - let [filter, value] = instructions[targetKey]; - if (typeof value === "function") { - let _value; - const defaultFilterPassed = filter === void 0 && (_value = value()) != null; - const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter; - if (defaultFilterPassed) { - target[targetKey] = _value; - } else if (customFilterPassed) { - target[targetKey] = value(); - } - } else { - const defaultFilterPassed = filter === void 0 && value != null; - const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter; - if (defaultFilterPassed || customFilterPassed) { - target[targetKey] = value; - } + /** + * Delete entry from collection. + * + * @param name Name of the entry to delete. + */ + removeField(name) { + delete this.entries[name.toLowerCase()]; } -}, "applyInstruction"); -var nonNullish = /* @__PURE__ */ __name((_) => _ != null, "nonNullish"); -var pass = /* @__PURE__ */ __name((_) => _, "pass"); - -// src/resolve-path.ts -var resolvedPath = /* @__PURE__ */ __name((resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { - if (input != null && input[memberName] !== void 0) { - const labelValue = labelValueProvider(); - if (labelValue.length <= 0) { - throw new Error("Empty value provided for input HTTP label: " + memberName + "."); - } - resolvedPath2 = resolvedPath2.replace( - uriLabel, - isGreedyLabel ? labelValue.split("/").map((segment) => extendedEncodeURIComponent(segment)).join("/") : extendedEncodeURIComponent(labelValue) - ); - } else { - throw new Error("No value provided for input HTTP label: " + memberName + "."); + /** + * Helper function for retrieving specific types of fields. + * Used to grab all headers or all trailers. + * + * @param kind {@link FieldPosition} of entries to retrieve. + * @returns The {@link Field} entries with the specified + * {@link FieldPosition}. + */ + getByType(kind) { + return Object.values(this.entries).filter((field) => field.kind === kind); } - return resolvedPath2; -}, "resolvedPath"); +}; +__name(_Fields, "Fields"); +var Fields = _Fields; -// src/ser-utils.ts -var serializeFloat = /* @__PURE__ */ __name((value) => { - if (value !== value) { - return "NaN"; - } - switch (value) { - case Infinity: - return "Infinity"; - case -Infinity: - return "-Infinity"; - default: - return value; - } -}, "serializeFloat"); -var serializeDateTime = /* @__PURE__ */ __name((date) => date.toISOString().replace(".000Z", "Z"), "serializeDateTime"); +// src/httpRequest.ts -// src/serde-json.ts -var _json = /* @__PURE__ */ __name((obj) => { - if (obj == null) { - return {}; +var _HttpRequest = class _HttpRequest { + 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; } - if (Array.isArray(obj)) { - return obj.filter((_) => _ != null).map(_json); + /** + * Note: this does not deep-clone the body. + */ + static clone(request) { + const cloned = new _HttpRequest({ + ...request, + headers: { ...request.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; } - if (typeof obj === "object") { - const target = {}; - for (const key of Object.keys(obj)) { - if (obj[key] == null) { - continue; - } - target[key] = _json(obj[key]); + /** + * This method only actually asserts that request is the interface {@link IHttpRequest}, + * and not necessarily this concrete class. Left in place for API stability. + * + * Do not call instance methods on the input of this function, and + * do not assume it has the HttpRequest prototype. + */ + static isInstance(request) { + if (!request) { + return false; } - return target; + const req = request; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; } - return obj; -}, "_json"); + /** + * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call + * this method because {@link HttpRequest.isInstance} incorrectly + * asserts that IHttpRequest (interface) objects are of type HttpRequest (class). + */ + clone() { + return _HttpRequest.clone(this); + } +}; +__name(_HttpRequest, "HttpRequest"); +var HttpRequest = _HttpRequest; +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); +} +__name(cloneQuery, "cloneQuery"); -// src/split-every.ts -function splitEvery(value, delimiter, numDelimiters) { - if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { - throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); +// src/httpResponse.ts +var _HttpResponse = class _HttpResponse { + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; } - const segments = value.split(delimiter); - if (numDelimiters === 1) { - return segments; + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; } - const compoundSegments = []; - let currentSegment = ""; - for (let i = 0; i < segments.length; i++) { - if (currentSegment === "") { - currentSegment = segments[i]; +}; +__name(_HttpResponse, "HttpResponse"); +var HttpResponse = _HttpResponse; + +// src/isValidHostname.ts +function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); +} +__name(isValidHostname, "isValidHostname"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); + + + +/***/ }), + +/***/ 1163: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + buildQueryString: () => buildQueryString +}); +module.exports = __toCommonJS(src_exports); +var import_util_uri_escape = __nccwpck_require__(7117); +function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = (0, import_util_uri_escape.escapeUri)(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length; i < iLen; i++) { + parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`); + } } else { - currentSegment += delimiter + segments[i]; - } - if ((i + 1) % numDelimiters === 0) { - compoundSegments.push(currentSegment); - currentSegment = ""; + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`; + } + parts.push(qsEntry); } } - if (currentSegment !== "") { - compoundSegments.push(currentSegment); - } - return compoundSegments; + return parts.join("&"); } -__name(splitEvery, "splitEvery"); +__name(buildQueryString, "buildQueryString"); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -59140,7 +28089,7 @@ __name(splitEvery, "splitEvery"); /***/ }), -/***/ 90690: +/***/ 809: /***/ ((module) => { var __defProp = Object.defineProperty; @@ -59285,14 +28234,14 @@ var RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => { /***/ }), -/***/ 72674: +/***/ 2507: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fromBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(44151); +const util_buffer_from_1 = __nccwpck_require__(6134); const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; const fromBase64 = (input) => { if ((input.length * 3) % 4 !== 0) { @@ -59309,7 +28258,7 @@ exports.fromBase64 = fromBase64; /***/ }), -/***/ 68385: +/***/ 7030: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; @@ -59330,8 +28279,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; module.exports = __toCommonJS(src_exports); -__reExport(src_exports, __nccwpck_require__(72674), module.exports); -__reExport(src_exports, __nccwpck_require__(14871), module.exports); +__reExport(src_exports, __nccwpck_require__(2507), module.exports); +__reExport(src_exports, __nccwpck_require__(6398), module.exports); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -59340,15 +28289,15 @@ __reExport(src_exports, __nccwpck_require__(14871), module.exports); /***/ }), -/***/ 14871: +/***/ 6398: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(44151); -const util_utf8_1 = __nccwpck_require__(71577); +const util_buffer_from_1 = __nccwpck_require__(6134); +const util_utf8_1 = __nccwpck_require__(1918); const toBase64 = (_input) => { let input; if (typeof _input === "string") { @@ -59367,47 +28316,7 @@ exports.toBase64 = toBase64; /***/ }), -/***/ 13638: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var node_fs = __nccwpck_require__(73024); - -const 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 node_fs.ReadStream) { - if (body.path != null) { - return node_fs.lstatSync(body.path).size; - } - else if (typeof body.fd === "number") { - return node_fs.fstatSync(body.fd).size; - } - } - throw new Error(`Body Length computation failed for ${body}`); -}; - -exports.calculateBodyLength = calculateBodyLength; - - -/***/ }), - -/***/ 44151: +/***/ 6134: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; @@ -59436,8 +28345,8 @@ __export(src_exports, { fromString: () => fromString }); module.exports = __toCommonJS(src_exports); -var import_is_array_buffer = __nccwpck_require__(86130); -var import_buffer = __nccwpck_require__(20181); +var import_is_array_buffer = __nccwpck_require__(929); +var import_buffer = __nccwpck_require__(181); var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { if (!(0, import_is_array_buffer.isArrayBuffer)(input)) { throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); @@ -59458,623 +28367,773 @@ var fromString = /* @__PURE__ */ __name((input, encoding) => { /***/ }), -/***/ 56716: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - +/***/ 7608: +/***/ ((module) => { -const booleanSelector = (obj, key, type) => { - if (!(key in obj)) - return undefined; - 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 __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; }; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -const numberSelector = (obj, key, type) => { - if (!(key in obj)) - return undefined; - const numberValue = parseInt(obj[key], 10); - if (Number.isNaN(numberValue)) { - throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); +// src/index.ts +var src_exports = {}; +__export(src_exports, { + fromHex: () => fromHex, + toHex: () => toHex +}); +module.exports = __toCommonJS(src_exports); +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 numberValue; -}; + } + return out; +} +__name(fromHex, "fromHex"); +function toHex(bytes) { + let out = ""; + for (let i = 0; i < bytes.byteLength; i++) { + out += SHORT_TO_HEX[bytes[i]]; + } + return out; +} +__name(toHex, "toHex"); +// Annotate the CommonJS export names for ESM import in node: -exports.SelectorType = void 0; -(function (SelectorType) { - SelectorType["ENV"] = "env"; - SelectorType["CONFIG"] = "shared config entry"; -})(exports.SelectorType || (exports.SelectorType = {})); +0 && (0); -exports.booleanSelector = booleanSelector; -exports.numberSelector = numberSelector; /***/ }), -/***/ 15435: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 4822: +/***/ ((__unused_webpack_module, exports) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ChecksumStream = void 0; +const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function () { }; +class ChecksumStream extends ReadableStreamRef { +} +exports.ChecksumStream = ChecksumStream; -var configResolver = __nccwpck_require__(39316); -var nodeConfigProvider = __nccwpck_require__(78257); -var propertyProvider = __nccwpck_require__(94377); -const AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; -const AWS_REGION_ENV = "AWS_REGION"; -const AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; -const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; -const DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; -const IMDS_REGION_PATH = "/latest/meta-data/placement/region"; +/***/ }), -const AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; -const AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; -const NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { - return env[AWS_DEFAULTS_MODE_ENV]; - }, - configFileSelector: (profile) => { - return profile[AWS_DEFAULTS_MODE_CONFIG]; - }, - default: "legacy", -}; +/***/ 4000: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -const resolveDefaultsModeConfig = ({ region = nodeConfigProvider.loadConfig(configResolver.NODE_REGION_CONFIG_OPTIONS), defaultsMode = nodeConfigProvider.loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS), } = {}) => propertyProvider.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}`); - } -}); -const 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"; +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ChecksumStream = void 0; +const util_base64_1 = __nccwpck_require__(7030); +const stream_1 = __nccwpck_require__(2203); +class ChecksumStream extends stream_1.Duplex { + constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) { + var _a, _b; + super(); + if (typeof source.pipe === "function") { + this.source = source; } else { - return "cross-region"; + throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`); } + this.base64Encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64; + this.expectedChecksum = expectedChecksum; + this.checksum = checksum; + this.checksumSourceLocation = checksumSourceLocation; + this.source.pipe(this); } - return "standard"; -}; -const 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]; + _read(size) { } + _write(chunk, encoding, callback) { + try { + this.checksum.update(chunk); + this.push(chunk); + } + catch (e) { + return callback(e); + } + return callback(); } - if (!process.env[ENV_IMDS_DISABLED]) { + async _final(callback) { try { - const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve(/* import() */).then(__nccwpck_require__.t.bind(__nccwpck_require__, 40566, 19)); - const endpoint = await getInstanceMetadataEndpoint(); - return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString(); + const digest = await this.checksum.digest(); + const received = this.base64Encoder(digest); + if (this.expectedChecksum !== received) { + return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + + ` in response header "${this.checksumSourceLocation}".`)); + } } catch (e) { + return callback(e); } + this.push(null); + return callback(); } -}; - -exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig; +} +exports.ChecksumStream = ChecksumStream; /***/ }), -/***/ 78257: +/***/ 9066: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createChecksumStream = void 0; +const util_base64_1 = __nccwpck_require__(7030); +const stream_type_check_1 = __nccwpck_require__(4005); +const ChecksumStream_browser_1 = __nccwpck_require__(4822); +const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => { + var _a, _b; + if (!(0, stream_type_check_1.isReadableStream)(source)) { + throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`); + } + const encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.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_browser_1.ChecksumStream.prototype); + return readable; +}; +exports.createChecksumStream = createChecksumStream; + -var propertyProvider = __nccwpck_require__(94377); -var sharedIniFileLoader = __nccwpck_require__(59645); +/***/ }), -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 (e) { - return functionString; +/***/ 8231: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createChecksumStream = void 0; +const stream_type_check_1 = __nccwpck_require__(4005); +const ChecksumStream_1 = __nccwpck_require__(4000); +const createChecksumStream_browser_1 = __nccwpck_require__(9066); +function createChecksumStream(init) { + if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { + return (0, createChecksumStream_browser_1.createChecksumStream)(init); } + return new ChecksumStream_1.ChecksumStream(init); } +exports.createChecksumStream = createChecksumStream; -const fromEnv = (envVarSelector, options) => async () => { - try { - const config = envVarSelector(process.env, options); - if (config === undefined) { - throw new Error(); - } - return config; - } - catch (e) { - throw new propertyProvider.CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger }); - } -}; -const fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { - const profile = sharedIniFileLoader.getProfileName(init); - const { configFile, credentialsFile } = await sharedIniFileLoader.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(); +/***/ }), + +/***/ 6253: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getAwsChunkedEncodingStream = void 0; +const stream_1 = __nccwpck_require__(2203); +const getAwsChunkedEncodingStream = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== undefined && + checksumAlgorithmFn !== undefined && + checksumLocationName !== undefined && + streamHasher !== undefined; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; + const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } }); + readableStream.on("data", (data) => { + const length = bodyLengthChecker(data) || 0; + awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); + awsChunkedEncodingStream.push(data); + awsChunkedEncodingStream.push("\r\n"); + }); + readableStream.on("end", async () => { + awsChunkedEncodingStream.push(`0\r\n`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); + awsChunkedEncodingStream.push(`\r\n`); } - return configValue; - } - catch (e) { - throw new propertyProvider.CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger }); - } + awsChunkedEncodingStream.push(null); + }); + return awsChunkedEncodingStream; }; +exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; -const isFunction = (func) => typeof func === "function"; -const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue); -const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { - const { signingName, logger } = configuration; - const envOptions = { signingName, logger }; - return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))); -}; +/***/ }), -exports.loadConfig = loadConfig; +/***/ 8287: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.headStream = void 0; +async function headStream(stream, bytes) { + var _a; + 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 += (_a = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a !== void 0 ? _a : 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; +} +exports.headStream = headStream; /***/ }), -/***/ 94377: -/***/ ((__unused_webpack_module, exports) => { +/***/ 190: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -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}`); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.headStream = void 0; +const stream_1 = __nccwpck_require__(2203); +const headStream_browser_1 = __nccwpck_require__(8287); +const stream_type_check_1 = __nccwpck_require__(4005); +const headStream = (stream, bytes) => { + if ((0, stream_type_check_1.isReadableStream)(stream)) { + return (0, headStream_browser_1.headStream)(stream, bytes); } - static from(error, options = true) { - return Object.assign(new this(error.message, options), error); + return new Promise((resolve, reject) => { + const collector = new Collector(); + collector.limit = bytes; + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function () { + const bytes = new Uint8Array(Buffer.concat(this.buffers)); + resolve(bytes); + }); + }); +}; +exports.headStream = headStream; +class Collector extends stream_1.Writable { + constructor() { + super(...arguments); + this.buffers = []; + this.limit = Infinity; + this.bytesBuffered = 0; } -} - -class CredentialsProviderError extends ProviderError { - name = "CredentialsProviderError"; - constructor(message, options = true) { - super(message, options); - Object.setPrototypeOf(this, CredentialsProviderError.prototype); + _write(chunk, encoding, callback) { + var _a; + this.buffers.push(chunk); + this.bytesBuffered += (_a = chunk.byteLength) !== null && _a !== void 0 ? _a : 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(); } } -class TokenProviderError extends ProviderError { - name = "TokenProviderError"; - constructor(message, options = true) { - super(message, options); - Object.setPrototypeOf(this, TokenProviderError.prototype); - } -} -const 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; +/***/ }), + +/***/ 1975: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; }; +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); +// src/index.ts +var src_exports = {}; +__export(src_exports, { + Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter +}); +module.exports = __toCommonJS(src_exports); -const 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; - }; +// src/blob/transforms.ts +var import_util_base64 = __nccwpck_require__(7030); +var import_util_utf8 = __nccwpck_require__(1918); +function transformToString(payload, encoding = "utf-8") { + if (encoding === "base64") { + return (0, import_util_base64.toBase64)(payload); + } + return (0, import_util_utf8.toUtf8)(payload); +} +__name(transformToString, "transformToString"); +function transformFromString(str, encoding) { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str)); + } + return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str)); +} +__name(transformFromString, "transformFromString"); + +// src/blob/Uint8ArrayBlobAdapter.ts +var _Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array { + /** + * @param source - such as a string or Stream. + * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. + */ + static fromString(source, encoding = "utf-8") { + switch (typeof source) { + case "string": + return transformFromString(source, encoding); + default: + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); } - 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; - }; + } + /** + * @param source - Uint8Array to be mutated. + * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. + */ + static mutate(source) { + Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype); + return source; + } + /** + * @param encoding - default 'utf-8'. + * @returns the blob as string. + */ + transformToString(encoding = "utf-8") { + return transformToString(this, encoding); + } }; +__name(_Uint8ArrayBlobAdapter, "Uint8ArrayBlobAdapter"); +var Uint8ArrayBlobAdapter = _Uint8ArrayBlobAdapter; + +// src/index.ts +__reExport(src_exports, __nccwpck_require__(6253), module.exports); +__reExport(src_exports, __nccwpck_require__(4676), module.exports); +__reExport(src_exports, __nccwpck_require__(3107), module.exports); +__reExport(src_exports, __nccwpck_require__(190), module.exports); +__reExport(src_exports, __nccwpck_require__(4005), module.exports); +__reExport(src_exports, __nccwpck_require__(8231), module.exports); +__reExport(src_exports, __nccwpck_require__(4000), module.exports); +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; /***/ }), -/***/ 45819: +/***/ 9738: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __nccwpck_require__(70857); -const path_1 = __nccwpck_require__(16928); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; +exports.sdkStreamMixin = void 0; +const fetch_http_handler_1 = __nccwpck_require__(9388); +const util_base64_1 = __nccwpck_require__(7030); +const util_hex_encoding_1 = __nccwpck_require__(7608); +const util_utf8_1 = __nccwpck_require__(1918); +const stream_type_check_1 = __nccwpck_require__(4005); +const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; +const sdkStreamMixin = (stream) => { + var _a, _b; + if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) { + const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); } - return "DEFAULT"; -}; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, fetch_http_handler_1.streamCollector)(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.\n" + + "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: transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return (0, util_base64_1.toBase64)(buf); + } + else if (encoding === "hex") { + return (0, util_hex_encoding_1.toHex)(buf); + } + else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { + return (0, util_utf8_1.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); + } + transformed = true; + if (isBlobInstance(stream)) { + return blobToWebStream(stream); + } + else if ((0, stream_type_check_1.isReadableStream)(stream)) { + return stream; + } + else { + throw new Error(`Cannot transform payload to web stream, got ${stream}`); + } + }, + }); }; -exports.getHomeDir = getHomeDir; +exports.sdkStreamMixin = sdkStreamMixin; +const isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; /***/ }), -/***/ 2824: +/***/ 4676: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __nccwpck_require__(76982); -const path_1 = __nccwpck_require__(16928); -const getHomeDir_1 = __nccwpck_require__(45819); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); +exports.sdkStreamMixin = void 0; +const node_http_handler_1 = __nccwpck_require__(3992); +const util_buffer_from_1 = __nccwpck_require__(6134); +const stream_1 = __nccwpck_require__(2203); +const sdk_stream_mixin_browser_1 = __nccwpck_require__(9738); +const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; +const sdkStreamMixin = (stream) => { + var _a, _b; + if (!(stream instanceof stream_1.Readable)) { + try { + return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); + } + catch (e) { + const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.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 (0, node_http_handler_1.streamCollector)(stream); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === undefined || Buffer.isEncoding(encoding)) { + return (0, util_buffer_from_1.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 stream_1.Readable.toWeb !== "function") { + throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available."); + } + transformed = true; + return stream_1.Readable.toWeb(stream); + }, + }); }; -exports.getSSOTokenFilepath = getSSOTokenFilepath; +exports.sdkStreamMixin = sdkStreamMixin; /***/ }), -/***/ 60127: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 7005: +/***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; -const fs_1 = __nccwpck_require__(79896); -const getSSOTokenFilepath_1 = __nccwpck_require__(2824); -const { readFile } = fs_1.promises; -exports.tokenIntercept = {}; -const getSSOTokenFromFile = async (id) => { - if (exports.tokenIntercept[id]) { - return exports.tokenIntercept[id]; +exports.splitStream = void 0; +async function splitStream(stream) { + if (typeof stream.stream === "function") { + stream = stream.stream(); } - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); -}; -exports.getSSOTokenFromFile = getSSOTokenFromFile; + const readableStream = stream; + return readableStream.tee(); +} +exports.splitStream = splitStream; /***/ }), -/***/ 59645: +/***/ 3107: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -var getHomeDir = __nccwpck_require__(45819); -var getSSOTokenFilepath = __nccwpck_require__(2824); -var getSSOTokenFromFile = __nccwpck_require__(60127); -var path = __nccwpck_require__(16928); -var types = __nccwpck_require__(79969); -var slurpFile = __nccwpck_require__(45103); - -const ENV_PROFILE = "AWS_PROFILE"; -const DEFAULT_PROFILE = "default"; -const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; - -const CONFIG_PREFIX_SEPARATOR = "."; - -const getConfigData = (data) => Object.entries(data) - .filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; - } - return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}) - .reduce((acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; -}, { - ...(data.default && { default: data.default }), -}); - -const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); - -const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); - -const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -const profileNameBlockList = ["__proto__", "profile __proto__"]; -const 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(types.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; -}; - -const swallowError$1 = () => ({}); -const loadSharedConfigFiles = async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = getHomeDir.getHomeDir(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = path.join(homeDir, filepath.slice(2)); - } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.splitStream = void 0; +const stream_1 = __nccwpck_require__(2203); +const splitStream_browser_1 = __nccwpck_require__(7005); +const stream_type_check_1 = __nccwpck_require__(4005); +async function splitStream(stream) { + if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) { + return (0, splitStream_browser_1.splitStream)(stream); } - const parsedFiles = await Promise.all([ - slurpFile.slurpFile(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .then(getConfigData) - .catch(swallowError$1), - slurpFile.slurpFile(resolvedFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .catch(swallowError$1), - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1], - }; -}; + const stream1 = new stream_1.PassThrough(); + const stream2 = new stream_1.PassThrough(); + stream.pipe(stream1); + stream.pipe(stream2); + return [stream1, stream2]; +} +exports.splitStream = splitStream; -const getSsoSessionData = (data) => Object.entries(data) - .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) - .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); -const swallowError = () => ({}); -const loadSsoSessionData = async (init = {}) => slurpFile.slurpFile(init.configFilepath ?? getConfigFilepath()) - .then(parseIni) - .then(getSsoSessionData) - .catch(swallowError); +/***/ }), -const 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; -}; +/***/ 4005: +/***/ ((__unused_webpack_module, exports) => { -const parseKnownFiles = async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isBlob = exports.isReadableStream = void 0; +const isReadableStream = (stream) => { + var _a; + return typeof ReadableStream === "function" && + (((_a = stream === null || stream === void 0 ? void 0 : stream.constructor) === null || _a === void 0 ? void 0 : _a.name) === ReadableStream.name || stream instanceof ReadableStream); +}; +exports.isReadableStream = isReadableStream; +const isBlob = (blob) => { + var _a; + return typeof Blob === "function" && (((_a = blob === null || blob === void 0 ? void 0 : blob.constructor) === null || _a === void 0 ? void 0 : _a.name) === Blob.name || blob instanceof Blob); }; +exports.isBlob = isBlob; -const externalDataInterceptor = { - getFileRecord() { - return slurpFile.fileIntercept; - }, - interceptFile(path, contents) { - slurpFile.fileIntercept[path] = Promise.resolve(contents); - }, - getTokenRecord() { - return getSSOTokenFromFile.tokenIntercept; - }, - interceptToken(id, contents) { - getSSOTokenFromFile.tokenIntercept[id] = contents; - }, + +/***/ }), + +/***/ 7117: +/***/ ((module) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; }; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -Object.defineProperty(exports, "getSSOTokenFromFile", ({ - enumerable: true, - get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } -})); -exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; -exports.DEFAULT_PROFILE = DEFAULT_PROFILE; -exports.ENV_PROFILE = ENV_PROFILE; -exports.externalDataInterceptor = externalDataInterceptor; -exports.getProfileName = getProfileName; -exports.loadSharedConfigFiles = loadSharedConfigFiles; -exports.loadSsoSessionData = loadSsoSessionData; -exports.parseKnownFiles = parseKnownFiles; -Object.keys(getHomeDir).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getHomeDir[k]; } - }); -}); -Object.keys(getSSOTokenFilepath).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getSSOTokenFilepath[k]; } - }); +// src/index.ts +var src_exports = {}; +__export(src_exports, { + escapeUri: () => escapeUri, + escapeUriPath: () => escapeUriPath }); +module.exports = __toCommonJS(src_exports); +// src/escape-uri.ts +var escapeUri = /* @__PURE__ */ __name((uri) => ( + // AWS percent-encodes some extra non-standard characters in a URI + encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode) +), "escapeUri"); +var hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); -/***/ }), +// src/escape-uri-path.ts +var escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split("/").map(escapeUri).join("/"), "escapeUriPath"); +// Annotate the CommonJS export names for ESM import in node: -/***/ 45103: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +0 && (0); -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = void 0; -const fs_1 = __nccwpck_require__(79896); -const { readFile } = fs_1.promises; -exports.filePromisesHash = {}; -exports.fileIntercept = {}; -const slurpFile = (path, options) => { - if (exports.fileIntercept[path] !== undefined) { - return exports.fileIntercept[path]; - } - if (!exports.filePromisesHash[path] || options?.ignoreCache) { - exports.filePromisesHash[path] = readFile(path, "utf8"); - } - return exports.filePromisesHash[path]; + +/***/ }), + +/***/ 1918: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); }; -exports.slurpFile = slurpFile; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + fromUtf8: () => fromUtf8, + toUint8Array: () => toUint8Array, + toUtf8: () => toUtf8 +}); +module.exports = __toCommonJS(src_exports); + +// src/fromUtf8.ts +var import_util_buffer_from = __nccwpck_require__(6134); +var fromUtf8 = /* @__PURE__ */ __name((input) => { + const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); +}, "fromUtf8"); + +// src/toUint8Array.ts +var toUint8Array = /* @__PURE__ */ __name((data) => { + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +}, "toUint8Array"); + +// src/toUtf8.ts + +var toUtf8 = /* @__PURE__ */ __name((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 (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); +}, "toUtf8"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); + /***/ }), -/***/ 79969: +/***/ 690: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -60173,13 +29232,348 @@ exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; /***/ }), -/***/ 79674: +/***/ 4494: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var querystringParser = __nccwpck_require__(8822); + +const parseUrl = (url) => { + if (typeof url === "string") { + return parseUrl(new URL(url)); + } + const { hostname, pathname, port, protocol, search } = url; + let query; + if (search) { + query = querystringParser.parseQueryString(search); + } + return { + hostname, + port: port ? parseInt(port) : undefined, + protocol, + path: pathname, + query, + }; +}; + +exports.parseUrl = parseUrl; + + +/***/ }), + +/***/ 2674: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromBase64 = void 0; +const util_buffer_from_1 = __nccwpck_require__(4151); +const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; +const 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 = (0, util_buffer_from_1.fromString)(input, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); +}; +exports.fromBase64 = fromBase64; + + +/***/ }), + +/***/ 8385: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var fromBase64 = __nccwpck_require__(2674); +var toBase64 = __nccwpck_require__(4871); + + + +Object.keys(fromBase64).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return fromBase64[k]; } + }); +}); +Object.keys(toBase64).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return toBase64[k]; } + }); +}); + + +/***/ }), + +/***/ 4871: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toBase64 = void 0; +const util_buffer_from_1 = __nccwpck_require__(4151); +const util_utf8_1 = __nccwpck_require__(1577); +const toBase64 = (_input) => { + let input; + if (typeof _input === "string") { + input = (0, util_utf8_1.fromUtf8)(_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 (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); +}; +exports.toBase64 = toBase64; + + +/***/ }), + +/***/ 2098: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +const TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; +const calculateBodyLength = (body) => { + if (typeof body === "string") { + if (TEXT_ENCODER) { + return TEXT_ENCODER.encode(body).byteLength; + } + let len = body.length; + for (let i = len - 1; i >= 0; i--) { + const code = body.charCodeAt(i); + if (code > 0x7f && code <= 0x7ff) + len++; + else if (code > 0x7ff && code <= 0xffff) + len += 2; + if (code >= 0xdc00 && code <= 0xdfff) + i--; + } + return len; + } + else if (typeof body.byteLength === "number") { + return body.byteLength; + } + else if (typeof body.size === "number") { + return body.size; + } + throw new Error(`Body Length computation failed for ${body}`); +}; + +exports.calculateBodyLength = calculateBodyLength; + + +/***/ }), + +/***/ 3638: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var node_fs = __nccwpck_require__(3024); + +const 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 node_fs.ReadStream) { + if (body.path != null) { + return node_fs.lstatSync(body.path).size; + } + else if (typeof body.fd === "number") { + return node_fs.fstatSync(body.fd).size; + } + } + throw new Error(`Body Length computation failed for ${body}`); +}; + +exports.calculateBodyLength = calculateBodyLength; + + +/***/ }), + +/***/ 4151: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var isArrayBuffer = __nccwpck_require__(6130); +var buffer = __nccwpck_require__(181); + +const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { + if (!isArrayBuffer.isArrayBuffer(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + } + return buffer.Buffer.from(input, offset, length); +}; +const 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.Buffer.from(input, encoding) : buffer.Buffer.from(input); +}; + +exports.fromArrayBuffer = fromArrayBuffer; +exports.fromString = fromString; + + +/***/ }), + +/***/ 6716: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +const booleanSelector = (obj, key, type) => { + if (!(key in obj)) + return undefined; + 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]}.`); +}; + +const numberSelector = (obj, key, type) => { + if (!(key in obj)) + return undefined; + const numberValue = parseInt(obj[key], 10); + if (Number.isNaN(numberValue)) { + throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); + } + return numberValue; +}; + +exports.SelectorType = void 0; +(function (SelectorType) { + SelectorType["ENV"] = "env"; + SelectorType["CONFIG"] = "shared config entry"; +})(exports.SelectorType || (exports.SelectorType = {})); + +exports.booleanSelector = booleanSelector; +exports.numberSelector = numberSelector; + + +/***/ }), + +/***/ 5435: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var configResolver = __nccwpck_require__(9316); +var nodeConfigProvider = __nccwpck_require__(5704); +var propertyProvider = __nccwpck_require__(1238); + +const AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; +const AWS_REGION_ENV = "AWS_REGION"; +const AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; +const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +const DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; +const IMDS_REGION_PATH = "/latest/meta-data/placement/region"; + +const AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; +const AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; +const NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + return env[AWS_DEFAULTS_MODE_ENV]; + }, + configFileSelector: (profile) => { + return profile[AWS_DEFAULTS_MODE_CONFIG]; + }, + default: "legacy", +}; + +const resolveDefaultsModeConfig = ({ region = nodeConfigProvider.loadConfig(configResolver.NODE_REGION_CONFIG_OPTIONS), defaultsMode = nodeConfigProvider.loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS), } = {}) => propertyProvider.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}`); + } +}); +const 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"; +}; +const 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]; + } + if (!process.env[ENV_IMDS_DISABLED]) { + try { + const { getInstanceMetadataEndpoint, httpRequest } = await __nccwpck_require__.e(/* import() */ 566).then(__nccwpck_require__.t.bind(__nccwpck_require__, 566, 19)); + const endpoint = await getInstanceMetadataEndpoint(); + return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString(); + } + catch (e) { + } + } +}; + +exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig; + + +/***/ }), + +/***/ 9674: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var types = __nccwpck_require__(55430); +var types = __nccwpck_require__(690); class EndpointCache { capacity; @@ -60653,183 +30047,82 @@ exports.resolveEndpoint = resolveEndpoint; /***/ }), -/***/ 55430: +/***/ 6435: /***/ ((__unused_webpack_module, exports) => { "use strict"; -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); +const SHORT_TO_HEX = {}; +const HEX_TO_SHORT = {}; +for (let i = 0; i < 256; i++) { + let encodedByte = i.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); + 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"); } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; + 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; +} -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); +exports.fromHex = fromHex; +exports.toHex = toHex; -const SMITHY_CONTEXT_KEY = "__smithy_context"; -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); +/***/ }), -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); +/***/ 6324: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; +"use strict"; -/***/ }), +var types = __nccwpck_require__(690); -/***/ 96435: -/***/ ((module) => { +const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; +const normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; }; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - fromHex: () => fromHex, - toHex: () => toHex -}); -module.exports = __toCommonJS(src_exports); -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; -} -__name(fromHex, "fromHex"); -function toHex(bytes) { - let out = ""; - for (let i = 0; i < bytes.byteLength; i++) { - out += SHORT_TO_HEX[bytes[i]]; - } - return out; -} -__name(toHex, "toHex"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); +exports.getSmithyContext = getSmithyContext; +exports.normalizeProvider = normalizeProvider; /***/ }), -/***/ 15518: +/***/ 5518: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var serviceErrorClassification = __nccwpck_require__(42058); +var serviceErrorClassification = __nccwpck_require__(2058); exports.RETRY_MODES = void 0; (function (RETRY_MODES) { @@ -61109,7 +30402,51 @@ exports.TIMEOUT_RETRY_COST = TIMEOUT_RETRY_COST; /***/ }), -/***/ 87753: +/***/ 1732: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ByteArrayCollector = void 0; +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; + } +} +exports.ByteArrayCollector = ByteArrayCollector; + + +/***/ }), + +/***/ 7753: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -61124,26 +30461,30 @@ exports.ChecksumStream = ChecksumStream; /***/ }), -/***/ 71775: +/***/ 1775: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(68385); +const util_base64_1 = __nccwpck_require__(8385); const stream_1 = __nccwpck_require__(2203); class ChecksumStream extends stream_1.Duplex { + expectedChecksum; + checksumSourceLocation; + checksum; + source; + base64Encoder; constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) { - var _a, _b; super(); if (typeof source.pipe === "function") { this.source = source; } else { - throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`); + throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); } - this.base64Encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64; + this.base64Encoder = base64Encoder ?? util_base64_1.toBase64; this.expectedChecksum = expectedChecksum; this.checksum = checksum; this.checksumSourceLocation = checksumSourceLocation; @@ -61181,22 +30522,21 @@ exports.ChecksumStream = ChecksumStream; /***/ }), -/***/ 94129: +/***/ 4129: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(68385); +const util_base64_1 = __nccwpck_require__(8385); const stream_type_check_1 = __nccwpck_require__(4414); -const ChecksumStream_browser_1 = __nccwpck_require__(87753); +const ChecksumStream_browser_1 = __nccwpck_require__(7753); const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => { - var _a, _b; if (!(0, stream_type_check_1.isReadableStream)(source)) { - throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`); + throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); } - const encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64; + const encoder = base64Encoder ?? util_base64_1.toBase64; if (typeof TransformStream !== "function") { throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); } @@ -61235,17 +30575,195 @@ exports.createChecksumStream = createChecksumStream; "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = void 0; +exports.createChecksumStream = createChecksumStream; const stream_type_check_1 = __nccwpck_require__(4414); -const ChecksumStream_1 = __nccwpck_require__(71775); -const createChecksumStream_browser_1 = __nccwpck_require__(94129); +const ChecksumStream_1 = __nccwpck_require__(1775); +const createChecksumStream_browser_1 = __nccwpck_require__(4129); function createChecksumStream(init) { if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { return (0, createChecksumStream_browser_1.createChecksumStream)(init); } return new ChecksumStream_1.ChecksumStream(init); } -exports.createChecksumStream = createChecksumStream; + + +/***/ }), + +/***/ 2005: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createBufferedReadable = createBufferedReadable; +const node_stream_1 = __nccwpck_require__(7075); +const ByteArrayCollector_1 = __nccwpck_require__(1732); +const createBufferedReadableStream_1 = __nccwpck_require__(8213); +const stream_type_check_1 = __nccwpck_require__(4414); +function createBufferedReadable(upstream, size, logger) { + if ((0, stream_type_check_1.isReadableStream)(upstream)) { + return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger); + } + const downstream = new node_stream_1.Readable({ read() { } }); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = [ + "", + new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)), + new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))), + ]; + let mode = -1; + upstream.on("data", (chunk) => { + const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); + if (mode !== chunkMode) { + if (mode >= 0) { + downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + downstream.push(chunk); + return; + } + const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); + bytesSeen += chunkSize; + const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + downstream.push(chunk); + } + else { + const newSize = (0, createBufferedReadableStream_1.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((0, createBufferedReadableStream_1.flush)(buffers, mode)); + } + } + }); + upstream.on("end", () => { + if (mode !== -1) { + const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); + if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { + downstream.push(remainder); + } + } + downstream.push(null); + }); + return downstream; +} + + +/***/ }), + +/***/ 8213: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createBufferedReadable = void 0; +exports.createBufferedReadableStream = createBufferedReadableStream; +exports.merge = merge; +exports.flush = flush; +exports.sizeOf = sizeOf; +exports.modeOf = modeOf; +const ByteArrayCollector_1 = __nccwpck_require__(1732); +function createBufferedReadableStream(upstream, size, logger) { + const reader = upstream.getReader(); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = ["", new ByteArrayCollector_1.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, + }); +} +exports.createBufferedReadable = createBufferedReadableStream; +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; +} /***/ }), @@ -61288,15 +30806,14 @@ exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; /***/ }), -/***/ 80066: +/***/ 66: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = void 0; +exports.headStream = headStream; async function headStream(stream, bytes) { - var _a; let byteLengthCounter = 0; const chunks = []; const reader = stream.getReader(); @@ -61305,7 +30822,7 @@ async function headStream(stream, bytes) { const { done, value } = await reader.read(); if (value) { chunks.push(value); - byteLengthCounter += (_a = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a !== void 0 ? _a : 0; + byteLengthCounter += value?.byteLength ?? 0; } if (byteLengthCounter >= bytes) { break; @@ -61327,12 +30844,11 @@ async function headStream(stream, bytes) { } return collected; } -exports.headStream = headStream; /***/ }), -/***/ 88412: +/***/ 8412: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -61340,7 +30856,7 @@ exports.headStream = headStream; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.headStream = void 0; const stream_1 = __nccwpck_require__(2203); -const headStream_browser_1 = __nccwpck_require__(80066); +const headStream_browser_1 = __nccwpck_require__(66); const stream_type_check_1 = __nccwpck_require__(4414); const headStream = (stream, bytes) => { if ((0, stream_type_check_1.isReadableStream)(stream)) { @@ -61363,16 +30879,12 @@ const headStream = (stream, bytes) => { }; exports.headStream = headStream; class Collector extends stream_1.Writable { - constructor() { - super(...arguments); - this.buffers = []; - this.limit = Infinity; - this.bytesBuffered = 0; - } + buffers = []; + limit = Infinity; + bytesBuffered = 0; _write(chunk, encoding, callback) { - var _a; this.buffers.push(chunk); - this.bytesBuffered += (_a = chunk.byteLength) !== null && _a !== void 0 ? _a : 0; + this.bytesBuffered += chunk.byteLength ?? 0; if (this.bytesBuffered >= this.limit) { const excess = this.bytesBuffered - this.limit; const tailBuffer = this.buffers[this.buffers.length - 1]; @@ -61387,119 +30899,113 @@ class Collector extends stream_1.Writable { /***/ }), /***/ 4252: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +"use strict"; -// src/index.ts -var src_exports = {}; -__export(src_exports, { - Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter -}); -module.exports = __toCommonJS(src_exports); -// src/blob/transforms.ts -var import_util_base64 = __nccwpck_require__(68385); -var import_util_utf8 = __nccwpck_require__(71577); -function transformToString(payload, encoding = "utf-8") { - if (encoding === "base64") { - return (0, import_util_base64.toBase64)(payload); - } - return (0, import_util_utf8.toUtf8)(payload); -} -__name(transformToString, "transformToString"); -function transformFromString(str, encoding) { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str)); - } - return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str)); -} -__name(transformFromString, "transformFromString"); +var utilBase64 = __nccwpck_require__(8385); +var utilUtf8 = __nccwpck_require__(1577); +var ChecksumStream = __nccwpck_require__(1775); +var createChecksumStream = __nccwpck_require__(5639); +var createBufferedReadable = __nccwpck_require__(2005); +var getAwsChunkedEncodingStream = __nccwpck_require__(6522); +var headStream = __nccwpck_require__(8412); +var sdkStreamMixin = __nccwpck_require__(7201); +var splitStream = __nccwpck_require__(2108); +var streamTypeCheck = __nccwpck_require__(4414); -// src/blob/Uint8ArrayBlobAdapter.ts -var _Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array { - /** - * @param source - such as a string or Stream. - * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. - */ - static fromString(source, encoding = "utf-8") { - switch (typeof source) { - case "string": - return transformFromString(source, encoding); - default: +class Uint8ArrayBlobAdapter extends Uint8Array { + static fromString(source, encoding = "utf-8") { + if (typeof source === "string") { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source)); + } + return Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(source)); + } throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); } - } - /** - * @param source - Uint8Array to be mutated. - * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. - */ - static mutate(source) { - Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype); - return source; - } - /** - * @param encoding - default 'utf-8'. - * @returns the blob as string. - */ - transformToString(encoding = "utf-8") { - return transformToString(this, encoding); - } -}; -__name(_Uint8ArrayBlobAdapter, "Uint8ArrayBlobAdapter"); -var Uint8ArrayBlobAdapter = _Uint8ArrayBlobAdapter; - -// src/index.ts -__reExport(src_exports, __nccwpck_require__(6522), module.exports); -__reExport(src_exports, __nccwpck_require__(77201), module.exports); -__reExport(src_exports, __nccwpck_require__(82108), module.exports); -__reExport(src_exports, __nccwpck_require__(88412), module.exports); -__reExport(src_exports, __nccwpck_require__(4414), module.exports); -__reExport(src_exports, __nccwpck_require__(5639), module.exports); -__reExport(src_exports, __nccwpck_require__(71775), module.exports); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); + static mutate(source) { + Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype); + return source; + } + transformToString(encoding = "utf-8") { + if (encoding === "base64") { + return utilBase64.toBase64(this); + } + return utilUtf8.toUtf8(this); + } +} +exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter; +Object.keys(ChecksumStream).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return ChecksumStream[k]; } + }); +}); +Object.keys(createChecksumStream).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return createChecksumStream[k]; } + }); +}); +Object.keys(createBufferedReadable).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return createBufferedReadable[k]; } + }); +}); +Object.keys(getAwsChunkedEncodingStream).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return getAwsChunkedEncodingStream[k]; } + }); +}); +Object.keys(headStream).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return headStream[k]; } + }); +}); +Object.keys(sdkStreamMixin).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return sdkStreamMixin[k]; } + }); +}); +Object.keys(splitStream).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return splitStream[k]; } + }); +}); +Object.keys(streamTypeCheck).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return streamTypeCheck[k]; } + }); +}); /***/ }), -/***/ 82207: +/***/ 2207: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.sdkStreamMixin = void 0; -const fetch_http_handler_1 = __nccwpck_require__(47809); -const util_base64_1 = __nccwpck_require__(68385); -const util_hex_encoding_1 = __nccwpck_require__(96435); -const util_utf8_1 = __nccwpck_require__(71577); +const fetch_http_handler_1 = __nccwpck_require__(7809); +const util_base64_1 = __nccwpck_require__(8385); +const util_hex_encoding_1 = __nccwpck_require__(6435); +const util_utf8_1 = __nccwpck_require__(1577); const stream_type_check_1 = __nccwpck_require__(4414); const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; const sdkStreamMixin = (stream) => { - var _a, _b; if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) { - const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; + const name = stream?.__proto__?.constructor?.name || stream; throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); } let transformed = false; @@ -61560,26 +31066,25 @@ const isBlobInstance = (stream) => typeof Blob === "function" && stream instance /***/ }), -/***/ 77201: +/***/ 7201: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.sdkStreamMixin = void 0; -const node_http_handler_1 = __nccwpck_require__(61279); -const util_buffer_from_1 = __nccwpck_require__(44151); +const node_http_handler_1 = __nccwpck_require__(1279); +const util_buffer_from_1 = __nccwpck_require__(4151); const stream_1 = __nccwpck_require__(2203); -const sdk_stream_mixin_browser_1 = __nccwpck_require__(82207); +const sdk_stream_mixin_browser_1 = __nccwpck_require__(2207); const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; const sdkStreamMixin = (stream) => { - var _a, _b; if (!(stream instanceof stream_1.Readable)) { try { return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); } catch (e) { - const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; + const name = stream?.__proto__?.constructor?.name || stream; throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); } } @@ -61611,7 +31116,7 @@ const sdkStreamMixin = (stream) => { throw new Error("The stream has been consumed by other callbacks."); } if (typeof stream_1.Readable.toWeb !== "function") { - throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available."); + throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); } transformed = true; return stream_1.Readable.toWeb(stream); @@ -61623,13 +31128,13 @@ exports.sdkStreamMixin = sdkStreamMixin; /***/ }), -/***/ 17570: +/***/ 7570: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = void 0; +exports.splitStream = splitStream; async function splitStream(stream) { if (typeof stream.stream === "function") { stream = stream.stream(); @@ -61637,20 +31142,19 @@ async function splitStream(stream) { const readableStream = stream; return readableStream.tee(); } -exports.splitStream = splitStream; /***/ }), -/***/ 82108: +/***/ 2108: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = void 0; +exports.splitStream = splitStream; const stream_1 = __nccwpck_require__(2203); -const splitStream_browser_1 = __nccwpck_require__(17570); +const splitStream_browser_1 = __nccwpck_require__(7570); const stream_type_check_1 = __nccwpck_require__(4414); async function splitStream(stream) { if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) { @@ -61662,7 +31166,6 @@ async function splitStream(stream) { stream.pipe(stream2); return [stream1, stream2]; } -exports.splitStream = splitStream; /***/ }), @@ -61674,142 +31177,93 @@ exports.splitStream = splitStream; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isBlob = exports.isReadableStream = void 0; -const isReadableStream = (stream) => { - var _a; - return typeof ReadableStream === "function" && - (((_a = stream === null || stream === void 0 ? void 0 : stream.constructor) === null || _a === void 0 ? void 0 : _a.name) === ReadableStream.name || stream instanceof ReadableStream); -}; +const isReadableStream = (stream) => typeof ReadableStream === "function" && + (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream); exports.isReadableStream = isReadableStream; const isBlob = (blob) => { - var _a; - return typeof Blob === "function" && (((_a = blob === null || blob === void 0 ? void 0 : blob.constructor) === null || _a === void 0 ? void 0 : _a.name) === Blob.name || blob instanceof Blob); + return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob); }; exports.isBlob = isBlob; /***/ }), -/***/ 80146: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +/***/ 146: +/***/ ((__unused_webpack_module, exports) => { -// src/index.ts -var src_exports = {}; -__export(src_exports, { - escapeUri: () => escapeUri, - escapeUriPath: () => escapeUriPath -}); -module.exports = __toCommonJS(src_exports); +"use strict"; -// src/escape-uri.ts -var escapeUri = /* @__PURE__ */ __name((uri) => ( - // AWS percent-encodes some extra non-standard characters in a URI - encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode) -), "escapeUri"); -var hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); -// src/escape-uri-path.ts -var escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split("/").map(escapeUri).join("/"), "escapeUriPath"); -// Annotate the CommonJS export names for ESM import in node: +const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); +const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; -0 && (0); +const escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/"); +exports.escapeUri = escapeUri; +exports.escapeUriPath = escapeUriPath; /***/ }), -/***/ 71577: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +/***/ 1577: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// src/index.ts -var src_exports = {}; -__export(src_exports, { - fromUtf8: () => fromUtf8, - toUint8Array: () => toUint8Array, - toUtf8: () => toUtf8 -}); -module.exports = __toCommonJS(src_exports); +"use strict"; -// src/fromUtf8.ts -var import_util_buffer_from = __nccwpck_require__(44151); -var fromUtf8 = /* @__PURE__ */ __name((input) => { - const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); -}, "fromUtf8"); -// src/toUint8Array.ts -var toUint8Array = /* @__PURE__ */ __name((data) => { - if (typeof data === "string") { - return fromUtf8(data); - } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data); -}, "toUint8Array"); +var utilBufferFrom = __nccwpck_require__(4151); -// src/toUtf8.ts +const fromUtf8 = (input) => { + const buf = utilBufferFrom.fromString(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); +}; -var toUtf8 = /* @__PURE__ */ __name((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 (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); -}, "toUtf8"); -// Annotate the CommonJS export names for ESM import in node: +const toUint8Array = (data) => { + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +}; -0 && (0); +const 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 utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); +}; +exports.fromUtf8 = fromUtf8; +exports.toUint8Array = toUint8Array; +exports.toUtf8 = toUtf8; /***/ }), -/***/ 95290: +/***/ 5290: /***/ ((__unused_webpack_module, exports) => { "use strict"; +const 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; + }; +}; + const sleep = (seconds) => { return new Promise((resolve) => setTimeout(resolve, seconds * 1000)); }; @@ -61831,7 +31285,7 @@ const checkExceptions = (result) => { const abortError = new Error(`${JSON.stringify({ ...result, reason: "Request was aborted", - })}`); + }, getCircularReplacer())}`); abortError.name = "AbortError"; throw abortError; } @@ -61839,12 +31293,12 @@ const checkExceptions = (result) => { const timeoutError = new Error(`${JSON.stringify({ ...result, reason: "Waiter has timed out", - })}`); + }, getCircularReplacer())}`); timeoutError.name = "TimeoutError"; throw timeoutError; } else if (result.state !== exports.WaiterState.SUCCESS) { - throw new Error(`${JSON.stringify(result)}`); + throw new Error(`${JSON.stringify(result, getCircularReplacer())}`); } return result; }; @@ -61904,7 +31358,7 @@ const createMessageFromResponse = (reason) => { } return `${reason.$metadata.httpStatusCode}: OK`; } - return String(reason?.message ?? JSON.stringify(reason) ?? "Unknown"); + return String(reason?.message ?? JSON.stringify(reason, getCircularReplacer()) ?? "Unknown"); }; const validateWaiterOptions = (options) => { @@ -61978,7 +31432,7 @@ exports.waiterServiceDefaults = waiterServiceDefaults; /***/ }), -/***/ 90266: +/***/ 266: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -62029,14 +31483,14 @@ exports.v4 = v4; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.randomUUID = void 0; -const tslib_1 = __nccwpck_require__(61860); -const crypto_1 = tslib_1.__importDefault(__nccwpck_require__(76982)); +const tslib_1 = __nccwpck_require__(1860); +const crypto_1 = tslib_1.__importDefault(__nccwpck_require__(6982)); exports.randomUUID = crypto_1.default.randomUUID.bind(crypto_1.default); /***/ }), -/***/ 61860: +/***/ 1860: /***/ ((module) => { /****************************************************************************** @@ -62494,27 +31948,27 @@ var __rewriteRelativeImportExtension; /***/ }), -/***/ 20770: +/***/ 770: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = __nccwpck_require__(20218); +module.exports = __nccwpck_require__(218); /***/ }), -/***/ 20218: +/***/ 218: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var net = __nccwpck_require__(69278); -var tls = __nccwpck_require__(64756); -var http = __nccwpck_require__(58611); -var https = __nccwpck_require__(65692); -var events = __nccwpck_require__(24434); -var assert = __nccwpck_require__(42613); -var util = __nccwpck_require__(39023); +var net = __nccwpck_require__(9278); +var tls = __nccwpck_require__(4756); +var http = __nccwpck_require__(8611); +var https = __nccwpck_require__(5692); +var events = __nccwpck_require__(4434); +var assert = __nccwpck_require__(2613); +var util = __nccwpck_require__(9023); exports.httpOverHttp = httpOverHttp; @@ -62774,36 +32228,36 @@ exports.debug = debug; // for test /***/ }), -/***/ 46752: +/***/ 6752: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const Client = __nccwpck_require__(86197) -const Dispatcher = __nccwpck_require__(28611) -const errors = __nccwpck_require__(68707) -const Pool = __nccwpck_require__(35076) -const BalancedPool = __nccwpck_require__(81093) -const Agent = __nccwpck_require__(59965) +const Client = __nccwpck_require__(6197) +const Dispatcher = __nccwpck_require__(992) +const errors = __nccwpck_require__(8707) +const Pool = __nccwpck_require__(5076) +const BalancedPool = __nccwpck_require__(1093) +const Agent = __nccwpck_require__(9965) const util = __nccwpck_require__(3440) const { InvalidArgumentError } = errors -const api = __nccwpck_require__(56615) -const buildConnector = __nccwpck_require__(59136) -const MockClient = __nccwpck_require__(47365) -const MockAgent = __nccwpck_require__(47501) -const MockPool = __nccwpck_require__(94004) -const mockErrors = __nccwpck_require__(52429) -const ProxyAgent = __nccwpck_require__(22720) -const RetryHandler = __nccwpck_require__(53573) -const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(32581) -const DecoratorHandler = __nccwpck_require__(78840) -const RedirectHandler = __nccwpck_require__(48299) -const createRedirectInterceptor = __nccwpck_require__(64415) +const api = __nccwpck_require__(6615) +const buildConnector = __nccwpck_require__(9136) +const MockClient = __nccwpck_require__(7365) +const MockAgent = __nccwpck_require__(7501) +const MockPool = __nccwpck_require__(4004) +const mockErrors = __nccwpck_require__(2429) +const ProxyAgent = __nccwpck_require__(2720) +const RetryHandler = __nccwpck_require__(3573) +const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(2581) +const DecoratorHandler = __nccwpck_require__(8840) +const RedirectHandler = __nccwpck_require__(8299) +const createRedirectInterceptor = __nccwpck_require__(4415) let hasCrypto try { - __nccwpck_require__(76982) + __nccwpck_require__(6982) hasCrypto = true } catch { hasCrypto = false @@ -62882,7 +32336,7 @@ if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) { let fetchImpl = null module.exports.fetch = async function fetch (resource) { if (!fetchImpl) { - fetchImpl = (__nccwpck_require__(12315).fetch) + fetchImpl = (__nccwpck_require__(2315).fetch) } try { @@ -62895,20 +32349,20 @@ if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) { throw err } } - module.exports.Headers = __nccwpck_require__(26349).Headers - module.exports.Response = __nccwpck_require__(48676).Response - module.exports.Request = __nccwpck_require__(25194).Request - module.exports.FormData = __nccwpck_require__(43073).FormData - module.exports.File = __nccwpck_require__(63041).File - module.exports.FileReader = __nccwpck_require__(82160).FileReader + module.exports.Headers = __nccwpck_require__(6349).Headers + module.exports.Response = __nccwpck_require__(8676).Response + module.exports.Request = __nccwpck_require__(5194).Request + module.exports.FormData = __nccwpck_require__(3073).FormData + module.exports.File = __nccwpck_require__(3041).File + module.exports.FileReader = __nccwpck_require__(2160).FileReader - const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(75628) + const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(5628) module.exports.setGlobalOrigin = setGlobalOrigin module.exports.getGlobalOrigin = getGlobalOrigin - const { CacheStorage } = __nccwpck_require__(44738) - const { kConstruct } = __nccwpck_require__(80296) + const { CacheStorage } = __nccwpck_require__(4738) + const { kConstruct } = __nccwpck_require__(296) // Cache & CacheStorage are tightly coupled with fetch. Even if it may run // in an older version of Node, it doesn't have any use without fetch. @@ -62916,21 +32370,21 @@ if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) { } if (util.nodeMajor >= 16) { - const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(53168) + const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(3168) module.exports.deleteCookie = deleteCookie module.exports.getCookies = getCookies module.exports.getSetCookies = getSetCookies module.exports.setCookie = setCookie - const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(94322) + const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(4322) module.exports.parseMIMEType = parseMIMEType module.exports.serializeAMimeType = serializeAMimeType } if (util.nodeMajor >= 18 && hasCrypto) { - const { WebSocket } = __nccwpck_require__(55171) + const { WebSocket } = __nccwpck_require__(5171) module.exports.WebSocket = WebSocket } @@ -62949,20 +32403,20 @@ module.exports.mockErrors = mockErrors /***/ }), -/***/ 59965: +/***/ 9965: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { InvalidArgumentError } = __nccwpck_require__(68707) -const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(36443) -const DispatcherBase = __nccwpck_require__(50001) -const Pool = __nccwpck_require__(35076) -const Client = __nccwpck_require__(86197) +const { InvalidArgumentError } = __nccwpck_require__(8707) +const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(6443) +const DispatcherBase = __nccwpck_require__(1) +const Pool = __nccwpck_require__(5076) +const Client = __nccwpck_require__(6197) const util = __nccwpck_require__(3440) -const createRedirectInterceptor = __nccwpck_require__(64415) -const { WeakRef, FinalizationRegistry } = __nccwpck_require__(13194)() +const createRedirectInterceptor = __nccwpck_require__(4415) +const { WeakRef, FinalizationRegistry } = __nccwpck_require__(3194)() const kOnConnect = Symbol('onConnect') const kOnDisconnect = Symbol('onDisconnect') @@ -63105,11 +32559,11 @@ module.exports = Agent /***/ }), -/***/ 80158: +/***/ 158: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { const { addAbortListener } = __nccwpck_require__(3440) -const { RequestAbortedError } = __nccwpck_require__(68707) +const { RequestAbortedError } = __nccwpck_require__(8707) const kListener = Symbol('kListener') const kSignal = Symbol('kSignal') @@ -63166,16 +32620,16 @@ module.exports = { /***/ }), -/***/ 34660: +/***/ 4660: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { AsyncResource } = __nccwpck_require__(90290) -const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(68707) +const { AsyncResource } = __nccwpck_require__(290) +const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(8707) const util = __nccwpck_require__(3440) -const { addSignal, removeSignal } = __nccwpck_require__(80158) +const { addSignal, removeSignal } = __nccwpck_require__(158) class ConnectHandler extends AsyncResource { constructor (opts, callback) { @@ -63278,7 +32732,7 @@ module.exports = connect /***/ }), -/***/ 76862: +/***/ 6862: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -63293,11 +32747,11 @@ const { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError -} = __nccwpck_require__(68707) +} = __nccwpck_require__(8707) const util = __nccwpck_require__(3440) -const { AsyncResource } = __nccwpck_require__(90290) -const { addSignal, removeSignal } = __nccwpck_require__(80158) -const assert = __nccwpck_require__(42613) +const { AsyncResource } = __nccwpck_require__(290) +const { addSignal, removeSignal } = __nccwpck_require__(158) +const assert = __nccwpck_require__(2613) const kResume = Symbol('resume') @@ -63535,21 +32989,21 @@ module.exports = pipeline /***/ }), -/***/ 14043: +/***/ 4043: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const Readable = __nccwpck_require__(49927) +const Readable = __nccwpck_require__(9927) const { InvalidArgumentError, RequestAbortedError -} = __nccwpck_require__(68707) +} = __nccwpck_require__(8707) const util = __nccwpck_require__(3440) -const { getResolveErrorBodyCallback } = __nccwpck_require__(87655) -const { AsyncResource } = __nccwpck_require__(90290) -const { addSignal, removeSignal } = __nccwpck_require__(80158) +const { getResolveErrorBodyCallback } = __nccwpck_require__(7655) +const { AsyncResource } = __nccwpck_require__(290) +const { addSignal, removeSignal } = __nccwpck_require__(158) class RequestHandler extends AsyncResource { constructor (opts, callback) { @@ -63734,11 +33188,11 @@ const { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError -} = __nccwpck_require__(68707) +} = __nccwpck_require__(8707) const util = __nccwpck_require__(3440) -const { getResolveErrorBodyCallback } = __nccwpck_require__(87655) -const { AsyncResource } = __nccwpck_require__(90290) -const { addSignal, removeSignal } = __nccwpck_require__(80158) +const { getResolveErrorBodyCallback } = __nccwpck_require__(7655) +const { AsyncResource } = __nccwpck_require__(290) +const { addSignal, removeSignal } = __nccwpck_require__(158) class StreamHandler extends AsyncResource { constructor (opts, factory, callback) { @@ -63951,17 +33405,17 @@ module.exports = stream /***/ }), -/***/ 61882: +/***/ 1882: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(68707) -const { AsyncResource } = __nccwpck_require__(90290) +const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(8707) +const { AsyncResource } = __nccwpck_require__(290) const util = __nccwpck_require__(3440) -const { addSignal, removeSignal } = __nccwpck_require__(80158) -const assert = __nccwpck_require__(42613) +const { addSignal, removeSignal } = __nccwpck_require__(158) +const assert = __nccwpck_require__(2613) class UpgradeHandler extends AsyncResource { constructor (opts, callback) { @@ -64064,22 +33518,22 @@ module.exports = upgrade /***/ }), -/***/ 56615: +/***/ 6615: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -module.exports.request = __nccwpck_require__(14043) +module.exports.request = __nccwpck_require__(4043) module.exports.stream = __nccwpck_require__(3560) -module.exports.pipeline = __nccwpck_require__(76862) -module.exports.upgrade = __nccwpck_require__(61882) -module.exports.connect = __nccwpck_require__(34660) +module.exports.pipeline = __nccwpck_require__(6862) +module.exports.upgrade = __nccwpck_require__(1882) +module.exports.connect = __nccwpck_require__(4660) /***/ }), -/***/ 49927: +/***/ 9927: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -64087,9 +33541,9 @@ module.exports.connect = __nccwpck_require__(34660) -const assert = __nccwpck_require__(42613) +const assert = __nccwpck_require__(2613) const { Readable } = __nccwpck_require__(2203) -const { RequestAbortedError, NotSupportedError, InvalidArgumentError } = __nccwpck_require__(68707) +const { RequestAbortedError, NotSupportedError, InvalidArgumentError } = __nccwpck_require__(8707) const util = __nccwpck_require__(3440) const { ReadableStreamFrom, toUSVString } = __nccwpck_require__(3440) @@ -64371,7 +33825,7 @@ function consumeEnd (consume) { resolve(dst.buffer) } else if (type === 'blob') { if (!Blob) { - Blob = (__nccwpck_require__(20181).Blob) + Blob = (__nccwpck_require__(181).Blob) } resolve(new Blob(body, { type: stream[kContentType] })) } @@ -64409,13 +33863,13 @@ function consumeFinish (consume, err) { /***/ }), -/***/ 87655: +/***/ 7655: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const assert = __nccwpck_require__(42613) +const assert = __nccwpck_require__(2613) const { ResponseStatusCodeError -} = __nccwpck_require__(68707) +} = __nccwpck_require__(8707) const { toUSVString } = __nccwpck_require__(3440) async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { @@ -64462,7 +33916,7 @@ module.exports = { getResolveErrorBodyCallback } /***/ }), -/***/ 81093: +/***/ 1093: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -64471,7 +33925,7 @@ module.exports = { getResolveErrorBodyCallback } const { BalancedPoolMissingUpstreamError, InvalidArgumentError -} = __nccwpck_require__(68707) +} = __nccwpck_require__(8707) const { PoolBase, kClients, @@ -64479,9 +33933,9 @@ const { kAddClient, kRemoveClient, kGetDispatcher -} = __nccwpck_require__(58640) -const Pool = __nccwpck_require__(35076) -const { kUrl, kInterceptors } = __nccwpck_require__(36443) +} = __nccwpck_require__(8640) +const Pool = __nccwpck_require__(5076) +const { kUrl, kInterceptors } = __nccwpck_require__(6443) const { parseOrigin } = __nccwpck_require__(3440) const kFactory = Symbol('factory') @@ -64660,24 +34114,24 @@ module.exports = BalancedPool /***/ }), -/***/ 50479: +/***/ 479: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { kConstruct } = __nccwpck_require__(80296) -const { urlEquals, fieldValues: getFieldValues } = __nccwpck_require__(23993) +const { kConstruct } = __nccwpck_require__(296) +const { urlEquals, fieldValues: getFieldValues } = __nccwpck_require__(3993) const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(3440) -const { kHeadersList } = __nccwpck_require__(36443) -const { webidl } = __nccwpck_require__(74222) -const { Response, cloneResponse } = __nccwpck_require__(48676) -const { Request } = __nccwpck_require__(25194) -const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(89710) -const { fetching } = __nccwpck_require__(12315) -const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(15523) -const assert = __nccwpck_require__(42613) -const { getGlobalDispatcher } = __nccwpck_require__(32581) +const { kHeadersList } = __nccwpck_require__(6443) +const { webidl } = __nccwpck_require__(4222) +const { Response, cloneResponse } = __nccwpck_require__(8676) +const { Request } = __nccwpck_require__(5194) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(9710) +const { fetching } = __nccwpck_require__(2315) +const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(5523) +const assert = __nccwpck_require__(2613) +const { getGlobalDispatcher } = __nccwpck_require__(2581) /** * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation @@ -65506,15 +34960,15 @@ module.exports = { /***/ }), -/***/ 44738: +/***/ 4738: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { kConstruct } = __nccwpck_require__(80296) -const { Cache } = __nccwpck_require__(50479) -const { webidl } = __nccwpck_require__(74222) +const { kConstruct } = __nccwpck_require__(296) +const { Cache } = __nccwpck_require__(479) +const { webidl } = __nccwpck_require__(4222) const { kEnumerableProperty } = __nccwpck_require__(3440) class CacheStorage { @@ -65658,28 +35112,28 @@ module.exports = { /***/ }), -/***/ 80296: +/***/ 296: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; module.exports = { - kConstruct: (__nccwpck_require__(36443).kConstruct) + kConstruct: (__nccwpck_require__(6443).kConstruct) } /***/ }), -/***/ 23993: +/***/ 3993: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const assert = __nccwpck_require__(42613) -const { URLSerializer } = __nccwpck_require__(94322) -const { isValidHeaderName } = __nccwpck_require__(15523) +const assert = __nccwpck_require__(2613) +const { URLSerializer } = __nccwpck_require__(4322) +const { isValidHeaderName } = __nccwpck_require__(5523) /** * @see https://url.spec.whatwg.org/#concept-url-equals @@ -65728,7 +35182,7 @@ module.exports = { /***/ }), -/***/ 86197: +/***/ 6197: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -65738,14 +35192,14 @@ module.exports = { /* global WebAssembly */ -const assert = __nccwpck_require__(42613) -const net = __nccwpck_require__(69278) -const http = __nccwpck_require__(58611) +const assert = __nccwpck_require__(2613) +const net = __nccwpck_require__(9278) +const http = __nccwpck_require__(8611) const { pipeline } = __nccwpck_require__(2203) const util = __nccwpck_require__(3440) -const timers = __nccwpck_require__(28804) -const Request = __nccwpck_require__(44655) -const DispatcherBase = __nccwpck_require__(50001) +const timers = __nccwpck_require__(8804) +const Request = __nccwpck_require__(4655) +const DispatcherBase = __nccwpck_require__(1) const { RequestContentLengthMismatchError, ResponseContentLengthMismatchError, @@ -65759,8 +35213,8 @@ const { HTTPParserError, ResponseExceededMaxSizeError, ClientDestroyedError -} = __nccwpck_require__(68707) -const buildConnector = __nccwpck_require__(59136) +} = __nccwpck_require__(8707) +const buildConnector = __nccwpck_require__(9136) const { kUrl, kReset, @@ -65812,12 +35266,12 @@ const { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest -} = __nccwpck_require__(36443) +} = __nccwpck_require__(6443) /** @type {import('http2')} */ let http2 try { - http2 = __nccwpck_require__(85675) + http2 = __nccwpck_require__(5675) } catch { // @ts-ignore http2 = { constants: {} } @@ -65845,7 +35299,7 @@ const kClosedResolve = Symbol('kClosedResolve') const channels = {} try { - const diagnosticsChannel = __nccwpck_require__(31637) + const diagnosticsChannel = __nccwpck_require__(1637) channels.sendHeaders = diagnosticsChannel.channel('undici:client:sendHeaders') channels.beforeConnect = diagnosticsChannel.channel('undici:client:beforeConnect') channels.connectError = diagnosticsChannel.channel('undici:client:connectError') @@ -66218,16 +35672,16 @@ function onHTTP2GoAway (code) { resume(client) } -const constants = __nccwpck_require__(52824) -const createRedirectInterceptor = __nccwpck_require__(64415) +const constants = __nccwpck_require__(2824) +const createRedirectInterceptor = __nccwpck_require__(4415) const EMPTY_BUF = Buffer.alloc(0) async function lazyllhttp () { - const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(63870) : undefined + const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(3870) : undefined let mod try { - mod = await WebAssembly.compile(Buffer.from(__nccwpck_require__(53434), 'base64')) + mod = await WebAssembly.compile(Buffer.from(__nccwpck_require__(3434), 'base64')) } catch (e) { /* istanbul ignore next */ @@ -66235,7 +35689,7 @@ async function lazyllhttp () { // being enabled, but the occurring of this other error // * https://github.com/emscripten-core/emscripten/issues/11495 // got me to remove that check to avoid breaking Node 12. - mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || __nccwpck_require__(63870), 'base64')) + mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || __nccwpck_require__(3870), 'base64')) } return await WebAssembly.instantiate(mod, { @@ -68019,7 +37473,7 @@ module.exports = Client /***/ }), -/***/ 13194: +/***/ 3194: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -68027,7 +37481,7 @@ module.exports = Client /* istanbul ignore file: only for Node 12 */ -const { kConnected, kSize } = __nccwpck_require__(36443) +const { kConnected, kSize } = __nccwpck_require__(6443) class CompatWeakRef { constructor (value) { @@ -68075,7 +37529,7 @@ module.exports = function () { /***/ }), -/***/ 19237: +/***/ 9237: /***/ ((module) => { "use strict"; @@ -68095,7 +37549,7 @@ module.exports = { /***/ }), -/***/ 53168: +/***/ 3168: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -68103,8 +37557,8 @@ module.exports = { const { parseSetCookie } = __nccwpck_require__(8915) const { stringify } = __nccwpck_require__(3834) -const { webidl } = __nccwpck_require__(74222) -const { Headers } = __nccwpck_require__(26349) +const { webidl } = __nccwpck_require__(4222) +const { Headers } = __nccwpck_require__(6349) /** * @typedef {Object} Cookie @@ -68292,10 +37746,10 @@ module.exports = { "use strict"; -const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(19237) +const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(9237) const { isCTLExcludingHtab } = __nccwpck_require__(3834) -const { collectASequenceOfCodePointsFast } = __nccwpck_require__(94322) -const assert = __nccwpck_require__(42613) +const { collectASequenceOfCodePointsFast } = __nccwpck_require__(4322) +const assert = __nccwpck_require__(2613) /** * @description Parses the field-value attributes of a set-cookie header string. @@ -68893,16 +38347,16 @@ module.exports = { /***/ }), -/***/ 59136: +/***/ 9136: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const net = __nccwpck_require__(69278) -const assert = __nccwpck_require__(42613) +const net = __nccwpck_require__(9278) +const assert = __nccwpck_require__(2613) const util = __nccwpck_require__(3440) -const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(68707) +const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(8707) let tls // include tls conditionally since it is not always available @@ -68985,7 +38439,7 @@ function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...o let socket if (protocol === 'https:') { if (!tls) { - tls = __nccwpck_require__(64756) + tls = __nccwpck_require__(4756) } servername = servername || options.servername || util.getServerName(host) || null @@ -69090,7 +38544,7 @@ module.exports = buildConnector /***/ }), -/***/ 10735: +/***/ 735: /***/ ((module) => { "use strict"; @@ -69216,7 +38670,7 @@ module.exports = { /***/ }), -/***/ 68707: +/***/ 8707: /***/ ((module) => { "use strict"; @@ -69454,7 +38908,7 @@ module.exports = { /***/ }), -/***/ 44655: +/***/ 4655: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -69463,9 +38917,9 @@ module.exports = { const { InvalidArgumentError, NotSupportedError -} = __nccwpck_require__(68707) -const assert = __nccwpck_require__(42613) -const { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = __nccwpck_require__(36443) +} = __nccwpck_require__(8707) +const assert = __nccwpck_require__(2613) +const { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = __nccwpck_require__(6443) const util = __nccwpck_require__(3440) // tokenRegExp and headerCharRegex have been lifted from @@ -69496,7 +38950,7 @@ const channels = {} let extractBody try { - const diagnosticsChannel = __nccwpck_require__(31637) + const diagnosticsChannel = __nccwpck_require__(1637) channels.create = diagnosticsChannel.channel('undici:request:create') channels.bodySent = diagnosticsChannel.channel('undici:request:bodySent') channels.headers = diagnosticsChannel.channel('undici:request:headers') @@ -69961,7 +39415,7 @@ module.exports = Request /***/ }), -/***/ 36443: +/***/ 6443: /***/ ((module) => { module.exports = { @@ -70037,16 +39491,16 @@ module.exports = { "use strict"; -const assert = __nccwpck_require__(42613) -const { kDestroyed, kBodyUsed } = __nccwpck_require__(36443) -const { IncomingMessage } = __nccwpck_require__(58611) +const assert = __nccwpck_require__(2613) +const { kDestroyed, kBodyUsed } = __nccwpck_require__(6443) +const { IncomingMessage } = __nccwpck_require__(8611) const stream = __nccwpck_require__(2203) -const net = __nccwpck_require__(69278) -const { InvalidArgumentError } = __nccwpck_require__(68707) -const { Blob } = __nccwpck_require__(20181) -const nodeUtil = __nccwpck_require__(39023) -const { stringify } = __nccwpck_require__(83480) -const { headerNameLowerCasedRecord } = __nccwpck_require__(10735) +const net = __nccwpck_require__(9278) +const { InvalidArgumentError } = __nccwpck_require__(8707) +const { Blob } = __nccwpck_require__(181) +const nodeUtil = __nccwpck_require__(9023) +const { stringify } = __nccwpck_require__(3480) +const { headerNameLowerCasedRecord } = __nccwpck_require__(735) const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) @@ -70415,7 +39869,7 @@ async function * convertIterableToBuffer (iterable) { let ReadableStream function ReadableStreamFrom (iterable) { if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(63774).ReadableStream) + ReadableStream = (__nccwpck_require__(3774).ReadableStream) } if (ReadableStream.from) { @@ -70561,19 +40015,19 @@ module.exports = { /***/ }), -/***/ 50001: +/***/ 1: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const Dispatcher = __nccwpck_require__(28611) +const Dispatcher = __nccwpck_require__(992) const { ClientDestroyedError, ClientClosedError, InvalidArgumentError -} = __nccwpck_require__(68707) -const { kDestroy, kClose, kDispatch, kInterceptors } = __nccwpck_require__(36443) +} = __nccwpck_require__(8707) +const { kDestroy, kClose, kDispatch, kInterceptors } = __nccwpck_require__(6443) const kDestroyed = Symbol('destroyed') const kClosed = Symbol('closed') @@ -70761,13 +40215,13 @@ module.exports = DispatcherBase /***/ }), -/***/ 28611: +/***/ 992: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const EventEmitter = __nccwpck_require__(24434) +const EventEmitter = __nccwpck_require__(4434) class Dispatcher extends EventEmitter { dispatch () { @@ -70794,7 +40248,7 @@ module.exports = Dispatcher "use strict"; -const Busboy = __nccwpck_require__(89581) +const Busboy = __nccwpck_require__(9581) const util = __nccwpck_require__(3440) const { ReadableStreamFrom, @@ -70803,22 +40257,22 @@ const { readableStreamClose, createDeferredPromise, fullyReadBody -} = __nccwpck_require__(15523) -const { FormData } = __nccwpck_require__(43073) -const { kState } = __nccwpck_require__(89710) -const { webidl } = __nccwpck_require__(74222) -const { DOMException, structuredClone } = __nccwpck_require__(87326) -const { Blob, File: NativeFile } = __nccwpck_require__(20181) -const { kBodyUsed } = __nccwpck_require__(36443) -const assert = __nccwpck_require__(42613) +} = __nccwpck_require__(5523) +const { FormData } = __nccwpck_require__(3073) +const { kState } = __nccwpck_require__(9710) +const { webidl } = __nccwpck_require__(4222) +const { DOMException, structuredClone } = __nccwpck_require__(7326) +const { Blob, File: NativeFile } = __nccwpck_require__(181) +const { kBodyUsed } = __nccwpck_require__(6443) +const assert = __nccwpck_require__(2613) const { isErrored } = __nccwpck_require__(3440) -const { isUint8Array, isArrayBuffer } = __nccwpck_require__(98253) -const { File: UndiciFile } = __nccwpck_require__(63041) -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(94322) +const { isUint8Array, isArrayBuffer } = __nccwpck_require__(8253) +const { File: UndiciFile } = __nccwpck_require__(3041) +const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(4322) let random try { - const crypto = __nccwpck_require__(77598) + const crypto = __nccwpck_require__(7598) random = (max) => crypto.randomInt(0, max) } catch { random = (max) => Math.floor(Math.random(max)) @@ -70834,7 +40288,7 @@ const textDecoder = new TextDecoder() // https://fetch.spec.whatwg.org/#concept-bodyinit-extract function extractBody (object, keepalive = false) { if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(63774).ReadableStream) + ReadableStream = (__nccwpck_require__(3774).ReadableStream) } // 1. Let stream be null. @@ -71055,7 +40509,7 @@ function extractBody (object, keepalive = false) { function safelyExtractBody (object, keepalive = false) { if (!ReadableStream) { // istanbul ignore next - ReadableStream = (__nccwpck_require__(63774).ReadableStream) + ReadableStream = (__nccwpck_require__(3774).ReadableStream) } // To safely extract a body and a `Content-Type` value from @@ -71409,13 +40863,13 @@ module.exports = { /***/ }), -/***/ 87326: +/***/ 7326: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { MessageChannel, receiveMessageOnPort } = __nccwpck_require__(28167) +const { MessageChannel, receiveMessageOnPort } = __nccwpck_require__(8167) const corsSafeListedMethods = ['GET', 'HEAD', 'POST'] const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) @@ -71568,12 +41022,12 @@ module.exports = { /***/ }), -/***/ 94322: +/***/ 4322: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const assert = __nccwpck_require__(42613) -const { atob } = __nccwpck_require__(20181) -const { isomorphicDecode } = __nccwpck_require__(15523) +const assert = __nccwpck_require__(2613) +const { atob } = __nccwpck_require__(181) +const { isomorphicDecode } = __nccwpck_require__(5523) const encoder = new TextEncoder() @@ -72202,18 +41656,18 @@ module.exports = { /***/ }), -/***/ 63041: +/***/ 3041: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { Blob, File: NativeFile } = __nccwpck_require__(20181) -const { types } = __nccwpck_require__(39023) -const { kState } = __nccwpck_require__(89710) -const { isBlobLike } = __nccwpck_require__(15523) -const { webidl } = __nccwpck_require__(74222) -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(94322) +const { Blob, File: NativeFile } = __nccwpck_require__(181) +const { types } = __nccwpck_require__(9023) +const { kState } = __nccwpck_require__(9710) +const { isBlobLike } = __nccwpck_require__(5523) +const { webidl } = __nccwpck_require__(4222) +const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(4322) const { kEnumerableProperty } = __nccwpck_require__(3440) const encoder = new TextEncoder() @@ -72554,17 +42008,17 @@ module.exports = { File, FileLike, isFileLike } /***/ }), -/***/ 43073: +/***/ 3073: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { isBlobLike, toUSVString, makeIterator } = __nccwpck_require__(15523) -const { kState } = __nccwpck_require__(89710) -const { File: UndiciFile, FileLike, isFileLike } = __nccwpck_require__(63041) -const { webidl } = __nccwpck_require__(74222) -const { Blob, File: NativeFile } = __nccwpck_require__(20181) +const { isBlobLike, toUSVString, makeIterator } = __nccwpck_require__(5523) +const { kState } = __nccwpck_require__(9710) +const { File: UndiciFile, FileLike, isFileLike } = __nccwpck_require__(3041) +const { webidl } = __nccwpck_require__(4222) +const { Blob, File: NativeFile } = __nccwpck_require__(181) /** @type {globalThis['File']} */ const File = NativeFile ?? UndiciFile @@ -72827,7 +42281,7 @@ module.exports = { FormData } /***/ }), -/***/ 75628: +/***/ 5628: /***/ ((module) => { "use strict"; @@ -72875,7 +42329,7 @@ module.exports = { /***/ }), -/***/ 26349: +/***/ 6349: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -72883,17 +42337,17 @@ module.exports = { -const { kHeadersList, kConstruct } = __nccwpck_require__(36443) -const { kGuard } = __nccwpck_require__(89710) +const { kHeadersList, kConstruct } = __nccwpck_require__(6443) +const { kGuard } = __nccwpck_require__(9710) const { kEnumerableProperty } = __nccwpck_require__(3440) const { makeIterator, isValidHeaderName, isValidHeaderValue -} = __nccwpck_require__(15523) -const util = __nccwpck_require__(39023) -const { webidl } = __nccwpck_require__(74222) -const assert = __nccwpck_require__(42613) +} = __nccwpck_require__(5523) +const util = __nccwpck_require__(9023) +const { webidl } = __nccwpck_require__(4222) +const assert = __nccwpck_require__(2613) const kHeadersMap = Symbol('headers map') const kHeadersSortedMap = Symbol('headers map sorted') @@ -73476,7 +42930,7 @@ module.exports = { /***/ }), -/***/ 12315: +/***/ 2315: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -73490,10 +42944,10 @@ const { makeAppropriateNetworkError, filterResponse, makeResponse -} = __nccwpck_require__(48676) -const { Headers } = __nccwpck_require__(26349) -const { Request, makeRequest } = __nccwpck_require__(25194) -const zlib = __nccwpck_require__(43106) +} = __nccwpck_require__(8676) +const { Headers } = __nccwpck_require__(6349) +const { Request, makeRequest } = __nccwpck_require__(5194) +const zlib = __nccwpck_require__(3106) const { bytesMatch, makePolicyContainer, @@ -73523,9 +42977,9 @@ const { urlIsLocal, urlIsHttpHttpsScheme, urlHasHttpsScheme -} = __nccwpck_require__(15523) -const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(89710) -const assert = __nccwpck_require__(42613) +} = __nccwpck_require__(5523) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(9710) +const assert = __nccwpck_require__(2613) const { safelyExtractBody } = __nccwpck_require__(8923) const { redirectStatusSet, @@ -73534,16 +42988,16 @@ const { requestBodyHeader, subresourceSet, DOMException -} = __nccwpck_require__(87326) -const { kHeadersList } = __nccwpck_require__(36443) -const EE = __nccwpck_require__(24434) +} = __nccwpck_require__(7326) +const { kHeadersList } = __nccwpck_require__(6443) +const EE = __nccwpck_require__(4434) const { Readable, pipeline } = __nccwpck_require__(2203) const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = __nccwpck_require__(3440) -const { dataURLProcessor, serializeAMimeType } = __nccwpck_require__(94322) -const { TransformStream } = __nccwpck_require__(63774) -const { getGlobalDispatcher } = __nccwpck_require__(32581) -const { webidl } = __nccwpck_require__(74222) -const { STATUS_CODES } = __nccwpck_require__(58611) +const { dataURLProcessor, serializeAMimeType } = __nccwpck_require__(4322) +const { TransformStream } = __nccwpck_require__(3774) +const { getGlobalDispatcher } = __nccwpck_require__(2581) +const { webidl } = __nccwpck_require__(4222) +const { STATUS_CODES } = __nccwpck_require__(8611) const GET_OR_HEAD = ['GET', 'HEAD'] /** @type {import('buffer').resolveObjectURL} */ @@ -74285,7 +43739,7 @@ function schemeFetch (fetchParams) { } case 'blob:': { if (!resolveObjectURL) { - resolveObjectURL = (__nccwpck_require__(20181).resolveObjectURL) + resolveObjectURL = (__nccwpck_require__(181).resolveObjectURL) } // 1. Let blobURLEntry be request’s current URL’s blob URL entry. @@ -75284,7 +44738,7 @@ async function httpNetworkFetch ( // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to // highWaterMark, and sizeAlgorithm set to sizeAlgorithm. if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(63774).ReadableStream) + ReadableStream = (__nccwpck_require__(3774).ReadableStream) } const stream = new ReadableStream( @@ -75632,7 +45086,7 @@ module.exports = { /***/ }), -/***/ 25194: +/***/ 5194: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -75641,8 +45095,8 @@ module.exports = { const { extractBody, mixinBody, cloneBody } = __nccwpck_require__(8923) -const { Headers, fill: fillHeaders, HeadersList } = __nccwpck_require__(26349) -const { FinalizationRegistry } = __nccwpck_require__(13194)() +const { Headers, fill: fillHeaders, HeadersList } = __nccwpck_require__(6349) +const { FinalizationRegistry } = __nccwpck_require__(3194)() const util = __nccwpck_require__(3440) const { isValidHTTPToken, @@ -75650,7 +45104,7 @@ const { normalizeMethod, makePolicyContainer, normalizeMethodRecord -} = __nccwpck_require__(15523) +} = __nccwpck_require__(5523) const { forbiddenMethodsSet, corsSafeListedMethodsSet, @@ -75660,15 +45114,15 @@ const { requestCredentials, requestCache, requestDuplex -} = __nccwpck_require__(87326) +} = __nccwpck_require__(7326) const { kEnumerableProperty } = util -const { kHeaders, kSignal, kState, kGuard, kRealm } = __nccwpck_require__(89710) -const { webidl } = __nccwpck_require__(74222) -const { getGlobalOrigin } = __nccwpck_require__(75628) -const { URLSerializer } = __nccwpck_require__(94322) -const { kHeadersList, kConstruct } = __nccwpck_require__(36443) -const assert = __nccwpck_require__(42613) -const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(24434) +const { kHeaders, kSignal, kState, kGuard, kRealm } = __nccwpck_require__(9710) +const { webidl } = __nccwpck_require__(4222) +const { getGlobalOrigin } = __nccwpck_require__(5628) +const { URLSerializer } = __nccwpck_require__(4322) +const { kHeadersList, kConstruct } = __nccwpck_require__(6443) +const assert = __nccwpck_require__(2613) +const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(4434) let TransformStream = globalThis.TransformStream @@ -76155,7 +45609,7 @@ class Request { // 2. Set finalBody to the result of creating a proxy for inputBody. if (!TransformStream) { - TransformStream = (__nccwpck_require__(63774).TransformStream) + TransformStream = (__nccwpck_require__(3774).TransformStream) } // https://streams.spec.whatwg.org/#readablestream-create-a-proxy @@ -76586,13 +46040,13 @@ module.exports = { Request, makeRequest } /***/ }), -/***/ 48676: +/***/ 8676: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { Headers, HeadersList, fill } = __nccwpck_require__(26349) +const { Headers, HeadersList, fill } = __nccwpck_require__(6349) const { extractBody, cloneBody, mixinBody } = __nccwpck_require__(8923) const util = __nccwpck_require__(3440) const { kEnumerableProperty } = util @@ -76604,22 +46058,22 @@ const { serializeJavascriptValueToJSONString, isErrorLike, isomorphicEncode -} = __nccwpck_require__(15523) +} = __nccwpck_require__(5523) const { redirectStatusSet, nullBodyStatus, DOMException -} = __nccwpck_require__(87326) -const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(89710) -const { webidl } = __nccwpck_require__(74222) -const { FormData } = __nccwpck_require__(43073) -const { getGlobalOrigin } = __nccwpck_require__(75628) -const { URLSerializer } = __nccwpck_require__(94322) -const { kHeadersList, kConstruct } = __nccwpck_require__(36443) -const assert = __nccwpck_require__(42613) -const { types } = __nccwpck_require__(39023) - -const ReadableStream = globalThis.ReadableStream || (__nccwpck_require__(63774).ReadableStream) +} = __nccwpck_require__(7326) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(9710) +const { webidl } = __nccwpck_require__(4222) +const { FormData } = __nccwpck_require__(3073) +const { getGlobalOrigin } = __nccwpck_require__(5628) +const { URLSerializer } = __nccwpck_require__(4322) +const { kHeadersList, kConstruct } = __nccwpck_require__(6443) +const assert = __nccwpck_require__(2613) +const { types } = __nccwpck_require__(9023) + +const ReadableStream = globalThis.ReadableStream || (__nccwpck_require__(3774).ReadableStream) const textEncoder = new TextEncoder('utf-8') // https://fetch.spec.whatwg.org/#response-class @@ -77165,7 +46619,7 @@ module.exports = { /***/ }), -/***/ 89710: +/***/ 9710: /***/ ((module) => { "use strict"; @@ -77183,18 +46637,18 @@ module.exports = { /***/ }), -/***/ 15523: +/***/ 5523: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(87326) -const { getGlobalOrigin } = __nccwpck_require__(75628) -const { performance } = __nccwpck_require__(82987) +const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(7326) +const { getGlobalOrigin } = __nccwpck_require__(5628) +const { performance } = __nccwpck_require__(2987) const { isBlobLike, toUSVString, ReadableStreamFrom } = __nccwpck_require__(3440) -const assert = __nccwpck_require__(42613) -const { isUint8Array } = __nccwpck_require__(98253) +const assert = __nccwpck_require__(2613) +const { isUint8Array } = __nccwpck_require__(8253) let supportedHashes = [] @@ -77203,7 +46657,7 @@ let supportedHashes = [] let crypto try { - crypto = __nccwpck_require__(76982) + crypto = __nccwpck_require__(6982) const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) /* c8 ignore next 3 */ @@ -78156,7 +47610,7 @@ let ReadableStream = globalThis.ReadableStream function isReadableStreamLike (stream) { if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(63774).ReadableStream) + ReadableStream = (__nccwpck_require__(3774).ReadableStream) } return stream instanceof ReadableStream || ( @@ -78335,14 +47789,14 @@ module.exports = { /***/ }), -/***/ 74222: +/***/ 4222: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { types } = __nccwpck_require__(39023) -const { hasOwn, toUSVString } = __nccwpck_require__(15523) +const { types } = __nccwpck_require__(9023) +const { hasOwn, toUSVString } = __nccwpck_require__(5523) /** @type {import('../../types/webidl').Webidl} */ const webidl = {} @@ -78989,7 +48443,7 @@ module.exports = { /***/ }), -/***/ 40396: +/***/ 396: /***/ ((module) => { "use strict"; @@ -79287,7 +48741,7 @@ module.exports = { /***/ }), -/***/ 82160: +/***/ 2160: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -79297,15 +48751,15 @@ const { staticPropertyDescriptors, readOperation, fireAProgressEvent -} = __nccwpck_require__(10165) +} = __nccwpck_require__(165) const { kState, kError, kResult, kEvents, kAborted -} = __nccwpck_require__(86812) -const { webidl } = __nccwpck_require__(74222) +} = __nccwpck_require__(6812) +const { webidl } = __nccwpck_require__(4222) const { kEnumerableProperty } = __nccwpck_require__(3440) class FileReader extends EventTarget { @@ -79639,13 +49093,13 @@ module.exports = { /***/ }), -/***/ 15976: +/***/ 5976: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { webidl } = __nccwpck_require__(74222) +const { webidl } = __nccwpck_require__(4222) const kState = Symbol('ProgressEvent state') @@ -79725,7 +49179,7 @@ module.exports = { /***/ }), -/***/ 86812: +/***/ 6812: /***/ ((module) => { "use strict"; @@ -79743,7 +49197,7 @@ module.exports = { /***/ }), -/***/ 10165: +/***/ 165: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -79755,14 +49209,14 @@ const { kResult, kAborted, kLastProgressEventFired -} = __nccwpck_require__(86812) -const { ProgressEvent } = __nccwpck_require__(15976) -const { getEncoding } = __nccwpck_require__(40396) -const { DOMException } = __nccwpck_require__(87326) -const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(94322) -const { types } = __nccwpck_require__(39023) -const { StringDecoder } = __nccwpck_require__(13193) -const { btoa } = __nccwpck_require__(20181) +} = __nccwpck_require__(6812) +const { ProgressEvent } = __nccwpck_require__(5976) +const { getEncoding } = __nccwpck_require__(396) +const { DOMException } = __nccwpck_require__(7326) +const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(4322) +const { types } = __nccwpck_require__(9023) +const { StringDecoder } = __nccwpck_require__(3193) +const { btoa } = __nccwpck_require__(181) /** @type {PropertyDescriptor} */ const staticPropertyDescriptors = { @@ -80143,7 +49597,7 @@ module.exports = { /***/ }), -/***/ 32581: +/***/ 2581: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -80152,8 +49606,8 @@ module.exports = { // We include a version number for the Dispatcher API. In case of breaking changes, // this version number must be increased to avoid conflicts. const globalDispatcher = Symbol.for('undici.globalDispatcher.1') -const { InvalidArgumentError } = __nccwpck_require__(68707) -const Agent = __nccwpck_require__(59965) +const { InvalidArgumentError } = __nccwpck_require__(8707) +const Agent = __nccwpck_require__(9965) if (getGlobalDispatcher() === undefined) { setGlobalDispatcher(new Agent()) @@ -80183,7 +49637,7 @@ module.exports = { /***/ }), -/***/ 78840: +/***/ 8840: /***/ ((module) => { "use strict"; @@ -80226,17 +49680,17 @@ module.exports = class DecoratorHandler { /***/ }), -/***/ 48299: +/***/ 8299: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; const util = __nccwpck_require__(3440) -const { kBodyUsed } = __nccwpck_require__(36443) -const assert = __nccwpck_require__(42613) -const { InvalidArgumentError } = __nccwpck_require__(68707) -const EE = __nccwpck_require__(24434) +const { kBodyUsed } = __nccwpck_require__(6443) +const assert = __nccwpck_require__(2613) +const { InvalidArgumentError } = __nccwpck_require__(8707) +const EE = __nccwpck_require__(4434) const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] @@ -80455,13 +49909,13 @@ module.exports = RedirectHandler /***/ }), -/***/ 53573: +/***/ 3573: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const assert = __nccwpck_require__(42613) +const assert = __nccwpck_require__(2613) -const { kRetryHandlerDefaultRetry } = __nccwpck_require__(36443) -const { RequestRetryError } = __nccwpck_require__(68707) +const { kRetryHandlerDefaultRetry } = __nccwpck_require__(6443) +const { RequestRetryError } = __nccwpck_require__(8707) const { isDisturbed, parseHeaders, parseRangeHeader } = __nccwpck_require__(3440) function calculateRetryAfterHeader (retryAfter) { @@ -80798,13 +50252,13 @@ module.exports = RetryHandler /***/ }), -/***/ 64415: +/***/ 4415: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const RedirectHandler = __nccwpck_require__(48299) +const RedirectHandler = __nccwpck_require__(8299) function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { return (dispatch) => { @@ -80827,14 +50281,14 @@ module.exports = createRedirectInterceptor /***/ }), -/***/ 52824: +/***/ 2824: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; -const utils_1 = __nccwpck_require__(50172); +const utils_1 = __nccwpck_require__(172); // C headers var ERROR; (function (ERROR) { @@ -81112,7 +50566,7 @@ exports.SPECIAL_HEADERS = { /***/ }), -/***/ 63870: +/***/ 3870: /***/ ((module) => { module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCsLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwHLAcoBuAHJAbkByAG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAQDcAQtBACEQDMYBC0EOIRAMxQELQQ0hEAzEAQtBDyEQDMMBC0EQIRAMwgELQRMhEAzBAQtBFCEQDMABC0EVIRAMvwELQRYhEAy+AQtBFyEQDL0BC0EYIRAMvAELQRkhEAy7AQtBGiEQDLoBC0EbIRAMuQELQRwhEAy4AQtBCCEQDLcBC0EdIRAMtgELQSAhEAy1AQtBHyEQDLQBC0EHIRAMswELQSEhEAyyAQtBIiEQDLEBC0EeIRAMsAELQSMhEAyvAQtBEiEQDK4BC0ERIRAMrQELQSQhEAysAQtBJSEQDKsBC0EmIRAMqgELQSchEAypAQtBwwEhEAyoAQtBKSEQDKcBC0ErIRAMpgELQSwhEAylAQtBLSEQDKQBC0EuIRAMowELQS8hEAyiAQtBxAEhEAyhAQtBMCEQDKABC0E0IRAMnwELQQwhEAyeAQtBMSEQDJ0BC0EyIRAMnAELQTMhEAybAQtBOSEQDJoBC0E1IRAMmQELQcUBIRAMmAELQQshEAyXAQtBOiEQDJYBC0E2IRAMlQELQQohEAyUAQtBNyEQDJMBC0E4IRAMkgELQTwhEAyRAQtBOyEQDJABC0E9IRAMjwELQQkhEAyOAQtBKCEQDI0BC0E+IRAMjAELQT8hEAyLAQtBwAAhEAyKAQtBwQAhEAyJAQtBwgAhEAyIAQtBwwAhEAyHAQtBxAAhEAyGAQtBxQAhEAyFAQtBxgAhEAyEAQtBKiEQDIMBC0HHACEQDIIBC0HIACEQDIEBC0HJACEQDIABC0HKACEQDH8LQcsAIRAMfgtBzQAhEAx9C0HMACEQDHwLQc4AIRAMewtBzwAhEAx6C0HQACEQDHkLQdEAIRAMeAtB0gAhEAx3C0HTACEQDHYLQdQAIRAMdQtB1gAhEAx0C0HVACEQDHMLQQYhEAxyC0HXACEQDHELQQUhEAxwC0HYACEQDG8LQQQhEAxuC0HZACEQDG0LQdoAIRAMbAtB2wAhEAxrC0HcACEQDGoLQQMhEAxpC0HdACEQDGgLQd4AIRAMZwtB3wAhEAxmC0HhACEQDGULQeAAIRAMZAtB4gAhEAxjC0HjACEQDGILQQIhEAxhC0HkACEQDGALQeUAIRAMXwtB5gAhEAxeC0HnACEQDF0LQegAIRAMXAtB6QAhEAxbC0HqACEQDFoLQesAIRAMWQtB7AAhEAxYC0HtACEQDFcLQe4AIRAMVgtB7wAhEAxVC0HwACEQDFQLQfEAIRAMUwtB8gAhEAxSC0HzACEQDFELQfQAIRAMUAtB9QAhEAxPC0H2ACEQDE4LQfcAIRAMTQtB+AAhEAxMC0H5ACEQDEsLQfoAIRAMSgtB+wAhEAxJC0H8ACEQDEgLQf0AIRAMRwtB/gAhEAxGC0H/ACEQDEULQYABIRAMRAtBgQEhEAxDC0GCASEQDEILQYMBIRAMQQtBhAEhEAxAC0GFASEQDD8LQYYBIRAMPgtBhwEhEAw9C0GIASEQDDwLQYkBIRAMOwtBigEhEAw6C0GLASEQDDkLQYwBIRAMOAtBjQEhEAw3C0GOASEQDDYLQY8BIRAMNQtBkAEhEAw0C0GRASEQDDMLQZIBIRAMMgtBkwEhEAwxC0GUASEQDDALQZUBIRAMLwtBlgEhEAwuC0GXASEQDC0LQZgBIRAMLAtBmQEhEAwrC0GaASEQDCoLQZsBIRAMKQtBnAEhEAwoC0GdASEQDCcLQZ4BIRAMJgtBnwEhEAwlC0GgASEQDCQLQaEBIRAMIwtBogEhEAwiC0GjASEQDCELQaQBIRAMIAtBpQEhEAwfC0GmASEQDB4LQacBIRAMHQtBqAEhEAwcC0GpASEQDBsLQaoBIRAMGgtBqwEhEAwZC0GsASEQDBgLQa0BIRAMFwtBrgEhEAwWC0EBIRAMFQtBrwEhEAwUC0GwASEQDBMLQbEBIRAMEgtBswEhEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAc8B0AHRAdIB0wHUAdUB1gHXAdgB2QHaAdsB3AHdAd4B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAZkCpAKwAv4C/gILIAEiBCACRw3zAUHdASEQDP8DCyABIhAgAkcN3QFBwwEhEAz+AwsgASIBIAJHDZABQfcAIRAM/QMLIAEiASACRw2GAUHvACEQDPwDCyABIgEgAkcNf0HqACEQDPsDCyABIgEgAkcNe0HoACEQDPoDCyABIgEgAkcNeEHmACEQDPkDCyABIgEgAkcNGkEYIRAM+AMLIAEiASACRw0UQRIhEAz3AwsgASIBIAJHDVlBxQAhEAz2AwsgASIBIAJHDUpBPyEQDPUDCyABIgEgAkcNSEE8IRAM9AMLIAEiASACRw1BQTEhEAzzAwsgAC0ALkEBRg3rAwyHAgsgACABIgEgAhDAgICAAEEBRw3mASAAQgA3AyAM5wELIAAgASIBIAIQtICAgAAiEA3nASABIQEM9QILAkAgASIBIAJHDQBBBiEQDPADCyAAIAFBAWoiASACELuAgIAAIhAN6AEgASEBDDELIABCADcDIEESIRAM1QMLIAEiECACRw0rQR0hEAztAwsCQCABIgEgAkYNACABQQFqIQFBECEQDNQDC0EHIRAM7AMLIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN5QFBCCEQDOsDCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEUIRAM0gMLQQkhEAzqAwsgASEBIAApAyBQDeQBIAEhAQzyAgsCQCABIgEgAkcNAEELIRAM6QMLIAAgAUEBaiIBIAIQtoCAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3mASABIQEMDQsgACABIgEgAhC6gICAACIQDecBIAEhAQzwAgsCQCABIgEgAkcNAEEPIRAM5QMLIAEtAAAiEEE7Rg0IIBBBDUcN6AEgAUEBaiEBDO8CCyAAIAEiASACELqAgIAAIhAN6AEgASEBDPICCwNAAkAgAS0AAEHwtYCAAGotAAAiEEEBRg0AIBBBAkcN6wEgACgCBCEQIABBADYCBCAAIBAgAUEBaiIBELmAgIAAIhAN6gEgASEBDPQCCyABQQFqIgEgAkcNAAtBEiEQDOIDCyAAIAEiASACELqAgIAAIhAN6QEgASEBDAoLIAEiASACRw0GQRshEAzgAwsCQCABIgEgAkcNAEEWIRAM4AMLIABBioCAgAA2AgggACABNgIEIAAgASACELiAgIAAIhAN6gEgASEBQSAhEAzGAwsCQCABIgEgAkYNAANAAkAgAS0AAEHwt4CAAGotAAAiEEECRg0AAkAgEEF/ag4E5QHsAQDrAewBCyABQQFqIQFBCCEQDMgDCyABQQFqIgEgAkcNAAtBFSEQDN8DC0EVIRAM3gMLA0ACQCABLQAAQfC5gIAAai0AACIQQQJGDQAgEEF/ag4E3gHsAeAB6wHsAQsgAUEBaiIBIAJHDQALQRghEAzdAwsCQCABIgEgAkYNACAAQYuAgIAANgIIIAAgATYCBCABIQFBByEQDMQDC0EZIRAM3AMLIAFBAWohAQwCCwJAIAEiFCACRw0AQRohEAzbAwsgFCEBAkAgFC0AAEFzag4U3QLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gIA7gILQQAhECAAQQA2AhwgAEGvi4CAADYCECAAQQI2AgwgACAUQQFqNgIUDNoDCwJAIAEtAAAiEEE7Rg0AIBBBDUcN6AEgAUEBaiEBDOUCCyABQQFqIQELQSIhEAy/AwsCQCABIhAgAkcNAEEcIRAM2AMLQgAhESAQIQEgEC0AAEFQag435wHmAQECAwQFBgcIAAAAAAAAAAkKCwwNDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxAREhMUAAtBHiEQDL0DC0ICIREM5QELQgMhEQzkAQtCBCERDOMBC0IFIREM4gELQgYhEQzhAQtCByERDOABC0IIIREM3wELQgkhEQzeAQtCCiERDN0BC0ILIREM3AELQgwhEQzbAQtCDSERDNoBC0IOIREM2QELQg8hEQzYAQtCCiERDNcBC0ILIREM1gELQgwhEQzVAQtCDSERDNQBC0IOIREM0wELQg8hEQzSAQtCACERAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQLQAAQVBqDjflAeQBAAECAwQFBgfmAeYB5gHmAeYB5gHmAQgJCgsMDeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gEODxAREhPmAQtCAiERDOQBC0IDIREM4wELQgQhEQziAQtCBSERDOEBC0IGIREM4AELQgchEQzfAQtCCCERDN4BC0IJIREM3QELQgohEQzcAQtCCyERDNsBC0IMIREM2gELQg0hEQzZAQtCDiERDNgBC0IPIREM1wELQgohEQzWAQtCCyERDNUBC0IMIREM1AELQg0hEQzTAQtCDiERDNIBC0IPIREM0QELIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN0gFBHyEQDMADCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEkIRAMpwMLQSAhEAy/AwsgACABIhAgAhC+gICAAEF/ag4FtgEAxQIB0QHSAQtBESEQDKQDCyAAQQE6AC8gECEBDLsDCyABIgEgAkcN0gFBJCEQDLsDCyABIg0gAkcNHkHGACEQDLoDCyAAIAEiASACELKAgIAAIhAN1AEgASEBDLUBCyABIhAgAkcNJkHQACEQDLgDCwJAIAEiASACRw0AQSghEAy4AwsgAEEANgIEIABBjICAgAA2AgggACABIAEQsYCAgAAiEA3TASABIQEM2AELAkAgASIQIAJHDQBBKSEQDLcDCyAQLQAAIgFBIEYNFCABQQlHDdMBIBBBAWohAQwVCwJAIAEiASACRg0AIAFBAWohAQwXC0EqIRAMtQMLAkAgASIQIAJHDQBBKyEQDLUDCwJAIBAtAAAiAUEJRg0AIAFBIEcN1QELIAAtACxBCEYN0wEgECEBDJEDCwJAIAEiASACRw0AQSwhEAy0AwsgAS0AAEEKRw3VASABQQFqIQEMyQILIAEiDiACRw3VAUEvIRAMsgMLA0ACQCABLQAAIhBBIEYNAAJAIBBBdmoOBADcAdwBANoBCyABIQEM4AELIAFBAWoiASACRw0AC0ExIRAMsQMLQTIhECABIhQgAkYNsAMgAiAUayAAKAIAIgFqIRUgFCABa0EDaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfC7gIAAai0AAEcNAQJAIAFBA0cNAEEGIQEMlgMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLEDCyAAQQA2AgAgFCEBDNkBC0EzIRAgASIUIAJGDa8DIAIgFGsgACgCACIBaiEVIBQgAWtBCGohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUH0u4CAAGotAABHDQECQCABQQhHDQBBBSEBDJUDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAywAwsgAEEANgIAIBQhAQzYAQtBNCEQIAEiFCACRg2uAyACIBRrIAAoAgAiAWohFSAUIAFrQQVqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw0BAkAgAUEFRw0AQQchAQyUAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMrwMLIABBADYCACAUIQEM1wELAkAgASIBIAJGDQADQAJAIAEtAABBgL6AgABqLQAAIhBBAUYNACAQQQJGDQogASEBDN0BCyABQQFqIgEgAkcNAAtBMCEQDK4DC0EwIRAMrQMLAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AIBBBdmoOBNkB2gHaAdkB2gELIAFBAWoiASACRw0AC0E4IRAMrQMLQTghEAysAwsDQAJAIAEtAAAiEEEgRg0AIBBBCUcNAwsgAUEBaiIBIAJHDQALQTwhEAyrAwsDQAJAIAEtAAAiEEEgRg0AAkACQCAQQXZqDgTaAQEB2gEACyAQQSxGDdsBCyABIQEMBAsgAUEBaiIBIAJHDQALQT8hEAyqAwsgASEBDNsBC0HAACEQIAEiFCACRg2oAyACIBRrIAAoAgAiAWohFiAUIAFrQQZqIRcCQANAIBQtAABBIHIgAUGAwICAAGotAABHDQEgAUEGRg2OAyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAypAwsgAEEANgIAIBQhAQtBNiEQDI4DCwJAIAEiDyACRw0AQcEAIRAMpwMLIABBjICAgAA2AgggACAPNgIEIA8hASAALQAsQX9qDgTNAdUB1wHZAYcDCyABQQFqIQEMzAELAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgciAQIBBBv39qQf8BcUEaSRtB/wFxIhBBCUYNACAQQSBGDQACQAJAAkACQCAQQZ1/ag4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIRAMkQMLIAFBAWohAUEyIRAMkAMLIAFBAWohAUEzIRAMjwMLIAEhAQzQAQsgAUEBaiIBIAJHDQALQTUhEAylAwtBNSEQDKQDCwJAIAEiASACRg0AA0ACQCABLQAAQYC8gIAAai0AAEEBRg0AIAEhAQzTAQsgAUEBaiIBIAJHDQALQT0hEAykAwtBPSEQDKMDCyAAIAEiASACELCAgIAAIhAN1gEgASEBDAELIBBBAWohAQtBPCEQDIcDCwJAIAEiASACRw0AQcIAIRAMoAMLAkADQAJAIAEtAABBd2oOGAAC/gL+AoQD/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4CAP4CCyABQQFqIgEgAkcNAAtBwgAhEAygAwsgAUEBaiEBIAAtAC1BAXFFDb0BIAEhAQtBLCEQDIUDCyABIgEgAkcN0wFBxAAhEAydAwsDQAJAIAEtAABBkMCAgABqLQAAQQFGDQAgASEBDLcCCyABQQFqIgEgAkcNAAtBxQAhEAycAwsgDS0AACIQQSBGDbMBIBBBOkcNgQMgACgCBCEBIABBADYCBCAAIAEgDRCvgICAACIBDdABIA1BAWohAQyzAgtBxwAhECABIg0gAkYNmgMgAiANayAAKAIAIgFqIRYgDSABa0EFaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGQwoCAAGotAABHDYADIAFBBUYN9AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmgMLQcgAIRAgASINIAJGDZkDIAIgDWsgACgCACIBaiEWIA0gAWtBCWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBlsKAgABqLQAARw3/AgJAIAFBCUcNAEECIQEM9QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJkDCwJAIAEiDSACRw0AQckAIRAMmQMLAkACQCANLQAAIgFBIHIgASABQb9/akH/AXFBGkkbQf8BcUGSf2oOBwCAA4ADgAOAA4ADAYADCyANQQFqIQFBPiEQDIADCyANQQFqIQFBPyEQDP8CC0HKACEQIAEiDSACRg2XAyACIA1rIAAoAgAiAWohFiANIAFrQQFqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaDCgIAAai0AAEcN/QIgAUEBRg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyXAwtBywAhECABIg0gAkYNlgMgAiANayAAKAIAIgFqIRYgDSABa0EOaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGiwoCAAGotAABHDfwCIAFBDkYN8AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlgMLQcwAIRAgASINIAJGDZUDIAIgDWsgACgCACIBaiEWIA0gAWtBD2ohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBwMKAgABqLQAARw37AgJAIAFBD0cNAEEDIQEM8QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJUDC0HNACEQIAEiDSACRg2UAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQdDCgIAAai0AAEcN+gICQCABQQVHDQBBBCEBDPACCyABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyUAwsCQCABIg0gAkcNAEHOACEQDJQDCwJAAkACQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZ1/ag4TAP0C/QL9Av0C/QL9Av0C/QL9Av0C/QL9AgH9Av0C/QICA/0CCyANQQFqIQFBwQAhEAz9AgsgDUEBaiEBQcIAIRAM/AILIA1BAWohAUHDACEQDPsCCyANQQFqIQFBxAAhEAz6AgsCQCABIgEgAkYNACAAQY2AgIAANgIIIAAgATYCBCABIQFBxQAhEAz6AgtBzwAhEAySAwsgECEBAkACQCAQLQAAQXZqDgQBqAKoAgCoAgsgEEEBaiEBC0EnIRAM+AILAkAgASIBIAJHDQBB0QAhEAyRAwsCQCABLQAAQSBGDQAgASEBDI0BCyABQQFqIQEgAC0ALUEBcUUNxwEgASEBDIwBCyABIhcgAkcNyAFB0gAhEAyPAwtB0wAhECABIhQgAkYNjgMgAiAUayAAKAIAIgFqIRYgFCABa0EBaiEXA0AgFC0AACABQdbCgIAAai0AAEcNzAEgAUEBRg3HASABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAyOAwsCQCABIgEgAkcNAEHVACEQDI4DCyABLQAAQQpHDcwBIAFBAWohAQzHAQsCQCABIgEgAkcNAEHWACEQDI0DCwJAAkAgAS0AAEF2ag4EAM0BzQEBzQELIAFBAWohAQzHAQsgAUEBaiEBQcoAIRAM8wILIAAgASIBIAIQroCAgAAiEA3LASABIQFBzQAhEAzyAgsgAC0AKUEiRg2FAwymAgsCQCABIgEgAkcNAEHbACEQDIoDC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgAS0AAEFQag4K1AHTAQABAgMEBQYI1QELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMzAELQQkhEEEBIRRBACEXQQAhFgzLAQsCQCABIgEgAkcNAEHdACEQDIkDCyABLQAAQS5HDcwBIAFBAWohAQymAgsgASIBIAJHDcwBQd8AIRAMhwMLAkAgASIBIAJGDQAgAEGOgICAADYCCCAAIAE2AgQgASEBQdAAIRAM7gILQeAAIRAMhgMLQeEAIRAgASIBIAJGDYUDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHiwoCAAGotAABHDc0BIBRBA0YNzAEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhQMLQeIAIRAgASIBIAJGDYQDIAIgAWsgACgCACIUaiEWIAEgFGtBAmohFwNAIAEtAAAgFEHmwoCAAGotAABHDcwBIBRBAkYNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhAMLQeMAIRAgASIBIAJGDYMDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHpwoCAAGotAABHDcsBIBRBA0YNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMgwMLAkAgASIBIAJHDQBB5QAhEAyDAwsgACABQQFqIgEgAhCogICAACIQDc0BIAEhAUHWACEQDOkCCwJAIAEiASACRg0AA0ACQCABLQAAIhBBIEYNAAJAAkACQCAQQbh/ag4LAAHPAc8BzwHPAc8BzwHPAc8BAs8BCyABQQFqIQFB0gAhEAztAgsgAUEBaiEBQdMAIRAM7AILIAFBAWohAUHUACEQDOsCCyABQQFqIgEgAkcNAAtB5AAhEAyCAwtB5AAhEAyBAwsDQAJAIAEtAABB8MKAgABqLQAAIhBBAUYNACAQQX5qDgPPAdAB0QHSAQsgAUEBaiIBIAJHDQALQeYAIRAMgAMLAkAgASIBIAJGDQAgAUEBaiEBDAMLQecAIRAM/wILA0ACQCABLQAAQfDEgIAAai0AACIQQQFGDQACQCAQQX5qDgTSAdMB1AEA1QELIAEhAUHXACEQDOcCCyABQQFqIgEgAkcNAAtB6AAhEAz+AgsCQCABIgEgAkcNAEHpACEQDP4CCwJAIAEtAAAiEEF2ag4augHVAdUBvAHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHKAdUB1QEA0wELIAFBAWohAQtBBiEQDOMCCwNAAkAgAS0AAEHwxoCAAGotAABBAUYNACABIQEMngILIAFBAWoiASACRw0AC0HqACEQDPsCCwJAIAEiASACRg0AIAFBAWohAQwDC0HrACEQDPoCCwJAIAEiASACRw0AQewAIRAM+gILIAFBAWohAQwBCwJAIAEiASACRw0AQe0AIRAM+QILIAFBAWohAQtBBCEQDN4CCwJAIAEiFCACRw0AQe4AIRAM9wILIBQhAQJAAkACQCAULQAAQfDIgIAAai0AAEF/ag4H1AHVAdYBAJwCAQLXAQsgFEEBaiEBDAoLIBRBAWohAQzNAQtBACEQIABBADYCHCAAQZuSgIAANgIQIABBBzYCDCAAIBRBAWo2AhQM9gILAkADQAJAIAEtAABB8MiAgABqLQAAIhBBBEYNAAJAAkAgEEF/ag4H0gHTAdQB2QEABAHZAQsgASEBQdoAIRAM4AILIAFBAWohAUHcACEQDN8CCyABQQFqIgEgAkcNAAtB7wAhEAz2AgsgAUEBaiEBDMsBCwJAIAEiFCACRw0AQfAAIRAM9QILIBQtAABBL0cN1AEgFEEBaiEBDAYLAkAgASIUIAJHDQBB8QAhEAz0AgsCQCAULQAAIgFBL0cNACAUQQFqIQFB3QAhEAzbAgsgAUF2aiIEQRZLDdMBQQEgBHRBiYCAAnFFDdMBDMoCCwJAIAEiASACRg0AIAFBAWohAUHeACEQDNoCC0HyACEQDPICCwJAIAEiFCACRw0AQfQAIRAM8gILIBQhAQJAIBQtAABB8MyAgABqLQAAQX9qDgPJApQCANQBC0HhACEQDNgCCwJAIAEiFCACRg0AA0ACQCAULQAAQfDKgIAAai0AACIBQQNGDQACQCABQX9qDgLLAgDVAQsgFCEBQd8AIRAM2gILIBRBAWoiFCACRw0AC0HzACEQDPECC0HzACEQDPACCwJAIAEiASACRg0AIABBj4CAgAA2AgggACABNgIEIAEhAUHgACEQDNcCC0H1ACEQDO8CCwJAIAEiASACRw0AQfYAIRAM7wILIABBj4CAgAA2AgggACABNgIEIAEhAQtBAyEQDNQCCwNAIAEtAABBIEcNwwIgAUEBaiIBIAJHDQALQfcAIRAM7AILAkAgASIBIAJHDQBB+AAhEAzsAgsgAS0AAEEgRw3OASABQQFqIQEM7wELIAAgASIBIAIQrICAgAAiEA3OASABIQEMjgILAkAgASIEIAJHDQBB+gAhEAzqAgsgBC0AAEHMAEcN0QEgBEEBaiEBQRMhEAzPAQsCQCABIgQgAkcNAEH7ACEQDOkCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRADQCAELQAAIAFB8M6AgABqLQAARw3QASABQQVGDc4BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQfsAIRAM6AILAkAgASIEIAJHDQBB/AAhEAzoAgsCQAJAIAQtAABBvX9qDgwA0QHRAdEB0QHRAdEB0QHRAdEB0QEB0QELIARBAWohAUHmACEQDM8CCyAEQQFqIQFB5wAhEAzOAgsCQCABIgQgAkcNAEH9ACEQDOcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDc8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH9ACEQDOcCCyAAQQA2AgAgEEEBaiEBQRAhEAzMAQsCQCABIgQgAkcNAEH+ACEQDOYCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUH2zoCAAGotAABHDc4BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH+ACEQDOYCCyAAQQA2AgAgEEEBaiEBQRYhEAzLAQsCQCABIgQgAkcNAEH/ACEQDOUCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUH8zoCAAGotAABHDc0BIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH/ACEQDOUCCyAAQQA2AgAgEEEBaiEBQQUhEAzKAQsCQCABIgQgAkcNAEGAASEQDOQCCyAELQAAQdkARw3LASAEQQFqIQFBCCEQDMkBCwJAIAEiBCACRw0AQYEBIRAM4wILAkACQCAELQAAQbJ/ag4DAMwBAcwBCyAEQQFqIQFB6wAhEAzKAgsgBEEBaiEBQewAIRAMyQILAkAgASIEIAJHDQBBggEhEAziAgsCQAJAIAQtAABBuH9qDggAywHLAcsBywHLAcsBAcsBCyAEQQFqIQFB6gAhEAzJAgsgBEEBaiEBQe0AIRAMyAILAkAgASIEIAJHDQBBgwEhEAzhAgsgAiAEayAAKAIAIgFqIRAgBCABa0ECaiEUAkADQCAELQAAIAFBgM+AgABqLQAARw3JASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBA2AgBBgwEhEAzhAgtBACEQIABBADYCACAUQQFqIQEMxgELAkAgASIEIAJHDQBBhAEhEAzgAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBg8+AgABqLQAARw3IASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhAEhEAzgAgsgAEEANgIAIBBBAWohAUEjIRAMxQELAkAgASIEIAJHDQBBhQEhEAzfAgsCQAJAIAQtAABBtH9qDggAyAHIAcgByAHIAcgBAcgBCyAEQQFqIQFB7wAhEAzGAgsgBEEBaiEBQfAAIRAMxQILAkAgASIEIAJHDQBBhgEhEAzeAgsgBC0AAEHFAEcNxQEgBEEBaiEBDIMCCwJAIAEiBCACRw0AQYcBIRAM3QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQYjPgIAAai0AAEcNxQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYcBIRAM3QILIABBADYCACAQQQFqIQFBLSEQDMIBCwJAIAEiBCACRw0AQYgBIRAM3AILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNxAEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYgBIRAM3AILIABBADYCACAQQQFqIQFBKSEQDMEBCwJAIAEiASACRw0AQYkBIRAM2wILQQEhECABLQAAQd8ARw3AASABQQFqIQEMgQILAkAgASIEIAJHDQBBigEhEAzaAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQA0AgBC0AACABQYzPgIAAai0AAEcNwQEgAUEBRg2vAiABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGKASEQDNkCCwJAIAEiBCACRw0AQYsBIRAM2QILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQY7PgIAAai0AAEcNwQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYsBIRAM2QILIABBADYCACAQQQFqIQFBAiEQDL4BCwJAIAEiBCACRw0AQYwBIRAM2AILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNwAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYwBIRAM2AILIABBADYCACAQQQFqIQFBHyEQDL0BCwJAIAEiBCACRw0AQY0BIRAM1wILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNvwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY0BIRAM1wILIABBADYCACAQQQFqIQFBCSEQDLwBCwJAIAEiBCACRw0AQY4BIRAM1gILAkACQCAELQAAQbd/ag4HAL8BvwG/Ab8BvwEBvwELIARBAWohAUH4ACEQDL0CCyAEQQFqIQFB+QAhEAy8AgsCQCABIgQgAkcNAEGPASEQDNUCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGRz4CAAGotAABHDb0BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGPASEQDNUCCyAAQQA2AgAgEEEBaiEBQRghEAy6AQsCQCABIgQgAkcNAEGQASEQDNQCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUGXz4CAAGotAABHDbwBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGQASEQDNQCCyAAQQA2AgAgEEEBaiEBQRchEAy5AQsCQCABIgQgAkcNAEGRASEQDNMCCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUGaz4CAAGotAABHDbsBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGRASEQDNMCCyAAQQA2AgAgEEEBaiEBQRUhEAy4AQsCQCABIgQgAkcNAEGSASEQDNICCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGhz4CAAGotAABHDboBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGSASEQDNICCyAAQQA2AgAgEEEBaiEBQR4hEAy3AQsCQCABIgQgAkcNAEGTASEQDNECCyAELQAAQcwARw24ASAEQQFqIQFBCiEQDLYBCwJAIAQgAkcNAEGUASEQDNACCwJAAkAgBC0AAEG/f2oODwC5AbkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AQG5AQsgBEEBaiEBQf4AIRAMtwILIARBAWohAUH/ACEQDLYCCwJAIAQgAkcNAEGVASEQDM8CCwJAAkAgBC0AAEG/f2oOAwC4AQG4AQsgBEEBaiEBQf0AIRAMtgILIARBAWohBEGAASEQDLUCCwJAIAQgAkcNAEGWASEQDM4CCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUGnz4CAAGotAABHDbYBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGWASEQDM4CCyAAQQA2AgAgEEEBaiEBQQshEAyzAQsCQCAEIAJHDQBBlwEhEAzNAgsCQAJAAkACQCAELQAAQVNqDiMAuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AQG4AbgBuAG4AbgBArgBuAG4AQO4AQsgBEEBaiEBQfsAIRAMtgILIARBAWohAUH8ACEQDLUCCyAEQQFqIQRBgQEhEAy0AgsgBEEBaiEEQYIBIRAMswILAkAgBCACRw0AQZgBIRAMzAILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQanPgIAAai0AAEcNtAEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZgBIRAMzAILIABBADYCACAQQQFqIQFBGSEQDLEBCwJAIAQgAkcNAEGZASEQDMsCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGuz4CAAGotAABHDbMBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGZASEQDMsCCyAAQQA2AgAgEEEBaiEBQQYhEAywAQsCQCAEIAJHDQBBmgEhEAzKAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBtM+AgABqLQAARw2yASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmgEhEAzKAgsgAEEANgIAIBBBAWohAUEcIRAMrwELAkAgBCACRw0AQZsBIRAMyQILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbbPgIAAai0AAEcNsQEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZsBIRAMyQILIABBADYCACAQQQFqIQFBJyEQDK4BCwJAIAQgAkcNAEGcASEQDMgCCwJAAkAgBC0AAEGsf2oOAgABsQELIARBAWohBEGGASEQDK8CCyAEQQFqIQRBhwEhEAyuAgsCQCAEIAJHDQBBnQEhEAzHAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBuM+AgABqLQAARw2vASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBnQEhEAzHAgsgAEEANgIAIBBBAWohAUEmIRAMrAELAkAgBCACRw0AQZ4BIRAMxgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbrPgIAAai0AAEcNrgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ4BIRAMxgILIABBADYCACAQQQFqIQFBAyEQDKsBCwJAIAQgAkcNAEGfASEQDMUCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDa0BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGfASEQDMUCCyAAQQA2AgAgEEEBaiEBQQwhEAyqAQsCQCAEIAJHDQBBoAEhEAzEAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBvM+AgABqLQAARw2sASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBoAEhEAzEAgsgAEEANgIAIBBBAWohAUENIRAMqQELAkAgBCACRw0AQaEBIRAMwwILAkACQCAELQAAQbp/ag4LAKwBrAGsAawBrAGsAawBrAGsAQGsAQsgBEEBaiEEQYsBIRAMqgILIARBAWohBEGMASEQDKkCCwJAIAQgAkcNAEGiASEQDMICCyAELQAAQdAARw2pASAEQQFqIQQM6QELAkAgBCACRw0AQaMBIRAMwQILAkACQCAELQAAQbd/ag4HAaoBqgGqAaoBqgEAqgELIARBAWohBEGOASEQDKgCCyAEQQFqIQFBIiEQDKYBCwJAIAQgAkcNAEGkASEQDMACCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHAz4CAAGotAABHDagBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGkASEQDMACCyAAQQA2AgAgEEEBaiEBQR0hEAylAQsCQCAEIAJHDQBBpQEhEAy/AgsCQAJAIAQtAABBrn9qDgMAqAEBqAELIARBAWohBEGQASEQDKYCCyAEQQFqIQFBBCEQDKQBCwJAIAQgAkcNAEGmASEQDL4CCwJAAkACQAJAAkAgBC0AAEG/f2oOFQCqAaoBqgGqAaoBqgGqAaoBqgGqAQGqAaoBAqoBqgEDqgGqAQSqAQsgBEEBaiEEQYgBIRAMqAILIARBAWohBEGJASEQDKcCCyAEQQFqIQRBigEhEAymAgsgBEEBaiEEQY8BIRAMpQILIARBAWohBEGRASEQDKQCCwJAIAQgAkcNAEGnASEQDL0CCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDaUBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGnASEQDL0CCyAAQQA2AgAgEEEBaiEBQREhEAyiAQsCQCAEIAJHDQBBqAEhEAy8AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBws+AgABqLQAARw2kASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqAEhEAy8AgsgAEEANgIAIBBBAWohAUEsIRAMoQELAkAgBCACRw0AQakBIRAMuwILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQcXPgIAAai0AAEcNowEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQakBIRAMuwILIABBADYCACAQQQFqIQFBKyEQDKABCwJAIAQgAkcNAEGqASEQDLoCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHKz4CAAGotAABHDaIBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGqASEQDLoCCyAAQQA2AgAgEEEBaiEBQRQhEAyfAQsCQCAEIAJHDQBBqwEhEAy5AgsCQAJAAkACQCAELQAAQb5/ag4PAAECpAGkAaQBpAGkAaQBpAGkAaQBpAGkAQOkAQsgBEEBaiEEQZMBIRAMogILIARBAWohBEGUASEQDKECCyAEQQFqIQRBlQEhEAygAgsgBEEBaiEEQZYBIRAMnwILAkAgBCACRw0AQawBIRAMuAILIAQtAABBxQBHDZ8BIARBAWohBAzgAQsCQCAEIAJHDQBBrQEhEAy3AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBzc+AgABqLQAARw2fASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrQEhEAy3AgsgAEEANgIAIBBBAWohAUEOIRAMnAELAkAgBCACRw0AQa4BIRAMtgILIAQtAABB0ABHDZ0BIARBAWohAUElIRAMmwELAkAgBCACRw0AQa8BIRAMtQILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNnQEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQa8BIRAMtQILIABBADYCACAQQQFqIQFBKiEQDJoBCwJAIAQgAkcNAEGwASEQDLQCCwJAAkAgBC0AAEGrf2oOCwCdAZ0BnQGdAZ0BnQGdAZ0BnQEBnQELIARBAWohBEGaASEQDJsCCyAEQQFqIQRBmwEhEAyaAgsCQCAEIAJHDQBBsQEhEAyzAgsCQAJAIAQtAABBv39qDhQAnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBAZwBCyAEQQFqIQRBmQEhEAyaAgsgBEEBaiEEQZwBIRAMmQILAkAgBCACRw0AQbIBIRAMsgILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQdnPgIAAai0AAEcNmgEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbIBIRAMsgILIABBADYCACAQQQFqIQFBISEQDJcBCwJAIAQgAkcNAEGzASEQDLECCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUHdz4CAAGotAABHDZkBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGzASEQDLECCyAAQQA2AgAgEEEBaiEBQRohEAyWAQsCQCAEIAJHDQBBtAEhEAywAgsCQAJAAkAgBC0AAEG7f2oOEQCaAZoBmgGaAZoBmgGaAZoBmgEBmgGaAZoBmgGaAQKaAQsgBEEBaiEEQZ0BIRAMmAILIARBAWohBEGeASEQDJcCCyAEQQFqIQRBnwEhEAyWAgsCQCAEIAJHDQBBtQEhEAyvAgsgAiAEayAAKAIAIgFqIRQgBCABa0EFaiEQAkADQCAELQAAIAFB5M+AgABqLQAARw2XASABQQVGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtQEhEAyvAgsgAEEANgIAIBBBAWohAUEoIRAMlAELAkAgBCACRw0AQbYBIRAMrgILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQerPgIAAai0AAEcNlgEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbYBIRAMrgILIABBADYCACAQQQFqIQFBByEQDJMBCwJAIAQgAkcNAEG3ASEQDK0CCwJAAkAgBC0AAEG7f2oODgCWAZYBlgGWAZYBlgGWAZYBlgGWAZYBlgEBlgELIARBAWohBEGhASEQDJQCCyAEQQFqIQRBogEhEAyTAgsCQCAEIAJHDQBBuAEhEAysAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB7c+AgABqLQAARw2UASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuAEhEAysAgsgAEEANgIAIBBBAWohAUESIRAMkQELAkAgBCACRw0AQbkBIRAMqwILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNkwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbkBIRAMqwILIABBADYCACAQQQFqIQFBICEQDJABCwJAIAQgAkcNAEG6ASEQDKoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHyz4CAAGotAABHDZIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG6ASEQDKoCCyAAQQA2AgAgEEEBaiEBQQ8hEAyPAQsCQCAEIAJHDQBBuwEhEAypAgsCQAJAIAQtAABBt39qDgcAkgGSAZIBkgGSAQGSAQsgBEEBaiEEQaUBIRAMkAILIARBAWohBEGmASEQDI8CCwJAIAQgAkcNAEG8ASEQDKgCCyACIARrIAAoAgAiAWohFCAEIAFrQQdqIRACQANAIAQtAAAgAUH0z4CAAGotAABHDZABIAFBB0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG8ASEQDKgCCyAAQQA2AgAgEEEBaiEBQRshEAyNAQsCQCAEIAJHDQBBvQEhEAynAgsCQAJAAkAgBC0AAEG+f2oOEgCRAZEBkQGRAZEBkQGRAZEBkQEBkQGRAZEBkQGRAZEBApEBCyAEQQFqIQRBpAEhEAyPAgsgBEEBaiEEQacBIRAMjgILIARBAWohBEGoASEQDI0CCwJAIAQgAkcNAEG+ASEQDKYCCyAELQAAQc4ARw2NASAEQQFqIQQMzwELAkAgBCACRw0AQb8BIRAMpQILAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgBC0AAEG/f2oOFQABAgOcAQQFBpwBnAGcAQcICQoLnAEMDQ4PnAELIARBAWohAUHoACEQDJoCCyAEQQFqIQFB6QAhEAyZAgsgBEEBaiEBQe4AIRAMmAILIARBAWohAUHyACEQDJcCCyAEQQFqIQFB8wAhEAyWAgsgBEEBaiEBQfYAIRAMlQILIARBAWohAUH3ACEQDJQCCyAEQQFqIQFB+gAhEAyTAgsgBEEBaiEEQYMBIRAMkgILIARBAWohBEGEASEQDJECCyAEQQFqIQRBhQEhEAyQAgsgBEEBaiEEQZIBIRAMjwILIARBAWohBEGYASEQDI4CCyAEQQFqIQRBoAEhEAyNAgsgBEEBaiEEQaMBIRAMjAILIARBAWohBEGqASEQDIsCCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEGrASEQDIsCC0HAASEQDKMCCyAAIAUgAhCqgICAACIBDYsBIAUhAQxcCwJAIAYgAkYNACAGQQFqIQUMjQELQcIBIRAMoQILA0ACQCAQLQAAQXZqDgSMAQAAjwEACyAQQQFqIhAgAkcNAAtBwwEhEAygAgsCQCAHIAJGDQAgAEGRgICAADYCCCAAIAc2AgQgByEBQQEhEAyHAgtBxAEhEAyfAgsCQCAHIAJHDQBBxQEhEAyfAgsCQAJAIActAABBdmoOBAHOAc4BAM4BCyAHQQFqIQYMjQELIAdBAWohBQyJAQsCQCAHIAJHDQBBxgEhEAyeAgsCQAJAIActAABBdmoOFwGPAY8BAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAQCPAQsgB0EBaiEHC0GwASEQDIQCCwJAIAggAkcNAEHIASEQDJ0CCyAILQAAQSBHDY0BIABBADsBMiAIQQFqIQFBswEhEAyDAgsgASEXAkADQCAXIgcgAkYNASAHLQAAQVBqQf8BcSIQQQpPDcwBAkAgAC8BMiIUQZkzSw0AIAAgFEEKbCIUOwEyIBBB//8DcyAUQf7/A3FJDQAgB0EBaiEXIAAgFCAQaiIQOwEyIBBB//8DcUHoB0kNAQsLQQAhECAAQQA2AhwgAEHBiYCAADYCECAAQQ02AgwgACAHQQFqNgIUDJwCC0HHASEQDJsCCyAAIAggAhCugICAACIQRQ3KASAQQRVHDYwBIABByAE2AhwgACAINgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAyaAgsCQCAJIAJHDQBBzAEhEAyaAgtBACEUQQEhF0EBIRZBACEQAkACQAJAAkACQAJAAkACQAJAIAktAABBUGoOCpYBlQEAAQIDBAUGCJcBC0ECIRAMBgtBAyEQDAULQQQhEAwEC0EFIRAMAwtBBiEQDAILQQchEAwBC0EIIRALQQAhF0EAIRZBACEUDI4BC0EJIRBBASEUQQAhF0EAIRYMjQELAkAgCiACRw0AQc4BIRAMmQILIAotAABBLkcNjgEgCkEBaiEJDMoBCyALIAJHDY4BQdABIRAMlwILAkAgCyACRg0AIABBjoCAgAA2AgggACALNgIEQbcBIRAM/gELQdEBIRAMlgILAkAgBCACRw0AQdIBIRAMlgILIAIgBGsgACgCACIQaiEUIAQgEGtBBGohCwNAIAQtAAAgEEH8z4CAAGotAABHDY4BIBBBBEYN6QEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB0gEhEAyVAgsgACAMIAIQrICAgAAiAQ2NASAMIQEMuAELAkAgBCACRw0AQdQBIRAMlAILIAIgBGsgACgCACIQaiEUIAQgEGtBAWohDANAIAQtAAAgEEGB0ICAAGotAABHDY8BIBBBAUYNjgEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB1AEhEAyTAgsCQCAEIAJHDQBB1gEhEAyTAgsgAiAEayAAKAIAIhBqIRQgBCAQa0ECaiELA0AgBC0AACAQQYPQgIAAai0AAEcNjgEgEEECRg2QASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHWASEQDJICCwJAIAQgAkcNAEHXASEQDJICCwJAAkAgBC0AAEG7f2oOEACPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAY8BCyAEQQFqIQRBuwEhEAz5AQsgBEEBaiEEQbwBIRAM+AELAkAgBCACRw0AQdgBIRAMkQILIAQtAABByABHDYwBIARBAWohBAzEAQsCQCAEIAJGDQAgAEGQgICAADYCCCAAIAQ2AgRBvgEhEAz3AQtB2QEhEAyPAgsCQCAEIAJHDQBB2gEhEAyPAgsgBC0AAEHIAEYNwwEgAEEBOgAoDLkBCyAAQQI6AC8gACAEIAIQpoCAgAAiEA2NAUHCASEQDPQBCyAALQAoQX9qDgK3AbkBuAELA0ACQCAELQAAQXZqDgQAjgGOAQCOAQsgBEEBaiIEIAJHDQALQd0BIRAMiwILIABBADoALyAALQAtQQRxRQ2EAgsgAEEAOgAvIABBAToANCABIQEMjAELIBBBFUYN2gEgAEEANgIcIAAgATYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMiAILAkAgACAQIAIQtICAgAAiBA0AIBAhAQyBAgsCQCAEQRVHDQAgAEEDNgIcIAAgEDYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMiAILIABBADYCHCAAIBA2AhQgAEGnjoCAADYCECAAQRI2AgxBACEQDIcCCyAQQRVGDdYBIABBADYCHCAAIAE2AhQgAEHajYCAADYCECAAQRQ2AgxBACEQDIYCCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNjQEgAEEHNgIcIAAgEDYCFCAAIBQ2AgxBACEQDIUCCyAAIAAvATBBgAFyOwEwIAEhAQtBKiEQDOoBCyAQQRVGDdEBIABBADYCHCAAIAE2AhQgAEGDjICAADYCECAAQRM2AgxBACEQDIICCyAQQRVGDc8BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDIECCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyNAQsgAEEMNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDIACCyAQQRVGDcwBIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDP8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyMAQsgAEENNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDP4BCyAQQRVGDckBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDP0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyLAQsgAEEONgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPwBCyAAQQA2AhwgACABNgIUIABBwJWAgAA2AhAgAEECNgIMQQAhEAz7AQsgEEEVRg3FASAAQQA2AhwgACABNgIUIABBxoyAgAA2AhAgAEEjNgIMQQAhEAz6AQsgAEEQNgIcIAAgATYCFCAAIBA2AgxBACEQDPkBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQzxAQsgAEERNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPgBCyAQQRVGDcEBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPcBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyIAQsgAEETNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPYBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQztAQsgAEEUNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPUBCyAQQRVGDb0BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDPQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyGAQsgAEEWNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPMBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQt4CAgAAiBA0AIAFBAWohAQzpAQsgAEEXNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPIBCyAAQQA2AhwgACABNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzxAQtCASERCyAQQQFqIQECQCAAKQMgIhJC//////////8PVg0AIAAgEkIEhiARhDcDICABIQEMhAELIABBADYCHCAAIAE2AhQgAEGtiYCAADYCECAAQQw2AgxBACEQDO8BCyAAQQA2AhwgACAQNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzuAQsgACgCBCEXIABBADYCBCAQIBGnaiIWIQEgACAXIBAgFiAUGyIQELWAgIAAIhRFDXMgAEEFNgIcIAAgEDYCFCAAIBQ2AgxBACEQDO0BCyAAQQA2AhwgACAQNgIUIABBqpyAgAA2AhAgAEEPNgIMQQAhEAzsAQsgACAQIAIQtICAgAAiAQ0BIBAhAQtBDiEQDNEBCwJAIAFBFUcNACAAQQI2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAzqAQsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAM6QELIAFBAWohEAJAIAAvATAiAUGAAXFFDQACQCAAIBAgAhC7gICAACIBDQAgECEBDHALIAFBFUcNugEgAEEFNgIcIAAgEDYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAM6QELAkAgAUGgBHFBoARHDQAgAC0ALUECcQ0AIABBADYCHCAAIBA2AhQgAEGWk4CAADYCECAAQQQ2AgxBACEQDOkBCyAAIBAgAhC9gICAABogECEBAkACQAJAAkACQCAAIBAgAhCzgICAAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIABBAToALgsgACAALwEwQcAAcjsBMCAQIQELQSYhEAzRAQsgAEEjNgIcIAAgEDYCFCAAQaWWgIAANgIQIABBFTYCDEEAIRAM6QELIABBADYCHCAAIBA2AhQgAEHVi4CAADYCECAAQRE2AgxBACEQDOgBCyAALQAtQQFxRQ0BQcMBIRAMzgELAkAgDSACRg0AA0ACQCANLQAAQSBGDQAgDSEBDMQBCyANQQFqIg0gAkcNAAtBJSEQDOcBC0ElIRAM5gELIAAoAgQhBCAAQQA2AgQgACAEIA0Qr4CAgAAiBEUNrQEgAEEmNgIcIAAgBDYCDCAAIA1BAWo2AhRBACEQDOUBCyAQQRVGDasBIABBADYCHCAAIAE2AhQgAEH9jYCAADYCECAAQR02AgxBACEQDOQBCyAAQSc2AhwgACABNgIUIAAgEDYCDEEAIRAM4wELIBAhAUEBIRQCQAJAAkACQAJAAkACQCAALQAsQX5qDgcGBQUDAQIABQsgACAALwEwQQhyOwEwDAMLQQIhFAwBC0EEIRQLIABBAToALCAAIAAvATAgFHI7ATALIBAhAQtBKyEQDMoBCyAAQQA2AhwgACAQNgIUIABBq5KAgAA2AhAgAEELNgIMQQAhEAziAQsgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDEEAIRAM4QELIABBADoALCAQIQEMvQELIBAhAUEBIRQCQAJAAkACQAJAIAAtACxBe2oOBAMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0EpIRAMxQELIABBADYCHCAAIAE2AhQgAEHwlICAADYCECAAQQM2AgxBACEQDN0BCwJAIA4tAABBDUcNACAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA5BAWohAQx1CyAAQSw2AhwgACABNgIMIAAgDkEBajYCFEEAIRAM3QELIAAtAC1BAXFFDQFBxAEhEAzDAQsCQCAOIAJHDQBBLSEQDNwBCwJAAkADQAJAIA4tAABBdmoOBAIAAAMACyAOQQFqIg4gAkcNAAtBLSEQDN0BCyAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA4hAQx0CyAAQSw2AhwgACAONgIUIAAgATYCDEEAIRAM3AELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHMLIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzbAQsgACgCBCEEIABBADYCBCAAIAQgDhCxgICAACIEDaABIA4hAQzOAQsgEEEsRw0BIAFBAWohEEEBIQECQAJAAkACQAJAIAAtACxBe2oOBAMBAgQACyAQIQEMBAtBAiEBDAELQQQhAQsgAEEBOgAsIAAgAC8BMCABcjsBMCAQIQEMAQsgACAALwEwQQhyOwEwIBAhAQtBOSEQDL8BCyAAQQA6ACwgASEBC0E0IRAMvQELIAAgAC8BMEEgcjsBMCABIQEMAgsgACgCBCEEIABBADYCBAJAIAAgBCABELGAgIAAIgQNACABIQEMxwELIABBNzYCHCAAIAE2AhQgACAENgIMQQAhEAzUAQsgAEEIOgAsIAEhAQtBMCEQDLkBCwJAIAAtAChBAUYNACABIQEMBAsgAC0ALUEIcUUNkwEgASEBDAMLIAAtADBBIHENlAFBxQEhEAy3AQsCQCAPIAJGDQACQANAAkAgDy0AAEFQaiIBQf8BcUEKSQ0AIA8hAUE1IRAMugELIAApAyAiEUKZs+bMmbPmzBlWDQEgACARQgp+IhE3AyAgESABrUL/AYMiEkJ/hVYNASAAIBEgEnw3AyAgD0EBaiIPIAJHDQALQTkhEAzRAQsgACgCBCECIABBADYCBCAAIAIgD0EBaiIEELGAgIAAIgINlQEgBCEBDMMBC0E5IRAMzwELAkAgAC8BMCIBQQhxRQ0AIAAtAChBAUcNACAALQAtQQhxRQ2QAQsgACABQff7A3FBgARyOwEwIA8hAQtBNyEQDLQBCyAAIAAvATBBEHI7ATAMqwELIBBBFUYNiwEgAEEANgIcIAAgATYCFCAAQfCOgIAANgIQIABBHDYCDEEAIRAMywELIABBwwA2AhwgACABNgIMIAAgDUEBajYCFEEAIRAMygELAkAgAS0AAEE6Rw0AIAAoAgQhECAAQQA2AgQCQCAAIBAgARCvgICAACIQDQAgAUEBaiEBDGMLIABBwwA2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMygELIABBADYCHCAAIAE2AhQgAEGxkYCAADYCECAAQQo2AgxBACEQDMkBCyAAQQA2AhwgACABNgIUIABBoJmAgAA2AhAgAEEeNgIMQQAhEAzIAQsgAEEANgIACyAAQYASOwEqIAAgF0EBaiIBIAIQqICAgAAiEA0BIAEhAQtBxwAhEAysAQsgEEEVRw2DASAAQdEANgIcIAAgATYCFCAAQeOXgIAANgIQIABBFTYCDEEAIRAMxAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDF4LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMwwELIABBADYCHCAAIBQ2AhQgAEHBqICAADYCECAAQQc2AgwgAEEANgIAQQAhEAzCAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAzBAQtBACEQIABBADYCHCAAIAE2AhQgAEGAkYCAADYCECAAQQk2AgwMwAELIBBBFUYNfSAAQQA2AhwgACABNgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAy/AQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgAUEBaiEBAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBAJAIAAgECABEK2AgIAAIhANACABIQEMXAsgAEHYADYCHCAAIAE2AhQgACAQNgIMQQAhEAy+AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMrQELIABB2QA2AhwgACABNgIUIAAgBDYCDEEAIRAMvQELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKsBCyAAQdoANgIcIAAgATYCFCAAIAQ2AgxBACEQDLwBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQypAQsgAEHcADYCHCAAIAE2AhQgACAENgIMQQAhEAy7AQsCQCABLQAAQVBqIhBB/wFxQQpPDQAgACAQOgAqIAFBAWohAUHPACEQDKIBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQynAQsgAEHeADYCHCAAIAE2AhQgACAENgIMQQAhEAy6AQsgAEEANgIAIBdBAWohAQJAIAAtAClBI08NACABIQEMWQsgAEEANgIcIAAgATYCFCAAQdOJgIAANgIQIABBCDYCDEEAIRAMuQELIABBADYCAAtBACEQIABBADYCHCAAIAE2AhQgAEGQs4CAADYCECAAQQg2AgwMtwELIABBADYCACAXQQFqIQECQCAALQApQSFHDQAgASEBDFYLIABBADYCHCAAIAE2AhQgAEGbioCAADYCECAAQQg2AgxBACEQDLYBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKSIQQV1qQQtPDQAgASEBDFULAkAgEEEGSw0AQQEgEHRBygBxRQ0AIAEhAQxVC0EAIRAgAEEANgIcIAAgATYCFCAAQfeJgIAANgIQIABBCDYCDAy1AQsgEEEVRg1xIABBADYCHCAAIAE2AhQgAEG5jYCAADYCECAAQRo2AgxBACEQDLQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxUCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLMBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCAAQY6bgIAANgIQIABBBjYCDEEAIRAMnAELIBBBFUYNVyAAQQA2AhwgACABNgIUIABBzI6AgAA2AhAgAEEgNgIMQQAhEAybAQsgAEEANgIAIBBBAWohAUEkIRALIAAgEDoAKSAAKAIEIRAgAEEANgIEIAAgECABEKuAgIAAIhANVCABIQEMPgsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQfGbgIAANgIQIABBBjYCDAyXAQsgAUEVRg1QIABBADYCHCAAIAU2AhQgAEHwjICAADYCECAAQRs2AgxBACEQDJYBCyAAKAIEIQUgAEEANgIEIAAgBSAQEKmAgIAAIgUNASAQQQFqIQULQa0BIRAMewsgAEHBATYCHCAAIAU2AgwgACAQQQFqNgIUQQAhEAyTAQsgACgCBCEGIABBADYCBCAAIAYgEBCpgICAACIGDQEgEEEBaiEGC0GuASEQDHgLIABBwgE2AhwgACAGNgIMIAAgEEEBajYCFEEAIRAMkAELIABBADYCHCAAIAc2AhQgAEGXi4CAADYCECAAQQ02AgxBACEQDI8BCyAAQQA2AhwgACAINgIUIABB45CAgAA2AhAgAEEJNgIMQQAhEAyOAQsgAEEANgIcIAAgCDYCFCAAQZSNgIAANgIQIABBITYCDEEAIRAMjQELQQEhFkEAIRdBACEUQQEhEAsgACAQOgArIAlBAWohCAJAAkAgAC0ALUEQcQ0AAkACQAJAIAAtACoOAwEAAgQLIBZFDQMMAgsgFA0BDAILIBdFDQELIAAoAgQhECAAQQA2AgQgACAQIAgQrYCAgAAiEEUNPSAAQckBNgIcIAAgCDYCFCAAIBA2AgxBACEQDIwBCyAAKAIEIQQgAEEANgIEIAAgBCAIEK2AgIAAIgRFDXYgAEHKATYCHCAAIAg2AhQgACAENgIMQQAhEAyLAQsgACgCBCEEIABBADYCBCAAIAQgCRCtgICAACIERQ10IABBywE2AhwgACAJNgIUIAAgBDYCDEEAIRAMigELIAAoAgQhBCAAQQA2AgQgACAEIAoQrYCAgAAiBEUNciAAQc0BNgIcIAAgCjYCFCAAIAQ2AgxBACEQDIkBCwJAIAstAABBUGoiEEH/AXFBCk8NACAAIBA6ACogC0EBaiEKQbYBIRAMcAsgACgCBCEEIABBADYCBCAAIAQgCxCtgICAACIERQ1wIABBzwE2AhwgACALNgIUIAAgBDYCDEEAIRAMiAELIABBADYCHCAAIAQ2AhQgAEGQs4CAADYCECAAQQg2AgwgAEEANgIAQQAhEAyHAQsgAUEVRg0/IABBADYCHCAAIAw2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDIYBCyAAQYEEOwEoIAAoAgQhECAAQgA3AwAgACAQIAxBAWoiDBCrgICAACIQRQ04IABB0wE2AhwgACAMNgIUIAAgEDYCDEEAIRAMhQELIABBADYCAAtBACEQIABBADYCHCAAIAQ2AhQgAEHYm4CAADYCECAAQQg2AgwMgwELIAAoAgQhECAAQgA3AwAgACAQIAtBAWoiCxCrgICAACIQDQFBxgEhEAxpCyAAQQI6ACgMVQsgAEHVATYCHCAAIAs2AhQgACAQNgIMQQAhEAyAAQsgEEEVRg03IABBADYCHCAAIAQ2AhQgAEGkjICAADYCECAAQRA2AgxBACEQDH8LIAAtADRBAUcNNCAAIAQgAhC8gICAACIQRQ00IBBBFUcNNSAAQdwBNgIcIAAgBDYCFCAAQdWWgIAANgIQIABBFTYCDEEAIRAMfgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQMfQtBACEQDGMLQQIhEAxiC0ENIRAMYQtBDyEQDGALQSUhEAxfC0ETIRAMXgtBFSEQDF0LQRYhEAxcC0EXIRAMWwtBGCEQDFoLQRkhEAxZC0EaIRAMWAtBGyEQDFcLQRwhEAxWC0EdIRAMVQtBHyEQDFQLQSEhEAxTC0EjIRAMUgtBxgAhEAxRC0EuIRAMUAtBLyEQDE8LQTshEAxOC0E9IRAMTQtByAAhEAxMC0HJACEQDEsLQcsAIRAMSgtBzAAhEAxJC0HOACEQDEgLQdEAIRAMRwtB1QAhEAxGC0HYACEQDEULQdkAIRAMRAtB2wAhEAxDC0HkACEQDEILQeUAIRAMQQtB8QAhEAxAC0H0ACEQDD8LQY0BIRAMPgtBlwEhEAw9C0GpASEQDDwLQawBIRAMOwtBwAEhEAw6C0G5ASEQDDkLQa8BIRAMOAtBsQEhEAw3C0GyASEQDDYLQbQBIRAMNQtBtQEhEAw0C0G6ASEQDDMLQb0BIRAMMgtBvwEhEAwxC0HBASEQDDALIABBADYCHCAAIAQ2AhQgAEHpi4CAADYCECAAQR82AgxBACEQDEgLIABB2wE2AhwgACAENgIUIABB+paAgAA2AhAgAEEVNgIMQQAhEAxHCyAAQfgANgIcIAAgDDYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMRgsgAEHRADYCHCAAIAU2AhQgAEGwl4CAADYCECAAQRU2AgxBACEQDEULIABB+QA2AhwgACABNgIUIAAgEDYCDEEAIRAMRAsgAEH4ADYCHCAAIAE2AhQgAEHKmICAADYCECAAQRU2AgxBACEQDEMLIABB5AA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAxCCyAAQdcANgIcIAAgATYCFCAAQcmXgIAANgIQIABBFTYCDEEAIRAMQQsgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMQAsgAEHCADYCHCAAIAE2AhQgAEHjmICAADYCECAAQRU2AgxBACEQDD8LIABBADYCBCAAIA8gDxCxgICAACIERQ0BIABBOjYCHCAAIAQ2AgwgACAPQQFqNgIUQQAhEAw+CyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBEUNACAAQTs2AhwgACAENgIMIAAgAUEBajYCFEEAIRAMPgsgAUEBaiEBDC0LIA9BAWohAQwtCyAAQQA2AhwgACAPNgIUIABB5JKAgAA2AhAgAEEENgIMQQAhEAw7CyAAQTY2AhwgACAENgIUIAAgAjYCDEEAIRAMOgsgAEEuNgIcIAAgDjYCFCAAIAQ2AgxBACEQDDkLIABB0AA2AhwgACABNgIUIABBkZiAgAA2AhAgAEEVNgIMQQAhEAw4CyANQQFqIQEMLAsgAEEVNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMNgsgAEEbNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNQsgAEEPNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNAsgAEELNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMMwsgAEEaNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMgsgAEELNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMQsgAEEKNgIcIAAgATYCFCAAQeSWgIAANgIQIABBFTYCDEEAIRAMMAsgAEEeNgIcIAAgATYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAMLwsgAEEANgIcIAAgEDYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMLgsgAEEENgIcIAAgATYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMLQsgAEEANgIAIAtBAWohCwtBuAEhEAwSCyAAQQA2AgAgEEEBaiEBQfUAIRAMEQsgASEBAkAgAC0AKUEFRw0AQeMAIRAMEQtB4gAhEAwQC0EAIRAgAEEANgIcIABB5JGAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAwoCyAAQQA2AgAgF0EBaiEBQcAAIRAMDgtBASEBCyAAIAE6ACwgAEEANgIAIBdBAWohAQtBKCEQDAsLIAEhAQtBOCEQDAkLAkAgASIPIAJGDQADQAJAIA8tAABBgL6AgABqLQAAIgFBAUYNACABQQJHDQMgD0EBaiEBDAQLIA9BAWoiDyACRw0AC0E+IRAMIgtBPiEQDCELIABBADoALCAPIQEMAQtBCyEQDAYLQTohEAwFCyABQQFqIQFBLSEQDAQLIAAgAToALCAAQQA2AgAgFkEBaiEBQQwhEAwDCyAAQQA2AgAgF0EBaiEBQQohEAwCCyAAQQA2AgALIABBADoALCANIQFBCSEQDAALC0EAIRAgAEEANgIcIAAgCzYCFCAAQc2QgIAANgIQIABBCTYCDAwXC0EAIRAgAEEANgIcIAAgCjYCFCAAQemKgIAANgIQIABBCTYCDAwWC0EAIRAgAEEANgIcIAAgCTYCFCAAQbeQgIAANgIQIABBCTYCDAwVC0EAIRAgAEEANgIcIAAgCDYCFCAAQZyRgIAANgIQIABBCTYCDAwUC0EAIRAgAEEANgIcIAAgATYCFCAAQc2QgIAANgIQIABBCTYCDAwTC0EAIRAgAEEANgIcIAAgATYCFCAAQemKgIAANgIQIABBCTYCDAwSC0EAIRAgAEEANgIcIAAgATYCFCAAQbeQgIAANgIQIABBCTYCDAwRC0EAIRAgAEEANgIcIAAgATYCFCAAQZyRgIAANgIQIABBCTYCDAwQC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwPC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwOC0EAIRAgAEEANgIcIAAgATYCFCAAQcCSgIAANgIQIABBCzYCDAwNC0EAIRAgAEEANgIcIAAgATYCFCAAQZWJgIAANgIQIABBCzYCDAwMC0EAIRAgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDAwLC0EAIRAgAEEANgIcIAAgATYCFCAAQfuPgIAANgIQIABBCjYCDAwKC0EAIRAgAEEANgIcIAAgATYCFCAAQfGZgIAANgIQIABBAjYCDAwJC0EAIRAgAEEANgIcIAAgATYCFCAAQcSUgIAANgIQIABBAjYCDAwIC0EAIRAgAEEANgIcIAAgATYCFCAAQfKVgIAANgIQIABBAjYCDAwHCyAAQQI2AhwgACABNgIUIABBnJqAgAA2AhAgAEEWNgIMQQAhEAwGC0EBIRAMBQtB1AAhECABIgQgAkYNBCADQQhqIAAgBCACQdjCgIAAQQoQxYCAgAAgAygCDCEEIAMoAggOAwEEAgALEMqAgIAAAAsgAEEANgIcIABBtZqAgAA2AhAgAEEXNgIMIAAgBEEBajYCFEEAIRAMAgsgAEEANgIcIAAgBDYCFCAAQcqagIAANgIQIABBCTYCDEEAIRAMAQsCQCABIgQgAkcNAEEiIRAMAQsgAEGJgICAADYCCCAAIAQ2AgRBISEQCyADQRBqJICAgIAAIBALrwEBAn8gASgCACEGAkACQCACIANGDQAgBCAGaiEEIAYgA2ogAmshByACIAZBf3MgBWoiBmohBQNAAkAgAi0AACAELQAARg0AQQIhBAwDCwJAIAYNAEEAIQQgBSECDAMLIAZBf2ohBiAEQQFqIQQgAkEBaiICIANHDQALIAchBiADIQILIABBATYCACABIAY2AgAgACACNgIEDwsgAUEANgIAIAAgBDYCACAAIAI2AgQLCgAgABDHgICAAAvyNgELfyOAgICAAEEQayIBJICAgIAAAkBBACgCoNCAgAANAEEAEMuAgIAAQYDUhIAAayICQdkASQ0AQQAhAwJAQQAoAuDTgIAAIgQNAEEAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEIakFwcUHYqtWqBXMiBDYC4NOAgABBAEEANgL004CAAEEAQQA2AsTTgIAAC0EAIAI2AszTgIAAQQBBgNSEgAA2AsjTgIAAQQBBgNSEgAA2ApjQgIAAQQAgBDYCrNCAgABBAEF/NgKo0ICAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALQYDUhIAAQXhBgNSEgABrQQ9xQQBBgNSEgABBCGpBD3EbIgNqIgRBBGogAkFIaiIFIANrIgNBAXI2AgBBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAQYDUhIAAIAVqQTg2AgQLAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFLDQACQEEAKAKI0ICAACIGQRAgAEETakFwcSAAQQtJGyICQQN2IgR2IgNBA3FFDQACQAJAIANBAXEgBHJBAXMiBUEDdCIEQbDQgIAAaiIDIARBuNCAgABqKAIAIgQoAggiAkcNAEEAIAZBfiAFd3E2AojQgIAADAELIAMgAjYCCCACIAM2AgwLIARBCGohAyAEIAVBA3QiBUEDcjYCBCAEIAVqIgQgBCgCBEEBcjYCBAwMCyACQQAoApDQgIAAIgdNDQECQCADRQ0AAkACQCADIAR0QQIgBHQiA0EAIANrcnEiA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqIgRBA3QiA0Gw0ICAAGoiBSADQbjQgIAAaigCACIDKAIIIgBHDQBBACAGQX4gBHdxIgY2AojQgIAADAELIAUgADYCCCAAIAU2AgwLIAMgAkEDcjYCBCADIARBA3QiBGogBCACayIFNgIAIAMgAmoiACAFQQFyNgIEAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQQCQAJAIAZBASAHQQN2dCIIcQ0AQQAgBiAIcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCAENgIMIAIgBDYCCCAEIAI2AgwgBCAINgIICyADQQhqIQNBACAANgKc0ICAAEEAIAU2ApDQgIAADAwLQQAoAozQgIAAIglFDQEgCUEAIAlrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqQQJ0QbjSgIAAaigCACIAKAIEQXhxIAJrIQQgACEFAkADQAJAIAUoAhAiAw0AIAVBFGooAgAiA0UNAgsgAygCBEF4cSACayIFIAQgBSAESSIFGyEEIAMgACAFGyEAIAMhBQwACwsgACgCGCEKAkAgACgCDCIIIABGDQAgACgCCCIDQQAoApjQgIAASRogCCADNgIIIAMgCDYCDAwLCwJAIABBFGoiBSgCACIDDQAgACgCECIDRQ0DIABBEGohBQsDQCAFIQsgAyIIQRRqIgUoAgAiAw0AIAhBEGohBSAIKAIQIgMNAAsgC0EANgIADAoLQX8hAiAAQb9/Sw0AIABBE2oiA0FwcSECQQAoAozQgIAAIgdFDQBBACELAkAgAkGAAkkNAEEfIQsgAkH///8HSw0AIANBCHYiAyADQYD+P2pBEHZBCHEiA3QiBCAEQYDgH2pBEHZBBHEiBHQiBSAFQYCAD2pBEHZBAnEiBXRBD3YgAyAEciAFcmsiA0EBdCACIANBFWp2QQFxckEcaiELC0EAIAJrIQQCQAJAAkACQCALQQJ0QbjSgIAAaigCACIFDQBBACEDQQAhCAwBC0EAIQMgAkEAQRkgC0EBdmsgC0EfRht0IQBBACEIA0ACQCAFKAIEQXhxIAJrIgYgBE8NACAGIQQgBSEIIAYNAEEAIQQgBSEIIAUhAwwDCyADIAVBFGooAgAiBiAGIAUgAEEddkEEcWpBEGooAgAiBUYbIAMgBhshAyAAQQF0IQAgBQ0ACwsCQCADIAhyDQBBACEIQQIgC3QiA0EAIANrciAHcSIDRQ0DIANBACADa3FBf2oiAyADQQx2QRBxIgN2IgVBBXZBCHEiACADciAFIAB2IgNBAnZBBHEiBXIgAyAFdiIDQQF2QQJxIgVyIAMgBXYiA0EBdkEBcSIFciADIAV2akECdEG40oCAAGooAgAhAwsgA0UNAQsDQCADKAIEQXhxIAJrIgYgBEkhAAJAIAMoAhAiBQ0AIANBFGooAgAhBQsgBiAEIAAbIQQgAyAIIAAbIQggBSEDIAUNAAsLIAhFDQAgBEEAKAKQ0ICAACACa08NACAIKAIYIQsCQCAIKAIMIgAgCEYNACAIKAIIIgNBACgCmNCAgABJGiAAIAM2AgggAyAANgIMDAkLAkAgCEEUaiIFKAIAIgMNACAIKAIQIgNFDQMgCEEQaiEFCwNAIAUhBiADIgBBFGoiBSgCACIDDQAgAEEQaiEFIAAoAhAiAw0ACyAGQQA2AgAMCAsCQEEAKAKQ0ICAACIDIAJJDQBBACgCnNCAgAAhBAJAAkAgAyACayIFQRBJDQAgBCACaiIAIAVBAXI2AgRBACAFNgKQ0ICAAEEAIAA2ApzQgIAAIAQgA2ogBTYCACAEIAJBA3I2AgQMAQsgBCADQQNyNgIEIAQgA2oiAyADKAIEQQFyNgIEQQBBADYCnNCAgABBAEEANgKQ0ICAAAsgBEEIaiEDDAoLAkBBACgClNCAgAAiACACTQ0AQQAoAqDQgIAAIgMgAmoiBCAAIAJrIgVBAXI2AgRBACAFNgKU0ICAAEEAIAQ2AqDQgIAAIAMgAkEDcjYCBCADQQhqIQMMCgsCQAJAQQAoAuDTgIAARQ0AQQAoAujTgIAAIQQMAQtBAEJ/NwLs04CAAEEAQoCAhICAgMAANwLk04CAAEEAIAFBDGpBcHFB2KrVqgVzNgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgABBgIAEIQQLQQAhAwJAIAQgAkHHAGoiB2oiBkEAIARrIgtxIgggAksNAEEAQTA2AvjTgIAADAoLAkBBACgCwNOAgAAiA0UNAAJAQQAoArjTgIAAIgQgCGoiBSAETQ0AIAUgA00NAQtBACEDQQBBMDYC+NOAgAAMCgtBAC0AxNOAgABBBHENBAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQAJAIAMoAgAiBSAESw0AIAUgAygCBGogBEsNAwsgAygCCCIDDQALC0EAEMuAgIAAIgBBf0YNBSAIIQYCQEEAKALk04CAACIDQX9qIgQgAHFFDQAgCCAAayAEIABqQQAgA2txaiEGCyAGIAJNDQUgBkH+////B0sNBQJAQQAoAsDTgIAAIgNFDQBBACgCuNOAgAAiBCAGaiIFIARNDQYgBSADSw0GCyAGEMuAgIAAIgMgAEcNAQwHCyAGIABrIAtxIgZB/v///wdLDQQgBhDLgICAACIAIAMoAgAgAygCBGpGDQMgACEDCwJAIANBf0YNACACQcgAaiAGTQ0AAkAgByAGa0EAKALo04CAACIEakEAIARrcSIEQf7///8HTQ0AIAMhAAwHCwJAIAQQy4CAgABBf0YNACAEIAZqIQYgAyEADAcLQQAgBmsQy4CAgAAaDAQLIAMhACADQX9HDQUMAwtBACEIDAcLQQAhAAwFCyAAQX9HDQILQQBBACgCxNOAgABBBHI2AsTTgIAACyAIQf7///8HSw0BIAgQy4CAgAAhAEEAEMuAgIAAIQMgAEF/Rg0BIANBf0YNASAAIANPDQEgAyAAayIGIAJBOGpNDQELQQBBACgCuNOAgAAgBmoiAzYCuNOAgAACQCADQQAoArzTgIAATQ0AQQAgAzYCvNOAgAALAkACQAJAAkBBACgCoNCAgAAiBEUNAEHI04CAACEDA0AgACADKAIAIgUgAygCBCIIakYNAiADKAIIIgMNAAwDCwsCQAJAQQAoApjQgIAAIgNFDQAgACADTw0BC0EAIAA2ApjQgIAAC0EAIQNBACAGNgLM04CAAEEAIAA2AsjTgIAAQQBBfzYCqNCAgABBAEEAKALg04CAADYCrNCAgABBAEEANgLU04CAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgQgBkFIaiIFIANrIgNBAXI2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAIAAgBWpBODYCBAwCCyADLQAMQQhxDQAgBCAFSQ0AIAQgAE8NACAEQXggBGtBD3FBACAEQQhqQQ9xGyIFaiIAQQAoApTQgIAAIAZqIgsgBWsiBUEBcjYCBCADIAggBmo2AgRBAEEAKALw04CAADYCpNCAgABBACAFNgKU0ICAAEEAIAA2AqDQgIAAIAQgC2pBODYCBAwBCwJAIABBACgCmNCAgAAiCE8NAEEAIAA2ApjQgIAAIAAhCAsgACAGaiEFQcjTgIAAIQMCQAJAAkACQAJAAkACQANAIAMoAgAgBUYNASADKAIIIgMNAAwCCwsgAy0ADEEIcUUNAQtByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiIFIARLDQMLIAMoAgghAwwACwsgAyAANgIAIAMgAygCBCAGajYCBCAAQXggAGtBD3FBACAAQQhqQQ9xG2oiCyACQQNyNgIEIAVBeCAFa0EPcUEAIAVBCGpBD3EbaiIGIAsgAmoiAmshAwJAIAYgBEcNAEEAIAI2AqDQgIAAQQBBACgClNCAgAAgA2oiAzYClNCAgAAgAiADQQFyNgIEDAMLAkAgBkEAKAKc0ICAAEcNAEEAIAI2ApzQgIAAQQBBACgCkNCAgAAgA2oiAzYCkNCAgAAgAiADQQFyNgIEIAIgA2ogAzYCAAwDCwJAIAYoAgQiBEEDcUEBRw0AIARBeHEhBwJAAkAgBEH/AUsNACAGKAIIIgUgBEEDdiIIQQN0QbDQgIAAaiIARhoCQCAGKAIMIgQgBUcNAEEAQQAoAojQgIAAQX4gCHdxNgKI0ICAAAwCCyAEIABGGiAEIAU2AgggBSAENgIMDAELIAYoAhghCQJAAkAgBigCDCIAIAZGDQAgBigCCCIEIAhJGiAAIAQ2AgggBCAANgIMDAELAkAgBkEUaiIEKAIAIgUNACAGQRBqIgQoAgAiBQ0AQQAhAAwBCwNAIAQhCCAFIgBBFGoiBCgCACIFDQAgAEEQaiEEIAAoAhAiBQ0ACyAIQQA2AgALIAlFDQACQAJAIAYgBigCHCIFQQJ0QbjSgIAAaiIEKAIARw0AIAQgADYCACAADQFBAEEAKAKM0ICAAEF+IAV3cTYCjNCAgAAMAgsgCUEQQRQgCSgCECAGRhtqIAA2AgAgAEUNAQsgACAJNgIYAkAgBigCECIERQ0AIAAgBDYCECAEIAA2AhgLIAYoAhQiBEUNACAAQRRqIAQ2AgAgBCAANgIYCyAHIANqIQMgBiAHaiIGKAIEIQQLIAYgBEF+cTYCBCACIANqIAM2AgAgAiADQQFyNgIEAkAgA0H/AUsNACADQXhxQbDQgIAAaiEEAkACQEEAKAKI0ICAACIFQQEgA0EDdnQiA3ENAEEAIAUgA3I2AojQgIAAIAQhAwwBCyAEKAIIIQMLIAMgAjYCDCAEIAI2AgggAiAENgIMIAIgAzYCCAwDC0EfIQQCQCADQf///wdLDQAgA0EIdiIEIARBgP4/akEQdkEIcSIEdCIFIAVBgOAfakEQdkEEcSIFdCIAIABBgIAPakEQdkECcSIAdEEPdiAEIAVyIAByayIEQQF0IAMgBEEVanZBAXFyQRxqIQQLIAIgBDYCHCACQgA3AhAgBEECdEG40oCAAGohBQJAQQAoAozQgIAAIgBBASAEdCIIcQ0AIAUgAjYCAEEAIAAgCHI2AozQgIAAIAIgBTYCGCACIAI2AgggAiACNgIMDAMLIANBAEEZIARBAXZrIARBH0YbdCEEIAUoAgAhAANAIAAiBSgCBEF4cSADRg0CIARBHXYhACAEQQF0IQQgBSAAQQRxakEQaiIIKAIAIgANAAsgCCACNgIAIAIgBTYCGCACIAI2AgwgAiACNgIIDAILIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgsgBkFIaiIIIANrIgNBAXI2AgQgACAIakE4NgIEIAQgBUE3IAVrQQ9xQQAgBUFJakEPcRtqQUFqIgggCCAEQRBqSRsiCEEjNgIEQQBBACgC8NOAgAA2AqTQgIAAQQAgAzYClNCAgABBACALNgKg0ICAACAIQRBqQQApAtDTgIAANwIAIAhBACkCyNOAgAA3AghBACAIQQhqNgLQ04CAAEEAIAY2AszTgIAAQQAgADYCyNOAgABBAEEANgLU04CAACAIQSRqIQMDQCADQQc2AgAgA0EEaiIDIAVJDQALIAggBEYNAyAIIAgoAgRBfnE2AgQgCCAIIARrIgA2AgAgBCAAQQFyNgIEAkAgAEH/AUsNACAAQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgAEEDdnQiAHENAEEAIAUgAHI2AojQgIAAIAMhBQwBCyADKAIIIQULIAUgBDYCDCADIAQ2AgggBCADNgIMIAQgBTYCCAwEC0EfIQMCQCAAQf///wdLDQAgAEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCIIIAhBgIAPakEQdkECcSIIdEEPdiADIAVyIAhyayIDQQF0IAAgA0EVanZBAXFyQRxqIQMLIAQgAzYCHCAEQgA3AhAgA0ECdEG40oCAAGohBQJAQQAoAozQgIAAIghBASADdCIGcQ0AIAUgBDYCAEEAIAggBnI2AozQgIAAIAQgBTYCGCAEIAQ2AgggBCAENgIMDAQLIABBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhCANAIAgiBSgCBEF4cSAARg0DIANBHXYhCCADQQF0IQMgBSAIQQRxakEQaiIGKAIAIggNAAsgBiAENgIAIAQgBTYCGCAEIAQ2AgwgBCAENgIIDAMLIAUoAggiAyACNgIMIAUgAjYCCCACQQA2AhggAiAFNgIMIAIgAzYCCAsgC0EIaiEDDAULIAUoAggiAyAENgIMIAUgBDYCCCAEQQA2AhggBCAFNgIMIAQgAzYCCAtBACgClNCAgAAiAyACTQ0AQQAoAqDQgIAAIgQgAmoiBSADIAJrIgNBAXI2AgRBACADNgKU0ICAAEEAIAU2AqDQgIAAIAQgAkEDcjYCBCAEQQhqIQMMAwtBACEDQQBBMDYC+NOAgAAMAgsCQCALRQ0AAkACQCAIIAgoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAA2AgAgAA0BQQAgB0F+IAV3cSIHNgKM0ICAAAwCCyALQRBBFCALKAIQIAhGG2ogADYCACAARQ0BCyAAIAs2AhgCQCAIKAIQIgNFDQAgACADNgIQIAMgADYCGAsgCEEUaigCACIDRQ0AIABBFGogAzYCACADIAA2AhgLAkACQCAEQQ9LDQAgCCAEIAJqIgNBA3I2AgQgCCADaiIDIAMoAgRBAXI2AgQMAQsgCCACaiIAIARBAXI2AgQgCCACQQNyNgIEIAAgBGogBDYCAAJAIARB/wFLDQAgBEF4cUGw0ICAAGohAwJAAkBBACgCiNCAgAAiBUEBIARBA3Z0IgRxDQBBACAFIARyNgKI0ICAACADIQQMAQsgAygCCCEECyAEIAA2AgwgAyAANgIIIAAgAzYCDCAAIAQ2AggMAQtBHyEDAkAgBEH///8HSw0AIARBCHYiAyADQYD+P2pBEHZBCHEiA3QiBSAFQYDgH2pBEHZBBHEiBXQiAiACQYCAD2pBEHZBAnEiAnRBD3YgAyAFciACcmsiA0EBdCAEIANBFWp2QQFxckEcaiEDCyAAIAM2AhwgAEIANwIQIANBAnRBuNKAgABqIQUCQCAHQQEgA3QiAnENACAFIAA2AgBBACAHIAJyNgKM0ICAACAAIAU2AhggACAANgIIIAAgADYCDAwBCyAEQQBBGSADQQF2ayADQR9GG3QhAyAFKAIAIQICQANAIAIiBSgCBEF4cSAERg0BIANBHXYhAiADQQF0IQMgBSACQQRxakEQaiIGKAIAIgINAAsgBiAANgIAIAAgBTYCGCAAIAA2AgwgACAANgIIDAELIAUoAggiAyAANgIMIAUgADYCCCAAQQA2AhggACAFNgIMIAAgAzYCCAsgCEEIaiEDDAELAkAgCkUNAAJAAkAgACAAKAIcIgVBAnRBuNKAgABqIgMoAgBHDQAgAyAINgIAIAgNAUEAIAlBfiAFd3E2AozQgIAADAILIApBEEEUIAooAhAgAEYbaiAINgIAIAhFDQELIAggCjYCGAJAIAAoAhAiA0UNACAIIAM2AhAgAyAINgIYCyAAQRRqKAIAIgNFDQAgCEEUaiADNgIAIAMgCDYCGAsCQAJAIARBD0sNACAAIAQgAmoiA0EDcjYCBCAAIANqIgMgAygCBEEBcjYCBAwBCyAAIAJqIgUgBEEBcjYCBCAAIAJBA3I2AgQgBSAEaiAENgIAAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQMCQAJAQQEgB0EDdnQiCCAGcQ0AQQAgCCAGcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCADNgIMIAIgAzYCCCADIAI2AgwgAyAINgIIC0EAIAU2ApzQgIAAQQAgBDYCkNCAgAALIABBCGohAwsgAUEQaiSAgICAACADCwoAIAAQyYCAgAAL4g0BB38CQCAARQ0AIABBeGoiASAAQXxqKAIAIgJBeHEiAGohAwJAIAJBAXENACACQQNxRQ0BIAEgASgCACICayIBQQAoApjQgIAAIgRJDQEgAiAAaiEAAkAgAUEAKAKc0ICAAEYNAAJAIAJB/wFLDQAgASgCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgASgCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAwsgAiAGRhogAiAENgIIIAQgAjYCDAwCCyABKAIYIQcCQAJAIAEoAgwiBiABRg0AIAEoAggiAiAESRogBiACNgIIIAIgBjYCDAwBCwJAIAFBFGoiAigCACIEDQAgAUEQaiICKAIAIgQNAEEAIQYMAQsDQCACIQUgBCIGQRRqIgIoAgAiBA0AIAZBEGohAiAGKAIQIgQNAAsgBUEANgIACyAHRQ0BAkACQCABIAEoAhwiBEECdEG40oCAAGoiAigCAEcNACACIAY2AgAgBg0BQQBBACgCjNCAgABBfiAEd3E2AozQgIAADAMLIAdBEEEUIAcoAhAgAUYbaiAGNgIAIAZFDQILIAYgBzYCGAJAIAEoAhAiAkUNACAGIAI2AhAgAiAGNgIYCyABKAIUIgJFDQEgBkEUaiACNgIAIAIgBjYCGAwBCyADKAIEIgJBA3FBA0cNACADIAJBfnE2AgRBACAANgKQ0ICAACABIABqIAA2AgAgASAAQQFyNgIEDwsgASADTw0AIAMoAgQiAkEBcUUNAAJAAkAgAkECcQ0AAkAgA0EAKAKg0ICAAEcNAEEAIAE2AqDQgIAAQQBBACgClNCAgAAgAGoiADYClNCAgAAgASAAQQFyNgIEIAFBACgCnNCAgABHDQNBAEEANgKQ0ICAAEEAQQA2ApzQgIAADwsCQCADQQAoApzQgIAARw0AQQAgATYCnNCAgABBAEEAKAKQ0ICAACAAaiIANgKQ0ICAACABIABBAXI2AgQgASAAaiAANgIADwsgAkF4cSAAaiEAAkACQCACQf8BSw0AIAMoAggiBCACQQN2IgVBA3RBsNCAgABqIgZGGgJAIAMoAgwiAiAERw0AQQBBACgCiNCAgABBfiAFd3E2AojQgIAADAILIAIgBkYaIAIgBDYCCCAEIAI2AgwMAQsgAygCGCEHAkACQCADKAIMIgYgA0YNACADKAIIIgJBACgCmNCAgABJGiAGIAI2AgggAiAGNgIMDAELAkAgA0EUaiICKAIAIgQNACADQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQACQAJAIAMgAygCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAgsgB0EQQRQgBygCECADRhtqIAY2AgAgBkUNAQsgBiAHNgIYAkAgAygCECICRQ0AIAYgAjYCECACIAY2AhgLIAMoAhQiAkUNACAGQRRqIAI2AgAgAiAGNgIYCyABIABqIAA2AgAgASAAQQFyNgIEIAFBACgCnNCAgABHDQFBACAANgKQ0ICAAA8LIAMgAkF+cTYCBCABIABqIAA2AgAgASAAQQFyNgIECwJAIABB/wFLDQAgAEF4cUGw0ICAAGohAgJAAkBBACgCiNCAgAAiBEEBIABBA3Z0IgBxDQBBACAEIAByNgKI0ICAACACIQAMAQsgAigCCCEACyAAIAE2AgwgAiABNgIIIAEgAjYCDCABIAA2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIFayICQSBJDQAgAa1CgYCAgBB+IQYgAyAFaiEBA0AgASAGNwMYIAEgBjcDECABIAY3AwggASAGNwMAIAFBIGohASACQWBqIgJBH0sNAAsLIAALC45IAQBBgAgLhkgBAAAAAgAAAAMAAAAAAAAAAAAAAAQAAAAFAAAAAAAAAAAAAAAGAAAABwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEludmFsaWQgY2hhciBpbiB1cmwgcXVlcnkAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9ib2R5AENvbnRlbnQtTGVuZ3RoIG92ZXJmbG93AENodW5rIHNpemUgb3ZlcmZsb3cAUmVzcG9uc2Ugb3ZlcmZsb3cASW52YWxpZCBtZXRob2QgZm9yIEhUVFAveC54IHJlcXVlc3QASW52YWxpZCBtZXRob2QgZm9yIFJUU1AveC54IHJlcXVlc3QARXhwZWN0ZWQgU09VUkNFIG1ldGhvZCBmb3IgSUNFL3gueCByZXF1ZXN0AEludmFsaWQgY2hhciBpbiB1cmwgZnJhZ21lbnQgc3RhcnQARXhwZWN0ZWQgZG90AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fc3RhdHVzAEludmFsaWQgcmVzcG9uc2Ugc3RhdHVzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21ldGhvZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lYCBjYWxsYmFjayBlcnJvcgBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNlcnZlcgBJbnZhbGlkIGhlYWRlciB2YWx1ZSBjaGFyAEludmFsaWQgaGVhZGVyIGZpZWxkIGNoYXIAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl92ZXJzaW9uAEludmFsaWQgbWlub3IgdmVyc2lvbgBJbnZhbGlkIG1ham9yIHZlcnNpb24ARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgdmVyc2lvbgBFeHBlY3RlZCBDUkxGIGFmdGVyIHZlcnNpb24ASW52YWxpZCBIVFRQIHZlcnNpb24ASW52YWxpZCBoZWFkZXIgdG9rZW4AU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl91cmwASW52YWxpZCBjaGFyYWN0ZXJzIGluIHVybABVbmV4cGVjdGVkIHN0YXJ0IGNoYXIgaW4gdXJsAERvdWJsZSBAIGluIHVybABFbXB0eSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXJhY3RlciBpbiBDb250ZW50LUxlbmd0aABEdXBsaWNhdGUgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyIGluIHVybCBwYXRoAENvbnRlbnQtTGVuZ3RoIGNhbid0IGJlIHByZXNlbnQgd2l0aCBUcmFuc2Zlci1FbmNvZGluZwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBzaXplAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX3ZhbHVlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgdmFsdWUATWlzc2luZyBleHBlY3RlZCBMRiBhZnRlciBoZWFkZXIgdmFsdWUASW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fbmFtZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIG5hbWUAUGF1c2Ugb24gQ09OTkVDVC9VcGdyYWRlAFBhdXNlIG9uIFBSSS9VcGdyYWRlAEV4cGVjdGVkIEhUVFAvMiBDb25uZWN0aW9uIFByZWZhY2UAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9tZXRob2QARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgbWV0aG9kAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX2ZpZWxkAFBhdXNlZABJbnZhbGlkIHdvcmQgZW5jb3VudGVyZWQASW52YWxpZCBtZXRob2QgZW5jb3VudGVyZWQAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzY2hlbWEAUmVxdWVzdCBoYXMgaW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX0NIVU5LX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX05BTUVfQ09NUExFVEUASFBFX0NCX01FU1NBR0VfQ09NUExFVEUASFBFX0NCX01FVEhPRF9DT01QTEVURQBIUEVfQ0JfSEVBREVSX0ZJRUxEX0NPTVBMRVRFAERFTEVURQBIUEVfSU5WQUxJRF9FT0ZfU1RBVEUASU5WQUxJRF9TU0xfQ0VSVElGSUNBVEUAUEFVU0UATk9fUkVTUE9OU0UAVU5TVVBQT1JURURfTUVESUFfVFlQRQBHT05FAE5PVF9BQ0NFUFRBQkxFAFNFUlZJQ0VfVU5BVkFJTEFCTEUAUkFOR0VfTk9UX1NBVElTRklBQkxFAE9SSUdJTl9JU19VTlJFQUNIQUJMRQBSRVNQT05TRV9JU19TVEFMRQBQVVJHRQBNRVJHRQBSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFAFJFUVVFU1RfSEVBREVSX1RPT19MQVJHRQBQQVlMT0FEX1RPT19MQVJHRQBJTlNVRkZJQ0lFTlRfU1RPUkFHRQBIUEVfUEFVU0VEX1VQR1JBREUASFBFX1BBVVNFRF9IMl9VUEdSQURFAFNPVVJDRQBBTk5PVU5DRQBUUkFDRQBIUEVfVU5FWFBFQ1RFRF9TUEFDRQBERVNDUklCRQBVTlNVQlNDUklCRQBSRUNPUkQASFBFX0lOVkFMSURfTUVUSE9EAE5PVF9GT1VORABQUk9QRklORABVTkJJTkQAUkVCSU5EAFVOQVVUSE9SSVpFRABNRVRIT0RfTk9UX0FMTE9XRUQASFRUUF9WRVJTSU9OX05PVF9TVVBQT1JURUQAQUxSRUFEWV9SRVBPUlRFRABBQ0NFUFRFRABOT1RfSU1QTEVNRU5URUQATE9PUF9ERVRFQ1RFRABIUEVfQ1JfRVhQRUNURUQASFBFX0xGX0VYUEVDVEVEAENSRUFURUQASU1fVVNFRABIUEVfUEFVU0VEAFRJTUVPVVRfT0NDVVJFRABQQVlNRU5UX1JFUVVJUkVEAFBSRUNPTkRJVElPTl9SRVFVSVJFRABQUk9YWV9BVVRIRU5USUNBVElPTl9SRVFVSVJFRABORVRXT1JLX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAExFTkdUSF9SRVFVSVJFRABTU0xfQ0VSVElGSUNBVEVfUkVRVUlSRUQAVVBHUkFERV9SRVFVSVJFRABQQUdFX0VYUElSRUQAUFJFQ09ORElUSU9OX0ZBSUxFRABFWFBFQ1RBVElPTl9GQUlMRUQAUkVWQUxJREFUSU9OX0ZBSUxFRABTU0xfSEFORFNIQUtFX0ZBSUxFRABMT0NLRUQAVFJBTlNGT1JNQVRJT05fQVBQTElFRABOT1RfTU9ESUZJRUQATk9UX0VYVEVOREVEAEJBTkRXSURUSF9MSU1JVF9FWENFRURFRABTSVRFX0lTX09WRVJMT0FERUQASEVBRABFeHBlY3RlZCBIVFRQLwAAXhMAACYTAAAwEAAA8BcAAJ0TAAAVEgAAORcAAPASAAAKEAAAdRIAAK0SAACCEwAATxQAAH8QAACgFQAAIxQAAIkSAACLFAAATRUAANQRAADPFAAAEBgAAMkWAADcFgAAwREAAOAXAAC7FAAAdBQAAHwVAADlFAAACBcAAB8QAABlFQAAoxQAACgVAAACFQAAmRUAACwQAACLGQAATw8AANQOAABqEAAAzhAAAAIXAACJDgAAbhMAABwTAABmFAAAVhcAAMETAADNEwAAbBMAAGgXAABmFwAAXxcAACITAADODwAAaQ4AANgOAABjFgAAyxMAAKoOAAAoFwAAJhcAAMUTAABdFgAA6BEAAGcTAABlEwAA8hYAAHMTAAAdFwAA+RYAAPMRAADPDgAAzhUAAAwSAACzEQAApREAAGEQAAAyFwAAuxMAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIDAgICAgIAAAICAAICAAICAgICAgICAgIABAAAAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbG9zZWVlcC1hbGl2ZQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEAAAEBAAEBAAEBAQEBAQEBAQEAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AAAAAAAAAAAAAAAAAAAByYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AAAAAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQIAAQMAAAAAAAAAAAAAAAAAAAAAAAAEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAQAAAgAAAAAAAAAAAAAAAAAAAAAAAAMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8=' @@ -81120,7 +50574,7 @@ module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn /***/ }), -/***/ 53434: +/***/ 3434: /***/ ((module) => { module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCrLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUbbAUdISUrPAc4BS80BTMwBTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AcsBygG4AckBuQHIAboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBANwBC0EAIRAMxgELQQ4hEAzFAQtBDSEQDMQBC0EPIRAMwwELQRAhEAzCAQtBEyEQDMEBC0EUIRAMwAELQRUhEAy/AQtBFiEQDL4BC0EXIRAMvQELQRghEAy8AQtBGSEQDLsBC0EaIRAMugELQRshEAy5AQtBHCEQDLgBC0EIIRAMtwELQR0hEAy2AQtBICEQDLUBC0EfIRAMtAELQQchEAyzAQtBISEQDLIBC0EiIRAMsQELQR4hEAywAQtBIyEQDK8BC0ESIRAMrgELQREhEAytAQtBJCEQDKwBC0ElIRAMqwELQSYhEAyqAQtBJyEQDKkBC0HDASEQDKgBC0EpIRAMpwELQSshEAymAQtBLCEQDKUBC0EtIRAMpAELQS4hEAyjAQtBLyEQDKIBC0HEASEQDKEBC0EwIRAMoAELQTQhEAyfAQtBDCEQDJ4BC0ExIRAMnQELQTIhEAycAQtBMyEQDJsBC0E5IRAMmgELQTUhEAyZAQtBxQEhEAyYAQtBCyEQDJcBC0E6IRAMlgELQTYhEAyVAQtBCiEQDJQBC0E3IRAMkwELQTghEAySAQtBPCEQDJEBC0E7IRAMkAELQT0hEAyPAQtBCSEQDI4BC0EoIRAMjQELQT4hEAyMAQtBPyEQDIsBC0HAACEQDIoBC0HBACEQDIkBC0HCACEQDIgBC0HDACEQDIcBC0HEACEQDIYBC0HFACEQDIUBC0HGACEQDIQBC0EqIRAMgwELQccAIRAMggELQcgAIRAMgQELQckAIRAMgAELQcoAIRAMfwtBywAhEAx+C0HNACEQDH0LQcwAIRAMfAtBzgAhEAx7C0HPACEQDHoLQdAAIRAMeQtB0QAhEAx4C0HSACEQDHcLQdMAIRAMdgtB1AAhEAx1C0HWACEQDHQLQdUAIRAMcwtBBiEQDHILQdcAIRAMcQtBBSEQDHALQdgAIRAMbwtBBCEQDG4LQdkAIRAMbQtB2gAhEAxsC0HbACEQDGsLQdwAIRAMagtBAyEQDGkLQd0AIRAMaAtB3gAhEAxnC0HfACEQDGYLQeEAIRAMZQtB4AAhEAxkC0HiACEQDGMLQeMAIRAMYgtBAiEQDGELQeQAIRAMYAtB5QAhEAxfC0HmACEQDF4LQecAIRAMXQtB6AAhEAxcC0HpACEQDFsLQeoAIRAMWgtB6wAhEAxZC0HsACEQDFgLQe0AIRAMVwtB7gAhEAxWC0HvACEQDFULQfAAIRAMVAtB8QAhEAxTC0HyACEQDFILQfMAIRAMUQtB9AAhEAxQC0H1ACEQDE8LQfYAIRAMTgtB9wAhEAxNC0H4ACEQDEwLQfkAIRAMSwtB+gAhEAxKC0H7ACEQDEkLQfwAIRAMSAtB/QAhEAxHC0H+ACEQDEYLQf8AIRAMRQtBgAEhEAxEC0GBASEQDEMLQYIBIRAMQgtBgwEhEAxBC0GEASEQDEALQYUBIRAMPwtBhgEhEAw+C0GHASEQDD0LQYgBIRAMPAtBiQEhEAw7C0GKASEQDDoLQYsBIRAMOQtBjAEhEAw4C0GNASEQDDcLQY4BIRAMNgtBjwEhEAw1C0GQASEQDDQLQZEBIRAMMwtBkgEhEAwyC0GTASEQDDELQZQBIRAMMAtBlQEhEAwvC0GWASEQDC4LQZcBIRAMLQtBmAEhEAwsC0GZASEQDCsLQZoBIRAMKgtBmwEhEAwpC0GcASEQDCgLQZ0BIRAMJwtBngEhEAwmC0GfASEQDCULQaABIRAMJAtBoQEhEAwjC0GiASEQDCILQaMBIRAMIQtBpAEhEAwgC0GlASEQDB8LQaYBIRAMHgtBpwEhEAwdC0GoASEQDBwLQakBIRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB4fICEjJSg/QEFERUZHSElKS0xNT1BRUlPeA1dZW1xdYGJlZmdoaWprbG1vcHFyc3R1dnd4eXp7fH1+gAGCAYUBhgGHAYkBiwGMAY0BjgGPAZABkQGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNAc4BzwHQAdEB0gHTAdQB1QHWAdcB2AHZAdoB2wHcAd0B3gHgAeEB4gHjAeQB5QHmAecB6AHpAeoB6wHsAe0B7gHvAfAB8QHyAfMBmQKkArAC/gL+AgsgASIEIAJHDfMBQd0BIRAM/wMLIAEiECACRw3dAUHDASEQDP4DCyABIgEgAkcNkAFB9wAhEAz9AwsgASIBIAJHDYYBQe8AIRAM/AMLIAEiASACRw1/QeoAIRAM+wMLIAEiASACRw17QegAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEGKgICAADYCCCAAIAE2AgQgACABIAIQuICAgAAiEA3qASABIQFBICEQDMYDCwJAIAEiASACRg0AA0ACQCABLQAAQfC3gIAAai0AACIQQQJGDQACQCAQQX9qDgTlAewBAOsB7AELIAFBAWohAUEIIRAMyAMLIAFBAWoiASACRw0AC0EVIRAM3wMLQRUhEAzeAwsDQAJAIAEtAABB8LmAgABqLQAAIhBBAkYNACAQQX9qDgTeAewB4AHrAewBCyABQQFqIgEgAkcNAAtBGCEQDN0DCwJAIAEiASACRg0AIABBi4CAgAA2AgggACABNgIEIAEhAUEHIRAMxAMLQRkhEAzcAwsgAUEBaiEBDAILAkAgASIUIAJHDQBBGiEQDNsDCyAUIQECQCAULQAAQXNqDhTdAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAgDuAgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQM2gMLAkAgAS0AACIQQTtGDQAgEEENRw3oASABQQFqIQEM5QILIAFBAWohAQtBIiEQDL8DCwJAIAEiECACRw0AQRwhEAzYAwtCACERIBAhASAQLQAAQVBqDjfnAeYBAQIDBAUGBwgAAAAAAAAACQoLDA0OAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPEBESExQAC0EeIRAMvQMLQgIhEQzlAQtCAyERDOQBC0IEIREM4wELQgUhEQziAQtCBiERDOEBC0IHIREM4AELQgghEQzfAQtCCSERDN4BC0IKIREM3QELQgshEQzcAQtCDCERDNsBC0INIREM2gELQg4hEQzZAQtCDyERDNgBC0IKIREM1wELQgshEQzWAQtCDCERDNUBC0INIREM1AELQg4hEQzTAQtCDyERDNIBC0IAIRECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAtAABBUGoON+UB5AEAAQIDBAUGB+YB5gHmAeYB5gHmAeYBCAkKCwwN5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAQ4PEBESE+YBC0ICIREM5AELQgMhEQzjAQtCBCERDOIBC0IFIREM4QELQgYhEQzgAQtCByERDN8BC0IIIREM3gELQgkhEQzdAQtCCiERDNwBC0ILIREM2wELQgwhEQzaAQtCDSERDNkBC0IOIREM2AELQg8hEQzXAQtCCiERDNYBC0ILIREM1QELQgwhEQzUAQtCDSERDNMBC0IOIREM0gELQg8hEQzRAQsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3SAUEfIRAMwAMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQSQhEAynAwtBICEQDL8DCyAAIAEiECACEL6AgIAAQX9qDgW2AQDFAgHRAdIBC0ERIRAMpAMLIABBAToALyAQIQEMuwMLIAEiASACRw3SAUEkIRAMuwMLIAEiDSACRw0eQcYAIRAMugMLIAAgASIBIAIQsoCAgAAiEA3UASABIQEMtQELIAEiECACRw0mQdAAIRAMuAMLAkAgASIBIAJHDQBBKCEQDLgDCyAAQQA2AgQgAEGMgICAADYCCCAAIAEgARCxgICAACIQDdMBIAEhAQzYAQsCQCABIhAgAkcNAEEpIRAMtwMLIBAtAAAiAUEgRg0UIAFBCUcN0wEgEEEBaiEBDBULAkAgASIBIAJGDQAgAUEBaiEBDBcLQSohEAy1AwsCQCABIhAgAkcNAEErIRAMtQMLAkAgEC0AACIBQQlGDQAgAUEgRw3VAQsgAC0ALEEIRg3TASAQIQEMkQMLAkAgASIBIAJHDQBBLCEQDLQDCyABLQAAQQpHDdUBIAFBAWohAQzJAgsgASIOIAJHDdUBQS8hEAyyAwsDQAJAIAEtAAAiEEEgRg0AAkAgEEF2ag4EANwB3AEA2gELIAEhAQzgAQsgAUEBaiIBIAJHDQALQTEhEAyxAwtBMiEQIAEiFCACRg2wAyACIBRrIAAoAgAiAWohFSAUIAFrQQNqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB8LuAgABqLQAARw0BAkAgAUEDRw0AQQYhAQyWAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMsQMLIABBADYCACAUIQEM2QELQTMhECABIhQgAkYNrwMgAiAUayAAKAIAIgFqIRUgFCABa0EIaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfS7gIAAai0AAEcNAQJAIAFBCEcNAEEFIQEMlQMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLADCyAAQQA2AgAgFCEBDNgBC0E0IRAgASIUIAJGDa4DIAIgFGsgACgCACIBaiEVIBQgAWtBBWohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUHQwoCAAGotAABHDQECQCABQQVHDQBBByEBDJQDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAyvAwsgAEEANgIAIBQhAQzXAQsCQCABIgEgAkYNAANAAkAgAS0AAEGAvoCAAGotAAAiEEEBRg0AIBBBAkYNCiABIQEM3QELIAFBAWoiASACRw0AC0EwIRAMrgMLQTAhEAytAwsCQCABIgEgAkYNAANAAkAgAS0AACIQQSBGDQAgEEF2ag4E2QHaAdoB2QHaAQsgAUEBaiIBIAJHDQALQTghEAytAwtBOCEQDKwDCwNAAkAgAS0AACIQQSBGDQAgEEEJRw0DCyABQQFqIgEgAkcNAAtBPCEQDKsDCwNAAkAgAS0AACIQQSBGDQACQAJAIBBBdmoOBNoBAQHaAQALIBBBLEYN2wELIAEhAQwECyABQQFqIgEgAkcNAAtBPyEQDKoDCyABIQEM2wELQcAAIRAgASIUIAJGDagDIAIgFGsgACgCACIBaiEWIBQgAWtBBmohFwJAA0AgFC0AAEEgciABQYDAgIAAai0AAEcNASABQQZGDY4DIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADKkDCyAAQQA2AgAgFCEBC0E2IRAMjgMLAkAgASIPIAJHDQBBwQAhEAynAwsgAEGMgICAADYCCCAAIA82AgQgDyEBIAAtACxBf2oOBM0B1QHXAdkBhwMLIAFBAWohAQzMAQsCQCABIgEgAkYNAANAAkAgAS0AACIQQSByIBAgEEG/f2pB/wFxQRpJG0H/AXEiEEEJRg0AIBBBIEYNAAJAAkACQAJAIBBBnX9qDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTEhEAyRAwsgAUEBaiEBQTIhEAyQAwsgAUEBaiEBQTMhEAyPAwsgASEBDNABCyABQQFqIgEgAkcNAAtBNSEQDKUDC0E1IRAMpAMLAkAgASIBIAJGDQADQAJAIAEtAABBgLyAgABqLQAAQQFGDQAgASEBDNMBCyABQQFqIgEgAkcNAAtBPSEQDKQDC0E9IRAMowMLIAAgASIBIAIQsICAgAAiEA3WASABIQEMAQsgEEEBaiEBC0E8IRAMhwMLAkAgASIBIAJHDQBBwgAhEAygAwsCQANAAkAgAS0AAEF3ag4YAAL+Av4ChAP+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gIA/gILIAFBAWoiASACRw0AC0HCACEQDKADCyABQQFqIQEgAC0ALUEBcUUNvQEgASEBC0EsIRAMhQMLIAEiASACRw3TAUHEACEQDJ0DCwNAAkAgAS0AAEGQwICAAGotAABBAUYNACABIQEMtwILIAFBAWoiASACRw0AC0HFACEQDJwDCyANLQAAIhBBIEYNswEgEEE6Rw2BAyAAKAIEIQEgAEEANgIEIAAgASANEK+AgIAAIgEN0AEgDUEBaiEBDLMCC0HHACEQIAEiDSACRg2aAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQZDCgIAAai0AAEcNgAMgAUEFRg30AiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyaAwtByAAhECABIg0gAkYNmQMgAiANayAAKAIAIgFqIRYgDSABa0EJaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGWwoCAAGotAABHDf8CAkAgAUEJRw0AQQIhAQz1AgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmQMLAkAgASINIAJHDQBByQAhEAyZAwsCQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZJ/ag4HAIADgAOAA4ADgAMBgAMLIA1BAWohAUE+IRAMgAMLIA1BAWohAUE/IRAM/wILQcoAIRAgASINIAJGDZcDIAIgDWsgACgCACIBaiEWIA0gAWtBAWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBoMKAgABqLQAARw39AiABQQFGDfACIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJcDC0HLACEQIAEiDSACRg2WAyACIA1rIAAoAgAiAWohFiANIAFrQQ5qIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaLCgIAAai0AAEcN/AIgAUEORg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyWAwtBzAAhECABIg0gAkYNlQMgAiANayAAKAIAIgFqIRYgDSABa0EPaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUHAwoCAAGotAABHDfsCAkAgAUEPRw0AQQMhAQzxAgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlQMLQc0AIRAgASINIAJGDZQDIAIgDWsgACgCACIBaiEWIA0gAWtBBWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw36AgJAIAFBBUcNAEEEIQEM8AILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJQDCwJAIAEiDSACRw0AQc4AIRAMlAMLAkACQAJAAkAgDS0AACIBQSByIAEgAUG/f2pB/wFxQRpJG0H/AXFBnX9qDhMA/QL9Av0C/QL9Av0C/QL9Av0C/QL9Av0CAf0C/QL9AgID/QILIA1BAWohAUHBACEQDP0CCyANQQFqIQFBwgAhEAz8AgsgDUEBaiEBQcMAIRAM+wILIA1BAWohAUHEACEQDPoCCwJAIAEiASACRg0AIABBjYCAgAA2AgggACABNgIEIAEhAUHFACEQDPoCC0HPACEQDJIDCyAQIQECQAJAIBAtAABBdmoOBAGoAqgCAKgCCyAQQQFqIQELQSchEAz4AgsCQCABIgEgAkcNAEHRACEQDJEDCwJAIAEtAABBIEYNACABIQEMjQELIAFBAWohASAALQAtQQFxRQ3HASABIQEMjAELIAEiFyACRw3IAUHSACEQDI8DC0HTACEQIAEiFCACRg2OAyACIBRrIAAoAgAiAWohFiAUIAFrQQFqIRcDQCAULQAAIAFB1sKAgABqLQAARw3MASABQQFGDccBIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADI4DCwJAIAEiASACRw0AQdUAIRAMjgMLIAEtAABBCkcNzAEgAUEBaiEBDMcBCwJAIAEiASACRw0AQdYAIRAMjQMLAkACQCABLQAAQXZqDgQAzQHNAQHNAQsgAUEBaiEBDMcBCyABQQFqIQFBygAhEAzzAgsgACABIgEgAhCugICAACIQDcsBIAEhAUHNACEQDPICCyAALQApQSJGDYUDDKYCCwJAIAEiASACRw0AQdsAIRAMigMLQQAhFEEBIRdBASEWQQAhEAJAAkACQAJAAkACQAJAAkACQCABLQAAQVBqDgrUAdMBAAECAwQFBgjVAQtBAiEQDAYLQQMhEAwFC0EEIRAMBAtBBSEQDAMLQQYhEAwCC0EHIRAMAQtBCCEQC0EAIRdBACEWQQAhFAzMAQtBCSEQQQEhFEEAIRdBACEWDMsBCwJAIAEiASACRw0AQd0AIRAMiQMLIAEtAABBLkcNzAEgAUEBaiEBDKYCCyABIgEgAkcNzAFB3wAhEAyHAwsCQCABIgEgAkYNACAAQY6AgIAANgIIIAAgATYCBCABIQFB0AAhEAzuAgtB4AAhEAyGAwtB4QAhECABIgEgAkYNhQMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQeLCgIAAai0AAEcNzQEgFEEDRg3MASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyFAwtB4gAhECABIgEgAkYNhAMgAiABayAAKAIAIhRqIRYgASAUa0ECaiEXA0AgAS0AACAUQebCgIAAai0AAEcNzAEgFEECRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyEAwtB4wAhECABIgEgAkYNgwMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQenCgIAAai0AAEcNywEgFEEDRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyDAwsCQCABIgEgAkcNAEHlACEQDIMDCyAAIAFBAWoiASACEKiAgIAAIhANzQEgASEBQdYAIRAM6QILAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AAkACQAJAIBBBuH9qDgsAAc8BzwHPAc8BzwHPAc8BzwECzwELIAFBAWohAUHSACEQDO0CCyABQQFqIQFB0wAhEAzsAgsgAUEBaiEBQdQAIRAM6wILIAFBAWoiASACRw0AC0HkACEQDIIDC0HkACEQDIEDCwNAAkAgAS0AAEHwwoCAAGotAAAiEEEBRg0AIBBBfmoOA88B0AHRAdIBCyABQQFqIgEgAkcNAAtB5gAhEAyAAwsCQCABIgEgAkYNACABQQFqIQEMAwtB5wAhEAz/AgsDQAJAIAEtAABB8MSAgABqLQAAIhBBAUYNAAJAIBBBfmoOBNIB0wHUAQDVAQsgASEBQdcAIRAM5wILIAFBAWoiASACRw0AC0HoACEQDP4CCwJAIAEiASACRw0AQekAIRAM/gILAkAgAS0AACIQQXZqDhq6AdUB1QG8AdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAcoB1QHVAQDTAQsgAUEBaiEBC0EGIRAM4wILA0ACQCABLQAAQfDGgIAAai0AAEEBRg0AIAEhAQyeAgsgAUEBaiIBIAJHDQALQeoAIRAM+wILAkAgASIBIAJGDQAgAUEBaiEBDAMLQesAIRAM+gILAkAgASIBIAJHDQBB7AAhEAz6AgsgAUEBaiEBDAELAkAgASIBIAJHDQBB7QAhEAz5AgsgAUEBaiEBC0EEIRAM3gILAkAgASIUIAJHDQBB7gAhEAz3AgsgFCEBAkACQAJAIBQtAABB8MiAgABqLQAAQX9qDgfUAdUB1gEAnAIBAtcBCyAUQQFqIQEMCgsgFEEBaiEBDM0BC0EAIRAgAEEANgIcIABBm5KAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAz2AgsCQANAAkAgAS0AAEHwyICAAGotAAAiEEEERg0AAkACQCAQQX9qDgfSAdMB1AHZAQAEAdkBCyABIQFB2gAhEAzgAgsgAUEBaiEBQdwAIRAM3wILIAFBAWoiASACRw0AC0HvACEQDPYCCyABQQFqIQEMywELAkAgASIUIAJHDQBB8AAhEAz1AgsgFC0AAEEvRw3UASAUQQFqIQEMBgsCQCABIhQgAkcNAEHxACEQDPQCCwJAIBQtAAAiAUEvRw0AIBRBAWohAUHdACEQDNsCCyABQXZqIgRBFksN0wFBASAEdEGJgIACcUUN0wEMygILAkAgASIBIAJGDQAgAUEBaiEBQd4AIRAM2gILQfIAIRAM8gILAkAgASIUIAJHDQBB9AAhEAzyAgsgFCEBAkAgFC0AAEHwzICAAGotAABBf2oOA8kClAIA1AELQeEAIRAM2AILAkAgASIUIAJGDQADQAJAIBQtAABB8MqAgABqLQAAIgFBA0YNAAJAIAFBf2oOAssCANUBCyAUIQFB3wAhEAzaAgsgFEEBaiIUIAJHDQALQfMAIRAM8QILQfMAIRAM8AILAkAgASIBIAJGDQAgAEGPgICAADYCCCAAIAE2AgQgASEBQeAAIRAM1wILQfUAIRAM7wILAkAgASIBIAJHDQBB9gAhEAzvAgsgAEGPgICAADYCCCAAIAE2AgQgASEBC0EDIRAM1AILA0AgAS0AAEEgRw3DAiABQQFqIgEgAkcNAAtB9wAhEAzsAgsCQCABIgEgAkcNAEH4ACEQDOwCCyABLQAAQSBHDc4BIAFBAWohAQzvAQsgACABIgEgAhCsgICAACIQDc4BIAEhAQyOAgsCQCABIgQgAkcNAEH6ACEQDOoCCyAELQAAQcwARw3RASAEQQFqIQFBEyEQDM8BCwJAIAEiBCACRw0AQfsAIRAM6QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEANAIAQtAAAgAUHwzoCAAGotAABHDdABIAFBBUYNzgEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBB+wAhEAzoAgsCQCABIgQgAkcNAEH8ACEQDOgCCwJAAkAgBC0AAEG9f2oODADRAdEB0QHRAdEB0QHRAdEB0QHRAQHRAQsgBEEBaiEBQeYAIRAMzwILIARBAWohAUHnACEQDM4CCwJAIAEiBCACRw0AQf0AIRAM5wILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNzwEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf0AIRAM5wILIABBADYCACAQQQFqIQFBECEQDMwBCwJAIAEiBCACRw0AQf4AIRAM5gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQfbOgIAAai0AAEcNzgEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf4AIRAM5gILIABBADYCACAQQQFqIQFBFiEQDMsBCwJAIAEiBCACRw0AQf8AIRAM5QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQfzOgIAAai0AAEcNzQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf8AIRAM5QILIABBADYCACAQQQFqIQFBBSEQDMoBCwJAIAEiBCACRw0AQYABIRAM5AILIAQtAABB2QBHDcsBIARBAWohAUEIIRAMyQELAkAgASIEIAJHDQBBgQEhEAzjAgsCQAJAIAQtAABBsn9qDgMAzAEBzAELIARBAWohAUHrACEQDMoCCyAEQQFqIQFB7AAhEAzJAgsCQCABIgQgAkcNAEGCASEQDOICCwJAAkAgBC0AAEG4f2oOCADLAcsBywHLAcsBywEBywELIARBAWohAUHqACEQDMkCCyAEQQFqIQFB7QAhEAzIAgsCQCABIgQgAkcNAEGDASEQDOECCyACIARrIAAoAgAiAWohECAEIAFrQQJqIRQCQANAIAQtAAAgAUGAz4CAAGotAABHDckBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgEDYCAEGDASEQDOECC0EAIRAgAEEANgIAIBRBAWohAQzGAQsCQCABIgQgAkcNAEGEASEQDOACCyACIARrIAAoAgAiAWohFCAEIAFrQQRqIRACQANAIAQtAAAgAUGDz4CAAGotAABHDcgBIAFBBEYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGEASEQDOACCyAAQQA2AgAgEEEBaiEBQSMhEAzFAQsCQCABIgQgAkcNAEGFASEQDN8CCwJAAkAgBC0AAEG0f2oOCADIAcgByAHIAcgByAEByAELIARBAWohAUHvACEQDMYCCyAEQQFqIQFB8AAhEAzFAgsCQCABIgQgAkcNAEGGASEQDN4CCyAELQAAQcUARw3FASAEQQFqIQEMgwILAkAgASIEIAJHDQBBhwEhEAzdAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBiM+AgABqLQAARw3FASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhwEhEAzdAgsgAEEANgIAIBBBAWohAUEtIRAMwgELAkAgASIEIAJHDQBBiAEhEAzcAgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw3EASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiAEhEAzcAgsgAEEANgIAIBBBAWohAUEpIRAMwQELAkAgASIBIAJHDQBBiQEhEAzbAgtBASEQIAEtAABB3wBHDcABIAFBAWohAQyBAgsCQCABIgQgAkcNAEGKASEQDNoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRADQCAELQAAIAFBjM+AgABqLQAARw3BASABQQFGDa8CIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYoBIRAM2QILAkAgASIEIAJHDQBBiwEhEAzZAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBjs+AgABqLQAARw3BASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiwEhEAzZAgsgAEEANgIAIBBBAWohAUECIRAMvgELAkAgASIEIAJHDQBBjAEhEAzYAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw3AASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjAEhEAzYAgsgAEEANgIAIBBBAWohAUEfIRAMvQELAkAgASIEIAJHDQBBjQEhEAzXAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8s+AgABqLQAARw2/ASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjQEhEAzXAgsgAEEANgIAIBBBAWohAUEJIRAMvAELAkAgASIEIAJHDQBBjgEhEAzWAgsCQAJAIAQtAABBt39qDgcAvwG/Ab8BvwG/AQG/AQsgBEEBaiEBQfgAIRAMvQILIARBAWohAUH5ACEQDLwCCwJAIAEiBCACRw0AQY8BIRAM1QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQZHPgIAAai0AAEcNvQEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY8BIRAM1QILIABBADYCACAQQQFqIQFBGCEQDLoBCwJAIAEiBCACRw0AQZABIRAM1AILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQZfPgIAAai0AAEcNvAEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZABIRAM1AILIABBADYCACAQQQFqIQFBFyEQDLkBCwJAIAEiBCACRw0AQZEBIRAM0wILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQZrPgIAAai0AAEcNuwEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZEBIRAM0wILIABBADYCACAQQQFqIQFBFSEQDLgBCwJAIAEiBCACRw0AQZIBIRAM0gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQaHPgIAAai0AAEcNugEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZIBIRAM0gILIABBADYCACAQQQFqIQFBHiEQDLcBCwJAIAEiBCACRw0AQZMBIRAM0QILIAQtAABBzABHDbgBIARBAWohAUEKIRAMtgELAkAgBCACRw0AQZQBIRAM0AILAkACQCAELQAAQb9/ag4PALkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AbkBAbkBCyAEQQFqIQFB/gAhEAy3AgsgBEEBaiEBQf8AIRAMtgILAkAgBCACRw0AQZUBIRAMzwILAkACQCAELQAAQb9/ag4DALgBAbgBCyAEQQFqIQFB/QAhEAy2AgsgBEEBaiEEQYABIRAMtQILAkAgBCACRw0AQZYBIRAMzgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQafPgIAAai0AAEcNtgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZYBIRAMzgILIABBADYCACAQQQFqIQFBCyEQDLMBCwJAIAQgAkcNAEGXASEQDM0CCwJAAkACQAJAIAQtAABBU2oOIwC4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBAbgBuAG4AbgBuAECuAG4AbgBA7gBCyAEQQFqIQFB+wAhEAy2AgsgBEEBaiEBQfwAIRAMtQILIARBAWohBEGBASEQDLQCCyAEQQFqIQRBggEhEAyzAgsCQCAEIAJHDQBBmAEhEAzMAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBqc+AgABqLQAARw20ASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmAEhEAzMAgsgAEEANgIAIBBBAWohAUEZIRAMsQELAkAgBCACRw0AQZkBIRAMywILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQa7PgIAAai0AAEcNswEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZkBIRAMywILIABBADYCACAQQQFqIQFBBiEQDLABCwJAIAQgAkcNAEGaASEQDMoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG0z4CAAGotAABHDbIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGaASEQDMoCCyAAQQA2AgAgEEEBaiEBQRwhEAyvAQsCQCAEIAJHDQBBmwEhEAzJAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBts+AgABqLQAARw2xASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmwEhEAzJAgsgAEEANgIAIBBBAWohAUEnIRAMrgELAkAgBCACRw0AQZwBIRAMyAILAkACQCAELQAAQax/ag4CAAGxAQsgBEEBaiEEQYYBIRAMrwILIARBAWohBEGHASEQDK4CCwJAIAQgAkcNAEGdASEQDMcCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG4z4CAAGotAABHDa8BIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGdASEQDMcCCyAAQQA2AgAgEEEBaiEBQSYhEAysAQsCQCAEIAJHDQBBngEhEAzGAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBus+AgABqLQAARw2uASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBngEhEAzGAgsgAEEANgIAIBBBAWohAUEDIRAMqwELAkAgBCACRw0AQZ8BIRAMxQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNrQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ8BIRAMxQILIABBADYCACAQQQFqIQFBDCEQDKoBCwJAIAQgAkcNAEGgASEQDMQCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUG8z4CAAGotAABHDawBIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGgASEQDMQCCyAAQQA2AgAgEEEBaiEBQQ0hEAypAQsCQCAEIAJHDQBBoQEhEAzDAgsCQAJAIAQtAABBun9qDgsArAGsAawBrAGsAawBrAGsAawBAawBCyAEQQFqIQRBiwEhEAyqAgsgBEEBaiEEQYwBIRAMqQILAkAgBCACRw0AQaIBIRAMwgILIAQtAABB0ABHDakBIARBAWohBAzpAQsCQCAEIAJHDQBBowEhEAzBAgsCQAJAIAQtAABBt39qDgcBqgGqAaoBqgGqAQCqAQsgBEEBaiEEQY4BIRAMqAILIARBAWohAUEiIRAMpgELAkAgBCACRw0AQaQBIRAMwAILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQcDPgIAAai0AAEcNqAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaQBIRAMwAILIABBADYCACAQQQFqIQFBHSEQDKUBCwJAIAQgAkcNAEGlASEQDL8CCwJAAkAgBC0AAEGuf2oOAwCoAQGoAQsgBEEBaiEEQZABIRAMpgILIARBAWohAUEEIRAMpAELAkAgBCACRw0AQaYBIRAMvgILAkACQAJAAkACQCAELQAAQb9/ag4VAKoBqgGqAaoBqgGqAaoBqgGqAaoBAaoBqgECqgGqAQOqAaoBBKoBCyAEQQFqIQRBiAEhEAyoAgsgBEEBaiEEQYkBIRAMpwILIARBAWohBEGKASEQDKYCCyAEQQFqIQRBjwEhEAylAgsgBEEBaiEEQZEBIRAMpAILAkAgBCACRw0AQacBIRAMvQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNpQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQacBIRAMvQILIABBADYCACAQQQFqIQFBESEQDKIBCwJAIAQgAkcNAEGoASEQDLwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHCz4CAAGotAABHDaQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGoASEQDLwCCyAAQQA2AgAgEEEBaiEBQSwhEAyhAQsCQCAEIAJHDQBBqQEhEAy7AgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBxc+AgABqLQAARw2jASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqQEhEAy7AgsgAEEANgIAIBBBAWohAUErIRAMoAELAkAgBCACRw0AQaoBIRAMugILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQcrPgIAAai0AAEcNogEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaoBIRAMugILIABBADYCACAQQQFqIQFBFCEQDJ8BCwJAIAQgAkcNAEGrASEQDLkCCwJAAkACQAJAIAQtAABBvn9qDg8AAQKkAaQBpAGkAaQBpAGkAaQBpAGkAaQBA6QBCyAEQQFqIQRBkwEhEAyiAgsgBEEBaiEEQZQBIRAMoQILIARBAWohBEGVASEQDKACCyAEQQFqIQRBlgEhEAyfAgsCQCAEIAJHDQBBrAEhEAy4AgsgBC0AAEHFAEcNnwEgBEEBaiEEDOABCwJAIAQgAkcNAEGtASEQDLcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHNz4CAAGotAABHDZ8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGtASEQDLcCCyAAQQA2AgAgEEEBaiEBQQ4hEAycAQsCQCAEIAJHDQBBrgEhEAy2AgsgBC0AAEHQAEcNnQEgBEEBaiEBQSUhEAybAQsCQCAEIAJHDQBBrwEhEAy1AgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw2dASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrwEhEAy1AgsgAEEANgIAIBBBAWohAUEqIRAMmgELAkAgBCACRw0AQbABIRAMtAILAkACQCAELQAAQat/ag4LAJ0BnQGdAZ0BnQGdAZ0BnQGdAQGdAQsgBEEBaiEEQZoBIRAMmwILIARBAWohBEGbASEQDJoCCwJAIAQgAkcNAEGxASEQDLMCCwJAAkAgBC0AAEG/f2oOFACcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAEBnAELIARBAWohBEGZASEQDJoCCyAEQQFqIQRBnAEhEAyZAgsCQCAEIAJHDQBBsgEhEAyyAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFB2c+AgABqLQAARw2aASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBsgEhEAyyAgsgAEEANgIAIBBBAWohAUEhIRAMlwELAkAgBCACRw0AQbMBIRAMsQILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQd3PgIAAai0AAEcNmQEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbMBIRAMsQILIABBADYCACAQQQFqIQFBGiEQDJYBCwJAIAQgAkcNAEG0ASEQDLACCwJAAkACQCAELQAAQbt/ag4RAJoBmgGaAZoBmgGaAZoBmgGaAQGaAZoBmgGaAZoBApoBCyAEQQFqIQRBnQEhEAyYAgsgBEEBaiEEQZ4BIRAMlwILIARBAWohBEGfASEQDJYCCwJAIAQgAkcNAEG1ASEQDK8CCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUHkz4CAAGotAABHDZcBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG1ASEQDK8CCyAAQQA2AgAgEEEBaiEBQSghEAyUAQsCQCAEIAJHDQBBtgEhEAyuAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB6s+AgABqLQAARw2WASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtgEhEAyuAgsgAEEANgIAIBBBAWohAUEHIRAMkwELAkAgBCACRw0AQbcBIRAMrQILAkACQCAELQAAQbt/ag4OAJYBlgGWAZYBlgGWAZYBlgGWAZYBlgGWAQGWAQsgBEEBaiEEQaEBIRAMlAILIARBAWohBEGiASEQDJMCCwJAIAQgAkcNAEG4ASEQDKwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDZQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG4ASEQDKwCCyAAQQA2AgAgEEEBaiEBQRIhEAyRAQsCQCAEIAJHDQBBuQEhEAyrAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw2TASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuQEhEAyrAgsgAEEANgIAIBBBAWohAUEgIRAMkAELAkAgBCACRw0AQboBIRAMqgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNkgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQboBIRAMqgILIABBADYCACAQQQFqIQFBDyEQDI8BCwJAIAQgAkcNAEG7ASEQDKkCCwJAAkAgBC0AAEG3f2oOBwCSAZIBkgGSAZIBAZIBCyAEQQFqIQRBpQEhEAyQAgsgBEEBaiEEQaYBIRAMjwILAkAgBCACRw0AQbwBIRAMqAILIAIgBGsgACgCACIBaiEUIAQgAWtBB2ohEAJAA0AgBC0AACABQfTPgIAAai0AAEcNkAEgAUEHRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbwBIRAMqAILIABBADYCACAQQQFqIQFBGyEQDI0BCwJAIAQgAkcNAEG9ASEQDKcCCwJAAkACQCAELQAAQb5/ag4SAJEBkQGRAZEBkQGRAZEBkQGRAQGRAZEBkQGRAZEBkQECkQELIARBAWohBEGkASEQDI8CCyAEQQFqIQRBpwEhEAyOAgsgBEEBaiEEQagBIRAMjQILAkAgBCACRw0AQb4BIRAMpgILIAQtAABBzgBHDY0BIARBAWohBAzPAQsCQCAEIAJHDQBBvwEhEAylAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAELQAAQb9/ag4VAAECA5wBBAUGnAGcAZwBBwgJCgucAQwNDg+cAQsgBEEBaiEBQegAIRAMmgILIARBAWohAUHpACEQDJkCCyAEQQFqIQFB7gAhEAyYAgsgBEEBaiEBQfIAIRAMlwILIARBAWohAUHzACEQDJYCCyAEQQFqIQFB9gAhEAyVAgsgBEEBaiEBQfcAIRAMlAILIARBAWohAUH6ACEQDJMCCyAEQQFqIQRBgwEhEAySAgsgBEEBaiEEQYQBIRAMkQILIARBAWohBEGFASEQDJACCyAEQQFqIQRBkgEhEAyPAgsgBEEBaiEEQZgBIRAMjgILIARBAWohBEGgASEQDI0CCyAEQQFqIQRBowEhEAyMAgsgBEEBaiEEQaoBIRAMiwILAkAgBCACRg0AIABBkICAgAA2AgggACAENgIEQasBIRAMiwILQcABIRAMowILIAAgBSACEKqAgIAAIgENiwEgBSEBDFwLAkAgBiACRg0AIAZBAWohBQyNAQtBwgEhEAyhAgsDQAJAIBAtAABBdmoOBIwBAACPAQALIBBBAWoiECACRw0AC0HDASEQDKACCwJAIAcgAkYNACAAQZGAgIAANgIIIAAgBzYCBCAHIQFBASEQDIcCC0HEASEQDJ8CCwJAIAcgAkcNAEHFASEQDJ8CCwJAAkAgBy0AAEF2ag4EAc4BzgEAzgELIAdBAWohBgyNAQsgB0EBaiEFDIkBCwJAIAcgAkcNAEHGASEQDJ4CCwJAAkAgBy0AAEF2ag4XAY8BjwEBjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAI8BCyAHQQFqIQcLQbABIRAMhAILAkAgCCACRw0AQcgBIRAMnQILIAgtAABBIEcNjQEgAEEAOwEyIAhBAWohAUGzASEQDIMCCyABIRcCQANAIBciByACRg0BIActAABBUGpB/wFxIhBBCk8NzAECQCAALwEyIhRBmTNLDQAgACAUQQpsIhQ7ATIgEEH//wNzIBRB/v8DcUkNACAHQQFqIRcgACAUIBBqIhA7ATIgEEH//wNxQegHSQ0BCwtBACEQIABBADYCHCAAQcGJgIAANgIQIABBDTYCDCAAIAdBAWo2AhQMnAILQccBIRAMmwILIAAgCCACEK6AgIAAIhBFDcoBIBBBFUcNjAEgAEHIATYCHCAAIAg2AhQgAEHJl4CAADYCECAAQRU2AgxBACEQDJoCCwJAIAkgAkcNAEHMASEQDJoCC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgCS0AAEFQag4KlgGVAQABAgMEBQYIlwELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMjgELQQkhEEEBIRRBACEXQQAhFgyNAQsCQCAKIAJHDQBBzgEhEAyZAgsgCi0AAEEuRw2OASAKQQFqIQkMygELIAsgAkcNjgFB0AEhEAyXAgsCQCALIAJGDQAgAEGOgICAADYCCCAAIAs2AgRBtwEhEAz+AQtB0QEhEAyWAgsCQCAEIAJHDQBB0gEhEAyWAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EEaiELA0AgBC0AACAQQfzPgIAAai0AAEcNjgEgEEEERg3pASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHSASEQDJUCCyAAIAwgAhCsgICAACIBDY0BIAwhAQy4AQsCQCAEIAJHDQBB1AEhEAyUAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EBaiEMA0AgBC0AACAQQYHQgIAAai0AAEcNjwEgEEEBRg2OASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHUASEQDJMCCwJAIAQgAkcNAEHWASEQDJMCCyACIARrIAAoAgAiEGohFCAEIBBrQQJqIQsDQCAELQAAIBBBg9CAgABqLQAARw2OASAQQQJGDZABIBBBAWohECAEQQFqIgQgAkcNAAsgACAUNgIAQdYBIRAMkgILAkAgBCACRw0AQdcBIRAMkgILAkACQCAELQAAQbt/ag4QAI8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwEBjwELIARBAWohBEG7ASEQDPkBCyAEQQFqIQRBvAEhEAz4AQsCQCAEIAJHDQBB2AEhEAyRAgsgBC0AAEHIAEcNjAEgBEEBaiEEDMQBCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEG+ASEQDPcBC0HZASEQDI8CCwJAIAQgAkcNAEHaASEQDI8CCyAELQAAQcgARg3DASAAQQE6ACgMuQELIABBAjoALyAAIAQgAhCmgICAACIQDY0BQcIBIRAM9AELIAAtAChBf2oOArcBuQG4AQsDQAJAIAQtAABBdmoOBACOAY4BAI4BCyAEQQFqIgQgAkcNAAtB3QEhEAyLAgsgAEEAOgAvIAAtAC1BBHFFDYQCCyAAQQA6AC8gAEEBOgA0IAEhAQyMAQsgEEEVRg3aASAAQQA2AhwgACABNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAyIAgsCQCAAIBAgAhC0gICAACIEDQAgECEBDIECCwJAIARBFUcNACAAQQM2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAyIAgsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMhwILIBBBFUYN1gEgAEEANgIcIAAgATYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMhgILIAAoAgQhFyAAQQA2AgQgECARp2oiFiEBIAAgFyAQIBYgFBsiEBC1gICAACIURQ2NASAAQQc2AhwgACAQNgIUIAAgFDYCDEEAIRAMhQILIAAgAC8BMEGAAXI7ATAgASEBC0EqIRAM6gELIBBBFUYN0QEgAEEANgIcIAAgATYCFCAAQYOMgIAANgIQIABBEzYCDEEAIRAMggILIBBBFUYNzwEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAMgQILIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDI0BCyAAQQw2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMgAILIBBBFUYNzAEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM/wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIwBCyAAQQ02AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/gELIBBBFUYNyQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM/QELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIsBCyAAQQ42AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/AELIABBADYCHCAAIAE2AhQgAEHAlYCAADYCECAAQQI2AgxBACEQDPsBCyAQQRVGDcUBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPoBCyAAQRA2AhwgACABNgIUIAAgEDYCDEEAIRAM+QELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDPEBCyAAQRE2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM+AELIBBBFUYNwQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM9wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIgBCyAAQRM2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM9gELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDO0BCyAAQRQ2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM9QELIBBBFUYNvQEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM9AELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIYBCyAAQRY2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM8wELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC3gICAACIEDQAgAUEBaiEBDOkBCyAAQRc2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM8gELIABBADYCHCAAIAE2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDPEBC0IBIRELIBBBAWohAQJAIAApAyAiEkL//////////w9WDQAgACASQgSGIBGENwMgIAEhAQyEAQsgAEEANgIcIAAgATYCFCAAQa2JgIAANgIQIABBDDYCDEEAIRAM7wELIABBADYCHCAAIBA2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDO4BCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNcyAAQQU2AhwgACAQNgIUIAAgFDYCDEEAIRAM7QELIABBADYCHCAAIBA2AhQgAEGqnICAADYCECAAQQ82AgxBACEQDOwBCyAAIBAgAhC0gICAACIBDQEgECEBC0EOIRAM0QELAkAgAUEVRw0AIABBAjYCHCAAIBA2AhQgAEGwmICAADYCECAAQRU2AgxBACEQDOoBCyAAQQA2AhwgACAQNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAzpAQsgAUEBaiEQAkAgAC8BMCIBQYABcUUNAAJAIAAgECACELuAgIAAIgENACAQIQEMcAsgAUEVRw26ASAAQQU2AhwgACAQNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAzpAQsCQCABQaAEcUGgBEcNACAALQAtQQJxDQAgAEEANgIcIAAgEDYCFCAAQZaTgIAANgIQIABBBDYCDEEAIRAM6QELIAAgECACEL2AgIAAGiAQIQECQAJAAkACQAJAIAAgECACELOAgIAADhYCAQAEBAQEBAQEBAQEBAQEBAQEBAQDBAsgAEEBOgAuCyAAIAAvATBBwAByOwEwIBAhAQtBJiEQDNEBCyAAQSM2AhwgACAQNgIUIABBpZaAgAA2AhAgAEEVNgIMQQAhEAzpAQsgAEEANgIcIAAgEDYCFCAAQdWLgIAANgIQIABBETYCDEEAIRAM6AELIAAtAC1BAXFFDQFBwwEhEAzOAQsCQCANIAJGDQADQAJAIA0tAABBIEYNACANIQEMxAELIA1BAWoiDSACRw0AC0ElIRAM5wELQSUhEAzmAQsgACgCBCEEIABBADYCBCAAIAQgDRCvgICAACIERQ2tASAAQSY2AhwgACAENgIMIAAgDUEBajYCFEEAIRAM5QELIBBBFUYNqwEgAEEANgIcIAAgATYCFCAAQf2NgIAANgIQIABBHTYCDEEAIRAM5AELIABBJzYCHCAAIAE2AhQgACAQNgIMQQAhEAzjAQsgECEBQQEhFAJAAkACQAJAAkACQAJAIAAtACxBfmoOBwYFBQMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0ErIRAMygELIABBADYCHCAAIBA2AhQgAEGrkoCAADYCECAAQQs2AgxBACEQDOIBCyAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMQQAhEAzhAQsgAEEAOgAsIBAhAQy9AQsgECEBQQEhFAJAAkACQAJAAkAgAC0ALEF7ag4EAwECAAULIAAgAC8BMEEIcjsBMAwDC0ECIRQMAQtBBCEUCyAAQQE6ACwgACAALwEwIBRyOwEwCyAQIQELQSkhEAzFAQsgAEEANgIcIAAgATYCFCAAQfCUgIAANgIQIABBAzYCDEEAIRAM3QELAkAgDi0AAEENRw0AIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHULIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzdAQsgAC0ALUEBcUUNAUHEASEQDMMBCwJAIA4gAkcNAEEtIRAM3AELAkACQANAAkAgDi0AAEF2ag4EAgAAAwALIA5BAWoiDiACRw0AC0EtIRAM3QELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDiEBDHQLIABBLDYCHCAAIA42AhQgACABNgIMQQAhEAzcAQsgACgCBCEBIABBADYCBAJAIAAgASAOELGAgIAAIgENACAOQQFqIQEMcwsgAEEsNgIcIAAgATYCDCAAIA5BAWo2AhRBACEQDNsBCyAAKAIEIQQgAEEANgIEIAAgBCAOELGAgIAAIgQNoAEgDiEBDM4BCyAQQSxHDQEgAUEBaiEQQQEhAQJAAkACQAJAAkAgAC0ALEF7ag4EAwECBAALIBAhAQwEC0ECIQEMAQtBBCEBCyAAQQE6ACwgACAALwEwIAFyOwEwIBAhAQwBCyAAIAAvATBBCHI7ATAgECEBC0E5IRAMvwELIABBADoALCABIQELQTQhEAy9AQsgACAALwEwQSByOwEwIAEhAQwCCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBA0AIAEhAQzHAQsgAEE3NgIcIAAgATYCFCAAIAQ2AgxBACEQDNQBCyAAQQg6ACwgASEBC0EwIRAMuQELAkAgAC0AKEEBRg0AIAEhAQwECyAALQAtQQhxRQ2TASABIQEMAwsgAC0AMEEgcQ2UAUHFASEQDLcBCwJAIA8gAkYNAAJAA0ACQCAPLQAAQVBqIgFB/wFxQQpJDQAgDyEBQTUhEAy6AQsgACkDICIRQpmz5syZs+bMGVYNASAAIBFCCn4iETcDICARIAGtQv8BgyISQn+FVg0BIAAgESASfDcDICAPQQFqIg8gAkcNAAtBOSEQDNEBCyAAKAIEIQIgAEEANgIEIAAgAiAPQQFqIgQQsYCAgAAiAg2VASAEIQEMwwELQTkhEAzPAQsCQCAALwEwIgFBCHFFDQAgAC0AKEEBRw0AIAAtAC1BCHFFDZABCyAAIAFB9/sDcUGABHI7ATAgDyEBC0E3IRAMtAELIAAgAC8BMEEQcjsBMAyrAQsgEEEVRg2LASAAQQA2AhwgACABNgIUIABB8I6AgAA2AhAgAEEcNgIMQQAhEAzLAQsgAEHDADYCHCAAIAE2AgwgACANQQFqNgIUQQAhEAzKAQsCQCABLQAAQTpHDQAgACgCBCEQIABBADYCBAJAIAAgECABEK+AgIAAIhANACABQQFqIQEMYwsgAEHDADYCHCAAIBA2AgwgACABQQFqNgIUQQAhEAzKAQsgAEEANgIcIAAgATYCFCAAQbGRgIAANgIQIABBCjYCDEEAIRAMyQELIABBADYCHCAAIAE2AhQgAEGgmYCAADYCECAAQR42AgxBACEQDMgBCyAAQQA2AgALIABBgBI7ASogACAXQQFqIgEgAhCogICAACIQDQEgASEBC0HHACEQDKwBCyAQQRVHDYMBIABB0QA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAzEAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAzDAQsgAEEANgIcIAAgFDYCFCAAQcGogIAANgIQIABBBzYCDCAAQQA2AgBBACEQDMIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxdCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDMEBC0EAIRAgAEEANgIcIAAgATYCFCAAQYCRgIAANgIQIABBCTYCDAzAAQsgEEEVRg19IABBADYCHCAAIAE2AhQgAEGUjYCAADYCECAAQSE2AgxBACEQDL8BC0EBIRZBACEXQQAhFEEBIRALIAAgEDoAKyABQQFqIQECQAJAIAAtAC1BEHENAAJAAkACQCAALQAqDgMBAAIECyAWRQ0DDAILIBQNAQwCCyAXRQ0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQrYCAgAAiEA0AIAEhAQxcCyAAQdgANgIcIAAgATYCFCAAIBA2AgxBACEQDL4BCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQytAQsgAEHZADYCHCAAIAE2AhQgACAENgIMQQAhEAy9AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMqwELIABB2gA2AhwgACABNgIUIAAgBDYCDEEAIRAMvAELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKkBCyAAQdwANgIcIAAgATYCFCAAIAQ2AgxBACEQDLsBCwJAIAEtAABBUGoiEEH/AXFBCk8NACAAIBA6ACogAUEBaiEBQc8AIRAMogELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMRgsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAylAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHSADYCHCAAIBQ2AhQgACABNgIMQQAhEAykAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHTADYCHCAAIBQ2AhQgACABNgIMQQAhEAyjAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMQwsgAEHlADYCHCAAIBQ2AhQgACABNgIMQQAhEAyiAQsgAEEANgIcIAAgFDYCFCAAQcOPgIAANgIQIABBBzYCDEEAIRAMoQELIABBADYCHCAAIAE2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKABC0EAIRAgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDAyfAQsgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDEEAIRAMngELIABBADYCHCAAIBQ2AhQgAEH+kYCAADYCECAAQQc2AgxBACEQDJ0BCyAAQQA2AhwgACABNgIUIABBjpuAgAA2AhAgAEEGNgIMQQAhEAycAQsgEEEVRg1XIABBADYCHCAAIAE2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDJsBCyAAQQA2AgAgEEEBaiEBQSQhEAsgACAQOgApIAAoAgQhECAAQQA2AgQgACAQIAEQq4CAgAAiEA1UIAEhAQw+CyAAQQA2AgALQQAhECAAQQA2AhwgACAENgIUIABB8ZuAgAA2AhAgAEEGNgIMDJcBCyABQRVGDVAgAEEANgIcIAAgBTYCFCAAQfCMgIAANgIQIABBGzYCDEEAIRAMlgELIAAoAgQhBSAAQQA2AgQgACAFIBAQqYCAgAAiBQ0BIBBBAWohBQtBrQEhEAx7CyAAQcEBNgIcIAAgBTYCDCAAIBBBAWo2AhRBACEQDJMBCyAAKAIEIQYgAEEANgIEIAAgBiAQEKmAgIAAIgYNASAQQQFqIQYLQa4BIRAMeAsgAEHCATYCHCAAIAY2AgwgACAQQQFqNgIUQQAhEAyQAQsgAEEANgIcIAAgBzYCFCAAQZeLgIAANgIQIABBDTYCDEEAIRAMjwELIABBADYCHCAAIAg2AhQgAEHjkICAADYCECAAQQk2AgxBACEQDI4BCyAAQQA2AhwgACAINgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAyNAQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgCUEBaiEIAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBCAAIBAgCBCtgICAACIQRQ09IABByQE2AhwgACAINgIUIAAgEDYCDEEAIRAMjAELIAAoAgQhBCAAQQA2AgQgACAEIAgQrYCAgAAiBEUNdiAAQcoBNgIcIAAgCDYCFCAAIAQ2AgxBACEQDIsBCyAAKAIEIQQgAEEANgIEIAAgBCAJEK2AgIAAIgRFDXQgAEHLATYCHCAAIAk2AhQgACAENgIMQQAhEAyKAQsgACgCBCEEIABBADYCBCAAIAQgChCtgICAACIERQ1yIABBzQE2AhwgACAKNgIUIAAgBDYCDEEAIRAMiQELAkAgCy0AAEFQaiIQQf8BcUEKTw0AIAAgEDoAKiALQQFqIQpBtgEhEAxwCyAAKAIEIQQgAEEANgIEIAAgBCALEK2AgIAAIgRFDXAgAEHPATYCHCAAIAs2AhQgACAENgIMQQAhEAyIAQsgAEEANgIcIAAgBDYCFCAAQZCzgIAANgIQIABBCDYCDCAAQQA2AgBBACEQDIcBCyABQRVGDT8gAEEANgIcIAAgDDYCFCAAQcyOgIAANgIQIABBIDYCDEEAIRAMhgELIABBgQQ7ASggACgCBCEQIABCADcDACAAIBAgDEEBaiIMEKuAgIAAIhBFDTggAEHTATYCHCAAIAw2AhQgACAQNgIMQQAhEAyFAQsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQdibgIAANgIQIABBCDYCDAyDAQsgACgCBCEQIABCADcDACAAIBAgC0EBaiILEKuAgIAAIhANAUHGASEQDGkLIABBAjoAKAxVCyAAQdUBNgIcIAAgCzYCFCAAIBA2AgxBACEQDIABCyAQQRVGDTcgAEEANgIcIAAgBDYCFCAAQaSMgIAANgIQIABBEDYCDEEAIRAMfwsgAC0ANEEBRw00IAAgBCACELyAgIAAIhBFDTQgEEEVRw01IABB3AE2AhwgACAENgIUIABB1ZaAgAA2AhAgAEEVNgIMQQAhEAx+C0EAIRAgAEEANgIcIABBr4uAgAA2AhAgAEECNgIMIAAgFEEBajYCFAx9C0EAIRAMYwtBAiEQDGILQQ0hEAxhC0EPIRAMYAtBJSEQDF8LQRMhEAxeC0EVIRAMXQtBFiEQDFwLQRchEAxbC0EYIRAMWgtBGSEQDFkLQRohEAxYC0EbIRAMVwtBHCEQDFYLQR0hEAxVC0EfIRAMVAtBISEQDFMLQSMhEAxSC0HGACEQDFELQS4hEAxQC0EvIRAMTwtBOyEQDE4LQT0hEAxNC0HIACEQDEwLQckAIRAMSwtBywAhEAxKC0HMACEQDEkLQc4AIRAMSAtB0QAhEAxHC0HVACEQDEYLQdgAIRAMRQtB2QAhEAxEC0HbACEQDEMLQeQAIRAMQgtB5QAhEAxBC0HxACEQDEALQfQAIRAMPwtBjQEhEAw+C0GXASEQDD0LQakBIRAMPAtBrAEhEAw7C0HAASEQDDoLQbkBIRAMOQtBrwEhEAw4C0GxASEQDDcLQbIBIRAMNgtBtAEhEAw1C0G1ASEQDDQLQboBIRAMMwtBvQEhEAwyC0G/ASEQDDELQcEBIRAMMAsgAEEANgIcIAAgBDYCFCAAQemLgIAANgIQIABBHzYCDEEAIRAMSAsgAEHbATYCHCAAIAQ2AhQgAEH6loCAADYCECAAQRU2AgxBACEQDEcLIABB+AA2AhwgACAMNgIUIABBypiAgAA2AhAgAEEVNgIMQQAhEAxGCyAAQdEANgIcIAAgBTYCFCAAQbCXgIAANgIQIABBFTYCDEEAIRAMRQsgAEH5ADYCHCAAIAE2AhQgACAQNgIMQQAhEAxECyAAQfgANgIcIAAgATYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMQwsgAEHkADYCHCAAIAE2AhQgAEHjl4CAADYCECAAQRU2AgxBACEQDEILIABB1wA2AhwgACABNgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAxBCyAAQQA2AhwgACABNgIUIABBuY2AgAA2AhAgAEEaNgIMQQAhEAxACyAAQcIANgIcIAAgATYCFCAAQeOYgIAANgIQIABBFTYCDEEAIRAMPwsgAEEANgIEIAAgDyAPELGAgIAAIgRFDQEgAEE6NgIcIAAgBDYCDCAAIA9BAWo2AhRBACEQDD4LIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCxgICAACIERQ0AIABBOzYCHCAAIAQ2AgwgACABQQFqNgIUQQAhEAw+CyABQQFqIQEMLQsgD0EBaiEBDC0LIABBADYCHCAAIA82AhQgAEHkkoCAADYCECAAQQQ2AgxBACEQDDsLIABBNjYCHCAAIAQ2AhQgACACNgIMQQAhEAw6CyAAQS42AhwgACAONgIUIAAgBDYCDEEAIRAMOQsgAEHQADYCHCAAIAE2AhQgAEGRmICAADYCECAAQRU2AgxBACEQDDgLIA1BAWohAQwsCyAAQRU2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAw2CyAAQRs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw1CyAAQQ82AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw0CyAAQQs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAwzCyAAQRo2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwyCyAAQQs2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwxCyAAQQo2AhwgACABNgIUIABB5JaAgAA2AhAgAEEVNgIMQQAhEAwwCyAAQR42AhwgACABNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAwvCyAAQQA2AhwgACAQNgIUIABB2o2AgAA2AhAgAEEUNgIMQQAhEAwuCyAAQQQ2AhwgACABNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAwtCyAAQQA2AgAgC0EBaiELC0G4ASEQDBILIABBADYCACAQQQFqIQFB9QAhEAwRCyABIQECQCAALQApQQVHDQBB4wAhEAwRC0HiACEQDBALQQAhECAAQQA2AhwgAEHkkYCAADYCECAAQQc2AgwgACAUQQFqNgIUDCgLIABBADYCACAXQQFqIQFBwAAhEAwOC0EBIQELIAAgAToALCAAQQA2AgAgF0EBaiEBC0EoIRAMCwsgASEBC0E4IRAMCQsCQCABIg8gAkYNAANAAkAgDy0AAEGAvoCAAGotAAAiAUEBRg0AIAFBAkcNAyAPQQFqIQEMBAsgD0EBaiIPIAJHDQALQT4hEAwiC0E+IRAMIQsgAEEAOgAsIA8hAQwBC0ELIRAMBgtBOiEQDAULIAFBAWohAUEtIRAMBAsgACABOgAsIABBADYCACAWQQFqIQFBDCEQDAMLIABBADYCACAXQQFqIQFBCiEQDAILIABBADYCAAsgAEEAOgAsIA0hAUEJIRAMAAsLQQAhECAAQQA2AhwgACALNgIUIABBzZCAgAA2AhAgAEEJNgIMDBcLQQAhECAAQQA2AhwgACAKNgIUIABB6YqAgAA2AhAgAEEJNgIMDBYLQQAhECAAQQA2AhwgACAJNgIUIABBt5CAgAA2AhAgAEEJNgIMDBULQQAhECAAQQA2AhwgACAINgIUIABBnJGAgAA2AhAgAEEJNgIMDBQLQQAhECAAQQA2AhwgACABNgIUIABBzZCAgAA2AhAgAEEJNgIMDBMLQQAhECAAQQA2AhwgACABNgIUIABB6YqAgAA2AhAgAEEJNgIMDBILQQAhECAAQQA2AhwgACABNgIUIABBt5CAgAA2AhAgAEEJNgIMDBELQQAhECAAQQA2AhwgACABNgIUIABBnJGAgAA2AhAgAEEJNgIMDBALQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA8LQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA4LQQAhECAAQQA2AhwgACABNgIUIABBwJKAgAA2AhAgAEELNgIMDA0LQQAhECAAQQA2AhwgACABNgIUIABBlYmAgAA2AhAgAEELNgIMDAwLQQAhECAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMDAsLQQAhECAAQQA2AhwgACABNgIUIABB+4+AgAA2AhAgAEEKNgIMDAoLQQAhECAAQQA2AhwgACABNgIUIABB8ZmAgAA2AhAgAEECNgIMDAkLQQAhECAAQQA2AhwgACABNgIUIABBxJSAgAA2AhAgAEECNgIMDAgLQQAhECAAQQA2AhwgACABNgIUIABB8pWAgAA2AhAgAEECNgIMDAcLIABBAjYCHCAAIAE2AhQgAEGcmoCAADYCECAAQRY2AgxBACEQDAYLQQEhEAwFC0HUACEQIAEiBCACRg0EIANBCGogACAEIAJB2MKAgABBChDFgICAACADKAIMIQQgAygCCA4DAQQCAAsQyoCAgAAACyAAQQA2AhwgAEG1moCAADYCECAAQRc2AgwgACAEQQFqNgIUQQAhEAwCCyAAQQA2AhwgACAENgIUIABBypqAgAA2AhAgAEEJNgIMQQAhEAwBCwJAIAEiBCACRw0AQSIhEAwBCyAAQYmAgIAANgIIIAAgBDYCBEEhIRALIANBEGokgICAgAAgEAuvAQECfyABKAIAIQYCQAJAIAIgA0YNACAEIAZqIQQgBiADaiACayEHIAIgBkF/cyAFaiIGaiEFA0ACQCACLQAAIAQtAABGDQBBAiEEDAMLAkAgBg0AQQAhBCAFIQIMAwsgBkF/aiEGIARBAWohBCACQQFqIgIgA0cNAAsgByEGIAMhAgsgAEEBNgIAIAEgBjYCACAAIAI2AgQPCyABQQA2AgAgACAENgIAIAAgAjYCBAsKACAAEMeAgIAAC/I2AQt/I4CAgIAAQRBrIgEkgICAgAACQEEAKAKg0ICAAA0AQQAQy4CAgABBgNSEgABrIgJB2QBJDQBBACEDAkBBACgC4NOAgAAiBA0AQQBCfzcC7NOAgABBAEKAgISAgIDAADcC5NOAgABBACABQQhqQXBxQdiq1aoFcyIENgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgAALQQAgAjYCzNOAgABBAEGA1ISAADYCyNOAgABBAEGA1ISAADYCmNCAgABBACAENgKs0ICAAEEAQX82AqjQgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAtBgNSEgABBeEGA1ISAAGtBD3FBAEGA1ISAAEEIakEPcRsiA2oiBEEEaiACQUhqIgUgA2siA0EBcjYCAEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgABBgNSEgAAgBWpBODYCBAsCQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAUsNAAJAQQAoAojQgIAAIgZBECAAQRNqQXBxIABBC0kbIgJBA3YiBHYiA0EDcUUNAAJAAkAgA0EBcSAEckEBcyIFQQN0IgRBsNCAgABqIgMgBEG40ICAAGooAgAiBCgCCCICRw0AQQAgBkF+IAV3cTYCiNCAgAAMAQsgAyACNgIIIAIgAzYCDAsgBEEIaiEDIAQgBUEDdCIFQQNyNgIEIAQgBWoiBCAEKAIEQQFyNgIEDAwLIAJBACgCkNCAgAAiB00NAQJAIANFDQACQAJAIAMgBHRBAiAEdCIDQQAgA2tycSIDQQAgA2txQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmoiBEEDdCIDQbDQgIAAaiIFIANBuNCAgABqKAIAIgMoAggiAEcNAEEAIAZBfiAEd3EiBjYCiNCAgAAMAQsgBSAANgIIIAAgBTYCDAsgAyACQQNyNgIEIAMgBEEDdCIEaiAEIAJrIgU2AgAgAyACaiIAIAVBAXI2AgQCQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhBAJAAkAgBkEBIAdBA3Z0IghxDQBBACAGIAhyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAQ2AgwgAiAENgIIIAQgAjYCDCAEIAg2AggLIANBCGohA0EAIAA2ApzQgIAAQQAgBTYCkNCAgAAMDAtBACgCjNCAgAAiCUUNASAJQQAgCWtxQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmpBAnRBuNKAgABqKAIAIgAoAgRBeHEgAmshBCAAIQUCQANAAkAgBSgCECIDDQAgBUEUaigCACIDRQ0CCyADKAIEQXhxIAJrIgUgBCAFIARJIgUbIQQgAyAAIAUbIQAgAyEFDAALCyAAKAIYIQoCQCAAKAIMIgggAEYNACAAKAIIIgNBACgCmNCAgABJGiAIIAM2AgggAyAINgIMDAsLAkAgAEEUaiIFKAIAIgMNACAAKAIQIgNFDQMgAEEQaiEFCwNAIAUhCyADIghBFGoiBSgCACIDDQAgCEEQaiEFIAgoAhAiAw0ACyALQQA2AgAMCgtBfyECIABBv39LDQAgAEETaiIDQXBxIQJBACgCjNCAgAAiB0UNAEEAIQsCQCACQYACSQ0AQR8hCyACQf///wdLDQAgA0EIdiIDIANBgP4/akEQdkEIcSIDdCIEIARBgOAfakEQdkEEcSIEdCIFIAVBgIAPakEQdkECcSIFdEEPdiADIARyIAVyayIDQQF0IAIgA0EVanZBAXFyQRxqIQsLQQAgAmshBAJAAkACQAJAIAtBAnRBuNKAgABqKAIAIgUNAEEAIQNBACEIDAELQQAhAyACQQBBGSALQQF2ayALQR9GG3QhAEEAIQgDQAJAIAUoAgRBeHEgAmsiBiAETw0AIAYhBCAFIQggBg0AQQAhBCAFIQggBSEDDAMLIAMgBUEUaigCACIGIAYgBSAAQR12QQRxakEQaigCACIFRhsgAyAGGyEDIABBAXQhACAFDQALCwJAIAMgCHINAEEAIQhBAiALdCIDQQAgA2tyIAdxIgNFDQMgA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBUEFdkEIcSIAIANyIAUgAHYiA0ECdkEEcSIFciADIAV2IgNBAXZBAnEiBXIgAyAFdiIDQQF2QQFxIgVyIAMgBXZqQQJ0QbjSgIAAaigCACEDCyADRQ0BCwNAIAMoAgRBeHEgAmsiBiAESSEAAkAgAygCECIFDQAgA0EUaigCACEFCyAGIAQgABshBCADIAggABshCCAFIQMgBQ0ACwsgCEUNACAEQQAoApDQgIAAIAJrTw0AIAgoAhghCwJAIAgoAgwiACAIRg0AIAgoAggiA0EAKAKY0ICAAEkaIAAgAzYCCCADIAA2AgwMCQsCQCAIQRRqIgUoAgAiAw0AIAgoAhAiA0UNAyAIQRBqIQULA0AgBSEGIAMiAEEUaiIFKAIAIgMNACAAQRBqIQUgACgCECIDDQALIAZBADYCAAwICwJAQQAoApDQgIAAIgMgAkkNAEEAKAKc0ICAACEEAkACQCADIAJrIgVBEEkNACAEIAJqIgAgBUEBcjYCBEEAIAU2ApDQgIAAQQAgADYCnNCAgAAgBCADaiAFNgIAIAQgAkEDcjYCBAwBCyAEIANBA3I2AgQgBCADaiIDIAMoAgRBAXI2AgRBAEEANgKc0ICAAEEAQQA2ApDQgIAACyAEQQhqIQMMCgsCQEEAKAKU0ICAACIAIAJNDQBBACgCoNCAgAAiAyACaiIEIAAgAmsiBUEBcjYCBEEAIAU2ApTQgIAAQQAgBDYCoNCAgAAgAyACQQNyNgIEIANBCGohAwwKCwJAAkBBACgC4NOAgABFDQBBACgC6NOAgAAhBAwBC0EAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEMakFwcUHYqtWqBXM2AuDTgIAAQQBBADYC9NOAgABBAEEANgLE04CAAEGAgAQhBAtBACEDAkAgBCACQccAaiIHaiIGQQAgBGsiC3EiCCACSw0AQQBBMDYC+NOAgAAMCgsCQEEAKALA04CAACIDRQ0AAkBBACgCuNOAgAAiBCAIaiIFIARNDQAgBSADTQ0BC0EAIQNBAEEwNgL404CAAAwKC0EALQDE04CAAEEEcQ0EAkACQAJAQQAoAqDQgIAAIgRFDQBByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiAESw0DCyADKAIIIgMNAAsLQQAQy4CAgAAiAEF/Rg0FIAghBgJAQQAoAuTTgIAAIgNBf2oiBCAAcUUNACAIIABrIAQgAGpBACADa3FqIQYLIAYgAk0NBSAGQf7///8HSw0FAkBBACgCwNOAgAAiA0UNAEEAKAK404CAACIEIAZqIgUgBE0NBiAFIANLDQYLIAYQy4CAgAAiAyAARw0BDAcLIAYgAGsgC3EiBkH+////B0sNBCAGEMuAgIAAIgAgAygCACADKAIEakYNAyAAIQMLAkAgA0F/Rg0AIAJByABqIAZNDQACQCAHIAZrQQAoAujTgIAAIgRqQQAgBGtxIgRB/v///wdNDQAgAyEADAcLAkAgBBDLgICAAEF/Rg0AIAQgBmohBiADIQAMBwtBACAGaxDLgICAABoMBAsgAyEAIANBf0cNBQwDC0EAIQgMBwtBACEADAULIABBf0cNAgtBAEEAKALE04CAAEEEcjYCxNOAgAALIAhB/v///wdLDQEgCBDLgICAACEAQQAQy4CAgAAhAyAAQX9GDQEgA0F/Rg0BIAAgA08NASADIABrIgYgAkE4ak0NAQtBAEEAKAK404CAACAGaiIDNgK404CAAAJAIANBACgCvNOAgABNDQBBACADNgK804CAAAsCQAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQCAAIAMoAgAiBSADKAIEIghqRg0CIAMoAggiAw0ADAMLCwJAAkBBACgCmNCAgAAiA0UNACAAIANPDQELQQAgADYCmNCAgAALQQAhA0EAIAY2AszTgIAAQQAgADYCyNOAgABBAEF/NgKo0ICAAEEAQQAoAuDTgIAANgKs0ICAAEEAQQA2AtTTgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiBCAGQUhqIgUgA2siA0EBcjYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgAAgACAFakE4NgIEDAILIAMtAAxBCHENACAEIAVJDQAgBCAATw0AIARBeCAEa0EPcUEAIARBCGpBD3EbIgVqIgBBACgClNCAgAAgBmoiCyAFayIFQQFyNgIEIAMgCCAGajYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAU2ApTQgIAAQQAgADYCoNCAgAAgBCALakE4NgIEDAELAkAgAEEAKAKY0ICAACIITw0AQQAgADYCmNCAgAAgACEICyAAIAZqIQVByNOAgAAhAwJAAkACQAJAAkACQAJAA0AgAygCACAFRg0BIAMoAggiAw0ADAILCyADLQAMQQhxRQ0BC0HI04CAACEDA0ACQCADKAIAIgUgBEsNACAFIAMoAgRqIgUgBEsNAwsgAygCCCEDDAALCyADIAA2AgAgAyADKAIEIAZqNgIEIABBeCAAa0EPcUEAIABBCGpBD3EbaiILIAJBA3I2AgQgBUF4IAVrQQ9xQQAgBUEIakEPcRtqIgYgCyACaiICayEDAkAgBiAERw0AQQAgAjYCoNCAgABBAEEAKAKU0ICAACADaiIDNgKU0ICAACACIANBAXI2AgQMAwsCQCAGQQAoApzQgIAARw0AQQAgAjYCnNCAgABBAEEAKAKQ0ICAACADaiIDNgKQ0ICAACACIANBAXI2AgQgAiADaiADNgIADAMLAkAgBigCBCIEQQNxQQFHDQAgBEF4cSEHAkACQCAEQf8BSw0AIAYoAggiBSAEQQN2IghBA3RBsNCAgABqIgBGGgJAIAYoAgwiBCAFRw0AQQBBACgCiNCAgABBfiAId3E2AojQgIAADAILIAQgAEYaIAQgBTYCCCAFIAQ2AgwMAQsgBigCGCEJAkACQCAGKAIMIgAgBkYNACAGKAIIIgQgCEkaIAAgBDYCCCAEIAA2AgwMAQsCQCAGQRRqIgQoAgAiBQ0AIAZBEGoiBCgCACIFDQBBACEADAELA0AgBCEIIAUiAEEUaiIEKAIAIgUNACAAQRBqIQQgACgCECIFDQALIAhBADYCAAsgCUUNAAJAAkAgBiAGKAIcIgVBAnRBuNKAgABqIgQoAgBHDQAgBCAANgIAIAANAUEAQQAoAozQgIAAQX4gBXdxNgKM0ICAAAwCCyAJQRBBFCAJKAIQIAZGG2ogADYCACAARQ0BCyAAIAk2AhgCQCAGKAIQIgRFDQAgACAENgIQIAQgADYCGAsgBigCFCIERQ0AIABBFGogBDYCACAEIAA2AhgLIAcgA2ohAyAGIAdqIgYoAgQhBAsgBiAEQX5xNgIEIAIgA2ogAzYCACACIANBAXI2AgQCQCADQf8BSw0AIANBeHFBsNCAgABqIQQCQAJAQQAoAojQgIAAIgVBASADQQN2dCIDcQ0AQQAgBSADcjYCiNCAgAAgBCEDDAELIAQoAgghAwsgAyACNgIMIAQgAjYCCCACIAQ2AgwgAiADNgIIDAMLQR8hBAJAIANB////B0sNACADQQh2IgQgBEGA/j9qQRB2QQhxIgR0IgUgBUGA4B9qQRB2QQRxIgV0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAQgBXIgAHJrIgRBAXQgAyAEQRVqdkEBcXJBHGohBAsgAiAENgIcIAJCADcCECAEQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiAEEBIAR0IghxDQAgBSACNgIAQQAgACAIcjYCjNCAgAAgAiAFNgIYIAIgAjYCCCACIAI2AgwMAwsgA0EAQRkgBEEBdmsgBEEfRht0IQQgBSgCACEAA0AgACIFKAIEQXhxIANGDQIgBEEddiEAIARBAXQhBCAFIABBBHFqQRBqIggoAgAiAA0ACyAIIAI2AgAgAiAFNgIYIAIgAjYCDCACIAI2AggMAgsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiCyAGQUhqIgggA2siA0EBcjYCBCAAIAhqQTg2AgQgBCAFQTcgBWtBD3FBACAFQUlqQQ9xG2pBQWoiCCAIIARBEGpJGyIIQSM2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAs2AqDQgIAAIAhBEGpBACkC0NOAgAA3AgAgCEEAKQLI04CAADcCCEEAIAhBCGo2AtDTgIAAQQAgBjYCzNOAgABBACAANgLI04CAAEEAQQA2AtTTgIAAIAhBJGohAwNAIANBBzYCACADQQRqIgMgBUkNAAsgCCAERg0DIAggCCgCBEF+cTYCBCAIIAggBGsiADYCACAEIABBAXI2AgQCQCAAQf8BSw0AIABBeHFBsNCAgABqIQMCQAJAQQAoAojQgIAAIgVBASAAQQN2dCIAcQ0AQQAgBSAAcjYCiNCAgAAgAyEFDAELIAMoAgghBQsgBSAENgIMIAMgBDYCCCAEIAM2AgwgBCAFNgIIDAQLQR8hAwJAIABB////B0sNACAAQQh2IgMgA0GA/j9qQRB2QQhxIgN0IgUgBUGA4B9qQRB2QQRxIgV0IgggCEGAgA9qQRB2QQJxIgh0QQ92IAMgBXIgCHJrIgNBAXQgACADQRVqdkEBcXJBHGohAwsgBCADNgIcIARCADcCECADQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiCEEBIAN0IgZxDQAgBSAENgIAQQAgCCAGcjYCjNCAgAAgBCAFNgIYIAQgBDYCCCAEIAQ2AgwMBAsgAEEAQRkgA0EBdmsgA0EfRht0IQMgBSgCACEIA0AgCCIFKAIEQXhxIABGDQMgA0EddiEIIANBAXQhAyAFIAhBBHFqQRBqIgYoAgAiCA0ACyAGIAQ2AgAgBCAFNgIYIAQgBDYCDCAEIAQ2AggMAwsgBSgCCCIDIAI2AgwgBSACNgIIIAJBADYCGCACIAU2AgwgAiADNgIICyALQQhqIQMMBQsgBSgCCCIDIAQ2AgwgBSAENgIIIARBADYCGCAEIAU2AgwgBCADNgIIC0EAKAKU0ICAACIDIAJNDQBBACgCoNCAgAAiBCACaiIFIAMgAmsiA0EBcjYCBEEAIAM2ApTQgIAAQQAgBTYCoNCAgAAgBCACQQNyNgIEIARBCGohAwwDC0EAIQNBAEEwNgL404CAAAwCCwJAIAtFDQACQAJAIAggCCgCHCIFQQJ0QbjSgIAAaiIDKAIARw0AIAMgADYCACAADQFBACAHQX4gBXdxIgc2AozQgIAADAILIAtBEEEUIAsoAhAgCEYbaiAANgIAIABFDQELIAAgCzYCGAJAIAgoAhAiA0UNACAAIAM2AhAgAyAANgIYCyAIQRRqKAIAIgNFDQAgAEEUaiADNgIAIAMgADYCGAsCQAJAIARBD0sNACAIIAQgAmoiA0EDcjYCBCAIIANqIgMgAygCBEEBcjYCBAwBCyAIIAJqIgAgBEEBcjYCBCAIIAJBA3I2AgQgACAEaiAENgIAAkAgBEH/AUsNACAEQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgBEEDdnQiBHENAEEAIAUgBHI2AojQgIAAIAMhBAwBCyADKAIIIQQLIAQgADYCDCADIAA2AgggACADNgIMIAAgBDYCCAwBC0EfIQMCQCAEQf///wdLDQAgBEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCICIAJBgIAPakEQdkECcSICdEEPdiADIAVyIAJyayIDQQF0IAQgA0EVanZBAXFyQRxqIQMLIAAgAzYCHCAAQgA3AhAgA0ECdEG40oCAAGohBQJAIAdBASADdCICcQ0AIAUgADYCAEEAIAcgAnI2AozQgIAAIAAgBTYCGCAAIAA2AgggACAANgIMDAELIARBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhAgJAA0AgAiIFKAIEQXhxIARGDQEgA0EddiECIANBAXQhAyAFIAJBBHFqQRBqIgYoAgAiAg0ACyAGIAA2AgAgACAFNgIYIAAgADYCDCAAIAA2AggMAQsgBSgCCCIDIAA2AgwgBSAANgIIIABBADYCGCAAIAU2AgwgACADNgIICyAIQQhqIQMMAQsCQCAKRQ0AAkACQCAAIAAoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAg2AgAgCA0BQQAgCUF+IAV3cTYCjNCAgAAMAgsgCkEQQRQgCigCECAARhtqIAg2AgAgCEUNAQsgCCAKNgIYAkAgACgCECIDRQ0AIAggAzYCECADIAg2AhgLIABBFGooAgAiA0UNACAIQRRqIAM2AgAgAyAINgIYCwJAAkAgBEEPSw0AIAAgBCACaiIDQQNyNgIEIAAgA2oiAyADKAIEQQFyNgIEDAELIAAgAmoiBSAEQQFyNgIEIAAgAkEDcjYCBCAFIARqIAQ2AgACQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhAwJAAkBBASAHQQN2dCIIIAZxDQBBACAIIAZyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAM2AgwgAiADNgIIIAMgAjYCDCADIAg2AggLQQAgBTYCnNCAgABBACAENgKQ0ICAAAsgAEEIaiEDCyABQRBqJICAgIAAIAMLCgAgABDJgICAAAviDQEHfwJAIABFDQAgAEF4aiIBIABBfGooAgAiAkF4cSIAaiEDAkAgAkEBcQ0AIAJBA3FFDQEgASABKAIAIgJrIgFBACgCmNCAgAAiBEkNASACIABqIQACQCABQQAoApzQgIAARg0AAkAgAkH/AUsNACABKAIIIgQgAkEDdiIFQQN0QbDQgIAAaiIGRhoCQCABKAIMIgIgBEcNAEEAQQAoAojQgIAAQX4gBXdxNgKI0ICAAAwDCyACIAZGGiACIAQ2AgggBCACNgIMDAILIAEoAhghBwJAAkAgASgCDCIGIAFGDQAgASgCCCICIARJGiAGIAI2AgggAiAGNgIMDAELAkAgAUEUaiICKAIAIgQNACABQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQECQAJAIAEgASgCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAwsgB0EQQRQgBygCECABRhtqIAY2AgAgBkUNAgsgBiAHNgIYAkAgASgCECICRQ0AIAYgAjYCECACIAY2AhgLIAEoAhQiAkUNASAGQRRqIAI2AgAgAiAGNgIYDAELIAMoAgQiAkEDcUEDRw0AIAMgAkF+cTYCBEEAIAA2ApDQgIAAIAEgAGogADYCACABIABBAXI2AgQPCyABIANPDQAgAygCBCICQQFxRQ0AAkACQCACQQJxDQACQCADQQAoAqDQgIAARw0AQQAgATYCoNCAgABBAEEAKAKU0ICAACAAaiIANgKU0ICAACABIABBAXI2AgQgAUEAKAKc0ICAAEcNA0EAQQA2ApDQgIAAQQBBADYCnNCAgAAPCwJAIANBACgCnNCAgABHDQBBACABNgKc0ICAAEEAQQAoApDQgIAAIABqIgA2ApDQgIAAIAEgAEEBcjYCBCABIABqIAA2AgAPCyACQXhxIABqIQACQAJAIAJB/wFLDQAgAygCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgAygCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAgsgAiAGRhogAiAENgIIIAQgAjYCDAwBCyADKAIYIQcCQAJAIAMoAgwiBiADRg0AIAMoAggiAkEAKAKY0ICAAEkaIAYgAjYCCCACIAY2AgwMAQsCQCADQRRqIgIoAgAiBA0AIANBEGoiAigCACIEDQBBACEGDAELA0AgAiEFIAQiBkEUaiICKAIAIgQNACAGQRBqIQIgBigCECIEDQALIAVBADYCAAsgB0UNAAJAAkAgAyADKAIcIgRBAnRBuNKAgABqIgIoAgBHDQAgAiAGNgIAIAYNAUEAQQAoAozQgIAAQX4gBHdxNgKM0ICAAAwCCyAHQRBBFCAHKAIQIANGG2ogBjYCACAGRQ0BCyAGIAc2AhgCQCADKAIQIgJFDQAgBiACNgIQIAIgBjYCGAsgAygCFCICRQ0AIAZBFGogAjYCACACIAY2AhgLIAEgAGogADYCACABIABBAXI2AgQgAUEAKAKc0ICAAEcNAUEAIAA2ApDQgIAADwsgAyACQX5xNgIEIAEgAGogADYCACABIABBAXI2AgQLAkAgAEH/AUsNACAAQXhxQbDQgIAAaiECAkACQEEAKAKI0ICAACIEQQEgAEEDdnQiAHENAEEAIAQgAHI2AojQgIAAIAIhAAwBCyACKAIIIQALIAAgATYCDCACIAE2AgggASACNgIMIAEgADYCCA8LQR8hAgJAIABB////B0sNACAAQQh2IgIgAkGA/j9qQRB2QQhxIgJ0IgQgBEGA4B9qQRB2QQRxIgR0IgYgBkGAgA9qQRB2QQJxIgZ0QQ92IAIgBHIgBnJrIgJBAXQgACACQRVqdkEBcXJBHGohAgsgASACNgIcIAFCADcCECACQQJ0QbjSgIAAaiEEAkACQEEAKAKM0ICAACIGQQEgAnQiA3ENACAEIAE2AgBBACAGIANyNgKM0ICAACABIAQ2AhggASABNgIIIAEgATYCDAwBCyAAQQBBGSACQQF2ayACQR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAEgBDYCGCABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAKo0ICAAEF/aiIBQX8gARs2AqjQgIAACwsEAAAAC04AAkAgAA0APwBBEHQPCwJAIABB//8DcQ0AIABBf0wNAAJAIABBEHZAACIAQX9HDQBBAEEwNgL404CAAEF/DwsgAEEQdA8LEMqAgIAAAAvyAgIDfwF+AkAgAkUNACAAIAE6AAAgAiAAaiIDQX9qIAE6AAAgAkEDSQ0AIAAgAToAAiAAIAE6AAEgA0F9aiABOgAAIANBfmogAToAACACQQdJDQAgACABOgADIANBfGogAToAACACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgVrIgJBIEkNACABrUKBgICAEH4hBiADIAVqIQEDQCABIAY3AxggASAGNwMQIAEgBjcDCCABIAY3AwAgAUEgaiEBIAJBYGoiAkEfSw0ACwsgAAsLjkgBAEGACAuGSAEAAAACAAAAAwAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAYAAAAHAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsb3NlZWVwLWFsaXZlAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgAAAAAAAAAAAAAAAAAAAHJhbnNmZXItZW5jb2RpbmdwZ3JhZGUNCg0KDQpTTQ0KDQpUVFAvQ0UvVFNQLwAAAAAAAAAAAAAAAAECAAEDAAAAAAAAAAAAAAAAAAAAAAAABAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQUBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAAAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==' @@ -81128,7 +50582,7 @@ module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn /***/ }), -/***/ 50172: +/***/ 172: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -81150,14 +50604,14 @@ exports.enumToMap = enumToMap; /***/ }), -/***/ 47501: +/***/ 7501: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { kClients } = __nccwpck_require__(36443) -const Agent = __nccwpck_require__(59965) +const { kClients } = __nccwpck_require__(6443) +const Agent = __nccwpck_require__(9965) const { kAgent, kMockAgentSet, @@ -81168,14 +50622,14 @@ const { kGetNetConnect, kOptions, kFactory -} = __nccwpck_require__(91117) -const MockClient = __nccwpck_require__(47365) -const MockPool = __nccwpck_require__(94004) -const { matchValue, buildMockOptions } = __nccwpck_require__(53397) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(68707) -const Dispatcher = __nccwpck_require__(28611) -const Pluralizer = __nccwpck_require__(91529) -const PendingInterceptorsFormatter = __nccwpck_require__(56142) +} = __nccwpck_require__(1117) +const MockClient = __nccwpck_require__(7365) +const MockPool = __nccwpck_require__(4004) +const { matchValue, buildMockOptions } = __nccwpck_require__(3397) +const { InvalidArgumentError, UndiciError } = __nccwpck_require__(8707) +const Dispatcher = __nccwpck_require__(992) +const Pluralizer = __nccwpck_require__(1529) +const PendingInterceptorsFormatter = __nccwpck_require__(6142) class FakeWeakRef { constructor (value) { @@ -81329,15 +50783,15 @@ module.exports = MockAgent /***/ }), -/***/ 47365: +/***/ 7365: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { promisify } = __nccwpck_require__(39023) -const Client = __nccwpck_require__(86197) -const { buildMockDispatch } = __nccwpck_require__(53397) +const { promisify } = __nccwpck_require__(9023) +const Client = __nccwpck_require__(6197) +const { buildMockDispatch } = __nccwpck_require__(3397) const { kDispatches, kMockAgent, @@ -81346,10 +50800,10 @@ const { kOrigin, kOriginalDispatch, kConnected -} = __nccwpck_require__(91117) -const { MockInterceptor } = __nccwpck_require__(31511) -const Symbols = __nccwpck_require__(36443) -const { InvalidArgumentError } = __nccwpck_require__(68707) +} = __nccwpck_require__(1117) +const { MockInterceptor } = __nccwpck_require__(1511) +const Symbols = __nccwpck_require__(6443) +const { InvalidArgumentError } = __nccwpck_require__(8707) /** * MockClient provides an API that extends the Client to influence the mockDispatches. @@ -81396,13 +50850,13 @@ module.exports = MockClient /***/ }), -/***/ 52429: +/***/ 2429: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { UndiciError } = __nccwpck_require__(68707) +const { UndiciError } = __nccwpck_require__(8707) class MockNotMatchedError extends UndiciError { constructor (message) { @@ -81421,13 +50875,13 @@ module.exports = { /***/ }), -/***/ 31511: +/***/ 1511: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(53397) +const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(3397) const { kDispatches, kDispatchKey, @@ -81435,8 +50889,8 @@ const { kDefaultTrailers, kContentLength, kMockDispatch -} = __nccwpck_require__(91117) -const { InvalidArgumentError } = __nccwpck_require__(68707) +} = __nccwpck_require__(1117) +const { InvalidArgumentError } = __nccwpck_require__(8707) const { buildURL } = __nccwpck_require__(3440) /** @@ -81635,15 +51089,15 @@ module.exports.MockScope = MockScope /***/ }), -/***/ 94004: +/***/ 4004: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { promisify } = __nccwpck_require__(39023) -const Pool = __nccwpck_require__(35076) -const { buildMockDispatch } = __nccwpck_require__(53397) +const { promisify } = __nccwpck_require__(9023) +const Pool = __nccwpck_require__(5076) +const { buildMockDispatch } = __nccwpck_require__(3397) const { kDispatches, kMockAgent, @@ -81652,10 +51106,10 @@ const { kOrigin, kOriginalDispatch, kConnected -} = __nccwpck_require__(91117) -const { MockInterceptor } = __nccwpck_require__(31511) -const Symbols = __nccwpck_require__(36443) -const { InvalidArgumentError } = __nccwpck_require__(68707) +} = __nccwpck_require__(1117) +const { MockInterceptor } = __nccwpck_require__(1511) +const Symbols = __nccwpck_require__(6443) +const { InvalidArgumentError } = __nccwpck_require__(8707) /** * MockPool provides an API that extends the Pool to influence the mockDispatches. @@ -81702,7 +51156,7 @@ module.exports = MockPool /***/ }), -/***/ 91117: +/***/ 1117: /***/ ((module) => { "use strict"; @@ -81733,27 +51187,27 @@ module.exports = { /***/ }), -/***/ 53397: +/***/ 3397: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { MockNotMatchedError } = __nccwpck_require__(52429) +const { MockNotMatchedError } = __nccwpck_require__(2429) const { kDispatches, kMockAgent, kOriginalDispatch, kOrigin, kGetNetConnect -} = __nccwpck_require__(91117) +} = __nccwpck_require__(1117) const { buildURL, nop } = __nccwpck_require__(3440) -const { STATUS_CODES } = __nccwpck_require__(58611) +const { STATUS_CODES } = __nccwpck_require__(8611) const { types: { isPromise } -} = __nccwpck_require__(39023) +} = __nccwpck_require__(9023) function matchValue (match, value) { if (typeof match === 'string') { @@ -82092,14 +51546,14 @@ module.exports = { /***/ }), -/***/ 56142: +/***/ 6142: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; const { Transform } = __nccwpck_require__(2203) -const { Console } = __nccwpck_require__(64236) +const { Console } = __nccwpck_require__(4236) /** * Gets the output of `console.table(…)` as a string. @@ -82140,7 +51594,7 @@ module.exports = class PendingInterceptorsFormatter { /***/ }), -/***/ 91529: +/***/ 1529: /***/ ((module) => { "use strict"; @@ -82177,7 +51631,7 @@ module.exports = class Pluralizer { /***/ }), -/***/ 34869: +/***/ 4869: /***/ ((module) => { "use strict"; @@ -82302,16 +51756,16 @@ module.exports = class FixedQueue { /***/ }), -/***/ 58640: +/***/ 8640: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const DispatcherBase = __nccwpck_require__(50001) -const FixedQueue = __nccwpck_require__(34869) -const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(36443) -const PoolStats = __nccwpck_require__(24622) +const DispatcherBase = __nccwpck_require__(1) +const FixedQueue = __nccwpck_require__(4869) +const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(6443) +const PoolStats = __nccwpck_require__(4622) const kClients = Symbol('clients') const kNeedDrain = Symbol('needDrain') @@ -82504,10 +51958,10 @@ module.exports = { /***/ }), -/***/ 24622: +/***/ 4622: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(36443) +const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(6443) const kPool = Symbol('pool') class PoolStats { @@ -82545,7 +51999,7 @@ module.exports = PoolStats /***/ }), -/***/ 35076: +/***/ 5076: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -82557,14 +52011,14 @@ const { kNeedDrain, kAddClient, kGetDispatcher -} = __nccwpck_require__(58640) -const Client = __nccwpck_require__(86197) +} = __nccwpck_require__(8640) +const Client = __nccwpck_require__(6197) const { InvalidArgumentError -} = __nccwpck_require__(68707) +} = __nccwpck_require__(8707) const util = __nccwpck_require__(3440) -const { kUrl, kInterceptors } = __nccwpck_require__(36443) -const buildConnector = __nccwpck_require__(59136) +const { kUrl, kInterceptors } = __nccwpck_require__(6443) +const buildConnector = __nccwpck_require__(9136) const kOptions = Symbol('options') const kConnections = Symbol('connections') @@ -82661,19 +52115,19 @@ module.exports = Pool /***/ }), -/***/ 22720: +/***/ 2720: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { kProxy, kClose, kDestroy, kInterceptors } = __nccwpck_require__(36443) -const { URL } = __nccwpck_require__(87016) -const Agent = __nccwpck_require__(59965) -const Pool = __nccwpck_require__(35076) -const DispatcherBase = __nccwpck_require__(50001) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(68707) -const buildConnector = __nccwpck_require__(59136) +const { kProxy, kClose, kDestroy, kInterceptors } = __nccwpck_require__(6443) +const { URL } = __nccwpck_require__(7016) +const Agent = __nccwpck_require__(9965) +const Pool = __nccwpck_require__(5076) +const DispatcherBase = __nccwpck_require__(1) +const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(8707) +const buildConnector = __nccwpck_require__(9136) const kAgent = Symbol('proxy agent') const kClient = Symbol('proxy client') @@ -82858,7 +52312,7 @@ module.exports = ProxyAgent /***/ }), -/***/ 28804: +/***/ 8804: /***/ ((module) => { "use strict"; @@ -82963,27 +52417,27 @@ module.exports = { /***/ }), -/***/ 68550: +/***/ 8550: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const diagnosticsChannel = __nccwpck_require__(31637) -const { uid, states } = __nccwpck_require__(45913) +const diagnosticsChannel = __nccwpck_require__(1637) +const { uid, states } = __nccwpck_require__(5913) const { kReadyState, kSentClose, kByteParser, kReceivedClose -} = __nccwpck_require__(62933) +} = __nccwpck_require__(2933) const { fireEvent, failWebsocketConnection } = __nccwpck_require__(3574) -const { CloseEvent } = __nccwpck_require__(46255) -const { makeRequest } = __nccwpck_require__(25194) -const { fetching } = __nccwpck_require__(12315) -const { Headers } = __nccwpck_require__(26349) -const { getGlobalDispatcher } = __nccwpck_require__(32581) -const { kHeadersList } = __nccwpck_require__(36443) +const { CloseEvent } = __nccwpck_require__(6255) +const { makeRequest } = __nccwpck_require__(5194) +const { fetching } = __nccwpck_require__(2315) +const { Headers } = __nccwpck_require__(6349) +const { getGlobalDispatcher } = __nccwpck_require__(2581) +const { kHeadersList } = __nccwpck_require__(6443) const channels = {} channels.open = diagnosticsChannel.channel('undici:websocket:open') @@ -82993,7 +52447,7 @@ channels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error /** @type {import('crypto')} */ let crypto try { - crypto = __nccwpck_require__(76982) + crypto = __nccwpck_require__(6982) } catch { } @@ -83262,7 +52716,7 @@ module.exports = { /***/ }), -/***/ 45913: +/***/ 5913: /***/ ((module) => { "use strict"; @@ -83321,15 +52775,15 @@ module.exports = { /***/ }), -/***/ 46255: +/***/ 6255: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { webidl } = __nccwpck_require__(74222) +const { webidl } = __nccwpck_require__(4222) const { kEnumerableProperty } = __nccwpck_require__(3440) -const { MessagePort } = __nccwpck_require__(28167) +const { MessagePort } = __nccwpck_require__(8167) /** * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent @@ -83632,18 +53086,18 @@ module.exports = { /***/ }), -/***/ 31237: +/***/ 1237: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { maxUnsigned16Bit } = __nccwpck_require__(45913) +const { maxUnsigned16Bit } = __nccwpck_require__(5913) /** @type {import('crypto')} */ let crypto try { - crypto = __nccwpck_require__(76982) + crypto = __nccwpck_require__(6982) } catch { } @@ -83713,18 +53167,18 @@ module.exports = { /***/ }), -/***/ 43171: +/***/ 3171: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; const { Writable } = __nccwpck_require__(2203) -const diagnosticsChannel = __nccwpck_require__(31637) -const { parserStates, opcodes, states, emptyBuffer } = __nccwpck_require__(45913) -const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(62933) +const diagnosticsChannel = __nccwpck_require__(1637) +const { parserStates, opcodes, states, emptyBuffer } = __nccwpck_require__(5913) +const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(2933) const { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = __nccwpck_require__(3574) -const { WebsocketFrameSend } = __nccwpck_require__(31237) +const { WebsocketFrameSend } = __nccwpck_require__(1237) // This code was influenced by ws released under the MIT license. // Copyright (c) 2011 Einar Otto Stangvik @@ -84065,7 +53519,7 @@ module.exports = { /***/ }), -/***/ 62933: +/***/ 2933: /***/ ((module) => { "use strict"; @@ -84091,9 +53545,9 @@ module.exports = { "use strict"; -const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(62933) -const { states, opcodes } = __nccwpck_require__(45913) -const { MessageEvent, ErrorEvent } = __nccwpck_require__(46255) +const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(2933) +const { states, opcodes } = __nccwpck_require__(5913) +const { MessageEvent, ErrorEvent } = __nccwpck_require__(6255) /* globals Blob */ @@ -84293,17 +53747,17 @@ module.exports = { /***/ }), -/***/ 55171: +/***/ 5171: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { webidl } = __nccwpck_require__(74222) -const { DOMException } = __nccwpck_require__(87326) -const { URLSerializer } = __nccwpck_require__(94322) -const { getGlobalOrigin } = __nccwpck_require__(75628) -const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = __nccwpck_require__(45913) +const { webidl } = __nccwpck_require__(4222) +const { DOMException } = __nccwpck_require__(7326) +const { URLSerializer } = __nccwpck_require__(4322) +const { getGlobalOrigin } = __nccwpck_require__(5628) +const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = __nccwpck_require__(5913) const { kWebSocketURL, kReadyState, @@ -84312,14 +53766,14 @@ const { kResponse, kSentClose, kByteParser -} = __nccwpck_require__(62933) +} = __nccwpck_require__(2933) const { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = __nccwpck_require__(3574) -const { establishWebSocketConnection } = __nccwpck_require__(68550) -const { WebsocketFrameSend } = __nccwpck_require__(31237) -const { ByteParser } = __nccwpck_require__(43171) +const { establishWebSocketConnection } = __nccwpck_require__(8550) +const { WebsocketFrameSend } = __nccwpck_require__(1237) +const { ByteParser } = __nccwpck_require__(3171) const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(3440) -const { getGlobalDispatcher } = __nccwpck_require__(32581) -const { types } = __nccwpck_require__(39023) +const { getGlobalDispatcher } = __nccwpck_require__(2581) +const { types } = __nccwpck_require__(9023) let experimentalWarned = false @@ -84942,688 +54396,7 @@ module.exports = { /***/ }), -/***/ 12048: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(6415)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(51697)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(4676)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(69771)); - -var _nil = _interopRequireDefault(__nccwpck_require__(37723)); - -var _version = _interopRequireDefault(__nccwpck_require__(15868)); - -var _validate = _interopRequireDefault(__nccwpck_require__(36200)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(37597)); - -var _parse = _interopRequireDefault(__nccwpck_require__(17267)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 10216: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(76982)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 54221: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(76982)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _default = { - randomUUID: _crypto.default.randomUUID -}; -exports["default"] = _default; - -/***/ }), - -/***/ 37723: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 17267: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(36200)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports["default"] = _default; - -/***/ }), - -/***/ 67879: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 12973: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(76982)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} - -/***/ }), - -/***/ 507: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(76982)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports["default"] = _default; - -/***/ }), - -/***/ 37597: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -exports.unsafeStringify = unsafeStringify; - -var _validate = _interopRequireDefault(__nccwpck_require__(36200)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} - -function unsafeStringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; -} - -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -var _default = stringify; -exports["default"] = _default; - -/***/ }), - -/***/ 6415: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(12973)); - -var _stringify = __nccwpck_require__(37597); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.unsafeStringify)(b); -} - -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 51697: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(92930)); - -var _md = _interopRequireDefault(__nccwpck_require__(10216)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; - -/***/ }), - -/***/ 92930: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.URL = exports.DNS = void 0; -exports["default"] = v35; - -var _stringify = __nccwpck_require__(37597); - -var _parse = _interopRequireDefault(__nccwpck_require__(17267)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function v35(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - var _namespace; - - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.unsafeStringify)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} - -/***/ }), - -/***/ 4676: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _native = _interopRequireDefault(__nccwpck_require__(54221)); - -var _rng = _interopRequireDefault(__nccwpck_require__(12973)); - -var _stringify = __nccwpck_require__(37597); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - if (_native.default.randomUUID && !buf && !options) { - return _native.default.randomUUID(); - } - - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.unsafeStringify)(rnds); -} - -var _default = v4; -exports["default"] = _default; - -/***/ }), - -/***/ 69771: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(92930)); - -var _sha = _interopRequireDefault(__nccwpck_require__(507)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; - -/***/ }), - -/***/ 36200: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _regex = _interopRequireDefault(__nccwpck_require__(67879)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports["default"] = _default; - -/***/ }), - -/***/ 15868: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(36200)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.slice(14, 15), 16); -} - -var _default = version; -exports["default"] = _default; - -/***/ }), - -/***/ 42613: +/***/ 2613: /***/ ((module) => { "use strict"; @@ -85631,7 +54404,7 @@ module.exports = require("assert"); /***/ }), -/***/ 90290: +/***/ 290: /***/ ((module) => { "use strict"; @@ -85639,7 +54412,7 @@ module.exports = require("async_hooks"); /***/ }), -/***/ 20181: +/***/ 181: /***/ ((module) => { "use strict"; @@ -85647,7 +54420,7 @@ module.exports = require("buffer"); /***/ }), -/***/ 35317: +/***/ 5317: /***/ ((module) => { "use strict"; @@ -85655,7 +54428,7 @@ module.exports = require("child_process"); /***/ }), -/***/ 64236: +/***/ 4236: /***/ ((module) => { "use strict"; @@ -85663,7 +54436,7 @@ module.exports = require("console"); /***/ }), -/***/ 76982: +/***/ 6982: /***/ ((module) => { "use strict"; @@ -85671,7 +54444,7 @@ module.exports = require("crypto"); /***/ }), -/***/ 31637: +/***/ 1637: /***/ ((module) => { "use strict"; @@ -85679,7 +54452,7 @@ module.exports = require("diagnostics_channel"); /***/ }), -/***/ 24434: +/***/ 4434: /***/ ((module) => { "use strict"; @@ -85687,7 +54460,7 @@ module.exports = require("events"); /***/ }), -/***/ 79896: +/***/ 9896: /***/ ((module) => { "use strict"; @@ -85695,7 +54468,7 @@ module.exports = require("fs"); /***/ }), -/***/ 91943: +/***/ 1943: /***/ ((module) => { "use strict"; @@ -85703,7 +54476,7 @@ module.exports = require("fs/promises"); /***/ }), -/***/ 58611: +/***/ 8611: /***/ ((module) => { "use strict"; @@ -85711,7 +54484,7 @@ module.exports = require("http"); /***/ }), -/***/ 85675: +/***/ 5675: /***/ ((module) => { "use strict"; @@ -85719,7 +54492,7 @@ module.exports = require("http2"); /***/ }), -/***/ 65692: +/***/ 5692: /***/ ((module) => { "use strict"; @@ -85727,7 +54500,7 @@ module.exports = require("https"); /***/ }), -/***/ 69278: +/***/ 9278: /***/ ((module) => { "use strict"; @@ -85735,7 +54508,7 @@ module.exports = require("net"); /***/ }), -/***/ 77598: +/***/ 7598: /***/ ((module) => { "use strict"; @@ -85743,7 +54516,7 @@ module.exports = require("node:crypto"); /***/ }), -/***/ 78474: +/***/ 8474: /***/ ((module) => { "use strict"; @@ -85751,7 +54524,7 @@ module.exports = require("node:events"); /***/ }), -/***/ 73024: +/***/ 3024: /***/ ((module) => { "use strict"; @@ -85759,7 +54532,7 @@ module.exports = require("node:fs"); /***/ }), -/***/ 57075: +/***/ 7075: /***/ ((module) => { "use strict"; @@ -85767,7 +54540,7 @@ module.exports = require("node:stream"); /***/ }), -/***/ 57975: +/***/ 7975: /***/ ((module) => { "use strict"; @@ -85775,7 +54548,7 @@ module.exports = require("node:util"); /***/ }), -/***/ 70857: +/***/ 857: /***/ ((module) => { "use strict"; @@ -85783,7 +54556,7 @@ module.exports = require("os"); /***/ }), -/***/ 16928: +/***/ 6928: /***/ ((module) => { "use strict"; @@ -85791,7 +54564,7 @@ module.exports = require("path"); /***/ }), -/***/ 82987: +/***/ 2987: /***/ ((module) => { "use strict"; @@ -85807,7 +54580,7 @@ module.exports = require("process"); /***/ }), -/***/ 83480: +/***/ 3480: /***/ ((module) => { "use strict"; @@ -85823,7 +54596,7 @@ module.exports = require("stream"); /***/ }), -/***/ 63774: +/***/ 3774: /***/ ((module) => { "use strict"; @@ -85831,7 +54604,7 @@ module.exports = require("stream/web"); /***/ }), -/***/ 13193: +/***/ 3193: /***/ ((module) => { "use strict"; @@ -85839,7 +54612,7 @@ module.exports = require("string_decoder"); /***/ }), -/***/ 53557: +/***/ 3557: /***/ ((module) => { "use strict"; @@ -85847,7 +54620,7 @@ module.exports = require("timers"); /***/ }), -/***/ 64756: +/***/ 4756: /***/ ((module) => { "use strict"; @@ -85855,7 +54628,7 @@ module.exports = require("tls"); /***/ }), -/***/ 87016: +/***/ 7016: /***/ ((module) => { "use strict"; @@ -85863,7 +54636,7 @@ module.exports = require("url"); /***/ }), -/***/ 39023: +/***/ 9023: /***/ ((module) => { "use strict"; @@ -85871,7 +54644,7 @@ module.exports = require("util"); /***/ }), -/***/ 98253: +/***/ 8253: /***/ ((module) => { "use strict"; @@ -85879,7 +54652,7 @@ module.exports = require("util/types"); /***/ }), -/***/ 28167: +/***/ 8167: /***/ ((module) => { "use strict"; @@ -85887,7 +54660,7 @@ module.exports = require("worker_threads"); /***/ }), -/***/ 43106: +/***/ 3106: /***/ ((module) => { "use strict"; @@ -85895,19 +54668,19 @@ module.exports = require("zlib"); /***/ }), -/***/ 27182: +/***/ 7182: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const WritableStream = (__nccwpck_require__(57075).Writable) -const inherits = (__nccwpck_require__(57975).inherits) +const WritableStream = (__nccwpck_require__(7075).Writable) +const inherits = (__nccwpck_require__(7975).inherits) -const StreamSearch = __nccwpck_require__(84136) +const StreamSearch = __nccwpck_require__(4136) -const PartStream = __nccwpck_require__(50612) -const HeaderParser = __nccwpck_require__(62271) +const PartStream = __nccwpck_require__(612) +const HeaderParser = __nccwpck_require__(2271) const DASH = 45 const B_ONEDASH = Buffer.from('-') @@ -86116,17 +54889,17 @@ module.exports = Dicer /***/ }), -/***/ 62271: +/***/ 2271: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const EventEmitter = (__nccwpck_require__(78474).EventEmitter) -const inherits = (__nccwpck_require__(57975).inherits) -const getLimit = __nccwpck_require__(22393) +const EventEmitter = (__nccwpck_require__(8474).EventEmitter) +const inherits = (__nccwpck_require__(7975).inherits) +const getLimit = __nccwpck_require__(2393) -const StreamSearch = __nccwpck_require__(84136) +const StreamSearch = __nccwpck_require__(4136) const B_DCRLF = Buffer.from('\r\n\r\n') const RE_CRLF = /\r\n/g @@ -86224,14 +54997,14 @@ module.exports = HeaderParser /***/ }), -/***/ 50612: +/***/ 612: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const inherits = (__nccwpck_require__(57975).inherits) -const ReadableStream = (__nccwpck_require__(57075).Readable) +const inherits = (__nccwpck_require__(7975).inherits) +const ReadableStream = (__nccwpck_require__(7075).Readable) function PartStream (opts) { ReadableStream.call(this, opts) @@ -86245,7 +55018,7 @@ module.exports = PartStream /***/ }), -/***/ 84136: +/***/ 4136: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -86277,8 +55050,8 @@ module.exports = PartStream * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool */ -const EventEmitter = (__nccwpck_require__(78474).EventEmitter) -const inherits = (__nccwpck_require__(57975).inherits) +const EventEmitter = (__nccwpck_require__(8474).EventEmitter) +const inherits = (__nccwpck_require__(7975).inherits) function SBMH (needle) { if (typeof needle === 'string') { @@ -86481,18 +55254,18 @@ module.exports = SBMH /***/ }), -/***/ 89581: +/***/ 9581: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const WritableStream = (__nccwpck_require__(57075).Writable) -const { inherits } = __nccwpck_require__(57975) -const Dicer = __nccwpck_require__(27182) +const WritableStream = (__nccwpck_require__(7075).Writable) +const { inherits } = __nccwpck_require__(7975) +const Dicer = __nccwpck_require__(7182) -const MultipartParser = __nccwpck_require__(41192) -const UrlencodedParser = __nccwpck_require__(80855) +const MultipartParser = __nccwpck_require__(1192) +const UrlencodedParser = __nccwpck_require__(855) const parseParams = __nccwpck_require__(8929) function Busboy (opts) { @@ -86574,7 +55347,7 @@ module.exports.Dicer = Dicer /***/ }), -/***/ 41192: +/***/ 1192: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -86587,15 +55360,15 @@ module.exports.Dicer = Dicer // * support limits.fieldNameSize // -- this will require modifications to utils.parseParams -const { Readable } = __nccwpck_require__(57075) -const { inherits } = __nccwpck_require__(57975) +const { Readable } = __nccwpck_require__(7075) +const { inherits } = __nccwpck_require__(7975) -const Dicer = __nccwpck_require__(27182) +const Dicer = __nccwpck_require__(7182) const parseParams = __nccwpck_require__(8929) -const decodeText = __nccwpck_require__(72747) -const basename = __nccwpck_require__(20692) -const getLimit = __nccwpck_require__(22393) +const decodeText = __nccwpck_require__(2747) +const basename = __nccwpck_require__(692) +const getLimit = __nccwpck_require__(2393) const RE_BOUNDARY = /^boundary$/i const RE_FIELD = /^form-data$/i @@ -86888,15 +55661,15 @@ module.exports = Multipart /***/ }), -/***/ 80855: +/***/ 855: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const Decoder = __nccwpck_require__(11496) -const decodeText = __nccwpck_require__(72747) -const getLimit = __nccwpck_require__(22393) +const Decoder = __nccwpck_require__(1496) +const decodeText = __nccwpck_require__(2747) +const getLimit = __nccwpck_require__(2393) const RE_CHARSET = /^charset$/i @@ -87086,7 +55859,7 @@ module.exports = UrlEncoded /***/ }), -/***/ 11496: +/***/ 1496: /***/ ((module) => { "use strict"; @@ -87148,7 +55921,7 @@ module.exports = Decoder /***/ }), -/***/ 20692: +/***/ 692: /***/ ((module) => { "use strict"; @@ -87170,7 +55943,7 @@ module.exports = function basename (path) { /***/ }), -/***/ 72747: +/***/ 2747: /***/ (function(module) { "use strict"; @@ -87292,7 +56065,7 @@ module.exports = decodeText /***/ }), -/***/ 22393: +/***/ 2393: /***/ ((module) => { "use strict"; @@ -87323,7 +56096,7 @@ module.exports = function getLimit (limits, name, defaultLimit) { /* eslint-disable object-property-newline */ -const decodeText = __nccwpck_require__(72747) +const decodeText = __nccwpck_require__(2747) const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g @@ -87520,19 +56293,19 @@ module.exports = parseParams /***/ }), -/***/ 79730: +/***/ 7349: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); -var Scalar = __nccwpck_require__(63301); -var YAMLMap = __nccwpck_require__(84454); -var YAMLSeq = __nccwpck_require__(92223); -var resolveBlockMap = __nccwpck_require__(87103); -var resolveBlockSeq = __nccwpck_require__(90334); -var resolveFlowCollection = __nccwpck_require__(13142); +var identity = __nccwpck_require__(1127); +var Scalar = __nccwpck_require__(3301); +var YAMLMap = __nccwpck_require__(4454); +var YAMLSeq = __nccwpck_require__(2223); +var resolveBlockMap = __nccwpck_require__(7103); +var resolveBlockSeq = __nccwpck_require__(334); +var resolveFlowCollection = __nccwpck_require__(3142); function resolveCollection(CN, ctx, token, onError, tagName, tag) { const coll = token.type === 'block-map' @@ -87618,16 +56391,16 @@ exports.composeCollection = composeCollection; /***/ }), -/***/ 23683: +/***/ 3683: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; var Document = __nccwpck_require__(3021); -var composeNode = __nccwpck_require__(45937); -var resolveEnd = __nccwpck_require__(17788); -var resolveProps = __nccwpck_require__(34631); +var composeNode = __nccwpck_require__(5937); +var resolveEnd = __nccwpck_require__(7788); +var resolveProps = __nccwpck_require__(4631); function composeDoc(options, directives, { offset, start, value, end }, onError) { const opts = Object.assign({ _directives: directives }, options); @@ -87671,18 +56444,18 @@ exports.composeDoc = composeDoc; /***/ }), -/***/ 45937: +/***/ 5937: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; var Alias = __nccwpck_require__(4065); -var identity = __nccwpck_require__(41127); -var composeCollection = __nccwpck_require__(79730); +var identity = __nccwpck_require__(1127); +var composeCollection = __nccwpck_require__(7349); var composeScalar = __nccwpck_require__(5413); -var resolveEnd = __nccwpck_require__(17788); -var utilEmptyScalarPosition = __nccwpck_require__(22599); +var resolveEnd = __nccwpck_require__(7788); +var utilEmptyScalarPosition = __nccwpck_require__(2599); const CN = { composeNode, composeEmptyNode }; function composeNode(ctx, token, props, onError) { @@ -87790,10 +56563,10 @@ exports.composeNode = composeNode; "use strict"; -var identity = __nccwpck_require__(41127); -var Scalar = __nccwpck_require__(63301); -var resolveBlockScalar = __nccwpck_require__(48913); -var resolveFlowScalar = __nccwpck_require__(76842); +var identity = __nccwpck_require__(1127); +var Scalar = __nccwpck_require__(3301); +var resolveBlockScalar = __nccwpck_require__(8913); +var resolveFlowScalar = __nccwpck_require__(6842); function composeScalar(ctx, token, tagToken, onError) { const { value, type, comment, range } = token.type === 'block-scalar' @@ -87880,19 +56653,19 @@ exports.composeScalar = composeScalar; /***/ }), -/***/ 89984: +/***/ 9984: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; var node_process = __nccwpck_require__(932); -var directives = __nccwpck_require__(61342); +var directives = __nccwpck_require__(1342); var Document = __nccwpck_require__(3021); -var errors = __nccwpck_require__(91464); -var identity = __nccwpck_require__(41127); -var composeDoc = __nccwpck_require__(23683); -var resolveEnd = __nccwpck_require__(17788); +var errors = __nccwpck_require__(1464); +var identity = __nccwpck_require__(1127); +var composeDoc = __nccwpck_require__(3683); +var resolveEnd = __nccwpck_require__(7788); function getErrorPos(src) { if (typeof src === 'number') @@ -88110,18 +56883,18 @@ exports.Composer = Composer; /***/ }), -/***/ 87103: +/***/ 7103: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var Pair = __nccwpck_require__(57165); -var YAMLMap = __nccwpck_require__(84454); -var resolveProps = __nccwpck_require__(34631); +var Pair = __nccwpck_require__(7165); +var YAMLMap = __nccwpck_require__(4454); +var resolveProps = __nccwpck_require__(4631); var utilContainsNewline = __nccwpck_require__(9499); -var utilFlowIndentCheck = __nccwpck_require__(74051); -var utilMapIncludes = __nccwpck_require__(81187); +var utilFlowIndentCheck = __nccwpck_require__(4051); +var utilMapIncludes = __nccwpck_require__(1187); const startColMsg = 'All mapping items must start at the same column'; function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) { @@ -88235,13 +57008,13 @@ exports.resolveBlockMap = resolveBlockMap; /***/ }), -/***/ 48913: +/***/ 8913: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var Scalar = __nccwpck_require__(63301); +var Scalar = __nccwpck_require__(3301); function resolveBlockScalar(ctx, scalar, onError) { const start = scalar.offset; @@ -88443,15 +57216,15 @@ exports.resolveBlockScalar = resolveBlockScalar; /***/ }), -/***/ 90334: +/***/ 334: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var YAMLSeq = __nccwpck_require__(92223); -var resolveProps = __nccwpck_require__(34631); -var utilFlowIndentCheck = __nccwpck_require__(74051); +var YAMLSeq = __nccwpck_require__(2223); +var resolveProps = __nccwpck_require__(4631); +var utilFlowIndentCheck = __nccwpck_require__(4051); function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) { const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq; @@ -88502,7 +57275,7 @@ exports.resolveBlockSeq = resolveBlockSeq; /***/ }), -/***/ 17788: +/***/ 7788: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -88549,20 +57322,20 @@ exports.resolveEnd = resolveEnd; /***/ }), -/***/ 13142: +/***/ 3142: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); -var Pair = __nccwpck_require__(57165); -var YAMLMap = __nccwpck_require__(84454); -var YAMLSeq = __nccwpck_require__(92223); -var resolveEnd = __nccwpck_require__(17788); -var resolveProps = __nccwpck_require__(34631); +var identity = __nccwpck_require__(1127); +var Pair = __nccwpck_require__(7165); +var YAMLMap = __nccwpck_require__(4454); +var YAMLSeq = __nccwpck_require__(2223); +var resolveEnd = __nccwpck_require__(7788); +var resolveProps = __nccwpck_require__(4631); var utilContainsNewline = __nccwpck_require__(9499); -var utilMapIncludes = __nccwpck_require__(81187); +var utilMapIncludes = __nccwpck_require__(1187); const blockMsg = 'Block collections are not allowed within flow collections'; const isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq'); @@ -88766,14 +57539,14 @@ exports.resolveFlowCollection = resolveFlowCollection; /***/ }), -/***/ 76842: +/***/ 6842: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var Scalar = __nccwpck_require__(63301); -var resolveEnd = __nccwpck_require__(17788); +var Scalar = __nccwpck_require__(3301); +var resolveEnd = __nccwpck_require__(7788); function resolveFlowScalar(scalar, strict, onError) { const { offset, type, source, end } = scalar; @@ -88999,7 +57772,7 @@ exports.resolveFlowScalar = resolveFlowScalar; /***/ }), -/***/ 34631: +/***/ 4631: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -89199,7 +57972,7 @@ exports.containsNewline = containsNewline; /***/ }), -/***/ 22599: +/***/ 2599: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -89235,7 +58008,7 @@ exports.emptyScalarPosition = emptyScalarPosition; /***/ }), -/***/ 74051: +/***/ 4051: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -89260,13 +58033,13 @@ exports.flowIndentCheck = flowIndentCheck; /***/ }), -/***/ 81187: +/***/ 1187: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); +var identity = __nccwpck_require__(1127); function mapIncludes(ctx, items, search) { const { uniqueKeys } = ctx.options; @@ -89290,16 +58063,16 @@ exports.mapIncludes = mapIncludes; var Alias = __nccwpck_require__(4065); -var Collection = __nccwpck_require__(40101); -var identity = __nccwpck_require__(41127); -var Pair = __nccwpck_require__(57165); -var toJS = __nccwpck_require__(74043); -var Schema = __nccwpck_require__(45840); +var Collection = __nccwpck_require__(101); +var identity = __nccwpck_require__(1127); +var Pair = __nccwpck_require__(7165); +var toJS = __nccwpck_require__(6424); +var Schema = __nccwpck_require__(5840); var stringifyDocument = __nccwpck_require__(6829); -var anchors = __nccwpck_require__(71596); -var applyReviver = __nccwpck_require__(83661); -var createNode = __nccwpck_require__(42404); -var directives = __nccwpck_require__(61342); +var anchors = __nccwpck_require__(1596); +var applyReviver = __nccwpck_require__(3661); +var createNode = __nccwpck_require__(2404); +var directives = __nccwpck_require__(1342); class Document { constructor(value, replacer, options) { @@ -89628,14 +58401,14 @@ exports.Document = Document; /***/ }), -/***/ 71596: +/***/ 1596: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); -var visit = __nccwpck_require__(10204); +var identity = __nccwpck_require__(1127); +var visit = __nccwpck_require__(204); /** * Verify that the input string is a valid anchor. @@ -89712,7 +58485,7 @@ exports.findNewAnchor = findNewAnchor; /***/ }), -/***/ 83661: +/***/ 3661: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -89777,15 +58550,15 @@ exports.applyReviver = applyReviver; /***/ }), -/***/ 42404: +/***/ 2404: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; var Alias = __nccwpck_require__(4065); -var identity = __nccwpck_require__(41127); -var Scalar = __nccwpck_require__(63301); +var identity = __nccwpck_require__(1127); +var Scalar = __nccwpck_require__(3301); const defaultTagPrefix = 'tag:yaml.org,2002:'; function findTagObject(value, tagName, tags) { @@ -89875,14 +58648,14 @@ exports.createNode = createNode; /***/ }), -/***/ 61342: +/***/ 1342: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); -var visit = __nccwpck_require__(10204); +var identity = __nccwpck_require__(1127); +var visit = __nccwpck_require__(204); const escapeChars = { '!': '%21', @@ -90061,7 +58834,7 @@ exports.Directives = Directives; /***/ }), -/***/ 91464: +/***/ 1464: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -90131,28 +58904,28 @@ exports.prettifyError = prettifyError; /***/ }), -/***/ 38815: +/***/ 8815: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var composer = __nccwpck_require__(89984); +var composer = __nccwpck_require__(9984); var Document = __nccwpck_require__(3021); -var Schema = __nccwpck_require__(45840); -var errors = __nccwpck_require__(91464); +var Schema = __nccwpck_require__(5840); +var errors = __nccwpck_require__(1464); var Alias = __nccwpck_require__(4065); -var identity = __nccwpck_require__(41127); -var Pair = __nccwpck_require__(57165); -var Scalar = __nccwpck_require__(63301); -var YAMLMap = __nccwpck_require__(84454); -var YAMLSeq = __nccwpck_require__(92223); +var identity = __nccwpck_require__(1127); +var Pair = __nccwpck_require__(7165); +var Scalar = __nccwpck_require__(3301); +var YAMLMap = __nccwpck_require__(4454); +var YAMLSeq = __nccwpck_require__(2223); var cst = __nccwpck_require__(3461); -var lexer = __nccwpck_require__(40361); -var lineCounter = __nccwpck_require__(66628); +var lexer = __nccwpck_require__(361); +var lineCounter = __nccwpck_require__(6628); var parser = __nccwpck_require__(3456); -var publicApi = __nccwpck_require__(84047); -var visit = __nccwpck_require__(10204); +var publicApi = __nccwpck_require__(4047); +var visit = __nccwpck_require__(204); @@ -90189,7 +58962,7 @@ exports.visitAsync = visit.visitAsync; /***/ }), -/***/ 57249: +/***/ 7249: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -90222,11 +58995,11 @@ exports.warn = warn; "use strict"; -var anchors = __nccwpck_require__(71596); -var visit = __nccwpck_require__(10204); -var identity = __nccwpck_require__(41127); -var Node = __nccwpck_require__(66673); -var toJS = __nccwpck_require__(74043); +var anchors = __nccwpck_require__(1596); +var visit = __nccwpck_require__(204); +var identity = __nccwpck_require__(1127); +var Node = __nccwpck_require__(6673); +var toJS = __nccwpck_require__(6424); class Alias extends Node.NodeBase { constructor(source) { @@ -90340,15 +59113,15 @@ exports.Alias = Alias; /***/ }), -/***/ 40101: +/***/ 101: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var createNode = __nccwpck_require__(42404); -var identity = __nccwpck_require__(41127); -var Node = __nccwpck_require__(66673); +var createNode = __nccwpck_require__(2404); +var identity = __nccwpck_require__(1127); +var Node = __nccwpck_require__(6673); function collectionFromPath(schema, path, value) { let v = value; @@ -90499,15 +59272,15 @@ exports.isEmptyPath = isEmptyPath; /***/ }), -/***/ 66673: +/***/ 6673: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var applyReviver = __nccwpck_require__(83661); -var identity = __nccwpck_require__(41127); -var toJS = __nccwpck_require__(74043); +var applyReviver = __nccwpck_require__(3661); +var identity = __nccwpck_require__(1127); +var toJS = __nccwpck_require__(6424); class NodeBase { constructor(type) { @@ -90547,16 +59320,16 @@ exports.NodeBase = NodeBase; /***/ }), -/***/ 57165: +/***/ 7165: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var createNode = __nccwpck_require__(42404); -var stringifyPair = __nccwpck_require__(59748); -var addPairToJSMap = __nccwpck_require__(97104); -var identity = __nccwpck_require__(41127); +var createNode = __nccwpck_require__(2404); +var stringifyPair = __nccwpck_require__(9748); +var addPairToJSMap = __nccwpck_require__(7104); +var identity = __nccwpck_require__(1127); function createPair(key, value, ctx) { const k = createNode.createNode(key, undefined, ctx); @@ -90594,15 +59367,15 @@ exports.createPair = createPair; /***/ }), -/***/ 63301: +/***/ 3301: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); -var Node = __nccwpck_require__(66673); -var toJS = __nccwpck_require__(74043); +var identity = __nccwpck_require__(1127); +var Node = __nccwpck_require__(6673); +var toJS = __nccwpck_require__(6424); const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object'); class Scalar extends Node.NodeBase { @@ -90629,18 +59402,18 @@ exports.isScalarValue = isScalarValue; /***/ }), -/***/ 84454: +/***/ 4454: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var stringifyCollection = __nccwpck_require__(61212); -var addPairToJSMap = __nccwpck_require__(97104); -var Collection = __nccwpck_require__(40101); -var identity = __nccwpck_require__(41127); -var Pair = __nccwpck_require__(57165); -var Scalar = __nccwpck_require__(63301); +var stringifyCollection = __nccwpck_require__(1212); +var addPairToJSMap = __nccwpck_require__(7104); +var Collection = __nccwpck_require__(101); +var identity = __nccwpck_require__(1127); +var Pair = __nccwpck_require__(7165); +var Scalar = __nccwpck_require__(3301); function findPair(items, key) { const k = identity.isScalar(key) ? key.value : key; @@ -90784,18 +59557,18 @@ exports.findPair = findPair; /***/ }), -/***/ 92223: +/***/ 2223: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var createNode = __nccwpck_require__(42404); -var stringifyCollection = __nccwpck_require__(61212); -var Collection = __nccwpck_require__(40101); -var identity = __nccwpck_require__(41127); -var Scalar = __nccwpck_require__(63301); -var toJS = __nccwpck_require__(74043); +var createNode = __nccwpck_require__(2404); +var stringifyCollection = __nccwpck_require__(1212); +var Collection = __nccwpck_require__(101); +var identity = __nccwpck_require__(1127); +var Scalar = __nccwpck_require__(3301); +var toJS = __nccwpck_require__(6424); class YAMLSeq extends Collection.Collection { static get tagName() { @@ -90907,17 +59680,17 @@ exports.YAMLSeq = YAMLSeq; /***/ }), -/***/ 97104: +/***/ 7104: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var log = __nccwpck_require__(57249); -var merge = __nccwpck_require__(90452); +var log = __nccwpck_require__(7249); +var merge = __nccwpck_require__(452); var stringify = __nccwpck_require__(2148); -var identity = __nccwpck_require__(41127); -var toJS = __nccwpck_require__(74043); +var identity = __nccwpck_require__(1127); +var toJS = __nccwpck_require__(6424); function addPairToJSMap(ctx, map, { key, value }) { if (identity.isNode(key) && key.addToJSMap) @@ -90980,7 +59753,7 @@ exports.addPairToJSMap = addPairToJSMap; /***/ }), -/***/ 41127: +/***/ 1127: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -91041,13 +59814,13 @@ exports.isSeq = isSeq; /***/ }), -/***/ 74043: +/***/ 6424: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); +var identity = __nccwpck_require__(1127); /** * Recursively convert any node or its contents to native JavaScript @@ -91088,16 +59861,16 @@ exports.toJS = toJS; /***/ }), -/***/ 60110: +/***/ 110: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var resolveBlockScalar = __nccwpck_require__(48913); -var resolveFlowScalar = __nccwpck_require__(76842); -var errors = __nccwpck_require__(91464); -var stringifyString = __nccwpck_require__(83069); +var resolveBlockScalar = __nccwpck_require__(8913); +var resolveFlowScalar = __nccwpck_require__(6842); +var errors = __nccwpck_require__(1464); +var stringifyString = __nccwpck_require__(3069); function resolveAsScalar(token, strict = true, onError) { if (token) { @@ -91314,7 +60087,7 @@ exports.setScalarValue = setScalarValue; /***/ }), -/***/ 91733: +/***/ 1733: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -91385,7 +60158,7 @@ exports.stringify = stringify; /***/ }), -/***/ 97715: +/***/ 7715: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -91498,9 +60271,9 @@ exports.visit = visit; "use strict"; -var cstScalar = __nccwpck_require__(60110); -var cstStringify = __nccwpck_require__(91733); -var cstVisit = __nccwpck_require__(97715); +var cstScalar = __nccwpck_require__(110); +var cstStringify = __nccwpck_require__(1733); +var cstVisit = __nccwpck_require__(7715); /** The byte order mark */ const BOM = '\u{FEFF}'; @@ -91612,7 +60385,7 @@ exports.tokenType = tokenType; /***/ }), -/***/ 40361: +/***/ 361: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -92339,7 +61112,7 @@ exports.Lexer = Lexer; /***/ }), -/***/ 66628: +/***/ 6628: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -92396,7 +61169,7 @@ exports.LineCounter = LineCounter; var node_process = __nccwpck_require__(932); var cst = __nccwpck_require__(3461); -var lexer = __nccwpck_require__(40361); +var lexer = __nccwpck_require__(361); function includesToken(list, type) { for (let i = 0; i < list.length; ++i) @@ -93368,18 +62141,18 @@ exports.Parser = Parser; /***/ }), -/***/ 84047: +/***/ 4047: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var composer = __nccwpck_require__(89984); +var composer = __nccwpck_require__(9984); var Document = __nccwpck_require__(3021); -var errors = __nccwpck_require__(91464); -var log = __nccwpck_require__(57249); -var identity = __nccwpck_require__(41127); -var lineCounter = __nccwpck_require__(66628); +var errors = __nccwpck_require__(1464); +var log = __nccwpck_require__(7249); +var identity = __nccwpck_require__(1127); +var lineCounter = __nccwpck_require__(6628); var parser = __nccwpck_require__(3456); function parseOptions(options) { @@ -93483,17 +62256,17 @@ exports.stringify = stringify; /***/ }), -/***/ 45840: +/***/ 5840: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); -var map = __nccwpck_require__(47451); +var identity = __nccwpck_require__(1127); +var map = __nccwpck_require__(7451); var seq = __nccwpck_require__(1706); -var string = __nccwpck_require__(66464); -var tags = __nccwpck_require__(90018); +var string = __nccwpck_require__(6464); +var tags = __nccwpck_require__(18); const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; class Schema { @@ -93530,14 +62303,14 @@ exports.Schema = Schema; /***/ }), -/***/ 47451: +/***/ 7451: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); -var YAMLMap = __nccwpck_require__(84454); +var identity = __nccwpck_require__(1127); +var YAMLMap = __nccwpck_require__(4454); const map = { collection: 'map', @@ -93557,13 +62330,13 @@ exports.map = map; /***/ }), -/***/ 73632: +/***/ 3632: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var Scalar = __nccwpck_require__(63301); +var Scalar = __nccwpck_require__(3301); const nullTag = { identify: value => value == null, @@ -93588,8 +62361,8 @@ exports.nullTag = nullTag; "use strict"; -var identity = __nccwpck_require__(41127); -var YAMLSeq = __nccwpck_require__(92223); +var identity = __nccwpck_require__(1127); +var YAMLSeq = __nccwpck_require__(2223); const seq = { collection: 'seq', @@ -93609,13 +62382,13 @@ exports.seq = seq; /***/ }), -/***/ 66464: +/***/ 6464: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var stringifyString = __nccwpck_require__(83069); +var stringifyString = __nccwpck_require__(3069); const string = { identify: value => typeof value === 'string', @@ -93633,13 +62406,13 @@ exports.string = string; /***/ }), -/***/ 73959: +/***/ 3959: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var Scalar = __nccwpck_require__(63301); +var Scalar = __nccwpck_require__(3301); const boolTag = { identify: value => typeof value === 'boolean', @@ -93662,14 +62435,14 @@ exports.boolTag = boolTag; /***/ }), -/***/ 38405: +/***/ 8405: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var Scalar = __nccwpck_require__(63301); -var stringifyNumber = __nccwpck_require__(28689); +var Scalar = __nccwpck_require__(3301); +var stringifyNumber = __nccwpck_require__(8689); const floatNaN = { identify: value => typeof value === 'number', @@ -93717,13 +62490,13 @@ exports.floatNaN = floatNaN; /***/ }), -/***/ 59874: +/***/ 9874: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var stringifyNumber = __nccwpck_require__(28689); +var stringifyNumber = __nccwpck_require__(8689); const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); const intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix)); @@ -93767,19 +62540,19 @@ exports.intOct = intOct; /***/ }), -/***/ 70896: +/***/ 896: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var map = __nccwpck_require__(47451); -var _null = __nccwpck_require__(73632); +var map = __nccwpck_require__(7451); +var _null = __nccwpck_require__(3632); var seq = __nccwpck_require__(1706); -var string = __nccwpck_require__(66464); -var bool = __nccwpck_require__(73959); -var float = __nccwpck_require__(38405); -var int = __nccwpck_require__(59874); +var string = __nccwpck_require__(6464); +var bool = __nccwpck_require__(3959); +var float = __nccwpck_require__(8405); +var int = __nccwpck_require__(9874); const schema = [ map.map, @@ -93800,14 +62573,14 @@ exports.schema = schema; /***/ }), -/***/ 33559: +/***/ 3559: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var Scalar = __nccwpck_require__(63301); -var map = __nccwpck_require__(47451); +var Scalar = __nccwpck_require__(3301); +var map = __nccwpck_require__(7451); var seq = __nccwpck_require__(1706); function intIdentify(value) { @@ -93872,28 +62645,28 @@ exports.schema = schema; /***/ }), -/***/ 90018: +/***/ 18: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var map = __nccwpck_require__(47451); -var _null = __nccwpck_require__(73632); +var map = __nccwpck_require__(7451); +var _null = __nccwpck_require__(3632); var seq = __nccwpck_require__(1706); -var string = __nccwpck_require__(66464); -var bool = __nccwpck_require__(73959); -var float = __nccwpck_require__(38405); -var int = __nccwpck_require__(59874); -var schema = __nccwpck_require__(70896); -var schema$1 = __nccwpck_require__(33559); -var binary = __nccwpck_require__(56083); -var merge = __nccwpck_require__(90452); -var omap = __nccwpck_require__(50303); -var pairs = __nccwpck_require__(18385); -var schema$2 = __nccwpck_require__(35913); -var set = __nccwpck_require__(81528); -var timestamp = __nccwpck_require__(24371); +var string = __nccwpck_require__(6464); +var bool = __nccwpck_require__(3959); +var float = __nccwpck_require__(8405); +var int = __nccwpck_require__(9874); +var schema = __nccwpck_require__(896); +var schema$1 = __nccwpck_require__(3559); +var binary = __nccwpck_require__(6083); +var merge = __nccwpck_require__(452); +var omap = __nccwpck_require__(303); +var pairs = __nccwpck_require__(766); +var schema$2 = __nccwpck_require__(8294); +var set = __nccwpck_require__(1528); +var timestamp = __nccwpck_require__(4371); const schemas = new Map([ ['core', schema.schema], @@ -93979,15 +62752,15 @@ exports.getTags = getTags; /***/ }), -/***/ 56083: +/***/ 6083: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var node_buffer = __nccwpck_require__(20181); -var Scalar = __nccwpck_require__(63301); -var stringifyString = __nccwpck_require__(83069); +var node_buffer = __nccwpck_require__(181); +var Scalar = __nccwpck_require__(3301); +var stringifyString = __nccwpck_require__(3069); const binary = { identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array @@ -94057,13 +62830,13 @@ exports.binary = binary; /***/ }), -/***/ 88398: +/***/ 8398: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var Scalar = __nccwpck_require__(63301); +var Scalar = __nccwpck_require__(3301); function boolStringify({ value, source }, ctx) { const boolObj = value ? trueTag : falseTag; @@ -94094,14 +62867,14 @@ exports.trueTag = trueTag; /***/ }), -/***/ 35782: +/***/ 5782: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var Scalar = __nccwpck_require__(63301); -var stringifyNumber = __nccwpck_require__(28689); +var Scalar = __nccwpck_require__(3301); +var stringifyNumber = __nccwpck_require__(8689); const floatNaN = { identify: value => typeof value === 'number', @@ -94152,13 +62925,13 @@ exports.floatNaN = floatNaN; /***/ }), -/***/ 10873: +/***/ 873: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var stringifyNumber = __nccwpck_require__(28689); +var stringifyNumber = __nccwpck_require__(8689); const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); function intResolve(str, offset, radix, { intAsBigInt }) { @@ -94236,14 +63009,14 @@ exports.intOct = intOct; /***/ }), -/***/ 90452: +/***/ 452: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); -var Scalar = __nccwpck_require__(63301); +var identity = __nccwpck_require__(1127); +var Scalar = __nccwpck_require__(3301); // If the value associated with a merge key is a single mapping node, each of // its key/value pairs is inserted into the current mapping, unless the key @@ -94312,17 +63085,17 @@ exports.merge = merge; /***/ }), -/***/ 50303: +/***/ 303: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); -var toJS = __nccwpck_require__(74043); -var YAMLMap = __nccwpck_require__(84454); -var YAMLSeq = __nccwpck_require__(92223); -var pairs = __nccwpck_require__(18385); +var identity = __nccwpck_require__(1127); +var toJS = __nccwpck_require__(6424); +var YAMLMap = __nccwpck_require__(4454); +var YAMLSeq = __nccwpck_require__(2223); +var pairs = __nccwpck_require__(766); class YAMLOMap extends YAMLSeq.YAMLSeq { constructor() { @@ -94397,16 +63170,16 @@ exports.omap = omap; /***/ }), -/***/ 18385: +/***/ 766: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); -var Pair = __nccwpck_require__(57165); -var Scalar = __nccwpck_require__(63301); -var YAMLSeq = __nccwpck_require__(92223); +var identity = __nccwpck_require__(1127); +var Pair = __nccwpck_require__(7165); +var Scalar = __nccwpck_require__(3301); +var YAMLSeq = __nccwpck_require__(2223); function resolvePairs(seq, onError) { if (identity.isSeq(seq)) { @@ -94487,25 +63260,25 @@ exports.resolvePairs = resolvePairs; /***/ }), -/***/ 35913: +/***/ 8294: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var map = __nccwpck_require__(47451); -var _null = __nccwpck_require__(73632); +var map = __nccwpck_require__(7451); +var _null = __nccwpck_require__(3632); var seq = __nccwpck_require__(1706); -var string = __nccwpck_require__(66464); -var binary = __nccwpck_require__(56083); -var bool = __nccwpck_require__(88398); -var float = __nccwpck_require__(35782); -var int = __nccwpck_require__(10873); -var merge = __nccwpck_require__(90452); -var omap = __nccwpck_require__(50303); -var pairs = __nccwpck_require__(18385); -var set = __nccwpck_require__(81528); -var timestamp = __nccwpck_require__(24371); +var string = __nccwpck_require__(6464); +var binary = __nccwpck_require__(6083); +var bool = __nccwpck_require__(8398); +var float = __nccwpck_require__(5782); +var int = __nccwpck_require__(873); +var merge = __nccwpck_require__(452); +var omap = __nccwpck_require__(303); +var pairs = __nccwpck_require__(766); +var set = __nccwpck_require__(1528); +var timestamp = __nccwpck_require__(4371); const schema = [ map.map, @@ -94536,15 +63309,15 @@ exports.schema = schema; /***/ }), -/***/ 81528: +/***/ 1528: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); -var Pair = __nccwpck_require__(57165); -var YAMLMap = __nccwpck_require__(84454); +var identity = __nccwpck_require__(1127); +var Pair = __nccwpck_require__(7165); +var YAMLMap = __nccwpck_require__(4454); class YAMLSet extends YAMLMap.YAMLMap { constructor(schema) { @@ -94640,13 +63413,13 @@ exports.set = set; /***/ }), -/***/ 24371: +/***/ 4371: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var stringifyNumber = __nccwpck_require__(28689); +var stringifyNumber = __nccwpck_require__(8689); /** Internal types handle bigint as number, because TS can't figure it out. */ function parseSexagesimal(str, asBigInt) { @@ -94753,7 +63526,7 @@ exports.timestamp = timestamp; /***/ }), -/***/ 34475: +/***/ 4475: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -94918,10 +63691,10 @@ exports.foldFlowLines = foldFlowLines; "use strict"; -var anchors = __nccwpck_require__(71596); -var identity = __nccwpck_require__(41127); -var stringifyComment = __nccwpck_require__(59799); -var stringifyString = __nccwpck_require__(83069); +var anchors = __nccwpck_require__(1596); +var identity = __nccwpck_require__(1127); +var stringifyComment = __nccwpck_require__(9799); +var stringifyString = __nccwpck_require__(3069); function createStringifyContext(doc, options) { const opt = Object.assign({ @@ -95051,15 +63824,15 @@ exports.stringify = stringify; /***/ }), -/***/ 61212: +/***/ 1212: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); +var identity = __nccwpck_require__(1127); var stringify = __nccwpck_require__(2148); -var stringifyComment = __nccwpck_require__(59799); +var stringifyComment = __nccwpck_require__(9799); function stringifyCollection(collection, ctx, options) { const flow = ctx.inFlow ?? collection.flow; @@ -95204,7 +63977,7 @@ exports.stringifyCollection = stringifyCollection; /***/ }), -/***/ 59799: +/***/ 9799: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -95242,9 +64015,9 @@ exports.stringifyComment = stringifyComment; "use strict"; -var identity = __nccwpck_require__(41127); +var identity = __nccwpck_require__(1127); var stringify = __nccwpck_require__(2148); -var stringifyComment = __nccwpck_require__(59799); +var stringifyComment = __nccwpck_require__(9799); function stringifyDocument(doc, options) { const lines = []; @@ -95331,7 +64104,7 @@ exports.stringifyDocument = stringifyDocument; /***/ }), -/***/ 28689: +/***/ 8689: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -95365,16 +64138,16 @@ exports.stringifyNumber = stringifyNumber; /***/ }), -/***/ 59748: +/***/ 9748: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); -var Scalar = __nccwpck_require__(63301); +var identity = __nccwpck_require__(1127); +var Scalar = __nccwpck_require__(3301); var stringify = __nccwpck_require__(2148); -var stringifyComment = __nccwpck_require__(59799); +var stringifyComment = __nccwpck_require__(9799); function stringifyPair({ key, value }, ctx, onComment, onChompKeep) { const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx; @@ -95525,14 +64298,14 @@ exports.stringifyPair = stringifyPair; /***/ }), -/***/ 83069: +/***/ 3069: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var Scalar = __nccwpck_require__(63301); -var foldFlowLines = __nccwpck_require__(34475); +var Scalar = __nccwpck_require__(3301); +var foldFlowLines = __nccwpck_require__(4475); const getFoldOptions = (ctx, isBlock) => ({ indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart, @@ -95871,13 +64644,13 @@ exports.stringifyString = stringifyString; /***/ }), -/***/ 10204: +/***/ 204: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var identity = __nccwpck_require__(41127); +var identity = __nccwpck_require__(1127); const BREAK = Symbol('break visit'); const SKIP = Symbol('skip children'); @@ -96115,42 +64888,26 @@ exports.visitAsync = visitAsync; /***/ }), -/***/ 50591: +/***/ 591: /***/ ((module) => { (()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{XMLBuilder:()=>ft,XMLParser:()=>st,XMLValidator:()=>mt});const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("^["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function s(t,e){const n=[];let i=e.exec(t);for(;i;){const s=[];s.startIndex=e.lastIndex-i[0].length;const r=i.length;for(let t=0;t"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)f+=t[o];if(f=f.trim(),"/"===f[f.length-1]&&(f=f.substring(0,f.length-1),o--),!r(f)){let e;return e=0===f.trim().length?"Invalid space after '<'.":"Tag '"+f+"' is an invalid name.",x("InvalidTag",e,N(t,o))}const p=c(t,o);if(!1===p)return x("InvalidAttr","Attributes for '"+f+"' have open quote.",N(t,o));let b=p.value;if(o=p.index,"/"===b[b.length-1]){const n=o-b.length;b=b.substring(0,b.length-1);const s=g(b,e);if(!0!==s)return x(s.err.code,s.err.msg,N(t,n+s.err.line));i=!0}else if(d){if(!p.tagClosed)return x("InvalidTag","Closing tag '"+f+"' doesn't have proper closing.",N(t,o));if(b.trim().length>0)return x("InvalidTag","Closing tag '"+f+"' can't have attributes or invalid starting.",N(t,a));if(0===n.length)return x("InvalidTag","Closing tag '"+f+"' has not been opened.",N(t,a));{const e=n.pop();if(f!==e.tagName){let n=N(t,e.tagStartPos);return x("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+f+"'.",N(t,a))}0==n.length&&(s=!0)}}else{const r=g(b,e);if(!0!==r)return x(r.err.code,r.err.msg,N(t,o-b.length+r.err.line));if(!0===s)return x("InvalidXml","Multiple possible root nodes found.",N(t,o));-1!==e.unpairedTags.indexOf(f)||n.push({tagName:f,tagStartPos:a}),i=!0}for(o++;o0)||x("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):x("InvalidXml","Start tag expected.",1)}function l(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function u(t,e){const n=e;for(;e5&&"xml"===i)return x("InvalidXml","XML declaration allowed only at the start of the document.",N(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function h(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}const d='"',f="'";function c(t,e){let n="",i="",s=!1;for(;e"===t[e]&&""===i){s=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:s}}const p=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function g(t,e){const n=s(t,p),i={};for(let t=0;t!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t},captureMetaData:!1};let y;y="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class T{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][y]={startIndex:e})}static getMetaDataSymbol(){return y}}function w(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,s=!1,r=!1,o="";for(;e"===t[e]){if(r?"-"===t[e-1]&&"-"===t[e-2]&&(r=!1,i--):i--,0===i)break}else"["===t[e]?s=!0:o+=t[e];else{if(s&&C(t,"!ENTITY",e)){let i,s;e+=7,[i,s,e]=O(t,e+1),-1===s.indexOf("&")&&(n[i]={regx:RegExp(`&${i};`,"g"),val:s})}else if(s&&C(t,"!ELEMENT",e)){e+=8;const{index:n}=S(t,e+1);e=n}else if(s&&C(t,"!ATTLIST",e))e+=8;else if(s&&C(t,"!NOTATION",e)){e+=9;const{index:n}=A(t,e+1);e=n}else{if(!C(t,"!--",e))throw new Error("Invalid DOCTYPE");r=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}const P=(t,e)=>{for(;e{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}class k{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"Â¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,16))}},this.addExternalEntities=F,this.parseXml=X,this.parseTextData=L,this.resolveNameSpace=B,this.buildAttributesMap=G,this.isItStopNode=Z,this.replaceEntitiesValue=R,this.readStopNodeData=J,this.saveTextToParentTag=q,this.addChild=Y,this.ignoreAttributesFn=_(this.options.ignoreAttributes)}}function F(t){const e=Object.keys(t);for(let n=0;n0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,s,r);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?H(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function B(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const U=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function G(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=s(t,U),i=n.length,r={};for(let t=0;t",r,"Closing Tag is not closed.");let o=t.substring(r+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,s));const a=s.substring(s.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),n=this.tagsNodeStack.pop(),i="",r=e}else if("?"===t[r+1]){let e=z(t,r,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,s),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new T(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,s,e.tagName)),this.addChild(n,t,s,r)}r=e.closeIndex+1}else if("!--"===t.substr(r+1,3)){const e=W(t,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(r+4,e-2);i=this.saveTextToParentTag(i,n,s),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}r=e}else if("!D"===t.substr(r+1,2)){const e=w(t,r);this.docTypeEntities=e.entities,r=e.i}else if("!["===t.substr(r+1,2)){const e=W(t,"]]>",r,"CDATA is not closed.")-2,o=t.substring(r+9,e);i=this.saveTextToParentTag(i,n,s);let a=this.parseTextData(o,n.tagname,s,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,a),r=e+2}else{let o=z(t,r,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let u=o.tagExp,h=o.attrExpPresent,d=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,s,!1));const f=n;f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),a!==e.tagname&&(s+=s?"."+a:a);const c=r;if(this.isItStopNode(this.options.stopNodes,s,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),r=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))r=o.closeIndex;else{const n=this.readStopNodeData(t,l,d+1);if(!n)throw new Error(`Unexpected end of ${l}`);r=n.i,e=n.tagContent}const i=new T(a);a!==u&&h&&(i[":@"]=this.buildAttributesMap(u,s,a)),e&&(e=this.parseTextData(e,a,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,s,c)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new T(a);a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s,c),s=s.substr(0,s.lastIndexOf("."))}else{const t=new T(a);this.tagsNodeStack.push(n),a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s,c),n=t}i="",r=d}}else i+=t[r];return e.child};function Y(t,e,n,i){this.options.captureMetaData||(i=void 0);const s=this.options.updateTag(e.tagname,n,e[":@"]);!1===s||("string"==typeof s?(e.tagname=s,t.addChild(e,i)):t.addChild(e,i))}const R=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function q(t,e,n,i){return t&&(void 0===i&&(i=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Z(t,e,n){const i="*."+n;for(const n in t){const s=t[n];if(i===s||e===s)return!0}return!1}function W(t,e,n,i){const s=t.indexOf(e,n);if(-1===s)throw new Error(i);return s+e.length-1}function z(t,e,n,i=">"){const s=function(t,e,n=">"){let i,s="";for(let r=e;r",n,`${e} is not closed`);if(t.substring(n+2,r).trim()===e&&(s--,0===s))return{tagContent:t.substring(i,n),i:r};n=r}else if("?"===t[n+1])n=W(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=W(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=W(t,"]]>",n,"StopNode is not closed.")-2;else{const i=z(t,n,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&s++,n=i.closeIndex)}}function H(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&function(t,e={}){if(e=Object.assign({},V,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if("0"===t)return 0;if(e.hex&&j.test(n))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(n);if(-1!==n.search(/.+[eE].+/))return function(t,e,n){if(!n.eNotation)return t;const i=e.match(M);if(i){let s=i[1]||"";const r=-1===i[3].indexOf("e")?"E":"e",o=i[2],a=s?t[o.length+1]===r:t[o.length]===r;return o.length>1&&a?t:1!==o.length||!i[3].startsWith(`.${r}`)&&i[3][0]!==r?n.leadingZeros&&!a?(e=(i[1]||"")+i[3],Number(e)):t:Number(e)}return t}(t,n,e);{const s=D.exec(n);if(s){const r=s[1]||"",o=s[2];let a=(i=s[3])&&-1!==i.indexOf(".")?("."===(i=i.replace(/0+$/,""))?i="0":"."===i[0]?i="0"+i:"."===i[i.length-1]&&(i=i.substring(0,i.length-1)),i):i;const l=r?"."===t[o.length+1]:"."===t[o.length];if(!e.leadingZeros&&(o.length>1||1===o.length&&!l))return t;{const i=Number(n),s=String(i);if(0===i||-0===i)return i;if(-1!==s.search(/[eE]/))return e.eNotation?i:t;if(-1!==n.indexOf("."))return"0"===s||s===a||s===`${r}${a}`?i:t;let l=o?a:n;return o?l===s||r+l===s?i:t:l===s||l===r+s?i:t}}return t}var i}(t,n)}return void 0!==t?t:""}const K=T.getMetaDataSymbol();function Q(t,e){return tt(t,e)}function tt(t,e,n){let i;const s={};for(let r=0;r0&&(s[e.textNodeName]=i):void 0!==i&&(s[e.textNodeName]=i),s}function et(t){const e=Object.keys(t);for(let t=0;t0&&(n="\n"),ot(t,e,"",n)}function ot(t,e,n,i){let s="",r=!1;for(let o=0;o`,r=!1;continue}if(l===e.commentPropName){s+=i+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,r=!0;continue}if("?"===l[0]){const t=lt(a[":@"],e),n="?xml"===l?"":i;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",s+=n+`<${l}${o}${t}?>`,r=!0;continue}let h=i;""!==h&&(h+=e.indentBy);const d=i+`<${l}${lt(a[":@"],e)}`,f=ot(a[l],e,u,h);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?s+=d+">":s+=d+"/>":f&&0!==f.length||!e.suppressEmptyNode?f&&f.endsWith(">")?s+=d+`>${f}${i}`:(s+=d+">",f&&""!==i&&(f.includes("/>")||f.includes("`):s+=d+"/>",r=!0}return s}function at(t){const e=Object.keys(t);for(let n=0;n0&&e.processEntities)for(let n=0;n","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ft(t){this.options=Object.assign({},dt,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=_(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=gt),this.processTextOrObjNode=ct,this.options.format?(this.indentate=pt,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function ct(t,e,n,i){const s=this.j2x(t,n+1,i.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,s.attrStr,n):this.buildObjectNode(s.val,e,s.attrStr,n)}function pt(t){return this.options.indentBy.repeat(t)}function gt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}ft.prototype.build=function(t){return this.options.preserveOrder?rt(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},ft.prototype.j2x=function(t,e,n){let i="",s="";const r=n.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(s+="");else if(null===t[o])this.isAttribute(o)||o===this.options.cdataPropName?s+="":"?"===o[0]?s+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)s+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const n=this.isAttribute(o);if(n&&!this.ignoreAttributesFn(n,r))i+=this.buildAttrPairStr(n,""+t[o]);else if(!n)if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);s+=this.replaceEntitiesValue(e)}else s+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const i=t[o].length;let r="",a="";for(let l=0;l"+t+s}},ft.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+s+"0&&this.options.processEntities)for(let e=0;e { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-codedeploy","description":"AWS SDK for JavaScript Codedeploy Client for Node.js, Browser and React Native","version":"3.913.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-codedeploy","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo codedeploy"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.911.0","@aws-sdk/credential-provider-node":"3.913.0","@aws-sdk/middleware-host-header":"3.910.0","@aws-sdk/middleware-logger":"3.910.0","@aws-sdk/middleware-recursion-detection":"3.910.0","@aws-sdk/middleware-user-agent":"3.911.0","@aws-sdk/region-config-resolver":"3.910.0","@aws-sdk/types":"3.910.0","@aws-sdk/util-endpoints":"3.910.0","@aws-sdk/util-user-agent-browser":"3.910.0","@aws-sdk/util-user-agent-node":"3.911.0","@smithy/config-resolver":"^4.3.2","@smithy/core":"^3.16.1","@smithy/fetch-http-handler":"^5.3.3","@smithy/hash-node":"^4.2.2","@smithy/invalid-dependency":"^4.2.2","@smithy/middleware-content-length":"^4.2.2","@smithy/middleware-endpoint":"^4.3.3","@smithy/middleware-retry":"^4.4.3","@smithy/middleware-serde":"^4.2.2","@smithy/middleware-stack":"^4.2.2","@smithy/node-config-provider":"^4.3.2","@smithy/node-http-handler":"^4.4.1","@smithy/protocol-http":"^5.3.2","@smithy/smithy-client":"^4.8.1","@smithy/types":"^4.7.1","@smithy/url-parser":"^4.2.2","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.2","@smithy/util-defaults-mode-node":"^4.2.3","@smithy/util-endpoints":"^3.2.2","@smithy/util-middleware":"^4.2.2","@smithy/util-retry":"^4.2.2","@smithy/util-utf8":"^4.2.0","@smithy/util-waiter":"^4.2.2","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-codedeploy","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-codedeploy"}}'); - -/***/ }), - -/***/ 36948: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.888.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.888.0","@aws-sdk/middleware-host-header":"3.887.0","@aws-sdk/middleware-logger":"3.887.0","@aws-sdk/middleware-recursion-detection":"3.887.0","@aws-sdk/middleware-user-agent":"3.888.0","@aws-sdk/region-config-resolver":"3.887.0","@aws-sdk/types":"3.887.0","@aws-sdk/util-endpoints":"3.887.0","@aws-sdk/util-user-agent-browser":"3.887.0","@aws-sdk/util-user-agent-node":"3.888.0","@smithy/config-resolver":"^4.2.1","@smithy/core":"^3.11.0","@smithy/fetch-http-handler":"^5.2.1","@smithy/hash-node":"^4.1.1","@smithy/invalid-dependency":"^4.1.1","@smithy/middleware-content-length":"^4.1.1","@smithy/middleware-endpoint":"^4.2.1","@smithy/middleware-retry":"^4.2.1","@smithy/middleware-serde":"^4.1.1","@smithy/middleware-stack":"^4.1.1","@smithy/node-config-provider":"^4.2.1","@smithy/node-http-handler":"^4.2.1","@smithy/protocol-http":"^5.2.1","@smithy/smithy-client":"^4.6.1","@smithy/types":"^4.5.0","@smithy/url-parser":"^4.1.1","@smithy/util-base64":"^4.1.0","@smithy/util-body-length-browser":"^4.1.0","@smithy/util-body-length-node":"^4.1.0","@smithy/util-defaults-mode-browser":"^4.1.1","@smithy/util-defaults-mode-node":"^4.1.1","@smithy/util-endpoints":"^3.1.1","@smithy/util-middleware":"^4.1.1","@smithy/util-retry":"^4.1.1","@smithy/util-utf8":"^4.1.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}'); - -/***/ }), - -/***/ 77507: +/***/ 909: /***/ ((module) => { "use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.888.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.888.0","@aws-sdk/middleware-host-header":"3.887.0","@aws-sdk/middleware-logger":"3.887.0","@aws-sdk/middleware-recursion-detection":"3.887.0","@aws-sdk/middleware-user-agent":"3.888.0","@aws-sdk/region-config-resolver":"3.887.0","@aws-sdk/types":"3.887.0","@aws-sdk/util-endpoints":"3.887.0","@aws-sdk/util-user-agent-browser":"3.887.0","@aws-sdk/util-user-agent-node":"3.888.0","@smithy/config-resolver":"^4.2.1","@smithy/core":"^3.11.0","@smithy/fetch-http-handler":"^5.2.1","@smithy/hash-node":"^4.1.1","@smithy/invalid-dependency":"^4.1.1","@smithy/middleware-content-length":"^4.1.1","@smithy/middleware-endpoint":"^4.2.1","@smithy/middleware-retry":"^4.2.1","@smithy/middleware-serde":"^4.1.1","@smithy/middleware-stack":"^4.1.1","@smithy/node-config-provider":"^4.2.1","@smithy/node-http-handler":"^4.2.1","@smithy/protocol-http":"^5.2.1","@smithy/smithy-client":"^4.6.1","@smithy/types":"^4.5.0","@smithy/url-parser":"^4.1.1","@smithy/util-base64":"^4.1.0","@smithy/util-body-length-browser":"^4.1.0","@smithy/util-body-length-node":"^4.1.0","@smithy/util-defaults-mode-browser":"^4.1.1","@smithy/util-defaults-mode-node":"^4.1.1","@smithy/util-endpoints":"^3.1.1","@smithy/util-middleware":"^4.1.1","@smithy/util-retry":"^4.1.1","@smithy/util-utf8":"^4.1.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-codedeploy","description":"AWS SDK for JavaScript Codedeploy Client for Node.js, Browser and React Native","version":"3.921.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-codedeploy","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo codedeploy"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.921.0","@aws-sdk/credential-provider-node":"3.921.0","@aws-sdk/middleware-host-header":"3.921.0","@aws-sdk/middleware-logger":"3.921.0","@aws-sdk/middleware-recursion-detection":"3.921.0","@aws-sdk/middleware-user-agent":"3.921.0","@aws-sdk/region-config-resolver":"3.921.0","@aws-sdk/types":"3.921.0","@aws-sdk/util-endpoints":"3.921.0","@aws-sdk/util-user-agent-browser":"3.921.0","@aws-sdk/util-user-agent-node":"3.921.0","@smithy/config-resolver":"^4.4.1","@smithy/core":"^3.17.2","@smithy/fetch-http-handler":"^5.3.5","@smithy/hash-node":"^4.2.4","@smithy/invalid-dependency":"^4.2.4","@smithy/middleware-content-length":"^4.2.4","@smithy/middleware-endpoint":"^4.3.6","@smithy/middleware-retry":"^4.4.6","@smithy/middleware-serde":"^4.2.4","@smithy/middleware-stack":"^4.2.4","@smithy/node-config-provider":"^4.3.4","@smithy/node-http-handler":"^4.4.4","@smithy/protocol-http":"^5.3.4","@smithy/smithy-client":"^4.9.2","@smithy/types":"^4.8.1","@smithy/url-parser":"^4.2.4","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.5","@smithy/util-defaults-mode-node":"^4.2.7","@smithy/util-endpoints":"^3.2.4","@smithy/util-middleware":"^4.2.4","@smithy/util-retry":"^4.2.4","@smithy/util-utf8":"^4.2.0","@smithy/util-waiter":"^4.2.4","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-codedeploy","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-codedeploy"}}'); /***/ }), -/***/ 51194: +/***/ 1194: /***/ ((module) => { "use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-ecs","description":"AWS SDK for JavaScript Ecs Client for Node.js, Browser and React Native","version":"3.888.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-ecs","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo ecs"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.888.0","@aws-sdk/credential-provider-node":"3.888.0","@aws-sdk/middleware-host-header":"3.887.0","@aws-sdk/middleware-logger":"3.887.0","@aws-sdk/middleware-recursion-detection":"3.887.0","@aws-sdk/middleware-user-agent":"3.888.0","@aws-sdk/region-config-resolver":"3.887.0","@aws-sdk/types":"3.887.0","@aws-sdk/util-endpoints":"3.887.0","@aws-sdk/util-user-agent-browser":"3.887.0","@aws-sdk/util-user-agent-node":"3.888.0","@smithy/config-resolver":"^4.2.1","@smithy/core":"^3.11.0","@smithy/fetch-http-handler":"^5.2.1","@smithy/hash-node":"^4.1.1","@smithy/invalid-dependency":"^4.1.1","@smithy/middleware-content-length":"^4.1.1","@smithy/middleware-endpoint":"^4.2.1","@smithy/middleware-retry":"^4.2.1","@smithy/middleware-serde":"^4.1.1","@smithy/middleware-stack":"^4.1.1","@smithy/node-config-provider":"^4.2.1","@smithy/node-http-handler":"^4.2.1","@smithy/protocol-http":"^5.2.1","@smithy/smithy-client":"^4.6.1","@smithy/types":"^4.5.0","@smithy/url-parser":"^4.1.1","@smithy/util-base64":"^4.1.0","@smithy/util-body-length-browser":"^4.1.0","@smithy/util-body-length-node":"^4.1.0","@smithy/util-defaults-mode-browser":"^4.1.1","@smithy/util-defaults-mode-node":"^4.1.1","@smithy/util-endpoints":"^3.1.1","@smithy/util-middleware":"^4.1.1","@smithy/util-retry":"^4.1.1","@smithy/util-utf8":"^4.1.0","@smithy/util-waiter":"^4.1.1","@types/uuid":"^9.0.1","tslib":"^2.6.2","uuid":"^9.0.1"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-ecs","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-ecs"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-ecs","description":"AWS SDK for JavaScript Ecs Client for Node.js, Browser and React Native","version":"3.921.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-ecs","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo ecs"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.921.0","@aws-sdk/credential-provider-node":"3.921.0","@aws-sdk/middleware-host-header":"3.921.0","@aws-sdk/middleware-logger":"3.921.0","@aws-sdk/middleware-recursion-detection":"3.921.0","@aws-sdk/middleware-user-agent":"3.921.0","@aws-sdk/region-config-resolver":"3.921.0","@aws-sdk/types":"3.921.0","@aws-sdk/util-endpoints":"3.921.0","@aws-sdk/util-user-agent-browser":"3.921.0","@aws-sdk/util-user-agent-node":"3.921.0","@smithy/config-resolver":"^4.4.1","@smithy/core":"^3.17.2","@smithy/fetch-http-handler":"^5.3.5","@smithy/hash-node":"^4.2.4","@smithy/invalid-dependency":"^4.2.4","@smithy/middleware-content-length":"^4.2.4","@smithy/middleware-endpoint":"^4.3.6","@smithy/middleware-retry":"^4.4.6","@smithy/middleware-serde":"^4.2.4","@smithy/middleware-stack":"^4.2.4","@smithy/node-config-provider":"^4.3.4","@smithy/node-http-handler":"^4.4.4","@smithy/protocol-http":"^5.3.4","@smithy/smithy-client":"^4.9.2","@smithy/types":"^4.8.1","@smithy/url-parser":"^4.2.4","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.5","@smithy/util-defaults-mode-node":"^4.2.7","@smithy/util-endpoints":"^3.2.4","@smithy/util-middleware":"^4.2.4","@smithy/util-retry":"^4.2.4","@smithy/util-utf8":"^4.2.0","@smithy/util-waiter":"^4.2.4","@smithy/uuid":"^1.1.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-ecs","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-ecs"}}'); /***/ }) @@ -96321,7 +65078,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-ecs","descrip /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module is referenced by other modules so it can't be inlined -/******/ var __webpack_exports__ = __nccwpck_require__(46136); +/******/ var __webpack_exports__ = __nccwpck_require__(6136); /******/ module.exports = __webpack_exports__; /******/ /******/ })() diff --git a/package-lock.json b/package-lock.json index 05afce0c..671fe62a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@actions/core": "^1.10.1", "@aws-sdk/client-codedeploy": "^3.913.0", - "@aws-sdk/client-ecs": "^3.883.0", + "@aws-sdk/client-ecs": "^3.908.0", "yaml": "^2.8.1" }, "devDependencies": { @@ -26,6 +26,7 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz", "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==", + "license": "MIT", "dependencies": { "@actions/exec": "^1.1.1", "@actions/http-client": "^2.0.1" @@ -35,6 +36,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", + "license": "MIT", "dependencies": { "@actions/io": "^1.0.1" } @@ -43,6 +45,7 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", + "license": "MIT", "dependencies": { "tunnel": "^0.0.6", "undici": "^5.25.4" @@ -51,26 +54,14 @@ "node_modules/@actions/io": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", - "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==" - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } + "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==", + "license": "MIT" }, "node_modules/@aws-crypto/sha256-browser": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", + "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-js": "^5.2.0", "@aws-crypto/supports-web-crypto": "^5.2.0", @@ -85,6 +76,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -96,6 +88,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" @@ -108,6 +101,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "license": "Apache-2.0", "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" @@ -120,6 +114,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", + "license": "Apache-2.0", "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", @@ -133,6 +128,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", + "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" } @@ -141,6 +137,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", + "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "^3.222.0", "@smithy/util-utf8": "^2.0.0", @@ -151,6 +148,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -162,6 +160,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" @@ -174,6 +173,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "license": "Apache-2.0", "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" @@ -183,330 +183,498 @@ } }, "node_modules/@aws-sdk/client-codedeploy": { - "version": "3.913.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-codedeploy/-/client-codedeploy-3.913.0.tgz", - "integrity": "sha512-go4Vv8uAPtWVJgCoKxF81Xp8qHkdNg5wQRFVIxF8yg7yjFk/Xo0c08LuDAtlJ/+QR4ZNWXK/eXgBJocZsTGkCQ==", + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-codedeploy/-/client-codedeploy-3.921.0.tgz", + "integrity": "sha512-gFWVG4QDmxLo1GrJjJfr/3HuLEQcLrWkBrcSo4m3vRdhig35zL+pVSdw94xUgkZ+BEhbupnojSqWRwDioUTD5A==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.911.0", - "@aws-sdk/credential-provider-node": "3.913.0", - "@aws-sdk/middleware-host-header": "3.910.0", - "@aws-sdk/middleware-logger": "3.910.0", - "@aws-sdk/middleware-recursion-detection": "3.910.0", - "@aws-sdk/middleware-user-agent": "3.911.0", - "@aws-sdk/region-config-resolver": "3.910.0", - "@aws-sdk/types": "3.910.0", - "@aws-sdk/util-endpoints": "3.910.0", - "@aws-sdk/util-user-agent-browser": "3.910.0", - "@aws-sdk/util-user-agent-node": "3.911.0", - "@smithy/config-resolver": "^4.3.2", - "@smithy/core": "^3.16.1", - "@smithy/fetch-http-handler": "^5.3.3", - "@smithy/hash-node": "^4.2.2", - "@smithy/invalid-dependency": "^4.2.2", - "@smithy/middleware-content-length": "^4.2.2", - "@smithy/middleware-endpoint": "^4.3.3", - "@smithy/middleware-retry": "^4.4.3", - "@smithy/middleware-serde": "^4.2.2", - "@smithy/middleware-stack": "^4.2.2", - "@smithy/node-config-provider": "^4.3.2", - "@smithy/node-http-handler": "^4.4.1", - "@smithy/protocol-http": "^5.3.2", - "@smithy/smithy-client": "^4.8.1", - "@smithy/types": "^4.7.1", - "@smithy/url-parser": "^4.2.2", + "@aws-sdk/core": "3.921.0", + "@aws-sdk/credential-provider-node": "3.921.0", + "@aws-sdk/middleware-host-header": "3.921.0", + "@aws-sdk/middleware-logger": "3.921.0", + "@aws-sdk/middleware-recursion-detection": "3.921.0", + "@aws-sdk/middleware-user-agent": "3.921.0", + "@aws-sdk/region-config-resolver": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@aws-sdk/util-endpoints": "3.921.0", + "@aws-sdk/util-user-agent-browser": "3.921.0", + "@aws-sdk/util-user-agent-node": "3.921.0", + "@smithy/config-resolver": "^4.4.1", + "@smithy/core": "^3.17.2", + "@smithy/fetch-http-handler": "^5.3.5", + "@smithy/hash-node": "^4.2.4", + "@smithy/invalid-dependency": "^4.2.4", + "@smithy/middleware-content-length": "^4.2.4", + "@smithy/middleware-endpoint": "^4.3.6", + "@smithy/middleware-retry": "^4.4.6", + "@smithy/middleware-serde": "^4.2.4", + "@smithy/middleware-stack": "^4.2.4", + "@smithy/node-config-provider": "^4.3.4", + "@smithy/node-http-handler": "^4.4.4", + "@smithy/protocol-http": "^5.3.4", + "@smithy/smithy-client": "^4.9.2", + "@smithy/types": "^4.8.1", + "@smithy/url-parser": "^4.2.4", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", - "@smithy/util-defaults-mode-browser": "^4.3.2", - "@smithy/util-defaults-mode-node": "^4.2.3", - "@smithy/util-endpoints": "^3.2.2", - "@smithy/util-middleware": "^4.2.2", - "@smithy/util-retry": "^4.2.2", + "@smithy/util-defaults-mode-browser": "^4.3.5", + "@smithy/util-defaults-mode-node": "^4.2.7", + "@smithy/util-endpoints": "^3.2.4", + "@smithy/util-middleware": "^4.2.4", + "@smithy/util-retry": "^4.2.4", "@smithy/util-utf8": "^4.2.0", - "@smithy/util-waiter": "^4.2.2", + "@smithy/util-waiter": "^4.2.4", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/abort-controller": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.3.tgz", - "integrity": "sha512-xWL9Mf8b7tIFuAlpjKtRPnHrR8XVrwTj5NPYO/QwZPtc0SDLsPxb56V5tzi5yspSMytISHybifez+4jlrx0vkQ==", + "node_modules/@aws-sdk/client-ecs": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-ecs/-/client-ecs-3.921.0.tgz", + "integrity": "sha512-1iq65lNlsMj+4m6fJFUX7+q1orsnvizLwyzbv69inrwFTlngHLCIiiqYrwpYQKoTqx9sAFsRVCxsQJ5LyiFisg==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.921.0", + "@aws-sdk/credential-provider-node": "3.921.0", + "@aws-sdk/middleware-host-header": "3.921.0", + "@aws-sdk/middleware-logger": "3.921.0", + "@aws-sdk/middleware-recursion-detection": "3.921.0", + "@aws-sdk/middleware-user-agent": "3.921.0", + "@aws-sdk/region-config-resolver": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@aws-sdk/util-endpoints": "3.921.0", + "@aws-sdk/util-user-agent-browser": "3.921.0", + "@aws-sdk/util-user-agent-node": "3.921.0", + "@smithy/config-resolver": "^4.4.1", + "@smithy/core": "^3.17.2", + "@smithy/fetch-http-handler": "^5.3.5", + "@smithy/hash-node": "^4.2.4", + "@smithy/invalid-dependency": "^4.2.4", + "@smithy/middleware-content-length": "^4.2.4", + "@smithy/middleware-endpoint": "^4.3.6", + "@smithy/middleware-retry": "^4.4.6", + "@smithy/middleware-serde": "^4.2.4", + "@smithy/middleware-stack": "^4.2.4", + "@smithy/node-config-provider": "^4.3.4", + "@smithy/node-http-handler": "^4.4.4", + "@smithy/protocol-http": "^5.3.4", + "@smithy/smithy-client": "^4.9.2", + "@smithy/types": "^4.8.1", + "@smithy/url-parser": "^4.2.4", + "@smithy/util-base64": "^4.3.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.1", + "@smithy/util-defaults-mode-browser": "^4.3.5", + "@smithy/util-defaults-mode-node": "^4.2.7", + "@smithy/util-endpoints": "^3.2.4", + "@smithy/util-middleware": "^4.2.4", + "@smithy/util-retry": "^4.2.4", + "@smithy/util-utf8": "^4.2.0", + "@smithy/util-waiter": "^4.2.4", + "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/core": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.17.0.tgz", - "integrity": "sha512-Tir3DbfoTO97fEGUZjzGeoXgcQAUBRDTmuH9A8lxuP8ATrgezrAJ6cLuRvwdKN4ZbYNlHgKlBX69Hyu3THYhtg==", + "node_modules/@aws-sdk/client-sso": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.921.0.tgz", + "integrity": "sha512-qWyT7WikdkPRAMuWidZ2l8jcQAPwNjvLcFZ/8K+oCAaMLt0LKLd7qeTwZ5tZFNqRNPXKfE8MkvAjyqSpE3i2yg==", "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-serde": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.921.0", + "@aws-sdk/middleware-host-header": "3.921.0", + "@aws-sdk/middleware-logger": "3.921.0", + "@aws-sdk/middleware-recursion-detection": "3.921.0", + "@aws-sdk/middleware-user-agent": "3.921.0", + "@aws-sdk/region-config-resolver": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@aws-sdk/util-endpoints": "3.921.0", + "@aws-sdk/util-user-agent-browser": "3.921.0", + "@aws-sdk/util-user-agent-node": "3.921.0", + "@smithy/config-resolver": "^4.4.1", + "@smithy/core": "^3.17.2", + "@smithy/fetch-http-handler": "^5.3.5", + "@smithy/hash-node": "^4.2.4", + "@smithy/invalid-dependency": "^4.2.4", + "@smithy/middleware-content-length": "^4.2.4", + "@smithy/middleware-endpoint": "^4.3.6", + "@smithy/middleware-retry": "^4.4.6", + "@smithy/middleware-serde": "^4.2.4", + "@smithy/middleware-stack": "^4.2.4", + "@smithy/node-config-provider": "^4.3.4", + "@smithy/node-http-handler": "^4.4.4", + "@smithy/protocol-http": "^5.3.4", + "@smithy/smithy-client": "^4.9.2", + "@smithy/types": "^4.8.1", + "@smithy/url-parser": "^4.2.4", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", - "@smithy/util-middleware": "^4.2.3", - "@smithy/util-stream": "^4.5.3", + "@smithy/util-body-length-node": "^4.2.1", + "@smithy/util-defaults-mode-browser": "^4.3.5", + "@smithy/util-defaults-mode-node": "^4.2.7", + "@smithy/util-endpoints": "^3.2.4", + "@smithy/util-middleware": "^4.2.4", + "@smithy/util-retry": "^4.2.4", "@smithy/util-utf8": "^4.2.0", - "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/fetch-http-handler": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.4.tgz", - "integrity": "sha512-bwigPylvivpRLCm+YK9I5wRIYjFESSVwl8JQ1vVx/XhCw0PtCi558NwTnT2DaVCl5pYlImGuQTSwMsZ+pIavRw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", + "node_modules/@aws-sdk/core": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.921.0.tgz", + "integrity": "sha512-1eiD9ZO9cvEHdQUn/pwJVGN9LXg6D0O7knGVA0TA/v7nFSYy0n8RYG8vdnlcoYYnV1BcHgaf4KmRVMOszafNZQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.921.0", + "@aws-sdk/xml-builder": "3.921.0", + "@smithy/core": "^3.17.2", + "@smithy/node-config-provider": "^4.3.4", + "@smithy/property-provider": "^4.2.4", + "@smithy/protocol-http": "^5.3.4", + "@smithy/signature-v4": "^5.3.4", + "@smithy/smithy-client": "^4.9.2", + "@smithy/types": "^4.8.1", "@smithy/util-base64": "^4.3.0", + "@smithy/util-middleware": "^4.2.4", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/is-array-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz", - "integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==", + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.921.0.tgz", + "integrity": "sha512-RGG+zZdOYGJBQ8+L7BI6v41opoF8knErMtBZAUGcD3gvWEhjatc7lSbIpBeYWbTaWPPLHQU+ZVbmQ/jRLBgefw==", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/core": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@smithy/property-provider": "^4.2.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/middleware-endpoint": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.3.4.tgz", - "integrity": "sha512-/RJhpYkMOaUZoJEkddamGPPIYeKICKXOu/ojhn85dKDM0n5iDIhjvYAQLP3K5FPhgB203O3GpWzoK2OehEoIUw==", + "node_modules/@aws-sdk/credential-provider-http": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.921.0.tgz", + "integrity": "sha512-TAv08Ow0oF/olV4DTLoPDj46KMk35bL1IUCfToESDrWk1TOSur7d4sCL0p/7dUsAxS244cEgeyIIijKNtxj2AA==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.17.0", - "@smithy/middleware-serde": "^4.2.3", - "@smithy/node-config-provider": "^4.3.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", - "@smithy/url-parser": "^4.2.3", - "@smithy/util-middleware": "^4.2.3", + "@aws-sdk/core": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@smithy/fetch-http-handler": "^5.3.5", + "@smithy/node-http-handler": "^4.4.4", + "@smithy/property-provider": "^4.2.4", + "@smithy/protocol-http": "^5.3.4", + "@smithy/smithy-client": "^4.9.2", + "@smithy/types": "^4.8.1", + "@smithy/util-stream": "^4.5.5", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/middleware-serde": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.3.tgz", - "integrity": "sha512-8g4NuUINpYccxiCXM5s1/V+uLtts8NcX4+sPEbvYQDZk4XoJfDpq5y2FQxfmUL89syoldpzNzA0R9nhzdtdKnQ==", + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.921.0.tgz", + "integrity": "sha512-MUSRYGiMRq5NRGPRgJ7Nuh7GqXzE9iteAwdbzMJ4pnImgr7CjeWDihCIGk+gKLSG+NoRVVJM0V9PA4rxFir0Pg==", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/core": "3.921.0", + "@aws-sdk/credential-provider-env": "3.921.0", + "@aws-sdk/credential-provider-http": "3.921.0", + "@aws-sdk/credential-provider-process": "3.921.0", + "@aws-sdk/credential-provider-sso": "3.921.0", + "@aws-sdk/credential-provider-web-identity": "3.921.0", + "@aws-sdk/nested-clients": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@smithy/credential-provider-imds": "^4.2.4", + "@smithy/property-provider": "^4.2.4", + "@smithy/shared-ini-file-loader": "^4.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/middleware-stack": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.3.tgz", - "integrity": "sha512-iGuOJkH71faPNgOj/gWuEGS6xvQashpLwWB1HjHq1lNNiVfbiJLpZVbhddPuDbx9l4Cgl0vPLq5ltRfSaHfspA==", + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.921.0.tgz", + "integrity": "sha512-bxUAqRyo49WzKWn/XS0d8QXT9GydY/ew5m58PYfSMwYfmwBZXx1GLSWe3tZnefm6santFiqmIWfMmeRWdygKmQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@aws-sdk/credential-provider-env": "3.921.0", + "@aws-sdk/credential-provider-http": "3.921.0", + "@aws-sdk/credential-provider-ini": "3.921.0", + "@aws-sdk/credential-provider-process": "3.921.0", + "@aws-sdk/credential-provider-sso": "3.921.0", + "@aws-sdk/credential-provider-web-identity": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@smithy/credential-provider-imds": "^4.2.4", + "@smithy/property-provider": "^4.2.4", + "@smithy/shared-ini-file-loader": "^4.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/node-config-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.3.tgz", - "integrity": "sha512-NzI1eBpBSViOav8NVy1fqOlSfkLgkUjUTlohUSgAEhHaFWA3XJiLditvavIP7OpvTjDp5u2LhtlBhkBlEisMwA==", + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.921.0.tgz", + "integrity": "sha512-DM62ooWI/aZ+ENBcLszuKmOkiICf6p4vYO2HgA3Cy2OEsTsjb67NEcntksxpZkD3mSIrCy/Qi4Z7tc77gle2Nw==", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/core": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@smithy/property-provider": "^4.2.4", + "@smithy/shared-ini-file-loader": "^4.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/node-http-handler": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.2.tgz", - "integrity": "sha512-MHFvTjts24cjGo1byXqhXrbqm7uznFD/ESFx8npHMWTFQVdBZjrT1hKottmp69LBTRm/JQzP/sn1vPt0/r6AYQ==", + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.921.0.tgz", + "integrity": "sha512-Nh5jPJ6Y6nu3cHzZnq394lGXE5YO8Szke5zlATbNI7Tl0QJR65GE0IZsBcjzRMGpYX6ENCqPDK8FmklkmCYyVQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/abort-controller": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/client-sso": "3.921.0", + "@aws-sdk/core": "3.921.0", + "@aws-sdk/token-providers": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@smithy/property-provider": "^4.2.4", + "@smithy/shared-ini-file-loader": "^4.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.921.0.tgz", + "integrity": "sha512-VWcbgB2/shPPK674roHV4s8biCtvn0P/05EbTqy9WeyM5Oblx291gRGccyDhQbJbOL/6diRPBM08tlKPlBKNfw==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@aws-sdk/core": "3.921.0", + "@aws-sdk/nested-clients": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@smithy/property-provider": "^4.2.4", + "@smithy/shared-ini-file-loader": "^4.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/protocol-http": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.3.tgz", - "integrity": "sha512-Mn7f/1aN2/jecywDcRDvWWWJF4uwg/A0XjFMJtj72DsgHTByfjRltSqcT9NyE9RTdBSN6X1RSXrhn/YWQl8xlw==", + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.921.0.tgz", + "integrity": "sha512-eX1Ka29XzuEcXG4YABTwyLtPLchjmcjSjaq4irKJTFkxSYzX7gjoKt18rh/ZzOWOSqi23+cpjvBacL4VBKvE2Q==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@aws-sdk/types": "3.921.0", + "@smithy/protocol-http": "^5.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/querystring-builder": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.3.tgz", - "integrity": "sha512-LOVCGCmwMahYUM/P0YnU/AlDQFjcu+gWbFJooC417QRB/lDJlWSn8qmPSDp+s4YVAHOgtgbNG4sR+SxF/VOcJQ==", + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.921.0.tgz", + "integrity": "sha512-14Qqp8wisKGj/2Y22OfO5jTBG5Xez+p3Zr2piAtz7AcbY8vBEoZbd6f+9lwwVFC73Aobkau223wzKbGT8HYQMw==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", - "@smithy/util-uri-escape": "^4.2.0", + "@aws-sdk/types": "3.921.0", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/querystring-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.3.tgz", - "integrity": "sha512-cYlSNHcTAX/wc1rpblli3aUlLMGgKZ/Oqn8hhjFASXMCXjIqeuQBei0cnq2JR8t4RtU9FpG6uyl6PxyArTiwKA==", + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.921.0.tgz", + "integrity": "sha512-MYU5oI2b97M7u1dC1nt7SiGEvvLrQDlzV6hq9CB5TYX2glgbyvkaS//1Tjm87VF6qVSf5jYfwFDPeFGd8O1NrQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@aws-sdk/types": "3.921.0", + "@aws/lambda-invoke-store": "^0.1.1", + "@smithy/protocol-http": "^5.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.921.0.tgz", + "integrity": "sha512-gXgokMBTPZAbQMm1+JOxItqA81aSFK6n7V2mAwxdmHjzCUZacX5RzkVPNbSaPPgDkroYnIzK09EusIpM6dLaqw==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@aws-sdk/core": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@aws-sdk/util-endpoints": "3.921.0", + "@smithy/core": "^3.17.2", + "@smithy/protocol-http": "^5.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "node_modules/@aws-sdk/nested-clients": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.921.0.tgz", + "integrity": "sha512-GV9aV8WqH/EWo4x3T5BrYb2ph1yfYuzUXZc0hhvxbFbDKD8m2fX9menao3Mgm7E5C68Su392u+MD9SGmGCmfKQ==", "license": "Apache-2.0", "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.921.0", + "@aws-sdk/middleware-host-header": "3.921.0", + "@aws-sdk/middleware-logger": "3.921.0", + "@aws-sdk/middleware-recursion-detection": "3.921.0", + "@aws-sdk/middleware-user-agent": "3.921.0", + "@aws-sdk/region-config-resolver": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@aws-sdk/util-endpoints": "3.921.0", + "@aws-sdk/util-user-agent-browser": "3.921.0", + "@aws-sdk/util-user-agent-node": "3.921.0", + "@smithy/config-resolver": "^4.4.1", + "@smithy/core": "^3.17.2", + "@smithy/fetch-http-handler": "^5.3.5", + "@smithy/hash-node": "^4.2.4", + "@smithy/invalid-dependency": "^4.2.4", + "@smithy/middleware-content-length": "^4.2.4", + "@smithy/middleware-endpoint": "^4.3.6", + "@smithy/middleware-retry": "^4.4.6", + "@smithy/middleware-serde": "^4.2.4", + "@smithy/middleware-stack": "^4.2.4", + "@smithy/node-config-provider": "^4.3.4", + "@smithy/node-http-handler": "^4.4.4", + "@smithy/protocol-http": "^5.3.4", + "@smithy/smithy-client": "^4.9.2", + "@smithy/types": "^4.8.1", + "@smithy/url-parser": "^4.2.4", + "@smithy/util-base64": "^4.3.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.1", + "@smithy/util-defaults-mode-browser": "^4.3.5", + "@smithy/util-defaults-mode-node": "^4.2.7", + "@smithy/util-endpoints": "^3.2.4", + "@smithy/util-middleware": "^4.2.4", + "@smithy/util-retry": "^4.2.4", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/url-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.3.tgz", - "integrity": "sha512-I066AigYvY3d9VlU3zG9XzZg1yT10aNqvCaBTw9EPgu5GrsEl1aUkcMvhkIXascYH1A8W0LQo3B1Kr1cJNcQEw==", + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.921.0.tgz", + "integrity": "sha512-cSycw4wXcvsrssUdcEaeYQhQcZYVsBwHtgATh9HcIm01PrMV0lV71vcoyZ+9vUhwHwchRT6dItAyTHSQxwjvjg==", "license": "Apache-2.0", "dependencies": { - "@smithy/querystring-parser": "^4.2.3", - "@smithy/types": "^4.8.0", + "@aws-sdk/types": "3.921.0", + "@smithy/config-resolver": "^4.4.1", + "@smithy/node-config-provider": "^4.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/util-base64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.3.0.tgz", - "integrity": "sha512-GkXZ59JfyxsIwNTWFnjmFEI8kZpRNIBfxKjv09+nkAWPt/4aGaEWMM04m4sxgNVWkbt2MdSvE3KF/PfX4nFedQ==", + "node_modules/@aws-sdk/token-providers": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.921.0.tgz", + "integrity": "sha512-d+w6X7ykqXirFBF+dYyK5Ntw0KmO2sgMj+JLR/vAe1vaR8/Fuqs3yOAFU7yNEzpcnbLJmMznxKpht03CSEMh4Q==", "license": "Apache-2.0", "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", + "@aws-sdk/core": "3.921.0", + "@aws-sdk/nested-clients": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@smithy/property-provider": "^4.2.4", + "@smithy/shared-ini-file-loader": "^4.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/util-body-length-browser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.2.0.tgz", - "integrity": "sha512-Fkoh/I76szMKJnBXWPdFkQJl2r9SjPt3cMzLdOB6eJ4Pnpas8hVoWPYemX/peO0yrrvldgCUVJqOAjUrOLjbxg==", + "node_modules/@aws-sdk/types": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.921.0.tgz", + "integrity": "sha512-mqEG8+vFh5w0ZZC+R8VCOdSk998Hy93pIDuwYpfMAWgYwVhFaIMOLn1fZw0w2DhTs5+ONHHwMJ6uVXtuuqOLQQ==", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/util-buffer-from": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz", - "integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==", + "node_modules/@aws-sdk/util-endpoints": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.921.0.tgz", + "integrity": "sha512-kuJYRqug6V8gOg401BuK4w4IAVO3575VDR8iYiFw0gPwNIfOXvdlChfsJQoREqwJfif45J4eSmUsFtMfx87BQg==", "license": "Apache-2.0", "dependencies": { - "@smithy/is-array-buffer": "^4.2.0", + "@aws-sdk/types": "3.921.0", + "@smithy/types": "^4.8.1", + "@smithy/url-parser": "^4.2.4", + "@smithy/util-endpoints": "^3.2.4", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/util-hex-encoding": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.0.tgz", - "integrity": "sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw==", + "node_modules/@aws-sdk/util-locate-window": { + "version": "3.893.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.893.0.tgz", + "integrity": "sha512-T89pFfgat6c8nMmpI8eKjBcDcgJq36+m9oiXbcUzeU55MP9ZuGgBomGjGnHaEyF36jenW9gmg3NfZDm0AO2XPg==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -515,3404 +683,222 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/util-middleware": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.3.tgz", - "integrity": "sha512-v5ObKlSe8PWUHCqEiX2fy1gNv6goiw6E5I/PN2aXg3Fb/hse0xeaAnSpXDiWl7x6LamVKq7senB+m5LOYHUAHw==", + "node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.921.0.tgz", + "integrity": "sha512-buhv/ICWr4Nt8bquHOejCiVikBsfEYw4/HSc9U050QebRXIakt50zKYaWDQw4iCMeeqCiwE9mElEaXJAysythg==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@aws-sdk/types": "3.921.0", + "@smithy/types": "^4.8.1", + "bowser": "^2.11.0", "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/util-stream": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.3.tgz", - "integrity": "sha512-oZvn8a5bwwQBNYHT2eNo0EU8Kkby3jeIg1P2Lu9EQtqDxki1LIjGRJM6dJ5CZUig8QmLxWxqOKWvg3mVoOBs5A==", + "node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.921.0.tgz", + "integrity": "sha512-Ilftai6AMAU1cEaUqIiTxkyj1NupLhP9Eq8HRfVuIH8489J2wLCcOyiLklAgSzBNmrxW+fagxkY+Dg0lFwmcVA==", "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^5.3.4", - "@smithy/node-http-handler": "^4.4.2", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-buffer-from": "^4.2.0", - "@smithy/util-hex-encoding": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", + "@aws-sdk/middleware-user-agent": "3.921.0", + "@aws-sdk/types": "3.921.0", + "@smithy/node-config-provider": "^4.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/util-uri-escape": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.0.tgz", - "integrity": "sha512-igZpCKV9+E/Mzrpq6YacdTQ0qTiLm85gD6N/IrmyDvQFA4UnU3d5g3m8tMT/6zG/vVkWSU+VxeUyGonL62DuxA==", + "node_modules/@aws-sdk/xml-builder": { + "version": "3.921.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.921.0.tgz", + "integrity": "sha512-LVHg0jgjyicKKvpNIEMXIMr1EBViESxcPkqfOlT+X1FkmUMTNZEEVF18tOJg4m4hV5vxtkWcqtr4IEeWa1C41Q==", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^4.8.1", + "fast-xml-parser": "5.2.5", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/util-utf8": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz", - "integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==", + "node_modules/@aws/lambda-invoke-store": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.1.1.tgz", + "integrity": "sha512-RcLam17LdlbSOSp9VxmUu1eI6Mwxp+OwhD2QhiSNmNCzoDb0EeUXTD2n/WbcnrAYMGlmf05th6QYq23VqvJqpA==", "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "tslib": "^2.6.2" - }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-ecs": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-ecs/-/client-ecs-3.888.0.tgz", - "integrity": "sha512-mj1yI5/eVkofd5kt1GtKukFG5QFlFMI4V+TgXJf62vAVCGCUTlJCUxLovfuORi5WPiN1d91Eco2NHG2qMv8fqA==", - "license": "Apache-2.0", + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dev": true, + "license": "MIT", "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.888.0", - "@aws-sdk/credential-provider-node": "3.888.0", - "@aws-sdk/middleware-host-header": "3.887.0", - "@aws-sdk/middleware-logger": "3.887.0", - "@aws-sdk/middleware-recursion-detection": "3.887.0", - "@aws-sdk/middleware-user-agent": "3.888.0", - "@aws-sdk/region-config-resolver": "3.887.0", - "@aws-sdk/types": "3.887.0", - "@aws-sdk/util-endpoints": "3.887.0", - "@aws-sdk/util-user-agent-browser": "3.887.0", - "@aws-sdk/util-user-agent-node": "3.888.0", - "@smithy/config-resolver": "^4.2.1", - "@smithy/core": "^3.11.0", - "@smithy/fetch-http-handler": "^5.2.1", - "@smithy/hash-node": "^4.1.1", - "@smithy/invalid-dependency": "^4.1.1", - "@smithy/middleware-content-length": "^4.1.1", - "@smithy/middleware-endpoint": "^4.2.1", - "@smithy/middleware-retry": "^4.2.1", - "@smithy/middleware-serde": "^4.1.1", - "@smithy/middleware-stack": "^4.1.1", - "@smithy/node-config-provider": "^4.2.1", - "@smithy/node-http-handler": "^4.2.1", - "@smithy/protocol-http": "^5.2.1", - "@smithy/smithy-client": "^4.6.1", - "@smithy/types": "^4.5.0", - "@smithy/url-parser": "^4.1.1", - "@smithy/util-base64": "^4.1.0", - "@smithy/util-body-length-browser": "^4.1.0", - "@smithy/util-body-length-node": "^4.1.0", - "@smithy/util-defaults-mode-browser": "^4.1.1", - "@smithy/util-defaults-mode-node": "^4.1.1", - "@smithy/util-endpoints": "^3.1.1", - "@smithy/util-middleware": "^4.1.1", - "@smithy/util-retry": "^4.1.1", - "@smithy/util-utf8": "^4.1.0", - "@smithy/util-waiter": "^4.1.1", - "@types/uuid": "^9.0.1", - "tslib": "^2.6.2", - "uuid": "^9.0.1" + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, "engines": { - "node": ">=18.0.0" + "node": ">=6.9.0" } }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/client-sso": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.888.0.tgz", - "integrity": "sha512-8CLy/ehGKUmekjH+VtZJ4w40PqDg3u0K7uPziq/4P8Q7LLgsy8YQoHNbuY4am7JU3HWrqLXJI9aaz1+vPGPoWA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.888.0", - "@aws-sdk/middleware-host-header": "3.887.0", - "@aws-sdk/middleware-logger": "3.887.0", - "@aws-sdk/middleware-recursion-detection": "3.887.0", - "@aws-sdk/middleware-user-agent": "3.888.0", - "@aws-sdk/region-config-resolver": "3.887.0", - "@aws-sdk/types": "3.887.0", - "@aws-sdk/util-endpoints": "3.887.0", - "@aws-sdk/util-user-agent-browser": "3.887.0", - "@aws-sdk/util-user-agent-node": "3.888.0", - "@smithy/config-resolver": "^4.2.1", - "@smithy/core": "^3.11.0", - "@smithy/fetch-http-handler": "^5.2.1", - "@smithy/hash-node": "^4.1.1", - "@smithy/invalid-dependency": "^4.1.1", - "@smithy/middleware-content-length": "^4.1.1", - "@smithy/middleware-endpoint": "^4.2.1", - "@smithy/middleware-retry": "^4.2.1", - "@smithy/middleware-serde": "^4.1.1", - "@smithy/middleware-stack": "^4.1.1", - "@smithy/node-config-provider": "^4.2.1", - "@smithy/node-http-handler": "^4.2.1", - "@smithy/protocol-http": "^5.2.1", - "@smithy/smithy-client": "^4.6.1", - "@smithy/types": "^4.5.0", - "@smithy/url-parser": "^4.1.1", - "@smithy/util-base64": "^4.1.0", - "@smithy/util-body-length-browser": "^4.1.0", - "@smithy/util-body-length-node": "^4.1.0", - "@smithy/util-defaults-mode-browser": "^4.1.1", - "@smithy/util-defaults-mode-node": "^4.1.1", - "@smithy/util-endpoints": "^3.1.1", - "@smithy/util-middleware": "^4.1.1", - "@smithy/util-retry": "^4.1.1", - "@smithy/util-utf8": "^4.1.0", - "tslib": "^2.6.2" - }, + "node_modules/@babel/compat-data": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", + "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=18.0.0" + "node": ">=6.9.0" } }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/core": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.888.0.tgz", - "integrity": "sha512-L3S2FZywACo4lmWv37Y4TbefuPJ1fXWyWwIJ3J4wkPYFJ47mmtUPqThlVrSbdTHkEjnZgJe5cRfxk0qCLsFh1w==", - "license": "Apache-2.0", + "node_modules/@babel/core": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", + "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", + "dev": true, + "license": "MIT", + "peer": true, "dependencies": { - "@aws-sdk/types": "3.887.0", - "@aws-sdk/xml-builder": "3.887.0", - "@smithy/core": "^3.11.0", - "@smithy/node-config-provider": "^4.2.1", - "@smithy/property-provider": "^4.0.5", - "@smithy/protocol-http": "^5.2.1", - "@smithy/signature-v4": "^5.1.3", - "@smithy/smithy-client": "^4.6.1", - "@smithy/types": "^4.5.0", - "@smithy/util-base64": "^4.1.0", - "@smithy/util-body-length-browser": "^4.1.0", - "@smithy/util-middleware": "^4.1.1", - "@smithy/util-utf8": "^4.1.0", - "fast-xml-parser": "5.2.5", - "tslib": "^2.6.2" + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.5", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.4", + "@babel/parser": "^7.28.5", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { - "node": ">=18.0.0" + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" } }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/credential-provider-env": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.888.0.tgz", - "integrity": "sha512-shPi4AhUKbIk7LugJWvNpeZA8va7e5bOHAEKo89S0Ac8WDZt2OaNzbh/b9l0iSL2eEyte8UgIsYGcFxOwIF1VA==", - "license": "Apache-2.0", + "node_modules/@babel/generator": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", + "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", + "dev": true, + "license": "MIT", "dependencies": { - "@aws-sdk/core": "3.888.0", - "@aws-sdk/types": "3.887.0", - "@smithy/property-provider": "^4.0.5", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" + "@babel/parser": "^7.28.5", + "@babel/types": "^7.28.5", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=6.9.0" } }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/credential-provider-http": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.888.0.tgz", - "integrity": "sha512-Jvuk6nul0lE7o5qlQutcqlySBHLXOyoPtiwE6zyKbGc7RVl0//h39Lab7zMeY2drMn8xAnIopL4606Fd8JI/Hw==", - "license": "Apache-2.0", + "node_modules/@babel/helper-compilation-targets": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "dev": true, + "license": "MIT", "dependencies": { - "@aws-sdk/core": "3.888.0", - "@aws-sdk/types": "3.887.0", - "@smithy/fetch-http-handler": "^5.2.1", - "@smithy/node-http-handler": "^4.2.1", - "@smithy/property-provider": "^4.0.5", - "@smithy/protocol-http": "^5.2.1", - "@smithy/smithy-client": "^4.6.1", - "@smithy/types": "^4.5.0", - "@smithy/util-stream": "^4.3.1", - "tslib": "^2.6.2" + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { - "node": ">=18.0.0" + "node": ">=6.9.0" } }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.888.0.tgz", - "integrity": "sha512-M82ItvS5yq+tO6ZOV1ruaVs2xOne+v8HW85GFCXnz8pecrzYdgxh6IsVqEbbWruryG/mUGkWMbkBZoEsy4MgyA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.888.0", - "@aws-sdk/credential-provider-env": "3.888.0", - "@aws-sdk/credential-provider-http": "3.888.0", - "@aws-sdk/credential-provider-process": "3.888.0", - "@aws-sdk/credential-provider-sso": "3.888.0", - "@aws-sdk/credential-provider-web-identity": "3.888.0", - "@aws-sdk/nested-clients": "3.888.0", - "@aws-sdk/types": "3.887.0", - "@smithy/credential-provider-imds": "^4.0.7", - "@smithy/property-provider": "^4.0.5", - "@smithy/shared-ini-file-loader": "^4.0.5", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=18.0.0" + "node": ">=6.9.0" } }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/credential-provider-node": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.888.0.tgz", - "integrity": "sha512-KCrQh1dCDC8Y+Ap3SZa6S81kHk+p+yAaOQ5jC3dak4zhHW3RCrsGR/jYdemTOgbEGcA6ye51UbhWfrrlMmeJSA==", - "license": "Apache-2.0", + "node_modules/@babel/helper-module-imports": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "dev": true, + "license": "MIT", "dependencies": { - "@aws-sdk/credential-provider-env": "3.888.0", - "@aws-sdk/credential-provider-http": "3.888.0", - "@aws-sdk/credential-provider-ini": "3.888.0", - "@aws-sdk/credential-provider-process": "3.888.0", - "@aws-sdk/credential-provider-sso": "3.888.0", - "@aws-sdk/credential-provider-web-identity": "3.888.0", - "@aws-sdk/types": "3.887.0", - "@smithy/credential-provider-imds": "^4.0.7", - "@smithy/property-provider": "^4.0.5", - "@smithy/shared-ini-file-loader": "^4.0.5", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { - "node": ">=18.0.0" + "node": ">=6.9.0" } }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/credential-provider-process": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.888.0.tgz", - "integrity": "sha512-+aX6piSukPQ8DUS4JAH344GePg8/+Q1t0+kvSHAZHhYvtQ/1Zek3ySOJWH2TuzTPCafY4nmWLcQcqvU1w9+4Lw==", - "license": "Apache-2.0", + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "dev": true, + "license": "MIT", "dependencies": { - "@aws-sdk/core": "3.888.0", - "@aws-sdk/types": "3.887.0", - "@smithy/property-provider": "^4.0.5", - "@smithy/shared-ini-file-loader": "^4.0.5", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.28.3" }, "engines": { - "node": ">=18.0.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.888.0.tgz", - "integrity": "sha512-b1ZJji7LJ6E/j1PhFTyvp51in2iCOQ3VP6mj5H6f5OUnqn7efm41iNMoinKr87n0IKZw7qput5ggXVxEdPhouA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-sso": "3.888.0", - "@aws-sdk/core": "3.888.0", - "@aws-sdk/token-providers": "3.888.0", - "@aws-sdk/types": "3.887.0", - "@smithy/property-provider": "^4.0.5", - "@smithy/shared-ini-file-loader": "^4.0.5", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=18.0.0" + "node": ">=6.9.0" } }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.888.0.tgz", - "integrity": "sha512-7P0QNtsDzMZdmBAaY/vY1BsZHwTGvEz3bsn2bm5VSKFAeMmZqsHK1QeYdNsFjLtegnVh+wodxMq50jqLv3LFlA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.888.0", - "@aws-sdk/nested-clients": "3.888.0", - "@aws-sdk/types": "3.887.0", - "@smithy/property-provider": "^4.0.5", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/middleware-host-header": { - "version": "3.887.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.887.0.tgz", - "integrity": "sha512-ulzqXv6NNqdu/kr0sgBYupWmahISHY+azpJidtK6ZwQIC+vBUk9NdZeqQpy7KVhIk2xd4+5Oq9rxapPwPI21CA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.887.0", - "@smithy/protocol-http": "^5.2.1", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/middleware-logger": { - "version": "3.887.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.887.0.tgz", - "integrity": "sha512-YbbgLI6jKp2qSoAcHnXrQ5jcuc5EYAmGLVFgMVdk8dfCfJLfGGSaOLxF4CXC7QYhO50s+mPPkhBYejCik02Kug==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.887.0", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.887.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.887.0.tgz", - "integrity": "sha512-tjrUXFtQnFLo+qwMveq5faxP5MQakoLArXtqieHphSqZTXm21wDJM73hgT4/PQQGTwgYjDKqnqsE1hvk0hcfDw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.887.0", - "@aws/lambda-invoke-store": "^0.0.1", - "@smithy/protocol-http": "^5.2.1", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.888.0.tgz", - "integrity": "sha512-ZkcUkoys8AdrNNG7ATjqw2WiXqrhTvT+r4CIK3KhOqIGPHX0p0DQWzqjaIl7ZhSUToKoZ4Ud7MjF795yUr73oA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.888.0", - "@aws-sdk/types": "3.887.0", - "@aws-sdk/util-endpoints": "3.887.0", - "@smithy/core": "^3.11.0", - "@smithy/protocol-http": "^5.2.1", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/nested-clients": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.888.0.tgz", - "integrity": "sha512-py4o4RPSGt+uwGvSBzR6S6cCBjS4oTX5F8hrHFHfPCdIOMVjyOBejn820jXkCrcdpSj3Qg1yUZXxsByvxc9Lyg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.888.0", - "@aws-sdk/middleware-host-header": "3.887.0", - "@aws-sdk/middleware-logger": "3.887.0", - "@aws-sdk/middleware-recursion-detection": "3.887.0", - "@aws-sdk/middleware-user-agent": "3.888.0", - "@aws-sdk/region-config-resolver": "3.887.0", - "@aws-sdk/types": "3.887.0", - "@aws-sdk/util-endpoints": "3.887.0", - "@aws-sdk/util-user-agent-browser": "3.887.0", - "@aws-sdk/util-user-agent-node": "3.888.0", - "@smithy/config-resolver": "^4.2.1", - "@smithy/core": "^3.11.0", - "@smithy/fetch-http-handler": "^5.2.1", - "@smithy/hash-node": "^4.1.1", - "@smithy/invalid-dependency": "^4.1.1", - "@smithy/middleware-content-length": "^4.1.1", - "@smithy/middleware-endpoint": "^4.2.1", - "@smithy/middleware-retry": "^4.2.1", - "@smithy/middleware-serde": "^4.1.1", - "@smithy/middleware-stack": "^4.1.1", - "@smithy/node-config-provider": "^4.2.1", - "@smithy/node-http-handler": "^4.2.1", - "@smithy/protocol-http": "^5.2.1", - "@smithy/smithy-client": "^4.6.1", - "@smithy/types": "^4.5.0", - "@smithy/url-parser": "^4.1.1", - "@smithy/util-base64": "^4.1.0", - "@smithy/util-body-length-browser": "^4.1.0", - "@smithy/util-body-length-node": "^4.1.0", - "@smithy/util-defaults-mode-browser": "^4.1.1", - "@smithy/util-defaults-mode-node": "^4.1.1", - "@smithy/util-endpoints": "^3.1.1", - "@smithy/util-middleware": "^4.1.1", - "@smithy/util-retry": "^4.1.1", - "@smithy/util-utf8": "^4.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/region-config-resolver": { - "version": "3.887.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.887.0.tgz", - "integrity": "sha512-VdSMrIqJ3yjJb/fY+YAxrH/lCVv0iL8uA+lbMNfQGtO5tB3Zx6SU9LEpUwBNX8fPK1tUpI65CNE4w42+MY/7Mg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.887.0", - "@smithy/node-config-provider": "^4.2.1", - "@smithy/types": "^4.5.0", - "@smithy/util-config-provider": "^4.0.0", - "@smithy/util-middleware": "^4.1.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/token-providers": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.888.0.tgz", - "integrity": "sha512-WA3NF+3W8GEuCMG1WvkDYbB4z10G3O8xuhT7QSjhvLYWQ9CPt3w4VpVIfdqmUn131TCIbhCzD0KN/1VJTjAjyw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.888.0", - "@aws-sdk/nested-clients": "3.888.0", - "@aws-sdk/types": "3.887.0", - "@smithy/property-provider": "^4.0.5", - "@smithy/shared-ini-file-loader": "^4.0.5", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/types": { - "version": "3.887.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.887.0.tgz", - "integrity": "sha512-fmTEJpUhsPsovQ12vZSpVTEP/IaRoJAMBGQXlQNjtCpkBp6Iq3KQDa/HDaPINE+3xxo6XvTdtibsNOd5zJLV9A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/util-endpoints": { - "version": "3.887.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.887.0.tgz", - "integrity": "sha512-kpegvT53KT33BMeIcGLPA65CQVxLUL/C3gTz9AzlU/SDmeusBHX4nRApAicNzI/ltQ5lxZXbQn18UczzBuwF1w==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.887.0", - "@smithy/types": "^4.5.0", - "@smithy/url-parser": "^4.1.1", - "@smithy/util-endpoints": "^3.1.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.887.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.887.0.tgz", - "integrity": "sha512-X71UmVsYc6ZTH4KU6hA5urOzYowSXc3qvroagJNLJYU1ilgZ529lP4J9XOYfEvTXkLR1hPFSRxa43SrwgelMjA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.887.0", - "@smithy/types": "^4.5.0", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.888.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.888.0.tgz", - "integrity": "sha512-rSB3OHyuKXotIGfYEo//9sU0lXAUrTY28SUUnxzOGYuQsAt0XR5iYwBAp+RjV6x8f+Hmtbg0PdCsy1iNAXa0UQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-user-agent": "3.888.0", - "@aws-sdk/types": "3.887.0", - "@smithy/node-config-provider": "^4.2.1", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "aws-crt": ">=1.0.0" - }, - "peerDependenciesMeta": { - "aws-crt": { - "optional": true - } - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@aws-sdk/xml-builder": { - "version": "3.887.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.887.0.tgz", - "integrity": "sha512-lMwgWK1kNgUhHGfBvO/5uLe7TKhycwOn3eRCqsKPT9aPCx/HWuTlpcQp8oW2pCRGLS7qzcxqpQulcD+bbUL7XQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/abort-controller": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.1.1.tgz", - "integrity": "sha512-vkzula+IwRvPR6oKQhMYioM3A/oX/lFCZiwuxkQbRhqJS2S4YRY2k7k/SyR2jMf3607HLtbEwlRxi0ndXHMjRg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/core": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.11.0.tgz", - "integrity": "sha512-Abs5rdP1o8/OINtE49wwNeWuynCu0kme1r4RI3VXVrHr4odVDG7h7mTnw1WXXfN5Il+c25QOnrdL2y56USfxkA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^4.1.1", - "@smithy/protocol-http": "^5.2.1", - "@smithy/types": "^4.5.0", - "@smithy/util-base64": "^4.1.0", - "@smithy/util-body-length-browser": "^4.1.0", - "@smithy/util-middleware": "^4.1.1", - "@smithy/util-stream": "^4.3.1", - "@smithy/util-utf8": "^4.1.0", - "@types/uuid": "^9.0.1", - "tslib": "^2.6.2", - "uuid": "^9.0.1" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/fetch-http-handler": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.2.1.tgz", - "integrity": "sha512-5/3wxKNtV3wO/hk1is+CZUhL8a1yy/U+9u9LKQ9kZTkMsHaQjJhc3stFfiujtMnkITjzWfndGA2f7g9Uh9vKng==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.2.1", - "@smithy/querystring-builder": "^4.1.1", - "@smithy/types": "^4.5.0", - "@smithy/util-base64": "^4.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/is-array-buffer": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.1.0.tgz", - "integrity": "sha512-ePTYUOV54wMogio+he4pBybe8fwg4sDvEVDBU8ZlHOZXbXK3/C0XfJgUCu6qAZcawv05ZhZzODGUerFBPsPUDQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/middleware-endpoint": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.2.2.tgz", - "integrity": "sha512-M51KcwD+UeSOFtpALGf5OijWt915aQT5eJhqnMKJt7ZTfDfNcvg2UZgIgTZUoiORawb6o5lk4n3rv7vnzQXgsA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.11.0", - "@smithy/middleware-serde": "^4.1.1", - "@smithy/node-config-provider": "^4.2.2", - "@smithy/shared-ini-file-loader": "^4.2.0", - "@smithy/types": "^4.5.0", - "@smithy/url-parser": "^4.1.1", - "@smithy/util-middleware": "^4.1.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/middleware-serde": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.1.1.tgz", - "integrity": "sha512-lh48uQdbCoj619kRouev5XbWhCwRKLmphAif16c4J6JgJ4uXjub1PI6RL38d3BLliUvSso6klyB/LTNpWSNIyg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.2.1", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/middleware-stack": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.1.1.tgz", - "integrity": "sha512-ygRnniqNcDhHzs6QAPIdia26M7e7z9gpkIMUe/pK0RsrQ7i5MblwxY8078/QCnGq6AmlUUWgljK2HlelsKIb/A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/node-config-provider": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.2.2.tgz", - "integrity": "sha512-SYGTKyPvyCfEzIN5rD8q/bYaOPZprYUPD2f5g9M7OjaYupWOoQFYJ5ho+0wvxIRf471i2SR4GoiZ2r94Jq9h6A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^4.1.1", - "@smithy/shared-ini-file-loader": "^4.2.0", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/node-http-handler": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.2.1.tgz", - "integrity": "sha512-REyybygHlxo3TJICPF89N2pMQSf+p+tBJqpVe1+77Cfi9HBPReNjTgtZ1Vg73exq24vkqJskKDpfF74reXjxfw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^4.1.1", - "@smithy/protocol-http": "^5.2.1", - "@smithy/querystring-builder": "^4.1.1", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/property-provider": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.1.1.tgz", - "integrity": "sha512-gm3ZS7DHxUbzC2wr8MUCsAabyiXY0gaj3ROWnhSx/9sPMc6eYLMM4rX81w1zsMaObj2Lq3PZtNCC1J6lpEY7zg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/protocol-http": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.2.1.tgz", - "integrity": "sha512-T8SlkLYCwfT/6m33SIU/JOVGNwoelkrvGjFKDSDtVvAXj/9gOT78JVJEas5a+ETjOu4SVvpCstKgd0PxSu/aHw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/querystring-builder": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.1.1.tgz", - "integrity": "sha512-J9b55bfimP4z/Jg1gNo+AT84hr90p716/nvxDkPGCD4W70MPms0h8KF50RDRgBGZeL83/u59DWNqJv6tEP/DHA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.5.0", - "@smithy/util-uri-escape": "^4.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/querystring-parser": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.1.1.tgz", - "integrity": "sha512-63TEp92YFz0oQ7Pj9IuI3IgnprP92LrZtRAkE3c6wLWJxfy/yOPRt39IOKerVr0JS770olzl0kGafXlAXZ1vng==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.2.0.tgz", - "integrity": "sha512-OQTfmIEp2LLuWdxa8nEEPhZmiOREO6bcB6pjs0AySf4yiZhl6kMOfqmcwcY8BaBPX+0Tb+tG7/Ia/6mwpoZ7Pw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/types": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.5.0.tgz", - "integrity": "sha512-RkUpIOsVlAwUIZXO1dsz8Zm+N72LClFfsNqf173catVlvRZiwPy0x2u0JLEA4byreOPKDZPGjmPDylMoP8ZJRg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/url-parser": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.1.1.tgz", - "integrity": "sha512-bx32FUpkhcaKlEoOMbScvc93isaSiRM75pQ5IgIBaMkT7qMlIibpPRONyx/0CvrXHzJLpOn/u6YiDX2hcvs7Dg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^4.1.1", - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/util-base64": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.1.0.tgz", - "integrity": "sha512-RUGd4wNb8GeW7xk+AY5ghGnIwM96V0l2uzvs/uVHf+tIuVX2WSvynk5CxNoBCsM2rQRSZElAo9rt3G5mJ/gktQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.1.0", - "@smithy/util-utf8": "^4.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/util-body-length-browser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.1.0.tgz", - "integrity": "sha512-V2E2Iez+bo6bUMOTENPr6eEmepdY8Hbs+Uc1vkDKgKNA/brTJqOW/ai3JO1BGj9GbCeLqw90pbbH7HFQyFotGQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/util-buffer-from": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.1.0.tgz", - "integrity": "sha512-N6yXcjfe/E+xKEccWEKzK6M+crMrlwaCepKja0pNnlSkm6SjAeLKKA++er5Ba0I17gvKfN/ThV+ZOx/CntKTVw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^4.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/util-hex-encoding": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.1.0.tgz", - "integrity": "sha512-1LcueNN5GYC4tr8mo14yVYbh/Ur8jHhWOxniZXii+1+ePiIbsLZ5fEI0QQGtbRRP5mOhmooos+rLmVASGGoq5w==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/util-middleware": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.1.1.tgz", - "integrity": "sha512-CGmZ72mL29VMfESz7S6dekqzCh8ZISj3B+w0g1hZFXaOjGTVaSqfAEFAq8EGp8fUL+Q2l8aqNmt8U1tglTikeg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/util-stream": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.3.1.tgz", - "integrity": "sha512-khKkW/Jqkgh6caxMWbMuox9+YfGlsk9OnHOYCGVEdYQb/XVzcORXHLYUubHmmda0pubEDncofUrPNniS9d+uAA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^5.2.1", - "@smithy/node-http-handler": "^4.2.1", - "@smithy/types": "^4.5.0", - "@smithy/util-base64": "^4.1.0", - "@smithy/util-buffer-from": "^4.1.0", - "@smithy/util-hex-encoding": "^4.1.0", - "@smithy/util-utf8": "^4.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/util-uri-escape": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.1.0.tgz", - "integrity": "sha512-b0EFQkq35K5NHUYxU72JuoheM6+pytEVUGlTwiFxWFpmddA+Bpz3LgsPRIpBk8lnPE47yT7AF2Egc3jVnKLuPg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-ecs/node_modules/@smithy/util-utf8": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.1.0.tgz", - "integrity": "sha512-mEu1/UIXAdNYuBcyEPbjScKi/+MQVXNIuY/7Cm5XLIWe319kDrT5SizBE95jqtmEXoDbGoZxKLCMttdZdqTZKQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso": { - "version": "3.911.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.911.0.tgz", - "integrity": "sha512-N9QAeMvN3D1ZyKXkQp4aUgC4wUMuA5E1HuVCkajc0bq1pnH4PIke36YlrDGGREqPlyLFrXCkws2gbL5p23vtlg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.911.0", - "@aws-sdk/middleware-host-header": "3.910.0", - "@aws-sdk/middleware-logger": "3.910.0", - "@aws-sdk/middleware-recursion-detection": "3.910.0", - "@aws-sdk/middleware-user-agent": "3.911.0", - "@aws-sdk/region-config-resolver": "3.910.0", - "@aws-sdk/types": "3.910.0", - "@aws-sdk/util-endpoints": "3.910.0", - "@aws-sdk/util-user-agent-browser": "3.910.0", - "@aws-sdk/util-user-agent-node": "3.911.0", - "@smithy/config-resolver": "^4.3.2", - "@smithy/core": "^3.16.1", - "@smithy/fetch-http-handler": "^5.3.3", - "@smithy/hash-node": "^4.2.2", - "@smithy/invalid-dependency": "^4.2.2", - "@smithy/middleware-content-length": "^4.2.2", - "@smithy/middleware-endpoint": "^4.3.3", - "@smithy/middleware-retry": "^4.4.3", - "@smithy/middleware-serde": "^4.2.2", - "@smithy/middleware-stack": "^4.2.2", - "@smithy/node-config-provider": "^4.3.2", - "@smithy/node-http-handler": "^4.4.1", - "@smithy/protocol-http": "^5.3.2", - "@smithy/smithy-client": "^4.8.1", - "@smithy/types": "^4.7.1", - "@smithy/url-parser": "^4.2.2", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-body-length-browser": "^4.2.0", - "@smithy/util-body-length-node": "^4.2.1", - "@smithy/util-defaults-mode-browser": "^4.3.2", - "@smithy/util-defaults-mode-node": "^4.2.3", - "@smithy/util-endpoints": "^3.2.2", - "@smithy/util-middleware": "^4.2.2", - "@smithy/util-retry": "^4.2.2", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/abort-controller": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.3.tgz", - "integrity": "sha512-xWL9Mf8b7tIFuAlpjKtRPnHrR8XVrwTj5NPYO/QwZPtc0SDLsPxb56V5tzi5yspSMytISHybifez+4jlrx0vkQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/core": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.17.0.tgz", - "integrity": "sha512-Tir3DbfoTO97fEGUZjzGeoXgcQAUBRDTmuH9A8lxuP8ATrgezrAJ6cLuRvwdKN4ZbYNlHgKlBX69Hyu3THYhtg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-body-length-browser": "^4.2.0", - "@smithy/util-middleware": "^4.2.3", - "@smithy/util-stream": "^4.5.3", - "@smithy/util-utf8": "^4.2.0", - "@smithy/uuid": "^1.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/fetch-http-handler": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.4.tgz", - "integrity": "sha512-bwigPylvivpRLCm+YK9I5wRIYjFESSVwl8JQ1vVx/XhCw0PtCi558NwTnT2DaVCl5pYlImGuQTSwMsZ+pIavRw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/is-array-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz", - "integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-endpoint": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.3.4.tgz", - "integrity": "sha512-/RJhpYkMOaUZoJEkddamGPPIYeKICKXOu/ojhn85dKDM0n5iDIhjvYAQLP3K5FPhgB203O3GpWzoK2OehEoIUw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.17.0", - "@smithy/middleware-serde": "^4.2.3", - "@smithy/node-config-provider": "^4.3.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", - "@smithy/url-parser": "^4.2.3", - "@smithy/util-middleware": "^4.2.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-serde": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.3.tgz", - "integrity": "sha512-8g4NuUINpYccxiCXM5s1/V+uLtts8NcX4+sPEbvYQDZk4XoJfDpq5y2FQxfmUL89syoldpzNzA0R9nhzdtdKnQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-stack": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.3.tgz", - "integrity": "sha512-iGuOJkH71faPNgOj/gWuEGS6xvQashpLwWB1HjHq1lNNiVfbiJLpZVbhddPuDbx9l4Cgl0vPLq5ltRfSaHfspA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/node-config-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.3.tgz", - "integrity": "sha512-NzI1eBpBSViOav8NVy1fqOlSfkLgkUjUTlohUSgAEhHaFWA3XJiLditvavIP7OpvTjDp5u2LhtlBhkBlEisMwA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/node-http-handler": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.2.tgz", - "integrity": "sha512-MHFvTjts24cjGo1byXqhXrbqm7uznFD/ESFx8npHMWTFQVdBZjrT1hKottmp69LBTRm/JQzP/sn1vPt0/r6AYQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/protocol-http": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.3.tgz", - "integrity": "sha512-Mn7f/1aN2/jecywDcRDvWWWJF4uwg/A0XjFMJtj72DsgHTByfjRltSqcT9NyE9RTdBSN6X1RSXrhn/YWQl8xlw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/querystring-builder": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.3.tgz", - "integrity": "sha512-LOVCGCmwMahYUM/P0YnU/AlDQFjcu+gWbFJooC417QRB/lDJlWSn8qmPSDp+s4YVAHOgtgbNG4sR+SxF/VOcJQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "@smithy/util-uri-escape": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/querystring-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.3.tgz", - "integrity": "sha512-cYlSNHcTAX/wc1rpblli3aUlLMGgKZ/Oqn8hhjFASXMCXjIqeuQBei0cnq2JR8t4RtU9FpG6uyl6PxyArTiwKA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/url-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.3.tgz", - "integrity": "sha512-I066AigYvY3d9VlU3zG9XzZg1yT10aNqvCaBTw9EPgu5GrsEl1aUkcMvhkIXascYH1A8W0LQo3B1Kr1cJNcQEw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^4.2.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-base64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.3.0.tgz", - "integrity": "sha512-GkXZ59JfyxsIwNTWFnjmFEI8kZpRNIBfxKjv09+nkAWPt/4aGaEWMM04m4sxgNVWkbt2MdSvE3KF/PfX4nFedQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-body-length-browser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.2.0.tgz", - "integrity": "sha512-Fkoh/I76szMKJnBXWPdFkQJl2r9SjPt3cMzLdOB6eJ4Pnpas8hVoWPYemX/peO0yrrvldgCUVJqOAjUrOLjbxg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-buffer-from": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz", - "integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-hex-encoding": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.0.tgz", - "integrity": "sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-middleware": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.3.tgz", - "integrity": "sha512-v5ObKlSe8PWUHCqEiX2fy1gNv6goiw6E5I/PN2aXg3Fb/hse0xeaAnSpXDiWl7x6LamVKq7senB+m5LOYHUAHw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-stream": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.3.tgz", - "integrity": "sha512-oZvn8a5bwwQBNYHT2eNo0EU8Kkby3jeIg1P2Lu9EQtqDxki1LIjGRJM6dJ5CZUig8QmLxWxqOKWvg3mVoOBs5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^5.3.4", - "@smithy/node-http-handler": "^4.4.2", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-buffer-from": "^4.2.0", - "@smithy/util-hex-encoding": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-uri-escape": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.0.tgz", - "integrity": "sha512-igZpCKV9+E/Mzrpq6YacdTQ0qTiLm85gD6N/IrmyDvQFA4UnU3d5g3m8tMT/6zG/vVkWSU+VxeUyGonL62DuxA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-utf8": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz", - "integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core": { - "version": "3.911.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.911.0.tgz", - "integrity": "sha512-k4QG9A+UCq/qlDJFmjozo6R0eXXfe++/KnCDMmajehIE9kh+b/5DqlGvAmbl9w4e92LOtrY6/DN3mIX1xs4sXw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.910.0", - "@aws-sdk/xml-builder": "3.911.0", - "@smithy/core": "^3.16.1", - "@smithy/node-config-provider": "^4.3.2", - "@smithy/property-provider": "^4.2.2", - "@smithy/protocol-http": "^5.3.2", - "@smithy/signature-v4": "^5.3.2", - "@smithy/smithy-client": "^4.8.1", - "@smithy/types": "^4.7.1", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-middleware": "^4.2.2", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/abort-controller": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.3.tgz", - "integrity": "sha512-xWL9Mf8b7tIFuAlpjKtRPnHrR8XVrwTj5NPYO/QwZPtc0SDLsPxb56V5tzi5yspSMytISHybifez+4jlrx0vkQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/core": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.17.0.tgz", - "integrity": "sha512-Tir3DbfoTO97fEGUZjzGeoXgcQAUBRDTmuH9A8lxuP8ATrgezrAJ6cLuRvwdKN4ZbYNlHgKlBX69Hyu3THYhtg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-body-length-browser": "^4.2.0", - "@smithy/util-middleware": "^4.2.3", - "@smithy/util-stream": "^4.5.3", - "@smithy/util-utf8": "^4.2.0", - "@smithy/uuid": "^1.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/fetch-http-handler": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.4.tgz", - "integrity": "sha512-bwigPylvivpRLCm+YK9I5wRIYjFESSVwl8JQ1vVx/XhCw0PtCi558NwTnT2DaVCl5pYlImGuQTSwMsZ+pIavRw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/is-array-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz", - "integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/middleware-serde": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.3.tgz", - "integrity": "sha512-8g4NuUINpYccxiCXM5s1/V+uLtts8NcX4+sPEbvYQDZk4XoJfDpq5y2FQxfmUL89syoldpzNzA0R9nhzdtdKnQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/node-config-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.3.tgz", - "integrity": "sha512-NzI1eBpBSViOav8NVy1fqOlSfkLgkUjUTlohUSgAEhHaFWA3XJiLditvavIP7OpvTjDp5u2LhtlBhkBlEisMwA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/node-http-handler": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.2.tgz", - "integrity": "sha512-MHFvTjts24cjGo1byXqhXrbqm7uznFD/ESFx8npHMWTFQVdBZjrT1hKottmp69LBTRm/JQzP/sn1vPt0/r6AYQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/protocol-http": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.3.tgz", - "integrity": "sha512-Mn7f/1aN2/jecywDcRDvWWWJF4uwg/A0XjFMJtj72DsgHTByfjRltSqcT9NyE9RTdBSN6X1RSXrhn/YWQl8xlw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/querystring-builder": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.3.tgz", - "integrity": "sha512-LOVCGCmwMahYUM/P0YnU/AlDQFjcu+gWbFJooC417QRB/lDJlWSn8qmPSDp+s4YVAHOgtgbNG4sR+SxF/VOcJQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "@smithy/util-uri-escape": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/util-base64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.3.0.tgz", - "integrity": "sha512-GkXZ59JfyxsIwNTWFnjmFEI8kZpRNIBfxKjv09+nkAWPt/4aGaEWMM04m4sxgNVWkbt2MdSvE3KF/PfX4nFedQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/util-body-length-browser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.2.0.tgz", - "integrity": "sha512-Fkoh/I76szMKJnBXWPdFkQJl2r9SjPt3cMzLdOB6eJ4Pnpas8hVoWPYemX/peO0yrrvldgCUVJqOAjUrOLjbxg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/util-buffer-from": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz", - "integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/util-hex-encoding": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.0.tgz", - "integrity": "sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/util-middleware": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.3.tgz", - "integrity": "sha512-v5ObKlSe8PWUHCqEiX2fy1gNv6goiw6E5I/PN2aXg3Fb/hse0xeaAnSpXDiWl7x6LamVKq7senB+m5LOYHUAHw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/util-stream": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.3.tgz", - "integrity": "sha512-oZvn8a5bwwQBNYHT2eNo0EU8Kkby3jeIg1P2Lu9EQtqDxki1LIjGRJM6dJ5CZUig8QmLxWxqOKWvg3mVoOBs5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^5.3.4", - "@smithy/node-http-handler": "^4.4.2", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-buffer-from": "^4.2.0", - "@smithy/util-hex-encoding": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/util-uri-escape": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.0.tgz", - "integrity": "sha512-igZpCKV9+E/Mzrpq6YacdTQ0qTiLm85gD6N/IrmyDvQFA4UnU3d5g3m8tMT/6zG/vVkWSU+VxeUyGonL62DuxA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz", - "integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.911.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.911.0.tgz", - "integrity": "sha512-6FWRwWn3LUZzLhqBXB+TPMW2ijCWUqGICSw8bVakEdODrvbiv1RT/MVUayzFwz/ek6e6NKZn6DbSWzx07N9Hjw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.911.0", - "@aws-sdk/types": "3.910.0", - "@smithy/property-provider": "^4.2.2", - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.911.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.911.0.tgz", - "integrity": "sha512-xUlwKmIUW2fWP/eM3nF5u4CyLtOtyohlhGJ5jdsJokr3MrQ7w0tDITO43C9IhCn+28D5UbaiWnKw5ntkw7aVfA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.911.0", - "@aws-sdk/types": "3.910.0", - "@smithy/fetch-http-handler": "^5.3.3", - "@smithy/node-http-handler": "^4.4.1", - "@smithy/property-provider": "^4.2.2", - "@smithy/protocol-http": "^5.3.2", - "@smithy/smithy-client": "^4.8.1", - "@smithy/types": "^4.7.1", - "@smithy/util-stream": "^4.5.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/abort-controller": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.3.tgz", - "integrity": "sha512-xWL9Mf8b7tIFuAlpjKtRPnHrR8XVrwTj5NPYO/QwZPtc0SDLsPxb56V5tzi5yspSMytISHybifez+4jlrx0vkQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/fetch-http-handler": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.4.tgz", - "integrity": "sha512-bwigPylvivpRLCm+YK9I5wRIYjFESSVwl8JQ1vVx/XhCw0PtCi558NwTnT2DaVCl5pYlImGuQTSwMsZ+pIavRw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/is-array-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz", - "integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.2.tgz", - "integrity": "sha512-MHFvTjts24cjGo1byXqhXrbqm7uznFD/ESFx8npHMWTFQVdBZjrT1hKottmp69LBTRm/JQzP/sn1vPt0/r6AYQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/protocol-http": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.3.tgz", - "integrity": "sha512-Mn7f/1aN2/jecywDcRDvWWWJF4uwg/A0XjFMJtj72DsgHTByfjRltSqcT9NyE9RTdBSN6X1RSXrhn/YWQl8xlw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/querystring-builder": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.3.tgz", - "integrity": "sha512-LOVCGCmwMahYUM/P0YnU/AlDQFjcu+gWbFJooC417QRB/lDJlWSn8qmPSDp+s4YVAHOgtgbNG4sR+SxF/VOcJQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "@smithy/util-uri-escape": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-base64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.3.0.tgz", - "integrity": "sha512-GkXZ59JfyxsIwNTWFnjmFEI8kZpRNIBfxKjv09+nkAWPt/4aGaEWMM04m4sxgNVWkbt2MdSvE3KF/PfX4nFedQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-buffer-from": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz", - "integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-hex-encoding": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.0.tgz", - "integrity": "sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-stream": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.3.tgz", - "integrity": "sha512-oZvn8a5bwwQBNYHT2eNo0EU8Kkby3jeIg1P2Lu9EQtqDxki1LIjGRJM6dJ5CZUig8QmLxWxqOKWvg3mVoOBs5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^5.3.4", - "@smithy/node-http-handler": "^4.4.2", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-buffer-from": "^4.2.0", - "@smithy/util-hex-encoding": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-uri-escape": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.0.tgz", - "integrity": "sha512-igZpCKV9+E/Mzrpq6YacdTQ0qTiLm85gD6N/IrmyDvQFA4UnU3d5g3m8tMT/6zG/vVkWSU+VxeUyGonL62DuxA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-utf8": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz", - "integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.913.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.913.0.tgz", - "integrity": "sha512-iR4c4NQ1OSRKQi0SxzpwD+wP1fCy+QNKtEyCajuVlD0pvmoIHdrm5THK9e+2/7/SsQDRhOXHJfLGxHapD74WJw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.911.0", - "@aws-sdk/credential-provider-env": "3.911.0", - "@aws-sdk/credential-provider-http": "3.911.0", - "@aws-sdk/credential-provider-process": "3.911.0", - "@aws-sdk/credential-provider-sso": "3.911.0", - "@aws-sdk/credential-provider-web-identity": "3.911.0", - "@aws-sdk/nested-clients": "3.911.0", - "@aws-sdk/types": "3.910.0", - "@smithy/credential-provider-imds": "^4.2.2", - "@smithy/property-provider": "^4.2.2", - "@smithy/shared-ini-file-loader": "^4.3.2", - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.913.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.913.0.tgz", - "integrity": "sha512-HQPLkKDxS83Q/nZKqg9bq4igWzYQeOMqhpx5LYs4u1GwsKeCsYrrfz12Iu4IHNWPp9EnGLcmdfbfYuqZGrsaSQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.911.0", - "@aws-sdk/credential-provider-http": "3.911.0", - "@aws-sdk/credential-provider-ini": "3.913.0", - "@aws-sdk/credential-provider-process": "3.911.0", - "@aws-sdk/credential-provider-sso": "3.911.0", - "@aws-sdk/credential-provider-web-identity": "3.911.0", - "@aws-sdk/types": "3.910.0", - "@smithy/credential-provider-imds": "^4.2.2", - "@smithy/property-provider": "^4.2.2", - "@smithy/shared-ini-file-loader": "^4.3.2", - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.911.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.911.0.tgz", - "integrity": "sha512-mKshhV5jRQffZjbK9x7bs+uC2IsYKfpzYaBamFsEov3xtARCpOiKaIlM8gYKFEbHT2M+1R3rYYlhhl9ndVWS2g==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.911.0", - "@aws-sdk/types": "3.910.0", - "@smithy/property-provider": "^4.2.2", - "@smithy/shared-ini-file-loader": "^4.3.2", - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.911.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.911.0.tgz", - "integrity": "sha512-JAxd4uWe0Zc9tk6+N0cVxe9XtJVcOx6Ms0k933ZU9QbuRMH6xti/wnZxp/IvGIWIDzf5fhqiGyw5MSyDeI5b1w==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-sso": "3.911.0", - "@aws-sdk/core": "3.911.0", - "@aws-sdk/token-providers": "3.911.0", - "@aws-sdk/types": "3.910.0", - "@smithy/property-provider": "^4.2.2", - "@smithy/shared-ini-file-loader": "^4.3.2", - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.911.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.911.0.tgz", - "integrity": "sha512-urIbXWWG+cm54RwwTFQuRwPH0WPsMFSDF2/H9qO2J2fKoHRURuyblFCyYG3aVKZGvFBhOizJYexf5+5w3CJKBw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.911.0", - "@aws-sdk/nested-clients": "3.911.0", - "@aws-sdk/types": "3.910.0", - "@smithy/property-provider": "^4.2.2", - "@smithy/shared-ini-file-loader": "^4.3.2", - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.910.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.910.0.tgz", - "integrity": "sha512-F9Lqeu80/aTM6S/izZ8RtwSmjfhWjIuxX61LX+/9mxJyEkgaECRxv0chsLQsLHJumkGnXRy/eIyMLBhcTPF5vg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.910.0", - "@smithy/protocol-http": "^5.3.2", - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/@smithy/protocol-http": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.3.tgz", - "integrity": "sha512-Mn7f/1aN2/jecywDcRDvWWWJF4uwg/A0XjFMJtj72DsgHTByfjRltSqcT9NyE9RTdBSN6X1RSXrhn/YWQl8xlw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger": { - "version": "3.910.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.910.0.tgz", - "integrity": "sha512-3LJyyfs1USvRuRDla1pGlzGRtXJBXD1zC9F+eE9Iz/V5nkmhyv52A017CvKWmYoR0DM9dzjLyPOI0BSSppEaTw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.910.0", - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.910.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.910.0.tgz", - "integrity": "sha512-m/oLz0EoCy+WoIVBnXRXJ4AtGpdl0kPE7U+VH9TsuUzHgxY1Re/176Q1HWLBRVlz4gr++lNsgsMWEC+VnAwMpw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.910.0", - "@aws/lambda-invoke-store": "^0.0.1", - "@smithy/protocol-http": "^5.3.2", - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@smithy/protocol-http": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.3.tgz", - "integrity": "sha512-Mn7f/1aN2/jecywDcRDvWWWJF4uwg/A0XjFMJtj72DsgHTByfjRltSqcT9NyE9RTdBSN6X1RSXrhn/YWQl8xlw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.911.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.911.0.tgz", - "integrity": "sha512-rY3LvGvgY/UI0nmt5f4DRzjEh8135A2TeHcva1bgOmVfOI4vkkGfA20sNRqerOkSO6hPbkxJapO50UJHFzmmyA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.911.0", - "@aws-sdk/types": "3.910.0", - "@aws-sdk/util-endpoints": "3.910.0", - "@smithy/core": "^3.16.1", - "@smithy/protocol-http": "^5.3.2", - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/abort-controller": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.3.tgz", - "integrity": "sha512-xWL9Mf8b7tIFuAlpjKtRPnHrR8XVrwTj5NPYO/QwZPtc0SDLsPxb56V5tzi5yspSMytISHybifez+4jlrx0vkQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/core": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.17.0.tgz", - "integrity": "sha512-Tir3DbfoTO97fEGUZjzGeoXgcQAUBRDTmuH9A8lxuP8ATrgezrAJ6cLuRvwdKN4ZbYNlHgKlBX69Hyu3THYhtg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-body-length-browser": "^4.2.0", - "@smithy/util-middleware": "^4.2.3", - "@smithy/util-stream": "^4.5.3", - "@smithy/util-utf8": "^4.2.0", - "@smithy/uuid": "^1.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/fetch-http-handler": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.4.tgz", - "integrity": "sha512-bwigPylvivpRLCm+YK9I5wRIYjFESSVwl8JQ1vVx/XhCw0PtCi558NwTnT2DaVCl5pYlImGuQTSwMsZ+pIavRw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/is-array-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz", - "integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/middleware-serde": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.3.tgz", - "integrity": "sha512-8g4NuUINpYccxiCXM5s1/V+uLtts8NcX4+sPEbvYQDZk4XoJfDpq5y2FQxfmUL89syoldpzNzA0R9nhzdtdKnQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/node-http-handler": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.2.tgz", - "integrity": "sha512-MHFvTjts24cjGo1byXqhXrbqm7uznFD/ESFx8npHMWTFQVdBZjrT1hKottmp69LBTRm/JQzP/sn1vPt0/r6AYQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/protocol-http": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.3.tgz", - "integrity": "sha512-Mn7f/1aN2/jecywDcRDvWWWJF4uwg/A0XjFMJtj72DsgHTByfjRltSqcT9NyE9RTdBSN6X1RSXrhn/YWQl8xlw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/querystring-builder": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.3.tgz", - "integrity": "sha512-LOVCGCmwMahYUM/P0YnU/AlDQFjcu+gWbFJooC417QRB/lDJlWSn8qmPSDp+s4YVAHOgtgbNG4sR+SxF/VOcJQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "@smithy/util-uri-escape": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-base64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.3.0.tgz", - "integrity": "sha512-GkXZ59JfyxsIwNTWFnjmFEI8kZpRNIBfxKjv09+nkAWPt/4aGaEWMM04m4sxgNVWkbt2MdSvE3KF/PfX4nFedQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-body-length-browser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.2.0.tgz", - "integrity": "sha512-Fkoh/I76szMKJnBXWPdFkQJl2r9SjPt3cMzLdOB6eJ4Pnpas8hVoWPYemX/peO0yrrvldgCUVJqOAjUrOLjbxg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-buffer-from": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz", - "integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-hex-encoding": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.0.tgz", - "integrity": "sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-middleware": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.3.tgz", - "integrity": "sha512-v5ObKlSe8PWUHCqEiX2fy1gNv6goiw6E5I/PN2aXg3Fb/hse0xeaAnSpXDiWl7x6LamVKq7senB+m5LOYHUAHw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-stream": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.3.tgz", - "integrity": "sha512-oZvn8a5bwwQBNYHT2eNo0EU8Kkby3jeIg1P2Lu9EQtqDxki1LIjGRJM6dJ5CZUig8QmLxWxqOKWvg3mVoOBs5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^5.3.4", - "@smithy/node-http-handler": "^4.4.2", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-buffer-from": "^4.2.0", - "@smithy/util-hex-encoding": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-uri-escape": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.0.tgz", - "integrity": "sha512-igZpCKV9+E/Mzrpq6YacdTQ0qTiLm85gD6N/IrmyDvQFA4UnU3d5g3m8tMT/6zG/vVkWSU+VxeUyGonL62DuxA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-utf8": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz", - "integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients": { - "version": "3.911.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.911.0.tgz", - "integrity": "sha512-lp/sXbdX/S0EYaMYPVKga0omjIUbNNdFi9IJITgKZkLC6CzspihIoHd5GIdl4esMJevtTQQfkVncXTFkf/a4YA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.911.0", - "@aws-sdk/middleware-host-header": "3.910.0", - "@aws-sdk/middleware-logger": "3.910.0", - "@aws-sdk/middleware-recursion-detection": "3.910.0", - "@aws-sdk/middleware-user-agent": "3.911.0", - "@aws-sdk/region-config-resolver": "3.910.0", - "@aws-sdk/types": "3.910.0", - "@aws-sdk/util-endpoints": "3.910.0", - "@aws-sdk/util-user-agent-browser": "3.910.0", - "@aws-sdk/util-user-agent-node": "3.911.0", - "@smithy/config-resolver": "^4.3.2", - "@smithy/core": "^3.16.1", - "@smithy/fetch-http-handler": "^5.3.3", - "@smithy/hash-node": "^4.2.2", - "@smithy/invalid-dependency": "^4.2.2", - "@smithy/middleware-content-length": "^4.2.2", - "@smithy/middleware-endpoint": "^4.3.3", - "@smithy/middleware-retry": "^4.4.3", - "@smithy/middleware-serde": "^4.2.2", - "@smithy/middleware-stack": "^4.2.2", - "@smithy/node-config-provider": "^4.3.2", - "@smithy/node-http-handler": "^4.4.1", - "@smithy/protocol-http": "^5.3.2", - "@smithy/smithy-client": "^4.8.1", - "@smithy/types": "^4.7.1", - "@smithy/url-parser": "^4.2.2", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-body-length-browser": "^4.2.0", - "@smithy/util-body-length-node": "^4.2.1", - "@smithy/util-defaults-mode-browser": "^4.3.2", - "@smithy/util-defaults-mode-node": "^4.2.3", - "@smithy/util-endpoints": "^3.2.2", - "@smithy/util-middleware": "^4.2.2", - "@smithy/util-retry": "^4.2.2", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/abort-controller": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.3.tgz", - "integrity": "sha512-xWL9Mf8b7tIFuAlpjKtRPnHrR8XVrwTj5NPYO/QwZPtc0SDLsPxb56V5tzi5yspSMytISHybifez+4jlrx0vkQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/core": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.17.0.tgz", - "integrity": "sha512-Tir3DbfoTO97fEGUZjzGeoXgcQAUBRDTmuH9A8lxuP8ATrgezrAJ6cLuRvwdKN4ZbYNlHgKlBX69Hyu3THYhtg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-body-length-browser": "^4.2.0", - "@smithy/util-middleware": "^4.2.3", - "@smithy/util-stream": "^4.5.3", - "@smithy/util-utf8": "^4.2.0", - "@smithy/uuid": "^1.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/fetch-http-handler": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.4.tgz", - "integrity": "sha512-bwigPylvivpRLCm+YK9I5wRIYjFESSVwl8JQ1vVx/XhCw0PtCi558NwTnT2DaVCl5pYlImGuQTSwMsZ+pIavRw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/is-array-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz", - "integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/middleware-endpoint": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.3.4.tgz", - "integrity": "sha512-/RJhpYkMOaUZoJEkddamGPPIYeKICKXOu/ojhn85dKDM0n5iDIhjvYAQLP3K5FPhgB203O3GpWzoK2OehEoIUw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.17.0", - "@smithy/middleware-serde": "^4.2.3", - "@smithy/node-config-provider": "^4.3.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", - "@smithy/url-parser": "^4.2.3", - "@smithy/util-middleware": "^4.2.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/middleware-serde": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.3.tgz", - "integrity": "sha512-8g4NuUINpYccxiCXM5s1/V+uLtts8NcX4+sPEbvYQDZk4XoJfDpq5y2FQxfmUL89syoldpzNzA0R9nhzdtdKnQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/middleware-stack": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.3.tgz", - "integrity": "sha512-iGuOJkH71faPNgOj/gWuEGS6xvQashpLwWB1HjHq1lNNiVfbiJLpZVbhddPuDbx9l4Cgl0vPLq5ltRfSaHfspA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-config-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.3.tgz", - "integrity": "sha512-NzI1eBpBSViOav8NVy1fqOlSfkLgkUjUTlohUSgAEhHaFWA3XJiLditvavIP7OpvTjDp5u2LhtlBhkBlEisMwA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.2.tgz", - "integrity": "sha512-MHFvTjts24cjGo1byXqhXrbqm7uznFD/ESFx8npHMWTFQVdBZjrT1hKottmp69LBTRm/JQzP/sn1vPt0/r6AYQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^4.2.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/querystring-builder": "^4.2.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/protocol-http": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.3.tgz", - "integrity": "sha512-Mn7f/1aN2/jecywDcRDvWWWJF4uwg/A0XjFMJtj72DsgHTByfjRltSqcT9NyE9RTdBSN6X1RSXrhn/YWQl8xlw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/querystring-builder": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.3.tgz", - "integrity": "sha512-LOVCGCmwMahYUM/P0YnU/AlDQFjcu+gWbFJooC417QRB/lDJlWSn8qmPSDp+s4YVAHOgtgbNG4sR+SxF/VOcJQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "@smithy/util-uri-escape": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/querystring-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.3.tgz", - "integrity": "sha512-cYlSNHcTAX/wc1rpblli3aUlLMGgKZ/Oqn8hhjFASXMCXjIqeuQBei0cnq2JR8t4RtU9FpG6uyl6PxyArTiwKA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/url-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.3.tgz", - "integrity": "sha512-I066AigYvY3d9VlU3zG9XzZg1yT10aNqvCaBTw9EPgu5GrsEl1aUkcMvhkIXascYH1A8W0LQo3B1Kr1cJNcQEw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^4.2.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-base64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.3.0.tgz", - "integrity": "sha512-GkXZ59JfyxsIwNTWFnjmFEI8kZpRNIBfxKjv09+nkAWPt/4aGaEWMM04m4sxgNVWkbt2MdSvE3KF/PfX4nFedQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-body-length-browser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.2.0.tgz", - "integrity": "sha512-Fkoh/I76szMKJnBXWPdFkQJl2r9SjPt3cMzLdOB6eJ4Pnpas8hVoWPYemX/peO0yrrvldgCUVJqOAjUrOLjbxg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-buffer-from": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz", - "integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-hex-encoding": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.0.tgz", - "integrity": "sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-middleware": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.3.tgz", - "integrity": "sha512-v5ObKlSe8PWUHCqEiX2fy1gNv6goiw6E5I/PN2aXg3Fb/hse0xeaAnSpXDiWl7x6LamVKq7senB+m5LOYHUAHw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-stream": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.3.tgz", - "integrity": "sha512-oZvn8a5bwwQBNYHT2eNo0EU8Kkby3jeIg1P2Lu9EQtqDxki1LIjGRJM6dJ5CZUig8QmLxWxqOKWvg3mVoOBs5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^5.3.4", - "@smithy/node-http-handler": "^4.4.2", - "@smithy/types": "^4.8.0", - "@smithy/util-base64": "^4.3.0", - "@smithy/util-buffer-from": "^4.2.0", - "@smithy/util-hex-encoding": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-uri-escape": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.0.tgz", - "integrity": "sha512-igZpCKV9+E/Mzrpq6YacdTQ0qTiLm85gD6N/IrmyDvQFA4UnU3d5g3m8tMT/6zG/vVkWSU+VxeUyGonL62DuxA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz", - "integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver": { - "version": "3.910.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.910.0.tgz", - "integrity": "sha512-gzQAkuHI3xyG6toYnH/pju+kc190XmvnB7X84vtN57GjgdQJICt9So/BD0U6h+eSfk9VBnafkVrAzBzWMEFZVw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.910.0", - "@smithy/node-config-provider": "^4.3.2", - "@smithy/types": "^4.7.1", - "@smithy/util-config-provider": "^4.2.0", - "@smithy/util-middleware": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/node-config-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.3.tgz", - "integrity": "sha512-NzI1eBpBSViOav8NVy1fqOlSfkLgkUjUTlohUSgAEhHaFWA3XJiLditvavIP7OpvTjDp5u2LhtlBhkBlEisMwA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/util-middleware": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.3.tgz", - "integrity": "sha512-v5ObKlSe8PWUHCqEiX2fy1gNv6goiw6E5I/PN2aXg3Fb/hse0xeaAnSpXDiWl7x6LamVKq7senB+m5LOYHUAHw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers": { - "version": "3.911.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.911.0.tgz", - "integrity": "sha512-O1c5F1pbEImgEe3Vr8j1gpWu69UXWj3nN3vvLGh77hcrG5dZ8I27tSP5RN4Labm8Dnji/6ia+vqSYpN8w6KN5A==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.911.0", - "@aws-sdk/nested-clients": "3.911.0", - "@aws-sdk/types": "3.910.0", - "@smithy/property-provider": "^4.2.2", - "@smithy/shared-ini-file-loader": "^4.3.2", - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/types": { - "version": "3.910.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.910.0.tgz", - "integrity": "sha512-o67gL3vjf4nhfmuSUNNkit0d62QJEwwHLxucwVJkR/rw9mfUtAWsgBs8Tp16cdUbMgsyQtCQilL8RAJDoGtadQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/types/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/util-endpoints": { - "version": "3.910.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.910.0.tgz", - "integrity": "sha512-6XgdNe42ibP8zCQgNGDWoOF53RfEKzpU/S7Z29FTTJ7hcZv0SytC0ZNQQZSx4rfBl036YWYwJRoJMlT4AA7q9A==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.910.0", - "@smithy/types": "^4.7.1", - "@smithy/url-parser": "^4.2.2", - "@smithy/util-endpoints": "^3.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/util-endpoints/node_modules/@smithy/querystring-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.3.tgz", - "integrity": "sha512-cYlSNHcTAX/wc1rpblli3aUlLMGgKZ/Oqn8hhjFASXMCXjIqeuQBei0cnq2JR8t4RtU9FpG6uyl6PxyArTiwKA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/util-endpoints/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/util-endpoints/node_modules/@smithy/url-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.3.tgz", - "integrity": "sha512-I066AigYvY3d9VlU3zG9XzZg1yT10aNqvCaBTw9EPgu5GrsEl1aUkcMvhkIXascYH1A8W0LQo3B1Kr1cJNcQEw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^4.2.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/util-locate-window": { - "version": "3.693.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.693.0.tgz", - "integrity": "sha512-ttrag6haJLWABhLqtg1Uf+4LgHWIMOVSYL+VYZmAp2v4PUGOwWmWQH0Zk8RM7YuQcLfH/EoR72/Yxz6A4FKcuw==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.910.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.910.0.tgz", - "integrity": "sha512-iOdrRdLZHrlINk9pezNZ82P/VxO/UmtmpaOAObUN+xplCUJu31WNM2EE/HccC8PQw6XlAudpdA6HDTGiW6yVGg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.910.0", - "@smithy/types": "^4.7.1", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/util-user-agent-browser/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.911.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.911.0.tgz", - "integrity": "sha512-3l+f6ooLF6Z6Lz0zGi7vSKSUYn/EePPizv88eZQpEAFunBHv+CSVNPtxhxHfkm7X9tTsV4QGZRIqo3taMLolmA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-user-agent": "3.911.0", - "@aws-sdk/types": "3.910.0", - "@smithy/node-config-provider": "^4.3.2", - "@smithy/types": "^4.7.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "aws-crt": ">=1.0.0" - }, - "peerDependenciesMeta": { - "aws-crt": { - "optional": true - } - } - }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/node-config-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.3.tgz", - "integrity": "sha512-NzI1eBpBSViOav8NVy1fqOlSfkLgkUjUTlohUSgAEhHaFWA3XJiLditvavIP7OpvTjDp5u2LhtlBhkBlEisMwA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/xml-builder": { - "version": "3.911.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.911.0.tgz", - "integrity": "sha512-/yh3oe26bZfCVGrIMRM9Z4hvvGJD+qx5tOLlydOkuBkm72aXON7D9+MucjJXTAcI8tF2Yq+JHa0478eHQOhnLg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.7.1", - "fast-xml-parser": "5.2.5", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/xml-builder/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws/lambda-invoke-store": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.0.1.tgz", - "integrity": "sha512-ORHRQ2tmvnBXc8t/X9Z8IcSbBA4xTLKuN873FopzklHMeqBst7YG0d+AX97inkvDX+NChYtSr+qGfcqGFaI8Zw==", - "license": "Apache-2.0", - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", - "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", - "js-tokens": "^4.0.0", - "picocolors": "^1.1.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz", - "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.0.tgz", - "integrity": "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.0", - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-module-transforms": "^7.27.3", - "@babel/helpers": "^7.27.6", - "@babel/parser": "^7.28.0", - "@babel/template": "^7.27.2", - "@babel/traverse": "^7.28.0", - "@babel/types": "^7.28.0", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz", - "integrity": "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.28.0", - "@babel/types": "^7.28.0", - "@jridgewell/gen-mapping": "^0.3.12", - "@jridgewell/trace-mapping": "^0.3.28", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", - "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.27.2", - "@babel/helper-validator-option": "^7.27.1", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-globals": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", - "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", - "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", - "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", - "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", - "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" + "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, "license": "MIT", "engines": { @@ -3930,27 +916,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.28.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.2.tgz", - "integrity": "sha512-/V9771t+EgXz62aCcyofnQhGM8DQACbRhvzKFsXKC9QM+5MadF8ZmIm0crDMaz3+o0h0zXfJnd4EhbYbxsrcFw==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.27.2", - "@babel/types": "^7.28.2" + "@babel/types": "^7.28.4" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", - "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", + "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.28.0" + "@babel/types": "^7.28.5" }, "bin": { "parser": "bin/babel-parser.js" @@ -4214,18 +1200,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.0.tgz", - "integrity": "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", + "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.0", + "@babel/generator": "^7.28.5", "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.0", + "@babel/parser": "^7.28.5", "@babel/template": "^7.27.2", - "@babel/types": "^7.28.0", + "@babel/types": "^7.28.5", "debug": "^4.3.1" }, "engines": { @@ -4233,14 +1219,14 @@ } }, "node_modules/@babel/types": { - "version": "7.28.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", - "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", + "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1" + "@babel/helper-validator-identifier": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -4286,21 +1272,23 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/config-array": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", - "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@eslint/object-schema": "^2.1.6", + "@eslint/object-schema": "^2.1.7", "debug": "^4.3.1", "minimatch": "^3.1.2" }, @@ -4309,19 +1297,35 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", - "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers/node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/core": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", - "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz", + "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -4336,6 +1340,7 @@ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -4359,6 +1364,7 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" }, @@ -4367,9 +1373,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.36.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.36.0.tgz", - "integrity": "sha512-uhCbYtYynH30iZErszX78U+nR3pJU3RHGQ57NXy5QupD4SBVwDeU8TNBy+MjMngc1UyIW9noKqsRqfjQTBU2dw==", + "version": "9.38.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.38.0.tgz", + "integrity": "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A==", "dev": true, "license": "MIT", "engines": { @@ -4380,32 +1386,47 @@ } }, "node_modules/@eslint/object-schema": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", - "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/plugin-kit": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", - "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.15.2", + "@eslint/core": "^0.17.0", "levn": "^0.4.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@fastify/busboy": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "license": "MIT", "engines": { "node": ">=14" } @@ -4415,41 +1436,31 @@ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=18.18.0" } }, "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" + "@humanwhocodes/retry": "^0.4.0" }, "engines": { "node": ">=18.18.0" } }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "dev": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -4459,9 +1470,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", - "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -4882,9 +1893,9 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.12", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", - "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { @@ -4892,6 +1903,17 @@ "@jridgewell/trace-mapping": "^0.3.24" } }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", @@ -4903,16 +1925,16 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", - "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.29", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", - "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", "dependencies": { @@ -4948,93 +1970,29 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.9.tgz", - "integrity": "sha512-yiW0WI30zj8ZKoSYNx90no7ugVn3khlyH/z5W8qtKBtVE6awRALbhSG+2SAHA1r6bO/6M9utxYKVZ3PCJ1rWxw==", - "dependencies": { - "@smithy/types": "^3.7.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/config-resolver": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.3.3.tgz", - "integrity": "sha512-xSql8A1Bl41O9JvGU/CtgiLBlwkvpHTSKRlvz9zOBvBCPjXghZ6ZkcVzmV2f7FLAA+80+aqKmIOmy8pEDrtCaw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.3.3", - "@smithy/types": "^4.8.0", - "@smithy/util-config-provider": "^4.2.0", - "@smithy/util-middleware": "^4.2.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/config-resolver/node_modules/@smithy/node-config-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.3.tgz", - "integrity": "sha512-NzI1eBpBSViOav8NVy1fqOlSfkLgkUjUTlohUSgAEhHaFWA3XJiLditvavIP7OpvTjDp5u2LhtlBhkBlEisMwA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/config-resolver/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/config-resolver/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/config-resolver/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.4.tgz", + "integrity": "sha512-Z4DUr/AkgyFf1bOThW2HwzREagee0sB5ycl+hDiSZOfRLW8ZgrOjDi6g8mHH19yyU5E2A/64W3z6SMIf5XiUSQ==", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/config-resolver/node_modules/@smithy/util-middleware": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.3.tgz", - "integrity": "sha512-v5ObKlSe8PWUHCqEiX2fy1gNv6goiw6E5I/PN2aXg3Fb/hse0xeaAnSpXDiWl7x6LamVKq7senB+m5LOYHUAHw==", + "node_modules/@smithy/config-resolver": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.4.1.tgz", + "integrity": "sha512-BciDJ5hkyYEGBBKMbjGB1A/Zq8bYZ41Zo9BMnGdKF6QD1fY4zIkYx6zui/0CHaVGnv6h0iy8y4rnPX9CPCAPyQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/node-config-provider": "^4.3.4", + "@smithy/types": "^4.8.1", + "@smithy/util-config-provider": "^4.2.0", + "@smithy/util-endpoints": "^3.2.4", + "@smithy/util-middleware": "^4.2.4", "tslib": "^2.6.2" }, "engines": { @@ -5042,138 +2000,65 @@ } }, "node_modules/@smithy/core": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.5.5.tgz", - "integrity": "sha512-G8G/sDDhXA7o0bOvkc7bgai6POuSld/+XhNnWAbpQTpLv2OZPvyqQ58tLPPlz0bSNsXktldDDREIv1LczFeNEw==", - "dependencies": { - "@smithy/middleware-serde": "^3.0.11", - "@smithy/protocol-http": "^4.1.8", - "@smithy/types": "^3.7.2", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-middleware": "^3.0.11", - "@smithy/util-stream": "^3.3.2", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/credential-provider-imds": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.2.3.tgz", - "integrity": "sha512-hA1MQ/WAHly4SYltJKitEsIDVsNmXcQfYBRv2e+q04fnqtAX5qXaybxy/fhUeAMCnQIdAjaGDb04fMHQefWRhw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.3.3", - "@smithy/property-provider": "^4.2.3", - "@smithy/types": "^4.8.0", - "@smithy/url-parser": "^4.2.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/credential-provider-imds/node_modules/@smithy/node-config-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.3.tgz", - "integrity": "sha512-NzI1eBpBSViOav8NVy1fqOlSfkLgkUjUTlohUSgAEhHaFWA3XJiLditvavIP7OpvTjDp5u2LhtlBhkBlEisMwA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/credential-provider-imds/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/credential-provider-imds/node_modules/@smithy/querystring-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.3.tgz", - "integrity": "sha512-cYlSNHcTAX/wc1rpblli3aUlLMGgKZ/Oqn8hhjFASXMCXjIqeuQBei0cnq2JR8t4RtU9FpG6uyl6PxyArTiwKA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/credential-provider-imds/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", + "version": "3.17.2", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.17.2.tgz", + "integrity": "sha512-n3g4Nl1Te+qGPDbNFAYf+smkRVB+JhFsGy9uJXXZQEufoP4u0r+WLh6KvTDolCswaagysDc/afS1yvb2jnj1gQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/middleware-serde": "^4.2.4", + "@smithy/protocol-http": "^5.3.4", + "@smithy/types": "^4.8.1", + "@smithy/util-base64": "^4.3.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-middleware": "^4.2.4", + "@smithy/util-stream": "^4.5.5", + "@smithy/util-utf8": "^4.2.0", + "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/credential-provider-imds/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "node_modules/@smithy/credential-provider-imds": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.2.4.tgz", + "integrity": "sha512-YVNMjhdz2pVto5bRdux7GMs0x1m0Afz3OcQy/4Yf9DH4fWOtroGH7uLvs7ZmDyoBJzLdegtIPpXrpJOZWvUXdw==", "license": "Apache-2.0", "dependencies": { + "@smithy/node-config-provider": "^4.3.4", + "@smithy/property-provider": "^4.2.4", + "@smithy/types": "^4.8.1", + "@smithy/url-parser": "^4.2.4", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/credential-provider-imds/node_modules/@smithy/url-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.3.tgz", - "integrity": "sha512-I066AigYvY3d9VlU3zG9XzZg1yT10aNqvCaBTw9EPgu5GrsEl1aUkcMvhkIXascYH1A8W0LQo3B1Kr1cJNcQEw==", + "node_modules/@smithy/fetch-http-handler": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.5.tgz", + "integrity": "sha512-mg83SM3FLI8Sa2ooTJbsh5MFfyMTyNRwxqpKHmE0ICRIa66Aodv80DMsTQI02xBLVJ0hckwqTRr5IGAbbWuFLQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/querystring-parser": "^4.2.3", - "@smithy/types": "^4.8.0", + "@smithy/protocol-http": "^5.3.4", + "@smithy/querystring-builder": "^4.2.4", + "@smithy/types": "^4.8.1", + "@smithy/util-base64": "^4.3.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/fetch-http-handler": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-4.1.2.tgz", - "integrity": "sha512-R7rU7Ae3ItU4rC0c5mB2sP5mJNbCfoDc8I5XlYjIZnquyUwec7fEo78F6DA3SmgJgkU1qTMcZJuGblxZsl10ZA==", - "dependencies": { - "@smithy/protocol-http": "^4.1.8", - "@smithy/querystring-builder": "^3.0.11", - "@smithy/types": "^3.7.2", - "@smithy/util-base64": "^3.0.0", - "tslib": "^2.6.2" - } - }, "node_modules/@smithy/hash-node": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.2.3.tgz", - "integrity": "sha512-6+NOdZDbfuU6s1ISp3UOk5Rg953RJ2aBLNLLBEcamLjHAg1Po9Ha7QIB5ZWhdRUVuOUrT8BVFR+O2KIPmw027g==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.2.4.tgz", + "integrity": "sha512-kKU0gVhx/ppVMntvUOZE7WRMFW86HuaxLwvqileBEjL7PoILI8/djoILw3gPQloGVE6O0oOzqafxeNi2KbnUJw==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.8.1", "@smithy/util-buffer-from": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" @@ -5182,75 +2067,13 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/hash-node/node_modules/@smithy/is-array-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz", - "integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/hash-node/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz", - "integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz", - "integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/invalid-dependency": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.2.3.tgz", - "integrity": "sha512-Cc9W5DwDuebXEDMpOpl4iERo8I0KFjTnomK2RMdhhR87GwrSmUmwMxS4P5JdRf+LsjOdIqumcerwRgYMr/tZ9Q==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/invalid-dependency/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.2.4.tgz", + "integrity": "sha512-z6aDLGiHzsMhbS2MjetlIWopWz//K+mCoPXjW6aLr0mypF+Y7qdEh5TyJ20Onf9FbWHiWl4eC+rITdizpnXqOw==", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { @@ -5258,86 +2081,63 @@ } }, "node_modules/@smithy/is-array-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz", - "integrity": "sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-content-length": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.2.3.tgz", - "integrity": "sha512-/atXLsT88GwKtfp5Jr0Ks1CSa4+lB+IgRnkNrrYP0h1wL4swHNb0YONEvTceNKNdZGJsye+W2HH8W7olbcPUeA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/middleware-content-length/node_modules/@smithy/protocol-http": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.3.tgz", - "integrity": "sha512-Mn7f/1aN2/jecywDcRDvWWWJF4uwg/A0XjFMJtj72DsgHTByfjRltSqcT9NyE9RTdBSN6X1RSXrhn/YWQl8xlw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz", + "integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-content-length/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "node_modules/@smithy/middleware-content-length": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.2.4.tgz", + "integrity": "sha512-hJRZuFS9UsElX4DJSJfoX4M1qXRH+VFiLMUnhsWvtOOUWRNvvOfDaUSdlNbjwv1IkpVjj/Rd/O59Jl3nhAcxow==", "license": "Apache-2.0", "dependencies": { + "@smithy/protocol-http": "^5.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-endpoint": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.2.6.tgz", - "integrity": "sha512-WAqzyulvvSKrT5c6VrQelgNVNNO7BlTQW9Z+s9tcG6G5CaBS1YBpPtT3VuhXLQbewSiGi7oXQROwpw26EG9PLQ==", - "dependencies": { - "@smithy/core": "^2.5.5", - "@smithy/middleware-serde": "^3.0.11", - "@smithy/node-config-provider": "^3.1.12", - "@smithy/shared-ini-file-loader": "^3.1.12", - "@smithy/types": "^3.7.2", - "@smithy/url-parser": "^3.0.11", - "@smithy/util-middleware": "^3.0.11", + "node_modules/@smithy/middleware-endpoint": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.3.6.tgz", + "integrity": "sha512-PXehXofGMFpDqr933rxD8RGOcZ0QBAWtuzTgYRAHAL2BnKawHDEdf/TnGpcmfPJGwonhginaaeJIKluEojiF/w==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.17.2", + "@smithy/middleware-serde": "^4.2.4", + "@smithy/node-config-provider": "^4.3.4", + "@smithy/shared-ini-file-loader": "^4.3.4", + "@smithy/types": "^4.8.1", + "@smithy/url-parser": "^4.2.4", + "@smithy/util-middleware": "^4.2.4", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/middleware-retry": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.4.4.tgz", - "integrity": "sha512-vSgABQAkuUHRO03AhR2rWxVQ1un284lkBn+NFawzdahmzksAoOeVMnXXsuPViL4GlhRHXqFaMlc8Mj04OfQk1w==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.3.3", - "@smithy/protocol-http": "^5.3.3", - "@smithy/service-error-classification": "^4.2.3", - "@smithy/smithy-client": "^4.9.0", - "@smithy/types": "^4.8.0", - "@smithy/util-middleware": "^4.2.3", - "@smithy/util-retry": "^4.2.3", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.4.6.tgz", + "integrity": "sha512-OhLx131znrEDxZPAvH/OYufR9d1nB2CQADyYFN4C3V/NQS7Mg4V6uvxHC/Dr96ZQW8IlHJTJ+vAhKt6oxWRndA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.3.4", + "@smithy/protocol-http": "^5.3.4", + "@smithy/service-error-classification": "^4.2.4", + "@smithy/smithy-client": "^4.9.2", + "@smithy/types": "^4.8.1", + "@smithy/util-middleware": "^4.2.4", + "@smithy/util-retry": "^4.2.4", "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" }, @@ -5345,362 +2145,382 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-retry/node_modules/@smithy/node-config-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.3.tgz", - "integrity": "sha512-NzI1eBpBSViOav8NVy1fqOlSfkLgkUjUTlohUSgAEhHaFWA3XJiLditvavIP7OpvTjDp5u2LhtlBhkBlEisMwA==", + "node_modules/@smithy/middleware-serde": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.4.tgz", + "integrity": "sha512-jUr3x2CDhV15TOX2/Uoz4gfgeqLrRoTQbYAuhLS7lcVKNev7FeYSJ1ebEfjk+l9kbb7k7LfzIR/irgxys5ZTOg==", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", + "@smithy/protocol-http": "^5.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-retry/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", + "node_modules/@smithy/middleware-stack": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.4.tgz", + "integrity": "sha512-Gy3TKCOnm9JwpFooldwAboazw+EFYlC+Bb+1QBsSi5xI0W5lX81j/P5+CXvD/9ZjtYKRgxq+kkqd/KOHflzvgA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-retry/node_modules/@smithy/protocol-http": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.3.tgz", - "integrity": "sha512-Mn7f/1aN2/jecywDcRDvWWWJF4uwg/A0XjFMJtj72DsgHTByfjRltSqcT9NyE9RTdBSN6X1RSXrhn/YWQl8xlw==", + "node_modules/@smithy/node-config-provider": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.4.tgz", + "integrity": "sha512-3X3w7qzmo4XNNdPKNS4nbJcGSwiEMsNsRSunMA92S4DJLLIrH5g1AyuOA2XKM9PAPi8mIWfqC+fnfKNsI4KvHw==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/property-provider": "^4.2.4", + "@smithy/shared-ini-file-loader": "^4.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-retry/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", + "node_modules/@smithy/node-http-handler": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.4.tgz", + "integrity": "sha512-VXHGfzCXLZeKnFp6QXjAdy+U8JF9etfpUXD1FAbzY1GzsFJiDQRQIt2CnMUvUdz3/YaHNqT3RphVWMUpXTIODA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/abort-controller": "^4.2.4", + "@smithy/protocol-http": "^5.3.4", + "@smithy/querystring-builder": "^4.2.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-retry/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "node_modules/@smithy/property-provider": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.4.tgz", + "integrity": "sha512-g2DHo08IhxV5GdY3Cpt/jr0mkTlAD39EJKN27Jb5N8Fb5qt8KG39wVKTXiTRCmHHou7lbXR8nKVU14/aRUf86w==", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-retry/node_modules/@smithy/util-middleware": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.3.tgz", - "integrity": "sha512-v5ObKlSe8PWUHCqEiX2fy1gNv6goiw6E5I/PN2aXg3Fb/hse0xeaAnSpXDiWl7x6LamVKq7senB+m5LOYHUAHw==", + "node_modules/@smithy/protocol-http": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.4.tgz", + "integrity": "sha512-3sfFd2MAzVt0Q/klOmjFi3oIkxczHs0avbwrfn1aBqtc23WqQSmjvk77MBw9WkEQcwbOYIX5/2z4ULj8DuxSsw==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-serde": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.11.tgz", - "integrity": "sha512-KzPAeySp/fOoQA82TpnwItvX8BBURecpx6ZMu75EZDkAcnPtO6vf7q4aH5QHs/F1s3/snQaSFbbUMcFFZ086Mw==", + "node_modules/@smithy/querystring-builder": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.4.tgz", + "integrity": "sha512-KQ1gFXXC+WsbPFnk7pzskzOpn4s+KheWgO3dzkIEmnb6NskAIGp/dGdbKisTPJdtov28qNDohQrgDUKzXZBLig==", + "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.7.2", + "@smithy/types": "^4.8.1", + "@smithy/util-uri-escape": "^4.2.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-stack": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.11.tgz", - "integrity": "sha512-1HGo9a6/ikgOMrTrWL/WiN9N8GSVYpuRQO5kjstAq4CvV59bjqnh7TbdXGQ4vxLD3xlSjfBjq5t1SOELePsLnA==", + "node_modules/@smithy/querystring-parser": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.4.tgz", + "integrity": "sha512-aHb5cqXZocdzEkZ/CvhVjdw5l4r1aU/9iMEyoKzH4eXMowT6M0YjBpp7W/+XjkBnY8Xh0kVd55GKjnPKlCwinQ==", + "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.7.2", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, - "node_modules/@smithy/node-config-provider": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.12.tgz", - "integrity": "sha512-O9LVEu5J/u/FuNlZs+L7Ikn3lz7VB9hb0GtPT9MQeiBmtK8RSY3ULmsZgXhe6VAlgTw0YO+paQx4p8xdbs43vQ==", + "node_modules/@smithy/service-error-classification": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.2.4.tgz", + "integrity": "sha512-fdWuhEx4+jHLGeew9/IvqVU/fxT/ot70tpRGuOLxE3HzZOyKeTQfYeV1oaBXpzi93WOk668hjMuuagJ2/Qs7ng==", + "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^3.1.11", - "@smithy/shared-ini-file-loader": "^3.1.12", - "@smithy/types": "^3.7.2", - "tslib": "^2.6.2" + "@smithy/types": "^4.8.1" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, - "node_modules/@smithy/node-http-handler": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.3.2.tgz", - "integrity": "sha512-t4ng1DAd527vlxvOfKFYEe6/QFBcsj7WpNlWTyjorwXXcKw3XlltBGbyHfSJ24QT84nF+agDha9tNYpzmSRZPA==", + "node_modules/@smithy/shared-ini-file-loader": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.4.tgz", + "integrity": "sha512-y5ozxeQ9omVjbnJo9dtTsdXj9BEvGx2X8xvRgKnV+/7wLBuYJQL6dOa/qMY6omyHi7yjt1OA97jZLoVRYi8lxA==", + "license": "Apache-2.0", "dependencies": { - "@smithy/abort-controller": "^3.1.9", - "@smithy/protocol-http": "^4.1.8", - "@smithy/querystring-builder": "^3.0.11", - "@smithy/types": "^3.7.2", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, - "node_modules/@smithy/property-provider": { - "version": "3.1.11", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.11.tgz", - "integrity": "sha512-I/+TMc4XTQ3QAjXfOcUWbSS073oOEAxgx4aZy8jHaf8JQnRkq2SZWw8+PfDtBvLUjcGMdxl+YwtzWe6i5uhL/A==", + "node_modules/@smithy/signature-v4": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.4.tgz", + "integrity": "sha512-ScDCpasxH7w1HXHYbtk3jcivjvdA1VICyAdgvVqKhKKwxi+MTwZEqFw0minE+oZ7F07oF25xh4FGJxgqgShz0A==", + "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.7.2", + "@smithy/is-array-buffer": "^4.2.0", + "@smithy/protocol-http": "^5.3.4", + "@smithy/types": "^4.8.1", + "@smithy/util-hex-encoding": "^4.2.0", + "@smithy/util-middleware": "^4.2.4", + "@smithy/util-uri-escape": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, - "node_modules/@smithy/protocol-http": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.8.tgz", - "integrity": "sha512-hmgIAVyxw1LySOwkgMIUN0kjN8TG9Nc85LJeEmEE/cNEe2rkHDUWhnJf2gxcSRFLWsyqWsrZGw40ROjUogg+Iw==", + "node_modules/@smithy/smithy-client": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.3.6.tgz", + "integrity": "sha512-qdH+mvDHgq1ss6mocyIl2/VjlWXew7pGwZQydwYJczEc22HZyX3k8yVPV9aZsbYbssHPvMDRA5rfBDrjQUbIIw==", + "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.7.2", + "@smithy/middleware-endpoint": "^3.1.4", + "@smithy/middleware-stack": "^3.0.7", + "@smithy/protocol-http": "^4.1.4", + "@smithy/types": "^3.5.0", + "@smithy/util-stream": "^3.1.9", "tslib": "^2.6.2" }, "engines": { "node": ">=16.0.0" } }, - "node_modules/@smithy/querystring-builder": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.11.tgz", - "integrity": "sha512-u+5HV/9uJaeLj5XTb6+IEF/dokWWkEqJ0XiaRRogyREmKGUgZnNecLucADLdauWFKUNbQfulHFEZEdjwEBjXRg==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/abort-controller": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.9.tgz", + "integrity": "sha512-yiW0WI30zj8ZKoSYNx90no7ugVn3khlyH/z5W8qtKBtVE6awRALbhSG+2SAHA1r6bO/6M9utxYKVZ3PCJ1rWxw==", + "license": "Apache-2.0", "dependencies": { "@smithy/types": "^3.7.2", - "@smithy/util-uri-escape": "^3.0.0", "tslib": "^2.6.2" }, "engines": { "node": ">=16.0.0" } }, - "node_modules/@smithy/querystring-parser": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.11.tgz", - "integrity": "sha512-Je3kFvCsFMnso1ilPwA7GtlbPaTixa3WwC+K21kmMZHsBEOZYQaqxcMqeFFoU7/slFjKDIpiiPydvdJm8Q/MCw==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/core": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.5.7.tgz", + "integrity": "sha512-8olpW6mKCa0v+ibCjoCzgZHQx1SQmZuW/WkrdZo73wiTprTH6qhmskT60QLFdT9DRa5mXxjz89kQPZ7ZSsoqqg==", + "license": "Apache-2.0", "dependencies": { + "@smithy/middleware-serde": "^3.0.11", + "@smithy/protocol-http": "^4.1.8", "@smithy/types": "^3.7.2", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-middleware": "^3.0.11", + "@smithy/util-stream": "^3.3.4", + "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" }, "engines": { "node": ">=16.0.0" } }, - "node_modules/@smithy/service-error-classification": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.2.3.tgz", - "integrity": "sha512-NkxsAxFWwsPsQiwFG2MzJ/T7uIR6AQNh1SzcxSUnmmIqIQMlLRQDKhc17M7IYjiuBXhrQRjQTo3CxX+DobS93g==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/fetch-http-handler": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-4.1.3.tgz", + "integrity": "sha512-6SxNltSncI8s689nvnzZQc/dPXcpHQ34KUj6gR/HBroytKOd/isMG3gJF/zBE1TBmTT18TXyzhg3O3SOOqGEhA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0" - }, - "engines": { - "node": ">=18.0.0" + "@smithy/protocol-http": "^4.1.8", + "@smithy/querystring-builder": "^3.0.11", + "@smithy/types": "^3.7.2", + "@smithy/util-base64": "^3.0.0", + "tslib": "^2.6.2" } }, - "node_modules/@smithy/service-error-classification/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/is-array-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz", + "integrity": "sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/shared-ini-file-loader": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.12.tgz", - "integrity": "sha512-1xKSGI+U9KKdbG2qDvIR9dGrw3CNx+baqJfyr0igKEpjbHL5stsqAesYBzHChYHlelWtb87VnLWlhvfCz13H8Q==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/middleware-endpoint": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.2.8.tgz", + "integrity": "sha512-OEJZKVUEhMOqMs3ktrTWp7UvvluMJEvD5XgQwRePSbDg1VvBaL8pX8mwPltFn6wk1GySbcVwwyldL8S+iqnrEQ==", + "license": "Apache-2.0", "dependencies": { + "@smithy/core": "^2.5.7", + "@smithy/middleware-serde": "^3.0.11", + "@smithy/node-config-provider": "^3.1.12", + "@smithy/shared-ini-file-loader": "^3.1.12", "@smithy/types": "^3.7.2", + "@smithy/url-parser": "^3.0.11", + "@smithy/util-middleware": "^3.0.11", "tslib": "^2.6.2" }, "engines": { "node": ">=16.0.0" } }, - "node_modules/@smithy/signature-v4": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.3.tgz", - "integrity": "sha512-CmSlUy+eEYbIEYN5N3vvQTRfqt0lJlQkaQUIf+oizu7BbDut0pozfDjBGecfcfWf7c62Yis4JIEgqQ/TCfodaA==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/middleware-serde": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.11.tgz", + "integrity": "sha512-KzPAeySp/fOoQA82TpnwItvX8BBURecpx6ZMu75EZDkAcnPtO6vf7q4aH5QHs/F1s3/snQaSFbbUMcFFZ086Mw==", "license": "Apache-2.0", "dependencies": { - "@smithy/is-array-buffer": "^4.2.0", - "@smithy/protocol-http": "^5.3.3", - "@smithy/types": "^4.8.0", - "@smithy/util-hex-encoding": "^4.2.0", - "@smithy/util-middleware": "^4.2.3", - "@smithy/util-uri-escape": "^4.2.0", - "@smithy/util-utf8": "^4.2.0", + "@smithy/types": "^3.7.2", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/is-array-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz", - "integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/middleware-stack": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.11.tgz", + "integrity": "sha512-1HGo9a6/ikgOMrTrWL/WiN9N8GSVYpuRQO5kjstAq4CvV59bjqnh7TbdXGQ4vxLD3xlSjfBjq5t1SOELePsLnA==", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^3.7.2", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/protocol-http": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.3.tgz", - "integrity": "sha512-Mn7f/1aN2/jecywDcRDvWWWJF4uwg/A0XjFMJtj72DsgHTByfjRltSqcT9NyE9RTdBSN6X1RSXrhn/YWQl8xlw==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/node-config-provider": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.12.tgz", + "integrity": "sha512-O9LVEu5J/u/FuNlZs+L7Ikn3lz7VB9hb0GtPT9MQeiBmtK8RSY3ULmsZgXhe6VAlgTw0YO+paQx4p8xdbs43vQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/property-provider": "^3.1.11", + "@smithy/shared-ini-file-loader": "^3.1.12", + "@smithy/types": "^3.7.2", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/node-http-handler": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.3.3.tgz", + "integrity": "sha512-BrpZOaZ4RCbcJ2igiSNG16S+kgAc65l/2hmxWdmhyoGWHTLlzQzr06PXavJp9OBlPEG/sHlqdxjWmjzV66+BSQ==", "license": "Apache-2.0", "dependencies": { + "@smithy/abort-controller": "^3.1.9", + "@smithy/protocol-http": "^4.1.8", + "@smithy/querystring-builder": "^3.0.11", + "@smithy/types": "^3.7.2", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/util-buffer-from": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz", - "integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/property-provider": { + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.11.tgz", + "integrity": "sha512-I/+TMc4XTQ3QAjXfOcUWbSS073oOEAxgx4aZy8jHaf8JQnRkq2SZWw8+PfDtBvLUjcGMdxl+YwtzWe6i5uhL/A==", "license": "Apache-2.0", "dependencies": { - "@smithy/is-array-buffer": "^4.2.0", + "@smithy/types": "^3.7.2", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/util-hex-encoding": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.0.tgz", - "integrity": "sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/protocol-http": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.8.tgz", + "integrity": "sha512-hmgIAVyxw1LySOwkgMIUN0kjN8TG9Nc85LJeEmEE/cNEe2rkHDUWhnJf2gxcSRFLWsyqWsrZGw40ROjUogg+Iw==", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^3.7.2", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/util-middleware": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.3.tgz", - "integrity": "sha512-v5ObKlSe8PWUHCqEiX2fy1gNv6goiw6E5I/PN2aXg3Fb/hse0xeaAnSpXDiWl7x6LamVKq7senB+m5LOYHUAHw==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/querystring-builder": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.11.tgz", + "integrity": "sha512-u+5HV/9uJaeLj5XTb6+IEF/dokWWkEqJ0XiaRRogyREmKGUgZnNecLucADLdauWFKUNbQfulHFEZEdjwEBjXRg==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/types": "^3.7.2", + "@smithy/util-uri-escape": "^3.0.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/util-uri-escape": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.0.tgz", - "integrity": "sha512-igZpCKV9+E/Mzrpq6YacdTQ0qTiLm85gD6N/IrmyDvQFA4UnU3d5g3m8tMT/6zG/vVkWSU+VxeUyGonL62DuxA==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/querystring-parser": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.11.tgz", + "integrity": "sha512-Je3kFvCsFMnso1ilPwA7GtlbPaTixa3WwC+K21kmMZHsBEOZYQaqxcMqeFFoU7/slFjKDIpiiPydvdJm8Q/MCw==", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^3.7.2", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz", - "integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/shared-ini-file-loader": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.12.tgz", + "integrity": "sha512-1xKSGI+U9KKdbG2qDvIR9dGrw3CNx+baqJfyr0igKEpjbHL5stsqAesYBzHChYHlelWtb87VnLWlhvfCz13H8Q==", "license": "Apache-2.0", "dependencies": { - "@smithy/util-buffer-from": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/smithy-client": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.3.6.tgz", - "integrity": "sha512-qdH+mvDHgq1ss6mocyIl2/VjlWXew7pGwZQydwYJczEc22HZyX3k8yVPV9aZsbYbssHPvMDRA5rfBDrjQUbIIw==", - "dependencies": { - "@smithy/middleware-endpoint": "^3.1.4", - "@smithy/middleware-stack": "^3.0.7", - "@smithy/protocol-http": "^4.1.4", - "@smithy/types": "^3.5.0", - "@smithy/util-stream": "^3.1.9", + "@smithy/types": "^3.7.2", "tslib": "^2.6.2" }, "engines": { "node": ">=16.0.0" } }, - "node_modules/@smithy/types": { + "node_modules/@smithy/smithy-client/node_modules/@smithy/types": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.7.2.tgz", "integrity": "sha512-bNwBYYmN8Eh9RyjS1p2gW6MIhSO2rl7X9QeLM8iTdcGRP+eDiIWDt66c9IysCc22gefKszZv+ubV9qZc7hdESg==", + "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -5708,20 +2528,22 @@ "node": ">=16.0.0" } }, - "node_modules/@smithy/url-parser": { + "node_modules/@smithy/smithy-client/node_modules/@smithy/url-parser": { "version": "3.0.11", "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.11.tgz", "integrity": "sha512-TmlqXkSk8ZPhfc+SQutjmFr5FjC0av3GZP4B/10caK1SbRwe/v+Wzu/R6xEKxoNqL+8nY18s1byiy6HqPG37Aw==", + "license": "Apache-2.0", "dependencies": { "@smithy/querystring-parser": "^3.0.11", "@smithy/types": "^3.7.2", "tslib": "^2.6.2" } }, - "node_modules/@smithy/util-base64": { + "node_modules/@smithy/smithy-client/node_modules/@smithy/util-base64": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", + "license": "Apache-2.0", "dependencies": { "@smithy/util-buffer-from": "^3.0.0", "@smithy/util-utf8": "^3.0.0", @@ -5731,153 +2553,153 @@ "node": ">=16.0.0" } }, - "node_modules/@smithy/util-body-length-browser": { + "node_modules/@smithy/smithy-client/node_modules/@smithy/util-body-length-browser": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-3.0.0.tgz", "integrity": "sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ==", + "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" } }, - "node_modules/@smithy/util-body-length-node": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.2.1.tgz", - "integrity": "sha512-h53dz/pISVrVrfxV1iqXlx5pRg3V2YWFcSQyPyXZRrZoZj4R4DeWRDo1a7dd3CPTcFi3kE+98tuNyD2axyZReA==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/util-buffer-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", + "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", "license": "Apache-2.0", "dependencies": { + "@smithy/is-array-buffer": "^3.0.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/util-buffer-from": { + "node_modules/@smithy/smithy-client/node_modules/@smithy/util-hex-encoding": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", - "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", + "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", + "license": "Apache-2.0", "dependencies": { - "@smithy/is-array-buffer": "^3.0.0", "tslib": "^2.6.2" }, "engines": { "node": ">=16.0.0" } }, - "node_modules/@smithy/util-config-provider": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.2.0.tgz", - "integrity": "sha512-YEjpl6XJ36FTKmD+kRJJWYvrHeUvm5ykaUS5xK+6oXffQPHeEM4/nXlZPe+Wu0lsgRUcNZiliYNh/y7q9c2y6Q==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/util-middleware": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.11.tgz", + "integrity": "sha512-dWpyc1e1R6VoXrwLoLDd57U1z6CwNSdkM69Ie4+6uYh2GC7Vg51Qtan7ITzczuVpqezdDTKJGJB95fFvvjU/ow==", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^3.7.2", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/util-defaults-mode-browser": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.3.tgz", - "integrity": "sha512-vqHoybAuZXbFXZqgzquiUXtdY+UT/aU33sxa4GBPkiYklmR20LlCn+d3Wc3yA5ZM13gQ92SZe/D8xh6hkjx+IQ==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.3.4.tgz", + "integrity": "sha512-SGhGBG/KupieJvJSZp/rfHHka8BFgj56eek9px4pp7lZbOF+fRiVr4U7A3y3zJD8uGhxq32C5D96HxsTC9BckQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/smithy-client": "^4.9.0", - "@smithy/types": "^4.8.0", + "@smithy/fetch-http-handler": "^4.1.3", + "@smithy/node-http-handler": "^3.3.3", + "@smithy/types": "^3.7.2", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/util-defaults-mode-browser/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/util-uri-escape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", + "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/util-defaults-mode-browser/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "node_modules/@smithy/smithy-client/node_modules/@smithy/util-utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz", + "integrity": "sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==", "license": "Apache-2.0", "dependencies": { + "@smithy/util-buffer-from": "^3.0.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@smithy/util-defaults-mode-node": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.4.tgz", - "integrity": "sha512-X5/xrPHedifo7hJUUWKlpxVb2oDOiqPUXlvsZv1EZSjILoutLiJyWva3coBpn00e/gPSpH8Rn2eIbgdwHQdW7Q==", + "node_modules/@smithy/types": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.1.tgz", + "integrity": "sha512-N0Zn0OT1zc+NA+UVfkYqQzviRh5ucWwO7mBV3TmHHprMnfcJNfhlPicDkBHi0ewbh+y3evR6cNAW0Raxvb01NA==", "license": "Apache-2.0", "dependencies": { - "@smithy/config-resolver": "^4.3.3", - "@smithy/credential-provider-imds": "^4.2.3", - "@smithy/node-config-provider": "^4.3.3", - "@smithy/property-provider": "^4.2.3", - "@smithy/smithy-client": "^4.9.0", - "@smithy/types": "^4.8.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/node-config-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.3.tgz", - "integrity": "sha512-NzI1eBpBSViOav8NVy1fqOlSfkLgkUjUTlohUSgAEhHaFWA3XJiLditvavIP7OpvTjDp5u2LhtlBhkBlEisMwA==", + "node_modules/@smithy/url-parser": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.4.tgz", + "integrity": "sha512-w/N/Iw0/PTwJ36PDqU9PzAwVElo4qXxCC0eCTlUtIz/Z5V/2j/cViMHi0hPukSBHp4DVwvUlUhLgCzqSJ6plrg==", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", + "@smithy/querystring-parser": "^4.2.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", + "node_modules/@smithy/util-base64": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.3.0.tgz", + "integrity": "sha512-GkXZ59JfyxsIwNTWFnjmFEI8kZpRNIBfxKjv09+nkAWPt/4aGaEWMM04m4sxgNVWkbt2MdSvE3KF/PfX4nFedQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/util-buffer-from": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", + "node_modules/@smithy/util-body-length-browser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.2.0.tgz", + "integrity": "sha512-Fkoh/I76szMKJnBXWPdFkQJl2r9SjPt3cMzLdOB6eJ4Pnpas8hVoWPYemX/peO0yrrvldgCUVJqOAjUrOLjbxg==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "node_modules/@smithy/util-body-length-node": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.2.1.tgz", + "integrity": "sha512-h53dz/pISVrVrfxV1iqXlx5pRg3V2YWFcSQyPyXZRrZoZj4R4DeWRDo1a7dd3CPTcFi3kE+98tuNyD2axyZReA==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -5886,67 +2708,72 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/util-endpoints": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.2.3.tgz", - "integrity": "sha512-aCfxUOVv0CzBIkU10TubdgKSx5uRvzH064kaiPEWfNIvKOtNpu642P4FP1hgOFkjQIkDObrfIDnKMKkeyrejvQ==", + "node_modules/@smithy/util-buffer-from": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz", + "integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^4.3.3", - "@smithy/types": "^4.8.0", + "@smithy/is-array-buffer": "^4.2.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-endpoints/node_modules/@smithy/node-config-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.3.tgz", - "integrity": "sha512-NzI1eBpBSViOav8NVy1fqOlSfkLgkUjUTlohUSgAEhHaFWA3XJiLditvavIP7OpvTjDp5u2LhtlBhkBlEisMwA==", + "node_modules/@smithy/util-config-provider": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.2.0.tgz", + "integrity": "sha512-YEjpl6XJ36FTKmD+kRJJWYvrHeUvm5ykaUS5xK+6oXffQPHeEM4/nXlZPe+Wu0lsgRUcNZiliYNh/y7q9c2y6Q==", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^4.2.3", - "@smithy/shared-ini-file-loader": "^4.3.3", - "@smithy/types": "^4.8.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-endpoints/node_modules/@smithy/property-provider": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.3.tgz", - "integrity": "sha512-+1EZ+Y+njiefCohjlhyOcy1UNYjT+1PwGFHCxA/gYctjg3DQWAU19WigOXAco/Ql8hZokNehpzLd0/+3uCreqQ==", + "node_modules/@smithy/util-defaults-mode-browser": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.5.tgz", + "integrity": "sha512-GwaGjv/QLuL/QHQaqhf/maM7+MnRFQQs7Bsl6FlaeK6lm6U7mV5AAnVabw68cIoMl5FQFyKK62u7RWRzWL25OQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/property-provider": "^4.2.4", + "@smithy/smithy-client": "^4.9.2", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-endpoints/node_modules/@smithy/shared-ini-file-loader": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.3.tgz", - "integrity": "sha512-9f9Ixej0hFhroOK2TxZfUUDR13WVa8tQzhSzPDgXe5jGL3KmaM9s8XN7RQwqtEypI82q9KHnKS71CJ+q/1xLtQ==", + "node_modules/@smithy/util-defaults-mode-node": { + "version": "4.2.7", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.7.tgz", + "integrity": "sha512-6hinjVqec0WYGsqN7h9hL/ywfULmJJNXGXnNZW7jrIn/cFuC/aVlVaiDfBIJEvKcOrmN8/EgsW69eY0gXABeHw==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/config-resolver": "^4.4.1", + "@smithy/credential-provider-imds": "^4.2.4", + "@smithy/node-config-provider": "^4.3.4", + "@smithy/property-provider": "^4.2.4", + "@smithy/smithy-client": "^4.9.2", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-endpoints/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "node_modules/@smithy/util-endpoints": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.2.4.tgz", + "integrity": "sha512-f+nBDhgYRCmUEDKEQb6q0aCcOTXRDqH5wWaFHJxt4anB4pKHlgGoYP3xtioKXH64e37ANUkzWf6p4Mnv1M5/Vg==", "license": "Apache-2.0", "dependencies": { + "@smithy/node-config-provider": "^4.3.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { @@ -5954,48 +2781,38 @@ } }, "node_modules/@smithy/util-hex-encoding": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", - "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.0.tgz", + "integrity": "sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw==", + "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-middleware": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.11.tgz", - "integrity": "sha512-dWpyc1e1R6VoXrwLoLDd57U1z6CwNSdkM69Ie4+6uYh2GC7Vg51Qtan7ITzczuVpqezdDTKJGJB95fFvvjU/ow==", - "dependencies": { - "@smithy/types": "^3.7.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-retry": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.2.3.tgz", - "integrity": "sha512-lLPWnakjC0q9z+OtiXk+9RPQiYPNAovt2IXD3CP4LkOnd9NpUsxOjMx1SnoUVB7Orb7fZp67cQMtTBKMFDvOGg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.4.tgz", + "integrity": "sha512-fKGQAPAn8sgV0plRikRVo6g6aR0KyKvgzNrPuM74RZKy/wWVzx3BMk+ZWEueyN3L5v5EDg+P582mKU+sH5OAsg==", "license": "Apache-2.0", "dependencies": { - "@smithy/service-error-classification": "^4.2.3", - "@smithy/types": "^4.8.0", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-retry/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "node_modules/@smithy/util-retry": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.2.4.tgz", + "integrity": "sha512-yQncJmj4dtv/isTXxRb4AamZHy4QFr4ew8GxS6XLWt7sCIxkPxPzINWd7WLISEFPsIan14zrKgvyAF+/yzfwoA==", "license": "Apache-2.0", "dependencies": { + "@smithy/service-error-classification": "^4.2.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { @@ -6003,79 +2820,57 @@ } }, "node_modules/@smithy/util-stream": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.3.2.tgz", - "integrity": "sha512-sInAqdiVeisUGYAv/FrXpmJ0b4WTFmciTRqzhb7wVuem9BHvhIG7tpiYHLDWrl2stOokNZpTTGqz3mzB2qFwXg==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.5.tgz", + "integrity": "sha512-7M5aVFjT+HPilPOKbOmQfCIPchZe4DSBc1wf1+NvHvSoFTiFtauZzT+onZvCj70xhXd0AEmYnZYmdJIuwxOo4w==", + "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^4.1.2", - "@smithy/node-http-handler": "^3.3.2", - "@smithy/types": "^3.7.2", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-hex-encoding": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", + "@smithy/fetch-http-handler": "^5.3.5", + "@smithy/node-http-handler": "^4.4.4", + "@smithy/types": "^4.8.1", + "@smithy/util-base64": "^4.3.0", + "@smithy/util-buffer-from": "^4.2.0", + "@smithy/util-hex-encoding": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-uri-escape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", - "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz", - "integrity": "sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==", - "dependencies": { - "@smithy/util-buffer-from": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-waiter": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-4.2.3.tgz", - "integrity": "sha512-5+nU///E5sAdD7t3hs4uwvCTWQtTR8JwKwOCSJtBRx0bY1isDo1QwH87vRK86vlFLBTISqoDA2V6xvP6nF1isQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.0.tgz", + "integrity": "sha512-igZpCKV9+E/Mzrpq6YacdTQ0qTiLm85gD6N/IrmyDvQFA4UnU3d5g3m8tMT/6zG/vVkWSU+VxeUyGonL62DuxA==", "license": "Apache-2.0", "dependencies": { - "@smithy/abort-controller": "^4.2.3", - "@smithy/types": "^4.8.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-waiter/node_modules/@smithy/abort-controller": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.3.tgz", - "integrity": "sha512-xWL9Mf8b7tIFuAlpjKtRPnHrR8XVrwTj5NPYO/QwZPtc0SDLsPxb56V5tzi5yspSMytISHybifez+4jlrx0vkQ==", + "node_modules/@smithy/util-utf8": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz", + "integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.8.0", + "@smithy/util-buffer-from": "^4.2.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-waiter/node_modules/@smithy/types": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.8.0.tgz", - "integrity": "sha512-QpELEHLO8SsQVtqP+MkEgCYTFW0pleGozfs3cZ183ZBj9z3VC1CX1/wtFMK64p+5bhtZo41SeLK1rBRtd25nHQ==", + "node_modules/@smithy/util-waiter": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-4.2.4.tgz", + "integrity": "sha512-roKXtXIC6fopFvVOju8VYHtguc/jAcMlK8IlDOHsrQn0ayMkHynjm/D2DCMRf7MJFXzjHhlzg2edr3QPEakchQ==", "license": "Apache-2.0", "dependencies": { + "@smithy/abort-controller": "^4.2.4", + "@smithy/types": "^4.8.1", "tslib": "^2.6.2" }, "engines": { @@ -6130,20 +2925,21 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", - "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.20.7" + "@babel/types": "^7.28.2" } }, "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" }, "node_modules/@types/graceful-fs": { "version": "4.1.9", @@ -6190,13 +2986,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.1.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz", - "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", + "version": "24.9.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.9.2.tgz", + "integrity": "sha512-uWN8YqxXxqFMX2RqGOrumsKeti4LlmIMIyV0lgut4jx7KQBcBiW6vkDtIBvHnHIquwNfJhk8v2OtmO8zXWHfPA==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.8.0" + "undici-types": "~7.16.0" } }, "node_modules/@types/stack-utils": { @@ -6206,15 +3002,10 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/uuid": { - "version": "9.0.8", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", - "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==" - }, "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "version": "17.0.34", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.34.tgz", + "integrity": "sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A==", "dev": true, "license": "MIT", "dependencies": { @@ -6229,10 +3020,11 @@ "license": "MIT" }, "node_modules/@vercel/ncc": { - "version": "0.38.3", - "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.3.tgz", - "integrity": "sha512-rnK6hJBS6mwc+Bkab+PGPs9OiS0i/3kdTO+CkI8V0/VrW3vmz7O2Pxjw/owOlmo6PKEIxRSeZKv/kuL9itnpYA==", + "version": "0.38.4", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.4.tgz", + "integrity": "sha512-8LwjnlP39s08C08J5NstzriPvW1SP8Zfpp1BvC2sI35kPeZnHfxVkCwu4/+Wodgnd60UtT1n8K8zw+Mp7J9JmQ==", "dev": true, + "license": "MIT", "bin": { "ncc": "dist/ncc/cli.js" } @@ -6242,6 +3034,8 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, + "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -6254,6 +3048,7 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -6263,6 +3058,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -6305,6 +3101,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -6333,7 +3130,8 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/babel-jest": { "version": "29.7.0", @@ -6408,9 +3206,9 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", - "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", "dev": true, "license": "MIT", "dependencies": { @@ -6431,7 +3229,7 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0 || ^8.0.0-0" } }, "node_modules/babel-preset-jest": { @@ -6455,12 +3253,24 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.8.21", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.21.tgz", + "integrity": "sha512-JU0h5APyQNsHOlAM7HnQnPToSDQoEBZqzu/YBlqDnEeymPnZDREeXJA3KBMQee+dKteAxZ2AtvQEvVYdZf241Q==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } }, "node_modules/bowser": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", - "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.12.1.tgz", + "integrity": "sha512-z4rE2Gxh7tvshQ4hluIT7XcFrgLIQaw9X3A+kTTRdovCz5PMukm/0QC/BKSYPj3omF5Qfypn9O/c5kgpmvYUCw==", + "license": "MIT" }, "node_modules/brace-expansion": { "version": "1.1.12", @@ -6487,9 +3297,9 @@ } }, "node_modules/browserslist": { - "version": "4.25.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz", - "integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==", + "version": "4.27.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", + "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", "dev": true, "funding": [ { @@ -6506,11 +3316,13 @@ } ], "license": "MIT", + "peer": true, "dependencies": { - "caniuse-lite": "^1.0.30001726", - "electron-to-chromium": "^1.5.173", - "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.3" + "baseline-browser-mapping": "^2.8.19", + "caniuse-lite": "^1.0.30001751", + "electron-to-chromium": "^1.5.238", + "node-releases": "^2.0.26", + "update-browserslist-db": "^1.1.4" }, "bin": { "browserslist": "cli.js" @@ -6541,6 +3353,7 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -6556,9 +3369,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001727", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001727.tgz", - "integrity": "sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q==", + "version": "1.0.30001751", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz", + "integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==", "dev": true, "funding": [ { @@ -6581,6 +3394,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -6652,9 +3466,9 @@ } }, "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", "dev": true, "license": "MIT" }, @@ -6663,6 +3477,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6674,13 +3489,15 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/convert-source-map": { "version": "2.0.0", @@ -6716,6 +3533,7 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -6726,10 +3544,11 @@ } }, "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "^2.1.3" }, @@ -6743,9 +3562,9 @@ } }, "node_modules/dedent": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz", - "integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", + "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", "dev": true, "license": "MIT", "peerDependencies": { @@ -6761,7 +3580,8 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/deepmerge": { "version": "4.3.1", @@ -6794,9 +3614,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.190", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.190.tgz", - "integrity": "sha512-k4McmnB2091YIsdCgkS0fMVMPOJgxl93ltFzaryXqwip1AaxeDqKCGLxkXODDA5Ab/D+tV5EL5+aTx76RvLRxw==", + "version": "1.5.244", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.244.tgz", + "integrity": "sha512-OszpBN7xZX4vWMPJwB9illkN/znA8M36GQqQxi6MNy9axWxhOfJyZZJtSLQCpEFLHP2xK33BiWx9aIuIEXVCcw==", "dev": true, "license": "ISC" }, @@ -6821,9 +3641,9 @@ "license": "MIT" }, "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6845,6 +3665,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -6853,25 +3674,25 @@ } }, "node_modules/eslint": { - "version": "9.35.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.35.0.tgz", - "integrity": "sha512-QePbBFMJFjgmlE+cXAlbHZbHpdFVS2E/6vzCy7aKlebddvl1vadiC4JFV5u/wqTkNUwEV8WrQi257jf5f06hrg==", + "version": "9.38.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.38.0.tgz", + "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.21.0", - "@eslint/config-helpers": "^0.3.1", - "@eslint/core": "^0.15.2", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.1", + "@eslint/core": "^0.16.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.35.0", - "@eslint/plugin-kit": "^0.3.5", + "@eslint/js": "9.38.0", + "@eslint/plugin-kit": "^0.4.0", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", @@ -6918,6 +3739,7 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -6934,6 +3756,7 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -6941,24 +3764,12 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "9.35.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.35.0.tgz", - "integrity": "sha512-30iXE9whjlILfWobBkNerJo+TXYsgVM5ERQwMcMKCHckHflCmf7wXDAHlARoWnh0s1U72WqlbeyE7iAcCzuCPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, "node_modules/espree": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", @@ -6990,6 +3801,7 @@ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -7002,6 +3814,7 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -7014,6 +3827,7 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -7023,6 +3837,7 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -7081,19 +3896,22 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-xml-parser": { "version": "5.2.5", @@ -7128,6 +3946,7 @@ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^4.0.0" }, @@ -7153,6 +3972,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -7169,6 +3989,7 @@ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" @@ -7178,10 +3999,11 @@ } }, "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", - "dev": true + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" }, "node_modules/fs.realpath": { "version": "1.0.0", @@ -7285,6 +4107,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -7317,6 +4140,7 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -7356,6 +4180,7 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } @@ -7365,6 +4190,7 @@ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -7401,6 +4227,7 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -7452,6 +4279,7 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7481,6 +4309,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -7515,7 +4344,8 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", @@ -7545,9 +4375,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -7588,9 +4418,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8084,9 +4914,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -8209,6 +5039,7 @@ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -8233,7 +5064,8 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", @@ -8246,13 +5078,15 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json5": { "version": "2.2.3", @@ -8272,6 +5106,7 @@ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, + "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } @@ -8301,6 +5136,7 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -8321,6 +5157,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -8335,7 +5172,8 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lru-cache": { "version": "5.1.1", @@ -8364,9 +5202,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -8422,6 +5260,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -8433,13 +5272,15 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/node-int64": { "version": "0.4.0", @@ -8449,9 +5290,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", "dev": true, "license": "MIT" }, @@ -8509,6 +5350,7 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -8526,6 +5368,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -8541,6 +5384,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -8566,6 +5410,7 @@ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -8597,6 +5442,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -8616,6 +5462,7 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -8731,6 +5578,7 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } @@ -8782,6 +5630,7 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -8821,13 +5670,13 @@ } }, "node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.16.0", + "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -8869,6 +5718,7 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -8898,6 +5748,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -8910,6 +5761,7 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -9056,6 +5908,7 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -9080,6 +5933,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -9138,12 +5992,14 @@ "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "license": "MIT", "engines": { "node": ">=0.6.11 <=0.7.0 || >=0.7.3" } @@ -9153,6 +6009,7 @@ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -9196,16 +6053,16 @@ } }, "node_modules/undici-types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", - "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", "dev": true, "license": "MIT" }, "node_modules/update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", + "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", "dev": true, "funding": [ { @@ -9238,22 +6095,11 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", @@ -9284,6 +6130,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -9299,6 +6146,7 @@ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -9405,6 +6253,7 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index f613393f..c8e7227f 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "dependencies": { "@actions/core": "^1.10.1", "@aws-sdk/client-codedeploy": "^3.913.0", - "@aws-sdk/client-ecs": "^3.883.0", + "@aws-sdk/client-ecs": "^3.908.0", "yaml": "^2.8.1" }, "devDependencies": {