gemi 0.10.3 → 0.10.4

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 (89) hide show
  1. package/dist/app/index.js +2 -2
  2. package/dist/app/index.js.map +1 -1
  3. package/dist/broadcasting/index.js +1 -1
  4. package/dist/{chunk-j7dp3ybs.js → chunk-0z6ff9e0.js} +2 -2
  5. package/dist/{chunk-j7dp3ybs.js.map → chunk-0z6ff9e0.js.map} +1 -1
  6. package/dist/{chunk-bq1en2df.js → chunk-2a0gv505.js} +3 -3
  7. package/dist/{chunk-bq1en2df.js.map → chunk-2a0gv505.js.map} +1 -1
  8. package/dist/chunk-33r34393.js +4 -0
  9. package/dist/{chunk-h6a9nyz3.js.map → chunk-33r34393.js.map} +1 -1
  10. package/dist/{chunk-3kyzvpxm.js → chunk-3rne5hgg.js} +2 -2
  11. package/dist/{chunk-3kyzvpxm.js.map → chunk-3rne5hgg.js.map} +1 -1
  12. package/dist/{chunk-7rpnpk1z.js → chunk-7ay7yt2j.js} +2 -2
  13. package/dist/{chunk-7rpnpk1z.js.map → chunk-7ay7yt2j.js.map} +1 -1
  14. package/dist/chunk-7c0ker8f.js +4 -0
  15. package/dist/chunk-7c0ker8f.js.map +10 -0
  16. package/dist/chunk-90wq9bk4.js +4 -0
  17. package/dist/{chunk-33nha0s0.js.map → chunk-90wq9bk4.js.map} +2 -2
  18. package/dist/chunk-a2b9d074.js +41 -0
  19. package/dist/{chunk-jf4cn9js.js.map → chunk-a2b9d074.js.map} +5 -6
  20. package/dist/chunk-ar7jn8qf.js +11 -0
  21. package/dist/{chunk-q9cmjch9.js.map → chunk-ar7jn8qf.js.map} +5 -5
  22. package/dist/chunk-b5mhzpz2.js +5 -0
  23. package/dist/{chunk-stmtmnqh.js.map → chunk-b5mhzpz2.js.map} +5 -5
  24. package/dist/chunk-bcyqtgcc.js +8 -0
  25. package/dist/{chunk-vwh3ggkh.js.map → chunk-bcyqtgcc.js.map} +2 -2
  26. package/dist/{chunk-cj0fmywk.js → chunk-bfmx3ept.js} +2 -2
  27. package/dist/{chunk-cj0fmywk.js.map → chunk-bfmx3ept.js.map} +1 -1
  28. package/dist/chunk-gw1yyfk8.js +5 -0
  29. package/dist/{chunk-90qqbngb.js.map → chunk-gw1yyfk8.js.map} +6 -6
  30. package/dist/chunk-j7rp9bfr.js +4 -0
  31. package/dist/{chunk-wzax4kjq.js.map → chunk-j7rp9bfr.js.map} +2 -2
  32. package/dist/{chunk-hkysyhdx.js → chunk-k8xgjdj1.js} +3 -3
  33. package/dist/{chunk-hkysyhdx.js.map → chunk-k8xgjdj1.js.map} +1 -1
  34. package/dist/chunk-mjw9eypm.js +13 -0
  35. package/dist/{chunk-s6b848wp.js.map → chunk-mjw9eypm.js.map} +5 -5
  36. package/dist/{chunk-6q78ag9e.js → chunk-mqdg2jq8.js} +3 -3
  37. package/dist/{chunk-6q78ag9e.js.map → chunk-mqdg2jq8.js.map} +1 -1
  38. package/dist/{chunk-ndhecb99.js → chunk-qnpctk8n.js} +2 -2
  39. package/dist/{chunk-ndhecb99.js.map → chunk-qnpctk8n.js.map} +1 -1
  40. package/dist/{chunk-fx6rsjzz.js → chunk-qyg03m1k.js} +3 -3
  41. package/dist/{chunk-fx6rsjzz.js.map → chunk-qyg03m1k.js.map} +1 -1
  42. package/dist/chunk-s8071mrg.js +4 -0
  43. package/dist/{chunk-4b3akwfv.js.map → chunk-s8071mrg.js.map} +5 -5
  44. package/dist/chunk-smxwz2cj.js +4 -0
  45. package/dist/{chunk-qywtzrf0.js.map → chunk-smxwz2cj.js.map} +5 -5
  46. package/dist/chunk-tcrnsk8p.js +4 -0
  47. package/dist/{chunk-2nrspkzr.js.map → chunk-tcrnsk8p.js.map} +2 -2
  48. package/dist/{chunk-spw59mrv.js → chunk-vxyr3gq3.js} +2 -2
  49. package/dist/{chunk-spw59mrv.js.map → chunk-vxyr3gq3.js.map} +1 -1
  50. package/dist/chunk-w8j4rmwj.js +4 -0
  51. package/dist/{chunk-ean0tyqg.js.map → chunk-w8j4rmwj.js.map} +2 -2
  52. package/dist/chunk-wr4ks2dq.js +4 -0
  53. package/dist/{chunk-4n2ggg2n.js.map → chunk-wr4ks2dq.js.map} +2 -2
  54. package/dist/chunk-ycjpgm9z.js +4 -0
  55. package/dist/{chunk-n5bvdddm.js.map → chunk-ycjpgm9z.js.map} +2 -2
  56. package/dist/{chunk-6vc15rqe.js → chunk-z1j6j14y.js} +2 -2
  57. package/dist/{chunk-6vc15rqe.js.map → chunk-z1j6j14y.js.map} +3 -3
  58. package/dist/email/index.js +2 -2
  59. package/dist/email/index.js.map +1 -1
  60. package/dist/facades/index.js +3 -3
  61. package/dist/facades/index.js.map +1 -1
  62. package/dist/http/Controller.d.ts.map +1 -1
  63. package/dist/http/index.js +2 -2
  64. package/dist/http/index.js.map +3 -3
  65. package/dist/kernel/index.js +2 -2
  66. package/dist/kernel/index.js.map +1 -1
  67. package/dist/server/index.js +2 -2
  68. package/dist/server/index.js.map +1 -1
  69. package/dist/services/index.js +52 -63
  70. package/dist/services/index.js.map +5 -16
  71. package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
  72. package/package.json +2 -2
  73. package/dist/chunk-0v0x0g72.js +0 -3
  74. package/dist/chunk-0v0x0g72.js.map +0 -15
  75. package/dist/chunk-2nrspkzr.js +0 -4
  76. package/dist/chunk-33nha0s0.js +0 -4
  77. package/dist/chunk-4b3akwfv.js +0 -4
  78. package/dist/chunk-4n2ggg2n.js +0 -4
  79. package/dist/chunk-90qqbngb.js +0 -5
  80. package/dist/chunk-ean0tyqg.js +0 -4
  81. package/dist/chunk-h6a9nyz3.js +0 -4
  82. package/dist/chunk-jf4cn9js.js +0 -41
  83. package/dist/chunk-n5bvdddm.js +0 -4
  84. package/dist/chunk-q9cmjch9.js +0 -11
  85. package/dist/chunk-qywtzrf0.js +0 -4
  86. package/dist/chunk-s6b848wp.js +0 -13
  87. package/dist/chunk-stmtmnqh.js +0 -5
  88. package/dist/chunk-vwh3ggkh.js +0 -8
  89. package/dist/chunk-wzax4kjq.js +0 -4
