@stacksjs/buddy 0.63.0 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-12tkdbmy.js +7 -0
  3. package/dist/{chunk-8420n19j.js.map → chunk-12tkdbmy.js.map} +6 -5
  4. package/dist/chunk-1f6t66bt.js +5 -0
  5. package/dist/{chunk-1f1xhs02.js.map → chunk-1f6t66bt.js.map} +2 -2
  6. package/dist/chunk-463qxvjp.js +5 -0
  7. package/dist/{chunk-7jmyxm7k.js.map → chunk-463qxvjp.js.map} +2 -2
  8. package/dist/chunk-47n7wt6x.js +12 -0
  9. package/dist/{chunk-qx96ff3m.js.map → chunk-47n7wt6x.js.map} +2 -2
  10. package/dist/chunk-97kwnfsa.js +5 -0
  11. package/dist/{chunk-as72s87r.js.map → chunk-97kwnfsa.js.map} +2 -2
  12. package/dist/chunk-a8vj9csq.js +6 -0
  13. package/dist/{chunk-q2vnqdcs.js.map → chunk-a8vj9csq.js.map} +6 -6
  14. package/dist/chunk-b8124fjs.js +9 -0
  15. package/dist/{chunk-afhgv4v9.js.map → chunk-b8124fjs.js.map} +2 -2
  16. package/dist/chunk-cnvpbb2z.js +5 -0
  17. package/dist/{chunk-xhsvfzz8.js.map → chunk-cnvpbb2z.js.map} +4 -4
  18. package/dist/chunk-ehm10xxj.js +21 -0
  19. package/dist/{chunk-tegm7yex.js.map → chunk-ehm10xxj.js.map} +11 -15
  20. package/dist/chunk-f9qdyafb.js +5 -0
  21. package/dist/{chunk-582dnm6a.js.map → chunk-f9qdyafb.js.map} +5 -5
  22. package/dist/chunk-fcgh2sfr.js +5 -0
  23. package/dist/{chunk-mmbfc5ft.js.map → chunk-fcgh2sfr.js.map} +2 -2
  24. package/dist/chunk-fft99hka.js +4 -0
  25. package/dist/chunk-fft99hka.js.map +16 -0
  26. package/dist/chunk-g5tqs4wa.js +5 -0
  27. package/dist/{chunk-03ckp0m6.js.map → chunk-g5tqs4wa.js.map} +4 -4
  28. package/dist/chunk-gvpcxxae.js +5 -0
  29. package/dist/{chunk-6pac0yn5.js.map → chunk-gvpcxxae.js.map} +2 -2
  30. package/dist/chunk-hd0zdkj9.js +4 -0
  31. package/dist/{chunk-zzerxbrm.js.map → chunk-hd0zdkj9.js.map} +2 -2
  32. package/dist/chunk-hj9p7vjp.js +5 -0
  33. package/dist/{chunk-yrsms9d2.js.map → chunk-hj9p7vjp.js.map} +4 -4
  34. package/dist/chunk-hxzqmyb0.js +5 -0
  35. package/dist/{chunk-rt463pw6.js.map → chunk-hxzqmyb0.js.map} +2 -2
  36. package/dist/chunk-pabnt45p.js +5 -0
  37. package/dist/{chunk-nr24kzd1.js.map → chunk-pabnt45p.js.map} +2 -2
  38. package/dist/chunk-svr5ddhq.js +4 -0
  39. package/dist/{chunk-sc3etgb7.js.map → chunk-svr5ddhq.js.map} +2 -2
  40. package/dist/chunk-wmfxrbxe.js +5 -0
  41. package/dist/{chunk-cnvp47g4.js.map → chunk-wmfxrbxe.js.map} +1 -1
  42. package/dist/cli.js +2 -126
  43. package/dist/cli.js.map +3 -3
  44. package/dist/index.js +2 -84
  45. package/dist/index.js.map +1 -1
  46. package/dist/stacks +0 -0
  47. package/package.json +1 -46
  48. package/src/cli.ts +1 -0
  49. package/src/commands/build.ts +5 -4
  50. package/src/commands/index.ts +1 -0
  51. package/src/commands/make.ts +2 -2
  52. package/src/commands/outdated.ts +31 -0
  53. package/dist/chunk-03ckp0m6.js +0 -1222
  54. package/dist/chunk-1f1xhs02.js +0 -2223
  55. package/dist/chunk-582dnm6a.js +0 -664
  56. package/dist/chunk-6pac0yn5.js +0 -126
  57. package/dist/chunk-7jmyxm7k.js +0 -85
  58. package/dist/chunk-8217wvpy.js +0 -108
  59. package/dist/chunk-8217wvpy.js.map +0 -16
  60. package/dist/chunk-8420n19j.js +0 -7417
  61. package/dist/chunk-afhgv4v9.js +0 -164
  62. package/dist/chunk-as72s87r.js +0 -61
  63. package/dist/chunk-cnvp47g4.js +0 -22
  64. package/dist/chunk-mmbfc5ft.js +0 -287
  65. package/dist/chunk-nr24kzd1.js +0 -178
  66. package/dist/chunk-q2vnqdcs.js +0 -1696
  67. package/dist/chunk-qx96ff3m.js +0 -95
  68. package/dist/chunk-rt463pw6.js +0 -46
  69. package/dist/chunk-sc3etgb7.js +0 -208
  70. package/dist/chunk-tegm7yex.js +0 -10767
  71. package/dist/chunk-xhsvfzz8.js +0 -381
  72. package/dist/chunk-yrsms9d2.js +0 -1746
  73. package/dist/chunk-zzerxbrm.js +0 -110
