gemi 0.4.111 → 0.4.113
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.
- package/dist/app/index.js +1 -1
- package/dist/chunk-11azhtfq.js +4 -0
- package/dist/{chunk-s5natt4n.js.map → chunk-11azhtfq.js.map} +5 -5
- package/dist/chunk-2p10c4kh.js +5 -0
- package/dist/chunk-2p10c4kh.js.map +64 -0
- package/dist/{chunk-djyzfn1b.js → chunk-3ndk6f56.js} +2 -2
- package/dist/{chunk-djyzfn1b.js.map → chunk-3ndk6f56.js.map} +5 -5
- package/dist/chunk-8mtrpdem.js +20 -0
- package/dist/{chunk-vtq6at24.js.map → chunk-8mtrpdem.js.map} +16 -11
- package/dist/chunk-9txn8acf.js +11 -0
- package/dist/{chunk-ck4b2z5a.js.map → chunk-9txn8acf.js.map} +5 -5
- package/dist/chunk-bhxyhsqr.js +4 -0
- package/dist/{chunk-p9qbw9m8.js.map → chunk-bhxyhsqr.js.map} +4 -4
- package/dist/chunk-bn6dtgj4.js +4 -0
- package/dist/{chunk-dw6fyde0.js.map → chunk-bn6dtgj4.js.map} +2 -2
- package/dist/chunk-cj78pfaa.js +4 -0
- package/dist/chunk-cj78pfaa.js.map +10 -0
- package/dist/chunk-fc27f4cb.js +4 -0
- package/dist/{chunk-nv02r6kq.js.map → chunk-fc27f4cb.js.map} +2 -2
- package/dist/chunk-mvmwz99e.js +4 -0
- package/dist/{chunk-f0k8kxnp.js.map → chunk-mvmwz99e.js.map} +5 -5
- package/dist/chunk-pd22hcnn.js +4 -0
- package/dist/{chunk-y56jme0t.js.map → chunk-pd22hcnn.js.map} +5 -5
- package/dist/{chunk-r06tvhy1.js → chunk-rb7jfsvq.js} +2 -2
- package/dist/{chunk-r06tvhy1.js.map → chunk-rb7jfsvq.js.map} +1 -1
- package/dist/chunk-tpdm7nax.js +8 -0
- package/dist/{chunk-vfq8m4st.js.map → chunk-tpdm7nax.js.map} +2 -2
- package/dist/{chunk-ss47s88c.js → chunk-tqey3r3k.js} +2 -2
- package/dist/{chunk-ss47s88c.js.map → chunk-tqey3r3k.js.map} +1 -1
- package/dist/chunk-tr7zwxhw.js +4 -0
- package/dist/{chunk-w7d8nbgw.js.map → chunk-tr7zwxhw.js.map} +6 -6
- package/dist/chunk-x2f9x5m1.js +4 -0
- package/dist/{chunk-emb8fan6.js.map → chunk-x2f9x5m1.js.map} +2 -2
- package/dist/chunk-yec7wnh4.js +4 -0
- package/dist/{chunk-0wt838y6.js.map → chunk-yec7wnh4.js.map} +4 -4
- package/dist/client/auth/useForgotPassword.d.ts +1 -1
- package/dist/client/auth/useResetPassword.d.ts +1 -1
- package/dist/client/auth/useSignIn.d.ts +1 -1
- package/dist/client/auth/useSignOut.d.ts +1 -1
- package/dist/client/auth/useSignUp.d.ts +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/useMutation.d.ts +5 -5
- package/dist/client/useMutation.d.ts.map +1 -1
- package/dist/http/HttpRequest.d.ts +2 -3
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +3 -3
- package/dist/kernel/index.js +1 -1
- package/dist/services/index.js +2 -11
- package/dist/services/index.js.map +6 -17
- package/package.json +1 -1
- package/dist/chunk-0wt838y6.js +0 -4
- package/dist/chunk-3aebg4t6.js +0 -5
- package/dist/chunk-3aebg4t6.js.map +0 -73
- package/dist/chunk-5pasfeez.js +0 -3
- package/dist/chunk-5pasfeez.js.map +0 -15
- package/dist/chunk-ck4b2z5a.js +0 -11
- package/dist/chunk-dw6fyde0.js +0 -4
- package/dist/chunk-emb8fan6.js +0 -4
- package/dist/chunk-f0k8kxnp.js +0 -4
- package/dist/chunk-nv02r6kq.js +0 -4
- package/dist/chunk-p9qbw9m8.js +0 -4
- package/dist/chunk-s5natt4n.js +0 -4
- package/dist/chunk-vfq8m4st.js +0 -8
- package/dist/chunk-vtq6at24.js +0 -20
- package/dist/chunk-w7d8nbgw.js +0 -4
- package/dist/chunk-y56jme0t.js +0 -4
- /package/dist/{chunk-sd6qmtfs.js → chunk-25y8fca8.js} +0 -0
- /package/dist/{chunk-sd6qmtfs.js.map → chunk-25y8fca8.js.map} +0 -0
package/dist/chunk-p9qbw9m8.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-nv02r6kq.js";import{I as $}from"./chunk-td079vg9.js";import"./chunk-wfc30gdx.js";import{$ as yr,Aa as He,Ba as Ne,Ca as _e,Da as lr,Ea as hr,W as ee,X as re,Y as or,Z as dr,_ as cr,ca as H,da as ar,ea as Ie,fa as Re,ga as Pe,ha as Te,ia as mr,ja as Ke,ka as Me,la as Be,ma as Le,na as wr,oa as kr,qa as E,ra as S,sa as vr,ta as Qe,ua as Xe,va as Er,wa as Ye,xa as Sr,ya as U,za as Ze}from"./chunk-vtq6at24.js";import{Ab as a,Bb as Fr,Cb as fe,Db as Ae,Eb as sr,Fa as er,Fb as ir,Ga as rr,Hb as c,Ib as o,Kb as I,Ma as je,Oa as Fe,Pa as De,Ra as tr,Sa as Ue,Ta as qe,Wa as Ve,Xa as We,kb as v,lb as t,mb as Wr,ob as _,pb as b,qb as j,rb as F,sb as h,zb as $r}from"./chunk-3aebg4t6.js";import"./chunk-r06tvhy1.js";import{Mb as R,Nb as xe}from"./chunk-y56jme0t.js";import"./chunk-5pasfeez.js";import{Ub as ge}from"./chunk-ck4b2z5a.js";import"./chunk-ss47s88c.js";var P=$(H(),1);var se=$(U(),1);function Br(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}}function Z(e){return{schemeId:"smithy.api#noAuth"}}var ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},le=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Br(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},k={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oe={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.654.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.654.0","@aws-sdk/credential-provider-node":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.654.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var pe=$(U(),1);var ze=$(U(),1),Ge=$(H(),1);var de={["required"]:!1,type:"String"},ce={["required"]:!0,default:!1,type:"Boolean"},ye={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Qr={version:"1.0",parameters:{Region:de,UseDualStack:ce,UseFIPS:ce,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ye]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ye,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:we,rules:[{conditions:[ae],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},$e=Qr;var Xr=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),be=(e,s={})=>{return Xr.get(e,()=>Pe($e,{endpointParams:e,logger:s.logger}))};Re.aws=Te;var Je=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Ue,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??be,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new ze.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ge.NoAuthSigner}],logger:e?.logger??new De,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??xe,utf8Decoder:e?.utf8Decoder??je,utf8Encoder:e?.utf8Encoder??Fe}};var Ce=(e)=>{Ae(process.version);const s=_e(e),r=()=>s().then(fe),i=Je(e);return pe.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ne,credentialDefaultProvider:e?.credentialDefaultProvider??ge,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ze({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??R(Xe),region:e?.region??R(Be,Le),requestHandler:Ve.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Ye,default:async()=>(await r()).retryMode||Qe}),sha256:e?.sha256??He.bind(null,"sha256"),streamCollector:e?.streamCollector??We,useDualstackEndpoint:e?.useDualstackEndpoint??R(Ke),useFipsEndpoint:e?.useFipsEndpoint??R(Me)}};var Oe=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((T)=>T.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},ue=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var q=(e)=>e,nr=(e,s)=>{const r={...q(lr(e)),...q(sr(e)),...q(er(e)),...q(Oe(e))};return s.forEach((i)=>i.configure(r)),{...e,...hr(r),...ir(r),...rr(r),...ue(r)}};class N extends tr{constructor(...[e]){const s=Ce(e||{}),r=ne(s),i=ar(r),l=Er(i),n=wr(l),T=or(n),Ar=vr(T),Kr=he(Ar),u=nr(Kr,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(mr(this.config)),this.middlewareStack.use(Sr(this.config)),this.middlewareStack.use(kr(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(cr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Mr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Mr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class d extends $r{constructor(e){super(e);Object.setPrototypeOf(this,d.prototype)}}class x extends d{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends d{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends d{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends d{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends d{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends d{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends d{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends d{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends d{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends d{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends d{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends d{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Q extends d{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}class X extends d{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}var Ir=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Rr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Pr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Tr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),jr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=$(U(),1),D=$(H(),1);var Dr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=c({[hs]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(T)=>I(T),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},xr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Vr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=c({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Y=async(e,s)=>{const r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Zr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Hr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Nr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await _r(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await pr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await gr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await ur(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await rs(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await ss(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await is(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ls(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await es(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await Cr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Or(r,s);default:const l=r.body;return Yr({output:e,parsedBody:l,errorCode:i})}},Yr=Fr(d),Zr=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new x({$metadata:y(e),...r});return a(n,e.body)},Hr=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new z({$metadata:y(e),...r});return a(n,e.body)},Nr=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new G({$metadata:y(e),...r});return a(n,e.body)},_r=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new J({$metadata:y(e),...r});return a(n,e.body)},pr=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new V({$metadata:y(e),...r});return a(n,e.body)},Cr=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Q({$metadata:y(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new W({$metadata:y(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new X({$metadata:y(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:y(e),...r});return a(n,e.body)},es=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new L({$metadata:y(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:y(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:y(e),...r});return a(n,e.body)},is=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:y(e),...r});return a(n,e.body)},ls=async(e,s)=>{const r=c({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new B({$metadata:y(e),...r});return a(n,e.body)},y=(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"]});var hs="aws_iam";class p extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Ir,Rr).ser(Dr).de(zr).build(){}class C extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Pr,Tr).ser(Ur).de(Gr).build(){}class g extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,br).ser(qr).de(Jr).build(){}class O extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(jr,void 0).ser(xr).de(Vr).build(){}var ns={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class fr extends N{}Wr(ns,fr);export{tr as __Client,B as UnsupportedGrantTypeException,M as UnauthorizedClientException,jr as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,K as SlowDownException,d as SSOOIDCServiceException,N as SSOOIDCClient,fr as SSOOIDC,br as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,A as InvalidScopeException,L as InvalidRequestRegionException,f as InvalidRequestException,X as InvalidRedirectUriException,W as InvalidGrantException,Q as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Tr as CreateTokenWithIAMResponseFilterSensitiveLog,Pr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Rr as CreateTokenResponseFilterSensitiveLog,Ir as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,v as $Command};
|
|
3
|
-
|
|
4
|
-
//# debugId=F6575BFC82B7E5D264756E2164756E21
|
package/dist/chunk-s5natt4n.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-td079vg9.js";import"./chunk-r06tvhy1.js";import{Pb as I,Rb as $}from"./chunk-5pasfeez.js";import{Wb as K,ac as X}from"./chunk-ss47s88c.js";var q=(y,c,_)=>{const b={EcsContainer:async(x)=>{const{fromHttp:w}=await import("./chunk-vfq8m4st.js"),{fromContainerMetadata:C}=await import("./chunk-f0k8kxnp.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),$(w(x??{}),C(x))},Ec2InstanceMetadata:async(x)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:w}=await import("./chunk-f0k8kxnp.js");return w(x)},Environment:async(x)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:w}=await import("./chunk-nv02r6kq.js");return w(x)}};if(y in b)return b[y];else throw new I(`Unsupported credential source in profile ${c}. Got ${y}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:_})};var A=(y,{profile:c="default",logger:_}={})=>{return Boolean(y)&&typeof y==="object"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1&&["undefined","string"].indexOf(typeof y.external_id)>-1&&["undefined","string"].indexOf(typeof y.mfa_serial)>-1&&(Z(y,{profile:c,logger:_})||E(y,{profile:c,logger:_}))},Z=(y,{profile:c,logger:_})=>{const b=typeof y.source_profile==="string"&&typeof y.credential_source==="undefined";if(b)_?.debug?.(` ${c} isAssumeRoleWithSourceProfile source_profile=${y.source_profile}`);return b},E=(y,{profile:c,logger:_})=>{const b=typeof y.credential_source==="string"&&typeof y.source_profile==="undefined";if(b)_?.debug?.(` ${c} isCredentialSourceProfile credential_source=${y.credential_source}`);return b},G=async(y,c,_,b={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const x=c[y];if(!_.roleAssumer){const{getDefaultRoleAssumer:k}=await import("./chunk-0wt838y6.js");_.roleAssumer=k({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:_?.parentClientConfig},_.clientPlugins)}const{source_profile:w}=x;if(w&&w in b)throw new I(`Detected a cycle attempting to resolve credentials for profile ${K(_)}. Profiles visited: `+Object.keys(b).join(", "),{logger:_.logger});_.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${w?`source_profile=[${w}]`:`profile=[${y}]`}`);const C=w?j(w,c,_,{...b,[w]:!0},z(c[w]??{})):(await q(x.credential_source,y,_.logger)(_))();if(z(x))return C;else{const k={RoleArn:x.role_arn,RoleSessionName:x.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:x.external_id,DurationSeconds:parseInt(x.duration_seconds||"3600",10)},{mfa_serial:O}=x;if(O){if(!_.mfaCodeProvider)throw new I(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});k.SerialNumber=O,k.TokenCode=await _.mfaCodeProvider(O)}const Y=await C;return _.roleAssumer(Y,k)}},z=(y)=>{return!y.role_arn&&!!y.credential_source};var J=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",L=async(y,c)=>import("./chunk-dw6fyde0.js").then(({fromProcess:_})=>_({...y,profile:c})());var Q=async(y,c={})=>{const{fromSSO:_}=await import("./chunk-w7d8nbgw.js");return _({profile:y,logger:c.logger})()},U=(y)=>y&&(typeof y.sso_start_url==="string"||typeof y.sso_account_id==="string"||typeof y.sso_session==="string"||typeof y.sso_region==="string"||typeof y.sso_role_name==="string");var B=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.aws_access_key_id==="string"&&typeof y.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof y.aws_session_token)>-1&&["undefined","string"].indexOf(typeof y.aws_account_id)>-1,D=(y,c)=>{return c?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:y.aws_access_key_id,secretAccessKey:y.aws_secret_access_key,sessionToken:y.aws_session_token,...y.aws_credential_scope&&{credentialScope:y.aws_credential_scope},...y.aws_account_id&&{accountId:y.aws_account_id}})};var V=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.web_identity_token_file==="string"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1,W=async(y,c)=>import("./chunk-emb8fan6.js").then(({fromTokenFile:_})=>_({webIdentityTokenFile:y.web_identity_token_file,roleArn:y.role_arn,roleSessionName:y.role_session_name,roleAssumerWithWebIdentity:c.roleAssumerWithWebIdentity,logger:c.logger,parentClientConfig:c.parentClientConfig})());var j=async(y,c,_,b={},x=!1)=>{const w=c[y];if(Object.keys(b).length>0&&B(w))return D(w,_);if(x||A(w,{profile:y,logger:_.logger}))return G(y,c,_,b);if(B(w))return D(w,_);if(V(w))return W(w,_);if(J(w))return L(_,y);if(U(w))return await Q(y,_);throw new I(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var a=(y={})=>async()=>{y.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const c=await X(y);return j(K(y),c,y)};export{a as fromIni};
|
|
3
|
-
|
|
4
|
-
//# debugId=B84B4C722A5D255164756E2164756E21
|
package/dist/chunk-vfq8m4st.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-td079vg9.js";import{Ha as i,Wa as I,gb as y,wb as C}from"./chunk-3aebg4t6.js";import"./chunk-r06tvhy1.js";import{Pb as n}from"./chunk-5pasfeez.js";import u from"fs/promises";var T="169.254.170.2",x="169.254.170.23",P="[fd00:ec2::23]",d=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===T||e.hostname===x||e.hostname===P)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;const a=e.hostname.split("."),r=(t)=>{const s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new n(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
|
-
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
|
-
- ECS container host 169.254.170.2
|
|
5
|
-
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:c})};function S(e){return new i({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function g(e,c){const r=await y(e.body).transformToString();if(e.statusCode===200){const t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new n("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:C(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new n(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new n(`Server responded with status: ${e.statusCode}`,{logger:c})}var w=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var E="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",R="http://169.254.170.2",p="AWS_CONTAINER_CREDENTIALS_FULL_URI",A="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",O="AWS_CONTAINER_AUTHORIZATION_TOKEN",b=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c;const a=e.awsContainerCredentialsRelativeUri??process.env[E],r=e.awsContainerCredentialsFullUri??process.env[p],t=e.awsContainerAuthorizationToken??process.env[O],s=e.awsContainerAuthorizationTokenFile??process.env[A],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(a&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${R}${a}`;else throw new n(`No HTTP credential provider host provided.
|
|
6
|
-
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});const h=new URL(c);d(h,e.logger);const K=new I({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return w(async()=>{const o=S(h);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await u.readFile(s)).toString();try{const f=await K.handle(o);return g(f.response)}catch(f){throw new n(String(f),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{b as fromHttp};
|
|
7
|
-
|
|
8
|
-
//# debugId=45EDF6F24CD749A964756E2164756E21
|
package/dist/chunk-vtq6at24.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{I as U$,J as I}from"./chunk-td079vg9.js";import{U as XF}from"./chunk-wfc30gdx.js";import{$a as Nz,Ha as x,Ia as RU,Ka as NU,La as HZ,Na as CZ,Pa as U4,Qa as h2,Ya as G0,Za as qz,_a as kY,ab as J2,bb as M0,cb as PW,db as X2}from"./chunk-3aebg4t6.js";import{Lb as R0}from"./chunk-r06tvhy1.js";import{Mb as L0,Nb as wU}from"./chunk-y56jme0t.js";import{Tb as kZ}from"./chunk-5pasfeez.js";import{Zb as GU}from"./chunk-ss47s88c.js";var i1=I((kU)=>{function DZ($){return $&&$.__esModule?$:{default:$}}function xZ(){if(r0>o0.length-16)hZ.default.randomFillSync(o0),r0=0;return o0.slice(r0,r0+=16)}Object.defineProperty(kU,"__esModule",{value:!0});kU.default=xZ;var hZ=DZ(import.meta.require("crypto")),o0=new Uint8Array(256),r0=o0.length});var DU=I((bU)=>{Object.defineProperty(bU,"__esModule",{value:!0});bU.default=void 0;var cZ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;bU.default=cZ});var q0=I((xU)=>{function uZ($){return $&&$.__esModule?$:{default:$}}function _Z($){return typeof $==="string"&&yZ.default.test($)}Object.defineProperty(xU,"__esModule",{value:!0});xU.default=void 0;var yZ=uZ(DU()),dZ=_Z;xU.default=dZ});var N0=I((yU)=>{function gZ($){return $&&$.__esModule?$:{default:$}}function cU($,U=0){return j[$[U+0]]+j[$[U+1]]+j[$[U+2]]+j[$[U+3]]+"-"+j[$[U+4]]+j[$[U+5]]+"-"+j[$[U+6]]+j[$[U+7]]+"-"+j[$[U+8]]+j[$[U+9]]+"-"+j[$[U+10]]+j[$[U+11]]+j[$[U+12]]+j[$[U+13]]+j[$[U+14]]+j[$[U+15]]}function sZ($,U=0){const G=cU($,U);if(!pZ.default(G))throw TypeError("Stringified UUID is invalid");return G}Object.defineProperty(yU,"__esModule",{value:!0});yU.default=void 0;yU.unsafeStringify=cU;var pZ=gZ(q0()),j=[];for(let $=0;$<256;++$)j.push(($+256).toString(16).slice(1));var lZ=sZ;yU.default=lZ});var gU=I((dU)=>{function rZ($){return $&&$.__esModule?$:{default:$}}function oZ($,U,G){let w=U&&G||0;const W=U||new Array(16);$=$||{};let L=$.node||_U,Z=$.clockseq!==void 0?$.clockseq:r1;if(L==null||Z==null){const F=$.random||($.rng||nZ.default)();if(L==null)L=_U=[F[0]|1,F[1],F[2],F[3],F[4],F[5]];if(Z==null)Z=r1=(F[6]<<8|F[7])&16383}let X=$.msecs!==void 0?$.msecs:Date.now(),Y=$.nsecs!==void 0?$.nsecs:a1+1;const z=X-o1+(Y-a1)/1e4;if(z<0&&$.clockseq===void 0)Z=Z+1&16383;if((z<0||X>o1)&&$.nsecs===void 0)Y=0;if(Y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o1=X,a1=Y,r1=Z,X+=12219292800000;const Q=((X&268435455)*1e4+Y)%4294967296;W[w++]=Q>>>24&255,W[w++]=Q>>>16&255,W[w++]=Q>>>8&255,W[w++]=Q&255;const R=X/4294967296*1e4&268435455;W[w++]=R>>>8&255,W[w++]=R&255,W[w++]=R>>>24&15|16,W[w++]=R>>>16&255,W[w++]=Z>>>8|128,W[w++]=Z&255;for(let F=0;F<6;++F)W[w+F]=L[F];return U||iZ.unsafeStringify(W)}Object.defineProperty(dU,"__esModule",{value:!0});dU.default=void 0;var nZ=rZ(i1()),iZ=N0(),_U,r1,o1=0,a1=0,aZ=oZ;dU.default=aZ});var t1=I((sU)=>{function eZ($){return $&&$.__esModule?$:{default:$}}function $X($){if(!tZ.default($))throw TypeError("Invalid UUID");let U;const G=new Uint8Array(16);return G[0]=(U=parseInt($.slice(0,8),16))>>>24,G[1]=U>>>16&255,G[2]=U>>>8&255,G[3]=U&255,G[4]=(U=parseInt($.slice(9,13),16))>>>8,G[5]=U&255,G[6]=(U=parseInt($.slice(14,18),16))>>>8,G[7]=U&255,G[8]=(U=parseInt($.slice(19,23),16))>>>8,G[9]=U&255,G[10]=(U=parseInt($.slice(24,36),16))/1099511627776&255,G[11]=U/4294967296&255,G[12]=U>>>24&255,G[13]=U>>>16&255,G[14]=U>>>8&255,G[15]=U&255,G}Object.defineProperty(sU,"__esModule",{value:!0});sU.default=void 0;var tZ=eZ(q0()),UX=$X;sU.default=UX});var e1=I((iU)=>{function WX($){return $&&$.__esModule?$:{default:$}}function LX($){$=unescape(encodeURIComponent($));const U=[];for(let G=0;G<$.length;++G)U.push($.charCodeAt(G));return U}function ZX($,U,G){function w(W,L,Z,X){var Y;if(typeof W==="string")W=LX(W);if(typeof L==="string")L=wX.default(L);if(((Y=L)===null||Y===void 0?void 0:Y.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let z=new Uint8Array(16+W.length);if(z.set(L),z.set(W,L.length),z=G(z),z[6]=z[6]&15|U,z[8]=z[8]&63|128,Z){X=X||0;for(let Q=0;Q<16;++Q)Z[X+Q]=z[Q];return Z}return GX.unsafeStringify(z)}try{w.name=$}catch(W){}return w.DNS=mU,w.URL=nU,w}Object.defineProperty(iU,"__esModule",{value:!0});iU.URL=iU.DNS=void 0;iU.default=ZX;var GX=N0(),wX=WX(t1()),mU="6ba7b810-9dad-11d1-80b4-00c04fd430c8";iU.DNS=mU;var nU="6ba7b811-9dad-11d1-80b4-00c04fd430c8";iU.URL=nU});var tU=I((oU)=>{function QX($){return $&&$.__esModule?$:{default:$}}function RX($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return zX.default.createHash("md5").update($).digest()}Object.defineProperty(oU,"__esModule",{value:!0});oU.default=void 0;var zX=QX(import.meta.require("crypto")),FX=RX;oU.default=FX});var GG=I(($G)=>{function eU($){return $&&$.__esModule?$:{default:$}}Object.defineProperty($G,"__esModule",{value:!0});$G.default=void 0;var JX=eU(e1()),IX=eU(tU()),MX=JX.default("v3",48,IX.default),EX=MX;$G.default=EX});var LG=I((wG)=>{function AX($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(wG,"__esModule",{value:!0});wG.default=void 0;var KX=AX(import.meta.require("crypto")),BX={randomUUID:KX.default.randomUUID};wG.default=BX});var QG=I((YG)=>{function XG($){return $&&$.__esModule?$:{default:$}}function fX($,U,G){if(ZG.default.randomUUID&&!U&&!$)return ZG.default.randomUUID();$=$||{};const w=$.random||($.rng||VX.default)();if(w[6]=w[6]&15|64,w[8]=w[8]&63|128,U){G=G||0;for(let W=0;W<16;++W)U[G+W]=w[W];return U}return OX.unsafeStringify(w)}Object.defineProperty(YG,"__esModule",{value:!0});YG.default=void 0;var ZG=XG(LG()),VX=XG(i1()),OX=N0(),TX=fX;YG.default=TX});var JG=I((RG)=>{function CX($){return $&&$.__esModule?$:{default:$}}function qX($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return HX.default.createHash("sha1").update($).digest()}Object.defineProperty(RG,"__esModule",{value:!0});RG.default=void 0;var HX=CX(import.meta.require("crypto")),NX=qX;RG.default=NX});var KG=I((MG)=>{function IG($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(MG,"__esModule",{value:!0});MG.default=void 0;var PX=IG(e1()),jX=IG(JG()),SX=PX.default("v5",80,jX.default),kX=SX;MG.default=kX});var VG=I((AG)=>{Object.defineProperty(AG,"__esModule",{value:!0});AG.default=void 0;var bX="00000000-0000-0000-0000-000000000000";AG.default=bX});var TG=I((OG)=>{function DX($){return $&&$.__esModule?$:{default:$}}function xX($){if(!hX.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)}Object.defineProperty(OG,"__esModule",{value:!0});OG.default=void 0;var hX=DX(q0()),vX=xX;OG.default=vX});var $$=I((_)=>{function m($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(_,"__esModule",{value:!0});Object.defineProperty(_,"NIL",{enumerable:!0,get:function(){return dX.default}});Object.defineProperty(_,"parse",{enumerable:!0,get:function(){return lX.default}});Object.defineProperty(_,"stringify",{enumerable:!0,get:function(){return sX.default}});Object.defineProperty(_,"v1",{enumerable:!0,get:function(){return cX.default}});Object.defineProperty(_,"v3",{enumerable:!0,get:function(){return yX.default}});Object.defineProperty(_,"v4",{enumerable:!0,get:function(){return uX.default}});Object.defineProperty(_,"v5",{enumerable:!0,get:function(){return _X.default}});Object.defineProperty(_,"validate",{enumerable:!0,get:function(){return gX.default}});Object.defineProperty(_,"version",{enumerable:!0,get:function(){return pX.default}});var cX=m(gU()),yX=m(GG()),uX=m(QG()),_X=m(KG()),dX=m(VG()),pX=m(TG()),gX=m(q0()),sX=m(N0()),lX=m(t1())});var P0=I((LJ,jG)=>{var{defineProperty:a0,getOwnPropertyDescriptor:$6,getOwnPropertyNames:U6}=Object,G6=Object.prototype.hasOwnProperty,NG=($,U)=>a0($,"name",{value:U,configurable:!0}),w6=($,U)=>{for(var G in U)a0($,G,{get:U[G],enumerable:!0})},W6=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of U6(U))if(!G6.call($,W)&&W!==G)a0($,W,{get:()=>U[W],enumerable:!(w=$6(U,W))||w.enumerable})}return $},L6=($)=>W6(a0({},"__esModule",{value:!0}),$),PG={};w6(PG,{getSmithyContext:()=>Z6,normalizeProvider:()=>X6});jG.exports=L6(PG);var qG=R0(),Z6=NG(($)=>$[qG.SMITHY_CONTEXT_KEY]||($[qG.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),X6=NG(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var G$=I((ZJ,DG)=>{var{defineProperty:t0,getOwnPropertyDescriptor:Y6,getOwnPropertyNames:z6}=Object,Q6=Object.prototype.hasOwnProperty,$0=($,U)=>t0($,"name",{value:U,configurable:!0}),R6=($,U)=>{for(var G in U)t0($,G,{get:U[G],enumerable:!0})},F6=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of z6(U))if(!Q6.call($,W)&&W!==G)t0($,W,{get:()=>U[W],enumerable:!(w=Y6(U,W))||w.enumerable})}return $},J6=($)=>F6(t0({},"__esModule",{value:!0}),$),SG={};R6(SG,{CredentialsProviderError:()=>I6,ProviderError:()=>e0,TokenProviderError:()=>M6,chain:()=>E6,fromStatic:()=>K6,memoize:()=>A6});DG.exports=J6(SG);var kG=class $ extends Error{constructor(U,G=!0){var w;let W,L=!0;if(typeof G==="boolean")W=void 0,L=G;else if(G!=null&&typeof G==="object")W=G.logger,L=G.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=L,Object.setPrototypeOf(this,$.prototype),(w=W==null?void 0:W.debug)==null||w.call(W,`@smithy/property-provider ${L?"->":"(!)"} ${U}`)}static from(U,G=!0){return Object.assign(new this(U.message,G),U)}};$0(kG,"ProviderError");var e0=kG,bG=class $ extends e0{constructor(U,G=!0){super(U,G);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};$0(bG,"CredentialsProviderError");var I6=bG,hG=class $ extends e0{constructor(U,G=!0){super(U,G);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};$0(hG,"TokenProviderError");var M6=hG,E6=$0((...$)=>async()=>{if($.length===0)throw new e0("No providers in chain");let U;for(let G of $)try{return await G()}catch(w){if(U=w,w==null?void 0:w.tryNextLink)continue;throw w}throw U},"chain"),K6=$0(($)=>()=>Promise.resolve($),"fromStatic"),A6=$0(($,U,G)=>{let w,W,L,Z=!1;const X=$0(async()=>{if(!W)W=$();try{w=await W,L=!0,Z=!1}finally{W=void 0}return w},"coalesceProvider");if(U===void 0)return async(Y)=>{if(!L||(Y==null?void 0:Y.forceRefresh))w=await X();return w};return async(Y)=>{if(!L||(Y==null?void 0:Y.forceRefresh))w=await X();if(Z)return w;if(G&&!G(w))return Z=!0,w;if(U(w))return await X(),w;return w}},"memoize")});var F0=I((xG)=>{Object.defineProperty(xG,"__esModule",{value:!0});xG.getHomeDir=void 0;var B6=import.meta.require("os"),V6=import.meta.require("path"),w$={},O6=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},f6=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:w=`C:${V6.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${w}${G}`;const W=O6();if(!w$[W])w$[W]=B6.homedir();return w$[W]};xG.getHomeDir=f6});var W$=I((cG)=>{Object.defineProperty(cG,"__esModule",{value:!0});cG.getSSOTokenFilepath=void 0;var T6=import.meta.require("crypto"),H6=import.meta.require("path"),C6=F0(),q6=($)=>{const G=T6.createHash("sha1").update($).digest("hex");return H6.join(C6.getHomeDir(),".aws","sso","cache",`${G}.json`)};cG.getSSOTokenFilepath=q6});var dG=I((uG)=>{Object.defineProperty(uG,"__esModule",{value:!0});uG.getSSOTokenFromFile=void 0;var N6=import.meta.require("fs"),P6=W$(),{readFile:j6}=N6.promises,S6=async($)=>{const U=P6.getSSOTokenFilepath($),G=await j6(U,"utf8");return JSON.parse(G)};uG.getSSOTokenFromFile=S6});var Z$=I((pG)=>{Object.defineProperty(pG,"__esModule",{value:!0});pG.slurpFile=void 0;var k6=import.meta.require("fs"),{readFile:b6}=k6.promises,L$={},h6=($,U)=>{if(!L$[$]||(U===null||U===void 0?void 0:U.ignoreCache))L$[$]=b6($,"utf8");return L$[$]};pG.slurpFile=h6});var Q$=I((RJ,S0)=>{var{defineProperty:G1,getOwnPropertyDescriptor:D6,getOwnPropertyNames:x6}=Object,v6=Object.prototype.hasOwnProperty,v=($,U)=>G1($,"name",{value:U,configurable:!0}),c6=($,U)=>{for(var G in U)G1($,G,{get:U[G],enumerable:!0})},X$=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of x6(U))if(!v6.call($,W)&&W!==G)G1($,W,{get:()=>U[W],enumerable:!(w=D6(U,W))||w.enumerable})}return $},z$=($,U,G)=>(X$($,U,"default"),G&&X$(G,U,"default")),y6=($)=>X$(G1({},"__esModule",{value:!0}),$),j0={};c6(j0,{CONFIG_PREFIX_SEPARATOR:()=>U0,DEFAULT_PROFILE:()=>nG,ENV_PROFILE:()=>mG,getProfileName:()=>u6,loadSharedConfigFiles:()=>rG,loadSsoSessionData:()=>t6,parseKnownFiles:()=>$5});S0.exports=y6(j0);z$(j0,F0(),S0.exports);var mG="AWS_PROFILE",nG="default",u6=v(($)=>$.profile||process.env[mG]||nG,"getProfileName");z$(j0,W$(),S0.exports);z$(j0,dG(),S0.exports);var $1=R0(),_6=v(($)=>Object.entries($).filter(([U])=>{const G=U.indexOf(U0);if(G===-1)return!1;return Object.values($1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,w])=>{const W=G.indexOf(U0),L=G.substring(0,W)===$1.IniSectionType.PROFILE?G.substring(W+1):G;return U[L]=w,U},{...$.default&&{default:$.default}}),"getConfigData"),U1=import.meta.require("path"),d6=F0(),p6="AWS_CONFIG_FILE",iG=v(()=>process.env[p6]||U1.join(d6.getHomeDir(),".aws","config"),"getConfigFilepath"),g6=F0(),s6="AWS_SHARED_CREDENTIALS_FILE",l6=v(()=>process.env[s6]||U1.join(g6.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),m6=F0(),n6=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,i6=["__proto__","profile __proto__"],Y$=v(($)=>{const U={};let G,w;for(let W of $.split(/\r?\n/)){const L=W.split(/(^|\s)[;#]/)[0].trim();if(L[0]==="["&&L[L.length-1]==="]"){G=void 0,w=void 0;const X=L.substring(1,L.length-1),Y=n6.exec(X);if(Y){const[,z,,Q]=Y;if(Object.values($1.IniSectionType).includes(z))G=[z,Q].join(U0)}else G=X;if(i6.includes(X))throw new Error(`Found invalid profile name "${X}"`)}else if(G){const X=L.indexOf("=");if(![0,-1].includes(X)){const[Y,z]=[L.substring(0,X).trim(),L.substring(X+1).trim()];if(z==="")w=Y;else{if(w&&W.trimStart()===W)w=void 0;U[G]=U[G]||{};const Q=w?[w,Y].join(U0):Y;U[G][Q]=z}}}}return U},"parseIni"),sG=Z$(),lG=v(()=>({}),"swallowError"),U0=".",rG=v(async($={})=>{const{filepath:U=l6(),configFilepath:G=iG()}=$,w=m6.getHomeDir();let L=U;if(U.startsWith("~/"))L=U1.join(w,U.slice(2));let Z=G;if(G.startsWith("~/"))Z=U1.join(w,G.slice(2));const X=await Promise.all([sG.slurpFile(Z,{ignoreCache:$.ignoreCache}).then(Y$).then(_6).catch(lG),sG.slurpFile(L,{ignoreCache:$.ignoreCache}).then(Y$).catch(lG)]);return{configFile:X[0],credentialsFile:X[1]}},"loadSharedConfigFiles"),r6=v(($)=>Object.entries($).filter(([U])=>U.startsWith($1.IniSectionType.SSO_SESSION+U0)).reduce((U,[G,w])=>({...U,[G.substring(G.indexOf(U0)+1)]:w}),{}),"getSsoSessionData"),o6=Z$(),a6=v(()=>({}),"swallowError"),t6=v(async($={})=>o6.slurpFile($.configFilepath??iG()).then(Y$).then(r6).catch(a6),"loadSsoSessionData"),e6=v((...$)=>{const U={};for(let G of $)for(let[w,W]of Object.entries(G))if(U[w]!==void 0)Object.assign(U[w],W);else U[w]=W;return U},"mergeConfigFiles"),$5=v(async($)=>{const U=await rG($);return e6(U.configFile,U.credentialsFile)},"parseKnownFiles")});var eG=I((FJ,tG)=>{function R$($){try{const U=new Set(Array.from($.match(/([A-Z_]){3,}/g)??[]));return U.delete("CONFIG"),U.delete("CONFIG_PREFIX_SEPARATOR"),U.delete("ENV"),[...U].join(", ")}catch(U){return $}}var{defineProperty:w1,getOwnPropertyDescriptor:U5,getOwnPropertyNames:G5}=Object,w5=Object.prototype.hasOwnProperty,J0=($,U)=>w1($,"name",{value:U,configurable:!0}),W5=($,U)=>{for(var G in U)w1($,G,{get:U[G],enumerable:!0})},L5=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of G5(U))if(!w5.call($,W)&&W!==G)w1($,W,{get:()=>U[W],enumerable:!(w=U5(U,W))||w.enumerable})}return $},Z5=($)=>L5(w1({},"__esModule",{value:!0}),$),aG={};W5(aG,{loadConfig:()=>R5});tG.exports=Z5(aG);var k0=G$();J0(R$,"getSelectorName");var X5=J0(($,U)=>async()=>{try{const G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new k0.CredentialsProviderError(G.message||`Not found in ENV: ${R$($.toString())}`,{logger:U})}},"fromEnv"),oG=Q$(),Y5=J0(($,{preferredFile:U="config",...G}={})=>async()=>{const w=oG.getProfileName(G),{configFile:W,credentialsFile:L}=await oG.loadSharedConfigFiles(G),Z=L[w]||{},X=W[w]||{},Y=U==="config"?{...Z,...X}:{...X,...Z};try{const Q=$(Y,U==="config"?W:L);if(Q===void 0)throw new Error;return Q}catch(z){throw new k0.CredentialsProviderError(z.message||`Not found in config files w/ profile [${w}]: ${R$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),z5=J0(($)=>typeof $==="function","isFunction"),Q5=J0(($)=>z5($)?async()=>await $():k0.fromStatic($),"fromStatic"),R5=J0(({environmentVariableSelector:$,configFileSelector:U,default:G},w={})=>k0.memoize(k0.chain(X5($),Y5(U,w),Q5(G))),"loadConfig")});var Lw=I((ww)=>{Object.defineProperty(ww,"__esModule",{value:!0});ww.getEndpointUrlConfig=void 0;var $w=Q$(),Uw="AWS_ENDPOINT_URL",Gw="endpoint_url",F5=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((L)=>L.toUpperCase()),w=U[[Uw,...G].join("_")];if(w)return w;const W=U[Uw];if(W)return W;return},configFileSelector:(U,G)=>{if(G&&U.services){const W=G[["services",U.services].join($w.CONFIG_PREFIX_SEPARATOR)];if(W){const L=$.split(" ").map((X)=>X.toLowerCase()),Z=W[[L.join("_"),Gw].join($w.CONFIG_PREFIX_SEPARATOR)];if(Z)return Z}}const w=U[Gw];if(w)return w;return},default:void 0});ww.getEndpointUrlConfig=F5});var F$=I((Zw)=>{Object.defineProperty(Zw,"__esModule",{value:!0});Zw.getEndpointFromConfig=void 0;var J5=eG(),I5=Lw(),M5=async($)=>J5.loadConfig(I5.getEndpointUrlConfig($!==null&&$!==void 0?$:""))();Zw.getEndpointFromConfig=M5});var Rw=I((MJ,Qw)=>{function zw($){const U={};if($=$.replace(/^\?/,""),$)for(let G of $.split("&")){let[w,W=null]=G.split("=");if(w=decodeURIComponent(w),W)W=decodeURIComponent(W);if(!(w in U))U[w]=W;else if(Array.isArray(U[w]))U[w].push(W);else U[w]=[U[w],W]}return U}var{defineProperty:W1,getOwnPropertyDescriptor:E5,getOwnPropertyNames:K5}=Object,A5=Object.prototype.hasOwnProperty,B5=($,U)=>W1($,"name",{value:U,configurable:!0}),V5=($,U)=>{for(var G in U)W1($,G,{get:U[G],enumerable:!0})},O5=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of K5(U))if(!A5.call($,W)&&W!==G)W1($,W,{get:()=>U[W],enumerable:!(w=E5(U,W))||w.enumerable})}return $},f5=($)=>O5(W1({},"__esModule",{value:!0}),$),Yw={};V5(Yw,{parseQueryString:()=>zw});Qw.exports=f5(Yw);B5(zw,"parseQueryString")});var Mw=I((EJ,Iw)=>{var{defineProperty:L1,getOwnPropertyDescriptor:T5,getOwnPropertyNames:H5}=Object,C5=Object.prototype.hasOwnProperty,q5=($,U)=>L1($,"name",{value:U,configurable:!0}),N5=($,U)=>{for(var G in U)L1($,G,{get:U[G],enumerable:!0})},P5=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of H5(U))if(!C5.call($,W)&&W!==G)L1($,W,{get:()=>U[W],enumerable:!(w=T5(U,W))||w.enumerable})}return $},j5=($)=>P5(L1({},"__esModule",{value:!0}),$),Fw={};N5(Fw,{parseUrl:()=>Jw});Iw.exports=j5(Fw);var S5=Rw(),Jw=q5(($)=>{if(typeof $==="string")return Jw(new URL($));const{hostname:U,pathname:G,port:w,protocol:W,search:L}=$;let Z;if(L)Z=S5.parseQueryString(L);return{hostname:U,port:w?parseInt(w):void 0,protocol:W,path:G,query:Z}},"parseUrl")});var I$=I((KJ,fw)=>{function Ow($,U,G){return{applyToStack:(w)=>{w.add(Kw($,G),Bw),w.add(Aw($,U),Vw)}}}var{defineProperty:Z1,getOwnPropertyDescriptor:k5,getOwnPropertyNames:b5}=Object,h5=Object.prototype.hasOwnProperty,J$=($,U)=>Z1($,"name",{value:U,configurable:!0}),D5=($,U)=>{for(var G in U)Z1($,G,{get:U[G],enumerable:!0})},x5=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of b5(U))if(!h5.call($,W)&&W!==G)Z1($,W,{get:()=>U[W],enumerable:!(w=k5(U,W))||w.enumerable})}return $},v5=($)=>x5(Z1({},"__esModule",{value:!0}),$),Ew={};D5(Ew,{deserializerMiddleware:()=>Kw,deserializerMiddlewareOption:()=>Bw,getSerdePlugin:()=>Ow,serializerMiddleware:()=>Aw,serializerMiddlewareOption:()=>Vw});fw.exports=v5(Ew);var Kw=J$(($,U)=>(G)=>async(w)=>{const{response:W}=await G(w);try{const L=await U(W,$);return{response:W,output:L}}catch(L){if(Object.defineProperty(L,"$response",{value:W}),!("$metadata"in L)){if(L.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof L.$responseBodyText!=="undefined"){if(L.$response)L.$response.body=L.$responseBodyText}}throw L}},"deserializerMiddleware"),Aw=J$(($,U)=>(G,w)=>async(W)=>{var L;const Z=((L=w.endpointV2)==null?void 0:L.url)&&$.urlParser?async()=>$.urlParser(w.endpointV2.url):$.endpoint;if(!Z)throw new Error("No valid endpoint provider available.");const X=await U(W.input,{...$,endpoint:Z});return G({...W,request:X})},"serializerMiddleware"),Bw={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Vw={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};J$(Ow,"getSerdePlugin")});var Sw=I((AJ,jw)=>{var{defineProperty:Y1,getOwnPropertyDescriptor:c5,getOwnPropertyNames:y5}=Object,u5=Object.prototype.hasOwnProperty,d=($,U)=>Y1($,"name",{value:U,configurable:!0}),_5=($,U)=>{for(var G in U)Y1($,G,{get:U[G],enumerable:!0})},d5=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of y5(U))if(!u5.call($,W)&&W!==G)Y1($,W,{get:()=>U[W],enumerable:!(w=c5(U,W))||w.enumerable})}return $},p5=($)=>d5(Y1({},"__esModule",{value:!0}),$),Hw={};_5(Hw,{endpointMiddleware:()=>Nw,endpointMiddlewareOptions:()=>Pw,getEndpointFromInstructions:()=>Cw,getEndpointPlugin:()=>t5,resolveEndpointConfig:()=>$Y,resolveParams:()=>qw,toEndpointV1:()=>M$});jw.exports=p5(Hw);var g5=d(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(i5(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!n5(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),s5=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,l5=/(\d+\.){3}\d+/,m5=/\.\./,n5=d(($)=>s5.test($)&&!l5.test($)&&!m5.test($),"isDnsCompatibleBucketName"),i5=d(($)=>{const[U,G,w,,,W]=$.split(":"),L=U==="arn"&&$.split(":").length>=6,Z=Boolean(L&&G&&w&&W);if(L&&!Z)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return Z},"isArnBucketName"),r5=d(($,U,G)=>{const w=d(async()=>{const W=G[$]??G[U];if(typeof W==="function")return W();return W},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const W=typeof G.credentials==="function"?await G.credentials():G.credentials;return(W==null?void 0:W.credentialScope)??(W==null?void 0:W.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const W=typeof G.credentials==="function"?await G.credentials():G.credentials;return(W==null?void 0:W.accountId)??(W==null?void 0:W.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const W=await w();if(W&&typeof W==="object"){if("url"in W)return W.url.href;if("hostname"in W){const{protocol:L,hostname:Z,port:X,path:Y}=W;return`${L}//${Z}${X?":"+X:""}${Y}`}}return W};return w},"createConfigValueProvider"),o5=F$(),Tw=Mw(),M$=d(($)=>{if(typeof $==="object"){if("url"in $)return Tw.parseUrl($.url);return $}return Tw.parseUrl($)},"toEndpointV1"),Cw=d(async($,U,G,w)=>{if(!G.endpoint){let Z;if(G.serviceConfiguredEndpoint)Z=await G.serviceConfiguredEndpoint();else Z=await o5.getEndpointFromConfig(G.serviceId);if(Z)G.endpoint=()=>Promise.resolve(M$(Z))}const W=await qw($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(W,w)},"getEndpointFromInstructions"),qw=d(async($,U,G)=>{var w;const W={},L=((w=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:w.call(U))||{};for(let[Z,X]of Object.entries(L))switch(X.type){case"staticContextParams":W[Z]=X.value;break;case"contextParams":W[Z]=$[X.name];break;case"clientContextParams":case"builtInParams":W[Z]=await r5(X.name,Z,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(X))}if(Object.keys(L).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await g5(W);return W},"resolveParams"),X1=P0(),Nw=d(({config:$,instructions:U})=>{return(G,w)=>async(W)=>{var L,Z,X;const Y=await Cw(W.input,{getEndpointParameterInstructions(){return U}},{...$},w);w.endpointV2=Y,w.authSchemes=(L=Y.properties)==null?void 0:L.authSchemes;const z=(Z=w.authSchemes)==null?void 0:Z[0];if(z){w.signing_region=z.signingRegion,w.signing_service=z.signingName;const Q=X1.getSmithyContext(w),R=(X=Q==null?void 0:Q.selectedHttpAuthScheme)==null?void 0:X.httpAuthOption;if(R)R.signingProperties=Object.assign(R.signingProperties||{},{signing_region:z.signingRegion,signingRegion:z.signingRegion,signing_service:z.signingName,signingName:z.signingName,signingRegionSet:z.signingRegionSet},z.properties)}return G({...W})}},"endpointMiddleware"),a5=I$(),Pw={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:a5.serializerMiddlewareOption.name},t5=d(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(Nw({config:$,instructions:U}),Pw)}}),"getEndpointPlugin"),e5=F$(),$Y=d(($)=>{const U=$.tls??!0,{endpoint:G}=$,w=G!=null?async()=>M$(await X1.normalizeProvider(G)()):void 0,L={...$,endpoint:w,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:X1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:X1.normalizeProvider($.useFipsEndpoint??!1)};let Z=void 0;return L.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!Z)Z=e5.getEndpointFromConfig($.serviceId);return Z},L},"resolveEndpointConfig")});var E$=I((BJ,Dw)=>{var{defineProperty:z1,getOwnPropertyDescriptor:UY,getOwnPropertyNames:GY}=Object,wY=Object.prototype.hasOwnProperty,I0=($,U)=>z1($,"name",{value:U,configurable:!0}),WY=($,U)=>{for(var G in U)z1($,G,{get:U[G],enumerable:!0})},LY=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of GY(U))if(!wY.call($,W)&&W!==G)z1($,W,{get:()=>U[W],enumerable:!(w=UY(U,W))||w.enumerable})}return $},ZY=($)=>LY(z1({},"__esModule",{value:!0}),$),kw={};WY(kw,{isClockSkewCorrectedError:()=>bw,isClockSkewError:()=>JY,isRetryableByTrait:()=>FY,isServerError:()=>MY,isThrottlingError:()=>IY,isTransientError:()=>hw});Dw.exports=ZY(kw);var XY=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],YY=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],zY=["TimeoutError","RequestTimeout","RequestTimeoutException"],QY=[500,502,503,504],RY=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],FY=I0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),JY=I0(($)=>XY.includes($.name),"isClockSkewError"),bw=I0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),IY=I0(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||YY.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),hw=I0(($)=>{var U;return bw($)||zY.includes($.name)||RY.includes(($==null?void 0:$.code)||"")||QY.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),MY=I0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!hw($))return!0;return!1}return!1},"isServerError")});var iw=I((VJ,nw)=>{var{defineProperty:Q1,getOwnPropertyDescriptor:EY,getOwnPropertyNames:KY}=Object,AY=Object.prototype.hasOwnProperty,p=($,U)=>Q1($,"name",{value:U,configurable:!0}),BY=($,U)=>{for(var G in U)Q1($,G,{get:U[G],enumerable:!0})},VY=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of KY(U))if(!AY.call($,W)&&W!==G)Q1($,W,{get:()=>U[W],enumerable:!(w=EY(U,W))||w.enumerable})}return $},OY=($)=>VY(Q1({},"__esModule",{value:!0}),$),vw={};BY(vw,{AdaptiveRetryStrategy:()=>NY,ConfiguredRetryStrategy:()=>PY,DEFAULT_MAX_ATTEMPTS:()=>K$,DEFAULT_RETRY_DELAY_BASE:()=>b0,DEFAULT_RETRY_MODE:()=>fY,DefaultRateLimiter:()=>uw,INITIAL_RETRY_TOKENS:()=>A$,INVOCATION_ID_HEADER:()=>HY,MAXIMUM_RETRY_DELAY:()=>B$,NO_RETRY_INCREMENT:()=>gw,REQUEST_HEADER:()=>CY,RETRY_COST:()=>dw,RETRY_MODES:()=>cw,StandardRetryStrategy:()=>V$,THROTTLING_RETRY_DELAY_BASE:()=>_w,TIMEOUT_RETRY_COST:()=>pw});nw.exports=OY(vw);var cw=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(cw||{}),K$=3,fY="standard",TY=E$(),yw=class ${constructor(U){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(U==null?void 0:U.beta)??0.7,this.minCapacity=(U==null?void 0:U.minCapacity)??1,this.minFillRate=(U==null?void 0:U.minFillRate)??0.5,this.scaleConstant=(U==null?void 0:U.scaleConstant)??0.4,this.smooth=(U==null?void 0:U.smooth)??0.8;const G=this.getCurrentTimeInSeconds();this.lastThrottleTime=G,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(U){if(!this.enabled)return;if(this.refillTokenBucket(),U>this.currentCapacity){const G=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,G))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){const U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}const G=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+G),this.lastTimestamp=U}updateClientSendingRate(U){let G;if(this.updateMeasuredRate(),TY.isThrottlingError(U)){const W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),G=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),G=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(G,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(U){return this.getPrecise(U*this.beta)}cubicSuccess(U){return this.getPrecise(this.scaleConstant*Math.pow(U-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(U){this.refillTokenBucket(),this.fillRate=Math.max(U,this.minFillRate),this.maxCapacity=Math.max(U,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const U=this.getCurrentTimeInSeconds(),G=Math.floor(U*2)/2;if(this.requestCount++,G>this.lastTxRateBucket){const w=this.requestCount/(G-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=G}}getPrecise(U){return parseFloat(U.toFixed(8))}};p(yw,"DefaultRateLimiter");var uw=yw,b0=100,B$=20000,_w=500,A$=500,dw=5,pw=10,gw=1,HY="amz-sdk-invocation-id",CY="amz-sdk-request",qY=p(()=>{let $=b0;return{computeNextBackoffDelay:p((w)=>{return Math.floor(Math.min(B$,Math.random()*2**w*$))},"computeNextBackoffDelay"),setDelayBase:p((w)=>{$=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),xw=p(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:p(()=>U,"getRetryCount"),getRetryDelay:p(()=>Math.min(B$,$),"getRetryDelay"),getRetryCost:p(()=>G,"getRetryCost")}},"createDefaultRetryToken"),sw=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=A$,this.retryBackoffStrategy=qY(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return xw({retryDelay:b0,retryCount:0})}async refreshRetryTokenForRetry(U,G){const w=await this.getMaxAttempts();if(this.shouldRetry(U,G,w)){const W=G.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?_w:b0);const L=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),Z=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,L):L,X=this.getCapacityCost(W);return this.capacity-=X,xw({retryDelay:Z,retryCount:U.getRetryCount()+1,retryCost:X})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(A$,this.capacity+(U.getRetryCost()??gw))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(U){return console.warn(`Max attempts provider could not resolve. Using default of ${K$}`),K$}}shouldRetry(U,G,w){return U.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?pw:dw}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};p(sw,"StandardRetryStrategy");var V$=sw,lw=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:w}=G??{};this.rateLimiter=w??new uw,this.standardRetryStrategy=new V$(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,G){return this.rateLimiter.updateClientSendingRate(G),this.standardRetryStrategy.refreshRetryTokenForRetry(U,G)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};p(lw,"AdaptiveRetryStrategy");var NY=lw,mw=class $ extends V${constructor(U,G=b0){super(typeof U==="function"?U:async()=>U);if(typeof G==="number")this.computeNextBackoffDelay=()=>G;else this.computeNextBackoffDelay=G}async refreshRetryTokenForRetry(U,G){const w=await super.refreshRetryTokenForRetry(U,G);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}};p(mw,"ConfiguredRetryStrategy");var PY=mw});var aw=I((rw)=>{Object.defineProperty(rw,"__esModule",{value:!0});rw.getAwsChunkedEncodingStream=void 0;var jY=import.meta.require("stream"),SY=($,U)=>{const{base64Encoder:G,bodyLengthChecker:w,checksumAlgorithmFn:W,checksumLocationName:L,streamHasher:Z}=U,X=G!==void 0&&W!==void 0&&L!==void 0&&Z!==void 0,Y=X?Z(W,$):void 0,z=new jY.Readable({read:()=>{}});return $.on("data",(Q)=>{const R=w(Q)||0;z.push(`${R.toString(16)}\r\n`),z.push(Q),z.push("\r\n")}),$.on("end",async()=>{if(z.push("0\r\n"),X){const Q=G(await Y);z.push(`${L}:${Q}\r\n`),z.push("\r\n")}z.push(null)}),z};rw.getAwsChunkedEncodingStream=SY});var EW=I((fJ,MW)=>{async function T$($,U,G=$W){const w=U.headers??{},W=w.Expect||w.expect;let L=-1,Z=!1;if(W==="100-continue")await Promise.race([new Promise((X)=>{L=Number(setTimeout(X,Math.max($W,G)))}),new Promise((X)=>{$.on("continue",()=>{clearTimeout(L),X()}),$.on("error",()=>{Z=!0,clearTimeout(L),X()})})]);if(!Z)YW($,U.body)}function YW($,U){if(U instanceof XW.Readable){U.pipe($);return}if(U){if(Buffer.isBuffer(U)||typeof U==="string"){$.end(U);return}const G=U;if(typeof G==="object"&&G.buffer&&typeof G.byteOffset==="number"&&typeof G.byteLength==="number"){$.end(Buffer.from(G.buffer,G.byteOffset,G.byteLength));return}$.end(Buffer.from(U));return}$.end()}async function IW($){const U=[],G=$.getReader();let w=!1,W=0;while(!w){const{done:X,value:Y}=await G.read();if(Y)U.push(Y),W+=Y.length;w=X}const L=new Uint8Array(W);let Z=0;for(let X of U)L.set(X,Z),Z+=X.length;return L}var{create:bY,defineProperty:h0,getOwnPropertyDescriptor:hY,getOwnPropertyNames:DY,getPrototypeOf:xY}=Object,vY=Object.prototype.hasOwnProperty,B=($,U)=>h0($,"name",{value:U,configurable:!0}),cY=($,U)=>{for(var G in U)h0($,G,{get:U[G],enumerable:!0})},GW=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of DY(U))if(!vY.call($,W)&&W!==G)h0($,W,{get:()=>U[W],enumerable:!(w=hY(U,W))||w.enumerable})}return $},yY=($,U,G)=>(G=$!=null?bY(xY($)):{},GW(U||!$||!$.__esModule?h0(G,"default",{value:$,enumerable:!0}):G,$)),uY=($)=>GW(h0({},"__esModule",{value:!0}),$),wW={};cY(wW,{DEFAULT_REQUEST_TIMEOUT:()=>lY,NodeHttp2Handler:()=>oY,NodeHttpHandler:()=>mY,streamCollector:()=>tY});MW.exports=uY(wW);var WW=G0(),LW=kY(),O$=import.meta.require("http"),f$=import.meta.require("https"),_Y=["ECONNRESET","EPIPE","ETIMEDOUT"],ZW=B(($)=>{const U={};for(let G of Object.keys($)){const w=$[G];U[G]=Array.isArray(w)?w.join(","):w}return U},"getTransformedHeaders"),tw=1000,dY=B(($,U,G=0)=>{if(!G)return-1;const w=B((W)=>{const L=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G-W),Z=B((X)=>{if(X==null?void 0:X.connecting)X.on("connect",()=>{clearTimeout(L)});else clearTimeout(L)},"doWithSocket");if($.socket)Z($.socket);else $.on("socket",Z)},"registerTimeout");if(G<2000)return w(0),0;return setTimeout(w.bind(null,tw),tw)},"setConnectionTimeout"),pY=3000,gY=B(($,{keepAlive:U,keepAliveMsecs:G},w=pY)=>{if(U!==!0)return-1;const W=B(()=>{if($.socket)$.socket.setKeepAlive(U,G||0);else $.on("socket",(L)=>{L.setKeepAlive(U,G||0)})},"registerListener");if(w===0)return W(),0;return setTimeout(W,w)},"setSocketKeepAlive"),ew=3000,sY=B(($,U,G=0)=>{const w=B((W)=>{$.setTimeout(G-W,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${G} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<G&&G<6000)return w(0),0;return setTimeout(w.bind(null,G===0?0:ew),ew)},"setSocketTimeout"),XW=import.meta.require("stream"),$W=1000;B(T$,"writeRequestBody");B(YW,"writeBody");var lY=0,zW=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,w)=>{if(typeof U==="function")U().then((W)=>{G(this.resolveDefaultConfig(W))}).catch(w);else G(this.resolveDefaultConfig(U))})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}static checkSocketUsage(U,G,w=console){var W,L,Z;const{sockets:X,requests:Y,maxSockets:z}=U;if(typeof z!=="number"||z===1/0)return G;const Q=15000;if(Date.now()-Q<G)return G;if(X&&Y)for(let R in X){const F=((W=X[R])==null?void 0:W.length)??0,M=((L=Y[R])==null?void 0:L.length)??0;if(F>=z&&M>=2*z)return(Z=w==null?void 0:w.warn)==null||Z.call(w,`@smithy/node-http-handler:WARN - socket usage at capacity=${F} and ${M} additional requests are enqueued.
|
|
2
|
-
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
-
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return G}resolveDefaultConfig(U){const{requestTimeout:G,connectionTimeout:w,socketTimeout:W,httpAgent:L,httpsAgent:Z}=U||{};return{connectionTimeout:w,requestTimeout:G??W,httpAgent:(()=>{if(L instanceof O$.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new O$.Agent({keepAlive:!0,maxSockets:50,...L})})(),httpsAgent:(()=>{if(Z instanceof f$.Agent||typeof(Z==null?void 0:Z.destroy)==="function")return Z;return new f$.Agent({keepAlive:!0,maxSockets:50,...Z})})(),logger:console}}destroy(){var U,G,w,W;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(W=(w=this.config)==null?void 0:w.httpsAgent)==null||W.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;return new Promise((w,W)=>{let L=void 0;const Z=[],X=B(async(A)=>{await L,Z.forEach(clearTimeout),w(A)},"resolve"),Y=B(async(A)=>{await L,Z.forEach(clearTimeout),W(A)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const A=new Error("Request aborted");A.name="AbortError",Y(A);return}const z=U.protocol==="https:",Q=z?this.config.httpsAgent:this.config.httpAgent;Z.push(setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(Q,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const R=LW.buildQueryString(U.query||{});let F=void 0;if(U.username!=null||U.password!=null){const A=U.username??"",P=U.password??"";F=`${A}:${P}`}let M=U.path;if(R)M+=`?${R}`;if(U.fragment)M+=`#${U.fragment}`;let E=U.hostname??"";if(E[0]==="["&&E.endsWith("]"))E=U.hostname.slice(1,-1);else E=U.hostname;const K={headers:U.headers,host:E,method:U.method,path:M,port:U.port,agent:Q,auth:F},k=(z?f$.request:O$.request)(K,(A)=>{const P=new WW.HttpResponse({statusCode:A.statusCode||-1,reason:A.statusMessage,headers:ZW(A.headers),body:A});X({response:P})});if(k.on("error",(A)=>{if(_Y.includes(A.code))Y(Object.assign(A,{name:"TimeoutError"}));else Y(A)}),G){const A=B(()=>{k.destroy();const P=new Error("Request aborted");P.name="AbortError",Y(P)},"onAbort");if(typeof G.addEventListener==="function"){const P=G;P.addEventListener("abort",A,{once:!0}),k.once("close",()=>P.removeEventListener("abort",A))}else G.onabort=A}Z.push(dY(k,Y,this.config.connectionTimeout)),Z.push(sY(k,Y,this.config.requestTimeout));const l=K.agent;if(typeof l==="object"&&"keepAlive"in l)Z.push(gY(k,{keepAlive:l.keepAlive,keepAliveMsecs:l.keepAliveMsecs}));L=T$(k,U,this.config.requestTimeout).catch((A)=>{return Z.forEach(clearTimeout),W(A)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};B(zW,"NodeHttpHandler");var mY=zW,UW=import.meta.require("http2"),nY=yY(import.meta.require("http2")),QW=class ${constructor(U){this.sessions=[],this.sessions=U??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(U){this.sessions.push(U)}contains(U){return this.sessions.includes(U)}remove(U){this.sessions=this.sessions.filter((G)=>G!==U)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(U){for(let G of this.sessions)if(G===U){if(!G.destroyed)G.destroy()}}};B(QW,"NodeHttp2ConnectionPool");var iY=QW,RW=class ${constructor(U){if(this.sessionCache=new Map,this.config=U,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(U,G){const w=this.getUrlString(U),W=this.sessionCache.get(w);if(W){const Y=W.poll();if(Y&&!this.config.disableConcurrency)return Y}const L=nY.default.connect(w);if(this.config.maxConcurrency)L.settings({maxConcurrentStreams:this.config.maxConcurrency},(Y)=>{if(Y)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});L.unref();const Z=B(()=>{L.destroy(),this.deleteSession(w,L)},"destroySessionCb");if(L.on("goaway",Z),L.on("error",Z),L.on("frameError",Z),L.on("close",()=>this.deleteSession(w,L)),G.requestTimeout)L.setTimeout(G.requestTimeout,Z);const X=this.sessionCache.get(w)||new iY;return X.offerLast(L),this.sessionCache.set(w,X),L}deleteSession(U,G){const w=this.sessionCache.get(U);if(!w)return;if(!w.contains(G))return;w.remove(G),this.sessionCache.set(U,w)}release(U,G){var w;const W=this.getUrlString(U);(w=this.sessionCache.get(W))==null||w.offerLast(G)}destroy(){for(let[U,G]of this.sessionCache){for(let w of G){if(!w.destroyed)w.destroy();G.remove(w)}this.sessionCache.delete(U)}}setMaxConcurrentStreams(U){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=U}setDisableConcurrentStreams(U){this.config.disableConcurrency=U}getUrlString(U){return U.destination.toString()}};B(RW,"NodeHttp2ConnectionManager");var rY=RW,FW=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new rY({}),this.configProvider=new Promise((G,w)=>{if(typeof U==="function")U().then((W)=>{G(W||{})}).catch(w);else G(U||{})})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}destroy(){this.connectionManager.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:w,disableConcurrentStreams:W}=this.config;return new Promise((L,Z)=>{var X;let Y=!1,z=void 0;const Q=B(async(H)=>{await z,L(H)},"resolve"),R=B(async(H)=>{await z,Z(H)},"reject");if(G==null?void 0:G.aborted){Y=!0;const H=new Error("Request aborted");H.name="AbortError",R(H);return}const{hostname:F,method:M,port:E,protocol:K,query:f}=U;let k="";if(U.username!=null||U.password!=null){const H=U.username??"",u=U.password??"";k=`${H}:${u}@`}const l=`${K}//${k}${F}${E?`:${E}`:""}`,A={destination:new URL(l)},P=this.connectionManager.lease(A,{requestTimeout:(X=this.config)==null?void 0:X.sessionTimeout,disableConcurrentStreams:W||!1}),Q0=B((H)=>{if(W)this.destroySession(P);Y=!0,R(H)},"rejectWithDestroy"),SU=LW.buildQueryString(f||{});let n1=U.path;if(SU)n1+=`?${SU}`;if(U.fragment)n1+=`#${U.fragment}`;const D=P.request({...U.headers,[UW.constants.HTTP2_HEADER_PATH]:n1,[UW.constants.HTTP2_HEADER_METHOD]:M});if(P.ref(),D.on("response",(H)=>{const u=new WW.HttpResponse({statusCode:H[":status"]||-1,headers:ZW(H),body:D});if(Y=!0,Q({response:u}),W)P.close(),this.connectionManager.deleteSession(l,P)}),w)D.setTimeout(w,()=>{D.close();const H=new Error(`Stream timed out because of no activity for ${w} ms`);H.name="TimeoutError",Q0(H)});if(G){const H=B(()=>{D.close();const u=new Error("Request aborted");u.name="AbortError",Q0(u)},"onAbort");if(typeof G.addEventListener==="function"){const u=G;u.addEventListener("abort",H,{once:!0}),D.once("close",()=>u.removeEventListener("abort",H))}else G.onabort=H}D.on("frameError",(H,u,bZ)=>{Q0(new Error(`Frame type id ${H} in stream id ${bZ} has failed with code ${u}.`))}),D.on("error",Q0),D.on("aborted",()=>{Q0(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${D.rstCode}.`))}),D.on("close",()=>{if(P.unref(),W)P.destroy();if(!Y)Q0(new Error("Unexpected error: http2 request did not get a response"))}),z=T$(D,U,w)})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[U]:G}})}httpHandlerConfigs(){return this.config??{}}destroySession(U){if(!U.destroyed)U.destroy()}};B(FW,"NodeHttp2Handler");var oY=FW,JW=class $ extends XW.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,w){this.bufferedBytes.push(U),w()}};B(JW,"Collector");var aY=JW,tY=B(($)=>{if(eY($))return IW($);return new Promise((U,G)=>{const w=new aY;$.pipe(w),$.on("error",(W)=>{w.end(),G(W)}),w.on("error",G),w.on("finish",function(){const W=new Uint8Array(Buffer.concat(this.bufferedBytes));U(W)})})},"streamCollector"),eY=B(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");B(IW,"collectReadableStream")});var C$=I((TJ,fW)=>{function VW($){if($.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const U=new Uint8Array($.length/2);for(let G=0;G<$.length;G+=2){const w=$.slice(G,G+2).toLowerCase();if(w in H$)U[G/2]=H$[w];else throw new Error(`Cannot decode unrecognized sequence ${w} as hexadecimal`)}return U}function OW($){let U="";for(let G=0;G<$.byteLength;G++)U+=BW[$[G]];return U}var{defineProperty:R1,getOwnPropertyDescriptor:$2,getOwnPropertyNames:U2}=Object,G2=Object.prototype.hasOwnProperty,KW=($,U)=>R1($,"name",{value:U,configurable:!0}),w2=($,U)=>{for(var G in U)R1($,G,{get:U[G],enumerable:!0})},W2=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of U2(U))if(!G2.call($,W)&&W!==G)R1($,W,{get:()=>U[W],enumerable:!(w=$2(U,W))||w.enumerable})}return $},L2=($)=>W2(R1({},"__esModule",{value:!0}),$),AW={};w2(AW,{fromHex:()=>VW,toHex:()=>OW});fW.exports=L2(AW);var BW={},H$={};for(let $=0;$<256;$++){let U=$.toString(16).toLowerCase();if(U.length===1)U=`0${U}`;BW[$]=U,H$[U]=$}KW(VW,"fromHex");KW(OW,"toHex")});var D0=I((TW)=>{Object.defineProperty(TW,"__esModule",{value:!0});TW.isReadableStream=void 0;var Z2=($)=>{var U;return typeof ReadableStream==="function"&&(((U=$===null||$===void 0?void 0:$.constructor)===null||U===void 0?void 0:U.name)===ReadableStream.name||$ instanceof ReadableStream)};TW.isReadableStream=Z2});var kW=I((jW)=>{Object.defineProperty(jW,"__esModule",{value:!0});jW.sdkStreamMixin=void 0;var Y2=X2(),z2=PW(),Q2=C$(),R2=M0(),CW=D0(),qW="The stream has already been transformed.",F2=($)=>{var U,G;if(!NW($)&&!CW.isReadableStream($)){const Z=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${Z}`)}let w=!1;const W=async()=>{if(w)throw new Error(qW);return w=!0,await Y2.streamCollector($)},L=(Z)=>{if(typeof Z.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return Z.stream()};return Object.assign($,{transformToByteArray:W,transformToString:async(Z)=>{const X=await W();if(Z==="base64")return z2.toBase64(X);else if(Z==="hex")return Q2.toHex(X);else if(Z===void 0||Z==="utf8"||Z==="utf-8")return R2.toUtf8(X);else if(typeof TextDecoder==="function")return new TextDecoder(Z).decode(X);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(w)throw new Error(qW);if(w=!0,NW($))return L($);else if(CW.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};jW.sdkStreamMixin=F2;var NW=($)=>typeof Blob==="function"&&$ instanceof Blob});var xW=I((hW)=>{Object.defineProperty(hW,"__esModule",{value:!0});hW.sdkStreamMixin=void 0;var I2=EW(),M2=J2(),q$=import.meta.require("stream"),E2=import.meta.require("util"),K2=kW(),bW="The stream has already been transformed.",A2=($)=>{var U,G;if(!($ instanceof q$.Readable))try{return K2.sdkStreamMixin($)}catch(L){const Z=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${Z}`)}let w=!1;const W=async()=>{if(w)throw new Error(bW);return w=!0,await I2.streamCollector($)};return Object.assign($,{transformToByteArray:W,transformToString:async(L)=>{const Z=await W();if(L===void 0||Buffer.isEncoding(L))return M2.fromArrayBuffer(Z.buffer,Z.byteOffset,Z.byteLength).toString(L);else return new E2.TextDecoder(L).decode(Z)},transformToWebStream:()=>{if(w)throw new Error(bW);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof q$.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return w=!0,q$.Readable.toWeb($)}})};hW.sdkStreamMixin=A2});var yW=I((vW)=>{async function B2($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(vW,"__esModule",{value:!0});vW.splitStream=void 0;vW.splitStream=B2});var pW=I((_W)=>{async function f2($){if(O2.isReadableStream($))return V2.splitStream($);const U=new uW.PassThrough,G=new uW.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(_W,"__esModule",{value:!0});_W.splitStream=void 0;var uW=import.meta.require("stream"),V2=yW(),O2=D0();_W.splitStream=f2});var lW=I((gW)=>{async function T2($,U){var G;let w=0;const W=[],L=$.getReader();let Z=!1;while(!Z){const{done:z,value:Q}=await L.read();if(Q)W.push(Q),w+=(G=Q===null||Q===void 0?void 0:Q.byteLength)!==null&&G!==void 0?G:0;if(w>=U)break;Z=z}L.releaseLock();const X=new Uint8Array(Math.min(U,w));let Y=0;for(let z of W){if(z.byteLength>X.byteLength-Y){X.set(z.subarray(0,X.byteLength-Y),Y);break}else X.set(z,Y);Y+=z.length}return X}Object.defineProperty(gW,"__esModule",{value:!0});gW.headStream=void 0;gW.headStream=T2});var rW=I((nW)=>{Object.defineProperty(nW,"__esModule",{value:!0});nW.headStream=void 0;var H2=import.meta.require("stream"),C2=lW(),q2=D0(),N2=($,U)=>{if(q2.isReadableStream($))return C2.headStream($,U);return new Promise((G,w)=>{const W=new mW;W.limit=U,$.pipe(W),$.on("error",(L)=>{W.end(),w(L)}),W.on("error",w),W.on("finish",function(){const L=new Uint8Array(Buffer.concat(this.buffers));G(L)})})};nW.headStream=N2;class mW extends H2.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write($,U,G){var w;if(this.buffers.push($),this.bytesBuffered+=(w=$.byteLength)!==null&&w!==void 0?w:0,this.bytesBuffered>=this.limit){const W=this.bytesBuffered-this.limit,L=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=L.subarray(0,L.byteLength-W),this.emit("finish")}G()}}});var U8=I((kJ,W0)=>{function tW($,U="utf-8"){if(U==="base64")return oW.toBase64($);return aW.toUtf8($)}function eW($,U){if(U==="base64")return P$.mutate(oW.fromBase64($));return P$.mutate(aW.fromUtf8($))}var{defineProperty:F1,getOwnPropertyDescriptor:P2,getOwnPropertyNames:j2}=Object,S2=Object.prototype.hasOwnProperty,j$=($,U)=>F1($,"name",{value:U,configurable:!0}),k2=($,U)=>{for(var G in U)F1($,G,{get:U[G],enumerable:!0})},N$=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of j2(U))if(!S2.call($,W)&&W!==G)F1($,W,{get:()=>U[W],enumerable:!(w=P2(U,W))||w.enumerable})}return $},x0=($,U,G)=>(N$($,U,"default"),G&&N$(G,U,"default")),b2=($)=>N$(F1({},"__esModule",{value:!0}),$),w0={};k2(w0,{Uint8ArrayBlobAdapter:()=>P$});W0.exports=b2(w0);var oW=PW(),aW=M0();j$(tW,"transformToString");j$(eW,"transformFromString");var $8=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return eW(U,G);default:throw new Error(`Unsupported conversion from ${typeof U} to Uint8ArrayBlobAdapter.`)}}static mutate(U){return Object.setPrototypeOf(U,$.prototype),U}transformToString(U="utf-8"){return tW(this,U)}};j$($8,"Uint8ArrayBlobAdapter");var P$=$8;x0(w0,aw(),W0.exports);x0(w0,xW(),W0.exports);x0(w0,pW(),W0.exports);x0(w0,rW(),W0.exports);x0(w0,D0(),W0.exports)});var B0=I((bJ,H8)=>{function M8($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),w=$.getUTCDay(),W=$.getUTCDate(),L=$.getUTCHours(),Z=$.getUTCMinutes(),X=$.getUTCSeconds(),Y=W<10?`0${W}`:`${W}`,z=L<10?`0${L}`:`${L}`,Q=Z<10?`0${Z}`:`${Z}`,R=X<10?`0${X}`:`${X}`;return`${X9[w]}, ${Y} ${_$[G]} ${U} ${z}:${Q}:${R} GMT`}function M1($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})}function d$($,U,G){let w,W,L;if(typeof U==="undefined"&&typeof G==="undefined")w={},L=$;else if(w=$,typeof U==="function")return W=U,L=G,_9(w,W,L);else L=U;for(let Z of Object.keys(L)){if(!Array.isArray(L[Z])){w[Z]=L[Z];continue}f8(w,null,L,Z)}return w}function T8($,U,G){if(G<=0||!Number.isInteger(G))throw new Error("Invalid number of delimiters ("+G+") for splitEvery.");const w=$.split(U);if(G===1)return w;const W=[];let L="";for(let Z=0;Z<w.length;Z++){if(L==="")L=w[Z];else L+=U+w[Z];if((Z+1)%G===0)W.push(L),L=""}if(L!=="")W.push(L);return W}var{defineProperty:E1,getOwnPropertyDescriptor:D2,getOwnPropertyNames:x2}=Object,v2=Object.prototype.hasOwnProperty,J=($,U)=>E1($,"name",{value:U,configurable:!0}),c2=($,U)=>{for(var G in U)E1($,G,{get:U[G],enumerable:!0})},y2=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of x2(U))if(!v2.call($,W)&&W!==G)E1($,W,{get:()=>U[W],enumerable:!(w=D2(U,W))||w.enumerable})}return $},u2=($)=>y2(E1({},"__esModule",{value:!0}),$),w8={};c2(w8,{Client:()=>d2,Command:()=>Y8,LazyJsonString:()=>c9,NoOpLogger:()=>_2,SENSITIVE_STRING:()=>s2,ServiceException:()=>C9,StringWrapper:()=>_0,_json:()=>v$,collectBody:()=>p2,convertMap:()=>y9,createAggregatedClient:()=>l2,dateToUtcString:()=>M8,decorateServiceException:()=>K8,emitWarningIfUnsupportedVersion:()=>j9,expectBoolean:()=>n2,expectByte:()=>x$,expectFloat32:()=>J1,expectInt:()=>r2,expectInt32:()=>h$,expectLong:()=>y0,expectNonNull:()=>a2,expectNumber:()=>c0,expectObject:()=>Q8,expectShort:()=>D$,expectString:()=>t2,expectUnion:()=>e2,extendedEncodeURIComponent:()=>M1,getArrayIfSingleItem:()=>v9,getDefaultClientConfiguration:()=>D9,getDefaultExtensionConfiguration:()=>B8,getValueFromTextNode:()=>V8,handleFloat:()=>G9,limitedParseDouble:()=>u$,limitedParseFloat:()=>w9,limitedParseFloat32:()=>W9,loadConfigsForDefaultMode:()=>P9,logger:()=>u0,map:()=>d$,parseBoolean:()=>m2,parseEpochTimestamp:()=>E9,parseRfc3339DateTime:()=>z9,parseRfc3339DateTimeWithOffset:()=>R9,parseRfc7231DateTime:()=>M9,resolveDefaultRuntimeConfig:()=>x9,resolvedPath:()=>g9,serializeDateTime:()=>l9,serializeFloat:()=>s9,splitEvery:()=>T8,strictParseByte:()=>I8,strictParseDouble:()=>y$,strictParseFloat:()=>$9,strictParseFloat32:()=>R8,strictParseInt:()=>L9,strictParseInt32:()=>Z9,strictParseLong:()=>J8,strictParseShort:()=>E0,take:()=>u9,throwDefaultError:()=>A8,withBaseException:()=>q9});H8.exports=u2(w8);var W8=class ${trace(){}debug(){}info(){}warn(){}error(){}};J(W8,"NoOpLogger");var _2=W8,L8=h2(),Z8=class ${constructor(U){this.config=U,this.middlewareStack=L8.constructStack()}send(U,G,w){const W=typeof G!=="function"?G:void 0,L=typeof G==="function"?G:w,Z=W===void 0&&this.config.cacheMiddleware===!0;let X;if(Z){if(!this.handlers)this.handlers=new WeakMap;const Y=this.handlers;if(Y.has(U.constructor))X=Y.get(U.constructor);else X=U.resolveMiddleware(this.middlewareStack,this.config,W),Y.set(U.constructor,X)}else delete this.handlers,X=U.resolveMiddleware(this.middlewareStack,this.config,W);if(L)X(U).then((Y)=>L(null,Y.output),(Y)=>L(Y)).catch(()=>{});else return X(U).then((Y)=>Y.output)}destroy(){var U,G,w;(w=(G=(U=this.config)==null?void 0:U.requestHandler)==null?void 0:G.destroy)==null||w.call(G),delete this.handlers}};J(Z8,"Client");var d2=Z8,S$=U8(),p2=J(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return S$.Uint8ArrayBlobAdapter.mutate($);if(!$)return S$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const G=U.streamCollector($);return S$.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),b$=R0(),X8=class ${constructor(){this.middlewareStack=L8.constructStack()}static classBuilder(){return new g2}resolveMiddlewareWithContext(U,G,w,{middlewareFn:W,clientName:L,commandName:Z,inputFilterSensitiveLog:X,outputFilterSensitiveLog:Y,smithyContext:z,additionalContext:Q,CommandCtor:R}){for(let f of W.bind(this)(R,U,G,w))this.middlewareStack.use(f);const F=U.concat(this.middlewareStack),{logger:M}=G,E={logger:M,clientName:L,commandName:Z,inputFilterSensitiveLog:X,outputFilterSensitiveLog:Y,[b$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...z},...Q},{requestHandler:K}=G;return F.resolve((f)=>K.handle(f.request,w||{}),E)}};J(X8,"Command");var Y8=X8,z8=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(U)=>U,this._outputFilterSensitiveLog=(U)=>U,this._serializer=null,this._deserializer=null}init(U){this._init=U}ep(U){return this._ep=U,this}m(U){return this._middlewareFn=U,this}s(U,G,w={}){return this._smithyContext={service:U,operation:G,...w},this}c(U={}){return this._additionalContext=U,this}n(U,G){return this._clientName=U,this._commandName=G,this}f(U=(w)=>w,G=(w)=>w){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=G,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;const G=this;let w;return w=(U=class extends Y8{constructor(...[W]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=W??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(W,L,Z){return this.resolveMiddlewareWithContext(W,L,Z,{CommandCtor:w,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},J(U,"CommandRef"),U)}};J(z8,"ClassBuilder");var g2=z8,s2="***SensitiveInformation***",l2=J(($,U)=>{for(let G of Object.keys($)){const w=$[G],W=J(async function(Z,X,Y){const z=new w(Z);if(typeof X==="function")this.send(z,X);else if(typeof Y==="function"){if(typeof X!=="object")throw new Error(`Expected http options but got ${typeof X}`);this.send(z,X||{},Y)}else return this.send(z,X)},"methodImpl"),L=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[L]=W}},"createAggregatedClient"),m2=J(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),n2=J(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)u0.warn(I1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")u0.warn(I1(`Expected boolean, got ${typeof $}: ${$}`));if(U==="false")return!1;if(U==="true")return!0}if(typeof $==="boolean")return $;throw new TypeError(`Expected boolean, got ${typeof $}: ${$}`)},"expectBoolean"),c0=J(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))u0.warn(I1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),i2=Math.ceil(340282346638528860000000000000000000000),J1=J(($)=>{const U=c0($);if(U!==void 0&&!Number.isNaN(U)&&U!==1/0&&U!==-1/0){if(Math.abs(U)>i2)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),y0=J(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),r2=y0,h$=J(($)=>c$($,32),"expectInt32"),D$=J(($)=>c$($,16),"expectShort"),x$=J(($)=>c$($,8),"expectByte"),c$=J(($,U)=>{const G=y0($);if(G!==void 0&&o2(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),o2=J(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),a2=J(($,U)=>{if($===null||$===void 0){if(U)throw new TypeError(`Expected a non-null value for ${U}`);throw new TypeError("Expected a non-null value")}return $},"expectNonNull"),Q8=J(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;const U=Array.isArray($)?"array":typeof $;throw new TypeError(`Expected object, got ${U}: ${$}`)},"expectObject"),t2=J(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return u0.warn(I1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),e2=J(($)=>{if($===null||$===void 0)return;const U=Q8($),G=Object.entries(U).filter(([,w])=>w!=null).map(([w])=>w);if(G.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(G.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${G} were not null.`);return U},"expectUnion"),y$=J(($)=>{if(typeof $=="string")return c0(A0($));return c0($)},"strictParseDouble"),$9=y$,R8=J(($)=>{if(typeof $=="string")return J1(A0($));return J1($)},"strictParseFloat32"),U9=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,A0=J(($)=>{const U=$.match(U9);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),u$=J(($)=>{if(typeof $=="string")return F8($);return c0($)},"limitedParseDouble"),G9=u$,w9=u$,W9=J(($)=>{if(typeof $=="string")return F8($);return J1($)},"limitedParseFloat32"),F8=J(($)=>{switch($){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),J8=J(($)=>{if(typeof $==="string")return y0(A0($));return y0($)},"strictParseLong"),L9=J8,Z9=J(($)=>{if(typeof $==="string")return h$(A0($));return h$($)},"strictParseInt32"),E0=J(($)=>{if(typeof $==="string")return D$(A0($));return D$($)},"strictParseShort"),I8=J(($)=>{if(typeof $==="string")return x$(A0($));return x$($)},"strictParseByte"),I1=J(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),u0={warn:console.warn},X9=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],_$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];J(M8,"dateToUtcString");var Y9=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),z9=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=Y9.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,w,W,L,Z,X,Y,z]=U,Q=E0(K0(w)),R=s(W,"month",1,12),F=s(L,"day",1,31);return v0(Q,R,F,{hours:Z,minutes:X,seconds:Y,fractionalMilliseconds:z})},"parseRfc3339DateTime"),Q9=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),R9=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=Q9.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,w,W,L,Z,X,Y,z,Q]=U,R=E0(K0(w)),F=s(W,"month",1,12),M=s(L,"day",1,31),E=v0(R,F,M,{hours:Z,minutes:X,seconds:Y,fractionalMilliseconds:z});if(Q.toUpperCase()!="Z")E.setTime(E.getTime()-H9(Q));return E},"parseRfc3339DateTimeWithOffset"),F9=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),J9=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),I9=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),M9=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=F9.exec($);if(U){const[G,w,W,L,Z,X,Y,z]=U;return v0(E0(K0(L)),k$(W),s(w,"day",1,31),{hours:Z,minutes:X,seconds:Y,fractionalMilliseconds:z})}if(U=J9.exec($),U){const[G,w,W,L,Z,X,Y,z]=U;return B9(v0(K9(L),k$(W),s(w,"day",1,31),{hours:Z,minutes:X,seconds:Y,fractionalMilliseconds:z}))}if(U=I9.exec($),U){const[G,w,W,L,Z,X,Y,z]=U;return v0(E0(K0(z)),k$(w),s(W.trimLeft(),"day",1,31),{hours:L,minutes:Z,seconds:X,fractionalMilliseconds:Y})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),E9=J(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=y$($);else if(typeof $==="object"&&$.tag===1)U=$.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(U)||U===1/0||U===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(U*1000))},"parseEpochTimestamp"),v0=J(($,U,G,w)=>{const W=U-1;return O9($,W,G),new Date(Date.UTC($,W,G,s(w.hours,"hour",0,23),s(w.minutes,"minute",0,59),s(w.seconds,"seconds",0,60),T9(w.fractionalMilliseconds)))},"buildDate"),K9=J(($)=>{const U=new Date().getUTCFullYear(),G=Math.floor(U/100)*100+E0(K0($));if(G<U)return G+100;return G},"parseTwoDigitYear"),A9=1576800000000,B9=J(($)=>{if($.getTime()-new Date().getTime()>A9)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),k$=J(($)=>{const U=_$.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),V9=[31,28,31,30,31,30,31,31,30,31,30,31],O9=J(($,U,G)=>{let w=V9[U];if(U===1&&f9($))w=29;if(G>w)throw new TypeError(`Invalid day for ${_$[U]} in ${$}: ${G}`)},"validateDayOfMonth"),f9=J(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),s=J(($,U,G,w)=>{const W=I8(K0($));if(W<G||W>w)throw new TypeError(`${U} must be between ${G} and ${w}, inclusive`);return W},"parseDateValue"),T9=J(($)=>{if($===null||$===void 0)return 0;return R8("0."+$)*1000},"parseMilliseconds"),H9=J(($)=>{const U=$[0];let G=1;if(U=="+")G=1;else if(U=="-")G=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const w=Number($.substring(1,3)),W=Number($.substring(4,6));return G*(w*60+W)*60*1000},"parseOffsetToMilliseconds"),K0=J(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),E8=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};J(E8,"ServiceException");var C9=E8,K8=J(($,U={})=>{Object.entries(U).filter(([,w])=>w!==void 0).forEach(([w,W])=>{if($[w]==null||$[w]==="")$[w]=W});const G=$.message||$.Message||"UnknownError";return $.message=G,delete $.Message,$},"decorateServiceException"),A8=J(({output:$,parsedBody:U,exceptionCtor:G,errorCode:w})=>{const W=N9($),L=W.httpStatusCode?W.httpStatusCode+"":void 0,Z=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||w||L||"UnknownError",$fault:"client",$metadata:W});throw K8(Z,U)},"throwDefaultError"),q9=J(($)=>{return({output:U,parsedBody:G,errorCode:w})=>{A8({output:U,parsedBody:G,exceptionCtor:$,errorCode:w})}},"withBaseException"),N9=J(($)=>({httpStatusCode:$.statusCode,requestId:$.headers["x-amzn-requestid"]??$.headers["x-amzn-request-id"]??$.headers["x-amz-request-id"],extendedRequestId:$.headers["x-amz-id-2"],cfId:$.headers["x-amz-cf-id"]}),"deserializeMetadata"),P9=J(($)=>{switch($){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),G8=!1,j9=J(($)=>{if($&&!G8&&parseInt($.substring(1,$.indexOf(".")))<16)G8=!0},"emitWarningIfUnsupportedVersion"),S9=J(($)=>{const U=[];for(let G in b$.AlgorithmId){const w=b$.AlgorithmId[G];if($[w]===void 0)continue;U.push({algorithmId:()=>w,checksumConstructor:()=>$[w]})}return{_checksumAlgorithms:U,addChecksumAlgorithm(G){this._checksumAlgorithms.push(G)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),k9=J(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),b9=J(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),h9=J(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),B8=J(($)=>{return{...S9($),...b9($)}},"getDefaultExtensionConfiguration"),D9=B8,x9=J(($)=>{return{...k9($),...h9($)}},"resolveDefaultRuntimeConfig");J(M1,"extendedEncodeURIComponent");var v9=J(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),V8=J(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=V8($[G]);return $},"getValueFromTextNode"),_0=J(function(){const $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");_0.prototype=Object.create(String.prototype,{constructor:{value:_0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(_0,String);var O8=class $ extends _0{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(U){if(U instanceof $)return U;else if(U instanceof String||typeof U==="string")return new $(U);return new $(JSON.stringify(U))}};J(O8,"LazyJsonString");var c9=O8;J(d$,"map");var y9=J(($)=>{const U={};for(let[G,w]of Object.entries($||{}))U[G]=[,w];return U},"convertMap"),u9=J(($,U)=>{const G={};for(let w in U)f8(G,$,U,w);return G},"take"),_9=J(($,U,G)=>{return d$($,Object.entries(G).reduce((w,[W,L])=>{if(Array.isArray(L))w[W]=L;else if(typeof L==="function")w[W]=[U,L()];else w[W]=[U,L];return w},{}))},"mapWithFilter"),f8=J(($,U,G,w)=>{if(U!==null){let Z=G[w];if(typeof Z==="function")Z=[,Z];const[X=d9,Y=p9,z=w]=Z;if(typeof X==="function"&&X(U[z])||typeof X!=="function"&&!!X)$[w]=Y(U[z]);return}let[W,L]=G[w];if(typeof L==="function"){let Z;const X=W===void 0&&(Z=L())!=null,Y=typeof W==="function"&&!!W(void 0)||typeof W!=="function"&&!!W;if(X)$[w]=Z;else if(Y)$[w]=L()}else{const Z=W===void 0&&L!=null,X=typeof W==="function"&&!!W(L)||typeof W!=="function"&&!!W;if(Z||X)$[w]=L}},"applyInstruction"),d9=J(($)=>$!=null,"nonNullish"),p9=J(($)=>$,"pass"),g9=J(($,U,G,w,W,L)=>{if(U!=null&&U[G]!==void 0){const Z=w();if(Z.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(W,L?Z.split("/").map((X)=>M1(X)).join("/"):M1(Z))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),s9=J(($)=>{if($!==$)return"NaN";switch($){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return $}},"serializeFloat"),l9=J(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),v$=J(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(v$);if(typeof $==="object"){const U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=v$($[G])}return U}return $},"_json");J(T8,"splitEvery")});var N8=I((C8)=>{Object.defineProperty(C8,"__esModule",{value:!0});C8.isStreamingPayload=void 0;var m9=import.meta.require("stream"),n9=($)=>($===null||$===void 0?void 0:$.body)instanceof m9.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;C8.isStreamingPayload=n9});var l8=I((xJ,s8)=>{var{defineProperty:K1,getOwnPropertyDescriptor:i9,getOwnPropertyNames:r9}=Object,o9=Object.prototype.hasOwnProperty,q=($,U)=>K1($,"name",{value:U,configurable:!0}),a9=($,U)=>{for(var G in U)K1($,G,{get:U[G],enumerable:!0})},t9=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of r9(U))if(!o9.call($,W)&&W!==G)K1($,W,{get:()=>U[W],enumerable:!(w=i9(U,W))||w.enumerable})}return $},e9=($)=>t9(K1({},"__esModule",{value:!0}),$),j8={};a9(j8,{AdaptiveRetryStrategy:()=>G7,CONFIG_MAX_ATTEMPTS:()=>g$,CONFIG_RETRY_MODE:()=>y8,ENV_MAX_ATTEMPTS:()=>p$,ENV_RETRY_MODE:()=>c8,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>w7,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>L7,StandardRetryStrategy:()=>x8,defaultDelayDecider:()=>k8,defaultRetryDecider:()=>b8,getOmitRetryHeadersPlugin:()=>Z7,getRetryAfterHint:()=>g8,getRetryPlugin:()=>F7,omitRetryHeadersMiddleware:()=>u8,omitRetryHeadersMiddlewareOptions:()=>_8,resolveRetryConfig:()=>W7,retryMiddleware:()=>d8,retryMiddlewareOptions:()=>p8});s8.exports=e9(j8);var V0=G0(),S8=$$(),T=iw(),$7=q(($,U)=>{const G=$,w=(U==null?void 0:U.noRetryIncrement)??T.NO_RETRY_INCREMENT,W=(U==null?void 0:U.retryCost)??T.RETRY_COST,L=(U==null?void 0:U.timeoutRetryCost)??T.TIMEOUT_RETRY_COST;let Z=$;const X=q((R)=>R.name==="TimeoutError"?L:W,"getCapacityAmount"),Y=q((R)=>X(R)<=Z,"hasRetryTokens");return Object.freeze({hasRetryTokens:Y,retrieveRetryTokens:q((R)=>{if(!Y(R))throw new Error("No retry token available");const F=X(R);return Z-=F,F},"retrieveRetryTokens"),releaseRetryTokens:q((R)=>{Z+=R??w,Z=Math.min(Z,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),k8=q(($,U)=>Math.floor(Math.min(T.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),r=E$(),b8=q(($)=>{if(!$)return!1;return r.isRetryableByTrait($)||r.isClockSkewError($)||r.isThrottlingError($)||r.isTransientError($)},"defaultRetryDecider"),h8=q(($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)},"asSdkError"),D8=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=T.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??b8,this.delayDecider=(G==null?void 0:G.delayDecider)??k8,this.retryQuota=(G==null?void 0:G.retryQuota)??$7(T.INITIAL_RETRY_TOKENS)}shouldRetry(U,G,w){return G<w&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(G){U=T.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,w){let W,L=0,Z=0;const X=await this.getMaxAttempts(),{request:Y}=G;if(V0.HttpRequest.isInstance(Y))Y.headers[T.INVOCATION_ID_HEADER]=S8.v4();while(!0)try{if(V0.HttpRequest.isInstance(Y))Y.headers[T.REQUEST_HEADER]=`attempt=${L+1}; max=${X}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();const{response:z,output:Q}=await U(G);if(w==null?void 0:w.afterRequest)w.afterRequest(z);return this.retryQuota.releaseRetryTokens(W),Q.$metadata.attempts=L+1,Q.$metadata.totalRetryDelay=Z,{response:z,output:Q}}catch(z){const Q=h8(z);if(L++,this.shouldRetry(Q,L,X)){W=this.retryQuota.retrieveRetryTokens(Q);const R=this.delayDecider(r.isThrottlingError(Q)?T.THROTTLING_RETRY_DELAY_BASE:T.DEFAULT_RETRY_DELAY_BASE,L),F=U7(Q.$response),M=Math.max(F||0,R);Z+=M,await new Promise((E)=>setTimeout(E,M));continue}if(!Q.$metadata)Q.$metadata={};throw Q.$metadata.attempts=L,Q.$metadata.totalRetryDelay=Z,Q}}};q(D8,"StandardRetryStrategy");var x8=D8,U7=q(($)=>{if(!V0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((L)=>L.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],w=Number(G);if(!Number.isNaN(w))return w*1000;return new Date(G).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),v8=class $ extends x8{constructor(U,G){const{rateLimiter:w,...W}=G??{};super(U,W);this.rateLimiter=w??new T.DefaultRateLimiter,this.mode=T.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}};q(v8,"AdaptiveRetryStrategy");var G7=v8,P8=P0(),p$="AWS_MAX_ATTEMPTS",g$="max_attempts",w7={environmentVariableSelector:($)=>{const U=$[p$];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${p$} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[g$];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${g$} mast be a number, got "${U}"`);return G},default:T.DEFAULT_MAX_ATTEMPTS},W7=q(($)=>{const{retryStrategy:U}=$,G=P8.normalizeProvider($.maxAttempts??T.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await P8.normalizeProvider($.retryMode)()===T.RETRY_MODES.ADAPTIVE)return new T.AdaptiveRetryStrategy(G);return new T.StandardRetryStrategy(G)}}},"resolveRetryConfig"),c8="AWS_RETRY_MODE",y8="retry_mode",L7={environmentVariableSelector:($)=>$[c8],configFileSelector:($)=>$[y8],default:T.DEFAULT_RETRY_MODE},u8=q(()=>($)=>async(U)=>{const{request:G}=U;if(V0.HttpRequest.isInstance(G))delete G.headers[T.INVOCATION_ID_HEADER],delete G.headers[T.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),_8={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},Z7=q(($)=>({applyToStack:(U)=>{U.addRelativeTo(u8(),_8)}}),"getOmitRetryHeadersPlugin"),X7=B0(),Y7=N8(),d8=q(($)=>(U,G)=>async(w)=>{var W;let L=await $.retryStrategy();const Z=await $.maxAttempts();if(z7(L)){L=L;let X=await L.acquireInitialRetryToken(G.partition_id),Y=new Error,z=0,Q=0;const{request:R}=w,F=V0.HttpRequest.isInstance(R);if(F)R.headers[T.INVOCATION_ID_HEADER]=S8.v4();while(!0)try{if(F)R.headers[T.REQUEST_HEADER]=`attempt=${z+1}; max=${Z}`;const{response:M,output:E}=await U(w);return L.recordSuccess(X),E.$metadata.attempts=z+1,E.$metadata.totalRetryDelay=Q,{response:M,output:E}}catch(M){const E=Q7(M);if(Y=h8(M),F&&Y7.isStreamingPayload(R))throw(W=G.logger instanceof X7.NoOpLogger?console:G.logger)==null||W.warn("An error was encountered in a non-retryable streaming request."),Y;try{X=await L.refreshRetryTokenForRetry(X,E)}catch(f){if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=z+1,Y.$metadata.totalRetryDelay=Q,Y}z=X.getRetryCount();const K=X.getRetryDelay();Q+=K,await new Promise((f)=>setTimeout(f,K))}}else{if(L=L,L==null?void 0:L.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",L.mode]];return L.retry(U,w)}},"retryMiddleware"),z7=q(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),Q7=q(($)=>{const U={error:$,errorType:R7($)},G=g8($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),R7=q(($)=>{if(r.isThrottlingError($))return"THROTTLING";if(r.isTransientError($))return"TRANSIENT";if(r.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),p8={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},F7=q(($)=>({applyToStack:(U)=>{U.add(d8($),p8)}}),"getRetryPlugin"),g8=q(($)=>{if(!V0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((L)=>L.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],w=Number(G);if(!Number.isNaN(w))return new Date(w*1000);return new Date(G)},"getRetryAfterHint")});var l$=I((vJ,QL)=>{function i8($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U}function ZL($,U){return new YL($,U)}function zL($,U,G,w,W){return O(async function*L(Z,X,...Y){let z=Z.startingToken||void 0,Q=!0,R;while(Q){if(X[G]=z,W)X[W]=X[W]??Z.pageSize;if(Z.client instanceof $)R=await v7(U,Z.client,X,...Y);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield R;const F=z;z=c7(R,w),Q=!!(z&&(!Z.stopOnSameToken||z!==F))}return},"paginateOperation")}var{defineProperty:B1,getOwnPropertyDescriptor:J7,getOwnPropertyNames:I7}=Object,M7=Object.prototype.hasOwnProperty,O=($,U)=>B1($,"name",{value:U,configurable:!0}),E7=($,U)=>{for(var G in U)B1($,G,{get:U[G],enumerable:!0})},K7=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of I7(U))if(!M7.call($,W)&&W!==G)B1($,W,{get:()=>U[W],enumerable:!(w=J7(U,W))||w.enumerable})}return $},A7=($)=>K7(B1({},"__esModule",{value:!0}),$),m8={};E7(m8,{DefaultIdentityProviderConfig:()=>N7,EXPIRATION_MS:()=>WL,HttpApiKeyAuthSigner:()=>P7,HttpBearerAuthSigner:()=>j7,NoAuthSigner:()=>S7,RequestBuilder:()=>YL,createIsIdentityExpiredFunction:()=>wL,createPaginator:()=>zL,doesIdentityRequireRefresh:()=>LL,getHttpAuthSchemeEndpointRuleSetPlugin:()=>V7,getHttpAuthSchemePlugin:()=>f7,getHttpSigningPlugin:()=>q7,getSmithyContext:()=>h7,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>r8,httpAuthSchemeMiddleware:()=>s$,httpAuthSchemeMiddlewareOptions:()=>o8,httpSigningMiddleware:()=>a8,httpSigningMiddlewareOptions:()=>t8,isIdentityExpired:()=>k7,memoizeIdentityProvider:()=>b7,normalizeProvider:()=>D7,requestBuilder:()=>ZL});QL.exports=A7(m8);var n8=P0();O(i8,"convertHttpAuthSchemesToMap");var s$=O(($,U)=>(G,w)=>async(W)=>{var L;const Z=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,w,W.input)),X=i8($.httpAuthSchemes),Y=n8.getSmithyContext(w),z=[];for(let Q of Z){const R=X.get(Q.schemeId);if(!R){z.push(`HttpAuthScheme \`${Q.schemeId}\` was not enabled for this service.`);continue}const F=R.identityProvider(await U.identityProviderConfigProvider($));if(!F){z.push(`HttpAuthScheme \`${Q.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:M={},signingProperties:E={}}=((L=Q.propertiesExtractor)==null?void 0:L.call(Q,$,w))||{};Q.identityProperties=Object.assign(Q.identityProperties||{},M),Q.signingProperties=Object.assign(Q.signingProperties||{},E),Y.selectedHttpAuthScheme={httpAuthOption:Q,identity:await F(Q.identityProperties),signer:R.signer};break}if(!Y.selectedHttpAuthScheme)throw new Error(z.join("\n"));return G(W)},"httpAuthSchemeMiddleware"),B7=Sw(),r8={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:B7.endpointMiddlewareOptions.name},V7=O(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(w)=>{w.addRelativeTo(s$($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),r8)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),O7=I$(),o8={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:O7.serializerMiddlewareOption.name},f7=O(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(w)=>{w.addRelativeTo(s$($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),o8)}}),"getHttpAuthSchemePlugin"),V1=G0(),T7=O(($)=>(U)=>{throw U},"defaultErrorHandler"),H7=O(($,U)=>{},"defaultSuccessHandler"),a8=O(($)=>(U,G)=>async(w)=>{if(!V1.HttpRequest.isInstance(w.request))return U(w);const L=n8.getSmithyContext(G).selectedHttpAuthScheme;if(!L)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:Z={}},identity:X,signer:Y}=L,z=await U({...w,request:await Y.sign(w.request,X,Z)}).catch((Y.errorHandler||T7)(Z));return(Y.successHandler||H7)(z.response,Z),z},"httpSigningMiddleware"),C7=l8(),t8={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:C7.retryMiddlewareOptions.name},q7=O(($)=>({applyToStack:(U)=>{U.addRelativeTo(a8($),t8)}}),"getHttpSigningPlugin"),e8=class ${constructor(U){this.authSchemes=new Map;for(let[G,w]of Object.entries(U))if(w!==void 0)this.authSchemes.set(G,w)}getIdentityProvider(U){return this.authSchemes.get(U)}};O(e8,"DefaultIdentityProviderConfig");var N7=e8,A1=R0(),$L=class ${async sign(U,G,w){if(!w)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!w.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!w.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!G.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const W=V1.HttpRequest.clone(U);if(w.in===A1.HttpApiKeyAuthLocation.QUERY)W.query[w.name]=G.apiKey;else if(w.in===A1.HttpApiKeyAuthLocation.HEADER)W.headers[w.name]=w.scheme?`${w.scheme} ${G.apiKey}`:G.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return W}};O($L,"HttpApiKeyAuthSigner");var P7=$L,UL=class ${async sign(U,G,w){const W=V1.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return W.headers.Authorization=`Bearer ${G.token}`,W}};O(UL,"HttpBearerAuthSigner");var j7=UL,GL=class ${async sign(U,G,w){return U}};O(GL,"NoAuthSigner");var S7=GL,wL=O(($)=>(U)=>LL(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),WL=300000,k7=wL(WL),LL=O(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),b7=O(($,U,G)=>{if($===void 0)return;const w=typeof $!=="function"?async()=>Promise.resolve($):$;let W,L,Z,X=!1;const Y=O(async(z)=>{if(!L)L=w(z);try{W=await L,Z=!0,X=!1}finally{L=void 0}return W},"coalesceProvider");if(U===void 0)return async(z)=>{if(!Z||(z==null?void 0:z.forceRefresh))W=await Y(z);return W};return async(z)=>{if(!Z||(z==null?void 0:z.forceRefresh))W=await Y(z);if(X)return W;if(!G(W))return X=!0,W;if(U(W))return await Y(z),W;return W}},"memoizeIdentityProvider"),h7=O(($)=>$[A1.SMITHY_CONTEXT_KEY]||($[A1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),D7=O(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),x7=B0();O(ZL,"requestBuilder");var XL=class ${constructor(U,G){this.input=U,this.context=G,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:U,protocol:G="https",port:w,path:W}=await this.context.endpoint();this.path=W;for(let L of this.resolvePathStack)L(this.path);return new V1.HttpRequest({protocol:G,hostname:this.hostname||U,port:w,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(U){return this.hostname=U,this}bp(U){return this.resolvePathStack.push((G)=>{this.path=`${(G==null?void 0:G.endsWith("/"))?G.slice(0,-1):G||""}`+U}),this}p(U,G,w,W){return this.resolvePathStack.push((L)=>{this.path=x7.resolvedPath(L,this.input,U,G,w,W)}),this}h(U){return this.headers=U,this}q(U){return this.query=U,this}b(U){return this.body=U,this}m(U){return this.method=U,this}};O(XL,"RequestBuilder");var YL=XL,v7=O(async($,U,G,...w)=>{return await U.send(new $(G),...w)},"makePagedClientRequest");O(zL,"createPaginator");var c7=O(($,U)=>{let G=$;const w=U.split(".");for(let W of w){if(!G||typeof G!=="object")return;G=G[W]}return G},"get")});var L4=I((WB,W4)=>{var{defineProperty:c1,getOwnPropertyDescriptor:Az,getOwnPropertyNames:Bz}=Object,Vz=Object.prototype.hasOwnProperty,Oz=($,U)=>c1($,"name",{value:U,configurable:!0}),fz=($,U)=>{for(var G in U)c1($,G,{get:U[G],enumerable:!0})},Tz=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of Bz(U))if(!Vz.call($,W)&&W!==G)c1($,W,{get:()=>U[W],enumerable:!(w=Az(U,W))||w.enumerable})}return $},Hz=($)=>Tz(c1({},"__esModule",{value:!0}),$),w4={};fz(w4,{emitWarningIfUnsupportedVersion:()=>Cz});W4.exports=Hz(w4);var G4=!1,Cz=Oz(($)=>{if($&&!G4&&parseInt($.substring(1,$.indexOf(".")))<18)G4=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
4
|
-
no longer support Node.js 16.x on January 6, 2025.
|
|
5
|
-
|
|
6
|
-
To continue receiving updates to AWS services, bug fixes, and security
|
|
7
|
-
updates please upgrade to a supported Node.js LTS version.
|
|
8
|
-
|
|
9
|
-
More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var C4=I((LB,H4)=>{function EU($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break}var{defineProperty:g1,getOwnPropertyDescriptor:Pz,getOwnPropertyNames:jz}=Object,Sz=Object.prototype.hasOwnProperty,N=($,U)=>g1($,"name",{value:U,configurable:!0}),kz=($,U)=>{for(var G in U)g1($,G,{get:U[G],enumerable:!0})},bz=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of jz(U))if(!Sz.call($,W)&&W!==G)g1($,W,{get:()=>U[W],enumerable:!(w=Pz(U,W))||w.enumerable})}return $},hz=($)=>bz(g1({},"__esModule",{value:!0}),$),Q4={};kz(Q4,{SignatureV4:()=>LQ,clearCredentialCache:()=>oz,createScope:()=>_1,getCanonicalHeaders:()=>MU,getCanonicalQuery:()=>A4,getPayloadHash:()=>p1,getSigningKey:()=>K4,moveHeadersToQuery:()=>f4,prepareRequest:()=>KU});H4.exports=hz(Q4);var Z4=P0(),FU=M0(),Dz="X-Amz-Algorithm",xz="X-Amz-Credential",R4="X-Amz-Date",vz="X-Amz-SignedHeaders",cz="X-Amz-Expires",F4="X-Amz-Signature",J4="X-Amz-Security-Token",I4="authorization",M4=R4.toLowerCase(),yz="date",uz=[I4,M4,yz],_z=F4.toLowerCase(),IU="x-amz-content-sha256",dz=J4.toLowerCase(),pz={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},gz=/^proxy-/,sz=/^sec-/,JU="AWS4-HMAC-SHA256",lz="AWS4-HMAC-SHA256-PAYLOAD",mz="UNSIGNED-PAYLOAD",nz=50,E4="aws4_request",iz=604800,t=C$(),rz=M0(),C0={},u1=[],_1=N(($,U,G)=>`${$}/${U}/${G}/${E4}`,"createScope"),K4=N(async($,U,G,w,W)=>{const L=await X4($,U.secretAccessKey,U.accessKeyId),Z=`${G}:${w}:${W}:${t.toHex(L)}:${U.sessionToken}`;if(Z in C0)return C0[Z];u1.push(Z);while(u1.length>nz)delete C0[u1.shift()];let X=`AWS4${U.secretAccessKey}`;for(let Y of[G,w,W,E4])X=await X4($,X,Y);return C0[Z]=X},"getSigningKey"),oz=N(()=>{u1.length=0,Object.keys(C0).forEach(($)=>{delete C0[$]})},"clearCredentialCache"),X4=N(($,U,G)=>{const w=new $(U);return w.update(rz.toUint8Array(G)),w.digest()},"hmac"),MU=N(({headers:$},U,G)=>{const w={};for(let W of Object.keys($).sort()){if($[W]==null)continue;const L=W.toLowerCase();if(L in pz||(U==null?void 0:U.has(L))||gz.test(L)||sz.test(L)){if(!G||G&&!G.has(L))continue}w[L]=$[W].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),d1=qz(),A4=N(({query:$={}})=>{const U=[],G={};for(let w of Object.keys($)){if(w.toLowerCase()===_z)continue;const W=d1.escapeUri(w);U.push(W);const L=$[w];if(typeof L==="string")G[W]=`${W}=${d1.escapeUri(L)}`;else if(Array.isArray(L))G[W]=L.slice(0).reduce((Z,X)=>Z.concat([`${W}=${d1.escapeUri(X)}`]),[]).sort().join("&")}return U.sort().map((w)=>G[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),az=Nz(),tz=M0(),p1=N(async({headers:$,body:U},G)=>{for(let w of Object.keys($))if(w.toLowerCase()===IU)return $[w];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||az.isArrayBuffer(U)){const w=new G;return w.update(tz.toUint8Array(U)),t.toHex(await w.digest())}return mz},"getPayloadHash"),Y4=M0(),B4=class ${format(U){const G=[];for(let L of Object.keys(U)){const Z=Y4.fromUtf8(L);G.push(Uint8Array.from([Z.byteLength]),Z,this.formatHeaderValue(U[L]))}const w=new Uint8Array(G.reduce((L,Z)=>L+Z.byteLength,0));let W=0;for(let L of G)w.set(L,W),W+=L.byteLength;return w}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":const G=new DataView(new ArrayBuffer(3));return G.setUint8(0,3),G.setInt16(1,U.value,!1),new Uint8Array(G.buffer);case"integer":const w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,U.value,!1),new Uint8Array(w.buffer);case"long":const W=new Uint8Array(9);return W[0]=5,W.set(U.value.bytes,1),W;case"binary":const L=new DataView(new ArrayBuffer(3+U.value.byteLength));L.setUint8(0,6),L.setUint16(1,U.value.byteLength,!1);const Z=new Uint8Array(L.buffer);return Z.set(U.value,3),Z;case"string":const X=Y4.fromUtf8(U.value),Y=new DataView(new ArrayBuffer(3+X.byteLength));Y.setUint8(0,7),Y.setUint16(1,X.byteLength,!1);const z=new Uint8Array(Y.buffer);return z.set(X,3),z;case"timestamp":const Q=new Uint8Array(9);return Q[0]=8,Q.set(UQ.fromNumber(U.value.valueOf()).bytes,1),Q;case"uuid":if(!$Q.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const R=new Uint8Array(17);return R[0]=9,R.set(t.fromHex(U.value.replace(/\-/g,"")),1),R}}};N(B4,"HeaderFormatter");var ez=B4,$Q=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,V4=class ${constructor(U){if(this.bytes=U,U.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(U){if(U>9223372036854776000||U<-9223372036854776000)throw new Error(`${U} is too large (or, if negative, too small) to represent as an Int64`);const G=new Uint8Array(8);for(let w=7,W=Math.abs(Math.round(U));w>-1&&W>0;w--,W/=256)G[w]=W;if(U<0)EU(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)EU(U);return parseInt(t.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};N(V4,"Int64");var UQ=V4;N(EU,"negate");var GQ=N(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),O4=G0(),f4=N(($,U={})=>{var G;const{headers:w,query:W={}}=O4.HttpRequest.clone($);for(let L of Object.keys(w)){const Z=L.toLowerCase();if(Z.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(Z)))W[L]=w[L],delete w[L]}return{...$,headers:w,query:W}},"moveHeadersToQuery"),KU=N(($)=>{$=O4.HttpRequest.clone($);for(let U of Object.keys($.headers))if(uz.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),wQ=N(($)=>WQ($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),WQ=N(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),T4=class ${constructor({applyChecksum:U,credentials:G,region:w,service:W,sha256:L,uriEscapePath:Z=!0}){this.headerFormatter=new ez,this.service=W,this.sha256=L,this.uriEscapePath=Z,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=Z4.normalizeProvider(w),this.credentialProvider=Z4.normalizeProvider(G)}async presign(U,G={}){const{signingDate:w=new Date,expiresIn:W=3600,unsignableHeaders:L,unhoistableHeaders:Z,signableHeaders:X,signingRegion:Y,signingService:z}=G,Q=await this.credentialProvider();this.validateResolvedCredentials(Q);const R=Y??await this.regionProvider(),{longDate:F,shortDate:M}=y1(w);if(W>iz)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const E=_1(M,R,z??this.service),K=f4(KU(U),{unhoistableHeaders:Z});if(Q.sessionToken)K.query[J4]=Q.sessionToken;K.query[Dz]=JU,K.query[xz]=`${Q.accessKeyId}/${E}`,K.query[R4]=F,K.query[cz]=W.toString(10);const f=MU(K,L,X);return K.query[vz]=z4(f),K.query[F4]=await this.getSignature(F,E,this.getSigningKey(Q,R,M,z),this.createCanonicalRequest(K,f,await p1(U,this.sha256))),K}async sign(U,G){if(typeof U==="string")return this.signString(U,G);else if(U.headers&&U.payload)return this.signEvent(U,G);else if(U.message)return this.signMessage(U,G);else return this.signRequest(U,G)}async signEvent({headers:U,payload:G},{signingDate:w=new Date,priorSignature:W,signingRegion:L,signingService:Z}){const X=L??await this.regionProvider(),{shortDate:Y,longDate:z}=y1(w),Q=_1(Y,X,Z??this.service),R=await p1({headers:{},body:G},this.sha256),F=new this.sha256;F.update(U);const M=t.toHex(await F.digest()),E=[lz,z,Q,W,M,R].join("\n");return this.signString(E,{signingDate:w,signingRegion:X,signingService:Z})}async signMessage(U,{signingDate:G=new Date,signingRegion:w,signingService:W}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:w,signingService:W,priorSignature:U.priorSignature}).then((Z)=>{return{message:U.message,signature:Z}})}async signString(U,{signingDate:G=new Date,signingRegion:w,signingService:W}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const Z=w??await this.regionProvider(),{shortDate:X}=y1(G),Y=new this.sha256(await this.getSigningKey(L,Z,X,W));return Y.update(FU.toUint8Array(U)),t.toHex(await Y.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:w,unsignableHeaders:W,signingRegion:L,signingService:Z}={}){const X=await this.credentialProvider();this.validateResolvedCredentials(X);const Y=L??await this.regionProvider(),z=KU(U),{longDate:Q,shortDate:R}=y1(G),F=_1(R,Y,Z??this.service);if(z.headers[M4]=Q,X.sessionToken)z.headers[dz]=X.sessionToken;const M=await p1(z,this.sha256);if(!GQ(IU,z.headers)&&this.applyChecksum)z.headers[IU]=M;const E=MU(z,W,w),K=await this.getSignature(Q,F,this.getSigningKey(X,Y,R,Z),this.createCanonicalRequest(z,E,M));return z.headers[I4]=`${JU} Credential=${X.accessKeyId}/${F}, SignedHeaders=${z4(E)}, Signature=${K}`,z}createCanonicalRequest(U,G,w){const W=Object.keys(G).sort();return`${U.method}
|
|
10
|
-
${this.getCanonicalPath(U)}
|
|
11
|
-
${A4(U)}
|
|
12
|
-
${W.map((L)=>`${L}:${G[L]}`).join("\n")}
|
|
13
|
-
|
|
14
|
-
${W.join(";")}
|
|
15
|
-
${w}`}async createStringToSign(U,G,w){const W=new this.sha256;W.update(FU.toUint8Array(w));const L=await W.digest();return`${JU}
|
|
16
|
-
${U}
|
|
17
|
-
${G}
|
|
18
|
-
${t.toHex(L)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const G=[];for(let L of U.split("/")){if((L==null?void 0:L.length)===0)continue;if(L===".")continue;if(L==="..")G.pop();else G.push(L)}const w=`${(U==null?void 0:U.startsWith("/"))?"/":""}${G.join("/")}${G.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return d1.escapeUri(w).replace(/%2F/g,"/")}return U}async getSignature(U,G,w,W){const L=await this.createStringToSign(U,G,W),Z=new this.sha256(await w);return Z.update(FU.toUint8Array(L)),t.toHex(await Z.digest())}getSigningKey(U,G,w,W){return K4(this.sha256,U,w,G,W||this.service)}validateResolvedCredentials(U){if(typeof U!=="object"||typeof U.accessKeyId!=="string"||typeof U.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};N(T4,"SignatureV4");var LQ=T4,y1=N(($)=>{const U=wQ($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),z4=N(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var x4=I((ZB,D4)=>{var{defineProperty:s1,getOwnPropertyDescriptor:ZQ,getOwnPropertyNames:XQ}=Object,YQ=Object.prototype.hasOwnProperty,b=($,U)=>s1($,"name",{value:U,configurable:!0}),zQ=($,U)=>{for(var G in U)s1($,G,{get:U[G],enumerable:!0})},QQ=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of XQ(U))if(!YQ.call($,W)&&W!==G)s1($,W,{get:()=>U[W],enumerable:!(w=ZQ(U,W))||w.enumerable})}return $},RQ=($)=>QQ(s1({},"__esModule",{value:!0}),$),S4={};zQ(S4,{AWSSDKSigV4Signer:()=>MQ,AwsSdkSigV4ASigner:()=>KQ,AwsSdkSigV4Signer:()=>VU,NODE_SIGV4A_CONFIG_OPTIONS:()=>VQ,resolveAWSSDKSigV4Config:()=>OQ,resolveAwsSdkSigV4AConfig:()=>BQ,resolveAwsSdkSigV4Config:()=>h4,validateSigningProperties:()=>BU});D4.exports=RQ(S4);var FQ=G0(),JQ=G0(),q4=b(($)=>{var U,G;return JQ.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),AU=b(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),IQ=b(($,U)=>Math.abs(AU(U).getTime()-$)>=300000,"isClockSkewed"),N4=b(($,U)=>{const G=Date.parse($);if(IQ(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),l0=b(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),BU=b(async($)=>{var U,G,w;const W=l0("context",$.context),L=l0("config",$.config),Z=(w=(G=(U=W.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:w[0],Y=await l0("signer",L.signer)(Z),z=$==null?void 0:$.signingRegion,Q=$==null?void 0:$.signingRegionSet,R=$==null?void 0:$.signingName;return{config:L,signer:Y,signingRegion:z,signingRegionSet:Q,signingName:R}},"validateSigningProperties"),k4=class ${async sign(U,G,w){var W;if(!FQ.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const L=await BU(w),{config:Z,signer:X}=L;let{signingRegion:Y,signingName:z}=L;const Q=w.context;if(((W=Q==null?void 0:Q.authSchemes)==null?void 0:W.length)??0>1){const[F,M]=Q.authSchemes;if((F==null?void 0:F.name)==="sigv4a"&&(M==null?void 0:M.name)==="sigv4")Y=(M==null?void 0:M.signingRegion)??Y,z=(M==null?void 0:M.signingName)??z}return await X.sign(U,{signingDate:AU(Z.systemClockOffset),signingRegion:Y,signingService:z})}errorHandler(U){return(G)=>{const w=G.ServerTime??q4(G.$response);if(w){const W=l0("config",U.config),L=W.systemClockOffset;if(W.systemClockOffset=N4(w,W.systemClockOffset),W.systemClockOffset!==L&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const w=q4(U);if(w){const W=l0("config",G.config);W.systemClockOffset=N4(w,W.systemClockOffset)}}};b(k4,"AwsSdkSigV4Signer");var VU=k4,MQ=VU,EQ=G0(),b4=class $ extends VU{async sign(U,G,w){var W;if(!EQ.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:L,signer:Z,signingRegion:X,signingRegionSet:Y,signingName:z}=await BU(w),R=(await((W=L.sigv4aSigningRegionSet)==null?void 0:W.call(L))??Y??[X]).join(",");return await Z.sign(U,{signingDate:AU(L.systemClockOffset),signingRegion:R,signingService:z})}};b(b4,"AwsSdkSigV4ASigner");var KQ=b4,AQ=l$(),P4=G$(),BQ=b(($)=>{return $.sigv4aSigningRegionSet=AQ.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),VQ={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new P4.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector($){if($.sigv4a_signing_region_set)return($.sigv4a_signing_region_set??"").split(",").map((U)=>U.trim());throw new P4.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},Y0=l$(),j4=C4(),h4=b(($)=>{let U;if($.credentials)U=Y0.memoizeIdentityProvider($.credentials,Y0.isIdentityExpired,Y0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=Y0.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=b(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:G=!0,systemClockOffset:w=$.systemClockOffset||0,sha256:W}=$;let L;if($.signer)L=Y0.normalizeProvider($.signer);else if($.regionInfoProvider)L=b(()=>Y0.normalizeProvider($.region)().then(async(Z)=>[await $.regionInfoProvider(Z,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},Z]).then(([Z,X])=>{const{signingRegion:Y,signingService:z}=Z;$.signingRegion=$.signingRegion||Y||X,$.signingName=$.signingName||z||$.serviceId;const Q={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:W,uriEscapePath:G};return new($.signerConstructor||j4.SignatureV4)(Q)}),"signer");else L=b(async(Z)=>{Z=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await Y0.normalizeProvider($.region)(),properties:{}},Z);const{signingRegion:X,signingName:Y}=Z;$.signingRegion=$.signingRegion||X,$.signingName=$.signingName||Y||$.serviceId;const z={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:W,uriEscapePath:G};return new($.signerConstructor||j4.SignatureV4)(z)},"signer");return{...$,systemClockOffset:w,signingEscapePath:G,credentials:U,signer:L}},"resolveAwsSdkSigV4Config"),OQ=h4});var l1=I((qQ)=>{var fQ=":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\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",v4="[: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]["+fQ+"]*",TQ=new RegExp("^"+v4+"$"),HQ=function($,U){const G=[];let w=U.exec($);while(w){const W=[];W.startIndex=U.lastIndex-w[0].length;const L=w.length;for(let Z=0;Z<L;Z++)W.push(w[Z]);G.push(W),w=U.exec($)}return G},CQ=function($){const U=TQ.exec($);return!(U===null||typeof U==="undefined")};qQ.isExist=function($){return typeof $!=="undefined"};qQ.isEmptyObject=function($){return Object.keys($).length===0};qQ.merge=function($,U,G){if(U){const w=Object.keys(U),W=w.length;for(let L=0;L<W;L++)if(G==="strict")$[w[L]]=[U[w[L]]];else $[w[L]]=U[w[L]]}};qQ.getValue=function($){if(qQ.isExist($))return $;else return""};qQ.isName=CQ;qQ.getAllMatches=HQ;qQ.nameRegexp=v4});var fU=I((pQ)=>{function y4($){return $===" "||$==="\t"||$==="\n"||$==="\r"}function u4($,U){const G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const w=$.substr(G,U-G);if(U>5&&w==="xml")return C("InvalidXml","XML declaration allowed only at the start of the document.",S($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U}function _4($,U){if($.length>U+5&&$[U+1]==="-"&&$[U+2]==="-"){for(U+=3;U<$.length;U++)if($[U]==="-"&&$[U+1]==="-"&&$[U+2]===">"){U+=2;break}}else if($.length>U+8&&$[U+1]==="D"&&$[U+2]==="O"&&$[U+3]==="C"&&$[U+4]==="T"&&$[U+5]==="Y"&&$[U+6]==="P"&&$[U+7]==="E"){let G=1;for(U+=8;U<$.length;U++)if($[U]==="<")G++;else if($[U]===">"){if(G--,G===0)break}}else if($.length>U+9&&$[U+1]==="["&&$[U+2]==="C"&&$[U+3]==="D"&&$[U+4]==="A"&&$[U+5]==="T"&&$[U+6]==="A"&&$[U+7]==="["){for(U+=8;U<$.length;U++)if($[U]==="]"&&$[U+1]==="]"&&$[U+2]===">"){U+=2;break}}return U}function vQ($,U){let G="",w="",W=!1;for(;U<$.length;U++){if($[U]===DQ||$[U]===xQ)if(w==="")w=$[U];else if(w!==$[U]);else w="";else if($[U]===">"){if(w===""){W=!0;break}}G+=$[U]}if(w!=="")return!1;return{value:G,index:U,tagClosed:W}}function d4($,U){const G=OU.getAllMatches($,cQ),w={};for(let W=0;W<G.length;W++){if(G[W][1].length===0)return C("InvalidAttr","Attribute '"+G[W][2]+"' has no space in starting.",m0(G[W]));else if(G[W][3]!==void 0&&G[W][4]===void 0)return C("InvalidAttr","Attribute '"+G[W][2]+"' is without value.",m0(G[W]));else if(G[W][3]===void 0&&!U.allowBooleanAttributes)return C("InvalidAttr","boolean attribute '"+G[W][2]+"' is not allowed.",m0(G[W]));const L=G[W][2];if(!_Q(L))return C("InvalidAttr","Attribute '"+L+"' is an invalid name.",m0(G[W]));if(!w.hasOwnProperty(L))w[L]=1;else return C("InvalidAttr","Attribute '"+L+"' is repeated.",m0(G[W]))}return!0}function yQ($,U){let G=/\d/;if($[U]==="x")U++,G=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(G))break}return-1}function uQ($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,yQ($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U}function C($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}}function _Q($){return OU.isName($)}function dQ($){return OU.isName($)}function S($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}}function m0($){return $.startIndex+$[1].length}var OU=l1(),hQ={allowBooleanAttributes:!1,unpairedTags:[]};pQ.validate=function($,U){U=Object.assign({},hQ,U);const G=[];let w=!1,W=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let L=0;L<$.length;L++)if($[L]==="<"&&$[L+1]==="?"){if(L+=2,L=u4($,L),L.err)return L}else if($[L]==="<"){let Z=L;if(L++,$[L]==="!"){L=_4($,L);continue}else{let X=!1;if($[L]==="/")X=!0,L++;let Y="";for(;L<$.length&&$[L]!==">"&&$[L]!==" "&&$[L]!=="\t"&&$[L]!=="\n"&&$[L]!=="\r";L++)Y+=$[L];if(Y=Y.trim(),Y[Y.length-1]==="/")Y=Y.substring(0,Y.length-1),L--;if(!dQ(Y)){let R;if(Y.trim().length===0)R="Invalid space after '<'.";else R="Tag '"+Y+"' is an invalid name.";return C("InvalidTag",R,S($,L))}const z=vQ($,L);if(z===!1)return C("InvalidAttr","Attributes for '"+Y+"' have open quote.",S($,L));let Q=z.value;if(L=z.index,Q[Q.length-1]==="/"){const R=L-Q.length;Q=Q.substring(0,Q.length-1);const F=d4(Q,U);if(F===!0)w=!0;else return C(F.err.code,F.err.msg,S($,R+F.err.line))}else if(X)if(!z.tagClosed)return C("InvalidTag","Closing tag '"+Y+"' doesn't have proper closing.",S($,L));else if(Q.trim().length>0)return C("InvalidTag","Closing tag '"+Y+"' can't have attributes or invalid starting.",S($,Z));else if(G.length===0)return C("InvalidTag","Closing tag '"+Y+"' has not been opened.",S($,Z));else{const R=G.pop();if(Y!==R.tagName){let F=S($,R.tagStartPos);return C("InvalidTag","Expected closing tag '"+R.tagName+"' (opened in line "+F.line+", col "+F.col+") instead of closing tag '"+Y+"'.",S($,Z))}if(G.length==0)W=!0}else{const R=d4(Q,U);if(R!==!0)return C(R.err.code,R.err.msg,S($,L-Q.length+R.err.line));if(W===!0)return C("InvalidXml","Multiple possible root nodes found.",S($,L));else if(U.unpairedTags.indexOf(Y)!==-1);else G.push({tagName:Y,tagStartPos:Z});w=!0}for(L++;L<$.length;L++)if($[L]==="<")if($[L+1]==="!"){L++,L=_4($,L);continue}else if($[L+1]==="?"){if(L=u4($,++L),L.err)return L}else break;else if($[L]==="&"){const R=uQ($,L);if(R==-1)return C("InvalidChar","char '&' is not expected.",S($,L));L=R}else if(W===!0&&!y4($[L]))return C("InvalidXml","Extra text at the end",S($,L));if($[L]==="<")L--}}else{if(y4($[L]))continue;return C("InvalidChar","char '"+$[L]+"' is not expected.",S($,L))}if(!w)return C("InvalidXml","Start tag expected.",1);else if(G.length==1)return C("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",S($,G[0].tagStartPos));else if(G.length>0)return C("InvalidXml","Invalid '"+JSON.stringify(G.map((L)=>L.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var DQ='"',xQ="'",cQ=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var g4=I((lQ)=>{var p4={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($,U){return U},attributeValueProcessor:function($,U){return U},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function($,U,G){return $}},sQ=function($){return Object.assign({},p4,$)};lQ.buildOptions=sQ;lQ.defaultOptions=p4});var m4=I((QB,l4)=>{class s4{constructor($){this.tagname=$,this.child=[],this[":@"]={}}add($,U){if($==="__proto__")$="#__proto__";this.child.push({[$]:U})}addChild($){if($.tagname==="__proto__")$.tagname="#__proto__";if($[":@"]&&Object.keys($[":@"]).length>0)this.child.push({[$.tagname]:$.child,[":@"]:$[":@"]});else this.child.push({[$.tagname]:$.child})}}l4.exports=s4});var i4=I((RB,n4)=>{function rQ($,U){const G={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let w=1,W=!1,L=!1,Z="";for(;U<$.length;U++)if($[U]==="<"&&!L){if(W&&tQ($,U)){if(U+=7,[entityName,val,U]=oQ($,U+1),val.indexOf("&")===-1)G[GR(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(W&&eQ($,U))U+=8;else if(W&&$R($,U))U+=8;else if(W&&UR($,U))U+=9;else if(aQ)L=!0;else throw new Error("Invalid DOCTYPE");w++,Z=""}else if($[U]===">"){if(L){if($[U-1]==="-"&&$[U-2]==="-")L=!1,w--}else w--;if(w===0)break}else if($[U]==="[")W=!0;else Z+=$[U];if(w!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}}function oQ($,U){let G="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)G+=$[U];if(G=G.trim(),G.indexOf(" ")!==-1)throw new Error("External entites are not supported");const w=$[U++];let W="";for(;U<$.length&&$[U]!==w;U++)W+=$[U];return[G,W,U]}function aQ($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1}function tQ($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="N"&&$[U+4]==="T"&&$[U+5]==="I"&&$[U+6]==="T"&&$[U+7]==="Y")return!0;return!1}function eQ($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="L"&&$[U+4]==="E"&&$[U+5]==="M"&&$[U+6]==="E"&&$[U+7]==="N"&&$[U+8]==="T")return!0;return!1}function $R($,U){if($[U+1]==="!"&&$[U+2]==="A"&&$[U+3]==="T"&&$[U+4]==="T"&&$[U+5]==="L"&&$[U+6]==="I"&&$[U+7]==="S"&&$[U+8]==="T")return!0;return!1}function UR($,U){if($[U+1]==="!"&&$[U+2]==="N"&&$[U+3]==="O"&&$[U+4]==="T"&&$[U+5]==="A"&&$[U+6]==="T"&&$[U+7]==="I"&&$[U+8]==="O"&&$[U+9]==="N")return!0;return!1}function GR($){if(iQ.isName($))return $;else throw new Error(`Invalid entity name ${$}`)}var iQ=l1();n4.exports=rQ});var o4=I((FB,r4)=>{function ZR($,U={}){if(U=Object.assign({},LR,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&wR.test(G))return Number.parseInt(G,16);else{const w=WR.exec(G);if(w){const W=w[1],L=w[2];let Z=XR(w[3]);const X=w[4]||w[6];if(!U.leadingZeros&&L.length>0&&W&&G[2]!==".")return $;else if(!U.leadingZeros&&L.length>0&&!W&&G[1]!==".")return $;else{const Y=Number(G),z=""+Y;if(z.search(/[eE]/)!==-1)if(U.eNotation)return Y;else return $;else if(X)if(U.eNotation)return Y;else return $;else if(G.indexOf(".")!==-1)if(z==="0"&&Z==="")return Y;else if(z===Z)return Y;else if(W&&z==="-"+Z)return Y;else return $;if(L)if(Z===z)return Y;else if(W+Z===z)return Y;else return $;if(G===z)return Y;else if(G===W+z)return Y;return $}}else return $}}function XR($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $}var wR=/^[-+]?0x[a-fA-F0-9]+$/,WR=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;if(!Number.parseInt&&window.parseInt)Number.parseInt=window.parseInt;if(!Number.parseFloat&&window.parseFloat)Number.parseFloat=window.parseFloat;var LR={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};r4.exports=ZR});var $Z=I((JB,e4)=>{function QR($){const U=Object.keys($);for(let G=0;G<U.length;G++){const w=U[G];this.lastEntities[w]={regex:new RegExp("&"+w+";","g"),val:$[w]}}}function RR($,U,G,w,W,L,Z){if($!==void 0){if(this.options.trimValues&&!w)$=$.trim();if($.length>0){if(!Z)$=this.replaceEntitiesValue($);const X=this.options.tagValueProcessor(U,$,G,W,L);if(X===null||X===void 0)return $;else if(typeof X!==typeof $||X!==$)return X;else if(this.options.trimValues)return HU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return HU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}}function FR($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $}function IR($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const w=a4.getAllMatches($,JR),W=w.length,L={};for(let Z=0;Z<W;Z++){const X=this.resolveNameSpace(w[Z][1]);let Y=w[Z][4],z=this.options.attributeNamePrefix+X;if(X.length){if(this.options.transformAttributeName)z=this.options.transformAttributeName(z);if(z==="__proto__")z="#__proto__";if(Y!==void 0){if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y);const Q=this.options.attributeValueProcessor(X,Y,U);if(Q===null||Q===void 0)L[z]=Y;else if(typeof Q!==typeof Y||Q!==Y)L[z]=Q;else L[z]=HU(Y,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)L[z]=!0}}if(!Object.keys(L).length)return;if(this.options.attributesGroupName){const Z={};return Z[this.options.attributesGroupName]=L,Z}return L}}function ER($,U,G){const w=this.options.updateTag(U.tagname,G,U[":@"]);if(w===!1);else if(typeof w==="string")U.tagname=w,$.addChild(U);else $.addChild(U)}function AR($,U,G,w){if($){if(w===void 0)w=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,G,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,w),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $}function BR($,U,G){const w="*."+G;for(let W in $){const L=$[W];if(w===L||U===L)return!0}return!1}function VR($,U,G=">"){let w,W="";for(let L=U;L<$.length;L++){let Z=$[L];if(w){if(Z===w)w=""}else if(Z==='"'||Z==="'")w=Z;else if(Z===G[0])if(G[1]){if($[L+1]===G[1])return{data:W,index:L}}else return{data:W,index:L};else if(Z==="\t")Z=" ";W+=Z}}function z0($,U,G,w){const W=$.indexOf(U,G);if(W===-1)throw new Error(w);else return W+U.length-1}function TU($,U,G,w=">"){const W=VR($,U+1,w);if(!W)return;let L=W.data;const Z=W.index,X=L.search(/\s/);let Y=L,z=!0;if(X!==-1)Y=L.substring(0,X),L=L.substring(X+1).trimStart();const Q=Y;if(G){const R=Y.indexOf(":");if(R!==-1)Y=Y.substr(R+1),z=Y!==W.data.substr(R+1)}return{tagName:Y,tagExp:L,closeIndex:Z,attrExpPresent:z,rawTagName:Q}}function OR($,U,G){const w=G;let W=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const L=z0($,">",G,`${U} is not closed`);if($.substring(G+2,L).trim()===U){if(W--,W===0)return{tagContent:$.substring(w,G),i:L}}G=L}else if($[G+1]==="?")G=z0($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=z0($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=z0($,"]]>",G,"StopNode is not closed.")-2;else{const L=TU($,G,">");if(L){if((L&&L.tagName)===U&&L.tagExp[L.tagExp.length-1]!=="/")W++;G=L.closeIndex}}}function HU($,U,G){if(U&&typeof $==="string"){const w=$.trim();if(w==="true")return!0;else if(w==="false")return!1;else return zR($,G)}else if(a4.isExist($))return $;else return""}var a4=l1(),n0=m4(),YR=i4(),zR=o4();class t4{constructor($){this.options=$,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:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,16))}},this.addExternalEntities=QR,this.parseXml=MR,this.parseTextData=RR,this.resolveNameSpace=FR,this.buildAttributesMap=IR,this.isItStopNode=BR,this.replaceEntitiesValue=KR,this.readStopNodeData=OR,this.saveTextToParentTag=AR,this.addChild=ER}}var JR=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),MR=function($){$=$.replace(/\r\n?/g,"\n");const U=new n0("!xml");let G=U,w="",W="";for(let L=0;L<$.length;L++)if($[L]==="<")if($[L+1]==="/"){const X=z0($,">",L,"Closing Tag is not closed.");let Y=$.substring(L+2,X).trim();if(this.options.removeNSPrefix){const R=Y.indexOf(":");if(R!==-1)Y=Y.substr(R+1)}if(this.options.transformTagName)Y=this.options.transformTagName(Y);if(G)w=this.saveTextToParentTag(w,G,W);const z=W.substring(W.lastIndexOf(".")+1);if(Y&&this.options.unpairedTags.indexOf(Y)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${Y}>`);let Q=0;if(z&&this.options.unpairedTags.indexOf(z)!==-1)Q=W.lastIndexOf(".",W.lastIndexOf(".")-1),this.tagsNodeStack.pop();else Q=W.lastIndexOf(".");W=W.substring(0,Q),G=this.tagsNodeStack.pop(),w="",L=X}else if($[L+1]==="?"){let X=TU($,L,!1,"?>");if(!X)throw new Error("Pi Tag is not closed.");if(w=this.saveTextToParentTag(w,G,W),this.options.ignoreDeclaration&&X.tagName==="?xml"||this.options.ignorePiTags);else{const Y=new n0(X.tagName);if(Y.add(this.options.textNodeName,""),X.tagName!==X.tagExp&&X.attrExpPresent)Y[":@"]=this.buildAttributesMap(X.tagExp,W,X.tagName);this.addChild(G,Y,W)}L=X.closeIndex+1}else if($.substr(L+1,3)==="!--"){const X=z0($,"-->",L+4,"Comment is not closed.");if(this.options.commentPropName){const Y=$.substring(L+4,X-2);w=this.saveTextToParentTag(w,G,W),G.add(this.options.commentPropName,[{[this.options.textNodeName]:Y}])}L=X}else if($.substr(L+1,2)==="!D"){const X=YR($,L);this.docTypeEntities=X.entities,L=X.i}else if($.substr(L+1,2)==="!["){const X=z0($,"]]>",L,"CDATA is not closed.")-2,Y=$.substring(L+9,X);w=this.saveTextToParentTag(w,G,W);let z=this.parseTextData(Y,G.tagname,W,!0,!1,!0,!0);if(z==null)z="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:Y}]);else G.add(this.options.textNodeName,z);L=X+2}else{let X=TU($,L,this.options.removeNSPrefix),Y=X.tagName;const z=X.rawTagName;let{tagExp:Q,attrExpPresent:R,closeIndex:F}=X;if(this.options.transformTagName)Y=this.options.transformTagName(Y);if(G&&w){if(G.tagname!=="!xml")w=this.saveTextToParentTag(w,G,W,!1)}const M=G;if(M&&this.options.unpairedTags.indexOf(M.tagname)!==-1)G=this.tagsNodeStack.pop(),W=W.substring(0,W.lastIndexOf("."));if(Y!==U.tagname)W+=W?"."+Y:Y;if(this.isItStopNode(this.options.stopNodes,W,Y)){let E="";if(Q.length>0&&Q.lastIndexOf("/")===Q.length-1){if(Y[Y.length-1]==="/")Y=Y.substr(0,Y.length-1),W=W.substr(0,W.length-1),Q=Y;else Q=Q.substr(0,Q.length-1);L=X.closeIndex}else if(this.options.unpairedTags.indexOf(Y)!==-1)L=X.closeIndex;else{const f=this.readStopNodeData($,z,F+1);if(!f)throw new Error(`Unexpected end of ${z}`);L=f.i,E=f.tagContent}const K=new n0(Y);if(Y!==Q&&R)K[":@"]=this.buildAttributesMap(Q,W,Y);if(E)E=this.parseTextData(E,Y,W,!0,R,!0,!0);W=W.substr(0,W.lastIndexOf(".")),K.add(this.options.textNodeName,E),this.addChild(G,K,W)}else{if(Q.length>0&&Q.lastIndexOf("/")===Q.length-1){if(Y[Y.length-1]==="/")Y=Y.substr(0,Y.length-1),W=W.substr(0,W.length-1),Q=Y;else Q=Q.substr(0,Q.length-1);if(this.options.transformTagName)Y=this.options.transformTagName(Y);const E=new n0(Y);if(Y!==Q&&R)E[":@"]=this.buildAttributesMap(Q,W,Y);this.addChild(G,E,W),W=W.substr(0,W.lastIndexOf("."))}else{const E=new n0(Y);if(this.tagsNodeStack.push(G),Y!==Q&&R)E[":@"]=this.buildAttributesMap(Q,W,Y);this.addChild(G,E,W),G=E}w="",L=F}}else w+=$[L];return U.child},KR=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){const G=this.docTypeEntities[U];$=$.replace(G.regx,G.val)}for(let U in this.lastEntities){const G=this.lastEntities[U];$=$.replace(G.regex,G.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){const G=this.htmlEntities[U];$=$.replace(G.regex,G.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};e4.exports=t4});var GZ=I((qR)=>{function fR($,U){return UZ($,U)}function UZ($,U,G){let w;const W={};for(let L=0;L<$.length;L++){const Z=$[L],X=TR(Z);let Y="";if(G===void 0)Y=X;else Y=G+"."+X;if(X===U.textNodeName)if(w===void 0)w=Z[X];else w+=""+Z[X];else if(X===void 0)continue;else if(Z[X]){let z=UZ(Z[X],U,Y);const Q=CR(z,U);if(Z[":@"])HR(z,Z[":@"],Y,U);else if(Object.keys(z).length===1&&z[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)z=z[U.textNodeName];else if(Object.keys(z).length===0)if(U.alwaysCreateTextNode)z[U.textNodeName]="";else z="";if(W[X]!==void 0&&W.hasOwnProperty(X)){if(!Array.isArray(W[X]))W[X]=[W[X]];W[X].push(z)}else if(U.isArray(X,Y,Q))W[X]=[z];else W[X]=z}}if(typeof w==="string"){if(w.length>0)W[U.textNodeName]=w}else if(w!==void 0)W[U.textNodeName]=w;return W}function TR($){const U=Object.keys($);for(let G=0;G<U.length;G++){const w=U[G];if(w!==":@")return w}}function HR($,U,G,w){if(U){const W=Object.keys(U),L=W.length;for(let Z=0;Z<L;Z++){const X=W[Z];if(w.isArray(X,G+"."+X,!0,!0))$[X]=[U[X]];else $[X]=U[X]}}}function CR($,U){const{textNodeName:G}=U,w=Object.keys($).length;if(w===0)return!0;if(w===1&&($[G]||typeof $[G]==="boolean"||$[G]===0))return!0;return!1}qR.prettify=fR});var LZ=I((MB,WZ)=>{var{buildOptions:PR}=g4(),jR=$Z(),{prettify:SR}=GZ(),kR=fU();class wZ{constructor($){this.externalEntities={},this.options=PR($)}parse($,U){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(U){if(U===!0)U={};const W=kR.validate($,U);if(W!==!0)throw Error(`${W.err.msg}:${W.err.line}:${W.err.col}`)}const G=new jR(this.options);G.addExternalEntities(this.externalEntities);const w=G.parseXml($);if(this.options.preserveOrder||w===void 0)return w;else return SR(w,this.options)}addEntity($,U){if(U.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if($.indexOf("&")!==-1||$.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");else if(U==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=U}}WZ.exports=wZ});var QZ=I((EB,zZ)=>{function bR($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return XZ($,U,"",G)}function XZ($,U,G,w){let W="",L=!1;for(let Z=0;Z<$.length;Z++){const X=$[Z],Y=hR(X);if(Y===void 0)continue;let z="";if(G.length===0)z=Y;else z=`${G}.${Y}`;if(Y===U.textNodeName){let E=X[Y];if(!DR(z,U))E=U.tagValueProcessor(Y,E),E=YZ(E,U);if(L)W+=w;W+=E,L=!1;continue}else if(Y===U.cdataPropName){if(L)W+=w;W+=`<![CDATA[${X[Y][0][U.textNodeName]}]]>`,L=!1;continue}else if(Y===U.commentPropName){W+=w+`<!--${X[Y][0][U.textNodeName]}-->`,L=!0;continue}else if(Y[0]==="?"){const E=ZZ(X[":@"],U),K=Y==="?xml"?"":w;let f=X[Y][0][U.textNodeName];f=f.length!==0?" "+f:"",W+=K+`<${Y}${f}${E}?>`,L=!0;continue}let Q=w;if(Q!=="")Q+=U.indentBy;const R=ZZ(X[":@"],U),F=w+`<${Y}${R}`,M=XZ(X[Y],U,z,Q);if(U.unpairedTags.indexOf(Y)!==-1)if(U.suppressUnpairedNode)W+=F+">";else W+=F+"/>";else if((!M||M.length===0)&&U.suppressEmptyNode)W+=F+"/>";else if(M&&M.endsWith(">"))W+=F+`>${M}${w}</${Y}>`;else{if(W+=F+">",M&&w!==""&&(M.includes("/>")||M.includes("</")))W+=w+U.indentBy+M+w;else W+=M;W+=`</${Y}>`}L=!0}return W}function hR($){const U=Object.keys($);for(let G=0;G<U.length;G++){const w=U[G];if(!$.hasOwnProperty(w))continue;if(w!==":@")return w}}function ZZ($,U){let G="";if($&&!U.ignoreAttributes)for(let w in $){if(!$.hasOwnProperty(w))continue;let W=U.attributeValueProcessor(w,$[w]);if(W=YZ(W,U),W===!0&&U.suppressBooleanAttributes)G+=` ${w.substr(U.attributeNamePrefix.length)}`;else G+=` ${w.substr(U.attributeNamePrefix.length)}="${W}"`}return G}function DR($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let G=$.substr($.lastIndexOf(".")+1);for(let w in U.stopNodes)if(U.stopNodes[w]===$||U.stopNodes[w]==="*."+G)return!0;return!1}function YZ($,U){if($&&$.length>0&&U.processEntities)for(let G=0;G<U.entities.length;G++){const w=U.entities[G];$=$.replace(w.regex,w.val)}return $}zZ.exports=bR});var FZ=I((KB,RZ)=>{function e($){if(this.options=Object.assign({},vR,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=uR;if(this.processTextOrObjNode=cR,this.options.format)this.indentate=yR,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function cR($,U,G){const w=this.j2x($,G+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,w.attrStr,G);else return this.buildObjectNode(w.val,U,w.attrStr,G)}function yR($){return this.options.indentBy.repeat($)}function uR($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1}var xR=QZ(),vR={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("\'","g"),val:"'"},{regex:new RegExp("\"","g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};e.prototype.build=function($){if(this.options.preserveOrder)return xR($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};e.prototype.j2x=function($,U){let G="",w="";for(let W in $){if(!Object.prototype.hasOwnProperty.call($,W))continue;if(typeof $[W]==="undefined"){if(this.isAttribute(W))w+=""}else if($[W]===null)if(this.isAttribute(W))w+="";else if(W[0]==="?")w+=this.indentate(U)+"<"+W+"?"+this.tagEndChar;else w+=this.indentate(U)+"<"+W+"/"+this.tagEndChar;else if($[W]instanceof Date)w+=this.buildTextValNode($[W],W,"",U);else if(typeof $[W]!=="object"){const L=this.isAttribute(W);if(L)G+=this.buildAttrPairStr(L,""+$[W]);else if(W===this.options.textNodeName){let Z=this.options.tagValueProcessor(W,""+$[W]);w+=this.replaceEntitiesValue(Z)}else w+=this.buildTextValNode($[W],W,"",U)}else if(Array.isArray($[W])){const L=$[W].length;let Z="",X="";for(let Y=0;Y<L;Y++){const z=$[W][Y];if(typeof z==="undefined");else if(z===null)if(W[0]==="?")w+=this.indentate(U)+"<"+W+"?"+this.tagEndChar;else w+=this.indentate(U)+"<"+W+"/"+this.tagEndChar;else if(typeof z==="object")if(this.options.oneListGroup){const Q=this.j2x(z,U+1);if(Z+=Q.val,this.options.attributesGroupName&&z.hasOwnProperty(this.options.attributesGroupName))X+=Q.attrStr}else Z+=this.processTextOrObjNode(z,W,U);else if(this.options.oneListGroup){let Q=this.options.tagValueProcessor(W,z);Q=this.replaceEntitiesValue(Q),Z+=Q}else Z+=this.buildTextValNode(z,W,"",U)}if(this.options.oneListGroup)Z=this.buildObjectNode(Z,W,X,U);w+=Z}else if(this.options.attributesGroupName&&W===this.options.attributesGroupName){const L=Object.keys($[W]),Z=L.length;for(let X=0;X<Z;X++)G+=this.buildAttrPairStr(L[X],""+$[W][L[X]])}else w+=this.processTextOrObjNode($[W],W,U)}return{attrStr:G,val:w}};e.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};e.prototype.buildObjectNode=function($,U,G,w){if($==="")if(U[0]==="?")return this.indentate(w)+"<"+U+G+"?"+this.tagEndChar;else return this.indentate(w)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else{let W="</"+U+this.tagEndChar,L="";if(U[0]==="?")L="?",W="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(w)+"<"+U+G+L+">"+$+W;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&L.length===0)return this.indentate(w)+`<!--${$}-->`+this.newLine;else return this.indentate(w)+"<"+U+G+L+this.tagEndChar+$+this.indentate(w)+W}};e.prototype.closeTag=function($){let U="";if(this.options.unpairedTags.indexOf($)!==-1){if(!this.options.suppressUnpairedNode)U="/"}else if(this.options.suppressEmptyNode)U="/";else U=`></${$}`;return U};e.prototype.buildTextValNode=function($,U,G,w){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(w)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(w)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(w)+"<"+U+G+"?"+this.tagEndChar;else{let W=this.options.tagValueProcessor(U,$);if(W=this.replaceEntitiesValue(W),W==="")return this.indentate(w)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(w)+"<"+U+G+">"+W+"</"+U+this.tagEndChar}};e.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const G=this.options.entities[U];$=$.replace(G.regex,G.val)}return $};RZ.exports=e});var IZ=I((AB,JZ)=>{var _R=fU(),dR=LZ(),pR=FZ();JZ.exports={XMLParser:dR,XMLValidator:_R,XMLBuilder:pR}});var VZ=I((BB,BZ)=>{var{defineProperty:m1,getOwnPropertyDescriptor:gR,getOwnPropertyNames:sR}=Object,lR=Object.prototype.hasOwnProperty,h=($,U)=>m1($,"name",{value:U,configurable:!0}),mR=($,U)=>{for(var G in U)m1($,G,{get:U[G],enumerable:!0})},nR=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of sR(U))if(!lR.call($,W)&&W!==G)m1($,W,{get:()=>U[W],enumerable:!(w=gR(U,W))||w.enumerable})}return $},iR=($)=>nR(m1({},"__esModule",{value:!0}),$),MZ={};mR(MZ,{_toBool:()=>oR,_toNum:()=>aR,_toStr:()=>rR,awsExpectUnion:()=>eR,loadRestJsonErrorCode:()=>GF,loadRestXmlErrorCode:()=>ZF,parseJsonBody:()=>KZ,parseJsonErrorBody:()=>UF,parseXmlBody:()=>AZ,parseXmlErrorBody:()=>LF});BZ.exports=iR(MZ);var rR=h(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){const U=new Error(`Received number ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}if(typeof $==="boolean"){const U=new Error(`Received boolean ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}return $},"_toStr"),oR=h(($)=>{if($==null)return $;if(typeof $==="string"){const U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){const G=new Error(`Received string "${$}" where a boolean was expected.`);G.name="Warning",console.warn(G)}return $!==""&&U!=="false"}return $},"_toBool"),aR=h(($)=>{if($==null)return $;if(typeof $==="string"){const U=Number($);if(U.toString()!==$){const G=new Error(`Received string "${$}" where a number was expected.`);return G.name="Warning",console.warn(G),$}return U}return $},"_toNum"),tR=B0(),eR=h(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return tR.expectUnion($)},"awsExpectUnion"),$F=B0(),EZ=h(($,U)=>$F.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),KZ=h(($,U)=>EZ($,U).then((G)=>{if(G.length)try{return JSON.parse(G)}catch(w){if((w==null?void 0:w.name)==="SyntaxError")Object.defineProperty(w,"$responseBodyText",{value:G});throw w}return{}}),"parseJsonBody"),UF=h(async($,U)=>{const G=await KZ($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),GF=h(($,U)=>{const G=h((L,Z)=>Object.keys(L).find((X)=>X.toLowerCase()===Z.toLowerCase()),"findKey"),w=h((L)=>{let Z=L;if(typeof Z==="number")Z=Z.toString();if(Z.indexOf(",")>=0)Z=Z.split(",")[0];if(Z.indexOf(":")>=0)Z=Z.split(":")[0];if(Z.indexOf("#")>=0)Z=Z.split("#")[1];return Z},"sanitizeErrorCode"),W=G($.headers,"x-amzn-errortype");if(W!==void 0)return w($.headers[W]);if(U.code!==void 0)return w(U.code);if(U.__type!==void 0)return w(U.__type)},"loadRestJsonErrorCode"),wF=B0(),WF=IZ(),AZ=h(($,U)=>EZ($,U).then((G)=>{if(G.length){const w=new WF.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(Y,z)=>z.trim()===""&&z.includes("\n")?"":void 0});w.addEntity("#xD","\r"),w.addEntity("#10","\n");let W;try{W=w.parse(G,!0)}catch(Y){if(Y&&typeof Y==="object")Object.defineProperty(Y,"$responseBodyText",{value:G});throw Y}const L="#text",Z=Object.keys(W)[0],X=W[Z];if(X[L])X[Z]=X[L],delete X[L];return wF.getValueFromTextNode(X)}return{}}),"parseXmlBody"),LF=h(async($,U)=>{const G=await AZ($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),ZF=h(($,U)=>{var G;if(((G=U==null?void 0:U.Error)==null?void 0:G.Code)!==void 0)return U.Error.Code;if((U==null?void 0:U.Code)!==void 0)return U.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var YF=I((i0)=>{Object.defineProperty(i0,"__esModule",{value:!0});var CU=XF();CU.__exportStar(L4(),i0);CU.__exportStar(x4(),i0);CU.__exportStar(VZ(),i0)});var g=U$($$(),1),uF=g.default.v1,_F=g.default.v3,HG=g.default.v4,dF=g.default.v5,pF=g.default.NIL,gF=g.default.version,sF=g.default.validate,lF=g.default.stringify,mF=g.default.parse;function rF($){return $}var mX=($)=>(U)=>async(G)=>{if(!x.isInstance(G.request))return U(G);const{request:w}=G,{handlerProtocol:W=""}=$.requestHandler.metadata||{};if(W.indexOf("h2")>=0&&!w.headers[":authority"])delete w.headers.host,w.headers[":authority"]=w.hostname+(w.port?":"+w.port:"");else if(!w.headers.host){let L=w.hostname;if(w.port!=null)L+=`:${w.port}`;w.headers.host=L}return U(G)},nX={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},oF=($)=>({applyToStack:(U)=>{U.add(mX($),nX)}});var iX=()=>($,U)=>async(G)=>{try{const w=await $(G),{clientName:W,commandName:L,logger:Z,dynamoDbDocumentClientOptions:X={}}=U,{overrideInputFilterSensitiveLog:Y,overrideOutputFilterSensitiveLog:z}=X,Q=Y??U.inputFilterSensitiveLog,R=z??U.outputFilterSensitiveLog,{$metadata:F,...M}=w.output;return Z?.info?.({clientName:W,commandName:L,input:Q(G.input),output:R(M),metadata:F}),w}catch(w){const{clientName:W,commandName:L,logger:Z,dynamoDbDocumentClientOptions:X={}}=U,{overrideInputFilterSensitiveLog:Y}=X,z=Y??U.inputFilterSensitiveLog;throw Z?.error?.({clientName:W,commandName:L,input:z(G.input),error:w,metadata:w.$metadata}),w}},rX={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},tF=($)=>({applyToStack:(U)=>{U.add(iX(),rX)}});var CG="X-Amzn-Trace-Id",oX="AWS_LAMBDA_FUNCTION_NAME",aX="_X_AMZN_TRACE_ID",tX=($)=>(U)=>async(G)=>{const{request:w}=G;if(!x.isInstance(w)||$.runtime!=="node"||w.headers.hasOwnProperty(CG))return U(G);const W=process.env[oX],L=process.env[aX],Z=(X)=>typeof X==="string"&&X.length>0;if(Z(W)&&Z(L))w.headers[CG]=L;return U({...G,request:w})},eX={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},wJ=($)=>({applyToStack:(U)=>{U.add(tX($),eX)}});function cJ($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}class y7{constructor({size:$,params:U}){if(this.data=new Map,this.parameters=[],this.capacity=$??50,U)this.parameters=U}get($,U){const G=this.hash($);if(G===!1)return U();if(!this.data.has(G)){if(this.data.size>this.capacity+10){const w=this.data.keys();let W=0;while(!0){const{value:L,done:Z}=w.next();if(this.data.delete(L),Z||++W>10)break}}this.data.set(G,U())}return this.data.get(G)}size(){return this.data.size}hash($){let U="";const{parameters:G}=this;if(G.length===0)return!1;for(let w of G){const W=String($[w]??"");if(W.includes("|;"))return!1;U+=W+"|;"}return U}}var u7=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),d0=($)=>u7.test($)||$.startsWith("[")&&$.endsWith("]");var _7=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),p0=($,U=!1)=>{if(!U)return _7.test($);const G=$.split(".");for(let w of G)if(!p0(w))return!1;return!0};var g0={};var n="endpoints";function c($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${c($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(c).join(", ")})`;return JSON.stringify($,null,2)}class V extends Error{constructor($){super($);this.name="EndpointError"}}var RL=($,U)=>$===U;var FL=($)=>{const U=$.split("."),G=[];for(let w of U){const W=w.indexOf("[");if(W!==-1){if(w.indexOf("]")!==w.length-1)throw new V(`Path: '${$}' does not end with ']'`);const L=w.slice(W+1,-1);if(Number.isNaN(parseInt(L)))throw new V(`Invalid array index: '${L}' in path: '${$}'`);if(W!==0)G.push(w.slice(0,W));G.push(L)}else G.push(w)}return G};var O1=($,U)=>FL(U).reduce((G,w)=>{if(typeof G!=="object")throw new V(`Index '${w}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(w)];return G[w]},$);var JL=($)=>$!=null;var IL=($)=>!$;var f1=U$(R0(),1);var m$={[f1.EndpointURLScheme.HTTP]:80,[f1.EndpointURLScheme.HTTPS]:443},ML=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:F,port:M,protocol:E="",path:K="",query:f={}}=$,k=new URL(`${E}//${F}${M?`:${M}`:""}${K}`);return k.search=Object.entries(f).map(([l,A])=>`${l}=${A}`).join("&"),k}return new URL($)}catch(F){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const G=U.href,{host:w,hostname:W,pathname:L,protocol:Z,search:X}=U;if(X)return null;const Y=Z.slice(0,-1);if(!Object.values(f1.EndpointURLScheme).includes(Y))return null;const z=d0(W),Q=G.includes(`${w}:${m$[Y]}`)||typeof $==="string"&&$.includes(`${w}:${m$[Y]}`),R=`${w}${Q?`:${m$[Y]}`:""}`;return{scheme:Y,authority:R,path:L,normalizedPath:L.endsWith("/")?L:`${L}/`,isIp:z}};var EL=($,U)=>$===U;var KL=($,U,G,w)=>{if(U>=G||$.length<G)return null;if(!w)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var AL=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var BL={booleanEquals:RL,getAttr:O1,isSet:JL,isValidHostLabel:p0,not:IL,parseURL:ML,stringEquals:EL,substring:KL,uriEncode:AL};var T1=($,U)=>{const G=[],w={...U.endpointParams,...U.referenceRecord};let W=0;while(W<$.length){const L=$.indexOf("{",W);if(L===-1){G.push($.slice(W));break}G.push($.slice(W,L));const Z=$.indexOf("}",L);if(Z===-1){G.push($.slice(L));break}if($[L+1]==="{"&&$[Z+1]==="}")G.push($.slice(L+1,Z)),W=Z+2;const X=$.substring(L+1,Z);if(X.includes("#")){const[Y,z]=X.split("#");G.push(O1(w[Y],z))}else G.push(w[X]);W=Z+1}return G.join("")};var VL=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var o=($,U,G)=>{if(typeof $==="string")return T1($,G);else if($.fn)return H1($,G);else if($.ref)return VL($,G);throw new V(`'${U}': ${String($)} is not a string, function or reference.`)};var H1=({fn:$,argv:U},G)=>{const w=U.map((L)=>["boolean","number"].includes(typeof L)?L:o(L,"arg",G)),W=$.split(".");if(W[0]in g0&&W[1]!=null)return g0[W[0]][W[1]](...w);return BL[$](...w)};var OL=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new V(`'${$}' is already defined in Reference Record.`);const w=H1(U,G);return G.logger?.debug?.(`${n} evaluateCondition: ${c(U)} = ${c(w)}`),{result:w===""?!0:!!w,...$!=null&&{toAssign:{name:$,value:w}}}};var O0=($=[],U)=>{const G={};for(let w of $){const{result:W,toAssign:L}=OL(w,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!W)return{result:W};if(L)G[L.name]=L.value,U.logger?.debug?.(`${n} assign: ${L.name} := ${c(L.value)}`)}return{result:!0,referenceRecord:G}};var fL=($,U)=>Object.entries($).reduce((G,[w,W])=>({...G,[w]:W.map((L)=>{const Z=o(L,"Header value entry",U);if(typeof Z!=="string")throw new V(`Header '${w}' value '${Z}' is not a string`);return Z})}),{});var n$=($,U)=>{if(Array.isArray($))return $.map((G)=>n$(G,U));switch(typeof $){case"string":return T1($,U);case"object":if($===null)throw new V(`Unexpected endpoint property: ${$}`);return C1($,U);case"boolean":return $;default:throw new V(`Unexpected endpoint property type: ${typeof $}`)}};var C1=($,U)=>Object.entries($).reduce((G,[w,W])=>({...G,[w]:n$(W,U)}),{});var TL=($,U)=>{const G=o($,"Endpoint URL",U);if(typeof G==="string")try{return new URL(G)}catch(w){throw console.error(`Failed to construct URL with ${G}`,w),w}throw new V(`Endpoint URL must be a string, got ${typeof G}`)};var HL=($,U)=>{const{conditions:G,endpoint:w}=$,{result:W,referenceRecord:L}=O0(G,U);if(!W)return;const Z={...U,referenceRecord:{...U.referenceRecord,...L}},{url:X,properties:Y,headers:z}=w;return U.logger?.debug?.(`${n} Resolving endpoint from template: ${c(w)}`),{...z!=null&&{headers:fL(z,Z)},...Y!=null&&{properties:C1(Y,Z)},url:TL(X,Z)}};var CL=($,U)=>{const{conditions:G,error:w}=$,{result:W,referenceRecord:L}=O0(G,U);if(!W)return;throw new V(o(w,"Error",{...U,referenceRecord:{...U.referenceRecord,...L}}))};var qL=($,U)=>{const{conditions:G,rules:w}=$,{result:W,referenceRecord:L}=O0(G,U);if(!W)return;return q1(w,{...U,referenceRecord:{...U.referenceRecord,...L}})};var q1=($,U)=>{for(let G of $)if(G.type==="endpoint"){const w=HL(G,U);if(w)return w}else if(G.type==="error")CL(G,U);else if(G.type==="tree"){const w=qL(G,U);if(w)return w}else throw new V(`Unknown endpoint rule: ${G}`);throw new V("Rules evaluation failed")};var d7=($,U)=>{const{endpointParams:G,logger:w}=U,{parameters:W,rules:L}=$;U.logger?.debug?.(`${n} Initial EndpointParams: ${c(G)}`);const Z=Object.entries(W).filter(([,z])=>z.default!=null).map(([z,Q])=>[z,Q.default]);if(Z.length>0)for(let[z,Q]of Z)G[z]=G[z]??Q;const X=Object.entries(W).filter(([,z])=>z.required).map(([z])=>z);for(let z of X)if(G[z]==null)throw new V(`Missing required parameter: '${z}'`);const Y=q1(L,{endpointParams:G,logger:w,referenceRecord:{}});return U.logger?.debug?.(`${n} Resolved endpoint: ${c(Y)}`),Y};var i$=($,U=!1)=>{if(U){for(let G of $.split("."))if(!i$(G))return!1;return!0}if(!p0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(d0($))return!1;return!0};var NL=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,w,W,L,Z,...X]=U;if(G!=="arn"||w===""||W===""||X.join(":")==="")return null;const Y=X.map((z)=>z.split("/")).flat();return{partition:w,service:W,region:L,accountId:Z,resourceId:Y}};var PL={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};var g7=PL,s7="",jL=($)=>{const{partitions:U}=g7;for(let w of U){const{regions:W,outputs:L}=w;for(let[Z,X]of Object.entries(W))if(Z===$)return{...L,...X}}for(let w of U){const{regionRegex:W,outputs:L}=w;if(new RegExp(W).test($))return{...L}}const G=U.find((w)=>w.id==="aws");if(!G)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...G.outputs}};var SL=()=>s7;var l7={isVirtualHostableS3Bucket:i$,parseArn:NL,partition:jL};g0.aws=l7;var r$="user-agent",N1="x-amz-user-agent",o$=" ",P1="/",kL=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,bL=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,a$="-";var m7=($)=>(U,G)=>async(w)=>{const{request:W}=w;if(!x.isInstance(W))return U(w);const{headers:L}=W,Z=G?.userAgent?.map(t$)||[],X=(await $.defaultUserAgentProvider()).map(t$),Y=$?.customUserAgent?.map(t$)||[],z=SL(),Q=(z?[z]:[]).concat([...X,...Z,...Y]).join(o$),R=[...X.filter((F)=>F.startsWith("aws-sdk-")),...Y].join(o$);if($.runtime!=="browser"){if(R)L[N1]=L[N1]?`${L[r$]} ${R}`:R;L[r$]=Q}else L[N1]=Q;return U({...w,request:W})},t$=($)=>{const U=$[0].split(P1).map((Z)=>Z.replace(kL,a$)).join(P1),G=$[1]?.replace(bL,a$),w=U.indexOf(P1),W=U.substring(0,w);let L=U.substring(w+1);if(W==="api")L=L.toLowerCase();return[W,L,G].filter((Z)=>Z&&Z.length>0).reduce((Z,X,Y)=>{switch(Y){case 0:return X;case 1:return`${Z}/${X}`;default:return`${Z}#${X}`}},"")},n7={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},A3=($)=>({applyToStack:(U)=>{U.add(m7($),n7)}});var j1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var e$=($)=>j1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var P3=($)=>{const{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return e$(U);const w=await U();return e$(w)},useFipsEndpoint:async()=>{const w=typeof U==="string"?U:await U();if(j1(w))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var f0=($,U,G)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${G} "${U}". Expected "true" or "false", got ${$[U]}.`)};var a;(function($){$.ENV="env",$.CONFIG="shared config entry"})(a||(a={}));var i7="AWS_USE_DUALSTACK_ENDPOINT",r7="use_dualstack_endpoint";var y3={environmentVariableSelector:($)=>f0($,i7,a.ENV),configFileSelector:($)=>f0($,r7,a.CONFIG),default:!1};var o7="AWS_USE_FIPS_ENDPOINT",a7="use_fips_endpoint";var d3={environmentVariableSelector:($)=>f0($,o7,a.ENV),configFileSelector:($)=>f0($,a7,a.CONFIG),default:!1};var $U=U$(R0(),1),hL=($)=>$[$U.SMITHY_CONTEXT_KEY]||($[$U.SMITHY_CONTEXT_KEY]={});var i=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var DL={environmentVariableSelector:($)=>$.AWS_REGION,configFileSelector:($)=>$.region,default:()=>{throw new Error("Region is missing")}},ZE={preferredFile:"credentials"};function t7($){return(U)=>async(G)=>{const w=G.request;if(x.isInstance(w)){const{body:W,headers:L}=w;if(W&&Object.keys(L).map((Z)=>Z.toLowerCase()).indexOf(xL)===-1)try{const Z=$(W);w.headers={...w.headers,[xL]:String(Z)}}catch(Z){}}return U({...G,request:w})}}var xL="content-length",e7={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},hE=($)=>({applyToStack:(U)=>{U.add(t7($.bodyLengthChecker),e7)}});var vL=($,U)=>(G)=>async(w)=>{const{response:W}=await G(w);try{const L=await U(W,$);return{response:W,output:L}}catch(L){if(Object.defineProperty(L,"$response",{value:W}),!("$metadata"in L)){if(L.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof L.$responseBodyText!=="undefined"){if(L.$response)L.$response.body=L.$responseBodyText}}throw L}};var cL=($,U)=>(G,w)=>async(W)=>{const L=w.endpointV2?.url&&$.urlParser?async()=>$.urlParser(w.endpointV2.url):$.endpoint;if(!L)throw new Error("No valid endpoint provider available.");const Z=await U(W.input,{...$,endpoint:L});return G({...W,request:Z})};function uE($,U,G){return{applyToStack:(w)=>{w.add(vL($,G),$z),w.add(cL($,U),UU)}}}var $z={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},UU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var yL=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Lz(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Wz(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},Uz=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Gz=/(\d+\.){3}\d+/,wz=/\.\./;var Wz=($)=>Uz.test($)&&!Gz.test($)&&!wz.test($),Lz=($)=>{const[U,G,w,,,W]=$.split(":"),L=U==="arn"&&$.split(":").length>=6,Z=Boolean(L&&G&&w&&W);if(L&&!Z)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return Z};var uL=($,U,G)=>{const w=async()=>{const W=G[$]??G[U];if(typeof W==="function")return W();return W};if($==="credentialScope"||U==="CredentialScope")return async()=>{const W=typeof G.credentials==="function"?await G.credentials():G.credentials;return W?.credentialScope??W?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const W=typeof G.credentials==="function"?await G.credentials():G.credentials;return W?.accountId??W?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const W=await w();if(W&&typeof W==="object"){if("url"in W)return W.url.href;if("hostname"in W){const{protocol:L,hostname:Z,port:X,path:Y}=W;return`${L}//${Z}${X?":"+X:""}${Y}`}}return W};return w};var _L="AWS_ENDPOINT_URL",dL="endpoint_url",pL=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((L)=>L.toUpperCase()),w=U[[_L,...G].join("_")];if(w)return w;const W=U[_L];if(W)return W;return},configFileSelector:(U,G)=>{if(G&&U.services){const W=G[["services",U.services].join(GU)];if(W){const L=$.split(" ").map((X)=>X.toLowerCase()),Z=W[[L.join("_"),dL].join(GU)];if(Z)return Z}}const w=U[dL];if(w)return w;return},default:void 0});var S1=async($)=>L0(pL($??""))();var k1=($)=>{if(typeof $==="object"){if("url"in $)return wU($.url);return $}return wU($)};var gL=async($,U,G,w)=>{if(!G.endpoint){let Z;if(G.serviceConfiguredEndpoint)Z=await G.serviceConfiguredEndpoint();else Z=await S1(G.serviceId);if(Z)G.endpoint=()=>Promise.resolve(k1(Z))}const W=await Zz($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(W,w)},Zz=async($,U,G)=>{const w={},W=U?.getEndpointParameterInstructions?.()||{};for(let[L,Z]of Object.entries(W))switch(Z.type){case"staticContextParams":w[L]=Z.value;break;case"contextParams":w[L]=$[Z.name];break;case"clientContextParams":case"builtInParams":w[L]=await uL(Z.name,L,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Z))}if(Object.keys(W).length===0)Object.assign(w,G);if(String(G.serviceId).toLowerCase()==="s3")await yL(w);return w};var sL=({config:$,instructions:U})=>{return(G,w)=>async(W)=>{const L=await gL(W.input,{getEndpointParameterInstructions(){return U}},{...$},w);w.endpointV2=L,w.authSchemes=L.properties?.authSchemes;const Z=w.authSchemes?.[0];if(Z){w.signing_region=Z.signingRegion,w.signing_service=Z.signingName;const Y=hL(w)?.selectedHttpAuthScheme?.httpAuthOption;if(Y)Y.signingProperties=Object.assign(Y.signingProperties||{},{signing_region:Z.signingRegion,signingRegion:Z.signingRegion,signing_service:Z.signingName,signingName:Z.signingName,signingRegionSet:Z.signingRegionSet},Z.properties)}return G({...W})}};var Xz={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:UU.name},FK=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(sL({config:$,instructions:U}),Xz)}});var KK=($)=>{const U=$.tls??!0,{endpoint:G}=$,w=G!=null?async()=>k1(await i(G)()):void 0,L={...$,endpoint:w,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:i($.useDualstackEndpoint??!1),useFipsEndpoint:i($.useFipsEndpoint??!1)};let Z=void 0;return L.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!Z)Z=S1($.serviceId);return Z},L};var y;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(y||(y={}));var Z0=3,lL=y.STANDARD;var mL=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],nL=["TimeoutError","RequestTimeout","RequestTimeoutException"],iL=[500,502,503,504],rL=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var Yz=($)=>$.$metadata?.clockSkewCorrected,T0=($)=>$.$metadata?.httpStatusCode===429||mL.includes($.name)||$.$retryable?.throttling==!0,b1=($)=>Yz($)||nL.includes($.name)||rL.includes($?.code||"")||iL.includes($.$metadata?.httpStatusCode||0),oL=($)=>{if($.$metadata?.httpStatusCode!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!b1($))return!0;return!1}return!1};class h1{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;const U=this.getCurrentTimeInSeconds();this.lastThrottleTime=U,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.currentCapacity){const U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),T0($)){const w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const G=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(G)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const G=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var X0=100,s0=20000,WU=500,D1=500,LU=5,ZU=10,XU=1,x1="amz-sdk-invocation-id",v1="amz-sdk-request";var aL=()=>{let $=X0;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(s0,Math.random()*2**w*$))},setDelayBase:(w)=>{$=w}}};var YU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(s0,$),getRetryCost:()=>G}};class H0{constructor($){this.maxAttempts=$,this.mode=y.STANDARD,this.capacity=D1,this.retryBackoffStrategy=aL(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return YU({retryDelay:X0,retryCount:0})}async refreshRetryTokenForRetry($,U){const G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){const w=U.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?WU:X0);const W=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),L=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,W):W,Z=this.getCapacityCost(w);return this.capacity-=Z,YU({retryDelay:L,retryCount:$.getRetryCount()+1,retryCost:Z})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(D1,this.capacity+($.getRetryCost()??XU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${Z0}`),Z0}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?ZU:LU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class zU{constructor($,U){this.maxAttemptsProvider=$,this.mode=y.ADAPTIVE;const{rateLimiter:G}=U??{};this.rateLimiter=G??new h1,this.standardRetryStrategy=new H0($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry($,U)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}}var tL="AWS_MAX_ATTEMPTS",eL="max_attempts",YA={environmentVariableSelector:($)=>{const U=$[tL];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${tL} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[eL];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${eL} mast be a number, got "${U}"`);return G},default:Z0},zA=($)=>{const{retryStrategy:U}=$,G=i($.maxAttempts??Z0);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await i($.retryMode)()===y.ADAPTIVE)return new zU(G);return new H0(G)}}},zz="AWS_RETRY_MODE",Qz="retry_mode",QA={environmentVariableSelector:($)=>$[zz],configFileSelector:($)=>$[Qz],default:lL};import{Readable as Rz}from"stream";var $4=($)=>$?.body instanceof Rz||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var QU=($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)};var Fz=($)=>(U,G)=>async(w)=>{let W=await $.retryStrategy();const L=await $.maxAttempts();if(Jz(W)){W=W;let Z=await W.acquireInitialRetryToken(G.partition_id),X=new Error,Y=0,z=0;const{request:Q}=w,R=x.isInstance(Q);if(R)Q.headers[x1]=HG();while(!0)try{if(R)Q.headers[v1]=`attempt=${Y+1}; max=${L}`;const{response:F,output:M}=await U(w);return W.recordSuccess(Z),M.$metadata.attempts=Y+1,M.$metadata.totalRetryDelay=z,{response:F,output:M}}catch(F){const M=Iz(F);if(X=QU(F),R&&$4(Q))throw(G.logger instanceof U4?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),X;try{Z=await W.refreshRetryTokenForRetry(Z,M)}catch(K){if(!X.$metadata)X.$metadata={};throw X.$metadata.attempts=Y+1,X.$metadata.totalRetryDelay=z,X}Y=Z.getRetryCount();const E=Z.getRetryDelay();z+=E,await new Promise((K)=>setTimeout(K,E))}}else{if(W=W,W?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",W.mode]];return W.retry(U,w)}},Jz=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",Iz=($)=>{const U={error:$,errorType:Mz($)},G=Kz($.$response);if(G)U.retryAfterHint=G;return U},Mz=($)=>{if(T0($))return"THROTTLING";if(b1($))return"TRANSIENT";if(oL($))return"SERVER_ERROR";return"CLIENT_ERROR"},Ez={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},fA=($)=>({applyToStack:(U)=>{U.add(Fz($),Ez)}}),Kz=($)=>{if(!RU.isInstance($))return;const U=Object.keys($.headers).find((L)=>L.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],w=Number(G);if(!Number.isNaN(w))return new Date(w*1000);return new Date(G)};import{platform as zF,release as QF}from"os";import{env as fZ,versions as RF}from"process";var qU={isCrtAvailable:!1};var OZ=()=>{if(qU.isCrtAvailable)return["md/crt-avail"];return null};var FF="AWS_SDK_UA_APP_ID",JF="sdk-ua-app-id",PB=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${zF()}`,QF()],["lang/js"],["md/nodejs",`${RF.node}`]],w=OZ();if(w)G.push(w);if($)G.push([`api/${$}`,U]);if(fZ.AWS_EXECUTION_ENV)G.push([`exec-env/${fZ.AWS_EXECUTION_ENV}`]);const W=L0({environmentVariableSelector:(Z)=>Z[FF],configFileSelector:(Z)=>Z[JF],default:void 0})();let L=void 0;return async()=>{if(!L){const Z=await W;L=Z?[...G,[`app/${Z}`]]:[...G]}return L}};import{Buffer as IF}from"buffer";import{createHash as MF,createHmac as EF}from"crypto";function TZ($,U){if(IF.isBuffer($))return $;if(typeof $==="string")return HZ($,U);if(ArrayBuffer.isView($))return NU($.buffer,$.byteOffset,$.byteLength);return NU($)}class KF{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(CZ(TZ($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?EF(this.algorithmIdentifier,TZ(this.secret)):MF(this.algorithmIdentifier)}}import{fstatSync as AF,lstatSync as BF}from"fs";var cB=($)=>{if(!$)return 0;if(typeof $==="string")return Buffer.byteLength($);else if(typeof $.byteLength==="number")return $.byteLength;else if(typeof $.size==="number")return $.size;else if(typeof $.start==="number"&&typeof $.end==="number")return $.end+1-$.start;else if(typeof $.path==="string"||Buffer.isBuffer($.path))return BF($.path).size;else if(typeof $.fd==="number")return AF($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var qZ="AWS_EXECUTION_ENV",PU="AWS_REGION",jU="AWS_DEFAULT_REGION",NZ="AWS_EC2_METADATA_DISABLED",PZ=["in-region","cross-region","mobile","standard","legacy"],jZ="/latest/meta-data/placement/region";var SZ={environmentVariableSelector:($)=>{return $.AWS_DEFAULTS_MODE},configFileSelector:($)=>{return $.defaults_mode},default:"legacy"};var iB=({region:$=L0(DL),defaultsMode:U=L0(SZ)}={})=>kZ(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return VF($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(G?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${PZ.join(", ")}, got ${G}`)}}),VF=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await OF();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},OF=async()=>{if(process.env[qZ]&&(process.env[PU]||process.env[jU]))return process.env[PU]??process.env[jU];if(!process.env[NZ])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-f0k8kxnp.js"),G=await $();return(await U({...G,path:jZ})).toString()}catch($){}};var tB=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const G=$.region;if(typeof G==="string")return G;return G()};return{setRegion(G){U=G},region(){return U}}},eB=($)=>{return{region:$.region()}};export{HG as V,hL as W,i as X,rF as Y,oF as Z,tF as _,wJ as $,f0 as aa,a as ba,l$ as ca,cJ as da,y7 as ea,g0 as fa,d7 as ga,l7 as ha,A3 as ia,y3 as ja,d3 as ka,DL as la,ZE as ma,P3 as na,hE as oa,Zz as pa,uE as qa,FK as ra,KK as sa,lL as ta,YA as ua,zA as va,QA as wa,fA as xa,YF as ya,PB as za,KF as Aa,cB as Ba,iB as Ca,tB as Da,eB as Ea};
|
|
19
|
-
|
|
20
|
-
//# debugId=5F77DA6F2322483564756E2164756E21
|