@@ -1,41 +0,0 @@
1
- import{aa as Y1,ba as zU}from"./chunk-4b3akwfv.js";import{ea as y,fa as EU,ha as DU,ia as EL,ka as BL,ma as i8,na as Hz,va as VW}from"./chunk-s6b848wp.js";import{eb as YU}from"./chunk-3kyzvpxm.js";import{ib as w1}from"./chunk-7rpnpk1z.js";import{rb as fL}from"./chunk-0v0x0g72.js";import{tb as yR,ub as n8}from"./chunk-6q78ag9e.js";import{$b as r7}from"./chunk-fx6rsjzz.js";import{ac as t0,bc as M,cc as j}from"./chunk-spw59mrv.js";var N1=M((HF,uU)=>{var{defineProperty:i1,getOwnPropertyDescriptor:hL,getOwnPropertyNames:xL}=Object,vL=Object.prototype.hasOwnProperty,cU=($,U)=>i1($,"name",{value:U,configurable:!0}),yL=($,U)=>{for(var G in U)i1($,G,{get:U[G],enumerable:!0})},cL=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of xL(U))if(!vL.call($,W)&&W!==G)i1($,W,{get:()=>U[W],enumerable:!(w=hL(U,W))||w.enumerable})}return $},_L=($)=>cL(i1({},"__esModule",{value:!0}),$),_U={};yL(_U,{getSmithyContext:()=>uL,normalizeProvider:()=>dL});uU.exports=_L(_U);var yU=w1(),uL=cU(($)=>$[yU.SMITHY_CONTEXT_KEY]||($[yU.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),dL=cU(($)=>{if(typeof $==="function")return $;let U=Promise.resolve($);return()=>U},"normalizeProvider")});var $0=M((OF,lU)=>{var{defineProperty:r1,getOwnPropertyDescriptor:gL,getOwnPropertyNames:pL}=Object,sL=Object.prototype.hasOwnProperty,W1=($,U)=>r1($,"name",{value:U,configurable:!0}),lL=($,U)=>{for(var G in U)r1($,G,{get:U[G],enumerable:!0})},mL=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of pL(U))if(!sL.call($,W)&&W!==G)r1($,W,{get:()=>U[W],enumerable:!(w=gL(U,W))||w.enumerable})}return $},nL=($)=>mL(r1({},"__esModule",{value:!0}),$),dU={};lL(dU,{CredentialsProviderError:()=>iL,ProviderError:()=>o1,TokenProviderError:()=>rL,chain:()=>oL,fromStatic:()=>aL,memoize:()=>tL});lU.exports=nL(dU);var gU=class $ extends Error{constructor(U,G=!0){var w;let W,L=!0;if(typeof G==="boolean")W=void 0,L=G;else if(G!=null&&typeof G==="object")W=G.logger,L=G.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=L,Object.setPrototypeOf(this,$.prototype),(w=W==null?void 0:W.debug)==null||w.call(W,`@smithy/property-provider ${L?"->":"(!)"} ${U}`)}static from(U,G=!0){return Object.assign(new this(U.message,G),U)}};W1(gU,"ProviderError");var o1=gU,pU=class $ extends o1{constructor(U,G=!0){super(U,G);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};W1(pU,"CredentialsProviderError");var iL=pU,sU=class $ extends o1{constructor(U,G=!0){super(U,G);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};W1(sU,"TokenProviderError");var rL=sU,oL=W1((...$)=>async()=>{if($.length===0)throw new o1("No providers in chain");let U;for(let G of $)try{return await G()}catch(w){if(U=w,w==null?void 0:w.tryNextLink)continue;throw w}throw U},"chain"),aL=W1(($)=>()=>Promise.resolve($),"fromStatic"),tL=W1(($,U,G)=>{let w,W,L,X=!1,Z=W1(async()=>{if(!W)W=$();try{w=await W,L=!0,X=!1}finally{W=void 0}return w},"coalesceProvider");if(U===void 0)return async(Y)=>{if(!L||(Y==null?void 0:Y.forceRefresh))w=await Z();return w};return async(Y)=>{if(!L||(Y==null?void 0:Y.forceRefresh))w=await Z();if(X)return w;if(G&&!G(w))return X=!0,w;if(U(w))return await Z(),w;return w}},"memoize")});var I1=M((mU)=>{Object.defineProperty(mU,"__esModule",{value:!0});mU.getHomeDir=void 0;var eL=j("os"),$X=j("path"),U0={},UX=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},GX=()=>{let{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:w=`C:${$X.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${w}${G}`;let W=UX();if(!U0[W])U0[W]=eL.homedir();return U0[W]};mU.getHomeDir=GX});var G0=M((iU)=>{Object.defineProperty(iU,"__esModule",{value:!0});iU.getSSOTokenFilepath=void 0;var wX=j("crypto"),WX=j("path"),LX=I1(),XX=($)=>{let G=wX.createHash("sha1").update($).digest("hex");return WX.join(LX.getHomeDir(),".aws","sso","cache",`${G}.json`)};iU.getSSOTokenFilepath=XX});var tU=M((oU)=>{Object.defineProperty(oU,"__esModule",{value:!0});oU.getSSOTokenFromFile=void 0;var ZX=j("fs"),YX=G0(),{readFile:zX}=ZX.promises,RX=async($)=>{let U=YX.getSSOTokenFilepath($),G=await zX(U,"utf8");return JSON.parse(G)};oU.getSSOTokenFromFile=RX});var W0=M((eU)=>{Object.defineProperty(eU,"__esModule",{value:!0});eU.slurpFile=void 0;var QX=j("fs"),{readFile:FX}=QX.promises,w0={},IX=($,U)=>{if(!w0[$]||(U===null||U===void 0?void 0:U.ignoreCache))w0[$]=FX($,"utf8");return w0[$]};eU.slurpFile=IX});var Y0=M((jF,j1)=>{var{defineProperty:e1,getOwnPropertyDescriptor:JX,getOwnPropertyNames:KX}=Object,MX=Object.prototype.hasOwnProperty,c=($,U)=>e1($,"name",{value:U,configurable:!0}),EX=($,U)=>{for(var G in U)e1($,G,{get:U[G],enumerable:!0})},L0=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of KX(U))if(!MX.call($,W)&&W!==G)e1($,W,{get:()=>U[W],enumerable:!(w=JX(U,W))||w.enumerable})}return $},Z0=($,U,G)=>(L0($,U,"default"),G&&L0(G,U,"default")),BX=($)=>L0(e1({},"__esModule",{value:!0}),$),q1={};EX(q1,{CONFIG_PREFIX_SEPARATOR:()=>L1,DEFAULT_PROFILE:()=>WG,ENV_PROFILE:()=>wG,getProfileName:()=>TX,loadSharedConfigFiles:()=>XG,loadSsoSessionData:()=>kX,parseKnownFiles:()=>hX});j1.exports=BX(q1);Z0(q1,I1(),j1.exports);var wG="AWS_PROFILE",WG="default",TX=c(($)=>$.profile||process.env[wG]||WG,"getProfileName");Z0(q1,G0(),j1.exports);Z0(q1,tU(),j1.exports);var a1=w1(),VX=c(($)=>Object.entries($).filter(([U])=>{let G=U.indexOf(L1);if(G===-1)return!1;return Object.values(a1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,w])=>{let W=G.indexOf(L1),L=G.substring(0,W)===a1.IniSectionType.PROFILE?G.substring(W+1):G;return U[L]=w,U},{...$.default&&{default:$.default}}),"getConfigData"),t1=j("path"),AX=I1(),HX="AWS_CONFIG_FILE",LG=c(()=>process.env[HX]||t1.join(AX.getHomeDir(),".aws","config"),"getConfigFilepath"),OX=I1(),fX="AWS_SHARED_CREDENTIALS_FILE",CX=c(()=>process.env[fX]||t1.join(OX.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),NX=I1(),qX=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,jX=["__proto__","profile __proto__"],X0=c(($)=>{let U={},G,w;for(let W of $.split(/\r?\n/)){let L=W.split(/(^|\s)[;#]/)[0].trim();if(L[0]==="["&&L[L.length-1]==="]"){G=void 0,w=void 0;let Z=L.substring(1,L.length-1),Y=qX.exec(Z);if(Y){let[,z,,R]=Y;if(Object.values(a1.IniSectionType).includes(z))G=[z,R].join(L1)}else G=Z;if(jX.includes(Z))throw new Error(`Found invalid profile name "${Z}"`)}else if(G){let Z=L.indexOf("=");if(![0,-1].includes(Z)){let[Y,z]=[L.substring(0,Z).trim(),L.substring(Z+1).trim()];if(z==="")w=Y;else{if(w&&W.trimStart()===W)w=void 0;U[G]=U[G]||{};let R=w?[w,Y].join(L1):Y;U[G][R]=z}}}}return U},"parseIni"),UG=W0(),GG=c(()=>({}),"swallowError"),L1=".",XG=c(async($={})=>{let{filepath:U=CX(),configFilepath:G=LG()}=$,w=NX.getHomeDir(),W="~/",L=U;if(U.startsWith("~/"))L=t1.join(w,U.slice(2));let X=G;if(G.startsWith("~/"))X=t1.join(w,G.slice(2));let Z=await Promise.all([UG.slurpFile(X,{ignoreCache:$.ignoreCache}).then(X0).then(VX).catch(GG),UG.slurpFile(L,{ignoreCache:$.ignoreCache}).then(X0).catch(GG)]);return{configFile:Z[0],credentialsFile:Z[1]}},"loadSharedConfigFiles"),bX=c(($)=>Object.entries($).filter(([U])=>U.startsWith(a1.IniSectionType.SSO_SESSION+L1)).reduce((U,[G,w])=>({...U,[G.substring(G.indexOf(L1)+1)]:w}),{}),"getSsoSessionData"),PX=W0(),SX=c(()=>({}),"swallowError"),kX=c(async($={})=>PX.slurpFile($.configFilepath??LG()).then(X0).then(bX).catch(SX),"loadSsoSessionData"),DX=c((...$)=>{let U={};for(let G of $)for(let[w,W]of Object.entries(G))if(U[w]!==void 0)Object.assign(U[w],W);else U[w]=W;return U},"mergeConfigFiles"),hX=c(async($)=>{let U=await XG($);return DX(U.configFile,U.credentialsFile)},"parseKnownFiles")});var RG=M((bF,zG)=>{var{defineProperty:$$,getOwnPropertyDescriptor:xX,getOwnPropertyNames:vX}=Object,yX=Object.prototype.hasOwnProperty,J1=($,U)=>$$($,"name",{value:U,configurable:!0}),cX=($,U)=>{for(var G in U)$$($,G,{get:U[G],enumerable:!0})},_X=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of vX(U))if(!yX.call($,W)&&W!==G)$$($,W,{get:()=>U[W],enumerable:!(w=xX(U,W))||w.enumerable})}return $},uX=($)=>_X($$({},"__esModule",{value:!0}),$),YG={};cX(YG,{loadConfig:()=>lX});zG.exports=uX(YG);var b1=$0();function z0($){try{let 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 $}}J1(z0,"getSelectorName");var dX=J1(($,U)=>async()=>{try{let G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new b1.CredentialsProviderError(G.message||`Not found in ENV: ${z0($.toString())}`,{logger:U})}},"fromEnv"),ZG=Y0(),gX=J1(($,{preferredFile:U="config",...G}={})=>async()=>{let w=ZG.getProfileName(G),{configFile:W,credentialsFile:L}=await ZG.loadSharedConfigFiles(G),X=L[w]||{},Z=W[w]||{},Y=U==="config"?{...X,...Z}:{...Z,...X};try{let R=$(Y,U==="config"?W:L);if(R===void 0)throw new Error;return R}catch(z){throw new b1.CredentialsProviderError(z.message||`Not found in config files w/ profile [${w}]: ${z0($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),pX=J1(($)=>typeof $==="function","isFunction"),sX=J1(($)=>pX($)?async()=>await $():b1.fromStatic($),"fromStatic"),lX=J1(({environmentVariableSelector:$,configFileSelector:U,default:G},w={})=>b1.memoize(b1.chain(dX($),gX(U,w),sX(G))),"loadConfig")});var MG=M((JG)=>{Object.defineProperty(JG,"__esModule",{value:!0});JG.getEndpointUrlConfig=void 0;var QG=Y0(),FG="AWS_ENDPOINT_URL",IG="endpoint_url",mX=($)=>({environmentVariableSelector:(U)=>{let G=$.split(" ").map((L)=>L.toUpperCase()),w=U[[FG,...G].join("_")];if(w)return w;let W=U[FG];if(W)return W;return},configFileSelector:(U,G)=>{if(G&&U.services){let W=G[["services",U.services].join(QG.CONFIG_PREFIX_SEPARATOR)];if(W){let L=$.split(" ").map((Z)=>Z.toLowerCase()),X=W[[L.join("_"),IG].join(QG.CONFIG_PREFIX_SEPARATOR)];if(X)return X}}let w=U[IG];if(w)return w;return},default:void 0});JG.getEndpointUrlConfig=mX});var R0=M((EG)=>{Object.defineProperty(EG,"__esModule",{value:!0});EG.getEndpointFromConfig=void 0;var nX=RG(),iX=MG(),rX=async($)=>nX.loadConfig(iX.getEndpointUrlConfig($!==null&&$!==void 0?$:""))();EG.getEndpointFromConfig=rX});var HG=M((kF,AG)=>{var{defineProperty:U$,getOwnPropertyDescriptor:oX,getOwnPropertyNames:aX}=Object,tX=Object.prototype.hasOwnProperty,eX=($,U)=>U$($,"name",{value:U,configurable:!0}),$Z=($,U)=>{for(var G in U)U$($,G,{get:U[G],enumerable:!0})},UZ=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of aX(U))if(!tX.call($,W)&&W!==G)U$($,W,{get:()=>U[W],enumerable:!(w=oX(U,W))||w.enumerable})}return $},GZ=($)=>UZ(U$({},"__esModule",{value:!0}),$),TG={};$Z(TG,{parseQueryString:()=>VG});AG.exports=GZ(TG);function VG($){let U={};if($=$.replace(/^\?/,""),$)for(let G of $.split("&")){let[w,W=null]=G.split("=");if(w=decodeURIComponent(w),W)W=decodeURIComponent(W);if(!(w in U))U[w]=W;else if(Array.isArray(U[w]))U[w].push(W);else U[w]=[U[w],W]}return U}eX(VG,"parseQueryString")});var NG=M((DF,CG)=>{var{defineProperty:G$,getOwnPropertyDescriptor:wZ,getOwnPropertyNames:WZ}=Object,LZ=Object.prototype.hasOwnProperty,XZ=($,U)=>G$($,"name",{value:U,configurable:!0}),ZZ=($,U)=>{for(var G in U)G$($,G,{get:U[G],enumerable:!0})},YZ=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of WZ(U))if(!LZ.call($,W)&&W!==G)G$($,W,{get:()=>U[W],enumerable:!(w=wZ(U,W))||w.enumerable})}return $},zZ=($)=>YZ(G$({},"__esModule",{value:!0}),$),OG={};ZZ(OG,{parseUrl:()=>fG});CG.exports=zZ(OG);var RZ=HG(),fG=XZ(($)=>{if(typeof $==="string")return fG(new URL($));let{hostname:U,pathname:G,port:w,protocol:W,search:L}=$,X;if(L)X=RZ.parseQueryString(L);return{hostname:U,port:w?parseInt(w):void 0,protocol:W,path:G,query:X}},"parseUrl")});var F0=M((hF,DG)=>{var{defineProperty:w$,getOwnPropertyDescriptor:QZ,getOwnPropertyNames:FZ}=Object,IZ=Object.prototype.hasOwnProperty,Q0=($,U)=>w$($,"name",{value:U,configurable:!0}),JZ=($,U)=>{for(var G in U)w$($,G,{get:U[G],enumerable:!0})},KZ=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of FZ(U))if(!IZ.call($,W)&&W!==G)w$($,W,{get:()=>U[W],enumerable:!(w=QZ(U,W))||w.enumerable})}return $},MZ=($)=>KZ(w$({},"__esModule",{value:!0}),$),qG={};JZ(qG,{deserializerMiddleware:()=>jG,deserializerMiddlewareOption:()=>PG,getSerdePlugin:()=>kG,serializerMiddleware:()=>bG,serializerMiddlewareOption:()=>SG});DG.exports=MZ(qG);var jG=Q0(($,U)=>(G)=>async(w)=>{let{response:W}=await G(w);try{let L=await U(W,$);return{response:W,output:L}}catch(L){if(Object.defineProperty(L,"$response",{value:W}),!("$metadata"in L)){if(L.message+=`
2
- 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"),bG=Q0(($,U)=>(G,w)=>async(W)=>{var L;let X=((L=w.endpointV2)==null?void 0:L.url)&&$.urlParser?async()=>$.urlParser(w.endpointV2.url):$.endpoint;if(!X)throw new Error("No valid endpoint provider available.");let Z=await U(W.input,{...$,endpoint:X});return G({...W,request:Z})},"serializerMiddleware"),PG={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},SG={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function kG($,U,G){return{applyToStack:(w)=>{w.add(jG($,G),PG),w.add(bG($,U),SG)}}}Q0(kG,"getSerdePlugin")});var dG=M((xF,uG)=>{var{defineProperty:L$,getOwnPropertyDescriptor:EZ,getOwnPropertyNames:BZ}=Object,TZ=Object.prototype.hasOwnProperty,g=($,U)=>L$($,"name",{value:U,configurable:!0}),VZ=($,U)=>{for(var G in U)L$($,G,{get:U[G],enumerable:!0})},AZ=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of BZ(U))if(!TZ.call($,W)&&W!==G)L$($,W,{get:()=>U[W],enumerable:!(w=EZ(U,W))||w.enumerable})}return $},HZ=($)=>AZ(L$({},"__esModule",{value:!0}),$),xG={};VZ(xG,{endpointMiddleware:()=>cG,endpointMiddlewareOptions:()=>_G,getEndpointFromInstructions:()=>vG,getEndpointPlugin:()=>kZ,resolveEndpointConfig:()=>hZ,resolveParams:()=>yG,toEndpointV1:()=>I0});uG.exports=HZ(xG);var OZ=g(async($)=>{let U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(jZ(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!qZ(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),fZ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,CZ=/(\d+\.){3}\d+/,NZ=/\.\./,qZ=g(($)=>fZ.test($)&&!CZ.test($)&&!NZ.test($),"isDnsCompatibleBucketName"),jZ=g(($)=>{let[U,G,w,,,W]=$.split(":"),L=U==="arn"&&$.split(":").length>=6,X=Boolean(L&&G&&w&&W);if(L&&!X)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return X},"isArnBucketName"),bZ=g(($,U,G)=>{let w=g(async()=>{let W=G[$]??G[U];if(typeof W==="function")return W();return W},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{let W=typeof G.credentials==="function"?await G.credentials():G.credentials;return(W==null?void 0:W.credentialScope)??(W==null?void 0:W.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{let W=typeof G.credentials==="function"?await G.credentials():G.credentials;return(W==null?void 0:W.accountId)??(W==null?void 0:W.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{let W=await w();if(W&&typeof W==="object"){if("url"in W)return W.url.href;if("hostname"in W){let{protocol:L,hostname:X,port:Z,path:Y}=W;return`${L}//${X}${Z?":"+Z:""}${Y}`}}return W};return w},"createConfigValueProvider"),PZ=R0(),hG=NG(),I0=g(($)=>{if(typeof $==="object"){if("url"in $)return hG.parseUrl($.url);return $}return hG.parseUrl($)},"toEndpointV1"),vG=g(async($,U,G,w)=>{if(!G.endpoint){let X;if(G.serviceConfiguredEndpoint)X=await G.serviceConfiguredEndpoint();else X=await PZ.getEndpointFromConfig(G.serviceId);if(X)G.endpoint=()=>Promise.resolve(I0(X))}let W=await yG($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(W,w)},"getEndpointFromInstructions"),yG=g(async($,U,G)=>{var w;let W={},L=((w=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:w.call(U))||{};for(let[X,Z]of Object.entries(L))switch(Z.type){case"staticContextParams":W[X]=Z.value;break;case"contextParams":W[X]=$[Z.name];break;case"clientContextParams":case"builtInParams":W[X]=await bZ(Z.name,X,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Z))}if(Object.keys(L).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await OZ(W);return W},"resolveParams"),W$=N1(),cG=g(({config:$,instructions:U})=>{return(G,w)=>async(W)=>{var L,X,Z;let Y=await vG(W.input,{getEndpointParameterInstructions(){return U}},{...$},w);w.endpointV2=Y,w.authSchemes=(L=Y.properties)==null?void 0:L.authSchemes;let z=(X=w.authSchemes)==null?void 0:X[0];if(z){w.signing_region=z.signingRegion,w.signing_service=z.signingName;let R=W$.getSmithyContext(w),Q=(Z=R==null?void 0:R.selectedHttpAuthScheme)==null?void 0:Z.httpAuthOption;if(Q)Q.signingProperties=Object.assign(Q.signingProperties||{},{signing_region:z.signingRegion,signingRegion:z.signingRegion,signing_service:z.signingName,signingName:z.signingName,signingRegionSet:z.signingRegionSet},z.properties)}return G({...W})}},"endpointMiddleware"),SZ=F0(),_G={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:SZ.serializerMiddlewareOption.name},kZ=g(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(cG({config:$,instructions:U}),_G)}}),"getEndpointPlugin"),DZ=R0(),hZ=g(($)=>{let U=$.tls??!0,{endpoint:G}=$,w=G!=null?async()=>I0(await W$.normalizeProvider(G)()):void 0,L={...$,endpoint:w,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:W$.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:W$.normalizeProvider($.useFipsEndpoint??!1)},X=void 0;return L.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!X)X=DZ.getEndpointFromConfig($.serviceId);return X},L},"resolveEndpointConfig")});var l=M((vF,oG)=>{var{defineProperty:X$,getOwnPropertyDescriptor:xZ,getOwnPropertyNames:vZ}=Object,yZ=Object.prototype.hasOwnProperty,r=($,U)=>X$($,"name",{value:U,configurable:!0}),cZ=($,U)=>{for(var G in U)X$($,G,{get:U[G],enumerable:!0})},_Z=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of vZ(U))if(!yZ.call($,W)&&W!==G)X$($,W,{get:()=>U[W],enumerable:!(w=xZ(U,W))||w.enumerable})}return $},uZ=($)=>_Z(X$({},"__esModule",{value:!0}),$),gG={};cZ(gG,{Field:()=>pZ,Fields:()=>sZ,HttpRequest:()=>lZ,HttpResponse:()=>mZ,IHttpRequest:()=>pG.HttpRequest,getHttpHandlerExtensionConfiguration:()=>dZ,isValidHostname:()=>rG,resolveHttpHandlerRuntimeConfig:()=>gZ});oG.exports=uZ(gG);var dZ=r(($)=>{let U=$.httpHandler;return{setHttpHandler(G){U=G},httpHandler(){return U},updateHttpClientConfig(G,w){U.updateHttpClientConfig(G,w)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),gZ=r(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),pG=w1(),sG=class ${constructor({name:U,kind:G=pG.FieldPosition.HEADER,values:w=[]}){this.name=U,this.kind=G,this.values=w}add(U){this.values.push(U)}set(U){this.values=U}remove(U){this.values=this.values.filter((G)=>G!==U)}toString(){return this.values.map((U)=>U.includes(",")||U.includes(" ")?`"${U}"`:U).join(", ")}get(){return this.values}};r(sG,"Field");var pZ=sG,lG=class ${constructor({fields:U=[],encoding:G="utf-8"}){this.entries={},U.forEach(this.setField.bind(this)),this.encoding=G}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((G)=>G.kind===U)}};r(lG,"Fields");var sZ=lG,mG=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){let G=new $({...U,headers:{...U.headers}});if(G.query)G.query=nG(G.query);return G}static isInstance(U){if(!U)return!1;let G=U;return"method"in G&&"protocol"in G&&"hostname"in G&&"path"in G&&typeof G.query==="object"&&typeof G.headers==="object"}clone(){return $.clone(this)}};r(mG,"HttpRequest");var lZ=mG;function nG($){return Object.keys($).reduce((U,G)=>{let w=$[G];return{...U,[G]:Array.isArray(w)?[...w]:w}},{})}r(nG,"cloneQuery");var iG=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;let G=U;return typeof G.statusCode==="number"&&typeof G.headers==="object"}};r(iG,"HttpResponse");var mZ=iG;function rG($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}r(rG,"isValidHostname")});var J0=M((yF,$w)=>{var{defineProperty:Z$,getOwnPropertyDescriptor:nZ,getOwnPropertyNames:iZ}=Object,rZ=Object.prototype.hasOwnProperty,K1=($,U)=>Z$($,"name",{value:U,configurable:!0}),oZ=($,U)=>{for(var G in U)Z$($,G,{get:U[G],enumerable:!0})},aZ=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of iZ(U))if(!rZ.call($,W)&&W!==G)Z$($,W,{get:()=>U[W],enumerable:!(w=nZ(U,W))||w.enumerable})}return $},tZ=($)=>aZ(Z$({},"__esModule",{value:!0}),$),aG={};oZ(aG,{isClockSkewCorrectedError:()=>tG,isClockSkewError:()=>L2,isRetryableByTrait:()=>W2,isServerError:()=>Z2,isThrottlingError:()=>X2,isTransientError:()=>eG});$w.exports=tZ(aG);var eZ=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],$2=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],U2=["TimeoutError","RequestTimeout","RequestTimeoutException"],G2=[500,502,503,504],w2=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],W2=K1(($)=>$.$retryable!==void 0,"isRetryableByTrait"),L2=K1(($)=>eZ.includes($.name),"isClockSkewError"),tG=K1(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),X2=K1(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||$2.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),eG=K1(($)=>{var U;return tG($)||U2.includes($.name)||w2.includes(($==null?void 0:$.code)||"")||G2.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),Z2=K1(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){let G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!eG($))return!0;return!1}return!1},"isServerError")});var Jw=M((cF,Iw)=>{var{defineProperty:Y$,getOwnPropertyDescriptor:Y2,getOwnPropertyNames:z2}=Object,R2=Object.prototype.hasOwnProperty,p=($,U)=>Y$($,"name",{value:U,configurable:!0}),Q2=($,U)=>{for(var G in U)Y$($,G,{get:U[G],enumerable:!0})},F2=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of z2(U))if(!R2.call($,W)&&W!==G)Y$($,W,{get:()=>U[W],enumerable:!(w=Y2(U,W))||w.enumerable})}return $},I2=($)=>F2(Y$({},"__esModule",{value:!0}),$),Gw={};Q2(Gw,{AdaptiveRetryStrategy:()=>T2,ConfiguredRetryStrategy:()=>V2,DEFAULT_MAX_ATTEMPTS:()=>K0,DEFAULT_RETRY_DELAY_BASE:()=>P1,DEFAULT_RETRY_MODE:()=>J2,DefaultRateLimiter:()=>Lw,INITIAL_RETRY_TOKENS:()=>M0,INVOCATION_ID_HEADER:()=>M2,MAXIMUM_RETRY_DELAY:()=>E0,NO_RETRY_INCREMENT:()=>zw,REQUEST_HEADER:()=>E2,RETRY_COST:()=>Zw,RETRY_MODES:()=>ww,StandardRetryStrategy:()=>B0,THROTTLING_RETRY_DELAY_BASE:()=>Xw,TIMEOUT_RETRY_COST:()=>Yw});Iw.exports=I2(Gw);var ww=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(ww||{}),K0=3,J2="standard",K2=J0(),Ww=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;let G=this.getCurrentTimeInSeconds();this.lastThrottleTime=G,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(U){if(!this.enabled)return;if(this.refillTokenBucket(),U>this.currentCapacity){let G=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,G))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){let U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}let G=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+G),this.lastTimestamp=U}updateClientSendingRate(U){let G;if(this.updateMeasuredRate(),K2.isThrottlingError(U)){let W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),G=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),G=this.cubicSuccess(this.getCurrentTimeInSeconds());let w=Math.min(G,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(U){return this.getPrecise(U*this.beta)}cubicSuccess(U){return this.getPrecise(this.scaleConstant*Math.pow(U-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(U){this.refillTokenBucket(),this.fillRate=Math.max(U,this.minFillRate),this.maxCapacity=Math.max(U,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let U=this.getCurrentTimeInSeconds(),G=Math.floor(U*2)/2;if(this.requestCount++,G>this.lastTxRateBucket){let w=this.requestCount/(G-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=G}}getPrecise(U){return parseFloat(U.toFixed(8))}};p(Ww,"DefaultRateLimiter");var Lw=Ww,P1=100,E0=20000,Xw=500,M0=500,Zw=5,Yw=10,zw=1,M2="amz-sdk-invocation-id",E2="amz-sdk-request",B2=p(()=>{let $=P1;return{computeNextBackoffDelay:p((w)=>{return Math.floor(Math.min(E0,Math.random()*2**w*$))},"computeNextBackoffDelay"),setDelayBase:p((w)=>{$=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),Uw=p(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:p(()=>U,"getRetryCount"),getRetryDelay:p(()=>Math.min(E0,$),"getRetryDelay"),getRetryCost:p(()=>G,"getRetryCost")}},"createDefaultRetryToken"),Rw=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=M0,this.retryBackoffStrategy=B2(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return Uw({retryDelay:P1,retryCount:0})}async refreshRetryTokenForRetry(U,G){let w=await this.getMaxAttempts();if(this.shouldRetry(U,G,w)){let W=G.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?Xw:P1);let L=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),X=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,L):L,Z=this.getCapacityCost(W);return this.capacity-=Z,Uw({retryDelay:X,retryCount:U.getRetryCount()+1,retryCost:Z})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(M0,this.capacity+(U.getRetryCost()??zw))}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 ${K0}`),K0}}shouldRetry(U,G,w){return U.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?Yw:Zw}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};p(Rw,"StandardRetryStrategy");var B0=Rw,Qw=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";let{rateLimiter:w}=G??{};this.rateLimiter=w??new Lw,this.standardRetryStrategy=new B0(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,G){return this.rateLimiter.updateClientSendingRate(G),this.standardRetryStrategy.refreshRetryTokenForRetry(U,G)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};p(Qw,"AdaptiveRetryStrategy");var T2=Qw,Fw=class $ extends B0{constructor(U,G=P1){super(typeof U==="function"?U:async()=>U);if(typeof G==="number")this.computeNextBackoffDelay=()=>G;else this.computeNextBackoffDelay=G}async refreshRetryTokenForRetry(U,G){let w=await super.refreshRetryTokenForRetry(U,G);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}};p(Fw,"ConfiguredRetryStrategy");var V2=Fw});var T0=M((_F,Mw)=>{var{defineProperty:z$,getOwnPropertyDescriptor:A2,getOwnPropertyNames:H2}=Object,O2=Object.prototype.hasOwnProperty,f2=($,U)=>z$($,"name",{value:U,configurable:!0}),C2=($,U)=>{for(var G in U)z$($,G,{get:U[G],enumerable:!0})},N2=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of H2(U))if(!O2.call($,W)&&W!==G)z$($,W,{get:()=>U[W],enumerable:!(w=A2(U,W))||w.enumerable})}return $},q2=($)=>N2(z$({},"__esModule",{value:!0}),$),Kw={};C2(Kw,{isArrayBuffer:()=>j2});Mw.exports=q2(Kw);var j2=f2(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var S1=M((uF,Tw)=>{var{defineProperty:R$,getOwnPropertyDescriptor:b2,getOwnPropertyNames:P2}=Object,S2=Object.prototype.hasOwnProperty,Ew=($,U)=>R$($,"name",{value:U,configurable:!0}),k2=($,U)=>{for(var G in U)R$($,G,{get:U[G],enumerable:!0})},D2=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of P2(U))if(!S2.call($,W)&&W!==G)R$($,W,{get:()=>U[W],enumerable:!(w=b2(U,W))||w.enumerable})}return $},h2=($)=>D2(R$({},"__esModule",{value:!0}),$),Bw={};k2(Bw,{fromArrayBuffer:()=>v2,fromString:()=>y2});Tw.exports=h2(Bw);var x2=T0(),V0=j("buffer"),v2=Ew(($,U=0,G=$.byteLength-U)=>{if(!x2.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return V0.Buffer.from($,U,G)},"fromArrayBuffer"),y2=Ew(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?V0.Buffer.from($,U):V0.Buffer.from($)},"fromString")});var Hw=M((Vw)=>{Object.defineProperty(Vw,"__esModule",{value:!0});Vw.fromBase64=void 0;var c2=S1(),_2=/^[A-Za-z0-9+/]*={0,2}$/,u2=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!_2.exec($))throw new TypeError("Invalid base64 string.");let U=c2.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};Vw.fromBase64=u2});var o=M((gF,Nw)=>{var{defineProperty:Q$,getOwnPropertyDescriptor:d2,getOwnPropertyNames:g2}=Object,p2=Object.prototype.hasOwnProperty,A0=($,U)=>Q$($,"name",{value:U,configurable:!0}),s2=($,U)=>{for(var G in U)Q$($,G,{get:U[G],enumerable:!0})},l2=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of g2(U))if(!p2.call($,W)&&W!==G)Q$($,W,{get:()=>U[W],enumerable:!(w=d2(U,W))||w.enumerable})}return $},m2=($)=>l2(Q$({},"__esModule",{value:!0}),$),Ow={};s2(Ow,{fromUtf8:()=>Cw,toUint8Array:()=>n2,toUtf8:()=>i2});Nw.exports=m2(Ow);var fw=S1(),Cw=A0(($)=>{let U=fw.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),n2=A0(($)=>{if(typeof $==="string")return Cw($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),i2=A0(($)=>{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 fw.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var bw=M((qw)=>{Object.defineProperty(qw,"__esModule",{value:!0});qw.toBase64=void 0;var r2=S1(),o2=o(),a2=($)=>{let U;if(typeof $==="string")U=o2.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 r2.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};qw.toBase64=a2});var I$=M((sF,F$)=>{var{defineProperty:Pw,getOwnPropertyDescriptor:t2,getOwnPropertyNames:e2}=Object,$Y=Object.prototype.hasOwnProperty,H0=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of e2(U))if(!$Y.call($,W)&&W!==G)Pw($,W,{get:()=>U[W],enumerable:!(w=t2(U,W))||w.enumerable})}return $},Sw=($,U,G)=>(H0($,U,"default"),G&&H0(G,U,"default")),UY=($)=>H0(Pw({},"__esModule",{value:!0}),$),O0={};F$.exports=UY(O0);Sw(O0,Hw(),F$.exports);Sw(O0,bw(),F$.exports)});var hw=M((kw)=>{Object.defineProperty(kw,"__esModule",{value:!0});kw.getAwsChunkedEncodingStream=void 0;var GY=j("stream"),wY=($,U)=>{let{base64Encoder:G,bodyLengthChecker:w,checksumAlgorithmFn:W,checksumLocationName:L,streamHasher:X}=U,Z=G!==void 0&&W!==void 0&&L!==void 0&&X!==void 0,Y=Z?X(W,$):void 0,z=new GY.Readable({read:()=>{}});return $.on("data",(R)=>{let Q=w(R)||0;z.push(`${Q.toString(16)}\r
3
- `),z.push(R),z.push(`\r
4
- `)}),$.on("end",async()=>{if(z.push(`0\r
5
- `),Z){let R=G(await Y);z.push(`${L}:${R}\r
6
- `),z.push(`\r
7
- `)}z.push(null)}),z};kw.getAwsChunkedEncodingStream=wY});var C0=M((mF,yw)=>{var{defineProperty:J$,getOwnPropertyDescriptor:WY,getOwnPropertyNames:LY}=Object,XY=Object.prototype.hasOwnProperty,f0=($,U)=>J$($,"name",{value:U,configurable:!0}),ZY=($,U)=>{for(var G in U)J$($,G,{get:U[G],enumerable:!0})},YY=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of LY(U))if(!XY.call($,W)&&W!==G)J$($,W,{get:()=>U[W],enumerable:!(w=WY(U,W))||w.enumerable})}return $},zY=($)=>YY(J$({},"__esModule",{value:!0}),$),xw={};ZY(xw,{escapeUri:()=>vw,escapeUriPath:()=>QY});yw.exports=zY(xw);var vw=f0(($)=>encodeURIComponent($).replace(/[!'()*]/g,RY),"escapeUri"),RY=f0(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),QY=f0(($)=>$.split("/").map(vw).join("/"),"escapeUriPath")});var q0=M((nF,uw)=>{var{defineProperty:K$,getOwnPropertyDescriptor:FY,getOwnPropertyNames:IY}=Object,JY=Object.prototype.hasOwnProperty,KY=($,U)=>K$($,"name",{value:U,configurable:!0}),MY=($,U)=>{for(var G in U)K$($,G,{get:U[G],enumerable:!0})},EY=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of IY(U))if(!JY.call($,W)&&W!==G)K$($,W,{get:()=>U[W],enumerable:!(w=FY(U,W))||w.enumerable})}return $},BY=($)=>EY(K$({},"__esModule",{value:!0}),$),cw={};MY(cw,{buildQueryString:()=>_w});uw.exports=BY(cw);var N0=C0();function _w($){let U=[];for(let G of Object.keys($).sort()){let w=$[G];if(G=N0.escapeUri(G),Array.isArray(w))for(let W=0,L=w.length;W<L;W++)U.push(`${G}=${N0.escapeUri(w[W])}`);else{let W=G;if(w||typeof w==="string")W+=`=${N0.escapeUri(w)}`;U.push(W)}}return U.join("&")}KY(_w,"buildQueryString")});var LW=M((iF,WW)=>{var{create:TY,defineProperty:k1,getOwnPropertyDescriptor:VY,getOwnPropertyNames:AY,getPrototypeOf:HY}=Object,OY=Object.prototype.hasOwnProperty,T=($,U)=>k1($,"name",{value:U,configurable:!0}),fY=($,U)=>{for(var G in U)k1($,G,{get:U[G],enumerable:!0})},lw=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of AY(U))if(!OY.call($,W)&&W!==G)k1($,W,{get:()=>U[W],enumerable:!(w=VY(U,W))||w.enumerable})}return $},CY=($,U,G)=>(G=$!=null?TY(HY($)):{},lw(U||!$||!$.__esModule?k1(G,"default",{value:$,enumerable:!0}):G,$)),NY=($)=>lw(k1({},"__esModule",{value:!0}),$),mw={};fY(mw,{DEFAULT_REQUEST_TIMEOUT:()=>kY,NodeHttp2Handler:()=>yY,NodeHttpHandler:()=>DY,streamCollector:()=>_Y});WW.exports=NY(mw);var nw=l(),iw=q0(),j0=j("http"),b0=j("https"),qY=["ECONNRESET","EPIPE","ETIMEDOUT"],rw=T(($)=>{let U={};for(let G of Object.keys($)){let w=$[G];U[G]=Array.isArray(w)?w.join(","):w}return U},"getTransformedHeaders"),dw=1000,jY=T(($,U,G=0)=>{if(!G)return-1;let w=T((W)=>{let L=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G-W),X=T((Z)=>{if(Z==null?void 0:Z.connecting)Z.on("connect",()=>{clearTimeout(L)});else clearTimeout(L)},"doWithSocket");if($.socket)X($.socket);else $.on("socket",X)},"registerTimeout");if(G<2000)return w(0),0;return setTimeout(w.bind(null,dw),dw)},"setConnectionTimeout"),bY=3000,PY=T(($,{keepAlive:U,keepAliveMsecs:G},w=bY)=>{if(U!==!0)return-1;let W=T(()=>{if($.socket)$.socket.setKeepAlive(U,G||0);else $.on("socket",(L)=>{L.setKeepAlive(U,G||0)})},"registerListener");if(w===0)return W(),0;return setTimeout(W,w)},"setSocketKeepAlive"),gw=3000,SY=T(($,U,G=0)=>{let w=T((W)=>{$.setTimeout(G-W,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${G} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<G&&G<6000)return w(0),0;return setTimeout(w.bind(null,G===0?0:gw),gw)},"setSocketTimeout"),ow=j("stream"),pw=1000;async function P0($,U,G=pw){let w=U.headers??{},W=w.Expect||w.expect,L=-1,X=!1;if(W==="100-continue")await Promise.race([new Promise((Z)=>{L=Number(setTimeout(Z,Math.max(pw,G)))}),new Promise((Z)=>{$.on("continue",()=>{clearTimeout(L),Z()}),$.on("error",()=>{X=!0,clearTimeout(L),Z()})})]);if(!X)aw($,U.body)}T(P0,"writeRequestBody");function aw($,U){if(U instanceof ow.Readable){U.pipe($);return}if(U){if(Buffer.isBuffer(U)||typeof U==="string"){$.end(U);return}let G=U;if(typeof G==="object"&&G.buffer&&typeof G.byteOffset==="number"&&typeof G.byteLength==="number"){$.end(Buffer.from(G.buffer,G.byteOffset,G.byteLength));return}$.end(Buffer.from(U));return}$.end()}T(aw,"writeBody");var kY=0,tw=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,w)=>{if(typeof U==="function")U().then((W)=>{G(this.resolveDefaultConfig(W))}).catch(w);else G(this.resolveDefaultConfig(U))})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}static checkSocketUsage(U,G,w=console){var W,L,X;let{sockets:Z,requests:Y,maxSockets:z}=U;if(typeof z!=="number"||z===1/0)return G;let R=15000;if(Date.now()-R<G)return G;if(Z&&Y)for(let Q in Z){let I=((W=Z[Q])==null?void 0:W.length)??0,J=((L=Y[Q])==null?void 0:L.length)??0;if(I>=z&&J>=2*z)return(X=w==null?void 0:w.warn)==null||X.call(w,`@smithy/node-http-handler:WARN - socket usage at capacity=${I} and ${J} additional requests are enqueued.
8
- See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
9
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return G}resolveDefaultConfig(U){let{requestTimeout:G,connectionTimeout:w,socketTimeout:W,httpAgent:L,httpsAgent:X}=U||{},Z=!0,Y=50;return{connectionTimeout:w,requestTimeout:G??W,httpAgent:(()=>{if(L instanceof j0.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new j0.Agent({keepAlive:!0,maxSockets:50,...L})})(),httpsAgent:(()=>{if(X instanceof b0.Agent||typeof(X==null?void 0:X.destroy)==="function")return X;return new b0.Agent({keepAlive:!0,maxSockets:50,...X})})(),logger:console}}destroy(){var U,G,w,W;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(W=(w=this.config)==null?void 0:w.httpsAgent)==null||W.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;return new Promise((w,W)=>{let L=void 0,X=[],Z=T(async(B)=>{await L,X.forEach(clearTimeout),w(B)},"resolve"),Y=T(async(B)=>{await L,X.forEach(clearTimeout),W(B)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){let B=new Error("Request aborted");B.name="AbortError",Y(B);return}let z=U.protocol==="https:",R=z?this.config.httpsAgent:this.config.httpAgent;X.push(setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(R,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let Q=iw.buildQueryString(U.query||{}),I=void 0;if(U.username!=null||U.password!=null){let B=U.username??"",A=U.password??"";I=`${B}:${A}`}let J=U.path;if(Q)J+=`?${Q}`;if(U.fragment)J+=`#${U.fragment}`;let K=U.hostname??"";if(K[0]==="["&&K.endsWith("]"))K=U.hostname.slice(1,-1);else K=U.hostname;let E={headers:U.headers,host:K,method:U.method,path:J,port:U.port,agent:R,auth:I},S=(z?b0.request:j0.request)(E,(B)=>{let A=new nw.HttpResponse({statusCode:B.statusCode||-1,reason:B.statusMessage,headers:rw(B.headers),body:B});Z({response:A})});if(S.on("error",(B)=>{if(qY.includes(B.code))Y(Object.assign(B,{name:"TimeoutError"}));else Y(B)}),G){let B=T(()=>{S.destroy();let A=new Error("Request aborted");A.name="AbortError",Y(A)},"onAbort");if(typeof G.addEventListener==="function"){let A=G;A.addEventListener("abort",B,{once:!0}),S.once("close",()=>A.removeEventListener("abort",B))}else G.onabort=B}X.push(jY(S,Y,this.config.connectionTimeout)),X.push(SY(S,Y,this.config.requestTimeout));let O=E.agent;if(typeof O==="object"&&"keepAlive"in O)X.push(PY(S,{keepAlive:O.keepAlive,keepAliveMsecs:O.keepAliveMsecs}));L=P0(S,U,this.config.requestTimeout).catch((B)=>{return X.forEach(clearTimeout),W(B)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};T(tw,"NodeHttpHandler");var DY=tw,sw=j("http2"),hY=CY(j("http2")),ew=class ${constructor(U){this.sessions=[],this.sessions=U??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(U){this.sessions.push(U)}contains(U){return this.sessions.includes(U)}remove(U){this.sessions=this.sessions.filter((G)=>G!==U)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(U){for(let G of this.sessions)if(G===U){if(!G.destroyed)G.destroy()}}};T(ew,"NodeHttp2ConnectionPool");var xY=ew,$W=class ${constructor(U){if(this.sessionCache=new Map,this.config=U,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(U,G){let w=this.getUrlString(U),W=this.sessionCache.get(w);if(W){let Y=W.poll();if(Y&&!this.config.disableConcurrency)return Y}let L=hY.default.connect(w);if(this.config.maxConcurrency)L.settings({maxConcurrentStreams:this.config.maxConcurrency},(Y)=>{if(Y)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});L.unref();let X=T(()=>{L.destroy(),this.deleteSession(w,L)},"destroySessionCb");if(L.on("goaway",X),L.on("error",X),L.on("frameError",X),L.on("close",()=>this.deleteSession(w,L)),G.requestTimeout)L.setTimeout(G.requestTimeout,X);let Z=this.sessionCache.get(w)||new xY;return Z.offerLast(L),this.sessionCache.set(w,Z),L}deleteSession(U,G){let w=this.sessionCache.get(U);if(!w)return;if(!w.contains(G))return;w.remove(G),this.sessionCache.set(U,w)}release(U,G){var w;let W=this.getUrlString(U);(w=this.sessionCache.get(W))==null||w.offerLast(G)}destroy(){for(let[U,G]of this.sessionCache){for(let w of G){if(!w.destroyed)w.destroy();G.remove(w)}this.sessionCache.delete(U)}}setMaxConcurrentStreams(U){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=U}setDisableConcurrentStreams(U){this.config.disableConcurrency=U}getUrlString(U){return U.destination.toString()}};T($W,"NodeHttp2ConnectionManager");var vY=$W,UW=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new vY({}),this.configProvider=new Promise((G,w)=>{if(typeof U==="function")U().then((W)=>{G(W||{})}).catch(w);else G(U||{})})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}destroy(){this.connectionManager.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:w,disableConcurrentStreams:W}=this.config;return new Promise((L,X)=>{var Z;let Y=!1,z=void 0,R=T(async(N)=>{await z,L(N)},"resolve"),Q=T(async(N)=>{await z,X(N)},"reject");if(G==null?void 0:G.aborted){Y=!0;let N=new Error("Request aborted");N.name="AbortError",Q(N);return}let{hostname:I,method:J,port:K,protocol:E,query:V}=U,S="";if(U.username!=null||U.password!=null){let N=U.username??"",d=U.password??"";S=`${N}:${d}@`}let O=`${E}//${S}${I}${K?`:${K}`:""}`,B={destination:new URL(O)},A=this.connectionManager.lease(B,{requestTimeout:(Z=this.config)==null?void 0:Z.sessionTimeout,disableConcurrentStreams:W||!1}),D=T((N)=>{if(W)this.destroySession(A);Y=!0,Q(N)},"rejectWithDestroy"),G1=iw.buildQueryString(V||{}),e$=U.path;if(G1)e$+=`?${G1}`;if(U.fragment)e$+=`#${U.fragment}`;let v=A.request({...U.headers,[sw.constants.HTTP2_HEADER_PATH]:e$,[sw.constants.HTTP2_HEADER_METHOD]:J});if(A.ref(),v.on("response",(N)=>{let d=new nw.HttpResponse({statusCode:N[":status"]||-1,headers:rw(N),body:v});if(Y=!0,R({response:d}),W)A.close(),this.connectionManager.deleteSession(O,A)}),w)v.setTimeout(w,()=>{v.close();let N=new Error(`Stream timed out because of no activity for ${w} ms`);N.name="TimeoutError",D(N)});if(G){let N=T(()=>{v.close();let d=new Error("Request aborted");d.name="AbortError",D(d)},"onAbort");if(typeof G.addEventListener==="function"){let d=G;d.addEventListener("abort",N,{once:!0}),v.once("close",()=>d.removeEventListener("abort",N))}else G.onabort=N}v.on("frameError",(N,d,CL)=>{D(new Error(`Frame type id ${N} in stream id ${CL} has failed with code ${d}.`))}),v.on("error",D),v.on("aborted",()=>{D(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${v.rstCode}.`))}),v.on("close",()=>{if(A.unref(),W)A.destroy();if(!Y)D(new Error("Unexpected error: http2 request did not get a response"))}),z=P0(v,U,w)})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[U]:G}})}httpHandlerConfigs(){return this.config??{}}destroySession(U){if(!U.destroyed)U.destroy()}};T(UW,"NodeHttp2Handler");var yY=UW,GW=class $ extends ow.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,w){this.bufferedBytes.push(U),w()}};T(GW,"Collector");var cY=GW,_Y=T(($)=>{if(uY($))return wW($);return new Promise((U,G)=>{let w=new cY;$.pipe(w),$.on("error",(W)=>{w.end(),G(W)}),w.on("error",G),w.on("finish",function(){let W=new Uint8Array(Buffer.concat(this.bufferedBytes));U(W)})})},"streamCollector"),uY=T(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");async function wW($){let U=[],G=$.getReader(),w=!1,W=0;while(!w){let{done:Z,value:Y}=await G.read();if(Y)U.push(Y),W+=Y.length;w=Z}let L=new Uint8Array(W),X=0;for(let Z of U)L.set(Z,X),X+=Z.length;return L}T(wW,"collectReadableStream")});var JW=M((rF,IW)=>{var{defineProperty:E$,getOwnPropertyDescriptor:dY,getOwnPropertyNames:gY}=Object,pY=Object.prototype.hasOwnProperty,m=($,U)=>E$($,"name",{value:U,configurable:!0}),sY=($,U)=>{for(var G in U)E$($,G,{get:U[G],enumerable:!0})},lY=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of gY(U))if(!pY.call($,W)&&W!==G)E$($,W,{get:()=>U[W],enumerable:!(w=dY(U,W))||w.enumerable})}return $},mY=($)=>lY(E$({},"__esModule",{value:!0}),$),ZW={};sY(ZW,{FetchHttpHandler:()=>iY,keepAliveSupport:()=>M$,streamCollector:()=>oY});IW.exports=mY(ZW);var XW=l(),nY=q0();function YW($=0){return new Promise((U,G)=>{if($)setTimeout(()=>{let w=new Error(`Request did not complete within ${$} ms`);w.name="TimeoutError",G(w)},$)})}m(YW,"requestTimeout");var M$={supported:void 0},zW=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((G)=>G||{});else this.config=U??{},this.configProvider=Promise.resolve(this.config);if(M$.supported===void 0)M$.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(U,{abortSignal:G}={}){var w;if(!this.config)this.config=await this.configProvider;let W=this.config.requestTimeout,L=this.config.keepAlive===!0,X=this.config.credentials;if(G==null?void 0:G.aborted){let O=new Error("Request aborted");return O.name="AbortError",Promise.reject(O)}let Z=U.path,Y=nY.buildQueryString(U.query||{});if(Y)Z+=`?${Y}`;if(U.fragment)Z+=`#${U.fragment}`;let z="";if(U.username!=null||U.password!=null){let O=U.username??"",B=U.password??"";z=`${O}:${B}@`}let{port:R,method:Q}=U,I=`${U.protocol}//${z}${U.hostname}${R?`:${R}`:""}${Z}`,J=Q==="GET"||Q==="HEAD"?void 0:U.body,K={body:J,headers:new Headers(U.headers),method:Q,credentials:X};if((w=this.config)==null?void 0:w.cache)K.cache=this.config.cache;if(J)K.duplex="half";if(typeof AbortController!=="undefined")K.signal=G;if(M$.supported)K.keepalive=L;if(typeof this.config.requestInit==="function")Object.assign(K,this.config.requestInit(U));let E=m(()=>{},"removeSignalEventListener"),V=new Request(I,K),S=[fetch(V).then((O)=>{let B=O.headers,A={};for(let G1 of B.entries())A[G1[0]]=G1[1];if(O.body==null)return O.blob().then((G1)=>({response:new XW.HttpResponse({headers:A,reason:O.statusText,statusCode:O.status,body:G1})}));return{response:new XW.HttpResponse({headers:A,reason:O.statusText,statusCode:O.status,body:O.body})}}),YW(W)];if(G)S.push(new Promise((O,B)=>{let A=m(()=>{let D=new Error("Request aborted");D.name="AbortError",B(D)},"onAbort");if(typeof G.addEventListener==="function"){let D=G;D.addEventListener("abort",A,{once:!0}),E=m(()=>D.removeEventListener("abort",A),"removeSignalEventListener")}else G.onabort=A}));return Promise.race(S).finally(E)}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return w[U]=G,w})}httpHandlerConfigs(){return this.config??{}}};m(zW,"FetchHttpHandler");var iY=zW,rY=I$(),oY=m(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return RW($);return QW($)},"streamCollector");async function RW($){let U=await FW($),G=rY.fromBase64(U);return new Uint8Array(G)}m(RW,"collectBlob");async function QW($){let U=[],G=$.getReader(),w=!1,W=0;while(!w){let{done:Z,value:Y}=await G.read();if(Y)U.push(Y),W+=Y.length;w=Z}let L=new Uint8Array(W),X=0;for(let Z of U)L.set(Z,X),X+=Z.length;return L}m(QW,"collectStream");function FW($){return new Promise((U,G)=>{let w=new FileReader;w.onloadend=()=>{if(w.readyState!==2)return G(new Error("Reader aborted too early"));let W=w.result??"",L=W.indexOf(","),X=L>-1?L+1:W.length;U(W.substring(X))},w.onabort=()=>G(new Error("Read aborted")),w.onerror=()=>G(w.error),w.readAsDataURL($)})}m(FW,"readToBase64")});var D1=M((KW)=>{Object.defineProperty(KW,"__esModule",{value:!0});KW.isReadableStream=void 0;var aY=($)=>{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)};KW.isReadableStream=aY});var OW=M((AW)=>{Object.defineProperty(AW,"__esModule",{value:!0});AW.sdkStreamMixin=void 0;var tY=JW(),eY=I$(),$z=VW(),Uz=o(),EW=D1(),BW="The stream has already been transformed.",Gz=($)=>{var U,G;if(!TW($)&&!EW.isReadableStream($)){let X=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${X}`)}let w=!1,W=async()=>{if(w)throw new Error(BW);return w=!0,await tY.streamCollector($)},L=(X)=>{if(typeof X.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
10
- If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return X.stream()};return Object.assign($,{transformToByteArray:W,transformToString:async(X)=>{let Z=await W();if(X==="base64")return eY.toBase64(Z);else if(X==="hex")return $z.toHex(Z);else if(X===void 0||X==="utf8"||X==="utf-8")return Uz.toUtf8(Z);else if(typeof TextDecoder==="function")return new TextDecoder(X).decode(Z);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(w)throw new Error(BW);if(w=!0,TW($))return L($);else if(EW.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};AW.sdkStreamMixin=Gz;var TW=($)=>typeof Blob==="function"&&$ instanceof Blob});var qW=M((CW)=>{Object.defineProperty(CW,"__esModule",{value:!0});CW.sdkStreamMixin=void 0;var wz=LW(),Wz=S1(),S0=j("stream"),Lz=j("util"),Xz=OW(),fW="The stream has already been transformed.",Zz=($)=>{var U,G;if(!($ instanceof S0.Readable))try{return Xz.sdkStreamMixin($)}catch(L){let X=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${X}`)}let w=!1,W=async()=>{if(w)throw new Error(fW);return w=!0,await wz.streamCollector($)};return Object.assign($,{transformToByteArray:W,transformToString:async(L)=>{let X=await W();if(L===void 0||Buffer.isEncoding(L))return Wz.fromArrayBuffer(X.buffer,X.byteOffset,X.byteLength).toString(L);else return new Lz.TextDecoder(L).decode(X)},transformToWebStream:()=>{if(w)throw new Error(fW);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof S0.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,S0.Readable.toWeb($)}})};CW.sdkStreamMixin=Zz});var PW=M((jW)=>{Object.defineProperty(jW,"__esModule",{value:!0});jW.splitStream=void 0;async function Yz($){if(typeof $.stream==="function")$=$.stream();return $.tee()}jW.splitStream=Yz});var hW=M((kW)=>{Object.defineProperty(kW,"__esModule",{value:!0});kW.splitStream=void 0;var SW=j("stream"),zz=PW(),Rz=D1();async function Qz($){if(Rz.isReadableStream($))return zz.splitStream($);let U=new SW.PassThrough,G=new SW.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}kW.splitStream=Qz});var yW=M((xW)=>{Object.defineProperty(xW,"__esModule",{value:!0});xW.headStream=void 0;async function Fz($,U){var G;let w=0,W=[],L=$.getReader(),X=!1;while(!X){let{done:z,value:R}=await L.read();if(R)W.push(R),w+=(G=R===null||R===void 0?void 0:R.byteLength)!==null&&G!==void 0?G:0;if(w>=U)break;X=z}L.releaseLock();let Z=new Uint8Array(Math.min(U,w)),Y=0;for(let z of W){if(z.byteLength>Z.byteLength-Y){Z.set(z.subarray(0,Z.byteLength-Y),Y);break}else Z.set(z,Y);Y+=z.length}return Z}xW.headStream=Fz});var dW=M((_W)=>{Object.defineProperty(_W,"__esModule",{value:!0});_W.headStream=void 0;var Iz=j("stream"),Jz=yW(),Kz=D1(),Mz=($,U)=>{if(Kz.isReadableStream($))return Jz.headStream($,U);return new Promise((G,w)=>{let W=new cW;W.limit=U,$.pipe(W),$.on("error",(L)=>{W.end(),w(L)}),W.on("error",w),W.on("finish",function(){let L=new Uint8Array(Buffer.concat(this.buffers));G(L)})})};_W.headStream=Mz;class cW extends Iz.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write($,U,G){var w;if(this.buffers.push($),this.bytesBuffered+=(w=$.byteLength)!==null&&w!==void 0?w:0,this.bytesBuffered>=this.limit){let W=this.bytesBuffered-this.limit,L=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=L.subarray(0,L.byteLength-W),this.emit("finish")}G()}}});var nW=M((wI,Z1)=>{var{defineProperty:B$,getOwnPropertyDescriptor:Ez,getOwnPropertyNames:Bz}=Object,Tz=Object.prototype.hasOwnProperty,h0=($,U)=>B$($,"name",{value:U,configurable:!0}),Vz=($,U)=>{for(var G in U)B$($,G,{get:U[G],enumerable:!0})},k0=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of Bz(U))if(!Tz.call($,W)&&W!==G)B$($,W,{get:()=>U[W],enumerable:!(w=Ez(U,W))||w.enumerable})}return $},h1=($,U,G)=>(k0($,U,"default"),G&&k0(G,U,"default")),Az=($)=>k0(B$({},"__esModule",{value:!0}),$),X1={};Vz(X1,{Uint8ArrayBlobAdapter:()=>D0});Z1.exports=Az(X1);var gW=I$(),pW=o();function sW($,U="utf-8"){if(U==="base64")return gW.toBase64($);return pW.toUtf8($)}h0(sW,"transformToString");function lW($,U){if(U==="base64")return D0.mutate(gW.fromBase64($));return D0.mutate(pW.fromUtf8($))}h0(lW,"transformFromString");var mW=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return lW(U,G);default:throw new Error(`Unsupported conversion from ${typeof U} to Uint8ArrayBlobAdapter.`)}}static mutate(U){return Object.setPrototypeOf(U,$.prototype),U}transformToString(U="utf-8"){return sW(this,U)}};h0(mW,"Uint8ArrayBlobAdapter");var D0=mW;h1(X1,hw(),Z1.exports);h1(X1,qW(),Z1.exports);h1(X1,hW(),Z1.exports);h1(X1,dW(),Z1.exports);h1(X1,D1(),Z1.exports)});var T1=M((WI,M6)=>{var{defineProperty:H$,getOwnPropertyDescriptor:Oz,getOwnPropertyNames:fz}=Object,Cz=Object.prototype.hasOwnProperty,F=($,U)=>H$($,"name",{value:U,configurable:!0}),Nz=($,U)=>{for(var G in U)H$($,G,{get:U[G],enumerable:!0})},qz=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of fz(U))if(!Cz.call($,W)&&W!==G)H$($,W,{get:()=>U[W],enumerable:!(w=Oz(U,W))||w.enumerable})}return $},jz=($)=>qz(H$({},"__esModule",{value:!0}),$),rW={};Nz(rW,{Client:()=>Pz,Command:()=>$6,LazyJsonString:()=>NR,NoOpLogger:()=>bz,SENSITIVE_STRING:()=>Dz,ServiceException:()=>JR,StringWrapper:()=>_1,_json:()=>d0,collectBody:()=>Sz,convertMap:()=>qR,createAggregatedClient:()=>hz,dateToUtcString:()=>Z6,decorateServiceException:()=>z6,emitWarningIfUnsupportedVersion:()=>BR,expectBoolean:()=>vz,expectByte:()=>u0,expectFloat32:()=>T$,expectInt:()=>cz,expectInt32:()=>c0,expectLong:()=>y1,expectNonNull:()=>uz,expectNumber:()=>v1,expectObject:()=>G6,expectShort:()=>_0,expectString:()=>dz,expectUnion:()=>gz,extendedEncodeURIComponent:()=>A$,getArrayIfSingleItem:()=>CR,getDefaultClientConfiguration:()=>OR,getDefaultExtensionConfiguration:()=>Q6,getValueFromTextNode:()=>F6,handleFloat:()=>lz,limitedParseDouble:()=>s0,limitedParseFloat:()=>mz,limitedParseFloat32:()=>nz,loadConfigsForDefaultMode:()=>ER,logger:()=>c1,map:()=>m0,parseBoolean:()=>xz,parseEpochTimestamp:()=>LR,parseRfc3339DateTime:()=>tz,parseRfc3339DateTimeWithOffset:()=>$R,parseRfc7231DateTime:()=>WR,resolveDefaultRuntimeConfig:()=>fR,resolvedPath:()=>kR,serializeDateTime:()=>hR,serializeFloat:()=>DR,splitEvery:()=>K6,strictParseByte:()=>X6,strictParseDouble:()=>p0,strictParseFloat:()=>pz,strictParseFloat32:()=>w6,strictParseInt:()=>iz,strictParseInt32:()=>rz,strictParseLong:()=>L6,strictParseShort:()=>M1,take:()=>jR,throwDefaultError:()=>R6,withBaseException:()=>KR});M6.exports=jz(rW);var oW=class ${trace(){}debug(){}info(){}warn(){}error(){}};F(oW,"NoOpLogger");var bz=oW,aW=Hz(),tW=class ${constructor(U){this.config=U,this.middlewareStack=aW.constructStack()}send(U,G,w){let W=typeof G!=="function"?G:void 0,L=typeof G==="function"?G:w,X=W===void 0&&this.config.cacheMiddleware===!0,Z;if(X){if(!this.handlers)this.handlers=new WeakMap;let Y=this.handlers;if(Y.has(U.constructor))Z=Y.get(U.constructor);else Z=U.resolveMiddleware(this.middlewareStack,this.config,W),Y.set(U.constructor,Z)}else delete this.handlers,Z=U.resolveMiddleware(this.middlewareStack,this.config,W);if(L)Z(U).then((Y)=>L(null,Y.output),(Y)=>L(Y)).catch(()=>{});else return Z(U).then((Y)=>Y.output)}destroy(){var U,G,w;(w=(G=(U=this.config)==null?void 0:U.requestHandler)==null?void 0:G.destroy)==null||w.call(G),delete this.handlers}};F(tW,"Client");var Pz=tW,x0=nW(),Sz=F(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return x0.Uint8ArrayBlobAdapter.mutate($);if(!$)return x0.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let G=U.streamCollector($);return x0.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),y0=w1(),eW=class ${constructor(){this.middlewareStack=aW.constructStack()}static classBuilder(){return new kz}resolveMiddlewareWithContext(U,G,w,{middlewareFn:W,clientName:L,commandName:X,inputFilterSensitiveLog:Z,outputFilterSensitiveLog:Y,smithyContext:z,additionalContext:R,CommandCtor:Q}){for(let V of W.bind(this)(Q,U,G,w))this.middlewareStack.use(V);let I=U.concat(this.middlewareStack),{logger:J}=G,K={logger:J,clientName:L,commandName:X,inputFilterSensitiveLog:Z,outputFilterSensitiveLog:Y,[y0.SMITHY_CONTEXT_KEY]:{commandInstance:this,...z},...R},{requestHandler:E}=G;return I.resolve((V)=>E.handle(V.request,w||{}),K)}};F(eW,"Command");var $6=eW,U6=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(U)=>U,this._outputFilterSensitiveLog=(U)=>U,this._serializer=null,this._deserializer=null}init(U){this._init=U}ep(U){return this._ep=U,this}m(U){return this._middlewareFn=U,this}s(U,G,w={}){return this._smithyContext={service:U,operation:G,...w},this}c(U={}){return this._additionalContext=U,this}n(U,G){return this._clientName=U,this._commandName=G,this}f(U=(w)=>w,G=(w)=>w){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=G,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;let G=this,w;return w=(U=class extends $6{constructor(...[W]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=W??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(W,L,X){return this.resolveMiddlewareWithContext(W,L,X,{CommandCtor:w,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},F(U,"CommandRef"),U)}};F(U6,"ClassBuilder");var kz=U6,Dz="***SensitiveInformation***",hz=F(($,U)=>{for(let G of Object.keys($)){let w=$[G],W=F(async function(X,Z,Y){let z=new w(X);if(typeof Z==="function")this.send(z,Z);else if(typeof Y==="function"){if(typeof Z!=="object")throw new Error(`Expected http options but got ${typeof Z}`);this.send(z,Z||{},Y)}else return this.send(z,Z)},"methodImpl"),L=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[L]=W}},"createAggregatedClient"),xz=F(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),vz=F(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)c1.warn(V$(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){let U=$.toLowerCase();if(U==="false"||U==="true")c1.warn(V$(`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"),v1=F(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){let U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))c1.warn(V$(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),yz=Math.ceil(340282346638528860000000000000000000000),T$=F(($)=>{let U=v1($);if(U!==void 0&&!Number.isNaN(U)&&U!==1/0&&U!==-1/0){if(Math.abs(U)>yz)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),y1=F(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),cz=y1,c0=F(($)=>g0($,32),"expectInt32"),_0=F(($)=>g0($,16),"expectShort"),u0=F(($)=>g0($,8),"expectByte"),g0=F(($,U)=>{let G=y1($);if(G!==void 0&&_z(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),_z=F(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),uz=F(($,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"),G6=F(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;let U=Array.isArray($)?"array":typeof $;throw new TypeError(`Expected object, got ${U}: ${$}`)},"expectObject"),dz=F(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return c1.warn(V$(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),gz=F(($)=>{if($===null||$===void 0)return;let U=G6($),G=Object.entries(U).filter(([,w])=>w!=null).map(([w])=>w);if(G.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(G.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${G} were not null.`);return U},"expectUnion"),p0=F(($)=>{if(typeof $=="string")return v1(B1($));return v1($)},"strictParseDouble"),pz=p0,w6=F(($)=>{if(typeof $=="string")return T$(B1($));return T$($)},"strictParseFloat32"),sz=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,B1=F(($)=>{let U=$.match(sz);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),s0=F(($)=>{if(typeof $=="string")return W6($);return v1($)},"limitedParseDouble"),lz=s0,mz=s0,nz=F(($)=>{if(typeof $=="string")return W6($);return T$($)},"limitedParseFloat32"),W6=F(($)=>{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"),L6=F(($)=>{if(typeof $==="string")return y1(B1($));return y1($)},"strictParseLong"),iz=L6,rz=F(($)=>{if(typeof $==="string")return c0(B1($));return c0($)},"strictParseInt32"),M1=F(($)=>{if(typeof $==="string")return _0(B1($));return _0($)},"strictParseShort"),X6=F(($)=>{if(typeof $==="string")return u0(B1($));return u0($)},"strictParseByte"),V$=F(($)=>{return String(new TypeError($).stack||$).split(`
11
- `).slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join(`
12
- `)},"stackTraceWarning"),c1={warn:console.warn},oz=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],l0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Z6($){let U=$.getUTCFullYear(),G=$.getUTCMonth(),w=$.getUTCDay(),W=$.getUTCDate(),L=$.getUTCHours(),X=$.getUTCMinutes(),Z=$.getUTCSeconds(),Y=W<10?`0${W}`:`${W}`,z=L<10?`0${L}`:`${L}`,R=X<10?`0${X}`:`${X}`,Q=Z<10?`0${Z}`:`${Z}`;return`${oz[w]}, ${Y} ${l0[G]} ${U} ${z}:${R}:${Q} GMT`}F(Z6,"dateToUtcString");var az=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),tz=F(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let U=az.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");let[G,w,W,L,X,Z,Y,z]=U,R=M1(E1(w)),Q=s(W,"month",1,12),I=s(L,"day",1,31);return x1(R,Q,I,{hours:X,minutes:Z,seconds:Y,fractionalMilliseconds:z})},"parseRfc3339DateTime"),ez=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),$R=F(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let U=ez.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");let[G,w,W,L,X,Z,Y,z,R]=U,Q=M1(E1(w)),I=s(W,"month",1,12),J=s(L,"day",1,31),K=x1(Q,I,J,{hours:X,minutes:Z,seconds:Y,fractionalMilliseconds:z});if(R.toUpperCase()!="Z")K.setTime(K.getTime()-IR(R));return K},"parseRfc3339DateTimeWithOffset"),UR=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$/),GR=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$/),wR=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})$/),WR=F(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=UR.exec($);if(U){let[G,w,W,L,X,Z,Y,z]=U;return x1(M1(E1(L)),v0(W),s(w,"day",1,31),{hours:X,minutes:Z,seconds:Y,fractionalMilliseconds:z})}if(U=GR.exec($),U){let[G,w,W,L,X,Z,Y,z]=U;return YR(x1(XR(L),v0(W),s(w,"day",1,31),{hours:X,minutes:Z,seconds:Y,fractionalMilliseconds:z}))}if(U=wR.exec($),U){let[G,w,W,L,X,Z,Y,z]=U;return x1(M1(E1(z)),v0(w),s(W.trimLeft(),"day",1,31),{hours:L,minutes:X,seconds:Z,fractionalMilliseconds:Y})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),LR=F(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=p0($);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"),x1=F(($,U,G,w)=>{let W=U-1;return RR($,W,G),new Date(Date.UTC($,W,G,s(w.hours,"hour",0,23),s(w.minutes,"minute",0,59),s(w.seconds,"seconds",0,60),FR(w.fractionalMilliseconds)))},"buildDate"),XR=F(($)=>{let U=new Date().getUTCFullYear(),G=Math.floor(U/100)*100+M1(E1($));if(G<U)return G+100;return G},"parseTwoDigitYear"),ZR=1576800000000,YR=F(($)=>{if($.getTime()-new Date().getTime()>ZR)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),v0=F(($)=>{let U=l0.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),zR=[31,28,31,30,31,30,31,31,30,31,30,31],RR=F(($,U,G)=>{let w=zR[U];if(U===1&&QR($))w=29;if(G>w)throw new TypeError(`Invalid day for ${l0[U]} in ${$}: ${G}`)},"validateDayOfMonth"),QR=F(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),s=F(($,U,G,w)=>{let W=X6(E1($));if(W<G||W>w)throw new TypeError(`${U} must be between ${G} and ${w}, inclusive`);return W},"parseDateValue"),FR=F(($)=>{if($===null||$===void 0)return 0;return w6("0."+$)*1000},"parseMilliseconds"),IR=F(($)=>{let U=$[0],G=1;if(U=="+")G=1;else if(U=="-")G=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);let w=Number($.substring(1,3)),W=Number($.substring(4,6));return G*(w*60+W)*60*1000},"parseOffsetToMilliseconds"),E1=F(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),Y6=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};F(Y6,"ServiceException");var JR=Y6,z6=F(($,U={})=>{Object.entries(U).filter(([,w])=>w!==void 0).forEach(([w,W])=>{if($[w]==null||$[w]==="")$[w]=W});let G=$.message||$.Message||"UnknownError";return $.message=G,delete $.Message,$},"decorateServiceException"),R6=F(({output:$,parsedBody:U,exceptionCtor:G,errorCode:w})=>{let W=MR($),L=W.httpStatusCode?W.httpStatusCode+"":void 0,X=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||w||L||"UnknownError",$fault:"client",$metadata:W});throw z6(X,U)},"throwDefaultError"),KR=F(($)=>{return({output:U,parsedBody:G,errorCode:w})=>{R6({output:U,parsedBody:G,exceptionCtor:$,errorCode:w})}},"withBaseException"),MR=F(($)=>({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"),ER=F(($)=>{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"),iW=!1,BR=F(($)=>{if($&&!iW&&parseInt($.substring(1,$.indexOf(".")))<16)iW=!0},"emitWarningIfUnsupportedVersion"),TR=F(($)=>{let U=[];for(let G in y0.AlgorithmId){let w=y0.AlgorithmId[G];if($[w]===void 0)continue;U.push({algorithmId:()=>w,checksumConstructor:()=>$[w]})}return{_checksumAlgorithms:U,addChecksumAlgorithm(G){this._checksumAlgorithms.push(G)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),VR=F(($)=>{let U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),AR=F(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),HR=F(($)=>{let U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),Q6=F(($)=>{return{...TR($),...AR($)}},"getDefaultExtensionConfiguration"),OR=Q6,fR=F(($)=>{return{...VR($),...HR($)}},"resolveDefaultRuntimeConfig");function A$($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})}F(A$,"extendedEncodeURIComponent");var CR=F(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),F6=F(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=F6($[G]);return $},"getValueFromTextNode"),_1=F(function(){let $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");_1.prototype=Object.create(String.prototype,{constructor:{value:_1,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(_1,String);var I6=class $ extends _1{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))}};F(I6,"LazyJsonString");var NR=I6;function m0($,U,G){let w,W,L;if(typeof U==="undefined"&&typeof G==="undefined")w={},L=$;else if(w=$,typeof U==="function")return W=U,L=G,bR(w,W,L);else L=U;for(let X of Object.keys(L)){if(!Array.isArray(L[X])){w[X]=L[X];continue}J6(w,null,L,X)}return w}F(m0,"map");var qR=F(($)=>{let U={};for(let[G,w]of Object.entries($||{}))U[G]=[,w];return U},"convertMap"),jR=F(($,U)=>{let G={};for(let w in U)J6(G,$,U,w);return G},"take"),bR=F(($,U,G)=>{return m0($,Object.entries(G).reduce((w,[W,L])=>{if(Array.isArray(L))w[W]=L;else if(typeof L==="function")w[W]=[U,L()];else w[W]=[U,L];return w},{}))},"mapWithFilter"),J6=F(($,U,G,w)=>{if(U!==null){let X=G[w];if(typeof X==="function")X=[,X];let[Z=PR,Y=SR,z=w]=X;if(typeof Z==="function"&&Z(U[z])||typeof Z!=="function"&&!!Z)$[w]=Y(U[z]);return}let[W,L]=G[w];if(typeof L==="function"){let X,Z=W===void 0&&(X=L())!=null,Y=typeof W==="function"&&!!W(void 0)||typeof W!=="function"&&!!W;if(Z)$[w]=X;else if(Y)$[w]=L()}else{let X=W===void 0&&L!=null,Z=typeof W==="function"&&!!W(L)||typeof W!=="function"&&!!W;if(X||Z)$[w]=L}},"applyInstruction"),PR=F(($)=>$!=null,"nonNullish"),SR=F(($)=>$,"pass"),kR=F(($,U,G,w,W,L)=>{if(U!=null&&U[G]!==void 0){let X=w();if(X.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(W,L?X.split("/").map((Z)=>A$(Z)).join("/"):A$(X))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),DR=F(($)=>{if($!==$)return"NaN";switch($){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return $}},"serializeFloat"),hR=F(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),d0=F(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(d0);if(typeof $==="object"){let U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=d0($[G])}return U}return $},"_json");function K6($,U,G){if(G<=0||!Number.isInteger(G))throw new Error("Invalid number of delimiters ("+G+") for splitEvery.");let w=$.split(U);if(G===1)return w;let W=[],L="";for(let X=0;X<w.length;X++){if(L==="")L=w[X];else L+=U+w[X];if((X+1)%G===0)W.push(L),L=""}if(L!=="")W.push(L);return W}F(K6,"splitEvery")});var T6=M((E6)=>{Object.defineProperty(E6,"__esModule",{value:!0});E6.isStreamingPayload=void 0;var xR=j("stream"),vR=($)=>($===null||$===void 0?void 0:$.body)instanceof xR.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;E6.isStreamingPayload=vR});var y6=M((ZI,v6)=>{var{defineProperty:O$,getOwnPropertyDescriptor:cR,getOwnPropertyNames:_R}=Object,uR=Object.prototype.hasOwnProperty,b=($,U)=>O$($,"name",{value:U,configurable:!0}),dR=($,U)=>{for(var G in U)O$($,G,{get:U[G],enumerable:!0})},gR=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of _R(U))if(!uR.call($,W)&&W!==G)O$($,W,{get:()=>U[W],enumerable:!(w=cR(U,W))||w.enumerable})}return $},pR=($)=>gR(O$({},"__esModule",{value:!0}),$),A6={};dR(A6,{AdaptiveRetryStrategy:()=>mR,CONFIG_MAX_ATTEMPTS:()=>i0,CONFIG_RETRY_MODE:()=>P6,ENV_MAX_ATTEMPTS:()=>n0,ENV_RETRY_MODE:()=>b6,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>nR,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>rR,StandardRetryStrategy:()=>q6,defaultDelayDecider:()=>O6,defaultRetryDecider:()=>f6,getOmitRetryHeadersPlugin:()=>oR,getRetryAfterHint:()=>x6,getRetryPlugin:()=>G9,omitRetryHeadersMiddleware:()=>S6,omitRetryHeadersMiddlewareOptions:()=>k6,resolveRetryConfig:()=>iR,retryMiddleware:()=>D6,retryMiddlewareOptions:()=>h6});v6.exports=pR(A6);var V1=l(),H6=yR(),C=Jw(),sR=b(($,U)=>{let G=$,w=(U==null?void 0:U.noRetryIncrement)??C.NO_RETRY_INCREMENT,W=(U==null?void 0:U.retryCost)??C.RETRY_COST,L=(U==null?void 0:U.timeoutRetryCost)??C.TIMEOUT_RETRY_COST,X=$,Z=b((Q)=>Q.name==="TimeoutError"?L:W,"getCapacityAmount"),Y=b((Q)=>Z(Q)<=X,"hasRetryTokens");return Object.freeze({hasRetryTokens:Y,retrieveRetryTokens:b((Q)=>{if(!Y(Q))throw new Error("No retry token available");let I=Z(Q);return X-=I,I},"retrieveRetryTokens"),releaseRetryTokens:b((Q)=>{X+=Q??w,X=Math.min(X,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),O6=b(($,U)=>Math.floor(Math.min(C.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),a=J0(),f6=b(($)=>{if(!$)return!1;return a.isRetryableByTrait($)||a.isClockSkewError($)||a.isThrottlingError($)||a.isTransientError($)},"defaultRetryDecider"),C6=b(($)=>{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"),N6=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=C.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??f6,this.delayDecider=(G==null?void 0:G.delayDecider)??O6,this.retryQuota=(G==null?void 0:G.retryQuota)??sR(C.INITIAL_RETRY_TOKENS)}shouldRetry(U,G,w){return G<w&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(G){U=C.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,w){let W,L=0,X=0,Z=await this.getMaxAttempts(),{request:Y}=G;if(V1.HttpRequest.isInstance(Y))Y.headers[C.INVOCATION_ID_HEADER]=H6.v4();while(!0)try{if(V1.HttpRequest.isInstance(Y))Y.headers[C.REQUEST_HEADER]=`attempt=${L+1}; max=${Z}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();let{response:z,output:R}=await U(G);if(w==null?void 0:w.afterRequest)w.afterRequest(z);return this.retryQuota.releaseRetryTokens(W),R.$metadata.attempts=L+1,R.$metadata.totalRetryDelay=X,{response:z,output:R}}catch(z){let R=C6(z);if(L++,this.shouldRetry(R,L,Z)){W=this.retryQuota.retrieveRetryTokens(R);let Q=this.delayDecider(a.isThrottlingError(R)?C.THROTTLING_RETRY_DELAY_BASE:C.DEFAULT_RETRY_DELAY_BASE,L),I=lR(R.$response),J=Math.max(I||0,Q);X+=J,await new Promise((K)=>setTimeout(K,J));continue}if(!R.$metadata)R.$metadata={};throw R.$metadata.attempts=L,R.$metadata.totalRetryDelay=X,R}}};b(N6,"StandardRetryStrategy");var q6=N6,lR=b(($)=>{if(!V1.HttpResponse.isInstance($))return;let U=Object.keys($.headers).find((L)=>L.toLowerCase()==="retry-after");if(!U)return;let G=$.headers[U],w=Number(G);if(!Number.isNaN(w))return w*1000;return new Date(G).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),j6=class $ extends q6{constructor(U,G){let{rateLimiter:w,...W}=G??{};super(U,W);this.rateLimiter=w??new C.DefaultRateLimiter,this.mode=C.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}};b(j6,"AdaptiveRetryStrategy");var mR=j6,V6=N1(),n0="AWS_MAX_ATTEMPTS",i0="max_attempts",nR={environmentVariableSelector:($)=>{let U=$[n0];if(!U)return;let G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${n0} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{let U=$[i0];if(!U)return;let G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${i0} mast be a number, got "${U}"`);return G},default:C.DEFAULT_MAX_ATTEMPTS},iR=b(($)=>{let{retryStrategy:U}=$,G=V6.normalizeProvider($.maxAttempts??C.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await V6.normalizeProvider($.retryMode)()===C.RETRY_MODES.ADAPTIVE)return new C.AdaptiveRetryStrategy(G);return new C.StandardRetryStrategy(G)}}},"resolveRetryConfig"),b6="AWS_RETRY_MODE",P6="retry_mode",rR={environmentVariableSelector:($)=>$[b6],configFileSelector:($)=>$[P6],default:C.DEFAULT_RETRY_MODE},S6=b(()=>($)=>async(U)=>{let{request:G}=U;if(V1.HttpRequest.isInstance(G))delete G.headers[C.INVOCATION_ID_HEADER],delete G.headers[C.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),k6={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},oR=b(($)=>({applyToStack:(U)=>{U.addRelativeTo(S6(),k6)}}),"getOmitRetryHeadersPlugin"),aR=T1(),tR=T6(),D6=b(($)=>(U,G)=>async(w)=>{var W;let L=await $.retryStrategy(),X=await $.maxAttempts();if(eR(L)){L=L;let Z=await L.acquireInitialRetryToken(G.partition_id),Y=new Error,z=0,R=0,{request:Q}=w,I=V1.HttpRequest.isInstance(Q);if(I)Q.headers[C.INVOCATION_ID_HEADER]=H6.v4();while(!0)try{if(I)Q.headers[C.REQUEST_HEADER]=`attempt=${z+1}; max=${X}`;let{response:J,output:K}=await U(w);return L.recordSuccess(Z),K.$metadata.attempts=z+1,K.$metadata.totalRetryDelay=R,{response:J,output:K}}catch(J){let K=$9(J);if(Y=C6(J),I&&tR.isStreamingPayload(Q))throw(W=G.logger instanceof aR.NoOpLogger?console:G.logger)==null||W.warn("An error was encountered in a non-retryable streaming request."),Y;try{Z=await L.refreshRetryTokenForRetry(Z,K)}catch(V){if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=z+1,Y.$metadata.totalRetryDelay=R,Y}z=Z.getRetryCount();let E=Z.getRetryDelay();R+=E,await new Promise((V)=>setTimeout(V,E))}}else{if(L=L,L==null?void 0:L.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",L.mode]];return L.retry(U,w)}},"retryMiddleware"),eR=b(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),$9=b(($)=>{let U={error:$,errorType:U9($)},G=x6($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),U9=b(($)=>{if(a.isThrottlingError($))return"THROTTLING";if(a.isTransientError($))return"TRANSIENT";if(a.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),h6={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},G9=b(($)=>({applyToStack:(U)=>{U.add(D6($),h6)}}),"getRetryPlugin"),x6=b(($)=>{if(!V1.HttpResponse.isInstance($))return;let U=Object.keys($.headers).find((L)=>L.toLowerCase()==="retry-after");if(!U)return;let G=$.headers[U],w=Number(G);if(!Number.isNaN(w))return new Date(w*1000);return new Date(G)},"getRetryAfterHint")});var o0=M((YI,G8)=>{var{defineProperty:C$,getOwnPropertyDescriptor:w9,getOwnPropertyNames:W9}=Object,L9=Object.prototype.hasOwnProperty,f=($,U)=>C$($,"name",{value:U,configurable:!0}),X9=($,U)=>{for(var G in U)C$($,G,{get:U[G],enumerable:!0})},Z9=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of W9(U))if(!L9.call($,W)&&W!==G)C$($,W,{get:()=>U[W],enumerable:!(w=w9(U,W))||w.enumerable})}return $},Y9=($)=>Z9(C$({},"__esModule",{value:!0}),$),c6={};X9(c6,{DefaultIdentityProviderConfig:()=>E9,EXPIRATION_MS:()=>o6,HttpApiKeyAuthSigner:()=>B9,HttpBearerAuthSigner:()=>T9,NoAuthSigner:()=>V9,RequestBuilder:()=>$8,createIsIdentityExpiredFunction:()=>r6,createPaginator:()=>U8,doesIdentityRequireRefresh:()=>a6,getHttpAuthSchemeEndpointRuleSetPlugin:()=>R9,getHttpAuthSchemePlugin:()=>F9,getHttpSigningPlugin:()=>M9,getSmithyContext:()=>O9,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>d6,httpAuthSchemeMiddleware:()=>r0,httpAuthSchemeMiddlewareOptions:()=>g6,httpSigningMiddleware:()=>p6,httpSigningMiddlewareOptions:()=>s6,isIdentityExpired:()=>A9,memoizeIdentityProvider:()=>H9,normalizeProvider:()=>f9,requestBuilder:()=>t6});G8.exports=Y9(c6);var _6=N1();function u6($){let U=new Map;for(let G of $)U.set(G.schemeId,G);return U}f(u6,"convertHttpAuthSchemesToMap");var r0=f(($,U)=>(G,w)=>async(W)=>{var L;let X=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,w,W.input)),Z=u6($.httpAuthSchemes),Y=_6.getSmithyContext(w),z=[];for(let R of X){let Q=Z.get(R.schemeId);if(!Q){z.push(`HttpAuthScheme \`${R.schemeId}\` was not enabled for this service.`);continue}let I=Q.identityProvider(await U.identityProviderConfigProvider($));if(!I){z.push(`HttpAuthScheme \`${R.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:J={},signingProperties:K={}}=((L=R.propertiesExtractor)==null?void 0:L.call(R,$,w))||{};R.identityProperties=Object.assign(R.identityProperties||{},J),R.signingProperties=Object.assign(R.signingProperties||{},K),Y.selectedHttpAuthScheme={httpAuthOption:R,identity:await I(R.identityProperties),signer:Q.signer};break}if(!Y.selectedHttpAuthScheme)throw new Error(z.join(`
13
- `));return G(W)},"httpAuthSchemeMiddleware"),z9=dG(),d6={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:z9.endpointMiddlewareOptions.name},R9=f(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(w)=>{w.addRelativeTo(r0($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),d6)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Q9=F0(),g6={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Q9.serializerMiddlewareOption.name},F9=f(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(w)=>{w.addRelativeTo(r0($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),g6)}}),"getHttpAuthSchemePlugin"),N$=l(),I9=f(($)=>(U)=>{throw U},"defaultErrorHandler"),J9=f(($,U)=>{},"defaultSuccessHandler"),p6=f(($)=>(U,G)=>async(w)=>{if(!N$.HttpRequest.isInstance(w.request))return U(w);let L=_6.getSmithyContext(G).selectedHttpAuthScheme;if(!L)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:X={}},identity:Z,signer:Y}=L,z=await U({...w,request:await Y.sign(w.request,Z,X)}).catch((Y.errorHandler||I9)(X));return(Y.successHandler||J9)(z.response,X),z},"httpSigningMiddleware"),K9=y6(),s6={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:K9.retryMiddlewareOptions.name},M9=f(($)=>({applyToStack:(U)=>{U.addRelativeTo(p6($),s6)}}),"getHttpSigningPlugin"),l6=class ${constructor(U){this.authSchemes=new Map;for(let[G,w]of Object.entries(U))if(w!==void 0)this.authSchemes.set(G,w)}getIdentityProvider(U){return this.authSchemes.get(U)}};f(l6,"DefaultIdentityProviderConfig");var E9=l6,f$=w1(),m6=class ${async sign(U,G,w){if(!w)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!w.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!w.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!G.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let W=N$.HttpRequest.clone(U);if(w.in===f$.HttpApiKeyAuthLocation.QUERY)W.query[w.name]=G.apiKey;else if(w.in===f$.HttpApiKeyAuthLocation.HEADER)W.headers[w.name]=w.scheme?`${w.scheme} ${G.apiKey}`:G.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return W}};f(m6,"HttpApiKeyAuthSigner");var B9=m6,n6=class ${async sign(U,G,w){let W=N$.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return W.headers.Authorization=`Bearer ${G.token}`,W}};f(n6,"HttpBearerAuthSigner");var T9=n6,i6=class ${async sign(U,G,w){return U}};f(i6,"NoAuthSigner");var V9=i6,r6=f(($)=>(U)=>a6(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),o6=300000,A9=r6(o6),a6=f(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),H9=f(($,U,G)=>{if($===void 0)return;let w=typeof $!=="function"?async()=>Promise.resolve($):$,W,L,X,Z=!1,Y=f(async(z)=>{if(!L)L=w(z);try{W=await L,X=!0,Z=!1}finally{L=void 0}return W},"coalesceProvider");if(U===void 0)return async(z)=>{if(!X||(z==null?void 0:z.forceRefresh))W=await Y(z);return W};return async(z)=>{if(!X||(z==null?void 0:z.forceRefresh))W=await Y(z);if(Z)return W;if(!G(W))return Z=!0,W;if(U(W))return await Y(z),W;return W}},"memoizeIdentityProvider"),O9=f(($)=>$[f$.SMITHY_CONTEXT_KEY]||($[f$.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),f9=f(($)=>{if(typeof $==="function")return $;let U=Promise.resolve($);return()=>U},"normalizeProvider"),C9=T1();function t6($,U){return new $8($,U)}f(t6,"requestBuilder");var e6=class ${constructor(U,G){this.input=U,this.context=G,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:U,protocol:G="https",port:w,path:W}=await this.context.endpoint();this.path=W;for(let L of this.resolvePathStack)L(this.path);return new N$.HttpRequest({protocol:G,hostname:this.hostname||U,port:w,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(U){return this.hostname=U,this}bp(U){return this.resolvePathStack.push((G)=>{this.path=`${(G==null?void 0:G.endsWith("/"))?G.slice(0,-1):G||""}`+U}),this}p(U,G,w,W){return this.resolvePathStack.push((L)=>{this.path=C9.resolvedPath(L,this.input,U,G,w,W)}),this}h(U){return this.headers=U,this}q(U){return this.query=U,this}b(U){return this.body=U,this}m(U){return this.method=U,this}};f(e6,"RequestBuilder");var $8=e6,N9=f(async($,U,G,...w)=>{return await U.send(new $(G),...w)},"makePagedClientRequest");function U8($,U,G,w,W){return f(async function*L(X,Z,...Y){let z=X.startingToken||void 0,R=!0,Q;while(R){if(Z[G]=z,W)Z[W]=Z[W]??X.pageSize;if(X.client instanceof $)Q=await N9(U,X.client,Z,...Y);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield Q;let I=z;z=q9(Q,w),R=!!(z&&(!X.stopOnSameToken||z!==I))}return},"paginateOperation")}f(U8,"createPaginator");var q9=f(($,U)=>{let G=$,w=U.split(".");for(let W of w){if(!G||typeof G!=="object")return;G=G[W]}return G},"get")});var t8=M((PB,a8)=>{var{defineProperty:p$,getOwnPropertyDescriptor:YQ,getOwnPropertyNames:zQ}=Object,RQ=Object.prototype.hasOwnProperty,QQ=($,U)=>p$($,"name",{value:U,configurable:!0}),FQ=($,U)=>{for(var G in U)p$($,G,{get:U[G],enumerable:!0})},IQ=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of zQ(U))if(!RQ.call($,W)&&W!==G)p$($,W,{get:()=>U[W],enumerable:!(w=YQ(U,W))||w.enumerable})}return $},JQ=($)=>IQ(p$({},"__esModule",{value:!0}),$),o8={};FQ(o8,{emitWarningIfUnsupportedVersion:()=>KQ});a8.exports=JQ(o8);var r8=!1,KQ=QQ(($)=>{if($&&!r8&&parseInt($.substring(1,$.indexOf(".")))<18)r8=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
14
- no longer support Node.js 16.x on January 6, 2025.
15
-
16
- To continue receiving updates to AWS services, bug fixes, and security
17
- updates please upgrade to a supported Node.js LTS version.
18
-
19
- More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var B4=M((SB,E4)=>{var{defineProperty:r$,getOwnPropertyDescriptor:MQ,getOwnPropertyNames:EQ}=Object,BQ=Object.prototype.hasOwnProperty,P=($,U)=>r$($,"name",{value:U,configurable:!0}),TQ=($,U)=>{for(var G in U)r$($,G,{get:U[G],enumerable:!0})},VQ=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of EQ(U))if(!BQ.call($,W)&&W!==G)r$($,W,{get:()=>U[W],enumerable:!(w=MQ(U,W))||w.enumerable})}return $},AQ=($)=>VQ(r$({},"__esModule",{value:!0}),$),w4={};TQ(w4,{SignatureV4:()=>nQ,clearCredentialCache:()=>cQ,createScope:()=>m$,getCanonicalHeaders:()=>AU,getCanonicalQuery:()=>Q4,getPayloadHash:()=>i$,getSigningKey:()=>R4,moveHeadersToQuery:()=>K4,prepareRequest:()=>OU});E4.exports=AQ(w4);var e8=N1(),BU=o(),HQ="X-Amz-Algorithm",OQ="X-Amz-Credential",W4="X-Amz-Date",fQ="X-Amz-SignedHeaders",CQ="X-Amz-Expires",L4="X-Amz-Signature",X4="X-Amz-Security-Token",Z4="authorization",Y4=W4.toLowerCase(),NQ="date",qQ=[Z4,Y4,NQ],jQ=L4.toLowerCase(),VU="x-amz-content-sha256",bQ=X4.toLowerCase(),PQ={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},SQ=/^proxy-/,kQ=/^sec-/,TU="AWS4-HMAC-SHA256",DQ="AWS4-HMAC-SHA256-PAYLOAD",hQ="UNSIGNED-PAYLOAD",xQ=50,z4="aws4_request",vQ=604800,$1=VW(),yQ=o(),C1={},l$=[],m$=P(($,U,G)=>`${$}/${U}/${G}/${z4}`,"createScope"),R4=P(async($,U,G,w,W)=>{let L=await $4($,U.secretAccessKey,U.accessKeyId),X=`${G}:${w}:${W}:${$1.toHex(L)}:${U.sessionToken}`;if(X in C1)return C1[X];l$.push(X);while(l$.length>xQ)delete C1[l$.shift()];let Z=`AWS4${U.secretAccessKey}`;for(let Y of[G,w,W,z4])Z=await $4($,Z,Y);return C1[X]=Z},"getSigningKey"),cQ=P(()=>{l$.length=0,Object.keys(C1).forEach(($)=>{delete C1[$]})},"clearCredentialCache"),$4=P(($,U,G)=>{let w=new $(U);return w.update(yQ.toUint8Array(G)),w.digest()},"hmac"),AU=P(({headers:$},U,G)=>{let w={};for(let W of Object.keys($).sort()){if($[W]==null)continue;let L=W.toLowerCase();if(L in PQ||(U==null?void 0:U.has(L))||SQ.test(L)||kQ.test(L)){if(!G||G&&!G.has(L))continue}w[L]=$[W].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),n$=C0(),Q4=P(({query:$={}})=>{let U=[],G={};for(let w of Object.keys($)){if(w.toLowerCase()===jQ)continue;let W=n$.escapeUri(w);U.push(W);let L=$[w];if(typeof L==="string")G[W]=`${W}=${n$.escapeUri(L)}`;else if(Array.isArray(L))G[W]=L.slice(0).reduce((X,Z)=>X.concat([`${W}=${n$.escapeUri(Z)}`]),[]).sort().join("&")}return U.sort().map((w)=>G[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),_Q=T0(),uQ=o(),i$=P(async({headers:$,body:U},G)=>{for(let w of Object.keys($))if(w.toLowerCase()===VU)return $[w];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||_Q.isArrayBuffer(U)){let w=new G;return w.update(uQ.toUint8Array(U)),$1.toHex(await w.digest())}return hQ},"getPayloadHash"),U4=o(),F4=class ${format(U){let G=[];for(let L of Object.keys(U)){let X=U4.fromUtf8(L);G.push(Uint8Array.from([X.byteLength]),X,this.formatHeaderValue(U[L]))}let w=new Uint8Array(G.reduce((L,X)=>L+X.byteLength,0)),W=0;for(let L of G)w.set(L,W),W+=L.byteLength;return w}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":let G=new DataView(new ArrayBuffer(3));return G.setUint8(0,3),G.setInt16(1,U.value,!1),new Uint8Array(G.buffer);case"integer":let w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,U.value,!1),new Uint8Array(w.buffer);case"long":let W=new Uint8Array(9);return W[0]=5,W.set(U.value.bytes,1),W;case"binary":let L=new DataView(new ArrayBuffer(3+U.value.byteLength));L.setUint8(0,6),L.setUint16(1,U.value.byteLength,!1);let X=new Uint8Array(L.buffer);return X.set(U.value,3),X;case"string":let Z=U4.fromUtf8(U.value),Y=new DataView(new ArrayBuffer(3+Z.byteLength));Y.setUint8(0,7),Y.setUint16(1,Z.byteLength,!1);let z=new Uint8Array(Y.buffer);return z.set(Z,3),z;case"timestamp":let R=new Uint8Array(9);return R[0]=8,R.set(pQ.fromNumber(U.value.valueOf()).bytes,1),R;case"uuid":if(!gQ.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);let Q=new Uint8Array(17);return Q[0]=9,Q.set($1.fromHex(U.value.replace(/\-/g,"")),1),Q}}};P(F4,"HeaderFormatter");var dQ=F4,gQ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,I4=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`);let G=new Uint8Array(8);for(let w=7,W=Math.abs(Math.round(U));w>-1&&W>0;w--,W/=256)G[w]=W;if(U<0)HU(G);return new $(G)}valueOf(){let U=this.bytes.slice(0),G=U[0]&128;if(G)HU(U);return parseInt($1.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};P(I4,"Int64");var pQ=I4;function HU($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break}P(HU,"negate");var sQ=P(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),J4=l(),K4=P(($,U={})=>{var G;let{headers:w,query:W={}}=J4.HttpRequest.clone($);for(let L of Object.keys(w)){let X=L.toLowerCase();if(X.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(X)))W[L]=w[L],delete w[L]}return{...$,headers:w,query:W}},"moveHeadersToQuery"),OU=P(($)=>{$=J4.HttpRequest.clone($);for(let U of Object.keys($.headers))if(qQ.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),lQ=P(($)=>mQ($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),mQ=P(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),M4=class ${constructor({applyChecksum:U,credentials:G,region:w,service:W,sha256:L,uriEscapePath:X=!0}){this.headerFormatter=new dQ,this.service=W,this.sha256=L,this.uriEscapePath=X,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=e8.normalizeProvider(w),this.credentialProvider=e8.normalizeProvider(G)}async presign(U,G={}){let{signingDate:w=new Date,expiresIn:W=3600,unsignableHeaders:L,unhoistableHeaders:X,signableHeaders:Z,signingRegion:Y,signingService:z}=G,R=await this.credentialProvider();this.validateResolvedCredentials(R);let Q=Y??await this.regionProvider(),{longDate:I,shortDate:J}=s$(w);if(W>vQ)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let K=m$(J,Q,z??this.service),E=K4(OU(U),{unhoistableHeaders:X});if(R.sessionToken)E.query[X4]=R.sessionToken;E.query[HQ]=TU,E.query[OQ]=`${R.accessKeyId}/${K}`,E.query[W4]=I,E.query[CQ]=W.toString(10);let V=AU(E,L,Z);return E.query[fQ]=G4(V),E.query[L4]=await this.getSignature(I,K,this.getSigningKey(R,Q,J,z),this.createCanonicalRequest(E,V,await i$(U,this.sha256))),E}async sign(U,G){if(typeof U==="string")return this.signString(U,G);else if(U.headers&&U.payload)return this.signEvent(U,G);else if(U.message)return this.signMessage(U,G);else return this.signRequest(U,G)}async signEvent({headers:U,payload:G},{signingDate:w=new Date,priorSignature:W,signingRegion:L,signingService:X}){let Z=L??await this.regionProvider(),{shortDate:Y,longDate:z}=s$(w),R=m$(Y,Z,X??this.service),Q=await i$({headers:{},body:G},this.sha256),I=new this.sha256;I.update(U);let J=$1.toHex(await I.digest()),K=[DQ,z,R,W,J,Q].join(`
20
- `);return this.signString(K,{signingDate:w,signingRegion:Z,signingService:X})}async signMessage(U,{signingDate:G=new Date,signingRegion:w,signingService:W}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:w,signingService:W,priorSignature:U.priorSignature}).then((X)=>{return{message:U.message,signature:X}})}async signString(U,{signingDate:G=new Date,signingRegion:w,signingService:W}={}){let L=await this.credentialProvider();this.validateResolvedCredentials(L);let X=w??await this.regionProvider(),{shortDate:Z}=s$(G),Y=new this.sha256(await this.getSigningKey(L,X,Z,W));return Y.update(BU.toUint8Array(U)),$1.toHex(await Y.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:w,unsignableHeaders:W,signingRegion:L,signingService:X}={}){let Z=await this.credentialProvider();this.validateResolvedCredentials(Z);let Y=L??await this.regionProvider(),z=OU(U),{longDate:R,shortDate:Q}=s$(G),I=m$(Q,Y,X??this.service);if(z.headers[Y4]=R,Z.sessionToken)z.headers[bQ]=Z.sessionToken;let J=await i$(z,this.sha256);if(!sQ(VU,z.headers)&&this.applyChecksum)z.headers[VU]=J;let K=AU(z,W,w),E=await this.getSignature(R,I,this.getSigningKey(Z,Y,Q,X),this.createCanonicalRequest(z,K,J));return z.headers[Z4]=`${TU} Credential=${Z.accessKeyId}/${I}, SignedHeaders=${G4(K)}, Signature=${E}`,z}createCanonicalRequest(U,G,w){let W=Object.keys(G).sort();return`${U.method}
21
- ${this.getCanonicalPath(U)}
22
- ${Q4(U)}
23
- ${W.map((L)=>`${L}:${G[L]}`).join(`
24
- `)}
25
-
26
- ${W.join(";")}
27
- ${w}`}async createStringToSign(U,G,w){let W=new this.sha256;W.update(BU.toUint8Array(w));let L=await W.digest();return`${TU}
28
- ${U}
29
- ${G}
30
- ${$1.toHex(L)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){let G=[];for(let L of U.split("/")){if((L==null?void 0:L.length)===0)continue;if(L===".")continue;if(L==="..")G.pop();else G.push(L)}let w=`${(U==null?void 0:U.startsWith("/"))?"/":""}${G.join("/")}${G.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return n$.escapeUri(w).replace(/%2F/g,"/")}return U}async getSignature(U,G,w,W){let L=await this.createStringToSign(U,G,W),X=new this.sha256(await w);return X.update(BU.toUint8Array(L)),$1.toHex(await X.digest())}getSigningKey(U,G,w,W){return R4(this.sha256,U,w,G,W||this.service)}validateResolvedCredentials(U){if(typeof U!=="object"||typeof U.accessKeyId!=="string"||typeof U.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};P(M4,"SignatureV4");var nQ=M4,s$=P(($)=>{let U=lQ($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),G4=P(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var j4=M((kB,q4)=>{var{defineProperty:o$,getOwnPropertyDescriptor:iQ,getOwnPropertyNames:rQ}=Object,oQ=Object.prototype.hasOwnProperty,h=($,U)=>o$($,"name",{value:U,configurable:!0}),aQ=($,U)=>{for(var G in U)o$($,G,{get:U[G],enumerable:!0})},tQ=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of rQ(U))if(!oQ.call($,W)&&W!==G)o$($,W,{get:()=>U[W],enumerable:!(w=iQ(U,W))||w.enumerable})}return $},eQ=($)=>tQ(o$({},"__esModule",{value:!0}),$),O4={};aQ(O4,{AWSSDKSigV4Signer:()=>w5,AwsSdkSigV4ASigner:()=>L5,AwsSdkSigV4Signer:()=>NU,NODE_SIGV4A_CONFIG_OPTIONS:()=>Y5,resolveAWSSDKSigV4Config:()=>z5,resolveAwsSdkSigV4AConfig:()=>Z5,resolveAwsSdkSigV4Config:()=>N4,validateSigningProperties:()=>CU});q4.exports=eQ(O4);var $5=l(),U5=l(),T4=h(($)=>{var U,G;return U5.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),fU=h(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),G5=h(($,U)=>Math.abs(fU(U).getTime()-$)>=300000,"isClockSkewed"),V4=h(($,U)=>{let G=Date.parse($);if(G5(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),s1=h(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),CU=h(async($)=>{var U,G,w;let W=s1("context",$.context),L=s1("config",$.config),X=(w=(G=(U=W.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:w[0],Y=await s1("signer",L.signer)(X),z=$==null?void 0:$.signingRegion,R=$==null?void 0:$.signingRegionSet,Q=$==null?void 0:$.signingName;return{config:L,signer:Y,signingRegion:z,signingRegionSet:R,signingName:Q}},"validateSigningProperties"),f4=class ${async sign(U,G,w){var W;if(!$5.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let L=await CU(w),{config:X,signer:Z}=L,{signingRegion:Y,signingName:z}=L,R=w.context;if(((W=R==null?void 0:R.authSchemes)==null?void 0:W.length)??0>1){let[I,J]=R.authSchemes;if((I==null?void 0:I.name)==="sigv4a"&&(J==null?void 0:J.name)==="sigv4")Y=(J==null?void 0:J.signingRegion)??Y,z=(J==null?void 0:J.signingName)??z}return await Z.sign(U,{signingDate:fU(X.systemClockOffset),signingRegion:Y,signingService:z})}errorHandler(U){return(G)=>{let w=G.ServerTime??T4(G.$response);if(w){let W=s1("config",U.config),L=W.systemClockOffset;if(W.systemClockOffset=V4(w,W.systemClockOffset),W.systemClockOffset!==L&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){let w=T4(U);if(w){let W=s1("config",G.config);W.systemClockOffset=V4(w,W.systemClockOffset)}}};h(f4,"AwsSdkSigV4Signer");var NU=f4,w5=NU,W5=l(),C4=class $ extends NU{async sign(U,G,w){var W;if(!W5.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:L,signer:X,signingRegion:Z,signingRegionSet:Y,signingName:z}=await CU(w),Q=(await((W=L.sigv4aSigningRegionSet)==null?void 0:W.call(L))??Y??[Z]).join(",");return await X.sign(U,{signingDate:fU(L.systemClockOffset),signingRegion:Q,signingService:z})}};h(C4,"AwsSdkSigV4ASigner");var L5=C4,X5=o0(),A4=$0(),Z5=h(($)=>{return $.sigv4aSigningRegionSet=X5.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),Y5={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new A4.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 A4.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},Q1=o0(),H4=B4(),N4=h(($)=>{let U;if($.credentials)U=Q1.memoizeIdentityProvider($.credentials,Q1.isIdentityExpired,Q1.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=Q1.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=h(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");let{signingEscapePath:G=!0,systemClockOffset:w=$.systemClockOffset||0,sha256:W}=$,L;if($.signer)L=Q1.normalizeProvider($.signer);else if($.regionInfoProvider)L=h(()=>Q1.normalizeProvider($.region)().then(async(X)=>[await $.regionInfoProvider(X,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},X]).then(([X,Z])=>{let{signingRegion:Y,signingService:z}=X;$.signingRegion=$.signingRegion||Y||Z,$.signingName=$.signingName||z||$.serviceId;let R={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:W,uriEscapePath:G};return new($.signerConstructor||H4.SignatureV4)(R)}),"signer");else L=h(async(X)=>{X=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await Q1.normalizeProvider($.region)(),properties:{}},X);let{signingRegion:Z,signingName:Y}=X;$.signingRegion=$.signingRegion||Z,$.signingName=$.signingName||Y||$.serviceId;let z={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:W,uriEscapePath:G};return new($.signerConstructor||H4.SignatureV4)(z)},"signer");return{...$,systemClockOffset:w,signingEscapePath:G,credentials:U,signer:L}},"resolveAwsSdkSigV4Config"),z5=N4});var a$=M((J5)=>{var R5=":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",b4="[: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]["+R5+"]*",Q5=new RegExp("^"+b4+"$"),F5=function($,U){let G=[],w=U.exec($);while(w){let W=[];W.startIndex=U.lastIndex-w[0].length;let L=w.length;for(let X=0;X<L;X++)W.push(w[X]);G.push(W),w=U.exec($)}return G},I5=function($){let U=Q5.exec($);return!(U===null||typeof U==="undefined")};J5.isExist=function($){return typeof $!=="undefined"};J5.isEmptyObject=function($){return Object.keys($).length===0};J5.merge=function($,U,G){if(U){let w=Object.keys(U),W=w.length;for(let L=0;L<W;L++)if(G==="strict")$[w[L]]=[U[w[L]]];else $[w[L]]=U[w[L]]}};J5.getValue=function($){if(J5.isExist($))return $;else return""};J5.isName=I5;J5.getAllMatches=F5;J5.nameRegexp=b4});var jU=M((P5)=>{var qU=a$(),A5={allowBooleanAttributes:!1,unpairedTags:[]};P5.validate=function($,U){U=Object.assign({},A5,U);let G=[],w=!1,W=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let L=0;L<$.length;L++)if($[L]==="<"&&$[L+1]==="?"){if(L+=2,L=k4($,L),L.err)return L}else if($[L]==="<"){let X=L;if(L++,$[L]==="!"){L=D4($,L);continue}else{let Z=!1;if($[L]==="/")Z=!0,L++;let Y="";for(;L<$.length&&$[L]!==">"&&$[L]!==" "&&$[L]!=="\t"&&$[L]!==`
31
- `&&$[L]!=="\r";L++)Y+=$[L];if(Y=Y.trim(),Y[Y.length-1]==="/")Y=Y.substring(0,Y.length-1),L--;if(!b5(Y)){let Q;if(Y.trim().length===0)Q="Invalid space after '<'.";else Q="Tag '"+Y+"' is an invalid name.";return q("InvalidTag",Q,k($,L))}let z=f5($,L);if(z===!1)return q("InvalidAttr","Attributes for '"+Y+"' have open quote.",k($,L));let R=z.value;if(L=z.index,R[R.length-1]==="/"){let Q=L-R.length;R=R.substring(0,R.length-1);let I=h4(R,U);if(I===!0)w=!0;else return q(I.err.code,I.err.msg,k($,Q+I.err.line))}else if(Z)if(!z.tagClosed)return q("InvalidTag","Closing tag '"+Y+"' doesn't have proper closing.",k($,L));else if(R.trim().length>0)return q("InvalidTag","Closing tag '"+Y+"' can't have attributes or invalid starting.",k($,X));else if(G.length===0)return q("InvalidTag","Closing tag '"+Y+"' has not been opened.",k($,X));else{let Q=G.pop();if(Y!==Q.tagName){let I=k($,Q.tagStartPos);return q("InvalidTag","Expected closing tag '"+Q.tagName+"' (opened in line "+I.line+", col "+I.col+") instead of closing tag '"+Y+"'.",k($,X))}if(G.length==0)W=!0}else{let Q=h4(R,U);if(Q!==!0)return q(Q.err.code,Q.err.msg,k($,L-R.length+Q.err.line));if(W===!0)return q("InvalidXml","Multiple possible root nodes found.",k($,L));else if(U.unpairedTags.indexOf(Y)!==-1);else G.push({tagName:Y,tagStartPos:X});w=!0}for(L++;L<$.length;L++)if($[L]==="<")if($[L+1]==="!"){L++,L=D4($,L);continue}else if($[L+1]==="?"){if(L=k4($,++L),L.err)return L}else break;else if($[L]==="&"){let Q=q5($,L);if(Q==-1)return q("InvalidChar","char '&' is not expected.",k($,L));L=Q}else if(W===!0&&!S4($[L]))return q("InvalidXml","Extra text at the end",k($,L));if($[L]==="<")L--}}else{if(S4($[L]))continue;return q("InvalidChar","char '"+$[L]+"' is not expected.",k($,L))}if(!w)return q("InvalidXml","Start tag expected.",1);else if(G.length==1)return q("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",k($,G[0].tagStartPos));else if(G.length>0)return q("InvalidXml","Invalid '"+JSON.stringify(G.map((L)=>L.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};function S4($){return $===" "||$==="\t"||$===`
32
- `||$==="\r"}function k4($,U){let G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){let w=$.substr(G,U-G);if(U>5&&w==="xml")return q("InvalidXml","XML declaration allowed only at the start of the document.",k($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U}function D4($,U){if($.length>U+5&&$[U+1]==="-"&&$[U+2]==="-"){for(U+=3;U<$.length;U++)if($[U]==="-"&&$[U+1]==="-"&&$[U+2]===">"){U+=2;break}}else if($.length>U+8&&$[U+1]==="D"&&$[U+2]==="O"&&$[U+3]==="C"&&$[U+4]==="T"&&$[U+5]==="Y"&&$[U+6]==="P"&&$[U+7]==="E"){let G=1;for(U+=8;U<$.length;U++)if($[U]==="<")G++;else if($[U]===">"){if(G--,G===0)break}}else if($.length>U+9&&$[U+1]==="["&&$[U+2]==="C"&&$[U+3]==="D"&&$[U+4]==="A"&&$[U+5]==="T"&&$[U+6]==="A"&&$[U+7]==="["){for(U+=8;U<$.length;U++)if($[U]==="]"&&$[U+1]==="]"&&$[U+2]===">"){U+=2;break}}return U}var H5='"',O5="'";function f5($,U){let G="",w="",W=!1;for(;U<$.length;U++){if($[U]===H5||$[U]===O5)if(w==="")w=$[U];else if(w!==$[U]);else w="";else if($[U]===">"){if(w===""){W=!0;break}}G+=$[U]}if(w!=="")return!1;return{value:G,index:U,tagClosed:W}}var C5=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function h4($,U){let G=qU.getAllMatches($,C5),w={};for(let W=0;W<G.length;W++){if(G[W][1].length===0)return q("InvalidAttr","Attribute '"+G[W][2]+"' has no space in starting.",l1(G[W]));else if(G[W][3]!==void 0&&G[W][4]===void 0)return q("InvalidAttr","Attribute '"+G[W][2]+"' is without value.",l1(G[W]));else if(G[W][3]===void 0&&!U.allowBooleanAttributes)return q("InvalidAttr","boolean attribute '"+G[W][2]+"' is not allowed.",l1(G[W]));let L=G[W][2];if(!j5(L))return q("InvalidAttr","Attribute '"+L+"' is an invalid name.",l1(G[W]));if(!w.hasOwnProperty(L))w[L]=1;else return q("InvalidAttr","Attribute '"+L+"' is repeated.",l1(G[W]))}return!0}function N5($,U){let G=/\d/;if($[U]==="x")U++,G=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(G))break}return-1}function q5($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,N5($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U}function q($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}}function j5($){return qU.isName($)}function b5($){return qU.isName($)}function k($,U){let G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}}function l1($){return $.startIndex+$[1].length}});var v4=M((D5)=>{var x4={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function($,U,G){return $}},k5=function($){return Object.assign({},x4,$)};D5.buildOptions=k5;D5.defaultOptions=x4});var _4=M((vB,c4)=>{class y4{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})}}c4.exports=y4});var d4=M((yB,u4)=>{var v5=a$();function y5($,U){let G={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let w=1,W=!1,L=!1,X="";for(;U<$.length;U++)if($[U]==="<"&&!L){if(W&&u5($,U)){if(U+=7,[entityName,val,U]=c5($,U+1),val.indexOf("&")===-1)G[s5(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(W&&d5($,U))U+=8;else if(W&&g5($,U))U+=8;else if(W&&p5($,U))U+=9;else if(_5)L=!0;else throw new Error("Invalid DOCTYPE");w++,X=""}else if($[U]===">"){if(L){if($[U-1]==="-"&&$[U-2]==="-")L=!1,w--}else w--;if(w===0)break}else if($[U]==="[")W=!0;else X+=$[U];if(w!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}}function c5($,U){let G="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)G+=$[U];if(G=G.trim(),G.indexOf(" ")!==-1)throw new Error("External entites are not supported");let w=$[U++],W="";for(;U<$.length&&$[U]!==w;U++)W+=$[U];return[G,W,U]}function _5($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1}function u5($,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 d5($,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 g5($,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 p5($,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 s5($){if(v5.isName($))return $;else throw new Error(`Invalid entity name ${$}`)}u4.exports=y5});var p4=M((cB,g4)=>{var l5=/^[-+]?0x[a-fA-F0-9]+$/,m5=/^([\-\+])?(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 n5={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function i5($,U={}){if(U=Object.assign({},n5,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&l5.test(G))return Number.parseInt(G,16);else{let w=m5.exec(G);if(w){let W=w[1],L=w[2],X=r5(w[3]),Z=w[4]||w[6];if(!U.leadingZeros&&L.length>0&&W&&G[2]!==".")return $;else if(!U.leadingZeros&&L.length>0&&!W&&G[1]!==".")return $;else{let Y=Number(G),z=""+Y;if(z.search(/[eE]/)!==-1)if(U.eNotation)return Y;else return $;else if(Z)if(U.eNotation)return Y;else return $;else if(G.indexOf(".")!==-1)if(z==="0"&&X==="")return Y;else if(z===X)return Y;else if(W&&z==="-"+X)return Y;else return $;if(L)if(X===z)return Y;else if(W+X===z)return Y;else return $;if(G===z)return Y;else if(G===W+z)return Y;return $}}else return $}}function r5($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $}g4.exports=i5});var n4=M((_B,m4)=>{var s4=a$(),m1=_4(),o5=d4(),a5=p4();class l4{constructor($){this.options=$,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,16))}},this.addExternalEntities=t5,this.parseXml=w7,this.parseTextData=e5,this.resolveNameSpace=$7,this.buildAttributesMap=G7,this.isItStopNode=Z7,this.replaceEntitiesValue=L7,this.readStopNodeData=z7,this.saveTextToParentTag=X7,this.addChild=W7}}function t5($){let U=Object.keys($);for(let G=0;G<U.length;G++){let w=U[G];this.lastEntities[w]={regex:new RegExp("&"+w+";","g"),val:$[w]}}}function e5($,U,G,w,W,L,X){if($!==void 0){if(this.options.trimValues&&!w)$=$.trim();if($.length>0){if(!X)$=this.replaceEntitiesValue($);let Z=this.options.tagValueProcessor(U,$,G,W,L);if(Z===null||Z===void 0)return $;else if(typeof Z!==typeof $||Z!==$)return Z;else if(this.options.trimValues)return PU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return PU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}}function $7($){if(this.options.removeNSPrefix){let U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $}var U7=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function G7($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){let w=s4.getAllMatches($,U7),W=w.length,L={};for(let X=0;X<W;X++){let Z=this.resolveNameSpace(w[X][1]),Y=w[X][4],z=this.options.attributeNamePrefix+Z;if(Z.length){if(this.options.transformAttributeName)z=this.options.transformAttributeName(z);if(z==="__proto__")z="#__proto__";if(Y!==void 0){if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y);let R=this.options.attributeValueProcessor(Z,Y,U);if(R===null||R===void 0)L[z]=Y;else if(typeof R!==typeof Y||R!==Y)L[z]=R;else L[z]=PU(Y,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)L[z]=!0}}if(!Object.keys(L).length)return;if(this.options.attributesGroupName){let X={};return X[this.options.attributesGroupName]=L,X}return L}}var w7=function($){$=$.replace(/\r\n?/g,`
33
- `);let U=new m1("!xml"),G=U,w="",W="";for(let L=0;L<$.length;L++)if($[L]==="<")if($[L+1]==="/"){let Z=F1($,">",L,"Closing Tag is not closed."),Y=$.substring(L+2,Z).trim();if(this.options.removeNSPrefix){let Q=Y.indexOf(":");if(Q!==-1)Y=Y.substr(Q+1)}if(this.options.transformTagName)Y=this.options.transformTagName(Y);if(G)w=this.saveTextToParentTag(w,G,W);let z=W.substring(W.lastIndexOf(".")+1);if(Y&&this.options.unpairedTags.indexOf(Y)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${Y}>`);let R=0;if(z&&this.options.unpairedTags.indexOf(z)!==-1)R=W.lastIndexOf(".",W.lastIndexOf(".")-1),this.tagsNodeStack.pop();else R=W.lastIndexOf(".");W=W.substring(0,R),G=this.tagsNodeStack.pop(),w="",L=Z}else if($[L+1]==="?"){let Z=bU($,L,!1,"?>");if(!Z)throw new Error("Pi Tag is not closed.");if(w=this.saveTextToParentTag(w,G,W),this.options.ignoreDeclaration&&Z.tagName==="?xml"||this.options.ignorePiTags);else{let Y=new m1(Z.tagName);if(Y.add(this.options.textNodeName,""),Z.tagName!==Z.tagExp&&Z.attrExpPresent)Y[":@"]=this.buildAttributesMap(Z.tagExp,W,Z.tagName);this.addChild(G,Y,W)}L=Z.closeIndex+1}else if($.substr(L+1,3)==="!--"){let Z=F1($,"-->",L+4,"Comment is not closed.");if(this.options.commentPropName){let Y=$.substring(L+4,Z-2);w=this.saveTextToParentTag(w,G,W),G.add(this.options.commentPropName,[{[this.options.textNodeName]:Y}])}L=Z}else if($.substr(L+1,2)==="!D"){let Z=o5($,L);this.docTypeEntities=Z.entities,L=Z.i}else if($.substr(L+1,2)==="!["){let Z=F1($,"]]>",L,"CDATA is not closed.")-2,Y=$.substring(L+9,Z);w=this.saveTextToParentTag(w,G,W);let z=this.parseTextData(Y,G.tagname,W,!0,!1,!0,!0);if(z==null)z="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:Y}]);else G.add(this.options.textNodeName,z);L=Z+2}else{let Z=bU($,L,this.options.removeNSPrefix),Y=Z.tagName,z=Z.rawTagName,R=Z.tagExp,Q=Z.attrExpPresent,I=Z.closeIndex;if(this.options.transformTagName)Y=this.options.transformTagName(Y);if(G&&w){if(G.tagname!=="!xml")w=this.saveTextToParentTag(w,G,W,!1)}let J=G;if(J&&this.options.unpairedTags.indexOf(J.tagname)!==-1)G=this.tagsNodeStack.pop(),W=W.substring(0,W.lastIndexOf("."));if(Y!==U.tagname)W+=W?"."+Y:Y;if(this.isItStopNode(this.options.stopNodes,W,Y)){let K="";if(R.length>0&&R.lastIndexOf("/")===R.length-1){if(Y[Y.length-1]==="/")Y=Y.substr(0,Y.length-1),W=W.substr(0,W.length-1),R=Y;else R=R.substr(0,R.length-1);L=Z.closeIndex}else if(this.options.unpairedTags.indexOf(Y)!==-1)L=Z.closeIndex;else{let V=this.readStopNodeData($,z,I+1);if(!V)throw new Error(`Unexpected end of ${z}`);L=V.i,K=V.tagContent}let E=new m1(Y);if(Y!==R&&Q)E[":@"]=this.buildAttributesMap(R,W,Y);if(K)K=this.parseTextData(K,Y,W,!0,Q,!0,!0);W=W.substr(0,W.lastIndexOf(".")),E.add(this.options.textNodeName,K),this.addChild(G,E,W)}else{if(R.length>0&&R.lastIndexOf("/")===R.length-1){if(Y[Y.length-1]==="/")Y=Y.substr(0,Y.length-1),W=W.substr(0,W.length-1),R=Y;else R=R.substr(0,R.length-1);if(this.options.transformTagName)Y=this.options.transformTagName(Y);let K=new m1(Y);if(Y!==R&&Q)K[":@"]=this.buildAttributesMap(R,W,Y);this.addChild(G,K,W),W=W.substr(0,W.lastIndexOf("."))}else{let K=new m1(Y);if(this.tagsNodeStack.push(G),Y!==R&&Q)K[":@"]=this.buildAttributesMap(R,W,Y);this.addChild(G,K,W),G=K}w="",L=I}}else w+=$[L];return U.child};function W7($,U,G){let w=this.options.updateTag(U.tagname,G,U[":@"]);if(w===!1);else if(typeof w==="string")U.tagname=w,$.addChild(U);else $.addChild(U)}var L7=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){let G=this.docTypeEntities[U];$=$.replace(G.regx,G.val)}for(let U in this.lastEntities){let G=this.lastEntities[U];$=$.replace(G.regex,G.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){let G=this.htmlEntities[U];$=$.replace(G.regex,G.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};function X7($,U,G,w){if($){if(w===void 0)w=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,G,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,w),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $}function Z7($,U,G){let w="*."+G;for(let W in $){let L=$[W];if(w===L||U===L)return!0}return!1}function Y7($,U,G=">"){let w,W="";for(let L=U;L<$.length;L++){let X=$[L];if(w){if(X===w)w=""}else if(X==='"'||X==="'")w=X;else if(X===G[0])if(G[1]){if($[L+1]===G[1])return{data:W,index:L}}else return{data:W,index:L};else if(X==="\t")X=" ";W+=X}}function F1($,U,G,w){let W=$.indexOf(U,G);if(W===-1)throw new Error(w);else return W+U.length-1}function bU($,U,G,w=">"){let W=Y7($,U+1,w);if(!W)return;let{data:L,index:X}=W,Z=L.search(/\s/),Y=L,z=!0;if(Z!==-1)Y=L.substring(0,Z),L=L.substring(Z+1).trimStart();let R=Y;if(G){let Q=Y.indexOf(":");if(Q!==-1)Y=Y.substr(Q+1),z=Y!==W.data.substr(Q+1)}return{tagName:Y,tagExp:L,closeIndex:X,attrExpPresent:z,rawTagName:R}}function z7($,U,G){let w=G,W=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){let L=F1($,">",G,`${U} is not closed`);if($.substring(G+2,L).trim()===U){if(W--,W===0)return{tagContent:$.substring(w,G),i:L}}G=L}else if($[G+1]==="?")G=F1($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=F1($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=F1($,"]]>",G,"StopNode is not closed.")-2;else{let L=bU($,G,">");if(L){if((L&&L.tagName)===U&&L.tagExp[L.tagExp.length-1]!=="/")W++;G=L.closeIndex}}}function PU($,U,G){if(U&&typeof $==="string"){let w=$.trim();if(w==="true")return!0;else if(w==="false")return!1;else return a5($,G)}else if(s4.isExist($))return $;else return""}m4.exports=l4});var r4=M((J7)=>{function R7($,U){return i4($,U)}function i4($,U,G){let w,W={};for(let L=0;L<$.length;L++){let X=$[L],Z=Q7(X),Y="";if(G===void 0)Y=Z;else Y=G+"."+Z;if(Z===U.textNodeName)if(w===void 0)w=X[Z];else w+=""+X[Z];else if(Z===void 0)continue;else if(X[Z]){let z=i4(X[Z],U,Y),R=I7(z,U);if(X[":@"])F7(z,X[":@"],Y,U);else if(Object.keys(z).length===1&&z[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)z=z[U.textNodeName];else if(Object.keys(z).length===0)if(U.alwaysCreateTextNode)z[U.textNodeName]="";else z="";if(W[Z]!==void 0&&W.hasOwnProperty(Z)){if(!Array.isArray(W[Z]))W[Z]=[W[Z]];W[Z].push(z)}else if(U.isArray(Z,Y,R))W[Z]=[z];else W[Z]=z}}if(typeof w==="string"){if(w.length>0)W[U.textNodeName]=w}else if(w!==void 0)W[U.textNodeName]=w;return W}function Q7($){let U=Object.keys($);for(let G=0;G<U.length;G++){let w=U[G];if(w!==":@")return w}}function F7($,U,G,w){if(U){let W=Object.keys(U),L=W.length;for(let X=0;X<L;X++){let Z=W[X];if(w.isArray(Z,G+"."+Z,!0,!0))$[Z]=[U[Z]];else $[Z]=U[Z]}}}function I7($,U){let{textNodeName:G}=U,w=Object.keys($).length;if(w===0)return!0;if(w===1&&($[G]||typeof $[G]==="boolean"||$[G]===0))return!0;return!1}J7.prettify=R7});var t4=M((dB,a4)=>{var{buildOptions:M7}=v4(),E7=n4(),{prettify:B7}=r4(),T7=jU();class o4{constructor($){this.externalEntities={},this.options=M7($)}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={};let W=T7.validate($,U);if(W!==!0)throw Error(`${W.err.msg}:${W.err.line}:${W.err.col}`)}let G=new E7(this.options);G.addExternalEntities(this.externalEntities);let w=G.parseXml($);if(this.options.preserveOrder||w===void 0)return w;else return B7(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}}a4.exports=o4});var wL=M((gB,GL)=>{function V7($,U){let G="";if(U.format&&U.indentBy.length>0)G=`
34
- `;return $L($,U,"",G)}function $L($,U,G,w){let W="",L=!1;for(let X=0;X<$.length;X++){let Z=$[X],Y=A7(Z);if(Y===void 0)continue;let z="";if(G.length===0)z=Y;else z=`${G}.${Y}`;if(Y===U.textNodeName){let K=Z[Y];if(!H7(z,U))K=U.tagValueProcessor(Y,K),K=UL(K,U);if(L)W+=w;W+=K,L=!1;continue}else if(Y===U.cdataPropName){if(L)W+=w;W+=`<![CDATA[${Z[Y][0][U.textNodeName]}]]>`,L=!1;continue}else if(Y===U.commentPropName){W+=w+`<!--${Z[Y][0][U.textNodeName]}-->`,L=!0;continue}else if(Y[0]==="?"){let K=e4(Z[":@"],U),E=Y==="?xml"?"":w,V=Z[Y][0][U.textNodeName];V=V.length!==0?" "+V:"",W+=E+`<${Y}${V}${K}?>`,L=!0;continue}let R=w;if(R!=="")R+=U.indentBy;let Q=e4(Z[":@"],U),I=w+`<${Y}${Q}`,J=$L(Z[Y],U,z,R);if(U.unpairedTags.indexOf(Y)!==-1)if(U.suppressUnpairedNode)W+=I+">";else W+=I+"/>";else if((!J||J.length===0)&&U.suppressEmptyNode)W+=I+"/>";else if(J&&J.endsWith(">"))W+=I+`>${J}${w}</${Y}>`;else{if(W+=I+">",J&&w!==""&&(J.includes("/>")||J.includes("</")))W+=w+U.indentBy+J+w;else W+=J;W+=`</${Y}>`}L=!0}return W}function A7($){let U=Object.keys($);for(let G=0;G<U.length;G++){let w=U[G];if(!$.hasOwnProperty(w))continue;if(w!==":@")return w}}function e4($,U){let G="";if($&&!U.ignoreAttributes)for(let w in $){if(!$.hasOwnProperty(w))continue;let W=U.attributeValueProcessor(w,$[w]);if(W=UL(W,U),W===!0&&U.suppressBooleanAttributes)G+=` ${w.substr(U.attributeNamePrefix.length)}`;else G+=` ${w.substr(U.attributeNamePrefix.length)}="${W}"`}return G}function H7($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let G=$.substr($.lastIndexOf(".")+1);for(let w in U.stopNodes)if(U.stopNodes[w]===$||U.stopNodes[w]==="*."+G)return!0;return!1}function UL($,U){if($&&$.length>0&&U.processEntities)for(let G=0;G<U.entities.length;G++){let w=U.entities[G];$=$.replace(w.regex,w.val)}return $}GL.exports=V7});var LL=M((pB,WL)=>{var O7=wL(),f7={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};function U1($){if(this.options=Object.assign({},f7,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=q7;if(this.processTextOrObjNode=C7,this.options.format)this.indentate=N7,this.tagEndChar=`>
35
- `,this.newLine=`
36
- `;else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}U1.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}};U1.prototype.j2x=function($,U){let G="",w="";for(let W in $){if(!Object.prototype.hasOwnProperty.call($,W))continue;if(typeof $[W]==="undefined"){if(this.isAttribute(W))w+=""}else if($[W]===null)if(this.isAttribute(W))w+="";else if(W[0]==="?")w+=this.indentate(U)+"<"+W+"?"+this.tagEndChar;else w+=this.indentate(U)+"<"+W+"/"+this.tagEndChar;else if($[W]instanceof Date)w+=this.buildTextValNode($[W],W,"",U);else if(typeof $[W]!=="object"){let L=this.isAttribute(W);if(L)G+=this.buildAttrPairStr(L,""+$[W]);else if(W===this.options.textNodeName){let X=this.options.tagValueProcessor(W,""+$[W]);w+=this.replaceEntitiesValue(X)}else w+=this.buildTextValNode($[W],W,"",U)}else if(Array.isArray($[W])){let L=$[W].length,X="",Z="";for(let Y=0;Y<L;Y++){let z=$[W][Y];if(typeof z==="undefined");else if(z===null)if(W[0]==="?")w+=this.indentate(U)+"<"+W+"?"+this.tagEndChar;else w+=this.indentate(U)+"<"+W+"/"+this.tagEndChar;else if(typeof z==="object")if(this.options.oneListGroup){let R=this.j2x(z,U+1);if(X+=R.val,this.options.attributesGroupName&&z.hasOwnProperty(this.options.attributesGroupName))Z+=R.attrStr}else X+=this.processTextOrObjNode(z,W,U);else if(this.options.oneListGroup){let R=this.options.tagValueProcessor(W,z);R=this.replaceEntitiesValue(R),X+=R}else X+=this.buildTextValNode(z,W,"",U)}if(this.options.oneListGroup)X=this.buildObjectNode(X,W,Z,U);w+=X}else if(this.options.attributesGroupName&&W===this.options.attributesGroupName){let L=Object.keys($[W]),X=L.length;for(let Z=0;Z<X;Z++)G+=this.buildAttrPairStr(L[Z],""+$[W][L[Z]])}else w+=this.processTextOrObjNode($[W],W,U)}return{attrStr:G,val:w}};U1.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};function C7($,U,G){let w=this.j2x($,G+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,w.attrStr,G);else return this.buildObjectNode(w.val,U,w.attrStr,G)}U1.prototype.buildObjectNode=function($,U,G,w){if($==="")if(U[0]==="?")return this.indentate(w)+"<"+U+G+"?"+this.tagEndChar;else return this.indentate(w)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else{let W="</"+U+this.tagEndChar,L="";if(U[0]==="?")L="?",W="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(w)+"<"+U+G+L+">"+$+W;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&L.length===0)return this.indentate(w)+`<!--${$}-->`+this.newLine;else return this.indentate(w)+"<"+U+G+L+this.tagEndChar+$+this.indentate(w)+W}};U1.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};U1.prototype.buildTextValNode=function($,U,G,w){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(w)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(w)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(w)+"<"+U+G+"?"+this.tagEndChar;else{let W=this.options.tagValueProcessor(U,$);if(W=this.replaceEntitiesValue(W),W==="")return this.indentate(w)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(w)+"<"+U+G+">"+W+"</"+U+this.tagEndChar}};U1.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){let G=this.options.entities[U];$=$.replace(G.regex,G.val)}return $};function N7($){return this.options.indentBy.repeat($)}function q7($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1}WL.exports=U1});var ZL=M((sB,XL)=>{var j7=jU(),b7=t4(),P7=LL();XL.exports={XMLParser:b7,XMLValidator:j7,XMLBuilder:P7}});var IL=M((lB,FL)=>{var{defineProperty:t$,getOwnPropertyDescriptor:S7,getOwnPropertyNames:k7}=Object,D7=Object.prototype.hasOwnProperty,x=($,U)=>t$($,"name",{value:U,configurable:!0}),h7=($,U)=>{for(var G in U)t$($,G,{get:U[G],enumerable:!0})},x7=($,U,G,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let W of k7(U))if(!D7.call($,W)&&W!==G)t$($,W,{get:()=>U[W],enumerable:!(w=S7(U,W))||w.enumerable})}return $},v7=($)=>x7(t$({},"__esModule",{value:!0}),$),YL={};h7(YL,{_toBool:()=>c7,_toNum:()=>_7,_toStr:()=>y7,awsExpectUnion:()=>d7,loadRestJsonErrorCode:()=>s7,loadRestXmlErrorCode:()=>i7,parseJsonBody:()=>RL,parseJsonErrorBody:()=>p7,parseXmlBody:()=>QL,parseXmlErrorBody:()=>n7});FL.exports=v7(YL);var y7=x(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){let U=new Error(`Received number ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}if(typeof $==="boolean"){let U=new Error(`Received boolean ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}return $},"_toStr"),c7=x(($)=>{if($==null)return $;if(typeof $==="string"){let U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){let G=new Error(`Received string "${$}" where a boolean was expected.`);G.name="Warning",console.warn(G)}return $!==""&&U!=="false"}return $},"_toBool"),_7=x(($)=>{if($==null)return $;if(typeof $==="string"){let U=Number($);if(U.toString()!==$){let G=new Error(`Received string "${$}" where a number was expected.`);return G.name="Warning",console.warn(G),$}return U}return $},"_toNum"),u7=T1(),d7=x(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return u7.expectUnion($)},"awsExpectUnion"),g7=T1(),zL=x(($,U)=>g7.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),RL=x(($,U)=>zL($,U).then((G)=>{if(G.length)try{return JSON.parse(G)}catch(w){if((w==null?void 0:w.name)==="SyntaxError")Object.defineProperty(w,"$responseBodyText",{value:G});throw w}return{}}),"parseJsonBody"),p7=x(async($,U)=>{let G=await RL($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),s7=x(($,U)=>{let G=x((L,X)=>Object.keys(L).find((Z)=>Z.toLowerCase()===X.toLowerCase()),"findKey"),w=x((L)=>{let X=L;if(typeof X==="number")X=X.toString();if(X.indexOf(",")>=0)X=X.split(",")[0];if(X.indexOf(":")>=0)X=X.split(":")[0];if(X.indexOf("#")>=0)X=X.split("#")[1];return X},"sanitizeErrorCode"),W=G($.headers,"x-amzn-errortype");if(W!==void 0)return w($.headers[W]);if(U.code!==void 0)return w(U.code);if(U.__type!==void 0)return w(U.__type)},"loadRestJsonErrorCode"),l7=T1(),m7=ZL(),QL=x(($,U)=>zL($,U).then((G)=>{if(G.length){let w=new m7.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(Y,z)=>z.trim()===""&&z.includes(`
37
- `)?"":void 0});w.addEntity("#xD","\r"),w.addEntity("#10",`
38
- `);let W;try{W=w.parse(G,!0)}catch(Y){if(Y&&typeof Y==="object")Object.defineProperty(Y,"$responseBodyText",{value:G});throw Y}let L="#text",X=Object.keys(W)[0],Z=W[X];if(Z[L])Z[X]=Z[L],delete Z[L];return l7.getValueFromTextNode(Z)}return{}}),"parseXmlBody"),n7=x(async($,U)=>{let G=await QL($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),i7=x(($,U)=>{var G;if(((G=U==null?void 0:U.Error)==null?void 0:G.Code)!==void 0)return U.Error.Code;if((U==null?void 0:U.Code)!==void 0)return U.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var o7=M((n1)=>{Object.defineProperty(n1,"__esModule",{value:!0});var SU=r7();SU.__exportStar(t8(),n1);SU.__exportStar(j4(),n1);SU.__exportStar(IL(),n1)});function FF($){return $}var NL=($)=>(U)=>async(G)=>{if(!y.isInstance(G.request))return U(G);let{request:w}=G,{handlerProtocol:W=""}=$.requestHandler.metadata||{};if(W.indexOf("h2")>=0&&!w.headers[":authority"])delete w.headers.host,w.headers[":authority"]=w.hostname+(w.port?":"+w.port:"");else if(!w.headers.host){let L=w.hostname;if(w.port!=null)L+=`:${w.port}`;w.headers.host=L}return U(G)},qL={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},IF=($)=>({applyToStack:(U)=>{U.add(NL($),qL)}});var jL=()=>($,U)=>async(G)=>{try{let w=await $(G),{clientName:W,commandName:L,logger:X,dynamoDbDocumentClientOptions:Z={}}=U,{overrideInputFilterSensitiveLog:Y,overrideOutputFilterSensitiveLog:z}=Z,R=Y??U.inputFilterSensitiveLog,Q=z??U.outputFilterSensitiveLog,{$metadata:I,...J}=w.output;return X?.info?.({clientName:W,commandName:L,input:R(G.input),output:Q(J),metadata:I}),w}catch(w){let{clientName:W,commandName:L,logger:X,dynamoDbDocumentClientOptions:Z={}}=U,{overrideInputFilterSensitiveLog:Y}=Z,z=Y??U.inputFilterSensitiveLog;throw X?.error?.({clientName:W,commandName:L,input:z(G.input),error:w,metadata:w.$metadata}),w}},bL={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},KF=($)=>({applyToStack:(U)=>{U.add(jL(),bL)}});var vU="X-Amzn-Trace-Id",PL="AWS_LAMBDA_FUNCTION_NAME",SL="_X_AMZN_TRACE_ID",kL=($)=>(U)=>async(G)=>{let{request:w}=G;if(!y.isInstance(w)||$.runtime!=="node"||w.headers.hasOwnProperty(vU))return U(G);let W=process.env[PL],L=process.env[SL],X=(Z)=>typeof Z==="string"&&Z.length>0;if(X(W)&&X(L))w.headers[vU]=L;return U({...G,request:w})},DL={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},VF=($)=>({applyToStack:(U)=>{U.add(kL($),DL)}});function zI($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}class j9{constructor({size:$,params:U}){if(this.data=new Map,this.parameters=[],this.capacity=$??50,U)this.parameters=U}get($,U){let G=this.hash($);if(G===!1)return U();if(!this.data.has(G)){if(this.data.size>this.capacity+10){let w=this.data.keys(),W=0;while(!0){let{value:L,done:X}=w.next();if(this.data.delete(L),X||++W>10)break}}this.data.set(G,U())}return this.data.get(G)}size(){return this.data.size}hash($){let U="",{parameters:G}=this;if(G.length===0)return!1;for(let w of G){let W=String($[w]??"");if(W.includes("|;"))return!1;U+=W+"|;"}return U}}var b9=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}$"),u1=($)=>b9.test($)||$.startsWith("[")&&$.endsWith("]");var P9=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),d1=($,U=!1)=>{if(!U)return P9.test($);let G=$.split(".");for(let w of G)if(!d1(w))return!1;return!0};var g1={};var n="endpoints";function _($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`$${_($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(_).join(", ")})`;return JSON.stringify($,null,2)}class H extends Error{constructor($){super($);this.name="EndpointError"}}var w8=($,U)=>$===U;var W8=($)=>{let U=$.split("."),G=[];for(let w of U){let W=w.indexOf("[");if(W!==-1){if(w.indexOf("]")!==w.length-1)throw new H(`Path: '${$}' does not end with ']'`);let L=w.slice(W+1,-1);if(Number.isNaN(parseInt(L)))throw new H(`Invalid array index: '${L}' in path: '${$}'`);if(W!==0)G.push(w.slice(0,W));G.push(L)}else G.push(w)}return G};var q$=($,U)=>W8(U).reduce((G,w)=>{if(typeof G!=="object")throw new H(`Index '${w}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(w)];return G[w]},$);var L8=($)=>$!=null;var X8=($)=>!$;var j$=t0(w1(),1);var a0={[j$.EndpointURLScheme.HTTP]:80,[j$.EndpointURLScheme.HTTPS]:443},Z8=($)=>{let U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){let{hostname:I,port:J,protocol:K="",path:E="",query:V={}}=$,S=new URL(`${K}//${I}${J?`:${J}`:""}${E}`);return S.search=Object.entries(V).map(([O,B])=>`${O}=${B}`).join("&"),S}return new URL($)}catch(I){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;let G=U.href,{host:w,hostname:W,pathname:L,protocol:X,search:Z}=U;if(Z)return null;let Y=X.slice(0,-1);if(!Object.values(j$.EndpointURLScheme).includes(Y))return null;let z=u1(W),R=G.includes(`${w}:${a0[Y]}`)||typeof $==="string"&&$.includes(`${w}:${a0[Y]}`),Q=`${w}${R?`:${a0[Y]}`:""}`;return{scheme:Y,authority:Q,path:L,normalizedPath:L.endsWith("/")?L:`${L}/`,isIp:z}};var Y8=($,U)=>$===U;var z8=($,U,G,w)=>{if(U>=G||$.length<G)return null;if(!w)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var R8=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var Q8={booleanEquals:w8,getAttr:q$,isSet:L8,isValidHostLabel:d1,not:X8,parseURL:Z8,stringEquals:Y8,substring:z8,uriEncode:R8};var b$=($,U)=>{let G=[],w={...U.endpointParams,...U.referenceRecord},W=0;while(W<$.length){let L=$.indexOf("{",W);if(L===-1){G.push($.slice(W));break}G.push($.slice(W,L));let X=$.indexOf("}",L);if(X===-1){G.push($.slice(L));break}if($[L+1]==="{"&&$[X+1]==="}")G.push($.slice(L+1,X)),W=X+2;let Z=$.substring(L+1,X);if(Z.includes("#")){let[Y,z]=Z.split("#");G.push(q$(w[Y],z))}else G.push(w[Z]);W=X+1}return G.join("")};var F8=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var t=($,U,G)=>{if(typeof $==="string")return b$($,G);else if($.fn)return P$($,G);else if($.ref)return F8($,G);throw new H(`'${U}': ${String($)} is not a string, function or reference.`)};var P$=({fn:$,argv:U},G)=>{let w=U.map((L)=>["boolean","number"].includes(typeof L)?L:t(L,"arg",G)),W=$.split(".");if(W[0]in g1&&W[1]!=null)return g1[W[0]][W[1]](...w);return Q8[$](...w)};var I8=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new H(`'${$}' is already defined in Reference Record.`);let w=P$(U,G);return G.logger?.debug?.(`${n} evaluateCondition: ${_(U)} = ${_(w)}`),{result:w===""?!0:!!w,...$!=null&&{toAssign:{name:$,value:w}}}};var A1=($=[],U)=>{let G={};for(let w of $){let{result:W,toAssign:L}=I8(w,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!W)return{result:W};if(L)G[L.name]=L.value,U.logger?.debug?.(`${n} assign: ${L.name} := ${_(L.value)}`)}return{result:!0,referenceRecord:G}};var J8=($,U)=>Object.entries($).reduce((G,[w,W])=>({...G,[w]:W.map((L)=>{let X=t(L,"Header value entry",U);if(typeof X!=="string")throw new H(`Header '${w}' value '${X}' is not a string`);return X})}),{});var e0=($,U)=>{if(Array.isArray($))return $.map((G)=>e0(G,U));switch(typeof $){case"string":return b$($,U);case"object":if($===null)throw new H(`Unexpected endpoint property: ${$}`);return S$($,U);case"boolean":return $;default:throw new H(`Unexpected endpoint property type: ${typeof $}`)}};var S$=($,U)=>Object.entries($).reduce((G,[w,W])=>({...G,[w]:e0(W,U)}),{});var K8=($,U)=>{let G=t($,"Endpoint URL",U);if(typeof G==="string")try{return new URL(G)}catch(w){throw console.error(`Failed to construct URL with ${G}`,w),w}throw new H(`Endpoint URL must be a string, got ${typeof G}`)};var M8=($,U)=>{let{conditions:G,endpoint:w}=$,{result:W,referenceRecord:L}=A1(G,U);if(!W)return;let X={...U,referenceRecord:{...U.referenceRecord,...L}},{url:Z,properties:Y,headers:z}=w;return U.logger?.debug?.(`${n} Resolving endpoint from template: ${_(w)}`),{...z!=null&&{headers:J8(z,X)},...Y!=null&&{properties:S$(Y,X)},url:K8(Z,X)}};var E8=($,U)=>{let{conditions:G,error:w}=$,{result:W,referenceRecord:L}=A1(G,U);if(!W)return;throw new H(t(w,"Error",{...U,referenceRecord:{...U.referenceRecord,...L}}))};var B8=($,U)=>{let{conditions:G,rules:w}=$,{result:W,referenceRecord:L}=A1(G,U);if(!W)return;return k$(w,{...U,referenceRecord:{...U.referenceRecord,...L}})};var k$=($,U)=>{for(let G of $)if(G.type==="endpoint"){let w=M8(G,U);if(w)return w}else if(G.type==="error")E8(G,U);else if(G.type==="tree"){let w=B8(G,U);if(w)return w}else throw new H(`Unknown endpoint rule: ${G}`);throw new H("Rules evaluation failed")};var S9=($,U)=>{let{endpointParams:G,logger:w}=U,{parameters:W,rules:L}=$;U.logger?.debug?.(`${n} Initial EndpointParams: ${_(G)}`);let X=Object.entries(W).filter(([,z])=>z.default!=null).map(([z,R])=>[z,R.default]);if(X.length>0)for(let[z,R]of X)G[z]=G[z]??R;let Z=Object.entries(W).filter(([,z])=>z.required).map(([z])=>z);for(let z of Z)if(G[z]==null)throw new H(`Missing required parameter: '${z}'`);let Y=k$(L,{endpointParams:G,logger:w,referenceRecord:{}});return U.logger?.debug?.(`${n} Resolved endpoint: ${_(Y)}`),Y};var $U=($,U=!1)=>{if(U){for(let G of $.split("."))if(!$U(G))return!1;return!0}if(!d1($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(u1($))return!1;return!0};var T8=($)=>{let U=$.split(":");if(U.length<6)return null;let[G,w,W,L,X,...Z]=U;if(G!=="arn"||w===""||W===""||Z.join(":")==="")return null;let Y=Z.map((z)=>z.split("/")).flat();return{partition:w,service:W,region:L,accountId:X,resourceId:Y}};var V8={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};var D9=V8,h9="",A8=($)=>{let{partitions:U}=D9;for(let w of U){let{regions:W,outputs:L}=w;for(let[X,Z]of Object.entries(W))if(X===$)return{...L,...Z}}for(let w of U){let{regionRegex:W,outputs:L}=w;if(new RegExp(W).test($))return{...L}}let G=U.find((w)=>w.id==="aws");if(!G)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...G.outputs}};var H8=()=>h9;var x9={isVirtualHostableS3Bucket:$U,parseArn:T8,partition:A8};g1.aws=x9;var UU="user-agent",D$="x-amz-user-agent",GU=" ",h$="/",O8=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,f8=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,wU="-";var v9=($)=>(U,G)=>async(w)=>{let{request:W}=w;if(!y.isInstance(W))return U(w);let{headers:L}=W,X=G?.userAgent?.map(WU)||[],Z=(await $.defaultUserAgentProvider()).map(WU),Y=$?.customUserAgent?.map(WU)||[],z=H8(),R=(z?[z]:[]).concat([...Z,...X,...Y]).join(GU),Q=[...Z.filter((I)=>I.startsWith("aws-sdk-")),...Y].join(GU);if($.runtime!=="browser"){if(Q)L[D$]=L[D$]?`${L[UU]} ${Q}`:Q;L[UU]=R}else L[D$]=R;return U({...w,request:W})},WU=($)=>{let U=$[0].split(h$).map((X)=>X.replace(O8,wU)).join(h$),G=$[1]?.replace(f8,wU),w=U.indexOf(h$),W=U.substring(0,w),L=U.substring(w+1);if(W==="api")L=L.toLowerCase();return[W,L,G].filter((X)=>X&&X.length>0).reduce((X,Z,Y)=>{switch(Y){case 0:return Z;case 1:return`${X}/${Z}`;default:return`${X}#${Z}`}},"")},y9={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},sK=($)=>({applyToStack:(U)=>{U.add(v9($),y9)}});var x$=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var LU=($)=>x$($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var $3=($)=>{let{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return LU(U);let w=await U();return LU(w)},useFipsEndpoint:async()=>{let w=typeof U==="string"?U:await U();if(x$(w))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var H1=($,U,G)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${G} "${U}". Expected "true" or "false", got ${$[U]}.`)};var e;(function($){$.ENV="env",$.CONFIG="shared config entry"})(e||(e={}));var c9="AWS_USE_DUALSTACK_ENDPOINT",_9="use_dualstack_endpoint";var R3={environmentVariableSelector:($)=>H1($,c9,e.ENV),configFileSelector:($)=>H1($,_9,e.CONFIG),default:!1};var u9="AWS_USE_FIPS_ENDPOINT",d9="use_fips_endpoint";var I3={environmentVariableSelector:($)=>H1($,u9,e.ENV),configFileSelector:($)=>H1($,d9,e.CONFIG),default:!1};var XU=t0(w1(),1),C8=($)=>$[XU.SMITHY_CONTEXT_KEY]||($[XU.SMITHY_CONTEXT_KEY]={});var i=($)=>{if(typeof $==="function")return $;let U=Promise.resolve($);return()=>U};var N8={environmentVariableSelector:($)=>$.AWS_REGION,configFileSelector:($)=>$.region,default:()=>{throw new Error("Region is missing")}},k3={preferredFile:"credentials"};var q8="content-length";function g9($){return(U)=>async(G)=>{let w=G.request;if(y.isInstance(w)){let{body:W,headers:L}=w;if(W&&Object.keys(L).map((X)=>X.toLowerCase()).indexOf(q8)===-1)try{let X=$(W);w.headers={...w.headers,[q8]:String(X)}}catch(X){}}return U({...G,request:w})}}var p9={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},LM=($)=>({applyToStack:(U)=>{U.add(g9($.bodyLengthChecker),p9)}});var j8=($,U)=>(G)=>async(w)=>{let{response:W}=await G(w);try{let L=await U(W,$);return{response:W,output:L}}catch(L){if(Object.defineProperty(L,"$response",{value:W}),!("$metadata"in L)){if(L.message+=`
39
- Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`,typeof L.$responseBodyText!=="undefined"){if(L.$response)L.$response.body=L.$responseBodyText}}throw L}};var b8=($,U)=>(G,w)=>async(W)=>{let L=w.endpointV2?.url&&$.urlParser?async()=>$.urlParser(w.endpointV2.url):$.endpoint;if(!L)throw new Error("No valid endpoint provider available.");let X=await U(W.input,{...$,endpoint:L});return G({...W,request:X})};var s9={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},ZU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function QM($,U,G){return{applyToStack:(w)=>{w.add(j8($,G),s9),w.add(b8($,U),ZU)}}}var P8=async($)=>{let U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(r9(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!i9(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},l9=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,m9=/(\d+\.){3}\d+/,n9=/\.\./;var i9=($)=>l9.test($)&&!m9.test($)&&!n9.test($),r9=($)=>{let[U,G,w,,,W]=$.split(":"),L=U==="arn"&&$.split(":").length>=6,X=Boolean(L&&G&&w&&W);if(L&&!X)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return X};var S8=($,U,G)=>{let w=async()=>{let W=G[$]??G[U];if(typeof W==="function")return W();return W};if($==="credentialScope"||U==="CredentialScope")return async()=>{let W=typeof G.credentials==="function"?await G.credentials():G.credentials;return W?.credentialScope??W?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{let W=typeof G.credentials==="function"?await G.credentials():G.credentials;return W?.accountId??W?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{let W=await w();if(W&&typeof W==="object"){if("url"in W)return W.url.href;if("hostname"in W){let{protocol:L,hostname:X,port:Z,path:Y}=W;return`${L}//${X}${Z?":"+Z:""}${Y}`}}return W};return w};var k8="AWS_ENDPOINT_URL",D8="endpoint_url",h8=($)=>({environmentVariableSelector:(U)=>{let G=$.split(" ").map((L)=>L.toUpperCase()),w=U[[k8,...G].join("_")];if(w)return w;let W=U[k8];if(W)return W;return},configFileSelector:(U,G)=>{if(G&&U.services){let W=G[["services",U.services].join(YU)];if(W){let L=$.split(" ").map((Z)=>Z.toLowerCase()),X=W[[L.join("_"),D8].join(YU)];if(X)return X}}let w=U[D8];if(w)return w;return},default:void 0});var v$=async($)=>Y1(h8($??""))();var y$=($)=>{if(typeof $==="object"){if("url"in $)return zU($.url);return $}return zU($)};var x8=async($,U,G,w)=>{if(!G.endpoint){let X;if(G.serviceConfiguredEndpoint)X=await G.serviceConfiguredEndpoint();else X=await v$(G.serviceId);if(X)G.endpoint=()=>Promise.resolve(y$(X))}let W=await o9($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(W,w)},o9=async($,U,G)=>{let w={},W=U?.getEndpointParameterInstructions?.()||{};for(let[L,X]of Object.entries(W))switch(X.type){case"staticContextParams":w[L]=X.value;break;case"contextParams":w[L]=$[X.name];break;case"clientContextParams":case"builtInParams":w[L]=await S8(X.name,L,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(X))}if(Object.keys(W).length===0)Object.assign(w,G);if(String(G.serviceId).toLowerCase()==="s3")await P8(w);return w};var v8=({config:$,instructions:U})=>{return(G,w)=>async(W)=>{let L=await x8(W.input,{getEndpointParameterInstructions(){return U}},{...$},w);w.endpointV2=L,w.authSchemes=L.properties?.authSchemes;let X=w.authSchemes?.[0];if(X){w.signing_region=X.signingRegion,w.signing_service=X.signingName;let Y=C8(w)?.selectedHttpAuthScheme?.httpAuthOption;if(Y)Y.signingProperties=Object.assign(Y.signingProperties||{},{signing_region:X.signingRegion,signingRegion:X.signingRegion,signing_service:X.signingName,signingName:X.signingName,signingRegionSet:X.signingRegionSet},X.properties)}return G({...W})}};var a9={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:ZU.name},cM=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(v8({config:$,instructions:U}),a9)}});var pM=($)=>{let U=$.tls??!0,{endpoint:G}=$,w=G!=null?async()=>y$(await i(G)()):void 0,L={...$,endpoint:w,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:i($.useDualstackEndpoint??!1),useFipsEndpoint:i($.useFipsEndpoint??!1)},X=void 0;return L.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!X)X=v$($.serviceId);return X},L};var u;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(u||(u={}));var z1=3,y8=u.STANDARD;var c8=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],_8=["TimeoutError","RequestTimeout","RequestTimeoutException"],u8=[500,502,503,504],d8=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var t9=($)=>$.$metadata?.clockSkewCorrected,O1=($)=>$.$metadata?.httpStatusCode===429||c8.includes($.name)||$.$retryable?.throttling==!0,c$=($)=>t9($)||_8.includes($.name)||d8.includes($?.code||"")||u8.includes($.$metadata?.httpStatusCode||0),g8=($)=>{if($.$metadata?.httpStatusCode!==void 0){let U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!c$($))return!0;return!1}return!1};class _${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;let 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){let U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){let $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}let U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),O1($)){let 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());let G=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(G)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){let G=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var R1=100,p1=20000,RU=500,u$=500,QU=5,FU=10,IU=1,d$="amz-sdk-invocation-id",g$="amz-sdk-request";var p8=()=>{let $=R1;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(p1,Math.random()*2**w*$))},setDelayBase:(w)=>{$=w}}};var JU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(p1,$),getRetryCost:()=>G}};class f1{constructor($){this.maxAttempts=$,this.mode=u.STANDARD,this.capacity=u$,this.retryBackoffStrategy=p8(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return JU({retryDelay:R1,retryCount:0})}async refreshRetryTokenForRetry($,U){let G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){let w=U.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?RU:R1);let W=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),L=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,W):W,X=this.getCapacityCost(w);return this.capacity-=X,JU({retryDelay:L,retryCount:$.getRetryCount()+1,retryCost:X})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(u$,this.capacity+($.getRetryCost()??IU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${z1}`),z1}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?FU:QU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class KU{constructor($,U){this.maxAttemptsProvider=$,this.mode=u.ADAPTIVE;let{rateLimiter:G}=U??{};this.rateLimiter=G??new _$,this.standardRetryStrategy=new f1($)}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 s8="AWS_MAX_ATTEMPTS",l8="max_attempts",hE={environmentVariableSelector:($)=>{let U=$[s8];if(!U)return;let G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${s8} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{let U=$[l8];if(!U)return;let G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${l8} mast be a number, got "${U}"`);return G},default:z1},xE=($)=>{let{retryStrategy:U}=$,G=i($.maxAttempts??z1);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await i($.retryMode)()===u.ADAPTIVE)return new KU(G);return new f1(G)}}},e9="AWS_RETRY_MODE",$Q="retry_mode",vE={environmentVariableSelector:($)=>$[e9],configFileSelector:($)=>$[$Q],default:y8};import{Readable as UQ}from"stream";var m8=($)=>$?.body instanceof UQ||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var MU=($)=>{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 GQ=($)=>(U,G)=>async(w)=>{let W=await $.retryStrategy(),L=await $.maxAttempts();if(wQ(W)){W=W;let X=await W.acquireInitialRetryToken(G.partition_id),Z=new Error,Y=0,z=0,{request:R}=w,Q=y.isInstance(R);if(Q)R.headers[d$]=n8();while(!0)try{if(Q)R.headers[g$]=`attempt=${Y+1}; max=${L}`;let{response:I,output:J}=await U(w);return W.recordSuccess(X),J.$metadata.attempts=Y+1,J.$metadata.totalRetryDelay=z,{response:I,output:J}}catch(I){let J=WQ(I);if(Z=MU(I),Q&&m8(R))throw(G.logger instanceof i8?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),Z;try{X=await W.refreshRetryTokenForRetry(X,J)}catch(E){if(!Z.$metadata)Z.$metadata={};throw Z.$metadata.attempts=Y+1,Z.$metadata.totalRetryDelay=z,Z}Y=X.getRetryCount();let K=X.getRetryDelay();z+=K,await new Promise((E)=>setTimeout(E,K))}}else{if(W=W,W?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",W.mode]];return W.retry(U,w)}},wQ=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",WQ=($)=>{let U={error:$,errorType:LQ($)},G=ZQ($.$response);if(G)U.retryAfterHint=G;return U},LQ=($)=>{if(O1($))return"THROTTLING";if(c$($))return"TRANSIENT";if(g8($))return"SERVER_ERROR";return"CLIENT_ERROR"},XQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},iE=($)=>({applyToStack:(U)=>{U.add(GQ($),XQ)}}),ZQ=($)=>{if(!EU.isInstance($))return;let U=Object.keys($.headers).find((L)=>L.toLowerCase()==="retry-after");if(!U)return;let G=$.headers[U],w=Number(G);if(!Number.isNaN(w))return new Date(w*1000);return new Date(G)};import{platform as a7,release as t7}from"os";import{env as KL,versions as e7}from"process";var kU={isCrtAvailable:!1};var JL=()=>{if(kU.isCrtAvailable)return["md/crt-avail"];return null};var $F="AWS_SDK_UA_APP_ID",UF="sdk-ua-app-id",$T=({serviceId:$,clientVersion:U})=>{let G=[["aws-sdk-js",U],["ua","2.0"],[`os/${a7()}`,t7()],["lang/js"],["md/nodejs",`${e7.node}`]],w=JL();if(w)G.push(w);if($)G.push([`api/${$}`,U]);if(KL.AWS_EXECUTION_ENV)G.push([`exec-env/${KL.AWS_EXECUTION_ENV}`]);let W=Y1({environmentVariableSelector:(X)=>X[$F],configFileSelector:(X)=>X[UF],default:void 0})(),L=void 0;return async()=>{if(!L){let X=await W;L=X?[...G,[`app/${X}`]]:[...G]}return L}};import{Buffer as GF}from"buffer";import{createHash as wF,createHmac as WF}from"crypto";class LF{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(BL(ML($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?WF(this.algorithmIdentifier,ML(this.secret)):wF(this.algorithmIdentifier)}}function ML($,U){if(GF.isBuffer($))return $;if(typeof $==="string")return EL($,U);if(ArrayBuffer.isView($))return DU($.buffer,$.byteOffset,$.byteLength);return DU($)}import{fstatSync as XF,lstatSync as ZF}from"fs";var zT=($)=>{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 ZF($.path).size;else if(typeof $.fd==="number")return XF($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var TL="AWS_EXECUTION_ENV",hU="AWS_REGION",xU="AWS_DEFAULT_REGION",VL="AWS_EC2_METADATA_DISABLED",AL=["in-region","cross-region","mobile","standard","legacy"],HL="/latest/meta-data/placement/region";var OL={environmentVariableSelector:($)=>{return $.AWS_DEFAULTS_MODE},configFileSelector:($)=>{return $.defaults_mode},default:"legacy"};var VT=({region:$=Y1(N8),defaultsMode:U=Y1(OL)}={})=>fL(async()=>{let G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return YF($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(G?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${AL.join(", ")}, got ${G}`)}}),YF=async($)=>{if($){let U=typeof $==="function"?await $():$,G=await zF();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},zF=async()=>{if(process.env[TL]&&(process.env[hU]||process.env[xU]))return process.env[hU]??process.env[xU];if(!process.env[VL])try{let{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-stmtmnqh.js"),G=await $();return(await U({...G,path:HL})).toString()}catch($){}};var fT=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");let G=$.region;if(typeof G==="string")return G;return G()};return{setRegion(G){U=G},region(){return U}}},CT=($)=>{return{region:$.region()}};export{C8 as r,i as s,FF as t,IF as u,KF as v,VF as w,H1 as x,e as y,o0 as z,zI as A,j9 as B,g1 as C,S9 as D,x9 as E,sK as F,R3 as G,I3 as H,N8 as I,k3 as J,$3 as K,LM as L,o9 as M,QM as N,cM as O,pM as P,y8 as Q,hE as R,xE as S,vE as T,iE as U,o7 as V,$T as W,LF as X,zT as Y,VT as Z,fT as _,CT as $};
40
-
41
- //# debugId=7A92E11EC1AF0C8B64756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{nb as E}from"./chunk-0v0x0g72.js";import{ac as l,cc as m}from"./chunk-spw59mrv.js";import{readFileSync as S}from"fs";var t=(e)=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:c,policyArns:i,policy:_,durationSeconds:N}=e,{roleAssumerWithWebIdentity:s}=e;if(!s){let{getDefaultRoleAssumerWithWebIdentity:d}=await import("./chunk-4n2ggg2n.js");s=d({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return s({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:c,PolicyArns:i,Policy:_,DurationSeconds:N})};var p="AWS_WEB_IDENTITY_TOKEN_FILE",f="AWS_ROLE_ARN",T="AWS_ROLE_SESSION_NAME",O=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[p],r=e?.roleArn??process.env[f],n=e?.roleSessionName??process.env[T];if(!o||!r)throw new E("Web identity configuration not specified",{logger:e.logger});return t({...e,webIdentityToken:S(o,{encoding:"ascii"}),roleArn:r,roleSessionName:n})()};export{t as fromWebToken,O as fromTokenFile};
3
-
4
- //# debugId=8E6ED004AE7499A764756E2164756E21
@@ -1,11 +0,0 @@
1
- import{ab as w}from"./chunk-3kyzvpxm.js";import{jb as z,kb as B,lb as H}from"./chunk-33nha0s0.js";import{nb as y,pb as K,rb as $}from"./chunk-0v0x0g72.js";import{ac as q,cc as x}from"./chunk-spw59mrv.js";var v="AWS_EC2_METADATA_DISABLED",Y=async(b)=>{let{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:G,fromContainerMetadata:J,fromInstanceMetadata:Q}=await import("./chunk-stmtmnqh.js");if(process.env[G]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:X}=await import("./chunk-vwh3ggkh.js");return K(X(b),J(b))}if(process.env[v])return async()=>{throw new y("EC2 Instance Metadata Service access disabled",{logger:b.logger})};return b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),Q(b)};var Z=!1,U=(b={})=>$(K(async()=>{if(b.profile??process.env[w]){if(process.env[z]&&process.env[B]){if(!Z)(b.logger?.warn&&b.logger?.constructor?.name!=="NoOpLogger"?b.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
2
- Multiple credential sources detected:
3
- Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
4
- This SDK will proceed with the AWS_PROFILE value.
5
-
6
- However, a future version may change this behavior to prefer the ENV static credentials.
7
- Please ensure that your environment only sets either the AWS_PROFILE or the
8
- AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
9
- `),Z=!0}throw new y("AWS_PROFILE is set, skipping fromEnv provider.",{logger:b.logger,tryNextLink:!0})}return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),H(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:j,ssoAccountId:G,ssoRegion:J,ssoRoleName:Q,ssoSession:X}=b;if(!j&&!G&&!J&&!Q&&!X)throw new y("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:b.logger});let{fromSSO:k}=await import("./chunk-90qqbngb.js");return k(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:j}=await import("./chunk-qywtzrf0.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:j}=await import("./chunk-ean0tyqg.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:j}=await import("./chunk-n5bvdddm.js");return j(b)()},async()=>{return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Y(b))()},async()=>{throw new y("Could not load credentials from any providers",{tryNextLink:!1,logger:b.logger})}),g,O),O=(b)=>b?.expiration!==void 0,g=(b)=>b?.expiration!==void 0&&b.expiration.getTime()-Date.now()<300000;export{U as q};
10
-
11
- //# debugId=2F95F6F1F9DB7C9D64756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{bb as O,hb as Z}from"./chunk-3kyzvpxm.js";import"./chunk-7rpnpk1z.js";import{nb as C,pb as z}from"./chunk-0v0x0g72.js";import{ac as I,cc as k}from"./chunk-spw59mrv.js";var A=(y,c,_)=>{let b={EcsContainer:async(x)=>{let{fromHttp:w}=await import("./chunk-vwh3ggkh.js"),{fromContainerMetadata:j}=await import("./chunk-stmtmnqh.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),z(w(x??{}),j(x))},Ec2InstanceMetadata:async(x)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:w}=await import("./chunk-stmtmnqh.js");return w(x)},Environment:async(x)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:w}=await import("./chunk-33nha0s0.js");return w(x)}};if(y in b)return b[y];else throw new C(`Unsupported credential source in profile ${c}. Got ${y}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:_})};var J=(y,{profile:c="default",logger:_}={})=>{return Boolean(y)&&typeof y==="object"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1&&["undefined","string"].indexOf(typeof y.external_id)>-1&&["undefined","string"].indexOf(typeof y.mfa_serial)>-1&&(F(y,{profile:c,logger:_})||H(y,{profile:c,logger:_}))},F=(y,{profile:c,logger:_})=>{let b=typeof y.source_profile==="string"&&typeof y.credential_source==="undefined";if(b)_?.debug?.(` ${c} isAssumeRoleWithSourceProfile source_profile=${y.source_profile}`);return b},H=(y,{profile:c,logger:_})=>{let b=typeof y.credential_source==="string"&&typeof y.source_profile==="undefined";if(b)_?.debug?.(` ${c} isCredentialSourceProfile credential_source=${y.credential_source}`);return b},L=async(y,c,_,b={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let x=c[y];if(!_.roleAssumer){let{getDefaultRoleAssumer:K}=await import("./chunk-4n2ggg2n.js");_.roleAssumer=K({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:_?.parentClientConfig},_.clientPlugins)}let{source_profile:w}=x;if(w&&w in b)throw new C(`Detected a cycle attempting to resolve credentials for profile ${O(_)}. Profiles visited: `+Object.keys(b).join(", "),{logger:_.logger});_.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${w?`source_profile=[${w}]`:`profile=[${y}]`}`);let j=w?B(w,c,_,{...b,[w]:!0},G(c[w]??{})):(await A(x.credential_source,y,_.logger)(_))();if(G(x))return j;else{let K={RoleArn:x.role_arn,RoleSessionName:x.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:x.external_id,DurationSeconds:parseInt(x.duration_seconds||"3600",10)},{mfa_serial:D}=x;if(D){if(!_.mfaCodeProvider)throw new C(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});K.SerialNumber=D,K.TokenCode=await _.mfaCodeProvider(D)}let E=await j;return _.roleAssumer(E,K)}},G=(y)=>{return!y.role_arn&&!!y.credential_source};var Q=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",U=async(y,c)=>import("./chunk-ean0tyqg.js").then(({fromProcess:_})=>_({...y,profile:c})());var V=async(y,c={})=>{let{fromSSO:_}=await import("./chunk-90qqbngb.js");return _({profile:y,logger:c.logger})()},W=(y)=>y&&(typeof y.sso_start_url==="string"||typeof y.sso_account_id==="string"||typeof y.sso_session==="string"||typeof y.sso_region==="string"||typeof y.sso_role_name==="string");var $=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.aws_access_key_id==="string"&&typeof y.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof y.aws_session_token)>-1&&["undefined","string"].indexOf(typeof y.aws_account_id)>-1,q=(y,c)=>{return c?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:y.aws_access_key_id,secretAccessKey:y.aws_secret_access_key,sessionToken:y.aws_session_token,...y.aws_credential_scope&&{credentialScope:y.aws_credential_scope},...y.aws_account_id&&{accountId:y.aws_account_id}})};var X=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.web_identity_token_file==="string"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1,Y=async(y,c)=>import("./chunk-n5bvdddm.js").then(({fromTokenFile:_})=>_({webIdentityTokenFile:y.web_identity_token_file,roleArn:y.role_arn,roleSessionName:y.role_session_name,roleAssumerWithWebIdentity:c.roleAssumerWithWebIdentity,logger:c.logger,parentClientConfig:c.parentClientConfig})());var B=async(y,c,_,b={},x=!1)=>{let w=c[y];if(Object.keys(b).length>0&&$(w))return q(w,_);if(x||J(w,{profile:y,logger:_.logger}))return L(y,c,_,b);if($(w))return q(w,_);if(X(w))return Y(w,_);if(Q(w))return U(_,y);if(W(w))return await V(y,_);throw new C(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var i=(y={})=>async()=>{y.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let c=await Z(y);return B(O(y),c,y)};export{i as fromIni};
3
-
4
- //# debugId=F6CDC6347850771F64756E2164756E21