@@ -0,0 +1,21 @@
1
+ import{N as o,O as M}from"./chunk-wmfxrbxe.js";import{R as x,S as uU,T as XL,V as Uw,W as EF,Z as IF}from"./chunk-a8vj9csq.js";import{eb as A0}from"./chunk-gvpcxxae.js";import{fb as TG,gb as z0}from"./chunk-fft99hka.js";import{mb as jU}from"./chunk-svr5ddhq.js";import{vb as JF}from"./chunk-hd0zdkj9.js";var n=M((BM,Sw)=>{var{defineProperty:Q1,getOwnPropertyDescriptor:yF,getOwnPropertyNames:_F}=Object,dF=Object.prototype.hasOwnProperty,jw=($,U)=>Q1($,"name",{value:U,configurable:!0}),gF=($,U)=>{for(var w in U)Q1($,w,{get:U[w],enumerable:!0})},pF=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of _F(U))if(!dF.call($,G)&&G!==w)Q1($,G,{get:()=>U[G],enumerable:!(W=yF(U,G))||W.enumerable})}return $},lF=($)=>pF(Q1({},"__esModule",{value:!0}),$),Pw={};gF(Pw,{getSmithyContext:()=>sF,normalizeProvider:()=>nF});Sw.exports=lF(Pw);var Nw=A0(),sF=jw(($)=>$[Nw.SMITHY_CONTEXT_KEY]||($[Nw.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),nF=jw(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var J1=M((f3,uw)=>{function xw($,U,w){return{applyToStack:(W)=>{W.add(Dw($,w),cw),W.add(kw($,U),vw)}}}var{defineProperty:z1,getOwnPropertyDescriptor:rF,getOwnPropertyNames:oF}=Object,aF=Object.prototype.hasOwnProperty,B$=($,U)=>z1($,"name",{value:U,configurable:!0}),tF=($,U)=>{for(var w in U)z1($,w,{get:U[w],enumerable:!0})},eF=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of oF(U))if(!aF.call($,G)&&G!==w)z1($,G,{get:()=>U[G],enumerable:!(W=rF(U,G))||W.enumerable})}return $},$2=($)=>eF(z1({},"__esModule",{value:!0}),$),hw={};tF(hw,{deserializerMiddleware:()=>Dw,deserializerMiddlewareOption:()=>cw,getSerdePlugin:()=>xw,serializerMiddleware:()=>kw,serializerMiddlewareOption:()=>vw});uw.exports=$2(hw);var Dw=B$(($,U)=>(w)=>async(W)=>{const{response:G}=await w(W);try{const L=await U(G,$);return{response:G,output:L}}catch(L){if(Object.defineProperty(L,"$response",{value:G}),!("$metadata"in L)){if(L.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof L.$responseBodyText!=="undefined"){if(L.$response)L.$response.body=L.$responseBodyText}}throw L}},"deserializerMiddleware"),kw=B$(($,U)=>(w,W)=>async(G)=>{var L;const f=((L=W.endpointV2)==null?void 0:L.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!f)throw new Error("No valid endpoint provider available.");const F=await U(G.input,{...$,endpoint:f});return w({...G,request:F})},"serializerMiddleware"),cw={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},vw={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};B$(xw,"getSerdePlugin")});var H$=M((F3,pw)=>{var{defineProperty:K1,getOwnPropertyDescriptor:U2,getOwnPropertyNames:w2}=Object,G2=Object.prototype.hasOwnProperty,I0=($,U)=>K1($,"name",{value:U,configurable:!0}),W2=($,U)=>{for(var w in U)K1($,w,{get:U[w],enumerable:!0})},L2=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of w2(U))if(!G2.call($,G)&&G!==w)K1($,G,{get:()=>U[G],enumerable:!(W=U2(U,G))||W.enumerable})}return $},f2=($)=>L2(K1({},"__esModule",{value:!0}),$),yw={};W2(yw,{CredentialsProviderError:()=>F2,ProviderError:()=>M1,TokenProviderError:()=>Z2,chain:()=>E2,fromStatic:()=>I2,memoize:()=>X2});pw.exports=f2(yw);var _w=class $ extends Error{constructor(U,w=!0){var W;let G,L=!0;if(typeof w==="boolean")G=void 0,L=w;else if(w!=null&&typeof w==="object")G=w.logger,L=w.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=L,Object.setPrototypeOf(this,$.prototype),(W=G==null?void 0:G.debug)==null||W.call(G,`@smithy/property-provider ${L?"->":"(!)"} ${U}`)}static from(U,w=!0){return Object.assign(new this(U.message,w),U)}};I0(_w,"ProviderError");var M1=_w,dw=class $ extends M1{constructor(U,w=!0){super(U,w);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};I0(dw,"CredentialsProviderError");var F2=dw,gw=class $ extends M1{constructor(U,w=!0){super(U,w);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};I0(gw,"TokenProviderError");var Z2=gw,E2=I0((...$)=>async()=>{if($.length===0)throw new M1("No providers in chain");let U;for(let w of $)try{return await w()}catch(W){if(U=W,W==null?void 0:W.tryNextLink)continue;throw W}throw U},"chain"),I2=I0(($)=>()=>Promise.resolve($),"fromStatic"),X2=I0(($,U,w)=>{let W,G,L,f=!1;const F=I0(async()=>{if(!G)G=$();try{W=await G,L=!0,f=!1}finally{G=void 0}return W},"coalesceProvider");if(U===void 0)return async(Z)=>{if(!L||(Z==null?void 0:Z.forceRefresh))W=await F();return W};return async(Z)=>{if(!L||(Z==null?void 0:Z.forceRefresh))W=await F();if(f)return W;if(w&&!w(W))return f=!0,W;if(U(W))return await F(),W;return W}},"memoize")});var B0=M((lw)=>{Object.defineProperty(lw,"__esModule",{value:!0});lw.getHomeDir=void 0;var R2=import.meta.require("os"),Y2=import.meta.require("path"),C$={},Q2=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},z2=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:w,HOMEDRIVE:W=`C:${Y2.sep}`}=process.env;if($)return $;if(U)return U;if(w)return`${W}${w}`;const G=Q2();if(!C$[G])C$[G]=R2.homedir();return C$[G]};lw.getHomeDir=z2});var q$=M((nw)=>{Object.defineProperty(nw,"__esModule",{value:!0});nw.getSSOTokenFilepath=void 0;var J2=import.meta.require("crypto"),K2=import.meta.require("path"),M2=B0(),T2=($)=>{const w=J2.createHash("sha1").update($).digest("hex");return K2.join(M2.getHomeDir(),".aws","sso","cache",`${w}.json`)};nw.getSSOTokenFilepath=T2});var ow=M((iw)=>{Object.defineProperty(iw,"__esModule",{value:!0});iw.getSSOTokenFromFile=void 0;var A2=import.meta.require("fs"),O2=q$(),{readFile:V2}=A2.promises,B2=async($)=>{const U=O2.getSSOTokenFilepath($),w=await V2(U,"utf8");return JSON.parse(w)};iw.getSSOTokenFromFile=B2});var j$=M((aw)=>{Object.defineProperty(aw,"__esModule",{value:!0});aw.slurpFile=void 0;var H2=import.meta.require("fs"),{readFile:C2}=H2.promises,N$={},q2=($,U)=>{if(!N$[$]||(U===null||U===void 0?void 0:U.ignoreCache))N$[$]=C2($,"utf8");return N$[$]};aw.slurpFile=q2});var h$=M((R3,y0)=>{var{defineProperty:O1,getOwnPropertyDescriptor:N2,getOwnPropertyNames:j2}=Object,P2=Object.prototype.hasOwnProperty,y=($,U)=>O1($,"name",{value:U,configurable:!0}),S2=($,U)=>{for(var w in U)O1($,w,{get:U[w],enumerable:!0})},P$=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of j2(U))if(!P2.call($,G)&&G!==w)O1($,G,{get:()=>U[G],enumerable:!(W=N2(U,G))||W.enumerable})}return $},b$=($,U,w)=>(P$($,U,"default"),w&&P$(w,U,"default")),b2=($)=>P$(O1({},"__esModule",{value:!0}),$),u0={};S2(u0,{CONFIG_PREFIX_SEPARATOR:()=>X0,DEFAULT_PROFILE:()=>wG,ENV_PROFILE:()=>UG,getProfileName:()=>h2,loadSharedConfigFiles:()=>WG,loadSsoSessionData:()=>s2,parseKnownFiles:()=>m2});y0.exports=b2(u0);b$(u0,B0(),y0.exports);var UG="AWS_PROFILE",wG="default",h2=y(($)=>$.profile||process.env[UG]||wG,"getProfileName");b$(u0,q$(),y0.exports);b$(u0,ow(),y0.exports);var T1=A0(),D2=y(($)=>Object.entries($).filter(([U])=>{const w=U.indexOf(X0);if(w===-1)return!1;return Object.values(T1.IniSectionType).includes(U.substring(0,w))}).reduce((U,[w,W])=>{const G=w.indexOf(X0),L=w.substring(0,G)===T1.IniSectionType.PROFILE?w.substring(G+1):w;return U[L]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),A1=import.meta.require("path"),k2=B0(),c2="AWS_CONFIG_FILE",GG=y(()=>process.env[c2]||A1.join(k2.getHomeDir(),".aws","config"),"getConfigFilepath"),v2=B0(),x2="AWS_SHARED_CREDENTIALS_FILE",u2=y(()=>process.env[x2]||A1.join(v2.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),y2=B0(),_2=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,d2=["__proto__","profile __proto__"],S$=y(($)=>{const U={};let w,W;for(let G of $.split(/\r?\n/)){const L=G.split(/(^|\s)[;#]/)[0].trim();if(L[0]==="["&&L[L.length-1]==="]"){w=void 0,W=void 0;const F=L.substring(1,L.length-1),Z=_2.exec(F);if(Z){const[,E,,I]=Z;if(Object.values(T1.IniSectionType).includes(E))w=[E,I].join(X0)}else w=F;if(d2.includes(F))throw new Error(`Found invalid profile name "${F}"`)}else if(w){const F=L.indexOf("=");if(![0,-1].includes(F)){const[Z,E]=[L.substring(0,F).trim(),L.substring(F+1).trim()];if(E==="")W=Z;else{if(W&&G.trimStart()===G)W=void 0;U[w]=U[w]||{};const I=W?[W,Z].join(X0):Z;U[w][I]=E}}}}return U},"parseIni"),ew=j$(),$G=y(()=>({}),"swallowError"),X0=".",WG=y(async($={})=>{const{filepath:U=u2(),configFilepath:w=GG()}=$,W=y2.getHomeDir();let L=U;if(U.startsWith("~/"))L=A1.join(W,U.slice(2));let f=w;if(w.startsWith("~/"))f=A1.join(W,w.slice(2));const F=await Promise.all([ew.slurpFile(f,{ignoreCache:$.ignoreCache}).then(S$).then(D2).catch($G),ew.slurpFile(L,{ignoreCache:$.ignoreCache}).then(S$).catch($G)]);return{configFile:F[0],credentialsFile:F[1]}},"loadSharedConfigFiles"),g2=y(($)=>Object.entries($).filter(([U])=>U.startsWith(T1.IniSectionType.SSO_SESSION+X0)).reduce((U,[w,W])=>({...U,[w.substring(w.indexOf(X0)+1)]:W}),{}),"getSsoSessionData"),p2=j$(),l2=y(()=>({}),"swallowError"),s2=y(async($={})=>p2.slurpFile($.configFilepath??GG()).then(S$).then(g2).catch(l2),"loadSsoSessionData"),n2=y((...$)=>{const U={};for(let w of $)for(let[W,G]of Object.entries(w))if(U[W]!==void 0)Object.assign(U[W],G);else U[W]=G;return U},"mergeConfigFiles"),m2=y(async($)=>{const U=await WG($);return n2(U.configFile,U.credentialsFile)},"parseKnownFiles")});var ZG=M((Y3,FG)=>{function D$($){try{const U=new Set(Array.from($.match(/([A-Z_]){3,}/g)??[]));return U.delete("CONFIG"),U.delete("CONFIG_PREFIX_SEPARATOR"),U.delete("ENV"),[...U].join(", ")}catch(U){return $}}var{defineProperty:V1,getOwnPropertyDescriptor:i2,getOwnPropertyNames:r2}=Object,o2=Object.prototype.hasOwnProperty,H0=($,U)=>V1($,"name",{value:U,configurable:!0}),a2=($,U)=>{for(var w in U)V1($,w,{get:U[w],enumerable:!0})},t2=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of r2(U))if(!o2.call($,G)&&G!==w)V1($,G,{get:()=>U[G],enumerable:!(W=i2(U,G))||W.enumerable})}return $},e2=($)=>t2(V1({},"__esModule",{value:!0}),$),fG={};a2(fG,{loadConfig:()=>WZ});FG.exports=e2(fG);var _0=H$();H0(D$,"getSelectorName");var $Z=H0(($,U)=>async()=>{try{const w=$(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new _0.CredentialsProviderError(w.message||`Not found in ENV: ${D$($.toString())}`,{logger:U})}},"fromEnv"),LG=h$(),UZ=H0(($,{preferredFile:U="config",...w}={})=>async()=>{const W=LG.getProfileName(w),{configFile:G,credentialsFile:L}=await LG.loadSharedConfigFiles(w),f=L[W]||{},F=G[W]||{},Z=U==="config"?{...f,...F}:{...F,...f};try{const I=$(Z,U==="config"?G:L);if(I===void 0)throw new Error;return I}catch(E){throw new _0.CredentialsProviderError(E.message||`Not found in config files w/ profile [${W}]: ${D$($.toString())}`,{logger:w.logger})}},"fromSharedConfigFiles"),wZ=H0(($)=>typeof $==="function","isFunction"),GZ=H0(($)=>wZ($)?async()=>await $():_0.fromStatic($),"fromStatic"),WZ=H0(({environmentVariableSelector:$,configFileSelector:U,default:w},W={})=>_0.memoize(_0.chain($Z($),UZ(U,W),GZ(w))),"loadConfig")});var QG=M((RG)=>{Object.defineProperty(RG,"__esModule",{value:!0});RG.getEndpointUrlConfig=void 0;var EG=h$(),IG="AWS_ENDPOINT_URL",XG="endpoint_url",LZ=($)=>({environmentVariableSelector:(U)=>{const w=$.split(" ").map((L)=>L.toUpperCase()),W=U[[IG,...w].join("_")];if(W)return W;const G=U[IG];if(G)return G;return},configFileSelector:(U,w)=>{if(w&&U.services){const G=w[["services",U.services].join(EG.CONFIG_PREFIX_SEPARATOR)];if(G){const L=$.split(" ").map((F)=>F.toLowerCase()),f=G[[L.join("_"),XG].join(EG.CONFIG_PREFIX_SEPARATOR)];if(f)return f}}const W=U[XG];if(W)return W;return},default:void 0});RG.getEndpointUrlConfig=LZ});var KG=M((zG)=>{Object.defineProperty(zG,"__esModule",{value:!0});zG.getEndpointFromConfig=void 0;var fZ=ZG(),FZ=QG(),ZZ=async($)=>fZ.loadConfig(FZ.getEndpointUrlConfig($))();zG.getEndpointFromConfig=ZZ});var qG=M((J3,CG)=>{var{defineProperty:H1,getOwnPropertyDescriptor:EZ,getOwnPropertyNames:IZ}=Object,XZ=Object.prototype.hasOwnProperty,p=($,U)=>H1($,"name",{value:U,configurable:!0}),RZ=($,U)=>{for(var w in U)H1($,w,{get:U[w],enumerable:!0})},YZ=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of IZ(U))if(!XZ.call($,G)&&G!==w)H1($,G,{get:()=>U[G],enumerable:!(W=EZ(U,G))||W.enumerable})}return $},QZ=($)=>YZ(H1({},"__esModule",{value:!0}),$),AG={};RZ(AG,{endpointMiddleware:()=>BG,endpointMiddlewareOptions:()=>HG,getEndpointFromInstructions:()=>OG,getEndpointPlugin:()=>HZ,resolveEndpointConfig:()=>CZ,resolveParams:()=>VG,toEndpointV1:()=>k$});CG.exports=QZ(AG);var zZ=p(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(AZ(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!TZ(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),JZ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,KZ=/(\d+\.){3}\d+/,MZ=/\.\./,TZ=p(($)=>JZ.test($)&&!KZ.test($)&&!MZ.test($),"isDnsCompatibleBucketName"),AZ=p(($)=>{const[U,w,W,,,G]=$.split(":"),L=U==="arn"&&$.split(":").length>=6,f=Boolean(L&&w&&W&&G);if(L&&!f)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return f},"isArnBucketName"),OZ=p(($,U,w)=>{const W=p(async()=>{const G=w[$]??w[U];if(typeof G==="function")return G();return G},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const G=typeof w.credentials==="function"?await w.credentials():w.credentials;return(G==null?void 0:G.credentialScope)??(G==null?void 0:G.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const G=typeof w.credentials==="function"?await w.credentials():w.credentials;return(G==null?void 0:G.accountId)??(G==null?void 0:G.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const G=await W();if(G&&typeof G==="object"){if("url"in G)return G.url.href;if("hostname"in G){const{protocol:L,hostname:f,port:F,path:Z}=G;return`${L}//${f}${F?":"+F:""}${Z}`}}return G};return W},"createConfigValueProvider"),VZ=KG(),MG=TG(),k$=p(($)=>{if(typeof $==="object"){if("url"in $)return MG.parseUrl($.url);return $}return MG.parseUrl($)},"toEndpointV1"),OG=p(async($,U,w,W)=>{if(!w.endpoint){const f=await VZ.getEndpointFromConfig(w.serviceId||"");if(f)w.endpoint=()=>Promise.resolve(k$(f))}const G=await VG($,U,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider(G,W)},"getEndpointFromInstructions"),VG=p(async($,U,w)=>{var W;const G={},L=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[f,F]of Object.entries(L))switch(F.type){case"staticContextParams":G[f]=F.value;break;case"contextParams":G[f]=$[F.name];break;case"clientContextParams":case"builtInParams":G[f]=await OZ(F.name,f,w)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(F))}if(Object.keys(L).length===0)Object.assign(G,w);if(String(w.serviceId).toLowerCase()==="s3")await zZ(G);return G},"resolveParams"),B1=n(),BG=p(({config:$,instructions:U})=>{return(w,W)=>async(G)=>{var L,f,F;const Z=await OG(G.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=Z,W.authSchemes=(L=Z.properties)==null?void 0:L.authSchemes;const E=(f=W.authSchemes)==null?void 0:f[0];if(E){W.signing_region=E.signingRegion,W.signing_service=E.signingName;const I=B1.getSmithyContext(W),X=(F=I==null?void 0:I.selectedHttpAuthScheme)==null?void 0:F.httpAuthOption;if(X)X.signingProperties=Object.assign(X.signingProperties||{},{signing_region:E.signingRegion,signingRegion:E.signingRegion,signing_service:E.signingName,signingName:E.signingName,signingRegionSet:E.signingRegionSet},E.properties)}return w({...G})}},"endpointMiddleware"),BZ=J1(),HG={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:BZ.serializerMiddlewareOption.name},HZ=p(($,U)=>({applyToStack:(w)=>{w.addRelativeTo(BG({config:$,instructions:U}),HG)}}),"getEndpointPlugin"),CZ=p(($)=>{const U=$.tls??!0,{endpoint:w}=$,W=w!=null?async()=>k$(await B1.normalizeProvider(w)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!w,useDualstackEndpoint:B1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:B1.normalizeProvider($.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var a=M((K3,cG)=>{function hG($){return Object.keys($).reduce((U,w)=>{const W=$[w];return{...U,[w]:Array.isArray(W)?[...W]:W}},{})}function kG($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}var{defineProperty:C1,getOwnPropertyDescriptor:qZ,getOwnPropertyNames:NZ}=Object,jZ=Object.prototype.hasOwnProperty,G0=($,U)=>C1($,"name",{value:U,configurable:!0}),PZ=($,U)=>{for(var w in U)C1($,w,{get:U[w],enumerable:!0})},SZ=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of NZ(U))if(!jZ.call($,G)&&G!==w)C1($,G,{get:()=>U[G],enumerable:!(W=qZ(U,G))||W.enumerable})}return $},bZ=($)=>SZ(C1({},"__esModule",{value:!0}),$),NG={};PZ(NG,{Field:()=>kZ,Fields:()=>cZ,HttpRequest:()=>vZ,HttpResponse:()=>xZ,IHttpRequest:()=>jG.HttpRequest,getHttpHandlerExtensionConfiguration:()=>hZ,isValidHostname:()=>kG,resolveHttpHandlerRuntimeConfig:()=>DZ});cG.exports=bZ(NG);var hZ=G0(($)=>{let U=$.httpHandler;return{setHttpHandler(w){U=w},httpHandler(){return U},updateHttpClientConfig(w,W){U.updateHttpClientConfig(w,W)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),DZ=G0(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),jG=A0(),PG=class ${constructor({name:U,kind:w=jG.FieldPosition.HEADER,values:W=[]}){this.name=U,this.kind=w,this.values=W}add(U){this.values.push(U)}set(U){this.values=U}remove(U){this.values=this.values.filter((w)=>w!==U)}toString(){return this.values.map((U)=>U.includes(",")||U.includes(" ")?`"${U}"`:U).join(", ")}get(){return this.values}};G0(PG,"Field");var kZ=PG,SG=class ${constructor({fields:U=[],encoding:w="utf-8"}){this.entries={},U.forEach(this.setField.bind(this)),this.encoding=w}setField(U){this.entries[U.name.toLowerCase()]=U}getField(U){return this.entries[U.toLowerCase()]}removeField(U){delete this.entries[U.toLowerCase()]}getByType(U){return Object.values(this.entries).filter((w)=>w.kind===U)}};G0(SG,"Fields");var cZ=SG,bG=class ${constructor(U){this.method=U.method||"GET",this.hostname=U.hostname||"localhost",this.port=U.port,this.query=U.query||{},this.headers=U.headers||{},this.body=U.body,this.protocol=U.protocol?U.protocol.slice(-1)!==":"?`${U.protocol}:`:U.protocol:"https:",this.path=U.path?U.path.charAt(0)!=="/"?`/${U.path}`:U.path:"/",this.username=U.username,this.password=U.password,this.fragment=U.fragment}static clone(U){const w=new $({...U,headers:{...U.headers}});if(w.query)w.query=hG(w.query);return w}static isInstance(U){if(!U)return!1;const w=U;return"method"in w&&"protocol"in w&&"hostname"in w&&"path"in w&&typeof w.query==="object"&&typeof w.headers==="object"}clone(){return $.clone(this)}};G0(bG,"HttpRequest");var vZ=bG;G0(hG,"cloneQuery");var DG=class ${constructor(U){this.statusCode=U.statusCode,this.reason=U.reason,this.headers=U.headers||{},this.body=U.body}static isInstance(U){if(!U)return!1;const w=U;return typeof w.statusCode==="number"&&typeof w.headers==="object"}};G0(DG,"HttpResponse");var xZ=DG;G0(kG,"isValidHostname")});var c$=M((vG)=>{function yZ($){return $&&$.__esModule?$:{default:$}}function _Z(){if(q1>N1.length-16)uZ.default.randomFillSync(N1),q1=0;return N1.slice(q1,q1+=16)}Object.defineProperty(vG,"__esModule",{value:!0});vG.default=_Z;var uZ=yZ(import.meta.require("crypto")),N1=new Uint8Array(256),q1=N1.length});var yG=M((xG)=>{Object.defineProperty(xG,"__esModule",{value:!0});xG.default=void 0;var gZ=/^(?:[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;xG.default=gZ});var d0=M((_G)=>{function lZ($){return $&&$.__esModule?$:{default:$}}function sZ($){return typeof $==="string"&&pZ.default.test($)}Object.defineProperty(_G,"__esModule",{value:!0});_G.default=void 0;var pZ=lZ(yG()),nZ=sZ;_G.default=nZ});var g0=M((pG)=>{function iZ($){return $&&$.__esModule?$:{default:$}}function gG($,U=0){return h[$[U+0]]+h[$[U+1]]+h[$[U+2]]+h[$[U+3]]+"-"+h[$[U+4]]+h[$[U+5]]+"-"+h[$[U+6]]+h[$[U+7]]+"-"+h[$[U+8]]+h[$[U+9]]+"-"+h[$[U+10]]+h[$[U+11]]+h[$[U+12]]+h[$[U+13]]+h[$[U+14]]+h[$[U+15]]}function rZ($,U=0){const w=gG($,U);if(!mZ.default(w))throw TypeError("Stringified UUID is invalid");return w}Object.defineProperty(pG,"__esModule",{value:!0});pG.default=void 0;pG.unsafeStringify=gG;var mZ=iZ(d0()),h=[];for(let $=0;$<256;++$)h.push(($+256).toString(16).slice(1));var oZ=rZ;pG.default=oZ});var iG=M((nG)=>{function $E($){return $&&$.__esModule?$:{default:$}}function UE($,U,w){let W=U&&w||0;const G=U||new Array(16);$=$||{};let L=$.node||sG,f=$.clockseq!==void 0?$.clockseq:v$;if(L==null||f==null){const Y=$.random||($.rng||tZ.default)();if(L==null)L=sG=[Y[0]|1,Y[1],Y[2],Y[3],Y[4],Y[5]];if(f==null)f=v$=(Y[6]<<8|Y[7])&16383}let F=$.msecs!==void 0?$.msecs:Date.now(),Z=$.nsecs!==void 0?$.nsecs:u$+1;const E=F-x$+(Z-u$)/1e4;if(E<0&&$.clockseq===void 0)f=f+1&16383;if((E<0||F>x$)&&$.nsecs===void 0)Z=0;if(Z>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");x$=F,u$=Z,v$=f,F+=12219292800000;const I=((F&268435455)*1e4+Z)%4294967296;G[W++]=I>>>24&255,G[W++]=I>>>16&255,G[W++]=I>>>8&255,G[W++]=I&255;const X=F/4294967296*1e4&268435455;G[W++]=X>>>8&255,G[W++]=X&255,G[W++]=X>>>24&15|16,G[W++]=X>>>16&255,G[W++]=f>>>8|128,G[W++]=f&255;for(let Y=0;Y<6;++Y)G[W+Y]=L[Y];return U||eZ.unsafeStringify(G)}Object.defineProperty(nG,"__esModule",{value:!0});nG.default=void 0;var tZ=$E(c$()),eZ=g0(),sG,v$,x$=0,u$=0,wE=UE;nG.default=wE});var y$=M((rG)=>{function WE($){return $&&$.__esModule?$:{default:$}}function LE($){if(!GE.default($))throw TypeError("Invalid UUID");let U;const w=new Uint8Array(16);return w[0]=(U=parseInt($.slice(0,8),16))>>>24,w[1]=U>>>16&255,w[2]=U>>>8&255,w[3]=U&255,w[4]=(U=parseInt($.slice(9,13),16))>>>8,w[5]=U&255,w[6]=(U=parseInt($.slice(14,18),16))>>>8,w[7]=U&255,w[8]=(U=parseInt($.slice(19,23),16))>>>8,w[9]=U&255,w[10]=(U=parseInt($.slice(24,36),16))/1099511627776&255,w[11]=U/4294967296&255,w[12]=U>>>24&255,w[13]=U>>>16&255,w[14]=U>>>8&255,w[15]=U&255,w}Object.defineProperty(rG,"__esModule",{value:!0});rG.default=void 0;var GE=WE(d0()),fE=LE;rG.default=fE});var _$=M((eG)=>{function EE($){return $&&$.__esModule?$:{default:$}}function IE($){$=unescape(encodeURIComponent($));const U=[];for(let w=0;w<$.length;++w)U.push($.charCodeAt(w));return U}function XE($,U,w){function W(G,L,f,F){var Z;if(typeof G==="string")G=IE(G);if(typeof L==="string")L=ZE.default(L);if(((Z=L)===null||Z===void 0?void 0:Z.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let E=new Uint8Array(16+G.length);if(E.set(L),E.set(G,L.length),E=w(E),E[6]=E[6]&15|U,E[8]=E[8]&63|128,f){F=F||0;for(let I=0;I<16;++I)f[F+I]=E[I];return f}return FE.unsafeStringify(E)}try{W.name=$}catch(G){}return W.DNS=aG,W.URL=tG,W}Object.defineProperty(eG,"__esModule",{value:!0});eG.URL=eG.DNS=void 0;eG.default=XE;var FE=g0(),ZE=EE(y$()),aG="6ba7b810-9dad-11d1-80b4-00c04fd430c8";eG.DNS=aG;var tG="6ba7b811-9dad-11d1-80b4-00c04fd430c8";eG.URL=tG});var GW=M((UW)=>{function zE($){return $&&$.__esModule?$:{default:$}}function JE($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return QE.default.createHash("md5").update($).digest()}Object.defineProperty(UW,"__esModule",{value:!0});UW.default=void 0;var QE=zE(import.meta.require("crypto")),KE=JE;UW.default=KE});var FW=M((LW)=>{function WW($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(LW,"__esModule",{value:!0});LW.default=void 0;var ME=WW(_$()),TE=WW(GW()),AE=ME.default("v3",48,TE.default),OE=AE;LW.default=OE});var IW=M((ZW)=>{function BE($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(ZW,"__esModule",{value:!0});ZW.default=void 0;var VE=BE(import.meta.require("crypto")),HE={randomUUID:VE.default.randomUUID};ZW.default=HE});var zW=M((YW)=>{function RW($){return $&&$.__esModule?$:{default:$}}function NE($,U,w){if(XW.default.randomUUID&&!U&&!$)return XW.default.randomUUID();$=$||{};const W=$.random||($.rng||CE.default)();if(W[6]=W[6]&15|64,W[8]=W[8]&63|128,U){w=w||0;for(let G=0;G<16;++G)U[w+G]=W[G];return U}return qE.unsafeStringify(W)}Object.defineProperty(YW,"__esModule",{value:!0});YW.default=void 0;var XW=RW(IW()),CE=RW(c$()),qE=g0(),jE=NE;YW.default=jE});var MW=M((JW)=>{function SE($){return $&&$.__esModule?$:{default:$}}function bE($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return PE.default.createHash("sha1").update($).digest()}Object.defineProperty(JW,"__esModule",{value:!0});JW.default=void 0;var PE=SE(import.meta.require("crypto")),hE=bE;JW.default=hE});var VW=M((AW)=>{function TW($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(AW,"__esModule",{value:!0});AW.default=void 0;var DE=TW(_$()),kE=TW(MW()),cE=DE.default("v5",80,kE.default),vE=cE;AW.default=vE});var CW=M((BW)=>{Object.defineProperty(BW,"__esModule",{value:!0});BW.default=void 0;var xE="00000000-0000-0000-0000-000000000000";BW.default=xE});var jW=M((qW)=>{function yE($){return $&&$.__esModule?$:{default:$}}function _E($){if(!uE.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)}Object.defineProperty(qW,"__esModule",{value:!0});qW.default=void 0;var uE=yE(d0()),dE=_E;qW.default=dE});var d$=M((l)=>{function t($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(l,"__esModule",{value:!0});Object.defineProperty(l,"NIL",{enumerable:!0,get:function(){return nE.default}});Object.defineProperty(l,"parse",{enumerable:!0,get:function(){return oE.default}});Object.defineProperty(l,"stringify",{enumerable:!0,get:function(){return rE.default}});Object.defineProperty(l,"v1",{enumerable:!0,get:function(){return gE.default}});Object.defineProperty(l,"v3",{enumerable:!0,get:function(){return pE.default}});Object.defineProperty(l,"v4",{enumerable:!0,get:function(){return lE.default}});Object.defineProperty(l,"v5",{enumerable:!0,get:function(){return sE.default}});Object.defineProperty(l,"validate",{enumerable:!0,get:function(){return iE.default}});Object.defineProperty(l,"version",{enumerable:!0,get:function(){return mE.default}});var gE=t(iG()),pE=t(FW()),lE=t(zW()),sE=t(VW()),nE=t(CW()),mE=t(jW()),iE=t(d0()),rE=t(g0()),oE=t(y$())});var g$=M((k3,hW)=>{var{defineProperty:j1,getOwnPropertyDescriptor:aE,getOwnPropertyNames:tE}=Object,eE=Object.prototype.hasOwnProperty,C0=($,U)=>j1($,"name",{value:U,configurable:!0}),$I=($,U)=>{for(var w in U)j1($,w,{get:U[w],enumerable:!0})},UI=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of tE(U))if(!eE.call($,G)&&G!==w)j1($,G,{get:()=>U[G],enumerable:!(W=aE(U,G))||W.enumerable})}return $},wI=($)=>UI(j1({},"__esModule",{value:!0}),$),PW={};$I(PW,{isClockSkewCorrectedError:()=>SW,isClockSkewError:()=>EI,isRetryableByTrait:()=>ZI,isServerError:()=>XI,isThrottlingError:()=>II,isTransientError:()=>bW});hW.exports=wI(PW);var GI=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],WI=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],LI=["TimeoutError","RequestTimeout","RequestTimeoutException"],fI=[500,502,503,504],FI=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],ZI=C0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),EI=C0(($)=>GI.includes($.name),"isClockSkewError"),SW=C0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),II=C0(($)=>{var U,w;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||WI.includes($.name)||((w=$.$retryable)==null?void 0:w.throttling)==!0},"isThrottlingError"),bW=C0(($)=>{var U;return SW($)||LI.includes($.name)||FI.includes(($==null?void 0:$.code)||"")||fI.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),XI=C0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const w=$.$metadata.httpStatusCode;if(500<=w&&w<=599&&!bW($))return!0;return!1}return!1},"isServerError")});var nW=M((c3,sW)=>{var{defineProperty:P1,getOwnPropertyDescriptor:RI,getOwnPropertyNames:YI}=Object,QI=Object.prototype.hasOwnProperty,s=($,U)=>P1($,"name",{value:U,configurable:!0}),zI=($,U)=>{for(var w in U)P1($,w,{get:U[w],enumerable:!0})},JI=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of YI(U))if(!QI.call($,G)&&G!==w)P1($,G,{get:()=>U[G],enumerable:!(W=RI(U,G))||W.enumerable})}return $},KI=($)=>JI(P1({},"__esModule",{value:!0}),$),kW={};zI(kW,{AdaptiveRetryStrategy:()=>BI,ConfiguredRetryStrategy:()=>HI,DEFAULT_MAX_ATTEMPTS:()=>p$,DEFAULT_RETRY_DELAY_BASE:()=>p0,DEFAULT_RETRY_MODE:()=>MI,DefaultRateLimiter:()=>xW,INITIAL_RETRY_TOKENS:()=>l$,INVOCATION_ID_HEADER:()=>AI,MAXIMUM_RETRY_DELAY:()=>s$,NO_RETRY_INCREMENT:()=>dW,REQUEST_HEADER:()=>OI,RETRY_COST:()=>yW,RETRY_MODES:()=>cW,StandardRetryStrategy:()=>n$,THROTTLING_RETRY_DELAY_BASE:()=>uW,TIMEOUT_RETRY_COST:()=>_W});sW.exports=KI(kW);var cW=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(cW||{}),p$=3,MI="standard",TI=g$(),vW=class ${constructor(U){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(U==null?void 0:U.beta)??0.7,this.minCapacity=(U==null?void 0:U.minCapacity)??1,this.minFillRate=(U==null?void 0:U.minFillRate)??0.5,this.scaleConstant=(U==null?void 0:U.scaleConstant)??0.4,this.smooth=(U==null?void 0:U.smooth)??0.8;const 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(U){if(!this.enabled)return;if(this.refillTokenBucket(),U>this.currentCapacity){const w=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((W)=>setTimeout(W,w))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){const U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}const w=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+w),this.lastTimestamp=U}updateClientSendingRate(U){let w;if(this.updateMeasuredRate(),TI.isThrottlingError(U)){const G=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=G,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle(G),this.enableTokenBucket()}else this.calculateTimeWindow(),w=this.cubicSuccess(this.getCurrentTimeInSeconds());const W=Math.min(w,2*this.measuredTxRate);this.updateTokenBucketRate(W)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(U){return this.getPrecise(U*this.beta)}cubicSuccess(U){return this.getPrecise(this.scaleConstant*Math.pow(U-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(U){this.refillTokenBucket(),this.fillRate=Math.max(U,this.minFillRate),this.maxCapacity=Math.max(U,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const U=this.getCurrentTimeInSeconds(),w=Math.floor(U*2)/2;if(this.requestCount++,w>this.lastTxRateBucket){const W=this.requestCount/(w-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(W*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=w}}getPrecise(U){return parseFloat(U.toFixed(8))}};s(vW,"DefaultRateLimiter");var xW=vW,p0=100,s$=20000,uW=500,l$=500,yW=5,_W=10,dW=1,AI="amz-sdk-invocation-id",OI="amz-sdk-request",VI=s(()=>{let $=p0;return{computeNextBackoffDelay:s((W)=>{return Math.floor(Math.min(s$,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:s((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),DW=s(({retryDelay:$,retryCount:U,retryCost:w})=>{return{getRetryCount:s(()=>U,"getRetryCount"),getRetryDelay:s(()=>Math.min(s$,$),"getRetryDelay"),getRetryCost:s(()=>w,"getRetryCost")}},"createDefaultRetryToken"),gW=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=l$,this.retryBackoffStrategy=VI(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return DW({retryDelay:p0,retryCount:0})}async refreshRetryTokenForRetry(U,w){const W=await this.getMaxAttempts();if(this.shouldRetry(U,w,W)){const G=w.errorType;this.retryBackoffStrategy.setDelayBase(G==="THROTTLING"?uW:p0);const L=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),f=w.retryAfterHint?Math.max(w.retryAfterHint.getTime()-Date.now()||0,L):L,F=this.getCapacityCost(G);return this.capacity-=F,DW({retryDelay:f,retryCount:U.getRetryCount()+1,retryCost:F})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(l$,this.capacity+(U.getRetryCost()??dW))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(U){return console.warn(`Max attempts provider could not resolve. Using default of ${p$}`),p$}}shouldRetry(U,w,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(w.errorType)&&this.isRetryableError(w.errorType)}getCapacityCost(U){return U==="TRANSIENT"?_W:yW}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};s(gW,"StandardRetryStrategy");var n$=gW,pW=class ${constructor(U,w){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=w??{};this.rateLimiter=W??new xW,this.standardRetryStrategy=new n$(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,w){return this.rateLimiter.updateClientSendingRate(w),this.standardRetryStrategy.refreshRetryTokenForRetry(U,w)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};s(pW,"AdaptiveRetryStrategy");var BI=pW,lW=class $ extends n${constructor(U,w=p0){super(typeof U==="function"?U:async()=>U);if(typeof w==="number")this.computeNextBackoffDelay=()=>w;else this.computeNextBackoffDelay=w}async refreshRetryTokenForRetry(U,w){const W=await super.refreshRetryTokenForRetry(U,w);return W.getRetryDelay=()=>this.computeNextBackoffDelay(W.getRetryCount()),W}};s(lW,"ConfiguredRetryStrategy");var HI=lW});var aW=M((v3,oW)=>{var{defineProperty:S1,getOwnPropertyDescriptor:CI,getOwnPropertyNames:qI}=Object,NI=Object.prototype.hasOwnProperty,_=($,U)=>S1($,"name",{value:U,configurable:!0}),jI=($,U)=>{for(var w in U)S1($,w,{get:U[w],enumerable:!0})},PI=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of qI(U))if(!NI.call($,G)&&G!==w)S1($,G,{get:()=>U[G],enumerable:!(W=CI(U,G))||W.enumerable})}return $},SI=($)=>PI(S1({},"__esModule",{value:!0}),$),rW={};jI(rW,{constructStack:()=>m$});oW.exports=SI(rW);var R0=_(($,U)=>{const w=[];if($)w.push($);if(U)for(let W of U)w.push(W);return w},"getAllAliases"),W0=_(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),m$=_(()=>{let $=[],U=[],w=!1;const W=new Set,G=_((X)=>X.sort((Y,R)=>mW[R.step]-mW[Y.step]||iW[R.priority||"normal"]-iW[Y.priority||"normal"]),"sort"),L=_((X)=>{let Y=!1;const R=_((Q)=>{const A=R0(Q.name,Q.aliases);if(A.includes(X)){Y=!0;for(let K of A)W.delete(K);return!1}return!0},"filterCb");return $=$.filter(R),U=U.filter(R),Y},"removeByName"),f=_((X)=>{let Y=!1;const R=_((Q)=>{if(Q.middleware===X){Y=!0;for(let A of R0(Q.name,Q.aliases))W.delete(A);return!1}return!0},"filterCb");return $=$.filter(R),U=U.filter(R),Y},"removeByReference"),F=_((X)=>{var Y;return $.forEach((R)=>{X.add(R.middleware,{...R})}),U.forEach((R)=>{X.addRelativeTo(R.middleware,{...R})}),(Y=X.identifyOnResolve)==null||Y.call(X,I.identifyOnResolve()),X},"cloneTo"),Z=_((X)=>{const Y=[];return X.before.forEach((R)=>{if(R.before.length===0&&R.after.length===0)Y.push(R);else Y.push(...Z(R))}),Y.push(X),X.after.reverse().forEach((R)=>{if(R.before.length===0&&R.after.length===0)Y.push(R);else Y.push(...Z(R))}),Y},"expandRelativeMiddlewareList"),E=_((X=!1)=>{const Y=[],R=[],Q={};return $.forEach((K)=>{const z={...K,before:[],after:[]};for(let T of R0(z.name,z.aliases))Q[T]=z;Y.push(z)}),U.forEach((K)=>{const z={...K,before:[],after:[]};for(let T of R0(z.name,z.aliases))Q[T]=z;R.push(z)}),R.forEach((K)=>{if(K.toMiddleware){const z=Q[K.toMiddleware];if(z===void 0){if(X)return;throw new Error(`${K.toMiddleware} is not found when adding ${W0(K.name,K.aliases)} middleware ${K.relation} ${K.toMiddleware}`)}if(K.relation==="after")z.after.push(K);if(K.relation==="before")z.before.push(K)}}),G(Y).map(Z).reduce((K,z)=>{return K.push(...z),K},[])},"getMiddlewareList"),I={add:(X,Y={})=>{const{name:R,override:Q,aliases:A}=Y,K={step:"initialize",priority:"normal",middleware:X,...Y},z=R0(R,A);if(z.length>0){if(z.some((T)=>W.has(T))){if(!Q)throw new Error(`Duplicate middleware name '${W0(R,A)}'`);for(let T of z){const O=$.findIndex((B)=>{var $0;return B.name===T||(($0=B.aliases)==null?void 0:$0.some((E0)=>E0===T))});if(O===-1)continue;const V=$[O];if(V.step!==K.step||K.priority!==V.priority)throw new Error(`"${W0(V.name,V.aliases)}" middleware with ${V.priority} priority in ${V.step} step cannot be overridden by "${W0(R,A)}" middleware with ${K.priority} priority in ${K.step} step.`);$.splice(O,1)}}for(let T of z)W.add(T)}$.push(K)},addRelativeTo:(X,Y)=>{const{name:R,override:Q,aliases:A}=Y,K={middleware:X,...Y},z=R0(R,A);if(z.length>0){if(z.some((T)=>W.has(T))){if(!Q)throw new Error(`Duplicate middleware name '${W0(R,A)}'`);for(let T of z){const O=U.findIndex((B)=>{var $0;return B.name===T||(($0=B.aliases)==null?void 0:$0.some((E0)=>E0===T))});if(O===-1)continue;const V=U[O];if(V.toMiddleware!==K.toMiddleware||V.relation!==K.relation)throw new Error(`"${W0(V.name,V.aliases)}" middleware ${V.relation} "${V.toMiddleware}" middleware cannot be overridden by "${W0(R,A)}" middleware ${K.relation} "${K.toMiddleware}" middleware.`);U.splice(O,1)}}for(let T of z)W.add(T)}U.push(K)},clone:()=>F(m$()),use:(X)=>{X.applyToStack(I)},remove:(X)=>{if(typeof X==="string")return L(X);else return f(X)},removeByTag:(X)=>{let Y=!1;const R=_((Q)=>{const{tags:A,name:K,aliases:z}=Q;if(A&&A.includes(X)){const T=R0(K,z);for(let O of T)W.delete(O);return Y=!0,!1}return!0},"filterCb");return $=$.filter(R),U=U.filter(R),Y},concat:(X)=>{var Y;const R=F(m$());return R.use(X),R.identifyOnResolve(w||R.identifyOnResolve()||(((Y=X.identifyOnResolve)==null?void 0:Y.call(X))??!1)),R},applyToStack:F,identify:()=>{return E(!0).map((X)=>{const Y=X.step??X.relation+" "+X.toMiddleware;return W0(X.name,X.aliases)+" - "+Y})},identifyOnResolve(X){if(typeof X==="boolean")w=X;return w},resolve:(X,Y)=>{for(let R of E().map((Q)=>Q.middleware).reverse())X=R(X,Y);if(w)console.log(I.identify());return X}};return I},"constructStack"),mW={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},iW={high:3,normal:2,low:1}});var i$=M((x3,eW)=>{var{defineProperty:b1,getOwnPropertyDescriptor:bI,getOwnPropertyNames:hI}=Object,DI=Object.prototype.hasOwnProperty,kI=($,U)=>b1($,"name",{value:U,configurable:!0}),cI=($,U)=>{for(var w in U)b1($,w,{get:U[w],enumerable:!0})},vI=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of hI(U))if(!DI.call($,G)&&G!==w)b1($,G,{get:()=>U[G],enumerable:!(W=bI(U,G))||W.enumerable})}return $},xI=($)=>vI(b1({},"__esModule",{value:!0}),$),tW={};cI(tW,{isArrayBuffer:()=>uI});eW.exports=xI(tW);var uI=kI(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var l0=M((u3,w8)=>{var{defineProperty:h1,getOwnPropertyDescriptor:yI,getOwnPropertyNames:_I}=Object,dI=Object.prototype.hasOwnProperty,$8=($,U)=>h1($,"name",{value:U,configurable:!0}),gI=($,U)=>{for(var w in U)h1($,w,{get:U[w],enumerable:!0})},pI=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of _I(U))if(!dI.call($,G)&&G!==w)h1($,G,{get:()=>U[G],enumerable:!(W=yI(U,G))||W.enumerable})}return $},lI=($)=>pI(h1({},"__esModule",{value:!0}),$),U8={};gI(U8,{fromArrayBuffer:()=>nI,fromString:()=>mI});w8.exports=lI(U8);var sI=i$(),r$=import.meta.require("buffer"),nI=$8(($,U=0,w=$.byteLength-U)=>{if(!sI.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return r$.Buffer.from($,U,w)},"fromArrayBuffer"),mI=$8(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?r$.Buffer.from($,U):r$.Buffer.from($)},"fromString")});var L8=M((G8)=>{Object.defineProperty(G8,"__esModule",{value:!0});G8.fromBase64=void 0;var iI=l0(),rI=/^[A-Za-z0-9+/]*={0,2}$/,oI=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!rI.exec($))throw new TypeError("Invalid base64 string.");const U=iI.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};G8.fromBase64=oI});var L0=M((_3,E8)=>{var{defineProperty:D1,getOwnPropertyDescriptor:aI,getOwnPropertyNames:tI}=Object,eI=Object.prototype.hasOwnProperty,o$=($,U)=>D1($,"name",{value:U,configurable:!0}),$X=($,U)=>{for(var w in U)D1($,w,{get:U[w],enumerable:!0})},UX=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of tI(U))if(!eI.call($,G)&&G!==w)D1($,G,{get:()=>U[G],enumerable:!(W=aI(U,G))||W.enumerable})}return $},wX=($)=>UX(D1({},"__esModule",{value:!0}),$),f8={};$X(f8,{fromUtf8:()=>Z8,toUint8Array:()=>GX,toUtf8:()=>WX});E8.exports=wX(f8);var F8=l0(),Z8=o$(($)=>{const U=F8.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),GX=o$(($)=>{if(typeof $==="string")return Z8($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),WX=o$(($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return F8.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var R8=M((I8)=>{Object.defineProperty(I8,"__esModule",{value:!0});I8.toBase64=void 0;var LX=l0(),fX=L0(),FX=($)=>{let U;if(typeof $==="string")U=fX.fromUtf8($);else U=$;if(typeof U!=="object"||typeof U.byteOffset!=="number"||typeof U.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return LX.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};I8.toBase64=FX});var c1=M((g3,k1)=>{var{defineProperty:Y8,getOwnPropertyDescriptor:ZX,getOwnPropertyNames:EX}=Object,IX=Object.prototype.hasOwnProperty,a$=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of EX(U))if(!IX.call($,G)&&G!==w)Y8($,G,{get:()=>U[G],enumerable:!(W=ZX(U,G))||W.enumerable})}return $},Q8=($,U,w)=>(a$($,U,"default"),w&&a$(w,U,"default")),XX=($)=>a$(Y8({},"__esModule",{value:!0}),$),t$={};k1.exports=XX(t$);Q8(t$,L8(),k1.exports);Q8(t$,R8(),k1.exports)});var K8=M((z8)=>{Object.defineProperty(z8,"__esModule",{value:!0});z8.getAwsChunkedEncodingStream=void 0;var RX=import.meta.require("stream"),YX=($,U)=>{const{base64Encoder:w,bodyLengthChecker:W,checksumAlgorithmFn:G,checksumLocationName:L,streamHasher:f}=U,F=w!==void 0&&G!==void 0&&L!==void 0&&f!==void 0,Z=F?f(G,$):void 0,E=new RX.Readable({read:()=>{}});return $.on("data",(I)=>{const X=W(I)||0;E.push(`${X.toString(16)}\r\n`),E.push(I),E.push("\r\n")}),$.on("end",async()=>{if(E.push("0\r\n"),F){const I=w(await Z);E.push(`${L}:${I}\r\n`),E.push("\r\n")}E.push(null)}),E};z8.getAwsChunkedEncodingStream=YX});var $U=M((l3,A8)=>{var{defineProperty:v1,getOwnPropertyDescriptor:QX,getOwnPropertyNames:zX}=Object,JX=Object.prototype.hasOwnProperty,e$=($,U)=>v1($,"name",{value:U,configurable:!0}),KX=($,U)=>{for(var w in U)v1($,w,{get:U[w],enumerable:!0})},MX=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of zX(U))if(!JX.call($,G)&&G!==w)v1($,G,{get:()=>U[G],enumerable:!(W=QX(U,G))||W.enumerable})}return $},TX=($)=>MX(v1({},"__esModule",{value:!0}),$),M8={};KX(M8,{escapeUri:()=>T8,escapeUriPath:()=>OX});A8.exports=TX(M8);var T8=e$(($)=>encodeURIComponent($).replace(/[!'()*]/g,AX),"escapeUri"),AX=e$(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),OX=e$(($)=>$.split("/").map(T8).join("/"),"escapeUriPath")});var wU=M((s3,B8)=>{function V8($){const U=[];for(let w of Object.keys($).sort()){const W=$[w];if(w=UU.escapeUri(w),Array.isArray(W))for(let G=0,L=W.length;G<L;G++)U.push(`${w}=${UU.escapeUri(W[G])}`);else{let G=w;if(W||typeof W==="string")G+=`=${UU.escapeUri(W)}`;U.push(G)}}return U.join("&")}var{defineProperty:x1,getOwnPropertyDescriptor:VX,getOwnPropertyNames:BX}=Object,HX=Object.prototype.hasOwnProperty,CX=($,U)=>x1($,"name",{value:U,configurable:!0}),qX=($,U)=>{for(var w in U)x1($,w,{get:U[w],enumerable:!0})},NX=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of BX(U))if(!HX.call($,G)&&G!==w)x1($,G,{get:()=>U[G],enumerable:!(W=VX(U,G))||W.enumerable})}return $},jX=($)=>NX(x1({},"__esModule",{value:!0}),$),O8={};qX(O8,{buildQueryString:()=>V8});B8.exports=jX(O8);var UU=$U();CX(V8,"buildQueryString")});var _8=M((n3,y8)=>{async function LU($,U,w=H8){const W=U.headers??{},G=W.Expect||W.expect;let L=-1,f=!1;if(G==="100-continue")await Promise.race([new Promise((F)=>{L=Number(setTimeout(F,Math.max(H8,w)))}),new Promise((F)=>{$.on("continue",()=>{clearTimeout(L),F()}),$.on("error",()=>{f=!0,clearTimeout(L),F()})})]);if(!f)h8($,U.body)}function h8($,U){if(U instanceof b8.Readable){U.pipe($);return}if(U){if(Buffer.isBuffer(U)||typeof U==="string"){$.end(U);return}const w=U;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){$.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}$.end(Buffer.from(U));return}$.end()}async function u8($){const U=[],w=$.getReader();let W=!1,G=0;while(!W){const{done:F,value:Z}=await w.read();if(Z)U.push(Z),G+=Z.length;W=F}const L=new Uint8Array(G);let f=0;for(let F of U)L.set(F,f),f+=F.length;return L}var{create:PX,defineProperty:s0,getOwnPropertyDescriptor:SX,getOwnPropertyNames:bX,getPrototypeOf:hX}=Object,DX=Object.prototype.hasOwnProperty,j=($,U)=>s0($,"name",{value:U,configurable:!0}),kX=($,U)=>{for(var w in U)s0($,w,{get:U[w],enumerable:!0})},q8=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of bX(U))if(!DX.call($,G)&&G!==w)s0($,G,{get:()=>U[G],enumerable:!(W=SX(U,G))||W.enumerable})}return $},cX=($,U,w)=>(w=$!=null?PX(hX($)):{},q8(U||!$||!$.__esModule?s0(w,"default",{value:$,enumerable:!0}):w,$)),vX=($)=>q8(s0({},"__esModule",{value:!0}),$),N8={};kX(N8,{DEFAULT_REQUEST_TIMEOUT:()=>dX,NodeHttp2Handler:()=>nX,NodeHttpHandler:()=>gX,streamCollector:()=>iX});y8.exports=vX(N8);var j8=a(),P8=wU(),GU=import.meta.require("http"),WU=import.meta.require("https"),xX=["ECONNRESET","EPIPE","ETIMEDOUT"],S8=j(($)=>{const U={};for(let w of Object.keys($)){const W=$[w];U[w]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),uX=j(($,U,w=0)=>{if(!w)return;const W=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w);$.on("socket",(G)=>{if(G.connecting)G.on("connect",()=>{clearTimeout(W)});else clearTimeout(W)})},"setConnectionTimeout"),yX=j(($,{keepAlive:U,keepAliveMsecs:w})=>{if(U!==!0)return;$.on("socket",(W)=>{W.setKeepAlive(U,w||0)})},"setSocketKeepAlive"),_X=j(($,U,w=0)=>{$.setTimeout(w,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),b8=import.meta.require("stream"),H8=1000;j(LU,"writeRequestBody");j(h8,"writeBody");var dX=0,D8=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((w,W)=>{if(typeof U==="function")U().then((G)=>{w(this.resolveDefaultConfig(G))}).catch(W);else w(this.resolveDefaultConfig(U))})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}static checkSocketUsage(U,w,W=console){var G,L,f;const{sockets:F,requests:Z,maxSockets:E}=U;if(typeof E!=="number"||E===1/0)return w;const I=15000;if(Date.now()-I<w)return w;if(F&&Z)for(let X in F){const Y=((G=F[X])==null?void 0:G.length)??0,R=((L=Z[X])==null?void 0:L.length)??0;if(Y>=E&&R>=2*E)return(f=W==null?void 0:W.warn)==null||f.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${Y} and ${R} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return w}resolveDefaultConfig(U){const{requestTimeout:w,connectionTimeout:W,socketTimeout:G,httpAgent:L,httpsAgent:f}=U||{};return{connectionTimeout:W,requestTimeout:w??G,httpAgent:(()=>{if(L instanceof GU.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new GU.Agent({keepAlive:!0,maxSockets:50,...L})})(),httpsAgent:(()=>{if(f instanceof WU.Agent||typeof(f==null?void 0:f.destroy)==="function")return f;return new WU.Agent({keepAlive:!0,maxSockets:50,...f})})(),logger:console}}destroy(){var U,w,W,G;(w=(U=this.config)==null?void 0:U.httpAgent)==null||w.destroy(),(G=(W=this.config)==null?void 0:W.httpsAgent)==null||G.destroy()}async handle(U,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;let W;return new Promise((G,L)=>{let f=void 0;const F=j(async(T)=>{await f,clearTimeout(W),G(T)},"resolve"),Z=j(async(T)=>{await f,clearTimeout(W),L(T)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(w==null?void 0:w.aborted){const T=new Error("Request aborted");T.name="AbortError",Z(T);return}const E=U.protocol==="https:",I=E?this.config.httpsAgent:this.config.httpAgent;W=setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(I,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const X=P8.buildQueryString(U.query||{});let Y=void 0;if(U.username!=null||U.password!=null){const T=U.username??"",O=U.password??"";Y=`${T}:${O}`}let R=U.path;if(X)R+=`?${X}`;if(U.fragment)R+=`#${U.fragment}`;const Q={headers:U.headers,host:U.hostname,method:U.method,path:R,port:U.port,agent:I,auth:Y},K=(E?WU.request:GU.request)(Q,(T)=>{const O=new j8.HttpResponse({statusCode:T.statusCode||-1,reason:T.statusMessage,headers:S8(T.headers),body:T});F({response:O})});if(K.on("error",(T)=>{if(xX.includes(T.code))Z(Object.assign(T,{name:"TimeoutError"}));else Z(T)}),uX(K,Z,this.config.connectionTimeout),_X(K,Z,this.config.requestTimeout),w){const T=j(()=>{K.destroy();const O=new Error("Request aborted");O.name="AbortError",Z(O)},"onAbort");if(typeof w.addEventListener==="function"){const O=w;O.addEventListener("abort",T,{once:!0}),K.once("close",()=>O.removeEventListener("abort",T))}else w.onabort=T}const z=Q.agent;if(typeof z==="object"&&"keepAlive"in z)yX(K,{keepAlive:z.keepAlive,keepAliveMsecs:z.keepAliveMsecs});f=LU(K,U,this.config.requestTimeout).catch((T)=>{return clearTimeout(W),L(T)})})}updateHttpClientConfig(U,w){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:w}})}httpHandlerConfigs(){return this.config??{}}};j(D8,"NodeHttpHandler");var gX=D8,C8=import.meta.require("http2"),pX=cX(import.meta.require("http2")),k8=class ${constructor(U){this.sessions=[],this.sessions=U??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(U){this.sessions.push(U)}contains(U){return this.sessions.includes(U)}remove(U){this.sessions=this.sessions.filter((w)=>w!==U)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(U){for(let w of this.sessions)if(w===U){if(!w.destroyed)w.destroy()}}};j(k8,"NodeHttp2ConnectionPool");var lX=k8,c8=class ${constructor(U){if(this.sessionCache=new Map,this.config=U,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(U,w){const W=this.getUrlString(U),G=this.sessionCache.get(W);if(G){const Z=G.poll();if(Z&&!this.config.disableConcurrency)return Z}const L=pX.default.connect(W);if(this.config.maxConcurrency)L.settings({maxConcurrentStreams:this.config.maxConcurrency},(Z)=>{if(Z)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});L.unref();const f=j(()=>{L.destroy(),this.deleteSession(W,L)},"destroySessionCb");if(L.on("goaway",f),L.on("error",f),L.on("frameError",f),L.on("close",()=>this.deleteSession(W,L)),w.requestTimeout)L.setTimeout(w.requestTimeout,f);const F=this.sessionCache.get(W)||new lX;return F.offerLast(L),this.sessionCache.set(W,F),L}deleteSession(U,w){const W=this.sessionCache.get(U);if(!W)return;if(!W.contains(w))return;W.remove(w),this.sessionCache.set(U,W)}release(U,w){var W;const G=this.getUrlString(U);(W=this.sessionCache.get(G))==null||W.offerLast(w)}destroy(){for(let[U,w]of this.sessionCache){for(let W of w){if(!W.destroyed)W.destroy();w.remove(W)}this.sessionCache.delete(U)}}setMaxConcurrentStreams(U){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=U}setDisableConcurrentStreams(U){this.config.disableConcurrency=U}getUrlString(U){return U.destination.toString()}};j(c8,"NodeHttp2ConnectionManager");var sX=c8,v8=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new sX({}),this.configProvider=new Promise((w,W)=>{if(typeof U==="function")U().then((G)=>{w(G||{})}).catch(W);else w(U||{})})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}destroy(){this.connectionManager.destroy()}async handle(U,{abortSignal:w}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:W,disableConcurrentStreams:G}=this.config;return new Promise((L,f)=>{var F;let Z=!1,E=void 0;const I=j(async(N)=>{await E,L(N)},"resolve"),X=j(async(N)=>{await E,f(N)},"reject");if(w==null?void 0:w.aborted){Z=!0;const N=new Error("Request aborted");N.name="AbortError",X(N);return}const{hostname:Y,method:R,port:Q,protocol:A,query:K}=U;let z="";if(U.username!=null||U.password!=null){const N=U.username??"",g=U.password??"";z=`${N}:${g}@`}const T=`${A}//${z}${Y}${Q?`:${Q}`:""}`,O={destination:new URL(T)},V=this.connectionManager.lease(O,{requestTimeout:(F=this.config)==null?void 0:F.sessionTimeout,disableConcurrentStreams:G||!1}),B=j((N)=>{if(G)this.destroySession(V);Z=!0,X(N)},"rejectWithDestroy"),$0=P8.buildQueryString(K||{});let E0=U.path;if($0)E0+=`?${$0}`;if(U.fragment)E0+=`#${U.fragment}`;const v=V.request({...U.headers,[C8.constants.HTTP2_HEADER_PATH]:E0,[C8.constants.HTTP2_HEADER_METHOD]:R});if(V.ref(),v.on("response",(N)=>{const g=new j8.HttpResponse({statusCode:N[":status"]||-1,headers:S8(N),body:v});if(Z=!0,I({response:g}),G)V.close(),this.connectionManager.deleteSession(T,V)}),W)v.setTimeout(W,()=>{v.close();const N=new Error(`Stream timed out because of no activity for ${W} ms`);N.name="TimeoutError",B(N)});if(w){const N=j(()=>{v.close();const g=new Error("Request aborted");g.name="AbortError",B(g)},"onAbort");if(typeof w.addEventListener==="function"){const g=w;g.addEventListener("abort",N,{once:!0}),v.once("close",()=>g.removeEventListener("abort",N))}else w.onabort=N}v.on("frameError",(N,g,KF)=>{B(new Error(`Frame type id ${N} in stream id ${KF} has failed with code ${g}.`))}),v.on("error",B),v.on("aborted",()=>{B(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${v.rstCode}.`))}),v.on("close",()=>{if(V.unref(),G)V.destroy();if(!Z)B(new Error("Unexpected error: http2 request did not get a response"))}),E=LU(v,U,W)})}updateHttpClientConfig(U,w){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:w}})}httpHandlerConfigs(){return this.config??{}}destroySession(U){if(!U.destroyed)U.destroy()}};j(v8,"NodeHttp2Handler");var nX=v8,x8=class $ extends b8.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,w,W){this.bufferedBytes.push(U),W()}};j(x8,"Collector");var mX=x8,iX=j(($)=>{if(rX($))return u8($);return new Promise((U,w)=>{const W=new mX;$.pipe(W),$.on("error",(G)=>{W.end(),w(G)}),W.on("error",w),W.on("finish",function(){const G=new Uint8Array(Buffer.concat(this.bufferedBytes));U(G)})})},"streamCollector"),rX=j(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");j(u8,"collectReadableStream")});var r8=M((m3,i8)=>{function p8($=0){return new Promise((U,w)=>{if($)setTimeout(()=>{const W=new Error(`Request did not complete within ${$} ms`);W.name="TimeoutError",w(W)},$)})}async function s8($){const U=await m8($),w=WR.fromBase64(U);return new Uint8Array(w)}async function n8($){const U=[],w=$.getReader();let W=!1,G=0;while(!W){const{done:F,value:Z}=await w.read();if(Z)U.push(Z),G+=Z.length;W=F}const L=new Uint8Array(G);let f=0;for(let F of U)L.set(F,f),f+=F.length;return L}function m8($){return new Promise((U,w)=>{const W=new FileReader;W.onloadend=()=>{if(W.readyState!==2)return w(new Error("Reader aborted too early"));const G=W.result??"",L=G.indexOf(","),f=L>-1?L+1:G.length;U(G.substring(f))},W.onabort=()=>w(new Error("Read aborted")),W.onerror=()=>w(W.error),W.readAsDataURL($)})}var{defineProperty:y1,getOwnPropertyDescriptor:oX,getOwnPropertyNames:aX}=Object,tX=Object.prototype.hasOwnProperty,e=($,U)=>y1($,"name",{value:U,configurable:!0}),eX=($,U)=>{for(var w in U)y1($,w,{get:U[w],enumerable:!0})},$R=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of aX(U))if(!tX.call($,G)&&G!==w)y1($,G,{get:()=>U[G],enumerable:!(W=oX(U,G))||W.enumerable})}return $},UR=($)=>$R(y1({},"__esModule",{value:!0}),$),g8={};eX(g8,{FetchHttpHandler:()=>GR,keepAliveSupport:()=>u1,streamCollector:()=>LR});i8.exports=UR(g8);var d8=a(),wR=wU();e(p8,"requestTimeout");var u1={supported:void 0},l8=class ${static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}constructor(U){if(typeof U==="function")this.configProvider=U().then((w)=>w||{});else this.config=U??{},this.configProvider=Promise.resolve(this.config);if(u1.supported===void 0)u1.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(U,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;const W=this.config.requestTimeout,G=this.config.keepAlive===!0,L=this.config.credentials;if(w==null?void 0:w.aborted){const z=new Error("Request aborted");return z.name="AbortError",Promise.reject(z)}let f=U.path;const F=wR.buildQueryString(U.query||{});if(F)f+=`?${F}`;if(U.fragment)f+=`#${U.fragment}`;let Z="";if(U.username!=null||U.password!=null){const z=U.username??"",T=U.password??"";Z=`${z}:${T}@`}const{port:E,method:I}=U,X=`${U.protocol}//${Z}${U.hostname}${E?`:${E}`:""}${f}`,Y=I==="GET"||I==="HEAD"?void 0:U.body,R={body:Y,headers:new Headers(U.headers),method:I,credentials:L};if(Y)R.duplex="half";if(typeof AbortController!=="undefined")R.signal=w;if(u1.supported)R.keepalive=G;let Q=e(()=>{},"removeSignalEventListener");const A=new Request(X,R),K=[fetch(A).then((z)=>{const T=z.headers,O={};for(let B of T.entries())O[B[0]]=B[1];if(z.body==null)return z.blob().then((B)=>({response:new d8.HttpResponse({headers:O,reason:z.statusText,statusCode:z.status,body:B})}));return{response:new d8.HttpResponse({headers:O,reason:z.statusText,statusCode:z.status,body:z.body})}}),p8(W)];if(w)K.push(new Promise((z,T)=>{const O=e(()=>{const V=new Error("Request aborted");V.name="AbortError",T(V)},"onAbort");if(typeof w.addEventListener==="function"){const V=w;V.addEventListener("abort",O,{once:!0}),Q=e(()=>V.removeEventListener("abort",O),"removeSignalEventListener")}else w.onabort=O}));return Promise.race(K).finally(Q)}updateHttpClientConfig(U,w){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return W[U]=w,W})}httpHandlerConfigs(){return this.config??{}}};e(l8,"FetchHttpHandler");var GR=l8,WR=c1(),LR=e(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return s8($);return n8($)},"streamCollector");e(s8,"collectBlob");e(n8,"collectStream");e(m8,"readToBase64")});var FU=M((i3,U4)=>{function e8($){if($.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const U=new Uint8Array($.length/2);for(let w=0;w<$.length;w+=2){const W=$.slice(w,w+2).toLowerCase();if(W in fU)U[w/2]=fU[W];else throw new Error(`Cannot decode unrecognized sequence ${W} as hexadecimal`)}return U}function $4($){let U="";for(let w=0;w<$.byteLength;w++)U+=t8[$[w]];return U}var{defineProperty:_1,getOwnPropertyDescriptor:fR,getOwnPropertyNames:FR}=Object,ZR=Object.prototype.hasOwnProperty,o8=($,U)=>_1($,"name",{value:U,configurable:!0}),ER=($,U)=>{for(var w in U)_1($,w,{get:U[w],enumerable:!0})},IR=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of FR(U))if(!ZR.call($,G)&&G!==w)_1($,G,{get:()=>U[G],enumerable:!(W=fR(U,G))||W.enumerable})}return $},XR=($)=>IR(_1({},"__esModule",{value:!0}),$),a8={};ER(a8,{fromHex:()=>e8,toHex:()=>$4});U4.exports=XR(a8);var t8={},fU={};for(let $=0;$<256;$++){let U=$.toString(16).toLowerCase();if(U.length===1)U=`0${U}`;t8[$]=U,fU[U]=$}o8(e8,"fromHex");o8($4,"toHex")});var n0=M((w4)=>{Object.defineProperty(w4,"__esModule",{value:!0});w4.isReadableStream=void 0;var RR=($)=>{var U;return typeof ReadableStream==="function"&&(((U=$===null||$===void 0?void 0:$.constructor)===null||U===void 0?void 0:U.name)===ReadableStream.name||$ instanceof ReadableStream)};w4.isReadableStream=RR});var E4=M((F4)=>{Object.defineProperty(F4,"__esModule",{value:!0});F4.sdkStreamMixin=void 0;var YR=r8(),QR=c1(),zR=FU(),JR=L0(),W4=n0(),L4="The stream has already been transformed.",KR=($)=>{var U,w;if(!f4($)&&!W4.isReadableStream($)){const f=((w=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||w===void 0?void 0:w.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${f}`)}let W=!1;const G=async()=>{if(W)throw new Error(L4);return W=!0,await YR.streamCollector($)},L=(f)=>{if(typeof f.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return f.stream()};return Object.assign($,{transformToByteArray:G,transformToString:async(f)=>{const F=await G();if(f==="base64")return QR.toBase64(F);else if(f==="hex")return zR.toHex(F);else if(f===void 0||f==="utf8"||f==="utf-8")return JR.toUtf8(F);else if(typeof TextDecoder==="function")return new TextDecoder(f).decode(F);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(L4);if(W=!0,f4($))return L($);else if(W4.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};F4.sdkStreamMixin=KR;var f4=($)=>typeof Blob==="function"&&$ instanceof Blob});var Y4=M((X4)=>{Object.defineProperty(X4,"__esModule",{value:!0});X4.sdkStreamMixin=void 0;var MR=_8(),TR=l0(),ZU=import.meta.require("stream"),AR=import.meta.require("util"),OR=E4(),I4="The stream has already been transformed.",VR=($)=>{var U,w;if(!($ instanceof ZU.Readable))try{return OR.sdkStreamMixin($)}catch(L){const f=((w=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||w===void 0?void 0:w.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${f}`)}let W=!1;const G=async()=>{if(W)throw new Error(I4);return W=!0,await MR.streamCollector($)};return Object.assign($,{transformToByteArray:G,transformToString:async(L)=>{const f=await G();if(L===void 0||Buffer.isEncoding(L))return TR.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength).toString(L);else return new AR.TextDecoder(L).decode(f)},transformToWebStream:()=>{if(W)throw new Error(I4);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof ZU.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return W=!0,ZU.Readable.toWeb($)}})};X4.sdkStreamMixin=VR});var J4=M((Q4)=>{async function BR($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(Q4,"__esModule",{value:!0});Q4.splitStream=void 0;Q4.splitStream=BR});var A4=M((M4)=>{async function qR($){if(CR.isReadableStream($))return HR.splitStream($);const U=new K4.PassThrough,w=new K4.PassThrough;return $.pipe(U),$.pipe(w),[U,w]}Object.defineProperty(M4,"__esModule",{value:!0});M4.splitStream=void 0;var K4=import.meta.require("stream"),HR=J4(),CR=n0();M4.splitStream=qR});var B4=M((O4)=>{async function NR($,U){var w;let W=0;const G=[],L=$.getReader();let f=!1;while(!f){const{done:E,value:I}=await L.read();if(I)G.push(I),W+=(w=I===null||I===void 0?void 0:I.byteLength)!==null&&w!==void 0?w:0;if(W>=U)break;f=E}L.releaseLock();const F=new Uint8Array(Math.min(U,W));let Z=0;for(let E of G){if(E.byteLength>F.byteLength-Z){F.set(E.subarray(0,F.byteLength-Z),Z);break}else F.set(E,Z);Z+=E.length}return F}Object.defineProperty(O4,"__esModule",{value:!0});O4.headStream=void 0;O4.headStream=NR});var N4=M((C4)=>{Object.defineProperty(C4,"__esModule",{value:!0});C4.headStream=void 0;var jR=import.meta.require("stream"),PR=B4(),SR=n0(),bR=($,U)=>{if(SR.isReadableStream($))return PR.headStream($,U);return new Promise((w,W)=>{const G=new H4;G.limit=U,$.pipe(G),$.on("error",(L)=>{G.end(),W(L)}),G.on("error",W),G.on("finish",function(){const L=new Uint8Array(Buffer.concat(this.buffers));w(L)})})};C4.headStream=bR;class H4 extends jR.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write($,U,w){var W;if(this.buffers.push($),this.bytesBuffered+=(W=$.byteLength)!==null&&W!==void 0?W:0,this.bytesBuffered>=this.limit){const G=this.bytesBuffered-this.limit,L=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=L.subarray(0,L.byteLength-G),this.emit("finish")}w()}}});var D4=M((wT,Q0)=>{function S4($,U="utf-8"){if(U==="base64")return j4.toBase64($);return P4.toUtf8($)}function b4($,U){if(U==="base64")return IU.mutate(j4.fromBase64($));return IU.mutate(P4.fromUtf8($))}var{defineProperty:d1,getOwnPropertyDescriptor:hR,getOwnPropertyNames:DR}=Object,kR=Object.prototype.hasOwnProperty,XU=($,U)=>d1($,"name",{value:U,configurable:!0}),cR=($,U)=>{for(var w in U)d1($,w,{get:U[w],enumerable:!0})},EU=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of DR(U))if(!kR.call($,G)&&G!==w)d1($,G,{get:()=>U[G],enumerable:!(W=hR(U,G))||W.enumerable})}return $},m0=($,U,w)=>(EU($,U,"default"),w&&EU(w,U,"default")),vR=($)=>EU(d1({},"__esModule",{value:!0}),$),Y0={};cR(Y0,{Uint8ArrayBlobAdapter:()=>IU});Q0.exports=vR(Y0);var j4=c1(),P4=L0();XU(S4,"transformToString");XU(b4,"transformFromString");var h4=class $ extends Uint8Array{static fromString(U,w="utf-8"){switch(typeof U){case"string":return b4(U,w);default:throw new Error(`Unsupported conversion from ${typeof U} to Uint8ArrayBlobAdapter.`)}}static mutate(U){return Object.setPrototypeOf(U,$.prototype),U}transformToString(U="utf-8"){return S4(this,U)}};XU(h4,"Uint8ArrayBlobAdapter");var IU=h4;m0(Y0,K8(),Q0.exports);m0(Y0,Y4(),Q0.exports);m0(Y0,A4(),Q0.exports);m0(Y0,N4(),Q0.exports);m0(Y0,n0(),Q0.exports)});var P0=M((GT,w6)=>{function m4($){const U=$.getUTCFullYear(),w=$.getUTCMonth(),W=$.getUTCDay(),G=$.getUTCDate(),L=$.getUTCHours(),f=$.getUTCMinutes(),F=$.getUTCSeconds(),Z=G<10?`0${G}`:`${G}`,E=L<10?`0${L}`:`${L}`,I=f<10?`0${f}`:`${f}`,X=F<10?`0${F}`:`${F}`;return`${I5[W]}, ${Z} ${VU[w]} ${U} ${E}:${I}:${X} GMT`}function l1($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})}function BU($,U,w){let W,G,L;if(typeof U==="undefined"&&typeof w==="undefined")W={},L=$;else if(W=$,typeof U==="function")return G=U,L=w,p5(W,G,L);else L=U;for(let f of Object.keys(L)){if(!Array.isArray(L[f])){W[f]=L[f];continue}$6(W,null,L,f)}return W}function U6($,U,w){if(w<=0||!Number.isInteger(w))throw new Error("Invalid number of delimiters ("+w+") for splitEvery.");const W=$.split(U);if(w===1)return W;const G=[];let L="";for(let f=0;f<W.length;f++){if(L==="")L=W[f];else L+=U+W[f];if((f+1)%w===0)G.push(L),L=""}if(L!=="")G.push(L);return G}var{defineProperty:s1,getOwnPropertyDescriptor:xR,getOwnPropertyNames:uR}=Object,yR=Object.prototype.hasOwnProperty,J=($,U)=>s1($,"name",{value:U,configurable:!0}),_R=($,U)=>{for(var w in U)s1($,w,{get:U[w],enumerable:!0})},dR=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of uR(U))if(!yR.call($,G)&&G!==w)s1($,G,{get:()=>U[G],enumerable:!(W=xR(U,G))||W.enumerable})}return $},gR=($)=>dR(s1({},"__esModule",{value:!0}),$),c4={};_R(c4,{Client:()=>lR,Command:()=>_4,LazyJsonString:()=>_5,NoOpLogger:()=>pR,SENSITIVE_STRING:()=>mR,ServiceException:()=>j5,StringWrapper:()=>t0,_json:()=>MU,collectBody:()=>sR,convertMap:()=>d5,createAggregatedClient:()=>iR,dateToUtcString:()=>m4,decorateServiceException:()=>r4,emitWarningIfUnsupportedVersion:()=>h5,expectBoolean:()=>oR,expectByte:()=>KU,expectFloat32:()=>g1,expectInt:()=>tR,expectInt32:()=>zU,expectLong:()=>o0,expectNonNull:()=>$5,expectNumber:()=>r0,expectObject:()=>g4,expectShort:()=>JU,expectString:()=>U5,expectUnion:()=>w5,extendedEncodeURIComponent:()=>l1,getArrayIfSingleItem:()=>y5,getDefaultClientConfiguration:()=>x5,getDefaultExtensionConfiguration:()=>a4,getValueFromTextNode:()=>t4,handleFloat:()=>L5,limitedParseDouble:()=>OU,limitedParseFloat:()=>f5,limitedParseFloat32:()=>F5,loadConfigsForDefaultMode:()=>b5,logger:()=>a0,map:()=>BU,parseBoolean:()=>rR,parseEpochTimestamp:()=>T5,parseRfc3339DateTime:()=>R5,parseRfc3339DateTimeWithOffset:()=>Q5,parseRfc7231DateTime:()=>M5,resolveDefaultRuntimeConfig:()=>u5,resolvedPath:()=>n5,serializeDateTime:()=>i5,serializeFloat:()=>m5,splitEvery:()=>U6,strictParseByte:()=>n4,strictParseDouble:()=>AU,strictParseFloat:()=>G5,strictParseFloat32:()=>p4,strictParseInt:()=>Z5,strictParseInt32:()=>E5,strictParseLong:()=>s4,strictParseShort:()=>q0,take:()=>g5,throwDefaultError:()=>o4,withBaseException:()=>P5});w6.exports=gR(c4);var v4=class ${trace(){}debug(){}info(){}warn(){}error(){}};J(v4,"NoOpLogger");var pR=v4,x4=aW(),u4=class ${constructor(U){this.middlewareStack=x4.constructStack(),this.config=U}send(U,w,W){const G=typeof w!=="function"?w:void 0,L=typeof w==="function"?w:W,f=U.resolveMiddleware(this.middlewareStack,this.config,G);if(L)f(U).then((F)=>L(null,F.output),(F)=>L(F)).catch(()=>{});else return f(U).then((F)=>F.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};J(u4,"Client");var lR=u4,RU=D4(),sR=J(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return RU.Uint8ArrayBlobAdapter.mutate($);if(!$)return RU.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const w=U.streamCollector($);return RU.Uint8ArrayBlobAdapter.mutate(await w)},"collectBody"),QU=A0(),y4=class ${constructor(){this.middlewareStack=x4.constructStack()}static classBuilder(){return new nR}resolveMiddlewareWithContext(U,w,W,{middlewareFn:G,clientName:L,commandName:f,inputFilterSensitiveLog:F,outputFilterSensitiveLog:Z,smithyContext:E,additionalContext:I,CommandCtor:X}){for(let K of G.bind(this)(X,U,w,W))this.middlewareStack.use(K);const Y=U.concat(this.middlewareStack),{logger:R}=w,Q={logger:R,clientName:L,commandName:f,inputFilterSensitiveLog:F,outputFilterSensitiveLog:Z,[QU.SMITHY_CONTEXT_KEY]:{commandInstance:this,...E},...I},{requestHandler:A}=w;return Y.resolve((K)=>A.handle(K.request,W||{}),Q)}};J(y4,"Command");var _4=y4,d4=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(U)=>U,this._outputFilterSensitiveLog=(U)=>U,this._serializer=null,this._deserializer=null}init(U){this._init=U}ep(U){return this._ep=U,this}m(U){return this._middlewareFn=U,this}s(U,w,W={}){return this._smithyContext={service:U,operation:w,...W},this}c(U={}){return this._additionalContext=U,this}n(U,w){return this._clientName=U,this._commandName=w,this}f(U=(W)=>W,w=(W)=>W){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=w,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;const w=this;let W;return W=(U=class extends _4{constructor(...[G]){super();this.serialize=w._serializer,this.deserialize=w._deserializer,this.input=G??{},w._init(this)}static getEndpointParameterInstructions(){return w._ep}resolveMiddleware(G,L,f){return this.resolveMiddlewareWithContext(G,L,f,{CommandCtor:W,middlewareFn:w._middlewareFn,clientName:w._clientName,commandName:w._commandName,inputFilterSensitiveLog:w._inputFilterSensitiveLog,outputFilterSensitiveLog:w._outputFilterSensitiveLog,smithyContext:w._smithyContext,additionalContext:w._additionalContext})}},J(U,"CommandRef"),U)}};J(d4,"ClassBuilder");var nR=d4,mR="***SensitiveInformation***",iR=J(($,U)=>{for(let w of Object.keys($)){const W=$[w],G=J(async function(f,F,Z){const E=new W(f);if(typeof F==="function")this.send(E,F);else if(typeof Z==="function"){if(typeof F!=="object")throw new Error(`Expected http options but got ${typeof F}`);this.send(E,F||{},Z)}else return this.send(E,F)},"methodImpl"),L=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");U.prototype[L]=G}},"createAggregatedClient"),rR=J(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),oR=J(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)a0.warn(p1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")a0.warn(p1(`Expected boolean, got ${typeof $}: ${$}`));if(U==="false")return!1;if(U==="true")return!0}if(typeof $==="boolean")return $;throw new TypeError(`Expected boolean, got ${typeof $}: ${$}`)},"expectBoolean"),r0=J(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))a0.warn(p1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),aR=Math.ceil(340282346638528860000000000000000000000),g1=J(($)=>{const U=r0($);if(U!==void 0&&!Number.isNaN(U)&&U!==1/0&&U!==-1/0){if(Math.abs(U)>aR)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),o0=J(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),tR=o0,zU=J(($)=>TU($,32),"expectInt32"),JU=J(($)=>TU($,16),"expectShort"),KU=J(($)=>TU($,8),"expectByte"),TU=J(($,U)=>{const w=o0($);if(w!==void 0&&eR(w,U)!==w)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return w},"expectSizedInt"),eR=J(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),$5=J(($,U)=>{if($===null||$===void 0){if(U)throw new TypeError(`Expected a non-null value for ${U}`);throw new TypeError("Expected a non-null value")}return $},"expectNonNull"),g4=J(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;const U=Array.isArray($)?"array":typeof $;throw new TypeError(`Expected object, got ${U}: ${$}`)},"expectObject"),U5=J(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return a0.warn(p1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),w5=J(($)=>{if($===null||$===void 0)return;const U=g4($),w=Object.entries(U).filter(([,W])=>W!=null).map(([W])=>W);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 U},"expectUnion"),AU=J(($)=>{if(typeof $=="string")return r0(j0($));return r0($)},"strictParseDouble"),G5=AU,p4=J(($)=>{if(typeof $=="string")return g1(j0($));return g1($)},"strictParseFloat32"),W5=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,j0=J(($)=>{const U=$.match(W5);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),OU=J(($)=>{if(typeof $=="string")return l4($);return r0($)},"limitedParseDouble"),L5=OU,f5=OU,F5=J(($)=>{if(typeof $=="string")return l4($);return g1($)},"limitedParseFloat32"),l4=J(($)=>{switch($){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),s4=J(($)=>{if(typeof $==="string")return o0(j0($));return o0($)},"strictParseLong"),Z5=s4,E5=J(($)=>{if(typeof $==="string")return zU(j0($));return zU($)},"strictParseInt32"),q0=J(($)=>{if(typeof $==="string")return JU(j0($));return JU($)},"strictParseShort"),n4=J(($)=>{if(typeof $==="string")return KU(j0($));return KU($)},"strictParseByte"),p1=J(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),a0={warn:console.warn},I5=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],VU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];J(m4,"dateToUtcString");var X5=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),R5=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=X5.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[w,W,G,L,f,F,Z,E]=U,I=q0(N0(W)),X=m(G,"month",1,12),Y=m(L,"day",1,31);return i0(I,X,Y,{hours:f,minutes:F,seconds:Z,fractionalMilliseconds:E})},"parseRfc3339DateTime"),Y5=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Q5=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=Y5.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[w,W,G,L,f,F,Z,E,I]=U,X=q0(N0(W)),Y=m(G,"month",1,12),R=m(L,"day",1,31),Q=i0(X,Y,R,{hours:f,minutes:F,seconds:Z,fractionalMilliseconds:E});if(I.toUpperCase()!="Z")Q.setTime(Q.getTime()-N5(I));return Q},"parseRfc3339DateTimeWithOffset"),z5=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$/),J5=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$/),K5=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})$/),M5=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=z5.exec($);if(U){const[w,W,G,L,f,F,Z,E]=U;return i0(q0(N0(L)),YU(G),m(W,"day",1,31),{hours:f,minutes:F,seconds:Z,fractionalMilliseconds:E})}if(U=J5.exec($),U){const[w,W,G,L,f,F,Z,E]=U;return V5(i0(A5(L),YU(G),m(W,"day",1,31),{hours:f,minutes:F,seconds:Z,fractionalMilliseconds:E}))}if(U=K5.exec($),U){const[w,W,G,L,f,F,Z,E]=U;return i0(q0(N0(E)),YU(W),m(G.trimLeft(),"day",1,31),{hours:L,minutes:f,seconds:F,fractionalMilliseconds:Z})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),T5=J(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=AU($);else if(typeof $==="object"&&$.tag===1)U=$.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(U)||U===1/0||U===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(U*1000))},"parseEpochTimestamp"),i0=J(($,U,w,W)=>{const G=U-1;return H5($,G,w),new Date(Date.UTC($,G,w,m(W.hours,"hour",0,23),m(W.minutes,"minute",0,59),m(W.seconds,"seconds",0,60),q5(W.fractionalMilliseconds)))},"buildDate"),A5=J(($)=>{const U=new Date().getUTCFullYear(),w=Math.floor(U/100)*100+q0(N0($));if(w<U)return w+100;return w},"parseTwoDigitYear"),O5=1576800000000,V5=J(($)=>{if($.getTime()-new Date().getTime()>O5)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),YU=J(($)=>{const U=VU.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),B5=[31,28,31,30,31,30,31,31,30,31,30,31],H5=J(($,U,w)=>{let W=B5[U];if(U===1&&C5($))W=29;if(w>W)throw new TypeError(`Invalid day for ${VU[U]} in ${$}: ${w}`)},"validateDayOfMonth"),C5=J(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),m=J(($,U,w,W)=>{const G=n4(N0($));if(G<w||G>W)throw new TypeError(`${U} must be between ${w} and ${W}, inclusive`);return G},"parseDateValue"),q5=J(($)=>{if($===null||$===void 0)return 0;return p4("0."+$)*1000},"parseMilliseconds"),N5=J(($)=>{const U=$[0];let w=1;if(U=="+")w=1;else if(U=="-")w=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const W=Number($.substring(1,3)),G=Number($.substring(4,6));return w*(W*60+G)*60*1000},"parseOffsetToMilliseconds"),N0=J(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),i4=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};J(i4,"ServiceException");var j5=i4,r4=J(($,U={})=>{Object.entries(U).filter(([,W])=>W!==void 0).forEach(([W,G])=>{if($[W]==null||$[W]==="")$[W]=G});const w=$.message||$.Message||"UnknownError";return $.message=w,delete $.Message,$},"decorateServiceException"),o4=J(({output:$,parsedBody:U,exceptionCtor:w,errorCode:W})=>{const G=S5($),L=G.httpStatusCode?G.httpStatusCode+"":void 0,f=new w({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||L||"UnknownError",$fault:"client",$metadata:G});throw r4(f,U)},"throwDefaultError"),P5=J(($)=>{return({output:U,parsedBody:w,errorCode:W})=>{o4({output:U,parsedBody:w,exceptionCtor:$,errorCode:W})}},"withBaseException"),S5=J(($)=>({httpStatusCode:$.statusCode,requestId:$.headers["x-amzn-requestid"]??$.headers["x-amzn-request-id"]??$.headers["x-amz-request-id"],extendedRequestId:$.headers["x-amz-id-2"],cfId:$.headers["x-amz-cf-id"]}),"deserializeMetadata"),b5=J(($)=>{switch($){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),k4=!1,h5=J(($)=>{if($&&!k4&&parseInt($.substring(1,$.indexOf(".")))<16)k4=!0},"emitWarningIfUnsupportedVersion"),D5=J(($)=>{const U=[];for(let w in QU.AlgorithmId){const W=QU.AlgorithmId[w];if($[W]===void 0)continue;U.push({algorithmId:()=>W,checksumConstructor:()=>$[W]})}return{_checksumAlgorithms:U,addChecksumAlgorithm(w){this._checksumAlgorithms.push(w)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),k5=J(($)=>{const U={};return $.checksumAlgorithms().forEach((w)=>{U[w.algorithmId()]=w.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),c5=J(($)=>{let U=$.retryStrategy;return{setRetryStrategy(w){U=w},retryStrategy(){return U}}},"getRetryConfiguration"),v5=J(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),a4=J(($)=>{return{...D5($),...c5($)}},"getDefaultExtensionConfiguration"),x5=a4,u5=J(($)=>{return{...k5($),...v5($)}},"resolveDefaultRuntimeConfig");J(l1,"extendedEncodeURIComponent");var y5=J(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),t4=J(($)=>{for(let w in $)if($.hasOwnProperty(w)&&$[w]["#text"]!==void 0)$[w]=$[w]["#text"];else if(typeof $[w]==="object"&&$[w]!==null)$[w]=t4($[w]);return $},"getValueFromTextNode"),t0=J(function(){const $=Object.getPrototypeOf(this).constructor,w=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(w,$.prototype),w},"StringWrapper");t0.prototype=Object.create(String.prototype,{constructor:{value:t0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(t0,String);var e4=class $ extends t0{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(U){if(U instanceof $)return U;else if(U instanceof String||typeof U==="string")return new $(U);return new $(JSON.stringify(U))}};J(e4,"LazyJsonString");var _5=e4;J(BU,"map");var d5=J(($)=>{const U={};for(let[w,W]of Object.entries($||{}))U[w]=[,W];return U},"convertMap"),g5=J(($,U)=>{const w={};for(let W in U)$6(w,$,U,W);return w},"take"),p5=J(($,U,w)=>{return BU($,Object.entries(w).reduce((W,[G,L])=>{if(Array.isArray(L))W[G]=L;else if(typeof L==="function")W[G]=[U,L()];else W[G]=[U,L];return W},{}))},"mapWithFilter"),$6=J(($,U,w,W)=>{if(U!==null){let f=w[W];if(typeof f==="function")f=[,f];const[F=l5,Z=s5,E=W]=f;if(typeof F==="function"&&F(U[E])||typeof F!=="function"&&!!F)$[W]=Z(U[E]);return}let[G,L]=w[W];if(typeof L==="function"){let f;const F=G===void 0&&(f=L())!=null,Z=typeof G==="function"&&!!G(void 0)||typeof G!=="function"&&!!G;if(F)$[W]=f;else if(Z)$[W]=L()}else{const f=G===void 0&&L!=null,F=typeof G==="function"&&!!G(L)||typeof G!=="function"&&!!G;if(f||F)$[W]=L}},"applyInstruction"),l5=J(($)=>$!=null,"nonNullish"),s5=J(($)=>$,"pass"),n5=J(($,U,w,W,G,L)=>{if(U!=null&&U[w]!==void 0){const f=W();if(f.length<=0)throw new Error("Empty value provided for input HTTP label: "+w+".");$=$.replace(G,L?f.split("/").map((F)=>l1(F)).join("/"):l1(f))}else throw new Error("No value provided for input HTTP label: "+w+".");return $},"resolvedPath"),m5=J(($)=>{if($!==$)return"NaN";switch($){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return $}},"serializeFloat"),i5=J(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),MU=J(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(MU);if(typeof $==="object"){const U={};for(let w of Object.keys($)){if($[w]==null)continue;U[w]=MU($[w])}return U}return $},"_json");J(U6,"splitEvery")});var L6=M((G6)=>{Object.defineProperty(G6,"__esModule",{value:!0});G6.isStreamingPayload=void 0;var r5=import.meta.require("stream"),o5=($)=>($===null||$===void 0?void 0:$.body)instanceof r5.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;G6.isStreamingPayload=o5});var B6=M((fT,V6)=>{var{defineProperty:n1,getOwnPropertyDescriptor:a5,getOwnPropertyNames:t5}=Object,e5=Object.prototype.hasOwnProperty,S=($,U)=>n1($,"name",{value:U,configurable:!0}),$Y=($,U)=>{for(var w in U)n1($,w,{get:U[w],enumerable:!0})},UY=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of t5(U))if(!e5.call($,G)&&G!==w)n1($,G,{get:()=>U[G],enumerable:!(W=a5(U,G))||W.enumerable})}return $},wY=($)=>UY(n1({},"__esModule",{value:!0}),$),F6={};$Y(F6,{AdaptiveRetryStrategy:()=>LY,CONFIG_MAX_ATTEMPTS:()=>CU,CONFIG_RETRY_MODE:()=>J6,ENV_MAX_ATTEMPTS:()=>HU,ENV_RETRY_MODE:()=>z6,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>fY,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>ZY,StandardRetryStrategy:()=>Y6,defaultDelayDecider:()=>E6,defaultRetryDecider:()=>I6,getOmitRetryHeadersPlugin:()=>EY,getRetryAfterHint:()=>O6,getRetryPlugin:()=>zY,omitRetryHeadersMiddleware:()=>K6,omitRetryHeadersMiddlewareOptions:()=>M6,resolveRetryConfig:()=>FY,retryMiddleware:()=>T6,retryMiddlewareOptions:()=>A6});V6.exports=wY(F6);var S0=a(),Z6=d$(),q=nW(),GY=S(($,U)=>{const w=$,W=(U==null?void 0:U.noRetryIncrement)??q.NO_RETRY_INCREMENT,G=(U==null?void 0:U.retryCost)??q.RETRY_COST,L=(U==null?void 0:U.timeoutRetryCost)??q.TIMEOUT_RETRY_COST;let f=$;const F=S((X)=>X.name==="TimeoutError"?L:G,"getCapacityAmount"),Z=S((X)=>F(X)<=f,"hasRetryTokens");return Object.freeze({hasRetryTokens:Z,retrieveRetryTokens:S((X)=>{if(!Z(X))throw new Error("No retry token available");const Y=F(X);return f-=Y,Y},"retrieveRetryTokens"),releaseRetryTokens:S((X)=>{f+=X??W,f=Math.min(f,w)},"releaseRetryTokens")})},"getDefaultRetryQuota"),E6=S(($,U)=>Math.floor(Math.min(q.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),f0=g$(),I6=S(($)=>{if(!$)return!1;return f0.isRetryableByTrait($)||f0.isClockSkewError($)||f0.isThrottlingError($)||f0.isTransientError($)},"defaultRetryDecider"),X6=S(($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)},"asSdkError"),R6=class ${constructor(U,w){this.maxAttemptsProvider=U,this.mode=q.RETRY_MODES.STANDARD,this.retryDecider=(w==null?void 0:w.retryDecider)??I6,this.delayDecider=(w==null?void 0:w.delayDecider)??E6,this.retryQuota=(w==null?void 0:w.retryQuota)??GY(q.INITIAL_RETRY_TOKENS)}shouldRetry(U,w,W){return w<W&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(w){U=q.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,w,W){let G,L=0,f=0;const F=await this.getMaxAttempts(),{request:Z}=w;if(S0.HttpRequest.isInstance(Z))Z.headers[q.INVOCATION_ID_HEADER]=Z6.v4();while(!0)try{if(S0.HttpRequest.isInstance(Z))Z.headers[q.REQUEST_HEADER]=`attempt=${L+1}; max=${F}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();const{response:E,output:I}=await U(w);if(W==null?void 0:W.afterRequest)W.afterRequest(E);return this.retryQuota.releaseRetryTokens(G),I.$metadata.attempts=L+1,I.$metadata.totalRetryDelay=f,{response:E,output:I}}catch(E){const I=X6(E);if(L++,this.shouldRetry(I,L,F)){G=this.retryQuota.retrieveRetryTokens(I);const X=this.delayDecider(f0.isThrottlingError(I)?q.THROTTLING_RETRY_DELAY_BASE:q.DEFAULT_RETRY_DELAY_BASE,L),Y=WY(I.$response),R=Math.max(Y||0,X);f+=R,await new Promise((Q)=>setTimeout(Q,R));continue}if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=L,I.$metadata.totalRetryDelay=f,I}}};S(R6,"StandardRetryStrategy");var Y6=R6,WY=S(($)=>{if(!S0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((L)=>L.toLowerCase()==="retry-after");if(!U)return;const w=$.headers[U],W=Number(w);if(!Number.isNaN(W))return W*1000;return new Date(w).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),Q6=class $ extends Y6{constructor(U,w){const{rateLimiter:W,...G}=w??{};super(U,G);this.rateLimiter=W??new q.DefaultRateLimiter,this.mode=q.RETRY_MODES.ADAPTIVE}async retry(U,w){return super.retry(U,w,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};S(Q6,"AdaptiveRetryStrategy");var LY=Q6,f6=n(),HU="AWS_MAX_ATTEMPTS",CU="max_attempts",fY={environmentVariableSelector:($)=>{const U=$[HU];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Environment variable ${HU} mast be a number, got "${U}"`);return w},configFileSelector:($)=>{const U=$[CU];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Shared config file entry ${CU} mast be a number, got "${U}"`);return w},default:q.DEFAULT_MAX_ATTEMPTS},FY=S(($)=>{const{retryStrategy:U}=$,w=f6.normalizeProvider($.maxAttempts??q.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:w,retryStrategy:async()=>{if(U)return U;if(await f6.normalizeProvider($.retryMode)()===q.RETRY_MODES.ADAPTIVE)return new q.AdaptiveRetryStrategy(w);return new q.StandardRetryStrategy(w)}}},"resolveRetryConfig"),z6="AWS_RETRY_MODE",J6="retry_mode",ZY={environmentVariableSelector:($)=>$[z6],configFileSelector:($)=>$[J6],default:q.DEFAULT_RETRY_MODE},K6=S(()=>($)=>async(U)=>{const{request:w}=U;if(S0.HttpRequest.isInstance(w))delete w.headers[q.INVOCATION_ID_HEADER],delete w.headers[q.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),M6={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},EY=S(($)=>({applyToStack:(U)=>{U.addRelativeTo(K6(),M6)}}),"getOmitRetryHeadersPlugin"),IY=P0(),XY=L6(),T6=S(($)=>(U,w)=>async(W)=>{var G;let L=await $.retryStrategy();const f=await $.maxAttempts();if(RY(L)){L=L;let F=await L.acquireInitialRetryToken(w.partition_id),Z=new Error,E=0,I=0;const{request:X}=W,Y=S0.HttpRequest.isInstance(X);if(Y)X.headers[q.INVOCATION_ID_HEADER]=Z6.v4();while(!0)try{if(Y)X.headers[q.REQUEST_HEADER]=`attempt=${E+1}; max=${f}`;const{response:R,output:Q}=await U(W);return L.recordSuccess(F),Q.$metadata.attempts=E+1,Q.$metadata.totalRetryDelay=I,{response:R,output:Q}}catch(R){const Q=YY(R);if(Z=X6(R),Y&&XY.isStreamingPayload(X))throw(G=w.logger instanceof IY.NoOpLogger?console:w.logger)==null||G.warn("An error was encountered in a non-retryable streaming request."),Z;try{F=await L.refreshRetryTokenForRetry(F,Q)}catch(K){if(!Z.$metadata)Z.$metadata={};throw Z.$metadata.attempts=E+1,Z.$metadata.totalRetryDelay=I,Z}E=F.getRetryCount();const A=F.getRetryDelay();I+=A,await new Promise((K)=>setTimeout(K,A))}}else{if(L=L,L==null?void 0:L.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",L.mode]];return L.retry(U,W)}},"retryMiddleware"),RY=S(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),YY=S(($)=>{const U={error:$,errorType:QY($)},w=O6($.$response);if(w)U.retryAfterHint=w;return U},"getRetryErrorInfo"),QY=S(($)=>{if(f0.isThrottlingError($))return"THROTTLING";if(f0.isTransientError($))return"TRANSIENT";if(f0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),A6={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},zY=S(($)=>({applyToStack:(U)=>{U.add(T6($),A6)}}),"getRetryPlugin"),O6=S(($)=>{if(!S0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((L)=>L.toLowerCase()==="retry-after");if(!U)return;const w=$.headers[U],W=Number(w);if(!Number.isNaN(W))return new Date(W*1000);return new Date(w)},"getRetryAfterHint")});var NU=M((FT,g6)=>{function q6($){const U=new Map;for(let w of $)U.set(w.schemeId,w);return U}function u6($,U){return new _6($,U)}function d6($,U,w,W,G){return C(async function*L(f,F,...Z){let E=f.startingToken||void 0,I=!0,X;while(I){if(F[w]=E,G)F[G]=F[G]??f.pageSize;if(f.client instanceof $)X=await yY(U,f.client,F,...Z);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield X;const Y=E;E=_Y(X,W),I=!!(E&&(!f.stopOnSameToken||E!==Y))}return},"paginateOperation")}var{defineProperty:i1,getOwnPropertyDescriptor:JY,getOwnPropertyNames:KY}=Object,MY=Object.prototype.hasOwnProperty,C=($,U)=>i1($,"name",{value:U,configurable:!0}),TY=($,U)=>{for(var w in U)i1($,w,{get:U[w],enumerable:!0})},AY=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of KY(U))if(!MY.call($,G)&&G!==w)i1($,G,{get:()=>U[G],enumerable:!(W=JY(U,G))||W.enumerable})}return $},OY=($)=>AY(i1({},"__esModule",{value:!0}),$),H6={};TY(H6,{DefaultIdentityProviderConfig:()=>SY,EXPIRATION_MS:()=>v6,HttpApiKeyAuthSigner:()=>bY,HttpBearerAuthSigner:()=>hY,NoAuthSigner:()=>DY,RequestBuilder:()=>_6,createIsIdentityExpiredFunction:()=>c6,createPaginator:()=>d6,doesIdentityRequireRefresh:()=>x6,getHttpAuthSchemeEndpointRuleSetPlugin:()=>BY,getHttpAuthSchemePlugin:()=>CY,getHttpSigningPlugin:()=>PY,getSmithyContext:()=>vY,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>N6,httpAuthSchemeMiddleware:()=>qU,httpAuthSchemeMiddlewareOptions:()=>j6,httpSigningMiddleware:()=>P6,httpSigningMiddlewareOptions:()=>S6,isIdentityExpired:()=>kY,memoizeIdentityProvider:()=>cY,normalizeProvider:()=>xY,requestBuilder:()=>u6});g6.exports=OY(H6);var C6=n();C(q6,"convertHttpAuthSchemesToMap");var qU=C(($,U)=>(w,W)=>async(G)=>{var L;const f=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,G.input)),F=q6($.httpAuthSchemes),Z=C6.getSmithyContext(W),E=[];for(let I of f){const X=F.get(I.schemeId);if(!X){E.push(`HttpAuthScheme \`${I.schemeId}\` was not enabled for this service.`);continue}const Y=X.identityProvider(await U.identityProviderConfigProvider($));if(!Y){E.push(`HttpAuthScheme \`${I.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:R={},signingProperties:Q={}}=((L=I.propertiesExtractor)==null?void 0:L.call(I,$,W))||{};I.identityProperties=Object.assign(I.identityProperties||{},R),I.signingProperties=Object.assign(I.signingProperties||{},Q),Z.selectedHttpAuthScheme={httpAuthOption:I,identity:await Y(I.identityProperties),signer:X.signer};break}if(!Z.selectedHttpAuthScheme)throw new Error(E.join("\n"));return w(G)},"httpAuthSchemeMiddleware"),VY=qG(),N6={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:VY.endpointMiddlewareOptions.name},BY=C(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w})=>({applyToStack:(W)=>{W.addRelativeTo(qU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w}),N6)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),HY=J1(),j6={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:HY.serializerMiddlewareOption.name},CY=C(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w})=>({applyToStack:(W)=>{W.addRelativeTo(qU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w}),j6)}}),"getHttpAuthSchemePlugin"),r1=a(),qY=C(($)=>(U)=>{throw U},"defaultErrorHandler"),NY=C(($,U)=>{},"defaultSuccessHandler"),P6=C(($)=>(U,w)=>async(W)=>{if(!r1.HttpRequest.isInstance(W.request))return U(W);const L=C6.getSmithyContext(w).selectedHttpAuthScheme;if(!L)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:f={}},identity:F,signer:Z}=L,E=await U({...W,request:await Z.sign(W.request,F,f)}).catch((Z.errorHandler||qY)(f));return(Z.successHandler||NY)(E.response,f),E},"httpSigningMiddleware"),jY=B6(),S6={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:jY.retryMiddlewareOptions.name},PY=C(($)=>({applyToStack:(U)=>{U.addRelativeTo(P6($),S6)}}),"getHttpSigningPlugin"),b6=class ${constructor(U){this.authSchemes=new Map;for(let[w,W]of Object.entries(U))if(W!==void 0)this.authSchemes.set(w,W)}getIdentityProvider(U){return this.authSchemes.get(U)}};C(b6,"DefaultIdentityProviderConfig");var SY=b6,m1=A0(),h6=class ${async sign(U,w,W){if(!W)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!W.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!W.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!w.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const G=r1.HttpRequest.clone(U);if(W.in===m1.HttpApiKeyAuthLocation.QUERY)G.query[W.name]=w.apiKey;else if(W.in===m1.HttpApiKeyAuthLocation.HEADER)G.headers[W.name]=W.scheme?`${W.scheme} ${w.apiKey}`:w.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+W.in+"`");return G}};C(h6,"HttpApiKeyAuthSigner");var bY=h6,D6=class ${async sign(U,w,W){const G=r1.HttpRequest.clone(U);if(!w.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return G.headers.Authorization=`Bearer ${w.token}`,G}};C(D6,"HttpBearerAuthSigner");var hY=D6,k6=class ${async sign(U,w,W){return U}};C(k6,"NoAuthSigner");var DY=k6,c6=C(($)=>(U)=>x6(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),v6=300000,kY=c6(v6),x6=C(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),cY=C(($,U,w)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let G,L,f,F=!1;const Z=C(async(E)=>{if(!L)L=W(E);try{G=await L,f=!0,F=!1}finally{L=void 0}return G},"coalesceProvider");if(U===void 0)return async(E)=>{if(!f||(E==null?void 0:E.forceRefresh))G=await Z(E);return G};return async(E)=>{if(!f||(E==null?void 0:E.forceRefresh))G=await Z(E);if(F)return G;if(!w(G))return F=!0,G;if(U(G))return await Z(E),G;return G}},"memoizeIdentityProvider"),vY=C(($)=>$[m1.SMITHY_CONTEXT_KEY]||($[m1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),xY=C(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),uY=P0();C(u6,"requestBuilder");var y6=class ${constructor(U,w){this.input=U,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:U,protocol:w="https",port:W,path:G}=await this.context.endpoint();this.path=G;for(let L of this.resolvePathStack)L(this.path);return new r1.HttpRequest({protocol:w,hostname:this.hostname||U,port:W,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(U){return this.hostname=U,this}bp(U){return this.resolvePathStack.push((w)=>{this.path=`${(w==null?void 0:w.endsWith("/"))?w.slice(0,-1):w||""}`+U}),this}p(U,w,W,G){return this.resolvePathStack.push((L)=>{this.path=uY.resolvedPath(L,this.input,U,w,W,G)}),this}h(U){return this.headers=U,this}q(U){return this.query=U,this}b(U){return this.body=U,this}m(U){return this.method=U,this}};C(y6,"RequestBuilder");var _6=y6,yY=C(async($,U,w,...W)=>{return await U.send(new $(w),...W)},"makePagedClientRequest");C(d6,"createPaginator");var _Y=C(($,U)=>{let w=$;const W=U.split(".");for(let G of W){if(!w||typeof w!=="object")return;w=w[G]}return w},"get")});var yL=M((NO,L$)=>{var RL,YL,QL,zL,JL,KL,ML,TL,AL,OL,VL,BL,HL,G$,yU,CL,qL,NL,D0,jL,PL,SL,bL,hL,DL,kL,cL,vL,W$,xL,uL;(function($){var U=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(W){$(w(U,w(W)))});else if(typeof L$==="object"&&typeof NO==="object")$(w(U,w(NO)));else $(w(U));function w(W,G){if(W!==U)if(typeof Object.create==="function")Object.defineProperty(W,"__esModule",{value:!0});else W.__esModule=!0;return function(L,f){return W[L]=G?G(L,f):f}}})(function($){var U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,L){G.__proto__=L}||function(G,L){for(var f in L)if(Object.prototype.hasOwnProperty.call(L,f))G[f]=L[f]};RL=function(G,L){if(typeof L!=="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");U(G,L);function f(){this.constructor=G}G.prototype=L===null?Object.create(L):(f.prototype=L.prototype,new f)},YL=Object.assign||function(G){for(var L,f=1,F=arguments.length;f<F;f++){L=arguments[f];for(var Z in L)if(Object.prototype.hasOwnProperty.call(L,Z))G[Z]=L[Z]}return G},QL=function(G,L){var f={};for(var F in G)if(Object.prototype.hasOwnProperty.call(G,F)&&L.indexOf(F)<0)f[F]=G[F];if(G!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var Z=0,F=Object.getOwnPropertySymbols(G);Z<F.length;Z++)if(L.indexOf(F[Z])<0&&Object.prototype.propertyIsEnumerable.call(G,F[Z]))f[F[Z]]=G[F[Z]]}return f},zL=function(G,L,f,F){var Z=arguments.length,E=Z<3?L:F===null?F=Object.getOwnPropertyDescriptor(L,f):F,I;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")E=Reflect.decorate(G,L,f,F);else for(var X=G.length-1;X>=0;X--)if(I=G[X])E=(Z<3?I(E):Z>3?I(L,f,E):I(L,f))||E;return Z>3&&E&&Object.defineProperty(L,f,E),E},JL=function(G,L){return function(f,F){L(f,F,G)}},KL=function(G,L,f,F,Z,E){function I(B){if(B!==void 0&&typeof B!=="function")throw new TypeError("Function expected");return B}var X=F.kind,Y=X==="getter"?"get":X==="setter"?"set":"value",R=!L&&G?F.static?G:G.prototype:null,Q=L||(R?Object.getOwnPropertyDescriptor(R,F.name):{}),A,K=!1;for(var z=f.length-1;z>=0;z--){var T={};for(var O in F)T[O]=O==="access"?{}:F[O];for(var O in F.access)T.access[O]=F.access[O];T.addInitializer=function(B){if(K)throw new TypeError("Cannot add initializers after decoration has completed");E.push(I(B||null))};var V=f[z](X==="accessor"?{get:Q.get,set:Q.set}:Q[Y],T);if(X==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw new TypeError("Object expected");if(A=I(V.get))Q.get=A;if(A=I(V.set))Q.set=A;if(A=I(V.init))Z.unshift(A)}else if(A=I(V))if(X==="field")Z.unshift(A);else Q[Y]=A}if(R)Object.defineProperty(R,F.name,Q);K=!0},ML=function(G,L,f){var F=arguments.length>2;for(var Z=0;Z<L.length;Z++)f=F?L[Z].call(G,f):L[Z].call(G);return F?f:void 0},TL=function(G){return typeof G==="symbol"?G:"".concat(G)},AL=function(G,L,f){if(typeof L==="symbol")L=L.description?"[".concat(L.description,"]"):"";return Object.defineProperty(G,"name",{configurable:!0,value:f?"".concat(f," ",L):L})},OL=function(G,L){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(G,L)},VL=function(G,L,f,F){function Z(E){return E instanceof f?E:new f(function(I){I(E)})}return new(f||(f=Promise))(function(E,I){function X(Q){try{R(F.next(Q))}catch(A){I(A)}}function Y(Q){try{R(F.throw(Q))}catch(A){I(A)}}function R(Q){Q.done?E(Q.value):Z(Q.value).then(X,Y)}R((F=F.apply(G,L||[])).next())})},BL=function(G,L){var f={label:0,sent:function(){if(E[0]&1)throw E[1];return E[1]},trys:[],ops:[]},F,Z,E,I;return I={next:X(0),throw:X(1),return:X(2)},typeof Symbol==="function"&&(I[Symbol.iterator]=function(){return this}),I;function X(R){return function(Q){return Y([R,Q])}}function Y(R){if(F)throw new TypeError("Generator is already executing.");while(I&&(I=0,R[0]&&(f=0)),f)try{if(F=1,Z&&(E=R[0]&2?Z.return:R[0]?Z.throw||((E=Z.return)&&E.call(Z),0):Z.next)&&!(E=E.call(Z,R[1])).done)return E;if(Z=0,E)R=[R[0]&2,E.value];switch(R[0]){case 0:case 1:E=R;break;case 4:return f.label++,{value:R[1],done:!1};case 5:f.label++,Z=R[1],R=[0];continue;case 7:R=f.ops.pop(),f.trys.pop();continue;default:if((E=f.trys,!(E=E.length>0&&E[E.length-1]))&&(R[0]===6||R[0]===2)){f=0;continue}if(R[0]===3&&(!E||R[1]>E[0]&&R[1]<E[3])){f.label=R[1];break}if(R[0]===6&&f.label<E[1]){f.label=E[1],E=R;break}if(E&&f.label<E[2]){f.label=E[2],f.ops.push(R);break}if(E[2])f.ops.pop();f.trys.pop();continue}R=L.call(G,f)}catch(Q){R=[6,Q],Z=0}finally{F=E=0}if(R[0]&5)throw R[1];return{value:R[0]?R[1]:void 0,done:!0}}},HL=function(G,L){for(var f in G)if(f!=="default"&&!Object.prototype.hasOwnProperty.call(L,f))W$(L,G,f)},W$=Object.create?function(G,L,f,F){if(F===void 0)F=f;var Z=Object.getOwnPropertyDescriptor(L,f);if(!Z||("get"in Z?!L.__esModule:Z.writable||Z.configurable))Z={enumerable:!0,get:function(){return L[f]}};Object.defineProperty(G,F,Z)}:function(G,L,f,F){if(F===void 0)F=f;G[F]=L[f]},G$=function(G){var L=typeof Symbol==="function"&&Symbol.iterator,f=L&&G[L],F=0;if(f)return f.call(G);if(G&&typeof G.length==="number")return{next:function(){if(G&&F>=G.length)G=void 0;return{value:G&&G[F++],done:!G}}};throw new TypeError(L?"Object is not iterable.":"Symbol.iterator is not defined.")},yU=function(G,L){var f=typeof Symbol==="function"&&G[Symbol.iterator];if(!f)return G;var F=f.call(G),Z,E=[],I;try{while((L===void 0||L-- >0)&&!(Z=F.next()).done)E.push(Z.value)}catch(X){I={error:X}}finally{try{if(Z&&!Z.done&&(f=F.return))f.call(F)}finally{if(I)throw I.error}}return E},CL=function(){for(var G=[],L=0;L<arguments.length;L++)G=G.concat(yU(arguments[L]));return G},qL=function(){for(var G=0,L=0,f=arguments.length;L<f;L++)G+=arguments[L].length;for(var F=Array(G),Z=0,L=0;L<f;L++)for(var E=arguments[L],I=0,X=E.length;I<X;I++,Z++)F[Z]=E[I];return F},NL=function(G,L,f){if(f||arguments.length===2){for(var F=0,Z=L.length,E;F<Z;F++)if(E||!(F in L)){if(!E)E=Array.prototype.slice.call(L,0,F);E[F]=L[F]}}return G.concat(E||Array.prototype.slice.call(L))},D0=function(G){return this instanceof D0?(this.v=G,this):new D0(G)},jL=function(G,L,f){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var F=f.apply(G,L||[]),Z,E=[];return Z={},X("next"),X("throw"),X("return",I),Z[Symbol.asyncIterator]=function(){return this},Z;function I(z){return function(T){return Promise.resolve(T).then(z,A)}}function X(z,T){if(F[z]){if(Z[z]=function(O){return new Promise(function(V,B){E.push([z,O,V,B])>1||Y(z,O)})},T)Z[z]=T(Z[z])}}function Y(z,T){try{R(F[z](T))}catch(O){K(E[0][3],O)}}function R(z){z.value instanceof D0?Promise.resolve(z.value.v).then(Q,A):K(E[0][2],z)}function Q(z){Y("next",z)}function A(z){Y("throw",z)}function K(z,T){if(z(T),E.shift(),E.length)Y(E[0][0],E[0][1])}},PL=function(G){var L,f;return L={},F("next"),F("throw",function(Z){throw Z}),F("return"),L[Symbol.iterator]=function(){return this},L;function F(Z,E){L[Z]=G[Z]?function(I){return(f=!f)?{value:D0(G[Z](I)),done:!1}:E?E(I):I}:E}},SL=function(G){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var L=G[Symbol.asyncIterator],f;return L?L.call(G):(G=typeof G$==="function"?G$(G):G[Symbol.iterator](),f={},F("next"),F("throw"),F("return"),f[Symbol.asyncIterator]=function(){return this},f);function F(E){f[E]=G[E]&&function(I){return new Promise(function(X,Y){I=G[E](I),Z(X,Y,I.done,I.value)})}}function Z(E,I,X,Y){Promise.resolve(Y).then(function(R){E({value:R,done:X})},I)}},bL=function(G,L){if(Object.defineProperty)Object.defineProperty(G,"raw",{value:L});else G.raw=L;return G};var w=Object.create?function(G,L){Object.defineProperty(G,"default",{enumerable:!0,value:L})}:function(G,L){G.default=L};hL=function(G){if(G&&G.__esModule)return G;var L={};if(G!=null){for(var f in G)if(f!=="default"&&Object.prototype.hasOwnProperty.call(G,f))W$(L,G,f)}return w(L,G),L},DL=function(G){return G&&G.__esModule?G:{default:G}},kL=function(G,L,f,F){if(f==="a"&&!F)throw new TypeError("Private accessor was defined without a getter");if(typeof L==="function"?G!==L||!F:!L.has(G))throw new TypeError("Cannot read private member from an object whose class did not declare it");return f==="m"?F:f==="a"?F.call(G):F?F.value:L.get(G)},cL=function(G,L,f,F,Z){if(F==="m")throw new TypeError("Private method is not writable");if(F==="a"&&!Z)throw new TypeError("Private accessor was defined without a setter");if(typeof L==="function"?G!==L||!Z:!L.has(G))throw new TypeError("Cannot write private member to an object whose class did not declare it");return F==="a"?Z.call(G,f):Z?Z.value=f:L.set(G,f),f},vL=function(G,L){if(L===null||typeof L!=="object"&&typeof L!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof G==="function"?L===G:G.has(L)},xL=function(G,L,f){if(L!==null&&L!==void 0){if(typeof L!=="object"&&typeof L!=="function")throw new TypeError("Object expected.");var F,Z;if(f){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");F=L[Symbol.asyncDispose]}if(F===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(F=L[Symbol.dispose],f)Z=F}if(typeof F!=="function")throw new TypeError("Object not disposable.");if(Z)F=function(){try{Z.call(this)}catch(E){return Promise.reject(E)}};G.stack.push({value:L,dispose:F,async:f})}else if(f)G.stack.push({async:!0});return L};var W=typeof SuppressedError==="function"?SuppressedError:function(G,L,f){var F=new Error(f);return F.name="SuppressedError",F.error=G,F.suppressed=L,F};uL=function(G){function L(F){G.error=G.hasError?new W(F,G.error,"An error was suppressed during disposal."):F,G.hasError=!0}function f(){while(G.stack.length){var F=G.stack.pop();try{var Z=F.dispose&&F.dispose.call(F.value);if(F.async)return Promise.resolve(Z).then(f,function(E){return L(E),f()})}catch(E){L(E)}}if(G.hasError)throw G.error}return f()},$("__extends",RL),$("__assign",YL),$("__rest",QL),$("__decorate",zL),$("__param",JL),$("__esDecorate",KL),$("__runInitializers",ML),$("__propKey",TL),$("__setFunctionName",AL),$("__metadata",OL),$("__awaiter",VL),$("__generator",BL),$("__exportStar",HL),$("__createBinding",W$),$("__values",G$),$("__read",yU),$("__spread",CL),$("__spreadArrays",qL),$("__spreadArray",NL),$("__await",D0),$("__asyncGenerator",jL),$("__asyncDelegator",PL),$("__asyncValues",SL),$("__makeTemplateObject",bL),$("__importStar",hL),$("__importDefault",DL),$("__classPrivateFieldGet",kL),$("__classPrivateFieldSet",cL),$("__classPrivateFieldIn",vL),$("__addDisposableResource",xL),$("__disposeResources",uL)})});var pL=M((jO,gL)=>{var{defineProperty:f$,getOwnPropertyDescriptor:f9,getOwnPropertyNames:F9}=Object,Z9=Object.prototype.hasOwnProperty,E9=($,U)=>f$($,"name",{value:U,configurable:!0}),I9=($,U)=>{for(var w in U)f$($,w,{get:U[w],enumerable:!0})},X9=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of F9(U))if(!Z9.call($,G)&&G!==w)f$($,G,{get:()=>U[G],enumerable:!(W=f9(U,G))||W.enumerable})}return $},R9=($)=>X9(f$({},"__esModule",{value:!0}),$),dL={};I9(dL,{emitWarningIfUnsupportedVersion:()=>Y9});gL.exports=R9(dL);var _L=!1,Y9=E9(($)=>{if($&&!_L&&parseInt($.substring(1,$.indexOf(".")))<18)_L=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
4
+ no longer support Node.js 16.x on January 6, 2025.
5
+
6
+ To continue receiving updates to AWS services, bug fixes, and security
7
+ updates please upgrade to a supported Node.js LTS version.
8
+
9
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var Ef=M((PO,Zf)=>{function lU($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break}var{defineProperty:X$,getOwnPropertyDescriptor:Q9,getOwnPropertyNames:z9}=Object,J9=Object.prototype.hasOwnProperty,b=($,U)=>X$($,"name",{value:U,configurable:!0}),K9=($,U)=>{for(var w in U)X$($,w,{get:U[w],enumerable:!0})},M9=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of z9(U))if(!J9.call($,G)&&G!==w)X$($,G,{get:()=>U[G],enumerable:!(W=Q9(U,G))||W.enumerable})}return $},T9=($)=>M9(X$({},"__esModule",{value:!0}),$),iL={};K9(iL,{SignatureV4:()=>s9,clearCredentialCache:()=>v9,createScope:()=>E$,getCanonicalHeaders:()=>pU,getCanonicalQuery:()=>wf,getPayloadHash:()=>I$,getSigningKey:()=>Uf,moveHeadersToQuery:()=>ff,prepareRequest:()=>sU});Zf.exports=T9(iL);var lL=n(),_U=L0(),A9="X-Amz-Algorithm",O9="X-Amz-Credential",rL="X-Amz-Date",V9="X-Amz-SignedHeaders",B9="X-Amz-Expires",oL="X-Amz-Signature",aL="X-Amz-Security-Token",tL="authorization",eL=rL.toLowerCase(),H9="date",C9=[tL,eL,H9],q9=oL.toLowerCase(),gU="x-amz-content-sha256",N9=aL.toLowerCase(),j9={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},P9=/^proxy-/,S9=/^sec-/,dU="AWS4-HMAC-SHA256",b9="AWS4-HMAC-SHA256-PAYLOAD",h9="UNSIGNED-PAYLOAD",D9=50,$f="aws4_request",k9=604800,F0=FU(),c9=L0(),k0={},Z$=[],E$=b(($,U,w)=>`${$}/${U}/${w}/${$f}`,"createScope"),Uf=b(async($,U,w,W,G)=>{const L=await sL($,U.secretAccessKey,U.accessKeyId),f=`${w}:${W}:${G}:${F0.toHex(L)}:${U.sessionToken}`;if(f in k0)return k0[f];Z$.push(f);while(Z$.length>D9)delete k0[Z$.shift()];let F=`AWS4${U.secretAccessKey}`;for(let Z of[w,W,G,$f])F=await sL($,F,Z);return k0[f]=F},"getSigningKey"),v9=b(()=>{Z$.length=0,Object.keys(k0).forEach(($)=>{delete k0[$]})},"clearCredentialCache"),sL=b(($,U,w)=>{const W=new $(U);return W.update(c9.toUint8Array(w)),W.digest()},"hmac"),pU=b(({headers:$},U,w)=>{const W={};for(let G of Object.keys($).sort()){if($[G]==null)continue;const L=G.toLowerCase();if(L in j9||(U==null?void 0:U.has(L))||P9.test(L)||S9.test(L)){if(!w||w&&!w.has(L))continue}W[L]=$[G].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),$1=$U(),wf=b(({query:$={}})=>{const U=[],w={};for(let W of Object.keys($).sort()){if(W.toLowerCase()===q9)continue;U.push(W);const G=$[W];if(typeof G==="string")w[W]=`${$1.escapeUri(W)}=${$1.escapeUri(G)}`;else if(Array.isArray(G))w[W]=G.slice(0).reduce((L,f)=>L.concat([`${$1.escapeUri(W)}=${$1.escapeUri(f)}`]),[]).sort().join("&")}return U.map((W)=>w[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),x9=i$(),u9=L0(),I$=b(async({headers:$,body:U},w)=>{for(let W of Object.keys($))if(W.toLowerCase()===gU)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||x9.isArrayBuffer(U)){const W=new w;return W.update(u9.toUint8Array(U)),F0.toHex(await W.digest())}return h9},"getPayloadHash"),nL=L0(),Gf=class ${format(U){const w=[];for(let L of Object.keys(U)){const f=nL.fromUtf8(L);w.push(Uint8Array.from([f.byteLength]),f,this.formatHeaderValue(U[L]))}const W=new Uint8Array(w.reduce((L,f)=>L+f.byteLength,0));let G=0;for(let L of w)W.set(L,G),G+=L.byteLength;return W}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":const w=new DataView(new ArrayBuffer(3));return w.setUint8(0,3),w.setInt16(1,U.value,!1),new Uint8Array(w.buffer);case"integer":const W=new DataView(new ArrayBuffer(5));return W.setUint8(0,4),W.setInt32(1,U.value,!1),new Uint8Array(W.buffer);case"long":const G=new Uint8Array(9);return G[0]=5,G.set(U.value.bytes,1),G;case"binary":const L=new DataView(new ArrayBuffer(3+U.value.byteLength));L.setUint8(0,6),L.setUint16(1,U.value.byteLength,!1);const f=new Uint8Array(L.buffer);return f.set(U.value,3),f;case"string":const F=nL.fromUtf8(U.value),Z=new DataView(new ArrayBuffer(3+F.byteLength));Z.setUint8(0,7),Z.setUint16(1,F.byteLength,!1);const E=new Uint8Array(Z.buffer);return E.set(F,3),E;case"timestamp":const I=new Uint8Array(9);return I[0]=8,I.set(d9.fromNumber(U.value.valueOf()).bytes,1),I;case"uuid":if(!_9.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const X=new Uint8Array(17);return X[0]=9,X.set(F0.fromHex(U.value.replace(/\-/g,"")),1),X}}};b(Gf,"HeaderFormatter");var y9=Gf,_9=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Wf=class ${constructor(U){if(this.bytes=U,U.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(U){if(U>9223372036854776000||U<-9223372036854776000)throw new Error(`${U} is too large (or, if negative, too small) to represent as an Int64`);const w=new Uint8Array(8);for(let W=7,G=Math.abs(Math.round(U));W>-1&&G>0;W--,G/=256)w[W]=G;if(U<0)lU(w);return new $(w)}valueOf(){const U=this.bytes.slice(0),w=U[0]&128;if(w)lU(U);return parseInt(F0.toHex(U),16)*(w?-1:1)}toString(){return String(this.valueOf())}};b(Wf,"Int64");var d9=Wf;b(lU,"negate");var g9=b(($,U)=>{$=$.toLowerCase();for(let w of Object.keys(U))if($===w.toLowerCase())return!0;return!1},"hasHeader"),Lf=a(),ff=b(($,U={})=>{var w;const{headers:W,query:G={}}=Lf.HttpRequest.clone($);for(let L of Object.keys(W)){const f=L.toLowerCase();if(f.slice(0,6)==="x-amz-"&&!((w=U.unhoistableHeaders)==null?void 0:w.has(f)))G[L]=W[L],delete W[L]}return{...$,headers:W,query:G}},"moveHeadersToQuery"),sU=b(($)=>{$=Lf.HttpRequest.clone($);for(let U of Object.keys($.headers))if(C9.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),p9=b(($)=>l9($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),l9=b(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),Ff=class ${constructor({applyChecksum:U,credentials:w,region:W,service:G,sha256:L,uriEscapePath:f=!0}){this.headerFormatter=new y9,this.service=G,this.sha256=L,this.uriEscapePath=f,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=lL.normalizeProvider(W),this.credentialProvider=lL.normalizeProvider(w)}async presign(U,w={}){const{signingDate:W=new Date,expiresIn:G=3600,unsignableHeaders:L,unhoistableHeaders:f,signableHeaders:F,signingRegion:Z,signingService:E}=w,I=await this.credentialProvider();this.validateResolvedCredentials(I);const X=Z??await this.regionProvider(),{longDate:Y,shortDate:R}=F$(W);if(G>k9)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const Q=E$(R,X,E??this.service),A=ff(sU(U),{unhoistableHeaders:f});if(I.sessionToken)A.query[aL]=I.sessionToken;A.query[A9]=dU,A.query[O9]=`${I.accessKeyId}/${Q}`,A.query[rL]=Y,A.query[B9]=G.toString(10);const K=pU(A,L,F);return A.query[V9]=mL(K),A.query[oL]=await this.getSignature(Y,Q,this.getSigningKey(I,X,R,E),this.createCanonicalRequest(A,K,await I$(U,this.sha256))),A}async sign(U,w){if(typeof U==="string")return this.signString(U,w);else if(U.headers&&U.payload)return this.signEvent(U,w);else if(U.message)return this.signMessage(U,w);else return this.signRequest(U,w)}async signEvent({headers:U,payload:w},{signingDate:W=new Date,priorSignature:G,signingRegion:L,signingService:f}){const F=L??await this.regionProvider(),{shortDate:Z,longDate:E}=F$(W),I=E$(Z,F,f??this.service),X=await I$({headers:{},body:w},this.sha256),Y=new this.sha256;Y.update(U);const R=F0.toHex(await Y.digest()),Q=[b9,E,I,G,R,X].join("\n");return this.signString(Q,{signingDate:W,signingRegion:F,signingService:f})}async signMessage(U,{signingDate:w=new Date,signingRegion:W,signingService:G}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:w,signingRegion:W,signingService:G,priorSignature:U.priorSignature}).then((f)=>{return{message:U.message,signature:f}})}async signString(U,{signingDate:w=new Date,signingRegion:W,signingService:G}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const f=W??await this.regionProvider(),{shortDate:F}=F$(w),Z=new this.sha256(await this.getSigningKey(L,f,F,G));return Z.update(_U.toUint8Array(U)),F0.toHex(await Z.digest())}async signRequest(U,{signingDate:w=new Date,signableHeaders:W,unsignableHeaders:G,signingRegion:L,signingService:f}={}){const F=await this.credentialProvider();this.validateResolvedCredentials(F);const Z=L??await this.regionProvider(),E=sU(U),{longDate:I,shortDate:X}=F$(w),Y=E$(X,Z,f??this.service);if(E.headers[eL]=I,F.sessionToken)E.headers[N9]=F.sessionToken;const R=await I$(E,this.sha256);if(!g9(gU,E.headers)&&this.applyChecksum)E.headers[gU]=R;const Q=pU(E,G,W),A=await this.getSignature(I,Y,this.getSigningKey(F,Z,X,f),this.createCanonicalRequest(E,Q,R));return E.headers[tL]=`${dU} Credential=${F.accessKeyId}/${Y}, SignedHeaders=${mL(Q)}, Signature=${A}`,E}createCanonicalRequest(U,w,W){const G=Object.keys(w).sort();return`${U.method}
10
+ ${this.getCanonicalPath(U)}
11
+ ${wf(U)}
12
+ ${G.map((L)=>`${L}:${w[L]}`).join("\n")}
13
+
14
+ ${G.join(";")}
15
+ ${W}`}async createStringToSign(U,w,W){const G=new this.sha256;G.update(_U.toUint8Array(W));const L=await G.digest();return`${dU}
16
+ ${U}
17
+ ${w}
18
+ ${F0.toHex(L)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const w=[];for(let L of U.split("/")){if((L==null?void 0:L.length)===0)continue;if(L===".")continue;if(L==="..")w.pop();else w.push(L)}const W=`${(U==null?void 0:U.startsWith("/"))?"/":""}${w.join("/")}${w.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return $1.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,w,W,G){const L=await this.createStringToSign(U,w,G),f=new this.sha256(await W);return f.update(_U.toUint8Array(L)),F0.toHex(await f.digest())}getSigningKey(U,w,W,G){return Uf(this.sha256,U,W,w,G||this.service)}validateResolvedCredentials(U){if(typeof U!=="object"||typeof U.accessKeyId!=="string"||typeof U.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};b(Ff,"SignatureV4");var s9=Ff,F$=b(($)=>{const U=p9($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),mL=b(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var Tf=M((SO,Mf)=>{var{defineProperty:R$,getOwnPropertyDescriptor:n9,getOwnPropertyNames:m9}=Object,i9=Object.prototype.hasOwnProperty,k=($,U)=>R$($,"name",{value:U,configurable:!0}),r9=($,U)=>{for(var w in U)R$($,w,{get:U[w],enumerable:!0})},o9=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of m9(U))if(!i9.call($,G)&&G!==w)R$($,G,{get:()=>U[G],enumerable:!(W=n9(U,G))||W.enumerable})}return $},a9=($)=>o9(R$({},"__esModule",{value:!0}),$),Qf={};r9(Qf,{AWSSDKSigV4Signer:()=>UQ,AwsSdkSigV4ASigner:()=>GQ,AwsSdkSigV4Signer:()=>iU,NODE_SIGV4A_CONFIG_OPTIONS:()=>fQ,resolveAWSSDKSigV4Config:()=>FQ,resolveAwsSdkSigV4AConfig:()=>LQ,resolveAwsSdkSigV4Config:()=>Kf,validateSigningProperties:()=>mU});Mf.exports=a9(Qf);var t9=a(),e9=a(),If=k(($)=>{var U,w;return e9.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((w=$.headers)==null?void 0:w.Date):void 0},"getDateHeader"),nU=k(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),$Q=k(($,U)=>Math.abs(nU(U).getTime()-$)>=300000,"isClockSkewed"),Xf=k(($,U)=>{const w=Date.parse($);if($Q(w,U))return w-Date.now();return U},"getUpdatedSystemClockOffset"),U1=k(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),mU=k(async($)=>{var U,w,W;const G=U1("context",$.context),L=U1("config",$.config),f=(W=(w=(U=G.endpointV2)==null?void 0:U.properties)==null?void 0:w.authSchemes)==null?void 0:W[0],Z=await U1("signer",L.signer)(f),E=$==null?void 0:$.signingRegion,I=$==null?void 0:$.signingRegionSet,X=$==null?void 0:$.signingName;return{config:L,signer:Z,signingRegion:E,signingRegionSet:I,signingName:X}},"validateSigningProperties"),zf=class ${async sign(U,w,W){var G;if(!t9.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const L=await mU(W),{config:f,signer:F}=L;let{signingRegion:Z,signingName:E}=L;const I=W.context;if(((G=I==null?void 0:I.authSchemes)==null?void 0:G.length)??0>1){const[Y,R]=I.authSchemes;if((Y==null?void 0:Y.name)==="sigv4a"&&(R==null?void 0:R.name)==="sigv4")Z=(R==null?void 0:R.signingRegion)??Z,E=(R==null?void 0:R.signingName)??E}return await F.sign(U,{signingDate:nU(f.systemClockOffset),signingRegion:Z,signingService:E})}errorHandler(U){return(w)=>{const W=w.ServerTime??If(w.$response);if(W){const G=U1("config",U.config),L=G.systemClockOffset;if(G.systemClockOffset=Xf(W,G.systemClockOffset),G.systemClockOffset!==L&&w.$metadata)w.$metadata.clockSkewCorrected=!0}throw w}}successHandler(U,w){const W=If(U);if(W){const G=U1("config",w.config);G.systemClockOffset=Xf(W,G.systemClockOffset)}}};k(zf,"AwsSdkSigV4Signer");var iU=zf,UQ=iU,wQ=a(),Jf=class $ extends iU{async sign(U,w,W){var G;if(!wQ.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:L,signer:f,signingRegion:F,signingRegionSet:Z,signingName:E}=await mU(W),X=(await((G=L.sigv4aSigningRegionSet)==null?void 0:G.call(L))??Z??[F]).join(",");return await f.sign(U,{signingDate:nU(L.systemClockOffset),signingRegion:X,signingService:E})}};k(Jf,"AwsSdkSigV4ASigner");var GQ=Jf,WQ=NU(),Rf=H$(),LQ=k(($)=>{return $.sigv4aSigningRegionSet=WQ.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),fQ={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new Rf.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector($){if($.sigv4a_signing_region_set)return($.sigv4a_signing_region_set??"").split(",").map((U)=>U.trim());throw new Rf.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},M0=NU(),Yf=Ef(),Kf=k(($)=>{let U;if($.credentials)U=M0.memoizeIdentityProvider($.credentials,M0.isIdentityExpired,M0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=M0.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=k(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:w=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:G}=$;let L;if($.signer)L=M0.normalizeProvider($.signer);else if($.regionInfoProvider)L=k(()=>M0.normalizeProvider($.region)().then(async(f)=>[await $.regionInfoProvider(f,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},f]).then(([f,F])=>{const{signingRegion:Z,signingService:E}=f;$.signingRegion=$.signingRegion||Z||F,$.signingName=$.signingName||E||$.serviceId;const I={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:G,uriEscapePath:w};return new($.signerConstructor||Yf.SignatureV4)(I)}),"signer");else L=k(async(f)=>{f=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await M0.normalizeProvider($.region)(),properties:{}},f);const{signingRegion:F,signingName:Z}=f;$.signingRegion=$.signingRegion||F,$.signingName=$.signingName||Z||$.serviceId;const E={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:G,uriEscapePath:w};return new($.signerConstructor||Yf.SignatureV4)(E)},"signer");return{...$,systemClockOffset:W,signingEscapePath:w,credentials:U,signer:L}},"resolveAwsSdkSigV4Config"),FQ=Kf});var Y$=M((RQ)=>{var ZQ=":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",Af="[: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]["+ZQ+"]*",EQ=new RegExp("^"+Af+"$"),IQ=function($,U){const w=[];let W=U.exec($);while(W){const G=[];G.startIndex=U.lastIndex-W[0].length;const L=W.length;for(let f=0;f<L;f++)G.push(W[f]);w.push(G),W=U.exec($)}return w},XQ=function($){const U=EQ.exec($);return!(U===null||typeof U==="undefined")};RQ.isExist=function($){return typeof $!=="undefined"};RQ.isEmptyObject=function($){return Object.keys($).length===0};RQ.merge=function($,U,w){if(U){const W=Object.keys(U),G=W.length;for(let L=0;L<G;L++)if(w==="strict")$[W[L]]=[U[W[L]]];else $[W[L]]=U[W[L]]}};RQ.getValue=function($){if(RQ.isExist($))return $;else return""};RQ.isName=XQ;RQ.getAllMatches=IQ;RQ.nameRegexp=Af});var oU=M((jQ)=>{function Vf($){return $===" "||$==="\t"||$==="\n"||$==="\r"}function Bf($,U){const w=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const W=$.substr(w,U-w);if(U>5&&W==="xml")return P("InvalidXml","XML declaration allowed only at the start of the document.",D($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U}function Hf($,U){if($.length>U+5&&$[U+1]==="-"&&$[U+2]==="-"){for(U+=3;U<$.length;U++)if($[U]==="-"&&$[U+1]==="-"&&$[U+2]===">"){U+=2;break}}else if($.length>U+8&&$[U+1]==="D"&&$[U+2]==="O"&&$[U+3]==="C"&&$[U+4]==="T"&&$[U+5]==="Y"&&$[U+6]==="P"&&$[U+7]==="E"){let w=1;for(U+=8;U<$.length;U++)if($[U]==="<")w++;else if($[U]===">"){if(w--,w===0)break}}else if($.length>U+9&&$[U+1]==="["&&$[U+2]==="C"&&$[U+3]==="D"&&$[U+4]==="A"&&$[U+5]==="T"&&$[U+6]==="A"&&$[U+7]==="["){for(U+=8;U<$.length;U++)if($[U]==="]"&&$[U+1]==="]"&&$[U+2]===">"){U+=2;break}}return U}function VQ($,U){let w="",W="",G=!1;for(;U<$.length;U++){if($[U]===AQ||$[U]===OQ)if(W==="")W=$[U];else if(W!==$[U]);else W="";else if($[U]===">"){if(W===""){G=!0;break}}w+=$[U]}if(W!=="")return!1;return{value:w,index:U,tagClosed:G}}function Cf($,U){const w=rU.getAllMatches($,BQ),W={};for(let G=0;G<w.length;G++){if(w[G][1].length===0)return P("InvalidAttr","Attribute '"+w[G][2]+"' has no space in starting.",w1(w[G]));else if(w[G][3]!==void 0&&w[G][4]===void 0)return P("InvalidAttr","Attribute '"+w[G][2]+"' is without value.",w1(w[G]));else if(w[G][3]===void 0&&!U.allowBooleanAttributes)return P("InvalidAttr","boolean attribute '"+w[G][2]+"' is not allowed.",w1(w[G]));const L=w[G][2];if(!qQ(L))return P("InvalidAttr","Attribute '"+L+"' is an invalid name.",w1(w[G]));if(!W.hasOwnProperty(L))W[L]=1;else return P("InvalidAttr","Attribute '"+L+"' is repeated.",w1(w[G]))}return!0}function HQ($,U){let w=/\d/;if($[U]==="x")U++,w=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(w))break}return-1}function CQ($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,HQ($,U);let w=0;for(;U<$.length;U++,w++){if($[U].match(/\w/)&&w<20)continue;if($[U]===";")break;return-1}return U}function P($,U,w){return{err:{code:$,msg:U,line:w.line||w,col:w.col}}}function qQ($){return rU.isName($)}function NQ($){return rU.isName($)}function D($,U){const w=$.substring(0,U).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}}function w1($){return $.startIndex+$[1].length}var rU=Y$(),TQ={allowBooleanAttributes:!1,unpairedTags:[]};jQ.validate=function($,U){U=Object.assign({},TQ,U);const w=[];let W=!1,G=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let L=0;L<$.length;L++)if($[L]==="<"&&$[L+1]==="?"){if(L+=2,L=Bf($,L),L.err)return L}else if($[L]==="<"){let f=L;if(L++,$[L]==="!"){L=Hf($,L);continue}else{let F=!1;if($[L]==="/")F=!0,L++;let Z="";for(;L<$.length&&$[L]!==">"&&$[L]!==" "&&$[L]!=="\t"&&$[L]!=="\n"&&$[L]!=="\r";L++)Z+=$[L];if(Z=Z.trim(),Z[Z.length-1]==="/")Z=Z.substring(0,Z.length-1),L--;if(!NQ(Z)){let X;if(Z.trim().length===0)X="Invalid space after '<'.";else X="Tag '"+Z+"' is an invalid name.";return P("InvalidTag",X,D($,L))}const E=VQ($,L);if(E===!1)return P("InvalidAttr","Attributes for '"+Z+"' have open quote.",D($,L));let I=E.value;if(L=E.index,I[I.length-1]==="/"){const X=L-I.length;I=I.substring(0,I.length-1);const Y=Cf(I,U);if(Y===!0)W=!0;else return P(Y.err.code,Y.err.msg,D($,X+Y.err.line))}else if(F)if(!E.tagClosed)return P("InvalidTag","Closing tag '"+Z+"' doesn't have proper closing.",D($,L));else if(I.trim().length>0)return P("InvalidTag","Closing tag '"+Z+"' can't have attributes or invalid starting.",D($,f));else if(w.length===0)return P("InvalidTag","Closing tag '"+Z+"' has not been opened.",D($,f));else{const X=w.pop();if(Z!==X.tagName){let Y=D($,X.tagStartPos);return P("InvalidTag","Expected closing tag '"+X.tagName+"' (opened in line "+Y.line+", col "+Y.col+") instead of closing tag '"+Z+"'.",D($,f))}if(w.length==0)G=!0}else{const X=Cf(I,U);if(X!==!0)return P(X.err.code,X.err.msg,D($,L-I.length+X.err.line));if(G===!0)return P("InvalidXml","Multiple possible root nodes found.",D($,L));else if(U.unpairedTags.indexOf(Z)!==-1);else w.push({tagName:Z,tagStartPos:f});W=!0}for(L++;L<$.length;L++)if($[L]==="<")if($[L+1]==="!"){L++,L=Hf($,L);continue}else if($[L+1]==="?"){if(L=Bf($,++L),L.err)return L}else break;else if($[L]==="&"){const X=CQ($,L);if(X==-1)return P("InvalidChar","char '&' is not expected.",D($,L));L=X}else if(G===!0&&!Vf($[L]))return P("InvalidXml","Extra text at the end",D($,L));if($[L]==="<")L--}}else{if(Vf($[L]))continue;return P("InvalidChar","char '"+$[L]+"' is not expected.",D($,L))}if(!W)return P("InvalidXml","Start tag expected.",1);else if(w.length==1)return P("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",D($,w[0].tagStartPos));else if(w.length>0)return P("InvalidXml","Invalid '"+JSON.stringify(w.map((L)=>L.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var AQ='"',OQ="'",BQ=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var Nf=M((bQ)=>{var qf={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function($,U,w){return $}},SQ=function($){return Object.assign({},qf,$)};bQ.buildOptions=SQ;bQ.defaultOptions=qf});var Sf=M((kO,Pf)=>{class jf{constructor($){this.tagname=$,this.child=[],this[":@"]={}}add($,U){if($==="__proto__")$="#__proto__";this.child.push({[$]:U})}addChild($){if($.tagname==="__proto__")$.tagname="#__proto__";if($[":@"]&&Object.keys($[":@"]).length>0)this.child.push({[$.tagname]:$.child,[":@"]:$[":@"]});else this.child.push({[$.tagname]:$.child})}}Pf.exports=jf});var hf=M((cO,bf)=>{function cQ($,U){const w={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let W=1,G=!1,L=!1,f="";for(;U<$.length;U++)if($[U]==="<"&&!L){if(G&&uQ($,U)){if(U+=7,[entityName,val,U]=vQ($,U+1),val.indexOf("&")===-1)w[gQ(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(G&&yQ($,U))U+=8;else if(G&&_Q($,U))U+=8;else if(G&&dQ($,U))U+=9;else if(xQ)L=!0;else throw new Error("Invalid DOCTYPE");W++,f=""}else if($[U]===">"){if(L){if($[U-1]==="-"&&$[U-2]==="-")L=!1,W--}else W--;if(W===0)break}else if($[U]==="[")G=!0;else f+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:w,i:U}}function vQ($,U){let w="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)w+=$[U];if(w=w.trim(),w.indexOf(" ")!==-1)throw new Error("External entites are not supported");const W=$[U++];let G="";for(;U<$.length&&$[U]!==W;U++)G+=$[U];return[w,G,U]}function xQ($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1}function uQ($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="N"&&$[U+4]==="T"&&$[U+5]==="I"&&$[U+6]==="T"&&$[U+7]==="Y")return!0;return!1}function yQ($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="L"&&$[U+4]==="E"&&$[U+5]==="M"&&$[U+6]==="E"&&$[U+7]==="N"&&$[U+8]==="T")return!0;return!1}function _Q($,U){if($[U+1]==="!"&&$[U+2]==="A"&&$[U+3]==="T"&&$[U+4]==="T"&&$[U+5]==="L"&&$[U+6]==="I"&&$[U+7]==="S"&&$[U+8]==="T")return!0;return!1}function dQ($,U){if($[U+1]==="!"&&$[U+2]==="N"&&$[U+3]==="O"&&$[U+4]==="T"&&$[U+5]==="A"&&$[U+6]==="T"&&$[U+7]==="I"&&$[U+8]==="O"&&$[U+9]==="N")return!0;return!1}function gQ($){if(kQ.isName($))return $;else throw new Error(`Invalid entity name ${$}`)}var kQ=Y$();bf.exports=cQ});var kf=M((vO,Df)=>{function nQ($,U={}){if(U=Object.assign({},sQ,U),!$||typeof $!=="string")return $;let w=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(w))return $;else if(U.hex&&pQ.test(w))return Number.parseInt(w,16);else{const W=lQ.exec(w);if(W){const G=W[1],L=W[2];let f=mQ(W[3]);const F=W[4]||W[6];if(!U.leadingZeros&&L.length>0&&G&&w[2]!==".")return $;else if(!U.leadingZeros&&L.length>0&&!G&&w[1]!==".")return $;else{const Z=Number(w),E=""+Z;if(E.search(/[eE]/)!==-1)if(U.eNotation)return Z;else return $;else if(F)if(U.eNotation)return Z;else return $;else if(w.indexOf(".")!==-1)if(E==="0"&&f==="")return Z;else if(E===f)return Z;else if(G&&E==="-"+f)return Z;else return $;if(L)if(f===E)return Z;else if(G+f===E)return Z;else return $;if(w===E)return Z;else if(w===G+E)return Z;return $}}else return $}}function mQ($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $}var pQ=/^[-+]?0x[a-fA-F0-9]+$/,lQ=/^([\-\+])?(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 sQ={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};Df.exports=nQ});var uf=M((xO,xf)=>{function oQ($){const U=Object.keys($);for(let w=0;w<U.length;w++){const W=U[w];this.lastEntities[W]={regex:new RegExp("&"+W+";","g"),val:$[W]}}}function aQ($,U,w,W,G,L,f){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!f)$=this.replaceEntitiesValue($);const F=this.options.tagValueProcessor(U,$,w,G,L);if(F===null||F===void 0)return $;else if(typeof F!==typeof $||F!==$)return F;else if(this.options.trimValues)return tU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return tU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}}function tQ($){if(this.options.removeNSPrefix){const U=$.split(":"),w=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=w+U[1]}return $}function $7($,U,w){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=cf.getAllMatches($,eQ),G=W.length,L={};for(let f=0;f<G;f++){const F=this.resolveNameSpace(W[f][1]);let Z=W[f][4],E=this.options.attributeNamePrefix+F;if(F.length){if(this.options.transformAttributeName)E=this.options.transformAttributeName(E);if(E==="__proto__")E="#__proto__";if(Z!==void 0){if(this.options.trimValues)Z=Z.trim();Z=this.replaceEntitiesValue(Z);const I=this.options.attributeValueProcessor(F,Z,U);if(I===null||I===void 0)L[E]=Z;else if(typeof I!==typeof Z||I!==Z)L[E]=I;else L[E]=tU(Z,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)L[E]=!0}}if(!Object.keys(L).length)return;if(this.options.attributesGroupName){const f={};return f[this.options.attributesGroupName]=L,f}return L}}function w7($,U,w){const W=this.options.updateTag(U.tagname,w,U[":@"]);if(W===!1);else if(typeof W==="string")U.tagname=W,$.addChild(U);else $.addChild(U)}function W7($,U,w,W){if($){if(W===void 0)W=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,w,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,W),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $}function L7($,U,w){const W="*."+w;for(let G in $){const L=$[G];if(W===L||U===L)return!0}return!1}function f7($,U,w=">"){let W,G="";for(let L=U;L<$.length;L++){let f=$[L];if(W){if(f===W)W=""}else if(f==='"'||f==="'")W=f;else if(f===w[0])if(w[1]){if($[L+1]===w[1])return{data:G,index:L}}else return{data:G,index:L};else if(f==="\t")f=" ";G+=f}}function T0($,U,w,W){const G=$.indexOf(U,w);if(G===-1)throw new Error(W);else return G+U.length-1}function aU($,U,w,W=">"){const G=f7($,U+1,W);if(!G)return;let L=G.data;const f=G.index,F=L.search(/\s/);let Z=L,E=!0;if(F!==-1)Z=L.substring(0,F),L=L.substring(F+1).trimStart();const I=Z;if(w){const X=Z.indexOf(":");if(X!==-1)Z=Z.substr(X+1),E=Z!==G.data.substr(X+1)}return{tagName:Z,tagExp:L,closeIndex:f,attrExpPresent:E,rawTagName:I}}function F7($,U,w){const W=w;let G=1;for(;w<$.length;w++)if($[w]==="<")if($[w+1]==="/"){const L=T0($,">",w,`${U} is not closed`);if($.substring(w+2,L).trim()===U){if(G--,G===0)return{tagContent:$.substring(W,w),i:L}}w=L}else if($[w+1]==="?")w=T0($,"?>",w+1,"StopNode is not closed.");else if($.substr(w+1,3)==="!--")w=T0($,"-->",w+3,"StopNode is not closed.");else if($.substr(w+1,2)==="![")w=T0($,"]]>",w,"StopNode is not closed.")-2;else{const L=aU($,w,">");if(L){if((L&&L.tagName)===U&&L.tagExp[L.tagExp.length-1]!=="/")G++;w=L.closeIndex}}}function tU($,U,w){if(U&&typeof $==="string"){const W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return rQ($,w)}else if(cf.isExist($))return $;else return""}var cf=Y$(),G1=Sf(),iQ=hf(),rQ=kf();class vf{constructor($){this.options=$,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(U,w)=>String.fromCharCode(Number.parseInt(w,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(U,w)=>String.fromCharCode(Number.parseInt(w,16))}},this.addExternalEntities=oQ,this.parseXml=U7,this.parseTextData=aQ,this.resolveNameSpace=tQ,this.buildAttributesMap=$7,this.isItStopNode=L7,this.replaceEntitiesValue=G7,this.readStopNodeData=F7,this.saveTextToParentTag=W7,this.addChild=w7}}var eQ=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),U7=function($){$=$.replace(/\r\n?/g,"\n");const U=new G1("!xml");let w=U,W="",G="";for(let L=0;L<$.length;L++)if($[L]==="<")if($[L+1]==="/"){const F=T0($,">",L,"Closing Tag is not closed.");let Z=$.substring(L+2,F).trim();if(this.options.removeNSPrefix){const X=Z.indexOf(":");if(X!==-1)Z=Z.substr(X+1)}if(this.options.transformTagName)Z=this.options.transformTagName(Z);if(w)W=this.saveTextToParentTag(W,w,G);const E=G.substring(G.lastIndexOf(".")+1);if(Z&&this.options.unpairedTags.indexOf(Z)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${Z}>`);let I=0;if(E&&this.options.unpairedTags.indexOf(E)!==-1)I=G.lastIndexOf(".",G.lastIndexOf(".")-1),this.tagsNodeStack.pop();else I=G.lastIndexOf(".");G=G.substring(0,I),w=this.tagsNodeStack.pop(),W="",L=F}else if($[L+1]==="?"){let F=aU($,L,!1,"?>");if(!F)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,w,G),this.options.ignoreDeclaration&&F.tagName==="?xml"||this.options.ignorePiTags);else{const Z=new G1(F.tagName);if(Z.add(this.options.textNodeName,""),F.tagName!==F.tagExp&&F.attrExpPresent)Z[":@"]=this.buildAttributesMap(F.tagExp,G,F.tagName);this.addChild(w,Z,G)}L=F.closeIndex+1}else if($.substr(L+1,3)==="!--"){const F=T0($,"-->",L+4,"Comment is not closed.");if(this.options.commentPropName){const Z=$.substring(L+4,F-2);W=this.saveTextToParentTag(W,w,G),w.add(this.options.commentPropName,[{[this.options.textNodeName]:Z}])}L=F}else if($.substr(L+1,2)==="!D"){const F=iQ($,L);this.docTypeEntities=F.entities,L=F.i}else if($.substr(L+1,2)==="!["){const F=T0($,"]]>",L,"CDATA is not closed.")-2,Z=$.substring(L+9,F);W=this.saveTextToParentTag(W,w,G);let E=this.parseTextData(Z,w.tagname,G,!0,!1,!0,!0);if(E==null)E="";if(this.options.cdataPropName)w.add(this.options.cdataPropName,[{[this.options.textNodeName]:Z}]);else w.add(this.options.textNodeName,E);L=F+2}else{let F=aU($,L,this.options.removeNSPrefix),Z=F.tagName;const E=F.rawTagName;let{tagExp:I,attrExpPresent:X,closeIndex:Y}=F;if(this.options.transformTagName)Z=this.options.transformTagName(Z);if(w&&W){if(w.tagname!=="!xml")W=this.saveTextToParentTag(W,w,G,!1)}const R=w;if(R&&this.options.unpairedTags.indexOf(R.tagname)!==-1)w=this.tagsNodeStack.pop(),G=G.substring(0,G.lastIndexOf("."));if(Z!==U.tagname)G+=G?"."+Z:Z;if(this.isItStopNode(this.options.stopNodes,G,Z)){let Q="";if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(Z[Z.length-1]==="/")Z=Z.substr(0,Z.length-1),G=G.substr(0,G.length-1),I=Z;else I=I.substr(0,I.length-1);L=F.closeIndex}else if(this.options.unpairedTags.indexOf(Z)!==-1)L=F.closeIndex;else{const K=this.readStopNodeData($,E,Y+1);if(!K)throw new Error(`Unexpected end of ${E}`);L=K.i,Q=K.tagContent}const A=new G1(Z);if(Z!==I&&X)A[":@"]=this.buildAttributesMap(I,G,Z);if(Q)Q=this.parseTextData(Q,Z,G,!0,X,!0,!0);G=G.substr(0,G.lastIndexOf(".")),A.add(this.options.textNodeName,Q),this.addChild(w,A,G)}else{if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(Z[Z.length-1]==="/")Z=Z.substr(0,Z.length-1),G=G.substr(0,G.length-1),I=Z;else I=I.substr(0,I.length-1);if(this.options.transformTagName)Z=this.options.transformTagName(Z);const Q=new G1(Z);if(Z!==I&&X)Q[":@"]=this.buildAttributesMap(I,G,Z);this.addChild(w,Q,G),G=G.substr(0,G.lastIndexOf("."))}else{const Q=new G1(Z);if(this.tagsNodeStack.push(w),Z!==I&&X)Q[":@"]=this.buildAttributesMap(I,G,Z);this.addChild(w,Q,G),w=Q}W="",L=Y}}else W+=$[L];return U.child},G7=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){const w=this.docTypeEntities[U];$=$.replace(w.regx,w.val)}for(let U in this.lastEntities){const w=this.lastEntities[U];$=$.replace(w.regex,w.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){const w=this.htmlEntities[U];$=$.replace(w.regex,w.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};xf.exports=vf});var _f=M((R7)=>{function Z7($,U){return yf($,U)}function yf($,U,w){let W;const G={};for(let L=0;L<$.length;L++){const f=$[L],F=E7(f);let Z="";if(w===void 0)Z=F;else Z=w+"."+F;if(F===U.textNodeName)if(W===void 0)W=f[F];else W+=""+f[F];else if(F===void 0)continue;else if(f[F]){let E=yf(f[F],U,Z);const I=X7(E,U);if(f[":@"])I7(E,f[":@"],Z,U);else if(Object.keys(E).length===1&&E[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)E=E[U.textNodeName];else if(Object.keys(E).length===0)if(U.alwaysCreateTextNode)E[U.textNodeName]="";else E="";if(G[F]!==void 0&&G.hasOwnProperty(F)){if(!Array.isArray(G[F]))G[F]=[G[F]];G[F].push(E)}else if(U.isArray(F,Z,I))G[F]=[E];else G[F]=E}}if(typeof W==="string"){if(W.length>0)G[U.textNodeName]=W}else if(W!==void 0)G[U.textNodeName]=W;return G}function E7($){const U=Object.keys($);for(let w=0;w<U.length;w++){const W=U[w];if(W!==":@")return W}}function I7($,U,w,W){if(U){const G=Object.keys(U),L=G.length;for(let f=0;f<L;f++){const F=G[f];if(W.isArray(F,w+"."+F,!0,!0))$[F]=[U[F]];else $[F]=U[F]}}}function X7($,U){const{textNodeName:w}=U,W=Object.keys($).length;if(W===0)return!0;if(W===1&&($[w]||typeof $[w]==="boolean"||$[w]===0))return!0;return!1}R7.prettify=Z7});var pf=M((yO,gf)=>{var{buildOptions:Q7}=Nf(),z7=uf(),{prettify:J7}=_f(),K7=oU();class df{constructor($){this.externalEntities={},this.options=Q7($)}parse($,U){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(U){if(U===!0)U={};const G=K7.validate($,U);if(G!==!0)throw Error(`${G.err.msg}:${G.err.line}:${G.err.col}`)}const w=new z7(this.options);w.addExternalEntities(this.externalEntities);const W=w.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return J7(W,this.options)}addEntity($,U){if(U.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if($.indexOf("&")!==-1||$.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(U==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=U}}gf.exports=df});var rf=M((_O,mf)=>{function M7($,U){let w="";if(U.format&&U.indentBy.length>0)w="\n";return sf($,U,"",w)}function sf($,U,w,W){let G="",L=!1;for(let f=0;f<$.length;f++){const F=$[f],Z=T7(F);if(Z===void 0)continue;let E="";if(w.length===0)E=Z;else E=`${w}.${Z}`;if(Z===U.textNodeName){let Q=F[Z];if(!A7(E,U))Q=U.tagValueProcessor(Z,Q),Q=nf(Q,U);if(L)G+=W;G+=Q,L=!1;continue}else if(Z===U.cdataPropName){if(L)G+=W;G+=`<![CDATA[${F[Z][0][U.textNodeName]}]]>`,L=!1;continue}else if(Z===U.commentPropName){G+=W+`<!--${F[Z][0][U.textNodeName]}-->`,L=!0;continue}else if(Z[0]==="?"){const Q=lf(F[":@"],U),A=Z==="?xml"?"":W;let K=F[Z][0][U.textNodeName];K=K.length!==0?" "+K:"",G+=A+`<${Z}${K}${Q}?>`,L=!0;continue}let I=W;if(I!=="")I+=U.indentBy;const X=lf(F[":@"],U),Y=W+`<${Z}${X}`,R=sf(F[Z],U,E,I);if(U.unpairedTags.indexOf(Z)!==-1)if(U.suppressUnpairedNode)G+=Y+">";else G+=Y+"/>";else if((!R||R.length===0)&&U.suppressEmptyNode)G+=Y+"/>";else if(R&&R.endsWith(">"))G+=Y+`>${R}${W}</${Z}>`;else{if(G+=Y+">",R&&W!==""&&(R.includes("/>")||R.includes("</")))G+=W+U.indentBy+R+W;else G+=R;G+=`</${Z}>`}L=!0}return G}function T7($){const U=Object.keys($);for(let w=0;w<U.length;w++){const W=U[w];if(!$.hasOwnProperty(W))continue;if(W!==":@")return W}}function lf($,U){let w="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let G=U.attributeValueProcessor(W,$[W]);if(G=nf(G,U),G===!0&&U.suppressBooleanAttributes)w+=` ${W.substr(U.attributeNamePrefix.length)}`;else w+=` ${W.substr(U.attributeNamePrefix.length)}="${G}"`}return w}function A7($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let w=$.substr($.lastIndexOf(".")+1);for(let W in U.stopNodes)if(U.stopNodes[W]===$||U.stopNodes[W]==="*."+w)return!0;return!1}function nf($,U){if($&&$.length>0&&U.processEntities)for(let w=0;w<U.entities.length;w++){const W=U.entities[w];$=$.replace(W.regex,W.val)}return $}mf.exports=M7});var af=M((dO,of)=>{function Z0($){if(this.options=Object.assign({},V7,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=C7;if(this.processTextOrObjNode=B7,this.options.format)this.indentate=H7,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function B7($,U,w){const W=this.j2x($,w+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,W.attrStr,w);else return this.buildObjectNode(W.val,U,W.attrStr,w)}function H7($){return this.options.indentBy.repeat($)}function C7($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1}var O7=rf(),V7={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&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};Z0.prototype.build=function($){if(this.options.preserveOrder)return O7($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};Z0.prototype.j2x=function($,U){let w="",W="";for(let G in $){if(!Object.prototype.hasOwnProperty.call($,G))continue;if(typeof $[G]==="undefined"){if(this.isAttribute(G))W+=""}else if($[G]===null)if(this.isAttribute(G))W+="";else if(G[0]==="?")W+=this.indentate(U)+"<"+G+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+G+"/"+this.tagEndChar;else if($[G]instanceof Date)W+=this.buildTextValNode($[G],G,"",U);else if(typeof $[G]!=="object"){const L=this.isAttribute(G);if(L)w+=this.buildAttrPairStr(L,""+$[G]);else if(G===this.options.textNodeName){let f=this.options.tagValueProcessor(G,""+$[G]);W+=this.replaceEntitiesValue(f)}else W+=this.buildTextValNode($[G],G,"",U)}else if(Array.isArray($[G])){const L=$[G].length;let f="",F="";for(let Z=0;Z<L;Z++){const E=$[G][Z];if(typeof E==="undefined");else if(E===null)if(G[0]==="?")W+=this.indentate(U)+"<"+G+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+G+"/"+this.tagEndChar;else if(typeof E==="object")if(this.options.oneListGroup){const I=this.j2x(E,U+1);if(f+=I.val,this.options.attributesGroupName&&E.hasOwnProperty(this.options.attributesGroupName))F+=I.attrStr}else f+=this.processTextOrObjNode(E,G,U);else if(this.options.oneListGroup){let I=this.options.tagValueProcessor(G,E);I=this.replaceEntitiesValue(I),f+=I}else f+=this.buildTextValNode(E,G,"",U)}if(this.options.oneListGroup)f=this.buildObjectNode(f,G,F,U);W+=f}else if(this.options.attributesGroupName&&G===this.options.attributesGroupName){const L=Object.keys($[G]),f=L.length;for(let F=0;F<f;F++)w+=this.buildAttrPairStr(L[F],""+$[G][L[F]])}else W+=this.processTextOrObjNode($[G],G,U)}return{attrStr:w,val:W}};Z0.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};Z0.prototype.buildObjectNode=function($,U,w,W){if($==="")if(U[0]==="?")return this.indentate(W)+"<"+U+w+"?"+this.tagEndChar;else return this.indentate(W)+"<"+U+w+this.closeTag(U)+this.tagEndChar;else{let G="</"+U+this.tagEndChar,L="";if(U[0]==="?")L="?",G="";if((w||w==="")&&$.indexOf("<")===-1)return this.indentate(W)+"<"+U+w+L+">"+$+G;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&L.length===0)return this.indentate(W)+`<!--${$}-->`+this.newLine;else return this.indentate(W)+"<"+U+w+L+this.tagEndChar+$+this.indentate(W)+G}};Z0.prototype.closeTag=function($){let U="";if(this.options.unpairedTags.indexOf($)!==-1){if(!this.options.suppressUnpairedNode)U="/"}else if(this.options.suppressEmptyNode)U="/";else U=`></${$}`;return U};Z0.prototype.buildTextValNode=function($,U,w,W){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(W)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(W)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(W)+"<"+U+w+"?"+this.tagEndChar;else{let G=this.options.tagValueProcessor(U,$);if(G=this.replaceEntitiesValue(G),G==="")return this.indentate(W)+"<"+U+w+this.closeTag(U)+this.tagEndChar;else return this.indentate(W)+"<"+U+w+">"+G+"</"+U+this.tagEndChar}};Z0.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const w=this.options.entities[U];$=$.replace(w.regex,w.val)}return $};of.exports=Z0});var ef=M((gO,tf)=>{var q7=oU(),N7=pf(),j7=af();tf.exports={XMLParser:N7,XMLValidator:q7,XMLBuilder:j7}});var LF=M((pO,WF)=>{var{defineProperty:Q$,getOwnPropertyDescriptor:P7,getOwnPropertyNames:S7}=Object,b7=Object.prototype.hasOwnProperty,c=($,U)=>Q$($,"name",{value:U,configurable:!0}),h7=($,U)=>{for(var w in U)Q$($,w,{get:U[w],enumerable:!0})},D7=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of S7(U))if(!b7.call($,G)&&G!==w)Q$($,G,{get:()=>U[G],enumerable:!(W=P7(U,G))||W.enumerable})}return $},k7=($)=>D7(Q$({},"__esModule",{value:!0}),$),$F={};h7($F,{_toBool:()=>v7,_toNum:()=>x7,_toStr:()=>c7,awsExpectUnion:()=>y7,loadRestJsonErrorCode:()=>g7,loadRestXmlErrorCode:()=>n7,parseJsonBody:()=>wF,parseJsonErrorBody:()=>d7,parseXmlBody:()=>GF,parseXmlErrorBody:()=>s7});WF.exports=k7($F);var c7=c(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){const U=new Error(`Received number ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}if(typeof $==="boolean"){const U=new Error(`Received boolean ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}return $},"_toStr"),v7=c(($)=>{if($==null)return $;if(typeof $==="string"){const U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){const w=new Error(`Received string "${$}" where a boolean was expected.`);w.name="Warning",console.warn(w)}return $!==""&&U!=="false"}return $},"_toBool"),x7=c(($)=>{if($==null)return $;if(typeof $==="string"){const U=Number($);if(U.toString()!==$){const w=new Error(`Received string "${$}" where a number was expected.`);return w.name="Warning",console.warn(w),$}return U}return $},"_toNum"),u7=P0(),y7=c(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return u7.expectUnion($)},"awsExpectUnion"),_7=P0(),UF=c(($,U)=>_7.collectBody($,U).then((w)=>U.utf8Encoder(w)),"collectBodyString"),wF=c(($,U)=>UF($,U).then((w)=>{if(w.length)try{return JSON.parse(w)}catch(W){if((W==null?void 0:W.name)==="SyntaxError")Object.defineProperty(W,"$responseBodyText",{value:w});throw W}return{}}),"parseJsonBody"),d7=c(async($,U)=>{const w=await wF($,U);return w.message=w.message??w.Message,w},"parseJsonErrorBody"),g7=c(($,U)=>{const w=c((L,f)=>Object.keys(L).find((F)=>F.toLowerCase()===f.toLowerCase()),"findKey"),W=c((L)=>{let f=L;if(typeof f==="number")f=f.toString();if(f.indexOf(",")>=0)f=f.split(",")[0];if(f.indexOf(":")>=0)f=f.split(":")[0];if(f.indexOf("#")>=0)f=f.split("#")[1];return f},"sanitizeErrorCode"),G=w($.headers,"x-amzn-errortype");if(G!==void 0)return W($.headers[G]);if(U.code!==void 0)return W(U.code);if(U.__type!==void 0)return W(U.__type)},"loadRestJsonErrorCode"),p7=P0(),l7=ef(),GF=c(($,U)=>UF($,U).then((w)=>{if(w.length){const W=new l7.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(Z,E)=>E.trim()===""&&E.includes("\n")?"":void 0});W.addEntity("#xD","\r"),W.addEntity("#10","\n");let G;try{G=W.parse(w,!0)}catch(Z){if(Z&&typeof Z==="object")Object.defineProperty(Z,"$responseBodyText",{value:w});throw Z}const L="#text",f=Object.keys(G)[0],F=G[f];if(F[L])F[f]=F[L],delete F[L];return p7.getValueFromTextNode(F)}return{}}),"parseXmlBody"),s7=c(async($,U)=>{const w=await GF($,U);if(w.Error)w.Error.message=w.Error.message??w.Error.Message;return w},"parseXmlErrorBody"),n7=c(($,U)=>{var w;if(((w=U==null?void 0:U.Error)==null?void 0:w.Code)!==void 0)return U.Error.Code;if((U==null?void 0:U.Code)!==void 0)return U.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var m7=M((W1)=>{Object.defineProperty(W1,"__esModule",{value:!0});var eU=yL();eU.__exportStar(pL(),W1);eU.__exportStar(Tf(),W1);eU.__exportStar(LF(),W1)});function Ez($){return $}var MF=($)=>(U)=>async(w)=>{if(!x.isInstance(w.request))return U(w);const{request:W}=w,{handlerProtocol:G=""}=$.requestHandler.metadata||{};if(G.indexOf("h2")>=0&&!W.headers[":authority"])delete W.headers.host,W.headers[":authority"]=W.hostname+(W.port?":"+W.port:"");else if(!W.headers.host){let L=W.hostname;if(W.port!=null)L+=`:${W.port}`;W.headers.host=L}return U(w)},TF={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Iz=($)=>({applyToStack:(U)=>{U.add(MF($),TF)}});var AF=()=>($,U)=>async(w)=>{try{const W=await $(w),{clientName:G,commandName:L,logger:f,dynamoDbDocumentClientOptions:F={}}=U,{overrideInputFilterSensitiveLog:Z,overrideOutputFilterSensitiveLog:E}=F,I=Z??U.inputFilterSensitiveLog,X=E??U.outputFilterSensitiveLog,{$metadata:Y,...R}=W.output;return f?.info?.({clientName:G,commandName:L,input:I(w.input),output:X(R),metadata:Y}),W}catch(W){const{clientName:G,commandName:L,logger:f,dynamoDbDocumentClientOptions:F={}}=U,{overrideInputFilterSensitiveLog:Z}=F,E=Z??U.inputFilterSensitiveLog;throw f?.error?.({clientName:G,commandName:L,input:E(w.input),error:W,metadata:W.$metadata}),W}},OF={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Rz=($)=>({applyToStack:(U)=>{U.add(AF(),OF)}});var Ww="X-Amzn-Trace-Id",VF="AWS_LAMBDA_FUNCTION_NAME",BF="_X_AMZN_TRACE_ID",HF=($)=>(U)=>async(w)=>{const{request:W}=w;if(!x.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(Ww))return U(w);const G=process.env[VF],L=process.env[BF],f=(F)=>typeof F==="string"&&F.length>0;if(f(G)&&f(L))W.headers[Ww]=L;return U({...w,request:W})},CF={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Kz=($)=>({applyToStack:(U)=>{U.add(HF($),CF)}});function Tz($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}var qF=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}$"),c0=($)=>qF.test($)||$.startsWith("[")&&$.endsWith("]");var NF=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),v0=($,U=!1)=>{if(!U)return NF.test($);const w=$.split(".");for(let W of w)if(!v0(W))return!1;return!0};var x0={};var r="endpoints";function u($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${u($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(u).join(", ")})`;return JSON.stringify($,null,2)}class H extends Error{constructor($){super($);this.name="EndpointError"}}var Lw=($,U)=>$===U;var fw=($)=>{const U=$.split("."),w=[];for(let W of U){const G=W.indexOf("[");if(G!==-1){if(W.indexOf("]")!==W.length-1)throw new H(`Path: '${$}' does not end with ']'`);const L=W.slice(G+1,-1);if(Number.isNaN(parseInt(L)))throw new H(`Invalid array index: '${L}' in path: '${$}'`);if(G!==0)w.push(W.slice(0,G));w.push(L)}else w.push(W)}return w};var L1=($,U)=>fw(U).reduce((w,W)=>{if(typeof w!=="object")throw new H(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(w))return w[parseInt(W)];return w[W]},$);var Fw=($)=>$!=null;var Zw=($)=>!$;var f1=o(A0(),1);var z$={[f1.EndpointURLScheme.HTTP]:80,[f1.EndpointURLScheme.HTTPS]:443},Ew=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:Y,port:R,protocol:Q="",path:A="",query:K={}}=$,z=new URL(`${Q}//${Y}${R?`:${R}`:""}${A}`);return z.search=Object.entries(K).map(([T,O])=>`${T}=${O}`).join("&"),z}return new URL($)}catch(Y){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const w=U.href,{host:W,hostname:G,pathname:L,protocol:f,search:F}=U;if(F)return null;const Z=f.slice(0,-1);if(!Object.values(f1.EndpointURLScheme).includes(Z))return null;const E=c0(G),I=w.includes(`${W}:${z$[Z]}`)||typeof $==="string"&&$.includes(`${W}:${z$[Z]}`),X=`${W}${I?`:${z$[Z]}`:""}`;return{scheme:Z,authority:X,path:L,normalizedPath:L.endsWith("/")?L:`${L}/`,isIp:E}};var Iw=($,U)=>$===U;var Xw=($,U,w,W)=>{if(U>=w||$.length<w)return null;if(!W)return $.substring(U,w);return $.substring($.length-w,$.length-U)};var Rw=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var Yw={booleanEquals:Lw,getAttr:L1,isSet:Fw,isValidHostLabel:v0,not:Zw,parseURL:Ew,stringEquals:Iw,substring:Xw,uriEncode:Rw};var F1=($,U)=>{const w=[],W={...U.endpointParams,...U.referenceRecord};let G=0;while(G<$.length){const L=$.indexOf("{",G);if(L===-1){w.push($.slice(G));break}w.push($.slice(G,L));const f=$.indexOf("}",L);if(f===-1){w.push($.slice(L));break}if($[L+1]==="{"&&$[f+1]==="}")w.push($.slice(L+1,f)),G=f+2;const F=$.substring(L+1,f);if(F.includes("#")){const[Z,E]=F.split("#");w.push(L1(W[Z],E))}else w.push(W[F]);G=f+1}return w.join("")};var Qw=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var U0=($,U,w)=>{if(typeof $==="string")return F1($,w);else if($.fn)return Z1($,w);else if($.ref)return Qw($,w);throw new H(`'${U}': ${String($)} is not a string, function or reference.`)};var Z1=({fn:$,argv:U},w)=>{const W=U.map((L)=>["boolean","number"].includes(typeof L)?L:U0(L,"arg",w)),G=$.split(".");if(G[0]in x0&&G[1]!=null)return x0[G[0]][G[1]](...W);return Yw[$](...W)};var zw=({assign:$,...U},w)=>{if($&&$ in w.referenceRecord)throw new H(`'${$}' is already defined in Reference Record.`);const W=Z1(U,w);return w.logger?.debug?.(`${r} evaluateCondition: ${u(U)} = ${u(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var O0=($=[],U)=>{const w={};for(let W of $){const{result:G,toAssign:L}=zw(W,{...U,referenceRecord:{...U.referenceRecord,...w}});if(!G)return{result:G};if(L)w[L.name]=L.value,U.logger?.debug?.(`${r} assign: ${L.name} := ${u(L.value)}`)}return{result:!0,referenceRecord:w}};var Jw=($,U)=>Object.entries($).reduce((w,[W,G])=>({...w,[W]:G.map((L)=>{const f=U0(L,"Header value entry",U);if(typeof f!=="string")throw new H(`Header '${W}' value '${f}' is not a string`);return f})}),{});var J$=($,U)=>{if(Array.isArray($))return $.map((w)=>J$(w,U));switch(typeof $){case"string":return F1($,U);case"object":if($===null)throw new H(`Unexpected endpoint property: ${$}`);return E1($,U);case"boolean":return $;default:throw new H(`Unexpected endpoint property type: ${typeof $}`)}};var E1=($,U)=>Object.entries($).reduce((w,[W,G])=>({...w,[W]:J$(G,U)}),{});var Kw=($,U)=>{const w=U0($,"Endpoint URL",U);if(typeof w==="string")try{return new URL(w)}catch(W){throw console.error(`Failed to construct URL with ${w}`,W),W}throw new H(`Endpoint URL must be a string, got ${typeof w}`)};var Mw=($,U)=>{const{conditions:w,endpoint:W}=$,{result:G,referenceRecord:L}=O0(w,U);if(!G)return;const f={...U,referenceRecord:{...U.referenceRecord,...L}},{url:F,properties:Z,headers:E}=W;return U.logger?.debug?.(`${r} Resolving endpoint from template: ${u(W)}`),{...E!=null&&{headers:Jw(E,f)},...Z!=null&&{properties:E1(Z,f)},url:Kw(F,f)}};var Tw=($,U)=>{const{conditions:w,error:W}=$,{result:G,referenceRecord:L}=O0(w,U);if(!G)return;throw new H(U0(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...L}}))};var Aw=($,U)=>{const{conditions:w,rules:W}=$,{result:G,referenceRecord:L}=O0(w,U);if(!G)return;return I1(W,{...U,referenceRecord:{...U.referenceRecord,...L}})};var I1=($,U)=>{for(let w of $)if(w.type==="endpoint"){const W=Mw(w,U);if(W)return W}else if(w.type==="error")Tw(w,U);else if(w.type==="tree"){const W=Aw(w,U);if(W)return W}else throw new H(`Unknown endpoint rule: ${w}`);throw new H("Rules evaluation failed")};var jF=($,U)=>{const{endpointParams:w,logger:W}=U,{parameters:G,rules:L}=$;U.logger?.debug?.(`${r} Initial EndpointParams: ${u(w)}`);const f=Object.entries(G).filter(([,E])=>E.default!=null).map(([E,I])=>[E,I.default]);if(f.length>0)for(let[E,I]of f)w[E]=w[E]??I;const F=Object.entries(G).filter(([,E])=>E.required).map(([E])=>E);for(let E of F)if(w[E]==null)throw new H(`Missing required parameter: '${E}'`);const Z=I1(L,{endpointParams:w,logger:W,referenceRecord:{}});if(U.endpointParams?.Endpoint)try{const E=new URL(U.endpointParams.Endpoint),{protocol:I,port:X}=E;Z.url.protocol=I,Z.url.port=X}catch(E){}return U.logger?.debug?.(`${r} Resolved endpoint: ${u(Z)}`),Z};var K$=($,U=!1)=>{if(U){for(let w of $.split("."))if(!K$(w))return!1;return!0}if(!v0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(c0($))return!1;return!0};var Ow=($)=>{const U=$.split(":");if(U.length<6)return null;const[w,W,G,L,f,...F]=U;if(w!=="arn"||W===""||G===""||F.join(":")==="")return null;const Z=F.map((E)=>E.split("/")).flat();return{partition:W,service:G,region:L,accountId:f,resourceId:Z}};var Vw={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)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};var SF=Vw,bF="",Bw=($)=>{const{partitions:U}=SF;for(let W of U){const{regions:G,outputs:L}=W;for(let[f,F]of Object.entries(G))if(f===$)return{...L,...F}}for(let W of U){const{regionRegex:G,outputs:L}=W;if(new RegExp(G).test($))return{...L}}const w=U.find((W)=>W.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 Hw=()=>bF;var hF={isVirtualHostableS3Bucket:K$,parseArn:Ow,partition:Bw};x0.aws=hF;var M$="user-agent",X1="x-amz-user-agent",T$=" ",R1="/",Cw=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,qw=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,A$="-";var DF=($)=>(U,w)=>async(W)=>{const{request:G}=W;if(!x.isInstance(G))return U(W);const{headers:L}=G,f=w?.userAgent?.map(O$)||[],F=(await $.defaultUserAgentProvider()).map(O$),Z=$?.customUserAgent?.map(O$)||[],E=Hw(),I=(E?[E]:[]).concat([...F,...f,...Z]).join(T$),X=[...F.filter((Y)=>Y.startsWith("aws-sdk-")),...Z].join(T$);if($.runtime!=="browser"){if(X)L[X1]=L[X1]?`${L[M$]} ${X}`:X;L[M$]=I}else L[X1]=I;return U({...W,request:G})},O$=($)=>{const U=$[0].split(R1).map((f)=>f.replace(Cw,A$)).join(R1),w=$[1]?.replace(qw,A$),W=U.indexOf(R1),G=U.substring(0,W);let L=U.substring(W+1);if(G==="api")L=L.toLowerCase();return[G,L,w].filter((f)=>f&&f.length>0).reduce((f,F,Z)=>{switch(Z){case 0:return F;case 1:return`${f}/${F}`;default:return`${f}#${F}`}},"")},kF={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},tK=($)=>({applyToStack:(U)=>{U.add(DF($),kF)}});var Y1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var V$=($)=>Y1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var ZM=($)=>{const{region:U,useFipsEndpoint:w}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return V$(U);const W=await U();return V$(W)},useFipsEndpoint:async()=>{const W=typeof U==="string"?U:await U();if(Y1(W))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}}};var V0=($,U,w)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${w} "${U}". Expected "true" or "false", got ${$[U]}.`)};var w0;(function($){$.ENV="env",$.CONFIG="shared config entry"})(w0||(w0={}));var cF="AWS_USE_DUALSTACK_ENDPOINT",vF="use_dualstack_endpoint";var MM={environmentVariableSelector:($)=>V0($,cF,w0.ENV),configFileSelector:($)=>V0($,vF,w0.CONFIG),default:!1};var xF="AWS_USE_FIPS_ENDPOINT",uF="use_fips_endpoint";var OM={environmentVariableSelector:($)=>V0($,xF,w0.ENV),configFileSelector:($)=>V0($,uF,w0.CONFIG),default:!1};var mF=o(n(),1);var iF=o(n(),1);var bw={environmentVariableSelector:($)=>$.AWS_REGION,configFileSelector:($)=>$.region,default:()=>{throw new Error("Region is missing")}},kM={preferredFile:"credentials"};function dY($){return(U)=>async(w)=>{const W=w.request;if(x.isInstance(W)){const{body:G,headers:L}=W;if(G&&Object.keys(L).map((f)=>f.toLowerCase()).indexOf(p6)===-1)try{const f=$(G);W.headers={...W.headers,[p6]:String(f)}}catch(f){}}return U({...w,request:W})}}var p6="content-length",gY={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ET=($)=>({applyToStack:(U)=>{U.add(dY($.bodyLengthChecker),gY)}});var e6=o(J1(),1);var a6=o(n(),1);var l6=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(mY(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!nY(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},pY=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,lY=/(\d+\.){3}\d+/,sY=/\.\./;var nY=($)=>pY.test($)&&!lY.test($)&&!sY.test($),mY=($)=>{const[U,w,W,,,G]=$.split(":"),L=U==="arn"&&$.split(":").length>=6,f=Boolean(L&&w&&W&&G);if(L&&!f)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return f};var s6=($,U,w)=>{const W=async()=>{const G=w[$]??w[U];if(typeof G==="function")return G();return G};if($==="credentialScope"||U==="CredentialScope")return async()=>{const G=typeof w.credentials==="function"?await w.credentials():w.credentials;return G?.credentialScope??G?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const G=typeof w.credentials==="function"?await w.credentials():w.credentials;return G?.accountId??G?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const G=await W();if(G&&typeof G==="object"){if("url"in G)return G.url.href;if("hostname"in G){const{protocol:L,hostname:f,port:F,path:Z}=G;return`${L}//${f}${F?":"+F:""}${Z}`}}return G};return W};var n6="AWS_ENDPOINT_URL",m6="endpoint_url",i6=($)=>({environmentVariableSelector:(U)=>{const w=$.split(" ").map((L)=>L.toUpperCase()),W=U[[n6,...w].join("_")];if(W)return W;const G=U[n6];if(G)return G;return},configFileSelector:(U,w)=>{if(w&&U.services){const G=w[["services",U.services].join(jU)];if(G){const L=$.split(" ").map((F)=>F.toLowerCase()),f=G[[L.join("_"),m6].join(jU)];if(f)return f}}const W=U[m6];if(W)return W;return},default:void 0});var r6=async($)=>z0(i6($))();var PU=o(TG(),1),o1=($)=>{if(typeof $==="object"){if("url"in $)return PU.parseUrl($.url);return $}return PU.parseUrl($)};var o6=async($,U,w,W)=>{if(!w.endpoint){const f=await r6(w.serviceId||"");if(f)w.endpoint=()=>Promise.resolve(o1(f))}const G=await iY($,U,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider(G,W)},iY=async($,U,w)=>{const W={},G=U?.getEndpointParameterInstructions?.()||{};for(let[L,f]of Object.entries(G))switch(f.type){case"staticContextParams":W[L]=f.value;break;case"contextParams":W[L]=$[f.name];break;case"clientContextParams":case"builtInParams":W[L]=await s6(f.name,L,w)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(f))}if(Object.keys(G).length===0)Object.assign(W,w);if(String(w.serviceId).toLowerCase()==="s3")await l6(W);return W};var t6=({config:$,instructions:U})=>{return(w,W)=>async(G)=>{const L=await o6(G.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=L,W.authSchemes=L.properties?.authSchemes;const f=W.authSchemes?.[0];if(f){W.signing_region=f.signingRegion,W.signing_service=f.signingName;const Z=a6.getSmithyContext(W)?.selectedHttpAuthScheme?.httpAuthOption;if(Z)Z.signingProperties=Object.assign(Z.signingProperties||{},{signing_region:f.signingRegion,signingRegion:f.signingRegion,signing_service:f.signingName,signingName:f.signingName,signingRegionSet:f.signingRegionSet},f.properties)}return w({...G})}};var rY={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:e6.serializerMiddlewareOption.name},PT=($,U)=>({applyToStack:(w)=>{w.addRelativeTo(t6({config:$,instructions:U}),rY)}});var a1=o(n(),1);var hT=($)=>{const U=$.tls??!0,{endpoint:w}=$,W=w!=null?async()=>o1(await a1.normalizeProvider(w)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!w,useDualstackEndpoint:a1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:a1.normalizeProvider($.useFipsEndpoint??!1)}};var vU=o(n(),1);var d;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(d||(d={}));var J0=3,$L=d.STANDARD;var UL=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],wL=["TimeoutError","RequestTimeout","RequestTimeoutException"],GL=[500,502,503,504],WL=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var oY=($)=>$.$metadata?.clockSkewCorrected,b0=($)=>$.$metadata?.httpStatusCode===429||UL.includes($.name)||$.$retryable?.throttling==!0,t1=($)=>oY($)||wL.includes($.name)||WL.includes($?.code||"")||GL.includes($.$metadata?.httpStatusCode||0),LL=($)=>{if($.$metadata?.httpStatusCode!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!t1($))return!0;return!1}return!1};class e1{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;const U=this.getCurrentTimeInSeconds();this.lastThrottleTime=U,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.currentCapacity){const U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),b0($)){const W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const w=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var K0=100,e0=20000,SU=500,$$=500,bU=5,hU=10,DU=1,U$="amz-sdk-invocation-id",w$="amz-sdk-request";var fL=()=>{let $=K0;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min(e0,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var kU=({retryDelay:$,retryCount:U,retryCost:w})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(e0,$),getRetryCost:()=>w}};class h0{constructor($){this.maxAttempts=$,this.mode=d.STANDARD,this.capacity=$$,this.retryBackoffStrategy=fL(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return kU({retryDelay:K0,retryCount:0})}async refreshRetryTokenForRetry($,U){const w=await this.getMaxAttempts();if(this.shouldRetry($,U,w)){const W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?SU:K0);const G=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),L=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,G):G,f=this.getCapacityCost(W);return this.capacity-=f,kU({retryDelay:L,retryCount:$.getRetryCount()+1,retryCost:f})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max($$,this.capacity+($.getRetryCost()??DU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${J0}`),J0}}shouldRetry($,U,w){return $.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?hU:bU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class cU{constructor($,U){this.maxAttemptsProvider=$,this.mode=d.ADAPTIVE;const{rateLimiter:w}=U??{};this.rateLimiter=w??new e1,this.standardRetryStrategy=new h0($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry($,U)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}}var FL="AWS_MAX_ATTEMPTS",ZL="max_attempts",VA={environmentVariableSelector:($)=>{const U=$[FL];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Environment variable ${FL} mast be a number, got "${U}"`);return w},configFileSelector:($)=>{const U=$[ZL];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Shared config file entry ${ZL} mast be a number, got "${U}"`);return w},default:J0},BA=($)=>{const{retryStrategy:U}=$,w=vU.normalizeProvider($.maxAttempts??J0);return{...$,maxAttempts:w,retryStrategy:async()=>{if(U)return U;if(await vU.normalizeProvider($.retryMode)()===d.ADAPTIVE)return new cU(w);return new h0(w)}}},aY="AWS_RETRY_MODE",tY="retry_mode",HA={environmentVariableSelector:($)=>$[aY],configFileSelector:($)=>$[tY],default:$L};var i=o(d$(),1),qA=i.default.v1,NA=i.default.v3,EL=i.default.v4,jA=i.default.v5,PA=i.default.NIL,SA=i.default.version,bA=i.default.validate,hA=i.default.stringify,DA=i.default.parse;import{Readable as eY}from"stream";var IL=($)=>$?.body instanceof eY||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var xU=($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)};var $9=($)=>(U,w)=>async(W)=>{let G=await $.retryStrategy();const L=await $.maxAttempts();if(U9(G)){G=G;let f=await G.acquireInitialRetryToken(w.partition_id),F=new Error,Z=0,E=0;const{request:I}=W,X=x.isInstance(I);if(X)I.headers[U$]=EL();while(!0)try{if(X)I.headers[w$]=`attempt=${Z+1}; max=${L}`;const{response:Y,output:R}=await U(W);return G.recordSuccess(f),R.$metadata.attempts=Z+1,R.$metadata.totalRetryDelay=E,{response:Y,output:R}}catch(Y){const R=w9(Y);if(F=xU(Y),X&&IL(I))throw(w.logger instanceof XL?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),F;try{f=await G.refreshRetryTokenForRetry(f,R)}catch(A){if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=Z+1,F.$metadata.totalRetryDelay=E,F}Z=f.getRetryCount();const Q=f.getRetryDelay();E+=Q,await new Promise((A)=>setTimeout(A,Q))}}else{if(G=G,G?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",G.mode]];return G.retry(U,W)}},U9=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",w9=($)=>{const U={error:$,errorType:G9($)},w=L9($.$response);if(w)U.retryAfterHint=w;return U},G9=($)=>{if(b0($))return"THROTTLING";if(t1($))return"TRANSIENT";if(LL($))return"SERVER_ERROR";return"CLIENT_ERROR"},W9={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},sA=($)=>({applyToStack:(U)=>{U.add($9($),W9)}}),L9=($)=>{if(!uU.isInstance($))return;const U=Object.keys($.headers).find((L)=>L.toLowerCase()==="retry-after");if(!U)return;const w=$.headers[U],W=Number(w);if(!Number.isNaN(W))return new Date(W*1000);return new Date(w)};import{platform as i7,release as r7}from"os";import{env as FF,versions as o7}from"process";var $w={isCrtAvailable:!1};var fF=()=>{if($w.isCrtAvailable)return["md/crt-avail"];return null};var a7="AWS_SDK_UA_APP_ID",t7="sdk-ua-app-id",tO=({serviceId:$,clientVersion:U})=>{const w=[["aws-sdk-js",U],["ua","2.0"],[`os/${i7()}`,r7()],["lang/js"],["md/nodejs",`${o7.node}`]],W=fF();if(W)w.push(W);if($)w.push([`api/${$}`,U]);if(FF.AWS_EXECUTION_ENV)w.push([`exec-env/${FF.AWS_EXECUTION_ENV}`]);const G=z0({environmentVariableSelector:(f)=>f[a7],configFileSelector:(f)=>f[t7],default:void 0})();let L=void 0;return async()=>{if(!L){const f=await G;L=f?[...w,[`app/${f}`]]:[...w]}return L}};import{Buffer as e7}from"buffer";import{createHash as $z,createHmac as Uz}from"crypto";function ZF($,U){if(e7.isBuffer($))return $;if(typeof $==="string")return EF($,U);if(ArrayBuffer.isView($))return Uw($.buffer,$.byteOffset,$.byteLength);return Uw($)}class wz{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(IF(ZF($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Uz(this.algorithmIdentifier,ZF(this.secret)):$z(this.algorithmIdentifier)}}import{fstatSync as Gz,lstatSync as Wz}from"fs";var FV=($)=>{if(!$)return 0;if(typeof $==="string")return Buffer.byteLength($);else if(typeof $.byteLength==="number")return $.byteLength;else if(typeof $.size==="number")return $.size;else if(typeof $.start==="number"&&typeof $.end==="number")return $.end+1-$.start;else if(typeof $.path==="string"||Buffer.isBuffer($.path))return Wz($.path).size;else if(typeof $.fd==="number")return Gz($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var XF="AWS_EXECUTION_ENV",ww="AWS_REGION",Gw="AWS_DEFAULT_REGION",RF="AWS_EC2_METADATA_DISABLED",YF=["in-region","cross-region","mobile","standard","legacy"],QF="/latest/meta-data/placement/region";var zF={environmentVariableSelector:($)=>{return $.AWS_DEFAULTS_MODE},configFileSelector:($)=>{return $.defaults_mode},default:"legacy"};var MV=({region:$=z0(bw),defaultsMode:U=z0(zF)}={})=>JF(async()=>{const w=typeof U==="function"?await U():U;switch(w?.toLowerCase()){case"auto":return Lz($);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 ${YF.join(", ")}, got ${w}`)}}),Lz=async($)=>{if($){const U=typeof $==="function"?await $():$,w=await fz();if(!w)return"standard";if(U===w)return"in-region";else return"cross-region"}return"standard"},fz=async()=>{if(process.env[XF]&&(process.env[ww]||process.env[Gw]))return process.env[ww]??process.env[Gw];if(!process.env[RF])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-cnvpbb2z.js"),w=await $();return(await U({...w,path:QF})).toString()}catch($){}};var VV=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const w=$.region;if(typeof w==="string")return w;return w()};return{setRegion(w){U=w},region(){return U}}},BV=($)=>{return{region:$.region()}};export{Ez as Aa,Iz as Ba,Rz as Ca,Kz as Da,Tz as Ea,x0 as Fa,jF as Ga,hF as Ha,tK as Ia,MM as Ja,OM as Ka,n as La,bw as Ma,kM as Na,ZM as Oa,J1 as Pa,NU as Qa,ET as Ra,PT as Sa,hT as Ta,$L as Ua,VA as Va,BA as Wa,HA as Xa,sA as Ya,m7 as Za,tO as _a,wz as $a,FV as ab,MV as bb,VV as cb,BV as db};
19
+
20
+ //# debugId=385F83C4B3AC1FA464756E2164756E21
21
+ //# sourceMappingURL=chunk-ehm10xxj.js.map