gemi 0.4.66 → 0.4.68
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/chunk-00234eac874c2722.js +2 -0
- package/dist/chunk-069fcad61c8841dc.js +1 -0
- package/dist/chunk-0b7a7410fce0b12e.js +9 -0
- package/dist/chunk-119ffcaf1c463b8d.js +6 -0
- package/dist/chunk-11cd81b560d496a3.js +2 -0
- package/dist/chunk-1ad1795e55abfdb5.js +2 -0
- package/dist/chunk-1bd88dc9c4475e1d.js +6 -0
- package/dist/chunk-210fc3731e7d2299.js +2 -0
- package/dist/chunk-32af3a3a1c95157f.js +2 -0
- package/dist/chunk-3330ff12936f5a2e.js +2 -0
- package/dist/chunk-36ab979dae2a2094.js +2 -0
- package/dist/chunk-3abb49bba3da7231.js +1 -0
- package/dist/chunk-3d7556bb2f665f61.js +2 -0
- package/dist/chunk-4e9167391dd0d15f.js +2 -0
- package/dist/chunk-59da8b8ab8add738.js +16 -0
- package/dist/chunk-61fc22887a7be6f9.js +3 -0
- package/dist/chunk-65c413665a7cf876.js +2 -0
- package/dist/chunk-77c89e3c8a03f91e.js +2 -0
- package/dist/chunk-7c0fd956d14fc327.js +2 -0
- package/dist/chunk-85a1f8fb96fd9473.js +2 -0
- package/dist/chunk-89291b5eb2bbd0b4.js +2 -0
- package/dist/chunk-915c050c94553981.js +2 -0
- package/dist/chunk-938fed005335132e.js +9 -0
- package/dist/chunk-afbf69daa7589a52.js +2 -0
- package/dist/chunk-b558c43783464f1b.js +2 -0
- package/dist/chunk-c210f6ae6276ebe8.js +1 -0
- package/dist/chunk-ccb551ce4fd177fe.js +2 -0
- package/dist/chunk-d445af84de70bf7e.js +2 -0
- package/dist/chunk-de0784c3310db458.js +5 -0
- package/dist/chunk-e0ffb920c65ebf44.js +2 -0
- package/dist/chunk-e755f2c1c7ad3912.js +2 -0
- package/dist/chunk-edfc3362e0d21dab.js +18 -0
- package/dist/chunk-f84049d82d29bd9e.js +2 -0
- package/dist/server/index.js +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/vite/{index-M61-SALR.mjs → index-CMpQi8Ml.mjs} +9 -5
- package/dist/vite/index.mjs +1 -1
- package/dist/vite/{typescript-puyfmcra.mjs → typescript-DximJlM5.mjs} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-915c050c94553981.js";import{y as A} from"./chunk-7ce930fe69575c87.js";import"./chunk-d7c78cd1ab7dc7ed.js";import{$ as S,F as G0,G as I0,H as T0,J as Wl,L as B0,T as K,U as Ih,V as u0,Z as A0,ba as u,ea as R0,ga as U0,ha as T,ia as L0,ja as _l,ka as bl,la as H0,ma as S0,na as ch,sa as el,ta as pl} from"./chunk-de0784c3310db458.js";import{$a as nl,Ca as yh,Da as dl,Ea as wl,Fa as q0,Ga as vl,Ha as Ml,Ia as zl,Ja as y0,Ka as fl,La as Cl,Ma as Ol,Na as gl,Oa as Q0,Pa as X0,Ra as F,Sa as B,Ta as Y0,Ua as xl,Wa as il,Xa as Z0,Ya as cl,Za as $0,_a as dh,bb as Tl,db as Al,eb as ol,fb as ul,gb as Rl,hb as Ll,ib as tl,jb as m0,kb as J0,va as E0,wa as k0,xa as K0,ya as F0} from"./chunk-59da8b8ab8add738.js";import"./chunk-c7e2acfd5087fb30.js";import{mb as kd,nb as f} from"./chunk-c210f6ae6276ebe8.js";import"./chunk-1ad1795e55abfdb5.js";import{pb as Qh} from"./chunk-0b7a7410fce0b12e.js";import"./chunk-069fcad61c8841dc.js";var C=A(yh(),1);var Gl=A(dh(),1);var md=function(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(d,l)=>({signingProperties:{config:d,context:l}})}},ll=function(h){return{schemeId:"smithy.api#noAuth"}},Il=async(h,d,l)=>{return{operation:dl(d).operation,region:await wl(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Hl=(h)=>{const d=[];switch(h.operation){case"AssumeRoleWithSAML":{d.push(ll(h));break}case"AssumeRoleWithWebIdentity":{d.push(ll(h));break}default:d.push(md(h))}return d},Jd=(h)=>({...h,stsClientCtor:R}),Sl=(h)=>{const d=Jd(h);return{...Gl.resolveAwsSdkSigV4Config(d)}};var ml=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},D={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Jl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && 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 sts",test:"yarn test:unit","test:unit":"jest"},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/client-sso-oidc":"3.629.0","@aws-sdk/core":"3.629.0","@aws-sdk/credential-provider-node":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@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.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@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",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-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var wh=A(dh(),1);var h0=A(yh(),1);var jl=A(dh(),1),al=A(yh(),1);var rl=A(kd(),1);var Dl={["required"]:!1,["type"]:"String"},qh={["required"]:!0,default:!1,["type"]:"Boolean"},Xl={["ref"]:"Endpoint"},El={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},kl={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},Yl={["ref"]:"UseFIPS"},Zl={["ref"]:"UseDualStack"},E={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},X={},Kl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:E,["type"]:"endpoint"},$l={["fn"]:"booleanEquals",["argv"]:[Yl,!0]},Ul={["fn"]:"booleanEquals",["argv"]:[Zl,!0]},Fl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Vl={["ref"]:"PartitionResult"},Bl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Vl,"supportsDualStack"]}]},ql=[{["fn"]:"isSet",["argv"]:[Xl]}],yl=[$l],Ql=[Ul],Ed={version:"1.0",parameters:{Region:Dl,UseDualStack:qh,UseFIPS:qh,Endpoint:Dl,UseGlobalEndpoint:qh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:ql},El,kl,{["fn"]:"booleanEquals",["argv"]:[Yl,!1]},{["fn"]:"booleanEquals",["argv"]:[Zl,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-northeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:E,["type"]:"endpoint"},Kl,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:E,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:ql,rules:[{conditions:yl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:Ql,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Xl,properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[El],rules:[{conditions:[kl],rules:[{conditions:[$l,Ul],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Fl]},Bl],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Fl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Vl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:X,headers:X},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:Ql,rules:[{conditions:[Bl],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},Kl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},Pl=Ed;var Nl=(h,d={})=>{return Ml(Pl,{endpointParams:h,logger:d.logger})};vl.aws=zl;var sl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??Rl,base64Encoder:h?.base64Encoder??Ll,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??Nl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Hl,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(d)=>d.getIdentityProvider("aws.auth#sigv4"),signer:new jl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(d)=>d.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new al.NoAuthSigner}],logger:h?.logger??new Wl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??rl.parseUrl,utf8Decoder:h?.utf8Decoder??Tl,utf8Encoder:h?.utf8Encoder??Al}};var l0=(h)=>{bl(process.version);const d=tl(h),l=()=>d().then(_l),w=sl(h);return wh.emitWarningIfUnsupportedVersion(process.version),{...w,...h,runtime:"node",defaultsMode:d,bodyLengthChecker:h?.bodyLengthChecker??ul,credentialDefaultProvider:h?.credentialDefaultProvider??Qh,defaultUserAgentProvider:h?.defaultUserAgentProvider??nl({serviceId:w.serviceId,clientVersion:Jl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(G)=>G.getIdentityProvider("aws.auth#sigv4")||(async(H)=>await Qh(H?.__config||{})()),signer:new wh.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(G)=>G.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new h0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(il),region:h?.region??f(Ol,gl),requestHandler:el.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...cl,default:async()=>(await l()).retryMode||xl}),sha256:h?.sha256??ol.bind(null,"sha256"),streamCollector:h?.streamCollector??pl,useDualstackEndpoint:h?.useDualstackEndpoint??f(fl),useFipsEndpoint:h?.useFipsEndpoint??f(Cl)}};var d0=(h)=>{const d=h.httpAuthSchemes;let{httpAuthSchemeProvider:l,credentials:w}=h;return{setHttpAuthScheme(G){const H=d.findIndex((I)=>I.schemeId===G.schemeId);if(H===-1)d.push(G);else d.splice(H,1,G)},httpAuthSchemes(){return d},setHttpAuthSchemeProvider(G){l=G},httpAuthSchemeProvider(){return l},setCredentials(G){w=G},credentials(){return w}}},w0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Gh=(h)=>h,D0=(h,d)=>{const l={...Gh(m0(h)),...Gh(H0(h)),...Gh(G0(h)),...Gh(d0(h))};return d.forEach((w)=>w.configure(l)),{...h,...J0(l),...S0(l),...I0(l),...w0(l)}};class R extends B0{constructor(...[h]){const d=l0(h||{}),l=ml(d),w=q0(l),G=Z0(w),H=Q0(G),I=E0(H),Q=Y0(I),v=Sl(Q),M=D0(v,h?.extensions||[]);super(M);this.config=M,this.middlewareStack.use(y0(this.config)),this.middlewareStack.use($0(this.config)),this.middlewareStack.use(X0(this.config)),this.middlewareStack.use(k0(this.config)),this.middlewareStack.use(K0(this.config)),this.middlewareStack.use(F0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Il,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class Y extends U0{constructor(h){super(h);Object.setPrototypeOf(this,Y.prototype)}}class Hh extends Y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Hh.prototype)}}class Sh extends Y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Sh.prototype)}}class mh extends Y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends Y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Ih}}),V0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),P0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Ih}}),v0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),M0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Ih}}),z0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),N0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),W0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var P=A(dh(),1);var j0=async(h,d)=>{const l=a;let w;return w=b({...Zd(h,d),[s]:ud,[_]:r}),j(d,l,"/",void 0,w)},a0=async(h,d)=>{const l=a;let w;return w=b({...$d(h,d),[s]:td,[_]:r}),j(d,l,"/",void 0,w)},r0=async(h,d)=>{const l=a;let w;return w=b({...Ud(h,d),[s]:hw,[_]:r}),j(d,l,"/",void 0,w)},s0=async(h,d)=>{const l=a;let w;return w=b({...Vd(h,d),[s]:lw,[_]:r}),j(d,l,"/",void 0,w)},_0=async(h,d)=>{const l=a;let w;return w=b({...Pd(h,d),[s]:dw,[_]:r}),j(d,l,"/",void 0,w)},b0=async(h,d)=>{const l=a;let w;return w=b({...vd(h,d),[s]:ww,[_]:r}),j(d,l,"/",void 0,w)},f0=async(h,d)=>{const l=a;let w;return w=b({...Md(h,d),[s]:Gw,[_]:r}),j(d,l,"/",void 0,w)},C0=async(h,d)=>{const l=a;let w;return w=b({...zd(h,d),[s]:Iw,[_]:r}),j(d,l,"/",void 0,w)},O0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Ld(l.AssumeRoleResult,d),{$metadata:k(h),...w}},g0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=jd(l.AssumeRoleWithSAMLResult,d),{$metadata:k(h),...w}},x0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=ad(l.AssumeRoleWithWebIdentityResult,d),{$metadata:k(h),...w}},i0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=rd(l.DecodeAuthorizationMessageResult,d),{$metadata:k(h),...w}},c0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=bd(l.GetAccessKeyInfoResult,d),{$metadata:k(h),...w}},e0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=fd(l.GetCallerIdentityResult,d),{$metadata:k(h),...w}},p0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Cd(l.GetFederationTokenResult,d),{$metadata:k(h),...w}},n0=async(h,d)=>{if(h.statusCode>=300)return L(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Od(l.GetSessionTokenResult,d),{$metadata:k(h),...w}},L=async(h,d)=>{const l={...h,body:await P.parseXmlErrorBody(h.body,d)},w=Hw(h,l.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Kd(l,d);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Qd(l,d);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Xd(l,d);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Yd(l,d);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Bd(l,d);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await yd(l,d);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Fd(l,d);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await qd(l,d);default:const G=l.body;return od({output:h,parsedBody:G.Error,errorCode:w})}},Kd=async(h,d)=>{const l=h.body,w=sd(l.Error,d),G=new Hh({$metadata:k(h),...w});return T(G,l)},Fd=async(h,d)=>{const l=h.body,w=gd(l.Error,d),G=new kh({$metadata:k(h),...w});return T(G,l)},Bd=async(h,d)=>{const l=h.body,w=xd(l.Error,d),G=new Dh({$metadata:k(h),...w});return T(G,l)},qd=async(h,d)=>{const l=h.body,w=id(l.Error,d),G=new Kh({$metadata:k(h),...w});return T(G,l)},yd=async(h,d)=>{const l=h.body,w=cd(l.Error,d),G=new Eh({$metadata:k(h),...w});return T(G,l)},Qd=async(h,d)=>{const l=h.body,w=ed(l.Error,d),G=new Sh({$metadata:k(h),...w});return T(G,l)},Xd=async(h,d)=>{const l=h.body,w=pd(l.Error,d),G=new mh({$metadata:k(h),...w});return T(G,l)},Yd=async(h,d)=>{const l=h.body,w=nd(l.Error,d),G=new Jh({$metadata:k(h),...w});return T(G,l)},Zd=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){const w=Fh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const w=o0(h[e],d);if(h[e]?.length===0)l.Tags=[];Object.entries(w).forEach(([G,H])=>{const I=`Tags.${G}`;l[I]=H})}if(h[Ch]!=null){const w=Rd(h[Ch],d);if(h[Ch]?.length===0)l.TransitiveTagKeys=[];Object.entries(w).forEach(([G,H])=>{const I=`TransitiveTagKeys.${G}`;l[I]=H})}if(h[Uh]!=null)l[Uh]=h[Uh];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];if(h[V]!=null)l[V]=h[V];if(h[Rh]!=null){const w=Td(h[Rh],d);if(h[Rh]?.length===0)l.ProvidedContexts=[];Object.entries(w).forEach(([G,H])=>{const I=`ProvidedContexts.${G}`;l[I]=H})}return l},$d=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[Th]!=null)l[Th]=h[Th];if(h[sh]!=null)l[sh]=h[sh];if(h[$]!=null){const w=Fh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Ud=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[xh]!=null)l[xh]=h[xh];if(h[Lh]!=null)l[Lh]=h[Lh];if(h[$]!=null){const w=Fh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Vd=(h,d)=>{const l={};if(h[Vh]!=null)l[Vh]=h[Vh];return l},Pd=(h,d)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},vd=(h,d)=>{return{}},Md=(h,d)=>{const l={};if(h[Nh]!=null)l[Nh]=h[Nh];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){const w=Fh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const w=o0(h[e],d);if(h[e]?.length===0)l.Tags=[];Object.entries(w).forEach(([G,H])=>{const I=`Tags.${G}`;l[I]=H})}return l},zd=(h,d)=>{const l={};if(h[y]!=null)l[y]=h[y];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},Fh=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=Nd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},Nd=(h,d)=>{const l={};if(h[ih]!=null)l[ih]=h[ih];return l},Wd=(h,d)=>{const l={};if(h[Ah]!=null)l[Ah]=h[Ah];if(h[Yh]!=null)l[Yh]=h[Yh];return l},Td=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=Wd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},Ad=(h,d)=>{const l={};if(h[zh]!=null)l[zh]=h[zh];if(h[gh]!=null)l[gh]=h[gh];return l},Rd=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;l[`member.${w}`]=G,w++}return l},o0=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=Ad(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},eh=(h,d)=>{const l={};if(h[Xh]!=null)l[Xh]=S(h[Xh]);if(h[N]!=null)l[N]=S(h[N]);return l},Ld=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[z]!=null)l[z]=eh(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[V]!=null)l[V]=S(h[V]);return l},jd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[z]!=null)l[z]=eh(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[ah]!=null)l[ah]=S(h[ah]);if(h[bh]!=null)l[bh]=S(h[bh]);if(h[Mh]!=null)l[Mh]=S(h[Mh]);if(h[x]!=null)l[x]=S(h[x]);if(h[Wh]!=null)l[Wh]=S(h[Wh]);if(h[V]!=null)l[V]=S(h[V]);return l},ad=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[_h]!=null)l[_h]=S(h[_h]);if(h[z]!=null)l[z]=eh(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[jh]!=null)l[jh]=S(h[jh]);if(h[x]!=null)l[x]=S(h[x]);if(h[V]!=null)l[V]=S(h[V]);return l},t=(h,d)=>{const l={};if(h[O]!=null)l[O]=S(h[O]);if(h[rh]!=null)l[rh]=S(h[rh]);if(h[fh]!=null)l[fh]=S(h[fh]);if(h[$h]!=null)l[$h]=A0(R0(h[$h]));return l},rd=(h,d)=>{const l={};if(h[Zh]!=null)l[Zh]=S(h[Zh]);return l},sd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},_d=(h,d)=>{const l={};if(h[vh]!=null)l[vh]=S(h[vh]);if(h[N]!=null)l[N]=S(h[N]);return l},bd=(h,d)=>{const l={};if(h[g]!=null)l[g]=S(h[g]);return l},fd=(h,d)=>{const l={};if(h[Oh]!=null)l[Oh]=S(h[Oh]);if(h[g]!=null)l[g]=S(h[g]);if(h[N]!=null)l[N]=S(h[N]);return l},Cd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[Ph]!=null)l[Ph]=_d(h[Ph],d);if(h[U]!=null)l[U]=u(h[U]);return l},Od=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);return l},gd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},xd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},id=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},cd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},ed=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},pd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},nd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},k=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var od=L0(Y),j=async(h,d,l,w,G)=>{const{hostname:H,protocol:I="https",port:Q,path:v}=await h.endpoint(),M={protocol:I,hostname:H,port:Q,method:"POST",path:v.endsWith("/")?v.slice(0,-1)+l:v+l,headers:d};if(w!==void 0)M.hostname=w;if(G!==void 0)M.body=G;return new T0(M)},a={"content-type":"application/x-www-form-urlencoded"},r="2011-06-15",s="Action",O="AccessKeyId",ud="AssumeRole",Xh="AssumedRoleId",z="AssumedRoleUser",td="AssumeRoleWithSAML",hw="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",q="Credentials",Yh="ContextAssertion",lw="DecodeAuthorizationMessage",Zh="DecodedMessage",y="DurationSeconds",$h="Expiration",Uh="ExternalId",Vh="EncodedMessage",Ph="FederatedUser",vh="FederatedUserId",dw="GetAccessKeyInfo",ww="GetCallerIdentity",Gw="GetFederationToken",Iw="GetSessionToken",Mh="Issuer",zh="Key",Nh="Name",Wh="NameQualifier",Z="Policy",$="PolicyArns",Th="PrincipalArn",Ah="ProviderArn",Rh="ProvidedContexts",Lh="ProviderId",U="PackedPolicySize",jh="Provider",W="RoleArn",i="RoleSessionName",ah="Subject",rh="SecretAccessKey",sh="SAMLAssertion",_h="SubjectFromWebIdentityToken",V="SourceIdentity",c="SerialNumber",bh="SubjectType",fh="SessionToken",e="Tags",p="TokenCode",Ch="TransitiveTagKeys",Oh="UserId",_="Version",gh="Value",xh="WebIdentityToken",ih="arn",m="message",b=(h)=>Object.entries(h).map(([d,l])=>ch(d)+"="+ch(l)).join("&"),Hw=(h,d)=>{if(d.Error?.Code!==void 0)return d.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,V0).ser(j0).de(O0).build(){}class ph extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(P0,v0).ser(a0).de(g0).build(){}class lh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(M0,z0).ser(r0).de(x0).build(){}class nh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(s0).de(i0).build(){}class oh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(_0).de(c0).build(){}class uh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(b0).de(e0).build(){}class th extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,N0).ser(f0).de(p0).build(){}class hl extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,W0).ser(C0).de(n0).build(){}var Sw={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:ph,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:nh,GetAccessKeyInfoCommand:oh,GetCallerIdentityCommand:uh,GetFederationTokenCommand:th,GetSessionTokenCommand:hl};class t0 extends R{}u0(Sw,t0);var hd="us-east-1",ld=(h)=>{if(typeof h?.Arn==="string"){const d=h.Arn.split(":");if(d.length>4&&d[4]!=="")return d[4]}return},dd=async(h,d,l)=>{const w=typeof h==="function"?await h():h,G=typeof d==="function"?await d():d;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${w} (provider)`,`${G} (parent client)`,`${hd} (STS default)`),w??G??hd},wd=(h,d)=>{let l,w;return async(G,H)=>{if(w=G,!l){const{logger:M=h?.parentClientConfig?.logger,region:n,requestHandler:Bh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Hd}=h,Sd=await dd(n,h?.parentClientConfig?.region,Hd);l=new d({credentialDefaultProvider:()=>async()=>w,region:Sd,requestHandler:Bh,logger:M})}const{Credentials:I,AssumedRoleUser:Q}=await l.send(new hh(H));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${H.RoleArn}`);const v=ld(Q);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...v&&{accountId:v}}}},Gd=(h,d)=>{let l;return async(w)=>{if(!l){const{logger:Q=h?.parentClientConfig?.logger,region:v,requestHandler:M=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,Bh=await dd(v,h?.parentClientConfig?.region,n);l=new d({region:Bh,requestHandler:M,logger:Q})}const{Credentials:G,AssumedRoleUser:H}=await l.send(new lh(w));if(!G||!G.AccessKeyId||!G.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const I=ld(H);return{accessKeyId:G.AccessKeyId,secretAccessKey:G.SecretAccessKey,sessionToken:G.SessionToken,expiration:G.Expiration,...G.CredentialScope&&{credentialScope:G.CredentialScope},...I&&{accountId:I}}}};var Id=(h,d)=>{if(!d)return h;else return class l extends h{constructor(w){super(w);for(let G of d)this.middlewareStack.use(G)}}},mw=(h={},d)=>wd(h,Id(R,d)),Jw=(h={},d)=>Gd(h,Id(R,d)),RG=(h)=>(d)=>h({roleAssumer:mw(d),roleAssumerWithWebIdentity:Jw(d),...d});export{Jw as getDefaultRoleAssumerWithWebIdentity,mw as getDefaultRoleAssumer,RG as decorateDefaultCredentialProvider,B0 as __Client,Y as STSServiceException,R as STSClient,t0 as STS,Jh as RegionDisabledException,mh as PackedPolicyTooLargeException,Sh as MalformedPolicyDocumentException,Eh as InvalidIdentityTokenException,Kh as InvalidAuthorizationMessageException,Dh as IDPRejectedClaimException,kh as IDPCommunicationErrorException,W0 as GetSessionTokenResponseFilterSensitiveLog,hl as GetSessionTokenCommand,N0 as GetFederationTokenResponseFilterSensitiveLog,th as GetFederationTokenCommand,uh as GetCallerIdentityCommand,oh as GetAccessKeyInfoCommand,Hh as ExpiredTokenException,nh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,z0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,M0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,v0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,P0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,ph as AssumeRoleWithSAMLCommand,V0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,K as $Command};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{y,z} from"./chunk-7ce930fe69575c87.js";import{E as _9} from"./chunk-d7c78cd1ab7dc7ed.js";import{H as S,I as c$,J as WW,K as L6,M as $Z,N as H1,O as Z0,P as fZ,Q as UZ,R as X6} from"./chunk-de0784c3310db458.js";import{lb as f0} from"./chunk-c7e2acfd5087fb30.js";import{mb as df,nb as o} from"./chunk-c210f6ae6276ebe8.js";import{ob as v1} from"./chunk-1ad1795e55abfdb5.js";import{ub as C$} from"./chunk-069fcad61c8841dc.js";var J0=z((Z5,Wf)=>{var{defineProperty:v0,getOwnPropertyDescriptor:r8,getOwnPropertyNames:m8}=Object,l8=Object.prototype.hasOwnProperty,wf=($,f)=>v0($,"name",{value:f,configurable:!0}),o8=($,f)=>{for(var U in f)v0($,U,{get:f[U],enumerable:!0})},i8=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of m8(f))if(!l8.call($,G)&&G!==U)v0($,G,{get:()=>f[G],enumerable:!(w=r8(f,G))||w.enumerable})}return $},t8=($)=>i8(v0({},"__esModule",{value:!0}),$),Gf={};o8(Gf,{getSmithyContext:()=>e8,normalizeProvider:()=>a8});Wf.exports=t8(Gf);var Uf=f0(),e8=wf(($)=>$[Uf.SMITHY_CONTEXT_KEY]||($[Uf.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),a8=wf(($)=>{if(typeof $==="function")return $;const f=Promise.resolve($);return()=>f},"normalizeProvider")});var U0=z((Ef)=>{Object.defineProperty(Ef,"__esModule",{value:!0});Ef.getHomeDir=void 0;var $E=import.meta.require("os"),fE=import.meta.require("path"),j1={},UE=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},wE=()=>{const{HOME:$,USERPROFILE:f,HOMEPATH:U,HOMEDRIVE:w=`C:${fE.sep}`}=process.env;if($)return $;if(f)return f;if(U)return`${w}${U}`;const G=UE();if(!j1[G])j1[G]=$E.homedir();return j1[G]};Ef.getHomeDir=wE});var b1=z((Xf)=>{Object.defineProperty(Xf,"__esModule",{value:!0});Xf.getSSOTokenFilepath=void 0;var GE=import.meta.require("crypto"),WE=import.meta.require("path"),EE=U0(),LE=($)=>{const U=GE.createHash("sha1").update($).digest("hex");return WE.join(EE.getHomeDir(),".aws","sso","cache",`${U}.json`)};Xf.getSSOTokenFilepath=LE});var If=z((Zf)=>{Object.defineProperty(Zf,"__esModule",{value:!0});Zf.getSSOTokenFromFile=void 0;var XE=import.meta.require("fs"),ME=b1(),{readFile:ZE}=XE.promises,YE=async($)=>{const f=ME.getSSOTokenFilepath($),U=await ZE(f,"utf8");return JSON.parse(U)};Zf.getSSOTokenFromFile=YE});var h1=z((Ff)=>{Object.defineProperty(Ff,"__esModule",{value:!0});Ff.slurpFile=void 0;var IE=import.meta.require("fs"),{readFile:FE}=IE.promises,k1={},RE=($,f)=>{if(!k1[$]||(f===null||f===void 0?void 0:f.ignoreCache))k1[$]=FE($,"utf8");return k1[$]};Ff.slurpFile=RE});var x1=z((z5,K0)=>{var{defineProperty:p0,getOwnPropertyDescriptor:zE,getOwnPropertyNames:QE}=Object,JE=Object.prototype.hasOwnProperty,j=($,f)=>p0($,"name",{value:f,configurable:!0}),AE=($,f)=>{for(var U in f)p0($,U,{get:f[U],enumerable:!0})},D1=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of QE(f))if(!JE.call($,G)&&G!==U)p0($,G,{get:()=>f[G],enumerable:!(w=zE(f,G))||w.enumerable})}return $},_1=($,f,U)=>(D1($,f,"default"),U&&D1(U,f,"default")),KE=($)=>D1(p0({},"__esModule",{value:!0}),$),A0={};AE(A0,{CONFIG_PREFIX_SEPARATOR:()=>m,DEFAULT_PROFILE:()=>Af,ENV_PROFILE:()=>Jf,getProfileName:()=>BE,loadSharedConfigFiles:()=>Bf,loadSsoSessionData:()=>hE,parseKnownFiles:()=>cE});K0.exports=KE(A0);_1(A0,U0(),K0.exports);var Jf="AWS_PROFILE",Af="default",BE=j(($)=>$.profile||process.env[Jf]||Af,"getProfileName");_1(A0,b1(),K0.exports);_1(A0,If(),K0.exports);var u0=f0(),OE=j(($)=>Object.entries($).filter(([f])=>{const U=f.indexOf(m);if(U===-1)return!1;return Object.values(u0.IniSectionType).includes(f.substring(0,U))}).reduce((f,[U,w])=>{const G=U.indexOf(m),W=U.substring(0,G)===u0.IniSectionType.PROFILE?U.substring(G+1):U;return f[W]=w,f},{...$.default&&{default:$.default}}),"getConfigData"),y0=import.meta.require("path"),qE=U0(),TE="AWS_CONFIG_FILE",Kf=j(()=>process.env[TE]||y0.join(qE.getHomeDir(),".aws","config"),"getConfigFilepath"),HE=U0(),VE="AWS_SHARED_CREDENTIALS_FILE",CE=j(()=>process.env[VE]||y0.join(HE.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),NE=U0(),PE=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,SE=["__proto__","profile __proto__"],c1=j(($)=>{const f={};let U,w;for(let G of $.split(/\r?\n/)){const W=G.split(/(^|\s)[;#]/)[0].trim();if(W[0]==="["&&W[W.length-1]==="]"){U=void 0,w=void 0;const L=W.substring(1,W.length-1),X=PE.exec(L);if(X){const[,M,,Z]=X;if(Object.values(u0.IniSectionType).includes(M))U=[M,Z].join(m)}else U=L;if(SE.includes(L))throw new Error(`Found invalid profile name "${L}"`)}else if(U){const L=W.indexOf("=");if(![0,-1].includes(L)){const[X,M]=[W.substring(0,L).trim(),W.substring(L+1).trim()];if(M==="")w=X;else{if(w&&G.trimStart()===G)w=void 0;f[U]=f[U]||{};const Z=w?[w,X].join(m):X;f[U][Z]=M}}}}return f},"parseIni"),zf=h1(),Qf=j(()=>({}),"swallowError"),m=".",Bf=j(async($={})=>{const{filepath:f=CE(),configFilepath:U=Kf()}=$,w=NE.getHomeDir();let W=f;if(f.startsWith("~/"))W=y0.join(w,f.slice(2));let E=U;if(U.startsWith("~/"))E=y0.join(w,U.slice(2));const L=await Promise.all([zf.slurpFile(E,{ignoreCache:$.ignoreCache}).then(c1).then(OE).catch(Qf),zf.slurpFile(W,{ignoreCache:$.ignoreCache}).then(c1).catch(Qf)]);return{configFile:L[0],credentialsFile:L[1]}},"loadSharedConfigFiles"),jE=j(($)=>Object.entries($).filter(([f])=>f.startsWith(u0.IniSectionType.SSO_SESSION+m)).reduce((f,[U,w])=>({...f,[U.substring(U.indexOf(m)+1)]:w}),{}),"getSsoSessionData"),bE=h1(),kE=j(()=>({}),"swallowError"),hE=j(async($={})=>bE.slurpFile($.configFilepath??Kf()).then(c1).then(jE).catch(kE),"loadSsoSessionData"),DE=j((...$)=>{const f={};for(let U of $)for(let[w,G]of Object.entries(U))if(f[w]!==void 0)Object.assign(f[w],G);else f[w]=G;return f},"mergeConfigFiles"),cE=j(async($)=>{const f=await Bf($);return DE(f.configFile,f.credentialsFile)},"parseKnownFiles")});var Hf=z((Q5,Tf)=>{var u1=function($){try{const f=new Set(Array.from($.match(/([A-Z_]){3,}/g)??[]));return f.delete("CONFIG"),f.delete("CONFIG_PREFIX_SEPARATOR"),f.delete("ENV"),[...f].join(", ")}catch(f){return $}},d0=Object.defineProperty,_E=Object.getOwnPropertyDescriptor,xE=Object.getOwnPropertyNames,vE=Object.prototype.hasOwnProperty,w0=($,f)=>d0($,"name",{value:f,configurable:!0}),uE=($,f)=>{for(var U in f)d0($,U,{get:f[U],enumerable:!0})},yE=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of xE(f))if(!vE.call($,G)&&G!==U)d0($,G,{get:()=>f[G],enumerable:!(w=_E(f,G))||w.enumerable})}return $},pE=($)=>yE(d0({},"__esModule",{value:!0}),$),qf={};uE(qf,{loadConfig:()=>rE});Tf.exports=pE(qf);var B0=v1();w0(u1,"getSelectorName");var dE=w0(($,f)=>async()=>{try{const U=$(process.env);if(U===void 0)throw new Error;return U}catch(U){throw new B0.CredentialsProviderError(U.message||`Not found in ENV: ${u1($.toString())}`,{logger:f})}},"fromEnv"),Of=x1(),gE=w0(($,{preferredFile:f="config",...U}={})=>async()=>{const w=Of.getProfileName(U),{configFile:G,credentialsFile:W}=await Of.loadSharedConfigFiles(U),E=W[w]||{},L=G[w]||{},X=f==="config"?{...E,...L}:{...L,...E};try{const Z=$(X,f==="config"?G:W);if(Z===void 0)throw new Error;return Z}catch(M){throw new B0.CredentialsProviderError(M.message||`Not found in config files w/ profile [${w}]: ${u1($.toString())}`,{logger:U.logger})}},"fromSharedConfigFiles"),sE=w0(($)=>typeof $==="function","isFunction"),nE=w0(($)=>sE($)?async()=>await $():B0.fromStatic($),"fromStatic"),rE=w0(({environmentVariableSelector:$,configFileSelector:f,default:U},w={})=>B0.memoize(B0.chain(dE($),gE(f,w),nE(U))),"loadConfig")});var jf=z((Pf)=>{Object.defineProperty(Pf,"__esModule",{value:!0});Pf.getEndpointUrlConfig=void 0;var Vf=x1(),Cf="AWS_ENDPOINT_URL",Nf="endpoint_url",mE=($)=>({environmentVariableSelector:(f)=>{const U=$.split(" ").map((W)=>W.toUpperCase()),w=f[[Cf,...U].join("_")];if(w)return w;const G=f[Cf];if(G)return G;return},configFileSelector:(f,U)=>{if(U&&f.services){const G=U[["services",f.services].join(Vf.CONFIG_PREFIX_SEPARATOR)];if(G){const W=$.split(" ").map((L)=>L.toLowerCase()),E=G[[W.join("_"),Nf].join(Vf.CONFIG_PREFIX_SEPARATOR)];if(E)return E}}const w=f[Nf];if(w)return w;return},default:void 0});Pf.getEndpointUrlConfig=mE});var hf=z((bf)=>{Object.defineProperty(bf,"__esModule",{value:!0});bf.getEndpointFromConfig=void 0;var lE=Hf(),oE=jf(),iE=async($)=>lE.loadConfig(oE.getEndpointUrlConfig($))();bf.getEndpointFromConfig=iE});var p1=z((K5,yf)=>{var uf=function($,f,U){return{applyToStack:(w)=>{w.add(cf($,U),xf),w.add(_f($,f),vf)}}},g0=Object.defineProperty,tE=Object.getOwnPropertyDescriptor,eE=Object.getOwnPropertyNames,aE=Object.prototype.hasOwnProperty,y1=($,f)=>g0($,"name",{value:f,configurable:!0}),$4=($,f)=>{for(var U in f)g0($,U,{get:f[U],enumerable:!0})},f4=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of eE(f))if(!aE.call($,G)&&G!==U)g0($,G,{get:()=>f[G],enumerable:!(w=tE(f,G))||w.enumerable})}return $},U4=($)=>f4(g0({},"__esModule",{value:!0}),$),Df={};$4(Df,{deserializerMiddleware:()=>cf,deserializerMiddlewareOption:()=>xf,getSerdePlugin:()=>uf,serializerMiddleware:()=>_f,serializerMiddlewareOption:()=>vf});yf.exports=U4(Df);var cf=y1(($,f)=>(U)=>async(w)=>{const{response:G}=await U(w);try{const W=await f(G,$);return{response:G,output:W}}catch(W){if(Object.defineProperty(W,"$response",{value:G}),!("$metadata"in W)){if(W.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof W.$responseBodyText!=="undefined"){if(W.$response)W.$response.body=W.$responseBodyText}}throw W}},"deserializerMiddleware"),_f=y1(($,f)=>(U,w)=>async(G)=>{var W;const E=((W=w.endpointV2)==null?void 0:W.url)&&$.urlParser?async()=>$.urlParser(w.endpointV2.url):$.endpoint;if(!E)throw new Error("No valid endpoint provider available.");const L=await f(G.input,{...$,endpoint:E});return U({...G,request:L})},"serializerMiddleware"),xf={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},vf={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};y1(uf,"getSerdePlugin")});var of=z((B5,lf)=>{var{defineProperty:n0,getOwnPropertyDescriptor:w4,getOwnPropertyNames:G4}=Object,W4=Object.prototype.hasOwnProperty,k=($,f)=>n0($,"name",{value:f,configurable:!0}),E4=($,f)=>{for(var U in f)n0($,U,{get:f[U],enumerable:!0})},L4=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of G4(f))if(!W4.call($,G)&&G!==U)n0($,G,{get:()=>f[G],enumerable:!(w=w4(f,G))||w.enumerable})}return $},X4=($)=>L4(n0({},"__esModule",{value:!0}),$),gf={};E4(gf,{endpointMiddleware:()=>rf,endpointMiddlewareOptions:()=>mf,getEndpointFromInstructions:()=>sf,getEndpointPlugin:()=>A4,resolveEndpointConfig:()=>K4,resolveParams:()=>nf,toEndpointV1:()=>d1});lf.exports=X4(gf);var M4=k(async($)=>{const f=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=f.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(R4(f)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!F4(f)||f.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||f.toLowerCase()!==f||f.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),Z4=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Y4=/(\d+\.){3}\d+/,I4=/\.\./,F4=k(($)=>Z4.test($)&&!Y4.test($)&&!I4.test($),"isDnsCompatibleBucketName"),R4=k(($)=>{const[f,U,w,,,G]=$.split(":"),W=f==="arn"&&$.split(":").length>=6,E=Boolean(W&&U&&w&&G);if(W&&!E)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return E},"isArnBucketName"),z4=k(($,f,U)=>{const w=k(async()=>{const G=U[$]??U[f];if(typeof G==="function")return G();return G},"configProvider");if($==="credentialScope"||f==="CredentialScope")return async()=>{const G=typeof U.credentials==="function"?await U.credentials():U.credentials;return(G==null?void 0:G.credentialScope)??(G==null?void 0:G.CredentialScope)};if($==="accountId"||f==="AccountId")return async()=>{const G=typeof U.credentials==="function"?await U.credentials():U.credentials;return(G==null?void 0:G.accountId)??(G==null?void 0:G.AccountId)};if($==="endpoint"||f==="endpoint")return async()=>{const G=await w();if(G&&typeof G==="object"){if("url"in G)return G.url.href;if("hostname"in G){const{protocol:W,hostname:E,port:L,path:X}=G;return`${W}//${E}${L?":"+L:""}${X}`}}return G};return w},"createConfigValueProvider"),Q4=hf(),pf=df(),d1=k(($)=>{if(typeof $==="object"){if("url"in $)return pf.parseUrl($.url);return $}return pf.parseUrl($)},"toEndpointV1"),sf=k(async($,f,U,w)=>{if(!U.endpoint){const E=await Q4.getEndpointFromConfig(U.serviceId||"");if(E)U.endpoint=()=>Promise.resolve(d1(E))}const G=await nf($,f,U);if(typeof U.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return U.endpointProvider(G,w)},"getEndpointFromInstructions"),nf=k(async($,f,U)=>{var w;const G={},W=((w=f==null?void 0:f.getEndpointParameterInstructions)==null?void 0:w.call(f))||{};for(let[E,L]of Object.entries(W))switch(L.type){case"staticContextParams":G[E]=L.value;break;case"contextParams":G[E]=$[L.name];break;case"clientContextParams":case"builtInParams":G[E]=await z4(L.name,E,U)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(W).length===0)Object.assign(G,U);if(String(U.serviceId).toLowerCase()==="s3")await M4(G);return G},"resolveParams"),s0=J0(),rf=k(({config:$,instructions:f})=>{return(U,w)=>async(G)=>{var W,E,L;const X=await sf(G.input,{getEndpointParameterInstructions(){return f}},{...$},w);w.endpointV2=X,w.authSchemes=(W=X.properties)==null?void 0:W.authSchemes;const M=(E=w.authSchemes)==null?void 0:E[0];if(M){w.signing_region=M.signingRegion,w.signing_service=M.signingName;const Z=s0.getSmithyContext(w),Y=(L=Z==null?void 0:Z.selectedHttpAuthScheme)==null?void 0:L.httpAuthOption;if(Y)Y.signingProperties=Object.assign(Y.signingProperties||{},{signing_region:M.signingRegion,signingRegion:M.signingRegion,signing_service:M.signingName,signingName:M.signingName,signingRegionSet:M.signingRegionSet},M.properties)}return U({...G})}},"endpointMiddleware"),J4=p1(),mf={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:J4.serializerMiddlewareOption.name},A4=k(($,f)=>({applyToStack:(U)=>{U.addRelativeTo(rf({config:$,instructions:f}),mf)}}),"getEndpointPlugin"),K4=k(($)=>{const f=$.tls??!0,{endpoint:U}=$,w=U!=null?async()=>d1(await s0.normalizeProvider(U)()):void 0;return{...$,endpoint:w,tls:f,isCustomEndpoint:!!U,useDualstackEndpoint:s0.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:s0.normalizeProvider($.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var g1=z((tf)=>{var O4=function($){return $&&$.__esModule?$:{default:$}},q4=function(){if(r0>m0.length-16)B4.default.randomFillSync(m0),r0=0;return m0.slice(r0,r0+=16)};Object.defineProperty(tf,"__esModule",{value:!0});tf.default=q4;var B4=O4(import.meta.require("crypto")),m0=new Uint8Array(256),r0=m0.length});var $U=z((ef)=>{Object.defineProperty(ef,"__esModule",{value:!0});ef.default=void 0;var H4=/^(?:[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;ef.default=H4});var O0=z((fU)=>{var C4=function($){return $&&$.__esModule?$:{default:$}},N4=function($){return typeof $==="string"&&V4.default.test($)};Object.defineProperty(fU,"__esModule",{value:!0});fU.default=void 0;var V4=C4($U()),P4=N4;fU.default=P4});var q0=z((GU)=>{var j4=function($){return $&&$.__esModule?$:{default:$}},wU=function($,f=0){return V[$[f+0]]+V[$[f+1]]+V[$[f+2]]+V[$[f+3]]+"-"+V[$[f+4]]+V[$[f+5]]+"-"+V[$[f+6]]+V[$[f+7]]+"-"+V[$[f+8]]+V[$[f+9]]+"-"+V[$[f+10]]+V[$[f+11]]+V[$[f+12]]+V[$[f+13]]+V[$[f+14]]+V[$[f+15]]},b4=function($,f=0){const U=wU($,f);if(!S4.default(U))throw TypeError("Stringified UUID is invalid");return U};Object.defineProperty(GU,"__esModule",{value:!0});GU.default=void 0;GU.unsafeStringify=wU;var S4=j4(O0()),V=[];for(let $=0;$<256;++$)V.push(($+256).toString(16).slice(1));var k4=b4;GU.default=k4});var MU=z((LU)=>{var _4=function($){return $&&$.__esModule?$:{default:$}},x4=function($,f,U){let w=f&&U||0;const G=f||new Array(16);$=$||{};let W=$.node||EU,E=$.clockseq!==void 0?$.clockseq:s1;if(W==null||E==null){const F=$.random||($.rng||D4.default)();if(W==null)W=EU=[F[0]|1,F[1],F[2],F[3],F[4],F[5]];if(E==null)E=s1=(F[6]<<8|F[7])&16383}let L=$.msecs!==void 0?$.msecs:Date.now(),X=$.nsecs!==void 0?$.nsecs:r1+1;const M=L-n1+(X-r1)/1e4;if(M<0&&$.clockseq===void 0)E=E+1&16383;if((M<0||L>n1)&&$.nsecs===void 0)X=0;if(X>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");n1=L,r1=X,s1=E,L+=12219292800000;const Z=((L&268435455)*1e4+X)%4294967296;G[w++]=Z>>>24&255,G[w++]=Z>>>16&255,G[w++]=Z>>>8&255,G[w++]=Z&255;const Y=L/4294967296*1e4&268435455;G[w++]=Y>>>8&255,G[w++]=Y&255,G[w++]=Y>>>24&15|16,G[w++]=Y>>>16&255,G[w++]=E>>>8|128,G[w++]=E&255;for(let F=0;F<6;++F)G[w+F]=W[F];return f||c4.unsafeStringify(G)};Object.defineProperty(LU,"__esModule",{value:!0});LU.default=void 0;var D4=_4(g1()),c4=q0(),EU,s1,n1=0,r1=0,v4=x4;LU.default=v4});var m1=z((ZU)=>{var y4=function($){return $&&$.__esModule?$:{default:$}},p4=function($){if(!u4.default($))throw TypeError("Invalid UUID");let f;const U=new Uint8Array(16);return U[0]=(f=parseInt($.slice(0,8),16))>>>24,U[1]=f>>>16&255,U[2]=f>>>8&255,U[3]=f&255,U[4]=(f=parseInt($.slice(9,13),16))>>>8,U[5]=f&255,U[6]=(f=parseInt($.slice(14,18),16))>>>8,U[7]=f&255,U[8]=(f=parseInt($.slice(19,23),16))>>>8,U[9]=f&255,U[10]=(f=parseInt($.slice(24,36),16))/1099511627776&255,U[11]=f/4294967296&255,U[12]=f>>>24&255,U[13]=f>>>16&255,U[14]=f>>>8&255,U[15]=f&255,U};Object.defineProperty(ZU,"__esModule",{value:!0});ZU.default=void 0;var u4=y4(O0()),d4=p4;ZU.default=d4});var l1=z((RU)=>{var n4=function($){return $&&$.__esModule?$:{default:$}},r4=function($){$=unescape(encodeURIComponent($));const f=[];for(let U=0;U<$.length;++U)f.push($.charCodeAt(U));return f},m4=function($,f,U){function w(G,W,E,L){var X;if(typeof G==="string")G=r4(G);if(typeof W==="string")W=s4.default(W);if(((X=W)===null||X===void 0?void 0:X.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let M=new Uint8Array(16+G.length);if(M.set(W),M.set(G,W.length),M=U(M),M[6]=M[6]&15|f,M[8]=M[8]&63|128,E){L=L||0;for(let Z=0;Z<16;++Z)E[L+Z]=M[Z];return E}return g4.unsafeStringify(M)}try{w.name=$}catch(G){}return w.DNS=IU,w.URL=FU,w};Object.defineProperty(RU,"__esModule",{value:!0});RU.URL=RU.DNS=void 0;RU.default=m4;var g4=q0(),s4=n4(m1()),IU="6ba7b810-9dad-11d1-80b4-00c04fd430c8";RU.DNS=IU;var FU="6ba7b811-9dad-11d1-80b4-00c04fd430c8";RU.URL=FU});var AU=z((QU)=>{var t4=function($){return $&&$.__esModule?$:{default:$}},e4=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return i4.default.createHash("md5").update($).digest()};Object.defineProperty(QU,"__esModule",{value:!0});QU.default=void 0;var i4=t4(import.meta.require("crypto")),a4=e4;QU.default=a4});var qU=z((BU)=>{var KU=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(BU,"__esModule",{value:!0});BU.default=void 0;var $L=KU(l1()),fL=KU(AU()),UL=$L.default("v3",48,fL.default),wL=UL;BU.default=wL});var VU=z((TU)=>{var WL=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(TU,"__esModule",{value:!0});TU.default=void 0;var GL=WL(import.meta.require("crypto")),EL={randomUUID:GL.default.randomUUID};TU.default=EL});var jU=z((PU)=>{var NU=function($){return $&&$.__esModule?$:{default:$}},ML=function($,f,U){if(CU.default.randomUUID&&!f&&!$)return CU.default.randomUUID();$=$||{};const w=$.random||($.rng||LL.default)();if(w[6]=w[6]&15|64,w[8]=w[8]&63|128,f){U=U||0;for(let G=0;G<16;++G)f[U+G]=w[G];return f}return XL.unsafeStringify(w)};Object.defineProperty(PU,"__esModule",{value:!0});PU.default=void 0;var CU=NU(VU()),LL=NU(g1()),XL=q0(),ZL=ML;PU.default=ZL});var hU=z((bU)=>{var IL=function($){return $&&$.__esModule?$:{default:$}},FL=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return YL.default.createHash("sha1").update($).digest()};Object.defineProperty(bU,"__esModule",{value:!0});bU.default=void 0;var YL=IL(import.meta.require("crypto")),RL=FL;bU.default=RL});var xU=z((cU)=>{var DU=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(cU,"__esModule",{value:!0});cU.default=void 0;var zL=DU(l1()),QL=DU(hU()),JL=zL.default("v5",80,QL.default),AL=JL;cU.default=AL});var yU=z((vU)=>{Object.defineProperty(vU,"__esModule",{value:!0});vU.default=void 0;var KL="00000000-0000-0000-0000-000000000000";vU.default=KL});var gU=z((pU)=>{var OL=function($){return $&&$.__esModule?$:{default:$}},qL=function($){if(!BL.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(pU,"__esModule",{value:!0});pU.default=void 0;var BL=OL(O0()),TL=qL;pU.default=TL});var o1=z((h)=>{var v=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(h,"__esModule",{value:!0});Object.defineProperty(h,"NIL",{enumerable:!0,get:function(){return PL.default}});Object.defineProperty(h,"parse",{enumerable:!0,get:function(){return kL.default}});Object.defineProperty(h,"stringify",{enumerable:!0,get:function(){return bL.default}});Object.defineProperty(h,"v1",{enumerable:!0,get:function(){return HL.default}});Object.defineProperty(h,"v3",{enumerable:!0,get:function(){return VL.default}});Object.defineProperty(h,"v4",{enumerable:!0,get:function(){return CL.default}});Object.defineProperty(h,"v5",{enumerable:!0,get:function(){return NL.default}});Object.defineProperty(h,"validate",{enumerable:!0,get:function(){return jL.default}});Object.defineProperty(h,"version",{enumerable:!0,get:function(){return SL.default}});var HL=v(MU()),VL=v(qU()),CL=v(jU()),NL=v(xU()),PL=v(yU()),SL=v(gU()),jL=v(O0()),bL=v(q0()),kL=v(m1())});var l=z((x5,mU)=>{var{defineProperty:l0,getOwnPropertyDescriptor:hL,getOwnPropertyNames:DL}=Object,cL=Object.prototype.hasOwnProperty,G0=($,f)=>l0($,"name",{value:f,configurable:!0}),_L=($,f)=>{for(var U in f)l0($,U,{get:f[U],enumerable:!0})},xL=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of DL(f))if(!cL.call($,G)&&G!==U)l0($,G,{get:()=>f[G],enumerable:!(w=hL(f,G))||w.enumerable})}return $},vL=($)=>xL(l0({},"__esModule",{value:!0}),$),sU={};_L(sU,{isClockSkewCorrectedError:()=>nU,isClockSkewError:()=>nL,isRetryableByTrait:()=>sL,isServerError:()=>mL,isThrottlingError:()=>rL,isTransientError:()=>rU});mU.exports=vL(sU);var uL=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],yL=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],pL=["TimeoutError","RequestTimeout","RequestTimeoutException"],dL=[500,502,503,504],gL=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],sL=G0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),nL=G0(($)=>uL.includes($.name),"isClockSkewError"),nU=G0(($)=>{var f;return(f=$.$metadata)==null?void 0:f.clockSkewCorrected},"isClockSkewCorrectedError"),rL=G0(($)=>{var f,U;return((f=$.$metadata)==null?void 0:f.httpStatusCode)===429||yL.includes($.name)||((U=$.$retryable)==null?void 0:U.throttling)==!0},"isThrottlingError"),rU=G0(($)=>{var f;return nU($)||pL.includes($.name)||gL.includes(($==null?void 0:$.code)||"")||dL.includes(((f=$.$metadata)==null?void 0:f.httpStatusCode)||0)},"isTransientError"),mL=G0(($)=>{var f;if(((f=$.$metadata)==null?void 0:f.httpStatusCode)!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!rU($))return!0;return!1}return!1},"isServerError")});var Lw=z((v5,Ew)=>{var{defineProperty:o0,getOwnPropertyDescriptor:lL,getOwnPropertyNames:oL}=Object,iL=Object.prototype.hasOwnProperty,D=($,f)=>o0($,"name",{value:f,configurable:!0}),tL=($,f)=>{for(var U in f)o0($,U,{get:f[U],enumerable:!0})},eL=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of oL(f))if(!iL.call($,G)&&G!==U)o0($,G,{get:()=>f[G],enumerable:!(w=lL(f,G))||w.enumerable})}return $},aL=($)=>eL(o0({},"__esModule",{value:!0}),$),oU={};tL(oU,{AdaptiveRetryStrategy:()=>W6,ConfiguredRetryStrategy:()=>E6,DEFAULT_MAX_ATTEMPTS:()=>i1,DEFAULT_RETRY_DELAY_BASE:()=>T0,DEFAULT_RETRY_MODE:()=>$6,DefaultRateLimiter:()=>eU,INITIAL_RETRY_TOKENS:()=>t1,INVOCATION_ID_HEADER:()=>U6,MAXIMUM_RETRY_DELAY:()=>e1,NO_RETRY_INCREMENT:()=>Uw,REQUEST_HEADER:()=>w6,RETRY_COST:()=>$w,RETRY_MODES:()=>iU,StandardRetryStrategy:()=>a1,THROTTLING_RETRY_DELAY_BASE:()=>aU,TIMEOUT_RETRY_COST:()=>fw});Ew.exports=aL(oU);var iU=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(iU||{}),i1=3,$6="standard",f6=l(),tU=class ${constructor(f){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(f==null?void 0:f.beta)??0.7,this.minCapacity=(f==null?void 0:f.minCapacity)??1,this.minFillRate=(f==null?void 0:f.minFillRate)??0.5,this.scaleConstant=(f==null?void 0:f.scaleConstant)??0.4,this.smooth=(f==null?void 0:f.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(f){if(!this.enabled)return;if(this.refillTokenBucket(),f>this.currentCapacity){const U=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,U))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){const f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}const U=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=f}updateClientSendingRate(f){let U;if(this.updateMeasuredRate(),f6.isThrottlingError(f)){const G=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=G,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(G),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(f){return this.getPrecise(f*this.beta)}cubicSuccess(f){return this.getPrecise(this.scaleConstant*Math.pow(f-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(f){this.refillTokenBucket(),this.fillRate=Math.max(f,this.minFillRate),this.maxCapacity=Math.max(f,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const f=this.getCurrentTimeInSeconds(),U=Math.floor(f*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const w=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise(f){return parseFloat(f.toFixed(8))}};D(tU,"DefaultRateLimiter");var eU=tU,T0=100,e1=20000,aU=500,t1=500,$w=5,fw=10,Uw=1,U6="amz-sdk-invocation-id",w6="amz-sdk-request",G6=D(()=>{let $=T0;return{computeNextBackoffDelay:D((w)=>{return Math.floor(Math.min(e1,Math.random()*2**w*$))},"computeNextBackoffDelay"),setDelayBase:D((w)=>{$=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),lU=D(({retryDelay:$,retryCount:f,retryCost:U})=>{return{getRetryCount:D(()=>f,"getRetryCount"),getRetryDelay:D(()=>Math.min(e1,$),"getRetryDelay"),getRetryCost:D(()=>U,"getRetryCost")}},"createDefaultRetryToken"),ww=class ${constructor(f){this.maxAttempts=f,this.mode="standard",this.capacity=t1,this.retryBackoffStrategy=G6(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return lU({retryDelay:T0,retryCount:0})}async refreshRetryTokenForRetry(f,U){const w=await this.getMaxAttempts();if(this.shouldRetry(f,U,w)){const G=U.errorType;this.retryBackoffStrategy.setDelayBase(G==="THROTTLING"?aU:T0);const W=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),E=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,W):W,L=this.getCapacityCost(G);return this.capacity-=L,lU({retryDelay:E,retryCount:f.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(t1,this.capacity+(f.getRetryCost()??Uw))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(f){return console.warn(`Max attempts provider could not resolve. Using default of ${i1}`),i1}}shouldRetry(f,U,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost(f){return f==="TRANSIENT"?fw:$w}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}};D(ww,"StandardRetryStrategy");var a1=ww,Gw=class ${constructor(f,U){this.maxAttemptsProvider=f,this.mode="adaptive";const{rateLimiter:w}=U??{};this.rateLimiter=w??new eU,this.standardRetryStrategy=new a1(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry(f,U)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}};D(Gw,"AdaptiveRetryStrategy");var W6=Gw,Ww=class $ extends a1{constructor(f,U=T0){super(typeof f==="function"?f:async()=>f);if(typeof U==="number")this.computeNextBackoffDelay=()=>U;else this.computeNextBackoffDelay=U}async refreshRetryTokenForRetry(f,U){const w=await super.refreshRetryTokenForRetry(f,U);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}};D(Ww,"ConfiguredRetryStrategy");var E6=Ww});var X0=z((u5,jw)=>{var Ow=function($){const f=$.getUTCFullYear(),U=$.getUTCMonth(),w=$.getUTCDay(),G=$.getUTCDate(),W=$.getUTCHours(),E=$.getUTCMinutes(),L=$.getUTCSeconds(),X=G<10?`0${G}`:`${G}`,M=W<10?`0${W}`:`${W}`,Z=E<10?`0${E}`:`${E}`,Y=L<10?`0${L}`:`${L}`;return`${_6[w]}, ${X} ${Z$[U]} ${f} ${M}:${Z}:${Y} GMT`},e0=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(f){return"%"+f.charCodeAt(0).toString(16).toUpperCase()})},Y$=function($,f,U){let w,G,W;if(typeof f==="undefined"&&typeof U==="undefined")w={},W=$;else if(w=$,typeof f==="function")return G=f,W=U,zX(w,G,W);else W=f;for(let E of Object.keys(W)){if(!Array.isArray(W[E])){w[E]=W[E];continue}Pw(w,null,W,E)}return w},Sw=function($,f,U){if(U<=0||!Number.isInteger(U))throw new Error("Invalid number of delimiters ("+U+") for splitEvery.");const w=$.split(f);if(U===1)return w;const G=[];let W="";for(let E=0;E<w.length;E++){if(W==="")W=w[E];else W+=f+w[E];if((E+1)%U===0)G.push(W),W=""}if(W!=="")G.push(W);return G},a0=Object.defineProperty,M6=Object.getOwnPropertyDescriptor,Z6=Object.getOwnPropertyNames,Y6=Object.prototype.hasOwnProperty,I=($,f)=>a0($,"name",{value:f,configurable:!0}),I6=($,f)=>{for(var U in f)a0($,U,{get:f[U],enumerable:!0})},F6=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of Z6(f))if(!Y6.call($,G)&&G!==U)a0($,G,{get:()=>f[G],enumerable:!(w=M6(f,G))||w.enumerable})}return $},R6=($)=>F6(a0({},"__esModule",{value:!0}),$),Mw={};I6(Mw,{Client:()=>Q6,Command:()=>Rw,LazyJsonString:()=>IX,NoOpLogger:()=>z6,SENSITIVE_STRING:()=>K6,ServiceException:()=>$X,StringWrapper:()=>P0,_json:()=>E$,collectBody:()=>J6,convertMap:()=>FX,createAggregatedClient:()=>B6,dateToUtcString:()=>Ow,decorateServiceException:()=>Tw,emitWarningIfUnsupportedVersion:()=>GX,expectBoolean:()=>q6,expectByte:()=>W$,expectFloat32:()=>i0,expectInt:()=>H6,expectInt32:()=>w$,expectLong:()=>C0,expectNonNull:()=>C6,expectNumber:()=>V0,expectObject:()=>Qw,expectShort:()=>G$,expectString:()=>N6,expectUnion:()=>P6,extendedEncodeURIComponent:()=>e0,getArrayIfSingleItem:()=>YX,getDefaultClientConfiguration:()=>MX,getDefaultExtensionConfiguration:()=>Vw,getValueFromTextNode:()=>Cw,handleFloat:()=>b6,limitedParseDouble:()=>M$,limitedParseFloat:()=>k6,limitedParseFloat32:()=>h6,loadConfigsForDefaultMode:()=>wX,logger:()=>N0,map:()=>Y$,parseBoolean:()=>O6,parseEpochTimestamp:()=>n6,parseRfc3339DateTime:()=>v6,parseRfc3339DateTimeWithOffset:()=>y6,parseRfc7231DateTime:()=>s6,resolveDefaultRuntimeConfig:()=>ZX,resolvedPath:()=>AX,serializeDateTime:()=>BX,serializeFloat:()=>KX,splitEvery:()=>Sw,strictParseByte:()=>Bw,strictParseDouble:()=>X$,strictParseFloat:()=>S6,strictParseFloat32:()=>Jw,strictParseInt:()=>D6,strictParseInt32:()=>c6,strictParseLong:()=>Kw,strictParseShort:()=>W0,take:()=>RX,throwDefaultError:()=>Hw,withBaseException:()=>fX});jw.exports=R6(Mw);var Zw=class ${trace(){}debug(){}info(){}warn(){}error(){}};I(Zw,"NoOpLogger");var z6=Zw,Yw=L6(),Iw=class ${constructor(f){this.middlewareStack=Yw.constructStack(),this.config=f}send(f,U,w){const G=typeof U!=="function"?U:void 0,W=typeof U==="function"?U:w,E=f.resolveMiddleware(this.middlewareStack,this.config,G);if(W)E(f).then((L)=>W(null,L.output),(L)=>W(L)).catch(()=>{});else return E(f).then((L)=>L.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};I(Iw,"Client");var Q6=Iw,$$=X6(),J6=I(async($=new Uint8Array,f)=>{if($ instanceof Uint8Array)return $$.Uint8ArrayBlobAdapter.mutate($);if(!$)return $$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const U=f.streamCollector($);return $$.Uint8ArrayBlobAdapter.mutate(await U)},"collectBody"),U$=f0(),Fw=class ${constructor(){this.middlewareStack=Yw.constructStack()}static classBuilder(){return new A6}resolveMiddlewareWithContext(f,U,w,{middlewareFn:G,clientName:W,commandName:E,inputFilterSensitiveLog:L,outputFilterSensitiveLog:X,smithyContext:M,additionalContext:Z,CommandCtor:Y}){for(let q of G.bind(this)(Y,f,U,w))this.middlewareStack.use(q);const F=f.concat(this.middlewareStack),{logger:R}=U,Q={logger:R,clientName:W,commandName:E,inputFilterSensitiveLog:L,outputFilterSensitiveLog:X,[U$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...M},...Z},{requestHandler:J}=U;return F.resolve((q)=>J.handle(q.request,w||{}),Q)}};I(Fw,"Command");var Rw=Fw,zw=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(f)=>f,this._outputFilterSensitiveLog=(f)=>f,this._serializer=null,this._deserializer=null}init(f){this._init=f}ep(f){return this._ep=f,this}m(f){return this._middlewareFn=f,this}s(f,U,w={}){return this._smithyContext={service:f,operation:U,...w},this}c(f={}){return this._additionalContext=f,this}n(f,U){return this._clientName=f,this._commandName=U,this}f(f=(w)=>w,U=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=U,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){var f;const U=this;let w;return w=(f=class extends Rw{constructor(...[G]){super();this.serialize=U._serializer,this.deserialize=U._deserializer,this.input=G??{},U._init(this)}static getEndpointParameterInstructions(){return U._ep}resolveMiddleware(G,W,E){return this.resolveMiddlewareWithContext(G,W,E,{CommandCtor:w,middlewareFn:U._middlewareFn,clientName:U._clientName,commandName:U._commandName,inputFilterSensitiveLog:U._inputFilterSensitiveLog,outputFilterSensitiveLog:U._outputFilterSensitiveLog,smithyContext:U._smithyContext,additionalContext:U._additionalContext})}},I(f,"CommandRef"),f)}};I(zw,"ClassBuilder");var A6=zw,K6="***SensitiveInformation***",B6=I(($,f)=>{for(let U of Object.keys($)){const w=$[U],G=I(async function(E,L,X){const M=new w(E);if(typeof L==="function")this.send(M,L);else if(typeof X==="function"){if(typeof L!=="object")throw new Error(`Expected http options but got ${typeof L}`);this.send(M,L||{},X)}else return this.send(M,L)},"methodImpl"),W=(U[0].toLowerCase()+U.slice(1)).replace(/Command$/,"");f.prototype[W]=G}},"createAggregatedClient"),O6=I(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),q6=I(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)N0.warn(t0(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const f=$.toLowerCase();if(f==="false"||f==="true")N0.warn(t0(`Expected boolean, got ${typeof $}: ${$}`));if(f==="false")return!1;if(f==="true")return!0}if(typeof $==="boolean")return $;throw new TypeError(`Expected boolean, got ${typeof $}: ${$}`)},"expectBoolean"),V0=I(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const f=parseFloat($);if(!Number.isNaN(f)){if(String(f)!==String($))N0.warn(t0(`Expected number but observed string: ${$}`));return f}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),T6=Math.ceil(340282346638528860000000000000000000000),i0=I(($)=>{const f=V0($);if(f!==void 0&&!Number.isNaN(f)&&f!==Infinity&&f!==(-Infinity)){if(Math.abs(f)>T6)throw new TypeError(`Expected 32-bit float, got ${$}`)}return f},"expectFloat32"),C0=I(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),H6=C0,w$=I(($)=>L$($,32),"expectInt32"),G$=I(($)=>L$($,16),"expectShort"),W$=I(($)=>L$($,8),"expectByte"),L$=I(($,f)=>{const U=C0($);if(U!==void 0&&V6(U,f)!==U)throw new TypeError(`Expected ${f}-bit integer, got ${$}`);return U},"expectSizedInt"),V6=I(($,f)=>{switch(f){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),C6=I(($,f)=>{if($===null||$===void 0){if(f)throw new TypeError(`Expected a non-null value for ${f}`);throw new TypeError("Expected a non-null value")}return $},"expectNonNull"),Qw=I(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;const f=Array.isArray($)?"array":typeof $;throw new TypeError(`Expected object, got ${f}: ${$}`)},"expectObject"),N6=I(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return N0.warn(t0(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),P6=I(($)=>{if($===null||$===void 0)return;const f=Qw($),U=Object.entries(f).filter(([,w])=>w!=null).map(([w])=>w);if(U.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(U.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${U} were not null.`);return f},"expectUnion"),X$=I(($)=>{if(typeof $=="string")return V0(L0($));return V0($)},"strictParseDouble"),S6=X$,Jw=I(($)=>{if(typeof $=="string")return i0(L0($));return i0($)},"strictParseFloat32"),j6=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,L0=I(($)=>{const f=$.match(j6);if(f===null||f[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),M$=I(($)=>{if(typeof $=="string")return Aw($);return V0($)},"limitedParseDouble"),b6=M$,k6=M$,h6=I(($)=>{if(typeof $=="string")return Aw($);return i0($)},"limitedParseFloat32"),Aw=I(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),Kw=I(($)=>{if(typeof $==="string")return C0(L0($));return C0($)},"strictParseLong"),D6=Kw,c6=I(($)=>{if(typeof $==="string")return w$(L0($));return w$($)},"strictParseInt32"),W0=I(($)=>{if(typeof $==="string")return G$(L0($));return G$($)},"strictParseShort"),Bw=I(($)=>{if(typeof $==="string")return W$(L0($));return W$($)},"strictParseByte"),t0=I(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((f)=>!f.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),N0={warn:console.warn},_6=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Z$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];I(Ow,"dateToUtcString");var x6=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),v6=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const f=x6.exec($);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[U,w,G,W,E,L,X,M]=f,Z=W0(E0(w)),Y=_(G,"month",1,12),F=_(W,"day",1,31);return H0(Z,Y,F,{hours:E,minutes:L,seconds:X,fractionalMilliseconds:M})},"parseRfc3339DateTime"),u6=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),y6=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const f=u6.exec($);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[U,w,G,W,E,L,X,M,Z]=f,Y=W0(E0(w)),F=_(G,"month",1,12),R=_(W,"day",1,31),Q=H0(Y,F,R,{hours:E,minutes:L,seconds:X,fractionalMilliseconds:M});if(Z.toUpperCase()!="Z")Q.setTime(Q.getTime()-a6(Z));return Q},"parseRfc3339DateTimeWithOffset"),p6=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$/),d6=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$/),g6=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})$/),s6=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let f=p6.exec($);if(f){const[U,w,G,W,E,L,X,M]=f;return H0(W0(E0(W)),f$(G),_(w,"day",1,31),{hours:E,minutes:L,seconds:X,fractionalMilliseconds:M})}if(f=d6.exec($),f){const[U,w,G,W,E,L,X,M]=f;return l6(H0(r6(W),f$(G),_(w,"day",1,31),{hours:E,minutes:L,seconds:X,fractionalMilliseconds:M}))}if(f=g6.exec($),f){const[U,w,G,W,E,L,X,M]=f;return H0(W0(E0(M)),f$(w),_(G.trimLeft(),"day",1,31),{hours:W,minutes:E,seconds:L,fractionalMilliseconds:X})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),n6=I(($)=>{if($===null||$===void 0)return;let f;if(typeof $==="number")f=$;else if(typeof $==="string")f=X$($);else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(f)||f===Infinity||f===(-Infinity))throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(f*1000))},"parseEpochTimestamp"),H0=I(($,f,U,w)=>{const G=f-1;return i6($,G,U),new Date(Date.UTC($,G,U,_(w.hours,"hour",0,23),_(w.minutes,"minute",0,59),_(w.seconds,"seconds",0,60),e6(w.fractionalMilliseconds)))},"buildDate"),r6=I(($)=>{const f=(new Date()).getUTCFullYear(),U=Math.floor(f/100)*100+W0(E0($));if(U<f)return U+100;return U},"parseTwoDigitYear"),m6=1576800000000,l6=I(($)=>{if($.getTime()-(new Date()).getTime()>m6)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),f$=I(($)=>{const f=Z$.indexOf($);if(f<0)throw new TypeError(`Invalid month: ${$}`);return f+1},"parseMonthByShortName"),o6=[31,28,31,30,31,30,31,31,30,31,30,31],i6=I(($,f,U)=>{let w=o6[f];if(f===1&&t6($))w=29;if(U>w)throw new TypeError(`Invalid day for ${Z$[f]} in ${$}: ${U}`)},"validateDayOfMonth"),t6=I(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),_=I(($,f,U,w)=>{const G=Bw(E0($));if(G<U||G>w)throw new TypeError(`${f} must be between ${U} and ${w}, inclusive`);return G},"parseDateValue"),e6=I(($)=>{if($===null||$===void 0)return 0;return Jw("0."+$)*1000},"parseMilliseconds"),a6=I(($)=>{const f=$[0];let U=1;if(f=="+")U=1;else if(f=="-")U=-1;else throw new TypeError(`Offset direction, ${f}, must be "+" or "-"`);const w=Number($.substring(1,3)),G=Number($.substring(4,6));return U*(w*60+G)*60*1000},"parseOffsetToMilliseconds"),E0=I(($)=>{let f=0;while(f<$.length-1&&$.charAt(f)==="0")f++;if(f===0)return $;return $.slice(f)},"stripLeadingZeroes"),qw=class $ extends Error{constructor(f){super(f.message);Object.setPrototypeOf(this,$.prototype),this.name=f.name,this.$fault=f.$fault,this.$metadata=f.$metadata}};I(qw,"ServiceException");var $X=qw,Tw=I(($,f={})=>{Object.entries(f).filter(([,w])=>w!==void 0).forEach(([w,G])=>{if($[w]==null||$[w]==="")$[w]=G});const U=$.message||$.Message||"UnknownError";return $.message=U,delete $.Message,$},"decorateServiceException"),Hw=I(({output:$,parsedBody:f,exceptionCtor:U,errorCode:w})=>{const G=UX($),W=G.httpStatusCode?G.httpStatusCode+"":void 0,E=new U({name:(f==null?void 0:f.code)||(f==null?void 0:f.Code)||w||W||"UnknownError",$fault:"client",$metadata:G});throw Tw(E,f)},"throwDefaultError"),fX=I(($)=>{return({output:f,parsedBody:U,errorCode:w})=>{Hw({output:f,parsedBody:U,exceptionCtor:$,errorCode:w})}},"withBaseException"),UX=I(($)=>({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"),wX=I(($)=>{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"),Xw=!1,GX=I(($)=>{if($&&!Xw&&parseInt($.substring(1,$.indexOf(".")))<16)Xw=!0},"emitWarningIfUnsupportedVersion"),WX=I(($)=>{const f=[];for(let U in U$.AlgorithmId){const w=U$.AlgorithmId[U];if($[w]===void 0)continue;f.push({algorithmId:()=>w,checksumConstructor:()=>$[w]})}return{_checksumAlgorithms:f,addChecksumAlgorithm(U){this._checksumAlgorithms.push(U)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),EX=I(($)=>{const f={};return $.checksumAlgorithms().forEach((U)=>{f[U.algorithmId()]=U.checksumConstructor()}),f},"resolveChecksumRuntimeConfig"),LX=I(($)=>{let f=$.retryStrategy;return{setRetryStrategy(U){f=U},retryStrategy(){return f}}},"getRetryConfiguration"),XX=I(($)=>{const f={};return f.retryStrategy=$.retryStrategy(),f},"resolveRetryRuntimeConfig"),Vw=I(($)=>{return{...WX($),...LX($)}},"getDefaultExtensionConfiguration"),MX=Vw,ZX=I(($)=>{return{...EX($),...XX($)}},"resolveDefaultRuntimeConfig");I(e0,"extendedEncodeURIComponent");var YX=I(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),Cw=I(($)=>{for(let U in $)if($.hasOwnProperty(U)&&$[U]["#text"]!==void 0)$[U]=$[U]["#text"];else if(typeof $[U]==="object"&&$[U]!==null)$[U]=Cw($[U]);return $},"getValueFromTextNode"),P0=I(function(){const $=Object.getPrototypeOf(this).constructor,U=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(U,$.prototype),U},"StringWrapper");P0.prototype=Object.create(String.prototype,{constructor:{value:P0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(P0,String);var Nw=class $ extends P0{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(f){if(f instanceof $)return f;else if(f instanceof String||typeof f==="string")return new $(f);return new $(JSON.stringify(f))}};I(Nw,"LazyJsonString");var IX=Nw;I(Y$,"map");var FX=I(($)=>{const f={};for(let[U,w]of Object.entries($||{}))f[U]=[,w];return f},"convertMap"),RX=I(($,f)=>{const U={};for(let w in f)Pw(U,$,f,w);return U},"take"),zX=I(($,f,U)=>{return Y$($,Object.entries(U).reduce((w,[G,W])=>{if(Array.isArray(W))w[G]=W;else if(typeof W==="function")w[G]=[f,W()];else w[G]=[f,W];return w},{}))},"mapWithFilter"),Pw=I(($,f,U,w)=>{if(f!==null){let E=U[w];if(typeof E==="function")E=[,E];const[L=QX,X=JX,M=w]=E;if(typeof L==="function"&&L(f[M])||typeof L!=="function"&&!!L)$[w]=X(f[M]);return}let[G,W]=U[w];if(typeof W==="function"){let E;const L=G===void 0&&(E=W())!=null,X=typeof G==="function"&&!!G(void 0)||typeof G!=="function"&&!!G;if(L)$[w]=E;else if(X)$[w]=W()}else{const E=G===void 0&&W!=null,L=typeof G==="function"&&!!G(W)||typeof G!=="function"&&!!G;if(E||L)$[w]=W}},"applyInstruction"),QX=I(($)=>$!=null,"nonNullish"),JX=I(($)=>$,"pass"),AX=I(($,f,U,w,G,W)=>{if(f!=null&&f[U]!==void 0){const E=w();if(E.length<=0)throw new Error("Empty value provided for input HTTP label: "+U+".");$=$.replace(G,W?E.split("/").map((L)=>e0(L)).join("/"):e0(E))}else throw new Error("No value provided for input HTTP label: "+U+".");return $},"resolvedPath"),KX=I(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),BX=I(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),E$=I(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((f)=>f!=null).map(E$);if(typeof $==="object"){const f={};for(let U of Object.keys($)){if($[U]==null)continue;f[U]=E$($[U])}return f}return $},"_json");I(Sw,"splitEvery")});var hw=z((bw)=>{Object.defineProperty(bw,"__esModule",{value:!0});bw.isStreamingPayload=void 0;var OX=import.meta.require("stream"),qX=($)=>($===null||$===void 0?void 0:$.body)instanceof OX.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;bw.isStreamingPayload=qX});var tw=z((d5,iw)=>{var{defineProperty:$1,getOwnPropertyDescriptor:TX,getOwnPropertyNames:HX}=Object,VX=Object.prototype.hasOwnProperty,T=($,f)=>$1($,"name",{value:f,configurable:!0}),CX=($,f)=>{for(var U in f)$1($,U,{get:f[U],enumerable:!0})},NX=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of HX(f))if(!VX.call($,G)&&G!==U)$1($,G,{get:()=>f[G],enumerable:!(w=TX(f,G))||w.enumerable})}return $},PX=($)=>NX($1({},"__esModule",{value:!0}),$),cw={};CX(cw,{AdaptiveRetryStrategy:()=>bX,CONFIG_MAX_ATTEMPTS:()=>F$,CONFIG_RETRY_MODE:()=>sw,ENV_MAX_ATTEMPTS:()=>I$,ENV_RETRY_MODE:()=>gw,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>kX,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>DX,StandardRetryStrategy:()=>pw,defaultDelayDecider:()=>xw,defaultRetryDecider:()=>vw,getOmitRetryHeadersPlugin:()=>cX,getRetryAfterHint:()=>ow,getRetryPlugin:()=>pX,omitRetryHeadersMiddleware:()=>nw,omitRetryHeadersMiddlewareOptions:()=>rw,resolveRetryConfig:()=>hX,retryMiddleware:()=>mw,retryMiddlewareOptions:()=>lw});iw.exports=PX(cw);var M0=Z0(),_w=o1(),B=Lw(),SX=T(($,f)=>{const U=$,w=(f==null?void 0:f.noRetryIncrement)??B.NO_RETRY_INCREMENT,G=(f==null?void 0:f.retryCost)??B.RETRY_COST,W=(f==null?void 0:f.timeoutRetryCost)??B.TIMEOUT_RETRY_COST;let E=$;const L=T((Y)=>Y.name==="TimeoutError"?W:G,"getCapacityAmount"),X=T((Y)=>L(Y)<=E,"hasRetryTokens");return Object.freeze({hasRetryTokens:X,retrieveRetryTokens:T((Y)=>{if(!X(Y))throw new Error("No retry token available");const F=L(Y);return E-=F,F},"retrieveRetryTokens"),releaseRetryTokens:T((Y)=>{E+=Y??w,E=Math.min(E,U)},"releaseRetryTokens")})},"getDefaultRetryQuota"),xw=T(($,f)=>Math.floor(Math.min(B.MAXIMUM_RETRY_DELAY,Math.random()*2**f*$)),"defaultDelayDecider"),d=l(),vw=T(($)=>{if(!$)return!1;return d.isRetryableByTrait($)||d.isClockSkewError($)||d.isThrottlingError($)||d.isTransientError($)},"defaultRetryDecider"),uw=T(($)=>{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"),yw=class ${constructor(f,U){this.maxAttemptsProvider=f,this.mode=B.RETRY_MODES.STANDARD,this.retryDecider=(U==null?void 0:U.retryDecider)??vw,this.delayDecider=(U==null?void 0:U.delayDecider)??xw,this.retryQuota=(U==null?void 0:U.retryQuota)??SX(B.INITIAL_RETRY_TOKENS)}shouldRetry(f,U,w){return U<w&&this.retryDecider(f)&&this.retryQuota.hasRetryTokens(f)}async getMaxAttempts(){let f;try{f=await this.maxAttemptsProvider()}catch(U){f=B.DEFAULT_MAX_ATTEMPTS}return f}async retry(f,U,w){let G,W=0,E=0;const L=await this.getMaxAttempts(),{request:X}=U;if(M0.HttpRequest.isInstance(X))X.headers[B.INVOCATION_ID_HEADER]=_w.v4();while(!0)try{if(M0.HttpRequest.isInstance(X))X.headers[B.REQUEST_HEADER]=`attempt=${W+1}; max=${L}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();const{response:M,output:Z}=await f(U);if(w==null?void 0:w.afterRequest)w.afterRequest(M);return this.retryQuota.releaseRetryTokens(G),Z.$metadata.attempts=W+1,Z.$metadata.totalRetryDelay=E,{response:M,output:Z}}catch(M){const Z=uw(M);if(W++,this.shouldRetry(Z,W,L)){G=this.retryQuota.retrieveRetryTokens(Z);const Y=this.delayDecider(d.isThrottlingError(Z)?B.THROTTLING_RETRY_DELAY_BASE:B.DEFAULT_RETRY_DELAY_BASE,W),F=jX(Z.$response),R=Math.max(F||0,Y);E+=R,await new Promise((Q)=>setTimeout(Q,R));continue}if(!Z.$metadata)Z.$metadata={};throw Z.$metadata.attempts=W,Z.$metadata.totalRetryDelay=E,Z}}};T(yw,"StandardRetryStrategy");var pw=yw,jX=T(($)=>{if(!M0.HttpResponse.isInstance($))return;const f=Object.keys($.headers).find((W)=>W.toLowerCase()==="retry-after");if(!f)return;const U=$.headers[f],w=Number(U);if(!Number.isNaN(w))return w*1000;return new Date(U).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),dw=class $ extends pw{constructor(f,U){const{rateLimiter:w,...G}=U??{};super(f,G);this.rateLimiter=w??new B.DefaultRateLimiter,this.mode=B.RETRY_MODES.ADAPTIVE}async retry(f,U){return super.retry(f,U,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}};T(dw,"AdaptiveRetryStrategy");var bX=dw,Dw=J0(),I$="AWS_MAX_ATTEMPTS",F$="max_attempts",kX={environmentVariableSelector:($)=>{const f=$[I$];if(!f)return;const U=parseInt(f);if(Number.isNaN(U))throw new Error(`Environment variable ${I$} mast be a number, got "${f}"`);return U},configFileSelector:($)=>{const f=$[F$];if(!f)return;const U=parseInt(f);if(Number.isNaN(U))throw new Error(`Shared config file entry ${F$} mast be a number, got "${f}"`);return U},default:B.DEFAULT_MAX_ATTEMPTS},hX=T(($)=>{const{retryStrategy:f}=$,U=Dw.normalizeProvider($.maxAttempts??B.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:U,retryStrategy:async()=>{if(f)return f;if(await Dw.normalizeProvider($.retryMode)()===B.RETRY_MODES.ADAPTIVE)return new B.AdaptiveRetryStrategy(U);return new B.StandardRetryStrategy(U)}}},"resolveRetryConfig"),gw="AWS_RETRY_MODE",sw="retry_mode",DX={environmentVariableSelector:($)=>$[gw],configFileSelector:($)=>$[sw],default:B.DEFAULT_RETRY_MODE},nw=T(()=>($)=>async(f)=>{const{request:U}=f;if(M0.HttpRequest.isInstance(U))delete U.headers[B.INVOCATION_ID_HEADER],delete U.headers[B.REQUEST_HEADER];return $(f)},"omitRetryHeadersMiddleware"),rw={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},cX=T(($)=>({applyToStack:(f)=>{f.addRelativeTo(nw(),rw)}}),"getOmitRetryHeadersPlugin"),_X=X0(),xX=hw(),mw=T(($)=>(f,U)=>async(w)=>{var G;let W=await $.retryStrategy();const E=await $.maxAttempts();if(vX(W)){W=W;let L=await W.acquireInitialRetryToken(U.partition_id),X=new Error,M=0,Z=0;const{request:Y}=w,F=M0.HttpRequest.isInstance(Y);if(F)Y.headers[B.INVOCATION_ID_HEADER]=_w.v4();while(!0)try{if(F)Y.headers[B.REQUEST_HEADER]=`attempt=${M+1}; max=${E}`;const{response:R,output:Q}=await f(w);return W.recordSuccess(L),Q.$metadata.attempts=M+1,Q.$metadata.totalRetryDelay=Z,{response:R,output:Q}}catch(R){const Q=uX(R);if(X=uw(R),F&&xX.isStreamingPayload(Y))throw(G=U.logger instanceof _X.NoOpLogger?console:U.logger)==null||G.warn("An error was encountered in a non-retryable streaming request."),X;try{L=await W.refreshRetryTokenForRetry(L,Q)}catch(q){if(!X.$metadata)X.$metadata={};throw X.$metadata.attempts=M+1,X.$metadata.totalRetryDelay=Z,X}M=L.getRetryCount();const J=L.getRetryDelay();Z+=J,await new Promise((q)=>setTimeout(q,J))}}else{if(W=W,W==null?void 0:W.mode)U.userAgent=[...U.userAgent||[],["cfg/retry-mode",W.mode]];return W.retry(f,w)}},"retryMiddleware"),vX=T(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),uX=T(($)=>{const f={error:$,errorType:yX($)},U=ow($.$response);if(U)f.retryAfterHint=U;return f},"getRetryErrorInfo"),yX=T(($)=>{if(d.isThrottlingError($))return"THROTTLING";if(d.isTransientError($))return"TRANSIENT";if(d.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),lw={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},pX=T(($)=>({applyToStack:(f)=>{f.add(mw($),lw)}}),"getRetryPlugin"),ow=T(($)=>{if(!M0.HttpResponse.isInstance($))return;const f=Object.keys($.headers).find((W)=>W.toLowerCase()==="retry-after");if(!f)return;const U=$.headers[f],w=Number(U);if(!Number.isNaN(w))return new Date(w*1000);return new Date(U)},"getRetryAfterHint")});var z$=z((g5,QG)=>{var $G=function($){const f=new Map;for(let U of $)f.set(U.schemeId,U);return f},IG=function($,f){return new RG($,f)},zG=function($,f,U,w,G){return K(async function*W(E,L,...X){let M=E.startingToken||void 0,Z=!0,Y;while(Z){if(L[U]=M,G)L[G]=L[G]??E.pageSize;if(E.client instanceof $)Y=await YM(f,E.client,L,...X);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield Y;const F=M;M=IM(Y,w),Z=!!(M&&(!E.stopOnSameToken||M!==F))}return},"paginateOperation")},U1=Object.defineProperty,dX=Object.getOwnPropertyDescriptor,gX=Object.getOwnPropertyNames,sX=Object.prototype.hasOwnProperty,K=($,f)=>U1($,"name",{value:f,configurable:!0}),nX=($,f)=>{for(var U in f)U1($,U,{get:f[U],enumerable:!0})},rX=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of gX(f))if(!sX.call($,G)&&G!==U)U1($,G,{get:()=>f[G],enumerable:!(w=dX(f,G))||w.enumerable})}return $},mX=($)=>rX(U1({},"__esModule",{value:!0}),$),ew={};nX(ew,{DefaultIdentityProviderConfig:()=>UM,EXPIRATION_MS:()=>ZG,HttpApiKeyAuthSigner:()=>wM,HttpBearerAuthSigner:()=>GM,NoAuthSigner:()=>WM,RequestBuilder:()=>RG,createIsIdentityExpiredFunction:()=>MG,createPaginator:()=>zG,doesIdentityRequireRefresh:()=>YG,getHttpAuthSchemeEndpointRuleSetPlugin:()=>oX,getHttpAuthSchemePlugin:()=>tX,getHttpSigningPlugin:()=>fM,getSmithyContext:()=>XM,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>fG,httpAuthSchemeMiddleware:()=>R$,httpAuthSchemeMiddlewareOptions:()=>UG,httpSigningMiddleware:()=>wG,httpSigningMiddlewareOptions:()=>GG,isIdentityExpired:()=>EM,memoizeIdentityProvider:()=>LM,normalizeProvider:()=>MM,requestBuilder:()=>IG});QG.exports=mX(ew);var aw=J0();K($G,"convertHttpAuthSchemesToMap");var R$=K(($,f)=>(U,w)=>async(G)=>{var W;const E=$.httpAuthSchemeProvider(await f.httpAuthSchemeParametersProvider($,w,G.input)),L=$G($.httpAuthSchemes),X=aw.getSmithyContext(w),M=[];for(let Z of E){const Y=L.get(Z.schemeId);if(!Y){M.push(`HttpAuthScheme \`${Z.schemeId}\` was not enabled for this service.`);continue}const F=Y.identityProvider(await f.identityProviderConfigProvider($));if(!F){M.push(`HttpAuthScheme \`${Z.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:R={},signingProperties:Q={}}=((W=Z.propertiesExtractor)==null?void 0:W.call(Z,$,w))||{};Z.identityProperties=Object.assign(Z.identityProperties||{},R),Z.signingProperties=Object.assign(Z.signingProperties||{},Q),X.selectedHttpAuthScheme={httpAuthOption:Z,identity:await F(Z.identityProperties),signer:Y.signer};break}if(!X.selectedHttpAuthScheme)throw new Error(M.join("\n"));return U(G)},"httpAuthSchemeMiddleware"),lX=of(),fG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:lX.endpointMiddlewareOptions.name},oX=K(($,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:U})=>({applyToStack:(w)=>{w.addRelativeTo(R$($,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:U}),fG)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),iX=p1(),UG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:iX.serializerMiddlewareOption.name},tX=K(($,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:U})=>({applyToStack:(w)=>{w.addRelativeTo(R$($,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:U}),UG)}}),"getHttpAuthSchemePlugin"),w1=Z0(),eX=K(($)=>(f)=>{throw f},"defaultErrorHandler"),aX=K(($,f)=>{},"defaultSuccessHandler"),wG=K(($)=>(f,U)=>async(w)=>{if(!w1.HttpRequest.isInstance(w.request))return f(w);const W=aw.getSmithyContext(U).selectedHttpAuthScheme;if(!W)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:E={}},identity:L,signer:X}=W,M=await f({...w,request:await X.sign(w.request,L,E)}).catch((X.errorHandler||eX)(E));return(X.successHandler||aX)(M.response,E),M},"httpSigningMiddleware"),$M=tw(),GG={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:$M.retryMiddlewareOptions.name},fM=K(($)=>({applyToStack:(f)=>{f.addRelativeTo(wG($),GG)}}),"getHttpSigningPlugin"),WG=class ${constructor(f){this.authSchemes=new Map;for(let[U,w]of Object.entries(f))if(w!==void 0)this.authSchemes.set(U,w)}getIdentityProvider(f){return this.authSchemes.get(f)}};K(WG,"DefaultIdentityProviderConfig");var UM=WG,f1=f0(),EG=class ${async sign(f,U,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(!U.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const G=w1.HttpRequest.clone(f);if(w.in===f1.HttpApiKeyAuthLocation.QUERY)G.query[w.name]=U.apiKey;else if(w.in===f1.HttpApiKeyAuthLocation.HEADER)G.headers[w.name]=w.scheme?`${w.scheme} ${U.apiKey}`:U.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return G}};K(EG,"HttpApiKeyAuthSigner");var wM=EG,LG=class ${async sign(f,U,w){const G=w1.HttpRequest.clone(f);if(!U.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return G.headers.Authorization=`Bearer ${U.token}`,G}};K(LG,"HttpBearerAuthSigner");var GM=LG,XG=class ${async sign(f,U,w){return f}};K(XG,"NoAuthSigner");var WM=XG,MG=K(($)=>(f)=>YG(f)&&f.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),ZG=300000,EM=MG(ZG),YG=K(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),LM=K(($,f,U)=>{if($===void 0)return;const w=typeof $!=="function"?async()=>Promise.resolve($):$;let G,W,E,L=!1;const X=K(async(M)=>{if(!W)W=w(M);try{G=await W,E=!0,L=!1}finally{W=void 0}return G},"coalesceProvider");if(f===void 0)return async(M)=>{if(!E||(M==null?void 0:M.forceRefresh))G=await X(M);return G};return async(M)=>{if(!E||(M==null?void 0:M.forceRefresh))G=await X(M);if(L)return G;if(!U(G))return L=!0,G;if(f(G))return await X(M),G;return G}},"memoizeIdentityProvider"),XM=K(($)=>$[f1.SMITHY_CONTEXT_KEY]||($[f1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),MM=K(($)=>{if(typeof $==="function")return $;const f=Promise.resolve($);return()=>f},"normalizeProvider"),ZM=X0();K(IG,"requestBuilder");var FG=class ${constructor(f,U){this.input=f,this.context=U,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:f,protocol:U="https",port:w,path:G}=await this.context.endpoint();this.path=G;for(let W of this.resolvePathStack)W(this.path);return new w1.HttpRequest({protocol:U,hostname:this.hostname||f,port:w,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(f){return this.hostname=f,this}bp(f){return this.resolvePathStack.push((U)=>{this.path=`${(U==null?void 0:U.endsWith("/"))?U.slice(0,-1):U||""}`+f}),this}p(f,U,w,G){return this.resolvePathStack.push((W)=>{this.path=ZM.resolvedPath(W,this.input,f,U,w,G)}),this}h(f){return this.headers=f,this}q(f){return this.query=f,this}b(f){return this.body=f,this}m(f){return this.method=f,this}};K(FG,"RequestBuilder");var RG=FG,YM=K(async($,f,U,...w)=>{return await f.send(new $(U),...w)},"makePagedClientRequest");K(zG,"createPaginator");var IM=K(($,f)=>{let U=$;const w=f.split(".");for(let G of w){if(!U||typeof U!=="object")return;U=U[G]}return U},"get")});var MW=z((EQ,XW)=>{var{defineProperty:K1,getOwnPropertyDescriptor:rM,getOwnPropertyNames:mM}=Object,lM=Object.prototype.hasOwnProperty,oM=($,f)=>K1($,"name",{value:f,configurable:!0}),iM=($,f)=>{for(var U in f)K1($,U,{get:f[U],enumerable:!0})},tM=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of mM(f))if(!lM.call($,G)&&G!==U)K1($,G,{get:()=>f[G],enumerable:!(w=rM(f,G))||w.enumerable})}return $},eM=($)=>tM(K1({},"__esModule",{value:!0}),$),LW={};iM(LW,{emitWarningIfUnsupportedVersion:()=>aM});XW.exports=eM(LW);var EW=!1,aM=oM(($)=>{if($&&!EW&&parseInt($.substring(1,$.indexOf(".")))<18)EW=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
2
|
+
no longer support Node.js 16.x on January 6, 2025.
|
|
3
|
+
|
|
4
|
+
To continue receiving updates to AWS services, bug fixes, and security
|
|
5
|
+
updates please upgrade to a supported Node.js LTS version.
|
|
6
|
+
|
|
7
|
+
More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var SW=z((LQ,PW)=>{var y$=function($){for(let f=0;f<8;f++)$[f]^=255;for(let f=7;f>-1;f--)if($[f]++,$[f]!==0)break},V1=Object.defineProperty,wZ=Object.getOwnPropertyDescriptor,GZ=Object.getOwnPropertyNames,WZ=Object.prototype.hasOwnProperty,H=($,f)=>V1($,"name",{value:f,configurable:!0}),EZ=($,f)=>{for(var U in f)V1($,U,{get:f[U],enumerable:!0})},LZ=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of GZ(f))if(!WZ.call($,G)&&G!==U)V1($,G,{get:()=>f[G],enumerable:!(w=wZ(f,G))||w.enumerable})}return $},XZ=($)=>LZ(V1({},"__esModule",{value:!0}),$),RW={};EZ(RW,{SignatureV4:()=>DZ,clearCredentialCache:()=>VZ,createScope:()=>q1,getCanonicalHeaders:()=>u$,getCanonicalQuery:()=>qW,getPayloadHash:()=>T1,getSigningKey:()=>OW,moveHeadersToQuery:()=>CW,prepareRequest:()=>p$});PW.exports=XZ(RW);var ZW=J0(),_$=H1(),MZ="X-Amz-Algorithm",ZZ="X-Amz-Credential",zW="X-Amz-Date",YZ="X-Amz-SignedHeaders",IZ="X-Amz-Expires",QW="X-Amz-Signature",JW="X-Amz-Security-Token",AW="authorization",KW=zW.toLowerCase(),FZ="date",RZ=[AW,KW,FZ],zZ=QW.toLowerCase(),v$="x-amz-content-sha256",QZ=JW.toLowerCase(),JZ={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},AZ=/^proxy-/,KZ=/^sec-/,x$="AWS4-HMAC-SHA256",BZ="AWS4-HMAC-SHA256-PAYLOAD",OZ="UNSIGNED-PAYLOAD",qZ=50,BW="aws4_request",TZ=604800,n=UZ(),HZ=H1(),z0={},O1=[],q1=H(($,f,U)=>`${$}/${f}/${U}/${BW}`,"createScope"),OW=H(async($,f,U,w,G)=>{const W=await YW($,f.secretAccessKey,f.accessKeyId),E=`${U}:${w}:${G}:${n.toHex(W)}:${f.sessionToken}`;if(E in z0)return z0[E];O1.push(E);while(O1.length>qZ)delete z0[O1.shift()];let L=`AWS4${f.secretAccessKey}`;for(let X of[U,w,G,BW])L=await YW($,L,X);return z0[E]=L},"getSigningKey"),VZ=H(()=>{O1.length=0,Object.keys(z0).forEach(($)=>{delete z0[$]})},"clearCredentialCache"),YW=H(($,f,U)=>{const w=new $(f);return w.update(HZ.toUint8Array(U)),w.digest()},"hmac"),u$=H(({headers:$},f,U)=>{const w={};for(let G of Object.keys($).sort()){if($[G]==null)continue;const W=G.toLowerCase();if(W in JZ||(f==null?void 0:f.has(W))||AZ.test(W)||KZ.test(W)){if(!U||U&&!U.has(W))continue}w[W]=$[G].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),h0=fZ(),qW=H(({query:$={}})=>{const f=[],U={};for(let w of Object.keys($).sort()){if(w.toLowerCase()===zZ)continue;f.push(w);const G=$[w];if(typeof G==="string")U[w]=`${h0.escapeUri(w)}=${h0.escapeUri(G)}`;else if(Array.isArray(G))U[w]=G.slice(0).reduce((W,E)=>W.concat([`${h0.escapeUri(w)}=${h0.escapeUri(E)}`]),[]).sort().join("&")}return f.map((w)=>U[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),CZ=$Z(),NZ=H1(),T1=H(async({headers:$,body:f},U)=>{for(let w of Object.keys($))if(w.toLowerCase()===v$)return $[w];if(f==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof f==="string"||ArrayBuffer.isView(f)||CZ.isArrayBuffer(f)){const w=new U;return w.update(NZ.toUint8Array(f)),n.toHex(await w.digest())}return OZ},"getPayloadHash"),IW=H1(),TW=class ${format(f){const U=[];for(let W of Object.keys(f)){const E=IW.fromUtf8(W);U.push(Uint8Array.from([E.byteLength]),E,this.formatHeaderValue(f[W]))}const w=new Uint8Array(U.reduce((W,E)=>W+E.byteLength,0));let G=0;for(let W of U)w.set(W,G),G+=W.byteLength;return w}formatHeaderValue(f){switch(f.type){case"boolean":return Uint8Array.from([f.value?0:1]);case"byte":return Uint8Array.from([2,f.value]);case"short":const U=new DataView(new ArrayBuffer(3));return U.setUint8(0,3),U.setInt16(1,f.value,!1),new Uint8Array(U.buffer);case"integer":const w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,f.value,!1),new Uint8Array(w.buffer);case"long":const G=new Uint8Array(9);return G[0]=5,G.set(f.value.bytes,1),G;case"binary":const W=new DataView(new ArrayBuffer(3+f.value.byteLength));W.setUint8(0,6),W.setUint16(1,f.value.byteLength,!1);const E=new Uint8Array(W.buffer);return E.set(f.value,3),E;case"string":const L=IW.fromUtf8(f.value),X=new DataView(new ArrayBuffer(3+L.byteLength));X.setUint8(0,7),X.setUint16(1,L.byteLength,!1);const M=new Uint8Array(X.buffer);return M.set(L,3),M;case"timestamp":const Z=new Uint8Array(9);return Z[0]=8,Z.set(jZ.fromNumber(f.value.valueOf()).bytes,1),Z;case"uuid":if(!SZ.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);const Y=new Uint8Array(17);return Y[0]=9,Y.set(n.fromHex(f.value.replace(/\-/g,"")),1),Y}}};H(TW,"HeaderFormatter");var PZ=TW,SZ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,HW=class ${constructor(f){if(this.bytes=f,f.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(f){if(f>9223372036854776000||f<-9223372036854776000)throw new Error(`${f} is too large (or, if negative, too small) to represent as an Int64`);const U=new Uint8Array(8);for(let w=7,G=Math.abs(Math.round(f));w>-1&&G>0;w--,G/=256)U[w]=G;if(f<0)y$(U);return new $(U)}valueOf(){const f=this.bytes.slice(0),U=f[0]&128;if(U)y$(f);return parseInt(n.toHex(f),16)*(U?-1:1)}toString(){return String(this.valueOf())}};H(HW,"Int64");var jZ=HW;H(y$,"negate");var bZ=H(($,f)=>{$=$.toLowerCase();for(let U of Object.keys(f))if($===U.toLowerCase())return!0;return!1},"hasHeader"),VW=Z0(),CW=H(($,f={})=>{var U;const{headers:w,query:G={}}=VW.HttpRequest.clone($);for(let W of Object.keys(w)){const E=W.toLowerCase();if(E.slice(0,6)==="x-amz-"&&!((U=f.unhoistableHeaders)==null?void 0:U.has(E)))G[W]=w[W],delete w[W]}return{...$,headers:w,query:G}},"moveHeadersToQuery"),p$=H(($)=>{$=VW.HttpRequest.clone($);for(let f of Object.keys($.headers))if(RZ.indexOf(f.toLowerCase())>-1)delete $.headers[f];return $},"prepareRequest"),kZ=H(($)=>hZ($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),hZ=H(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),NW=class ${constructor({applyChecksum:f,credentials:U,region:w,service:G,sha256:W,uriEscapePath:E=!0}){this.headerFormatter=new PZ,this.service=G,this.sha256=W,this.uriEscapePath=E,this.applyChecksum=typeof f==="boolean"?f:!0,this.regionProvider=ZW.normalizeProvider(w),this.credentialProvider=ZW.normalizeProvider(U)}async presign(f,U={}){const{signingDate:w=new Date,expiresIn:G=3600,unsignableHeaders:W,unhoistableHeaders:E,signableHeaders:L,signingRegion:X,signingService:M}=U,Z=await this.credentialProvider();this.validateResolvedCredentials(Z);const Y=X??await this.regionProvider(),{longDate:F,shortDate:R}=B1(w);if(G>TZ)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const Q=q1(R,Y,M??this.service),J=CW(p$(f),{unhoistableHeaders:E});if(Z.sessionToken)J.query[JW]=Z.sessionToken;J.query[MZ]=x$,J.query[ZZ]=`${Z.accessKeyId}/${Q}`,J.query[zW]=F,J.query[IZ]=G.toString(10);const q=u$(J,W,L);return J.query[YZ]=FW(q),J.query[QW]=await this.getSignature(F,Q,this.getSigningKey(Z,Y,R,M),this.createCanonicalRequest(J,q,await T1(f,this.sha256))),J}async sign(f,U){if(typeof f==="string")return this.signString(f,U);else if(f.headers&&f.payload)return this.signEvent(f,U);else if(f.message)return this.signMessage(f,U);else return this.signRequest(f,U)}async signEvent({headers:f,payload:U},{signingDate:w=new Date,priorSignature:G,signingRegion:W,signingService:E}){const L=W??await this.regionProvider(),{shortDate:X,longDate:M}=B1(w),Z=q1(X,L,E??this.service),Y=await T1({headers:{},body:U},this.sha256),F=new this.sha256;F.update(f);const R=n.toHex(await F.digest()),Q=[BZ,M,Z,G,R,Y].join("\n");return this.signString(Q,{signingDate:w,signingRegion:L,signingService:E})}async signMessage(f,{signingDate:U=new Date,signingRegion:w,signingService:G}){return this.signEvent({headers:this.headerFormatter.format(f.message.headers),payload:f.message.body},{signingDate:U,signingRegion:w,signingService:G,priorSignature:f.priorSignature}).then((E)=>{return{message:f.message,signature:E}})}async signString(f,{signingDate:U=new Date,signingRegion:w,signingService:G}={}){const W=await this.credentialProvider();this.validateResolvedCredentials(W);const E=w??await this.regionProvider(),{shortDate:L}=B1(U),X=new this.sha256(await this.getSigningKey(W,E,L,G));return X.update(_$.toUint8Array(f)),n.toHex(await X.digest())}async signRequest(f,{signingDate:U=new Date,signableHeaders:w,unsignableHeaders:G,signingRegion:W,signingService:E}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const X=W??await this.regionProvider(),M=p$(f),{longDate:Z,shortDate:Y}=B1(U),F=q1(Y,X,E??this.service);if(M.headers[KW]=Z,L.sessionToken)M.headers[QZ]=L.sessionToken;const R=await T1(M,this.sha256);if(!bZ(v$,M.headers)&&this.applyChecksum)M.headers[v$]=R;const Q=u$(M,G,w),J=await this.getSignature(Z,F,this.getSigningKey(L,X,Y,E),this.createCanonicalRequest(M,Q,R));return M.headers[AW]=`${x$} Credential=${L.accessKeyId}/${F}, SignedHeaders=${FW(Q)}, Signature=${J}`,M}createCanonicalRequest(f,U,w){const G=Object.keys(U).sort();return`${f.method}
|
|
8
|
+
${this.getCanonicalPath(f)}
|
|
9
|
+
${qW(f)}
|
|
10
|
+
${G.map((W)=>`${W}:${U[W]}`).join("\n")}
|
|
11
|
+
|
|
12
|
+
${G.join(";")}
|
|
13
|
+
${w}`}async createStringToSign(f,U,w){const G=new this.sha256;G.update(_$.toUint8Array(w));const W=await G.digest();return`${x$}
|
|
14
|
+
${f}
|
|
15
|
+
${U}
|
|
16
|
+
${n.toHex(W)}`}getCanonicalPath({path:f}){if(this.uriEscapePath){const U=[];for(let W of f.split("/")){if((W==null?void 0:W.length)===0)continue;if(W===".")continue;if(W==="..")U.pop();else U.push(W)}const w=`${(f==null?void 0:f.startsWith("/"))?"/":""}${U.join("/")}${U.length>0&&(f==null?void 0:f.endsWith("/"))?"/":""}`;return h0.escapeUri(w).replace(/%2F/g,"/")}return f}async getSignature(f,U,w,G){const W=await this.createStringToSign(f,U,G),E=new this.sha256(await w);return E.update(_$.toUint8Array(W)),n.toHex(await E.digest())}getSigningKey(f,U,w,G){return OW(this.sha256,f,w,U,G||this.service)}validateResolvedCredentials(f){if(typeof f!=="object"||typeof f.accessKeyId!=="string"||typeof f.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};H(NW,"SignatureV4");var DZ=NW,B1=H(($)=>{const f=kZ($).replace(/[\-:]/g,"");return{longDate:f,shortDate:f.slice(0,8)}},"formatDate"),FW=H(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var uW=z((XQ,vW)=>{var{defineProperty:C1,getOwnPropertyDescriptor:cZ,getOwnPropertyNames:_Z}=Object,xZ=Object.prototype.hasOwnProperty,N=($,f)=>C1($,"name",{value:f,configurable:!0}),vZ=($,f)=>{for(var U in f)C1($,U,{get:f[U],enumerable:!0})},uZ=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of _Z(f))if(!xZ.call($,G)&&G!==U)C1($,G,{get:()=>f[G],enumerable:!(w=cZ(f,G))||w.enumerable})}return $},yZ=($)=>uZ(C1({},"__esModule",{value:!0}),$),DW={};vZ(DW,{AWSSDKSigV4Signer:()=>sZ,AwsSdkSigV4ASigner:()=>rZ,AwsSdkSigV4Signer:()=>s$,NODE_SIGV4A_CONFIG_OPTIONS:()=>oZ,resolveAWSSDKSigV4Config:()=>iZ,resolveAwsSdkSigV4AConfig:()=>lZ,resolveAwsSdkSigV4Config:()=>xW,validateSigningProperties:()=>g$});vW.exports=yZ(DW);var pZ=Z0(),dZ=Z0(),jW=N(($)=>{var f,U;return dZ.HttpResponse.isInstance($)?((f=$.headers)==null?void 0:f.date)??((U=$.headers)==null?void 0:U.Date):void 0},"getDateHeader"),d$=N(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),gZ=N(($,f)=>Math.abs(d$(f).getTime()-$)>=300000,"isClockSkewed"),bW=N(($,f)=>{const U=Date.parse($);if(gZ(U,f))return U-Date.now();return f},"getUpdatedSystemClockOffset"),D0=N(($,f)=>{if(!f)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return f},"throwSigningPropertyError"),g$=N(async($)=>{var f,U,w;const G=D0("context",$.context),W=D0("config",$.config),E=(w=(U=(f=G.endpointV2)==null?void 0:f.properties)==null?void 0:U.authSchemes)==null?void 0:w[0],X=await D0("signer",W.signer)(E),M=$==null?void 0:$.signingRegion,Z=$==null?void 0:$.signingRegionSet,Y=$==null?void 0:$.signingName;return{config:W,signer:X,signingRegion:M,signingRegionSet:Z,signingName:Y}},"validateSigningProperties"),cW=class ${async sign(f,U,w){var G;if(!pZ.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const W=await g$(w),{config:E,signer:L}=W;let{signingRegion:X,signingName:M}=W;const Z=w.context;if(((G=Z==null?void 0:Z.authSchemes)==null?void 0:G.length)??0>1){const[F,R]=Z.authSchemes;if((F==null?void 0:F.name)==="sigv4a"&&(R==null?void 0:R.name)==="sigv4")X=(R==null?void 0:R.signingRegion)??X,M=(R==null?void 0:R.signingName)??M}return await L.sign(f,{signingDate:d$(E.systemClockOffset),signingRegion:X,signingService:M})}errorHandler(f){return(U)=>{const w=U.ServerTime??jW(U.$response);if(w){const G=D0("config",f.config),W=G.systemClockOffset;if(G.systemClockOffset=bW(w,G.systemClockOffset),G.systemClockOffset!==W&&U.$metadata)U.$metadata.clockSkewCorrected=!0}throw U}}successHandler(f,U){const w=jW(f);if(w){const G=D0("config",U.config);G.systemClockOffset=bW(w,G.systemClockOffset)}}};N(cW,"AwsSdkSigV4Signer");var s$=cW,sZ=s$,nZ=Z0(),_W=class $ extends s${async sign(f,U,w){var G;if(!nZ.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:W,signer:E,signingRegion:L,signingRegionSet:X,signingName:M}=await g$(w),Y=(await((G=W.sigv4aSigningRegionSet)==null?void 0:G.call(W))??X??[L]).join(",");return await E.sign(f,{signingDate:d$(W.systemClockOffset),signingRegion:Y,signingService:M})}};N(_W,"AwsSdkSigV4ASigner");var rZ=_W,mZ=z$(),kW=v1(),lZ=N(($)=>{return $.sigv4aSigningRegionSet=mZ.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),oZ={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((f)=>f.trim());throw new kW.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((f)=>f.trim());throw new kW.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},e=z$(),hW=SW(),xW=N(($)=>{let f;if($.credentials)f=e.memoizeIdentityProvider($.credentials,e.isIdentityExpired,e.doesIdentityRequireRefresh);if(!f)if($.credentialDefaultProvider)f=e.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else f=N(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:U=!0,systemClockOffset:w=$.systemClockOffset||0,sha256:G}=$;let W;if($.signer)W=e.normalizeProvider($.signer);else if($.regionInfoProvider)W=N(()=>e.normalizeProvider($.region)().then(async(E)=>[await $.regionInfoProvider(E,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},E]).then(([E,L])=>{const{signingRegion:X,signingService:M}=E;$.signingRegion=$.signingRegion||X||L,$.signingName=$.signingName||M||$.serviceId;const Z={...$,credentials:f,region:$.signingRegion,service:$.signingName,sha256:G,uriEscapePath:U};return new($.signerConstructor||hW.SignatureV4)(Z)}),"signer");else W=N(async(E)=>{E=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await e.normalizeProvider($.region)(),properties:{}},E);const{signingRegion:L,signingName:X}=E;$.signingRegion=$.signingRegion||L,$.signingName=$.signingName||X||$.serviceId;const M={...$,credentials:f,region:$.signingRegion,service:$.signingName,sha256:G,uriEscapePath:U};return new($.signerConstructor||hW.SignatureV4)(M)},"signer");return{...$,systemClockOffset:w,signingEscapePath:U,credentials:f,signer:W}},"resolveAwsSdkSigV4Config"),iZ=xW});var N1=z((f2)=>{var tZ=":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",yW="[: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]["+tZ+"]*",eZ=new RegExp("^"+yW+"$"),aZ=function($,f){const U=[];let w=f.exec($);while(w){const G=[];G.startIndex=f.lastIndex-w[0].length;const W=w.length;for(let E=0;E<W;E++)G.push(w[E]);U.push(G),w=f.exec($)}return U},$2=function($){const f=eZ.exec($);return!(f===null||typeof f==="undefined")};f2.isExist=function($){return typeof $!=="undefined"};f2.isEmptyObject=function($){return Object.keys($).length===0};f2.merge=function($,f,U){if(f){const w=Object.keys(f),G=w.length;for(let W=0;W<G;W++)if(U==="strict")$[w[W]]=[f[w[W]]];else $[w[W]]=f[w[W]]}};f2.getValue=function($){if(f2.isExist($))return $;else return""};f2.isName=$2;f2.getAllMatches=aZ;f2.nameRegexp=yW});var r$=z((J2)=>{var dW=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},gW=function($,f){const U=f;for(;f<$.length;f++)if($[f]=="?"||$[f]==" "){const w=$.substr(U,f-U);if(f>5&&w==="xml")return O("InvalidXml","XML declaration allowed only at the start of the document.",C($,f));else if($[f]=="?"&&$[f+1]==">"){f++;break}else continue}return f},sW=function($,f){if($.length>f+5&&$[f+1]==="-"&&$[f+2]==="-"){for(f+=3;f<$.length;f++)if($[f]==="-"&&$[f+1]==="-"&&$[f+2]===">"){f+=2;break}}else if($.length>f+8&&$[f+1]==="D"&&$[f+2]==="O"&&$[f+3]==="C"&&$[f+4]==="T"&&$[f+5]==="Y"&&$[f+6]==="P"&&$[f+7]==="E"){let U=1;for(f+=8;f<$.length;f++)if($[f]==="<")U++;else if($[f]===">"){if(U--,U===0)break}}else if($.length>f+9&&$[f+1]==="["&&$[f+2]==="C"&&$[f+3]==="D"&&$[f+4]==="A"&&$[f+5]==="T"&&$[f+6]==="A"&&$[f+7]==="["){for(f+=8;f<$.length;f++)if($[f]==="]"&&$[f+1]==="]"&&$[f+2]===">"){f+=2;break}}return f},Y2=function($,f){let U="",w="",G=!1;for(;f<$.length;f++){if($[f]===M2||$[f]===Z2)if(w==="")w=$[f];else if(w!==$[f]);else w="";else if($[f]===">"){if(w===""){G=!0;break}}U+=$[f]}if(w!=="")return!1;return{value:U,index:f,tagClosed:G}},nW=function($,f){const U=n$.getAllMatches($,I2),w={};for(let G=0;G<U.length;G++){if(U[G][1].length===0)return O("InvalidAttr","Attribute '"+U[G][2]+"' has no space in starting.",c0(U[G]));else if(U[G][3]!==void 0&&U[G][4]===void 0)return O("InvalidAttr","Attribute '"+U[G][2]+"' is without value.",c0(U[G]));else if(U[G][3]===void 0&&!f.allowBooleanAttributes)return O("InvalidAttr","boolean attribute '"+U[G][2]+"' is not allowed.",c0(U[G]));const W=U[G][2];if(!z2(W))return O("InvalidAttr","Attribute '"+W+"' is an invalid name.",c0(U[G]));if(!w.hasOwnProperty(W))w[W]=1;else return O("InvalidAttr","Attribute '"+W+"' is repeated.",c0(U[G]))}return!0},F2=function($,f){let U=/\d/;if($[f]==="x")f++,U=/[\da-fA-F]/;for(;f<$.length;f++){if($[f]===";")return f;if(!$[f].match(U))break}return-1},R2=function($,f){if(f++,$[f]===";")return-1;if($[f]==="#")return f++,F2($,f);let U=0;for(;f<$.length;f++,U++){if($[f].match(/\w/)&&U<20)continue;if($[f]===";")break;return-1}return f},O=function($,f,U){return{err:{code:$,msg:f,line:U.line||U,col:U.col}}},z2=function($){return n$.isName($)},Q2=function($){return n$.isName($)},C=function($,f){const U=$.substring(0,f).split(/\r?\n/);return{line:U.length,col:U[U.length-1].length+1}},c0=function($){return $.startIndex+$[1].length},n$=N1(),X2={allowBooleanAttributes:!1,unpairedTags:[]};J2.validate=function($,f){f=Object.assign({},X2,f);const U=[];let w=!1,G=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let W=0;W<$.length;W++)if($[W]==="<"&&$[W+1]==="?"){if(W+=2,W=gW($,W),W.err)return W}else if($[W]==="<"){let E=W;if(W++,$[W]==="!"){W=sW($,W);continue}else{let L=!1;if($[W]==="/")L=!0,W++;let X="";for(;W<$.length&&$[W]!==">"&&$[W]!==" "&&$[W]!=="\t"&&$[W]!=="\n"&&$[W]!=="\r";W++)X+=$[W];if(X=X.trim(),X[X.length-1]==="/")X=X.substring(0,X.length-1),W--;if(!Q2(X)){let Y;if(X.trim().length===0)Y="Invalid space after '<'.";else Y="Tag '"+X+"' is an invalid name.";return O("InvalidTag",Y,C($,W))}const M=Y2($,W);if(M===!1)return O("InvalidAttr","Attributes for '"+X+"' have open quote.",C($,W));let Z=M.value;if(W=M.index,Z[Z.length-1]==="/"){const Y=W-Z.length;Z=Z.substring(0,Z.length-1);const F=nW(Z,f);if(F===!0)w=!0;else return O(F.err.code,F.err.msg,C($,Y+F.err.line))}else if(L)if(!M.tagClosed)return O("InvalidTag","Closing tag '"+X+"' doesn't have proper closing.",C($,W));else if(Z.trim().length>0)return O("InvalidTag","Closing tag '"+X+"' can't have attributes or invalid starting.",C($,E));else if(U.length===0)return O("InvalidTag","Closing tag '"+X+"' has not been opened.",C($,E));else{const Y=U.pop();if(X!==Y.tagName){let F=C($,Y.tagStartPos);return O("InvalidTag","Expected closing tag '"+Y.tagName+"' (opened in line "+F.line+", col "+F.col+") instead of closing tag '"+X+"'.",C($,E))}if(U.length==0)G=!0}else{const Y=nW(Z,f);if(Y!==!0)return O(Y.err.code,Y.err.msg,C($,W-Z.length+Y.err.line));if(G===!0)return O("InvalidXml","Multiple possible root nodes found.",C($,W));else if(f.unpairedTags.indexOf(X)!==-1);else U.push({tagName:X,tagStartPos:E});w=!0}for(W++;W<$.length;W++)if($[W]==="<")if($[W+1]==="!"){W++,W=sW($,W);continue}else if($[W+1]==="?"){if(W=gW($,++W),W.err)return W}else break;else if($[W]==="&"){const Y=R2($,W);if(Y==-1)return O("InvalidChar","char '&' is not expected.",C($,W));W=Y}else if(G===!0&&!dW($[W]))return O("InvalidXml","Extra text at the end",C($,W));if($[W]==="<")W--}}else{if(dW($[W]))continue;return O("InvalidChar","char '"+$[W]+"' is not expected.",C($,W))}if(!w)return O("InvalidXml","Start tag expected.",1);else if(U.length==1)return O("InvalidTag","Unclosed tag '"+U[0].tagName+"'.",C($,U[0].tagStartPos));else if(U.length>0)return O("InvalidXml","Invalid '"+JSON.stringify(U.map((W)=>W.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var M2='"',Z2="'",I2=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var mW=z((B2)=>{var rW={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($,f){return f},attributeValueProcessor:function($,f){return f},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function($,f,U){return $}},K2=function($){return Object.assign({},rW,$)};B2.buildOptions=K2;B2.defaultOptions=rW});var iW=z((IQ,oW)=>{class lW{constructor($){this.tagname=$,this.child=[],this[":@"]={}}add($,f){if($==="__proto__")$="#__proto__";this.child.push({[$]:f})}addChild($){if($.tagname==="__proto__")$.tagname="#__proto__";if($[":@"]&&Object.keys($[":@"]).length>0)this.child.push({[$.tagname]:$.child,[":@"]:$[":@"]});else this.child.push({[$.tagname]:$.child})}}oW.exports=lW});var eW=z((FQ,tW)=>{var H2=function($,f){const U={};if($[f+3]==="O"&&$[f+4]==="C"&&$[f+5]==="T"&&$[f+6]==="Y"&&$[f+7]==="P"&&$[f+8]==="E"){f=f+9;let w=1,G=!1,W=!1,E="";for(;f<$.length;f++)if($[f]==="<"&&!W){if(G&&N2($,f)){if(f+=7,[entityName,val,f]=V2($,f+1),val.indexOf("&")===-1)U[b2(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(G&&P2($,f))f+=8;else if(G&&S2($,f))f+=8;else if(G&&j2($,f))f+=9;else if(C2)W=!0;else throw new Error("Invalid DOCTYPE");w++,E=""}else if($[f]===">"){if(W){if($[f-1]==="-"&&$[f-2]==="-")W=!1,w--}else w--;if(w===0)break}else if($[f]==="[")G=!0;else E+=$[f];if(w!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:U,i:f}},V2=function($,f){let U="";for(;f<$.length&&($[f]!=="'"&&$[f]!=='"');f++)U+=$[f];if(U=U.trim(),U.indexOf(" ")!==-1)throw new Error("External entites are not supported");const w=$[f++];let G="";for(;f<$.length&&$[f]!==w;f++)G+=$[f];return[U,G,f]},C2=function($,f){if($[f+1]==="!"&&$[f+2]==="-"&&$[f+3]==="-")return!0;return!1},N2=function($,f){if($[f+1]==="!"&&$[f+2]==="E"&&$[f+3]==="N"&&$[f+4]==="T"&&$[f+5]==="I"&&$[f+6]==="T"&&$[f+7]==="Y")return!0;return!1},P2=function($,f){if($[f+1]==="!"&&$[f+2]==="E"&&$[f+3]==="L"&&$[f+4]==="E"&&$[f+5]==="M"&&$[f+6]==="E"&&$[f+7]==="N"&&$[f+8]==="T")return!0;return!1},S2=function($,f){if($[f+1]==="!"&&$[f+2]==="A"&&$[f+3]==="T"&&$[f+4]==="T"&&$[f+5]==="L"&&$[f+6]==="I"&&$[f+7]==="S"&&$[f+8]==="T")return!0;return!1},j2=function($,f){if($[f+1]==="!"&&$[f+2]==="N"&&$[f+3]==="O"&&$[f+4]==="T"&&$[f+5]==="A"&&$[f+6]==="T"&&$[f+7]==="I"&&$[f+8]==="O"&&$[f+9]==="N")return!0;return!1},b2=function($){if(T2.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},T2=N1();tW.exports=H2});var $8=z((RQ,aW)=>{var c2=function($,f={}){if(f=Object.assign({},D2,f),!$||typeof $!=="string")return $;let U=$.trim();if(f.skipLike!==void 0&&f.skipLike.test(U))return $;else if(f.hex&&k2.test(U))return Number.parseInt(U,16);else{const w=h2.exec(U);if(w){const G=w[1],W=w[2];let E=_2(w[3]);const L=w[4]||w[6];if(!f.leadingZeros&&W.length>0&&G&&U[2]!==".")return $;else if(!f.leadingZeros&&W.length>0&&!G&&U[1]!==".")return $;else{const X=Number(U),M=""+X;if(M.search(/[eE]/)!==-1)if(f.eNotation)return X;else return $;else if(L)if(f.eNotation)return X;else return $;else if(U.indexOf(".")!==-1)if(M==="0"&&E==="")return X;else if(M===E)return X;else if(G&&M==="-"+E)return X;else return $;if(W)if(E===M)return X;else if(G+E===M)return X;else return $;if(U===M)return X;else if(U===G+M)return X;return $}}else return $}},_2=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},k2=/^[-+]?0x[a-fA-F0-9]+$/,h2=/^([\-\+])?(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 D2={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};aW.exports=c2});var G8=z((zQ,w8)=>{var u2=function($){const f=Object.keys($);for(let U=0;U<f.length;U++){const w=f[U];this.lastEntities[w]={regex:new RegExp("&"+w+";","g"),val:$[w]}}},y2=function($,f,U,w,G,W,E){if($!==void 0){if(this.options.trimValues&&!w)$=$.trim();if($.length>0){if(!E)$=this.replaceEntitiesValue($);const L=this.options.tagValueProcessor(f,$,U,G,W);if(L===null||L===void 0)return $;else if(typeof L!==typeof $||L!==$)return L;else if(this.options.trimValues)return l$($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return l$($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},p2=function($){if(this.options.removeNSPrefix){const f=$.split(":"),U=$.charAt(0)==="/"?"/":"";if(f[0]==="xmlns")return"";if(f.length===2)$=U+f[1]}return $},g2=function($,f,U){if(!this.options.ignoreAttributes&&typeof $==="string"){const w=f8.getAllMatches($,d2),G=w.length,W={};for(let E=0;E<G;E++){const L=this.resolveNameSpace(w[E][1]);let X=w[E][4],M=this.options.attributeNamePrefix+L;if(L.length){if(this.options.transformAttributeName)M=this.options.transformAttributeName(M);if(M==="__proto__")M="#__proto__";if(X!==void 0){if(this.options.trimValues)X=X.trim();X=this.replaceEntitiesValue(X);const Z=this.options.attributeValueProcessor(L,X,f);if(Z===null||Z===void 0)W[M]=X;else if(typeof Z!==typeof X||Z!==X)W[M]=Z;else W[M]=l$(X,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)W[M]=!0}}if(!Object.keys(W).length)return;if(this.options.attributesGroupName){const E={};return E[this.options.attributesGroupName]=W,E}return W}},n2=function($,f,U){const w=this.options.updateTag(f.tagname,U,f[":@"]);if(w===!1);else if(typeof w==="string")f.tagname=w,$.addChild(f);else $.addChild(f)},m2=function($,f,U,w){if($){if(w===void 0)w=Object.keys(f.child).length===0;if($=this.parseTextData($,f.tagname,U,!1,f[":@"]?Object.keys(f[":@"]).length!==0:!1,w),$!==void 0&&$!=="")f.add(this.options.textNodeName,$);$=""}return $},l2=function($,f,U){const w="*."+U;for(let G in $){const W=$[G];if(w===W||f===W)return!0}return!1},o2=function($,f,U=">"){let w,G="";for(let W=f;W<$.length;W++){let E=$[W];if(w){if(E===w)w=""}else if(E==='"'||E==="'")w=E;else if(E===U[0])if(U[1]){if($[W+1]===U[1])return{data:G,index:W}}else return{data:G,index:W};else if(E==="\t")E=" ";G+=E}},a=function($,f,U,w){const G=$.indexOf(f,U);if(G===-1)throw new Error(w);else return G+f.length-1},m$=function($,f,U,w=">"){const G=o2($,f+1,w);if(!G)return;let W=G.data;const E=G.index,L=W.search(/\s/);let X=W,M=!0;if(L!==-1)X=W.substring(0,L),W=W.substring(L+1).trimStart();const Z=X;if(U){const Y=X.indexOf(":");if(Y!==-1)X=X.substr(Y+1),M=X!==G.data.substr(Y+1)}return{tagName:X,tagExp:W,closeIndex:E,attrExpPresent:M,rawTagName:Z}},i2=function($,f,U){const w=U;let G=1;for(;U<$.length;U++)if($[U]==="<")if($[U+1]==="/"){const W=a($,">",U,`${f} is not closed`);if($.substring(U+2,W).trim()===f){if(G--,G===0)return{tagContent:$.substring(w,U),i:W}}U=W}else if($[U+1]==="?")U=a($,"?>",U+1,"StopNode is not closed.");else if($.substr(U+1,3)==="!--")U=a($,"-->",U+3,"StopNode is not closed.");else if($.substr(U+1,2)==="![")U=a($,"]]>",U,"StopNode is not closed.")-2;else{const W=m$($,U,">");if(W){if((W&&W.tagName)===f&&W.tagExp[W.tagExp.length-1]!=="/")G++;U=W.closeIndex}}},l$=function($,f,U){if(f&&typeof $==="string"){const w=$.trim();if(w==="true")return!0;else if(w==="false")return!1;else return v2($,U)}else if(f8.isExist($))return $;else return""},f8=N1(),_0=iW(),x2=eW(),v2=$8();class U8{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:(f,U)=>String.fromCharCode(Number.parseInt(U,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(f,U)=>String.fromCharCode(Number.parseInt(U,16))}},this.addExternalEntities=u2,this.parseXml=s2,this.parseTextData=y2,this.resolveNameSpace=p2,this.buildAttributesMap=g2,this.isItStopNode=l2,this.replaceEntitiesValue=r2,this.readStopNodeData=i2,this.saveTextToParentTag=m2,this.addChild=n2}}var d2=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),s2=function($){$=$.replace(/\r\n?/g,"\n");const f=new _0("!xml");let U=f,w="",G="";for(let W=0;W<$.length;W++)if($[W]==="<")if($[W+1]==="/"){const L=a($,">",W,"Closing Tag is not closed.");let X=$.substring(W+2,L).trim();if(this.options.removeNSPrefix){const Y=X.indexOf(":");if(Y!==-1)X=X.substr(Y+1)}if(this.options.transformTagName)X=this.options.transformTagName(X);if(U)w=this.saveTextToParentTag(w,U,G);const M=G.substring(G.lastIndexOf(".")+1);if(X&&this.options.unpairedTags.indexOf(X)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${X}>`);let Z=0;if(M&&this.options.unpairedTags.indexOf(M)!==-1)Z=G.lastIndexOf(".",G.lastIndexOf(".")-1),this.tagsNodeStack.pop();else Z=G.lastIndexOf(".");G=G.substring(0,Z),U=this.tagsNodeStack.pop(),w="",W=L}else if($[W+1]==="?"){let L=m$($,W,!1,"?>");if(!L)throw new Error("Pi Tag is not closed.");if(w=this.saveTextToParentTag(w,U,G),this.options.ignoreDeclaration&&L.tagName==="?xml"||this.options.ignorePiTags);else{const X=new _0(L.tagName);if(X.add(this.options.textNodeName,""),L.tagName!==L.tagExp&&L.attrExpPresent)X[":@"]=this.buildAttributesMap(L.tagExp,G,L.tagName);this.addChild(U,X,G)}W=L.closeIndex+1}else if($.substr(W+1,3)==="!--"){const L=a($,"-->",W+4,"Comment is not closed.");if(this.options.commentPropName){const X=$.substring(W+4,L-2);w=this.saveTextToParentTag(w,U,G),U.add(this.options.commentPropName,[{[this.options.textNodeName]:X}])}W=L}else if($.substr(W+1,2)==="!D"){const L=x2($,W);this.docTypeEntities=L.entities,W=L.i}else if($.substr(W+1,2)==="!["){const L=a($,"]]>",W,"CDATA is not closed.")-2,X=$.substring(W+9,L);w=this.saveTextToParentTag(w,U,G);let M=this.parseTextData(X,U.tagname,G,!0,!1,!0,!0);if(M==null)M="";if(this.options.cdataPropName)U.add(this.options.cdataPropName,[{[this.options.textNodeName]:X}]);else U.add(this.options.textNodeName,M);W=L+2}else{let L=m$($,W,this.options.removeNSPrefix),X=L.tagName;const M=L.rawTagName;let{tagExp:Z,attrExpPresent:Y,closeIndex:F}=L;if(this.options.transformTagName)X=this.options.transformTagName(X);if(U&&w){if(U.tagname!=="!xml")w=this.saveTextToParentTag(w,U,G,!1)}const R=U;if(R&&this.options.unpairedTags.indexOf(R.tagname)!==-1)U=this.tagsNodeStack.pop(),G=G.substring(0,G.lastIndexOf("."));if(X!==f.tagname)G+=G?"."+X:X;if(this.isItStopNode(this.options.stopNodes,G,X)){let Q="";if(Z.length>0&&Z.lastIndexOf("/")===Z.length-1){if(X[X.length-1]==="/")X=X.substr(0,X.length-1),G=G.substr(0,G.length-1),Z=X;else Z=Z.substr(0,Z.length-1);W=L.closeIndex}else if(this.options.unpairedTags.indexOf(X)!==-1)W=L.closeIndex;else{const q=this.readStopNodeData($,M,F+1);if(!q)throw new Error(`Unexpected end of ${M}`);W=q.i,Q=q.tagContent}const J=new _0(X);if(X!==Z&&Y)J[":@"]=this.buildAttributesMap(Z,G,X);if(Q)Q=this.parseTextData(Q,X,G,!0,Y,!0,!0);G=G.substr(0,G.lastIndexOf(".")),J.add(this.options.textNodeName,Q),this.addChild(U,J,G)}else{if(Z.length>0&&Z.lastIndexOf("/")===Z.length-1){if(X[X.length-1]==="/")X=X.substr(0,X.length-1),G=G.substr(0,G.length-1),Z=X;else Z=Z.substr(0,Z.length-1);if(this.options.transformTagName)X=this.options.transformTagName(X);const Q=new _0(X);if(X!==Z&&Y)Q[":@"]=this.buildAttributesMap(Z,G,X);this.addChild(U,Q,G),G=G.substr(0,G.lastIndexOf("."))}else{const Q=new _0(X);if(this.tagsNodeStack.push(U),X!==Z&&Y)Q[":@"]=this.buildAttributesMap(Z,G,X);this.addChild(U,Q,G),U=Q}w="",W=F}}else w+=$[W];return f.child},r2=function($){if(this.options.processEntities){for(let f in this.docTypeEntities){const U=this.docTypeEntities[f];$=$.replace(U.regx,U.val)}for(let f in this.lastEntities){const U=this.lastEntities[f];$=$.replace(U.regex,U.val)}if(this.options.htmlEntities)for(let f in this.htmlEntities){const U=this.htmlEntities[f];$=$.replace(U.regex,U.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};w8.exports=U8});var E8=z((f9)=>{var t2=function($,f){return W8($,f)},W8=function($,f,U){let w;const G={};for(let W=0;W<$.length;W++){const E=$[W],L=e2(E);let X="";if(U===void 0)X=L;else X=U+"."+L;if(L===f.textNodeName)if(w===void 0)w=E[L];else w+=""+E[L];else if(L===void 0)continue;else if(E[L]){let M=W8(E[L],f,X);const Z=$9(M,f);if(E[":@"])a2(M,E[":@"],X,f);else if(Object.keys(M).length===1&&M[f.textNodeName]!==void 0&&!f.alwaysCreateTextNode)M=M[f.textNodeName];else if(Object.keys(M).length===0)if(f.alwaysCreateTextNode)M[f.textNodeName]="";else M="";if(G[L]!==void 0&&G.hasOwnProperty(L)){if(!Array.isArray(G[L]))G[L]=[G[L]];G[L].push(M)}else if(f.isArray(L,X,Z))G[L]=[M];else G[L]=M}}if(typeof w==="string"){if(w.length>0)G[f.textNodeName]=w}else if(w!==void 0)G[f.textNodeName]=w;return G},e2=function($){const f=Object.keys($);for(let U=0;U<f.length;U++){const w=f[U];if(w!==":@")return w}},a2=function($,f,U,w){if(f){const G=Object.keys(f),W=G.length;for(let E=0;E<W;E++){const L=G[E];if(w.isArray(L,U+"."+L,!0,!0))$[L]=[f[L]];else $[L]=f[L]}}},$9=function($,f){const{textNodeName:U}=f,w=Object.keys($).length;if(w===0)return!0;if(w===1&&($[U]||typeof $[U]==="boolean"||$[U]===0))return!0;return!1};f9.prettify=t2});var M8=z((JQ,X8)=>{var{buildOptions:w9}=mW(),G9=G8(),{prettify:W9}=E8(),E9=r$();class L8{constructor($){this.externalEntities={},this.options=w9($)}parse($,f){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(f){if(f===!0)f={};const G=E9.validate($,f);if(G!==!0)throw Error(`${G.err.msg}:${G.err.line}:${G.err.col}`)}const U=new G9(this.options);U.addExternalEntities(this.externalEntities);const w=U.parseXml($);if(this.options.preserveOrder||w===void 0)return w;else return W9(w,this.options)}addEntity($,f){if(f.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(f==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=f}}X8.exports=L8});var R8=z((AQ,F8)=>{var L9=function($,f){let U="";if(f.format&&f.indentBy.length>0)U="\n";return Y8($,f,"",U)},Y8=function($,f,U,w){let G="",W=!1;for(let E=0;E<$.length;E++){const L=$[E],X=X9(L);if(X===void 0)continue;let M="";if(U.length===0)M=X;else M=`${U}.${X}`;if(X===f.textNodeName){let Q=L[X];if(!M9(M,f))Q=f.tagValueProcessor(X,Q),Q=I8(Q,f);if(W)G+=w;G+=Q,W=!1;continue}else if(X===f.cdataPropName){if(W)G+=w;G+=`<![CDATA[${L[X][0][f.textNodeName]}]]>`,W=!1;continue}else if(X===f.commentPropName){G+=w+`<!--${L[X][0][f.textNodeName]}-->`,W=!0;continue}else if(X[0]==="?"){const Q=Z8(L[":@"],f),J=X==="?xml"?"":w;let q=L[X][0][f.textNodeName];q=q.length!==0?" "+q:"",G+=J+`<${X}${q}${Q}?>`,W=!0;continue}let Z=w;if(Z!=="")Z+=f.indentBy;const Y=Z8(L[":@"],f),F=w+`<${X}${Y}`,R=Y8(L[X],f,M,Z);if(f.unpairedTags.indexOf(X)!==-1)if(f.suppressUnpairedNode)G+=F+">";else G+=F+"/>";else if((!R||R.length===0)&&f.suppressEmptyNode)G+=F+"/>";else if(R&&R.endsWith(">"))G+=F+`>${R}${w}</${X}>`;else{if(G+=F+">",R&&w!==""&&(R.includes("/>")||R.includes("</")))G+=w+f.indentBy+R+w;else G+=R;G+=`</${X}>`}W=!0}return G},X9=function($){const f=Object.keys($);for(let U=0;U<f.length;U++){const w=f[U];if(!$.hasOwnProperty(w))continue;if(w!==":@")return w}},Z8=function($,f){let U="";if($&&!f.ignoreAttributes)for(let w in $){if(!$.hasOwnProperty(w))continue;let G=f.attributeValueProcessor(w,$[w]);if(G=I8(G,f),G===!0&&f.suppressBooleanAttributes)U+=` ${w.substr(f.attributeNamePrefix.length)}`;else U+=` ${w.substr(f.attributeNamePrefix.length)}="${G}"`}return U},M9=function($,f){$=$.substr(0,$.length-f.textNodeName.length-1);let U=$.substr($.lastIndexOf(".")+1);for(let w in f.stopNodes)if(f.stopNodes[w]===$||f.stopNodes[w]==="*."+U)return!0;return!1},I8=function($,f){if($&&$.length>0&&f.processEntities)for(let U=0;U<f.entities.length;U++){const w=f.entities[U];$=$.replace(w.regex,w.val)}return $};F8.exports=L9});var Q8=z((KQ,z8)=>{var r=function($){if(this.options=Object.assign({},Y9,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=R9;if(this.processTextOrObjNode=I9,this.options.format)this.indentate=F9,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},I9=function($,f,U){const w=this.j2x($,U+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],f,w.attrStr,U);else return this.buildObjectNode(w.val,f,w.attrStr,U)},F9=function($){return this.options.indentBy.repeat($)},R9=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},Z9=R8(),Y9={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function($,f){return f},attributeValueProcessor:function($,f){return f},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};r.prototype.build=function($){if(this.options.preserveOrder)return Z9($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};r.prototype.j2x=function($,f){let U="",w="";for(let G in $){if(!Object.prototype.hasOwnProperty.call($,G))continue;if(typeof $[G]==="undefined"){if(this.isAttribute(G))w+=""}else if($[G]===null)if(this.isAttribute(G))w+="";else if(G[0]==="?")w+=this.indentate(f)+"<"+G+"?"+this.tagEndChar;else w+=this.indentate(f)+"<"+G+"/"+this.tagEndChar;else if($[G]instanceof Date)w+=this.buildTextValNode($[G],G,"",f);else if(typeof $[G]!=="object"){const W=this.isAttribute(G);if(W)U+=this.buildAttrPairStr(W,""+$[G]);else if(G===this.options.textNodeName){let E=this.options.tagValueProcessor(G,""+$[G]);w+=this.replaceEntitiesValue(E)}else w+=this.buildTextValNode($[G],G,"",f)}else if(Array.isArray($[G])){const W=$[G].length;let E="",L="";for(let X=0;X<W;X++){const M=$[G][X];if(typeof M==="undefined");else if(M===null)if(G[0]==="?")w+=this.indentate(f)+"<"+G+"?"+this.tagEndChar;else w+=this.indentate(f)+"<"+G+"/"+this.tagEndChar;else if(typeof M==="object")if(this.options.oneListGroup){const Z=this.j2x(M,f+1);if(E+=Z.val,this.options.attributesGroupName&&M.hasOwnProperty(this.options.attributesGroupName))L+=Z.attrStr}else E+=this.processTextOrObjNode(M,G,f);else if(this.options.oneListGroup){let Z=this.options.tagValueProcessor(G,M);Z=this.replaceEntitiesValue(Z),E+=Z}else E+=this.buildTextValNode(M,G,"",f)}if(this.options.oneListGroup)E=this.buildObjectNode(E,G,L,f);w+=E}else if(this.options.attributesGroupName&&G===this.options.attributesGroupName){const W=Object.keys($[G]),E=W.length;for(let L=0;L<E;L++)U+=this.buildAttrPairStr(W[L],""+$[G][W[L]])}else w+=this.processTextOrObjNode($[G],G,f)}return{attrStr:U,val:w}};r.prototype.buildAttrPairStr=function($,f){if(f=this.options.attributeValueProcessor($,""+f),f=this.replaceEntitiesValue(f),this.options.suppressBooleanAttributes&&f==="true")return" "+$;else return" "+$+'="'+f+'"'};r.prototype.buildObjectNode=function($,f,U,w){if($==="")if(f[0]==="?")return this.indentate(w)+"<"+f+U+"?"+this.tagEndChar;else return this.indentate(w)+"<"+f+U+this.closeTag(f)+this.tagEndChar;else{let G="</"+f+this.tagEndChar,W="";if(f[0]==="?")W="?",G="";if((U||U==="")&&$.indexOf("<")===-1)return this.indentate(w)+"<"+f+U+W+">"+$+G;else if(this.options.commentPropName!==!1&&f===this.options.commentPropName&&W.length===0)return this.indentate(w)+`<!--${$}-->`+this.newLine;else return this.indentate(w)+"<"+f+U+W+this.tagEndChar+$+this.indentate(w)+G}};r.prototype.closeTag=function($){let f="";if(this.options.unpairedTags.indexOf($)!==-1){if(!this.options.suppressUnpairedNode)f="/"}else if(this.options.suppressEmptyNode)f="/";else f=`></${$}`;return f};r.prototype.buildTextValNode=function($,f,U,w){if(this.options.cdataPropName!==!1&&f===this.options.cdataPropName)return this.indentate(w)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&f===this.options.commentPropName)return this.indentate(w)+`<!--${$}-->`+this.newLine;else if(f[0]==="?")return this.indentate(w)+"<"+f+U+"?"+this.tagEndChar;else{let G=this.options.tagValueProcessor(f,$);if(G=this.replaceEntitiesValue(G),G==="")return this.indentate(w)+"<"+f+U+this.closeTag(f)+this.tagEndChar;else return this.indentate(w)+"<"+f+U+">"+G+"</"+f+this.tagEndChar}};r.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let f=0;f<this.options.entities.length;f++){const U=this.options.entities[f];$=$.replace(U.regex,U.val)}return $};z8.exports=r});var A8=z((BQ,J8)=>{var z9=r$(),Q9=M8(),J9=Q8();J8.exports={XMLParser:Q9,XMLValidator:z9,XMLBuilder:J9}});var H8=z((OQ,T8)=>{var{defineProperty:P1,getOwnPropertyDescriptor:A9,getOwnPropertyNames:K9}=Object,B9=Object.prototype.hasOwnProperty,P=($,f)=>P1($,"name",{value:f,configurable:!0}),O9=($,f)=>{for(var U in f)P1($,U,{get:f[U],enumerable:!0})},q9=($,f,U,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let G of K9(f))if(!B9.call($,G)&&G!==U)P1($,G,{get:()=>f[G],enumerable:!(w=A9(f,G))||w.enumerable})}return $},T9=($)=>q9(P1({},"__esModule",{value:!0}),$),K8={};O9(K8,{_toBool:()=>V9,_toNum:()=>C9,_toStr:()=>H9,awsExpectUnion:()=>P9,loadRestJsonErrorCode:()=>b9,loadRestXmlErrorCode:()=>c9,parseJsonBody:()=>O8,parseJsonErrorBody:()=>j9,parseXmlBody:()=>q8,parseXmlErrorBody:()=>D9});T8.exports=T9(K8);var H9=P(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){const f=new Error(`Received number ${$} where a string was expected.`);return f.name="Warning",console.warn(f),String($)}if(typeof $==="boolean"){const f=new Error(`Received boolean ${$} where a string was expected.`);return f.name="Warning",console.warn(f),String($)}return $},"_toStr"),V9=P(($)=>{if($==null)return $;if(typeof $==="string"){const f=$.toLowerCase();if($!==""&&f!=="false"&&f!=="true"){const U=new Error(`Received string "${$}" where a boolean was expected.`);U.name="Warning",console.warn(U)}return $!==""&&f!=="false"}return $},"_toBool"),C9=P(($)=>{if($==null)return $;if(typeof $==="string"){const f=Number($);if(f.toString()!==$){const U=new Error(`Received string "${$}" where a number was expected.`);return U.name="Warning",console.warn(U),$}return f}return $},"_toNum"),N9=X0(),P9=P(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return N9.expectUnion($)},"awsExpectUnion"),S9=X0(),B8=P(($,f)=>S9.collectBody($,f).then((U)=>f.utf8Encoder(U)),"collectBodyString"),O8=P(($,f)=>B8($,f).then((U)=>{if(U.length)try{return JSON.parse(U)}catch(w){if((w==null?void 0:w.name)==="SyntaxError")Object.defineProperty(w,"$responseBodyText",{value:U});throw w}return{}}),"parseJsonBody"),j9=P(async($,f)=>{const U=await O8($,f);return U.message=U.message??U.Message,U},"parseJsonErrorBody"),b9=P(($,f)=>{const U=P((W,E)=>Object.keys(W).find((L)=>L.toLowerCase()===E.toLowerCase()),"findKey"),w=P((W)=>{let E=W;if(typeof E==="number")E=E.toString();if(E.indexOf(",")>=0)E=E.split(",")[0];if(E.indexOf(":")>=0)E=E.split(":")[0];if(E.indexOf("#")>=0)E=E.split("#")[1];return E},"sanitizeErrorCode"),G=U($.headers,"x-amzn-errortype");if(G!==void 0)return w($.headers[G]);if(f.code!==void 0)return w(f.code);if(f.__type!==void 0)return w(f.__type)},"loadRestJsonErrorCode"),k9=X0(),h9=A8(),q8=P(($,f)=>B8($,f).then((U)=>{if(U.length){const w=new h9.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(X,M)=>M.trim()===""&&M.includes("\n")?"":void 0});w.addEntity("#xD","\r"),w.addEntity("#10","\n");let G;try{G=w.parse(U,!0)}catch(X){if(X&&typeof X==="object")Object.defineProperty(X,"$responseBodyText",{value:U});throw X}const W="#text",E=Object.keys(G)[0],L=G[E];if(L[W])L[E]=L[W],delete L[W];return k9.getValueFromTextNode(L)}return{}}),"parseXmlBody"),D9=P(async($,f)=>{const U=await q8($,f);if(U.Error)U.Error.message=U.Error.message??U.Error.Message;return U},"parseXmlErrorBody"),c9=P(($,f)=>{var U;if(((U=f==null?void 0:f.Error)==null?void 0:U.Code)!==void 0)return f.Error.Code;if((f==null?void 0:f.Code)!==void 0)return f.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var x9=z((x0)=>{Object.defineProperty(x0,"__esModule",{value:!0});var o$=_9();o$.__exportStar(MW(),x0);o$.__exportStar(uW(),x0);o$.__exportStar(H8(),x0)});function $5($){return $}var v8=($)=>(f)=>async(U)=>{if(!S.isInstance(U.request))return f(U);const{request:w}=U,{handlerProtocol:G=""}=$.requestHandler.metadata||{};if(G.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 W=w.hostname;if(w.port!=null)W+=`:${w.port}`;w.headers.host=W}return f(U)},u8={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},f5=($)=>({applyToStack:(f)=>{f.add(v8($),u8)}});var y8=()=>($,f)=>async(U)=>{try{const w=await $(U),{clientName:G,commandName:W,logger:E,dynamoDbDocumentClientOptions:L={}}=f,{overrideInputFilterSensitiveLog:X,overrideOutputFilterSensitiveLog:M}=L,Z=X??f.inputFilterSensitiveLog,Y=M??f.outputFilterSensitiveLog,{$metadata:F,...R}=w.output;return E?.info?.({clientName:G,commandName:W,input:Z(U.input),output:Y(R),metadata:F}),w}catch(w){const{clientName:G,commandName:W,logger:E,dynamoDbDocumentClientOptions:L={}}=f,{overrideInputFilterSensitiveLog:X}=L,M=X??f.inputFilterSensitiveLog;throw E?.error?.({clientName:G,commandName:W,input:M(U.input),error:w,metadata:w.$metadata}),w}},p8={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},w5=($)=>({applyToStack:(f)=>{f.add(y8(),p8)}});var ff="X-Amzn-Trace-Id",d8="AWS_LAMBDA_FUNCTION_NAME",g8="_X_AMZN_TRACE_ID",s8=($)=>(f)=>async(U)=>{const{request:w}=U;if(!S.isInstance(w)||$.runtime!=="node"||w.headers.hasOwnProperty(ff))return f(U);const G=process.env[d8],W=process.env[g8],E=(L)=>typeof L==="string"&&L.length>0;if(E(G)&&E(W))w.headers[ff]=W;return f({...U,request:w})},n8={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},X5=($)=>({applyToStack:(f)=>{f.add(s8($),n8)}});function s5($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}var FM=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}$"),S0=($)=>FM.test($)||$.startsWith("[")&&$.endsWith("]");var RM=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),j0=($,f=!1)=>{if(!f)return RM.test($);const U=$.split(".");for(let w of U)if(!j0(w))return!1;return!0};var b0={};var u="endpoints";function b($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${b($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(b).join(", ")})`;return JSON.stringify($,null,2)}class A extends Error{constructor($){super($);this.name="EndpointError"}}var JG=($,f)=>$===f;var AG=($)=>{const f=$.split("."),U=[];for(let w of f){const G=w.indexOf("[");if(G!==-1){if(w.indexOf("]")!==w.length-1)throw new A(`Path: '${$}' does not end with ']'`);const W=w.slice(G+1,-1);if(Number.isNaN(parseInt(W)))throw new A(`Invalid array index: '${W}' in path: '${$}'`);if(G!==0)U.push(w.slice(0,G));U.push(W)}else U.push(w)}return U};var G1=($,f)=>AG(f).reduce((U,w)=>{if(typeof U!=="object")throw new A(`Index '${w}' in '${f}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(U))return U[parseInt(w)];return U[w]},$);var KG=($)=>$!=null;var BG=($)=>!$;var W1=y(f0(),1);var Q$={[W1.EndpointURLScheme.HTTP]:80,[W1.EndpointURLScheme.HTTPS]:443},OG=($)=>{const f=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:F,port:R,protocol:Q="",path:J="",query:q={}}=$,$f=new URL(`${Q}//${F}${R?`:${R}`:""}${J}`);return $f.search=Object.entries(q).map(([_8,x8])=>`${_8}=${x8}`).join("&"),$f}return new URL($)}catch(F){return null}})();if(!f)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const U=f.href,{host:w,hostname:G,pathname:W,protocol:E,search:L}=f;if(L)return null;const X=E.slice(0,-1);if(!Object.values(W1.EndpointURLScheme).includes(X))return null;const M=S0(G),Z=U.includes(`${w}:${Q$[X]}`)||typeof $==="string"&&$.includes(`${w}:${Q$[X]}`),Y=`${w}${Z?`:${Q$[X]}`:""}`;return{scheme:X,authority:Y,path:W,normalizedPath:W.endsWith("/")?W:`${W}/`,isIp:M}};var qG=($,f)=>$===f;var TG=($,f,U,w)=>{if(f>=U||$.length<U)return null;if(!w)return $.substring(f,U);return $.substring($.length-U,$.length-f)};var HG=($)=>encodeURIComponent($).replace(/[!*'()]/g,(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`);var VG={booleanEquals:JG,getAttr:G1,isSet:KG,isValidHostLabel:j0,not:BG,parseURL:OG,stringEquals:qG,substring:TG,uriEncode:HG};var E1=($,f)=>{const U=[],w={...f.endpointParams,...f.referenceRecord};let G=0;while(G<$.length){const W=$.indexOf("{",G);if(W===-1){U.push($.slice(G));break}U.push($.slice(G,W));const E=$.indexOf("}",W);if(E===-1){U.push($.slice(W));break}if($[W+1]==="{"&&$[E+1]==="}")U.push($.slice(W+1,E)),G=E+2;const L=$.substring(W+1,E);if(L.includes("#")){const[X,M]=L.split("#");U.push(G1(w[X],M))}else U.push(w[L]);G=E+1}return U.join("")};var CG=({ref:$},f)=>{return{...f.endpointParams,...f.referenceRecord}[$]};var g=($,f,U)=>{if(typeof $==="string")return E1($,U);else if($.fn)return L1($,U);else if($.ref)return CG($,U);throw new A(`'${f}': ${String($)} is not a string, function or reference.`)};var L1=({fn:$,argv:f},U)=>{const w=f.map((W)=>["boolean","number"].includes(typeof W)?W:g(W,"arg",U)),G=$.split(".");if(G[0]in b0&&G[1]!=null)return b0[G[0]][G[1]](...w);return VG[$](...w)};var NG=({assign:$,...f},U)=>{if($&&$ in U.referenceRecord)throw new A(`'${$}' is already defined in Reference Record.`);const w=L1(f,U);return U.logger?.debug?.(`${u} evaluateCondition: ${b(f)} = ${b(w)}`),{result:w===""?!0:!!w,...$!=null&&{toAssign:{name:$,value:w}}}};var Y0=($=[],f)=>{const U={};for(let w of $){const{result:G,toAssign:W}=NG(w,{...f,referenceRecord:{...f.referenceRecord,...U}});if(!G)return{result:G};if(W)U[W.name]=W.value,f.logger?.debug?.(`${u} assign: ${W.name} := ${b(W.value)}`)}return{result:!0,referenceRecord:U}};var PG=($,f)=>Object.entries($).reduce((U,[w,G])=>({...U,[w]:G.map((W)=>{const E=g(W,"Header value entry",f);if(typeof E!=="string")throw new A(`Header '${w}' value '${E}' is not a string`);return E})}),{});var J$=($,f)=>{if(Array.isArray($))return $.map((U)=>J$(U,f));switch(typeof $){case"string":return E1($,f);case"object":if($===null)throw new A(`Unexpected endpoint property: ${$}`);return X1($,f);case"boolean":return $;default:throw new A(`Unexpected endpoint property type: ${typeof $}`)}};var X1=($,f)=>Object.entries($).reduce((U,[w,G])=>({...U,[w]:J$(G,f)}),{});var SG=($,f)=>{const U=g($,"Endpoint URL",f);if(typeof U==="string")try{return new URL(U)}catch(w){throw console.error(`Failed to construct URL with ${U}`,w),w}throw new A(`Endpoint URL must be a string, got ${typeof U}`)};var jG=($,f)=>{const{conditions:U,endpoint:w}=$,{result:G,referenceRecord:W}=Y0(U,f);if(!G)return;const E={...f,referenceRecord:{...f.referenceRecord,...W}},{url:L,properties:X,headers:M}=w;return f.logger?.debug?.(`${u} Resolving endpoint from template: ${b(w)}`),{...M!=null&&{headers:PG(M,E)},...X!=null&&{properties:X1(X,E)},url:SG(L,E)}};var bG=($,f)=>{const{conditions:U,error:w}=$,{result:G,referenceRecord:W}=Y0(U,f);if(!G)return;throw new A(g(w,"Error",{...f,referenceRecord:{...f.referenceRecord,...W}}))};var kG=($,f)=>{const{conditions:U,rules:w}=$,{result:G,referenceRecord:W}=Y0(U,f);if(!G)return;return M1(w,{...f,referenceRecord:{...f.referenceRecord,...W}})};var M1=($,f)=>{for(let U of $)if(U.type==="endpoint"){const w=jG(U,f);if(w)return w}else if(U.type==="error")bG(U,f);else if(U.type==="tree"){const w=kG(U,f);if(w)return w}else throw new A(`Unknown endpoint rule: ${U}`);throw new A("Rules evaluation failed")};var zM=($,f)=>{const{endpointParams:U,logger:w}=f,{parameters:G,rules:W}=$;f.logger?.debug?.(`${u} Initial EndpointParams: ${b(U)}`);const E=Object.entries(G).filter(([,M])=>M.default!=null).map(([M,Z])=>[M,Z.default]);if(E.length>0)for(let[M,Z]of E)U[M]=U[M]??Z;const L=Object.entries(G).filter(([,M])=>M.required).map(([M])=>M);for(let M of L)if(U[M]==null)throw new A(`Missing required parameter: '${M}'`);const X=M1(W,{endpointParams:U,logger:w,referenceRecord:{}});if(f.endpointParams?.Endpoint)try{const M=new URL(f.endpointParams.Endpoint),{protocol:Z,port:Y}=M;X.url.protocol=Z,X.url.port=Y}catch(M){}return f.logger?.debug?.(`${u} Resolved endpoint: ${b(X)}`),X};var A$=($,f=!1)=>{if(f){for(let U of $.split("."))if(!A$(U))return!1;return!0}if(!j0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(S0($))return!1;return!0};var hG=($)=>{const f=$.split(":");if(f.length<6)return null;const[U,w,G,W,E,...L]=f;if(U!=="arn"||w===""||G===""||L[0]==="")return null;return{partition:w,service:G,region:W,accountId:E,resourceId:L[0].includes("/")?L[0].split("/"):L}};var DG={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)\\-\\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)"},"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 JM=DG,AM="",cG=($)=>{const{partitions:f}=JM;for(let w of f){const{regions:G,outputs:W}=w;for(let[E,L]of Object.entries(G))if(E===$)return{...W,...L}}for(let w of f){const{regionRegex:G,outputs:W}=w;if(new RegExp(G).test($))return{...W}}const U=f.find((w)=>w.id==="aws");if(!U)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...U.outputs}};var _G=()=>AM;var KM={isVirtualHostableS3Bucket:A$,parseArn:hG,partition:cG};b0.aws=KM;var K$="user-agent",Z1="x-amz-user-agent",B$=" ",Y1="/",xG=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,vG=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,O$="-";var BM=($)=>(f,U)=>async(w)=>{const{request:G}=w;if(!S.isInstance(G))return f(w);const{headers:W}=G,E=U?.userAgent?.map(q$)||[],L=(await $.defaultUserAgentProvider()).map(q$),X=$?.customUserAgent?.map(q$)||[],M=_G(),Z=(M?[M]:[]).concat([...L,...E,...X]).join(B$),Y=[...L.filter((F)=>F.startsWith("aws-sdk-")),...X].join(B$);if($.runtime!=="browser"){if(Y)W[Z1]=W[Z1]?`${W[K$]} ${Y}`:Y;W[K$]=Z}else W[Z1]=Z;return f({...w,request:G})},q$=($)=>{const f=$[0].split(Y1).map((E)=>E.replace(xG,O$)).join(Y1),U=$[1]?.replace(vG,O$),w=f.indexOf(Y1),G=f.substring(0,w);let W=f.substring(w+1);if(G==="api")W=W.toLowerCase();return[G,W,U].filter((E)=>E&&E.length>0).reduce((E,L,X)=>{switch(X){case 0:return L;case 1:return`${E}/${L}`;default:return`${E}#${L}`}},"")},OM={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},TF=($)=>({applyToStack:(f)=>{f.add(BM($),OM)}});var I1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var T$=($)=>I1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var hF=($)=>{const{region:f,useFipsEndpoint:U}=$;if(!f)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof f==="string")return T$(f);const w=await f();return T$(w)},useFipsEndpoint:async()=>{const w=typeof f==="string"?f:await f();if(I1(w))return!0;return typeof U!=="function"?Promise.resolve(!!U):U()}}};var I0=($,f,U)=>{if(!(f in $))return;if($[f]==="true")return!0;if($[f]==="false")return!1;throw new Error(`Cannot load ${U} "${f}". Expected "true" or "false", got ${$[f]}.`)};var s;(function($){$.ENV="env",$.CONFIG="shared config entry"})(s||(s={}));var qM="AWS_USE_DUALSTACK_ENDPOINT",TM="use_dualstack_endpoint";var gF={environmentVariableSelector:($)=>I0($,qM,s.ENV),configFileSelector:($)=>I0($,TM,s.CONFIG),default:!1};var HM="AWS_USE_FIPS_ENDPOINT",VM="use_fips_endpoint";var rF={environmentVariableSelector:($)=>I0($,HM,s.ENV),configFileSelector:($)=>I0($,VM,s.CONFIG),default:!1};var H$=y(f0(),1),uG=($)=>$[H$.SMITHY_CONTEXT_KEY]||($[H$.SMITHY_CONTEXT_KEY]={});var p=($)=>{if(typeof $==="function")return $;const f=Promise.resolve($);return()=>f};var yG={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},YR={preferredFile:"credentials"};function CM($){return(f)=>async(U)=>{const w=U.request;if(S.isInstance(w)){const{body:G,headers:W}=w;if(G&&Object.keys(W).map((E)=>E.toLowerCase()).indexOf(pG)===-1)try{const E=$(G);w.headers={...w.headers,[pG]:String(E)}}catch(E){}}return f({...U,request:w})}}var pG="content-length",NM={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},vR=($)=>({applyToStack:(f)=>{f.add(CM($.bodyLengthChecker),NM)}});var dG=($,f)=>(U)=>async(w)=>{const{response:G}=await U(w);try{const W=await f(G,$);return{response:G,output:W}}catch(W){if(Object.defineProperty(W,"$response",{value:G}),!("$metadata"in W)){if(W.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof W.$responseBodyText!=="undefined"){if(W.$response)W.$response.body=W.$responseBodyText}}throw W}};var gG=($,f)=>(U,w)=>async(G)=>{const W=w.endpointV2?.url&&$.urlParser?async()=>$.urlParser(w.endpointV2.url):$.endpoint;if(!W)throw new Error("No valid endpoint provider available.");const E=await f(G.input,{...$,endpoint:W});return U({...G,request:E})};function sR($,f,U){return{applyToStack:(w)=>{w.add(dG($,U),PM),w.add(gG($,f),V$)}}}var PM={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},V$={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var sG=async($)=>{const f=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=f.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(hM(f)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!kM(f)||f.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||f.toLowerCase()!==f||f.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},SM=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,jM=/(\d+\.){3}\d+/,bM=/\.\./;var kM=($)=>SM.test($)&&!jM.test($)&&!bM.test($),hM=($)=>{const[f,U,w,,,G]=$.split(":"),W=f==="arn"&&$.split(":").length>=6,E=Boolean(W&&U&&w&&G);if(W&&!E)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return E};var nG=($,f,U)=>{const w=async()=>{const G=U[$]??U[f];if(typeof G==="function")return G();return G};if($==="credentialScope"||f==="CredentialScope")return async()=>{const G=typeof U.credentials==="function"?await U.credentials():U.credentials;return G?.credentialScope??G?.CredentialScope};if($==="accountId"||f==="AccountId")return async()=>{const G=typeof U.credentials==="function"?await U.credentials():U.credentials;return G?.accountId??G?.AccountId};if($==="endpoint"||f==="endpoint")return async()=>{const G=await w();if(G&&typeof G==="object"){if("url"in G)return G.url.href;if("hostname"in G){const{protocol:W,hostname:E,port:L,path:X}=G;return`${W}//${E}${L?":"+L:""}${X}`}}return G};return w};var rG="AWS_ENDPOINT_URL",mG="endpoint_url",lG=($)=>({environmentVariableSelector:(f)=>{const U=$.split(" ").map((W)=>W.toUpperCase()),w=f[[rG,...U].join("_")];if(w)return w;const G=f[rG];if(G)return G;return},configFileSelector:(f,U)=>{if(U&&f.services){const G=U[["services",f.services].join(C$)];if(G){const W=$.split(" ").map((L)=>L.toLowerCase()),E=G[[W.join("_"),mG].join(C$)];if(E)return E}}const w=f[mG];if(w)return w;return},default:void 0});var oG=async($)=>o(lG($))();var N$=y(df(),1),F1=($)=>{if(typeof $==="object"){if("url"in $)return N$.parseUrl($.url);return $}return N$.parseUrl($)};var iG=async($,f,U,w)=>{if(!U.endpoint){const E=await oG(U.serviceId||"");if(E)U.endpoint=()=>Promise.resolve(F1(E))}const G=await DM($,f,U);if(typeof U.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return U.endpointProvider(G,w)},DM=async($,f,U)=>{const w={},G=f?.getEndpointParameterInstructions?.()||{};for(let[W,E]of Object.entries(G))switch(E.type){case"staticContextParams":w[W]=E.value;break;case"contextParams":w[W]=$[E.name];break;case"clientContextParams":case"builtInParams":w[W]=await nG(E.name,W,U)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys(G).length===0)Object.assign(w,U);if(String(U.serviceId).toLowerCase()==="s3")await sG(w);return w};var tG=({config:$,instructions:f})=>{return(U,w)=>async(G)=>{const W=await iG(G.input,{getEndpointParameterInstructions(){return f}},{...$},w);w.endpointV2=W,w.authSchemes=W.properties?.authSchemes;const E=w.authSchemes?.[0];if(E){w.signing_region=E.signingRegion,w.signing_service=E.signingName;const X=uG(w)?.selectedHttpAuthScheme?.httpAuthOption;if(X)X.signingProperties=Object.assign(X.signingProperties||{},{signing_region:E.signingRegion,signingRegion:E.signingRegion,signing_service:E.signingName,signingName:E.signingName,signingRegionSet:E.signingRegionSet},E.properties)}return U({...G})}};var cM={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:V$.name},Q7=($,f)=>({applyToStack:(U)=>{U.addRelativeTo(tG({config:$,instructions:f}),cM)}});var B7=($)=>{const f=$.tls??!0,{endpoint:U}=$,w=U!=null?async()=>F1(await p(U)()):void 0;return{...$,endpoint:w,tls:f,isCustomEndpoint:!!U,useDualstackEndpoint:p($.useDualstackEndpoint??!1),useFipsEndpoint:p($.useFipsEndpoint??!1)}};var x=y(o1(),1),b7=x.default.v1,k7=x.default.v3,eG=x.default.v4,h7=x.default.v5,D7=x.default.NIL,c7=x.default.version,_7=x.default.validate,x7=x.default.stringify,v7=x.default.parse;var c;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(c||(c={}));var i=3,aG=c.STANDARD;var $W=y(l(),1);class R1{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 f=this.getCurrentTimeInSeconds();this.lastThrottleTime=f,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 f=($-this.currentCapacity)/this.fillRate*1000;await new Promise((U)=>setTimeout(U,f))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const f=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+f),this.lastTimestamp=$}updateClientSendingRate($){let f;if(this.updateMeasuredRate(),$W.isThrottlingError($)){const w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),f=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),f=this.cubicSuccess(this.getCurrentTimeInSeconds());const U=Math.min(f,2*this.measuredTxRate);this.updateTokenBucketRate(U)}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(),f=Math.floor($*2)/2;if(this.requestCount++,f>this.lastTxRateBucket){const U=this.requestCount/(f-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(U*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=f}}getPrecise($){return parseFloat($.toFixed(8))}}var t=100,k0=20000,P$=500,z1=500,S$=5,j$=10,b$=1,Q1="amz-sdk-invocation-id",J1="amz-sdk-request";var fW=()=>{let $=t;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(k0,Math.random()*2**w*$))},setDelayBase:(w)=>{$=w}}};var k$=({retryDelay:$,retryCount:f,retryCost:U})=>{return{getRetryCount:()=>f,getRetryDelay:()=>Math.min(k0,$),getRetryCost:()=>U}};class F0{constructor($){this.maxAttempts=$,this.mode=c.STANDARD,this.capacity=z1,this.retryBackoffStrategy=fW(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return k$({retryDelay:t,retryCount:0})}async refreshRetryTokenForRetry($,f){const U=await this.getMaxAttempts();if(this.shouldRetry($,f,U)){const w=f.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?P$:t);const G=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),W=f.retryAfterHint?Math.max(f.retryAfterHint.getTime()-Date.now()||0,G):G,E=this.getCapacityCost(w);return this.capacity-=E,k$({retryDelay:W,retryCount:$.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(z1,this.capacity+($.getRetryCost()??b$))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${i}`),i}}shouldRetry($,f,U){return $.getRetryCount()+1<U&&this.capacity>=this.getCapacityCost(f.errorType)&&this.isRetryableError(f.errorType)}getCapacityCost($){return $==="TRANSIENT"?j$:S$}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class h${constructor($,f){this.maxAttemptsProvider=$,this.mode=c.ADAPTIVE;const{rateLimiter:U}=f??{};this.rateLimiter=U??new R1,this.standardRetryStrategy=new F0($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,f){return this.rateLimiter.updateClientSendingRate(f),this.standardRetryStrategy.refreshRetryTokenForRetry($,f)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}}var UW="AWS_MAX_ATTEMPTS",wW="max_attempts",zz={environmentVariableSelector:($)=>{const f=$[UW];if(!f)return;const U=parseInt(f);if(Number.isNaN(U))throw new Error(`Environment variable ${UW} mast be a number, got "${f}"`);return U},configFileSelector:($)=>{const f=$[wW];if(!f)return;const U=parseInt(f);if(Number.isNaN(U))throw new Error(`Shared config file entry ${wW} mast be a number, got "${f}"`);return U},default:i},Qz=($)=>{const{retryStrategy:f}=$,U=p($.maxAttempts??i);return{...$,maxAttempts:U,retryStrategy:async()=>{if(f)return f;if(await p($.retryMode)()===c.ADAPTIVE)return new h$(U);return new F0(U)}}},_M="AWS_RETRY_MODE",xM="retry_mode",Jz={environmentVariableSelector:($)=>$[_M],configFileSelector:($)=>$[xM],default:aG};var R0=y(l(),1);import{Readable as vM} from"stream";var GW=($)=>$?.body instanceof vM||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var D$=($)=>{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 uM=($)=>(f,U)=>async(w)=>{let G=await $.retryStrategy();const W=await $.maxAttempts();if(yM(G)){G=G;let E=await G.acquireInitialRetryToken(U.partition_id),L=new Error,X=0,M=0;const{request:Z}=w,Y=S.isInstance(Z);if(Y)Z.headers[Q1]=eG();while(!0)try{if(Y)Z.headers[J1]=`attempt=${X+1}; max=${W}`;const{response:F,output:R}=await f(w);return G.recordSuccess(E),R.$metadata.attempts=X+1,R.$metadata.totalRetryDelay=M,{response:F,output:R}}catch(F){const R=pM(F);if(L=D$(F),Y&&GW(Z))throw(U.logger instanceof WW?console:U.logger)?.warn("An error was encountered in a non-retryable streaming request."),L;try{E=await G.refreshRetryTokenForRetry(E,R)}catch(J){if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=X+1,L.$metadata.totalRetryDelay=M,L}X=E.getRetryCount();const Q=E.getRetryDelay();M+=Q,await new Promise((J)=>setTimeout(J,Q))}}else{if(G=G,G?.mode)U.userAgent=[...U.userAgent||[],["cfg/retry-mode",G.mode]];return G.retry(f,w)}},yM=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",pM=($)=>{const f={error:$,errorType:dM($)},U=sM($.$response);if(U)f.retryAfterHint=U;return f},dM=($)=>{if(R0.isThrottlingError($))return"THROTTLING";if(R0.isTransientError($))return"TRANSIENT";if(R0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},gM={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Pz=($)=>({applyToStack:(f)=>{f.add(uM($),gM)}}),sM=($)=>{if(!c$.isInstance($))return;const f=Object.keys($.headers).find((W)=>W.toLowerCase()==="retry-after");if(!f)return;const U=$.headers[f],w=Number(U);if(!Number.isNaN(w))return new Date(w*1000);return new Date(U)};var nM=y(l(),1);var A1=y(l(),1);import{platform as v9,release as u9} from"os";import{env as C8,versions as y9} from"process";var i$={isCrtAvailable:!1};var V8=()=>{if(i$.isCrtAvailable)return["md/crt-avail"];return null};var p9="AWS_SDK_UA_APP_ID",d9="sdk-ua-app-id",jQ=({serviceId:$,clientVersion:f})=>{const U=[["aws-sdk-js",f],["ua","2.0"],[`os/${v9()}`,u9()],["lang/js"],["md/nodejs",`${y9.node}`]],w=V8();if(w)U.push(w);if($)U.push([`api/${$}`,f]);if(C8.AWS_EXECUTION_ENV)U.push([`exec-env/${C8.AWS_EXECUTION_ENV}`]);const G=o({environmentVariableSelector:(E)=>E[p9],configFileSelector:(E)=>E[d9],default:void 0})();let W=void 0;return async()=>{if(!W){const E=await G;W=E?[...U,[`app/${E}`]]:[...U]}return W}};var N8=($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]";import{Buffer as t$} from"buffer";var $0=($,f=0,U=$.byteLength-f)=>{if(!N8($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return t$.from($,f,U)},Q0=($,f)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return f?t$.from($,f):t$.from($)};var S1=($)=>{const f=Q0($,"utf8");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var P8=($)=>{if(typeof $==="string")return S1($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)};var dQ=($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return $0($.buffer,$.byteOffset,$.byteLength).toString("utf8")};import{Buffer as g9} from"buffer";import{createHash as s9,createHmac as n9} from"crypto";var S8=function($,f){if(g9.isBuffer($))return $;if(typeof $==="string")return Q0($,f);if(ArrayBuffer.isView($))return $0($.buffer,$.byteOffset,$.byteLength);return $0($)};class r9{constructor($,f){this.algorithmIdentifier=$,this.secret=f,this.reset()}update($,f){this.hash.update(P8(S8($,f)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?n9(this.algorithmIdentifier,S8(this.secret)):s9(this.algorithmIdentifier)}}import{fstatSync as m9,lstatSync as l9} from"fs";var $J=($)=>{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 l9($.path).size;else if(typeof $.fd==="number")return m9($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var c8=y(v1(),1);var j8="AWS_EXECUTION_ENV",e$="AWS_REGION",a$="AWS_DEFAULT_REGION",b8="AWS_EC2_METADATA_DISABLED",k8=["in-region","cross-region","mobile","standard","legacy"],h8="/latest/meta-data/placement/region";var D8={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var ZJ=({region:$=o(yG),defaultsMode:f=o(D8)}={})=>c8.memoize(async()=>{const U=typeof f==="function"?await f():f;switch(U?.toLowerCase()){case"auto":return o9($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(U?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${k8.join(", ")}, got ${U}`)}}),o9=async($)=>{if($){const f=typeof $==="function"?await $():$,U=await i9();if(!U)return"standard";if(f===U)return"in-region";else return"cross-region"}return"standard"},i9=async()=>{if(process.env[j8]&&(process.env[e$]||process.env[a$]))return process.env[e$]??process.env[a$];if(!process.env[b8])try{const{getInstanceMetadataEndpoint:$,httpRequest:f}=await import("./chunk-e755f2c1c7ad3912.js"),U=await $();return(await f({...U,path:h8})).toString()}catch($){}};var RJ=($)=>{let f=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const U=$.region;if(typeof U==="string")return U;return U()};return{setRegion(U){f=U},region(){return f}}},zJ=($)=>{return{region:$.region()}};var e9=/^[A-Za-z0-9+/]*={0,2}$/,kJ=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!e9.exec($))throw new TypeError("Invalid base64 string.");const f=Q0($,"base64");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength)};var _J=($)=>{let f;if(typeof $==="string")f=S1($);else f=$;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return $0(f.buffer,f.byteOffset,f.byteLength).toString("base64")};export{$5 as va,f5 as wa,w5 as xa,X5 as ya,SW as za,I0 as Aa,s as Ba,z$ as Ca,uG as Da,p as Ea,s5 as Fa,b0 as Ga,zM as Ha,KM as Ia,TF as Ja,gF as Ka,rF as La,yG as Ma,YR as Na,hF as Oa,vR as Pa,DM as Qa,sR as Ra,Q7 as Sa,B7 as Ta,aG as Ua,eG as Va,zz as Wa,Qz as Xa,Jz as Ya,Pz as Za,x9 as _a,jQ as $a,N8 as ab,S1 as bb,P8 as cb,dQ as db,r9 as eb,$J as fb,kJ as gb,_J as hb,ZJ as ib,RJ as jb,zJ as kb};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{y as O,z as wt} from"./chunk-7ce930fe69575c87.js";import{lb as j} from"./chunk-c7e2acfd5087fb30.js";var Me=wt((ho,Ue)=>{var Ie=function(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=e.slice(r,r+2).toLowerCase();if(n in G)t[r/2]=G[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t},ke=function(e){let t="";for(let r=0;r<e.byteLength;r++)t+=Ae[e[r]];return t},H=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,bt=Object.getOwnPropertyNames,Et=Object.prototype.hasOwnProperty,Ce=(e,t)=>H(e,"name",{value:t,configurable:!0}),Tt=(e,t)=>{for(var r in t)H(e,r,{get:t[r],enumerable:!0})},St=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of bt(t))if(!Et.call(e,o)&&o!==r)H(e,o,{get:()=>t[o],enumerable:!(n=xt(t,o))||n.enumerable})}return e},Ct=(e)=>St(H({},"__esModule",{value:!0}),e),$e={};Tt($e,{fromHex:()=>Ie,toHex:()=>ke});Ue.exports=Ct($e);var Ae={},G={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();if(t.length===1)t=`0${t}`;Ae[e]=t,G[t]=e}Ce(Ie,"fromHex");Ce(ke,"toHex")});var C=(e,t)=>{const r=[];if(e)r.push(e);if(t)for(let n of t)r.push(n);return r},S=(e,t)=>{return`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`},A=()=>{let e=[],t=[],r=!1;const n=new Set,o=(a)=>a.sort((f,h)=>se[h.step]-se[f.step]||ie[h.priority||"normal"]-ie[f.priority||"normal"]),s=(a)=>{let f=!1;const h=(g)=>{const y=C(g.name,g.aliases);if(y.includes(a)){f=!0;for(let p of y)n.delete(p);return!1}return!0};return e=e.filter(h),t=t.filter(h),f},c=(a)=>{let f=!1;const h=(g)=>{if(g.middleware===a){f=!0;for(let y of C(g.name,g.aliases))n.delete(y);return!1}return!0};return e=e.filter(h),t=t.filter(h),f},i=(a)=>{return e.forEach((f)=>{a.add(f.middleware,{...f})}),t.forEach((f)=>{a.addRelativeTo(f.middleware,{...f})}),a.identifyOnResolve?.(w.identifyOnResolve()),a},d=(a)=>{const f=[];return a.before.forEach((h)=>{if(h.before.length===0&&h.after.length===0)f.push(h);else f.push(...d(h))}),f.push(a),a.after.reverse().forEach((h)=>{if(h.before.length===0&&h.after.length===0)f.push(h);else f.push(...d(h))}),f},l=(a=!1)=>{const f=[],h=[],g={};return e.forEach((p)=>{const u={...p,before:[],after:[]};for(let m of C(u.name,u.aliases))g[m]=u;f.push(u)}),t.forEach((p)=>{const u={...p,before:[],after:[]};for(let m of C(u.name,u.aliases))g[m]=u;h.push(u)}),h.forEach((p)=>{if(p.toMiddleware){const u=g[p.toMiddleware];if(u===void 0){if(a)return;throw new Error(`${p.toMiddleware} is not found when adding `+`${S(p.name,p.aliases)} `+`middleware ${p.relation} ${p.toMiddleware}`)}if(p.relation==="after")u.after.push(p);if(p.relation==="before")u.before.push(p)}}),o(f).map(d).reduce((p,u)=>{return p.push(...u),p},[])},w={add:(a,f={})=>{const{name:h,override:g,aliases:y}=f,p={step:"initialize",priority:"normal",middleware:a,...f},u=C(h,y);if(u.length>0){if(u.some((m)=>n.has(m))){if(!g)throw new Error(`Duplicate middleware name '${S(h,y)}'`);for(let m of u){const E=e.findIndex((N)=>N.name===m||N.aliases?.some((W)=>W===m));if(E===-1)continue;const x=e[E];if(x.step!==p.step||p.priority!==x.priority)throw new Error(`"${S(x.name,x.aliases)}" middleware with `+`${x.priority} priority in ${x.step} step cannot `+`be overridden by "${S(h,y)}" middleware with `+`${p.priority} priority in ${p.step} step.`);e.splice(E,1)}}for(let m of u)n.add(m)}e.push(p)},addRelativeTo:(a,f)=>{const{name:h,override:g,aliases:y}=f,p={middleware:a,...f},u=C(h,y);if(u.length>0){if(u.some((m)=>n.has(m))){if(!g)throw new Error(`Duplicate middleware name '${S(h,y)}'`);for(let m of u){const E=t.findIndex((N)=>N.name===m||N.aliases?.some((W)=>W===m));if(E===-1)continue;const x=t[E];if(x.toMiddleware!==p.toMiddleware||x.relation!==p.relation)throw new Error(`"${S(x.name,x.aliases)}" middleware `+`${x.relation} "${x.toMiddleware}" middleware cannot be overridden `+`by "${S(h,y)}" middleware ${p.relation} `+`"${p.toMiddleware}" middleware.`);t.splice(E,1)}}for(let m of u)n.add(m)}t.push(p)},clone:()=>i(A()),use:(a)=>{a.applyToStack(w)},remove:(a)=>{if(typeof a==="string")return s(a);else return c(a)},removeByTag:(a)=>{let f=!1;const h=(g)=>{const{tags:y,name:p,aliases:u}=g;if(y&&y.includes(a)){const m=C(p,u);for(let E of m)n.delete(E);return f=!0,!1}return!0};return e=e.filter(h),t=t.filter(h),f},concat:(a)=>{const f=i(A());return f.use(a),f.identifyOnResolve(r||f.identifyOnResolve()||(a.identifyOnResolve?.()??!1)),f},applyToStack:i,identify:()=>{return l(!0).map((a)=>{const f=a.step??a.relation+" "+a.toMiddleware;return S(a.name,a.aliases)+" - "+f})},identifyOnResolve(a){if(typeof a==="boolean")r=a;return r},resolve:(a,f)=>{for(let h of l().map((g)=>g.middleware).reverse())a=h(a,f);if(r)console.log(w.identify());return a}};return w},se={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},ie={high:3,normal:2,low:1};class tt{constructor(e){this.middlewareStack=A(),this.config=e}send(e,t,r){const n=typeof t!=="function"?t:void 0,o=typeof t==="function"?t:r,s=e.resolveMiddleware(this.middlewareStack,this.config,n);if(o)s(e).then((c)=>o(null,c.output),(c)=>o(c)).catch(()=>{});else return s(e).then((c)=>c.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var ce=O(j(),1);class ae{constructor(){this.middlewareStack=A()}static classBuilder(){return new fe}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,smithyContext:d,additionalContext:l,CommandCtor:w}){for(let y of n.bind(this)(w,e,t,r))this.middlewareStack.use(y);const a=e.concat(this.middlewareStack),{logger:f}=t,h={logger:f,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,[ce.SMITHY_CONTEXT_KEY]:{commandInstance:this,...d},...l},{requestHandler:g}=t;return a.resolve((y)=>g.handle(y.request,r||{}),h)}}class fe{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(e)=>e,this._outputFilterSensitiveLog=(e)=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=(r)=>r,t=(r)=>r){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends ae{static getEndpointParameterInstructions(){return e._ep}constructor(...[r]){super();this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=r??{},e._init(this)}resolveMiddleware(r,n,o){return this.resolveMiddlewareWithContext(r,n,o,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}var ir=(e)=>{let t=e.httpHandler;return{setHttpHandler(r){t=r},httpHandler(){return t},updateHttpClientConfig(r,n){t.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},cr=(e)=>{return{httpHandler:e.httpHandler()}};var rt=O(j(),1);var nt=function(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})};class _{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new _({...e,headers:{...e.headers}});if(t.query)t.query=nt(t.query);return t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return _.clone(this)}}class R{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}var P=(e)=>encodeURIComponent(e).replace(/[!'()*]/g,ot),ot=(e)=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function D(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=P(r),Array.isArray(n))for(let o=0,s=n.length;o<s;o++)t.push(`${r}=${P(n[o])}`);else{let o=r;if(n||typeof n==="string")o+=`=${P(n)}`;t.push(o)}}return t.join("&")}import{Agent as me,request as ct} from"http";import{Agent as ye,request as at} from"https";var ue=["ECONNRESET","EPIPE","ETIMEDOUT"];var Y=(e)=>{const t={};for(let r of Object.keys(e)){const n=e[r];t[r]=Array.isArray(n)?n.join(","):n}return t};var de=(e,t,r=0)=>{if(!r)return;const n=setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r);e.on("socket",(o)=>{if(o.connecting)o.on("connect",()=>{clearTimeout(n)});else clearTimeout(n)})};var le=(e,{keepAlive:t,keepAliveMsecs:r})=>{if(t!==!0)return;e.on("socket",(n)=>{n.setKeepAlive(t,r||0)})};var he=(e,t,r=0)=>{e.setTimeout(r,()=>{e.destroy(),t(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})};import{Readable as st} from"stream";async function J(e,t,r=pe){const n=t.headers??{},o=n.Expect||n.expect;let s=-1,c=!1;if(o==="100-continue")await Promise.race([new Promise((i)=>{s=Number(setTimeout(i,Math.max(pe,r)))}),new Promise((i)=>{e.on("continue",()=>{clearTimeout(s),i()}),e.on("error",()=>{c=!0,clearTimeout(s),i()})})]);if(!c)it(e,t.body)}var it=function(e,t){if(t instanceof st){t.pipe(e);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){e.end(t);return}const r=t;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){e.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}e.end(Buffer.from(t));return}e.end()},pe=1000;class V{static create(e){if(typeof e?.handle==="function")return e;return new V(e)}static checkSocketUsage(e,t,r=console){const{sockets:n,requests:o,maxSockets:s}=e;if(typeof s!=="number"||s===Infinity)return t;const c=15000;if(Date.now()-c<t)return t;if(n&&o)for(let i in n){const d=n[i]?.length??0,l=o[i]?.length??0;if(d>=s&&l>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${d} and ${l} 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 t}constructor(e){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,r)=>{if(typeof e==="function")e().then((n)=>{t(this.resolveDefaultConfig(n))}).catch(r);else t(this.resolveDefaultConfig(e))})}resolveDefaultConfig(e){const{requestTimeout:t,connectionTimeout:r,socketTimeout:n,httpAgent:o,httpsAgent:s}=e||{};return{connectionTimeout:r,requestTimeout:t??n,httpAgent:(()=>{if(o instanceof me||typeof o?.destroy==="function")return o;return new me({keepAlive:!0,maxSockets:50,...o})})(),httpsAgent:(()=>{if(s instanceof ye||typeof s?.destroy==="function")return s;return new ye({keepAlive:!0,maxSockets:50,...s})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;let r;return new Promise((n,o)=>{let s=void 0;const c=async(u)=>{await s,clearTimeout(r),n(u)},i=async(u)=>{await s,clearTimeout(r),o(u)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){const u=new Error("Request aborted");u.name="AbortError",i(u);return}const d=e.protocol==="https:",l=d?this.config.httpsAgent:this.config.httpAgent;r=setTimeout(()=>{this.socketWarningTimestamp=V.checkSocketUsage(l,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const w=D(e.query||{});let a=void 0;if(e.username!=null||e.password!=null){const u=e.username??"",m=e.password??"";a=`${u}:${m}`}let f=e.path;if(w)f+=`?${w}`;if(e.fragment)f+=`#${e.fragment}`;const h={headers:e.headers,host:e.hostname,method:e.method,path:f,port:e.port,agent:l,auth:a},y=(d?at:ct)(h,(u)=>{const m=new R({statusCode:u.statusCode||-1,reason:u.statusMessage,headers:Y(u.headers),body:u});c({response:m})});if(y.on("error",(u)=>{if(ue.includes(u.code))i(Object.assign(u,{name:"TimeoutError"}));else i(u)}),de(y,i,this.config.connectionTimeout),he(y,i,this.config.requestTimeout),t){const u=()=>{y.destroy();const m=new Error("Request aborted");m.name="AbortError",i(m)};if(typeof t.addEventListener==="function"){const m=t;m.addEventListener("abort",u,{once:!0}),y.once("close",()=>m.removeEventListener("abort",u))}else t.onabort=u}const p=h.agent;if(typeof p==="object"&&"keepAlive"in p)le(y,{keepAlive:p.keepAlive,keepAliveMsecs:p.keepAliveMsecs});s=J(y,e,this.config.requestTimeout).catch((u)=>{return clearTimeout(r),o(u)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[e]:t}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as ft} from"stream";class Z extends ft{constructor(){super(...arguments);this.bufferedBytes=[]}_write(e,t,r){this.bufferedBytes.push(e),r()}}async function dt(e){const t=[],r=e.getReader();let n=!1,o=0;while(!n){const{done:i,value:d}=await r.read();if(d)t.push(d),o+=d.length;n=i}const s=new Uint8Array(o);let c=0;for(let i of t)s.set(i,c),c+=i.length;return s}var ge=(e)=>{if(ut(e))return dt(e);return new Promise((t,r)=>{const n=new Z;e.pipe(n),e.on("error",(o)=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){const o=new Uint8Array(Buffer.concat(this.bufferedBytes));t(o)})})},ut=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;var gn="***SensitiveInformation***";var xn=(e,t)=>{for(let r of Object.keys(e)){const n=e[r],o=async function(c,i,d){const l=new n(c);if(typeof i==="function")this.send(l,i);else if(typeof d==="function"){if(typeof i!=="object")throw new Error(`Expected http options but got ${typeof i}`);this.send(l,i||{},d)}else return this.send(l,i)},s=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");t.prototype[s]=o}};class we extends Error{constructor(e){super(e.message);Object.setPrototypeOf(this,we.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}var xe=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,o])=>{if(e[n]==null||e[n]==="")e[n]=o});const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e};class lt{trace(){}debug(){}info(){}warn(){}error(){}}var be=(e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";import{Buffer as Q} from"buffer";var I=(e,t=0,r=e.byteLength-t)=>{if(!be(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Q.from(e,t,r)},v=(e,t)=>{if(typeof e!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?Q.from(e,t):Q.from(e)};var ht=/^[A-Za-z0-9+/]*={0,2}$/,B=(e)=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!ht.exec(e))throw new TypeError("Invalid base64 string.");const t=v(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};var k=(e)=>{const t=v(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var Rn=(e)=>{if(typeof e==="string")return k(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)};var z=(e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return I(e.buffer,e.byteOffset,e.byteLength).toString("utf8")};var q=(e)=>{let t;if(typeof e==="string")t=k(e);else t=e;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return I(t.buffer,t.byteOffset,t.byteLength).toString("base64")};function Ee(e,t="utf-8"){if(t==="base64")return q(e);return z(e)}function Te(e,t){if(t==="base64")return T.mutate(B(e));return T.mutate(k(e))}class T extends Uint8Array{static fromString(e,t="utf-8"){switch(typeof e){case"string":return Te(e,t);default:throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}}static mutate(e){return Object.setPrototypeOf(e,T.prototype),e}transformToString(e="utf-8"){return Ee(this,e)}}import{Readable as pt} from"stream";var Xn=(e,t)=>{const{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:o,checksumLocationName:s,streamHasher:c}=t,i=r!==void 0&&o!==void 0&&s!==void 0&&c!==void 0,d=i?c(o,e):void 0,l=new pt({read:()=>{}});return e.on("data",(w)=>{const a=n(w)||0;l.push(`${a.toString(16)}\r\n`),l.push(w),l.push("\r\n")}),e.on("end",async()=>{if(l.push("0\r\n"),i){const w=r(await d);l.push(`${s}:${w}\r\n`),l.push("\r\n")}l.push(null)}),l};import{Readable as K} from"stream";import{TextDecoder as $t} from"util";async function mt(e){const t=await gt(e),r=B(t);return new Uint8Array(r)}async function yt(e){const t=[],r=e.getReader();let n=!1,o=0;while(!n){const{done:i,value:d}=await r.read();if(d)t.push(d),o+=d.length;n=i}const s=new Uint8Array(o);let c=0;for(let i of t)s.set(i,c),c+=i.length;return s}var gt=function(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const o=n.result??"",s=o.indexOf(","),c=s>-1?s+1:o.length;t(o.substring(c))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})},Se=(e)=>{if(typeof Blob==="function"&&e instanceof Blob)return mt(e);return yt(e)};var Pe=O(Me(),1);var $=(e)=>typeof ReadableStream==="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream);var Ne="The stream has already been transformed.",Fe=(e)=>{if(!Re(e)&&!$(e)){const o=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${o}`)}let t=!1;const r=async()=>{if(t)throw new Error(Ne);return t=!0,await Se(e)},n=(o)=>{if(typeof o.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 o.stream()};return Object.assign(e,{transformToByteArray:r,transformToString:async(o)=>{const s=await r();if(o==="base64")return q(s);else if(o==="hex")return Pe.toHex(s);else if(o===void 0||o==="utf8"||o==="utf-8")return z(s);else if(typeof TextDecoder==="function")return new TextDecoder(o).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(Ne);if(t=!0,Re(e))return n(e);else if($(e))return e;else throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},Re=(e)=>typeof Blob==="function"&&e instanceof Blob;var Le="The stream has already been transformed.",$o=(e)=>{if(!(e instanceof K))try{return Fe(e)}catch(n){const o=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${o}`)}let t=!1;const r=async()=>{if(t)throw new Error(Le);return t=!0,await ge(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async(n)=>{const o=await r();if(n===void 0||Buffer.isEncoding(n))return I(o.buffer,o.byteOffset,o.byteLength).toString(n);else return new $t(n).decode(o)},transformToWebStream:()=>{if(t)throw new Error(Le);if(e.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof K.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 t=!0,K.toWeb(e)}})};import{PassThrough as De} from"stream";async function Oe(e){if(typeof e.stream==="function")e=e.stream();return e.tee()}async function No(e){if($(e))return Oe(e);const t=new De,r=new De;return e.pipe(t),e.pipe(r),[t,r]}import{Writable as At} from"stream";async function ve(e,t){let r=0;const n=[],o=e.getReader();let s=!1;while(!s){const{done:d,value:l}=await o.read();if(l)n.push(l),r+=l?.byteLength??0;if(r>=t)break;s=d}o.releaseLock();const c=new Uint8Array(Math.min(t,r));let i=0;for(let d of n){if(d.byteLength>c.byteLength-i){c.set(d.subarray(0,c.byteLength-i),i);break}else c.set(d,i);i+=d.length}return c}var Do=(e,t)=>{if($(e))return ve(e,t);return new Promise((r,n)=>{const o=new Be;o.limit=t,e.pipe(o),e.on("error",(s)=>{o.end(),n(s)}),o.on("error",n),o.on("finish",function(){const s=new Uint8Array(Buffer.concat(this.buffers));r(s)})})};class Be extends At{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(e,t,r){if(this.buffers.push(e),this.bytesBuffered+=e.byteLength??0,this.bytesBuffered>=this.limit){const n=this.bytesBuffered-this.limit,o=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=o.subarray(0,o.byteLength-n),this.emit("finish")}r()}}var Jo=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return T.mutate(e);if(!e)return T.mutate(new Uint8Array);const r=t.streamCollector(e);return T.mutate(await r)};var Zo=(e)=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}};var It=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string"){const t=parseFloat(e);if(!Number.isNaN(t)){if(String(t)!==String(e))Je.warn(Ye(`Expected number but observed string: ${e}`));return t}}if(typeof e==="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)},kt=Math.ceil(340282346638528860000000000000000000000),ze=(e)=>{const t=It(e);if(t!==void 0&&!Number.isNaN(t)&&t!==Infinity&&t!==(-Infinity)){if(Math.abs(t)>kt)throw new TypeError(`Expected 32-bit float, got ${e}`)}return t},X=(e)=>{if(e===null||e===void 0)return;if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)};var qe=(e)=>ee(e,32),He=(e)=>ee(e,16),We=(e)=>ee(e,8),ee=(e,t)=>{const r=X(e);if(r!==void 0&&Ut(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Ut=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Qo=(e,t)=>{if(e===null||e===void 0){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e},Go=(e)=>{if(e===null||e===void 0)return;if(typeof e==="object"&&!Array.isArray(e))return e;const t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},Ko=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string")return e;if(["boolean","number","bigint"].includes(typeof e))return Je.warn(Ye(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)};var je=(e)=>{if(typeof e=="string")return ze(F(e));return ze(e)},Mt=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,F=(e)=>{const t=e.match(Mt);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)};var Xo=(e)=>{if(typeof e==="string")return X(F(e));return X(e)};var es=(e)=>{if(typeof e==="string")return qe(F(e));return qe(e)},U=(e)=>{if(typeof e==="string")return He(F(e));return He(e)},_e=(e)=>{if(typeof e==="string")return We(F(e));return We(e)},Ye=(e)=>{return String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join("\n")},Je={warn:console.warn};function os(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),o=e.getUTCDate(),s=e.getUTCHours(),c=e.getUTCMinutes(),i=e.getUTCSeconds(),d=o<10?`0${o}`:`${o}`,l=s<10?`0${s}`:`${s}`,w=c<10?`0${c}`:`${c}`,a=i<10?`0${i}`:`${i}`;return`${Nt[n]}, ${d} ${re[r]} ${t} ${l}:${w}:${a} GMT`}var Nt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],re=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Rt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),ss=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Rt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,d,l]=t,w=U(M(n)),a=b(o,"month",1,12),f=b(s,"day",1,31);return L(w,a,f,{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l})},Pt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),is=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Pt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,d,l,w]=t,a=U(M(n)),f=b(o,"month",1,12),h=b(s,"day",1,31),g=L(a,f,h,{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l});if(w.toUpperCase()!="Z")g.setTime(g.getTime()-jt(w));return g},Ft=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$/),Lt=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$/),Ot=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})$/),cs=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=Ft.exec(e);if(t){const[r,n,o,s,c,i,d,l]=t;return L(U(M(s)),te(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l})}if(t=Lt.exec(e),t){const[r,n,o,s,c,i,d,l]=t;return Bt(L(Dt(s),te(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l}))}if(t=Ot.exec(e),t){const[r,n,o,s,c,i,d,l]=t;return L(U(M(l)),te(n),b(o.trimLeft(),"day",1,31),{hours:s,minutes:c,seconds:i,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")};var L=(e,t,r,n)=>{const o=t-1;return qt(e,o,r),new Date(Date.UTC(e,o,r,b(n.hours,"hour",0,23),b(n.minutes,"minute",0,59),b(n.seconds,"seconds",0,60),Wt(n.fractionalMilliseconds)))},Dt=(e)=>{const t=(new Date()).getUTCFullYear(),r=Math.floor(t/100)*100+U(M(e));if(r<t)return r+100;return r},vt=1576800000000,Bt=(e)=>{if(e.getTime()-(new Date()).getTime()>vt)return new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()));return e},te=(e)=>{const t=re.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},zt=[31,28,31,30,31,30,31,31,30,31,30,31],qt=(e,t,r)=>{let n=zt[t];if(t===1&&Ht(e))n=29;if(r>n)throw new TypeError(`Invalid day for ${re[t]} in ${e}: ${r}`)},Ht=(e)=>{return e%4===0&&(e%100!==0||e%400===0)},b=(e,t,r,n)=>{const o=_e(M(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},Wt=(e)=>{if(e===null||e===void 0)return 0;return je("0."+e)*1000},jt=(e)=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1000},M=(e)=>{let t=0;while(t<e.length-1&&e.charAt(t)==="0")t++;if(t===0)return e;return e.slice(t)};var _t=({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{const o=Yt(e),s=o.httpStatusCode?o.httpStatusCode+"":void 0,c=new r({name:t?.code||t?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw xe(c,t)},us=(e)=>{return({output:t,parsedBody:r,errorCode:n})=>{_t({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})}},Yt=(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 ls=(e)=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var Ve=!1,ps=(e)=>{if(e&&!Ve&&parseInt(e.substring(1,e.indexOf(".")))<16)Ve=!0};var ne=O(j(),1);var Ze=(e)=>{const t=[];for(let r in ne.AlgorithmId){const n=ne.AlgorithmId[r];if(e[n]===void 0)continue;t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},Qe=(e)=>{const t={};return e.checksumAlgorithms().forEach((r)=>{t[r.algorithmId()]=r.checksumConstructor()}),t};var Ge=(e)=>{let t=e.retryStrategy;return{setRetryStrategy(r){t=r},retryStrategy(){return t}}},Ke=(e)=>{const t={};return t.retryStrategy=e.retryStrategy(),t};var bs=(e)=>{return{...Ze(e),...Ge(e)}};var Es=(e)=>{return{...Qe(e),...Ke(e)}};function Jt(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}var oe=function(){const e=Object.getPrototypeOf(this).constructor,r=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(r,e.prototype),r};oe.prototype=Object.create(String.prototype,{constructor:{value:oe,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(oe,String);function Vt(e,t,r){let n,o,s;if(typeof t==="undefined"&&typeof r==="undefined")n={},s=e;else if(n=e,typeof t==="function")return o=t,s=r,Zt(n,o,s);else s=t;for(let c of Object.keys(s)){if(!Array.isArray(s[c])){n[c]=s[c];continue}Xe(n,null,s,c)}return n}var Us=(e,t)=>{const r={};for(let n in t)Xe(r,e,t,n);return r},Zt=(e,t,r)=>{return Vt(e,Object.entries(r).reduce((n,[o,s])=>{if(Array.isArray(s))n[o]=s;else if(typeof s==="function")n[o]=[t,s()];else n[o]=[t,s];return n},{}))},Xe=(e,t,r,n)=>{if(t!==null){let c=r[n];if(typeof c==="function")c=[,c];const[i=Qt,d=Gt,l=n]=c;if(typeof i==="function"&&i(t[l])||typeof i!=="function"&&!!i)e[n]=d(t[l]);return}let[o,s]=r[n];if(typeof s==="function"){let c;const i=o===void 0&&(c=s())!=null,d=typeof o==="function"&&!!o(void 0)||typeof o!=="function"&&!!o;if(i)e[n]=c;else if(d)e[n]=s()}else{const c=o===void 0&&s!=null,i=typeof o==="function"&&!!o(s)||typeof o!=="function"&&!!o;if(c||i)e[n]=s}},Qt=(e)=>e!=null,Gt=(e)=>e;var Ps=(e)=>e.toISOString().replace(".000Z","Z");var et=(e)=>{if(e==null)return{};if(Array.isArray(e))return e.filter((t)=>t!=null).map(et);if(typeof e==="object"){const t={};for(let r of Object.keys(e)){if(e[r]==null)continue;t[r]=et(e[r])}return t}return e};export{ir as F,cr as G,_ as H,R as I,lt as J,tt as K,be as L,I as M,v as N,B as O,k as P,Rn as Q,z as R,q as S,Xn as T,P as U,V,ge as W,Me as X,$o as Y,No as Z,Do as _,Jo as $,ae as aa,gn as ba,xn as ca,Zo as da,X as ea,qe as fa,Qo as ga,Go as ha,Ko as ia,Xo as ja,es as ka,os as la,ss as ma,is as na,cs as oa,we as pa,xe as qa,us as ra,ls as sa,ps as ta,bs as ua,Es as va,Jt as wa,Vt as xa,Us as ya,Ps as za,et as Aa};
|