gemi 0.4.41 → 0.4.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/App.d.ts +1 -0
- package/dist/app/App.d.ts.map +1 -1
- package/dist/app/createFlatApiRoutes.d.ts +6 -4
- package/dist/app/createFlatApiRoutes.d.ts.map +1 -1
- package/dist/app/createFlatViewRoutes.d.ts +6 -4
- package/dist/app/createFlatViewRoutes.d.ts.map +1 -1
- package/dist/app/index.js +65 -65
- package/dist/chunk-00935722c776a294.js +2 -0
- package/dist/chunk-00e9dad0734d9761.js +2 -0
- package/dist/chunk-01052ff9d1c07ef8.js +1 -1
- package/dist/chunk-030b4fb955329860.js +16 -0
- package/dist/chunk-03c8e645c994d40a.js +1 -1
- package/dist/chunk-08539d08fa7362f7.js +2 -0
- package/dist/chunk-09dd89e1046786a5.js +2 -0
- package/dist/chunk-1900e90c372bb1d6.js +1 -1
- package/dist/chunk-29c46abebbc0f09b.js +2 -0
- package/dist/chunk-2b3eabd01b2ae3f8.js +2 -0
- package/dist/chunk-2ecc077efab285b4.js +2 -0
- package/dist/chunk-2f6867d08b95f2d2.js +2 -0
- package/dist/chunk-3567e8e424a60c99.js +18 -0
- package/dist/chunk-3a3092db69408490.js +2 -0
- package/dist/chunk-3aecba8553e036bf.js +6 -0
- package/dist/chunk-40c21fe243675250.js +2 -0
- package/dist/chunk-487b7c0cb388d533.js +6 -0
- package/dist/chunk-488b4db0c522d44a.js +1 -0
- package/dist/chunk-4960e27e19bbe42a.js +2 -0
- package/dist/chunk-4cb19a9e82653084.js +1 -1
- package/dist/chunk-51bad63147c3be4e.js +6 -0
- package/dist/chunk-584e33c96b1a78e4.js +2 -0
- package/dist/chunk-5fd67245740e3908.js +9 -0
- package/dist/chunk-61abf77c3eee8698.js +2 -0
- package/dist/chunk-68af0a6f6be163ce.js +2 -0
- package/dist/chunk-6a28d299b5726bba.js +2 -0
- package/dist/chunk-6e415d0e12fc9539.js +1 -0
- package/dist/chunk-76a525af0575486d.js +5 -0
- package/dist/chunk-798f550643937b6d.js +2 -0
- package/dist/chunk-7ce930fe69575c87.js +2 -0
- package/dist/chunk-7e9d5eea3aa359ad.js +2 -0
- package/dist/chunk-7ffe2ce59a054e35.js +2 -0
- package/dist/chunk-8133ed564834cff3.js +2 -0
- package/dist/chunk-81ce9b491b290639.js +1 -0
- package/dist/chunk-8a993922ea970923.js +2 -0
- package/dist/chunk-901e700a2c2d43f3.js +18 -0
- package/dist/chunk-9113f22a5215c639.js +3 -0
- package/dist/chunk-9326224d1e4c1a64.js +2 -0
- package/dist/chunk-9501e589e3e86a96.js +2 -0
- package/dist/chunk-a0003b7feea6fae6.js +2 -0
- package/dist/chunk-a2fcc46e344ae7ae.js +2 -0
- package/dist/chunk-a3f85d0d3261ae44.js +9 -0
- package/dist/chunk-a693f8ec2e8af8ca.js +2 -0
- package/dist/chunk-ae373c8ae2d526ae.js +18 -0
- package/dist/chunk-b05e4833f4bb2f8f.js +9 -0
- package/dist/chunk-b0cc82fa84d5362d.js +2 -0
- package/dist/chunk-b3bfe533d66f6a17.js +2 -0
- package/dist/chunk-b5d6eb761760b2a7.js +6 -0
- package/dist/chunk-b7b365f7e6038104.js +2 -0
- package/dist/chunk-be095501304df604.js +9 -0
- package/dist/chunk-bf92f3127474b56a.js +3 -0
- package/dist/chunk-bfccfb070c1630e9.js +2 -0
- package/dist/chunk-c041f058dc3d571b.js +1 -0
- package/dist/chunk-c0bd8e19395d722b.js +2 -0
- package/dist/chunk-c124bf801cec12d9.js +2 -0
- package/dist/chunk-c153b192112b0d44.js +2 -0
- package/dist/chunk-c1813278ccdc04b8.js +2 -0
- package/dist/chunk-c3eaa877d3aab9db.js +18 -0
- package/dist/chunk-c609d06153ed09ce.js +1 -1
- package/dist/chunk-c72bfaa252a03f6f.js +2 -0
- package/dist/chunk-c85fc7168a708cb6.js +3 -0
- package/dist/chunk-d0806df6defd9dce.js +2 -0
- package/dist/chunk-d26ffb7722e6df54.js +1 -0
- package/dist/chunk-d2e057b6f3f9d500.js +2 -0
- package/dist/chunk-d33a0e61ccf1bab5.js +2 -0
- package/dist/chunk-d5ddfacbfc84a47d.js +6 -0
- package/dist/chunk-da1c673d9685624e.js +2 -0
- package/dist/chunk-dc7b0cf226ba3afa.js +1 -1
- package/dist/chunk-dcc432bd72fb7e46.js +3 -0
- package/dist/chunk-dfc390f0bbdf5a81.js +1 -0
- package/dist/chunk-e1a08bb52ee7ea09.js +2 -0
- package/dist/chunk-e53fdd0a1888c5e8.js +2 -0
- package/dist/chunk-e9695f3cdafee20b.js +2 -0
- package/dist/chunk-edeefd833c30a5ed.js +2 -0
- package/dist/chunk-f08ca4bd263b132b.js +2 -0
- package/dist/chunk-f5a4295176f9b1c1.js +2 -0
- package/dist/chunk-f5e313cc7d724fbe.js +2 -0
- package/dist/chunk-f9e6a0a946ebb032.js +2 -0
- package/dist/chunk-ffe161a589b4c44b.js +1 -0
- package/dist/client/ClientRouter.d.ts.map +1 -1
- package/dist/client/ClientRouterContext.d.ts +1 -0
- package/dist/client/ClientRouterContext.d.ts.map +1 -1
- package/dist/client/Mutation.d.ts +9 -13
- package/dist/client/Mutation.d.ts.map +1 -1
- package/dist/client/ServerDataProvider.d.ts +2 -0
- package/dist/client/ServerDataProvider.d.ts.map +1 -1
- package/dist/client/auth/useForgotPassword.d.ts.map +1 -1
- package/dist/client/auth/useResetPassword.d.ts.map +1 -1
- package/dist/client/auth/useSignIn.d.ts.map +1 -1
- package/dist/client/auth/useSignOut.d.ts.map +1 -1
- package/dist/client/auth/useUser.d.ts.map +1 -1
- package/dist/client/i18n/I18nContext.d.ts +18 -0
- package/dist/client/i18n/I18nContext.d.ts.map +1 -0
- package/dist/client/i18n/useLocale.d.ts +2 -0
- package/dist/client/i18n/useLocale.d.ts.map +1 -0
- package/dist/client/i18n/useScopedTranslator.d.ts +8 -0
- package/dist/client/i18n/useScopedTranslator.d.ts.map +1 -0
- package/dist/client/i18n/useTranslator.d.ts +2 -0
- package/dist/client/i18n/useTranslator.d.ts.map +1 -0
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +221 -68
- package/dist/client/rpc.d.ts +6 -5
- package/dist/client/rpc.d.ts.map +1 -1
- package/dist/client/types.d.ts +1 -0
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/useRouter.d.ts.map +1 -1
- package/dist/client/useSearchParams.d.ts +20 -1
- package/dist/client/useSearchParams.d.ts.map +1 -1
- package/dist/email/index.js +1 -1
- package/dist/facades/I18n.d.ts +5 -0
- package/dist/facades/I18n.d.ts.map +1 -0
- package/dist/facades/index.d.ts +1 -0
- package/dist/facades/index.d.ts.map +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/ApiRouter.d.ts +4 -5
- package/dist/http/ApiRouter.d.ts.map +1 -1
- package/dist/http/HttpRequest.d.ts +2 -0
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/I18nServiceContainer.d.ts +31 -0
- package/dist/http/I18nServiceContainer.d.ts.map +1 -0
- package/dist/http/I18nServiceProvider.d.ts +10 -0
- package/dist/http/I18nServiceProvider.d.ts.map +1 -0
- package/dist/http/index.d.ts +1 -0
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/http/requestContext.d.ts +2 -0
- package/dist/http/requestContext.d.ts.map +1 -1
- package/dist/kernel/Kernel.d.ts +5 -0
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/context.d.ts +6 -2
- package/dist/kernel/context.d.ts.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/server/index.js +1 -1
- package/dist/storage/index.js +1 -10
- package/dist/utils/type.d.ts +1 -0
- package/dist/utils/type.d.ts.map +1 -1
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-7ce930fe69575c87.js";import{Db as E} from"./chunk-488b4db0c522d44a.js";import{readFileSync as l} from"fs";var t=(e)=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:c,policyArns:i,policy:_,durationSeconds:N}=e;let{roleAssumerWithWebIdentity:s}=e;if(!s){const{getDefaultRoleAssumerWithWebIdentity:d}=await import("./chunk-b3bfe533d66f6a17.js");s=d({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return s({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:c,PolicyArns:i,Policy:_,DurationSeconds:N})};var m="AWS_WEB_IDENTITY_TOKEN_FILE",S="AWS_ROLE_ARN",p="AWS_ROLE_SESSION_NAME",A=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const o=e?.webIdentityTokenFile??process.env[m],r=e?.roleArn??process.env[S],n=e?.roleSessionName??process.env[p];if(!o||!r)throw new E("Web identity configuration not specified",{logger:e.logger});return t({...e,webIdentityToken:l(o,{encoding:"ascii"}),roleArn:r,roleSessionName:n})()};export{t as fromWebToken,A as fromTokenFile};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-c1813278ccdc04b8.js";import{y as b} from"./chunk-7ce930fe69575c87.js";import{A as G0,B as I0,C as T0,E as Wl,F as B0,J as Tl,K as Al,M as Rl,N as Ll,P as _l,Q as bl,W as K,X as Ih,Y as u0,aa as A0,ca as S,ea as u,ha as R0,ja as U0,ka as T,la as L0,ma as fl,na as Cl,oa as H0,pa as S0,qa as ch} from"./chunk-9113f22a5215c639.js";import{Da as yh,Ea as dl,Fa as wl,Ga as q0,Ha as vl,Ia as Ml,Ja as zl,Ka as y0,La as Ol,Ma as gl,Na as xl,Oa as il,Pa as Q0,Qa as X0,Sa as F,Ta as B,Ua as Y0,Va as cl,Xa as el,Ya as Z0,Za as pl,_a as $0,ab as dh,bb as nl,cb as ol,db as ul,eb as tl,fb as m0,gb as J0,wa as E0,xa as k0,ya as K0,za as F0} from"./chunk-ae373c8ae2d526ae.js";import"./chunk-a0003b7feea6fae6.js";import{ib as f,jb as jl} from"./chunk-4cb19a9e82653084.js";import"./chunk-ff086fe014985526.js";import{qb as Qh} from"./chunk-5fd67245740e3908.js";import"./chunk-d26ffb7722e6df54.js";var C=b(yh(),1);var Gl=b(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:A}),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=b(dh(),1);var h0=b(yh(),1);var al=b(dh(),1),rl=b(yh(),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??Tl,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 al.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(d)=>d.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new rl.NoAuthSigner}],logger:h?.logger??new Wl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??jl,utf8Decoder:h?.utf8Decoder??Al,utf8Encoder:h?.utf8Encoder??Rl}};var l0=(h)=>{Cl(process.version);const d=tl(h),l=()=>d().then(fl),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(el),region:h?.region??f(xl,il),requestHandler:_l.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...pl,default:async()=>(await l()).retryMode||cl}),sha256:h?.sha256??ol.bind(null,"sha256"),streamCollector:h?.streamCollector??bl,useDualstackEndpoint:h?.useDualstackEndpoint??f(Ol),useFipsEndpoint:h?.useFipsEndpoint??f(gl)}};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 A 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=b(dh(),1);var j0=async(h,d)=>{const l=j;let w;return w=_({...Yd(h,d),[r]:od,[s]:a}),L(d,l,"/",void 0,w)},a0=async(h,d)=>{const l=j;let w;return w=_({...Zd(h,d),[r]:ud,[s]:a}),L(d,l,"/",void 0,w)},r0=async(h,d)=>{const l=j;let w;return w=_({...$d(h,d),[r]:td,[s]:a}),L(d,l,"/",void 0,w)},s0=async(h,d)=>{const l=j;let w;return w=_({...Ud(h,d),[r]:hw,[s]:a}),L(d,l,"/",void 0,w)},_0=async(h,d)=>{const l=j;let w;return w=_({...Vd(h,d),[r]:lw,[s]:a}),L(d,l,"/",void 0,w)},b0=async(h,d)=>{const l=j;let w;return w=_({...Pd(h,d),[r]:dw,[s]:a}),L(d,l,"/",void 0,w)},f0=async(h,d)=>{const l=j;let w;return w=_({...vd(h,d),[r]:ww,[s]:a}),L(d,l,"/",void 0,w)},C0=async(h,d)=>{const l=j;let w;return w=_({...Md(h,d),[r]:Gw,[s]:a}),L(d,l,"/",void 0,w)},O0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Rd(l.AssumeRoleResult,d),{$metadata:k(h),...w}},g0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Ld(l.AssumeRoleWithSAMLResult,d),{$metadata:k(h),...w}},x0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=jd(l.AssumeRoleWithWebIdentityResult,d),{$metadata:k(h),...w}},i0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=ad(l.DecodeAuthorizationMessageResult,d),{$metadata:k(h),...w}},c0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=_d(l.GetAccessKeyInfoResult,d),{$metadata:k(h),...w}},e0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=bd(l.GetCallerIdentityResult,d),{$metadata:k(h),...w}},p0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=fd(l.GetFederationTokenResult,d),{$metadata:k(h),...w}},n0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Cd(l.GetSessionTokenResult,d),{$metadata:k(h),...w}},R=async(h,d)=>{const l={...h,body:await P.parseXmlErrorBody(h.body,d)},w=Iw(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 yd(l,d);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Qd(l,d);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Xd(l,d);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Fd(l,d);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await qd(l,d);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Kd(l,d);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Bd(l,d);default:const G=l.body;return nd({output:h,parsedBody:G.Error,errorCode:w})}},kd=async(h,d)=>{const l=h.body,w=rd(l.Error,d),G=new Hh({$metadata:k(h),...w});return T(G,l)},Kd=async(h,d)=>{const l=h.body,w=Od(l.Error,d),G=new kh({$metadata:k(h),...w});return T(G,l)},Fd=async(h,d)=>{const l=h.body,w=gd(l.Error,d),G=new Dh({$metadata:k(h),...w});return T(G,l)},Bd=async(h,d)=>{const l=h.body,w=xd(l.Error,d),G=new Kh({$metadata:k(h),...w});return T(G,l)},qd=async(h,d)=>{const l=h.body,w=id(l.Error,d),G=new Eh({$metadata:k(h),...w});return T(G,l)},yd=async(h,d)=>{const l=h.body,w=cd(l.Error,d),G=new Sh({$metadata:k(h),...w});return T(G,l)},Qd=async(h,d)=>{const l=h.body,w=ed(l.Error,d),G=new mh({$metadata:k(h),...w});return T(G,l)},Xd=async(h,d)=>{const l=h.body,w=pd(l.Error,d),G=new Jh({$metadata:k(h),...w});return T(G,l)},Yd=(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=Ad(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=Wd(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},Zd=(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},$d=(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},Ud=(h,d)=>{const l={};if(h[Vh]!=null)l[Vh]=h[Vh];return l},Vd=(h,d)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},Pd=(h,d)=>{return{}},vd=(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},Md=(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=zd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},zd=(h,d)=>{const l={};if(h[ih]!=null)l[ih]=h[ih];return l},Nd=(h,d)=>{const l={};if(h[Ah]!=null)l[Ah]=h[Ah];if(h[Yh]!=null)l[Yh]=h[Yh];return l},Wd=(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},Td=(h,d)=>{const l={};if(h[zh]!=null)l[zh]=h[zh];if(h[gh]!=null)l[gh]=h[gh];return l},Ad=(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=Td(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},Rd=(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},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[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},jd=(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},ad=(h,d)=>{const l={};if(h[Zh]!=null)l[Zh]=S(h[Zh]);return l},rd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},sd=(h,d)=>{const l={};if(h[vh]!=null)l[vh]=S(h[vh]);if(h[N]!=null)l[N]=S(h[N]);return l},_d=(h,d)=>{const l={};if(h[g]!=null)l[g]=S(h[g]);return l},bd=(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},fd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[Ph]!=null)l[Ph]=sd(h[Ph],d);if(h[U]!=null)l[U]=u(h[U]);return l},Cd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);return l},Od=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);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},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 nd=L0(Y),L=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)},j={"content-type":"application/x-www-form-urlencoded"},a="2011-06-15",r="Action",O="AccessKeyId",od="AssumeRole",Xh="AssumedRoleId",z="AssumedRoleUser",ud="AssumeRoleWithSAML",td="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",q="Credentials",Yh="ContextAssertion",hw="DecodeAuthorizationMessage",Zh="DecodedMessage",y="DurationSeconds",$h="Expiration",Uh="ExternalId",Vh="EncodedMessage",Ph="FederatedUser",vh="FederatedUserId",lw="GetAccessKeyInfo",dw="GetCallerIdentity",ww="GetFederationToken",Gw="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",s="Version",gh="Value",xh="WebIdentityToken",ih="arn",m="message",_=(h)=>Object.entries(h).map(([d,l])=>ch(d)+"="+ch(l)).join("&"),Iw=(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 Hw={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:ph,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:nh,GetAccessKeyInfoCommand:oh,GetCallerIdentityCommand:uh,GetFederationTokenCommand:th,GetSessionTokenCommand:hl};class t0 extends A{}u0(Hw,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)}}},Sw=(h={},d)=>wd(h,Id(A,d)),mw=(h={},d)=>Gd(h,Id(A,d)),RG=(h)=>(d)=>h({roleAssumer:Sw(d),roleAssumerWithWebIdentity:mw(d),...d});export{mw as getDefaultRoleAssumerWithWebIdentity,Sw as getDefaultRoleAssumer,RG as decorateDefaultCredentialProvider,B0 as __Client,Y as STSServiceException,A 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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-7ce930fe69575c87.js";import"./chunk-a0003b7feea6fae6.js";import{ib as v,jb as B} from"./chunk-4cb19a9e82653084.js";import{kb as z,lb as y} from"./chunk-ff086fe014985526.js";import"./chunk-d26ffb7722e6df54.js";import{parse as p} from"url";import{Buffer as M} from"buffer";import{request as k} from"http";function u(c){return new Promise((I,x)=>{const T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new z("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new z("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{const{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new z("Error response received from instance metadata service"),{statusCode:O})),T.destroy();const E=[];N.on("data",(w)=>{E.push(w)}),N.on("end",()=>{I(M.concat(E)),T.destroy()})}),T.end()})}var K=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",_=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var hc=1000,Yc=0,D=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var Q="AWS_CONTAINER_CREDENTIALS_FULL_URI",X="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",mc=(c={})=>{const{timeout:I,maxRetries:x}=D(c);return()=>m(async()=>{const T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!K(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return _(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await u({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[X])return{hostname:a,path:process.env[X]};if(process.env[Q]){const I=p(process.env[Q]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new y("The container metadata credential provider cannot be used unless"+` the ${X} or ${Q} environment`+" variable is set",{tryNextLink:!1,logger:c})};class G extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,G.prototype)}}var A;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(A||(A={}));var H={environmentVariableSelector:(c)=>c["AWS_EC2_METADATA_SERVICE_ENDPOINT"],configFileSelector:(c)=>c["ec2_metadata_service_endpoint"],default:void 0};var f;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(f||(f={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:f.IPv4};var Z=async()=>B(await r()||await d()),r=async()=>v(H)(),d=async()=>{const c=await v(q)();switch(c){case f.IPv4:return A.IPv4;case f.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}.`+` Select from ${Object.values(f)}`)}};var L=(c,I)=>{const x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these "+`credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: `+"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html");const N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var U=(c,I={})=>{const x=I?.logger||console;let T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",e="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",oc=(c={})=>U(i(c),{logger:c.logger}),i=(c={})=>{let I=!1;const{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=D(c),E=async(w,$)=>{if(I||$.headers?.[F]==null){let h=!1,Y=!1;const R=await v({environmentVariableSelector:(S)=>{const j=S[W];if(Y=!!j&&j!=="false",j===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{const j=S[t];return h=!!j&&j!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){const S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new G(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}const V=(await m(async()=>{let h;try{h=await Ic($)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await Tc(V,$,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{const w=await Z();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(O,{...w,timeout:N});else{let $;try{$=(await cc({...w,timeout:N})).toString()}catch(J){if(J?.statusCode===400)throw Object.assign(J,{message:"EC2 Metadata token request returned error"});else if(J.message==="TimeoutError"||[403,404,405].includes(J.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(O,{...w,timeout:N})}return E(O,{...w,headers:{[F]:$},timeout:N})}}},cc=async(c)=>u({...c,path:e,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ic=async(c)=>(await u({...c,path:P})).toString(),Tc=async(c,I,x)=>{const T=JSON.parse((await u({...I,path:P+c})).toString());if(!K(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return _(T)};export{D as providerConfigFromInit,u as httpRequest,Z as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,mc as fromContainerMetadata,A as Endpoint,X as ENV_CMDS_RELATIVE_URI,Q as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,hc as DEFAULT_TIMEOUT,Yc as DEFAULT_MAX_RETRIES};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{y as n,z as Z} from"./chunk-7ce930fe69575c87.js";import{C as j,D as l1,E as HR,F as OL,H as $4,I as _0,J as Tf,K as E4,L as R4,M as LL} from"./chunk-76a525af0575486d.js";import{gb as Bf} from"./chunk-40c21fe243675250.js";import{hb as RU,ib as ff} from"./chunk-81ce9b491b290639.js";import{ob as _1} from"./chunk-6e415d0e12fc9539.js";import{xb as SW} from"./chunk-dfc390f0bbdf5a81.js";var sf=Z((FT,zw)=>{var Jw=function(f,w,U){return{applyToStack:(E)=>{E.add(Xw(f,U),Yw),E.add(Zw(f,w),Qw)}}},gf=Object.defineProperty,_W=Object.getOwnPropertyDescriptor,yW=Object.getOwnPropertyNames,vW=Object.prototype.hasOwnProperty,g0=(f,w)=>gf(f,"name",{value:w,configurable:!0}),xW=(f,w)=>{for(var U in w)gf(f,U,{get:w[U],enumerable:!0})},pW=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of yW(w))if(!vW.call(f,$)&&$!==U)gf(f,$,{get:()=>w[$],enumerable:!(E=_W(w,$))||E.enumerable})}return f},dW=(f)=>pW(gf({},"__esModule",{value:!0}),f),Tw={};xW(Tw,{deserializerMiddleware:()=>Xw,deserializerMiddlewareOption:()=>Yw,getSerdePlugin:()=>Jw,serializerMiddleware:()=>Zw,serializerMiddlewareOption:()=>Qw});zw.exports=dW(Tw);var Xw=g0((f,w)=>(U)=>async(E)=>{const{response:$}=await U(E);try{const R=await w($,f);return{response:$,output:R}}catch(R){if(Object.defineProperty(R,"$response",{value:$}),!("$metadata"in R)){if(R.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof R.$responseBodyText!=="undefined"){if(R.$response)R.$response.body=R.$responseBodyText}}throw R}},"deserializerMiddleware"),Zw=g0((f,w)=>(U,E)=>async($)=>{var R;const G=((R=E.endpointV2)==null?void 0:R.url)&&f.urlParser?async()=>f.urlParser(E.endpointV2.url):f.endpoint;if(!G)throw new Error("No valid endpoint provider available.");const W=await w($.input,{...f,endpoint:G});return U({...$,request:W})},"serializerMiddleware"),Yw={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Qw={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};g0(Jw,"getSerdePlugin")});var v=Z((MT,Hw)=>{var{defineProperty:nf,getOwnPropertyDescriptor:gW,getOwnPropertyNames:sW}=Object,nW=Object.prototype.hasOwnProperty,Bw=(f,w)=>nf(f,"name",{value:w,configurable:!0}),rW=(f,w)=>{for(var U in w)nf(f,U,{get:w[U],enumerable:!0})},lW=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of sW(w))if(!nW.call(f,$)&&$!==U)nf(f,$,{get:()=>w[$],enumerable:!(E=gW(w,$))||E.enumerable})}return f},mW=(f)=>lW(nf({},"__esModule",{value:!0}),f),qw={};rW(qw,{getSmithyContext:()=>oW,normalizeProvider:()=>iW});Hw.exports=mW(qw);var Kw=Bf(),oW=Bw((f)=>f[Kw.SMITHY_CONTEXT_KEY]||(f[Kw.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),iW=Bw((f)=>{if(typeof f==="function")return f;const w=Promise.resolve(f);return()=>w},"normalizeProvider")});var s0=Z((TT,Pw)=>{var{defineProperty:rf,getOwnPropertyDescriptor:tW,getOwnPropertyNames:eW}=Object,aW=Object.prototype.hasOwnProperty,e=(f,w)=>rf(f,"name",{value:w,configurable:!0}),f8=(f,w)=>{for(var U in w)rf(f,U,{get:w[U],enumerable:!0})},w8=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of eW(w))if(!aW.call(f,$)&&$!==U)rf(f,$,{get:()=>w[$],enumerable:!(E=tW(w,$))||E.enumerable})}return f},U8=(f)=>w8(rf({},"__esModule",{value:!0}),f),Vw={};f8(Vw,{CredentialsProviderError:()=>$8,ProviderError:()=>lf,TokenProviderError:()=>E8,chain:()=>R8,fromStatic:()=>G8,memoize:()=>W8});Pw.exports=U8(Vw);var Cw=class f extends Error{constructor(w,U=!0){var E;let $,R=!0;if(typeof U==="boolean")$=void 0,R=U;else if(U!=null&&typeof U==="object")$=U.logger,R=U.tryNextLink??!0;super(w);this.name="ProviderError",this.tryNextLink=R,Object.setPrototypeOf(this,f.prototype),(E=$==null?void 0:$.debug)==null||E.call($,`@smithy/property-provider ${R?"->":"(!)"} ${w}`)}static from(w,U=!0){return Object.assign(new this(w.message,U),w)}};e(Cw,"ProviderError");var lf=Cw,Nw=class f extends lf{constructor(w,U=!0){super(w,U);this.name="CredentialsProviderError",Object.setPrototypeOf(this,f.prototype)}};e(Nw,"CredentialsProviderError");var $8=Nw,Sw=class f extends lf{constructor(w,U=!0){super(w,U);this.name="TokenProviderError",Object.setPrototypeOf(this,f.prototype)}};e(Sw,"TokenProviderError");var E8=Sw,R8=e((...f)=>async()=>{if(f.length===0)throw new lf("No providers in chain");let w;for(let U of f)try{return await U()}catch(E){if(w=E,E==null?void 0:E.tryNextLink)continue;throw E}throw w},"chain"),G8=e((f)=>()=>Promise.resolve(f),"fromStatic"),W8=e((f,w,U)=>{let E,$,R,G=!1;const W=e(async()=>{if(!$)$=f();try{E=await $,R=!0,G=!1}finally{$=void 0}return E},"coalesceProvider");if(w===void 0)return async(I)=>{if(!R||(I==null?void 0:I.forceRefresh))E=await W();return E};return async(I)=>{if(!R||(I==null?void 0:I.forceRefresh))E=await W();if(G)return E;if(U&&!U(E))return G=!0,E;if(w(E))return await W(),E;return E}},"memoize")});var Gf=Z((bw)=>{Object.defineProperty(bw,"__esModule",{value:!0});bw.getHomeDir=void 0;var I8=import.meta.require("os"),O8=import.meta.require("path"),n0={},L8=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},A8=()=>{const{HOME:f,USERPROFILE:w,HOMEPATH:U,HOMEDRIVE:E=`C:${O8.sep}`}=process.env;if(f)return f;if(w)return w;if(U)return`${E}${U}`;const $=L8();if(!n0[$])n0[$]=I8.homedir();return n0[$]};bw.getHomeDir=A8});var r0=Z((jw)=>{Object.defineProperty(jw,"__esModule",{value:!0});jw.getSSOTokenFilepath=void 0;var F8=import.meta.require("crypto"),M8=import.meta.require("path"),T8=Gf(),X8=(f)=>{const U=F8.createHash("sha1").update(f).digest("hex");return M8.join(T8.getHomeDir(),".aws","sso","cache",`${U}.json`)};jw.getSSOTokenFilepath=X8});var Dw=Z((uw)=>{Object.defineProperty(uw,"__esModule",{value:!0});uw.getSSOTokenFromFile=void 0;var Z8=import.meta.require("fs"),Y8=r0(),{readFile:Q8}=Z8.promises,J8=async(f)=>{const w=Y8.getSSOTokenFilepath(f),U=await Q8(w,"utf8");return JSON.parse(U)};uw.getSSOTokenFromFile=J8});var m0=Z((_w)=>{Object.defineProperty(_w,"__esModule",{value:!0});_w.slurpFile=void 0;var z8=import.meta.require("fs"),{readFile:K8}=z8.promises,l0={},B8=(f,w)=>{if(!l0[f]||(w===null||w===void 0?void 0:w.ignoreCache))l0[f]=K8(f,"utf8");return l0[f]};_w.slurpFile=B8});var e0=Z((JT,Hf)=>{var{defineProperty:tf,getOwnPropertyDescriptor:q8,getOwnPropertyNames:H8}=Object,V8=Object.prototype.hasOwnProperty,h=(f,w)=>tf(f,"name",{value:w,configurable:!0}),C8=(f,w)=>{for(var U in w)tf(f,U,{get:w[U],enumerable:!0})},o0=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of H8(w))if(!V8.call(f,$)&&$!==U)tf(f,$,{get:()=>w[$],enumerable:!(E=q8(w,$))||E.enumerable})}return f},t0=(f,w,U)=>(o0(f,w,"default"),U&&o0(U,w,"default")),N8=(f)=>o0(tf({},"__esModule",{value:!0}),f),qf={};C8(qf,{CONFIG_PREFIX_SEPARATOR:()=>a,DEFAULT_PROFILE:()=>dw,ENV_PROFILE:()=>pw,getProfileName:()=>S8,loadSharedConfigFiles:()=>sw,loadSsoSessionData:()=>p8,parseKnownFiles:()=>g8});Hf.exports=N8(qf);t0(qf,Gf(),Hf.exports);var pw="AWS_PROFILE",dw="default",S8=h((f)=>f.profile||process.env[pw]||dw,"getProfileName");t0(qf,r0(),Hf.exports);t0(qf,Dw(),Hf.exports);var mf=Bf(),P8=h((f)=>Object.entries(f).filter(([w])=>{const U=w.indexOf(a);if(U===-1)return!1;return Object.values(mf.IniSectionType).includes(w.substring(0,U))}).reduce((w,[U,E])=>{const $=U.indexOf(a),R=U.substring(0,$)===mf.IniSectionType.PROFILE?U.substring($+1):U;return w[R]=E,w},{...f.default&&{default:f.default}}),"getConfigData"),of=import.meta.require("path"),b8=Gf(),c8="AWS_CONFIG_FILE",gw=h(()=>process.env[c8]||of.join(b8.getHomeDir(),".aws","config"),"getConfigFilepath"),j8=Gf(),h8="AWS_SHARED_CREDENTIALS_FILE",u8=h(()=>process.env[h8]||of.join(j8.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),k8=Gf(),D8=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,_8=["__proto__","profile __proto__"],i0=h((f)=>{const w={};let U,E;for(let $ of f.split(/\r?\n/)){const R=$.split(/(^|\s)[;#]/)[0].trim();if(R[0]==="["&&R[R.length-1]==="]"){U=void 0,E=void 0;const W=R.substring(1,R.length-1),I=D8.exec(W);if(I){const[,O,,L]=I;if(Object.values(mf.IniSectionType).includes(O))U=[O,L].join(a)}else U=W;if(_8.includes(W))throw new Error(`Found invalid profile name "${W}"`)}else if(U){const W=R.indexOf("=");if(![0,-1].includes(W)){const[I,O]=[R.substring(0,W).trim(),R.substring(W+1).trim()];if(O==="")E=I;else{if(E&&$.trimStart()===$)E=void 0;w[U]=w[U]||{};const L=E?[E,I].join(a):I;w[U][L]=O}}}}return w},"parseIni"),vw=m0(),xw=h(()=>({}),"swallowError"),a=".",sw=h(async(f={})=>{const{filepath:w=u8(),configFilepath:U=gw()}=f,E=k8.getHomeDir();let R=w;if(w.startsWith("~/"))R=of.join(E,w.slice(2));let G=U;if(U.startsWith("~/"))G=of.join(E,U.slice(2));const W=await Promise.all([vw.slurpFile(G,{ignoreCache:f.ignoreCache}).then(i0).then(P8).catch(xw),vw.slurpFile(R,{ignoreCache:f.ignoreCache}).then(i0).catch(xw)]);return{configFile:W[0],credentialsFile:W[1]}},"loadSharedConfigFiles"),y8=h((f)=>Object.entries(f).filter(([w])=>w.startsWith(mf.IniSectionType.SSO_SESSION+a)).reduce((w,[U,E])=>({...w,[U.substring(U.indexOf(a)+1)]:E}),{}),"getSsoSessionData"),v8=m0(),x8=h(()=>({}),"swallowError"),p8=h(async(f={})=>v8.slurpFile(f.configFilepath??gw()).then(i0).then(y8).catch(x8),"loadSsoSessionData"),d8=h((...f)=>{const w={};for(let U of f)for(let[E,$]of Object.entries(U))if(w[E]!==void 0)Object.assign(w[E],$);else w[E]=$;return w},"mergeConfigFiles"),g8=h(async(f)=>{const w=await sw(f);return d8(w.configFile,w.credentialsFile)},"parseKnownFiles")});var mw=Z((zT,lw)=>{var a0=function(f){try{const w=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return w.delete("CONFIG"),w.delete("CONFIG_PREFIX_SEPARATOR"),w.delete("ENV"),[...w].join(", ")}catch(w){return f}},ef=Object.defineProperty,s8=Object.getOwnPropertyDescriptor,n8=Object.getOwnPropertyNames,r8=Object.prototype.hasOwnProperty,Wf=(f,w)=>ef(f,"name",{value:w,configurable:!0}),l8=(f,w)=>{for(var U in w)ef(f,U,{get:w[U],enumerable:!0})},m8=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of n8(w))if(!r8.call(f,$)&&$!==U)ef(f,$,{get:()=>w[$],enumerable:!(E=s8(w,$))||E.enumerable})}return f},o8=(f)=>m8(ef({},"__esModule",{value:!0}),f),rw={};l8(rw,{loadConfig:()=>fI});lw.exports=o8(rw);var Vf=s0();Wf(a0,"getSelectorName");var i8=Wf((f,w)=>async()=>{try{const U=f(process.env);if(U===void 0)throw new Error;return U}catch(U){throw new Vf.CredentialsProviderError(U.message||`Not found in ENV: ${a0(f.toString())}`,{logger:w})}},"fromEnv"),nw=e0(),t8=Wf((f,{preferredFile:w="config",...U}={})=>async()=>{const E=nw.getProfileName(U),{configFile:$,credentialsFile:R}=await nw.loadSharedConfigFiles(U),G=R[E]||{},W=$[E]||{},I=w==="config"?{...G,...W}:{...W,...G};try{const L=f(I,w==="config"?$:R);if(L===void 0)throw new Error;return L}catch(O){throw new Vf.CredentialsProviderError(O.message||`Not found in config files w/ profile [${E}]: ${a0(f.toString())}`,{logger:U.logger})}},"fromSharedConfigFiles"),e8=Wf((f)=>typeof f==="function","isFunction"),a8=Wf((f)=>e8(f)?async()=>await f():Vf.fromStatic(f),"fromStatic"),fI=Wf(({environmentVariableSelector:f,configFileSelector:w,default:U},E={})=>Vf.memoize(Vf.chain(i8(f),t8(w,E),a8(U))),"loadConfig")});var fU=Z((ew)=>{Object.defineProperty(ew,"__esModule",{value:!0});ew.getEndpointUrlConfig=void 0;var ow=e0(),iw="AWS_ENDPOINT_URL",tw="endpoint_url",wI=(f)=>({environmentVariableSelector:(w)=>{const U=f.split(" ").map((R)=>R.toUpperCase()),E=w[[iw,...U].join("_")];if(E)return E;const $=w[iw];if($)return $;return},configFileSelector:(w,U)=>{if(U&&w.services){const $=U[["services",w.services].join(ow.CONFIG_PREFIX_SEPARATOR)];if($){const R=f.split(" ").map((W)=>W.toLowerCase()),G=$[[R.join("_"),tw].join(ow.CONFIG_PREFIX_SEPARATOR)];if(G)return G}}const E=w[tw];if(E)return E;return},default:void 0});ew.getEndpointUrlConfig=wI});var $U=Z((wU)=>{Object.defineProperty(wU,"__esModule",{value:!0});wU.getEndpointFromConfig=void 0;var UI=mw(),$I=fU(),EI=async(f)=>UI.loadConfig($I.getEndpointUrlConfig(f))();wU.getEndpointFromConfig=EI});var FU=Z((qT,AU)=>{var{defineProperty:f0,getOwnPropertyDescriptor:RI,getOwnPropertyNames:GI}=Object,WI=Object.prototype.hasOwnProperty,k=(f,w)=>f0(f,"name",{value:w,configurable:!0}),II=(f,w)=>{for(var U in w)f0(f,U,{get:w[U],enumerable:!0})},OI=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of GI(w))if(!WI.call(f,$)&&$!==U)f0(f,$,{get:()=>w[$],enumerable:!(E=RI(w,$))||E.enumerable})}return f},LI=(f)=>OI(f0({},"__esModule",{value:!0}),f),GU={};II(GU,{endpointMiddleware:()=>OU,endpointMiddlewareOptions:()=>LU,getEndpointFromInstructions:()=>WU,getEndpointPlugin:()=>zI,resolveEndpointConfig:()=>KI,resolveParams:()=>IU,toEndpointV1:()=>f1});AU.exports=LI(GU);var AI=k(async(f)=>{const w=(f==null?void 0:f.Bucket)||"";if(typeof f.Bucket==="string")f.Bucket=w.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(ZI(w)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!XI(w)||w.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||w.toLowerCase()!==w||w.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},"resolveParamsForS3"),FI=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,MI=/(\d+\.){3}\d+/,TI=/\.\./,XI=k((f)=>FI.test(f)&&!MI.test(f)&&!TI.test(f),"isDnsCompatibleBucketName"),ZI=k((f)=>{const[w,U,E,,,$]=f.split(":"),R=w==="arn"&&f.split(":").length>=6,G=Boolean(R&&U&&E&&$);if(R&&!G)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return G},"isArnBucketName"),YI=k((f,w,U)=>{const E=k(async()=>{const $=U[f]??U[w];if(typeof $==="function")return $();return $},"configProvider");if(f==="credentialScope"||w==="CredentialScope")return async()=>{const $=typeof U.credentials==="function"?await U.credentials():U.credentials;return($==null?void 0:$.credentialScope)??($==null?void 0:$.CredentialScope)};if(f==="accountId"||w==="AccountId")return async()=>{const $=typeof U.credentials==="function"?await U.credentials():U.credentials;return($==null?void 0:$.accountId)??($==null?void 0:$.AccountId)};if(f==="endpoint"||w==="endpoint")return async()=>{const $=await E();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){const{protocol:R,hostname:G,port:W,path:I}=$;return`${R}//${G}${W?":"+W:""}${I}`}}return $};return E},"createConfigValueProvider"),QI=$U(),EU=RU(),f1=k((f)=>{if(typeof f==="object"){if("url"in f)return EU.parseUrl(f.url);return f}return EU.parseUrl(f)},"toEndpointV1"),WU=k(async(f,w,U,E)=>{if(!U.endpoint){const G=await QI.getEndpointFromConfig(U.serviceId||"");if(G)U.endpoint=()=>Promise.resolve(f1(G))}const $=await IU(f,w,U);if(typeof U.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return U.endpointProvider($,E)},"getEndpointFromInstructions"),IU=k(async(f,w,U)=>{var E;const $={},R=((E=w==null?void 0:w.getEndpointParameterInstructions)==null?void 0:E.call(w))||{};for(let[G,W]of Object.entries(R))switch(W.type){case"staticContextParams":$[G]=W.value;break;case"contextParams":$[G]=f[W.name];break;case"clientContextParams":case"builtInParams":$[G]=await YI(W.name,G,U)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(W))}if(Object.keys(R).length===0)Object.assign($,U);if(String(U.serviceId).toLowerCase()==="s3")await AI($);return $},"resolveParams"),af=v(),OU=k(({config:f,instructions:w})=>{return(U,E)=>async($)=>{var R,G,W;const I=await WU($.input,{getEndpointParameterInstructions(){return w}},{...f},E);E.endpointV2=I,E.authSchemes=(R=I.properties)==null?void 0:R.authSchemes;const O=(G=E.authSchemes)==null?void 0:G[0];if(O){E.signing_region=O.signingRegion,E.signing_service=O.signingName;const L=af.getSmithyContext(E),A=(W=L==null?void 0:L.selectedHttpAuthScheme)==null?void 0:W.httpAuthOption;if(A)A.signingProperties=Object.assign(A.signingProperties||{},{signing_region:O.signingRegion,signingRegion:O.signingRegion,signing_service:O.signingName,signingName:O.signingName,signingRegionSet:O.signingRegionSet},O.properties)}return U({...$})}},"endpointMiddleware"),JI=sf(),LU={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:JI.serializerMiddlewareOption.name},zI=k((f,w)=>({applyToStack:(U)=>{U.addRelativeTo(OU({config:f,instructions:w}),LU)}}),"getEndpointPlugin"),KI=k((f)=>{const w=f.tls??!0,{endpoint:U}=f,E=U!=null?async()=>f1(await af.normalizeProvider(U)()):void 0;return{...f,endpoint:E,tls:w,isCustomEndpoint:!!U,useDualstackEndpoint:af.normalizeProvider(f.useDualstackEndpoint??!1),useFipsEndpoint:af.normalizeProvider(f.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var w1=Z((MU)=>{var qI=function(f){return f&&f.__esModule?f:{default:f}},HI=function(){if(w0>U0.length-16)BI.default.randomFillSync(U0),w0=0;return U0.slice(w0,w0+=16)};Object.defineProperty(MU,"__esModule",{value:!0});MU.default=HI;var BI=qI(import.meta.require("crypto")),U0=new Uint8Array(256),w0=U0.length});var ZU=Z((TU)=>{Object.defineProperty(TU,"__esModule",{value:!0});TU.default=void 0;var CI=/^(?:[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;TU.default=CI});var Cf=Z((YU)=>{var SI=function(f){return f&&f.__esModule?f:{default:f}},PI=function(f){return typeof f==="string"&&NI.default.test(f)};Object.defineProperty(YU,"__esModule",{value:!0});YU.default=void 0;var NI=SI(ZU()),bI=PI;YU.default=bI});var Nf=Z((zU)=>{var jI=function(f){return f&&f.__esModule?f:{default:f}},JU=function(f,w=0){return C[f[w+0]]+C[f[w+1]]+C[f[w+2]]+C[f[w+3]]+"-"+C[f[w+4]]+C[f[w+5]]+"-"+C[f[w+6]]+C[f[w+7]]+"-"+C[f[w+8]]+C[f[w+9]]+"-"+C[f[w+10]]+C[f[w+11]]+C[f[w+12]]+C[f[w+13]]+C[f[w+14]]+C[f[w+15]]},hI=function(f,w=0){const U=JU(f,w);if(!cI.default(U))throw TypeError("Stringified UUID is invalid");return U};Object.defineProperty(zU,"__esModule",{value:!0});zU.default=void 0;zU.unsafeStringify=JU;var cI=jI(Cf()),C=[];for(let f=0;f<256;++f)C.push((f+256).toString(16).slice(1));var uI=hI;zU.default=uI});var VU=Z((qU)=>{var yI=function(f){return f&&f.__esModule?f:{default:f}},vI=function(f,w,U){let E=w&&U||0;const $=w||new Array(16);f=f||{};let R=f.node||BU,G=f.clockseq!==void 0?f.clockseq:U1;if(R==null||G==null){const M=f.random||(f.rng||DI.default)();if(R==null)R=BU=[M[0]|1,M[1],M[2],M[3],M[4],M[5]];if(G==null)G=U1=(M[6]<<8|M[7])&16383}let W=f.msecs!==void 0?f.msecs:Date.now(),I=f.nsecs!==void 0?f.nsecs:E1+1;const O=W-$1+(I-E1)/1e4;if(O<0&&f.clockseq===void 0)G=G+1&16383;if((O<0||W>$1)&&f.nsecs===void 0)I=0;if(I>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");$1=W,E1=I,U1=G,W+=12219292800000;const L=((W&268435455)*1e4+I)%4294967296;$[E++]=L>>>24&255,$[E++]=L>>>16&255,$[E++]=L>>>8&255,$[E++]=L&255;const A=W/4294967296*1e4&268435455;$[E++]=A>>>8&255,$[E++]=A&255,$[E++]=A>>>24&15|16,$[E++]=A>>>16&255,$[E++]=G>>>8|128,$[E++]=G&255;for(let M=0;M<6;++M)$[E+M]=R[M];return w||_I.unsafeStringify($)};Object.defineProperty(qU,"__esModule",{value:!0});qU.default=void 0;var DI=yI(w1()),_I=Nf(),BU,U1,$1=0,E1=0,xI=vI;qU.default=xI});var R1=Z((CU)=>{var dI=function(f){return f&&f.__esModule?f:{default:f}},gI=function(f){if(!pI.default(f))throw TypeError("Invalid UUID");let w;const U=new Uint8Array(16);return U[0]=(w=parseInt(f.slice(0,8),16))>>>24,U[1]=w>>>16&255,U[2]=w>>>8&255,U[3]=w&255,U[4]=(w=parseInt(f.slice(9,13),16))>>>8,U[5]=w&255,U[6]=(w=parseInt(f.slice(14,18),16))>>>8,U[7]=w&255,U[8]=(w=parseInt(f.slice(19,23),16))>>>8,U[9]=w&255,U[10]=(w=parseInt(f.slice(24,36),16))/1099511627776&255,U[11]=w/4294967296&255,U[12]=w>>>24&255,U[13]=w>>>16&255,U[14]=w>>>8&255,U[15]=w&255,U};Object.defineProperty(CU,"__esModule",{value:!0});CU.default=void 0;var pI=dI(Cf()),sI=gI;CU.default=sI});var G1=Z((bU)=>{var lI=function(f){return f&&f.__esModule?f:{default:f}},mI=function(f){f=unescape(encodeURIComponent(f));const w=[];for(let U=0;U<f.length;++U)w.push(f.charCodeAt(U));return w},oI=function(f,w,U){function E($,R,G,W){var I;if(typeof $==="string")$=mI($);if(typeof R==="string")R=rI.default(R);if(((I=R)===null||I===void 0?void 0:I.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let O=new Uint8Array(16+$.length);if(O.set(R),O.set($,R.length),O=U(O),O[6]=O[6]&15|w,O[8]=O[8]&63|128,G){W=W||0;for(let L=0;L<16;++L)G[W+L]=O[L];return G}return nI.unsafeStringify(O)}try{E.name=f}catch($){}return E.DNS=SU,E.URL=PU,E};Object.defineProperty(bU,"__esModule",{value:!0});bU.URL=bU.DNS=void 0;bU.default=oI;var nI=Nf(),rI=lI(R1()),SU="6ba7b810-9dad-11d1-80b4-00c04fd430c8";bU.DNS=SU;var PU="6ba7b811-9dad-11d1-80b4-00c04fd430c8";bU.URL=PU});var uU=Z((jU)=>{var aI=function(f){return f&&f.__esModule?f:{default:f}},fO=function(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return eI.default.createHash("md5").update(f).digest()};Object.defineProperty(jU,"__esModule",{value:!0});jU.default=void 0;var eI=aI(import.meta.require("crypto")),wO=fO;jU.default=wO});var yU=Z((DU)=>{var kU=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(DU,"__esModule",{value:!0});DU.default=void 0;var UO=kU(G1()),$O=kU(uU()),EO=UO.default("v3",48,$O.default),RO=EO;DU.default=RO});var pU=Z((vU)=>{var WO=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(vU,"__esModule",{value:!0});vU.default=void 0;var GO=WO(import.meta.require("crypto")),IO={randomUUID:GO.default.randomUUID};vU.default=IO});var rU=Z((sU)=>{var gU=function(f){return f&&f.__esModule?f:{default:f}},AO=function(f,w,U){if(dU.default.randomUUID&&!w&&!f)return dU.default.randomUUID();f=f||{};const E=f.random||(f.rng||OO.default)();if(E[6]=E[6]&15|64,E[8]=E[8]&63|128,w){U=U||0;for(let $=0;$<16;++$)w[U+$]=E[$];return w}return LO.unsafeStringify(E)};Object.defineProperty(sU,"__esModule",{value:!0});sU.default=void 0;var dU=gU(pU()),OO=gU(w1()),LO=Nf(),FO=AO;sU.default=FO});var oU=Z((lU)=>{var TO=function(f){return f&&f.__esModule?f:{default:f}},XO=function(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return MO.default.createHash("sha1").update(f).digest()};Object.defineProperty(lU,"__esModule",{value:!0});lU.default=void 0;var MO=TO(import.meta.require("crypto")),ZO=XO;lU.default=ZO});var aU=Z((tU)=>{var iU=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(tU,"__esModule",{value:!0});tU.default=void 0;var YO=iU(G1()),QO=iU(oU()),JO=YO.default("v5",80,QO.default),zO=JO;tU.default=zO});var U$=Z((f$)=>{Object.defineProperty(f$,"__esModule",{value:!0});f$.default=void 0;var KO="00000000-0000-0000-0000-000000000000";f$.default=KO});var R$=Z(($$)=>{var qO=function(f){return f&&f.__esModule?f:{default:f}},HO=function(f){if(!BO.default(f))throw TypeError("Invalid UUID");return parseInt(f.slice(14,15),16)};Object.defineProperty($$,"__esModule",{value:!0});$$.default=void 0;var BO=qO(Cf()),VO=HO;$$.default=VO});var W1=Z((D)=>{var g=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(D,"__esModule",{value:!0});Object.defineProperty(D,"NIL",{enumerable:!0,get:function(){return bO.default}});Object.defineProperty(D,"parse",{enumerable:!0,get:function(){return uO.default}});Object.defineProperty(D,"stringify",{enumerable:!0,get:function(){return hO.default}});Object.defineProperty(D,"v1",{enumerable:!0,get:function(){return CO.default}});Object.defineProperty(D,"v3",{enumerable:!0,get:function(){return NO.default}});Object.defineProperty(D,"v4",{enumerable:!0,get:function(){return SO.default}});Object.defineProperty(D,"v5",{enumerable:!0,get:function(){return PO.default}});Object.defineProperty(D,"validate",{enumerable:!0,get:function(){return jO.default}});Object.defineProperty(D,"version",{enumerable:!0,get:function(){return cO.default}});var CO=g(VU()),NO=g(yU()),SO=g(rU()),PO=g(aU()),bO=g(U$()),cO=g(R$()),jO=g(Cf()),hO=g(Nf()),uO=g(R1())});var I1=Z((xT,O$)=>{var{defineProperty:$0,getOwnPropertyDescriptor:kO,getOwnPropertyNames:DO}=Object,_O=Object.prototype.hasOwnProperty,If=(f,w)=>$0(f,"name",{value:w,configurable:!0}),yO=(f,w)=>{for(var U in w)$0(f,U,{get:w[U],enumerable:!0})},vO=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of DO(w))if(!_O.call(f,$)&&$!==U)$0(f,$,{get:()=>w[$],enumerable:!(E=kO(w,$))||E.enumerable})}return f},xO=(f)=>vO($0({},"__esModule",{value:!0}),f),G$={};yO(G$,{isClockSkewCorrectedError:()=>W$,isClockSkewError:()=>lO,isRetryableByTrait:()=>rO,isServerError:()=>oO,isThrottlingError:()=>mO,isTransientError:()=>I$});O$.exports=xO(G$);var pO=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],dO=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],gO=["TimeoutError","RequestTimeout","RequestTimeoutException"],sO=[500,502,503,504],nO=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],rO=If((f)=>f.$retryable!==void 0,"isRetryableByTrait"),lO=If((f)=>pO.includes(f.name),"isClockSkewError"),W$=If((f)=>{var w;return(w=f.$metadata)==null?void 0:w.clockSkewCorrected},"isClockSkewCorrectedError"),mO=If((f)=>{var w,U;return((w=f.$metadata)==null?void 0:w.httpStatusCode)===429||dO.includes(f.name)||((U=f.$retryable)==null?void 0:U.throttling)==!0},"isThrottlingError"),I$=If((f)=>{var w;return W$(f)||gO.includes(f.name)||nO.includes((f==null?void 0:f.code)||"")||sO.includes(((w=f.$metadata)==null?void 0:w.httpStatusCode)||0)},"isTransientError"),oO=If((f)=>{var w;if(((w=f.$metadata)==null?void 0:w.httpStatusCode)!==void 0){const U=f.$metadata.httpStatusCode;if(500<=U&&U<=599&&!I$(f))return!0;return!1}return!1},"isServerError")});var q$=Z((pT,B$)=>{var{defineProperty:E0,getOwnPropertyDescriptor:iO,getOwnPropertyNames:tO}=Object,eO=Object.prototype.hasOwnProperty,_=(f,w)=>E0(f,"name",{value:w,configurable:!0}),aO=(f,w)=>{for(var U in w)E0(f,U,{get:w[U],enumerable:!0})},fL=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of tO(w))if(!eO.call(f,$)&&$!==U)E0(f,$,{get:()=>w[$],enumerable:!(E=iO(w,$))||E.enumerable})}return f},wL=(f)=>fL(E0({},"__esModule",{value:!0}),f),A$={};aO(A$,{AdaptiveRetryStrategy:()=>WL,ConfiguredRetryStrategy:()=>IL,DEFAULT_MAX_ATTEMPTS:()=>O1,DEFAULT_RETRY_DELAY_BASE:()=>Sf,DEFAULT_RETRY_MODE:()=>UL,DefaultRateLimiter:()=>T$,INITIAL_RETRY_TOKENS:()=>L1,INVOCATION_ID_HEADER:()=>EL,MAXIMUM_RETRY_DELAY:()=>A1,NO_RETRY_INCREMENT:()=>Q$,REQUEST_HEADER:()=>RL,RETRY_COST:()=>Z$,RETRY_MODES:()=>F$,StandardRetryStrategy:()=>F1,THROTTLING_RETRY_DELAY_BASE:()=>X$,TIMEOUT_RETRY_COST:()=>Y$});B$.exports=wL(A$);var F$=((f)=>{return f.STANDARD="standard",f.ADAPTIVE="adaptive",f})(F$||{}),O1=3,UL="standard",$L=I1(),M$=class f{constructor(w){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(w==null?void 0:w.beta)??0.7,this.minCapacity=(w==null?void 0:w.minCapacity)??1,this.minFillRate=(w==null?void 0:w.minFillRate)??0.5,this.scaleConstant=(w==null?void 0:w.scaleConstant)??0.4,this.smooth=(w==null?void 0:w.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(w){if(!this.enabled)return;if(this.refillTokenBucket(),w>this.currentCapacity){const U=(w-this.currentCapacity)/this.fillRate*1000;await new Promise((E)=>setTimeout(E,U))}this.currentCapacity=this.currentCapacity-w}refillTokenBucket(){const w=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=w;return}const U=(w-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=w}updateClientSendingRate(w){let U;if(this.updateMeasuredRate(),$L.isThrottlingError(w)){const $=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=$,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle($),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const E=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(E)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(w){return this.getPrecise(w*this.beta)}cubicSuccess(w){return this.getPrecise(this.scaleConstant*Math.pow(w-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(w){this.refillTokenBucket(),this.fillRate=Math.max(w,this.minFillRate),this.maxCapacity=Math.max(w,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const w=this.getCurrentTimeInSeconds(),U=Math.floor(w*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const E=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(E*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise(w){return parseFloat(w.toFixed(8))}};_(M$,"DefaultRateLimiter");var T$=M$,Sf=100,A1=20000,X$=500,L1=500,Z$=5,Y$=10,Q$=1,EL="amz-sdk-invocation-id",RL="amz-sdk-request",GL=_(()=>{let f=Sf;return{computeNextBackoffDelay:_((E)=>{return Math.floor(Math.min(A1,Math.random()*2**E*f))},"computeNextBackoffDelay"),setDelayBase:_((E)=>{f=E},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),L$=_(({retryDelay:f,retryCount:w,retryCost:U})=>{return{getRetryCount:_(()=>w,"getRetryCount"),getRetryDelay:_(()=>Math.min(A1,f),"getRetryDelay"),getRetryCost:_(()=>U,"getRetryCost")}},"createDefaultRetryToken"),J$=class f{constructor(w){this.maxAttempts=w,this.mode="standard",this.capacity=L1,this.retryBackoffStrategy=GL(),this.maxAttemptsProvider=typeof w==="function"?w:async()=>w}async acquireInitialRetryToken(w){return L$({retryDelay:Sf,retryCount:0})}async refreshRetryTokenForRetry(w,U){const E=await this.getMaxAttempts();if(this.shouldRetry(w,U,E)){const $=U.errorType;this.retryBackoffStrategy.setDelayBase($==="THROTTLING"?X$:Sf);const R=this.retryBackoffStrategy.computeNextBackoffDelay(w.getRetryCount()),G=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,R):R,W=this.getCapacityCost($);return this.capacity-=W,L$({retryDelay:G,retryCount:w.getRetryCount()+1,retryCost:W})}throw new Error("No retry token available")}recordSuccess(w){this.capacity=Math.max(L1,this.capacity+(w.getRetryCost()??Q$))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(w){return console.warn(`Max attempts provider could not resolve. Using default of ${O1}`),O1}}shouldRetry(w,U,E){return w.getRetryCount()+1<E&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost(w){return w==="TRANSIENT"?Y$:Z$}isRetryableError(w){return w==="THROTTLING"||w==="TRANSIENT"}};_(J$,"StandardRetryStrategy");var F1=J$,z$=class f{constructor(w,U){this.maxAttemptsProvider=w,this.mode="adaptive";const{rateLimiter:E}=U??{};this.rateLimiter=E??new T$,this.standardRetryStrategy=new F1(w)}async acquireInitialRetryToken(w){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(w)}async refreshRetryTokenForRetry(w,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry(w,U)}recordSuccess(w){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(w)}};_(z$,"AdaptiveRetryStrategy");var WL=z$,K$=class f extends F1{constructor(w,U=Sf){super(typeof w==="function"?w:async()=>w);if(typeof U==="number")this.computeNextBackoffDelay=()=>U;else this.computeNextBackoffDelay=U}async refreshRetryTokenForRetry(w,U){const E=await super.refreshRetryTokenForRetry(w,U);return E.getRetryDelay=()=>this.computeNextBackoffDelay(E.getRetryCount()),E}};_(K$,"ConfiguredRetryStrategy");var IL=K$});var Ff=Z((dT,r$)=>{var _$=function(f){const w=f.getUTCFullYear(),U=f.getUTCMonth(),E=f.getUTCDay(),$=f.getUTCDate(),R=f.getUTCHours(),G=f.getUTCMinutes(),W=f.getUTCSeconds(),I=$<10?`0${$}`:`${$}`,O=R<10?`0${R}`:`${R}`,L=G<10?`0${G}`:`${G}`,A=W<10?`0${W}`:`${W}`;return`${yL[E]}, ${I} ${q1[U]} ${w} ${O}:${L}:${A} GMT`},W0=function(f){return encodeURIComponent(f).replace(/[!'()*]/g,function(w){return"%"+w.charCodeAt(0).toString(16).toUpperCase()})},H1=function(f,w,U){let E,$,R;if(typeof w==="undefined"&&typeof U==="undefined")E={},R=f;else if(E=f,typeof w==="function")return $=w,R=U,YA(E,$,R);else R=w;for(let G of Object.keys(R)){if(!Array.isArray(R[G])){E[G]=R[G];continue}s$(E,null,R,G)}return E},n$=function(f,w,U){if(U<=0||!Number.isInteger(U))throw new Error("Invalid number of delimiters ("+U+") for splitEvery.");const E=f.split(w);if(U===1)return E;const $=[];let R="";for(let G=0;G<E.length;G++){if(R==="")R=E[G];else R+=w+E[G];if((G+1)%U===0)$.push(R),R=""}if(R!=="")$.push(R);return $},I0=Object.defineProperty,AL=Object.getOwnPropertyDescriptor,FL=Object.getOwnPropertyNames,ML=Object.prototype.hasOwnProperty,T=(f,w)=>I0(f,"name",{value:w,configurable:!0}),TL=(f,w)=>{for(var U in w)I0(f,U,{get:w[U],enumerable:!0})},XL=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of FL(w))if(!ML.call(f,$)&&$!==U)I0(f,$,{get:()=>w[$],enumerable:!(E=AL(w,$))||E.enumerable})}return f},ZL=(f)=>XL(I0({},"__esModule",{value:!0}),f),V$={};TL(V$,{Client:()=>QL,Command:()=>b$,LazyJsonString:()=>TA,NoOpLogger:()=>YL,SENSITIVE_STRING:()=>KL,ServiceException:()=>UA,StringWrapper:()=>hf,_json:()=>J1,collectBody:()=>JL,convertMap:()=>XA,createAggregatedClient:()=>BL,dateToUtcString:()=>_$,decorateServiceException:()=>v$,emitWarningIfUnsupportedVersion:()=>GA,expectBoolean:()=>HL,expectByte:()=>Q1,expectFloat32:()=>R0,expectInt:()=>CL,expectInt32:()=>Z1,expectLong:()=>cf,expectNonNull:()=>SL,expectNumber:()=>bf,expectObject:()=>j$,expectShort:()=>Y1,expectString:()=>PL,expectUnion:()=>bL,extendedEncodeURIComponent:()=>W0,getArrayIfSingleItem:()=>MA,getDefaultClientConfiguration:()=>AA,getDefaultExtensionConfiguration:()=>p$,getValueFromTextNode:()=>d$,handleFloat:()=>hL,limitedParseDouble:()=>B1,limitedParseFloat:()=>uL,limitedParseFloat32:()=>kL,loadConfigsForDefaultMode:()=>RA,logger:()=>jf,map:()=>H1,parseBoolean:()=>qL,parseEpochTimestamp:()=>lL,parseRfc3339DateTime:()=>xL,parseRfc3339DateTimeWithOffset:()=>dL,parseRfc7231DateTime:()=>rL,resolveDefaultRuntimeConfig:()=>FA,resolvedPath:()=>zA,serializeDateTime:()=>BA,serializeFloat:()=>KA,splitEvery:()=>n$,strictParseByte:()=>D$,strictParseDouble:()=>K1,strictParseFloat:()=>cL,strictParseFloat32:()=>h$,strictParseInt:()=>DL,strictParseInt32:()=>_L,strictParseLong:()=>k$,strictParseShort:()=>Of,take:()=>ZA,throwDefaultError:()=>x$,withBaseException:()=>$A});r$.exports=ZL(V$);var C$=class f{trace(){}debug(){}info(){}warn(){}error(){}};T(C$,"NoOpLogger");var YL=C$,N$=OL(),S$=class f{constructor(w){this.middlewareStack=N$.constructStack(),this.config=w}send(w,U,E){const $=typeof U!=="function"?U:void 0,R=typeof U==="function"?U:E,G=w.resolveMiddleware(this.middlewareStack,this.config,$);if(R)G(w).then((W)=>R(null,W.output),(W)=>R(W)).catch(()=>{});else return G(w).then((W)=>W.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};T(S$,"Client");var QL=S$,M1=LL(),JL=T(async(f=new Uint8Array,w)=>{if(f instanceof Uint8Array)return M1.Uint8ArrayBlobAdapter.mutate(f);if(!f)return M1.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const U=w.streamCollector(f);return M1.Uint8ArrayBlobAdapter.mutate(await U)},"collectBody"),X1=Bf(),P$=class f{constructor(){this.middlewareStack=N$.constructStack()}static classBuilder(){return new zL}resolveMiddlewareWithContext(w,U,E,{middlewareFn:$,clientName:R,commandName:G,inputFilterSensitiveLog:W,outputFilterSensitiveLog:I,smithyContext:O,additionalContext:L,CommandCtor:A}){for(let J of $.bind(this)(A,w,U,E))this.middlewareStack.use(J);const M=w.concat(this.middlewareStack),{logger:F}=U,X={logger:F,clientName:R,commandName:G,inputFilterSensitiveLog:W,outputFilterSensitiveLog:I,[X1.SMITHY_CONTEXT_KEY]:{commandInstance:this,...O},...L},{requestHandler:Y}=U;return M.resolve((J)=>Y.handle(J.request,E||{}),X)}};T(P$,"Command");var b$=P$,c$=class f{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(w)=>w,this._outputFilterSensitiveLog=(w)=>w,this._serializer=null,this._deserializer=null}init(w){this._init=w}ep(w){return this._ep=w,this}m(w){return this._middlewareFn=w,this}s(w,U,E={}){return this._smithyContext={service:w,operation:U,...E},this}c(w={}){return this._additionalContext=w,this}n(w,U){return this._clientName=w,this._commandName=U,this}f(w=(E)=>E,U=(E)=>E){return this._inputFilterSensitiveLog=w,this._outputFilterSensitiveLog=U,this}ser(w){return this._serializer=w,this}de(w){return this._deserializer=w,this}build(){var w;const U=this;let E;return E=(w=class extends b${constructor(...[$]){super();this.serialize=U._serializer,this.deserialize=U._deserializer,this.input=$??{},U._init(this)}static getEndpointParameterInstructions(){return U._ep}resolveMiddleware($,R,G){return this.resolveMiddlewareWithContext($,R,G,{CommandCtor:E,middlewareFn:U._middlewareFn,clientName:U._clientName,commandName:U._commandName,inputFilterSensitiveLog:U._inputFilterSensitiveLog,outputFilterSensitiveLog:U._outputFilterSensitiveLog,smithyContext:U._smithyContext,additionalContext:U._additionalContext})}},T(w,"CommandRef"),w)}};T(c$,"ClassBuilder");var zL=c$,KL="***SensitiveInformation***",BL=T((f,w)=>{for(let U of Object.keys(f)){const E=f[U],$=T(async function(G,W,I){const O=new E(G);if(typeof W==="function")this.send(O,W);else if(typeof I==="function"){if(typeof W!=="object")throw new Error(`Expected http options but got ${typeof W}`);this.send(O,W||{},I)}else return this.send(O,W)},"methodImpl"),R=(U[0].toLowerCase()+U.slice(1)).replace(/Command$/,"");w.prototype[R]=$}},"createAggregatedClient"),qL=T((f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},"parseBoolean"),HL=T((f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)jf.warn(G0(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){const w=f.toLowerCase();if(w==="false"||w==="true")jf.warn(G0(`Expected boolean, got ${typeof f}: ${f}`));if(w==="false")return!1;if(w==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},"expectBoolean"),bf=T((f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){const w=parseFloat(f);if(!Number.isNaN(w)){if(String(w)!==String(f))jf.warn(G0(`Expected number but observed string: ${f}`));return w}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},"expectNumber"),VL=Math.ceil(340282346638528860000000000000000000000),R0=T((f)=>{const w=bf(f);if(w!==void 0&&!Number.isNaN(w)&&w!==Infinity&&w!==(-Infinity)){if(Math.abs(w)>VL)throw new TypeError(`Expected 32-bit float, got ${f}`)}return w},"expectFloat32"),cf=T((f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},"expectLong"),CL=cf,Z1=T((f)=>z1(f,32),"expectInt32"),Y1=T((f)=>z1(f,16),"expectShort"),Q1=T((f)=>z1(f,8),"expectByte"),z1=T((f,w)=>{const U=cf(f);if(U!==void 0&&NL(U,w)!==U)throw new TypeError(`Expected ${w}-bit integer, got ${f}`);return U},"expectSizedInt"),NL=T((f,w)=>{switch(w){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},"castInt"),SL=T((f,w)=>{if(f===null||f===void 0){if(w)throw new TypeError(`Expected a non-null value for ${w}`);throw new TypeError("Expected a non-null value")}return f},"expectNonNull"),j$=T((f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;const w=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${w}: ${f}`)},"expectObject"),PL=T((f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return jf.warn(G0(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},"expectString"),bL=T((f)=>{if(f===null||f===void 0)return;const w=j$(f),U=Object.entries(w).filter(([,E])=>E!=null).map(([E])=>E);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 w},"expectUnion"),K1=T((f)=>{if(typeof f=="string")return bf(Af(f));return bf(f)},"strictParseDouble"),cL=K1,h$=T((f)=>{if(typeof f=="string")return R0(Af(f));return R0(f)},"strictParseFloat32"),jL=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Af=T((f)=>{const w=f.match(jL);if(w===null||w[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},"parseNumber"),B1=T((f)=>{if(typeof f=="string")return u$(f);return bf(f)},"limitedParseDouble"),hL=B1,uL=B1,kL=T((f)=>{if(typeof f=="string")return u$(f);return R0(f)},"limitedParseFloat32"),u$=T((f)=>{switch(f){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${f}`)}},"parseFloatString"),k$=T((f)=>{if(typeof f==="string")return cf(Af(f));return cf(f)},"strictParseLong"),DL=k$,_L=T((f)=>{if(typeof f==="string")return Z1(Af(f));return Z1(f)},"strictParseInt32"),Of=T((f)=>{if(typeof f==="string")return Y1(Af(f));return Y1(f)},"strictParseShort"),D$=T((f)=>{if(typeof f==="string")return Q1(Af(f));return Q1(f)},"strictParseByte"),G0=T((f)=>{return String(new TypeError(f).stack||f).split("\n").slice(0,5).filter((w)=>!w.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),jf={warn:console.warn},yL=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],q1=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];T(_$,"dateToUtcString");var vL=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),xL=T((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const w=vL.exec(f);if(!w)throw new TypeError("Invalid RFC-3339 date-time value");const[U,E,$,R,G,W,I,O]=w,L=Of(Lf(E)),A=x($,"month",1,12),M=x(R,"day",1,31);return Pf(L,A,M,{hours:G,minutes:W,seconds:I,fractionalMilliseconds:O})},"parseRfc3339DateTime"),pL=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),dL=T((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const w=pL.exec(f);if(!w)throw new TypeError("Invalid RFC-3339 date-time value");const[U,E,$,R,G,W,I,O,L]=w,A=Of(Lf(E)),M=x($,"month",1,12),F=x(R,"day",1,31),X=Pf(A,M,F,{hours:G,minutes:W,seconds:I,fractionalMilliseconds:O});if(L.toUpperCase()!="Z")X.setTime(X.getTime()-wA(L));return X},"parseRfc3339DateTimeWithOffset"),gL=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$/),sL=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$/),nL=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})$/),rL=T((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let w=gL.exec(f);if(w){const[U,E,$,R,G,W,I,O]=w;return Pf(Of(Lf(R)),T1($),x(E,"day",1,31),{hours:G,minutes:W,seconds:I,fractionalMilliseconds:O})}if(w=sL.exec(f),w){const[U,E,$,R,G,W,I,O]=w;return iL(Pf(mL(R),T1($),x(E,"day",1,31),{hours:G,minutes:W,seconds:I,fractionalMilliseconds:O}))}if(w=nL.exec(f),w){const[U,E,$,R,G,W,I,O]=w;return Pf(Of(Lf(O)),T1(E),x($.trimLeft(),"day",1,31),{hours:R,minutes:G,seconds:W,fractionalMilliseconds:I})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),lL=T((f)=>{if(f===null||f===void 0)return;let w;if(typeof f==="number")w=f;else if(typeof f==="string")w=K1(f);else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(w)||w===Infinity||w===(-Infinity))throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(w*1000))},"parseEpochTimestamp"),Pf=T((f,w,U,E)=>{const $=w-1;return eL(f,$,U),new Date(Date.UTC(f,$,U,x(E.hours,"hour",0,23),x(E.minutes,"minute",0,59),x(E.seconds,"seconds",0,60),fA(E.fractionalMilliseconds)))},"buildDate"),mL=T((f)=>{const w=(new Date()).getUTCFullYear(),U=Math.floor(w/100)*100+Of(Lf(f));if(U<w)return U+100;return U},"parseTwoDigitYear"),oL=1576800000000,iL=T((f)=>{if(f.getTime()-(new Date()).getTime()>oL)return new Date(Date.UTC(f.getUTCFullYear()-100,f.getUTCMonth(),f.getUTCDate(),f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()));return f},"adjustRfc850Year"),T1=T((f)=>{const w=q1.indexOf(f);if(w<0)throw new TypeError(`Invalid month: ${f}`);return w+1},"parseMonthByShortName"),tL=[31,28,31,30,31,30,31,31,30,31,30,31],eL=T((f,w,U)=>{let E=tL[w];if(w===1&&aL(f))E=29;if(U>E)throw new TypeError(`Invalid day for ${q1[w]} in ${f}: ${U}`)},"validateDayOfMonth"),aL=T((f)=>{return f%4===0&&(f%100!==0||f%400===0)},"isLeapYear"),x=T((f,w,U,E)=>{const $=D$(Lf(f));if($<U||$>E)throw new TypeError(`${w} must be between ${U} and ${E}, inclusive`);return $},"parseDateValue"),fA=T((f)=>{if(f===null||f===void 0)return 0;return h$("0."+f)*1000},"parseMilliseconds"),wA=T((f)=>{const w=f[0];let U=1;if(w=="+")U=1;else if(w=="-")U=-1;else throw new TypeError(`Offset direction, ${w}, must be "+" or "-"`);const E=Number(f.substring(1,3)),$=Number(f.substring(4,6));return U*(E*60+$)*60*1000},"parseOffsetToMilliseconds"),Lf=T((f)=>{let w=0;while(w<f.length-1&&f.charAt(w)==="0")w++;if(w===0)return f;return f.slice(w)},"stripLeadingZeroes"),y$=class f extends Error{constructor(w){super(w.message);Object.setPrototypeOf(this,f.prototype),this.name=w.name,this.$fault=w.$fault,this.$metadata=w.$metadata}};T(y$,"ServiceException");var UA=y$,v$=T((f,w={})=>{Object.entries(w).filter(([,E])=>E!==void 0).forEach(([E,$])=>{if(f[E]==null||f[E]==="")f[E]=$});const U=f.message||f.Message||"UnknownError";return f.message=U,delete f.Message,f},"decorateServiceException"),x$=T(({output:f,parsedBody:w,exceptionCtor:U,errorCode:E})=>{const $=EA(f),R=$.httpStatusCode?$.httpStatusCode+"":void 0,G=new U({name:(w==null?void 0:w.code)||(w==null?void 0:w.Code)||E||R||"UnknownError",$fault:"client",$metadata:$});throw v$(G,w)},"throwDefaultError"),$A=T((f)=>{return({output:w,parsedBody:U,errorCode:E})=>{x$({output:w,parsedBody:U,exceptionCtor:f,errorCode:E})}},"withBaseException"),EA=T((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),RA=T((f)=>{switch(f){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"),H$=!1,GA=T((f)=>{if(f&&!H$&&parseInt(f.substring(1,f.indexOf(".")))<16)H$=!0},"emitWarningIfUnsupportedVersion"),WA=T((f)=>{const w=[];for(let U in X1.AlgorithmId){const E=X1.AlgorithmId[U];if(f[E]===void 0)continue;w.push({algorithmId:()=>E,checksumConstructor:()=>f[E]})}return{_checksumAlgorithms:w,addChecksumAlgorithm(U){this._checksumAlgorithms.push(U)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),IA=T((f)=>{const w={};return f.checksumAlgorithms().forEach((U)=>{w[U.algorithmId()]=U.checksumConstructor()}),w},"resolveChecksumRuntimeConfig"),OA=T((f)=>{let w=f.retryStrategy;return{setRetryStrategy(U){w=U},retryStrategy(){return w}}},"getRetryConfiguration"),LA=T((f)=>{const w={};return w.retryStrategy=f.retryStrategy(),w},"resolveRetryRuntimeConfig"),p$=T((f)=>{return{...WA(f),...OA(f)}},"getDefaultExtensionConfiguration"),AA=p$,FA=T((f)=>{return{...IA(f),...LA(f)}},"resolveDefaultRuntimeConfig");T(W0,"extendedEncodeURIComponent");var MA=T((f)=>Array.isArray(f)?f:[f],"getArrayIfSingleItem"),d$=T((f)=>{for(let U in f)if(f.hasOwnProperty(U)&&f[U]["#text"]!==void 0)f[U]=f[U]["#text"];else if(typeof f[U]==="object"&&f[U]!==null)f[U]=d$(f[U]);return f},"getValueFromTextNode"),hf=T(function(){const f=Object.getPrototypeOf(this).constructor,U=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(U,f.prototype),U},"StringWrapper");hf.prototype=Object.create(String.prototype,{constructor:{value:hf,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(hf,String);var g$=class f extends hf{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(w){if(w instanceof f)return w;else if(w instanceof String||typeof w==="string")return new f(w);return new f(JSON.stringify(w))}};T(g$,"LazyJsonString");var TA=g$;T(H1,"map");var XA=T((f)=>{const w={};for(let[U,E]of Object.entries(f||{}))w[U]=[,E];return w},"convertMap"),ZA=T((f,w)=>{const U={};for(let E in w)s$(U,f,w,E);return U},"take"),YA=T((f,w,U)=>{return H1(f,Object.entries(U).reduce((E,[$,R])=>{if(Array.isArray(R))E[$]=R;else if(typeof R==="function")E[$]=[w,R()];else E[$]=[w,R];return E},{}))},"mapWithFilter"),s$=T((f,w,U,E)=>{if(w!==null){let G=U[E];if(typeof G==="function")G=[,G];const[W=QA,I=JA,O=E]=G;if(typeof W==="function"&&W(w[O])||typeof W!=="function"&&!!W)f[E]=I(w[O]);return}let[$,R]=U[E];if(typeof R==="function"){let G;const W=$===void 0&&(G=R())!=null,I=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(W)f[E]=G;else if(I)f[E]=R()}else{const G=$===void 0&&R!=null,W=typeof $==="function"&&!!$(R)||typeof $!=="function"&&!!$;if(G||W)f[E]=R}},"applyInstruction"),QA=T((f)=>f!=null,"nonNullish"),JA=T((f)=>f,"pass"),zA=T((f,w,U,E,$,R)=>{if(w!=null&&w[U]!==void 0){const G=E();if(G.length<=0)throw new Error("Empty value provided for input HTTP label: "+U+".");f=f.replace($,R?G.split("/").map((W)=>W0(W)).join("/"):W0(G))}else throw new Error("No value provided for input HTTP label: "+U+".");return f},"resolvedPath"),KA=T((f)=>{if(f!==f)return"NaN";switch(f){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return f}},"serializeFloat"),BA=T((f)=>f.toISOString().replace(".000Z","Z"),"serializeDateTime"),J1=T((f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((w)=>w!=null).map(J1);if(typeof f==="object"){const w={};for(let U of Object.keys(f)){if(f[U]==null)continue;w[U]=J1(f[U])}return w}return f},"_json");T(n$,"splitEvery")});var o$=Z((l$)=>{Object.defineProperty(l$,"__esModule",{value:!0});l$.isStreamingPayload=void 0;var qA=import.meta.require("stream"),HA=(f)=>(f===null||f===void 0?void 0:f.body)instanceof qA.Readable||typeof ReadableStream!=="undefined"&&(f===null||f===void 0?void 0:f.body)instanceof ReadableStream;l$.isStreamingPayload=HA});var ME=Z((nT,FE)=>{var{defineProperty:O0,getOwnPropertyDescriptor:VA,getOwnPropertyNames:CA}=Object,NA=Object.prototype.hasOwnProperty,H=(f,w)=>O0(f,"name",{value:w,configurable:!0}),SA=(f,w)=>{for(var U in w)O0(f,U,{get:w[U],enumerable:!0})},PA=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of CA(w))if(!NA.call(f,$)&&$!==U)O0(f,$,{get:()=>w[$],enumerable:!(E=VA(w,$))||E.enumerable})}return f},bA=(f)=>PA(O0({},"__esModule",{value:!0}),f),t$={};SA(t$,{AdaptiveRetryStrategy:()=>hA,CONFIG_MAX_ATTEMPTS:()=>C1,CONFIG_RETRY_MODE:()=>GE,ENV_MAX_ATTEMPTS:()=>V1,ENV_RETRY_MODE:()=>RE,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>uA,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>DA,StandardRetryStrategy:()=>$E,defaultDelayDecider:()=>a$,defaultRetryDecider:()=>fE,getOmitRetryHeadersPlugin:()=>_A,getRetryAfterHint:()=>AE,getRetryPlugin:()=>gA,omitRetryHeadersMiddleware:()=>WE,omitRetryHeadersMiddlewareOptions:()=>IE,resolveRetryConfig:()=>kA,retryMiddleware:()=>OE,retryMiddlewareOptions:()=>LE});FE.exports=bA(t$);var Mf=Tf(),e$=W1(),B=q$(),cA=H((f,w)=>{const U=f,E=(w==null?void 0:w.noRetryIncrement)??B.NO_RETRY_INCREMENT,$=(w==null?void 0:w.retryCost)??B.RETRY_COST,R=(w==null?void 0:w.timeoutRetryCost)??B.TIMEOUT_RETRY_COST;let G=f;const W=H((A)=>A.name==="TimeoutError"?R:$,"getCapacityAmount"),I=H((A)=>W(A)<=G,"hasRetryTokens");return Object.freeze({hasRetryTokens:I,retrieveRetryTokens:H((A)=>{if(!I(A))throw new Error("No retry token available");const M=W(A);return G-=M,M},"retrieveRetryTokens"),releaseRetryTokens:H((A)=>{G+=A??E,G=Math.min(G,U)},"releaseRetryTokens")})},"getDefaultRetryQuota"),a$=H((f,w)=>Math.floor(Math.min(B.MAXIMUM_RETRY_DELAY,Math.random()*2**w*f)),"defaultDelayDecider"),r=I1(),fE=H((f)=>{if(!f)return!1;return r.isRetryableByTrait(f)||r.isClockSkewError(f)||r.isThrottlingError(f)||r.isTransientError(f)},"defaultRetryDecider"),wE=H((f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)},"asSdkError"),UE=class f{constructor(w,U){this.maxAttemptsProvider=w,this.mode=B.RETRY_MODES.STANDARD,this.retryDecider=(U==null?void 0:U.retryDecider)??fE,this.delayDecider=(U==null?void 0:U.delayDecider)??a$,this.retryQuota=(U==null?void 0:U.retryQuota)??cA(B.INITIAL_RETRY_TOKENS)}shouldRetry(w,U,E){return U<E&&this.retryDecider(w)&&this.retryQuota.hasRetryTokens(w)}async getMaxAttempts(){let w;try{w=await this.maxAttemptsProvider()}catch(U){w=B.DEFAULT_MAX_ATTEMPTS}return w}async retry(w,U,E){let $,R=0,G=0;const W=await this.getMaxAttempts(),{request:I}=U;if(Mf.HttpRequest.isInstance(I))I.headers[B.INVOCATION_ID_HEADER]=e$.v4();while(!0)try{if(Mf.HttpRequest.isInstance(I))I.headers[B.REQUEST_HEADER]=`attempt=${R+1}; max=${W}`;if(E==null?void 0:E.beforeRequest)await E.beforeRequest();const{response:O,output:L}=await w(U);if(E==null?void 0:E.afterRequest)E.afterRequest(O);return this.retryQuota.releaseRetryTokens($),L.$metadata.attempts=R+1,L.$metadata.totalRetryDelay=G,{response:O,output:L}}catch(O){const L=wE(O);if(R++,this.shouldRetry(L,R,W)){$=this.retryQuota.retrieveRetryTokens(L);const A=this.delayDecider(r.isThrottlingError(L)?B.THROTTLING_RETRY_DELAY_BASE:B.DEFAULT_RETRY_DELAY_BASE,R),M=jA(L.$response),F=Math.max(M||0,A);G+=F,await new Promise((X)=>setTimeout(X,F));continue}if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=R,L.$metadata.totalRetryDelay=G,L}}};H(UE,"StandardRetryStrategy");var $E=UE,jA=H((f)=>{if(!Mf.HttpResponse.isInstance(f))return;const w=Object.keys(f.headers).find((R)=>R.toLowerCase()==="retry-after");if(!w)return;const U=f.headers[w],E=Number(U);if(!Number.isNaN(E))return E*1000;return new Date(U).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),EE=class f extends $E{constructor(w,U){const{rateLimiter:E,...$}=U??{};super(w,$);this.rateLimiter=E??new B.DefaultRateLimiter,this.mode=B.RETRY_MODES.ADAPTIVE}async retry(w,U){return super.retry(w,U,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(E)=>{this.rateLimiter.updateClientSendingRate(E)}})}};H(EE,"AdaptiveRetryStrategy");var hA=EE,i$=v(),V1="AWS_MAX_ATTEMPTS",C1="max_attempts",uA={environmentVariableSelector:(f)=>{const w=f[V1];if(!w)return;const U=parseInt(w);if(Number.isNaN(U))throw new Error(`Environment variable ${V1} mast be a number, got "${w}"`);return U},configFileSelector:(f)=>{const w=f[C1];if(!w)return;const U=parseInt(w);if(Number.isNaN(U))throw new Error(`Shared config file entry ${C1} mast be a number, got "${w}"`);return U},default:B.DEFAULT_MAX_ATTEMPTS},kA=H((f)=>{const{retryStrategy:w}=f,U=i$.normalizeProvider(f.maxAttempts??B.DEFAULT_MAX_ATTEMPTS);return{...f,maxAttempts:U,retryStrategy:async()=>{if(w)return w;if(await i$.normalizeProvider(f.retryMode)()===B.RETRY_MODES.ADAPTIVE)return new B.AdaptiveRetryStrategy(U);return new B.StandardRetryStrategy(U)}}},"resolveRetryConfig"),RE="AWS_RETRY_MODE",GE="retry_mode",DA={environmentVariableSelector:(f)=>f[RE],configFileSelector:(f)=>f[GE],default:B.DEFAULT_RETRY_MODE},WE=H(()=>(f)=>async(w)=>{const{request:U}=w;if(Mf.HttpRequest.isInstance(U))delete U.headers[B.INVOCATION_ID_HEADER],delete U.headers[B.REQUEST_HEADER];return f(w)},"omitRetryHeadersMiddleware"),IE={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},_A=H((f)=>({applyToStack:(w)=>{w.addRelativeTo(WE(),IE)}}),"getOmitRetryHeadersPlugin"),yA=Ff(),vA=o$(),OE=H((f)=>(w,U)=>async(E)=>{var $;let R=await f.retryStrategy();const G=await f.maxAttempts();if(xA(R)){R=R;let W=await R.acquireInitialRetryToken(U.partition_id),I=new Error,O=0,L=0;const{request:A}=E,M=Mf.HttpRequest.isInstance(A);if(M)A.headers[B.INVOCATION_ID_HEADER]=e$.v4();while(!0)try{if(M)A.headers[B.REQUEST_HEADER]=`attempt=${O+1}; max=${G}`;const{response:F,output:X}=await w(E);return R.recordSuccess(W),X.$metadata.attempts=O+1,X.$metadata.totalRetryDelay=L,{response:F,output:X}}catch(F){const X=pA(F);if(I=wE(F),M&&vA.isStreamingPayload(A))throw($=U.logger instanceof yA.NoOpLogger?console:U.logger)==null||$.warn("An error was encountered in a non-retryable streaming request."),I;try{W=await R.refreshRetryTokenForRetry(W,X)}catch(J){if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=O+1,I.$metadata.totalRetryDelay=L,I}O=W.getRetryCount();const Y=W.getRetryDelay();L+=Y,await new Promise((J)=>setTimeout(J,Y))}}else{if(R=R,R==null?void 0:R.mode)U.userAgent=[...U.userAgent||[],["cfg/retry-mode",R.mode]];return R.retry(w,E)}},"retryMiddleware"),xA=H((f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined","isRetryStrategyV2"),pA=H((f)=>{const w={error:f,errorType:dA(f)},U=AE(f.$response);if(U)w.retryAfterHint=U;return w},"getRetryErrorInfo"),dA=H((f)=>{if(r.isThrottlingError(f))return"THROTTLING";if(r.isTransientError(f))return"TRANSIENT";if(r.isServerError(f))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),LE={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},gA=H((f)=>({applyToStack:(w)=>{w.add(OE(f),LE)}}),"getRetryPlugin"),AE=H((f)=>{if(!Mf.HttpResponse.isInstance(f))return;const w=Object.keys(f.headers).find((R)=>R.toLowerCase()==="retry-after");if(!w)return;const U=f.headers[w],E=Number(U);if(!Number.isNaN(E))return new Date(E*1000);return new Date(U)},"getRetryAfterHint")});var S1=Z((rT,jE)=>{var ZE=function(f){const w=new Map;for(let U of f)w.set(U.schemeId,U);return w},SE=function(f,w){return new bE(f,w)},cE=function(f,w,U,E,$){return K(async function*R(G,W,...I){let O=G.startingToken||void 0,L=!0,A;while(L){if(W[U]=O,$)W[$]=W[$]??G.pageSize;if(G.client instanceof f)A=await M2(w,G.client,W,...I);else throw new Error(`Invalid client, expected instance of ${f.name}`);yield A;const M=O;O=T2(A,E),L=!!(O&&(!G.stopOnSameToken||O!==M))}return},"paginateOperation")},A0=Object.defineProperty,sA=Object.getOwnPropertyDescriptor,nA=Object.getOwnPropertyNames,rA=Object.prototype.hasOwnProperty,K=(f,w)=>A0(f,"name",{value:w,configurable:!0}),lA=(f,w)=>{for(var U in w)A0(f,U,{get:w[U],enumerable:!0})},mA=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of nA(w))if(!rA.call(f,$)&&$!==U)A0(f,$,{get:()=>w[$],enumerable:!(E=sA(w,$))||E.enumerable})}return f},oA=(f)=>mA(A0({},"__esModule",{value:!0}),f),TE={};lA(TE,{DefaultIdentityProviderConfig:()=>E2,EXPIRATION_MS:()=>CE,HttpApiKeyAuthSigner:()=>R2,HttpBearerAuthSigner:()=>G2,NoAuthSigner:()=>W2,RequestBuilder:()=>bE,createIsIdentityExpiredFunction:()=>VE,createPaginator:()=>cE,doesIdentityRequireRefresh:()=>NE,getHttpAuthSchemeEndpointRuleSetPlugin:()=>tA,getHttpAuthSchemePlugin:()=>aA,getHttpSigningPlugin:()=>$2,getSmithyContext:()=>L2,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>YE,httpAuthSchemeMiddleware:()=>N1,httpAuthSchemeMiddlewareOptions:()=>QE,httpSigningMiddleware:()=>JE,httpSigningMiddlewareOptions:()=>zE,isIdentityExpired:()=>I2,memoizeIdentityProvider:()=>O2,normalizeProvider:()=>A2,requestBuilder:()=>SE});jE.exports=oA(TE);var XE=v();K(ZE,"convertHttpAuthSchemesToMap");var N1=K((f,w)=>(U,E)=>async($)=>{var R;const G=f.httpAuthSchemeProvider(await w.httpAuthSchemeParametersProvider(f,E,$.input)),W=ZE(f.httpAuthSchemes),I=XE.getSmithyContext(E),O=[];for(let L of G){const A=W.get(L.schemeId);if(!A){O.push(`HttpAuthScheme \`${L.schemeId}\` was not enabled for this service.`);continue}const M=A.identityProvider(await w.identityProviderConfigProvider(f));if(!M){O.push(`HttpAuthScheme \`${L.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:F={},signingProperties:X={}}=((R=L.propertiesExtractor)==null?void 0:R.call(L,f,E))||{};L.identityProperties=Object.assign(L.identityProperties||{},F),L.signingProperties=Object.assign(L.signingProperties||{},X),I.selectedHttpAuthScheme={httpAuthOption:L,identity:await M(L.identityProperties),signer:A.signer};break}if(!I.selectedHttpAuthScheme)throw new Error(O.join("\n"));return U($)},"httpAuthSchemeMiddleware"),iA=FU(),YE={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:iA.endpointMiddlewareOptions.name},tA=K((f,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:U})=>({applyToStack:(E)=>{E.addRelativeTo(N1(f,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:U}),YE)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),eA=sf(),QE={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:eA.serializerMiddlewareOption.name},aA=K((f,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:U})=>({applyToStack:(E)=>{E.addRelativeTo(N1(f,{httpAuthSchemeParametersProvider:w,identityProviderConfigProvider:U}),QE)}}),"getHttpAuthSchemePlugin"),F0=Tf(),f2=K((f)=>(w)=>{throw w},"defaultErrorHandler"),w2=K((f,w)=>{},"defaultSuccessHandler"),JE=K((f)=>(w,U)=>async(E)=>{if(!F0.HttpRequest.isInstance(E.request))return w(E);const R=XE.getSmithyContext(U).selectedHttpAuthScheme;if(!R)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:G={}},identity:W,signer:I}=R,O=await w({...E,request:await I.sign(E.request,W,G)}).catch((I.errorHandler||f2)(G));return(I.successHandler||w2)(O.response,G),O},"httpSigningMiddleware"),U2=ME(),zE={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:U2.retryMiddlewareOptions.name},$2=K((f)=>({applyToStack:(w)=>{w.addRelativeTo(JE(f),zE)}}),"getHttpSigningPlugin"),KE=class f{constructor(w){this.authSchemes=new Map;for(let[U,E]of Object.entries(w))if(E!==void 0)this.authSchemes.set(U,E)}getIdentityProvider(w){return this.authSchemes.get(w)}};K(KE,"DefaultIdentityProviderConfig");var E2=KE,L0=Bf(),BE=class f{async sign(w,U,E){if(!E)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!E.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!E.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 $=F0.HttpRequest.clone(w);if(E.in===L0.HttpApiKeyAuthLocation.QUERY)$.query[E.name]=U.apiKey;else if(E.in===L0.HttpApiKeyAuthLocation.HEADER)$.headers[E.name]=E.scheme?`${E.scheme} ${U.apiKey}`:U.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+E.in+"`");return $}};K(BE,"HttpApiKeyAuthSigner");var R2=BE,qE=class f{async sign(w,U,E){const $=F0.HttpRequest.clone(w);if(!U.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return $.headers.Authorization=`Bearer ${U.token}`,$}};K(qE,"HttpBearerAuthSigner");var G2=qE,HE=class f{async sign(w,U,E){return w}};K(HE,"NoAuthSigner");var W2=HE,VE=K((f)=>(w)=>NE(w)&&w.expiration.getTime()-Date.now()<f,"createIsIdentityExpiredFunction"),CE=300000,I2=VE(CE),NE=K((f)=>f.expiration!==void 0,"doesIdentityRequireRefresh"),O2=K((f,w,U)=>{if(f===void 0)return;const E=typeof f!=="function"?async()=>Promise.resolve(f):f;let $,R,G,W=!1;const I=K(async(O)=>{if(!R)R=E(O);try{$=await R,G=!0,W=!1}finally{R=void 0}return $},"coalesceProvider");if(w===void 0)return async(O)=>{if(!G||(O==null?void 0:O.forceRefresh))$=await I(O);return $};return async(O)=>{if(!G||(O==null?void 0:O.forceRefresh))$=await I(O);if(W)return $;if(!U($))return W=!0,$;if(w($))return await I(O),$;return $}},"memoizeIdentityProvider"),L2=K((f)=>f[L0.SMITHY_CONTEXT_KEY]||(f[L0.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),A2=K((f)=>{if(typeof f==="function")return f;const w=Promise.resolve(f);return()=>w},"normalizeProvider"),F2=Ff();K(SE,"requestBuilder");var PE=class f{constructor(w,U){this.input=w,this.context=U,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:w,protocol:U="https",port:E,path:$}=await this.context.endpoint();this.path=$;for(let R of this.resolvePathStack)R(this.path);return new F0.HttpRequest({protocol:U,hostname:this.hostname||w,port:E,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(w){return this.hostname=w,this}bp(w){return this.resolvePathStack.push((U)=>{this.path=`${(U==null?void 0:U.endsWith("/"))?U.slice(0,-1):U||""}`+w}),this}p(w,U,E,$){return this.resolvePathStack.push((R)=>{this.path=F2.resolvedPath(R,this.input,w,U,E,$)}),this}h(w){return this.headers=w,this}q(w){return this.query=w,this}b(w){return this.body=w,this}m(w){return this.method=w,this}};K(PE,"RequestBuilder");var bE=PE,M2=K(async(f,w,U,...E)=>{return await w.send(new f(U),...E)},"makePagedClientRequest");K(cE,"createPaginator");var T2=K((f,w)=>{let U=f;const E=w.split(".");for(let $ of E){if(!U||typeof U!=="object")return;U=U[$]}return U},"get")});var eR=Z((eY,c0)=>{var VR,CR,NR,SR,PR,bR,cR,jR,hR,uR,kR,DR,_R,P0,m1,yR,vR,xR,Jf,pR,dR,gR,sR,nR,rR,lR,mR,oR,b0,iR,tR;(function(f){var w=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(E){f(U(w,U(E)))});else if(typeof c0==="object"&&typeof eY==="object")f(U(w,U(eY)));else f(U(w));function U(E,$){if(E!==w)if(typeof Object.create==="function")Object.defineProperty(E,"__esModule",{value:!0});else E.__esModule=!0;return function(R,G){return E[R]=$?$(R,G):G}}})(function(f){var w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,R){$.__proto__=R}||function($,R){for(var G in R)if(Object.prototype.hasOwnProperty.call(R,G))$[G]=R[G]};VR=function($,R){if(typeof R!=="function"&&R!==null)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");w($,R);function G(){this.constructor=$}$.prototype=R===null?Object.create(R):(G.prototype=R.prototype,new G)},CR=Object.assign||function($){for(var R,G=1,W=arguments.length;G<W;G++){R=arguments[G];for(var I in R)if(Object.prototype.hasOwnProperty.call(R,I))$[I]=R[I]}return $},NR=function($,R){var G={};for(var W in $)if(Object.prototype.hasOwnProperty.call($,W)&&R.indexOf(W)<0)G[W]=$[W];if($!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var I=0,W=Object.getOwnPropertySymbols($);I<W.length;I++)if(R.indexOf(W[I])<0&&Object.prototype.propertyIsEnumerable.call($,W[I]))G[W[I]]=$[W[I]]}return G},SR=function($,R,G,W){var I=arguments.length,O=I<3?R:W===null?W=Object.getOwnPropertyDescriptor(R,G):W,L;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")O=Reflect.decorate($,R,G,W);else for(var A=$.length-1;A>=0;A--)if(L=$[A])O=(I<3?L(O):I>3?L(R,G,O):L(R,G))||O;return I>3&&O&&Object.defineProperty(R,G,O),O},PR=function($,R){return function(G,W){R(G,W,$)}},bR=function($,R,G,W,I,O){function L(t){if(t!==void 0&&typeof t!=="function")throw new TypeError("Function expected");return t}var A=W.kind,M=A==="getter"?"get":A==="setter"?"set":"value",F=!R&&$?W.static?$:$.prototype:null,X=R||(F?Object.getOwnPropertyDescriptor(F,W.name):{}),Y,J=!1;for(var Q=G.length-1;Q>=0;Q--){var N={};for(var P in W)N[P]=P==="access"?{}:W[P];for(var P in W.access)N.access[P]=W.access[P];N.addInitializer=function(t){if(J)throw new TypeError("Cannot add initializers after decoration has completed");O.push(L(t||null))};var d=G[Q](A==="accessor"?{get:X.get,set:X.set}:X[M],N);if(A==="accessor"){if(d===void 0)continue;if(d===null||typeof d!=="object")throw new TypeError("Object expected");if(Y=L(d.get))X.get=Y;if(Y=L(d.set))X.set=Y;if(Y=L(d.init))I.unshift(Y)}else if(Y=L(d))if(A==="field")I.unshift(Y);else X[M]=Y}if(F)Object.defineProperty(F,W.name,X);J=!0},cR=function($,R,G){var W=arguments.length>2;for(var I=0;I<R.length;I++)G=W?R[I].call($,G):R[I].call($);return W?G:void 0},jR=function($){return typeof $==="symbol"?$:"".concat($)},hR=function($,R,G){if(typeof R==="symbol")R=R.description?"[".concat(R.description,"]"):"";return Object.defineProperty($,"name",{configurable:!0,value:G?"".concat(G," ",R):R})},uR=function($,R){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata($,R)},kR=function($,R,G,W){function I(O){return O instanceof G?O:new G(function(L){L(O)})}return new(G||(G=Promise))(function(O,L){function A(X){try{F(W.next(X))}catch(Y){L(Y)}}function M(X){try{F(W.throw(X))}catch(Y){L(Y)}}function F(X){X.done?O(X.value):I(X.value).then(A,M)}F((W=W.apply($,R||[])).next())})},DR=function($,R){var G={label:0,sent:function(){if(O[0]&1)throw O[1];return O[1]},trys:[],ops:[]},W,I,O,L;return L={next:A(0),throw:A(1),return:A(2)},typeof Symbol==="function"&&(L[Symbol.iterator]=function(){return this}),L;function A(F){return function(X){return M([F,X])}}function M(F){if(W)throw new TypeError("Generator is already executing.");while(L&&(L=0,F[0]&&(G=0)),G)try{if(W=1,I&&(O=F[0]&2?I.return:F[0]?I.throw||((O=I.return)&&O.call(I),0):I.next)&&!(O=O.call(I,F[1])).done)return O;if(I=0,O)F=[F[0]&2,O.value];switch(F[0]){case 0:case 1:O=F;break;case 4:return G.label++,{value:F[1],done:!1};case 5:G.label++,I=F[1],F=[0];continue;case 7:F=G.ops.pop(),G.trys.pop();continue;default:if((O=G.trys,!(O=O.length>0&&O[O.length-1]))&&(F[0]===6||F[0]===2)){G=0;continue}if(F[0]===3&&(!O||F[1]>O[0]&&F[1]<O[3])){G.label=F[1];break}if(F[0]===6&&G.label<O[1]){G.label=O[1],O=F;break}if(O&&G.label<O[2]){G.label=O[2],G.ops.push(F);break}if(O[2])G.ops.pop();G.trys.pop();continue}F=R.call($,G)}catch(X){F=[6,X],I=0}finally{W=O=0}if(F[0]&5)throw F[1];return{value:F[0]?F[1]:void 0,done:!0}}},_R=function($,R){for(var G in $)if(G!=="default"&&!Object.prototype.hasOwnProperty.call(R,G))b0(R,$,G)},b0=Object.create?function($,R,G,W){if(W===void 0)W=G;var I=Object.getOwnPropertyDescriptor(R,G);if(!I||("get"in I?!R.__esModule:I.writable||I.configurable))I={enumerable:!0,get:function(){return R[G]}};Object.defineProperty($,W,I)}:function($,R,G,W){if(W===void 0)W=G;$[W]=R[G]},P0=function($){var R=typeof Symbol==="function"&&Symbol.iterator,G=R&&$[R],W=0;if(G)return G.call($);if($&&typeof $.length==="number")return{next:function(){if($&&W>=$.length)$=void 0;return{value:$&&$[W++],done:!$}}};throw new TypeError(R?"Object is not iterable.":"Symbol.iterator is not defined.")},m1=function($,R){var G=typeof Symbol==="function"&&$[Symbol.iterator];if(!G)return $;var W=G.call($),I,O=[],L;try{while((R===void 0||R-- >0)&&!(I=W.next()).done)O.push(I.value)}catch(A){L={error:A}}finally{try{if(I&&!I.done&&(G=W.return))G.call(W)}finally{if(L)throw L.error}}return O},yR=function(){for(var $=[],R=0;R<arguments.length;R++)$=$.concat(m1(arguments[R]));return $},vR=function(){for(var $=0,R=0,G=arguments.length;R<G;R++)$+=arguments[R].length;for(var W=Array($),I=0,R=0;R<G;R++)for(var O=arguments[R],L=0,A=O.length;L<A;L++,I++)W[I]=O[L];return W},xR=function($,R,G){if(G||arguments.length===2){for(var W=0,I=R.length,O;W<I;W++)if(O||!(W in R)){if(!O)O=Array.prototype.slice.call(R,0,W);O[W]=R[W]}}return $.concat(O||Array.prototype.slice.call(R))},Jf=function($){return this instanceof Jf?(this.v=$,this):new Jf($)},pR=function($,R,G){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var W=G.apply($,R||[]),I,O=[];return I={},A("next"),A("throw"),A("return",L),I[Symbol.asyncIterator]=function(){return this},I;function L(Q){return function(N){return Promise.resolve(N).then(Q,Y)}}function A(Q,N){if(W[Q]){if(I[Q]=function(P){return new Promise(function(d,t){O.push([Q,P,d,t])>1||M(Q,P)})},N)I[Q]=N(I[Q])}}function M(Q,N){try{F(W[Q](N))}catch(P){J(O[0][3],P)}}function F(Q){Q.value instanceof Jf?Promise.resolve(Q.value.v).then(X,Y):J(O[0][2],Q)}function X(Q){M("next",Q)}function Y(Q){M("throw",Q)}function J(Q,N){if(Q(N),O.shift(),O.length)M(O[0][0],O[0][1])}},dR=function($){var R,G;return R={},W("next"),W("throw",function(I){throw I}),W("return"),R[Symbol.iterator]=function(){return this},R;function W(I,O){R[I]=$[I]?function(L){return(G=!G)?{value:Jf($[I](L)),done:!1}:O?O(L):L}:O}},gR=function($){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var R=$[Symbol.asyncIterator],G;return R?R.call($):($=typeof P0==="function"?P0($):$[Symbol.iterator](),G={},W("next"),W("throw"),W("return"),G[Symbol.asyncIterator]=function(){return this},G);function W(O){G[O]=$[O]&&function(L){return new Promise(function(A,M){L=$[O](L),I(A,M,L.done,L.value)})}}function I(O,L,A,M){Promise.resolve(M).then(function(F){O({value:F,done:A})},L)}},sR=function($,R){if(Object.defineProperty)Object.defineProperty($,"raw",{value:R});else $.raw=R;return $};var U=Object.create?function($,R){Object.defineProperty($,"default",{enumerable:!0,value:R})}:function($,R){$.default=R};nR=function($){if($&&$.__esModule)return $;var R={};if($!=null){for(var G in $)if(G!=="default"&&Object.prototype.hasOwnProperty.call($,G))b0(R,$,G)}return U(R,$),R},rR=function($){return $&&$.__esModule?$:{default:$}},lR=function($,R,G,W){if(G==="a"&&!W)throw new TypeError("Private accessor was defined without a getter");if(typeof R==="function"?$!==R||!W:!R.has($))throw new TypeError("Cannot read private member from an object whose class did not declare it");return G==="m"?W:G==="a"?W.call($):W?W.value:R.get($)},mR=function($,R,G,W,I){if(W==="m")throw new TypeError("Private method is not writable");if(W==="a"&&!I)throw new TypeError("Private accessor was defined without a setter");if(typeof R==="function"?$!==R||!I:!R.has($))throw new TypeError("Cannot write private member to an object whose class did not declare it");return W==="a"?I.call($,G):I?I.value=G:R.set($,G),G},oR=function($,R){if(R===null||typeof R!=="object"&&typeof R!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof $==="function"?R===$:$.has(R)},iR=function($,R,G){if(R!==null&&R!==void 0){if(typeof R!=="object"&&typeof R!=="function")throw new TypeError("Object expected.");var W,I;if(G){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");W=R[Symbol.asyncDispose]}if(W===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(W=R[Symbol.dispose],G)I=W}if(typeof W!=="function")throw new TypeError("Object not disposable.");if(I)W=function(){try{I.call(this)}catch(O){return Promise.reject(O)}};$.stack.push({value:R,dispose:W,async:G})}else if(G)$.stack.push({async:!0});return R};var E=typeof SuppressedError==="function"?SuppressedError:function($,R,G){var W=new Error(G);return W.name="SuppressedError",W.error=$,W.suppressed=R,W};tR=function($){function R(W){$.error=$.hasError?new E(W,$.error,"An error was suppressed during disposal."):W,$.hasError=!0}function G(){while($.stack.length){var W=$.stack.pop();try{var I=W.dispose&&W.dispose.call(W.value);if(W.async)return Promise.resolve(I).then(G,function(O){return R(O),G()})}catch(O){R(O)}}if($.hasError)throw $.error}return G()},f("__extends",VR),f("__assign",CR),f("__rest",NR),f("__decorate",SR),f("__param",PR),f("__esDecorate",bR),f("__runInitializers",cR),f("__propKey",jR),f("__setFunctionName",hR),f("__metadata",uR),f("__awaiter",kR),f("__generator",DR),f("__exportStar",_R),f("__createBinding",b0),f("__values",P0),f("__read",m1),f("__spread",yR),f("__spreadArrays",vR),f("__spreadArray",xR),f("__await",Jf),f("__asyncGenerator",pR),f("__asyncDelegator",dR),f("__asyncValues",gR),f("__makeTemplateObject",sR),f("__importStar",nR),f("__importDefault",rR),f("__classPrivateFieldGet",lR),f("__classPrivateFieldSet",mR),f("__classPrivateFieldIn",oR),f("__addDisposableResource",iR),f("__disposeResources",tR)})});var UG=Z((aY,wG)=>{var{defineProperty:j0,getOwnPropertyDescriptor:o2,getOwnPropertyNames:i2}=Object,t2=Object.prototype.hasOwnProperty,e2=(f,w)=>j0(f,"name",{value:w,configurable:!0}),a2=(f,w)=>{for(var U in w)j0(f,U,{get:w[U],enumerable:!0})},f4=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of i2(w))if(!t2.call(f,$)&&$!==U)j0(f,$,{get:()=>w[$],enumerable:!(E=o2(w,$))||E.enumerable})}return f},w4=(f)=>f4(j0({},"__esModule",{value:!0}),f),fG={};a2(fG,{emitWarningIfUnsupportedVersion:()=>U4});wG.exports=w4(fG);var aR=!1,U4=e2((f)=>{if(f&&!aR&&parseInt(f.substring(1,f.indexOf(".")))<18)aR=!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 BG=Z((f7,KG)=>{var a1=function(f){for(let w=0;w<8;w++)f[w]^=255;for(let w=7;w>-1;w--)if(f[w]++,f[w]!==0)break},y0=Object.defineProperty,G4=Object.getOwnPropertyDescriptor,W4=Object.getOwnPropertyNames,I4=Object.prototype.hasOwnProperty,V=(f,w)=>y0(f,"name",{value:w,configurable:!0}),O4=(f,w)=>{for(var U in w)y0(f,U,{get:w[U],enumerable:!0})},L4=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of W4(w))if(!I4.call(f,$)&&$!==U)y0(f,$,{get:()=>w[$],enumerable:!(E=G4(w,$))||E.enumerable})}return f},A4=(f)=>L4(y0({},"__esModule",{value:!0}),f),WG={};O4(WG,{SignatureV4:()=>_4,clearCredentialCache:()=>S4,createScope:()=>k0,getCanonicalHeaders:()=>e1,getCanonicalQuery:()=>XG,getPayloadHash:()=>D0,getSigningKey:()=>TG,moveHeadersToQuery:()=>JG,prepareRequest:()=>fw});KG.exports=A4(WG);var $G=v(),o1=_0(),F4="X-Amz-Algorithm",M4="X-Amz-Credential",IG="X-Amz-Date",T4="X-Amz-SignedHeaders",X4="X-Amz-Expires",OG="X-Amz-Signature",LG="X-Amz-Security-Token",AG="authorization",FG=IG.toLowerCase(),Z4="date",Y4=[AG,FG,Z4],Q4=OG.toLowerCase(),t1="x-amz-content-sha256",J4=LG.toLowerCase(),z4={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},K4=/^proxy-/,B4=/^sec-/,i1="AWS4-HMAC-SHA256",q4="AWS4-HMAC-SHA256-PAYLOAD",H4="UNSIGNED-PAYLOAD",V4=50,MG="aws4_request",C4=604800,o=R4(),N4=_0(),zf={},u0=[],k0=V((f,w,U)=>`${f}/${w}/${U}/${MG}`,"createScope"),TG=V(async(f,w,U,E,$)=>{const R=await EG(f,w.secretAccessKey,w.accessKeyId),G=`${U}:${E}:${$}:${o.toHex(R)}:${w.sessionToken}`;if(G in zf)return zf[G];u0.push(G);while(u0.length>V4)delete zf[u0.shift()];let W=`AWS4${w.secretAccessKey}`;for(let I of[U,E,$,MG])W=await EG(f,W,I);return zf[G]=W},"getSigningKey"),S4=V(()=>{u0.length=0,Object.keys(zf).forEach((f)=>{delete zf[f]})},"clearCredentialCache"),EG=V((f,w,U)=>{const E=new f(w);return E.update(N4.toUint8Array(U)),E.digest()},"hmac"),e1=V(({headers:f},w,U)=>{const E={};for(let $ of Object.keys(f).sort()){if(f[$]==null)continue;const R=$.toLowerCase();if(R in z4||(w==null?void 0:w.has(R))||K4.test(R)||B4.test(R)){if(!U||U&&!U.has(R))continue}E[R]=f[$].trim().replace(/\s+/g," ")}return E},"getCanonicalHeaders"),yf=E4(),XG=V(({query:f={}})=>{const w=[],U={};for(let E of Object.keys(f).sort()){if(E.toLowerCase()===Q4)continue;w.push(E);const $=f[E];if(typeof $==="string")U[E]=`${yf.escapeUri(E)}=${yf.escapeUri($)}`;else if(Array.isArray($))U[E]=$.slice(0).reduce((R,G)=>R.concat([`${yf.escapeUri(E)}=${yf.escapeUri(G)}`]),[]).sort().join("&")}return w.map((E)=>U[E]).filter((E)=>E).join("&")},"getCanonicalQuery"),P4=$4(),b4=_0(),D0=V(async({headers:f,body:w},U)=>{for(let E of Object.keys(f))if(E.toLowerCase()===t1)return f[E];if(w==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof w==="string"||ArrayBuffer.isView(w)||P4.isArrayBuffer(w)){const E=new U;return E.update(b4.toUint8Array(w)),o.toHex(await E.digest())}return H4},"getPayloadHash"),RG=_0(),ZG=class f{format(w){const U=[];for(let R of Object.keys(w)){const G=RG.fromUtf8(R);U.push(Uint8Array.from([G.byteLength]),G,this.formatHeaderValue(w[R]))}const E=new Uint8Array(U.reduce((R,G)=>R+G.byteLength,0));let $=0;for(let R of U)E.set(R,$),$+=R.byteLength;return E}formatHeaderValue(w){switch(w.type){case"boolean":return Uint8Array.from([w.value?0:1]);case"byte":return Uint8Array.from([2,w.value]);case"short":const U=new DataView(new ArrayBuffer(3));return U.setUint8(0,3),U.setInt16(1,w.value,!1),new Uint8Array(U.buffer);case"integer":const E=new DataView(new ArrayBuffer(5));return E.setUint8(0,4),E.setInt32(1,w.value,!1),new Uint8Array(E.buffer);case"long":const $=new Uint8Array(9);return $[0]=5,$.set(w.value.bytes,1),$;case"binary":const R=new DataView(new ArrayBuffer(3+w.value.byteLength));R.setUint8(0,6),R.setUint16(1,w.value.byteLength,!1);const G=new Uint8Array(R.buffer);return G.set(w.value,3),G;case"string":const W=RG.fromUtf8(w.value),I=new DataView(new ArrayBuffer(3+W.byteLength));I.setUint8(0,7),I.setUint16(1,W.byteLength,!1);const O=new Uint8Array(I.buffer);return O.set(W,3),O;case"timestamp":const L=new Uint8Array(9);return L[0]=8,L.set(h4.fromNumber(w.value.valueOf()).bytes,1),L;case"uuid":if(!j4.test(w.value))throw new Error(`Invalid UUID received: ${w.value}`);const A=new Uint8Array(17);return A[0]=9,A.set(o.fromHex(w.value.replace(/\-/g,"")),1),A}}};V(ZG,"HeaderFormatter");var c4=ZG,j4=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,YG=class f{constructor(w){if(this.bytes=w,w.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(w){if(w>9223372036854776000||w<-9223372036854776000)throw new Error(`${w} is too large (or, if negative, too small) to represent as an Int64`);const U=new Uint8Array(8);for(let E=7,$=Math.abs(Math.round(w));E>-1&&$>0;E--,$/=256)U[E]=$;if(w<0)a1(U);return new f(U)}valueOf(){const w=this.bytes.slice(0),U=w[0]&128;if(U)a1(w);return parseInt(o.toHex(w),16)*(U?-1:1)}toString(){return String(this.valueOf())}};V(YG,"Int64");var h4=YG;V(a1,"negate");var u4=V((f,w)=>{f=f.toLowerCase();for(let U of Object.keys(w))if(f===U.toLowerCase())return!0;return!1},"hasHeader"),QG=Tf(),JG=V((f,w={})=>{var U;const{headers:E,query:$={}}=QG.HttpRequest.clone(f);for(let R of Object.keys(E)){const G=R.toLowerCase();if(G.slice(0,6)==="x-amz-"&&!((U=w.unhoistableHeaders)==null?void 0:U.has(G)))$[R]=E[R],delete E[R]}return{...f,headers:E,query:$}},"moveHeadersToQuery"),fw=V((f)=>{f=QG.HttpRequest.clone(f);for(let w of Object.keys(f.headers))if(Y4.indexOf(w.toLowerCase())>-1)delete f.headers[w];return f},"prepareRequest"),k4=V((f)=>D4(f).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),D4=V((f)=>{if(typeof f==="number")return new Date(f*1000);if(typeof f==="string"){if(Number(f))return new Date(Number(f)*1000);return new Date(f)}return f},"toDate"),zG=class f{constructor({applyChecksum:w,credentials:U,region:E,service:$,sha256:R,uriEscapePath:G=!0}){this.headerFormatter=new c4,this.service=$,this.sha256=R,this.uriEscapePath=G,this.applyChecksum=typeof w==="boolean"?w:!0,this.regionProvider=$G.normalizeProvider(E),this.credentialProvider=$G.normalizeProvider(U)}async presign(w,U={}){const{signingDate:E=new Date,expiresIn:$=3600,unsignableHeaders:R,unhoistableHeaders:G,signableHeaders:W,signingRegion:I,signingService:O}=U,L=await this.credentialProvider();this.validateResolvedCredentials(L);const A=I??await this.regionProvider(),{longDate:M,shortDate:F}=h0(E);if($>C4)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const X=k0(F,A,O??this.service),Y=JG(fw(w),{unhoistableHeaders:G});if(L.sessionToken)Y.query[LG]=L.sessionToken;Y.query[F4]=i1,Y.query[M4]=`${L.accessKeyId}/${X}`,Y.query[IG]=M,Y.query[X4]=$.toString(10);const J=e1(Y,R,W);return Y.query[T4]=GG(J),Y.query[OG]=await this.getSignature(M,X,this.getSigningKey(L,A,F,O),this.createCanonicalRequest(Y,J,await D0(w,this.sha256))),Y}async sign(w,U){if(typeof w==="string")return this.signString(w,U);else if(w.headers&&w.payload)return this.signEvent(w,U);else if(w.message)return this.signMessage(w,U);else return this.signRequest(w,U)}async signEvent({headers:w,payload:U},{signingDate:E=new Date,priorSignature:$,signingRegion:R,signingService:G}){const W=R??await this.regionProvider(),{shortDate:I,longDate:O}=h0(E),L=k0(I,W,G??this.service),A=await D0({headers:{},body:U},this.sha256),M=new this.sha256;M.update(w);const F=o.toHex(await M.digest()),X=[q4,O,L,$,F,A].join("\n");return this.signString(X,{signingDate:E,signingRegion:W,signingService:G})}async signMessage(w,{signingDate:U=new Date,signingRegion:E,signingService:$}){return this.signEvent({headers:this.headerFormatter.format(w.message.headers),payload:w.message.body},{signingDate:U,signingRegion:E,signingService:$,priorSignature:w.priorSignature}).then((G)=>{return{message:w.message,signature:G}})}async signString(w,{signingDate:U=new Date,signingRegion:E,signingService:$}={}){const R=await this.credentialProvider();this.validateResolvedCredentials(R);const G=E??await this.regionProvider(),{shortDate:W}=h0(U),I=new this.sha256(await this.getSigningKey(R,G,W,$));return I.update(o1.toUint8Array(w)),o.toHex(await I.digest())}async signRequest(w,{signingDate:U=new Date,signableHeaders:E,unsignableHeaders:$,signingRegion:R,signingService:G}={}){const W=await this.credentialProvider();this.validateResolvedCredentials(W);const I=R??await this.regionProvider(),O=fw(w),{longDate:L,shortDate:A}=h0(U),M=k0(A,I,G??this.service);if(O.headers[FG]=L,W.sessionToken)O.headers[J4]=W.sessionToken;const F=await D0(O,this.sha256);if(!u4(t1,O.headers)&&this.applyChecksum)O.headers[t1]=F;const X=e1(O,$,E),Y=await this.getSignature(L,M,this.getSigningKey(W,I,A,G),this.createCanonicalRequest(O,X,F));return O.headers[AG]=`${i1} Credential=${W.accessKeyId}/${M}, SignedHeaders=${GG(X)}, Signature=${Y}`,O}createCanonicalRequest(w,U,E){const $=Object.keys(U).sort();return`${w.method}
|
|
8
|
+
${this.getCanonicalPath(w)}
|
|
9
|
+
${XG(w)}
|
|
10
|
+
${$.map((R)=>`${R}:${U[R]}`).join("\n")}
|
|
11
|
+
|
|
12
|
+
${$.join(";")}
|
|
13
|
+
${E}`}async createStringToSign(w,U,E){const $=new this.sha256;$.update(o1.toUint8Array(E));const R=await $.digest();return`${i1}
|
|
14
|
+
${w}
|
|
15
|
+
${U}
|
|
16
|
+
${o.toHex(R)}`}getCanonicalPath({path:w}){if(this.uriEscapePath){const U=[];for(let R of w.split("/")){if((R==null?void 0:R.length)===0)continue;if(R===".")continue;if(R==="..")U.pop();else U.push(R)}const E=`${(w==null?void 0:w.startsWith("/"))?"/":""}${U.join("/")}${U.length>0&&(w==null?void 0:w.endsWith("/"))?"/":""}`;return yf.escapeUri(E).replace(/%2F/g,"/")}return w}async getSignature(w,U,E,$){const R=await this.createStringToSign(w,U,$),G=new this.sha256(await E);return G.update(o1.toUint8Array(R)),o.toHex(await G.digest())}getSigningKey(w,U,E,$){return TG(this.sha256,w,E,U,$||this.service)}validateResolvedCredentials(w){if(typeof w!=="object"||typeof w.accessKeyId!=="string"||typeof w.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};V(zG,"SignatureV4");var _4=zG,h0=V((f)=>{const w=k4(f).replace(/[\-:]/g,"");return{longDate:w,shortDate:w.slice(0,8)}},"formatDate"),GG=V((f)=>Object.keys(f).sort().join(";"),"getCanonicalHeaderList")});var jG=Z((w7,cG)=>{var{defineProperty:v0,getOwnPropertyDescriptor:y4,getOwnPropertyNames:v4}=Object,x4=Object.prototype.hasOwnProperty,b=(f,w)=>v0(f,"name",{value:w,configurable:!0}),p4=(f,w)=>{for(var U in w)v0(f,U,{get:w[U],enumerable:!0})},d4=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of v4(w))if(!x4.call(f,$)&&$!==U)v0(f,$,{get:()=>w[$],enumerable:!(E=y4(w,$))||E.enumerable})}return f},g4=(f)=>d4(v0({},"__esModule",{value:!0}),f),NG={};p4(NG,{AWSSDKSigV4Signer:()=>l4,AwsSdkSigV4ASigner:()=>o4,AwsSdkSigV4Signer:()=>$w,NODE_SIGV4A_CONFIG_OPTIONS:()=>e4,resolveAWSSDKSigV4Config:()=>a4,resolveAwsSdkSigV4AConfig:()=>t4,resolveAwsSdkSigV4Config:()=>bG,validateSigningProperties:()=>Uw});cG.exports=g4(NG);var s4=Tf(),n4=Tf(),qG=b((f)=>{var w,U;return n4.HttpResponse.isInstance(f)?((w=f.headers)==null?void 0:w.date)??((U=f.headers)==null?void 0:U.Date):void 0},"getDateHeader"),ww=b((f)=>new Date(Date.now()+f),"getSkewCorrectedDate"),r4=b((f,w)=>Math.abs(ww(w).getTime()-f)>=300000,"isClockSkewed"),HG=b((f,w)=>{const U=Date.parse(f);if(r4(U,w))return U-Date.now();return w},"getUpdatedSystemClockOffset"),vf=b((f,w)=>{if(!w)throw new Error(`Property \`${f}\` is not resolved for AWS SDK SigV4Auth`);return w},"throwSigningPropertyError"),Uw=b(async(f)=>{var w,U,E;const $=vf("context",f.context),R=vf("config",f.config),G=(E=(U=(w=$.endpointV2)==null?void 0:w.properties)==null?void 0:U.authSchemes)==null?void 0:E[0],I=await vf("signer",R.signer)(G),O=f==null?void 0:f.signingRegion,L=f==null?void 0:f.signingRegionSet,A=f==null?void 0:f.signingName;return{config:R,signer:I,signingRegion:O,signingRegionSet:L,signingName:A}},"validateSigningProperties"),SG=class f{async sign(w,U,E){var $;if(!s4.HttpRequest.isInstance(w))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const R=await Uw(E),{config:G,signer:W}=R;let{signingRegion:I,signingName:O}=R;const L=E.context;if((($=L==null?void 0:L.authSchemes)==null?void 0:$.length)??0>1){const[M,F]=L.authSchemes;if((M==null?void 0:M.name)==="sigv4a"&&(F==null?void 0:F.name)==="sigv4")I=(F==null?void 0:F.signingRegion)??I,O=(F==null?void 0:F.signingName)??O}return await W.sign(w,{signingDate:ww(G.systemClockOffset),signingRegion:I,signingService:O})}errorHandler(w){return(U)=>{const E=U.ServerTime??qG(U.$response);if(E){const $=vf("config",w.config),R=$.systemClockOffset;if($.systemClockOffset=HG(E,$.systemClockOffset),$.systemClockOffset!==R&&U.$metadata)U.$metadata.clockSkewCorrected=!0}throw U}}successHandler(w,U){const E=qG(w);if(E){const $=vf("config",U.config);$.systemClockOffset=HG(E,$.systemClockOffset)}}};b(SG,"AwsSdkSigV4Signer");var $w=SG,l4=$w,m4=Tf(),PG=class f extends $w{async sign(w,U,E){var $;if(!m4.HttpRequest.isInstance(w))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:R,signer:G,signingRegion:W,signingRegionSet:I,signingName:O}=await Uw(E),A=(await(($=R.sigv4aSigningRegionSet)==null?void 0:$.call(R))??I??[W]).join(",");return await G.sign(w,{signingDate:ww(R.systemClockOffset),signingRegion:A,signingService:O})}};b(PG,"AwsSdkSigV4ASigner");var o4=PG,i4=S1(),VG=s0(),t4=b((f)=>{return f.sigv4aSigningRegionSet=i4.normalizeProvider(f.sigv4aSigningRegionSet),f},"resolveAwsSdkSigV4AConfig"),e4={environmentVariableSelector(f){if(f.AWS_SIGV4A_SIGNING_REGION_SET)return f.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((w)=>w.trim());throw new VG.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(f){if(f.sigv4a_signing_region_set)return(f.sigv4a_signing_region_set??"").split(",").map((w)=>w.trim());throw new VG.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},$f=S1(),CG=BG(),bG=b((f)=>{let w;if(f.credentials)w=$f.memoizeIdentityProvider(f.credentials,$f.isIdentityExpired,$f.doesIdentityRequireRefresh);if(!w)if(f.credentialDefaultProvider)w=$f.normalizeProvider(f.credentialDefaultProvider(Object.assign({},f,{parentClientConfig:f})));else w=b(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:U=!0,systemClockOffset:E=f.systemClockOffset||0,sha256:$}=f;let R;if(f.signer)R=$f.normalizeProvider(f.signer);else if(f.regionInfoProvider)R=b(()=>$f.normalizeProvider(f.region)().then(async(G)=>[await f.regionInfoProvider(G,{useFipsEndpoint:await f.useFipsEndpoint(),useDualstackEndpoint:await f.useDualstackEndpoint()})||{},G]).then(([G,W])=>{const{signingRegion:I,signingService:O}=G;f.signingRegion=f.signingRegion||I||W,f.signingName=f.signingName||O||f.serviceId;const L={...f,credentials:w,region:f.signingRegion,service:f.signingName,sha256:$,uriEscapePath:U};return new(f.signerConstructor||CG.SignatureV4)(L)}),"signer");else R=b(async(G)=>{G=Object.assign({},{name:"sigv4",signingName:f.signingName||f.defaultSigningName,signingRegion:await $f.normalizeProvider(f.region)(),properties:{}},G);const{signingRegion:W,signingName:I}=G;f.signingRegion=f.signingRegion||W,f.signingName=f.signingName||I||f.serviceId;const O={...f,credentials:w,region:f.signingRegion,service:f.signingName,sha256:$,uriEscapePath:U};return new(f.signerConstructor||CG.SignatureV4)(O)},"signer");return{...f,systemClockOffset:E,signingEscapePath:U,credentials:w,signer:R}},"resolveAwsSdkSigV4Config"),a4=bG});var x0=Z((EF)=>{var fF=":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",hG="[: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]["+fF+"]*",wF=new RegExp("^"+hG+"$"),UF=function(f,w){const U=[];let E=w.exec(f);while(E){const $=[];$.startIndex=w.lastIndex-E[0].length;const R=E.length;for(let G=0;G<R;G++)$.push(E[G]);U.push($),E=w.exec(f)}return U},$F=function(f){const w=wF.exec(f);return!(w===null||typeof w==="undefined")};EF.isExist=function(f){return typeof f!=="undefined"};EF.isEmptyObject=function(f){return Object.keys(f).length===0};EF.merge=function(f,w,U){if(w){const E=Object.keys(w),$=E.length;for(let R=0;R<$;R++)if(U==="strict")f[E[R]]=[w[E[R]]];else f[E[R]]=w[E[R]]}};EF.getValue=function(f){if(EF.isExist(f))return f;else return""};EF.isName=$F;EF.getAllMatches=UF;EF.nameRegexp=hG});var Rw=Z((zF)=>{var kG=function(f){return f===" "||f==="\t"||f==="\n"||f==="\r"},DG=function(f,w){const U=w;for(;w<f.length;w++)if(f[w]=="?"||f[w]==" "){const E=f.substr(U,w-U);if(w>5&&E==="xml")return q("InvalidXml","XML declaration allowed only at the start of the document.",S(f,w));else if(f[w]=="?"&&f[w+1]==">"){w++;break}else continue}return w},_G=function(f,w){if(f.length>w+5&&f[w+1]==="-"&&f[w+2]==="-"){for(w+=3;w<f.length;w++)if(f[w]==="-"&&f[w+1]==="-"&&f[w+2]===">"){w+=2;break}}else if(f.length>w+8&&f[w+1]==="D"&&f[w+2]==="O"&&f[w+3]==="C"&&f[w+4]==="T"&&f[w+5]==="Y"&&f[w+6]==="P"&&f[w+7]==="E"){let U=1;for(w+=8;w<f.length;w++)if(f[w]==="<")U++;else if(f[w]===">"){if(U--,U===0)break}}else if(f.length>w+9&&f[w+1]==="["&&f[w+2]==="C"&&f[w+3]==="D"&&f[w+4]==="A"&&f[w+5]==="T"&&f[w+6]==="A"&&f[w+7]==="["){for(w+=8;w<f.length;w++)if(f[w]==="]"&&f[w+1]==="]"&&f[w+2]===">"){w+=2;break}}return w},TF=function(f,w){let U="",E="",$=!1;for(;w<f.length;w++){if(f[w]===FF||f[w]===MF)if(E==="")E=f[w];else if(E!==f[w]);else E="";else if(f[w]===">"){if(E===""){$=!0;break}}U+=f[w]}if(E!=="")return!1;return{value:U,index:w,tagClosed:$}},yG=function(f,w){const U=Ew.getAllMatches(f,XF),E={};for(let $=0;$<U.length;$++){if(U[$][1].length===0)return q("InvalidAttr","Attribute '"+U[$][2]+"' has no space in starting.",xf(U[$]));else if(U[$][3]!==void 0&&U[$][4]===void 0)return q("InvalidAttr","Attribute '"+U[$][2]+"' is without value.",xf(U[$]));else if(U[$][3]===void 0&&!w.allowBooleanAttributes)return q("InvalidAttr","boolean attribute '"+U[$][2]+"' is not allowed.",xf(U[$]));const R=U[$][2];if(!QF(R))return q("InvalidAttr","Attribute '"+R+"' is an invalid name.",xf(U[$]));if(!E.hasOwnProperty(R))E[R]=1;else return q("InvalidAttr","Attribute '"+R+"' is repeated.",xf(U[$]))}return!0},ZF=function(f,w){let U=/\d/;if(f[w]==="x")w++,U=/[\da-fA-F]/;for(;w<f.length;w++){if(f[w]===";")return w;if(!f[w].match(U))break}return-1},YF=function(f,w){if(w++,f[w]===";")return-1;if(f[w]==="#")return w++,ZF(f,w);let U=0;for(;w<f.length;w++,U++){if(f[w].match(/\w/)&&U<20)continue;if(f[w]===";")break;return-1}return w},q=function(f,w,U){return{err:{code:f,msg:w,line:U.line||U,col:U.col}}},QF=function(f){return Ew.isName(f)},JF=function(f){return Ew.isName(f)},S=function(f,w){const U=f.substring(0,w).split(/\r?\n/);return{line:U.length,col:U[U.length-1].length+1}},xf=function(f){return f.startIndex+f[1].length},Ew=x0(),AF={allowBooleanAttributes:!1,unpairedTags:[]};zF.validate=function(f,w){w=Object.assign({},AF,w);const U=[];let E=!1,$=!1;if(f[0]==="\uFEFF")f=f.substr(1);for(let R=0;R<f.length;R++)if(f[R]==="<"&&f[R+1]==="?"){if(R+=2,R=DG(f,R),R.err)return R}else if(f[R]==="<"){let G=R;if(R++,f[R]==="!"){R=_G(f,R);continue}else{let W=!1;if(f[R]==="/")W=!0,R++;let I="";for(;R<f.length&&f[R]!==">"&&f[R]!==" "&&f[R]!=="\t"&&f[R]!=="\n"&&f[R]!=="\r";R++)I+=f[R];if(I=I.trim(),I[I.length-1]==="/")I=I.substring(0,I.length-1),R--;if(!JF(I)){let A;if(I.trim().length===0)A="Invalid space after '<'.";else A="Tag '"+I+"' is an invalid name.";return q("InvalidTag",A,S(f,R))}const O=TF(f,R);if(O===!1)return q("InvalidAttr","Attributes for '"+I+"' have open quote.",S(f,R));let L=O.value;if(R=O.index,L[L.length-1]==="/"){const A=R-L.length;L=L.substring(0,L.length-1);const M=yG(L,w);if(M===!0)E=!0;else return q(M.err.code,M.err.msg,S(f,A+M.err.line))}else if(W)if(!O.tagClosed)return q("InvalidTag","Closing tag '"+I+"' doesn't have proper closing.",S(f,R));else if(L.trim().length>0)return q("InvalidTag","Closing tag '"+I+"' can't have attributes or invalid starting.",S(f,G));else if(U.length===0)return q("InvalidTag","Closing tag '"+I+"' has not been opened.",S(f,G));else{const A=U.pop();if(I!==A.tagName){let M=S(f,A.tagStartPos);return q("InvalidTag","Expected closing tag '"+A.tagName+"' (opened in line "+M.line+", col "+M.col+") instead of closing tag '"+I+"'.",S(f,G))}if(U.length==0)$=!0}else{const A=yG(L,w);if(A!==!0)return q(A.err.code,A.err.msg,S(f,R-L.length+A.err.line));if($===!0)return q("InvalidXml","Multiple possible root nodes found.",S(f,R));else if(w.unpairedTags.indexOf(I)!==-1);else U.push({tagName:I,tagStartPos:G});E=!0}for(R++;R<f.length;R++)if(f[R]==="<")if(f[R+1]==="!"){R++,R=_G(f,R);continue}else if(f[R+1]==="?"){if(R=DG(f,++R),R.err)return R}else break;else if(f[R]==="&"){const A=YF(f,R);if(A==-1)return q("InvalidChar","char '&' is not expected.",S(f,R));R=A}else if($===!0&&!kG(f[R]))return q("InvalidXml","Extra text at the end",S(f,R));if(f[R]==="<")R--}}else{if(kG(f[R]))continue;return q("InvalidChar","char '"+f[R]+"' is not expected.",S(f,R))}if(!E)return q("InvalidXml","Start tag expected.",1);else if(U.length==1)return q("InvalidTag","Unclosed tag '"+U[0].tagName+"'.",S(f,U[0].tagStartPos));else if(U.length>0)return q("InvalidXml","Invalid '"+JSON.stringify(U.map((R)=>R.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var FF='"',MF="'",XF=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var xG=Z((qF)=>{var vG={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,w){return w},attributeValueProcessor:function(f,w){return w},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(f,w,U){return f}},BF=function(f){return Object.assign({},vG,f)};qF.buildOptions=BF;qF.defaultOptions=vG});var gG=Z((R7,dG)=>{class pG{constructor(f){this.tagname=f,this.child=[],this[":@"]={}}add(f,w){if(f==="__proto__")f="#__proto__";this.child.push({[f]:w})}addChild(f){if(f.tagname==="__proto__")f.tagname="#__proto__";if(f[":@"]&&Object.keys(f[":@"]).length>0)this.child.push({[f.tagname]:f.child,[":@"]:f[":@"]});else this.child.push({[f.tagname]:f.child})}}dG.exports=pG});var nG=Z((G7,sG)=>{var NF=function(f,w){const U={};if(f[w+3]==="O"&&f[w+4]==="C"&&f[w+5]==="T"&&f[w+6]==="Y"&&f[w+7]==="P"&&f[w+8]==="E"){w=w+9;let E=1,$=!1,R=!1,G="";for(;w<f.length;w++)if(f[w]==="<"&&!R){if($&&bF(f,w)){if(w+=7,[entityName,val,w]=SF(f,w+1),val.indexOf("&")===-1)U[uF(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if($&&cF(f,w))w+=8;else if($&&jF(f,w))w+=8;else if($&&hF(f,w))w+=9;else if(PF)R=!0;else throw new Error("Invalid DOCTYPE");E++,G=""}else if(f[w]===">"){if(R){if(f[w-1]==="-"&&f[w-2]==="-")R=!1,E--}else E--;if(E===0)break}else if(f[w]==="[")$=!0;else G+=f[w];if(E!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:U,i:w}},SF=function(f,w){let U="";for(;w<f.length&&(f[w]!=="'"&&f[w]!=='"');w++)U+=f[w];if(U=U.trim(),U.indexOf(" ")!==-1)throw new Error("External entites are not supported");const E=f[w++];let $="";for(;w<f.length&&f[w]!==E;w++)$+=f[w];return[U,$,w]},PF=function(f,w){if(f[w+1]==="!"&&f[w+2]==="-"&&f[w+3]==="-")return!0;return!1},bF=function(f,w){if(f[w+1]==="!"&&f[w+2]==="E"&&f[w+3]==="N"&&f[w+4]==="T"&&f[w+5]==="I"&&f[w+6]==="T"&&f[w+7]==="Y")return!0;return!1},cF=function(f,w){if(f[w+1]==="!"&&f[w+2]==="E"&&f[w+3]==="L"&&f[w+4]==="E"&&f[w+5]==="M"&&f[w+6]==="E"&&f[w+7]==="N"&&f[w+8]==="T")return!0;return!1},jF=function(f,w){if(f[w+1]==="!"&&f[w+2]==="A"&&f[w+3]==="T"&&f[w+4]==="T"&&f[w+5]==="L"&&f[w+6]==="I"&&f[w+7]==="S"&&f[w+8]==="T")return!0;return!1},hF=function(f,w){if(f[w+1]==="!"&&f[w+2]==="N"&&f[w+3]==="O"&&f[w+4]==="T"&&f[w+5]==="A"&&f[w+6]==="T"&&f[w+7]==="I"&&f[w+8]==="O"&&f[w+9]==="N")return!0;return!1},uF=function(f){if(CF.isName(f))return f;else throw new Error(`Invalid entity name ${f}`)},CF=x0();sG.exports=NF});var lG=Z((W7,rG)=>{var yF=function(f,w={}){if(w=Object.assign({},_F,w),!f||typeof f!=="string")return f;let U=f.trim();if(w.skipLike!==void 0&&w.skipLike.test(U))return f;else if(w.hex&&kF.test(U))return Number.parseInt(U,16);else{const E=DF.exec(U);if(E){const $=E[1],R=E[2];let G=vF(E[3]);const W=E[4]||E[6];if(!w.leadingZeros&&R.length>0&&$&&U[2]!==".")return f;else if(!w.leadingZeros&&R.length>0&&!$&&U[1]!==".")return f;else{const I=Number(U),O=""+I;if(O.search(/[eE]/)!==-1)if(w.eNotation)return I;else return f;else if(W)if(w.eNotation)return I;else return f;else if(U.indexOf(".")!==-1)if(O==="0"&&G==="")return I;else if(O===G)return I;else if($&&O==="-"+G)return I;else return f;if(R)if(G===O)return I;else if($+G===O)return I;else return f;if(U===O)return I;else if(U===$+O)return I;return f}}else return f}},vF=function(f){if(f&&f.indexOf(".")!==-1){if(f=f.replace(/0+$/,""),f===".")f="0";else if(f[0]===".")f="0"+f;else if(f[f.length-1]===".")f=f.substr(0,f.length-1);return f}return f},kF=/^[-+]?0x[a-fA-F0-9]+$/,DF=/^([\-\+])?(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 _F={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};rG.exports=yF});var tG=Z((I7,iG)=>{var dF=function(f){const w=Object.keys(f);for(let U=0;U<w.length;U++){const E=w[U];this.lastEntities[E]={regex:new RegExp("&"+E+";","g"),val:f[E]}}},gF=function(f,w,U,E,$,R,G){if(f!==void 0){if(this.options.trimValues&&!E)f=f.trim();if(f.length>0){if(!G)f=this.replaceEntitiesValue(f);const W=this.options.tagValueProcessor(w,f,U,$,R);if(W===null||W===void 0)return f;else if(typeof W!==typeof f||W!==f)return W;else if(this.options.trimValues)return Ww(f,this.options.parseTagValue,this.options.numberParseOptions);else if(f.trim()===f)return Ww(f,this.options.parseTagValue,this.options.numberParseOptions);else return f}}},sF=function(f){if(this.options.removeNSPrefix){const w=f.split(":"),U=f.charAt(0)==="/"?"/":"";if(w[0]==="xmlns")return"";if(w.length===2)f=U+w[1]}return f},rF=function(f,w,U){if(!this.options.ignoreAttributes&&typeof f==="string"){const E=mG.getAllMatches(f,nF),$=E.length,R={};for(let G=0;G<$;G++){const W=this.resolveNameSpace(E[G][1]);let I=E[G][4],O=this.options.attributeNamePrefix+W;if(W.length){if(this.options.transformAttributeName)O=this.options.transformAttributeName(O);if(O==="__proto__")O="#__proto__";if(I!==void 0){if(this.options.trimValues)I=I.trim();I=this.replaceEntitiesValue(I);const L=this.options.attributeValueProcessor(W,I,w);if(L===null||L===void 0)R[O]=I;else if(typeof L!==typeof I||L!==I)R[O]=L;else R[O]=Ww(I,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)R[O]=!0}}if(!Object.keys(R).length)return;if(this.options.attributesGroupName){const G={};return G[this.options.attributesGroupName]=R,G}return R}},mF=function(f,w,U){const E=this.options.updateTag(w.tagname,U,w[":@"]);if(E===!1);else if(typeof E==="string")w.tagname=E,f.addChild(w);else f.addChild(w)},iF=function(f,w,U,E){if(f){if(E===void 0)E=Object.keys(w.child).length===0;if(f=this.parseTextData(f,w.tagname,U,!1,w[":@"]?Object.keys(w[":@"]).length!==0:!1,E),f!==void 0&&f!=="")w.add(this.options.textNodeName,f);f=""}return f},tF=function(f,w,U){const E="*."+U;for(let $ in f){const R=f[$];if(E===R||w===R)return!0}return!1},eF=function(f,w,U=">"){let E,$="";for(let R=w;R<f.length;R++){let G=f[R];if(E){if(G===E)E=""}else if(G==='"'||G==="'")E=G;else if(G===U[0])if(U[1]){if(f[R+1]===U[1])return{data:$,index:R}}else return{data:$,index:R};else if(G==="\t")G=" ";$+=G}},Ef=function(f,w,U,E){const $=f.indexOf(w,U);if($===-1)throw new Error(E);else return $+w.length-1},Gw=function(f,w,U,E=">"){const $=eF(f,w+1,E);if(!$)return;let R=$.data;const G=$.index,W=R.search(/\s/);let I=R,O=!0;if(W!==-1)I=R.substring(0,W),R=R.substring(W+1).trimStart();const L=I;if(U){const A=I.indexOf(":");if(A!==-1)I=I.substr(A+1),O=I!==$.data.substr(A+1)}return{tagName:I,tagExp:R,closeIndex:G,attrExpPresent:O,rawTagName:L}},aF=function(f,w,U){const E=U;let $=1;for(;U<f.length;U++)if(f[U]==="<")if(f[U+1]==="/"){const R=Ef(f,">",U,`${w} is not closed`);if(f.substring(U+2,R).trim()===w){if($--,$===0)return{tagContent:f.substring(E,U),i:R}}U=R}else if(f[U+1]==="?")U=Ef(f,"?>",U+1,"StopNode is not closed.");else if(f.substr(U+1,3)==="!--")U=Ef(f,"-->",U+3,"StopNode is not closed.");else if(f.substr(U+1,2)==="![")U=Ef(f,"]]>",U,"StopNode is not closed.")-2;else{const R=Gw(f,U,">");if(R){if((R&&R.tagName)===w&&R.tagExp[R.tagExp.length-1]!=="/")$++;U=R.closeIndex}}},Ww=function(f,w,U){if(w&&typeof f==="string"){const E=f.trim();if(E==="true")return!0;else if(E==="false")return!1;else return pF(f,U)}else if(mG.isExist(f))return f;else return""},mG=x0(),pf=gG(),xF=nG(),pF=lG();class oG{constructor(f){this.options=f,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:(w,U)=>String.fromCharCode(Number.parseInt(U,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(w,U)=>String.fromCharCode(Number.parseInt(U,16))}},this.addExternalEntities=dF,this.parseXml=lF,this.parseTextData=gF,this.resolveNameSpace=sF,this.buildAttributesMap=rF,this.isItStopNode=tF,this.replaceEntitiesValue=oF,this.readStopNodeData=aF,this.saveTextToParentTag=iF,this.addChild=mF}}var nF=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),lF=function(f){f=f.replace(/\r\n?/g,"\n");const w=new pf("!xml");let U=w,E="",$="";for(let R=0;R<f.length;R++)if(f[R]==="<")if(f[R+1]==="/"){const W=Ef(f,">",R,"Closing Tag is not closed.");let I=f.substring(R+2,W).trim();if(this.options.removeNSPrefix){const A=I.indexOf(":");if(A!==-1)I=I.substr(A+1)}if(this.options.transformTagName)I=this.options.transformTagName(I);if(U)E=this.saveTextToParentTag(E,U,$);const O=$.substring($.lastIndexOf(".")+1);if(I&&this.options.unpairedTags.indexOf(I)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${I}>`);let L=0;if(O&&this.options.unpairedTags.indexOf(O)!==-1)L=$.lastIndexOf(".",$.lastIndexOf(".")-1),this.tagsNodeStack.pop();else L=$.lastIndexOf(".");$=$.substring(0,L),U=this.tagsNodeStack.pop(),E="",R=W}else if(f[R+1]==="?"){let W=Gw(f,R,!1,"?>");if(!W)throw new Error("Pi Tag is not closed.");if(E=this.saveTextToParentTag(E,U,$),this.options.ignoreDeclaration&&W.tagName==="?xml"||this.options.ignorePiTags);else{const I=new pf(W.tagName);if(I.add(this.options.textNodeName,""),W.tagName!==W.tagExp&&W.attrExpPresent)I[":@"]=this.buildAttributesMap(W.tagExp,$,W.tagName);this.addChild(U,I,$)}R=W.closeIndex+1}else if(f.substr(R+1,3)==="!--"){const W=Ef(f,"-->",R+4,"Comment is not closed.");if(this.options.commentPropName){const I=f.substring(R+4,W-2);E=this.saveTextToParentTag(E,U,$),U.add(this.options.commentPropName,[{[this.options.textNodeName]:I}])}R=W}else if(f.substr(R+1,2)==="!D"){const W=xF(f,R);this.docTypeEntities=W.entities,R=W.i}else if(f.substr(R+1,2)==="!["){const W=Ef(f,"]]>",R,"CDATA is not closed.")-2,I=f.substring(R+9,W);E=this.saveTextToParentTag(E,U,$);let O=this.parseTextData(I,U.tagname,$,!0,!1,!0,!0);if(O==null)O="";if(this.options.cdataPropName)U.add(this.options.cdataPropName,[{[this.options.textNodeName]:I}]);else U.add(this.options.textNodeName,O);R=W+2}else{let W=Gw(f,R,this.options.removeNSPrefix),I=W.tagName;const O=W.rawTagName;let{tagExp:L,attrExpPresent:A,closeIndex:M}=W;if(this.options.transformTagName)I=this.options.transformTagName(I);if(U&&E){if(U.tagname!=="!xml")E=this.saveTextToParentTag(E,U,$,!1)}const F=U;if(F&&this.options.unpairedTags.indexOf(F.tagname)!==-1)U=this.tagsNodeStack.pop(),$=$.substring(0,$.lastIndexOf("."));if(I!==w.tagname)$+=$?"."+I:I;if(this.isItStopNode(this.options.stopNodes,$,I)){let X="";if(L.length>0&&L.lastIndexOf("/")===L.length-1){if(I[I.length-1]==="/")I=I.substr(0,I.length-1),$=$.substr(0,$.length-1),L=I;else L=L.substr(0,L.length-1);R=W.closeIndex}else if(this.options.unpairedTags.indexOf(I)!==-1)R=W.closeIndex;else{const J=this.readStopNodeData(f,O,M+1);if(!J)throw new Error(`Unexpected end of ${O}`);R=J.i,X=J.tagContent}const Y=new pf(I);if(I!==L&&A)Y[":@"]=this.buildAttributesMap(L,$,I);if(X)X=this.parseTextData(X,I,$,!0,A,!0,!0);$=$.substr(0,$.lastIndexOf(".")),Y.add(this.options.textNodeName,X),this.addChild(U,Y,$)}else{if(L.length>0&&L.lastIndexOf("/")===L.length-1){if(I[I.length-1]==="/")I=I.substr(0,I.length-1),$=$.substr(0,$.length-1),L=I;else L=L.substr(0,L.length-1);if(this.options.transformTagName)I=this.options.transformTagName(I);const X=new pf(I);if(I!==L&&A)X[":@"]=this.buildAttributesMap(L,$,I);this.addChild(U,X,$),$=$.substr(0,$.lastIndexOf("."))}else{const X=new pf(I);if(this.tagsNodeStack.push(U),I!==L&&A)X[":@"]=this.buildAttributesMap(L,$,I);this.addChild(U,X,$),U=X}E="",R=M}}else E+=f[R];return w.child},oF=function(f){if(this.options.processEntities){for(let w in this.docTypeEntities){const U=this.docTypeEntities[w];f=f.replace(U.regx,U.val)}for(let w in this.lastEntities){const U=this.lastEntities[w];f=f.replace(U.regex,U.val)}if(this.options.htmlEntities)for(let w in this.htmlEntities){const U=this.htmlEntities[w];f=f.replace(U.regex,U.val)}f=f.replace(this.ampEntity.regex,this.ampEntity.val)}return f};iG.exports=oG});var aG=Z((EM)=>{var fM=function(f,w){return eG(f,w)},eG=function(f,w,U){let E;const $={};for(let R=0;R<f.length;R++){const G=f[R],W=wM(G);let I="";if(U===void 0)I=W;else I=U+"."+W;if(W===w.textNodeName)if(E===void 0)E=G[W];else E+=""+G[W];else if(W===void 0)continue;else if(G[W]){let O=eG(G[W],w,I);const L=$M(O,w);if(G[":@"])UM(O,G[":@"],I,w);else if(Object.keys(O).length===1&&O[w.textNodeName]!==void 0&&!w.alwaysCreateTextNode)O=O[w.textNodeName];else if(Object.keys(O).length===0)if(w.alwaysCreateTextNode)O[w.textNodeName]="";else O="";if($[W]!==void 0&&$.hasOwnProperty(W)){if(!Array.isArray($[W]))$[W]=[$[W]];$[W].push(O)}else if(w.isArray(W,I,L))$[W]=[O];else $[W]=O}}if(typeof E==="string"){if(E.length>0)$[w.textNodeName]=E}else if(E!==void 0)$[w.textNodeName]=E;return $},wM=function(f){const w=Object.keys(f);for(let U=0;U<w.length;U++){const E=w[U];if(E!==":@")return E}},UM=function(f,w,U,E){if(w){const $=Object.keys(w),R=$.length;for(let G=0;G<R;G++){const W=$[G];if(E.isArray(W,U+"."+W,!0,!0))f[W]=[w[W]];else f[W]=w[W]}}},$M=function(f,w){const{textNodeName:U}=w,E=Object.keys(f).length;if(E===0)return!0;if(E===1&&(f[U]||typeof f[U]==="boolean"||f[U]===0))return!0;return!1};EM.prettify=fM});var UW=Z((L7,wW)=>{var{buildOptions:GM}=xG(),WM=tG(),{prettify:IM}=aG(),OM=Rw();class fW{constructor(f){this.externalEntities={},this.options=GM(f)}parse(f,w){if(typeof f==="string");else if(f.toString)f=f.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(w){if(w===!0)w={};const $=OM.validate(f,w);if($!==!0)throw Error(`${$.err.msg}:${$.err.line}:${$.err.col}`)}const U=new WM(this.options);U.addExternalEntities(this.externalEntities);const E=U.parseXml(f);if(this.options.preserveOrder||E===void 0)return E;else return IM(E,this.options)}addEntity(f,w){if(w.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(f.indexOf("&")!==-1||f.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");else if(w==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[f]=w}}wW.exports=fW});var WW=Z((A7,GW)=>{var LM=function(f,w){let U="";if(w.format&&w.indentBy.length>0)U="\n";return EW(f,w,"",U)},EW=function(f,w,U,E){let $="",R=!1;for(let G=0;G<f.length;G++){const W=f[G],I=AM(W);if(I===void 0)continue;let O="";if(U.length===0)O=I;else O=`${U}.${I}`;if(I===w.textNodeName){let X=W[I];if(!FM(O,w))X=w.tagValueProcessor(I,X),X=RW(X,w);if(R)$+=E;$+=X,R=!1;continue}else if(I===w.cdataPropName){if(R)$+=E;$+=`<![CDATA[${W[I][0][w.textNodeName]}]]>`,R=!1;continue}else if(I===w.commentPropName){$+=E+`<!--${W[I][0][w.textNodeName]}-->`,R=!0;continue}else if(I[0]==="?"){const X=$W(W[":@"],w),Y=I==="?xml"?"":E;let J=W[I][0][w.textNodeName];J=J.length!==0?" "+J:"",$+=Y+`<${I}${J}${X}?>`,R=!0;continue}let L=E;if(L!=="")L+=w.indentBy;const A=$W(W[":@"],w),M=E+`<${I}${A}`,F=EW(W[I],w,O,L);if(w.unpairedTags.indexOf(I)!==-1)if(w.suppressUnpairedNode)$+=M+">";else $+=M+"/>";else if((!F||F.length===0)&&w.suppressEmptyNode)$+=M+"/>";else if(F&&F.endsWith(">"))$+=M+`>${F}${E}</${I}>`;else{if($+=M+">",F&&E!==""&&(F.includes("/>")||F.includes("</")))$+=E+w.indentBy+F+E;else $+=F;$+=`</${I}>`}R=!0}return $},AM=function(f){const w=Object.keys(f);for(let U=0;U<w.length;U++){const E=w[U];if(!f.hasOwnProperty(E))continue;if(E!==":@")return E}},$W=function(f,w){let U="";if(f&&!w.ignoreAttributes)for(let E in f){if(!f.hasOwnProperty(E))continue;let $=w.attributeValueProcessor(E,f[E]);if($=RW($,w),$===!0&&w.suppressBooleanAttributes)U+=` ${E.substr(w.attributeNamePrefix.length)}`;else U+=` ${E.substr(w.attributeNamePrefix.length)}="${$}"`}return U},FM=function(f,w){f=f.substr(0,f.length-w.textNodeName.length-1);let U=f.substr(f.lastIndexOf(".")+1);for(let E in w.stopNodes)if(w.stopNodes[E]===f||w.stopNodes[E]==="*."+U)return!0;return!1},RW=function(f,w){if(f&&f.length>0&&w.processEntities)for(let U=0;U<w.entities.length;U++){const E=w.entities[U];f=f.replace(E.regex,E.val)}return f};GW.exports=LM});var OW=Z((F7,IW)=>{var i=function(f){if(this.options=Object.assign({},TM,f),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=YM;if(this.processTextOrObjNode=XM,this.options.format)this.indentate=ZM,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},XM=function(f,w,U){const E=this.j2x(f,U+1);if(f[this.options.textNodeName]!==void 0&&Object.keys(f).length===1)return this.buildTextValNode(f[this.options.textNodeName],w,E.attrStr,U);else return this.buildObjectNode(E.val,w,E.attrStr,U)},ZM=function(f){return this.options.indentBy.repeat(f)},YM=function(f){if(f.startsWith(this.options.attributeNamePrefix)&&f!==this.options.textNodeName)return f.substr(this.attrPrefixLen);else return!1},MM=WW(),TM={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(f,w){return w},attributeValueProcessor:function(f,w){return w},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};i.prototype.build=function(f){if(this.options.preserveOrder)return MM(f,this.options);else{if(Array.isArray(f)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)f={[this.options.arrayNodeName]:f};return this.j2x(f,0).val}};i.prototype.j2x=function(f,w){let U="",E="";for(let $ in f){if(!Object.prototype.hasOwnProperty.call(f,$))continue;if(typeof f[$]==="undefined"){if(this.isAttribute($))E+=""}else if(f[$]===null)if(this.isAttribute($))E+="";else if($[0]==="?")E+=this.indentate(w)+"<"+$+"?"+this.tagEndChar;else E+=this.indentate(w)+"<"+$+"/"+this.tagEndChar;else if(f[$]instanceof Date)E+=this.buildTextValNode(f[$],$,"",w);else if(typeof f[$]!=="object"){const R=this.isAttribute($);if(R)U+=this.buildAttrPairStr(R,""+f[$]);else if($===this.options.textNodeName){let G=this.options.tagValueProcessor($,""+f[$]);E+=this.replaceEntitiesValue(G)}else E+=this.buildTextValNode(f[$],$,"",w)}else if(Array.isArray(f[$])){const R=f[$].length;let G="",W="";for(let I=0;I<R;I++){const O=f[$][I];if(typeof O==="undefined");else if(O===null)if($[0]==="?")E+=this.indentate(w)+"<"+$+"?"+this.tagEndChar;else E+=this.indentate(w)+"<"+$+"/"+this.tagEndChar;else if(typeof O==="object")if(this.options.oneListGroup){const L=this.j2x(O,w+1);if(G+=L.val,this.options.attributesGroupName&&O.hasOwnProperty(this.options.attributesGroupName))W+=L.attrStr}else G+=this.processTextOrObjNode(O,$,w);else if(this.options.oneListGroup){let L=this.options.tagValueProcessor($,O);L=this.replaceEntitiesValue(L),G+=L}else G+=this.buildTextValNode(O,$,"",w)}if(this.options.oneListGroup)G=this.buildObjectNode(G,$,W,w);E+=G}else if(this.options.attributesGroupName&&$===this.options.attributesGroupName){const R=Object.keys(f[$]),G=R.length;for(let W=0;W<G;W++)U+=this.buildAttrPairStr(R[W],""+f[$][R[W]])}else E+=this.processTextOrObjNode(f[$],$,w)}return{attrStr:U,val:E}};i.prototype.buildAttrPairStr=function(f,w){if(w=this.options.attributeValueProcessor(f,""+w),w=this.replaceEntitiesValue(w),this.options.suppressBooleanAttributes&&w==="true")return" "+f;else return" "+f+'="'+w+'"'};i.prototype.buildObjectNode=function(f,w,U,E){if(f==="")if(w[0]==="?")return this.indentate(E)+"<"+w+U+"?"+this.tagEndChar;else return this.indentate(E)+"<"+w+U+this.closeTag(w)+this.tagEndChar;else{let $="</"+w+this.tagEndChar,R="";if(w[0]==="?")R="?",$="";if((U||U==="")&&f.indexOf("<")===-1)return this.indentate(E)+"<"+w+U+R+">"+f+$;else if(this.options.commentPropName!==!1&&w===this.options.commentPropName&&R.length===0)return this.indentate(E)+`<!--${f}-->`+this.newLine;else return this.indentate(E)+"<"+w+U+R+this.tagEndChar+f+this.indentate(E)+$}};i.prototype.closeTag=function(f){let w="";if(this.options.unpairedTags.indexOf(f)!==-1){if(!this.options.suppressUnpairedNode)w="/"}else if(this.options.suppressEmptyNode)w="/";else w=`></${f}`;return w};i.prototype.buildTextValNode=function(f,w,U,E){if(this.options.cdataPropName!==!1&&w===this.options.cdataPropName)return this.indentate(E)+`<![CDATA[${f}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&w===this.options.commentPropName)return this.indentate(E)+`<!--${f}-->`+this.newLine;else if(w[0]==="?")return this.indentate(E)+"<"+w+U+"?"+this.tagEndChar;else{let $=this.options.tagValueProcessor(w,f);if($=this.replaceEntitiesValue($),$==="")return this.indentate(E)+"<"+w+U+this.closeTag(w)+this.tagEndChar;else return this.indentate(E)+"<"+w+U+">"+$+"</"+w+this.tagEndChar}};i.prototype.replaceEntitiesValue=function(f){if(f&&f.length>0&&this.options.processEntities)for(let w=0;w<this.options.entities.length;w++){const U=this.options.entities[w];f=f.replace(U.regex,U.val)}return f};IW.exports=i});var AW=Z((M7,LW)=>{var QM=Rw(),JM=UW(),zM=OW();LW.exports={XMLParser:JM,XMLValidator:QM,XMLBuilder:zM}});var YW=Z((T7,ZW)=>{var{defineProperty:p0,getOwnPropertyDescriptor:KM,getOwnPropertyNames:BM}=Object,qM=Object.prototype.hasOwnProperty,c=(f,w)=>p0(f,"name",{value:w,configurable:!0}),HM=(f,w)=>{for(var U in w)p0(f,U,{get:w[U],enumerable:!0})},VM=(f,w,U,E)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let $ of BM(w))if(!qM.call(f,$)&&$!==U)p0(f,$,{get:()=>w[$],enumerable:!(E=KM(w,$))||E.enumerable})}return f},CM=(f)=>VM(p0({},"__esModule",{value:!0}),f),FW={};HM(FW,{_toBool:()=>SM,_toNum:()=>PM,_toStr:()=>NM,awsExpectUnion:()=>cM,loadRestJsonErrorCode:()=>uM,loadRestXmlErrorCode:()=>yM,parseJsonBody:()=>TW,parseJsonErrorBody:()=>hM,parseXmlBody:()=>XW,parseXmlErrorBody:()=>_M});ZW.exports=CM(FW);var NM=c((f)=>{if(f==null)return f;if(typeof f==="number"||typeof f==="bigint"){const w=new Error(`Received number ${f} where a string was expected.`);return w.name="Warning",console.warn(w),String(f)}if(typeof f==="boolean"){const w=new Error(`Received boolean ${f} where a string was expected.`);return w.name="Warning",console.warn(w),String(f)}return f},"_toStr"),SM=c((f)=>{if(f==null)return f;if(typeof f==="string"){const w=f.toLowerCase();if(f!==""&&w!=="false"&&w!=="true"){const U=new Error(`Received string "${f}" where a boolean was expected.`);U.name="Warning",console.warn(U)}return f!==""&&w!=="false"}return f},"_toBool"),PM=c((f)=>{if(f==null)return f;if(typeof f==="string"){const w=Number(f);if(w.toString()!==f){const U=new Error(`Received string "${f}" where a number was expected.`);return U.name="Warning",console.warn(U),f}return w}return f},"_toNum"),bM=Ff(),cM=c((f)=>{if(f==null)return;if(typeof f==="object"&&"__type"in f)delete f.__type;return bM.expectUnion(f)},"awsExpectUnion"),jM=Ff(),MW=c((f,w)=>jM.collectBody(f,w).then((U)=>w.utf8Encoder(U)),"collectBodyString"),TW=c((f,w)=>MW(f,w).then((U)=>{if(U.length)try{return JSON.parse(U)}catch(E){if((E==null?void 0:E.name)==="SyntaxError")Object.defineProperty(E,"$responseBodyText",{value:U});throw E}return{}}),"parseJsonBody"),hM=c(async(f,w)=>{const U=await TW(f,w);return U.message=U.message??U.Message,U},"parseJsonErrorBody"),uM=c((f,w)=>{const U=c((R,G)=>Object.keys(R).find((W)=>W.toLowerCase()===G.toLowerCase()),"findKey"),E=c((R)=>{let G=R;if(typeof G==="number")G=G.toString();if(G.indexOf(",")>=0)G=G.split(",")[0];if(G.indexOf(":")>=0)G=G.split(":")[0];if(G.indexOf("#")>=0)G=G.split("#")[1];return G},"sanitizeErrorCode"),$=U(f.headers,"x-amzn-errortype");if($!==void 0)return E(f.headers[$]);if(w.code!==void 0)return E(w.code);if(w.__type!==void 0)return E(w.__type)},"loadRestJsonErrorCode"),kM=Ff(),DM=AW(),XW=c((f,w)=>MW(f,w).then((U)=>{if(U.length){const E=new DM.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(I,O)=>O.trim()===""&&O.includes("\n")?"":void 0});E.addEntity("#xD","\r"),E.addEntity("#10","\n");let $;try{$=E.parse(U,!0)}catch(I){if(I&&typeof I==="object")Object.defineProperty(I,"$responseBodyText",{value:U});throw I}const R="#text",G=Object.keys($)[0],W=$[G];if(W[R])W[G]=W[R],delete W[R];return kM.getValueFromTextNode(W)}return{}}),"parseXmlBody"),_M=c(async(f,w)=>{const U=await XW(f,w);if(U.Error)U.Error.message=U.Error.message??U.Error.Message;return U},"parseXmlErrorBody"),yM=c((f,w)=>{var U;if(((U=w==null?void 0:w.Error)==null?void 0:U.Code)!==void 0)return w.Error.Code;if((w==null?void 0:w.Code)!==void 0)return w.Code;if(f.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var vM=Z((df)=>{Object.defineProperty(df,"__esModule",{value:!0});var Iw=eR();Iw.__exportStar(UG(),df);Iw.__exportStar(jG(),df);Iw.__exportStar(YW(),df)});function UT(f){return f}var PW=(f)=>(w)=>async(U)=>{if(!j.isInstance(U.request))return w(U);const{request:E}=U,{handlerProtocol:$=""}=f.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!E.headers[":authority"])delete E.headers.host,E.headers[":authority"]=E.hostname+(E.port?":"+E.port:"");else if(!E.headers.host){let R=E.hostname;if(E.port!=null)R+=`:${E.port}`;E.headers.host=R}return w(U)},bW={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},$T=(f)=>({applyToStack:(w)=>{w.add(PW(f),bW)}});var cW=()=>(f,w)=>async(U)=>{try{const E=await f(U),{clientName:$,commandName:R,logger:G,dynamoDbDocumentClientOptions:W={}}=w,{overrideInputFilterSensitiveLog:I,overrideOutputFilterSensitiveLog:O}=W,L=I??w.inputFilterSensitiveLog,A=O??w.outputFilterSensitiveLog,{$metadata:M,...F}=E.output;return G?.info?.({clientName:$,commandName:R,input:L(U.input),output:A(F),metadata:M}),E}catch(E){const{clientName:$,commandName:R,logger:G,dynamoDbDocumentClientOptions:W={}}=w,{overrideInputFilterSensitiveLog:I}=W,O=I??w.inputFilterSensitiveLog;throw G?.error?.({clientName:$,commandName:R,input:O(U.input),error:E,metadata:E.$metadata}),E}},jW={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},RT=(f)=>({applyToStack:(w)=>{w.add(cW(),jW)}});var Mw="X-Amzn-Trace-Id",hW="AWS_LAMBDA_FUNCTION_NAME",uW="_X_AMZN_TRACE_ID",kW=(f)=>(w)=>async(U)=>{const{request:E}=U;if(!j.isInstance(E)||f.runtime!=="node"||E.headers.hasOwnProperty(Mw))return w(U);const $=process.env[hW],R=process.env[uW],G=(W)=>typeof W==="string"&&W.length>0;if(G($)&&G(R))E.headers[Mw]=R;return w({...U,request:E})},DW={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},LT=(f)=>({applyToStack:(w)=>{w.add(kW(f),DW)}});function lT(f){return{...f,customUserAgent:typeof f.customUserAgent==="string"?[[f.customUserAgent]]:f.customUserAgent}}var X2=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}$"),uf=(f)=>X2.test(f)||f.startsWith("[")&&f.endsWith("]");var Z2=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),kf=(f,w=!1)=>{if(!w)return Z2.test(f);const U=f.split(".");for(let E of U)if(!kf(E))return!1;return!0};var Df={};var s="endpoints";function u(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`\$${u(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(u).join(", ")})`;return JSON.stringify(f,null,2)}class z extends Error{constructor(f){super(f);this.name="EndpointError"}}var hE=(f,w)=>f===w;var uE=(f)=>{const w=f.split("."),U=[];for(let E of w){const $=E.indexOf("[");if($!==-1){if(E.indexOf("]")!==E.length-1)throw new z(`Path: '${f}' does not end with ']'`);const R=E.slice($+1,-1);if(Number.isNaN(parseInt(R)))throw new z(`Invalid array index: '${R}' in path: '${f}'`);if($!==0)U.push(E.slice(0,$));U.push(R)}else U.push(E)}return U};var M0=(f,w)=>uE(w).reduce((U,E)=>{if(typeof U!=="object")throw new z(`Index '${E}' in '${w}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(U))return U[parseInt(E)];return U[E]},f);var kE=(f)=>f!=null;var DE=(f)=>!f;var T0=n(Bf(),1);var P1={[T0.EndpointURLScheme.HTTP]:80,[T0.EndpointURLScheme.HTTPS]:443},_E=(f)=>{const w=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){const{hostname:M,port:F,protocol:X="",path:Y="",query:J={}}=f,Q=new URL(`${X}//${M}${F?`:${F}`:""}${Y}`);return Q.search=Object.entries(J).map(([N,P])=>`${N}=${P}`).join("&"),Q}return new URL(f)}catch(M){return null}})();if(!w)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;const U=w.href,{host:E,hostname:$,pathname:R,protocol:G,search:W}=w;if(W)return null;const I=G.slice(0,-1);if(!Object.values(T0.EndpointURLScheme).includes(I))return null;const O=uf($),L=U.includes(`${E}:${P1[I]}`)||typeof f==="string"&&f.includes(`${E}:${P1[I]}`),A=`${E}${L?`:${P1[I]}`:""}`;return{scheme:I,authority:A,path:R,normalizedPath:R.endsWith("/")?R:`${R}/`,isIp:O}};var yE=(f,w)=>f===w;var vE=(f,w,U,E)=>{if(w>=U||f.length<U)return null;if(!E)return f.substring(w,U);return f.substring(f.length-U,f.length-w)};var xE=(f)=>encodeURIComponent(f).replace(/[!*'()]/g,(w)=>`%${w.charCodeAt(0).toString(16).toUpperCase()}`);var pE={booleanEquals:hE,getAttr:M0,isSet:kE,isValidHostLabel:kf,not:DE,parseURL:_E,stringEquals:yE,substring:vE,uriEncode:xE};var X0=(f,w)=>{const U=[],E={...w.endpointParams,...w.referenceRecord};let $=0;while($<f.length){const R=f.indexOf("{",$);if(R===-1){U.push(f.slice($));break}U.push(f.slice($,R));const G=f.indexOf("}",R);if(G===-1){U.push(f.slice(R));break}if(f[R+1]==="{"&&f[G+1]==="}")U.push(f.slice(R+1,G)),$=G+2;const W=f.substring(R+1,G);if(W.includes("#")){const[I,O]=W.split("#");U.push(M0(E[I],O))}else U.push(E[W]);$=G+1}return U.join("")};var dE=({ref:f},w)=>{return{...w.endpointParams,...w.referenceRecord}[f]};var l=(f,w,U)=>{if(typeof f==="string")return X0(f,U);else if(f.fn)return Z0(f,U);else if(f.ref)return dE(f,U);throw new z(`'${w}': ${String(f)} is not a string, function or reference.`)};var Z0=({fn:f,argv:w},U)=>{const E=w.map((R)=>["boolean","number"].includes(typeof R)?R:l(R,"arg",U)),$=f.split(".");if($[0]in Df&&$[1]!=null)return Df[$[0]][$[1]](...E);return pE[f](...E)};var gE=({assign:f,...w},U)=>{if(f&&f in U.referenceRecord)throw new z(`'${f}' is already defined in Reference Record.`);const E=Z0(w,U);return U.logger?.debug?.(`${s} evaluateCondition: ${u(w)} = ${u(E)}`),{result:E===""?!0:!!E,...f!=null&&{toAssign:{name:f,value:E}}}};var Xf=(f=[],w)=>{const U={};for(let E of f){const{result:$,toAssign:R}=gE(E,{...w,referenceRecord:{...w.referenceRecord,...U}});if(!$)return{result:$};if(R)U[R.name]=R.value,w.logger?.debug?.(`${s} assign: ${R.name} := ${u(R.value)}`)}return{result:!0,referenceRecord:U}};var sE=(f,w)=>Object.entries(f).reduce((U,[E,$])=>({...U,[E]:$.map((R)=>{const G=l(R,"Header value entry",w);if(typeof G!=="string")throw new z(`Header '${E}' value '${G}' is not a string`);return G})}),{});var b1=(f,w)=>{if(Array.isArray(f))return f.map((U)=>b1(U,w));switch(typeof f){case"string":return X0(f,w);case"object":if(f===null)throw new z(`Unexpected endpoint property: ${f}`);return Y0(f,w);case"boolean":return f;default:throw new z(`Unexpected endpoint property type: ${typeof f}`)}};var Y0=(f,w)=>Object.entries(f).reduce((U,[E,$])=>({...U,[E]:b1($,w)}),{});var nE=(f,w)=>{const U=l(f,"Endpoint URL",w);if(typeof U==="string")try{return new URL(U)}catch(E){throw console.error(`Failed to construct URL with ${U}`,E),E}throw new z(`Endpoint URL must be a string, got ${typeof U}`)};var rE=(f,w)=>{const{conditions:U,endpoint:E}=f,{result:$,referenceRecord:R}=Xf(U,w);if(!$)return;const G={...w,referenceRecord:{...w.referenceRecord,...R}},{url:W,properties:I,headers:O}=E;return w.logger?.debug?.(`${s} Resolving endpoint from template: ${u(E)}`),{...O!=null&&{headers:sE(O,G)},...I!=null&&{properties:Y0(I,G)},url:nE(W,G)}};var lE=(f,w)=>{const{conditions:U,error:E}=f,{result:$,referenceRecord:R}=Xf(U,w);if(!$)return;throw new z(l(E,"Error",{...w,referenceRecord:{...w.referenceRecord,...R}}))};var mE=(f,w)=>{const{conditions:U,rules:E}=f,{result:$,referenceRecord:R}=Xf(U,w);if(!$)return;return Q0(E,{...w,referenceRecord:{...w.referenceRecord,...R}})};var Q0=(f,w)=>{for(let U of f)if(U.type==="endpoint"){const E=rE(U,w);if(E)return E}else if(U.type==="error")lE(U,w);else if(U.type==="tree"){const E=mE(U,w);if(E)return E}else throw new z(`Unknown endpoint rule: ${U}`);throw new z("Rules evaluation failed")};var Y2=(f,w)=>{const{endpointParams:U,logger:E}=w,{parameters:$,rules:R}=f;w.logger?.debug?.(`${s} Initial EndpointParams: ${u(U)}`);const G=Object.entries($).filter(([,O])=>O.default!=null).map(([O,L])=>[O,L.default]);if(G.length>0)for(let[O,L]of G)U[O]=U[O]??L;const W=Object.entries($).filter(([,O])=>O.required).map(([O])=>O);for(let O of W)if(U[O]==null)throw new z(`Missing required parameter: '${O}'`);const I=Q0(R,{endpointParams:U,logger:E,referenceRecord:{}});if(w.endpointParams?.Endpoint)try{const O=new URL(w.endpointParams.Endpoint),{protocol:L,port:A}=O;I.url.protocol=L,I.url.port=A}catch(O){}return w.logger?.debug?.(`${s} Resolved endpoint: ${u(I)}`),I};var c1=(f,w=!1)=>{if(w){for(let U of f.split("."))if(!c1(U))return!1;return!0}if(!kf(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(uf(f))return!1;return!0};var oE=(f)=>{const w=f.split(":");if(w.length<6)return null;const[U,E,$,R,G,...W]=w;if(U!=="arn"||E===""||$===""||W[0]==="")return null;return{partition:E,service:$,region:R,accountId:G,resourceId:W[0].includes("/")?W[0].split("/"):W}};var iE={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 J2=iE,z2="",tE=(f)=>{const{partitions:w}=J2;for(let E of w){const{regions:$,outputs:R}=E;for(let[G,W]of Object.entries($))if(G===f)return{...R,...W}}for(let E of w){const{regionRegex:$,outputs:R}=E;if(new RegExp($).test(f))return{...R}}const U=w.find((E)=>E.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 eE=()=>z2;var K2={isVirtualHostableS3Bucket:c1,parseArn:oE,partition:tE};Df.aws=K2;var j1="user-agent",J0="x-amz-user-agent",h1=" ",z0="/",aE=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,fR=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,u1="-";var B2=(f)=>(w,U)=>async(E)=>{const{request:$}=E;if(!j.isInstance($))return w(E);const{headers:R}=$,G=U?.userAgent?.map(k1)||[],W=(await f.defaultUserAgentProvider()).map(k1),I=f?.customUserAgent?.map(k1)||[],O=eE(),L=(O?[O]:[]).concat([...W,...G,...I]).join(h1),A=[...W.filter((M)=>M.startsWith("aws-sdk-")),...I].join(h1);if(f.runtime!=="browser"){if(A)R[J0]=R[J0]?`${R[j1]} ${A}`:A;R[j1]=L}else R[J0]=L;return w({...E,request:$})},k1=(f)=>{const w=f[0].split(z0).map((G)=>G.replace(aE,u1)).join(z0),U=f[1]?.replace(fR,u1),E=w.indexOf(z0),$=w.substring(0,E);let R=w.substring(E+1);if($==="api")R=R.toLowerCase();return[$,R,U].filter((G)=>G&&G.length>0).reduce((G,W,I)=>{switch(I){case 0:return W;case 1:return`${G}/${W}`;default:return`${G}#${W}`}},"")},q2={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},CZ=(f)=>({applyToStack:(w)=>{w.add(B2(f),q2)}});var K0=(f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips"));var D1=(f)=>K0(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f;var DZ=(f)=>{const{region:w,useFipsEndpoint:U}=f;if(!w)throw new Error("Region is missing");return{...f,region:async()=>{if(typeof w==="string")return D1(w);const E=await w();return D1(E)},useFipsEndpoint:async()=>{const E=typeof w==="string"?w:await w();if(K0(E))return!0;return typeof U!=="function"?Promise.resolve(!!U):U()}}};var Zf=(f,w,U)=>{if(!(w in f))return;if(f[w]==="true")return!0;if(f[w]==="false")return!1;throw new Error(`Cannot load ${U} "${w}". Expected "true" or "false", got ${f[w]}.`)};var m;(function(f){f.ENV="env",f.CONFIG="shared config entry"})(m||(m={}));var H2="AWS_USE_DUALSTACK_ENDPOINT",V2="use_dualstack_endpoint";var rZ={environmentVariableSelector:(f)=>Zf(f,H2,m.ENV),configFileSelector:(f)=>Zf(f,V2,m.CONFIG),default:!1};var C2="AWS_USE_FIPS_ENDPOINT",N2="use_fips_endpoint";var oZ={environmentVariableSelector:(f)=>Zf(f,C2,m.ENV),configFileSelector:(f)=>Zf(f,N2,m.CONFIG),default:!1};var S2=n(v(),1);var P2=n(v(),1);var wR={environmentVariableSelector:(f)=>f["AWS_REGION"],configFileSelector:(f)=>f["region"],default:()=>{throw new Error("Region is missing")}},W5={preferredFile:"credentials"};function b2(f){return(w)=>async(U)=>{const E=U.request;if(j.isInstance(E)){const{body:$,headers:R}=E;if($&&Object.keys(R).map((G)=>G.toLowerCase()).indexOf(UR)===-1)try{const G=f($);E.headers={...E.headers,[UR]:String(G)}}catch(G){}}return w({...U,request:E})}}var UR="content-length",c2={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},u5=(f)=>({applyToStack:(w)=>{w.add(b2(f.bodyLengthChecker),c2)}});var FR=n(sf(),1);var LR=n(v(),1);var $R=async(f)=>{const w=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=w.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(D2(w)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!k2(w)||w.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||w.toLowerCase()!==w||w.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},j2=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,h2=/(\d+\.){3}\d+/,u2=/\.\./;var k2=(f)=>j2.test(f)&&!h2.test(f)&&!u2.test(f),D2=(f)=>{const[w,U,E,,,$]=f.split(":"),R=w==="arn"&&f.split(":").length>=6,G=Boolean(R&&U&&E&&$);if(R&&!G)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return G};var ER=(f,w,U)=>{const E=async()=>{const $=U[f]??U[w];if(typeof $==="function")return $();return $};if(f==="credentialScope"||w==="CredentialScope")return async()=>{const $=typeof U.credentials==="function"?await U.credentials():U.credentials;return $?.credentialScope??$?.CredentialScope};if(f==="accountId"||w==="AccountId")return async()=>{const $=typeof U.credentials==="function"?await U.credentials():U.credentials;return $?.accountId??$?.AccountId};if(f==="endpoint"||w==="endpoint")return async()=>{const $=await E();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){const{protocol:R,hostname:G,port:W,path:I}=$;return`${R}//${G}${W?":"+W:""}${I}`}}return $};return E};var RR="AWS_ENDPOINT_URL",GR="endpoint_url",WR=(f)=>({environmentVariableSelector:(w)=>{const U=f.split(" ").map((R)=>R.toUpperCase()),E=w[[RR,...U].join("_")];if(E)return E;const $=w[RR];if($)return $;return},configFileSelector:(w,U)=>{if(U&&w.services){const $=U[["services",w.services].join(_1)];if($){const R=f.split(" ").map((W)=>W.toLowerCase()),G=$[[R.join("_"),GR].join(_1)];if(G)return G}}const E=w[GR];if(E)return E;return},default:void 0});var IR=async(f)=>ff(WR(f))();var y1=n(RU(),1),B0=(f)=>{if(typeof f==="object"){if("url"in f)return y1.parseUrl(f.url);return f}return y1.parseUrl(f)};var OR=async(f,w,U,E)=>{if(!U.endpoint){const G=await IR(U.serviceId||"");if(G)U.endpoint=()=>Promise.resolve(B0(G))}const $=await _2(f,w,U);if(typeof U.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return U.endpointProvider($,E)},_2=async(f,w,U)=>{const E={},$=w?.getEndpointParameterInstructions?.()||{};for(let[R,G]of Object.entries($))switch(G.type){case"staticContextParams":E[R]=G.value;break;case"contextParams":E[R]=f[G.name];break;case"clientContextParams":case"builtInParams":E[R]=await ER(G.name,R,U)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(G))}if(Object.keys($).length===0)Object.assign(E,U);if(String(U.serviceId).toLowerCase()==="s3")await $R(E);return E};var AR=({config:f,instructions:w})=>{return(U,E)=>async($)=>{const R=await OR($.input,{getEndpointParameterInstructions(){return w}},{...f},E);E.endpointV2=R,E.authSchemes=R.properties?.authSchemes;const G=E.authSchemes?.[0];if(G){E.signing_region=G.signingRegion,E.signing_service=G.signingName;const I=LR.getSmithyContext(E)?.selectedHttpAuthScheme?.httpAuthOption;if(I)I.signingProperties=Object.assign(I.signingProperties||{},{signing_region:G.signingRegion,signingRegion:G.signingRegion,signing_service:G.signingName,signingName:G.signingName,signingRegionSet:G.signingRegionSet},G.properties)}return U({...$})}};var y2={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:FR.serializerMiddlewareOption.name},f9=(f,w)=>({applyToStack:(U)=>{U.addRelativeTo(AR({config:f,instructions:w}),y2)}});var q0=n(v(),1);var $9=(f)=>{const w=f.tls??!0,{endpoint:U}=f,E=U!=null?async()=>B0(await q0.normalizeProvider(U)()):void 0;return{...f,endpoint:E,tls:w,isCustomEndpoint:!!U,useDualstackEndpoint:q0.normalizeProvider(f.useDualstackEndpoint??!1),useFipsEndpoint:q0.normalizeProvider(f.useFipsEndpoint??!1)}};var p=n(W1(),1),T9=p.default.v1,X9=p.default.v3,MR=p.default.v4,Z9=p.default.v5,Y9=p.default.NIL,Q9=p.default.version,J9=p.default.validate,z9=p.default.stringify,K9=p.default.parse;var n1=n(v(),1);var y;(function(f){f.STANDARD="standard",f.ADAPTIVE="adaptive"})(y||(y={}));var wf=3,TR=y.STANDARD;var XR=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],ZR=["TimeoutError","RequestTimeout","RequestTimeoutException"],YR=[500,502,503,504],QR=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var v2=(f)=>f.$metadata?.clockSkewCorrected,Yf=(f)=>f.$metadata?.httpStatusCode===429||XR.includes(f.name)||f.$retryable?.throttling==!0,H0=(f)=>v2(f)||ZR.includes(f.name)||QR.includes(f?.code||"")||YR.includes(f.$metadata?.httpStatusCode||0),JR=(f)=>{if(f.$metadata?.httpStatusCode!==void 0){const w=f.$metadata.httpStatusCode;if(500<=w&&w<=599&&!H0(f))return!0;return!1}return!1};class V0{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?.beta??0.7,this.minCapacity=f?.minCapacity??1,this.minFillRate=f?.minFillRate??0.5,this.scaleConstant=f?.scaleConstant??0.4,this.smooth=f?.smooth??0.8;const w=this.getCurrentTimeInSeconds();this.lastThrottleTime=w,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 w=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((U)=>setTimeout(U,w))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){const f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}const w=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+w),this.lastTimestamp=f}updateClientSendingRate(f){let w;if(this.updateMeasuredRate(),Yf(f)){const E=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=E,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle(E),this.enableTokenBucket()}else this.calculateTimeWindow(),w=this.cubicSuccess(this.getCurrentTimeInSeconds());const U=Math.min(w,2*this.measuredTxRate);this.updateTokenBucketRate(U)}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(),w=Math.floor(f*2)/2;if(this.requestCount++,w>this.lastTxRateBucket){const U=this.requestCount/(w-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(U*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=w}}getPrecise(f){return parseFloat(f.toFixed(8))}}var Uf=100,_f=20000,v1=500,C0=500,x1=5,p1=10,d1=1,N0="amz-sdk-invocation-id",S0="amz-sdk-request";var zR=()=>{let f=Uf;return{computeNextBackoffDelay:(E)=>{return Math.floor(Math.min(_f,Math.random()*2**E*f))},setDelayBase:(E)=>{f=E}}};var g1=({retryDelay:f,retryCount:w,retryCost:U})=>{return{getRetryCount:()=>w,getRetryDelay:()=>Math.min(_f,f),getRetryCost:()=>U}};class Qf{constructor(f){this.maxAttempts=f,this.mode=y.STANDARD,this.capacity=C0,this.retryBackoffStrategy=zR(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return g1({retryDelay:Uf,retryCount:0})}async refreshRetryTokenForRetry(f,w){const U=await this.getMaxAttempts();if(this.shouldRetry(f,w,U)){const E=w.errorType;this.retryBackoffStrategy.setDelayBase(E==="THROTTLING"?v1:Uf);const $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),R=w.retryAfterHint?Math.max(w.retryAfterHint.getTime()-Date.now()||0,$):$,G=this.getCapacityCost(E);return this.capacity-=G,g1({retryDelay:R,retryCount:f.getRetryCount()+1,retryCost:G})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(C0,this.capacity+(f.getRetryCost()??d1))}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 ${wf}`),wf}}shouldRetry(f,w,U){return f.getRetryCount()+1<U&&this.capacity>=this.getCapacityCost(w.errorType)&&this.isRetryableError(w.errorType)}getCapacityCost(f){return f==="TRANSIENT"?p1:x1}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}}class s1{constructor(f,w){this.maxAttemptsProvider=f,this.mode=y.ADAPTIVE;const{rateLimiter:U}=w??{};this.rateLimiter=U??new V0,this.standardRetryStrategy=new Qf(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,w){return this.rateLimiter.updateClientSendingRate(w),this.standardRetryStrategy.refreshRetryTokenForRetry(f,w)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}}var KR="AWS_MAX_ATTEMPTS",BR="max_attempts",UY={environmentVariableSelector:(f)=>{const w=f[KR];if(!w)return;const U=parseInt(w);if(Number.isNaN(U))throw new Error(`Environment variable ${KR} mast be a number, got "${w}"`);return U},configFileSelector:(f)=>{const w=f[BR];if(!w)return;const U=parseInt(w);if(Number.isNaN(U))throw new Error(`Shared config file entry ${BR} mast be a number, got "${w}"`);return U},default:wf},$Y=(f)=>{const{retryStrategy:w}=f,U=n1.normalizeProvider(f.maxAttempts??wf);return{...f,maxAttempts:U,retryStrategy:async()=>{if(w)return w;if(await n1.normalizeProvider(f.retryMode)()===y.ADAPTIVE)return new s1(U);return new Qf(U)}}},x2="AWS_RETRY_MODE",p2="retry_mode",EY={environmentVariableSelector:(f)=>f[x2],configFileSelector:(f)=>f[p2],default:TR};import{Readable as d2} from"stream";var qR=(f)=>f?.body instanceof d2||typeof ReadableStream!=="undefined"&&f?.body instanceof ReadableStream;var r1=(f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)};var g2=(f)=>(w,U)=>async(E)=>{let $=await f.retryStrategy();const R=await f.maxAttempts();if(s2($)){$=$;let G=await $.acquireInitialRetryToken(U.partition_id),W=new Error,I=0,O=0;const{request:L}=E,A=j.isInstance(L);if(A)L.headers[N0]=MR();while(!0)try{if(A)L.headers[S0]=`attempt=${I+1}; max=${R}`;const{response:M,output:F}=await w(E);return $.recordSuccess(G),F.$metadata.attempts=I+1,F.$metadata.totalRetryDelay=O,{response:M,output:F}}catch(M){const F=n2(M);if(W=r1(M),A&&qR(L))throw(U.logger instanceof HR?console:U.logger)?.warn("An error was encountered in a non-retryable streaming request."),W;try{G=await $.refreshRetryTokenForRetry(G,F)}catch(Y){if(!W.$metadata)W.$metadata={};throw W.$metadata.attempts=I+1,W.$metadata.totalRetryDelay=O,W}I=G.getRetryCount();const X=G.getRetryDelay();O+=X,await new Promise((Y)=>setTimeout(Y,X))}}else{if($=$,$?.mode)U.userAgent=[...U.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(w,E)}},s2=(f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined",n2=(f)=>{const w={error:f,errorType:r2(f)},U=m2(f.$response);if(U)w.retryAfterHint=U;return w},r2=(f)=>{if(Yf(f))return"THROTTLING";if(H0(f))return"TRANSIENT";if(JR(f))return"SERVER_ERROR";return"CLIENT_ERROR"},l2={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ZY=(f)=>({applyToStack:(w)=>{w.add(g2(f),l2)}}),m2=(f)=>{if(!l1.isInstance(f))return;const w=Object.keys(f.headers).find((R)=>R.toLowerCase()==="retry-after");if(!w)return;const U=f.headers[w],E=Number(U);if(!Number.isNaN(E))return new Date(E*1000);return new Date(U)};import{platform as xM,release as pM} from"os";import{env as JW,versions as dM} from"process";var Ow={isCrtAvailable:!1};var QW=()=>{if(Ow.isCrtAvailable)return["md/crt-avail"];return null};var gM="AWS_SDK_UA_APP_ID",sM="sdk-ua-app-id",q7=({serviceId:f,clientVersion:w})=>{const U=[["aws-sdk-js",w],["ua","2.0"],[`os/${xM()}`,pM()],["lang/js"],["md/nodejs",`${dM.node}`]],E=QW();if(E)U.push(E);if(f)U.push([`api/${f}`,w]);if(JW.AWS_EXECUTION_ENV)U.push([`exec-env/${JW.AWS_EXECUTION_ENV}`]);const $=ff({environmentVariableSelector:(G)=>G[gM],configFileSelector:(G)=>G[sM],default:void 0})();let R=void 0;return async()=>{if(!R){const G=await $;R=G?[...U,[`app/${G}`]]:[...U]}return R}};var zW=(f)=>typeof ArrayBuffer==="function"&&f instanceof ArrayBuffer||Object.prototype.toString.call(f)==="[object ArrayBuffer]";import{Buffer as Lw} from"buffer";var Rf=(f,w=0,U=f.byteLength-w)=>{if(!zW(f))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof f} (${f})`);return Lw.from(f,w,U)},Kf=(f,w)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return w?Lw.from(f,w):Lw.from(f)};var d0=(f)=>{const w=Kf(f,"utf8");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var KW=(f)=>{if(typeof f==="string")return d0(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)};var k7=(f)=>{if(typeof f==="string")return f;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Rf(f.buffer,f.byteOffset,f.byteLength).toString("utf8")};import{Buffer as nM} from"buffer";import{createHash as rM,createHmac as lM} from"crypto";var BW=function(f,w){if(nM.isBuffer(f))return f;if(typeof f==="string")return Kf(f,w);if(ArrayBuffer.isView(f))return Rf(f.buffer,f.byteOffset,f.byteLength);return Rf(f)};class mM{constructor(f,w){this.algorithmIdentifier=f,this.secret=w,this.reset()}update(f,w){this.hash.update(KW(BW(f,w)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?lM(this.algorithmIdentifier,BW(this.secret)):rM(this.algorithmIdentifier)}}import{fstatSync as oM,lstatSync as iM} from"fs";var l7=(f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return iM(f.path).size;else if(typeof f.fd==="number")return oM(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)};var qW="AWS_EXECUTION_ENV",Aw="AWS_REGION",Fw="AWS_DEFAULT_REGION",HW="AWS_EC2_METADATA_DISABLED",VW=["in-region","cross-region","mobile","standard","legacy"],CW="/latest/meta-data/placement/region";var NW={environmentVariableSelector:(f)=>{return f["AWS_DEFAULTS_MODE"]},configFileSelector:(f)=>{return f["defaults_mode"]},default:"legacy"};var EQ=({region:f=ff(wR),defaultsMode:w=ff(NW)}={})=>SW(async()=>{const U=typeof w==="function"?await w():w;switch(U?.toLowerCase()){case"auto":return tM(f);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 ${VW.join(", ")}, got ${U}`)}}),tM=async(f)=>{if(f){const w=typeof f==="function"?await f():f,U=await eM();if(!U)return"standard";if(w===U)return"in-region";else return"cross-region"}return"standard"},eM=async()=>{if(process.env[qW]&&(process.env[Aw]||process.env[Fw]))return process.env[Aw]??process.env[Fw];if(!process.env[HW])try{const{getInstanceMetadataEndpoint:f,httpRequest:w}=await import("./chunk-a2fcc46e344ae7ae.js"),U=await f();return(await w({...U,path:CW})).toString()}catch(f){}};var IQ=(f)=>{let w=async()=>{if(f.region===void 0)throw new Error("Region is missing from runtimeConfig");const U=f.region;if(typeof U==="string")return U;return U()};return{setRegion(U){w=U},region(){return w}}},OQ=(f)=>{return{region:f.region()}};var fT=/^[A-Za-z0-9+/]*={0,2}$/,CQ=(f)=>{if(f.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!fT.exec(f))throw new TypeError("Invalid base64 string.");const w=Kf(f,"base64");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength)};var bQ=(f)=>{let w;if(typeof f==="string")w=d0(f);else w=f;if(typeof w!=="object"||typeof w.byteOffset!=="number"||typeof w.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Rf(w.buffer,w.byteOffset,w.byteLength).toString("base64")};export{UT as ra,$T as sa,RT as ta,LT as ua,v as va,zW as wa,d0 as xa,KW as ya,k7 as za,Zf as Aa,m as Ba,sf as Ca,S1 as Da,lT as Ea,Df as Fa,Y2 as Ga,K2 as Ha,CZ as Ia,rZ as Ja,oZ as Ka,wR as La,W5 as Ma,DZ as Na,u5 as Oa,_2 as Pa,f9 as Qa,$9 as Ra,TR as Sa,MR as Ta,UY as Ua,$Y as Va,EY as Wa,ZY as Xa,eR as Ya,vM as Za,q7 as _a,mM as $a,l7 as ab,CQ as bb,bQ as cb,EQ as db,IQ as eb,OQ as fb};
|