gemi 0.4.35 → 0.4.37

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.
Files changed (78) hide show
  1. package/dist/app/App.d.ts.map +1 -1
  2. package/dist/app/createComponentTree.d.ts +2 -2
  3. package/dist/app/createComponentTree.d.ts.map +1 -1
  4. package/dist/app/createFlatViewRoutes.d.ts +4 -2
  5. package/dist/app/createFlatViewRoutes.d.ts.map +1 -1
  6. package/dist/app/createRouteManifest.d.ts +2 -2
  7. package/dist/app/createRouteManifest.d.ts.map +1 -1
  8. package/dist/app/index.js +32 -32
  9. package/dist/auth/AuthenticationServiceProvider.d.ts +4 -4
  10. package/dist/chunk-01052ff9d1c07ef8.js +2 -0
  11. package/dist/chunk-03c8e645c994d40a.js +2 -0
  12. package/dist/chunk-088ed28ebed2b009.js +5 -0
  13. package/dist/chunk-0f8e80862546cbc5.js +18 -0
  14. package/dist/chunk-1334ee957ff9058c.js +2 -0
  15. package/dist/chunk-15e9771e524c5726.js +2 -0
  16. package/dist/chunk-18d87123ae525263.js +2 -0
  17. package/dist/chunk-1900e90c372bb1d6.js +2 -0
  18. package/dist/chunk-2081b862587086df.js +2 -0
  19. package/dist/chunk-2a48e0098ccd4249.js +2 -0
  20. package/dist/chunk-2b2764983015552e.js +2 -0
  21. package/dist/chunk-3042abeb18cf180e.js +2 -0
  22. package/dist/chunk-339dd63e93f196b7.js +16 -0
  23. package/dist/chunk-464cce477d8a56e0.js +2 -0
  24. package/dist/chunk-4cb19a9e82653084.js +2 -0
  25. package/dist/chunk-4f1b43f5232b3e65.js +6 -0
  26. package/dist/chunk-51ee928673a12486.js +2 -0
  27. package/dist/chunk-54c03438ff1f41e5.js +2 -0
  28. package/dist/chunk-552bdaee8c03e091.js +9 -0
  29. package/dist/chunk-5c3681fb029d7588.js +1 -0
  30. package/dist/chunk-682b01231754a121.js +2 -0
  31. package/dist/chunk-6943b50bd0a3ac84.js +1 -0
  32. package/dist/chunk-7399f06d840a1449.js +2 -0
  33. package/dist/chunk-7431d60af8814bc8.js +2 -0
  34. package/dist/chunk-89c6080d4a693ddf.js +2 -0
  35. package/dist/chunk-9a622a10e7764b23.js +2 -0
  36. package/dist/chunk-9d1337fc9976354d.js +2 -0
  37. package/dist/chunk-9d2777df26b445e4.js +2 -0
  38. package/dist/chunk-9d2af1a704b857ee.js +2 -0
  39. package/dist/chunk-a9625dd807cb668e.js +2 -0
  40. package/dist/chunk-aad7af5112f0f4f2.js +2 -0
  41. package/dist/chunk-ac32b3d9dda47756.js +9 -0
  42. package/dist/chunk-b06168e5d3080486.js +1 -0
  43. package/dist/chunk-b07249c949a284d2.js +16 -0
  44. package/dist/chunk-b855e71b162ce5a2.js +2 -0
  45. package/dist/chunk-bd52b3f25b928eb1.js +2 -0
  46. package/dist/chunk-c609d06153ed09ce.js +2 -0
  47. package/dist/chunk-c8b00b645df96ed5.js +1 -1
  48. package/dist/chunk-c99b8c3d6bda27b0.js +2 -0
  49. package/dist/chunk-d12b578765686adb.js +6 -0
  50. package/dist/chunk-d93cbffc712a052f.js +2 -0
  51. package/dist/chunk-dab2dde8cc9da99b.js +9 -0
  52. package/dist/chunk-dc7b0cf226ba3afa.js +2 -0
  53. package/dist/chunk-dd8b042837b4d5f1.js +2 -0
  54. package/dist/chunk-df926b342440f55f.js +5 -0
  55. package/dist/chunk-e3ef81776c8f2d28.js +2 -0
  56. package/dist/chunk-ef1ebd10affe5726.js +2 -0
  57. package/dist/chunk-f117757df00aa18d.js +2 -0
  58. package/dist/chunk-fb25896f1638ca8e.js +3 -0
  59. package/dist/chunk-fc165cee61f6efe8.js +6 -0
  60. package/dist/chunk-ff086fe014985526.js +1 -0
  61. package/dist/client/index.d.ts +2 -1
  62. package/dist/client/index.d.ts.map +1 -1
  63. package/dist/client/rpc.d.ts +4 -0
  64. package/dist/client/rpc.d.ts.map +1 -1
  65. package/dist/client/types.d.ts +5 -0
  66. package/dist/client/types.d.ts.map +1 -1
  67. package/dist/http/ViewRouter.d.ts +38 -24
  68. package/dist/http/ViewRouter.d.ts.map +1 -1
  69. package/dist/http/index.d.ts +1 -1
  70. package/dist/http/index.d.ts.map +1 -1
  71. package/dist/http/index.js +1 -1
  72. package/dist/server/index.js +5 -5
  73. package/dist/storage/File.d.ts +4 -0
  74. package/dist/storage/File.d.ts.map +1 -1
  75. package/dist/storage/index.js +3 -3
  76. package/dist/utils/type.d.ts +3 -0
  77. package/dist/utils/type.d.ts.map +1 -1
  78. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{x as c} from"./chunk-a5c18c07abe8fd9c.js";import"./chunk-d93cbffc712a052f.js";import{eb as P} from"./chunk-3042abeb18cf180e.js";import{fb as a} from"./chunk-15e9771e524c5726.js";var d=c(P(),1);var D=c(a(),1);var m=c(a(),1),v=c(P(),1);var l=c(a(),1),C=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-4f1b43f5232b3e65.js"),{fromContainerMetadata:u}=await import("./chunk-51ee928673a12486.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),l.chain(n(t??{}),u(t))},Ec2InstanceMetadata:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:n}=await import("./chunk-51ee928673a12486.js");return n(t)},Environment:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:n}=await import("./chunk-9d1337fc9976354d.js");return n(t)}};if(e in i)return i[e];else throw new l.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${e}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:r})};var x=(e,{profile:s="default",logger:r}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(O(e,{profile:s,logger:r})||W(e,{profile:s,logger:r}))},O=(e,{profile:s,logger:r})=>{const i=typeof e.source_profile==="string"&&typeof e.credential_source==="undefined";if(i)r?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return i},W=(e,{profile:s,logger:r})=>{const i=typeof e.credential_source==="string"&&typeof e.source_profile==="undefined";if(i)r?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return i},b=async(e,s,r,i={})=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const t=s[e];if(!r.roleAssumer){const{getDefaultRoleAssumer:j}=await import("./chunk-c99b8c3d6bda27b0.js");r.roleAssumer=j({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r?.parentClientConfig},r.clientPlugins)}const{source_profile:n}=t;if(n&&n in i)throw new m.CredentialsProviderError("Detected a cycle attempting to resolve credentials for profile"+` ${v.getProfileName(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${n?`source_profile=[${n}]`:`profile=[${e}]`}`);const u=n?o(n,{...s,[n]:{...s[n],role_arn:t.role_arn??s[n].role_arn}},r,{...i,[n]:!0}):(await C(t.credential_source,e,r.logger)(r))(),f={RoleArn:t.role_arn,RoleSessionName:t.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:t.external_id,DurationSeconds:parseInt(t.duration_seconds||"3600",10)},{mfa_serial:_}=t;if(_){if(!r.mfaCodeProvider)throw new m.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});f.SerialNumber=_,f.TokenCode=await r.mfaCodeProvider(_)}const I=await u;return r.roleAssumer(I,f)};var A=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",k=async(e,s)=>import("./chunk-a9625dd807cb668e.js").then(({fromProcess:r})=>r({...e,profile:s})());var S=async(e,s={})=>{const{fromSSO:r}=await import("./chunk-dd8b042837b4d5f1.js");return r({profile:e,logger:s.logger})()},$=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var w=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,y=(e,s)=>{return s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}})};var R=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,h=async(e,s)=>import("./chunk-aad7af5112f0f4f2.js").then(({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})());var o=async(e,s,r,i={})=>{const t=s[e];if(Object.keys(i).length>0&&w(t))return y(t,r);if(x(t,{profile:e,logger:r.logger}))return b(e,s,r,i);if(w(t))return y(t,r);if(R(t))return h(t,r);if(A(t))return k(r,e);if($(t))return await S(e,r);throw new D.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var Z=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await d.parseKnownFiles(e);return o(d.getProfileName(e),s,e)};export{Z as fromIni};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-a5c18c07abe8fd9c.js";import{lb as E} from"./chunk-ff086fe014985526.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-9a622a10e7764b23.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
