@thunderclient/cli 1.19.0 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=114,exports.ids=[114],exports.modules={856:(e,r,o)=>{o.r(r),o.d(r,{fromProcess:()=>d});var t=o(47),n=o(46),s=o(30),i=o(9),c=o(66);const a=async(e,r,o)=>{const t=r[e];if(!r[e])throw new n.C1(`Profile ${e} could not be found in shared credentials file.`,{logger:o});{const a=t.credential_process;if(void 0===a)throw new n.C1(`Profile ${e} did not contain credential_process.`,{logger:o});{const t=(0,i.promisify)(s.exec);try{const{stdout:o}=await t(a);let n;try{n=JSON.parse(o.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}return((e,r,o)=>{if(1!==r.Version)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(void 0===r.AccessKeyId||void 0===r.SecretAccessKey)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(r.Expiration){const o=new Date;if(new Date(r.Expiration)<o)throw Error(`Profile ${e} credential_process returned expired credentials.`)}let t=r.AccountId;!t&&o?.[e]?.aws_account_id&&(t=o[e].aws_account_id);const n={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,...r.SessionToken&&{sessionToken:r.SessionToken},...r.Expiration&&{expiration:new Date(r.Expiration)},...r.CredentialScope&&{credentialScope:r.CredentialScope},...t&&{accountId:t}};return(0,c.g)(n,"CREDENTIALS_PROCESS","w"),n})(e,n,r)}catch(e){throw new n.C1(e.message,{logger:o})}}}},d=(e={})=>async({callerClientConfig:r}={})=>{e.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const o=await(0,t.YU)(e);return a((0,t.Bz)({profile:e.profile??r?.profile}),o,e.logger)}}};
3
+ //# sourceMappingURL=114.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=330,exports.ids=[330],exports.modules={858:(e,t,a)=>{a.d(t,{ENV_CMDS_FULL_URI:()=>f,ENV_CMDS_RELATIVE_URI:()=>m,fromContainerMetadata:()=>h,fromInstanceMetadata:()=>$,getInstanceMetadataEndpoint:()=>T,httpRequest:()=>s});var n=a(46),r=a(4),o=a(29),i=a(23);function s(e){return new Promise(((t,a)=>{const r=(0,i.request)({method:"GET",...e,hostname:e.hostname?.replace(/^\[(.+)\]$/,"$1")});r.on("error",(e=>{a(Object.assign(new n.mZ("Unable to connect to instance metadata service"),e)),r.destroy()})),r.on("timeout",(()=>{a(new n.mZ("TimeoutError from instance metadata service")),r.destroy()})),r.on("response",(e=>{const{statusCode:i=400}=e;(i<200||300<=i)&&(a(Object.assign(new n.mZ("Error response received from instance metadata service"),{statusCode:i})),r.destroy());const s=[];e.on("data",(e=>{s.push(e)})),e.on("end",(()=>{t(o.Buffer.concat(s)),r.destroy()}))})),r.end()}))}const c=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.AccessKeyId&&"string"==typeof e.SecretAccessKey&&"string"==typeof e.Token&&"string"==typeof e.Expiration,l=e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration),...e.AccountId&&{accountId:e.AccountId}}),d=({maxRetries:e=0,timeout:t=1e3})=>({maxRetries:e,timeout:t}),u=(e,t)=>{let a=e();for(let n=0;n<t;n++)a=a.catch(e);return a},f="AWS_CONTAINER_CREDENTIALS_FULL_URI",m="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",p="AWS_CONTAINER_AUTHORIZATION_TOKEN",h=(e={})=>{const{timeout:t,maxRetries:a}=d(e);return()=>u((async()=>{const a=await y({logger:e.logger}),r=JSON.parse(await w(t,a));if(!c(r))throw new n.C1("Invalid response received from instance metadata service.",{logger:e.logger});return l(r)}),a)},w=async(e,t)=>{process.env[p]&&(t.headers={...t.headers,Authorization:process.env[p]});return(await s({...t,timeout:e})).toString()},v={localhost:!0,"127.0.0.1":!0},g={"http:":!0,"https:":!0},y=async({logger:e})=>{if(process.env[m])return{hostname:"169.254.170.2",path:process.env[m]};if(process.env[f]){const t=(0,r.parse)(process.env[f]);if(!t.hostname||!(t.hostname in v))throw new n.C1(`${t.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:e});if(!t.protocol||!(t.protocol in g))throw new n.C1(`${t.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:e});return{...t,port:t.port?parseInt(t.port,10):void 0}}throw new n.C1(`The container metadata credential provider cannot be used unless the ${m} or ${f} environment variable is set`,{tryNextLink:!1,logger:e})};var E=a(45);class I extends n.C1{constructor(e,t=!0){super(e,t),this.tryNextLink=t,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,I.prototype)}}var A,S=a(48);!function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]"}(A||(A={}));const b={environmentVariableSelector:e=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:e=>e.ec2_metadata_service_endpoint,default:void 0};var _;!function(e){e.IPv4="IPv4",e.IPv6="IPv6"}(_||(_={}));const x={environmentVariableSelector:e=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE,configFileSelector:e=>e.ec2_metadata_service_endpoint_mode,default:_.IPv4},T=async()=>(0,S.D)(await N()||await R()),N=async()=>(0,E.Z)(b)(),R=async()=>{const e=await(0,E.Z)(x)();switch(e){case _.IPv4:return A.IPv4;case _.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(_)}`)}},k=(e,t)=>{const a=300+Math.floor(300*Math.random()),n=new Date(Date.now()+1e3*a);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(n)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const r=e.originalExpiration??e.expiration;return{...e,...r?{originalExpiration:r}:{},expiration:n}},D="/latest/meta-data/iam/security-credentials/",C="AWS_EC2_METADATA_V1_DISABLED",M="ec2_metadata_v1_disabled",O="x-aws-ec2-metadata-token",$=(e={})=>((e,t={})=>{const a=t?.logger||console;let n;return async()=>{let t;try{t=await e(),t.expiration&&t.expiration.getTime()<Date.now()&&(t=k(t,a))}catch(e){if(!n)throw e;a.warn("Credential renew failed: ",e),t=k(n,a)}return n=t,t}})(L(e),{logger:e.logger}),L=(e={})=>{let t=!1;const{logger:a,profile:r}=e,{timeout:o,maxRetries:i}=d(e),s=async(a,o)=>{if(t||null==o.headers?.[O]){let t=!1,a=!1;const o=await(0,E.Z)({environmentVariableSelector:t=>{const r=t[C];if(a=!!r&&"false"!==r,void 0===r)throw new n.C1(`${C} not set in env, checking config file next.`,{logger:e.logger});return a},configFileSelector:e=>{const a=e[M];return t=!!a&&"false"!==a,t},default:!1},{profile:r})();if(e.ec2MetadataV1Disabled||o){const n=[];throw e.ec2MetadataV1Disabled&&n.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),t&&n.push(`config file profile (${M})`),a&&n.push(`process environment variable (${C})`),new I(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${n.join(", ")}].`)}}const i=(await u((async()=>{let e;try{e=await V(o)}catch(e){throw 401===e.statusCode&&(t=!1),e}return e}),a)).trim();return u((async()=>{let a;try{a=await W(i,o,e)}catch(e){throw 401===e.statusCode&&(t=!1),e}return a}),a)};return async()=>{const e=await T();if(t)return a?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),s(i,{...e,timeout:o});{let n;try{n=(await U({...e,timeout:o})).toString()}catch(n){if(400===n?.statusCode)throw Object.assign(n,{message:"EC2 Metadata token request returned error"});return("TimeoutError"===n.message||[403,404,405].includes(n.statusCode))&&(t=!0),a?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),s(i,{...e,timeout:o})}return s(i,{...e,headers:{[O]:n},timeout:o})}}},U=async e=>s({...e,path:"/latest/api/token",method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),V=async e=>(await s({...e,path:D})).toString(),W=async(e,t,a)=>{const r=JSON.parse((await s({...t,path:D+e})).toString());if(!c(r))throw new n.C1("Invalid response received from instance metadata service.",{logger:a.logger});return l(r)}}};
3
+ //# sourceMappingURL=330.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=476,exports.ids=[476],exports.modules={854:(e,s,o)=>{o.d(s,{fromSSO:()=>u});var t=o(46),n=o(47);var r=o(66);const i="To refresh this SSO session run 'aws sso login' with the corresponding profile.",a=async(e,s,t={})=>{const{CreateTokenCommand:n}=await o.e(622).then(o.bind(o,863)),r=await(async(e,s={})=>{const{SSOOIDCClient:t}=await o.e(622).then(o.bind(o,863));return new t(Object.assign({},s.clientConfig??{},{region:e??s.clientConfig?.region,logger:s.clientConfig?.logger??s.parentClientConfig?.logger}))})(s,t);return r.send(new n({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))},c=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new t.Jh(`Token is expired. ${i}`,!1)},l=(e,s,o=!1)=>{if(void 0===s)throw new t.Jh(`Value not present for '${e}' in SSO Token${o?". Cannot refresh":""}. ${i}`,!1)};var f=o(6);const{writeFile:w}=f.promises,g=new Date(0),d=(e={})=>async({callerClientConfig:s}={})=>{const o={...e,parentClientConfig:{...s,...e.parentClientConfig}};o.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await(0,n.YU)(o),f=(0,n.Bz)({profile:o.profile??s?.profile}),d=r[f];if(!d)throw new t.Jh(`Profile '${f}' could not be found in shared credentials file.`,!1);if(!d.sso_session)throw new t.Jh(`Profile '${f}' is missing required property 'sso_session'.`);const h=d.sso_session,S=(await(0,n.qw)(o))[h];if(!S)throw new t.Jh(`Sso session '${h}' could not be found in shared credentials file.`,!1);for(const e of["sso_start_url","sso_region"])if(!S[e])throw new t.Jh(`Sso session '${h}' is missing required property '${e}'.`,!1);S.sso_start_url;const u=S.sso_region;let p;try{p=await(0,n.vf)(h)}catch(e){throw new t.Jh(`The SSO session token associated with profile=${f} was not found or is invalid. ${i}`,!1)}l("accessToken",p.accessToken),l("expiresAt",p.expiresAt);const{accessToken:y,expiresAt:C}=p,k={token:y,expiration:new Date(C)};if(k.expiration.getTime()-Date.now()>3e5)return k;if(Date.now()-g.getTime()<3e4)return c(k),k;l("clientId",p.clientId,!0),l("clientSecret",p.clientSecret,!0),l("refreshToken",p.refreshToken,!0);try{g.setTime(Date.now());const e=await a(p,u,o);l("accessToken",e.accessToken),l("expiresIn",e.expiresIn);const s=new Date(Date.now()+1e3*e.expiresIn);try{await((e,s)=>{const o=(0,n.C9)(e),t=JSON.stringify(s,null,2);return w(o,t)})(h,{...p,accessToken:e.accessToken,expiresAt:s.toISOString(),refreshToken:e.refreshToken})}catch(e){}return{token:e.accessToken,expiration:s}}catch(e){return c(k),k}},h=!1,S=async({ssoStartUrl:e,ssoSession:s,ssoAccountId:i,ssoRegion:a,ssoRoleName:c,ssoClient:l,clientConfig:f,parentClientConfig:w,profile:g,logger:S})=>{let u;const p="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{const e=await d({profile:g})();u={accessToken:e.token,expiresAt:new Date(e.expiration).toISOString()}}catch(e){throw new t.C1(e.message,{tryNextLink:h,logger:S})}else try{u=await(0,n.vf)(e)}catch(e){throw new t.C1(`The SSO session associated with this profile is invalid. ${p}`,{tryNextLink:h,logger:S})}if(new Date(u.expiresAt).getTime()-Date.now()<=0)throw new t.C1(`The SSO session associated with this profile has expired. ${p}`,{tryNextLink:h,logger:S});const{accessToken:y}=u,{SSOClient:C,GetRoleCredentialsCommand:k}=await o.e(736).then(o.bind(o,860)),_=l||new C(Object.assign({},f??{},{logger:f?.logger??w?.logger,region:f?.region??a}));let m;try{m=await _.send(new k({accountId:i,roleName:c,accessToken:y}))}catch(e){throw new t.C1(e,{tryNextLink:h,logger:S})}const{roleCredentials:{accessKeyId:T,secretAccessKey:x,sessionToken:O,expiration:N,credentialScope:$,accountId:I}={}}=m;if(!(T&&x&&O&&N))throw new t.C1("SSO returns an invalid temporary credential.",{tryNextLink:h,logger:S});const D={accessKeyId:T,secretAccessKey:x,sessionToken:O,expiration:new Date(N),...$&&{credentialScope:$},...I&&{accountId:I}};return s?(0,r.g)(D,"CREDENTIALS_SSO","s"):(0,r.g)(D,"CREDENTIALS_SSO_LEGACY","u"),D},u=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:o,ssoAccountId:r,ssoRegion:i,ssoRoleName:a,ssoSession:c}=e,{ssoClient:l}=e,f=(0,n.Bz)({profile:e.profile??s?.profile});if(o||r||i||a||c){if(o&&r&&i&&a)return S({ssoStartUrl:o,ssoSession:c,ssoAccountId:r,ssoRegion:i,ssoRoleName:a,ssoClient:l,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:f});throw new t.C1('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger})}{const s=(await(0,n.YU)(e))[f];if(!s)throw new t.C1(`Profile ${f} was not found.`,{logger:e.logger});if(!(w=s)||"string"!=typeof w.sso_start_url&&"string"!=typeof w.sso_account_id&&"string"!=typeof w.sso_session&&"string"!=typeof w.sso_region&&"string"!=typeof w.sso_role_name)throw new t.C1(`Profile ${f} is not configured with SSO credentials.`,{logger:e.logger});if(s?.sso_session){const r=(await(0,n.qw)(e))[s.sso_session],a=` configurations in profile ${f} and sso-session ${s.sso_session}`;if(i&&i!==r.sso_region)throw new t.C1("Conflicting SSO region"+a,{tryNextLink:!1,logger:e.logger});if(o&&o!==r.sso_start_url)throw new t.C1("Conflicting SSO start_url"+a,{tryNextLink:!1,logger:e.logger});s.sso_region=r.sso_region,s.sso_start_url=r.sso_start_url}const{sso_start_url:r,sso_account_id:a,sso_region:c,sso_role_name:g,sso_session:d}=((e,s)=>{const{sso_start_url:o,sso_account_id:n,sso_region:r,sso_role_name:i}=e;if(!(o&&n&&r&&i))throw new t.C1(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:s});return e})(s,e.logger);return S({ssoStartUrl:r,ssoSession:d,ssoAccountId:a,ssoRegion:c,ssoRoleName:g,ssoClient:l,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:f})}var w}}};
3
+ //# sourceMappingURL=476.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=522,exports.ids=[522],exports.modules={857:(e,o,n)=>{n.r(o),n.d(o,{fromTokenFile:()=>c,fromWebToken:()=>t});var r=n(66),i=n(46),s=n(6);const t=e=>async o=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:r,roleSessionName:i,webIdentityToken:s,providerId:t,policyArns:d,policy:c,durationSeconds:a}=e;let{roleAssumerWithWebIdentity:l}=e;if(!l){const{getDefaultRoleAssumerWithWebIdentity:r}=await n.e(697).then(n.bind(n,865));l=r({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...o?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return l({RoleArn:r,RoleSessionName:i??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:s,ProviderId:t,PolicyArns:d,Policy:c,DurationSeconds:a})},d="AWS_WEB_IDENTITY_TOKEN_FILE",c=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const o=e?.webIdentityTokenFile??process.env[d],n=e?.roleArn??process.env.AWS_ROLE_ARN,c=e?.roleSessionName??process.env.AWS_ROLE_SESSION_NAME;if(!o||!n)throw new i.C1("Web identity configuration not specified",{logger:e.logger});const a=await t({...e,webIdentityToken:(0,s.readFileSync)(o,{encoding:"ascii"}),roleArn:n,roleSessionName:c})();return o===process.env[d]&&(0,r.g)(a,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h"),a}}};
3
+ //# sourceMappingURL=522.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=622,exports.ids=[622],exports.modules={863:(e,t,n)=>{n.d(t,{CreateTokenCommand:()=>Le,SSOOIDCClient:()=>le});var r=n(32),s=n(35),o=n(36),i=n(37),a=n(41),c=n(77),p=n(78),d=n(79),u=n(43),h=n(44),l=n(50),m=n(54),w=n(65),x=n(42);const f=async(e,t,n)=>({operation:(0,x.u)(t).operation,region:await(0,x.t)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const y=e=>{const t=[];if("CreateToken"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},E={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var S=n(864),v=n(74),g=n(75),b=n(68),I=n(70),P=n(45),O=n(60),$=n(71),k=n(51),C=n(72),j=n(862),D=n(48),T=n(56),A=n(59),_=n(39),z=n(40);const R="required",U="fn",q="argv",F="ref",G=!0,H="isSet",V="booleanEquals",M="error",N="endpoint",B="tree",J="PartitionResult",L="getAttr",W={[R]:!1,type:"String"},K={[R]:!0,default:!1,type:"Boolean"},Q={[F]:"Endpoint"},X={[U]:V,[q]:[{[F]:"UseFIPS"},!0]},Y={[U]:V,[q]:[{[F]:"UseDualStack"},!0]},Z={},ee={[U]:L,[q]:[{[F]:J},"supportsFIPS"]},te={[F]:J},ne={[U]:V,[q]:[!0,{[U]:L,[q]:[te,"supportsDualStack"]}]},re=[X],se=[Y],oe=[{[F]:"Region"}],ie={version:"1.0",parameters:{Region:W,UseDualStack:K,UseFIPS:K,Endpoint:W},rules:[{conditions:[{[U]:H,[q]:[Q]}],rules:[{conditions:re,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:M},{conditions:se,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:M},{endpoint:{url:Q,properties:Z,headers:Z},type:N}],type:B},{conditions:[{[U]:H,[q]:oe}],rules:[{conditions:[{[U]:"aws.partition",[q]:oe,assign:J}],rules:[{conditions:[X,Y],rules:[{conditions:[{[U]:V,[q]:[G,ee]},ne],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Z,headers:Z},type:N}],type:B},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:M}],type:B},{conditions:re,rules:[{conditions:[{[U]:V,[q]:[ee,G]}],rules:[{conditions:[{[U]:"stringEquals",[q]:[{[U]:L,[q]:[te,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:Z,headers:Z},type:N},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Z,headers:Z},type:N}],type:B},{error:"FIPS is enabled but this partition does not support FIPS",type:M}],type:B},{conditions:se,rules:[{conditions:[ne],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Z,headers:Z},type:N}],type:B},{error:"DualStack is enabled but this partition does not support DualStack",type:M}],type:B},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:Z,headers:Z},type:N}],type:B}],type:B},{error:"Invalid Configuration: Missing Region",type:M}]},ae=new z.kS({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ce=(e,t={})=>ae.get(e,(()=>(0,z.sO)(ie,{endpointParams:e,logger:t.logger})));z.mw.aws=_.UF;var pe=n(73);const de=e=>{(0,m.I9)(process.version);const t=(0,pe.I)(e),n=()=>t().then(m.lT),r=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??T.E,base64Encoder:e?.base64Encoder??T.n,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ce,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??y,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new C.f2},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new j.m}],logger:e?.logger??new m.N4,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??D.D,utf8Decoder:e?.utf8Decoder??A.ar,utf8Encoder:e?.utf8Encoder??A.Pq}))(e);(0,v.I)(process.version);const s={profile:e?.profile,logger:r.logger};return{...r,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,P.Z)(g.$,s),bodyLengthChecker:e?.bodyLengthChecker??$.n,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,b.pf)({serviceId:r.serviceId,clientVersion:S.rE}),maxAttempts:e?.maxAttempts??(0,P.Z)(l.qs,e),region:e?.region??(0,P.Z)(a.GG,{...a.zH,...s}),requestHandler:O.$c.create(e?.requestHandler??n),retryMode:e?.retryMode??(0,P.Z)({...l.kN,default:async()=>(await n()).retryMode||k.L0},e),sha256:e?.sha256??I.V.bind(null,"sha256"),streamCollector:e?.streamCollector??O.kv,useDualstackEndpoint:e?.useDualstackEndpoint??(0,P.Z)(a.e$,s),useFipsEndpoint:e?.useFipsEndpoint??(0,P.Z)(a.Ko,s),userAgentAppId:e?.userAgentAppId??(0,P.Z)(b.hV,s)}};var ue=n(76),he=n(33);class le extends m.Kj{config;constructor(...[e]){const t=de(e||{});super(t),this.initConfig=t;const n=(y=t,Object.assign(y,{useDualstackEndpoint:y.useDualstackEndpoint??!1,useFipsEndpoint:y.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}));var y;const E=(0,i.Dc)(n),S=(0,l.$z)(E),v=(0,a.TD)(S),g=(0,r.OV)(v),b=((e,t)=>{const n=Object.assign((0,ue.Rq)(e),(0,m.xA)(e),(0,he.eS)(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach((e=>e.configure(n))),Object.assign(e,(0,ue.$3)(n),(0,m.uv)(n),(0,he.jt)(n),{httpAuthSchemes:(r=n).httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()});var r})((e=>{const t=(0,w.h)(e);return Object.assign(t,{authSchemePreference:(0,x.t)(e.authSchemePreference??[])})})((0,h.Co)(g)),e?.extensions||[]);this.config=b,this.middlewareStack.use((0,i.sM)(this.config)),this.middlewareStack.use((0,l.ey)(this.config)),this.middlewareStack.use((0,u.vK)(this.config)),this.middlewareStack.use((0,r.TC)(this.config)),this.middlewareStack.use((0,s.Y7)(this.config)),this.middlewareStack.use((0,o.n4)(this.config)),this.middlewareStack.use((0,c.w)(this.config,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:async e=>new p.h({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((0,d.l)(this.config))}destroy(){super.destroy()}}var me=n(49);class we extends m.TJ{constructor(e){super(e),Object.setPrototypeOf(this,we.prototype)}}class xe extends we{name="AccessDeniedException";$fault="client";error;error_description;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,xe.prototype),this.error=e.error,this.error_description=e.error_description}}class fe extends we{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e}),Object.setPrototypeOf(this,fe.prototype),this.error=e.error,this.error_description=e.error_description}}const ye=e=>({...e,...e.clientSecret&&{clientSecret:m.$H},...e.refreshToken&&{refreshToken:m.$H},...e.codeVerifier&&{codeVerifier:m.$H}}),Ee=e=>({...e,...e.accessToken&&{accessToken:m.$H},...e.refreshToken&&{refreshToken:m.$H},...e.idToken&&{idToken:m.$H}});class Se extends we{name="ExpiredTokenException";$fault="client";error;error_description;constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,Se.prototype),this.error=e.error,this.error_description=e.error_description}}class ve extends we{name="InternalServerException";$fault="server";error;error_description;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,ve.prototype),this.error=e.error,this.error_description=e.error_description}}class ge extends we{name="InvalidClientException";$fault="client";error;error_description;constructor(e){super({name:"InvalidClientException",$fault:"client",...e}),Object.setPrototypeOf(this,ge.prototype),this.error=e.error,this.error_description=e.error_description}}class be extends we{name="InvalidGrantException";$fault="client";error;error_description;constructor(e){super({name:"InvalidGrantException",$fault:"client",...e}),Object.setPrototypeOf(this,be.prototype),this.error=e.error,this.error_description=e.error_description}}class Ie extends we{name="InvalidRequestException";$fault="client";error;error_description;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,Ie.prototype),this.error=e.error,this.error_description=e.error_description}}class Pe extends we{name="InvalidScopeException";$fault="client";error;error_description;constructor(e){super({name:"InvalidScopeException",$fault:"client",...e}),Object.setPrototypeOf(this,Pe.prototype),this.error=e.error,this.error_description=e.error_description}}class Oe extends we{name="SlowDownException";$fault="client";error;error_description;constructor(e){super({name:"SlowDownException",$fault:"client",...e}),Object.setPrototypeOf(this,Oe.prototype),this.error=e.error,this.error_description=e.error_description}}class $e extends we{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e}),Object.setPrototypeOf(this,$e.prototype),this.error=e.error,this.error_description=e.error_description}}class ke extends we{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,ke.prototype),this.error=e.error,this.error_description=e.error_description}}var Ce=n(80),je=n(861);const De=async(e,t)=>{const n=(0,je.l)(e,t);let r;return n.bp("/token"),r=JSON.stringify((0,m.s)(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:e=>(0,m.Ss)(e)})),n.m("POST").h({"content-type":"application/json"}).b(r),n.build()},Te=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ae(e,t);const n=(0,m.Tj)({$metadata:Je(e)}),r=(0,m.Y0)((0,m.Xk)(await(0,Ce.Y2)(e.body,t)),"body"),s=(0,m.s)(r,{accessToken:m.lK,expiresIn:m.ET,idToken:m.lK,refreshToken:m.lK,tokenType:m.lK});return Object.assign(n,s),n},Ae=async(e,t)=>{const n={...e,body:await(0,Ce.CG)(e.body,t)},r=(0,Ce.cJ)(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await ze(n,t);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Re(n,t);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Ue(n,t);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await qe(n,t);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Fe(n,t);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Ge(n,t);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await He(n,t);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await Ve(n,t);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await Me(n,t);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await Ne(n,t);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await Be(n,t);default:const s=n.body;return _e({output:e,parsedBody:s,errorCode:r})}},_e=(0,m.jr)(we),ze=async(e,t)=>{const n=(0,m.Tj)({}),r=e.body,s=(0,m.s)(r,{error:m.lK,error_description:m.lK});Object.assign(n,s);const o=new xe({$metadata:Je(e),...n});return(0,m.Mw)(o,e.body)},Re=async(e,t)=>{const n=(0,m.Tj)({}),r=e.body,s=(0,m.s)(r,{error:m.lK,error_description:m.lK});Object.assign(n,s);const o=new fe({$metadata:Je(e),...n});return(0,m.Mw)(o,e.body)},Ue=async(e,t)=>{const n=(0,m.Tj)({}),r=e.body,s=(0,m.s)(r,{error:m.lK,error_description:m.lK});Object.assign(n,s);const o=new Se({$metadata:Je(e),...n});return(0,m.Mw)(o,e.body)},qe=async(e,t)=>{const n=(0,m.Tj)({}),r=e.body,s=(0,m.s)(r,{error:m.lK,error_description:m.lK});Object.assign(n,s);const o=new ve({$metadata:Je(e),...n});return(0,m.Mw)(o,e.body)},Fe=async(e,t)=>{const n=(0,m.Tj)({}),r=e.body,s=(0,m.s)(r,{error:m.lK,error_description:m.lK});Object.assign(n,s);const o=new ge({$metadata:Je(e),...n});return(0,m.Mw)(o,e.body)},Ge=async(e,t)=>{const n=(0,m.Tj)({}),r=e.body,s=(0,m.s)(r,{error:m.lK,error_description:m.lK});Object.assign(n,s);const o=new be({$metadata:Je(e),...n});return(0,m.Mw)(o,e.body)},He=async(e,t)=>{const n=(0,m.Tj)({}),r=e.body,s=(0,m.s)(r,{error:m.lK,error_description:m.lK});Object.assign(n,s);const o=new Ie({$metadata:Je(e),...n});return(0,m.Mw)(o,e.body)},Ve=async(e,t)=>{const n=(0,m.Tj)({}),r=e.body,s=(0,m.s)(r,{error:m.lK,error_description:m.lK});Object.assign(n,s);const o=new Pe({$metadata:Je(e),...n});return(0,m.Mw)(o,e.body)},Me=async(e,t)=>{const n=(0,m.Tj)({}),r=e.body,s=(0,m.s)(r,{error:m.lK,error_description:m.lK});Object.assign(n,s);const o=new Oe({$metadata:Je(e),...n});return(0,m.Mw)(o,e.body)},Ne=async(e,t)=>{const n=(0,m.Tj)({}),r=e.body,s=(0,m.s)(r,{error:m.lK,error_description:m.lK});Object.assign(n,s);const o=new $e({$metadata:Je(e),...n});return(0,m.Mw)(o,e.body)},Be=async(e,t)=>{const n=(0,m.Tj)({}),r=e.body,s=(0,m.s)(r,{error:m.lK,error_description:m.lK});Object.assign(n,s);const o=new ke({$metadata:Je(e),...n});return(0,m.Mw)(o,e.body)},Je=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});class Le extends(m.uB.classBuilder().ep(E).m((function(e,t,n,r){return[(0,me.TM)(n,this.serialize,this.deserialize),(0,h.rD)(n,e.getEndpointParameterInstructions())]})).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(ye,Ee).ser(De).de(Te).build()){}const We={CreateTokenCommand:Le};(0,m.J1)(We,class extends le{})},861:(e,t,n)=>{n.d(t,{l:()=>o});var r=n(33),s=n(64);function o(e,t){return new i(e,t)}class i{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:s}=await this.context.endpoint();this.path=s;for(const e of this.resolvePathStack)e(this.path);return new r.Kd({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,n,r){return this.resolvePathStack.push((o=>{this.path=((e,t,n,r,o,i)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(o,i?t.split("/").map((e=>(0,s.$)(e))).join("/"):(0,s.$)(t))}return e})(o,this.input,e,t,n,r)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}},862:(e,t,n)=>{n.d(t,{m:()=>r});class r{async sign(e,t,n){return e}}},864:e=>{e.exports={rE:"3.848.0"}}};
3
+ //# sourceMappingURL=622.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=697,exports.ids=[697],exports.modules={865:(t,e,n)=>{n.d(e,{getDefaultRoleAssumer:()=>Ii,getDefaultRoleAssumerWithWebIdentity:()=>Si});var i=n(32),o=n(35),r=n(36),s=n(37),a=n(41),c=n(77),l=n(78),u=n(79),d=n(43),f=n(44),h=n(50),p=n(54),m=n(65),g=n(42);const w=async(t,e,n)=>({operation:(0,g.u)(e).operation,region:await(0,g.t)(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const v=t=>{const e=[];if("AssumeRoleWithWebIdentity"===t.operation)e.push({schemeId:"smithy.api#noAuth"});else e.push(function(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:t.region},propertiesExtractor:(t,e)=>({signingProperties:{config:t,context:e}})}}(t));return e},x=t=>{const e=(n=t,Object.assign(n,{stsClientCtor:Pt}));var n;const i=(0,m.h)(e);return Object.assign(i,{authSchemePreference:(0,g.t)(t.authSchemePreference??[])})},E={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var y=n(864),b=n(74),I=n(75),S=n(72),P=n(68),A=n(862),T=n(70),C=n(45),D=n(60),$=n(71),R=n(51),O=n(48),k=n(56),N=n(59),j=n(39),F=n(40);const _="required",U="type",M="fn",L="argv",W="ref",V=!1,q=!0,Y="booleanEquals",z="stringEquals",B="sigv4",K="us-east-1",H="endpoint",X="https://sts.{Region}.{PartitionResult#dnsSuffix}",G="tree",Z="error",J="getAttr",Q={[_]:!1,[U]:"String"},tt={[_]:!0,default:!1,[U]:"Boolean"},et={[W]:"Endpoint"},nt={[M]:"isSet",[L]:[{[W]:"Region"}]},it={[W]:"Region"},ot={[M]:"aws.partition",[L]:[it],assign:"PartitionResult"},rt={[W]:"UseFIPS"},st={[W]:"UseDualStack"},at={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:B,signingName:"sts",signingRegion:K}]},headers:{}},ct={},lt={conditions:[{[M]:z,[L]:[it,"aws-global"]}],[H]:at,[U]:H},ut={[M]:Y,[L]:[rt,!0]},dt={[M]:Y,[L]:[st,!0]},ft={[M]:J,[L]:[{[W]:"PartitionResult"},"supportsFIPS"]},ht={[W]:"PartitionResult"},pt={[M]:Y,[L]:[!0,{[M]:J,[L]:[ht,"supportsDualStack"]}]},mt=[{[M]:"isSet",[L]:[et]}],gt=[ut],wt=[dt],vt={version:"1.0",parameters:{Region:Q,UseDualStack:tt,UseFIPS:tt,Endpoint:Q,UseGlobalEndpoint:tt},rules:[{conditions:[{[M]:Y,[L]:[{[W]:"UseGlobalEndpoint"},q]},{[M]:"not",[L]:mt},nt,ot,{[M]:Y,[L]:[rt,V]},{[M]:Y,[L]:[st,V]}],rules:[{conditions:[{[M]:z,[L]:[it,"ap-northeast-1"]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,"ap-south-1"]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,"ap-southeast-1"]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,"ap-southeast-2"]}],endpoint:at,[U]:H},lt,{conditions:[{[M]:z,[L]:[it,"ca-central-1"]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,"eu-central-1"]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,"eu-north-1"]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,"eu-west-1"]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,"eu-west-2"]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,"eu-west-3"]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,"sa-east-1"]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,K]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,"us-east-2"]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,"us-west-1"]}],endpoint:at,[U]:H},{conditions:[{[M]:z,[L]:[it,"us-west-2"]}],endpoint:at,[U]:H},{endpoint:{url:X,properties:{authSchemes:[{name:B,signingName:"sts",signingRegion:"{Region}"}]},headers:ct},[U]:H}],[U]:G},{conditions:mt,rules:[{conditions:gt,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[U]:Z},{conditions:wt,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[U]:Z},{endpoint:{url:et,properties:ct,headers:ct},[U]:H}],[U]:G},{conditions:[nt],rules:[{conditions:[ot],rules:[{conditions:[ut,dt],rules:[{conditions:[{[M]:Y,[L]:[q,ft]},pt],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ct,headers:ct},[U]:H}],[U]:G},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[U]:Z}],[U]:G},{conditions:gt,rules:[{conditions:[{[M]:Y,[L]:[ft,q]}],rules:[{conditions:[{[M]:z,[L]:[{[M]:J,[L]:[ht,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:ct,headers:ct},[U]:H},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ct,headers:ct},[U]:H}],[U]:G},{error:"FIPS is enabled but this partition does not support FIPS",[U]:Z}],[U]:G},{conditions:wt,rules:[{conditions:[pt],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ct,headers:ct},[U]:H}],[U]:G},{error:"DualStack is enabled but this partition does not support DualStack",[U]:Z}],[U]:G},lt,{endpoint:{url:X,properties:ct,headers:ct},[U]:H}],[U]:G}],[U]:G},{error:"Invalid Configuration: Missing Region",[U]:Z}]},xt=new F.kS({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Et=(t,e={})=>xt.get(t,(()=>(0,F.sO)(vt,{endpointParams:t,logger:e.logger})));F.mw.aws=j.UF;var yt=n(73);const bt=t=>{(0,p.I9)(process.version);const e=(0,yt.I)(t),n=()=>e().then(p.lT),i=(t=>({apiVersion:"2011-06-15",base64Decoder:t?.base64Decoder??k.E,base64Encoder:t?.base64Encoder??k.n,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Et,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??v,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new S.f2},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new A.m}],logger:t?.logger??new p.N4,serviceId:t?.serviceId??"STS",urlParser:t?.urlParser??O.D,utf8Decoder:t?.utf8Decoder??N.ar,utf8Encoder:t?.utf8Encoder??N.Pq}))(t);(0,b.I)(process.version);const o={profile:t?.profile,logger:i.logger};return{...i,...t,runtime:"node",defaultsMode:e,authSchemePreference:t?.authSchemePreference??(0,C.Z)(I.$,o),bodyLengthChecker:t?.bodyLengthChecker??$.n,defaultUserAgentProvider:t?.defaultUserAgentProvider??(0,P.pf)({serviceId:i.serviceId,clientVersion:y.rE}),httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4")||(async e=>await t.credentialDefaultProvider(e?.o||{})()),signer:new S.f2},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new A.m}],maxAttempts:t?.maxAttempts??(0,C.Z)(h.qs,t),region:t?.region??(0,C.Z)(a.GG,{...a.zH,...o}),requestHandler:D.$c.create(t?.requestHandler??n),retryMode:t?.retryMode??(0,C.Z)({...h.kN,default:async()=>(await n()).retryMode||R.L0},t),sha256:t?.sha256??T.V.bind(null,"sha256"),streamCollector:t?.streamCollector??D.kv,useDualstackEndpoint:t?.useDualstackEndpoint??(0,C.Z)(a.e$,o),useFipsEndpoint:t?.useFipsEndpoint??(0,C.Z)(a.Ko,o),userAgentAppId:t?.userAgentAppId??(0,C.Z)(P.hV,o)}};var It=n(76),St=n(33);class Pt extends p.Kj{config;constructor(...[t]){const e=bt(t||{});super(e),this.initConfig=e;const n=(m=e,Object.assign(m,{useDualstackEndpoint:m.useDualstackEndpoint??!1,useFipsEndpoint:m.useFipsEndpoint??!1,useGlobalEndpoint:m.useGlobalEndpoint??!1,defaultSigningName:"sts"}));var m;const g=(0,s.Dc)(n),v=(0,h.$z)(g),E=(0,a.TD)(v),y=(0,i.OV)(E),b=(0,f.Co)(y),I=((t,e)=>{const n=Object.assign((0,It.Rq)(t),(0,p.xA)(t),(0,St.eS)(t),(t=>{const e=t.httpAuthSchemes;let n=t.httpAuthSchemeProvider,i=t.credentials;return{setHttpAuthScheme(t){const n=e.findIndex((e=>e.schemeId===t.schemeId));-1===n?e.push(t):e.splice(n,1,t)},httpAuthSchemes:()=>e,setHttpAuthSchemeProvider(t){n=t},httpAuthSchemeProvider:()=>n,setCredentials(t){i=t},credentials:()=>i}})(t));return e.forEach((t=>t.configure(n))),Object.assign(t,(0,It.$3)(n),(0,p.uv)(n),(0,St.jt)(n),{httpAuthSchemes:(i=n).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})(x(b),t?.extensions||[]);this.config=I,this.middlewareStack.use((0,s.sM)(this.config)),this.middlewareStack.use((0,h.ey)(this.config)),this.middlewareStack.use((0,d.vK)(this.config)),this.middlewareStack.use((0,i.TC)(this.config)),this.middlewareStack.use((0,o.Y7)(this.config)),this.middlewareStack.use((0,r.n4)(this.config)),this.middlewareStack.use((0,c.w)(this.config,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:async t=>new l.h({"aws.auth#sigv4":t.credentials})})),this.middlewareStack.use((0,u.l)(this.config))}destroy(){super.destroy()}}var At=n(49);class Tt extends p.TJ{constructor(t){super(t),Object.setPrototypeOf(this,Tt.prototype)}}const Ct=t=>({...t,...t.SecretAccessKey&&{SecretAccessKey:p.$H}}),Dt=t=>({...t,...t.Credentials&&{Credentials:Ct(t.Credentials)}});class $t extends Tt{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,$t.prototype)}}class Rt extends Tt{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,Rt.prototype)}}class Ot extends Tt{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,Ot.prototype)}}class kt extends Tt{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,kt.prototype)}}class Nt extends Tt{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,Nt.prototype)}}class jt extends Tt{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,jt.prototype)}}const Ft=t=>({...t,...t.WebIdentityToken&&{WebIdentityToken:p.$H}}),_t=t=>({...t,...t.Credentials&&{Credentials:Ct(t.Credentials)}});class Ut extends Tt{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,Ut.prototype)}}const Mt={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!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},Lt=":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",Wt=new RegExp("^"+("["+Lt+"]["+(Lt+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*")+"$");function Vt(t,e){const n=[];let i=e.exec(t);for(;i;){const o=[];o.startIndex=e.lastIndex-i[0].length;const r=i.length;for(let t=0;t<r;t++)o.push(i[t]);n.push(o),i=e.exec(t)}return n}const qt=function(t){const e=Wt.exec(t);return!(null==e)};let Yt;Yt="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class zt{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][Yt]={startIndex:e})}static getMetaDataSymbol(){return Yt}}function Bt(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,o=!1,r=!1,s="";for(;e<t.length;e++)if("<"!==t[e]||r)if(">"===t[e]){if(r?"-"===t[e-1]&&"-"===t[e-2]&&(r=!1,i--):i--,0===i)break}else"["===t[e]?o=!0:s+=t[e];else{if(o&&Jt(t,"!ENTITY",e)){let i,o;e+=7,[i,o,e]=Ht(t,e+1),-1===o.indexOf("&")&&(n[i]={regx:RegExp(`&${i};`,"g"),val:o})}else if(o&&Jt(t,"!ELEMENT",e)){e+=8;const{index:n}=Zt(t,e+1);e=n}else if(o&&Jt(t,"!ATTLIST",e))e+=8;else if(o&&Jt(t,"!NOTATION",e)){e+=9;const{index:n}=Xt(t,e+1);e=n}else{if(!Jt(t,"!--",e))throw new Error("Invalid DOCTYPE");r=!0}i++,s=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}const Kt=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function Ht(t,e){e=Kt(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e])&&'"'!==t[e]&&"'"!==t[e];)n+=t[e],e++;if(Qt(n),e=Kt(t,e),"SYSTEM"===t.substring(e,e+6).toUpperCase())throw new Error("External entities are not supported");if("%"===t[e])throw new Error("Parameter entities are not supported");let i="";return[e,i]=Gt(t,e,"entity"),[n,i,--e]}function Xt(t,e){e=Kt(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;Qt(n),e=Kt(t,e);const i=t.substring(e,e+6).toUpperCase();if("SYSTEM"!==i&&"PUBLIC"!==i)throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);e+=i.length,e=Kt(t,e);let o=null,r=null;if("PUBLIC"===i)[e,o]=Gt(t,e,"publicIdentifier"),'"'!==t[e=Kt(t,e)]&&"'"!==t[e]||([e,r]=Gt(t,e,"systemIdentifier"));else if("SYSTEM"===i&&([e,r]=Gt(t,e,"systemIdentifier"),!r))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:o,systemIdentifier:r,index:--e}}function Gt(t,e,n){let i="";const o=t[e];if('"'!==o&&"'"!==o)throw new Error(`Expected quoted string, found "${o}"`);for(e++;e<t.length&&t[e]!==o;)i+=t[e],e++;if(t[e]!==o)throw new Error(`Unterminated ${n} value`);return[++e,i]}function Zt(t,e){e=Kt(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;if(!Qt(n))throw new Error(`Invalid element name: "${n}"`);let i="";if("E"===t[e=Kt(t,e)]&&Jt(t,"MPTY",e))e+=4;else if("A"===t[e]&&Jt(t,"NY",e))e+=2;else{if("("!==t[e])throw new Error(`Invalid Element Expression, found "${t[e]}"`);for(e++;e<t.length&&")"!==t[e];)i+=t[e],e++;if(")"!==t[e])throw new Error("Unterminated content model")}return{elementName:n,contentModel:i.trim(),index:e}}function Jt(t,e,n){for(let i=0;i<e.length;i++)if(e[i]!==t[n+i+1])return!1;return!0}function Qt(t){if(qt(t))return t;throw new Error(`Invalid entity name ${t}`)}const te=/^[-+]?0x[a-fA-F0-9]+$/,ee=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,ne={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function ie(t,e={}){if(e=Object.assign({},ne,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&&te.test(n))return function(t,e){if(parseInt)return parseInt(t,e);if(Number.parseInt)return Number.parseInt(t,e);if(window&&window.parseInt)return window.parseInt(t,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(n,16);if(-1!==n.search(/.+[eE].+/))return function(t,e,n){if(!n.eNotation)return t;const i=e.match(oe);if(i){let o=i[1]||"";const r=-1===i[3].indexOf("e")?"E":"e",s=i[2],a=o?t[s.length+1]===r:t[s.length]===r;return s.length>1&&a?t:1!==s.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 i=ee.exec(n);if(i){const o=i[1]||"",r=i[2];let s=function(t){if(t&&-1!==t.indexOf("."))return"."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substring(0,t.length-1)),t;return t}(i[3]);const a=o?"."===t[r.length+1]:"."===t[r.length];if(!e.leadingZeros&&(r.length>1||1===r.length&&!a))return t;{const i=Number(n),a=String(i);if(0===i)return i;if(-1!==a.search(/[eE]/))return e.eNotation?i:t;if(-1!==n.indexOf("."))return"0"===a||a===s||a===`${o}${s}`?i:t;let c=r?s:n;return r?c===a||o+c===a?i:t:c===a||c===o+a?i:t}}return t}}const oe=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class re{constructor(t){var e;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=se,this.parseXml=de,this.parseTextData=ae,this.resolveNameSpace=ce,this.buildAttributesMap=ue,this.isItStopNode=me,this.replaceEntitiesValue=he,this.readStopNodeData=ve,this.saveTextToParentTag=pe,this.addChild=fe,this.ignoreAttributesFn="function"==typeof(e=this.options.ignoreAttributes)?e:Array.isArray(e)?t=>{for(const n of e){if("string"==typeof n&&t===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}}:()=>!1}}function se(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:t[i]}}}function ae(t,e,n,i,o,r,s){if(void 0!==t&&(this.options.trimValues&&!i&&(t=t.trim()),t.length>0)){s||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,o,r);if(null==i)return t;if(typeof i!=typeof t||i!==t)return i;if(this.options.trimValues)return xe(t,this.options.parseTagValue,this.options.numberParseOptions);return t.trim()===t?xe(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function ce(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 le=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function ue(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=Vt(t,le),i=n.length,o={};for(let t=0;t<i;t++){const i=this.resolveNameSpace(n[t][1]);if(this.ignoreAttributesFn(i,e))continue;let r=n[t][4],s=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==r){this.options.trimValues&&(r=r.trim()),r=this.replaceEntitiesValue(r);const t=this.options.attributeValueProcessor(i,r,e);o[s]=null==t?r:typeof t!=typeof r||t!==r?t:xe(r,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=o,t}return o}}const de=function(t){t=t.replace(/\r\n?/g,"\n");const e=new zt("!xml");let n=e,i="",o="";for(let r=0;r<t.length;r++){if("<"===t[r])if("/"===t[r+1]){const e=ge(t,">",r,"Closing Tag is not closed.");let s=t.substring(r+2,e).trim();if(this.options.removeNSPrefix){const t=s.indexOf(":");-1!==t&&(s=s.substr(t+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),n&&(i=this.saveTextToParentTag(i,n,o));const a=o.substring(o.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);let c=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),n=this.tagsNodeStack.pop(),i="",r=e}else if("?"===t[r+1]){let e=we(t,r,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,o),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new zt(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,o,e.tagName)),this.addChild(n,t,o,r)}r=e.closeIndex+1}else if("!--"===t.substr(r+1,3)){const e=ge(t,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const s=t.substring(r+4,e-2);i=this.saveTextToParentTag(i,n,o),n.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}r=e}else if("!D"===t.substr(r+1,2)){const e=Bt(t,r);this.docTypeEntities=e.entities,r=e.i}else if("!["===t.substr(r+1,2)){const e=ge(t,"]]>",r,"CDATA is not closed.")-2,s=t.substring(r+9,e);i=this.saveTextToParentTag(i,n,o);let a=this.parseTextData(s,n.tagname,o,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]):n.add(this.options.textNodeName,a),r=e+2}else{let s=we(t,r,this.options.removeNSPrefix),a=s.tagName;const c=s.rawTagName;let l=s.tagExp,u=s.attrExpPresent,d=s.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,o,!1));const f=n;f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),a!==e.tagname&&(o+=o?"."+a:a);const h=r;if(this.isItStopNode(this.options.stopNodes,o,a)){let e="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),o=o.substr(0,o.length-1),l=a):l=l.substr(0,l.length-1),r=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))r=s.closeIndex;else{const n=this.readStopNodeData(t,c,d+1);if(!n)throw new Error(`Unexpected end of ${c}`);r=n.i,e=n.tagContent}const i=new zt(a);a!==l&&u&&(i[":@"]=this.buildAttributesMap(l,o,a)),e&&(e=this.parseTextData(e,a,o,!0,u,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,o,h)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),o=o.substr(0,o.length-1),l=a):l=l.substr(0,l.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new zt(a);a!==l&&u&&(t[":@"]=this.buildAttributesMap(l,o,a)),this.addChild(n,t,o,h),o=o.substr(0,o.lastIndexOf("."))}else{const t=new zt(a);this.tagsNodeStack.push(n),a!==l&&u&&(t[":@"]=this.buildAttributesMap(l,o,a)),this.addChild(n,t,o,h),n=t}i="",r=d}}else i+=t[r]}return e.child};function fe(t,e,n,i){this.options.captureMetaData||(i=void 0);const o=this.options.updateTag(e.tagname,n,e[":@"]);!1===o||("string"==typeof o?(e.tagname=o,t.addChild(e,i)):t.addChild(e,i))}const he=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 pe(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 me(t,e,n){const i="*."+n;for(const n in t){const o=t[n];if(i===o||e===o)return!0}return!1}function ge(t,e,n,i){const o=t.indexOf(e,n);if(-1===o)throw new Error(i);return o+e.length-1}function we(t,e,n,i=">"){const o=function(t,e,n=">"){let i,o="";for(let r=e;r<t.length;r++){let e=t[r];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===n[0]){if(!n[1])return{data:o,index:r};if(t[r+1]===n[1])return{data:o,index:r}}else"\t"===e&&(e=" ");o+=e}}(t,e+1,i);if(!o)return;let r=o.data;const s=o.index,a=r.search(/\s/);let c=r,l=!0;-1!==a&&(c=r.substring(0,a),r=r.substring(a+1).trimStart());const u=c;if(n){const t=c.indexOf(":");-1!==t&&(c=c.substr(t+1),l=c!==o.data.substr(t+1))}return{tagName:c,tagExp:r,closeIndex:s,attrExpPresent:l,rawTagName:u}}function ve(t,e,n){const i=n;let o=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const r=ge(t,">",n,`${e} is not closed`);if(t.substring(n+2,r).trim()===e&&(o--,0===o))return{tagContent:t.substring(i,n),i:r};n=r}else if("?"===t[n+1]){n=ge(t,"?>",n+1,"StopNode is not closed.")}else if("!--"===t.substr(n+1,3)){n=ge(t,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===t.substr(n+1,2)){n=ge(t,"]]>",n,"StopNode is not closed.")-2}else{const i=we(t,n,">");if(i){(i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&o++,n=i.closeIndex}}}function xe(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&ie(t,n)}return function(t){return void 0!==t}(t)?t:""}const Ee=zt.getMetaDataSymbol();function ye(t,e){return be(t,e)}function be(t,e,n){let i;const o={};for(let r=0;r<t.length;r++){const s=t[r],a=Ie(s);let c="";if(c=void 0===n?a:n+"."+a,a===e.textNodeName)void 0===i?i=s[a]:i+=""+s[a];else{if(void 0===a)continue;if(s[a]){let t=be(s[a],e,c);const n=Pe(t,e);void 0!==s[Ee]&&(t[Ee]=s[Ee]),s[":@"]?Se(t,s[":@"],c,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==o[a]&&o.hasOwnProperty(a)?(Array.isArray(o[a])||(o[a]=[o[a]]),o[a].push(t)):e.isArray(a,c,n)?o[a]=[t]:o[a]=t}}}return"string"==typeof i?i.length>0&&(o[e.textNodeName]=i):void 0!==i&&(o[e.textNodeName]=i),o}function Ie(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function Se(t,e,n,i){if(e){const o=Object.keys(e),r=o.length;for(let s=0;s<r;s++){const r=o[s];i.isArray(r,n+"."+r,!0,!0)?t[r]=[e[r]]:t[r]=e[r]}}}function Pe(t,e){const{textNodeName:n}=e,i=Object.keys(t).length;return 0===i||!(1!==i||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n])}const Ae={allowBooleanAttributes:!1,unpairedTags:[]};function Te(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function Ce(t,e){const n=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const i=t.substr(n,e-n);if(e>5&&"xml"===i)return Fe("InvalidXml","XML declaration allowed only at the start of the document.",Ue(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function De(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===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.length;e++)if("<"===t[e])n++;else if(">"===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.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}const $e='"',Re="'";function Oe(t,e){let n="",i="",o=!1;for(;e<t.length;e++){if(t[e]===$e||t[e]===Re)""===i?i=t[e]:i!==t[e]||(i="");else if(">"===t[e]&&""===i){o=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:o}}const ke=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function Ne(t,e){const n=Vt(t,ke),i={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return Fe("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",Me(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return Fe("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",Me(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return Fe("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",Me(n[t]));const o=n[t][2];if(!_e(o))return Fe("InvalidAttr","Attribute '"+o+"' is an invalid name.",Me(n[t]));if(i.hasOwnProperty(o))return Fe("InvalidAttr","Attribute '"+o+"' is repeated.",Me(n[t]));i[o]=1}return!0}function je(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function Fe(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function _e(t){return qt(t)}function Ue(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function Me(t){return t.startIndex+t[1].length}class Le{constructor(t){this.externalEntities={},this.options=function(t){return Object.assign({},Mt,t)}(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const n=function(t,e){e=Object.assign({},Ae,e);const n=[];let i=!1,o=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let r=0;r<t.length;r++)if("<"===t[r]&&"?"===t[r+1]){if(r+=2,r=Ce(t,r),r.err)return r}else{if("<"!==t[r]){if(Te(t[r]))continue;return Fe("InvalidChar","char '"+t[r]+"' is not expected.",Ue(t,r))}{let s=r;if(r++,"!"===t[r]){r=De(t,r);continue}{let a=!1;"/"===t[r]&&(a=!0,r++);let c="";for(;r<t.length&&">"!==t[r]&&" "!==t[r]&&"\t"!==t[r]&&"\n"!==t[r]&&"\r"!==t[r];r++)c+=t[r];if(c=c.trim(),"/"===c[c.length-1]&&(c=c.substring(0,c.length-1),r--),!qt(c)){let e;return e=0===c.trim().length?"Invalid space after '<'.":"Tag '"+c+"' is an invalid name.",Fe("InvalidTag",e,Ue(t,r))}const l=Oe(t,r);if(!1===l)return Fe("InvalidAttr","Attributes for '"+c+"' have open quote.",Ue(t,r));let u=l.value;if(r=l.index,"/"===u[u.length-1]){const n=r-u.length;u=u.substring(0,u.length-1);const o=Ne(u,e);if(!0!==o)return Fe(o.err.code,o.err.msg,Ue(t,n+o.err.line));i=!0}else if(a){if(!l.tagClosed)return Fe("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",Ue(t,r));if(u.trim().length>0)return Fe("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",Ue(t,s));if(0===n.length)return Fe("InvalidTag","Closing tag '"+c+"' has not been opened.",Ue(t,s));{const e=n.pop();if(c!==e.tagName){let n=Ue(t,e.tagStartPos);return Fe("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+c+"'.",Ue(t,s))}0==n.length&&(o=!0)}}else{const a=Ne(u,e);if(!0!==a)return Fe(a.err.code,a.err.msg,Ue(t,r-u.length+a.err.line));if(!0===o)return Fe("InvalidXml","Multiple possible root nodes found.",Ue(t,r));-1!==e.unpairedTags.indexOf(c)||n.push({tagName:c,tagStartPos:s}),i=!0}for(r++;r<t.length;r++)if("<"===t[r]){if("!"===t[r+1]){r++,r=De(t,r);continue}if("?"!==t[r+1])break;if(r=Ce(t,++r),r.err)return r}else if("&"===t[r]){const e=je(t,r);if(-1==e)return Fe("InvalidChar","char '&' is not expected.",Ue(t,r));r=e}else if(!0===o&&!Te(t[r]))return Fe("InvalidXml","Extra text at the end",Ue(t,r));"<"===t[r]&&r--}}}return i?1==n.length?Fe("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",Ue(t,n[0].tagStartPos)):!(n.length>0)||Fe("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):Fe("InvalidXml","Start tag expected.",1)}(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new re(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:ye(i,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return zt.getMetaDataSymbol()}}var We=n(81);const Ve=(t,e)=>(0,We.w)(t,e).then((t=>{if(t.length){const e=new Le({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(t,e)=>""===e.trim()&&e.includes("\n")?"":void 0});let n;e.addEntity("#xD","\r"),e.addEntity("#10","\n");try{n=e.parse(t,!0)}catch(e){throw e&&"object"==typeof e&&Object.defineProperty(e,"$responseBodyText",{value:t}),e}const i="#text",o=Object.keys(n)[0],r=n[o];return r[i]&&(r[o]=r[i],delete r[i]),(0,p.rm)(r)}return{}})),qe=async(t,e)=>{const n=await Ve(t,e);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},Ye=async(t,e)=>{const n=An;let i;return i=ui({...nn(t,e),[Cn]:$n,[ri]:Tn}),Pn(e,n,"/",void 0,i)},ze=async(t,e)=>{const n=An;let i;return i=ui({...on(t,e),[Cn]:kn,[ri]:Tn}),Pn(e,n,"/",void 0,i)},Be=async(t,e)=>{if(t.statusCode>=300)return He(t,e);const n=await Ve(t.body,e);let i={};i=hn(n.AssumeRoleResult,e);return{$metadata:In(t),...i}},Ke=async(t,e)=>{if(t.statusCode>=300)return He(t,e);const n=await Ve(t.body,e);let i={};i=pn(n.AssumeRoleWithWebIdentityResult,e);return{$metadata:In(t),...i}},He=async(t,e)=>{const n={...t,body:await qe(t.body,e)},i=di(t,n.body);switch(i){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Xe(n,e);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Qe(n,e);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await tn(n,e);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await en(n,e);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Ge(n,e);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Ze(n,e);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Je(n,e);default:const o=n.body;return Sn({output:t,parsedBody:o.Error,errorCode:i})}},Xe=async(t,e)=>{const n=t.body,i=gn(n.Error,e),o=new $t({$metadata:In(t),...i});return(0,p.Mw)(o,n)},Ge=async(t,e)=>{const n=t.body,i=wn(n.Error,e),o=new Ut({$metadata:In(t),...i});return(0,p.Mw)(o,n)},Ze=async(t,e)=>{const n=t.body,i=vn(n.Error,e),o=new Nt({$metadata:In(t),...i});return(0,p.Mw)(o,n)},Je=async(t,e)=>{const n=t.body,i=xn(n.Error,e),o=new jt({$metadata:In(t),...i});return(0,p.Mw)(o,n)},Qe=async(t,e)=>{const n=t.body,i=En(n.Error,e),o=new Rt({$metadata:In(t),...i});return(0,p.Mw)(o,n)},tn=async(t,e)=>{const n=t.body,i=yn(n.Error,e),o=new Ot({$metadata:In(t),...i});return(0,p.Mw)(o,n)},en=async(t,e)=>{const n=t.body,i=bn(n.Error,e),o=new kt({$metadata:In(t),...i});return(0,p.Mw)(o,n)},nn=(t,e)=>{const n={};if(null!=t[Xn]&&(n[Xn]=t[Xn]),null!=t[Gn]&&(n[Gn]=t[Gn]),null!=t[qn]){const i=rn(t[qn],e);0===t[qn]?.length&&(n.PolicyArns=[]),Object.entries(i).forEach((([t,e])=>{n[`PolicyArns.${t}`]=e}))}if(null!=t[Vn]&&(n[Vn]=t[Vn]),null!=t[Un]&&(n[Un]=t[Un]),null!=t[ni]){const i=dn(t[ni],e);0===t[ni]?.length&&(n.Tags=[]),Object.entries(i).forEach((([t,e])=>{n[`Tags.${t}`]=e}))}if(null!=t[oi]){const i=un(t[oi],e);0===t[oi]?.length&&(n.TransitiveTagKeys=[]),Object.entries(i).forEach((([t,e])=>{n[`TransitiveTagKeys.${t}`]=e}))}if(null!=t[Ln]&&(n[Ln]=t[Ln]),null!=t[ti]&&(n[ti]=t[ti]),null!=t[ii]&&(n[ii]=t[ii]),null!=t[Qn]&&(n[Qn]=t[Qn]),null!=t[zn]){const i=cn(t[zn],e);0===t[zn]?.length&&(n.ProvidedContexts=[]),Object.entries(i).forEach((([t,e])=>{n[`ProvidedContexts.${t}`]=e}))}return n},on=(t,e)=>{const n={};if(null!=t[Xn]&&(n[Xn]=t[Xn]),null!=t[Gn]&&(n[Gn]=t[Gn]),null!=t[ai]&&(n[ai]=t[ai]),null!=t[Bn]&&(n[Bn]=t[Bn]),null!=t[qn]){const i=rn(t[qn],e);0===t[qn]?.length&&(n.PolicyArns=[]),Object.entries(i).forEach((([t,e])=>{n[`PolicyArns.${t}`]=e}))}return null!=t[Vn]&&(n[Vn]=t[Vn]),null!=t[Un]&&(n[Un]=t[Un]),n},rn=(t,e)=>{const n={};let i=1;for(const o of t){if(null===o)continue;const t=sn(o,e);Object.entries(t).forEach((([t,e])=>{n[`member.${i}.${t}`]=e})),i++}return n},sn=(t,e)=>{const n={};return null!=t[ci]&&(n[ci]=t[ci]),n},an=(t,e)=>{const n={};return null!=t[Yn]&&(n[Yn]=t[Yn]),null!=t[_n]&&(n[_n]=t[_n]),n},cn=(t,e)=>{const n={};let i=1;for(const e of t){if(null===e)continue;const t=an(e);Object.entries(t).forEach((([t,e])=>{n[`member.${i}.${t}`]=e})),i++}return n},ln=(t,e)=>{const n={};return null!=t[Wn]&&(n[Wn]=t[Wn]),null!=t[si]&&(n[si]=t[si]),n},un=(t,e)=>{const n={};let i=1;for(const e of t)null!==e&&(n[`member.${i}`]=e,i++);return n},dn=(t,e)=>{const n={};let i=1;for(const e of t){if(null===e)continue;const t=ln(e);Object.entries(t).forEach((([t,e])=>{n[`member.${i}.${t}`]=e})),i++}return n},fn=(t,e)=>{const n={};return null!=t[Rn]&&(n[Rn]=(0,p.lK)(t[Rn])),null!=t[Nn]&&(n[Nn]=(0,p.lK)(t[Nn])),n},hn=(t,e)=>{const n={};return null!=t[Fn]&&(n[Fn]=mn(t[Fn],e)),null!=t[On]&&(n[On]=fn(t[On])),null!=t[Kn]&&(n[Kn]=(0,p.xW)(t[Kn])),null!=t[Qn]&&(n[Qn]=(0,p.lK)(t[Qn])),n},pn=(t,e)=>{const n={};return null!=t[Fn]&&(n[Fn]=mn(t[Fn],e)),null!=t[Jn]&&(n[Jn]=(0,p.lK)(t[Jn])),null!=t[On]&&(n[On]=fn(t[On])),null!=t[Kn]&&(n[Kn]=(0,p.xW)(t[Kn])),null!=t[Hn]&&(n[Hn]=(0,p.lK)(t[Hn])),null!=t[jn]&&(n[jn]=(0,p.lK)(t[jn])),null!=t[Qn]&&(n[Qn]=(0,p.lK)(t[Qn])),n},mn=(t,e)=>{const n={};return null!=t[Dn]&&(n[Dn]=(0,p.lK)(t[Dn])),null!=t[Zn]&&(n[Zn]=(0,p.lK)(t[Zn])),null!=t[ei]&&(n[ei]=(0,p.lK)(t[ei])),null!=t[Mn]&&(n[Mn]=(0,p.Y0)((0,p.t_)(t[Mn]))),n},gn=(t,e)=>{const n={};return null!=t[li]&&(n[li]=(0,p.lK)(t[li])),n},wn=(t,e)=>{const n={};return null!=t[li]&&(n[li]=(0,p.lK)(t[li])),n},vn=(t,e)=>{const n={};return null!=t[li]&&(n[li]=(0,p.lK)(t[li])),n},xn=(t,e)=>{const n={};return null!=t[li]&&(n[li]=(0,p.lK)(t[li])),n},En=(t,e)=>{const n={};return null!=t[li]&&(n[li]=(0,p.lK)(t[li])),n},yn=(t,e)=>{const n={};return null!=t[li]&&(n[li]=(0,p.lK)(t[li])),n},bn=(t,e)=>{const n={};return null!=t[li]&&(n[li]=(0,p.lK)(t[li])),n},In=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),Sn=(0,p.jr)(Tt),Pn=async(t,e,n,i,o)=>{const{hostname:r,protocol:s="https",port:a,path:c}=await t.endpoint(),l={protocol:s,hostname:r,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:e};return void 0!==i&&(l.hostname=i),void 0!==o&&(l.body=o),new St.Kd(l)},An={"content-type":"application/x-www-form-urlencoded"},Tn="2011-06-15",Cn="Action",Dn="AccessKeyId",$n="AssumeRole",Rn="AssumedRoleId",On="AssumedRoleUser",kn="AssumeRoleWithWebIdentity",Nn="Arn",jn="Audience",Fn="Credentials",_n="ContextAssertion",Un="DurationSeconds",Mn="Expiration",Ln="ExternalId",Wn="Key",Vn="Policy",qn="PolicyArns",Yn="ProviderArn",zn="ProvidedContexts",Bn="ProviderId",Kn="PackedPolicySize",Hn="Provider",Xn="RoleArn",Gn="RoleSessionName",Zn="SecretAccessKey",Jn="SubjectFromWebIdentityToken",Qn="SourceIdentity",ti="SerialNumber",ei="SessionToken",ni="Tags",ii="TokenCode",oi="TransitiveTagKeys",ri="Version",si="Value",ai="WebIdentityToken",ci="arn",li="message",ui=t=>Object.entries(t).map((([t,e])=>(0,p.$6)(t)+"="+(0,p.$6)(e))).join("&"),di=(t,e)=>void 0!==e.Error?.Code?e.Error.Code:404==t.statusCode?"NotFound":void 0;class fi extends(p.uB.classBuilder().ep(E).m((function(t,e,n,i){return[(0,At.TM)(n,this.serialize,this.deserialize),(0,f.rD)(n,t.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,Dt).ser(Ye).de(Be).build()){}class hi extends(p.uB.classBuilder().ep(E).m((function(t,e,n,i){return[(0,At.TM)(n,this.serialize,this.deserialize),(0,f.rD)(n,t.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(Ft,_t).ser(ze).de(Ke).build()){}const pi={AssumeRoleCommand:fi,AssumeRoleWithWebIdentityCommand:hi};(0,p.J1)(pi,class extends Pt{});var mi=n(66);const gi="us-east-1",wi=t=>{if("string"==typeof t?.Arn){const e=t.Arn.split(":");if(e.length>4&&""!==e[4])return e[4]}},vi=async(t,e,n)=>{const i="function"==typeof t?await t():t,o="function"==typeof e?await e():e;return n?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${i} (provider)`,`${o} (parent client)`,`${gi} (STS default)`),i??o??gi},xi=(t,e)=>{let n,i;return async(o,r)=>{if(i=o,!n){const{logger:o=t?.parentClientConfig?.logger,region:r,requestHandler:s=t?.parentClientConfig?.requestHandler,credentialProviderLogger:a}=t,c=await vi(r,t?.parentClientConfig?.region,a),l=!yi(s);n=new e({profile:t?.parentClientConfig?.profile,credentialDefaultProvider:()=>async()=>i,region:c,requestHandler:l?s:void 0,logger:o})}const{Credentials:s,AssumedRoleUser:a}=await n.send(new fi(r));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${r.RoleArn}`);const c=wi(a),l={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,...s.CredentialScope&&{credentialScope:s.CredentialScope},...c&&{accountId:c}};return(0,mi.g)(l,"CREDENTIALS_STS_ASSUME_ROLE","i"),l}},Ei=(t,e)=>{let n;return async i=>{if(!n){const{logger:i=t?.parentClientConfig?.logger,region:o,requestHandler:r=t?.parentClientConfig?.requestHandler,credentialProviderLogger:s}=t,a=await vi(o,t?.parentClientConfig?.region,s),c=!yi(r);n=new e({profile:t?.parentClientConfig?.profile,region:a,requestHandler:c?r:void 0,logger:i})}const{Credentials:o,AssumedRoleUser:r}=await n.send(new hi(i));if(!o||!o.AccessKeyId||!o.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${i.RoleArn}`);const s=wi(r),a={accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.SessionToken,expiration:o.Expiration,...o.CredentialScope&&{credentialScope:o.CredentialScope},...s&&{accountId:s}};return s&&(0,mi.g)(a,"RESOLVED_ACCOUNT_ID","T"),(0,mi.g)(a,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),a}},yi=t=>"h2"===t?.metadata?.handlerProtocol,bi=(t,e)=>e?class extends t{constructor(t){super(t);for(const t of e)this.middlewareStack.use(t)}}:t,Ii=(t={},e)=>xi(t,bi(Pt,e)),Si=(t={},e)=>Ei(t,bi(Pt,e))},862:(t,e,n)=>{n.d(e,{m:()=>i});class i{async sign(t,e,n){return t}}},864:t=>{t.exports={rE:"3.848.0"}}};
3
+ //# sourceMappingURL=697.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=736,exports.ids=[736],exports.modules={860:(t,e,s)=>{s.d(e,{GetRoleCredentialsCommand:()=>D,SSOClient:()=>Mt});var n=s(44),o=s(49),r=s(54);const i={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class a extends r.TJ{constructor(t){super(t),Object.setPrototypeOf(this,a.prototype)}}class c extends a{name="InvalidRequestException";$fault="client";constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,c.prototype)}}class u extends a{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,u.prototype)}}class p extends a{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,p.prototype)}}class d extends a{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,d.prototype)}}const h=t=>({...t,...t.accessToken&&{accessToken:r.$H}}),l=t=>({...t,...t.secretAccessKey&&{secretAccessKey:r.$H},...t.sessionToken&&{sessionToken:r.$H}}),m=t=>({...t,...t.roleCredentials&&{roleCredentials:l(t.roleCredentials)}});var y=s(80),g=s(861);const f=async(t,e)=>{const s=(0,g.l)(t,e),n=(0,r.Tj)({},r.eU,{[q]:t[k]});s.bp("/federation/credentials");const o=(0,r.Tj)({[O]:[,(0,r.Y0)(t[C],"roleName")],[A]:[,(0,r.Y0)(t[I],"accountId")]});return s.m("GET").h(n).q(o).b(undefined),s.build()},w=async(t,e)=>{if(200!==t.statusCode&&t.statusCode>=300)return S(t,e);const s=(0,r.Tj)({$metadata:R(t)}),n=(0,r.Y0)((0,r.Xk)(await(0,y.Y2)(t.body,e)),"body"),o=(0,r.s)(n,{roleCredentials:r.Ss});return Object.assign(s,o),s},S=async(t,e)=>{const s={...t,body:await(0,y.CG)(t.body,e)},n=(0,y.cJ)(t,s.body);switch(n){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await b(s,e);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await P(s,e);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await x(s,e);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await E(s,e);default:const o=s.body;return v({output:t,parsedBody:o,errorCode:n})}},v=(0,r.jr)(a),b=async(t,e)=>{const s=(0,r.Tj)({}),n=t.body,o=(0,r.s)(n,{message:r.lK});Object.assign(s,o);const i=new c({$metadata:R(t),...s});return(0,r.Mw)(i,t.body)},P=async(t,e)=>{const s=(0,r.Tj)({}),n=t.body,o=(0,r.s)(n,{message:r.lK});Object.assign(s,o);const i=new u({$metadata:R(t),...s});return(0,r.Mw)(i,t.body)},x=async(t,e)=>{const s=(0,r.Tj)({}),n=t.body,o=(0,r.s)(n,{message:r.lK});Object.assign(s,o);const i=new p({$metadata:R(t),...s});return(0,r.Mw)(i,t.body)},E=async(t,e)=>{const s=(0,r.Tj)({}),n=t.body,o=(0,r.s)(n,{message:r.lK});Object.assign(s,o);const i=new d({$metadata:R(t),...s});return(0,r.Mw)(i,t.body)},R=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),I="accountId",k="accessToken",A="account_id",C="roleName",O="role_name",q="x-amz-sso_bearer_token";class D extends(r.uB.classBuilder().ep(i).m((function(t,e,s,r){return[(0,o.TM)(s,this.serialize,this.deserialize),(0,n.rD)(s,t.getEndpointParameterInstructions())]})).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(h,m).ser(f).de(w).build()){}var F=s(32),j=s(35),$=s(36),U=s(37),T=s(41),z=s(77),N=s(78),M=s(79),H=s(43),G=s(50),L=s(65),_=s(42);const B=async(t,e,s)=>({operation:(0,_.u)(e).operation,region:await(0,_.t)(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const V=t=>{const e=[];switch(t.operation){case"GetRoleCredentials":case"ListAccountRoles":case"ListAccounts":case"Logout":e.push({schemeId:"smithy.api#noAuth"});break;default:e.push(function(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:t.region},propertiesExtractor:(t,e)=>({signingProperties:{config:t,context:e}})}}(t))}return e},K="3.848.0";var W=s(74),J=s(75),Q=s(68),X=s(70),Y=s(45),Z=s(60),tt=s(71),et=s(51),st=s(72),nt=s(862),ot=s(48),rt=s(56),it=s(59),at=s(39),ct=s(40);const ut="required",pt="fn",dt="argv",ht="ref",lt=!0,mt="isSet",yt="booleanEquals",gt="error",ft="endpoint",wt="tree",St="PartitionResult",vt="getAttr",bt={[ut]:!1,type:"String"},Pt={[ut]:!0,default:!1,type:"Boolean"},xt={[ht]:"Endpoint"},Et={[pt]:yt,[dt]:[{[ht]:"UseFIPS"},!0]},Rt={[pt]:yt,[dt]:[{[ht]:"UseDualStack"},!0]},It={},kt={[pt]:vt,[dt]:[{[ht]:St},"supportsFIPS"]},At={[ht]:St},Ct={[pt]:yt,[dt]:[!0,{[pt]:vt,[dt]:[At,"supportsDualStack"]}]},Ot=[Et],qt=[Rt],Dt=[{[ht]:"Region"}],Ft={version:"1.0",parameters:{Region:bt,UseDualStack:Pt,UseFIPS:Pt,Endpoint:bt},rules:[{conditions:[{[pt]:mt,[dt]:[xt]}],rules:[{conditions:Ot,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:gt},{conditions:qt,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:gt},{endpoint:{url:xt,properties:It,headers:It},type:ft}],type:wt},{conditions:[{[pt]:mt,[dt]:Dt}],rules:[{conditions:[{[pt]:"aws.partition",[dt]:Dt,assign:St}],rules:[{conditions:[Et,Rt],rules:[{conditions:[{[pt]:yt,[dt]:[lt,kt]},Ct],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:It,headers:It},type:ft}],type:wt},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:gt}],type:wt},{conditions:Ot,rules:[{conditions:[{[pt]:yt,[dt]:[kt,lt]}],rules:[{conditions:[{[pt]:"stringEquals",[dt]:[{[pt]:vt,[dt]:[At,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:It,headers:It},type:ft},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:It,headers:It},type:ft}],type:wt},{error:"FIPS is enabled but this partition does not support FIPS",type:gt}],type:wt},{conditions:qt,rules:[{conditions:[Ct],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:It,headers:It},type:ft}],type:wt},{error:"DualStack is enabled but this partition does not support DualStack",type:gt}],type:wt},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:It,headers:It},type:ft}],type:wt}],type:wt},{error:"Invalid Configuration: Missing Region",type:gt}]},jt=new ct.kS({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),$t=(t,e={})=>jt.get(t,(()=>(0,ct.sO)(Ft,{endpointParams:t,logger:e.logger})));ct.mw.aws=at.UF;var Ut=s(73);const Tt=t=>{(0,r.I9)(process.version);const e=(0,Ut.I)(t),s=()=>e().then(r.lT),n=(t=>({apiVersion:"2019-06-10",base64Decoder:t?.base64Decoder??rt.E,base64Encoder:t?.base64Encoder??rt.n,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??$t,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??V,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new st.f2},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new nt.m}],logger:t?.logger??new r.N4,serviceId:t?.serviceId??"SSO",urlParser:t?.urlParser??ot.D,utf8Decoder:t?.utf8Decoder??it.ar,utf8Encoder:t?.utf8Encoder??it.Pq}))(t);(0,W.I)(process.version);const o={profile:t?.profile,logger:n.logger};return{...n,...t,runtime:"node",defaultsMode:e,authSchemePreference:t?.authSchemePreference??(0,Y.Z)(J.$,o),bodyLengthChecker:t?.bodyLengthChecker??tt.n,defaultUserAgentProvider:t?.defaultUserAgentProvider??(0,Q.pf)({serviceId:n.serviceId,clientVersion:K}),maxAttempts:t?.maxAttempts??(0,Y.Z)(G.qs,t),region:t?.region??(0,Y.Z)(T.GG,{...T.zH,...o}),requestHandler:Z.$c.create(t?.requestHandler??s),retryMode:t?.retryMode??(0,Y.Z)({...G.kN,default:async()=>(await s()).retryMode||et.L0},t),sha256:t?.sha256??X.V.bind(null,"sha256"),streamCollector:t?.streamCollector??Z.kv,useDualstackEndpoint:t?.useDualstackEndpoint??(0,Y.Z)(T.e$,o),useFipsEndpoint:t?.useFipsEndpoint??(0,Y.Z)(T.Ko,o),userAgentAppId:t?.userAgentAppId??(0,Y.Z)(Q.hV,o)}};var zt=s(76),Nt=s(33);class Mt extends r.Kj{config;constructor(...[t]){const e=Tt(t||{});super(e),this.initConfig=e;const s=(o=e,Object.assign(o,{useDualstackEndpoint:o.useDualstackEndpoint??!1,useFipsEndpoint:o.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}));var o;const i=(0,U.Dc)(s),a=(0,G.$z)(i),c=(0,T.TD)(a),u=(0,F.OV)(c),p=((t,e)=>{const s=Object.assign((0,zt.Rq)(t),(0,r.xA)(t),(0,Nt.eS)(t),(t=>{const e=t.httpAuthSchemes;let s=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(t){const s=e.findIndex((e=>e.schemeId===t.schemeId));-1===s?e.push(t):e.splice(s,1,t)},httpAuthSchemes:()=>e,setHttpAuthSchemeProvider(t){s=t},httpAuthSchemeProvider:()=>s,setCredentials(t){n=t},credentials:()=>n}})(t));return e.forEach((t=>t.configure(s))),Object.assign(t,(0,zt.$3)(s),(0,r.uv)(s),(0,Nt.jt)(s),{httpAuthSchemes:(n=s).httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()});var n})((t=>{const e=(0,L.h)(t);return Object.assign(e,{authSchemePreference:(0,_.t)(t.authSchemePreference??[])})})((0,n.Co)(u)),t?.extensions||[]);this.config=p,this.middlewareStack.use((0,U.sM)(this.config)),this.middlewareStack.use((0,G.ey)(this.config)),this.middlewareStack.use((0,H.vK)(this.config)),this.middlewareStack.use((0,F.TC)(this.config)),this.middlewareStack.use((0,j.Y7)(this.config)),this.middlewareStack.use((0,$.n4)(this.config)),this.middlewareStack.use((0,z.w)(this.config,{httpAuthSchemeParametersProvider:B,identityProviderConfigProvider:async t=>new N.h({"aws.auth#sigv4":t.credentials})})),this.middlewareStack.use((0,M.l)(this.config))}destroy(){super.destroy()}}},861:(t,e,s)=>{s.d(e,{l:()=>r});var n=s(33),o=s(64);function r(t,e){return new i(t,e)}class i{constructor(t,e){this.input=t,this.context=e,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:t,protocol:e="https",port:s,path:o}=await this.context.endpoint();this.path=o;for(const t of this.resolvePathStack)t(this.path);return new n.Kd({protocol:e,hostname:this.hostname||t,port:s,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(t){return this.hostname=t,this}bp(t){return this.resolvePathStack.push((e=>{this.path=`${e?.endsWith("/")?e.slice(0,-1):e||""}`+t})),this}p(t,e,s,n){return this.resolvePathStack.push((r=>{this.path=((t,e,s,n,r,i)=>{if(null==e||void 0===e[s])throw new Error("No value provided for input HTTP label: "+s+".");{const e=n();if(e.length<=0)throw new Error("Empty value provided for input HTTP label: "+s+".");t=t.replace(r,i?e.split("/").map((t=>(0,o.$)(t))).join("/"):(0,o.$)(e))}return t})(r,this.input,t,e,s,n)})),this}h(t){return this.headers=t,this}q(t){return this.query=t,this}b(t){return this.body=t,this}m(t){return this.method=t,this}}},862:(t,e,s)=>{s.d(e,{m:()=>n});class n{async sign(t,e,s){return t}}}};
3
+ //# sourceMappingURL=736.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=770,exports.ids=[770],exports.modules={855:(e,r,t)=>{t.d(r,{fromIni:()=>u});var n=t(47),o=t(46),i=t(66);const s=e=>(0,i.g)(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p"),a=(e,{profile:r,logger:t})=>{const n="string"==typeof e.source_profile&&void 0===e.credential_source;return n&&t?.debug?.(` ${r} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),n},c=(e,{profile:r,logger:t})=>{const n="string"==typeof e.credential_source&&void 0===e.source_profile;return n&&t?.debug?.(` ${r} isCredentialSourceProfile credential_source=${e.credential_source}`),n},l=async(e,r,a,c={})=>{a.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const l=r[e],{source_profile:d,region:p}=l;if(!a.roleAssumer){const{getDefaultRoleAssumer:e}=await t.e(697).then(t.bind(t,865));a.roleAssumer=e({...a.clientConfig,credentialProviderLogger:a.logger,parentClientConfig:{...a?.parentClientConfig,region:p??a?.parentClientConfig?.region}},a.clientPlugins)}if(d&&d in c)throw new o.C1(`Detected a cycle attempting to resolve credentials for profile ${(0,n.Bz)(a)}. Profiles visited: `+Object.keys(c).join(", "),{logger:a.logger});a.logger?.debug("@aws-sdk/credential-provider-ini - finding credential resolver using "+(d?`source_profile=[${d}]`:`profile=[${e}]`));const u=d?g(d,r,a,{...c,[d]:!0},f(r[d]??{})):(await((e,r,n)=>{const i={EcsContainer:async e=>{const{fromHttp:r}=await t.e(963).then(t.bind(t,859)),{fromContainerMetadata:i}=await t.e(330).then(t.bind(t,858));return n?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>(0,o.cy)(r(e??{}),i(e))().then(s)},Ec2InstanceMetadata:async e=>{n?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:r}=await t.e(330).then(t.bind(t,858));return async()=>r(e)().then(s)},Environment:async e=>{n?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:r}=await Promise.resolve().then(t.bind(t,67));return async()=>r(e)().then(s)}};if(e in i)return i[e];throw new o.C1(`Unsupported credential source in profile ${r}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:n})})(l.credential_source,e,a.logger)(a))();if(f(l))return u.then((e=>(0,i.g)(e,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o")));{const r={RoleArn:l.role_arn,RoleSessionName:l.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:l.external_id,DurationSeconds:parseInt(l.duration_seconds||"3600",10)},{mfa_serial:t}=l;if(t){if(!a.mfaCodeProvider)throw new o.C1(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:a.logger,tryNextLink:!1});r.SerialNumber=t,r.TokenCode=await a.mfaCodeProvider(t)}const n=await u;return a.roleAssumer(n,r).then((e=>(0,i.g)(e,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o")))}},f=e=>!e.role_arn&&!!e.credential_source,d=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.aws_access_key_id&&"string"==typeof e.aws_secret_access_key&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,p=async(e,r)=>{r?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");const t={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return(0,i.g)(t,"CREDENTIALS_PROFILE","n")},g=async(e,r,n,s={},f=!1)=>{const g=r[e];if(Object.keys(s).length>0&&d(g))return p(g,n);if(f||((e,{profile:r="default",logger:t}={})=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.role_arn&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(a(e,{profile:r,logger:t})||c(e,{profile:r,logger:t})))(g,{profile:e,logger:n.logger}))return l(e,r,n,s);if(d(g))return p(g,n);if(u=g,Boolean(u)&&"object"==typeof u&&"string"==typeof u.web_identity_token_file&&"string"==typeof u.role_arn&&["undefined","string"].indexOf(typeof u.role_session_name)>-1)return(async(e,r)=>t.e(522).then(t.bind(t,857)).then((({fromTokenFile:t})=>t({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:r.roleAssumerWithWebIdentity,logger:r.logger,parentClientConfig:r.parentClientConfig})().then((e=>(0,i.g)(e,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q"))))))(g,n);var u;if((e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.credential_process)(g))return(async(e,r)=>t.e(114).then(t.bind(t,856)).then((({fromProcess:t})=>t({...e,profile:r})().then((e=>(0,i.g)(e,"CREDENTIALS_PROFILE_PROCESS","v"))))))(n,e);if((e=>e&&("string"==typeof e.sso_start_url||"string"==typeof e.sso_account_id||"string"==typeof e.sso_session||"string"==typeof e.sso_region||"string"==typeof e.sso_role_name))(g))return await(async(e,r,n={})=>{const{fromSSO:o}=await t.e(476).then(t.bind(t,854));return o({profile:e,logger:n.logger,parentClientConfig:n.parentClientConfig,clientConfig:n.clientConfig})().then((e=>r.sso_session?(0,i.g)(e,"CREDENTIALS_PROFILE_SSO","r"):(0,i.g)(e,"CREDENTIALS_PROFILE_SSO_LEGACY","t")))})(e,g,n);throw new o.C1(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:n.logger})},u=(e={})=>async({callerClientConfig:r}={})=>{const t={...e,parentClientConfig:{...r,...e.parentClientConfig}};t.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const o=await(0,n.YU)(t);return g((0,n.Bz)({profile:e.profile??r?.profile}),o,t)}}};
3
+ //# sourceMappingURL=770.index.js.map
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";exports.id=963,exports.ids=[963],exports.modules={859:(e,t,r)=>{r.d(t,{fromHttp:()=>w});var o=r(66),n=r(60),s=r(46),i=r(26),a=r.n(i);var c=r(33),p=r(54),l=r(55);const w=(e={})=>{let t;e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");const r=e.awsContainerCredentialsRelativeUri??process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI,i=e.awsContainerCredentialsFullUri??process.env.AWS_CONTAINER_CREDENTIALS_FULL_URI,w=e.awsContainerAuthorizationToken??process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN,h=e.awsContainerAuthorizationTokenFile??process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE,d="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger.warn:console.warn;if(r&&i&&(d("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),d("awsContainerCredentialsFullUri will take precedence.")),w&&h&&(d("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),d("awsContainerAuthorizationToken will take precedence.")),i)t=i;else{if(!r)throw new s.C1("No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.",{logger:e.logger});t=`http://169.254.170.2${r}`}const u=new URL(t);((e,t)=>{if("https:"!==e.protocol&&"169.254.170.2"!==e.hostname&&"169.254.170.23"!==e.hostname&&"[fd00:ec2::23]"!==e.hostname){if(e.hostname.includes("[")){if("[::1]"===e.hostname||"[0000:0000:0000:0000:0000:0000:0000:0001]"===e.hostname)return}else{if("localhost"===e.hostname)return;const t=e.hostname.split("."),r=e=>{const t=parseInt(e,10);return 0<=t&&t<=255};if("127"===t[0]&&r(t[1])&&r(t[2])&&r(t[3])&&4===t.length)return}throw new s.C1("URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]",{logger:t})}})(u,e.logger);const f=new n.$c({requestTimeout:e.timeout??1e3,connectionTimeout:e.timeout??1e3});return g=async()=>{const t=function(e){return new c.Kd({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce(((e,[t,r])=>(e[t]=r,e)),{}),fragment:e.hash})}(u);w?t.headers.Authorization=w:h&&(t.headers.Authorization=(await a().readFile(h)).toString());try{return async function(e,t){const r=(0,l.c9)(e.body),o=await r.transformToString();if(200===e.statusCode){const e=JSON.parse(o);if("string"!=typeof e.AccessKeyId||"string"!=typeof e.SecretAccessKey||"string"!=typeof e.Token||"string"!=typeof e.Expiration)throw new s.C1("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:(0,p.EI)(e.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let r={};try{r=JSON.parse(o)}catch(e){}throw Object.assign(new s.C1(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:r.Code,Message:r.Message})}throw new s.C1(`Server responded with status: ${e.statusCode}`,{logger:t})}((await f.handle(t)).response).then((e=>(0,o.g)(e,"CREDENTIALS_HTTP","z")))}catch(t){throw new s.C1(String(t),{logger:e.logger})}},T=e.maxRetries??3,y=e.timeout??1e3,async()=>{for(let e=0;e<T;++e)try{return await g()}catch(e){await new Promise((e=>setTimeout(e,y)))}return await g()};var g,T,y}}};
3
+ //# sourceMappingURL=963.index.js.map