+ import{x as c} from"./chunk-a5c18c07abe8fd9c.js";import{eb as N} from"./chunk-3042abeb18cf180e.js";import{fb as m} from"./chunk-15e9771e524c5726.js";var p=c(m(),1);var h=c(m(),1);function s(o){try{const r=new Set(Array.from(o.match(/([A-Z_]){3,}/g)??[]));return r.delete("CONFIG"),r.delete("CONFIG_PREFIX_SEPARATOR"),r.delete("ENV"),[...r].join(", ")}catch(r){return o}}var u=(o,r)=>async()=>{try{const t=o(process.env);if(t===void 0)throw new Error;return t}catch(t){throw new h.CredentialsProviderError(t.message||`Not found in ENV: ${s(o.toString())}`,{logger:r})}};var w=c(m(),1),a=c(N(),1);var y=(o,{preferredFile:r="config",...t}={})=>async()=>{const e=a.getProfileName(t),{configFile:n,credentialsFile:i}=await a.loadSharedConfigFiles(t),f=i[e]||{},l=n[e]||{},E=r==="config"?{...f,...l}:{...l,...f};try{const g=o(E,r==="config"?n:i);if(g===void 0)throw new Error;return g}catch(d){throw new w.CredentialsProviderError(d.message||`Not found in config files w/ profile [${e}]: ${s(o.toString())}`,{logger:t.logger})}};var C=c(m(),1),x=(o)=>typeof o==="function",F=(o)=>x(o)?async()=>await o():C.fromStatic(o);var Q=({environmentVariableSelector:o,configFileSelector:r,default:t},e={})=>p.memoize(p.chain(u(o),y(r,e),F(t)));function S(o){const r={};if(o=o.replace(/^\?/,""),o)for(let t of o.split("&")){let[e,n=null]=t.split("=");if(e=decodeURIComponent(e),n)n=decodeURIComponent(n);if(!(e in r))r[e]=n;else if(Array.isArray(r[e]))r[e].push(n);else r[e]=[r[e],n]}return r}var v=(o)=>{if(typeof o==="string")return v(new URL(o));const{hostname:r,pathname:t,port:e,protocol:n,search:i}=o;let f;if(i)f=S(i);return{hostname:r,port:e?parseInt(e):void 0,protocol:n,path:t,query:f}};
2
+ export{Q as cb,v as db};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-a5c18c07abe8fd9c.js";import"./chunk-bbd36ce62b950ee5.js";import{kb as l,qb as S} from"./chunk-6943b50bd0a3ac84.js";import{sb as c,ub as m} from"./chunk-100b76ab0ca3e14d.js";var w=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-fc165cee61f6efe8.js"),{fromContainerMetadata:d}=await import("./chunk-e3ef81776c8f2d28.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),m(n(t??{}),d(t))},Ec2InstanceMetadata:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:n}=await import("./chunk-e3ef81776c8f2d28.js");return n(t)},Environment:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:n}=await import("./chunk-70bb003c03f21dad.js");return n(t)}};if(e in i)return i[e];else throw new c(`Unsupported credential source in profile ${s}. Got ${e}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:r})};var y=(e,{profile:s="default",logger:r}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(h(e,{profile:s,logger:r})||D(e,{profile:s,logger:r}))},h=(e,{profile:s,logger:r})=>{const i=typeof e.source_profile==="string"&&typeof e.credential_source==="undefined";if(i)r?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return i},D=(e,{profile:s,logger:r})=>{const i=typeof e.credential_source==="string"&&typeof e.source_profile==="undefined";if(i)r?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return i},C=async(e,s,r,i={})=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const t=s[e];if(!r.roleAssumer){const{getDefaultRoleAssumer:R}=await import("./chunk-ef1ebd10affe5726.js");r.roleAssumer=R({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r?.parentClientConfig},r.clientPlugins)}const{source_profile:n}=t;if(n&&n in i)throw new c("Detected a cycle attempting to resolve credentials for profile"+` ${l(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${n?`source_profile=[${n}]`:`profile=[${e}]`}`);const d=n?o(n,{...s,[n]:{...s[n],role_arn:t.role_arn??s[n].role_arn}},r,{...i,[n]:!0}):(await w(t.credential_source,e,r.logger)(r))(),u={RoleArn:t.role_arn,RoleSessionName:t.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:t.external_id,DurationSeconds:parseInt(t.duration_seconds||"3600",10)},{mfa_serial:f}=t;if(f){if(!r.mfaCodeProvider)throw new c(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});u.SerialNumber=f,u.TokenCode=await r.mfaCodeProvider(f)}const $=await d;return r.roleAssumer($,u)};var P=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",v=async(e,s)=>import("./chunk-9d2af1a704b857ee.js").then(({fromProcess:r})=>r({...e,profile:s})());var x=async(e,s={})=>{const{fromSSO:r}=await import("./chunk-682b01231754a121.js");return r({profile:e,logger:s.logger})()},b=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var _=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,a=(e,s)=>{return s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}})};var A=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,k=async(e,s)=>import("./chunk-c8b00b645df96ed5.js").then(({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})());var o=async(e,s,r,i={})=>{const t=s[e];if(Object.keys(i).length>0&&_(t))return a(t,r);if(y(t,{profile:e,logger:r.logger}))return C(e,s,r,i);if(_(t))return a(t,r);if(A(t))return k(t,r);if(P(t))return v(r,e);if(b(t))return await x(e,r);throw new c(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var H=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await S(e);return o(l(e),s,e)};export{H as fromIni};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-70bb003c03f21dad.js";import{x as w} from"./chunk-a5c18c07abe8fd9c.js";import{A as ue,D as Te,F as yr,N as E,O as t,P as Jr,R as p,S as b,T as j,U as F,V as h,aa as Er,ba as a,ca as br,da as Ge,ea as Je,fa as er,ga as rr,ia as d,ja as o,la as I,na as Le,oa as Qe,z as Oe} from"./chunk-088ed28ebed2b009.js";import{$a as Ze,Ba as N,Ca as cr,Da as $e,Ea as Ie,Fa as Re,Ga as tr,Ha as Ve,Ia as We,Ja as fe,Ka as Ae,La as ar,Ma as mr,Oa as S,Pa as $,Qa as wr,Ra as Ke,Ta as Me,Ua as kr,Va as Be,Wa as vr,Ya as q,Za as Xe,_a as Ye,ab as Fe,bb as De,cb as He,db as sr,eb as ir,qa as hr,ra as nr,sa as or,ta as dr,ua as Kr,wa as be,ya as je} from"./chunk-b07249c949a284d2.js";import"./chunk-bbd36ce62b950ee5.js";import{gb as Qr,hb as R} from"./chunk-5c3681fb029d7588.js";import{ib as pe} from"./chunk-552bdaee8c03e091.js";import"./chunk-6943b50bd0a3ac84.js";import"./chunk-100b76ab0ca3e14d.js";var P=w(N(),1);var re=w(q(),1),U=w(Kr(),1),Mr=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},H=function(e){return{schemeId:"smithy.api#noAuth"}},se=async(e,s,r)=>{return{operation:U.getSmithyContext(s).operation,region:await U.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},ie=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(H(e));break}case"RegisterClient":{s.push(H(e));break}case"StartDeviceAuthorization":{s.push(H(e));break}default:s.push(Mr(e))}return s},le=(e)=>{return{...re.resolveAwsSdkSigV4Config(e)}};var he=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},v={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var ne={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc 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-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.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",peerDependencies:{"@aws-sdk/client-sts":"^3.629.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var Ne=w(q(),1);var qe=w(q(),1),Ue=w(N(),1);var xe=w(Qr(),1);var oe={["required"]:!1,type:"String"},de={["required"]:!0,default:!1,type:"Boolean"},ye={["ref"]:"Endpoint"},ke={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},ce={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Ee={["ref"]:"PartitionResult"},te={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Ee,"supportsDualStack"]}]},ae=[ke],me=[ve],we=[{["ref"]:"Region"}],Lr={version:"1.0",parameters:{Region:oe,UseDualStack:de,UseFIPS:de,Endpoint:oe},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ye]}],rules:[{conditions:ae,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:me,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ye,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:we}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:we,assign:"PartitionResult"}],rules:[{conditions:[ke,ve],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,ce]},te],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:ae,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[ce,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Ee,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[te],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},Se=Lr;var Pe=(e,s={})=>{return Ie(Se,{endpointParams:e,logger:s.logger})};$e.aws=Re;var ze=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Fe,base64Encoder:e?.base64Encoder??De,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Pe,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ie,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new qe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ue.NoAuthSigner}],logger:e?.logger??new Te,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??xe.parseUrl,utf8Decoder:e?.utf8Decoder??be,utf8Encoder:e?.utf8Encoder??je}};var _e=(e)=>{Je(process.version);const s=He(e),r=()=>s().then(Ge),i=ze(e);return Ne.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ze,credentialDefaultProvider:e?.credentialDefaultProvider??pe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Xe({serviceId:i.serviceId,clientVersion:ne.version}),maxAttempts:e?.maxAttempts??R(Me),region:e?.region??R(fe,Ae),requestHandler:Le.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Be,default:async()=>(await r()).retryMode||Ke}),sha256:e?.sha256??Ye.bind(null,"sha256"),streamCollector:e?.streamCollector??Qe,useDualstackEndpoint:e?.useDualstackEndpoint??R(Ve),useFipsEndpoint:e?.useFipsEndpoint??R(We)}};var Ce=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((T)=>T.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},ge=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var x=(e)=>e,lr=(e,s)=>{const r={...x(sr(e)),...x(er(e)),...x(Oe(e)),...x(Ce(e))};return s.forEach((i)=>i.configure(r)),{...e,...ir(r),...rr(r),...ue(r),...ge(r)}};class _ extends yr{constructor(...[e]){const s=_e(e||{}),r=he(s),i=cr(r),l=kr(i),n=ar(l),T=hr(n),Wr=wr(T),fr=le(Wr),ee=lr(fr,e?.extensions||[]);super(ee);this.config=ee,this.middlewareStack.use(tr(this.config)),this.middlewareStack.use(vr(this.config)),this.middlewareStack.use(mr(this.config)),this.middlewareStack.use(nr(this.config)),this.middlewareStack.use(or(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:se,identityProviderConfigProvider:async(Ar)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Ar.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class y extends Er{constructor(e){super(e);Object.setPrototypeOf(this,y.prototype)}}class z extends y{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends y{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends y{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends y{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends y{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends y{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends y{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends y{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends y{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends y{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends y{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description}}class Q extends y{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class X extends y{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}class Y extends y{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,Y.prototype),this.error=e.error,this.error_description=e.error_description}}var Sr=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),$r=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Ir=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Rr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Pr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),Tr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var k=w(q(),1),D=w(N(),1);var jr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Fr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[ls]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(T)=>I(T),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},Dr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},qr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:c(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:c(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:c(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:p,clientSecret:h,clientSecretExpiresAt:p,tokenEndpoint:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Z(e,s);const r=d({$metadata:c(e)}),i=j(F(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Z=async(e,s)=>{const r={...e,body:await k.parseJsonErrorBody(e.body,s)},i=k.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Yr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Zr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Hr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Nr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await _r(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Cr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Or(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await es(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await rs(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ss(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await is(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await ur(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await pr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await gr(r,s);default:const l=r.body;return Xr({output:e,parsedBody:l,errorCode:i})}},Xr=br(y),Yr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new z({$metadata:c(e),...r});return a(n,e.body)},Zr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new G({$metadata:c(e),...r});return a(n,e.body)},Hr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new J({$metadata:c(e),...r});return a(n,e.body)},Nr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new V({$metadata:c(e),...r});return a(n,e.body)},_r=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new W({$metadata:c(e),...r});return a(n,e.body)},pr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new X({$metadata:c(e),...r});return a(n,e.body)},Cr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:c(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Y({$metadata:c(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:c(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new Q({$metadata:c(e),...r});return a(n,e.body)},es=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:c(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:c(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new B({$metadata:c(e),...r});return a(n,e.body)},is=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new L({$metadata:c(e),...r});return a(n,e.body)},c=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var ls="aws_iam";class C extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Sr,$r).ser(jr).de(Ur).build(){}class g extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Ir,Rr).ser(Fr).de(xr).build(){}class O extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Pr).ser(Dr).de(zr).build(){}class u extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(Tr,void 0).ser(qr).de(Gr).build(){}var hs={CreateTokenCommand:C,CreateTokenWithIAMCommand:g,RegisterClientCommand:O,StartDeviceAuthorizationCommand:u};class Vr extends _{}Jr(hs,Vr);export{yr as __Client,L as UnsupportedGrantTypeException,B as UnauthorizedClientException,Tr as StartDeviceAuthorizationRequestFilterSensitiveLog,u as StartDeviceAuthorizationCommand,M as SlowDownException,y as SSOOIDCServiceException,_ as SSOOIDCClient,Vr as SSOOIDC,Pr as RegisterClientResponseFilterSensitiveLog,O as RegisterClientCommand,K as InvalidScopeException,Q as InvalidRequestRegionException,A as InvalidRequestException,Y as InvalidRedirectUriException,f as InvalidGrantException,X as InvalidClientMetadataException,W as InvalidClientException,V as InternalServerException,J as ExpiredTokenException,Rr as CreateTokenWithIAMResponseFilterSensitiveLog,Ir as CreateTokenWithIAMRequestFilterSensitiveLog,g as CreateTokenWithIAMCommand,$r as CreateTokenResponseFilterSensitiveLog,Sr as CreateTokenRequestFilterSensitiveLog,C as CreateTokenCommand,G as AuthorizationPendingException,z as AccessDeniedException,E as $Command};
@@ -0,0 +1,2 @@
1
+ import{y as B} from"./chunk-a5c18c07abe8fd9c.js";import{ab as $1} from"./chunk-d93cbffc712a052f.js";var Y=B((C)=>{Object.defineProperty(C,"__esModule",{value:!0});C.getHomeDir=void 0;var d=import.meta.require("os"),l=import.meta.require("path"),h={},p=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},o=()=>{const{HOME:M,USERPROFILE:j,HOMEPATH:q,HOMEDRIVE:$=`C:${l.sep}`}=process.env;if(M)return M;if(j)return j;if(q)return`${$}${q}`;const H=p();if(!h[H])h[H]=d.homedir();return h[H]};C.getHomeDir=o});var X=B((A)=>{Object.defineProperty(A,"__esModule",{value:!0});A.getSSOTokenFilepath=void 0;var r=import.meta.require("crypto"),n=import.meta.require("path"),_=Y(),t=(M)=>{const q=r.createHash("sha1").update(M).digest("hex");return n.join(_.getHomeDir(),".aws","sso","cache",`${q}.json`)};A.getSSOTokenFilepath=t});var I=B((k)=>{Object.defineProperty(k,"__esModule",{value:!0});k.getSSOTokenFromFile=void 0;var m=import.meta.require("fs"),i=X(),{readFile:a}=m.promises,e=async(M)=>{const j=i.getSSOTokenFilepath(M),q=await a(j,"utf8");return JSON.parse(q)};k.getSSOTokenFromFile=e});var D=B((P)=>{Object.defineProperty(P,"__esModule",{value:!0});P.slurpFile=void 0;var j1=import.meta.require("fs"),{readFile:M1}=j1.promises,w={},q1=(M,j)=>{if(!w[M]||(j===null||j===void 0?void 0:j.ignoreCache))w[M]=M1(M,"utf8");return w[M]};P.slurpFile=q1});var x1=B((N1,K)=>{var{defineProperty:v,getOwnPropertyDescriptor:H1,getOwnPropertyNames:u1}=Object,z1=Object.prototype.hasOwnProperty,z=(M,j)=>v(M,"name",{value:j,configurable:!0}),Q1=(M,j)=>{for(var q in j)v(M,q,{get:j[q],enumerable:!0})},G=(M,j,q,$)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let H of u1(j))if(!z1.call(M,H)&&H!==q)v(M,H,{get:()=>j[H],enumerable:!($=H1(j,H))||$.enumerable})}return M},O=(M,j,q)=>(G(M,j,"default"),q&&G(q,j,"default")),U1=(M)=>G(v({},"__esModule",{value:!0}),M),J={};Q1(J,{CONFIG_PREFIX_SEPARATOR:()=>U,DEFAULT_PROFILE:()=>S,ENV_PROFILE:()=>E,getProfileName:()=>W1,loadSharedConfigFiles:()=>f,loadSsoSessionData:()=>w1,parseKnownFiles:()=>G1});K.exports=U1(J);O(J,Y(),K.exports);var E="AWS_PROFILE",S="default",W1=z((M)=>M.profile||process.env[E]||S,"getProfileName");O(J,X(),K.exports);O(J,I(),K.exports);var b=$1(),Y1=z((M)=>Object.entries(M).filter(([j])=>{const q=j.indexOf(U);if(q===-1)return!1;return Object.values(b.IniSectionType).includes(j.substring(0,q))}).reduce((j,[q,$])=>{const H=q.indexOf(U),u=q.substring(0,H)===b.IniSectionType.PROFILE?q.substring(H+1):q;return j[u]=$,j},{...M.default&&{default:M.default}}),"getConfigData"),s=import.meta.require("path"),Z1=Y(),B1="AWS_CONFIG_FILE",y=z(()=>process.env[B1]||s.join(Z1.getHomeDir(),".aws","config"),"getConfigFilepath"),J1=Y(),K1="AWS_SHARED_CREDENTIALS_FILE",b1=z(()=>process.env[K1]||s.join(J1.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),s1=Y(),v1=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,V1=["__proto__","profile __proto__"],x=z((M)=>{const j={};let q,$;for(let H of M.split(/\r?\n/)){const u=H.split(/(^|\s)[;#]/)[0].trim();if(u[0]==="["&&u[u.length-1]==="]"){q=void 0,$=void 0;const Q=u.substring(1,u.length-1),W=v1.exec(Q);if(W){const[,Z,,T]=W;if(Object.values(b.IniSectionType).includes(Z))q=[Z,T].join(U)}else q=Q;if(V1.includes(Q))throw new Error(`Found invalid profile name "${Q}"`)}else if(q){const Q=u.indexOf("=");if(![0,-1].includes(Q)){const[W,Z]=[u.substring(0,Q).trim(),u.substring(Q+1).trim()];if(Z==="")$=W;else{if($&&H.trimStart()===H)$=void 0;j[q]=j[q]||{};const T=$?[$,W].join(U):W;j[q][T]=Z}}}}return j},"parseIni"),F=D(),g=z(()=>({}),"swallowError"),U=".",f=z(async(M={})=>{const{filepath:j=b1(),configFilepath:q=y()}=M,$=s1.getHomeDir();let u=j;if(j.startsWith("~/"))u=s.join($,j.slice(2));let V=q;if(q.startsWith("~/"))V=s.join($,q.slice(2));const Q=await Promise.all([F.slurpFile(V,{ignoreCache:M.ignoreCache}).then(x).then(Y1).catch(g),F.slurpFile(u,{ignoreCache:M.ignoreCache}).then(x).catch(g)]);return{configFile:Q[0],credentialsFile:Q[1]}},"loadSharedConfigFiles"),T1=z((M)=>Object.entries(M).filter(([j])=>j.startsWith(b.IniSectionType.SSO_SESSION+U)).reduce((j,[q,$])=>({...j,[q.substring(q.indexOf(U)+1)]:$}),{}),"getSsoSessionData"),h1=D(),X1=z(()=>({}),"swallowError"),w1=z(async(M={})=>h1.slurpFile(M.configFilepath??y()).then(x).then(T1).catch(X1),"loadSsoSessionData"),D1=z((...M)=>{const j={};for(let q of M)for(let[$,H]of Object.entries(q))if(j[$]!==void 0)Object.assign(j[$],H);else j[$]=H;return j},"mergeConfigFiles"),G1=z(async(M)=>{const j=await f(M);return D1(j.configFile,j.credentialsFile)},"parseKnownFiles")});
2
+ export{x1 as eb};
@@ -0,0 +1,16 @@
1
+ import{x as D,y as Z} from"./chunk-a5c18c07abe8fd9c.js";import{B as j,C as cE,D as oU,E as fF,G as m2,H as DT,I as cf,K as Lf,L as i2,M as t2,N as EF} from"./chunk-df926b342440f55f.js";import{ab as uf} from"./chunk-d93cbffc712a052f.js";import{cb as t,db as KE} from"./chunk-2081b862587086df.js";import{eb as j0} from"./chunk-3042abeb18cf180e.js";import{fb as b0} from"./chunk-15e9771e524c5726.js";var y=Z((UM,aE)=>{var{defineProperty:Df,getOwnPropertyDescriptor:GI,getOwnPropertyNames:II}=Object,WI=Object.prototype.hasOwnProperty,tE=(f,E)=>Df(f,"name",{value:E,configurable:!0}),LI=(f,E)=>{for(var w in E)Df(f,w,{get:E[w],enumerable:!0})},FI=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of II(E))if(!WI.call(f,$)&&$!==w)Df(f,$,{get:()=>E[$],enumerable:!(U=GI(E,$))||U.enumerable})}return f},OI=(f)=>FI(Df({},"__esModule",{value:!0}),f),eE={};LI(eE,{getSmithyContext:()=>AI,normalizeProvider:()=>TI});aE.exports=OI(eE);var iE=uf(),AI=tE((f)=>f[iE.SMITHY_CONTEXT_KEY]||(f[iE.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),TI=tE((f)=>{if(typeof f==="function")return f;const E=Promise.resolve(f);return()=>E},"normalizeProvider")});var $w=Z((RM,ww)=>{var h0=function(f){try{const E=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return E.delete("CONFIG"),E.delete("CONFIG_PREFIX_SEPARATOR"),E.delete("ENV"),[...E].join(", ")}catch(E){return f}},vf=Object.defineProperty,MI=Object.getOwnPropertyDescriptor,XI=Object.getOwnPropertyNames,ZI=Object.prototype.hasOwnProperty,wf=(f,E)=>vf(f,"name",{value:E,configurable:!0}),YI=(f,E)=>{for(var w in E)vf(f,w,{get:E[w],enumerable:!0})},zI=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of XI(E))if(!ZI.call(f,$)&&$!==w)vf(f,$,{get:()=>E[$],enumerable:!(U=MI(E,$))||U.enumerable})}return f},QI=(f)=>zI(vf({},"__esModule",{value:!0}),f),Ew={};YI(Ew,{loadConfig:()=>VI});ww.exports=QI(Ew);var Zf=b0();wf(h0,"getSelectorName");var JI=wf((f,E)=>async()=>{try{const w=f(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new Zf.CredentialsProviderError(w.message||`Not found in ENV: ${h0(f.toString())}`,{logger:E})}},"fromEnv"),fw=j0(),KI=wf((f,{preferredFile:E="config",...w}={})=>async()=>{const U=fw.getProfileName(w),{configFile:$,credentialsFile:R}=await fw.loadSharedConfigFiles(w),G=R[U]||{},I=$[U]||{},W=E==="config"?{...G,...I}:{...I,...G};try{const F=f(W,E==="config"?$:R);if(F===void 0)throw new Error;return F}catch(L){throw new Zf.CredentialsProviderError(L.message||`Not found in config files w/ profile [${U}]: ${h0(f.toString())}`,{logger:w.logger})}},"fromSharedConfigFiles"),BI=wf((f)=>typeof f==="function","isFunction"),HI=wf((f)=>BI(f)?async()=>await f():Zf.fromStatic(f),"fromStatic"),VI=wf(({environmentVariableSelector:f,configFileSelector:E,default:w},U={})=>Zf.memoize(Zf.chain(JI(f),KI(E,U),HI(w))),"loadConfig")});var Lw=Z((Iw)=>{Object.defineProperty(Iw,"__esModule",{value:!0});Iw.getEndpointUrlConfig=void 0;var Uw=j0(),Rw="AWS_ENDPOINT_URL",Gw="endpoint_url",qI=(f)=>({environmentVariableSelector:(E)=>{const w=f.split(" ").map((R)=>R.toUpperCase()),U=E[[Rw,...w].join("_")];if(U)return U;const $=E[Rw];if($)return $;return},configFileSelector:(E,w)=>{if(w&&E.services){const $=w[["services",E.services].join(Uw.CONFIG_PREFIX_SEPARATOR)];if($){const R=f.split(" ").map((I)=>I.toLowerCase()),G=$[[R.join("_"),Gw].join(Uw.CONFIG_PREFIX_SEPARATOR)];if(G)return G}}const U=E[Gw];if(U)return U;return},default:void 0});Iw.getEndpointUrlConfig=qI});var Aw=Z((Fw)=>{Object.defineProperty(Fw,"__esModule",{value:!0});Fw.getEndpointFromConfig=void 0;var CI=$w(),NI=Lw(),PI=async(f)=>CI.loadConfig(NI.getEndpointUrlConfig(f))();Fw.getEndpointFromConfig=PI});var Zw=Z((WM,Xw)=>{var Mw=function(f){const E={};if(f=f.replace(/^\?/,""),f)for(let w of f.split("&")){let[U,$=null]=w.split("=");if(U=decodeURIComponent(U),$)$=decodeURIComponent($);if(!(U in E))E[U]=$;else if(Array.isArray(E[U]))E[U].push($);else E[U]=[E[U],$]}return E},yf=Object.defineProperty,SI=Object.getOwnPropertyDescriptor,cI=Object.getOwnPropertyNames,bI=Object.prototype.hasOwnProperty,jI=(f,E)=>yf(f,"name",{value:E,configurable:!0}),hI=(f,E)=>{for(var w in E)yf(f,w,{get:E[w],enumerable:!0})},kI=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of cI(E))if(!bI.call(f,$)&&$!==w)yf(f,$,{get:()=>E[$],enumerable:!(U=SI(E,$))||U.enumerable})}return f},_I=(f)=>kI(yf({},"__esModule",{value:!0}),f),Tw={};hI(Tw,{parseQueryString:()=>Mw});Xw.exports=_I(Tw);jI(Mw,"parseQueryString")});var Jw=Z((LM,Qw)=>{var{defineProperty:df,getOwnPropertyDescriptor:uI,getOwnPropertyNames:DI}=Object,vI=Object.prototype.hasOwnProperty,yI=(f,E)=>df(f,"name",{value:E,configurable:!0}),dI=(f,E)=>{for(var w in E)df(f,w,{get:E[w],enumerable:!0})},xI=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of DI(E))if(!vI.call(f,$)&&$!==w)df(f,$,{get:()=>E[$],enumerable:!(U=uI(E,$))||U.enumerable})}return f},pI=(f)=>xI(df({},"__esModule",{value:!0}),f),Yw={};dI(Yw,{parseUrl:()=>zw});Qw.exports=pI(Yw);var gI=Zw(),zw=yI((f)=>{if(typeof f==="string")return zw(new URL(f));const{hostname:E,pathname:w,port:U,protocol:$,search:R}=f;let G;if(R)G=gI.parseQueryString(R);return{hostname:E,port:U?parseInt(U):void 0,protocol:$,path:w,query:G}},"parseUrl")});var _0=Z((FM,Nw)=>{var Cw=function(f,E,w){return{applyToStack:(U)=>{U.add(Bw(f,w),Vw),U.add(Hw(f,E),qw)}}},xf=Object.defineProperty,sI=Object.getOwnPropertyDescriptor,nI=Object.getOwnPropertyNames,rI=Object.prototype.hasOwnProperty,k0=(f,E)=>xf(f,"name",{value:E,configurable:!0}),lI=(f,E)=>{for(var w in E)xf(f,w,{get:E[w],enumerable:!0})},oI=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of nI(E))if(!rI.call(f,$)&&$!==w)xf(f,$,{get:()=>E[$],enumerable:!(U=sI(E,$))||U.enumerable})}return f},mI=(f)=>oI(xf({},"__esModule",{value:!0}),f),Kw={};lI(Kw,{deserializerMiddleware:()=>Bw,deserializerMiddlewareOption:()=>Vw,getSerdePlugin:()=>Cw,serializerMiddleware:()=>Hw,serializerMiddlewareOption:()=>qw});Nw.exports=mI(Kw);var Bw=k0((f,E)=>(w)=>async(U)=>{const{response:$}=await w(U);try{const R=await E($,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"),Hw=k0((f,E)=>(w,U)=>async($)=>{var R;const G=((R=U.endpointV2)==null?void 0:R.url)&&f.urlParser?async()=>f.urlParser(U.endpointV2.url):f.endpoint;if(!G)throw new Error("No valid endpoint provider available.");const I=await E($.input,{...f,endpoint:G});return w({...$,request:I})},"serializerMiddleware"),Vw={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},qw={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};k0(Cw,"getSerdePlugin")});var _w=Z((OM,kw)=>{var{defineProperty:gf,getOwnPropertyDescriptor:iI,getOwnPropertyNames:tI}=Object,eI=Object.prototype.hasOwnProperty,k=(f,E)=>gf(f,"name",{value:E,configurable:!0}),aI=(f,E)=>{for(var w in E)gf(f,w,{get:E[w],enumerable:!0})},fW=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of tI(E))if(!eI.call(f,$)&&$!==w)gf(f,$,{get:()=>E[$],enumerable:!(U=iI(E,$))||U.enumerable})}return f},EW=(f)=>fW(gf({},"__esModule",{value:!0}),f),Sw={};aI(Sw,{endpointMiddleware:()=>jw,endpointMiddlewareOptions:()=>hw,getEndpointFromInstructions:()=>cw,getEndpointPlugin:()=>OW,resolveEndpointConfig:()=>AW,resolveParams:()=>bw,toEndpointV1:()=>u0});kw.exports=EW(Sw);var wW=k(async(f)=>{const E=(f==null?void 0:f.Bucket)||"";if(typeof f.Bucket==="string")f.Bucket=E.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(IW(E)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!GW(E)||E.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||E.toLowerCase()!==E||E.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},"resolveParamsForS3"),$W=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,UW=/(\d+\.){3}\d+/,RW=/\.\./,GW=k((f)=>$W.test(f)&&!UW.test(f)&&!RW.test(f),"isDnsCompatibleBucketName"),IW=k((f)=>{const[E,w,U,,,$]=f.split(":"),R=E==="arn"&&f.split(":").length>=6,G=Boolean(R&&w&&U&&$);if(R&&!G)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return G},"isArnBucketName"),WW=k((f,E,w)=>{const U=k(async()=>{const $=w[f]??w[E];if(typeof $==="function")return $();return $},"configProvider");if(f==="credentialScope"||E==="CredentialScope")return async()=>{const $=typeof w.credentials==="function"?await w.credentials():w.credentials;return($==null?void 0:$.credentialScope)??($==null?void 0:$.CredentialScope)};if(f==="accountId"||E==="AccountId")return async()=>{const $=typeof w.credentials==="function"?await w.credentials():w.credentials;return($==null?void 0:$.accountId)??($==null?void 0:$.AccountId)};if(f==="endpoint"||E==="endpoint")return async()=>{const $=await U();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){const{protocol:R,hostname:G,port:I,path:W}=$;return`${R}//${G}${I?":"+I:""}${W}`}}return $};return U},"createConfigValueProvider"),LW=Aw(),Pw=Jw(),u0=k((f)=>{if(typeof f==="object"){if("url"in f)return Pw.parseUrl(f.url);return f}return Pw.parseUrl(f)},"toEndpointV1"),cw=k(async(f,E,w,U)=>{if(!w.endpoint){const G=await LW.getEndpointFromConfig(w.serviceId||"");if(G)w.endpoint=()=>Promise.resolve(u0(G))}const $=await bw(f,E,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider($,U)},"getEndpointFromInstructions"),bw=k(async(f,E,w)=>{var U;const $={},R=((U=E==null?void 0:E.getEndpointParameterInstructions)==null?void 0:U.call(E))||{};for(let[G,I]of Object.entries(R))switch(I.type){case"staticContextParams":$[G]=I.value;break;case"contextParams":$[G]=f[I.name];break;case"clientContextParams":case"builtInParams":$[G]=await WW(I.name,G,w)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(I))}if(Object.keys(R).length===0)Object.assign($,w);if(String(w.serviceId).toLowerCase()==="s3")await wW($);return $},"resolveParams"),pf=y(),jw=k(({config:f,instructions:E})=>{return(w,U)=>async($)=>{var R,G,I;const W=await cw($.input,{getEndpointParameterInstructions(){return E}},{...f},U);U.endpointV2=W,U.authSchemes=(R=W.properties)==null?void 0:R.authSchemes;const L=(G=U.authSchemes)==null?void 0:G[0];if(L){U.signing_region=L.signingRegion,U.signing_service=L.signingName;const F=pf.getSmithyContext(U),O=(I=F==null?void 0:F.selectedHttpAuthScheme)==null?void 0:I.httpAuthOption;if(O)O.signingProperties=Object.assign(O.signingProperties||{},{signing_region:L.signingRegion,signingRegion:L.signingRegion,signing_service:L.signingName,signingName:L.signingName,signingRegionSet:L.signingRegionSet},L.properties)}return w({...$})}},"endpointMiddleware"),FW=_0(),hw={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:FW.serializerMiddlewareOption.name},OW=k((f,E)=>({applyToStack:(w)=>{w.addRelativeTo(jw({config:f,instructions:E}),hw)}}),"getEndpointPlugin"),AW=k((f)=>{const E=f.tls??!0,{endpoint:w}=f,U=w!=null?async()=>u0(await pf.normalizeProvider(w)()):void 0;return{...f,endpoint:U,tls:E,isCustomEndpoint:!!w,useDualstackEndpoint:pf.normalizeProvider(f.useDualstackEndpoint??!1),useFipsEndpoint:pf.normalizeProvider(f.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var D0=Z((uw)=>{var MW=function(f){return f&&f.__esModule?f:{default:f}},XW=function(){if(sf>nf.length-16)TW.default.randomFillSync(nf),sf=0;return nf.slice(sf,sf+=16)};Object.defineProperty(uw,"__esModule",{value:!0});uw.default=XW;var TW=MW(import.meta.require("crypto")),nf=new Uint8Array(256),sf=nf.length});var yw=Z((Dw)=>{Object.defineProperty(Dw,"__esModule",{value:!0});Dw.default=void 0;var YW=/^(?:[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;Dw.default=YW});var Yf=Z((dw)=>{var QW=function(f){return f&&f.__esModule?f:{default:f}},JW=function(f){return typeof f==="string"&&zW.default.test(f)};Object.defineProperty(dw,"__esModule",{value:!0});dw.default=void 0;var zW=QW(yw()),KW=JW;dw.default=KW});var zf=Z((gw)=>{var HW=function(f){return f&&f.__esModule?f:{default:f}},pw=function(f,E=0){return C[f[E+0]]+C[f[E+1]]+C[f[E+2]]+C[f[E+3]]+"-"+C[f[E+4]]+C[f[E+5]]+"-"+C[f[E+6]]+C[f[E+7]]+"-"+C[f[E+8]]+C[f[E+9]]+"-"+C[f[E+10]]+C[f[E+11]]+C[f[E+12]]+C[f[E+13]]+C[f[E+14]]+C[f[E+15]]},VW=function(f,E=0){const w=pw(f,E);if(!BW.default(w))throw TypeError("Stringified UUID is invalid");return w};Object.defineProperty(gw,"__esModule",{value:!0});gw.default=void 0;gw.unsafeStringify=pw;var BW=HW(Yf()),C=[];for(let f=0;f<256;++f)C.push((f+256).toString(16).slice(1));var qW=VW;gw.default=qW});var ow=Z((rw)=>{var SW=function(f){return f&&f.__esModule?f:{default:f}},cW=function(f,E,w){let U=E&&w||0;const $=E||new Array(16);f=f||{};let R=f.node||nw,G=f.clockseq!==void 0?f.clockseq:v0;if(R==null||G==null){const T=f.random||(f.rng||NW.default)();if(R==null)R=nw=[T[0]|1,T[1],T[2],T[3],T[4],T[5]];if(G==null)G=v0=(T[6]<<8|T[7])&16383}let I=f.msecs!==void 0?f.msecs:Date.now(),W=f.nsecs!==void 0?f.nsecs:d0+1;const L=I-y0+(W-d0)/1e4;if(L<0&&f.clockseq===void 0)G=G+1&16383;if((L<0||I>y0)&&f.nsecs===void 0)W=0;if(W>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");y0=I,d0=W,v0=G,I+=12219292800000;const F=((I&268435455)*1e4+W)%4294967296;$[U++]=F>>>24&255,$[U++]=F>>>16&255,$[U++]=F>>>8&255,$[U++]=F&255;const O=I/4294967296*1e4&268435455;$[U++]=O>>>8&255,$[U++]=O&255,$[U++]=O>>>24&15|16,$[U++]=O>>>16&255,$[U++]=G>>>8|128,$[U++]=G&255;for(let T=0;T<6;++T)$[U+T]=R[T];return E||PW.unsafeStringify($)};Object.defineProperty(rw,"__esModule",{value:!0});rw.default=void 0;var NW=SW(D0()),PW=zf(),nw,v0,y0=0,d0=0,bW=cW;rw.default=bW});var x0=Z((mw)=>{var hW=function(f){return f&&f.__esModule?f:{default:f}},kW=function(f){if(!jW.default(f))throw TypeError("Invalid UUID");let E;const w=new Uint8Array(16);return w[0]=(E=parseInt(f.slice(0,8),16))>>>24,w[1]=E>>>16&255,w[2]=E>>>8&255,w[3]=E&255,w[4]=(E=parseInt(f.slice(9,13),16))>>>8,w[5]=E&255,w[6]=(E=parseInt(f.slice(14,18),16))>>>8,w[7]=E&255,w[8]=(E=parseInt(f.slice(19,23),16))>>>8,w[9]=E&255,w[10]=(E=parseInt(f.slice(24,36),16))/1099511627776&255,w[11]=E/4294967296&255,w[12]=E>>>24&255,w[13]=E>>>16&255,w[14]=E>>>8&255,w[15]=E&255,w};Object.defineProperty(mw,"__esModule",{value:!0});mw.default=void 0;var jW=hW(Yf()),_W=kW;mw.default=_W});var p0=Z((aw)=>{var vW=function(f){return f&&f.__esModule?f:{default:f}},yW=function(f){f=unescape(encodeURIComponent(f));const E=[];for(let w=0;w<f.length;++w)E.push(f.charCodeAt(w));return E},dW=function(f,E,w){function U($,R,G,I){var W;if(typeof $==="string")$=yW($);if(typeof R==="string")R=DW.default(R);if(((W=R)===null||W===void 0?void 0:W.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let L=new Uint8Array(16+$.length);if(L.set(R),L.set($,R.length),L=w(L),L[6]=L[6]&15|E,L[8]=L[8]&63|128,G){I=I||0;for(let F=0;F<16;++F)G[I+F]=L[F];return G}return uW.unsafeStringify(L)}try{U.name=f}catch($){}return U.DNS=tw,U.URL=ew,U};Object.defineProperty(aw,"__esModule",{value:!0});aw.URL=aw.DNS=void 0;aw.default=dW;var uW=zf(),DW=vW(x0()),tw="6ba7b810-9dad-11d1-80b4-00c04fd430c8";aw.DNS=tw;var ew="6ba7b811-9dad-11d1-80b4-00c04fd430c8";aw.URL=ew});var $1=Z((E1)=>{var sW=function(f){return f&&f.__esModule?f:{default:f}},nW=function(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return gW.default.createHash("md5").update(f).digest()};Object.defineProperty(E1,"__esModule",{value:!0});E1.default=void 0;var gW=sW(import.meta.require("crypto")),rW=nW;E1.default=rW});var I1=Z((R1)=>{var U1=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(R1,"__esModule",{value:!0});R1.default=void 0;var lW=U1(p0()),oW=U1($1()),mW=lW.default("v3",48,oW.default),iW=mW;R1.default=iW});var F1=Z((W1)=>{var eW=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(W1,"__esModule",{value:!0});W1.default=void 0;var tW=eW(import.meta.require("crypto")),aW={randomUUID:tW.default.randomUUID};W1.default=aW});var X1=Z((T1)=>{var A1=function(f){return f&&f.__esModule?f:{default:f}},wL=function(f,E,w){if(O1.default.randomUUID&&!E&&!f)return O1.default.randomUUID();f=f||{};const U=f.random||(f.rng||fL.default)();if(U[6]=U[6]&15|64,U[8]=U[8]&63|128,E){w=w||0;for(let $=0;$<16;++$)E[w+$]=U[$];return E}return EL.unsafeStringify(U)};Object.defineProperty(T1,"__esModule",{value:!0});T1.default=void 0;var O1=A1(F1()),fL=A1(D0()),EL=zf(),$L=wL;T1.default=$L});var z1=Z((Z1)=>{var RL=function(f){return f&&f.__esModule?f:{default:f}},GL=function(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return UL.default.createHash("sha1").update(f).digest()};Object.defineProperty(Z1,"__esModule",{value:!0});Z1.default=void 0;var UL=RL(import.meta.require("crypto")),IL=GL;Z1.default=IL});var B1=Z((J1)=>{var Q1=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(J1,"__esModule",{value:!0});J1.default=void 0;var WL=Q1(p0()),LL=Q1(z1()),FL=WL.default("v5",80,LL.default),OL=FL;J1.default=OL});var q1=Z((H1)=>{Object.defineProperty(H1,"__esModule",{value:!0});H1.default=void 0;var AL="00000000-0000-0000-0000-000000000000";H1.default=AL});var P1=Z((C1)=>{var ML=function(f){return f&&f.__esModule?f:{default:f}},XL=function(f){if(!TL.default(f))throw TypeError("Invalid UUID");return parseInt(f.slice(14,15),16)};Object.defineProperty(C1,"__esModule",{value:!0});C1.default=void 0;var TL=ML(Yf()),ZL=XL;C1.default=ZL});var g0=Z((_)=>{var g=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(_,"__esModule",{value:!0});Object.defineProperty(_,"NIL",{enumerable:!0,get:function(){return KL.default}});Object.defineProperty(_,"parse",{enumerable:!0,get:function(){return qL.default}});Object.defineProperty(_,"stringify",{enumerable:!0,get:function(){return VL.default}});Object.defineProperty(_,"v1",{enumerable:!0,get:function(){return YL.default}});Object.defineProperty(_,"v3",{enumerable:!0,get:function(){return zL.default}});Object.defineProperty(_,"v4",{enumerable:!0,get:function(){return QL.default}});Object.defineProperty(_,"v5",{enumerable:!0,get:function(){return JL.default}});Object.defineProperty(_,"validate",{enumerable:!0,get:function(){return HL.default}});Object.defineProperty(_,"version",{enumerable:!0,get:function(){return BL.default}});var YL=g(ow()),zL=g(I1()),QL=g(X1()),JL=g(B1()),KL=g(q1()),BL=g(P1()),HL=g(Yf()),VL=g(zf()),qL=g(x0())});var s0=Z((PM,j1)=>{var{defineProperty:rf,getOwnPropertyDescriptor:CL,getOwnPropertyNames:NL}=Object,PL=Object.prototype.hasOwnProperty,$f=(f,E)=>rf(f,"name",{value:E,configurable:!0}),SL=(f,E)=>{for(var w in E)rf(f,w,{get:E[w],enumerable:!0})},cL=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of NL(E))if(!PL.call(f,$)&&$!==w)rf(f,$,{get:()=>E[$],enumerable:!(U=CL(E,$))||U.enumerable})}return f},bL=(f)=>cL(rf({},"__esModule",{value:!0}),f),S1={};SL(S1,{isClockSkewCorrectedError:()=>c1,isClockSkewError:()=>vL,isRetryableByTrait:()=>DL,isServerError:()=>dL,isThrottlingError:()=>yL,isTransientError:()=>b1});j1.exports=bL(S1);var jL=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],hL=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],kL=["TimeoutError","RequestTimeout","RequestTimeoutException"],_L=[500,502,503,504],uL=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],DL=$f((f)=>f.$retryable!==void 0,"isRetryableByTrait"),vL=$f((f)=>jL.includes(f.name),"isClockSkewError"),c1=$f((f)=>{var E;return(E=f.$metadata)==null?void 0:E.clockSkewCorrected},"isClockSkewCorrectedError"),yL=$f((f)=>{var E,w;return((E=f.$metadata)==null?void 0:E.httpStatusCode)===429||hL.includes(f.name)||((w=f.$retryable)==null?void 0:w.throttling)==!0},"isThrottlingError"),b1=$f((f)=>{var E;return c1(f)||kL.includes(f.name)||uL.includes((f==null?void 0:f.code)||"")||_L.includes(((E=f.$metadata)==null?void 0:E.httpStatusCode)||0)},"isTransientError"),dL=$f((f)=>{var E;if(((E=f.$metadata)==null?void 0:E.httpStatusCode)!==void 0){const w=f.$metadata.httpStatusCode;if(500<=w&&w<=599&&!b1(f))return!0;return!1}return!1},"isServerError")});var r1=Z((SM,n1)=>{var{defineProperty:lf,getOwnPropertyDescriptor:xL,getOwnPropertyNames:pL}=Object,gL=Object.prototype.hasOwnProperty,u=(f,E)=>lf(f,"name",{value:E,configurable:!0}),sL=(f,E)=>{for(var w in E)lf(f,w,{get:E[w],enumerable:!0})},nL=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of pL(E))if(!gL.call(f,$)&&$!==w)lf(f,$,{get:()=>E[$],enumerable:!(U=xL(E,$))||U.enumerable})}return f},rL=(f)=>nL(lf({},"__esModule",{value:!0}),f),k1={};sL(k1,{AdaptiveRetryStrategy:()=>eL,ConfiguredRetryStrategy:()=>aL,DEFAULT_MAX_ATTEMPTS:()=>n0,DEFAULT_RETRY_DELAY_BASE:()=>Qf,DEFAULT_RETRY_MODE:()=>lL,DefaultRateLimiter:()=>D1,INITIAL_RETRY_TOKENS:()=>r0,INVOCATION_ID_HEADER:()=>mL,MAXIMUM_RETRY_DELAY:()=>l0,NO_RETRY_INCREMENT:()=>x1,REQUEST_HEADER:()=>iL,RETRY_COST:()=>y1,RETRY_MODES:()=>_1,StandardRetryStrategy:()=>o0,THROTTLING_RETRY_DELAY_BASE:()=>v1,TIMEOUT_RETRY_COST:()=>d1});n1.exports=rL(k1);var _1=((f)=>{return f.STANDARD="standard",f.ADAPTIVE="adaptive",f})(_1||{}),n0=3,lL="standard",oL=s0(),u1=class f{constructor(E){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(E==null?void 0:E.beta)??0.7,this.minCapacity=(E==null?void 0:E.minCapacity)??1,this.minFillRate=(E==null?void 0:E.minFillRate)??0.5,this.scaleConstant=(E==null?void 0:E.scaleConstant)??0.4,this.smooth=(E==null?void 0:E.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(E){if(!this.enabled)return;if(this.refillTokenBucket(),E>this.currentCapacity){const w=(E-this.currentCapacity)/this.fillRate*1000;await new Promise((U)=>setTimeout(U,w))}this.currentCapacity=this.currentCapacity-E}refillTokenBucket(){const E=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=E;return}const w=(E-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+w),this.lastTimestamp=E}updateClientSendingRate(E){let w;if(this.updateMeasuredRate(),oL.isThrottlingError(E)){const $=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=$,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle($),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(E){return this.getPrecise(E*this.beta)}cubicSuccess(E){return this.getPrecise(this.scaleConstant*Math.pow(E-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(E){this.refillTokenBucket(),this.fillRate=Math.max(E,this.minFillRate),this.maxCapacity=Math.max(E,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const E=this.getCurrentTimeInSeconds(),w=Math.floor(E*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(E){return parseFloat(E.toFixed(8))}};u(u1,"DefaultRateLimiter");var D1=u1,Qf=100,l0=20000,v1=500,r0=500,y1=5,d1=10,x1=1,mL="amz-sdk-invocation-id",iL="amz-sdk-request",tL=u(()=>{let f=Qf;return{computeNextBackoffDelay:u((U)=>{return Math.floor(Math.min(l0,Math.random()*2**U*f))},"computeNextBackoffDelay"),setDelayBase:u((U)=>{f=U},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),h1=u(({retryDelay:f,retryCount:E,retryCost:w})=>{return{getRetryCount:u(()=>E,"getRetryCount"),getRetryDelay:u(()=>Math.min(l0,f),"getRetryDelay"),getRetryCost:u(()=>w,"getRetryCost")}},"createDefaultRetryToken"),p1=class f{constructor(E){this.maxAttempts=E,this.mode="standard",this.capacity=r0,this.retryBackoffStrategy=tL(),this.maxAttemptsProvider=typeof E==="function"?E:async()=>E}async acquireInitialRetryToken(E){return h1({retryDelay:Qf,retryCount:0})}async refreshRetryTokenForRetry(E,w){const U=await this.getMaxAttempts();if(this.shouldRetry(E,w,U)){const $=w.errorType;this.retryBackoffStrategy.setDelayBase($==="THROTTLING"?v1:Qf);const R=this.retryBackoffStrategy.computeNextBackoffDelay(E.getRetryCount()),G=w.retryAfterHint?Math.max(w.retryAfterHint.getTime()-Date.now()||0,R):R,I=this.getCapacityCost($);return this.capacity-=I,h1({retryDelay:G,retryCount:E.getRetryCount()+1,retryCost:I})}throw new Error("No retry token available")}recordSuccess(E){this.capacity=Math.max(r0,this.capacity+(E.getRetryCost()??x1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(E){return console.warn(`Max attempts provider could not resolve. Using default of ${n0}`),n0}}shouldRetry(E,w,U){return E.getRetryCount()+1<U&&this.capacity>=this.getCapacityCost(w.errorType)&&this.isRetryableError(w.errorType)}getCapacityCost(E){return E==="TRANSIENT"?d1:y1}isRetryableError(E){return E==="THROTTLING"||E==="TRANSIENT"}};u(p1,"StandardRetryStrategy");var o0=p1,g1=class f{constructor(E,w){this.maxAttemptsProvider=E,this.mode="adaptive";const{rateLimiter:U}=w??{};this.rateLimiter=U??new D1,this.standardRetryStrategy=new o0(E)}async acquireInitialRetryToken(E){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(E)}async refreshRetryTokenForRetry(E,w){return this.rateLimiter.updateClientSendingRate(w),this.standardRetryStrategy.refreshRetryTokenForRetry(E,w)}recordSuccess(E){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(E)}};u(g1,"AdaptiveRetryStrategy");var eL=g1,s1=class f extends o0{constructor(E,w=Qf){super(typeof E==="function"?E:async()=>E);if(typeof w==="number")this.computeNextBackoffDelay=()=>w;else this.computeNextBackoffDelay=w}async refreshRetryTokenForRetry(E,w){const U=await super.refreshRetryTokenForRetry(E,w);return U.getRetryDelay=()=>this.computeNextBackoffDelay(U.getRetryCount()),U}};u(s1,"ConfiguredRetryStrategy");var aL=s1});var If=Z((cM,X$)=>{var G$=function(f){const E=f.getUTCFullYear(),w=f.getUTCMonth(),U=f.getUTCDay(),$=f.getUTCDate(),R=f.getUTCHours(),G=f.getUTCMinutes(),I=f.getUTCSeconds(),W=$<10?`0${$}`:`${$}`,L=R<10?`0${R}`:`${R}`,F=G<10?`0${G}`:`${G}`,O=I<10?`0${I}`:`${I}`;return`${SF[U]}, ${W} ${RE[w]} ${E} ${L}:${F}:${O} GMT`},tf=function(f){return encodeURIComponent(f).replace(/[!'()*]/g,function(E){return"%"+E.charCodeAt(0).toString(16).toUpperCase()})},GE=function(f,E,w){let U,$,R;if(typeof E==="undefined"&&typeof w==="undefined")U={},R=f;else if(U=f,typeof E==="function")return $=E,R=w,WO(U,$,R);else R=E;for(let G of Object.keys(R)){if(!Array.isArray(R[G])){U[G]=R[G];continue}T$(U,null,R,G)}return U},M$=function(f,E,w){if(w<=0||!Number.isInteger(w))throw new Error("Invalid number of delimiters ("+w+") for splitEvery.");const U=f.split(E);if(w===1)return U;const $=[];let R="";for(let G=0;G<U.length;G++){if(R==="")R=U[G];else R+=E+U[G];if((G+1)%w===0)$.push(R),R=""}if(R!=="")$.push(R);return $},ef=Object.defineProperty,wF=Object.getOwnPropertyDescriptor,$F=Object.getOwnPropertyNames,UF=Object.prototype.hasOwnProperty,M=(f,E)=>ef(f,"name",{value:E,configurable:!0}),RF=(f,E)=>{for(var w in E)ef(f,w,{get:E[w],enumerable:!0})},GF=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of $F(E))if(!UF.call(f,$)&&$!==w)ef(f,$,{get:()=>E[$],enumerable:!(U=wF(E,$))||U.enumerable})}return f},IF=(f)=>GF(ef({},"__esModule",{value:!0}),f),o1={};RF(o1,{Client:()=>LF,Command:()=>a1,LazyJsonString:()=>RO,NoOpLogger:()=>WF,SENSITIVE_STRING:()=>AF,ServiceException:()=>lF,StringWrapper:()=>Vf,_json:()=>EE,collectBody:()=>FF,convertMap:()=>GO,createAggregatedClient:()=>TF,dateToUtcString:()=>G$,decorateServiceException:()=>W$,emitWarningIfUnsupportedVersion:()=>tF,expectBoolean:()=>XF,expectByte:()=>fE,expectFloat32:()=>of,expectInt:()=>YF,expectInt32:()=>e0,expectLong:()=>Bf,expectNonNull:()=>QF,expectNumber:()=>Kf,expectObject:()=>E$,expectShort:()=>a0,expectString:()=>JF,expectUnion:()=>KF,extendedEncodeURIComponent:()=>tf,getArrayIfSingleItem:()=>UO,getDefaultClientConfiguration:()=>wO,getDefaultExtensionConfiguration:()=>F$,getValueFromTextNode:()=>O$,handleFloat:()=>VF,limitedParseDouble:()=>UE,limitedParseFloat:()=>qF,limitedParseFloat32:()=>CF,loadConfigsForDefaultMode:()=>iF,logger:()=>Hf,map:()=>GE,parseBoolean:()=>MF,parseEpochTimestamp:()=>vF,parseRfc3339DateTime:()=>bF,parseRfc3339DateTimeWithOffset:()=>hF,parseRfc7231DateTime:()=>DF,resolveDefaultRuntimeConfig:()=>$O,resolvedPath:()=>OO,serializeDateTime:()=>TO,serializeFloat:()=>AO,splitEvery:()=>M$,strictParseByte:()=>R$,strictParseDouble:()=>$E,strictParseFloat:()=>BF,strictParseFloat32:()=>w$,strictParseInt:()=>NF,strictParseInt32:()=>PF,strictParseLong:()=>U$,strictParseShort:()=>Uf,take:()=>IO,throwDefaultError:()=>L$,withBaseException:()=>oF});X$.exports=IF(o1);var m1=class f{trace(){}debug(){}info(){}warn(){}error(){}};M(m1,"NoOpLogger");var WF=m1,i1=fF(),t1=class f{constructor(E){this.middlewareStack=i1.constructStack(),this.config=E}send(E,w,U){const $=typeof w!=="function"?w:void 0,R=typeof w==="function"?w:U,G=E.resolveMiddleware(this.middlewareStack,this.config,$);if(R)G(E).then((I)=>R(null,I.output),(I)=>R(I)).catch(()=>{});else return G(E).then((I)=>I.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};M(t1,"Client");var LF=t1,m0=EF(),FF=M(async(f=new Uint8Array,E)=>{if(f instanceof Uint8Array)return m0.Uint8ArrayBlobAdapter.mutate(f);if(!f)return m0.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const w=E.streamCollector(f);return m0.Uint8ArrayBlobAdapter.mutate(await w)},"collectBody"),t0=uf(),e1=class f{constructor(){this.middlewareStack=i1.constructStack()}static classBuilder(){return new OF}resolveMiddlewareWithContext(E,w,U,{middlewareFn:$,clientName:R,commandName:G,inputFilterSensitiveLog:I,outputFilterSensitiveLog:W,smithyContext:L,additionalContext:F,CommandCtor:O}){for(let Q of $.bind(this)(O,E,w,U))this.middlewareStack.use(Q);const T=E.concat(this.middlewareStack),{logger:A}=w,X={logger:A,clientName:R,commandName:G,inputFilterSensitiveLog:I,outputFilterSensitiveLog:W,[t0.SMITHY_CONTEXT_KEY]:{commandInstance:this,...L},...F},{requestHandler:Y}=w;return T.resolve((Q)=>Y.handle(Q.request,U||{}),X)}};M(e1,"Command");var a1=e1,f$=class f{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(E)=>E,this._outputFilterSensitiveLog=(E)=>E,this._serializer=null,this._deserializer=null}init(E){this._init=E}ep(E){return this._ep=E,this}m(E){return this._middlewareFn=E,this}s(E,w,U={}){return this._smithyContext={service:E,operation:w,...U},this}c(E={}){return this._additionalContext=E,this}n(E,w){return this._clientName=E,this._commandName=w,this}f(E=(U)=>U,w=(U)=>U){return this._inputFilterSensitiveLog=E,this._outputFilterSensitiveLog=w,this}ser(E){return this._serializer=E,this}de(E){return this._deserializer=E,this}build(){var E;const w=this;let U;return U=(E=class extends a1{constructor(...[$]){super();this.serialize=w._serializer,this.deserialize=w._deserializer,this.input=$??{},w._init(this)}static getEndpointParameterInstructions(){return w._ep}resolveMiddleware($,R,G){return this.resolveMiddlewareWithContext($,R,G,{CommandCtor:U,middlewareFn:w._middlewareFn,clientName:w._clientName,commandName:w._commandName,inputFilterSensitiveLog:w._inputFilterSensitiveLog,outputFilterSensitiveLog:w._outputFilterSensitiveLog,smithyContext:w._smithyContext,additionalContext:w._additionalContext})}},M(E,"CommandRef"),E)}};M(f$,"ClassBuilder");var OF=f$,AF="***SensitiveInformation***",TF=M((f,E)=>{for(let w of Object.keys(f)){const U=f[w],$=M(async function(G,I,W){const L=new U(G);if(typeof I==="function")this.send(L,I);else if(typeof W==="function"){if(typeof I!=="object")throw new Error(`Expected http options but got ${typeof I}`);this.send(L,I||{},W)}else return this.send(L,I)},"methodImpl"),R=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");E.prototype[R]=$}},"createAggregatedClient"),MF=M((f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},"parseBoolean"),XF=M((f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)Hf.warn(mf(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){const E=f.toLowerCase();if(E==="false"||E==="true")Hf.warn(mf(`Expected boolean, got ${typeof f}: ${f}`));if(E==="false")return!1;if(E==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},"expectBoolean"),Kf=M((f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){const E=parseFloat(f);if(!Number.isNaN(E)){if(String(E)!==String(f))Hf.warn(mf(`Expected number but observed string: ${f}`));return E}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},"expectNumber"),ZF=Math.ceil(340282346638528860000000000000000000000),of=M((f)=>{const E=Kf(f);if(E!==void 0&&!Number.isNaN(E)&&E!==Infinity&&E!==(-Infinity)){if(Math.abs(E)>ZF)throw new TypeError(`Expected 32-bit float, got ${f}`)}return E},"expectFloat32"),Bf=M((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"),YF=Bf,e0=M((f)=>wE(f,32),"expectInt32"),a0=M((f)=>wE(f,16),"expectShort"),fE=M((f)=>wE(f,8),"expectByte"),wE=M((f,E)=>{const w=Bf(f);if(w!==void 0&&zF(w,E)!==w)throw new TypeError(`Expected ${E}-bit integer, got ${f}`);return w},"expectSizedInt"),zF=M((f,E)=>{switch(E){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},"castInt"),QF=M((f,E)=>{if(f===null||f===void 0){if(E)throw new TypeError(`Expected a non-null value for ${E}`);throw new TypeError("Expected a non-null value")}return f},"expectNonNull"),E$=M((f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;const E=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${E}: ${f}`)},"expectObject"),JF=M((f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return Hf.warn(mf(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},"expectString"),KF=M((f)=>{if(f===null||f===void 0)return;const E=E$(f),w=Object.entries(E).filter(([,U])=>U!=null).map(([U])=>U);if(w.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(w.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${w} were not null.`);return E},"expectUnion"),$E=M((f)=>{if(typeof f=="string")return Kf(Gf(f));return Kf(f)},"strictParseDouble"),BF=$E,w$=M((f)=>{if(typeof f=="string")return of(Gf(f));return of(f)},"strictParseFloat32"),HF=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Gf=M((f)=>{const E=f.match(HF);if(E===null||E[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},"parseNumber"),UE=M((f)=>{if(typeof f=="string")return $$(f);return Kf(f)},"limitedParseDouble"),VF=UE,qF=UE,CF=M((f)=>{if(typeof f=="string")return $$(f);return of(f)},"limitedParseFloat32"),$$=M((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"),U$=M((f)=>{if(typeof f==="string")return Bf(Gf(f));return Bf(f)},"strictParseLong"),NF=U$,PF=M((f)=>{if(typeof f==="string")return e0(Gf(f));return e0(f)},"strictParseInt32"),Uf=M((f)=>{if(typeof f==="string")return a0(Gf(f));return a0(f)},"strictParseShort"),R$=M((f)=>{if(typeof f==="string")return fE(Gf(f));return fE(f)},"strictParseByte"),mf=M((f)=>{return String(new TypeError(f).stack||f).split("\n").slice(0,5).filter((E)=>!E.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),Hf={warn:console.warn},SF=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],RE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];M(G$,"dateToUtcString");var cF=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),bF=M((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 E=cF.exec(f);if(!E)throw new TypeError("Invalid RFC-3339 date-time value");const[w,U,$,R,G,I,W,L]=E,F=Uf(Rf(U)),O=d($,"month",1,12),T=d(R,"day",1,31);return Jf(F,O,T,{hours:G,minutes:I,seconds:W,fractionalMilliseconds:L})},"parseRfc3339DateTime"),jF=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),hF=M((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 E=jF.exec(f);if(!E)throw new TypeError("Invalid RFC-3339 date-time value");const[w,U,$,R,G,I,W,L,F]=E,O=Uf(Rf(U)),T=d($,"month",1,12),A=d(R,"day",1,31),X=Jf(O,T,A,{hours:G,minutes:I,seconds:W,fractionalMilliseconds:L});if(F.toUpperCase()!="Z")X.setTime(X.getTime()-rF(F));return X},"parseRfc3339DateTimeWithOffset"),kF=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$/),_F=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$/),uF=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})$/),DF=M((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 E=kF.exec(f);if(E){const[w,U,$,R,G,I,W,L]=E;return Jf(Uf(Rf(R)),i0($),d(U,"day",1,31),{hours:G,minutes:I,seconds:W,fractionalMilliseconds:L})}if(E=_F.exec(f),E){const[w,U,$,R,G,I,W,L]=E;return xF(Jf(yF(R),i0($),d(U,"day",1,31),{hours:G,minutes:I,seconds:W,fractionalMilliseconds:L}))}if(E=uF.exec(f),E){const[w,U,$,R,G,I,W,L]=E;return Jf(Uf(Rf(L)),i0(U),d($.trimLeft(),"day",1,31),{hours:R,minutes:G,seconds:I,fractionalMilliseconds:W})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),vF=M((f)=>{if(f===null||f===void 0)return;let E;if(typeof f==="number")E=f;else if(typeof f==="string")E=$E(f);else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(E)||E===Infinity||E===(-Infinity))throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(E*1000))},"parseEpochTimestamp"),Jf=M((f,E,w,U)=>{const $=E-1;return gF(f,$,w),new Date(Date.UTC(f,$,w,d(U.hours,"hour",0,23),d(U.minutes,"minute",0,59),d(U.seconds,"seconds",0,60),nF(U.fractionalMilliseconds)))},"buildDate"),yF=M((f)=>{const E=(new Date()).getUTCFullYear(),w=Math.floor(E/100)*100+Uf(Rf(f));if(w<E)return w+100;return w},"parseTwoDigitYear"),dF=1576800000000,xF=M((f)=>{if(f.getTime()-(new Date()).getTime()>dF)return new Date(Date.UTC(f.getUTCFullYear()-100,f.getUTCMonth(),f.getUTCDate(),f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()));return f},"adjustRfc850Year"),i0=M((f)=>{const E=RE.indexOf(f);if(E<0)throw new TypeError(`Invalid month: ${f}`);return E+1},"parseMonthByShortName"),pF=[31,28,31,30,31,30,31,31,30,31,30,31],gF=M((f,E,w)=>{let U=pF[E];if(E===1&&sF(f))U=29;if(w>U)throw new TypeError(`Invalid day for ${RE[E]} in ${f}: ${w}`)},"validateDayOfMonth"),sF=M((f)=>{return f%4===0&&(f%100!==0||f%400===0)},"isLeapYear"),d=M((f,E,w,U)=>{const $=R$(Rf(f));if($<w||$>U)throw new TypeError(`${E} must be between ${w} and ${U}, inclusive`);return $},"parseDateValue"),nF=M((f)=>{if(f===null||f===void 0)return 0;return w$("0."+f)*1000},"parseMilliseconds"),rF=M((f)=>{const E=f[0];let w=1;if(E=="+")w=1;else if(E=="-")w=-1;else throw new TypeError(`Offset direction, ${E}, must be "+" or "-"`);const U=Number(f.substring(1,3)),$=Number(f.substring(4,6));return w*(U*60+$)*60*1000},"parseOffsetToMilliseconds"),Rf=M((f)=>{let E=0;while(E<f.length-1&&f.charAt(E)==="0")E++;if(E===0)return f;return f.slice(E)},"stripLeadingZeroes"),I$=class f extends Error{constructor(E){super(E.message);Object.setPrototypeOf(this,f.prototype),this.name=E.name,this.$fault=E.$fault,this.$metadata=E.$metadata}};M(I$,"ServiceException");var lF=I$,W$=M((f,E={})=>{Object.entries(E).filter(([,U])=>U!==void 0).forEach(([U,$])=>{if(f[U]==null||f[U]==="")f[U]=$});const w=f.message||f.Message||"UnknownError";return f.message=w,delete f.Message,f},"decorateServiceException"),L$=M(({output:f,parsedBody:E,exceptionCtor:w,errorCode:U})=>{const $=mF(f),R=$.httpStatusCode?$.httpStatusCode+"":void 0,G=new w({name:(E==null?void 0:E.code)||(E==null?void 0:E.Code)||U||R||"UnknownError",$fault:"client",$metadata:$});throw W$(G,E)},"throwDefaultError"),oF=M((f)=>{return({output:E,parsedBody:w,errorCode:U})=>{L$({output:E,parsedBody:w,exceptionCtor:f,errorCode:U})}},"withBaseException"),mF=M((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"),iF=M((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"),l1=!1,tF=M((f)=>{if(f&&!l1&&parseInt(f.substring(1,f.indexOf(".")))<16)l1=!0},"emitWarningIfUnsupportedVersion"),eF=M((f)=>{const E=[];for(let w in t0.AlgorithmId){const U=t0.AlgorithmId[w];if(f[U]===void 0)continue;E.push({algorithmId:()=>U,checksumConstructor:()=>f[U]})}return{_checksumAlgorithms:E,addChecksumAlgorithm(w){this._checksumAlgorithms.push(w)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),aF=M((f)=>{const E={};return f.checksumAlgorithms().forEach((w)=>{E[w.algorithmId()]=w.checksumConstructor()}),E},"resolveChecksumRuntimeConfig"),fO=M((f)=>{let E=f.retryStrategy;return{setRetryStrategy(w){E=w},retryStrategy(){return E}}},"getRetryConfiguration"),EO=M((f)=>{const E={};return E.retryStrategy=f.retryStrategy(),E},"resolveRetryRuntimeConfig"),F$=M((f)=>{return{...eF(f),...fO(f)}},"getDefaultExtensionConfiguration"),wO=F$,$O=M((f)=>{return{...aF(f),...EO(f)}},"resolveDefaultRuntimeConfig");M(tf,"extendedEncodeURIComponent");var UO=M((f)=>Array.isArray(f)?f:[f],"getArrayIfSingleItem"),O$=M((f)=>{for(let w in f)if(f.hasOwnProperty(w)&&f[w]["#text"]!==void 0)f[w]=f[w]["#text"];else if(typeof f[w]==="object"&&f[w]!==null)f[w]=O$(f[w]);return f},"getValueFromTextNode"),Vf=M(function(){const f=Object.getPrototypeOf(this).constructor,w=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(w,f.prototype),w},"StringWrapper");Vf.prototype=Object.create(String.prototype,{constructor:{value:Vf,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Vf,String);var A$=class f extends Vf{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(E){if(E instanceof f)return E;else if(E instanceof String||typeof E==="string")return new f(E);return new f(JSON.stringify(E))}};M(A$,"LazyJsonString");var RO=A$;M(GE,"map");var GO=M((f)=>{const E={};for(let[w,U]of Object.entries(f||{}))E[w]=[,U];return E},"convertMap"),IO=M((f,E)=>{const w={};for(let U in E)T$(w,f,E,U);return w},"take"),WO=M((f,E,w)=>{return GE(f,Object.entries(w).reduce((U,[$,R])=>{if(Array.isArray(R))U[$]=R;else if(typeof R==="function")U[$]=[E,R()];else U[$]=[E,R];return U},{}))},"mapWithFilter"),T$=M((f,E,w,U)=>{if(E!==null){let G=w[U];if(typeof G==="function")G=[,G];const[I=LO,W=FO,L=U]=G;if(typeof I==="function"&&I(E[L])||typeof I!=="function"&&!!I)f[U]=W(E[L]);return}let[$,R]=w[U];if(typeof R==="function"){let G;const I=$===void 0&&(G=R())!=null,W=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(I)f[U]=G;else if(W)f[U]=R()}else{const G=$===void 0&&R!=null,I=typeof $==="function"&&!!$(R)||typeof $!=="function"&&!!$;if(G||I)f[U]=R}},"applyInstruction"),LO=M((f)=>f!=null,"nonNullish"),FO=M((f)=>f,"pass"),OO=M((f,E,w,U,$,R)=>{if(E!=null&&E[w]!==void 0){const G=U();if(G.length<=0)throw new Error("Empty value provided for input HTTP label: "+w+".");f=f.replace($,R?G.split("/").map((I)=>tf(I)).join("/"):tf(G))}else throw new Error("No value provided for input HTTP label: "+w+".");return f},"resolvedPath"),AO=M((f)=>{if(f!==f)return"NaN";switch(f){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return f}},"serializeFloat"),TO=M((f)=>f.toISOString().replace(".000Z","Z"),"serializeDateTime"),EE=M((f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((E)=>E!=null).map(EE);if(typeof f==="object"){const E={};for(let w of Object.keys(f)){if(f[w]==null)continue;E[w]=EE(f[w])}return E}return f},"_json");M(M$,"splitEvery")});var z$=Z((Z$)=>{Object.defineProperty(Z$,"__esModule",{value:!0});Z$.isStreamingPayload=void 0;var MO=import.meta.require("stream"),XO=(f)=>(f===null||f===void 0?void 0:f.body)instanceof MO.Readable||typeof ReadableStream!=="undefined"&&(f===null||f===void 0?void 0:f.body)instanceof ReadableStream;Z$.isStreamingPayload=XO});var u$=Z((hM,_$)=>{var{defineProperty:af,getOwnPropertyDescriptor:ZO,getOwnPropertyNames:YO}=Object,zO=Object.prototype.hasOwnProperty,V=(f,E)=>af(f,"name",{value:E,configurable:!0}),QO=(f,E)=>{for(var w in E)af(f,w,{get:E[w],enumerable:!0})},JO=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of YO(E))if(!zO.call(f,$)&&$!==w)af(f,$,{get:()=>E[$],enumerable:!(U=ZO(E,$))||U.enumerable})}return f},KO=(f)=>JO(af({},"__esModule",{value:!0}),f),J$={};QO(J$,{AdaptiveRetryStrategy:()=>VO,CONFIG_MAX_ATTEMPTS:()=>WE,CONFIG_RETRY_MODE:()=>S$,ENV_MAX_ATTEMPTS:()=>IE,ENV_RETRY_MODE:()=>P$,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>qO,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>NO,StandardRetryStrategy:()=>C$,defaultDelayDecider:()=>B$,defaultRetryDecider:()=>H$,getOmitRetryHeadersPlugin:()=>PO,getRetryAfterHint:()=>k$,getRetryPlugin:()=>kO,omitRetryHeadersMiddleware:()=>c$,omitRetryHeadersMiddlewareOptions:()=>b$,resolveRetryConfig:()=>CO,retryMiddleware:()=>j$,retryMiddlewareOptions:()=>h$});_$.exports=KO(J$);var Wf=Lf(),K$=g0(),B=r1(),BO=V((f,E)=>{const w=f,U=(E==null?void 0:E.noRetryIncrement)??B.NO_RETRY_INCREMENT,$=(E==null?void 0:E.retryCost)??B.RETRY_COST,R=(E==null?void 0:E.timeoutRetryCost)??B.TIMEOUT_RETRY_COST;let G=f;const I=V((O)=>O.name==="TimeoutError"?R:$,"getCapacityAmount"),W=V((O)=>I(O)<=G,"hasRetryTokens");return Object.freeze({hasRetryTokens:W,retrieveRetryTokens:V((O)=>{if(!W(O))throw new Error("No retry token available");const T=I(O);return G-=T,T},"retrieveRetryTokens"),releaseRetryTokens:V((O)=>{G+=O??U,G=Math.min(G,w)},"releaseRetryTokens")})},"getDefaultRetryQuota"),B$=V((f,E)=>Math.floor(Math.min(B.MAXIMUM_RETRY_DELAY,Math.random()*2**E*f)),"defaultDelayDecider"),n=s0(),H$=V((f)=>{if(!f)return!1;return n.isRetryableByTrait(f)||n.isClockSkewError(f)||n.isThrottlingError(f)||n.isTransientError(f)},"defaultRetryDecider"),V$=V((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"),q$=class f{constructor(E,w){this.maxAttemptsProvider=E,this.mode=B.RETRY_MODES.STANDARD,this.retryDecider=(w==null?void 0:w.retryDecider)??H$,this.delayDecider=(w==null?void 0:w.delayDecider)??B$,this.retryQuota=(w==null?void 0:w.retryQuota)??BO(B.INITIAL_RETRY_TOKENS)}shouldRetry(E,w,U){return w<U&&this.retryDecider(E)&&this.retryQuota.hasRetryTokens(E)}async getMaxAttempts(){let E;try{E=await this.maxAttemptsProvider()}catch(w){E=B.DEFAULT_MAX_ATTEMPTS}return E}async retry(E,w,U){let $,R=0,G=0;const I=await this.getMaxAttempts(),{request:W}=w;if(Wf.HttpRequest.isInstance(W))W.headers[B.INVOCATION_ID_HEADER]=K$.v4();while(!0)try{if(Wf.HttpRequest.isInstance(W))W.headers[B.REQUEST_HEADER]=`attempt=${R+1}; max=${I}`;if(U==null?void 0:U.beforeRequest)await U.beforeRequest();const{response:L,output:F}=await E(w);if(U==null?void 0:U.afterRequest)U.afterRequest(L);return this.retryQuota.releaseRetryTokens($),F.$metadata.attempts=R+1,F.$metadata.totalRetryDelay=G,{response:L,output:F}}catch(L){const F=V$(L);if(R++,this.shouldRetry(F,R,I)){$=this.retryQuota.retrieveRetryTokens(F);const O=this.delayDecider(n.isThrottlingError(F)?B.THROTTLING_RETRY_DELAY_BASE:B.DEFAULT_RETRY_DELAY_BASE,R),T=HO(F.$response),A=Math.max(T||0,O);G+=A,await new Promise((X)=>setTimeout(X,A));continue}if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=R,F.$metadata.totalRetryDelay=G,F}}};V(q$,"StandardRetryStrategy");var C$=q$,HO=V((f)=>{if(!Wf.HttpResponse.isInstance(f))return;const E=Object.keys(f.headers).find((R)=>R.toLowerCase()==="retry-after");if(!E)return;const w=f.headers[E],U=Number(w);if(!Number.isNaN(U))return U*1000;return new Date(w).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),N$=class f extends C${constructor(E,w){const{rateLimiter:U,...$}=w??{};super(E,$);this.rateLimiter=U??new B.DefaultRateLimiter,this.mode=B.RETRY_MODES.ADAPTIVE}async retry(E,w){return super.retry(E,w,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(U)=>{this.rateLimiter.updateClientSendingRate(U)}})}};V(N$,"AdaptiveRetryStrategy");var VO=N$,Q$=y(),IE="AWS_MAX_ATTEMPTS",WE="max_attempts",qO={environmentVariableSelector:(f)=>{const E=f[IE];if(!E)return;const w=parseInt(E);if(Number.isNaN(w))throw new Error(`Environment variable ${IE} mast be a number, got "${E}"`);return w},configFileSelector:(f)=>{const E=f[WE];if(!E)return;const w=parseInt(E);if(Number.isNaN(w))throw new Error(`Shared config file entry ${WE} mast be a number, got "${E}"`);return w},default:B.DEFAULT_MAX_ATTEMPTS},CO=V((f)=>{const{retryStrategy:E}=f,w=Q$.normalizeProvider(f.maxAttempts??B.DEFAULT_MAX_ATTEMPTS);return{...f,maxAttempts:w,retryStrategy:async()=>{if(E)return E;if(await Q$.normalizeProvider(f.retryMode)()===B.RETRY_MODES.ADAPTIVE)return new B.AdaptiveRetryStrategy(w);return new B.StandardRetryStrategy(w)}}},"resolveRetryConfig"),P$="AWS_RETRY_MODE",S$="retry_mode",NO={environmentVariableSelector:(f)=>f[P$],configFileSelector:(f)=>f[S$],default:B.DEFAULT_RETRY_MODE},c$=V(()=>(f)=>async(E)=>{const{request:w}=E;if(Wf.HttpRequest.isInstance(w))delete w.headers[B.INVOCATION_ID_HEADER],delete w.headers[B.REQUEST_HEADER];return f(E)},"omitRetryHeadersMiddleware"),b$={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},PO=V((f)=>({applyToStack:(E)=>{E.addRelativeTo(c$(),b$)}}),"getOmitRetryHeadersPlugin"),SO=If(),cO=z$(),j$=V((f)=>(E,w)=>async(U)=>{var $;let R=await f.retryStrategy();const G=await f.maxAttempts();if(bO(R)){R=R;let I=await R.acquireInitialRetryToken(w.partition_id),W=new Error,L=0,F=0;const{request:O}=U,T=Wf.HttpRequest.isInstance(O);if(T)O.headers[B.INVOCATION_ID_HEADER]=K$.v4();while(!0)try{if(T)O.headers[B.REQUEST_HEADER]=`attempt=${L+1}; max=${G}`;const{response:A,output:X}=await E(U);return R.recordSuccess(I),X.$metadata.attempts=L+1,X.$metadata.totalRetryDelay=F,{response:A,output:X}}catch(A){const X=jO(A);if(W=V$(A),T&&cO.isStreamingPayload(O))throw($=w.logger instanceof SO.NoOpLogger?console:w.logger)==null||$.warn("An error was encountered in a non-retryable streaming request."),W;try{I=await R.refreshRetryTokenForRetry(I,X)}catch(Q){if(!W.$metadata)W.$metadata={};throw W.$metadata.attempts=L+1,W.$metadata.totalRetryDelay=F,W}L=I.getRetryCount();const Y=I.getRetryDelay();F+=Y,await new Promise((Q)=>setTimeout(Q,Y))}}else{if(R=R,R==null?void 0:R.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",R.mode]];return R.retry(E,U)}},"retryMiddleware"),bO=V((f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined","isRetryStrategyV2"),jO=V((f)=>{const E={error:f,errorType:hO(f)},w=k$(f.$response);if(w)E.retryAfterHint=w;return E},"getRetryErrorInfo"),hO=V((f)=>{if(n.isThrottlingError(f))return"THROTTLING";if(n.isTransientError(f))return"TRANSIENT";if(n.isServerError(f))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),h$={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},kO=V((f)=>({applyToStack:(E)=>{E.add(j$(f),h$)}}),"getRetryPlugin"),k$=V((f)=>{if(!Wf.HttpResponse.isInstance(f))return;const E=Object.keys(f.headers).find((R)=>R.toLowerCase()==="retry-after");if(!E)return;const w=f.headers[E],U=Number(w);if(!Number.isNaN(U))return new Date(U*1000);return new Date(w)},"getRetryAfterHint")});var FE=Z((kM,EU)=>{var y$=function(f){const E=new Map;for(let w of f)E.set(w.schemeId,w);return E},t$=function(f,E){return new a$(f,E)},fU=function(f,E,w,U,$){return K(async function*R(G,I,...W){let L=G.startingToken||void 0,F=!0,O;while(F){if(I[w]=L,$)I[$]=I[$]??G.pageSize;if(G.client instanceof f)O=await U2(E,G.client,I,...W);else throw new Error(`Invalid client, expected instance of ${f.name}`);yield O;const T=L;L=R2(O,U),F=!!(L&&(!G.stopOnSameToken||L!==T))}return},"paginateOperation")},E0=Object.defineProperty,_O=Object.getOwnPropertyDescriptor,uO=Object.getOwnPropertyNames,DO=Object.prototype.hasOwnProperty,K=(f,E)=>E0(f,"name",{value:E,configurable:!0}),vO=(f,E)=>{for(var w in E)E0(f,w,{get:E[w],enumerable:!0})},yO=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of uO(E))if(!DO.call(f,$)&&$!==w)E0(f,$,{get:()=>E[$],enumerable:!(U=_O(E,$))||U.enumerable})}return f},dO=(f)=>yO(E0({},"__esModule",{value:!0}),f),D$={};vO(D$,{DefaultIdentityProviderConfig:()=>mO,EXPIRATION_MS:()=>m$,HttpApiKeyAuthSigner:()=>iO,HttpBearerAuthSigner:()=>tO,NoAuthSigner:()=>eO,RequestBuilder:()=>a$,createIsIdentityExpiredFunction:()=>o$,createPaginator:()=>fU,doesIdentityRequireRefresh:()=>i$,getHttpAuthSchemeEndpointRuleSetPlugin:()=>pO,getHttpAuthSchemePlugin:()=>sO,getHttpSigningPlugin:()=>oO,getSmithyContext:()=>E2,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>d$,httpAuthSchemeMiddleware:()=>LE,httpAuthSchemeMiddlewareOptions:()=>x$,httpSigningMiddleware:()=>p$,httpSigningMiddlewareOptions:()=>g$,isIdentityExpired:()=>aO,memoizeIdentityProvider:()=>f2,normalizeProvider:()=>w2,requestBuilder:()=>t$});EU.exports=dO(D$);var v$=y();K(y$,"convertHttpAuthSchemesToMap");var LE=K((f,E)=>(w,U)=>async($)=>{var R;const G=f.httpAuthSchemeProvider(await E.httpAuthSchemeParametersProvider(f,U,$.input)),I=y$(f.httpAuthSchemes),W=v$.getSmithyContext(U),L=[];for(let F of G){const O=I.get(F.schemeId);if(!O){L.push(`HttpAuthScheme \`${F.schemeId}\` was not enabled for this service.`);continue}const T=O.identityProvider(await E.identityProviderConfigProvider(f));if(!T){L.push(`HttpAuthScheme \`${F.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:A={},signingProperties:X={}}=((R=F.propertiesExtractor)==null?void 0:R.call(F,f,U))||{};F.identityProperties=Object.assign(F.identityProperties||{},A),F.signingProperties=Object.assign(F.signingProperties||{},X),W.selectedHttpAuthScheme={httpAuthOption:F,identity:await T(F.identityProperties),signer:O.signer};break}if(!W.selectedHttpAuthScheme)throw new Error(L.join("\n"));return w($)},"httpAuthSchemeMiddleware"),xO=_w(),d$={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:xO.endpointMiddlewareOptions.name},pO=K((f,{httpAuthSchemeParametersProvider:E,identityProviderConfigProvider:w})=>({applyToStack:(U)=>{U.addRelativeTo(LE(f,{httpAuthSchemeParametersProvider:E,identityProviderConfigProvider:w}),d$)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),gO=_0(),x$={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:gO.serializerMiddlewareOption.name},sO=K((f,{httpAuthSchemeParametersProvider:E,identityProviderConfigProvider:w})=>({applyToStack:(U)=>{U.addRelativeTo(LE(f,{httpAuthSchemeParametersProvider:E,identityProviderConfigProvider:w}),x$)}}),"getHttpAuthSchemePlugin"),w0=Lf(),nO=K((f)=>(E)=>{throw E},"defaultErrorHandler"),rO=K((f,E)=>{},"defaultSuccessHandler"),p$=K((f)=>(E,w)=>async(U)=>{if(!w0.HttpRequest.isInstance(U.request))return E(U);const R=v$.getSmithyContext(w).selectedHttpAuthScheme;if(!R)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:G={}},identity:I,signer:W}=R,L=await E({...U,request:await W.sign(U.request,I,G)}).catch((W.errorHandler||nO)(G));return(W.successHandler||rO)(L.response,G),L},"httpSigningMiddleware"),lO=u$(),g$={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:lO.retryMiddlewareOptions.name},oO=K((f)=>({applyToStack:(E)=>{E.addRelativeTo(p$(f),g$)}}),"getHttpSigningPlugin"),s$=class f{constructor(E){this.authSchemes=new Map;for(let[w,U]of Object.entries(E))if(U!==void 0)this.authSchemes.set(w,U)}getIdentityProvider(E){return this.authSchemes.get(E)}};K(s$,"DefaultIdentityProviderConfig");var mO=s$,f0=uf(),n$=class f{async sign(E,w,U){if(!U)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!U.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!U.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!w.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const $=w0.HttpRequest.clone(E);if(U.in===f0.HttpApiKeyAuthLocation.QUERY)$.query[U.name]=w.apiKey;else if(U.in===f0.HttpApiKeyAuthLocation.HEADER)$.headers[U.name]=U.scheme?`${U.scheme} ${w.apiKey}`:w.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+U.in+"`");return $}};K(n$,"HttpApiKeyAuthSigner");var iO=n$,r$=class f{async sign(E,w,U){const $=w0.HttpRequest.clone(E);if(!w.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return $.headers.Authorization=`Bearer ${w.token}`,$}};K(r$,"HttpBearerAuthSigner");var tO=r$,l$=class f{async sign(E,w,U){return E}};K(l$,"NoAuthSigner");var eO=l$,o$=K((f)=>(E)=>i$(E)&&E.expiration.getTime()-Date.now()<f,"createIsIdentityExpiredFunction"),m$=300000,aO=o$(m$),i$=K((f)=>f.expiration!==void 0,"doesIdentityRequireRefresh"),f2=K((f,E,w)=>{if(f===void 0)return;const U=typeof f!=="function"?async()=>Promise.resolve(f):f;let $,R,G,I=!1;const W=K(async(L)=>{if(!R)R=U(L);try{$=await R,G=!0,I=!1}finally{R=void 0}return $},"coalesceProvider");if(E===void 0)return async(L)=>{if(!G||(L==null?void 0:L.forceRefresh))$=await W(L);return $};return async(L)=>{if(!G||(L==null?void 0:L.forceRefresh))$=await W(L);if(I)return $;if(!w($))return I=!0,$;if(E($))return await W(L),$;return $}},"memoizeIdentityProvider"),E2=K((f)=>f[f0.SMITHY_CONTEXT_KEY]||(f[f0.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),w2=K((f)=>{if(typeof f==="function")return f;const E=Promise.resolve(f);return()=>E},"normalizeProvider"),$2=If();K(t$,"requestBuilder");var e$=class f{constructor(E,w){this.input=E,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:E,protocol:w="https",port:U,path:$}=await this.context.endpoint();this.path=$;for(let R of this.resolvePathStack)R(this.path);return new w0.HttpRequest({protocol:w,hostname:this.hostname||E,port:U,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(E){return this.hostname=E,this}bp(E){return this.resolvePathStack.push((w)=>{this.path=`${(w==null?void 0:w.endsWith("/"))?w.slice(0,-1):w||""}`+E}),this}p(E,w,U,$){return this.resolvePathStack.push((R)=>{this.path=$2.resolvedPath(R,this.input,E,w,U,$)}),this}h(E){return this.headers=E,this}q(E){return this.query=E,this}b(E){return this.body=E,this}m(E){return this.method=E,this}};K(e$,"RequestBuilder");var a$=e$,U2=K(async(f,E,w,...U)=>{return await E.send(new f(w),...U)},"makePagedClientRequest");K(fU,"createPaginator");var R2=K((f,E)=>{let w=f;const U=E.split(".");for(let $ of U){if(!w||typeof w!=="object")return;w=w[$]}return w},"get")});var BR=Z((t6,K0)=>{var mU,iU,tU,eU,aU,fR,ER,wR,$R,UR,RR,GR,IR,Q0,bE,WR,LR,FR,Mf,OR,AR,TR,MR,XR,ZR,YR,zR,QR,J0,JR,KR;(function(f){var E=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(U){f(w(E,w(U)))});else if(typeof K0==="object"&&typeof t6==="object")f(w(E,w(t6)));else f(w(E));function w(U,$){if(U!==E)if(typeof Object.create==="function")Object.defineProperty(U,"__esModule",{value:!0});else U.__esModule=!0;return function(R,G){return U[R]=$?$(R,G):G}}})(function(f){var E=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]};mU=function($,R){if(typeof R!=="function"&&R!==null)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");E($,R);function G(){this.constructor=$}$.prototype=R===null?Object.create(R):(G.prototype=R.prototype,new G)},iU=Object.assign||function($){for(var R,G=1,I=arguments.length;G<I;G++){R=arguments[G];for(var W in R)if(Object.prototype.hasOwnProperty.call(R,W))$[W]=R[W]}return $},tU=function($,R){var G={};for(var I in $)if(Object.prototype.hasOwnProperty.call($,I)&&R.indexOf(I)<0)G[I]=$[I];if($!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var W=0,I=Object.getOwnPropertySymbols($);W<I.length;W++)if(R.indexOf(I[W])<0&&Object.prototype.propertyIsEnumerable.call($,I[W]))G[I[W]]=$[I[W]]}return G},eU=function($,R,G,I){var W=arguments.length,L=W<3?R:I===null?I=Object.getOwnPropertyDescriptor(R,G):I,F;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")L=Reflect.decorate($,R,G,I);else for(var O=$.length-1;O>=0;O--)if(F=$[O])L=(W<3?F(L):W>3?F(R,G,L):F(R,G))||L;return W>3&&L&&Object.defineProperty(R,G,L),L},aU=function($,R){return function(G,I){R(G,I,$)}},fR=function($,R,G,I,W,L){function F(i){if(i!==void 0&&typeof i!=="function")throw new TypeError("Function expected");return i}var O=I.kind,T=O==="getter"?"get":O==="setter"?"set":"value",A=!R&&$?I.static?$:$.prototype:null,X=R||(A?Object.getOwnPropertyDescriptor(A,I.name):{}),Y,Q=!1;for(var z=G.length-1;z>=0;z--){var N={};for(var S in I)N[S]=S==="access"?{}:I[S];for(var S in I.access)N.access[S]=I.access[S];N.addInitializer=function(i){if(Q)throw new TypeError("Cannot add initializers after decoration has completed");L.push(F(i||null))};var p=G[z](O==="accessor"?{get:X.get,set:X.set}:X[T],N);if(O==="accessor"){if(p===void 0)continue;if(p===null||typeof p!=="object")throw new TypeError("Object expected");if(Y=F(p.get))X.get=Y;if(Y=F(p.set))X.set=Y;if(Y=F(p.init))W.unshift(Y)}else if(Y=F(p))if(O==="field")W.unshift(Y);else X[T]=Y}if(A)Object.defineProperty(A,I.name,X);Q=!0},ER=function($,R,G){var I=arguments.length>2;for(var W=0;W<R.length;W++)G=I?R[W].call($,G):R[W].call($);return I?G:void 0},wR=function($){return typeof $==="symbol"?$:"".concat($)},$R=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)},RR=function($,R,G,I){function W(L){return L instanceof G?L:new G(function(F){F(L)})}return new(G||(G=Promise))(function(L,F){function O(X){try{A(I.next(X))}catch(Y){F(Y)}}function T(X){try{A(I.throw(X))}catch(Y){F(Y)}}function A(X){X.done?L(X.value):W(X.value).then(O,T)}A((I=I.apply($,R||[])).next())})},GR=function($,R){var G={label:0,sent:function(){if(L[0]&1)throw L[1];return L[1]},trys:[],ops:[]},I,W,L,F;return F={next:O(0),throw:O(1),return:O(2)},typeof Symbol==="function"&&(F[Symbol.iterator]=function(){return this}),F;function O(A){return function(X){return T([A,X])}}function T(A){if(I)throw new TypeError("Generator is already executing.");while(F&&(F=0,A[0]&&(G=0)),G)try{if(I=1,W&&(L=A[0]&2?W.return:A[0]?W.throw||((L=W.return)&&L.call(W),0):W.next)&&!(L=L.call(W,A[1])).done)return L;if(W=0,L)A=[A[0]&2,L.value];switch(A[0]){case 0:case 1:L=A;break;case 4:return G.label++,{value:A[1],done:!1};case 5:G.label++,W=A[1],A=[0];continue;case 7:A=G.ops.pop(),G.trys.pop();continue;default:if((L=G.trys,!(L=L.length>0&&L[L.length-1]))&&(A[0]===6||A[0]===2)){G=0;continue}if(A[0]===3&&(!L||A[1]>L[0]&&A[1]<L[3])){G.label=A[1];break}if(A[0]===6&&G.label<L[1]){G.label=L[1],L=A;break}if(L&&G.label<L[2]){G.label=L[2],G.ops.push(A);break}if(L[2])G.ops.pop();G.trys.pop();continue}A=R.call($,G)}catch(X){A=[6,X],W=0}finally{I=L=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}},IR=function($,R){for(var G in $)if(G!=="default"&&!Object.prototype.hasOwnProperty.call(R,G))J0(R,$,G)},J0=Object.create?function($,R,G,I){if(I===void 0)I=G;var W=Object.getOwnPropertyDescriptor(R,G);if(!W||("get"in W?!R.__esModule:W.writable||W.configurable))W={enumerable:!0,get:function(){return R[G]}};Object.defineProperty($,I,W)}:function($,R,G,I){if(I===void 0)I=G;$[I]=R[G]},Q0=function($){var R=typeof Symbol==="function"&&Symbol.iterator,G=R&&$[R],I=0;if(G)return G.call($);if($&&typeof $.length==="number")return{next:function(){if($&&I>=$.length)$=void 0;return{value:$&&$[I++],done:!$}}};throw new TypeError(R?"Object is not iterable.":"Symbol.iterator is not defined.")},bE=function($,R){var G=typeof Symbol==="function"&&$[Symbol.iterator];if(!G)return $;var I=G.call($),W,L=[],F;try{while((R===void 0||R-- >0)&&!(W=I.next()).done)L.push(W.value)}catch(O){F={error:O}}finally{try{if(W&&!W.done&&(G=I.return))G.call(I)}finally{if(F)throw F.error}}return L},WR=function(){for(var $=[],R=0;R<arguments.length;R++)$=$.concat(bE(arguments[R]));return $},LR=function(){for(var $=0,R=0,G=arguments.length;R<G;R++)$+=arguments[R].length;for(var I=Array($),W=0,R=0;R<G;R++)for(var L=arguments[R],F=0,O=L.length;F<O;F++,W++)I[W]=L[F];return I},FR=function($,R,G){if(G||arguments.length===2){for(var I=0,W=R.length,L;I<W;I++)if(L||!(I in R)){if(!L)L=Array.prototype.slice.call(R,0,I);L[I]=R[I]}}return $.concat(L||Array.prototype.slice.call(R))},Mf=function($){return this instanceof Mf?(this.v=$,this):new Mf($)},OR=function($,R,G){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var I=G.apply($,R||[]),W,L=[];return W={},O("next"),O("throw"),O("return",F),W[Symbol.asyncIterator]=function(){return this},W;function F(z){return function(N){return Promise.resolve(N).then(z,Y)}}function O(z,N){if(I[z]){if(W[z]=function(S){return new Promise(function(p,i){L.push([z,S,p,i])>1||T(z,S)})},N)W[z]=N(W[z])}}function T(z,N){try{A(I[z](N))}catch(S){Q(L[0][3],S)}}function A(z){z.value instanceof Mf?Promise.resolve(z.value.v).then(X,Y):Q(L[0][2],z)}function X(z){T("next",z)}function Y(z){T("throw",z)}function Q(z,N){if(z(N),L.shift(),L.length)T(L[0][0],L[0][1])}},AR=function($){var R,G;return R={},I("next"),I("throw",function(W){throw W}),I("return"),R[Symbol.iterator]=function(){return this},R;function I(W,L){R[W]=$[W]?function(F){return(G=!G)?{value:Mf($[W](F)),done:!1}:L?L(F):F}:L}},TR=function($){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var R=$[Symbol.asyncIterator],G;return R?R.call($):($=typeof Q0==="function"?Q0($):$[Symbol.iterator](),G={},I("next"),I("throw"),I("return"),G[Symbol.asyncIterator]=function(){return this},G);function I(L){G[L]=$[L]&&function(F){return new Promise(function(O,T){F=$[L](F),W(O,T,F.done,F.value)})}}function W(L,F,O,T){Promise.resolve(T).then(function(A){L({value:A,done:O})},F)}},MR=function($,R){if(Object.defineProperty)Object.defineProperty($,"raw",{value:R});else $.raw=R;return $};var w=Object.create?function($,R){Object.defineProperty($,"default",{enumerable:!0,value:R})}:function($,R){$.default=R};XR=function($){if($&&$.__esModule)return $;var R={};if($!=null){for(var G in $)if(G!=="default"&&Object.prototype.hasOwnProperty.call($,G))J0(R,$,G)}return w(R,$),R},ZR=function($){return $&&$.__esModule?$:{default:$}},YR=function($,R,G,I){if(G==="a"&&!I)throw new TypeError("Private accessor was defined without a getter");if(typeof R==="function"?$!==R||!I:!R.has($))throw new TypeError("Cannot read private member from an object whose class did not declare it");return G==="m"?I:G==="a"?I.call($):I?I.value:R.get($)},zR=function($,R,G,I,W){if(I==="m")throw new TypeError("Private method is not writable");if(I==="a"&&!W)throw new TypeError("Private accessor was defined without a setter");if(typeof R==="function"?$!==R||!W:!R.has($))throw new TypeError("Cannot write private member to an object whose class did not declare it");return I==="a"?W.call($,G):W?W.value=G:R.set($,G),G},QR=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)},JR=function($,R,G){if(R!==null&&R!==void 0){if(typeof R!=="object"&&typeof R!=="function")throw new TypeError("Object expected.");var I,W;if(G){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");I=R[Symbol.asyncDispose]}if(I===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(I=R[Symbol.dispose],G)W=I}if(typeof I!=="function")throw new TypeError("Object not disposable.");if(W)I=function(){try{W.call(this)}catch(L){return Promise.reject(L)}};$.stack.push({value:R,dispose:I,async:G})}else if(G)$.stack.push({async:!0});return R};var U=typeof SuppressedError==="function"?SuppressedError:function($,R,G){var I=new Error(G);return I.name="SuppressedError",I.error=$,I.suppressed=R,I};KR=function($){function R(I){$.error=$.hasError?new U(I,$.error,"An error was suppressed during disposal."):I,$.hasError=!0}function G(){while($.stack.length){var I=$.stack.pop();try{var W=I.dispose&&I.dispose.call(I.value);if(I.async)return Promise.resolve(W).then(G,function(L){return R(L),G()})}catch(L){R(L)}}if($.hasError)throw $.error}return G()},f("__extends",mU),f("__assign",iU),f("__rest",tU),f("__decorate",eU),f("__param",aU),f("__esDecorate",fR),f("__runInitializers",ER),f("__propKey",wR),f("__setFunctionName",$R),f("__metadata",UR),f("__awaiter",RR),f("__generator",GR),f("__exportStar",IR),f("__createBinding",J0),f("__values",Q0),f("__read",bE),f("__spread",WR),f("__spreadArrays",LR),f("__spreadArray",FR),f("__await",Mf),f("__asyncGenerator",OR),f("__asyncDelegator",AR),f("__asyncValues",TR),f("__makeTemplateObject",MR),f("__importStar",XR),f("__importDefault",ZR),f("__classPrivateFieldGet",YR),f("__classPrivateFieldSet",zR),f("__classPrivateFieldIn",QR),f("__addDisposableResource",JR),f("__disposeResources",KR)})});var CR=Z((e6,qR)=>{var{defineProperty:B0,getOwnPropertyDescriptor:x2,getOwnPropertyNames:p2}=Object,g2=Object.prototype.hasOwnProperty,s2=(f,E)=>B0(f,"name",{value:E,configurable:!0}),n2=(f,E)=>{for(var w in E)B0(f,w,{get:E[w],enumerable:!0})},r2=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of p2(E))if(!g2.call(f,$)&&$!==w)B0(f,$,{get:()=>E[$],enumerable:!(U=x2(E,$))||U.enumerable})}return f},l2=(f)=>r2(B0({},"__esModule",{value:!0}),f),VR={};n2(VR,{emitWarningIfUnsupportedVersion:()=>o2});qR.exports=l2(VR);var HR=!1,o2=s2((f)=>{if(f&&!HR&&parseInt(f.substring(1,f.indexOf(".")))<18)HR=!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 rR=Z((a6,nR)=>{var uE=function(f){for(let E=0;E<8;E++)f[E]^=255;for(let E=7;E>-1;E--)if(f[E]++,f[E]!==0)break},N0=Object.defineProperty,e2=Object.getOwnPropertyDescriptor,a2=Object.getOwnPropertyNames,fA=Object.prototype.hasOwnProperty,q=(f,E)=>N0(f,"name",{value:E,configurable:!0}),EA=(f,E)=>{for(var w in E)N0(f,w,{get:E[w],enumerable:!0})},wA=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of a2(E))if(!fA.call(f,$)&&$!==w)N0(f,$,{get:()=>E[$],enumerable:!(U=e2(E,$))||U.enumerable})}return f},$A=(f)=>wA(N0({},"__esModule",{value:!0}),f),bR={};EA(bR,{SignatureV4:()=>SA,clearCredentialCache:()=>JA,createScope:()=>q0,getCanonicalHeaders:()=>_E,getCanonicalQuery:()=>yR,getPayloadHash:()=>C0,getSigningKey:()=>vR,moveHeadersToQuery:()=>gR,prepareRequest:()=>DE});nR.exports=$A(bR);var NR=y(),jE=cf(),UA="X-Amz-Algorithm",RA="X-Amz-Credential",jR="X-Amz-Date",GA="X-Amz-SignedHeaders",IA="X-Amz-Expires",hR="X-Amz-Signature",kR="X-Amz-Security-Token",_R="authorization",uR=jR.toLowerCase(),WA="date",LA=[_R,uR,WA],FA=hR.toLowerCase(),kE="x-amz-content-sha256",OA=kR.toLowerCase(),AA={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},TA=/^proxy-/,MA=/^sec-/,hE="AWS4-HMAC-SHA256",XA="AWS4-HMAC-SHA256-PAYLOAD",ZA="UNSIGNED-PAYLOAD",YA=50,DR="aws4_request",zA=604800,o=t2(),QA=cf(),Xf={},V0=[],q0=q((f,E,w)=>`${f}/${E}/${w}/${DR}`,"createScope"),vR=q(async(f,E,w,U,$)=>{const R=await PR(f,E.secretAccessKey,E.accessKeyId),G=`${w}:${U}:${$}:${o.toHex(R)}:${E.sessionToken}`;if(G in Xf)return Xf[G];V0.push(G);while(V0.length>YA)delete Xf[V0.shift()];let I=`AWS4${E.secretAccessKey}`;for(let W of[w,U,$,DR])I=await PR(f,I,W);return Xf[G]=I},"getSigningKey"),JA=q(()=>{V0.length=0,Object.keys(Xf).forEach((f)=>{delete Xf[f]})},"clearCredentialCache"),PR=q((f,E,w)=>{const U=new f(E);return U.update(QA.toUint8Array(w)),U.digest()},"hmac"),_E=q(({headers:f},E,w)=>{const U={};for(let $ of Object.keys(f).sort()){if(f[$]==null)continue;const R=$.toLowerCase();if(R in AA||(E==null?void 0:E.has(R))||TA.test(R)||MA.test(R)){if(!w||w&&!w.has(R))continue}U[R]=f[$].trim().replace(/\s+/g," ")}return U},"getCanonicalHeaders"),Sf=i2(),yR=q(({query:f={}})=>{const E=[],w={};for(let U of Object.keys(f).sort()){if(U.toLowerCase()===FA)continue;E.push(U);const $=f[U];if(typeof $==="string")w[U]=`${Sf.escapeUri(U)}=${Sf.escapeUri($)}`;else if(Array.isArray($))w[U]=$.slice(0).reduce((R,G)=>R.concat([`${Sf.escapeUri(U)}=${Sf.escapeUri(G)}`]),[]).sort().join("&")}return E.map((U)=>w[U]).filter((U)=>U).join("&")},"getCanonicalQuery"),KA=m2(),BA=cf(),C0=q(async({headers:f,body:E},w)=>{for(let U of Object.keys(f))if(U.toLowerCase()===kE)return f[U];if(E==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof E==="string"||ArrayBuffer.isView(E)||KA.isArrayBuffer(E)){const U=new w;return U.update(BA.toUint8Array(E)),o.toHex(await U.digest())}return ZA},"getPayloadHash"),SR=cf(),dR=class f{format(E){const w=[];for(let R of Object.keys(E)){const G=SR.fromUtf8(R);w.push(Uint8Array.from([G.byteLength]),G,this.formatHeaderValue(E[R]))}const U=new Uint8Array(w.reduce((R,G)=>R+G.byteLength,0));let $=0;for(let R of w)U.set(R,$),$+=R.byteLength;return U}formatHeaderValue(E){switch(E.type){case"boolean":return Uint8Array.from([E.value?0:1]);case"byte":return Uint8Array.from([2,E.value]);case"short":const w=new DataView(new ArrayBuffer(3));return w.setUint8(0,3),w.setInt16(1,E.value,!1),new Uint8Array(w.buffer);case"integer":const U=new DataView(new ArrayBuffer(5));return U.setUint8(0,4),U.setInt32(1,E.value,!1),new Uint8Array(U.buffer);case"long":const $=new Uint8Array(9);return $[0]=5,$.set(E.value.bytes,1),$;case"binary":const R=new DataView(new ArrayBuffer(3+E.value.byteLength));R.setUint8(0,6),R.setUint16(1,E.value.byteLength,!1);const G=new Uint8Array(R.buffer);return G.set(E.value,3),G;case"string":const I=SR.fromUtf8(E.value),W=new DataView(new ArrayBuffer(3+I.byteLength));W.setUint8(0,7),W.setUint16(1,I.byteLength,!1);const L=new Uint8Array(W.buffer);return L.set(I,3),L;case"timestamp":const F=new Uint8Array(9);return F[0]=8,F.set(qA.fromNumber(E.value.valueOf()).bytes,1),F;case"uuid":if(!VA.test(E.value))throw new Error(`Invalid UUID received: ${E.value}`);const O=new Uint8Array(17);return O[0]=9,O.set(o.fromHex(E.value.replace(/\-/g,"")),1),O}}};q(dR,"HeaderFormatter");var HA=dR,VA=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,xR=class f{constructor(E){if(this.bytes=E,E.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(E){if(E>9223372036854776000||E<-9223372036854776000)throw new Error(`${E} is too large (or, if negative, too small) to represent as an Int64`);const w=new Uint8Array(8);for(let U=7,$=Math.abs(Math.round(E));U>-1&&$>0;U--,$/=256)w[U]=$;if(E<0)uE(w);return new f(w)}valueOf(){const E=this.bytes.slice(0),w=E[0]&128;if(w)uE(E);return parseInt(o.toHex(E),16)*(w?-1:1)}toString(){return String(this.valueOf())}};q(xR,"Int64");var qA=xR;q(uE,"negate");var CA=q((f,E)=>{f=f.toLowerCase();for(let w of Object.keys(E))if(f===w.toLowerCase())return!0;return!1},"hasHeader"),pR=Lf(),gR=q((f,E={})=>{var w;const{headers:U,query:$={}}=pR.HttpRequest.clone(f);for(let R of Object.keys(U)){const G=R.toLowerCase();if(G.slice(0,6)==="x-amz-"&&!((w=E.unhoistableHeaders)==null?void 0:w.has(G)))$[R]=U[R],delete U[R]}return{...f,headers:U,query:$}},"moveHeadersToQuery"),DE=q((f)=>{f=pR.HttpRequest.clone(f);for(let E of Object.keys(f.headers))if(LA.indexOf(E.toLowerCase())>-1)delete f.headers[E];return f},"prepareRequest"),NA=q((f)=>PA(f).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),PA=q((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"),sR=class f{constructor({applyChecksum:E,credentials:w,region:U,service:$,sha256:R,uriEscapePath:G=!0}){this.headerFormatter=new HA,this.service=$,this.sha256=R,this.uriEscapePath=G,this.applyChecksum=typeof E==="boolean"?E:!0,this.regionProvider=NR.normalizeProvider(U),this.credentialProvider=NR.normalizeProvider(w)}async presign(E,w={}){const{signingDate:U=new Date,expiresIn:$=3600,unsignableHeaders:R,unhoistableHeaders:G,signableHeaders:I,signingRegion:W,signingService:L}=w,F=await this.credentialProvider();this.validateResolvedCredentials(F);const O=W??await this.regionProvider(),{longDate:T,shortDate:A}=H0(U);if($>zA)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const X=q0(A,O,L??this.service),Y=gR(DE(E),{unhoistableHeaders:G});if(F.sessionToken)Y.query[kR]=F.sessionToken;Y.query[UA]=hE,Y.query[RA]=`${F.accessKeyId}/${X}`,Y.query[jR]=T,Y.query[IA]=$.toString(10);const Q=_E(Y,R,I);return Y.query[GA]=cR(Q),Y.query[hR]=await this.getSignature(T,X,this.getSigningKey(F,O,A,L),this.createCanonicalRequest(Y,Q,await C0(E,this.sha256))),Y}async sign(E,w){if(typeof E==="string")return this.signString(E,w);else if(E.headers&&E.payload)return this.signEvent(E,w);else if(E.message)return this.signMessage(E,w);else return this.signRequest(E,w)}async signEvent({headers:E,payload:w},{signingDate:U=new Date,priorSignature:$,signingRegion:R,signingService:G}){const I=R??await this.regionProvider(),{shortDate:W,longDate:L}=H0(U),F=q0(W,I,G??this.service),O=await C0({headers:{},body:w},this.sha256),T=new this.sha256;T.update(E);const A=o.toHex(await T.digest()),X=[XA,L,F,$,A,O].join("\n");return this.signString(X,{signingDate:U,signingRegion:I,signingService:G})}async signMessage(E,{signingDate:w=new Date,signingRegion:U,signingService:$}){return this.signEvent({headers:this.headerFormatter.format(E.message.headers),payload:E.message.body},{signingDate:w,signingRegion:U,signingService:$,priorSignature:E.priorSignature}).then((G)=>{return{message:E.message,signature:G}})}async signString(E,{signingDate:w=new Date,signingRegion:U,signingService:$}={}){const R=await this.credentialProvider();this.validateResolvedCredentials(R);const G=U??await this.regionProvider(),{shortDate:I}=H0(w),W=new this.sha256(await this.getSigningKey(R,G,I,$));return W.update(jE.toUint8Array(E)),o.toHex(await W.digest())}async signRequest(E,{signingDate:w=new Date,signableHeaders:U,unsignableHeaders:$,signingRegion:R,signingService:G}={}){const I=await this.credentialProvider();this.validateResolvedCredentials(I);const W=R??await this.regionProvider(),L=DE(E),{longDate:F,shortDate:O}=H0(w),T=q0(O,W,G??this.service);if(L.headers[uR]=F,I.sessionToken)L.headers[OA]=I.sessionToken;const A=await C0(L,this.sha256);if(!CA(kE,L.headers)&&this.applyChecksum)L.headers[kE]=A;const X=_E(L,$,U),Y=await this.getSignature(F,T,this.getSigningKey(I,W,O,G),this.createCanonicalRequest(L,X,A));return L.headers[_R]=`${hE} Credential=${I.accessKeyId}/${T}, SignedHeaders=${cR(X)}, Signature=${Y}`,L}createCanonicalRequest(E,w,U){const $=Object.keys(w).sort();return`${E.method}
8
+ ${this.getCanonicalPath(E)}
9
+ ${yR(E)}
10
+ ${$.map((R)=>`${R}:${w[R]}`).join("\n")}
11
+
12
+ ${$.join(";")}
13
+ ${U}`}async createStringToSign(E,w,U){const $=new this.sha256;$.update(jE.toUint8Array(U));const R=await $.digest();return`${hE}
14
+ ${E}
15
+ ${w}
16
+ ${o.toHex(R)}`}getCanonicalPath({path:E}){if(this.uriEscapePath){const w=[];for(let R of E.split("/")){if((R==null?void 0:R.length)===0)continue;if(R===".")continue;if(R==="..")w.pop();else w.push(R)}const U=`${(E==null?void 0:E.startsWith("/"))?"/":""}${w.join("/")}${w.length>0&&(E==null?void 0:E.endsWith("/"))?"/":""}`;return Sf.escapeUri(U).replace(/%2F/g,"/")}return E}async getSignature(E,w,U,$){const R=await this.createStringToSign(E,w,$),G=new this.sha256(await U);return G.update(jE.toUint8Array(R)),o.toHex(await G.digest())}getSigningKey(E,w,U,$){return vR(this.sha256,E,U,w,$||this.service)}validateResolvedCredentials(E){if(typeof E!=="object"||typeof E.accessKeyId!=="string"||typeof E.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};q(sR,"SignatureV4");var SA=sR,H0=q((f)=>{const E=NA(f).replace(/[\-:]/g,"");return{longDate:E,shortDate:E.slice(0,8)}},"formatDate"),cR=q((f)=>Object.keys(f).sort().join(";"),"getCanonicalHeaderList")});var wG=Z((f7,EG)=>{var{defineProperty:P0,getOwnPropertyDescriptor:cA,getOwnPropertyNames:bA}=Object,jA=Object.prototype.hasOwnProperty,c=(f,E)=>P0(f,"name",{value:E,configurable:!0}),hA=(f,E)=>{for(var w in E)P0(f,w,{get:E[w],enumerable:!0})},kA=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of bA(E))if(!jA.call(f,$)&&$!==w)P0(f,$,{get:()=>E[$],enumerable:!(U=cA(E,$))||U.enumerable})}return f},_A=(f)=>kA(P0({},"__esModule",{value:!0}),f),tR={};hA(tR,{AWSSDKSigV4Signer:()=>yA,AwsSdkSigV4ASigner:()=>xA,AwsSdkSigV4Signer:()=>dE,NODE_SIGV4A_CONFIG_OPTIONS:()=>sA,resolveAWSSDKSigV4Config:()=>nA,resolveAwsSdkSigV4AConfig:()=>gA,resolveAwsSdkSigV4Config:()=>fG,validateSigningProperties:()=>yE});EG.exports=_A(tR);var uA=Lf(),DA=Lf(),lR=c((f)=>{var E,w;return DA.HttpResponse.isInstance(f)?((E=f.headers)==null?void 0:E.date)??((w=f.headers)==null?void 0:w.Date):void 0},"getDateHeader"),vE=c((f)=>new Date(Date.now()+f),"getSkewCorrectedDate"),vA=c((f,E)=>Math.abs(vE(E).getTime()-f)>=300000,"isClockSkewed"),oR=c((f,E)=>{const w=Date.parse(f);if(vA(w,E))return w-Date.now();return E},"getUpdatedSystemClockOffset"),bf=c((f,E)=>{if(!E)throw new Error(`Property \`${f}\` is not resolved for AWS SDK SigV4Auth`);return E},"throwSigningPropertyError"),yE=c(async(f)=>{var E,w,U;const $=bf("context",f.context),R=bf("config",f.config),G=(U=(w=(E=$.endpointV2)==null?void 0:E.properties)==null?void 0:w.authSchemes)==null?void 0:U[0],W=await bf("signer",R.signer)(G),L=f==null?void 0:f.signingRegion,F=f==null?void 0:f.signingRegionSet,O=f==null?void 0:f.signingName;return{config:R,signer:W,signingRegion:L,signingRegionSet:F,signingName:O}},"validateSigningProperties"),eR=class f{async sign(E,w,U){var $;if(!uA.HttpRequest.isInstance(E))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const R=await yE(U),{config:G,signer:I}=R;let{signingRegion:W,signingName:L}=R;const F=U.context;if((($=F==null?void 0:F.authSchemes)==null?void 0:$.length)??0>1){const[T,A]=F.authSchemes;if((T==null?void 0:T.name)==="sigv4a"&&(A==null?void 0:A.name)==="sigv4")W=(A==null?void 0:A.signingRegion)??W,L=(A==null?void 0:A.signingName)??L}return await I.sign(E,{signingDate:vE(G.systemClockOffset),signingRegion:W,signingService:L})}errorHandler(E){return(w)=>{const U=w.ServerTime??lR(w.$response);if(U){const $=bf("config",E.config),R=$.systemClockOffset;if($.systemClockOffset=oR(U,$.systemClockOffset),$.systemClockOffset!==R&&w.$metadata)w.$metadata.clockSkewCorrected=!0}throw w}}successHandler(E,w){const U=lR(E);if(U){const $=bf("config",w.config);$.systemClockOffset=oR(U,$.systemClockOffset)}}};c(eR,"AwsSdkSigV4Signer");var dE=eR,yA=dE,dA=Lf(),aR=class f extends dE{async sign(E,w,U){var $;if(!dA.HttpRequest.isInstance(E))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:R,signer:G,signingRegion:I,signingRegionSet:W,signingName:L}=await yE(U),O=(await(($=R.sigv4aSigningRegionSet)==null?void 0:$.call(R))??W??[I]).join(",");return await G.sign(E,{signingDate:vE(R.systemClockOffset),signingRegion:O,signingService:L})}};c(aR,"AwsSdkSigV4ASigner");var xA=aR,pA=FE(),mR=b0(),gA=c((f)=>{return f.sigv4aSigningRegionSet=pA.normalizeProvider(f.sigv4aSigningRegionSet),f},"resolveAwsSdkSigV4AConfig"),sA={environmentVariableSelector(f){if(f.AWS_SIGV4A_SIGNING_REGION_SET)return f.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((E)=>E.trim());throw new mR.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((E)=>E.trim());throw new mR.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},ff=FE(),iR=rR(),fG=c((f)=>{let E;if(f.credentials)E=ff.memoizeIdentityProvider(f.credentials,ff.isIdentityExpired,ff.doesIdentityRequireRefresh);if(!E)if(f.credentialDefaultProvider)E=ff.normalizeProvider(f.credentialDefaultProvider(Object.assign({},f,{parentClientConfig:f})));else E=c(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:w=!0,systemClockOffset:U=f.systemClockOffset||0,sha256:$}=f;let R;if(f.signer)R=ff.normalizeProvider(f.signer);else if(f.regionInfoProvider)R=c(()=>ff.normalizeProvider(f.region)().then(async(G)=>[await f.regionInfoProvider(G,{useFipsEndpoint:await f.useFipsEndpoint(),useDualstackEndpoint:await f.useDualstackEndpoint()})||{},G]).then(([G,I])=>{const{signingRegion:W,signingService:L}=G;f.signingRegion=f.signingRegion||W||I,f.signingName=f.signingName||L||f.serviceId;const F={...f,credentials:E,region:f.signingRegion,service:f.signingName,sha256:$,uriEscapePath:w};return new(f.signerConstructor||iR.SignatureV4)(F)}),"signer");else R=c(async(G)=>{G=Object.assign({},{name:"sigv4",signingName:f.signingName||f.defaultSigningName,signingRegion:await ff.normalizeProvider(f.region)(),properties:{}},G);const{signingRegion:I,signingName:W}=G;f.signingRegion=f.signingRegion||I,f.signingName=f.signingName||W||f.serviceId;const L={...f,credentials:E,region:f.signingRegion,service:f.signingName,sha256:$,uriEscapePath:w};return new(f.signerConstructor||iR.SignatureV4)(L)},"signer");return{...f,systemClockOffset:U,signingEscapePath:w,credentials:E,signer:R}},"resolveAwsSdkSigV4Config"),nA=fG});var S0=Z((iA)=>{var rA=":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",$G="[: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]["+rA+"]*",lA=new RegExp("^"+$G+"$"),oA=function(f,E){const w=[];let U=E.exec(f);while(U){const $=[];$.startIndex=E.lastIndex-U[0].length;const R=U.length;for(let G=0;G<R;G++)$.push(U[G]);w.push($),U=E.exec(f)}return w},mA=function(f){const E=lA.exec(f);return!(E===null||typeof E==="undefined")};iA.isExist=function(f){return typeof f!=="undefined"};iA.isEmptyObject=function(f){return Object.keys(f).length===0};iA.merge=function(f,E,w){if(E){const U=Object.keys(E),$=U.length;for(let R=0;R<$;R++)if(w==="strict")f[U[R]]=[E[U[R]]];else f[U[R]]=E[U[R]]}};iA.getValue=function(f){if(iA.isExist(f))return f;else return""};iA.isName=mA;iA.getAllMatches=oA;iA.nameRegexp=$G});var pE=Z((A8)=>{var RG=function(f){return f===" "||f==="\t"||f==="\n"||f==="\r"},GG=function(f,E){const w=E;for(;E<f.length;E++)if(f[E]=="?"||f[E]==" "){const U=f.substr(w,E-w);if(E>5&&U==="xml")return H("InvalidXml","XML declaration allowed only at the start of the document.",P(f,E));else if(f[E]=="?"&&f[E+1]==">"){E++;break}else continue}return E},IG=function(f,E){if(f.length>E+5&&f[E+1]==="-"&&f[E+2]==="-"){for(E+=3;E<f.length;E++)if(f[E]==="-"&&f[E+1]==="-"&&f[E+2]===">"){E+=2;break}}else if(f.length>E+8&&f[E+1]==="D"&&f[E+2]==="O"&&f[E+3]==="C"&&f[E+4]==="T"&&f[E+5]==="Y"&&f[E+6]==="P"&&f[E+7]==="E"){let w=1;for(E+=8;E<f.length;E++)if(f[E]==="<")w++;else if(f[E]===">"){if(w--,w===0)break}}else if(f.length>E+9&&f[E+1]==="["&&f[E+2]==="C"&&f[E+3]==="D"&&f[E+4]==="A"&&f[E+5]==="T"&&f[E+6]==="A"&&f[E+7]==="["){for(E+=8;E<f.length;E++)if(f[E]==="]"&&f[E+1]==="]"&&f[E+2]===">"){E+=2;break}}return E},G8=function(f,E){let w="",U="",$=!1;for(;E<f.length;E++){if(f[E]===U8||f[E]===R8)if(U==="")U=f[E];else if(U!==f[E]);else U="";else if(f[E]===">"){if(U===""){$=!0;break}}w+=f[E]}if(U!=="")return!1;return{value:w,index:E,tagClosed:$}},WG=function(f,E){const w=xE.getAllMatches(f,I8),U={};for(let $=0;$<w.length;$++){if(w[$][1].length===0)return H("InvalidAttr","Attribute '"+w[$][2]+"' has no space in starting.",jf(w[$]));else if(w[$][3]!==void 0&&w[$][4]===void 0)return H("InvalidAttr","Attribute '"+w[$][2]+"' is without value.",jf(w[$]));else if(w[$][3]===void 0&&!E.allowBooleanAttributes)return H("InvalidAttr","boolean attribute '"+w[$][2]+"' is not allowed.",jf(w[$]));const R=w[$][2];if(!F8(R))return H("InvalidAttr","Attribute '"+R+"' is an invalid name.",jf(w[$]));if(!U.hasOwnProperty(R))U[R]=1;else return H("InvalidAttr","Attribute '"+R+"' is repeated.",jf(w[$]))}return!0},W8=function(f,E){let w=/\d/;if(f[E]==="x")E++,w=/[\da-fA-F]/;for(;E<f.length;E++){if(f[E]===";")return E;if(!f[E].match(w))break}return-1},L8=function(f,E){if(E++,f[E]===";")return-1;if(f[E]==="#")return E++,W8(f,E);let w=0;for(;E<f.length;E++,w++){if(f[E].match(/\w/)&&w<20)continue;if(f[E]===";")break;return-1}return E},H=function(f,E,w){return{err:{code:f,msg:E,line:w.line||w,col:w.col}}},F8=function(f){return xE.isName(f)},O8=function(f){return xE.isName(f)},P=function(f,E){const w=f.substring(0,E).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}},jf=function(f){return f.startIndex+f[1].length},xE=S0(),$8={allowBooleanAttributes:!1,unpairedTags:[]};A8.validate=function(f,E){E=Object.assign({},$8,E);const w=[];let U=!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=GG(f,R),R.err)return R}else if(f[R]==="<"){let G=R;if(R++,f[R]==="!"){R=IG(f,R);continue}else{let I=!1;if(f[R]==="/")I=!0,R++;let W="";for(;R<f.length&&f[R]!==">"&&f[R]!==" "&&f[R]!=="\t"&&f[R]!=="\n"&&f[R]!=="\r";R++)W+=f[R];if(W=W.trim(),W[W.length-1]==="/")W=W.substring(0,W.length-1),R--;if(!O8(W)){let O;if(W.trim().length===0)O="Invalid space after '<'.";else O="Tag '"+W+"' is an invalid name.";return H("InvalidTag",O,P(f,R))}const L=G8(f,R);if(L===!1)return H("InvalidAttr","Attributes for '"+W+"' have open quote.",P(f,R));let F=L.value;if(R=L.index,F[F.length-1]==="/"){const O=R-F.length;F=F.substring(0,F.length-1);const T=WG(F,E);if(T===!0)U=!0;else return H(T.err.code,T.err.msg,P(f,O+T.err.line))}else if(I)if(!L.tagClosed)return H("InvalidTag","Closing tag '"+W+"' doesn't have proper closing.",P(f,R));else if(F.trim().length>0)return H("InvalidTag","Closing tag '"+W+"' can't have attributes or invalid starting.",P(f,G));else if(w.length===0)return H("InvalidTag","Closing tag '"+W+"' has not been opened.",P(f,G));else{const O=w.pop();if(W!==O.tagName){let T=P(f,O.tagStartPos);return H("InvalidTag","Expected closing tag '"+O.tagName+"' (opened in line "+T.line+", col "+T.col+") instead of closing tag '"+W+"'.",P(f,G))}if(w.length==0)$=!0}else{const O=WG(F,E);if(O!==!0)return H(O.err.code,O.err.msg,P(f,R-F.length+O.err.line));if($===!0)return H("InvalidXml","Multiple possible root nodes found.",P(f,R));else if(E.unpairedTags.indexOf(W)!==-1);else w.push({tagName:W,tagStartPos:G});U=!0}for(R++;R<f.length;R++)if(f[R]==="<")if(f[R+1]==="!"){R++,R=IG(f,R);continue}else if(f[R+1]==="?"){if(R=GG(f,++R),R.err)return R}else break;else if(f[R]==="&"){const O=L8(f,R);if(O==-1)return H("InvalidChar","char '&' is not expected.",P(f,R));R=O}else if($===!0&&!RG(f[R]))return H("InvalidXml","Extra text at the end",P(f,R));if(f[R]==="<")R--}}else{if(RG(f[R]))continue;return H("InvalidChar","char '"+f[R]+"' is not expected.",P(f,R))}if(!U)return H("InvalidXml","Start tag expected.",1);else if(w.length==1)return H("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",P(f,w[0].tagStartPos));else if(w.length>0)return H("InvalidXml","Invalid '"+JSON.stringify(w.map((R)=>R.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var U8='"',R8="'",I8=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var FG=Z((X8)=>{var LG={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,E){return E},attributeValueProcessor:function(f,E){return E},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(f,E,w){return f}},M8=function(f){return Object.assign({},LG,f)};X8.buildOptions=M8;X8.defaultOptions=LG});var TG=Z((U7,AG)=>{class OG{constructor(f){this.tagname=f,this.child=[],this[":@"]={}}add(f,E){if(f==="__proto__")f="#__proto__";this.child.push({[f]:E})}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})}}AG.exports=OG});var XG=Z((R7,MG)=>{var Q8=function(f,E){const w={};if(f[E+3]==="O"&&f[E+4]==="C"&&f[E+5]==="T"&&f[E+6]==="Y"&&f[E+7]==="P"&&f[E+8]==="E"){E=E+9;let U=1,$=!1,R=!1,G="";for(;E<f.length;E++)if(f[E]==="<"&&!R){if($&&B8(f,E)){if(E+=7,[entityName,val,E]=J8(f,E+1),val.indexOf("&")===-1)w[C8(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if($&&H8(f,E))E+=8;else if($&&V8(f,E))E+=8;else if($&&q8(f,E))E+=9;else if(K8)R=!0;else throw new Error("Invalid DOCTYPE");U++,G=""}else if(f[E]===">"){if(R){if(f[E-1]==="-"&&f[E-2]==="-")R=!1,U--}else U--;if(U===0)break}else if(f[E]==="[")$=!0;else G+=f[E];if(U!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:w,i:E}},J8=function(f,E){let w="";for(;E<f.length&&(f[E]!=="'"&&f[E]!=='"');E++)w+=f[E];if(w=w.trim(),w.indexOf(" ")!==-1)throw new Error("External entites are not supported");const U=f[E++];let $="";for(;E<f.length&&f[E]!==U;E++)$+=f[E];return[w,$,E]},K8=function(f,E){if(f[E+1]==="!"&&f[E+2]==="-"&&f[E+3]==="-")return!0;return!1},B8=function(f,E){if(f[E+1]==="!"&&f[E+2]==="E"&&f[E+3]==="N"&&f[E+4]==="T"&&f[E+5]==="I"&&f[E+6]==="T"&&f[E+7]==="Y")return!0;return!1},H8=function(f,E){if(f[E+1]==="!"&&f[E+2]==="E"&&f[E+3]==="L"&&f[E+4]==="E"&&f[E+5]==="M"&&f[E+6]==="E"&&f[E+7]==="N"&&f[E+8]==="T")return!0;return!1},V8=function(f,E){if(f[E+1]==="!"&&f[E+2]==="A"&&f[E+3]==="T"&&f[E+4]==="T"&&f[E+5]==="L"&&f[E+6]==="I"&&f[E+7]==="S"&&f[E+8]==="T")return!0;return!1},q8=function(f,E){if(f[E+1]==="!"&&f[E+2]==="N"&&f[E+3]==="O"&&f[E+4]==="T"&&f[E+5]==="A"&&f[E+6]==="T"&&f[E+7]==="I"&&f[E+8]==="O"&&f[E+9]==="N")return!0;return!1},C8=function(f){if(z8.isName(f))return f;else throw new Error(`Invalid entity name ${f}`)},z8=S0();MG.exports=Q8});var YG=Z((G7,ZG)=>{var c8=function(f,E={}){if(E=Object.assign({},S8,E),!f||typeof f!=="string")return f;let w=f.trim();if(E.skipLike!==void 0&&E.skipLike.test(w))return f;else if(E.hex&&N8.test(w))return Number.parseInt(w,16);else{const U=P8.exec(w);if(U){const $=U[1],R=U[2];let G=b8(U[3]);const I=U[4]||U[6];if(!E.leadingZeros&&R.length>0&&$&&w[2]!==".")return f;else if(!E.leadingZeros&&R.length>0&&!$&&w[1]!==".")return f;else{const W=Number(w),L=""+W;if(L.search(/[eE]/)!==-1)if(E.eNotation)return W;else return f;else if(I)if(E.eNotation)return W;else return f;else if(w.indexOf(".")!==-1)if(L==="0"&&G==="")return W;else if(L===G)return W;else if($&&L==="-"+G)return W;else return f;if(R)if(G===L)return W;else if($+G===L)return W;else return f;if(w===L)return W;else if(w===$+L)return W;return f}}else return f}},b8=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},N8=/^[-+]?0x[a-fA-F0-9]+$/,P8=/^([\-\+])?(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 S8={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};ZG.exports=c8});var KG=Z((I7,JG)=>{var k8=function(f){const E=Object.keys(f);for(let w=0;w<E.length;w++){const U=E[w];this.lastEntities[U]={regex:new RegExp("&"+U+";","g"),val:f[U]}}},_8=function(f,E,w,U,$,R,G){if(f!==void 0){if(this.options.trimValues&&!U)f=f.trim();if(f.length>0){if(!G)f=this.replaceEntitiesValue(f);const I=this.options.tagValueProcessor(E,f,w,$,R);if(I===null||I===void 0)return f;else if(typeof I!==typeof f||I!==f)return I;else if(this.options.trimValues)return sE(f,this.options.parseTagValue,this.options.numberParseOptions);else if(f.trim()===f)return sE(f,this.options.parseTagValue,this.options.numberParseOptions);else return f}}},u8=function(f){if(this.options.removeNSPrefix){const E=f.split(":"),w=f.charAt(0)==="/"?"/":"";if(E[0]==="xmlns")return"";if(E.length===2)f=w+E[1]}return f},v8=function(f,E,w){if(!this.options.ignoreAttributes&&typeof f==="string"){const U=zG.getAllMatches(f,D8),$=U.length,R={};for(let G=0;G<$;G++){const I=this.resolveNameSpace(U[G][1]);let W=U[G][4],L=this.options.attributeNamePrefix+I;if(I.length){if(this.options.transformAttributeName)L=this.options.transformAttributeName(L);if(L==="__proto__")L="#__proto__";if(W!==void 0){if(this.options.trimValues)W=W.trim();W=this.replaceEntitiesValue(W);const F=this.options.attributeValueProcessor(I,W,E);if(F===null||F===void 0)R[L]=W;else if(typeof F!==typeof W||F!==W)R[L]=F;else R[L]=sE(W,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)R[L]=!0}}if(!Object.keys(R).length)return;if(this.options.attributesGroupName){const G={};return G[this.options.attributesGroupName]=R,G}return R}},d8=function(f,E,w){const U=this.options.updateTag(E.tagname,w,E[":@"]);if(U===!1);else if(typeof U==="string")E.tagname=U,f.addChild(E);else f.addChild(E)},p8=function(f,E,w,U){if(f){if(U===void 0)U=Object.keys(E.child).length===0;if(f=this.parseTextData(f,E.tagname,w,!1,E[":@"]?Object.keys(E[":@"]).length!==0:!1,U),f!==void 0&&f!=="")E.add(this.options.textNodeName,f);f=""}return f},g8=function(f,E,w){const U="*."+w;for(let $ in f){const R=f[$];if(U===R||E===R)return!0}return!1},s8=function(f,E,w=">"){let U,$="";for(let R=E;R<f.length;R++){let G=f[R];if(U){if(G===U)U=""}else if(G==='"'||G==="'")U=G;else if(G===w[0])if(w[1]){if(f[R+1]===w[1])return{data:$,index:R}}else return{data:$,index:R};else if(G==="\t")G=" ";$+=G}},Ef=function(f,E,w,U){const $=f.indexOf(E,w);if($===-1)throw new Error(U);else return $+E.length-1},gE=function(f,E,w,U=">"){const $=s8(f,E+1,U);if(!$)return;let R=$.data;const G=$.index,I=R.search(/\s/);let W=R,L=!0;if(I!==-1)W=R.substring(0,I),R=R.substring(I+1).trimStart();const F=W;if(w){const O=W.indexOf(":");if(O!==-1)W=W.substr(O+1),L=W!==$.data.substr(O+1)}return{tagName:W,tagExp:R,closeIndex:G,attrExpPresent:L,rawTagName:F}},n8=function(f,E,w){const U=w;let $=1;for(;w<f.length;w++)if(f[w]==="<")if(f[w+1]==="/"){const R=Ef(f,">",w,`${E} is not closed`);if(f.substring(w+2,R).trim()===E){if($--,$===0)return{tagContent:f.substring(U,w),i:R}}w=R}else if(f[w+1]==="?")w=Ef(f,"?>",w+1,"StopNode is not closed.");else if(f.substr(w+1,3)==="!--")w=Ef(f,"-->",w+3,"StopNode is not closed.");else if(f.substr(w+1,2)==="![")w=Ef(f,"]]>",w,"StopNode is not closed.")-2;else{const R=gE(f,w,">");if(R){if((R&&R.tagName)===E&&R.tagExp[R.tagExp.length-1]!=="/")$++;w=R.closeIndex}}},sE=function(f,E,w){if(E&&typeof f==="string"){const U=f.trim();if(U==="true")return!0;else if(U==="false")return!1;else return h8(f,w)}else if(zG.isExist(f))return f;else return""},zG=S0(),hf=TG(),j8=XG(),h8=YG();class QG{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:(E,w)=>String.fromCharCode(Number.parseInt(w,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(E,w)=>String.fromCharCode(Number.parseInt(w,16))}},this.addExternalEntities=k8,this.parseXml=y8,this.parseTextData=_8,this.resolveNameSpace=u8,this.buildAttributesMap=v8,this.isItStopNode=g8,this.replaceEntitiesValue=x8,this.readStopNodeData=n8,this.saveTextToParentTag=p8,this.addChild=d8}}var D8=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),y8=function(f){f=f.replace(/\r\n?/g,"\n");const E=new hf("!xml");let w=E,U="",$="";for(let R=0;R<f.length;R++)if(f[R]==="<")if(f[R+1]==="/"){const I=Ef(f,">",R,"Closing Tag is not closed.");let W=f.substring(R+2,I).trim();if(this.options.removeNSPrefix){const O=W.indexOf(":");if(O!==-1)W=W.substr(O+1)}if(this.options.transformTagName)W=this.options.transformTagName(W);if(w)U=this.saveTextToParentTag(U,w,$);const L=$.substring($.lastIndexOf(".")+1);if(W&&this.options.unpairedTags.indexOf(W)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${W}>`);let F=0;if(L&&this.options.unpairedTags.indexOf(L)!==-1)F=$.lastIndexOf(".",$.lastIndexOf(".")-1),this.tagsNodeStack.pop();else F=$.lastIndexOf(".");$=$.substring(0,F),w=this.tagsNodeStack.pop(),U="",R=I}else if(f[R+1]==="?"){let I=gE(f,R,!1,"?>");if(!I)throw new Error("Pi Tag is not closed.");if(U=this.saveTextToParentTag(U,w,$),this.options.ignoreDeclaration&&I.tagName==="?xml"||this.options.ignorePiTags);else{const W=new hf(I.tagName);if(W.add(this.options.textNodeName,""),I.tagName!==I.tagExp&&I.attrExpPresent)W[":@"]=this.buildAttributesMap(I.tagExp,$,I.tagName);this.addChild(w,W,$)}R=I.closeIndex+1}else if(f.substr(R+1,3)==="!--"){const I=Ef(f,"-->",R+4,"Comment is not closed.");if(this.options.commentPropName){const W=f.substring(R+4,I-2);U=this.saveTextToParentTag(U,w,$),w.add(this.options.commentPropName,[{[this.options.textNodeName]:W}])}R=I}else if(f.substr(R+1,2)==="!D"){const I=j8(f,R);this.docTypeEntities=I.entities,R=I.i}else if(f.substr(R+1,2)==="!["){const I=Ef(f,"]]>",R,"CDATA is not closed.")-2,W=f.substring(R+9,I);U=this.saveTextToParentTag(U,w,$);let L=this.parseTextData(W,w.tagname,$,!0,!1,!0,!0);if(L==null)L="";if(this.options.cdataPropName)w.add(this.options.cdataPropName,[{[this.options.textNodeName]:W}]);else w.add(this.options.textNodeName,L);R=I+2}else{let I=gE(f,R,this.options.removeNSPrefix),W=I.tagName;const L=I.rawTagName;let{tagExp:F,attrExpPresent:O,closeIndex:T}=I;if(this.options.transformTagName)W=this.options.transformTagName(W);if(w&&U){if(w.tagname!=="!xml")U=this.saveTextToParentTag(U,w,$,!1)}const A=w;if(A&&this.options.unpairedTags.indexOf(A.tagname)!==-1)w=this.tagsNodeStack.pop(),$=$.substring(0,$.lastIndexOf("."));if(W!==E.tagname)$+=$?"."+W:W;if(this.isItStopNode(this.options.stopNodes,$,W)){let X="";if(F.length>0&&F.lastIndexOf("/")===F.length-1){if(W[W.length-1]==="/")W=W.substr(0,W.length-1),$=$.substr(0,$.length-1),F=W;else F=F.substr(0,F.length-1);R=I.closeIndex}else if(this.options.unpairedTags.indexOf(W)!==-1)R=I.closeIndex;else{const Q=this.readStopNodeData(f,L,T+1);if(!Q)throw new Error(`Unexpected end of ${L}`);R=Q.i,X=Q.tagContent}const Y=new hf(W);if(W!==F&&O)Y[":@"]=this.buildAttributesMap(F,$,W);if(X)X=this.parseTextData(X,W,$,!0,O,!0,!0);$=$.substr(0,$.lastIndexOf(".")),Y.add(this.options.textNodeName,X),this.addChild(w,Y,$)}else{if(F.length>0&&F.lastIndexOf("/")===F.length-1){if(W[W.length-1]==="/")W=W.substr(0,W.length-1),$=$.substr(0,$.length-1),F=W;else F=F.substr(0,F.length-1);if(this.options.transformTagName)W=this.options.transformTagName(W);const X=new hf(W);if(W!==F&&O)X[":@"]=this.buildAttributesMap(F,$,W);this.addChild(w,X,$),$=$.substr(0,$.lastIndexOf("."))}else{const X=new hf(W);if(this.tagsNodeStack.push(w),W!==F&&O)X[":@"]=this.buildAttributesMap(F,$,W);this.addChild(w,X,$),w=X}U="",R=T}}else U+=f[R];return E.child},x8=function(f){if(this.options.processEntities){for(let E in this.docTypeEntities){const w=this.docTypeEntities[E];f=f.replace(w.regx,w.val)}for(let E in this.lastEntities){const w=this.lastEntities[E];f=f.replace(w.regex,w.val)}if(this.options.htmlEntities)for(let E in this.htmlEntities){const w=this.htmlEntities[E];f=f.replace(w.regex,w.val)}f=f.replace(this.ampEntity.regex,this.ampEntity.val)}return f};JG.exports=QG});var HG=Z((i8)=>{var r8=function(f,E){return BG(f,E)},BG=function(f,E,w){let U;const $={};for(let R=0;R<f.length;R++){const G=f[R],I=l8(G);let W="";if(w===void 0)W=I;else W=w+"."+I;if(I===E.textNodeName)if(U===void 0)U=G[I];else U+=""+G[I];else if(I===void 0)continue;else if(G[I]){let L=BG(G[I],E,W);const F=m8(L,E);if(G[":@"])o8(L,G[":@"],W,E);else if(Object.keys(L).length===1&&L[E.textNodeName]!==void 0&&!E.alwaysCreateTextNode)L=L[E.textNodeName];else if(Object.keys(L).length===0)if(E.alwaysCreateTextNode)L[E.textNodeName]="";else L="";if($[I]!==void 0&&$.hasOwnProperty(I)){if(!Array.isArray($[I]))$[I]=[$[I]];$[I].push(L)}else if(E.isArray(I,W,F))$[I]=[L];else $[I]=L}}if(typeof U==="string"){if(U.length>0)$[E.textNodeName]=U}else if(U!==void 0)$[E.textNodeName]=U;return $},l8=function(f){const E=Object.keys(f);for(let w=0;w<E.length;w++){const U=E[w];if(U!==":@")return U}},o8=function(f,E,w,U){if(E){const $=Object.keys(E),R=$.length;for(let G=0;G<R;G++){const I=$[G];if(U.isArray(I,w+"."+I,!0,!0))f[I]=[E[I]];else f[I]=E[I]}}},m8=function(f,E){const{textNodeName:w}=E,U=Object.keys(f).length;if(U===0)return!0;if(U===1&&(f[w]||typeof f[w]==="boolean"||f[w]===0))return!0;return!1};i8.prettify=r8});var CG=Z((L7,qG)=>{var{buildOptions:e8}=FG(),a8=KG(),{prettify:fT}=HG(),ET=pE();class VG{constructor(f){this.externalEntities={},this.options=e8(f)}parse(f,E){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(E){if(E===!0)E={};const $=ET.validate(f,E);if($!==!0)throw Error(`${$.err.msg}:${$.err.line}:${$.err.col}`)}const w=new a8(this.options);w.addExternalEntities(this.externalEntities);const U=w.parseXml(f);if(this.options.preserveOrder||U===void 0)return U;else return fT(U,this.options)}addEntity(f,E){if(E.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 '&#xD;'");else if(E==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[f]=E}}qG.exports=VG});var bG=Z((F7,cG)=>{var wT=function(f,E){let w="";if(E.format&&E.indentBy.length>0)w="\n";return PG(f,E,"",w)},PG=function(f,E,w,U){let $="",R=!1;for(let G=0;G<f.length;G++){const I=f[G],W=$T(I);if(W===void 0)continue;let L="";if(w.length===0)L=W;else L=`${w}.${W}`;if(W===E.textNodeName){let X=I[W];if(!UT(L,E))X=E.tagValueProcessor(W,X),X=SG(X,E);if(R)$+=U;$+=X,R=!1;continue}else if(W===E.cdataPropName){if(R)$+=U;$+=`<![CDATA[${I[W][0][E.textNodeName]}]]>`,R=!1;continue}else if(W===E.commentPropName){$+=U+`<!--${I[W][0][E.textNodeName]}-->`,R=!0;continue}else if(W[0]==="?"){const X=NG(I[":@"],E),Y=W==="?xml"?"":U;let Q=I[W][0][E.textNodeName];Q=Q.length!==0?" "+Q:"",$+=Y+`<${W}${Q}${X}?>`,R=!0;continue}let F=U;if(F!=="")F+=E.indentBy;const O=NG(I[":@"],E),T=U+`<${W}${O}`,A=PG(I[W],E,L,F);if(E.unpairedTags.indexOf(W)!==-1)if(E.suppressUnpairedNode)$+=T+">";else $+=T+"/>";else if((!A||A.length===0)&&E.suppressEmptyNode)$+=T+"/>";else if(A&&A.endsWith(">"))$+=T+`>${A}${U}</${W}>`;else{if($+=T+">",A&&U!==""&&(A.includes("/>")||A.includes("</")))$+=U+E.indentBy+A+U;else $+=A;$+=`</${W}>`}R=!0}return $},$T=function(f){const E=Object.keys(f);for(let w=0;w<E.length;w++){const U=E[w];if(!f.hasOwnProperty(U))continue;if(U!==":@")return U}},NG=function(f,E){let w="";if(f&&!E.ignoreAttributes)for(let U in f){if(!f.hasOwnProperty(U))continue;let $=E.attributeValueProcessor(U,f[U]);if($=SG($,E),$===!0&&E.suppressBooleanAttributes)w+=` ${U.substr(E.attributeNamePrefix.length)}`;else w+=` ${U.substr(E.attributeNamePrefix.length)}="${$}"`}return w},UT=function(f,E){f=f.substr(0,f.length-E.textNodeName.length-1);let w=f.substr(f.lastIndexOf(".")+1);for(let U in E.stopNodes)if(E.stopNodes[U]===f||E.stopNodes[U]==="*."+w)return!0;return!1},SG=function(f,E){if(f&&f.length>0&&E.processEntities)for(let w=0;w<E.entities.length;w++){const U=E.entities[w];f=f.replace(U.regex,U.val)}return f};cG.exports=wT});var hG=Z((O7,jG)=>{var m=function(f){if(this.options=Object.assign({},GT,f),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=LT;if(this.processTextOrObjNode=IT,this.options.format)this.indentate=WT,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},IT=function(f,E,w){const U=this.j2x(f,w+1);if(f[this.options.textNodeName]!==void 0&&Object.keys(f).length===1)return this.buildTextValNode(f[this.options.textNodeName],E,U.attrStr,w);else return this.buildObjectNode(U.val,E,U.attrStr,w)},WT=function(f){return this.options.indentBy.repeat(f)},LT=function(f){if(f.startsWith(this.options.attributeNamePrefix)&&f!==this.options.textNodeName)return f.substr(this.attrPrefixLen);else return!1},RT=bG(),GT={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(f,E){return E},attributeValueProcessor:function(f,E){return E},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};m.prototype.build=function(f){if(this.options.preserveOrder)return RT(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}};m.prototype.j2x=function(f,E){let w="",U="";for(let $ in f){if(!Object.prototype.hasOwnProperty.call(f,$))continue;if(typeof f[$]==="undefined"){if(this.isAttribute($))U+=""}else if(f[$]===null)if(this.isAttribute($))U+="";else if($[0]==="?")U+=this.indentate(E)+"<"+$+"?"+this.tagEndChar;else U+=this.indentate(E)+"<"+$+"/"+this.tagEndChar;else if(f[$]instanceof Date)U+=this.buildTextValNode(f[$],$,"",E);else if(typeof f[$]!=="object"){const R=this.isAttribute($);if(R)w+=this.buildAttrPairStr(R,""+f[$]);else if($===this.options.textNodeName){let G=this.options.tagValueProcessor($,""+f[$]);U+=this.replaceEntitiesValue(G)}else U+=this.buildTextValNode(f[$],$,"",E)}else if(Array.isArray(f[$])){const R=f[$].length;let G="",I="";for(let W=0;W<R;W++){const L=f[$][W];if(typeof L==="undefined");else if(L===null)if($[0]==="?")U+=this.indentate(E)+"<"+$+"?"+this.tagEndChar;else U+=this.indentate(E)+"<"+$+"/"+this.tagEndChar;else if(typeof L==="object")if(this.options.oneListGroup){const F=this.j2x(L,E+1);if(G+=F.val,this.options.attributesGroupName&&L.hasOwnProperty(this.options.attributesGroupName))I+=F.attrStr}else G+=this.processTextOrObjNode(L,$,E);else if(this.options.oneListGroup){let F=this.options.tagValueProcessor($,L);F=this.replaceEntitiesValue(F),G+=F}else G+=this.buildTextValNode(L,$,"",E)}if(this.options.oneListGroup)G=this.buildObjectNode(G,$,I,E);U+=G}else if(this.options.attributesGroupName&&$===this.options.attributesGroupName){const R=Object.keys(f[$]),G=R.length;for(let I=0;I<G;I++)w+=this.buildAttrPairStr(R[I],""+f[$][R[I]])}else U+=this.processTextOrObjNode(f[$],$,E)}return{attrStr:w,val:U}};m.prototype.buildAttrPairStr=function(f,E){if(E=this.options.attributeValueProcessor(f,""+E),E=this.replaceEntitiesValue(E),this.options.suppressBooleanAttributes&&E==="true")return" "+f;else return" "+f+'="'+E+'"'};m.prototype.buildObjectNode=function(f,E,w,U){if(f==="")if(E[0]==="?")return this.indentate(U)+"<"+E+w+"?"+this.tagEndChar;else return this.indentate(U)+"<"+E+w+this.closeTag(E)+this.tagEndChar;else{let $="</"+E+this.tagEndChar,R="";if(E[0]==="?")R="?",$="";if((w||w==="")&&f.indexOf("<")===-1)return this.indentate(U)+"<"+E+w+R+">"+f+$;else if(this.options.commentPropName!==!1&&E===this.options.commentPropName&&R.length===0)return this.indentate(U)+`<!--${f}-->`+this.newLine;else return this.indentate(U)+"<"+E+w+R+this.tagEndChar+f+this.indentate(U)+$}};m.prototype.closeTag=function(f){let E="";if(this.options.unpairedTags.indexOf(f)!==-1){if(!this.options.suppressUnpairedNode)E="/"}else if(this.options.suppressEmptyNode)E="/";else E=`></${f}`;return E};m.prototype.buildTextValNode=function(f,E,w,U){if(this.options.cdataPropName!==!1&&E===this.options.cdataPropName)return this.indentate(U)+`<![CDATA[${f}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&E===this.options.commentPropName)return this.indentate(U)+`<!--${f}-->`+this.newLine;else if(E[0]==="?")return this.indentate(U)+"<"+E+w+"?"+this.tagEndChar;else{let $=this.options.tagValueProcessor(E,f);if($=this.replaceEntitiesValue($),$==="")return this.indentate(U)+"<"+E+w+this.closeTag(E)+this.tagEndChar;else return this.indentate(U)+"<"+E+w+">"+$+"</"+E+this.tagEndChar}};m.prototype.replaceEntitiesValue=function(f){if(f&&f.length>0&&this.options.processEntities)for(let E=0;E<this.options.entities.length;E++){const w=this.options.entities[E];f=f.replace(w.regex,w.val)}return f};jG.exports=m});var _G=Z((A7,kG)=>{var FT=pE(),OT=CG(),AT=hG();kG.exports={XMLParser:OT,XMLValidator:FT,XMLBuilder:AT}});var xG=Z((T7,dG)=>{var{defineProperty:c0,getOwnPropertyDescriptor:TT,getOwnPropertyNames:MT}=Object,XT=Object.prototype.hasOwnProperty,b=(f,E)=>c0(f,"name",{value:E,configurable:!0}),ZT=(f,E)=>{for(var w in E)c0(f,w,{get:E[w],enumerable:!0})},YT=(f,E,w,U)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let $ of MT(E))if(!XT.call(f,$)&&$!==w)c0(f,$,{get:()=>E[$],enumerable:!(U=TT(E,$))||U.enumerable})}return f},zT=(f)=>YT(c0({},"__esModule",{value:!0}),f),uG={};ZT(uG,{_toBool:()=>JT,_toNum:()=>KT,_toStr:()=>QT,awsExpectUnion:()=>HT,loadRestJsonErrorCode:()=>CT,loadRestXmlErrorCode:()=>cT,parseJsonBody:()=>vG,parseJsonErrorBody:()=>qT,parseXmlBody:()=>yG,parseXmlErrorBody:()=>ST});dG.exports=zT(uG);var QT=b((f)=>{if(f==null)return f;if(typeof f==="number"||typeof f==="bigint"){const E=new Error(`Received number ${f} where a string was expected.`);return E.name="Warning",console.warn(E),String(f)}if(typeof f==="boolean"){const E=new Error(`Received boolean ${f} where a string was expected.`);return E.name="Warning",console.warn(E),String(f)}return f},"_toStr"),JT=b((f)=>{if(f==null)return f;if(typeof f==="string"){const E=f.toLowerCase();if(f!==""&&E!=="false"&&E!=="true"){const w=new Error(`Received string "${f}" where a boolean was expected.`);w.name="Warning",console.warn(w)}return f!==""&&E!=="false"}return f},"_toBool"),KT=b((f)=>{if(f==null)return f;if(typeof f==="string"){const E=Number(f);if(E.toString()!==f){const w=new Error(`Received string "${f}" where a number was expected.`);return w.name="Warning",console.warn(w),f}return E}return f},"_toNum"),BT=If(),HT=b((f)=>{if(f==null)return;if(typeof f==="object"&&"__type"in f)delete f.__type;return BT.expectUnion(f)},"awsExpectUnion"),VT=If(),DG=b((f,E)=>VT.collectBody(f,E).then((w)=>E.utf8Encoder(w)),"collectBodyString"),vG=b((f,E)=>DG(f,E).then((w)=>{if(w.length)try{return JSON.parse(w)}catch(U){if((U==null?void 0:U.name)==="SyntaxError")Object.defineProperty(U,"$responseBodyText",{value:w});throw U}return{}}),"parseJsonBody"),qT=b(async(f,E)=>{const w=await vG(f,E);return w.message=w.message??w.Message,w},"parseJsonErrorBody"),CT=b((f,E)=>{const w=b((R,G)=>Object.keys(R).find((I)=>I.toLowerCase()===G.toLowerCase()),"findKey"),U=b((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"),$=w(f.headers,"x-amzn-errortype");if($!==void 0)return U(f.headers[$]);if(E.code!==void 0)return U(E.code);if(E.__type!==void 0)return U(E.__type)},"loadRestJsonErrorCode"),NT=If(),PT=_G(),yG=b((f,E)=>DG(f,E).then((w)=>{if(w.length){const U=new PT.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(W,L)=>L.trim()===""&&L.includes("\n")?"":void 0});U.addEntity("#xD","\r"),U.addEntity("#10","\n");let $;try{$=U.parse(w,!0)}catch(W){if(W&&typeof W==="object")Object.defineProperty(W,"$responseBodyText",{value:w});throw W}const R="#text",G=Object.keys($)[0],I=$[G];if(I[R])I[G]=I[R],delete I[R];return NT.getValueFromTextNode(I)}return{}}),"parseXmlBody"),ST=b(async(f,E)=>{const w=await yG(f,E);if(w.Error)w.Error.message=w.Error.message??w.Error.Message;return w},"parseXmlErrorBody"),cT=b((f,E)=>{var w;if(((w=E==null?void 0:E.Error)==null?void 0:w.Code)!==void 0)return E.Error.Code;if((E==null?void 0:E.Code)!==void 0)return E.Code;if(f.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var bT=Z((kf)=>{Object.defineProperty(kf,"__esModule",{value:!0});var nE=BR();nE.__exportStar(CR(),kf);nE.__exportStar(wG(),kf);nE.__exportStar(xG(),kf)});function oT(f){return f}var eG=(f)=>(E)=>async(w)=>{if(!j.isInstance(w.request))return E(w);const{request:U}=w,{handlerProtocol:$=""}=f.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!U.headers[":authority"])delete U.headers.host,U.headers[":authority"]=U.hostname+(U.port?":"+U.port:"");else if(!U.headers.host){let R=U.hostname;if(U.port!=null)R+=`:${U.port}`;U.headers.host=R}return E(w)},aG={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},mT=(f)=>({applyToStack:(E)=>{E.add(eG(f),aG)}});var fI=()=>(f,E)=>async(w)=>{try{const U=await f(w),{clientName:$,commandName:R,logger:G,dynamoDbDocumentClientOptions:I={}}=E,{overrideInputFilterSensitiveLog:W,overrideOutputFilterSensitiveLog:L}=I,F=W??E.inputFilterSensitiveLog,O=L??E.outputFilterSensitiveLog,{$metadata:T,...A}=U.output;return G?.info?.({clientName:$,commandName:R,input:F(w.input),output:O(A),metadata:T}),U}catch(U){const{clientName:$,commandName:R,logger:G,dynamoDbDocumentClientOptions:I={}}=E,{overrideInputFilterSensitiveLog:W}=I,L=W??E.inputFilterSensitiveLog;throw G?.error?.({clientName:$,commandName:R,input:L(w.input),error:U,metadata:U.$metadata}),U}},EI={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},tT=(f)=>({applyToStack:(E)=>{E.add(fI(),EI)}});var mE="X-Amzn-Trace-Id",wI="AWS_LAMBDA_FUNCTION_NAME",$I="_X_AMZN_TRACE_ID",UI=(f)=>(E)=>async(w)=>{const{request:U}=w;if(!j.isInstance(U)||f.runtime!=="node"||U.headers.hasOwnProperty(mE))return E(w);const $=process.env[wI],R=process.env[$I],G=(I)=>typeof I==="string"&&I.length>0;if(G($)&&G(R))U.headers[mE]=R;return E({...w,request:U})},RI={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},wM=(f)=>({applyToStack:(E)=>{E.add(UI(f),RI)}});function _M(f){return{...f,customUserAgent:typeof f.customUserAgent==="string"?[[f.customUserAgent]]:f.customUserAgent}}var G2=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}$"),qf=(f)=>G2.test(f)||f.startsWith("[")&&f.endsWith("]");var I2=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Cf=(f,E=!1)=>{if(!E)return I2.test(f);const w=f.split(".");for(let U of w)if(!Cf(U))return!1;return!0};var Nf={};var s="endpoints";function h(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`\$${h(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(h).join(", ")})`;return JSON.stringify(f,null,2)}class J extends Error{constructor(f){super(f);this.name="EndpointError"}}var wU=(f,E)=>f===E;var $U=(f)=>{const E=f.split("."),w=[];for(let U of E){const $=U.indexOf("[");if($!==-1){if(U.indexOf("]")!==U.length-1)throw new J(`Path: '${f}' does not end with ']'`);const R=U.slice($+1,-1);if(Number.isNaN(parseInt(R)))throw new J(`Invalid array index: '${R}' in path: '${f}'`);if($!==0)w.push(U.slice(0,$));w.push(R)}else w.push(U)}return w};var $0=(f,E)=>$U(E).reduce((w,U)=>{if(typeof w!=="object")throw new J(`Index '${U}' in '${E}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(w))return w[parseInt(U)];return w[U]},f);var UU=(f)=>f!=null;var RU=(f)=>!f;var U0=D(uf(),1);var OE={[U0.EndpointURLScheme.HTTP]:80,[U0.EndpointURLScheme.HTTPS]:443},GU=(f)=>{const E=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){const{hostname:T,port:A,protocol:X="",path:Y="",query:Q={}}=f,z=new URL(`${X}//${T}${A?`:${A}`:""}${Y}`);return z.search=Object.entries(Q).map(([N,S])=>`${N}=${S}`).join("&"),z}return new URL(f)}catch(T){return null}})();if(!E)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;const w=E.href,{host:U,hostname:$,pathname:R,protocol:G,search:I}=E;if(I)return null;const W=G.slice(0,-1);if(!Object.values(U0.EndpointURLScheme).includes(W))return null;const L=qf($),F=w.includes(`${U}:${OE[W]}`)||typeof f==="string"&&f.includes(`${U}:${OE[W]}`),O=`${U}${F?`:${OE[W]}`:""}`;return{scheme:W,authority:O,path:R,normalizedPath:R.endsWith("/")?R:`${R}/`,isIp:L}};var IU=(f,E)=>f===E;var WU=(f,E,w,U)=>{if(E>=w||f.length<w)return null;if(!U)return f.substring(E,w);return f.substring(f.length-w,f.length-E)};var LU=(f)=>encodeURIComponent(f).replace(/[!*'()]/g,(E)=>`%${E.charCodeAt(0).toString(16).toUpperCase()}`);var FU={booleanEquals:wU,getAttr:$0,isSet:UU,isValidHostLabel:Cf,not:RU,parseURL:GU,stringEquals:IU,substring:WU,uriEncode:LU};var R0=(f,E)=>{const w=[],U={...E.endpointParams,...E.referenceRecord};let $=0;while($<f.length){const R=f.indexOf("{",$);if(R===-1){w.push(f.slice($));break}w.push(f.slice($,R));const G=f.indexOf("}",R);if(G===-1){w.push(f.slice(R));break}if(f[R+1]==="{"&&f[G+1]==="}")w.push(f.slice(R+1,G)),$=G+2;const I=f.substring(R+1,G);if(I.includes("#")){const[W,L]=I.split("#");w.push($0(U[W],L))}else w.push(U[I]);$=G+1}return w.join("")};var OU=({ref:f},E)=>{return{...E.endpointParams,...E.referenceRecord}[f]};var r=(f,E,w)=>{if(typeof f==="string")return R0(f,w);else if(f.fn)return G0(f,w);else if(f.ref)return OU(f,w);throw new J(`'${E}': ${String(f)} is not a string, function or reference.`)};var G0=({fn:f,argv:E},w)=>{const U=E.map((R)=>["boolean","number"].includes(typeof R)?R:r(R,"arg",w)),$=f.split(".");if($[0]in Nf&&$[1]!=null)return Nf[$[0]][$[1]](...U);return FU[f](...U)};var AU=({assign:f,...E},w)=>{if(f&&f in w.referenceRecord)throw new J(`'${f}' is already defined in Reference Record.`);const U=G0(E,w);return w.logger?.debug?.(`${s} evaluateCondition: ${h(E)} = ${h(U)}`),{result:U===""?!0:!!U,...f!=null&&{toAssign:{name:f,value:U}}}};var Ff=(f=[],E)=>{const w={};for(let U of f){const{result:$,toAssign:R}=AU(U,{...E,referenceRecord:{...E.referenceRecord,...w}});if(!$)return{result:$};if(R)w[R.name]=R.value,E.logger?.debug?.(`${s} assign: ${R.name} := ${h(R.value)}`)}return{result:!0,referenceRecord:w}};var TU=(f,E)=>Object.entries(f).reduce((w,[U,$])=>({...w,[U]:$.map((R)=>{const G=r(R,"Header value entry",E);if(typeof G!=="string")throw new J(`Header '${U}' value '${G}' is not a string`);return G})}),{});var AE=(f,E)=>{if(Array.isArray(f))return f.map((w)=>AE(w,E));switch(typeof f){case"string":return R0(f,E);case"object":if(f===null)throw new J(`Unexpected endpoint property: ${f}`);return I0(f,E);case"boolean":return f;default:throw new J(`Unexpected endpoint property type: ${typeof f}`)}};var I0=(f,E)=>Object.entries(f).reduce((w,[U,$])=>({...w,[U]:AE($,E)}),{});var MU=(f,E)=>{const w=r(f,"Endpoint URL",E);if(typeof w==="string")try{return new URL(w)}catch(U){throw console.error(`Failed to construct URL with ${w}`,U),U}throw new J(`Endpoint URL must be a string, got ${typeof w}`)};var XU=(f,E)=>{const{conditions:w,endpoint:U}=f,{result:$,referenceRecord:R}=Ff(w,E);if(!$)return;const G={...E,referenceRecord:{...E.referenceRecord,...R}},{url:I,properties:W,headers:L}=U;return E.logger?.debug?.(`${s} Resolving endpoint from template: ${h(U)}`),{...L!=null&&{headers:TU(L,G)},...W!=null&&{properties:I0(W,G)},url:MU(I,G)}};var ZU=(f,E)=>{const{conditions:w,error:U}=f,{result:$,referenceRecord:R}=Ff(w,E);if(!$)return;throw new J(r(U,"Error",{...E,referenceRecord:{...E.referenceRecord,...R}}))};var YU=(f,E)=>{const{conditions:w,rules:U}=f,{result:$,referenceRecord:R}=Ff(w,E);if(!$)return;return W0(U,{...E,referenceRecord:{...E.referenceRecord,...R}})};var W0=(f,E)=>{for(let w of f)if(w.type==="endpoint"){const U=XU(w,E);if(U)return U}else if(w.type==="error")ZU(w,E);else if(w.type==="tree"){const U=YU(w,E);if(U)return U}else throw new J(`Unknown endpoint rule: ${w}`);throw new J("Rules evaluation failed")};var W2=(f,E)=>{const{endpointParams:w,logger:U}=E,{parameters:$,rules:R}=f;E.logger?.debug?.(`${s} Initial EndpointParams: ${h(w)}`);const G=Object.entries($).filter(([,L])=>L.default!=null).map(([L,F])=>[L,F.default]);if(G.length>0)for(let[L,F]of G)w[L]=w[L]??F;const I=Object.entries($).filter(([,L])=>L.required).map(([L])=>L);for(let L of I)if(w[L]==null)throw new J(`Missing required parameter: '${L}'`);const W=W0(R,{endpointParams:w,logger:U,referenceRecord:{}});if(E.endpointParams?.Endpoint)try{const L=new URL(E.endpointParams.Endpoint),{protocol:F,port:O}=L;W.url.protocol=F,W.url.port=O}catch(L){}return E.logger?.debug?.(`${s} Resolved endpoint: ${h(W)}`),W};var TE=(f,E=!1)=>{if(E){for(let w of f.split("."))if(!TE(w))return!1;return!0}if(!Cf(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(qf(f))return!1;return!0};var zU=(f)=>{const E=f.split(":");if(E.length<6)return null;const[w,U,$,R,G,...I]=E;if(w!=="arn"||U===""||$===""||I[0]==="")return null;return{partition:U,service:$,region:R,accountId:G,resourceId:I[0].includes("/")?I[0].split("/"):I}};var QU={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 F2=QU,O2="",JU=(f)=>{const{partitions:E}=F2;for(let U of E){const{regions:$,outputs:R}=U;for(let[G,I]of Object.entries($))if(G===f)return{...R,...I}}for(let U of E){const{regionRegex:$,outputs:R}=U;if(new RegExp($).test(f))return{...R}}const w=E.find((U)=>U.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}};var KU=()=>O2;var A2={isVirtualHostableS3Bucket:TE,parseArn:zU,partition:JU};Nf.aws=A2;var ME="user-agent",L0="x-amz-user-agent",XE=" ",F0="/",BU=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,HU=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,ZE="-";var T2=(f)=>(E,w)=>async(U)=>{const{request:$}=U;if(!j.isInstance($))return E(U);const{headers:R}=$,G=w?.userAgent?.map(YE)||[],I=(await f.defaultUserAgentProvider()).map(YE),W=f?.customUserAgent?.map(YE)||[],L=KU(),F=(L?[L]:[]).concat([...I,...G,...W]).join(XE),O=[...I.filter((T)=>T.startsWith("aws-sdk-")),...W].join(XE);if(f.runtime!=="browser"){if(O)R[L0]=R[L0]?`${R[ME]} ${O}`:O;R[ME]=F}else R[L0]=F;return E({...U,request:$})},YE=(f)=>{const E=f[0].split(F0).map((G)=>G.replace(BU,ZE)).join(F0),w=f[1]?.replace(HU,ZE),U=E.indexOf(F0),$=E.substring(0,U);let R=E.substring(U+1);if($==="api")R=R.toLowerCase();return[$,R,w].filter((G)=>G&&G.length>0).reduce((G,I,W)=>{switch(W){case 0:return I;case 1:return`${G}/${I}`;default:return`${G}#${I}`}},"")},M2={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},M4=(f)=>({applyToStack:(E)=>{E.add(T2(f),M2)}});var O0=(f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips"));var zE=(f)=>O0(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f;var V4=(f)=>{const{region:E,useFipsEndpoint:w}=f;if(!E)throw new Error("Region is missing");return{...f,region:async()=>{if(typeof E==="string")return zE(E);const U=await E();return zE(U)},useFipsEndpoint:async()=>{const U=typeof E==="string"?E:await E();if(O0(U))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}}};var Of=(f,E,w)=>{if(!(E in f))return;if(f[E]==="true")return!0;if(f[E]==="false")return!1;throw new Error(`Cannot load ${w} "${E}". Expected "true" or "false", got ${f[E]}.`)};var l;(function(f){f.ENV="env",f.CONFIG="shared config entry"})(l||(l={}));var X2="AWS_USE_DUALSTACK_ENDPOINT",Z2="use_dualstack_endpoint";var k4={environmentVariableSelector:(f)=>Of(f,X2,l.ENV),configFileSelector:(f)=>Of(f,Z2,l.CONFIG),default:!1};var Y2="AWS_USE_FIPS_ENDPOINT",z2="use_fips_endpoint";var D4={environmentVariableSelector:(f)=>Of(f,Y2,l.ENV),configFileSelector:(f)=>Of(f,z2,l.CONFIG),default:!1};var Q2=D(y(),1);var J2=D(y(),1);var VU={environmentVariableSelector:(f)=>f["AWS_REGION"],configFileSelector:(f)=>f["region"],default:()=>{throw new Error("Region is missing")}},m4={preferredFile:"credentials"};function K2(f){return(E)=>async(w)=>{const U=w.request;if(j.isInstance(U)){const{body:$,headers:R}=U;if($&&Object.keys(R).map((G)=>G.toLowerCase()).indexOf(qU)===-1)try{const G=f($);U.headers={...U.headers,[qU]:String(G)}}catch(G){}}return E({...w,request:U})}}var qU="content-length",B2={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},B5=(f)=>({applyToStack:(E)=>{E.add(K2(f.bodyLengthChecker),B2)}});var CU=(f,E)=>(w)=>async(U)=>{const{response:$}=await w(U);try{const R=await E($,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}};var NU=(f,E)=>(w,U)=>async($)=>{const R=U.endpointV2?.url&&f.urlParser?async()=>f.urlParser(U.endpointV2.url):f.endpoint;if(!R)throw new Error("No valid endpoint provider available.");const G=await E($.input,{...f,endpoint:R});return w({...$,request:G})};function P5(f,E,w){return{applyToStack:(U)=>{U.add(CU(f,w),H2),U.add(NU(f,E),QE)}}}var H2={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},QE={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var _U=D(y(),1);var PU=async(f)=>{const E=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=E.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(P2(E)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!N2(E)||E.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||E.toLowerCase()!==E||E.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},V2=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,q2=/(\d+\.){3}\d+/,C2=/\.\./;var N2=(f)=>V2.test(f)&&!q2.test(f)&&!C2.test(f),P2=(f)=>{const[E,w,U,,,$]=f.split(":"),R=E==="arn"&&f.split(":").length>=6,G=Boolean(R&&w&&U&&$);if(R&&!G)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return G};var SU=(f,E,w)=>{const U=async()=>{const $=w[f]??w[E];if(typeof $==="function")return $();return $};if(f==="credentialScope"||E==="CredentialScope")return async()=>{const $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.credentialScope??$?.CredentialScope};if(f==="accountId"||E==="AccountId")return async()=>{const $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.accountId??$?.AccountId};if(f==="endpoint"||E==="endpoint")return async()=>{const $=await U();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){const{protocol:R,hostname:G,port:I,path:W}=$;return`${R}//${G}${I?":"+I:""}${W}`}}return $};return U};var JE=D(j0(),1),cU="AWS_ENDPOINT_URL",bU="endpoint_url",jU=(f)=>({environmentVariableSelector:(E)=>{const w=f.split(" ").map((R)=>R.toUpperCase()),U=E[[cU,...w].join("_")];if(U)return U;const $=E[cU];if($)return $;return},configFileSelector:(E,w)=>{if(w&&E.services){const $=w[["services",E.services].join(JE.CONFIG_PREFIX_SEPARATOR)];if($){const R=f.split(" ").map((I)=>I.toLowerCase()),G=$[[R.join("_"),bU].join(JE.CONFIG_PREFIX_SEPARATOR)];if(G)return G}}const U=E[bU];if(U)return U;return},default:void 0});var hU=async(f)=>t(jU(f))();var A0=(f)=>{if(typeof f==="object"){if("url"in f)return KE(f.url);return f}return KE(f)};var kU=async(f,E,w,U)=>{if(!w.endpoint){const G=await hU(w.serviceId||"");if(G)w.endpoint=()=>Promise.resolve(A0(G))}const $=await S2(f,E,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider($,U)},S2=async(f,E,w)=>{const U={},$=E?.getEndpointParameterInstructions?.()||{};for(let[R,G]of Object.entries($))switch(G.type){case"staticContextParams":U[R]=G.value;break;case"contextParams":U[R]=f[G.name];break;case"clientContextParams":case"builtInParams":U[R]=await SU(G.name,R,w)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(G))}if(Object.keys($).length===0)Object.assign(U,w);if(String(w.serviceId).toLowerCase()==="s3")await PU(U);return U};var uU=({config:f,instructions:E})=>{return(w,U)=>async($)=>{const R=await kU($.input,{getEndpointParameterInstructions(){return E}},{...f},U);U.endpointV2=R,U.authSchemes=R.properties?.authSchemes;const G=U.authSchemes?.[0];if(G){U.signing_region=G.signingRegion,U.signing_service=G.signingName;const W=_U.getSmithyContext(U)?.selectedHttpAuthScheme?.httpAuthOption;if(W)W.signingProperties=Object.assign(W.signingProperties||{},{signing_region:G.signingRegion,signingRegion:G.signingRegion,signing_service:G.signingName,signingName:G.signingName,signingRegionSet:G.signingRegionSet},G.properties)}return w({...$})}};var c2={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:QE.name},a5=(f,E)=>({applyToStack:(w)=>{w.addRelativeTo(uU({config:f,instructions:E}),c2)}});var T0=D(y(),1);var wZ=(f)=>{const E=f.tls??!0,{endpoint:w}=f,U=w!=null?async()=>A0(await T0.normalizeProvider(w)()):void 0;return{...f,endpoint:U,tls:E,isCustomEndpoint:!!w,useDualstackEndpoint:T0.normalizeProvider(f.useDualstackEndpoint??!1),useFipsEndpoint:T0.normalizeProvider(f.useFipsEndpoint??!1)}};var x=D(g0(),1),TZ=x.default.v1,MZ=x.default.v3,DU=x.default.v4,XZ=x.default.v5,ZZ=x.default.NIL,YZ=x.default.version,zZ=x.default.validate,QZ=x.default.stringify,JZ=x.default.parse;var PE=D(y(),1);var v;(function(f){f.STANDARD="standard",f.ADAPTIVE="adaptive"})(v||(v={}));var e=3,vU=v.STANDARD;var yU=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],dU=["TimeoutError","RequestTimeout","RequestTimeoutException"],xU=[500,502,503,504],pU=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var b2=(f)=>f.$metadata?.clockSkewCorrected,Af=(f)=>f.$metadata?.httpStatusCode===429||yU.includes(f.name)||f.$retryable?.throttling==!0,M0=(f)=>b2(f)||dU.includes(f.name)||pU.includes(f?.code||"")||xU.includes(f.$metadata?.httpStatusCode||0),gU=(f)=>{if(f.$metadata?.httpStatusCode!==void 0){const E=f.$metadata.httpStatusCode;if(500<=E&&E<=599&&!M0(f))return!0;return!1}return!1};class X0{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 E=this.getCurrentTimeInSeconds();this.lastThrottleTime=E,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 E=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,E))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){const f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}const E=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+E),this.lastTimestamp=f}updateClientSendingRate(f){let E;if(this.updateMeasuredRate(),Af(f)){const U=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=U,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),E=this.cubicThrottle(U),this.enableTokenBucket()}else this.calculateTimeWindow(),E=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(E,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(f){return this.getPrecise(f*this.beta)}cubicSuccess(f){return this.getPrecise(this.scaleConstant*Math.pow(f-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(f){this.refillTokenBucket(),this.fillRate=Math.max(f,this.minFillRate),this.maxCapacity=Math.max(f,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const f=this.getCurrentTimeInSeconds(),E=Math.floor(f*2)/2;if(this.requestCount++,E>this.lastTxRateBucket){const w=this.requestCount/(E-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=E}}getPrecise(f){return parseFloat(f.toFixed(8))}}var a=100,Pf=20000,BE=500,Z0=500,HE=5,VE=10,qE=1,Y0="amz-sdk-invocation-id",z0="amz-sdk-request";var sU=()=>{let f=a;return{computeNextBackoffDelay:(U)=>{return Math.floor(Math.min(Pf,Math.random()*2**U*f))},setDelayBase:(U)=>{f=U}}};var CE=({retryDelay:f,retryCount:E,retryCost:w})=>{return{getRetryCount:()=>E,getRetryDelay:()=>Math.min(Pf,f),getRetryCost:()=>w}};class Tf{constructor(f){this.maxAttempts=f,this.mode=v.STANDARD,this.capacity=Z0,this.retryBackoffStrategy=sU(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return CE({retryDelay:a,retryCount:0})}async refreshRetryTokenForRetry(f,E){const w=await this.getMaxAttempts();if(this.shouldRetry(f,E,w)){const U=E.errorType;this.retryBackoffStrategy.setDelayBase(U==="THROTTLING"?BE:a);const $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),R=E.retryAfterHint?Math.max(E.retryAfterHint.getTime()-Date.now()||0,$):$,G=this.getCapacityCost(U);return this.capacity-=G,CE({retryDelay:R,retryCount:f.getRetryCount()+1,retryCost:G})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(Z0,this.capacity+(f.getRetryCost()??qE))}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 ${e}`),e}}shouldRetry(f,E,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(E.errorType)&&this.isRetryableError(E.errorType)}getCapacityCost(f){return f==="TRANSIENT"?VE:HE}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}}class NE{constructor(f,E){this.maxAttemptsProvider=f,this.mode=v.ADAPTIVE;const{rateLimiter:w}=E??{};this.rateLimiter=w??new X0,this.standardRetryStrategy=new Tf(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,E){return this.rateLimiter.updateClientSendingRate(E),this.standardRetryStrategy.refreshRetryTokenForRetry(f,E)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}}var nU="AWS_MAX_ATTEMPTS",rU="max_attempts",E6={environmentVariableSelector:(f)=>{const E=f[nU];if(!E)return;const w=parseInt(E);if(Number.isNaN(w))throw new Error(`Environment variable ${nU} mast be a number, got "${E}"`);return w},configFileSelector:(f)=>{const E=f[rU];if(!E)return;const w=parseInt(E);if(Number.isNaN(w))throw new Error(`Shared config file entry ${rU} mast be a number, got "${E}"`);return w},default:e},w6=(f)=>{const{retryStrategy:E}=f,w=PE.normalizeProvider(f.maxAttempts??e);return{...f,maxAttempts:w,retryStrategy:async()=>{if(E)return E;if(await PE.normalizeProvider(f.retryMode)()===v.ADAPTIVE)return new NE(w);return new Tf(w)}}},j2="AWS_RETRY_MODE",h2="retry_mode",$6={environmentVariableSelector:(f)=>f[j2],configFileSelector:(f)=>f[h2],default:vU};import{Readable as k2} from"stream";var lU=(f)=>f?.body instanceof k2||typeof ReadableStream!=="undefined"&&f?.body instanceof ReadableStream;var SE=(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 _2=(f)=>(E,w)=>async(U)=>{let $=await f.retryStrategy();const R=await f.maxAttempts();if(u2($)){$=$;let G=await $.acquireInitialRetryToken(w.partition_id),I=new Error,W=0,L=0;const{request:F}=U,O=j.isInstance(F);if(O)F.headers[Y0]=DU();while(!0)try{if(O)F.headers[z0]=`attempt=${W+1}; max=${R}`;const{response:T,output:A}=await E(U);return $.recordSuccess(G),A.$metadata.attempts=W+1,A.$metadata.totalRetryDelay=L,{response:T,output:A}}catch(T){const A=D2(T);if(I=SE(T),O&&lU(F))throw(w.logger instanceof oU?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),I;try{G=await $.refreshRetryTokenForRetry(G,A)}catch(Y){if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=W+1,I.$metadata.totalRetryDelay=L,I}W=G.getRetryCount();const X=G.getRetryDelay();L+=X,await new Promise((Y)=>setTimeout(Y,X))}}else{if($=$,$?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(E,U)}},u2=(f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined",D2=(f)=>{const E={error:f,errorType:v2(f)},w=d2(f.$response);if(w)E.retryAfterHint=w;return E},v2=(f)=>{if(Af(f))return"THROTTLING";if(M0(f))return"TRANSIENT";if(gU(f))return"SERVER_ERROR";return"CLIENT_ERROR"},y2={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},X6=(f)=>({applyToStack:(E)=>{E.add(_2(f),y2)}}),d2=(f)=>{if(!cE.isInstance(f))return;const E=Object.keys(f.headers).find((R)=>R.toLowerCase()==="retry-after");if(!E)return;const w=f.headers[E],U=Number(w);if(!Number.isNaN(U))return new Date(U*1000);return new Date(w)};import{platform as jT,release as hT} from"os";import{env as gG,versions as kT} from"process";var rE={isCrtAvailable:!1};var pG=()=>{if(rE.isCrtAvailable)return["md/crt-avail"];return null};var _T="AWS_SDK_UA_APP_ID",uT="sdk-ua-app-id",B7=({serviceId:f,clientVersion:E})=>{const w=[["aws-sdk-js",E],["ua","2.0"],[`os/${jT()}`,hT()],["lang/js"],["md/nodejs",`${kT.node}`]],U=pG();if(U)w.push(U);if(f)w.push([`api/${f}`,E]);if(gG.AWS_EXECUTION_ENV)w.push([`exec-env/${gG.AWS_EXECUTION_ENV}`]);const $=t({environmentVariableSelector:(G)=>G[_T],configFileSelector:(G)=>G[uT],default:void 0})();let R=void 0;return async()=>{if(!R){const G=await $;R=G?[...w,[`app/${G}`]]:[...w]}return R}};var _f=D(DT(),1),nG=D(cf(),1);import{Buffer as vT} from"buffer";import{createHash as yT,createHmac as dT} from"crypto";var sG=function(f,E){if(vT.isBuffer(f))return f;if(typeof f==="string")return _f.fromString(f,E);if(ArrayBuffer.isView(f))return _f.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength);return _f.fromArrayBuffer(f)};class xT{constructor(f,E){this.algorithmIdentifier=f,this.secret=E,this.reset()}update(f,E){this.hash.update(nG.toUint8Array(sG(f,E)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?dT(this.algorithmIdentifier,sG(this.secret)):yT(this.algorithmIdentifier)}}import{fstatSync as pT,lstatSync as gT} from"fs";var S7=(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 gT(f.path).size;else if(typeof f.fd==="number")return pT(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)};var tG=D(b0(),1);var rG="AWS_EXECUTION_ENV",lE="AWS_REGION",oE="AWS_DEFAULT_REGION",lG="AWS_EC2_METADATA_DISABLED",oG=["in-region","cross-region","mobile","standard","legacy"],mG="/latest/meta-data/placement/region";var iG={environmentVariableSelector:(f)=>{return f["AWS_DEFAULTS_MODE"]},configFileSelector:(f)=>{return f["defaults_mode"]},default:"legacy"};var y7=({region:f=t(VU),defaultsMode:E=t(iG)}={})=>tG.memoize(async()=>{const w=typeof E==="function"?await E():E;switch(w?.toLowerCase()){case"auto":return sT(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${oG.join(", ")}, got ${w}`)}}),sT=async(f)=>{if(f){const E=typeof f==="function"?await f():f,w=await nT();if(!w)return"standard";if(E===w)return"in-region";else return"cross-region"}return"standard"},nT=async()=>{if(process.env[rG]&&(process.env[lE]||process.env[oE]))return process.env[lE]??process.env[oE];if(!process.env[lG])try{const{getInstanceMetadataEndpoint:f,httpRequest:E}=await import("./chunk-51ee928673a12486.js"),w=await f();return(await E({...w,path:mG})).toString()}catch(f){}};var g7=(f)=>{let E=async()=>{if(f.region===void 0)throw new Error("Region is missing from runtimeConfig");const w=f.region;if(typeof w==="string")return w;return w()};return{setRegion(w){E=w},region(){return E}}},s7=(f)=>{return{region:f.region()}};export{oT as ra,mT as sa,tT as ta,wM as ua,y as va,Of as wa,l as xa,FE as ya,_M as za,Nf as Aa,W2 as Ba,A2 as Ca,M4 as Da,k4 as Ea,D4 as Fa,VU as Ga,m4 as Ha,V4 as Ia,B5 as Ja,S2 as Ka,P5 as La,a5 as Ma,wZ as Na,vU as Oa,DU as Pa,E6 as Qa,w6 as Ra,$6 as Sa,X6 as Ta,BR as Ua,bT as Va,B7 as Wa,xT as Xa,S7 as Ya,y7 as Za,g7 as _a,s7 as $a};