gemi 0.4.122 → 0.4.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/App.d.ts.map +1 -1
- package/dist/app/index.js +2 -2
- package/dist/app/index.js.map +3 -3
- package/dist/bin/index.js +7 -3
- package/dist/broadcasting/index.js +1 -1
- package/dist/{chunk-en3dm124.js → chunk-1we4kcb2.js} +2 -2
- package/dist/{chunk-en3dm124.js.map → chunk-1we4kcb2.js.map} +1 -1
- package/dist/{chunk-35bsy26w.js → chunk-2c4nwgcj.js} +2 -2
- package/dist/{chunk-35bsy26w.js.map → chunk-2c4nwgcj.js.map} +1 -1
- package/dist/chunk-34x1c2ey.js +4 -0
- package/dist/{chunk-ke7espn1.js.map → chunk-34x1c2ey.js.map} +2 -2
- package/dist/{chunk-s9b02cxr.js → chunk-39kxd828.js} +2 -2
- package/dist/{chunk-s9b02cxr.js.map → chunk-39kxd828.js.map} +1 -1
- package/dist/chunk-3ynep2h9.js +4 -0
- package/dist/{chunk-ktwy9nyn.js.map → chunk-3ynep2h9.js.map} +1 -1
- package/dist/{chunk-qtw719ea.js → chunk-5bsvn385.js} +2 -2
- package/dist/{chunk-qtw719ea.js.map → chunk-5bsvn385.js.map} +1 -1
- package/dist/{chunk-td079vg9.js → chunk-6wj5qxwf.js} +2 -2
- package/dist/{chunk-td079vg9.js.map → chunk-6wj5qxwf.js.map} +1 -1
- package/dist/{chunk-cm1wsxdn.js → chunk-8vjfr0mp.js} +3 -3
- package/dist/{chunk-cm1wsxdn.js.map → chunk-8vjfr0mp.js.map} +1 -1
- package/dist/chunk-93r4rez6.js +4 -0
- package/dist/{chunk-rnrwx4ge.js.map → chunk-93r4rez6.js.map} +1 -1
- package/dist/chunk-9vb54d71.js +4 -0
- package/dist/{chunk-fjsnw41x.js.map → chunk-9vb54d71.js.map} +2 -2
- package/dist/chunk-9xeqzq5a.js +8 -0
- package/dist/{chunk-r2nsghf6.js.map → chunk-9xeqzq5a.js.map} +2 -2
- package/dist/chunk-cw23pjra.js +4 -0
- package/dist/{chunk-bh8r9220.js.map → chunk-cw23pjra.js.map} +6 -6
- package/dist/{chunk-jkce121q.js → chunk-d7hn6b85.js} +3 -3
- package/dist/{chunk-jkce121q.js.map → chunk-d7hn6b85.js.map} +1 -1
- package/dist/chunk-dq276gmc.js +4 -0
- package/dist/{chunk-dtkvdcf6.js.map → chunk-dq276gmc.js.map} +2 -2
- package/dist/{chunk-1599b26e.js → chunk-g290rywa.js} +3 -3
- package/dist/{chunk-1599b26e.js.map → chunk-g290rywa.js.map} +4 -3
- package/dist/chunk-g31vhvsw.js +3 -0
- package/dist/chunk-g31vhvsw.js.map +15 -0
- package/dist/{chunk-015evbr0.js → chunk-gz4h6jsy.js} +3 -3
- package/dist/{chunk-015evbr0.js.map → chunk-gz4h6jsy.js.map} +1 -1
- package/dist/chunk-hddz9z7a.js +11 -0
- package/dist/{chunk-rp64pvnb.js.map → chunk-hddz9z7a.js.map} +5 -5
- package/dist/chunk-j618jvh4.js +4 -0
- package/dist/{chunk-y4gsnyde.js.map → chunk-j618jvh4.js.map} +2 -2
- package/dist/chunk-k4rg25z3.js +4 -0
- package/dist/chunk-k4rg25z3.js.map +16 -0
- package/dist/chunk-kqyj62v4.js +4 -0
- package/dist/{chunk-nngte4x2.js.map → chunk-kqyj62v4.js.map} +2 -2
- package/dist/chunk-ksckhxbt.js +4 -0
- package/dist/{chunk-j96bxzdg.js.map → chunk-ksckhxbt.js.map} +5 -5
- package/dist/chunk-m1838202.js +20 -0
- package/dist/{chunk-0d2nt0w0.js.map → chunk-m1838202.js.map} +14 -11
- package/dist/chunk-m7wq4g1v.js +4 -0
- package/dist/{chunk-qf019x32.js.map → chunk-m7wq4g1v.js.map} +6 -6
- package/dist/chunk-t6cspqr4.js +4 -0
- package/dist/{chunk-b3y9gq5a.js.map → chunk-t6cspqr4.js.map} +2 -2
- package/dist/chunk-wrm0pxh2.js +4 -0
- package/dist/chunk-wrm0pxh2.js.map +14 -0
- package/dist/chunk-ycz2czq7.js +4 -0
- package/dist/{chunk-hbxhheve.js.map → chunk-ycz2czq7.js.map} +2 -2
- package/dist/client/WebsocketContext.d.ts.map +1 -1
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/Broadcast.d.ts +1 -1
- package/dist/facades/FileStorage.d.ts +1 -0
- package/dist/facades/FileStorage.d.ts.map +1 -1
- package/dist/facades/Log.d.ts +11 -0
- package/dist/facades/Log.d.ts.map +1 -0
- package/dist/facades/Url.d.ts +6 -0
- package/dist/facades/Url.d.ts.map +1 -0
- package/dist/facades/index.d.ts +2 -0
- package/dist/facades/index.d.ts.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +11 -7
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/kernel/Kernel.d.ts +2 -0
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +3 -3
- package/dist/server/index.js +4 -4
- package/dist/server/index.js.map +3 -3
- package/dist/services/file-storage/drivers/FileStorageDriver.d.ts +1 -0
- package/dist/services/file-storage/drivers/FileStorageDriver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/FileSystemDriver.d.ts +1 -0
- package/dist/services/file-storage/drivers/FileSystemDriver.d.ts.map +1 -1
- package/dist/services/file-storage/drivers/S3Driver.d.ts +1 -0
- package/dist/services/file-storage/drivers/S3Driver.d.ts.map +1 -1
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +3 -12
- package/dist/services/index.js.map +11 -20
- package/dist/services/logging/LoggingRouter.d.ts +7 -0
- package/dist/services/logging/LoggingRouter.d.ts.map +1 -0
- package/dist/services/logging/LoggingServiceContainer.d.ts +22 -0
- package/dist/services/logging/LoggingServiceContainer.d.ts.map +1 -0
- package/dist/services/logging/LoggingServiceProvider.d.ts +9 -0
- package/dist/services/logging/LoggingServiceProvider.d.ts.map +1 -0
- package/dist/services/logging/types.d.ts +9 -0
- package/dist/services/logging/types.d.ts.map +1 -0
- package/dist/services/pubsub/BroadcastingServiceContainer.d.ts.map +1 -1
- package/dist/services/router/ApiRouterServiceContainer.d.ts.map +1 -1
- package/dist/services/router/ApiRouterServiceProvider.d.ts +4 -0
- package/dist/services/router/ApiRouterServiceProvider.d.ts.map +1 -1
- package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
- package/dist/services/router/ViewRouterServiceProvider.d.ts +4 -0
- package/dist/services/router/ViewRouterServiceProvider.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-0d2nt0w0.js +0 -20
- package/dist/chunk-b3y9gq5a.js +0 -4
- package/dist/chunk-bh8r9220.js +0 -4
- package/dist/chunk-dtkvdcf6.js +0 -4
- package/dist/chunk-fjsnw41x.js +0 -4
- package/dist/chunk-hbxhheve.js +0 -4
- package/dist/chunk-j96bxzdg.js +0 -4
- package/dist/chunk-ke7espn1.js +0 -4
- package/dist/chunk-kqs3rmad.js +0 -4
- package/dist/chunk-kqs3rmad.js.map +0 -10
- package/dist/chunk-ktwy9nyn.js +0 -4
- package/dist/chunk-nngte4x2.js +0 -4
- package/dist/chunk-qf019x32.js +0 -4
- package/dist/chunk-r2nsghf6.js +0 -8
- package/dist/chunk-rnrwx4ge.js +0 -4
- package/dist/chunk-rp64pvnb.js +0 -11
- package/dist/chunk-vkm736x8.js +0 -4
- package/dist/chunk-vkm736x8.js.map +0 -14
- package/dist/chunk-xqknth7r.js +0 -3
- package/dist/chunk-xqknth7r.js.map +0 -16
- package/dist/chunk-y4gsnyde.js +0 -4
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{K as B$,L as M}from"./chunk-6wj5qxwf.js";import{U as MI}from"./chunk-d7hn6b85.js";import{Ia as y,Ja as bU,La as rU,Ma as PL,Oa as SL,Qa as LZ,Va as o4,Ya as b6}from"./chunk-g290rywa.js";import{Db as Q0}from"./chunk-8vjfr0mp.js";import{Eb as K0,Fb as fU}from"./chunk-k4rg25z3.js";import{Lb as vL}from"./chunk-g31vhvsw.js";import{Rb as CU}from"./chunk-1we4kcb2.js";var z$=M((tU)=>{function uL($){return $&&$.__esModule?$:{default:$}}function _L(){if(W1>X1.length-16)yL.default.randomFillSync(X1),W1=0;return X1.slice(W1,W1+=16)}Object.defineProperty(tU,"__esModule",{value:!0});tU.default=_L;var yL=uL(import.meta.require("crypto")),X1=new Uint8Array(256),W1=X1.length});var UG=M((eU)=>{Object.defineProperty(eU,"__esModule",{value:!0});eU.default=void 0;var gL=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;eU.default=gL});var b0=M((GG)=>{function lL($){return $&&$.__esModule?$:{default:$}}function sL($){return typeof $==="string"&&pL.default.test($)}Object.defineProperty(GG,"__esModule",{value:!0});GG.default=void 0;var pL=lL(UG()),mL=sL;GG.default=mL});var h0=M((ZG)=>{function iL($){return $&&$.__esModule?$:{default:$}}function XG($,U=0){return k[$[U+0]]+k[$[U+1]]+k[$[U+2]]+k[$[U+3]]+"-"+k[$[U+4]]+k[$[U+5]]+"-"+k[$[U+6]]+k[$[U+7]]+"-"+k[$[U+8]]+k[$[U+9]]+"-"+k[$[U+10]]+k[$[U+11]]+k[$[U+12]]+k[$[U+13]]+k[$[U+14]]+k[$[U+15]]}function rL($,U=0){const G=XG($,U);if(!nL.default(G))throw TypeError("Stringified UUID is invalid");return G}Object.defineProperty(ZG,"__esModule",{value:!0});ZG.default=void 0;ZG.unsafeStringify=XG;var nL=iL(b0()),k=[];for(let $=0;$<256;++$)k.push(($+256).toString(16).slice(1));var oL=rL;ZG.default=oL});var zG=M((wG)=>{function $5($){return $&&$.__esModule?$:{default:$}}function U5($,U,G){let W=U&&G||0;const X=U||new Array(16);$=$||{};let Z=$.node||YG,L=$.clockseq!==void 0?$.clockseq:F$;if(Z==null||L==null){const R=$.random||($.rng||tL.default)();if(Z==null)Z=YG=[R[0]|1,R[1],R[2],R[3],R[4],R[5]];if(L==null)L=F$=(R[6]<<8|R[7])&16383}let Y=$.msecs!==void 0?$.msecs:Date.now(),w=$.nsecs!==void 0?$.nsecs:J$+1;const Q=Y-R$+(w-J$)/1e4;if(Q<0&&$.clockseq===void 0)L=L+1&16383;if((Q<0||Y>R$)&&$.nsecs===void 0)w=0;if(w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");R$=Y,J$=w,F$=L,Y+=12219292800000;const z=((Y&268435455)*1e4+w)%4294967296;X[W++]=z>>>24&255,X[W++]=z>>>16&255,X[W++]=z>>>8&255,X[W++]=z&255;const F=Y/4294967296*1e4&268435455;X[W++]=F>>>8&255,X[W++]=F&255,X[W++]=F>>>24&15|16,X[W++]=F>>>16&255,X[W++]=L>>>8|128,X[W++]=L&255;for(let R=0;R<6;++R)X[W+R]=Z[R];return U||eL.unsafeStringify(X)}Object.defineProperty(wG,"__esModule",{value:!0});wG.default=void 0;var tL=$5(z$()),eL=h0(),YG,F$,R$=0,J$=0,G5=U5;wG.default=G5});var I$=M((FG)=>{function X5($){return $&&$.__esModule?$:{default:$}}function Z5($){if(!W5.default($))throw TypeError("Invalid UUID");let U;const G=new Uint8Array(16);return G[0]=(U=parseInt($.slice(0,8),16))>>>24,G[1]=U>>>16&255,G[2]=U>>>8&255,G[3]=U&255,G[4]=(U=parseInt($.slice(9,13),16))>>>8,G[5]=U&255,G[6]=(U=parseInt($.slice(14,18),16))>>>8,G[7]=U&255,G[8]=(U=parseInt($.slice(19,23),16))>>>8,G[9]=U&255,G[10]=(U=parseInt($.slice(24,36),16))/1099511627776&255,G[11]=U/4294967296&255,G[12]=U>>>24&255,G[13]=U>>>16&255,G[14]=U>>>8&255,G[15]=U&255,G}Object.defineProperty(FG,"__esModule",{value:!0});FG.default=void 0;var W5=X5(b0()),L5=Z5;FG.default=L5});var K$=M((KG)=>{function Q5($){return $&&$.__esModule?$:{default:$}}function z5($){$=unescape(encodeURIComponent($));const U=[];for(let G=0;G<$.length;++G)U.push($.charCodeAt(G));return U}function F5($,U,G){function W(X,Z,L,Y){var w;if(typeof X==="string")X=z5(X);if(typeof Z==="string")Z=w5.default(Z);if(((w=Z)===null||w===void 0?void 0:w.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let Q=new Uint8Array(16+X.length);if(Q.set(Z),Q.set(X,Z.length),Q=G(Q),Q[6]=Q[6]&15|U,Q[8]=Q[8]&63|128,L){Y=Y||0;for(let z=0;z<16;++z)L[Y+z]=Q[z];return L}return Y5.unsafeStringify(Q)}try{W.name=$}catch(X){}return W.DNS=JG,W.URL=IG,W}Object.defineProperty(KG,"__esModule",{value:!0});KG.URL=KG.DNS=void 0;KG.default=F5;var Y5=h0(),w5=Q5(I$()),JG="6ba7b810-9dad-11d1-80b4-00c04fd430c8";KG.DNS=JG;var IG="6ba7b811-9dad-11d1-80b4-00c04fd430c8";KG.URL=IG});var VG=M((BG)=>{function K5($){return $&&$.__esModule?$:{default:$}}function M5($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return I5.default.createHash("md5").update($).digest()}Object.defineProperty(BG,"__esModule",{value:!0});BG.default=void 0;var I5=K5(import.meta.require("crypto")),B5=M5;BG.default=B5});var OG=M((HG)=>{function TG($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(HG,"__esModule",{value:!0});HG.default=void 0;var E5=TG(K$()),V5=TG(VG()),T5=E5.default("v3",48,V5.default),H5=T5;HG.default=H5});var qG=M((CG)=>{function O5($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(CG,"__esModule",{value:!0});CG.default=void 0;var A5=O5(import.meta.require("crypto")),C5={randomUUID:A5.default.randomUUID};CG.default=C5});var DG=M((PG)=>{function jG($){return $&&$.__esModule?$:{default:$}}function N5($,U,G){if(NG.default.randomUUID&&!U&&!$)return NG.default.randomUUID();$=$||{};const W=$.random||($.rng||f5.default)();if(W[6]=W[6]&15|64,W[8]=W[8]&63|128,U){G=G||0;for(let X=0;X<16;++X)U[G+X]=W[X];return U}return q5.unsafeStringify(W)}Object.defineProperty(PG,"__esModule",{value:!0});PG.default=void 0;var NG=jG(qG()),f5=jG(z$()),q5=h0(),j5=N5;PG.default=j5});var hG=M((kG)=>{function S5($){return $&&$.__esModule?$:{default:$}}function D5($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return P5.default.createHash("sha1").update($).digest()}Object.defineProperty(kG,"__esModule",{value:!0});kG.default=void 0;var P5=S5(import.meta.require("crypto")),k5=D5;kG.default=k5});var yG=M((vG)=>{function xG($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(vG,"__esModule",{value:!0});vG.default=void 0;var b5=xG(K$()),h5=xG(hG()),x5=b5.default("v5",80,h5.default),v5=x5;vG.default=v5});var dG=M((uG)=>{Object.defineProperty(uG,"__esModule",{value:!0});uG.default=void 0;var c5="00000000-0000-0000-0000-000000000000";uG.default=c5});var lG=M((gG)=>{function u5($){return $&&$.__esModule?$:{default:$}}function _5($){if(!y5.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)}Object.defineProperty(gG,"__esModule",{value:!0});gG.default=void 0;var y5=u5(b0()),d5=_5;gG.default=d5});var M$=M((l)=>{function r($){return $&&$.__esModule?$:{default:$}}Object.defineProperty(l,"__esModule",{value:!0});Object.defineProperty(l,"NIL",{enumerable:!0,get:function(){return m5.default}});Object.defineProperty(l,"parse",{enumerable:!0,get:function(){return o5.default}});Object.defineProperty(l,"stringify",{enumerable:!0,get:function(){return r5.default}});Object.defineProperty(l,"v1",{enumerable:!0,get:function(){return g5.default}});Object.defineProperty(l,"v3",{enumerable:!0,get:function(){return p5.default}});Object.defineProperty(l,"v4",{enumerable:!0,get:function(){return l5.default}});Object.defineProperty(l,"v5",{enumerable:!0,get:function(){return s5.default}});Object.defineProperty(l,"validate",{enumerable:!0,get:function(){return i5.default}});Object.defineProperty(l,"version",{enumerable:!0,get:function(){return n5.default}});var g5=r(zG()),p5=r(OG()),l5=r(DG()),s5=r(yG()),m5=r(dG()),n5=r(lG()),i5=r(b0()),r5=r(h0()),o5=r(I$())});var x0=M((I3,oG)=>{var{defineProperty:Z1,getOwnPropertyDescriptor:ZY,getOwnPropertyNames:LY}=Object,YY=Object.prototype.hasOwnProperty,iG=($,U)=>Z1($,"name",{value:U,configurable:!0}),wY=($,U)=>{for(var G in U)Z1($,G,{get:U[G],enumerable:!0})},QY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of LY(U))if(!YY.call($,X)&&X!==G)Z1($,X,{get:()=>U[X],enumerable:!(W=ZY(U,X))||W.enumerable})}return $},zY=($)=>QY(Z1({},"__esModule",{value:!0}),$),rG={};wY(rG,{getSmithyContext:()=>FY,normalizeProvider:()=>RY});oG.exports=zY(rG);var nG=Q0(),FY=iG(($)=>$[nG.SMITHY_CONTEXT_KEY]||($[nG.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),RY=iG(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var E$=M((K3,U8)=>{var{defineProperty:L1,getOwnPropertyDescriptor:JY,getOwnPropertyNames:IY}=Object,KY=Object.prototype.hasOwnProperty,z0=($,U)=>L1($,"name",{value:U,configurable:!0}),MY=($,U)=>{for(var G in U)L1($,G,{get:U[G],enumerable:!0})},BY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of IY(U))if(!KY.call($,X)&&X!==G)L1($,X,{get:()=>U[X],enumerable:!(W=JY(U,X))||W.enumerable})}return $},EY=($)=>BY(L1({},"__esModule",{value:!0}),$),aG={};MY(aG,{CredentialsProviderError:()=>VY,ProviderError:()=>Y1,TokenProviderError:()=>TY,chain:()=>HY,fromStatic:()=>AY,memoize:()=>OY});U8.exports=EY(aG);var tG=class $ extends Error{constructor(U,G=!0){var W;let X,Z=!0;if(typeof G==="boolean")X=void 0,Z=G;else if(G!=null&&typeof G==="object")X=G.logger,Z=G.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=Z,Object.setPrototypeOf(this,$.prototype),(W=X==null?void 0:X.debug)==null||W.call(X,`@smithy/property-provider ${Z?"->":"(!)"} ${U}`)}static from(U,G=!0){return Object.assign(new this(U.message,G),U)}};z0(tG,"ProviderError");var Y1=tG,eG=class $ extends Y1{constructor(U,G=!0){super(U,G);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};z0(eG,"CredentialsProviderError");var VY=eG,$8=class $ extends Y1{constructor(U,G=!0){super(U,G);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};z0($8,"TokenProviderError");var TY=$8,HY=z0((...$)=>async()=>{if($.length===0)throw new Y1("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"),AY=z0(($)=>()=>Promise.resolve($),"fromStatic"),OY=z0(($,U,G)=>{let W,X,Z,L=!1;const Y=z0(async()=>{if(!X)X=$();try{W=await X,Z=!0,L=!1}finally{X=void 0}return W},"coalesceProvider");if(U===void 0)return async(w)=>{if(!Z||(w==null?void 0:w.forceRefresh))W=await Y();return W};return async(w)=>{if(!Z||(w==null?void 0:w.forceRefresh))W=await Y();if(L)return W;if(G&&!G(W))return L=!0,W;if(U(W))return await Y(),W;return W}},"memoize")});var T0=M((G8)=>{Object.defineProperty(G8,"__esModule",{value:!0});G8.getHomeDir=void 0;var CY=import.meta.require("os"),fY=import.meta.require("path"),V$={},qY=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},NY=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${fY.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;const X=qY();if(!V$[X])V$[X]=CY.homedir();return V$[X]};G8.getHomeDir=NY});var T$=M((X8)=>{Object.defineProperty(X8,"__esModule",{value:!0});X8.getSSOTokenFilepath=void 0;var jY=import.meta.require("crypto"),PY=import.meta.require("path"),SY=T0(),DY=($)=>{const G=jY.createHash("sha1").update($).digest("hex");return PY.join(SY.getHomeDir(),".aws","sso","cache",`${G}.json`)};X8.getSSOTokenFilepath=DY});var w8=M((L8)=>{Object.defineProperty(L8,"__esModule",{value:!0});L8.getSSOTokenFromFile=void 0;var kY=import.meta.require("fs"),bY=T$(),{readFile:hY}=kY.promises,xY=async($)=>{const U=bY.getSSOTokenFilepath($),G=await hY(U,"utf8");return JSON.parse(G)};L8.getSSOTokenFromFile=xY});var A$=M((Q8)=>{Object.defineProperty(Q8,"__esModule",{value:!0});Q8.slurpFile=void 0;var vY=import.meta.require("fs"),{readFile:cY}=vY.promises,H$={},yY=($,U)=>{if(!H$[$]||(U===null||U===void 0?void 0:U.ignoreCache))H$[$]=cY($,"utf8");return H$[$]};Q8.slurpFile=yY});var q$=M((T3,c0)=>{var{defineProperty:z1,getOwnPropertyDescriptor:uY,getOwnPropertyNames:_Y}=Object,dY=Object.prototype.hasOwnProperty,u=($,U)=>z1($,"name",{value:U,configurable:!0}),gY=($,U)=>{for(var G in U)z1($,G,{get:U[G],enumerable:!0})},O$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of _Y(U))if(!dY.call($,X)&&X!==G)z1($,X,{get:()=>U[X],enumerable:!(W=uY(U,X))||W.enumerable})}return $},f$=($,U,G)=>(O$($,U,"default"),G&&O$(G,U,"default")),pY=($)=>O$(z1({},"__esModule",{value:!0}),$),v0={};gY(v0,{CONFIG_PREFIX_SEPARATOR:()=>F0,DEFAULT_PROFILE:()=>I8,ENV_PROFILE:()=>J8,getProfileName:()=>lY,loadSharedConfigFiles:()=>M8,loadSsoSessionData:()=>W2,parseKnownFiles:()=>Z2});c0.exports=pY(v0);f$(v0,T0(),c0.exports);var J8="AWS_PROFILE",I8="default",lY=u(($)=>$.profile||process.env[J8]||I8,"getProfileName");f$(v0,T$(),c0.exports);f$(v0,w8(),c0.exports);var w1=Q0(),sY=u(($)=>Object.entries($).filter(([U])=>{const G=U.indexOf(F0);if(G===-1)return!1;return Object.values(w1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{const X=G.indexOf(F0),Z=G.substring(0,X)===w1.IniSectionType.PROFILE?G.substring(X+1):G;return U[Z]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),Q1=import.meta.require("path"),mY=T0(),nY="AWS_CONFIG_FILE",K8=u(()=>process.env[nY]||Q1.join(mY.getHomeDir(),".aws","config"),"getConfigFilepath"),iY=T0(),rY="AWS_SHARED_CREDENTIALS_FILE",oY=u(()=>process.env[rY]||Q1.join(iY.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),aY=T0(),tY=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,eY=["__proto__","profile __proto__"],C$=u(($)=>{const U={};let G,W;for(let X of $.split(/\r?\n/)){const Z=X.split(/(^|\s)[;#]/)[0].trim();if(Z[0]==="["&&Z[Z.length-1]==="]"){G=void 0,W=void 0;const Y=Z.substring(1,Z.length-1),w=tY.exec(Y);if(w){const[,Q,,z]=w;if(Object.values(w1.IniSectionType).includes(Q))G=[Q,z].join(F0)}else G=Y;if(eY.includes(Y))throw new Error(`Found invalid profile name "${Y}"`)}else if(G){const Y=Z.indexOf("=");if(![0,-1].includes(Y)){const[w,Q]=[Z.substring(0,Y).trim(),Z.substring(Y+1).trim()];if(Q==="")W=w;else{if(W&&X.trimStart()===X)W=void 0;U[G]=U[G]||{};const z=W?[W,w].join(F0):w;U[G][z]=Q}}}}return U},"parseIni"),F8=A$(),R8=u(()=>({}),"swallowError"),F0=".",M8=u(async($={})=>{const{filepath:U=oY(),configFilepath:G=K8()}=$,W=aY.getHomeDir();let Z=U;if(U.startsWith("~/"))Z=Q1.join(W,U.slice(2));let L=G;if(G.startsWith("~/"))L=Q1.join(W,G.slice(2));const Y=await Promise.all([F8.slurpFile(L,{ignoreCache:$.ignoreCache}).then(C$).then(sY).catch(R8),F8.slurpFile(Z,{ignoreCache:$.ignoreCache}).then(C$).catch(R8)]);return{configFile:Y[0],credentialsFile:Y[1]}},"loadSharedConfigFiles"),$2=u(($)=>Object.entries($).filter(([U])=>U.startsWith(w1.IniSectionType.SSO_SESSION+F0)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(F0)+1)]:W}),{}),"getSsoSessionData"),U2=A$(),G2=u(()=>({}),"swallowError"),W2=u(async($={})=>U2.slurpFile($.configFilepath??K8()).then(C$).then($2).catch(G2),"loadSsoSessionData"),X2=u((...$)=>{const U={};for(let G of $)for(let[W,X]of Object.entries(G))if(U[W]!==void 0)Object.assign(U[W],X);else U[W]=X;return U},"mergeConfigFiles"),Z2=u(async($)=>{const U=await M8($);return X2(U.configFile,U.credentialsFile)},"parseKnownFiles")});var T8=M((H3,V8)=>{function N$($){try{const U=new Set(Array.from($.match(/([A-Z_]){3,}/g)??[]));return U.delete("CONFIG"),U.delete("CONFIG_PREFIX_SEPARATOR"),U.delete("ENV"),[...U].join(", ")}catch(U){return $}}var{defineProperty:F1,getOwnPropertyDescriptor:L2,getOwnPropertyNames:Y2}=Object,w2=Object.prototype.hasOwnProperty,H0=($,U)=>F1($,"name",{value:U,configurable:!0}),Q2=($,U)=>{for(var G in U)F1($,G,{get:U[G],enumerable:!0})},z2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Y2(U))if(!w2.call($,X)&&X!==G)F1($,X,{get:()=>U[X],enumerable:!(W=L2(U,X))||W.enumerable})}return $},F2=($)=>z2(F1({},"__esModule",{value:!0}),$),E8={};Q2(E8,{loadConfig:()=>M2});V8.exports=F2(E8);var y0=E$();H0(N$,"getSelectorName");var R2=H0(($,U)=>async()=>{try{const G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new y0.CredentialsProviderError(G.message||`Not found in ENV: ${N$($.toString())}`,{logger:U})}},"fromEnv"),B8=q$(),J2=H0(($,{preferredFile:U="config",...G}={})=>async()=>{const W=B8.getProfileName(G),{configFile:X,credentialsFile:Z}=await B8.loadSharedConfigFiles(G),L=Z[W]||{},Y=X[W]||{},w=U==="config"?{...L,...Y}:{...Y,...L};try{const z=$(w,U==="config"?X:Z);if(z===void 0)throw new Error;return z}catch(Q){throw new y0.CredentialsProviderError(Q.message||`Not found in config files w/ profile [${W}]: ${N$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),I2=H0(($)=>typeof $==="function","isFunction"),K2=H0(($)=>I2($)?async()=>await $():y0.fromStatic($),"fromStatic"),M2=H0(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>y0.memoize(y0.chain(R2($),J2(U,W),K2(G))),"loadConfig")});var q8=M((C8)=>{Object.defineProperty(C8,"__esModule",{value:!0});C8.getEndpointUrlConfig=void 0;var H8=q$(),A8="AWS_ENDPOINT_URL",O8="endpoint_url",B2=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[A8,...G].join("_")];if(W)return W;const X=U[A8];if(X)return X;return},configFileSelector:(U,G)=>{if(G&&U.services){const X=G[["services",U.services].join(H8.CONFIG_PREFIX_SEPARATOR)];if(X){const Z=$.split(" ").map((Y)=>Y.toLowerCase()),L=X[[Z.join("_"),O8].join(H8.CONFIG_PREFIX_SEPARATOR)];if(L)return L}}const W=U[O8];if(W)return W;return},default:void 0});C8.getEndpointUrlConfig=B2});var j$=M((N8)=>{Object.defineProperty(N8,"__esModule",{value:!0});N8.getEndpointFromConfig=void 0;var E2=T8(),V2=q8(),T2=async($)=>E2.loadConfig(V2.getEndpointUrlConfig($!==null&&$!==void 0?$:""))();N8.getEndpointFromConfig=T2});var k8=M((C3,D8)=>{function S8($){const U={};if($=$.replace(/^\?/,""),$)for(let G of $.split("&")){let[W,X=null]=G.split("=");if(W=decodeURIComponent(W),X)X=decodeURIComponent(X);if(!(W in U))U[W]=X;else if(Array.isArray(U[W]))U[W].push(X);else U[W]=[U[W],X]}return U}var{defineProperty:R1,getOwnPropertyDescriptor:H2,getOwnPropertyNames:A2}=Object,O2=Object.prototype.hasOwnProperty,C2=($,U)=>R1($,"name",{value:U,configurable:!0}),f2=($,U)=>{for(var G in U)R1($,G,{get:U[G],enumerable:!0})},q2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of A2(U))if(!O2.call($,X)&&X!==G)R1($,X,{get:()=>U[X],enumerable:!(W=H2(U,X))||W.enumerable})}return $},N2=($)=>q2(R1({},"__esModule",{value:!0}),$),P8={};f2(P8,{parseQueryString:()=>S8});D8.exports=N2(P8);C2(S8,"parseQueryString")});var v8=M((f3,x8)=>{var{defineProperty:J1,getOwnPropertyDescriptor:j2,getOwnPropertyNames:P2}=Object,S2=Object.prototype.hasOwnProperty,D2=($,U)=>J1($,"name",{value:U,configurable:!0}),k2=($,U)=>{for(var G in U)J1($,G,{get:U[G],enumerable:!0})},b2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of P2(U))if(!S2.call($,X)&&X!==G)J1($,X,{get:()=>U[X],enumerable:!(W=j2(U,X))||W.enumerable})}return $},h2=($)=>b2(J1({},"__esModule",{value:!0}),$),b8={};k2(b8,{parseUrl:()=>h8});x8.exports=h2(b8);var x2=k8(),h8=D2(($)=>{if(typeof $==="string")return h8(new URL($));const{hostname:U,pathname:G,port:W,protocol:X,search:Z}=$;let L;if(Z)L=x2.parseQueryString(Z);return{hostname:U,port:W?parseInt(W):void 0,protocol:X,path:G,query:L}},"parseUrl")});var S$=M((q3,p8)=>{function g8($,U,G){return{applyToStack:(W)=>{W.add(y8($,G),_8),W.add(u8($,U),d8)}}}var{defineProperty:I1,getOwnPropertyDescriptor:v2,getOwnPropertyNames:c2}=Object,y2=Object.prototype.hasOwnProperty,P$=($,U)=>I1($,"name",{value:U,configurable:!0}),u2=($,U)=>{for(var G in U)I1($,G,{get:U[G],enumerable:!0})},_2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of c2(U))if(!y2.call($,X)&&X!==G)I1($,X,{get:()=>U[X],enumerable:!(W=v2(U,X))||W.enumerable})}return $},d2=($)=>_2(I1({},"__esModule",{value:!0}),$),c8={};u2(c8,{deserializerMiddleware:()=>y8,deserializerMiddlewareOption:()=>_8,getSerdePlugin:()=>g8,serializerMiddleware:()=>u8,serializerMiddlewareOption:()=>d8});p8.exports=d2(c8);var y8=P$(($,U)=>(G)=>async(W)=>{const{response:X}=await G(W);try{const Z=await U(X,$);return{response:X,output:Z}}catch(Z){if(Object.defineProperty(Z,"$response",{value:X}),!("$metadata"in Z)){if(Z.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof Z.$responseBodyText!=="undefined"){if(Z.$response)Z.$response.body=Z.$responseBodyText}}throw Z}},"deserializerMiddleware"),u8=P$(($,U)=>(G,W)=>async(X)=>{var Z;const L=((Z=W.endpointV2)==null?void 0:Z.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!L)throw new Error("No valid endpoint provider available.");const Y=await U(X.input,{...$,endpoint:L});return G({...X,request:Y})},"serializerMiddleware"),_8={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},d8={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};P$(g8,"getSerdePlugin")});var a8=M((N3,o8)=>{var{defineProperty:M1,getOwnPropertyDescriptor:g2,getOwnPropertyNames:p2}=Object,l2=Object.prototype.hasOwnProperty,s=($,U)=>M1($,"name",{value:U,configurable:!0}),s2=($,U)=>{for(var G in U)M1($,G,{get:U[G],enumerable:!0})},m2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of p2(U))if(!l2.call($,X)&&X!==G)M1($,X,{get:()=>U[X],enumerable:!(W=g2(U,X))||W.enumerable})}return $},n2=($)=>m2(M1({},"__esModule",{value:!0}),$),s8={};s2(s8,{endpointMiddleware:()=>i8,endpointMiddlewareOptions:()=>r8,getEndpointFromInstructions:()=>m8,getEndpointPlugin:()=>Ww,resolveEndpointConfig:()=>Zw,resolveParams:()=>n8,toEndpointV1:()=>D$});o8.exports=n2(s8);var i2=s(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(e2(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!t2(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),r2=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,o2=/(\d+\.){3}\d+/,a2=/\.\./,t2=s(($)=>r2.test($)&&!o2.test($)&&!a2.test($),"isDnsCompatibleBucketName"),e2=s(($)=>{const[U,G,W,,,X]=$.split(":"),Z=U==="arn"&&$.split(":").length>=6,L=Boolean(Z&&G&&W&&X);if(Z&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L},"isArnBucketName"),$w=s(($,U,G)=>{const W=s(async()=>{const X=G[$]??G[U];if(typeof X==="function")return X();return X},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return(X==null?void 0:X.credentialScope)??(X==null?void 0:X.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return(X==null?void 0:X.accountId)??(X==null?void 0:X.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const X=await W();if(X&&typeof X==="object"){if("url"in X)return X.url.href;if("hostname"in X){const{protocol:Z,hostname:L,port:Y,path:w}=X;return`${Z}//${L}${Y?":"+Y:""}${w}`}}return X};return W},"createConfigValueProvider"),Uw=j$(),l8=v8(),D$=s(($)=>{if(typeof $==="object"){if("url"in $)return l8.parseUrl($.url);return $}return l8.parseUrl($)},"toEndpointV1"),m8=s(async($,U,G,W)=>{if(!G.endpoint){let L;if(G.serviceConfiguredEndpoint)L=await G.serviceConfiguredEndpoint();else L=await Uw.getEndpointFromConfig(G.serviceId);if(L)G.endpoint=()=>Promise.resolve(D$(L))}const X=await n8($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},"getEndpointFromInstructions"),n8=s(async($,U,G)=>{var W;const X={},Z=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[L,Y]of Object.entries(Z))switch(Y.type){case"staticContextParams":X[L]=Y.value;break;case"contextParams":X[L]=$[Y.name];break;case"clientContextParams":case"builtInParams":X[L]=await $w(Y.name,L,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Y))}if(Object.keys(Z).length===0)Object.assign(X,G);if(String(G.serviceId).toLowerCase()==="s3")await i2(X);return X},"resolveParams"),K1=x0(),i8=s(({config:$,instructions:U})=>{return(G,W)=>async(X)=>{var Z,L,Y;const w=await m8(X.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=w,W.authSchemes=(Z=w.properties)==null?void 0:Z.authSchemes;const Q=(L=W.authSchemes)==null?void 0:L[0];if(Q){W.signing_region=Q.signingRegion,W.signing_service=Q.signingName;const z=K1.getSmithyContext(W),F=(Y=z==null?void 0:z.selectedHttpAuthScheme)==null?void 0:Y.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:Q.signingRegion,signingRegion:Q.signingRegion,signing_service:Q.signingName,signingName:Q.signingName,signingRegionSet:Q.signingRegionSet},Q.properties)}return G({...X})}},"endpointMiddleware"),Gw=S$(),r8={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Gw.serializerMiddlewareOption.name},Ww=s(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(i8({config:$,instructions:U}),r8)}}),"getEndpointPlugin"),Xw=j$(),Zw=s(($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>D$(await K1.normalizeProvider(G)()):void 0,Z={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:K1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:K1.normalizeProvider($.useFipsEndpoint??!1)};let L=void 0;return Z.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!L)L=Xw.getEndpointFromConfig($.serviceId);return L},Z},"resolveEndpointConfig")});var o=M((j3,L4)=>{function W4($){return Object.keys($).reduce((U,G)=>{const W=$[G];return{...U,[G]:Array.isArray(W)?[...W]:W}},{})}function Z4($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}var{defineProperty:B1,getOwnPropertyDescriptor:Lw,getOwnPropertyNames:Yw}=Object,ww=Object.prototype.hasOwnProperty,$0=($,U)=>B1($,"name",{value:U,configurable:!0}),Qw=($,U)=>{for(var G in U)B1($,G,{get:U[G],enumerable:!0})},zw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Yw(U))if(!ww.call($,X)&&X!==G)B1($,X,{get:()=>U[X],enumerable:!(W=Lw(U,X))||W.enumerable})}return $},Fw=($)=>zw(B1({},"__esModule",{value:!0}),$),t8={};Qw(t8,{Field:()=>Iw,Fields:()=>Kw,HttpRequest:()=>Mw,HttpResponse:()=>Bw,IHttpRequest:()=>e8.HttpRequest,getHttpHandlerExtensionConfiguration:()=>Rw,isValidHostname:()=>Z4,resolveHttpHandlerRuntimeConfig:()=>Jw});L4.exports=Fw(t8);var Rw=$0(($)=>{let U=$.httpHandler;return{setHttpHandler(G){U=G},httpHandler(){return U},updateHttpClientConfig(G,W){U.updateHttpClientConfig(G,W)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),Jw=$0(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),e8=Q0(),$4=class ${constructor({name:U,kind:G=e8.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}};$0($4,"Field");var Iw=$4,U4=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)}};$0(U4,"Fields");var Kw=U4,G4=class ${constructor(U){this.method=U.method||"GET",this.hostname=U.hostname||"localhost",this.port=U.port,this.query=U.query||{},this.headers=U.headers||{},this.body=U.body,this.protocol=U.protocol?U.protocol.slice(-1)!==":"?`${U.protocol}:`:U.protocol:"https:",this.path=U.path?U.path.charAt(0)!=="/"?`/${U.path}`:U.path:"/",this.username=U.username,this.password=U.password,this.fragment=U.fragment}static clone(U){const G=new $({...U,headers:{...U.headers}});if(G.query)G.query=W4(G.query);return G}static isInstance(U){if(!U)return!1;const 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)}};$0(G4,"HttpRequest");var Mw=G4;$0(W4,"cloneQuery");var X4=class ${constructor(U){this.statusCode=U.statusCode,this.reason=U.reason,this.headers=U.headers||{},this.body=U.body}static isInstance(U){if(!U)return!1;const G=U;return typeof G.statusCode==="number"&&typeof G.headers==="object"}};$0(X4,"HttpResponse");var Bw=X4;$0(Z4,"isValidHostname")});var k$=M((P3,z4)=>{var{defineProperty:E1,getOwnPropertyDescriptor:Ew,getOwnPropertyNames:Vw}=Object,Tw=Object.prototype.hasOwnProperty,A0=($,U)=>E1($,"name",{value:U,configurable:!0}),Hw=($,U)=>{for(var G in U)E1($,G,{get:U[G],enumerable:!0})},Aw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Vw(U))if(!Tw.call($,X)&&X!==G)E1($,X,{get:()=>U[X],enumerable:!(W=Ew(U,X))||W.enumerable})}return $},Ow=($)=>Aw(E1({},"__esModule",{value:!0}),$),Y4={};Hw(Y4,{isClockSkewCorrectedError:()=>w4,isClockSkewError:()=>Sw,isRetryableByTrait:()=>Pw,isServerError:()=>kw,isThrottlingError:()=>Dw,isTransientError:()=>Q4});z4.exports=Ow(Y4);var Cw=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],fw=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],qw=["TimeoutError","RequestTimeout","RequestTimeoutException"],Nw=[500,502,503,504],jw=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Pw=A0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),Sw=A0(($)=>Cw.includes($.name),"isClockSkewError"),w4=A0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),Dw=A0(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||fw.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),Q4=A0(($)=>{var U;return w4($)||qw.includes($.name)||jw.includes(($==null?void 0:$.code)||"")||Nw.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),kw=A0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!Q4($))return!0;return!1}return!1},"isServerError")});var C4=M((S3,O4)=>{var{defineProperty:V1,getOwnPropertyDescriptor:bw,getOwnPropertyNames:hw}=Object,xw=Object.prototype.hasOwnProperty,m=($,U)=>V1($,"name",{value:U,configurable:!0}),vw=($,U)=>{for(var G in U)V1($,G,{get:U[G],enumerable:!0})},cw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of hw(U))if(!xw.call($,X)&&X!==G)V1($,X,{get:()=>U[X],enumerable:!(W=bw(U,X))||W.enumerable})}return $},yw=($)=>cw(V1({},"__esModule",{value:!0}),$),R4={};vw(R4,{AdaptiveRetryStrategy:()=>lw,ConfiguredRetryStrategy:()=>sw,DEFAULT_MAX_ATTEMPTS:()=>b$,DEFAULT_RETRY_DELAY_BASE:()=>u0,DEFAULT_RETRY_MODE:()=>uw,DefaultRateLimiter:()=>K4,INITIAL_RETRY_TOKENS:()=>h$,INVOCATION_ID_HEADER:()=>dw,MAXIMUM_RETRY_DELAY:()=>x$,NO_RETRY_INCREMENT:()=>V4,REQUEST_HEADER:()=>gw,RETRY_COST:()=>B4,RETRY_MODES:()=>J4,StandardRetryStrategy:()=>v$,THROTTLING_RETRY_DELAY_BASE:()=>M4,TIMEOUT_RETRY_COST:()=>E4});O4.exports=yw(R4);var J4=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(J4||{}),b$=3,uw="standard",_w=k$(),I4=class ${constructor(U){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(U==null?void 0:U.beta)??0.7,this.minCapacity=(U==null?void 0:U.minCapacity)??1,this.minFillRate=(U==null?void 0:U.minFillRate)??0.5,this.scaleConstant=(U==null?void 0:U.scaleConstant)??0.4,this.smooth=(U==null?void 0:U.smooth)??0.8;const 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){const G=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((W)=>setTimeout(W,G))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){const U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}const 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(),_w.isThrottlingError(U)){const X=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=X,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),G=this.cubicThrottle(X),this.enableTokenBucket()}else this.calculateTimeWindow(),G=this.cubicSuccess(this.getCurrentTimeInSeconds());const 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(){const U=this.getCurrentTimeInSeconds(),G=Math.floor(U*2)/2;if(this.requestCount++,G>this.lastTxRateBucket){const 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))}};m(I4,"DefaultRateLimiter");var K4=I4,u0=100,x$=20000,M4=500,h$=500,B4=5,E4=10,V4=1,dw="amz-sdk-invocation-id",gw="amz-sdk-request",pw=m(()=>{let $=u0;return{computeNextBackoffDelay:m((W)=>{return Math.floor(Math.min(x$,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:m((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),F4=m(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:m(()=>U,"getRetryCount"),getRetryDelay:m(()=>Math.min(x$,$),"getRetryDelay"),getRetryCost:m(()=>G,"getRetryCost")}},"createDefaultRetryToken"),T4=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=h$,this.retryBackoffStrategy=pw(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return F4({retryDelay:u0,retryCount:0})}async refreshRetryTokenForRetry(U,G){const W=await this.getMaxAttempts();if(this.shouldRetry(U,G,W)){const X=G.errorType;this.retryBackoffStrategy.setDelayBase(X==="THROTTLING"?M4:u0);const Z=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),L=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,Z):Z,Y=this.getCapacityCost(X);return this.capacity-=Y,F4({retryDelay:L,retryCount:U.getRetryCount()+1,retryCost:Y})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(h$,this.capacity+(U.getRetryCost()??V4))}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 ${b$}`),b$}}shouldRetry(U,G,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?E4:B4}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};m(T4,"StandardRetryStrategy");var v$=T4,H4=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=G??{};this.rateLimiter=W??new K4,this.standardRetryStrategy=new v$(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)}};m(H4,"AdaptiveRetryStrategy");var lw=H4,A4=class $ extends v${constructor(U,G=u0){super(typeof U==="function"?U:async()=>U);if(typeof G==="number")this.computeNextBackoffDelay=()=>G;else this.computeNextBackoffDelay=G}async refreshRetryTokenForRetry(U,G){const W=await super.refreshRetryTokenForRetry(U,G);return W.getRetryDelay=()=>this.computeNextBackoffDelay(W.getRetryCount()),W}};m(A4,"ConfiguredRetryStrategy");var sw=A4});var P4=M((D3,j4)=>{var{defineProperty:T1,getOwnPropertyDescriptor:mw,getOwnPropertyNames:nw}=Object,iw=Object.prototype.hasOwnProperty,_=($,U)=>T1($,"name",{value:U,configurable:!0}),rw=($,U)=>{for(var G in U)T1($,G,{get:U[G],enumerable:!0})},ow=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of nw(U))if(!iw.call($,X)&&X!==G)T1($,X,{get:()=>U[X],enumerable:!(W=mw(U,X))||W.enumerable})}return $},aw=($)=>ow(T1({},"__esModule",{value:!0}),$),N4={};rw(N4,{constructStack:()=>c$});j4.exports=aw(N4);var R0=_(($,U)=>{const G=[];if($)G.push($);if(U)for(let W of U)G.push(W);return G},"getAllAliases"),U0=_(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),c$=_(()=>{let $=[],U=[],G=!1;const W=new Set,X=_((F)=>F.sort((R,J)=>f4[J.step]-f4[R.step]||q4[J.priority||"normal"]-q4[R.priority||"normal"]),"sort"),Z=_((F)=>{let R=!1;const J=_((I)=>{const E=R0(I.name,I.aliases);if(E.includes(F)){R=!0;for(let B of E)W.delete(B);return!1}return!0},"filterCb");return $=$.filter(J),U=U.filter(J),R},"removeByName"),L=_((F)=>{let R=!1;const J=_((I)=>{if(I.middleware===F){R=!0;for(let E of R0(I.name,I.aliases))W.delete(E);return!1}return!0},"filterCb");return $=$.filter(J),U=U.filter(J),R},"removeByReference"),Y=_((F)=>{var R;return $.forEach((J)=>{F.add(J.middleware,{...J})}),U.forEach((J)=>{F.addRelativeTo(J.middleware,{...J})}),(R=F.identifyOnResolve)==null||R.call(F,z.identifyOnResolve()),F},"cloneTo"),w=_((F)=>{const R=[];return F.before.forEach((J)=>{if(J.before.length===0&&J.after.length===0)R.push(J);else R.push(...w(J))}),R.push(F),F.after.reverse().forEach((J)=>{if(J.before.length===0&&J.after.length===0)R.push(J);else R.push(...w(J))}),R},"expandRelativeMiddlewareList"),Q=_((F=!1)=>{const R=[],J=[],I={};return $.forEach((B)=>{const V={...B,before:[],after:[]};for(let T of R0(V.name,V.aliases))I[T]=V;R.push(V)}),U.forEach((B)=>{const V={...B,before:[],after:[]};for(let T of R0(V.name,V.aliases))I[T]=V;J.push(V)}),J.forEach((B)=>{if(B.toMiddleware){const V=I[B.toMiddleware];if(V===void 0){if(F)return;throw new Error(`${B.toMiddleware} is not found when adding ${U0(B.name,B.aliases)} middleware ${B.relation} ${B.toMiddleware}`)}if(B.relation==="after")V.after.push(B);if(B.relation==="before")V.before.push(B)}}),X(R).map(w).reduce((B,V)=>{return B.push(...V),B},[])},"getMiddlewareList"),z={add:(F,R={})=>{const{name:J,override:I,aliases:E}=R,B={step:"initialize",priority:"normal",middleware:F,...R},V=R0(J,E);if(V.length>0){if(V.some((T)=>W.has(T))){if(!I)throw new Error(`Duplicate middleware name '${U0(J,E)}'`);for(let T of V){const H=$.findIndex((S)=>{var h;return S.name===T||((h=S.aliases)==null?void 0:h.some((w0)=>w0===T))});if(H===-1)continue;const A=$[H];if(A.step!==B.step||B.priority!==A.priority)throw new Error(`"${U0(A.name,A.aliases)}" middleware with ${A.priority} priority in ${A.step} step cannot be overridden by "${U0(J,E)}" middleware with ${B.priority} priority in ${B.step} step.`);$.splice(H,1)}}for(let T of V)W.add(T)}$.push(B)},addRelativeTo:(F,R)=>{const{name:J,override:I,aliases:E}=R,B={middleware:F,...R},V=R0(J,E);if(V.length>0){if(V.some((T)=>W.has(T))){if(!I)throw new Error(`Duplicate middleware name '${U0(J,E)}'`);for(let T of V){const H=U.findIndex((S)=>{var h;return S.name===T||((h=S.aliases)==null?void 0:h.some((w0)=>w0===T))});if(H===-1)continue;const A=U[H];if(A.toMiddleware!==B.toMiddleware||A.relation!==B.relation)throw new Error(`"${U0(A.name,A.aliases)}" middleware ${A.relation} "${A.toMiddleware}" middleware cannot be overridden by "${U0(J,E)}" middleware ${B.relation} "${B.toMiddleware}" middleware.`);U.splice(H,1)}}for(let T of V)W.add(T)}U.push(B)},clone:()=>Y(c$()),use:(F)=>{F.applyToStack(z)},remove:(F)=>{if(typeof F==="string")return Z(F);else return L(F)},removeByTag:(F)=>{let R=!1;const J=_((I)=>{const{tags:E,name:B,aliases:V}=I;if(E&&E.includes(F)){const T=R0(B,V);for(let H of T)W.delete(H);return R=!0,!1}return!0},"filterCb");return $=$.filter(J),U=U.filter(J),R},concat:(F)=>{var R;const J=Y(c$());return J.use(F),J.identifyOnResolve(G||J.identifyOnResolve()||(((R=F.identifyOnResolve)==null?void 0:R.call(F))??!1)),J},applyToStack:Y,identify:()=>{return Q(!0).map((F)=>{const R=F.step??F.relation+" "+F.toMiddleware;return U0(F.name,F.aliases)+" - "+R})},identifyOnResolve(F){if(typeof F==="boolean")G=F;return G},resolve:(F,R)=>{for(let J of Q().map((I)=>I.middleware).reverse())F=J(F,R);if(G)console.log(z.identify());return F}};return z},"constructStack"),f4={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},q4={high:3,normal:2,low:1}});var y$=M((k3,D4)=>{var{defineProperty:H1,getOwnPropertyDescriptor:tw,getOwnPropertyNames:ew}=Object,$9=Object.prototype.hasOwnProperty,U9=($,U)=>H1($,"name",{value:U,configurable:!0}),G9=($,U)=>{for(var G in U)H1($,G,{get:U[G],enumerable:!0})},W9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of ew(U))if(!$9.call($,X)&&X!==G)H1($,X,{get:()=>U[X],enumerable:!(W=tw(U,X))||W.enumerable})}return $},X9=($)=>W9(H1({},"__esModule",{value:!0}),$),S4={};G9(S4,{isArrayBuffer:()=>Z9});D4.exports=X9(S4);var Z9=U9(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var _0=M((b3,h4)=>{var{defineProperty:A1,getOwnPropertyDescriptor:L9,getOwnPropertyNames:Y9}=Object,w9=Object.prototype.hasOwnProperty,k4=($,U)=>A1($,"name",{value:U,configurable:!0}),Q9=($,U)=>{for(var G in U)A1($,G,{get:U[G],enumerable:!0})},z9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Y9(U))if(!w9.call($,X)&&X!==G)A1($,X,{get:()=>U[X],enumerable:!(W=L9(U,X))||W.enumerable})}return $},F9=($)=>z9(A1({},"__esModule",{value:!0}),$),b4={};Q9(b4,{fromArrayBuffer:()=>J9,fromString:()=>I9});h4.exports=F9(b4);var R9=y$(),u$=import.meta.require("buffer"),J9=k4(($,U=0,G=$.byteLength-U)=>{if(!R9.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return u$.Buffer.from($,U,G)},"fromArrayBuffer"),I9=k4(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?u$.Buffer.from($,U):u$.Buffer.from($)},"fromString")});var c4=M((x4)=>{Object.defineProperty(x4,"__esModule",{value:!0});x4.fromBase64=void 0;var K9=_0(),M9=/^[A-Za-z0-9+/]*={0,2}$/,B9=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!M9.exec($))throw new TypeError("Invalid base64 string.");const U=K9.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};x4.fromBase64=B9});var G0=M((x3,d4)=>{var{defineProperty:O1,getOwnPropertyDescriptor:E9,getOwnPropertyNames:V9}=Object,T9=Object.prototype.hasOwnProperty,_$=($,U)=>O1($,"name",{value:U,configurable:!0}),H9=($,U)=>{for(var G in U)O1($,G,{get:U[G],enumerable:!0})},A9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of V9(U))if(!T9.call($,X)&&X!==G)O1($,X,{get:()=>U[X],enumerable:!(W=E9(U,X))||W.enumerable})}return $},O9=($)=>A9(O1({},"__esModule",{value:!0}),$),y4={};H9(y4,{fromUtf8:()=>_4,toUint8Array:()=>C9,toUtf8:()=>f9});d4.exports=O9(y4);var u4=_0(),_4=_$(($)=>{const U=u4.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),C9=_$(($)=>{if(typeof $==="string")return _4($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),f9=_$(($)=>{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 u4.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var l4=M((g4)=>{Object.defineProperty(g4,"__esModule",{value:!0});g4.toBase64=void 0;var q9=_0(),N9=G0(),j9=($)=>{let U;if(typeof $==="string")U=N9.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 q9.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};g4.toBase64=j9});var f1=M((c3,C1)=>{var{defineProperty:s4,getOwnPropertyDescriptor:P9,getOwnPropertyNames:S9}=Object,D9=Object.prototype.hasOwnProperty,d$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of S9(U))if(!D9.call($,X)&&X!==G)s4($,X,{get:()=>U[X],enumerable:!(W=P9(U,X))||W.enumerable})}return $},m4=($,U,G)=>(d$($,U,"default"),G&&d$(G,U,"default")),k9=($)=>d$(s4({},"__esModule",{value:!0}),$),g$={};C1.exports=k9(g$);m4(g$,c4(),C1.exports);m4(g$,l4(),C1.exports)});var r4=M((n4)=>{Object.defineProperty(n4,"__esModule",{value:!0});n4.getAwsChunkedEncodingStream=void 0;var b9=import.meta.require("stream"),h9=($,U)=>{const{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:X,checksumLocationName:Z,streamHasher:L}=U,Y=G!==void 0&&X!==void 0&&Z!==void 0&&L!==void 0,w=Y?L(X,$):void 0,Q=new b9.Readable({read:()=>{}});return $.on("data",(z)=>{const F=W(z)||0;Q.push(`${F.toString(16)}\r\n`),Q.push(z),Q.push("\r\n")}),$.on("end",async()=>{if(Q.push("0\r\n"),Y){const z=G(await w);Q.push(`${Z}:${z}\r\n`),Q.push("\r\n")}Q.push(null)}),Q};n4.getAwsChunkedEncodingStream=h9});var l$=M((u3,e4)=>{function t4($){const U=[];for(let G of Object.keys($).sort()){const W=$[G];if(G=p$.escapeUri(G),Array.isArray(W))for(let X=0,Z=W.length;X<Z;X++)U.push(`${G}=${p$.escapeUri(W[X])}`);else{let X=G;if(W||typeof W==="string")X+=`=${p$.escapeUri(W)}`;U.push(X)}}return U.join("&")}var{defineProperty:q1,getOwnPropertyDescriptor:x9,getOwnPropertyNames:v9}=Object,c9=Object.prototype.hasOwnProperty,y9=($,U)=>q1($,"name",{value:U,configurable:!0}),u9=($,U)=>{for(var G in U)q1($,G,{get:U[G],enumerable:!0})},_9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of v9(U))if(!c9.call($,X)&&X!==G)q1($,X,{get:()=>U[X],enumerable:!(W=x9(U,X))||W.enumerable})}return $},d9=($)=>_9(q1({},"__esModule",{value:!0}),$),a4={};u9(a4,{buildQueryString:()=>t4});e4.exports=d9(a4);var p$=o4();y9(t4,"buildQueryString")});var E6=M((_3,B6)=>{async function n$($,U,G=G6){const W=U.headers??{},X=W.Expect||W.expect;let Z=-1,L=!1;if(X==="100-continue")await Promise.race([new Promise((Y)=>{Z=Number(setTimeout(Y,Math.max(G6,G)))}),new Promise((Y)=>{$.on("continue",()=>{clearTimeout(Z),Y()}),$.on("error",()=>{L=!0,clearTimeout(Z),Y()})})]);if(!L)z6($,U.body)}function z6($,U){if(U instanceof Q6.Readable){U.pipe($);return}if(U){if(Buffer.isBuffer(U)||typeof U==="string"){$.end(U);return}const 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()}async function M6($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:Y,value:w}=await G.read();if(w)U.push(w),X+=w.length;W=Y}const Z=new Uint8Array(X);let L=0;for(let Y of U)Z.set(Y,L),L+=Y.length;return Z}var{create:g9,defineProperty:d0,getOwnPropertyDescriptor:p9,getOwnPropertyNames:l9,getPrototypeOf:s9}=Object,m9=Object.prototype.hasOwnProperty,O=($,U)=>d0($,"name",{value:U,configurable:!0}),n9=($,U)=>{for(var G in U)d0($,G,{get:U[G],enumerable:!0})},X6=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of l9(U))if(!m9.call($,X)&&X!==G)d0($,X,{get:()=>U[X],enumerable:!(W=p9(U,X))||W.enumerable})}return $},i9=($,U,G)=>(G=$!=null?g9(s9($)):{},X6(U||!$||!$.__esModule?d0(G,"default",{value:$,enumerable:!0}):G,$)),r9=($)=>X6(d0({},"__esModule",{value:!0}),$),Z6={};n9(Z6,{DEFAULT_REQUEST_TIMEOUT:()=>UQ,NodeHttp2Handler:()=>LQ,NodeHttpHandler:()=>GQ,streamCollector:()=>wQ});B6.exports=r9(Z6);var L6=o(),Y6=l$(),s$=import.meta.require("http"),m$=import.meta.require("https"),o9=["ECONNRESET","EPIPE","ETIMEDOUT"],w6=O(($)=>{const U={};for(let G of Object.keys($)){const W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),$6=1000,a9=O(($,U,G=0)=>{if(!G)return-1;const W=O((X)=>{const Z=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G-X),L=O((Y)=>{if(Y==null?void 0:Y.connecting)Y.on("connect",()=>{clearTimeout(Z)});else clearTimeout(Z)},"doWithSocket");if($.socket)L($.socket);else $.on("socket",L)},"registerTimeout");if(G<2000)return W(0),0;return setTimeout(W.bind(null,$6),$6)},"setConnectionTimeout"),t9=3000,e9=O(($,{keepAlive:U,keepAliveMsecs:G},W=t9)=>{if(U!==!0)return-1;const X=O(()=>{if($.socket)$.socket.setKeepAlive(U,G||0);else $.on("socket",(Z)=>{Z.setKeepAlive(U,G||0)})},"registerListener");if(W===0)return X(),0;return setTimeout(X,W)},"setSocketKeepAlive"),U6=3000,$Q=O(($,U,G=0)=>{const W=O((X)=>{$.setTimeout(G-X,()=>{$.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:U6),U6)},"setSocketTimeout"),Q6=import.meta.require("stream"),G6=1000;O(n$,"writeRequestBody");O(z6,"writeBody");var UQ=0,F6=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((X)=>{G(this.resolveDefaultConfig(X))}).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 X,Z,L;const{sockets:Y,requests:w,maxSockets:Q}=U;if(typeof Q!=="number"||Q===1/0)return G;const z=15000;if(Date.now()-z<G)return G;if(Y&&w)for(let F in Y){const R=((X=Y[F])==null?void 0:X.length)??0,J=((Z=w[F])==null?void 0:Z.length)??0;if(R>=Q&&J>=2*Q)return(L=W==null?void 0:W.warn)==null||L.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${R} and ${J} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return G}resolveDefaultConfig(U){const{requestTimeout:G,connectionTimeout:W,socketTimeout:X,httpAgent:Z,httpsAgent:L}=U||{};return{connectionTimeout:W,requestTimeout:G??X,httpAgent:(()=>{if(Z instanceof s$.Agent||typeof(Z==null?void 0:Z.destroy)==="function")return Z;return new s$.Agent({keepAlive:!0,maxSockets:50,...Z})})(),httpsAgent:(()=>{if(L instanceof m$.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new m$.Agent({keepAlive:!0,maxSockets:50,...L})})(),logger:console}}destroy(){var U,G,W,X;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(X=(W=this.config)==null?void 0:W.httpsAgent)==null||X.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;return new Promise((W,X)=>{let Z=void 0;const L=[],Y=O(async(H)=>{await Z,L.forEach(clearTimeout),W(H)},"resolve"),w=O(async(H)=>{await Z,L.forEach(clearTimeout),X(H)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const H=new Error("Request aborted");H.name="AbortError",w(H);return}const Q=U.protocol==="https:",z=Q?this.config.httpsAgent:this.config.httpAgent;L.push(setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(z,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const F=Y6.buildQueryString(U.query||{});let R=void 0;if(U.username!=null||U.password!=null){const H=U.username??"",A=U.password??"";R=`${H}:${A}`}let J=U.path;if(F)J+=`?${F}`;if(U.fragment)J+=`#${U.fragment}`;let I=U.hostname??"";if(I[0]==="["&&I.endsWith("]"))I=U.hostname.slice(1,-1);else I=U.hostname;const E={headers:U.headers,host:I,method:U.method,path:J,port:U.port,agent:z,auth:R},V=(Q?m$.request:s$.request)(E,(H)=>{const A=new L6.HttpResponse({statusCode:H.statusCode||-1,reason:H.statusMessage,headers:w6(H.headers),body:H});Y({response:A})});if(V.on("error",(H)=>{if(o9.includes(H.code))w(Object.assign(H,{name:"TimeoutError"}));else w(H)}),G){const H=O(()=>{V.destroy();const A=new Error("Request aborted");A.name="AbortError",w(A)},"onAbort");if(typeof G.addEventListener==="function"){const A=G;A.addEventListener("abort",H,{once:!0}),V.once("close",()=>A.removeEventListener("abort",H))}else G.onabort=H}L.push(a9(V,w,this.config.connectionTimeout)),L.push($Q(V,w,this.config.requestTimeout));const T=E.agent;if(typeof T==="object"&&"keepAlive"in T)L.push(e9(V,{keepAlive:T.keepAlive,keepAliveMsecs:T.keepAliveMsecs}));Z=n$(V,U,this.config.requestTimeout).catch((H)=>{return L.forEach(clearTimeout),X(H)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};O(F6,"NodeHttpHandler");var GQ=F6,W6=import.meta.require("http2"),WQ=i9(import.meta.require("http2")),R6=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()}}};O(R6,"NodeHttp2ConnectionPool");var XQ=R6,J6=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){const W=this.getUrlString(U),X=this.sessionCache.get(W);if(X){const w=X.poll();if(w&&!this.config.disableConcurrency)return w}const Z=WQ.default.connect(W);if(this.config.maxConcurrency)Z.settings({maxConcurrentStreams:this.config.maxConcurrency},(w)=>{if(w)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});Z.unref();const L=O(()=>{Z.destroy(),this.deleteSession(W,Z)},"destroySessionCb");if(Z.on("goaway",L),Z.on("error",L),Z.on("frameError",L),Z.on("close",()=>this.deleteSession(W,Z)),G.requestTimeout)Z.setTimeout(G.requestTimeout,L);const Y=this.sessionCache.get(W)||new XQ;return Y.offerLast(Z),this.sessionCache.set(W,Y),Z}deleteSession(U,G){const 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;const X=this.getUrlString(U);(W=this.sessionCache.get(X))==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()}};O(J6,"NodeHttp2ConnectionManager");var ZQ=J6,I6=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new ZQ({}),this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((X)=>{G(X||{})}).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)}const{requestTimeout:W,disableConcurrentStreams:X}=this.config;return new Promise((Z,L)=>{var Y;let w=!1,Q=void 0;const z=O(async(N)=>{await Q,Z(N)},"resolve"),F=O(async(N)=>{await Q,L(N)},"reject");if(G==null?void 0:G.aborted){w=!0;const N=new Error("Request aborted");N.name="AbortError",F(N);return}const{hostname:R,method:J,port:I,protocol:E,query:B}=U;let V="";if(U.username!=null||U.password!=null){const N=U.username??"",p=U.password??"";V=`${N}:${p}@`}const T=`${E}//${V}${R}${I?`:${I}`:""}`,H={destination:new URL(T)},A=this.connectionManager.lease(H,{requestTimeout:(Y=this.config)==null?void 0:Y.sessionTimeout,disableConcurrentStreams:X||!1}),S=O((N)=>{if(X)this.destroySession(A);w=!0,F(N)},"rejectWithDestroy"),h=Y6.buildQueryString(B||{});let w0=U.path;if(h)w0+=`?${h}`;if(U.fragment)w0+=`#${U.fragment}`;const c=A.request({...U.headers,[W6.constants.HTTP2_HEADER_PATH]:w0,[W6.constants.HTTP2_HEADER_METHOD]:J});if(A.ref(),c.on("response",(N)=>{const p=new L6.HttpResponse({statusCode:N[":status"]||-1,headers:w6(N),body:c});if(w=!0,z({response:p}),X)A.close(),this.connectionManager.deleteSession(T,A)}),W)c.setTimeout(W,()=>{c.close();const N=new Error(`Stream timed out because of no activity for ${W} ms`);N.name="TimeoutError",S(N)});if(G){const N=O(()=>{c.close();const p=new Error("Request aborted");p.name="AbortError",S(p)},"onAbort");if(typeof G.addEventListener==="function"){const p=G;p.addEventListener("abort",N,{once:!0}),c.once("close",()=>p.removeEventListener("abort",N))}else G.onabort=N}c.on("frameError",(N,p,cL)=>{S(new Error(`Frame type id ${N} in stream id ${cL} has failed with code ${p}.`))}),c.on("error",S),c.on("aborted",()=>{S(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${c.rstCode}.`))}),c.on("close",()=>{if(A.unref(),X)A.destroy();if(!w)S(new Error("Unexpected error: http2 request did not get a response"))}),Q=n$(c,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()}};O(I6,"NodeHttp2Handler");var LQ=I6,K6=class $ extends Q6.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};O(K6,"Collector");var YQ=K6,wQ=O(($)=>{if(QQ($))return M6($);return new Promise((U,G)=>{const W=new YQ;$.pipe(W),$.on("error",(X)=>{W.end(),G(X)}),W.on("error",G),W.on("finish",function(){const X=new Uint8Array(Buffer.concat(this.bufferedBytes));U(X)})})},"streamCollector"),QQ=O(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");O(M6,"collectReadableStream")});var N6=M((d3,q6)=>{function H6($=0){return new Promise((U,G)=>{if($)setTimeout(()=>{const W=new Error(`Request did not complete within ${$} ms`);W.name="TimeoutError",G(W)},$)})}async function O6($){const U=await f6($),G=EQ.fromBase64(U);return new Uint8Array(G)}async function C6($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:Y,value:w}=await G.read();if(w)U.push(w),X+=w.length;W=Y}const Z=new Uint8Array(X);let L=0;for(let Y of U)Z.set(Y,L),L+=Y.length;return Z}function f6($){return new Promise((U,G)=>{const W=new FileReader;W.onloadend=()=>{if(W.readyState!==2)return G(new Error("Reader aborted too early"));const X=W.result??"",Z=X.indexOf(","),L=Z>-1?Z+1:X.length;U(X.substring(L))},W.onabort=()=>G(new Error("Read aborted")),W.onerror=()=>G(W.error),W.readAsDataURL($)})}var{defineProperty:j1,getOwnPropertyDescriptor:zQ,getOwnPropertyNames:FQ}=Object,RQ=Object.prototype.hasOwnProperty,a=($,U)=>j1($,"name",{value:U,configurable:!0}),JQ=($,U)=>{for(var G in U)j1($,G,{get:U[G],enumerable:!0})},IQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of FQ(U))if(!RQ.call($,X)&&X!==G)j1($,X,{get:()=>U[X],enumerable:!(W=zQ(U,X))||W.enumerable})}return $},KQ=($)=>IQ(j1({},"__esModule",{value:!0}),$),T6={};JQ(T6,{FetchHttpHandler:()=>BQ,keepAliveSupport:()=>N1,streamCollector:()=>VQ});q6.exports=KQ(T6);var V6=o(),MQ=l$();a(H6,"requestTimeout");var N1={supported:void 0},A6=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(N1.supported===void 0)N1.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;const X=this.config.requestTimeout,Z=this.config.keepAlive===!0,L=this.config.credentials;if(G==null?void 0:G.aborted){const T=new Error("Request aborted");return T.name="AbortError",Promise.reject(T)}let Y=U.path;const w=MQ.buildQueryString(U.query||{});if(w)Y+=`?${w}`;if(U.fragment)Y+=`#${U.fragment}`;let Q="";if(U.username!=null||U.password!=null){const T=U.username??"",H=U.password??"";Q=`${T}:${H}@`}const{port:z,method:F}=U,R=`${U.protocol}//${Q}${U.hostname}${z?`:${z}`:""}${Y}`,J=F==="GET"||F==="HEAD"?void 0:U.body,I={body:J,headers:new Headers(U.headers),method:F,credentials:L};if((W=this.config)==null?void 0:W.cache)I.cache=this.config.cache;if(J)I.duplex="half";if(typeof AbortController!=="undefined")I.signal=G;if(N1.supported)I.keepalive=Z;if(typeof this.config.requestInit==="function")Object.assign(I,this.config.requestInit(U));let E=a(()=>{},"removeSignalEventListener");const B=new Request(R,I),V=[fetch(B).then((T)=>{const H=T.headers,A={};for(let h of H.entries())A[h[0]]=h[1];if(T.body==null)return T.blob().then((h)=>({response:new V6.HttpResponse({headers:A,reason:T.statusText,statusCode:T.status,body:h})}));return{response:new V6.HttpResponse({headers:A,reason:T.statusText,statusCode:T.status,body:T.body})}}),H6(X)];if(G)V.push(new Promise((T,H)=>{const A=a(()=>{const S=new Error("Request aborted");S.name="AbortError",H(S)},"onAbort");if(typeof G.addEventListener==="function"){const S=G;S.addEventListener("abort",A,{once:!0}),E=a(()=>S.removeEventListener("abort",A),"removeSignalEventListener")}else G.onabort=A}));return Promise.race(V).finally(E)}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return W[U]=G,W})}httpHandlerConfigs(){return this.config??{}}};a(A6,"FetchHttpHandler");var BQ=A6,EQ=f1(),VQ=a(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return O6($);return C6($)},"streamCollector");a(O6,"collectBlob");a(C6,"collectStream");a(f6,"readToBase64")});var g0=M((j6)=>{Object.defineProperty(j6,"__esModule",{value:!0});j6.isReadableStream=void 0;var TQ=($)=>{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)};j6.isReadableStream=TQ});var v6=M((h6)=>{Object.defineProperty(h6,"__esModule",{value:!0});h6.sdkStreamMixin=void 0;var HQ=N6(),AQ=f1(),OQ=b6(),CQ=G0(),S6=g0(),D6="The stream has already been transformed.",fQ=($)=>{var U,G;if(!k6($)&&!S6.isReadableStream($)){const L=((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 ${L}`)}let W=!1;const X=async()=>{if(W)throw new Error(D6);return W=!0,await HQ.streamCollector($)},Z=(L)=>{if(typeof L.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return L.stream()};return Object.assign($,{transformToByteArray:X,transformToString:async(L)=>{const Y=await X();if(L==="base64")return AQ.toBase64(Y);else if(L==="hex")return OQ.toHex(Y);else if(L===void 0||L==="utf8"||L==="utf-8")return CQ.toUtf8(Y);else if(typeof TextDecoder==="function")return new TextDecoder(L).decode(Y);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(D6);if(W=!0,k6($))return Z($);else if(S6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};h6.sdkStreamMixin=fQ;var k6=($)=>typeof Blob==="function"&&$ instanceof Blob});var _6=M((y6)=>{Object.defineProperty(y6,"__esModule",{value:!0});y6.sdkStreamMixin=void 0;var qQ=E6(),NQ=_0(),i$=import.meta.require("stream"),jQ=import.meta.require("util"),PQ=v6(),c6="The stream has already been transformed.",SQ=($)=>{var U,G;if(!($ instanceof i$.Readable))try{return PQ.sdkStreamMixin($)}catch(Z){const L=((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 ${L}`)}let W=!1;const X=async()=>{if(W)throw new Error(c6);return W=!0,await qQ.streamCollector($)};return Object.assign($,{transformToByteArray:X,transformToString:async(Z)=>{const L=await X();if(Z===void 0||Buffer.isEncoding(Z))return NQ.fromArrayBuffer(L.buffer,L.byteOffset,L.byteLength).toString(Z);else return new jQ.TextDecoder(Z).decode(L)},transformToWebStream:()=>{if(W)throw new Error(c6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof i$.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,i$.Readable.toWeb($)}})};y6.sdkStreamMixin=SQ});var p6=M((d6)=>{async function DQ($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(d6,"__esModule",{value:!0});d6.splitStream=void 0;d6.splitStream=DQ});var n6=M((s6)=>{async function hQ($){if(bQ.isReadableStream($))return kQ.splitStream($);const U=new l6.PassThrough,G=new l6.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(s6,"__esModule",{value:!0});s6.splitStream=void 0;var l6=import.meta.require("stream"),kQ=p6(),bQ=g0();s6.splitStream=hQ});var o6=M((i6)=>{async function xQ($,U){var G;let W=0;const X=[],Z=$.getReader();let L=!1;while(!L){const{done:Q,value:z}=await Z.read();if(z)X.push(z),W+=(G=z===null||z===void 0?void 0:z.byteLength)!==null&&G!==void 0?G:0;if(W>=U)break;L=Q}Z.releaseLock();const Y=new Uint8Array(Math.min(U,W));let w=0;for(let Q of X){if(Q.byteLength>Y.byteLength-w){Y.set(Q.subarray(0,Y.byteLength-w),w);break}else Y.set(Q,w);w+=Q.length}return Y}Object.defineProperty(i6,"__esModule",{value:!0});i6.headStream=void 0;i6.headStream=xQ});var $W=M((t6)=>{Object.defineProperty(t6,"__esModule",{value:!0});t6.headStream=void 0;var vQ=import.meta.require("stream"),cQ=o6(),yQ=g0(),uQ=($,U)=>{if(yQ.isReadableStream($))return cQ.headStream($,U);return new Promise((G,W)=>{const X=new a6;X.limit=U,$.pipe(X),$.on("error",(Z)=>{X.end(),W(Z)}),X.on("error",W),X.on("finish",function(){const Z=new Uint8Array(Buffer.concat(this.buffers));G(Z)})})};t6.headStream=uQ;class a6 extends vQ.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){const X=this.bytesBuffered-this.limit,Z=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=Z.subarray(0,Z.byteLength-X),this.emit("finish")}G()}}});var LW=M((r3,I0)=>{function WW($,U="utf-8"){if(U==="base64")return UW.toBase64($);return GW.toUtf8($)}function XW($,U){if(U==="base64")return o$.mutate(UW.fromBase64($));return o$.mutate(GW.fromUtf8($))}var{defineProperty:P1,getOwnPropertyDescriptor:_Q,getOwnPropertyNames:dQ}=Object,gQ=Object.prototype.hasOwnProperty,a$=($,U)=>P1($,"name",{value:U,configurable:!0}),pQ=($,U)=>{for(var G in U)P1($,G,{get:U[G],enumerable:!0})},r$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of dQ(U))if(!gQ.call($,X)&&X!==G)P1($,X,{get:()=>U[X],enumerable:!(W=_Q(U,X))||W.enumerable})}return $},p0=($,U,G)=>(r$($,U,"default"),G&&r$(G,U,"default")),lQ=($)=>r$(P1({},"__esModule",{value:!0}),$),J0={};pQ(J0,{Uint8ArrayBlobAdapter:()=>o$});I0.exports=lQ(J0);var UW=f1(),GW=G0();a$(WW,"transformToString");a$(XW,"transformFromString");var ZW=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return XW(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 WW(this,U)}};a$(ZW,"Uint8ArrayBlobAdapter");var o$=ZW;p0(J0,r4(),I0.exports);p0(J0,_6(),I0.exports);p0(J0,n6(),I0.exports);p0(J0,$W(),I0.exports);p0(J0,g0(),I0.exports)});var q0=M((o3,PW)=>{function TW($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),X=$.getUTCDate(),Z=$.getUTCHours(),L=$.getUTCMinutes(),Y=$.getUTCSeconds(),w=X<10?`0${X}`:`${X}`,Q=Z<10?`0${Z}`:`${Z}`,z=L<10?`0${L}`:`${L}`,F=Y<10?`0${Y}`:`${Y}`;return`${E7[W]}, ${w} ${wU[G]} ${U} ${Q}:${z}:${F} GMT`}function k1($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})}function QU($,U,G){let W,X,Z;if(typeof U==="undefined"&&typeof G==="undefined")W={},Z=$;else if(W=$,typeof U==="function")return X=U,Z=G,a7(W,X,Z);else Z=U;for(let L of Object.keys(Z)){if(!Array.isArray(Z[L])){W[L]=Z[L];continue}NW(W,null,Z,L)}return W}function jW($,U,G){if(G<=0||!Number.isInteger(G))throw new Error("Invalid number of delimiters ("+G+") for splitEvery.");const W=$.split(U);if(G===1)return W;const X=[];let Z="";for(let L=0;L<W.length;L++){if(Z==="")Z=W[L];else Z+=U+W[L];if((L+1)%G===0)X.push(Z),Z=""}if(Z!=="")X.push(Z);return X}var{defineProperty:b1,getOwnPropertyDescriptor:sQ,getOwnPropertyNames:mQ}=Object,nQ=Object.prototype.hasOwnProperty,K=($,U)=>b1($,"name",{value:U,configurable:!0}),iQ=($,U)=>{for(var G in U)b1($,G,{get:U[G],enumerable:!0})},rQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of mQ(U))if(!nQ.call($,X)&&X!==G)b1($,X,{get:()=>U[X],enumerable:!(W=sQ(U,X))||W.enumerable})}return $},oQ=($)=>rQ(b1({},"__esModule",{value:!0}),$),wW={};iQ(wW,{Client:()=>tQ,Command:()=>JW,LazyJsonString:()=>i7,NoOpLogger:()=>aQ,SENSITIVE_STRING:()=>U7,ServiceException:()=>v7,StringWrapper:()=>i0,_json:()=>XU,collectBody:()=>eQ,convertMap:()=>r7,createAggregatedClient:()=>G7,dateToUtcString:()=>TW,decorateServiceException:()=>AW,emitWarningIfUnsupportedVersion:()=>_7,expectBoolean:()=>X7,expectByte:()=>WU,expectFloat32:()=>S1,expectInt:()=>L7,expectInt32:()=>UU,expectLong:()=>m0,expectNonNull:()=>w7,expectNumber:()=>s0,expectObject:()=>KW,expectShort:()=>GU,expectString:()=>Q7,expectUnion:()=>z7,extendedEncodeURIComponent:()=>k1,getArrayIfSingleItem:()=>n7,getDefaultClientConfiguration:()=>s7,getDefaultExtensionConfiguration:()=>CW,getValueFromTextNode:()=>fW,handleFloat:()=>J7,limitedParseDouble:()=>YU,limitedParseFloat:()=>I7,limitedParseFloat32:()=>K7,loadConfigsForDefaultMode:()=>u7,logger:()=>n0,map:()=>QU,parseBoolean:()=>W7,parseEpochTimestamp:()=>N7,parseRfc3339DateTime:()=>T7,parseRfc3339DateTimeWithOffset:()=>A7,parseRfc7231DateTime:()=>q7,resolveDefaultRuntimeConfig:()=>m7,resolvedPath:()=>$z,serializeDateTime:()=>Gz,serializeFloat:()=>Uz,splitEvery:()=>jW,strictParseByte:()=>VW,strictParseDouble:()=>LU,strictParseFloat:()=>F7,strictParseFloat32:()=>MW,strictParseInt:()=>M7,strictParseInt32:()=>B7,strictParseLong:()=>EW,strictParseShort:()=>O0,take:()=>o7,throwDefaultError:()=>OW,withBaseException:()=>c7});PW.exports=oQ(wW);var QW=class ${trace(){}debug(){}info(){}warn(){}error(){}};K(QW,"NoOpLogger");var aQ=QW,zW=P4(),FW=class ${constructor(U){this.config=U,this.middlewareStack=zW.constructStack()}send(U,G,W){const X=typeof G!=="function"?G:void 0,Z=typeof G==="function"?G:W,L=X===void 0&&this.config.cacheMiddleware===!0;let Y;if(L){if(!this.handlers)this.handlers=new WeakMap;const w=this.handlers;if(w.has(U.constructor))Y=w.get(U.constructor);else Y=U.resolveMiddleware(this.middlewareStack,this.config,X),w.set(U.constructor,Y)}else delete this.handlers,Y=U.resolveMiddleware(this.middlewareStack,this.config,X);if(Z)Y(U).then((w)=>Z(null,w.output),(w)=>Z(w)).catch(()=>{});else return Y(U).then((w)=>w.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}};K(FW,"Client");var tQ=FW,t$=LW(),eQ=K(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return t$.Uint8ArrayBlobAdapter.mutate($);if(!$)return t$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const G=U.streamCollector($);return t$.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),$U=Q0(),RW=class ${constructor(){this.middlewareStack=zW.constructStack()}static classBuilder(){return new $7}resolveMiddlewareWithContext(U,G,W,{middlewareFn:X,clientName:Z,commandName:L,inputFilterSensitiveLog:Y,outputFilterSensitiveLog:w,smithyContext:Q,additionalContext:z,CommandCtor:F}){for(let B of X.bind(this)(F,U,G,W))this.middlewareStack.use(B);const R=U.concat(this.middlewareStack),{logger:J}=G,I={logger:J,clientName:Z,commandName:L,inputFilterSensitiveLog:Y,outputFilterSensitiveLog:w,[$U.SMITHY_CONTEXT_KEY]:{commandInstance:this,...Q},...z},{requestHandler:E}=G;return R.resolve((B)=>E.handle(B.request,W||{}),I)}};K(RW,"Command");var JW=RW,IW=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;const G=this;let W;return W=(U=class extends JW{constructor(...[X]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=X??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(X,Z,L){return this.resolveMiddlewareWithContext(X,Z,L,{CommandCtor:W,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},K(U,"CommandRef"),U)}};K(IW,"ClassBuilder");var $7=IW,U7="***SensitiveInformation***",G7=K(($,U)=>{for(let G of Object.keys($)){const W=$[G],X=K(async function(L,Y,w){const Q=new W(L);if(typeof Y==="function")this.send(Q,Y);else if(typeof w==="function"){if(typeof Y!=="object")throw new Error(`Expected http options but got ${typeof Y}`);this.send(Q,Y||{},w)}else return this.send(Q,Y)},"methodImpl"),Z=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[Z]=X}},"createAggregatedClient"),W7=K(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),X7=K(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)n0.warn(D1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")n0.warn(D1(`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"),s0=K(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))n0.warn(D1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),Z7=Math.ceil(340282346638528860000000000000000000000),S1=K(($)=>{const U=s0($);if(U!==void 0&&!Number.isNaN(U)&&U!==1/0&&U!==-1/0){if(Math.abs(U)>Z7)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),m0=K(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),L7=m0,UU=K(($)=>ZU($,32),"expectInt32"),GU=K(($)=>ZU($,16),"expectShort"),WU=K(($)=>ZU($,8),"expectByte"),ZU=K(($,U)=>{const G=m0($);if(G!==void 0&&Y7(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),Y7=K(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),w7=K(($,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"),KW=K(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;const U=Array.isArray($)?"array":typeof $;throw new TypeError(`Expected object, got ${U}: ${$}`)},"expectObject"),Q7=K(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return n0.warn(D1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),z7=K(($)=>{if($===null||$===void 0)return;const U=KW($),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"),LU=K(($)=>{if(typeof $=="string")return s0(f0($));return s0($)},"strictParseDouble"),F7=LU,MW=K(($)=>{if(typeof $=="string")return S1(f0($));return S1($)},"strictParseFloat32"),R7=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,f0=K(($)=>{const U=$.match(R7);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),YU=K(($)=>{if(typeof $=="string")return BW($);return s0($)},"limitedParseDouble"),J7=YU,I7=YU,K7=K(($)=>{if(typeof $=="string")return BW($);return S1($)},"limitedParseFloat32"),BW=K(($)=>{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"),EW=K(($)=>{if(typeof $==="string")return m0(f0($));return m0($)},"strictParseLong"),M7=EW,B7=K(($)=>{if(typeof $==="string")return UU(f0($));return UU($)},"strictParseInt32"),O0=K(($)=>{if(typeof $==="string")return GU(f0($));return GU($)},"strictParseShort"),VW=K(($)=>{if(typeof $==="string")return WU(f0($));return WU($)},"strictParseByte"),D1=K(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),n0={warn:console.warn},E7=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];K(TW,"dateToUtcString");var V7=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),T7=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=V7.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,L,Y,w,Q]=U,z=O0(C0(W)),F=i(X,"month",1,12),R=i(Z,"day",1,31);return l0(z,F,R,{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:Q})},"parseRfc3339DateTime"),H7=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),A7=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=H7.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,L,Y,w,Q,z]=U,F=O0(C0(W)),R=i(X,"month",1,12),J=i(Z,"day",1,31),I=l0(F,R,J,{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:Q});if(z.toUpperCase()!="Z")I.setTime(I.getTime()-x7(z));return I},"parseRfc3339DateTimeWithOffset"),O7=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$/),C7=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$/),f7=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})$/),q7=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=O7.exec($);if(U){const[G,W,X,Z,L,Y,w,Q]=U;return l0(O0(C0(Z)),e$(X),i(W,"day",1,31),{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:Q})}if(U=C7.exec($),U){const[G,W,X,Z,L,Y,w,Q]=U;return S7(l0(j7(Z),e$(X),i(W,"day",1,31),{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:Q}))}if(U=f7.exec($),U){const[G,W,X,Z,L,Y,w,Q]=U;return l0(O0(C0(Q)),e$(W),i(X.trimLeft(),"day",1,31),{hours:Z,minutes:L,seconds:Y,fractionalMilliseconds:w})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),N7=K(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=LU($);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"),l0=K(($,U,G,W)=>{const X=U-1;return k7($,X,G),new Date(Date.UTC($,X,G,i(W.hours,"hour",0,23),i(W.minutes,"minute",0,59),i(W.seconds,"seconds",0,60),h7(W.fractionalMilliseconds)))},"buildDate"),j7=K(($)=>{const U=new Date().getUTCFullYear(),G=Math.floor(U/100)*100+O0(C0($));if(G<U)return G+100;return G},"parseTwoDigitYear"),P7=1576800000000,S7=K(($)=>{if($.getTime()-new Date().getTime()>P7)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),e$=K(($)=>{const U=wU.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),D7=[31,28,31,30,31,30,31,31,30,31,30,31],k7=K(($,U,G)=>{let W=D7[U];if(U===1&&b7($))W=29;if(G>W)throw new TypeError(`Invalid day for ${wU[U]} in ${$}: ${G}`)},"validateDayOfMonth"),b7=K(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),i=K(($,U,G,W)=>{const X=VW(C0($));if(X<G||X>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return X},"parseDateValue"),h7=K(($)=>{if($===null||$===void 0)return 0;return MW("0."+$)*1000},"parseMilliseconds"),x7=K(($)=>{const U=$[0];let G=1;if(U=="+")G=1;else if(U=="-")G=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const W=Number($.substring(1,3)),X=Number($.substring(4,6));return G*(W*60+X)*60*1000},"parseOffsetToMilliseconds"),C0=K(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),HW=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};K(HW,"ServiceException");var v7=HW,AW=K(($,U={})=>{Object.entries(U).filter(([,W])=>W!==void 0).forEach(([W,X])=>{if($[W]==null||$[W]==="")$[W]=X});const G=$.message||$.Message||"UnknownError";return $.message=G,delete $.Message,$},"decorateServiceException"),OW=K(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{const X=y7($),Z=X.httpStatusCode?X.httpStatusCode+"":void 0,L=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||Z||"UnknownError",$fault:"client",$metadata:X});throw AW(L,U)},"throwDefaultError"),c7=K(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{OW({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),y7=K(($)=>({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"),u7=K(($)=>{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"),YW=!1,_7=K(($)=>{if($&&!YW&&parseInt($.substring(1,$.indexOf(".")))<16)YW=!0},"emitWarningIfUnsupportedVersion"),d7=K(($)=>{const U=[];for(let G in $U.AlgorithmId){const W=$U.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"),g7=K(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),p7=K(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),l7=K(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),CW=K(($)=>{return{...d7($),...p7($)}},"getDefaultExtensionConfiguration"),s7=CW,m7=K(($)=>{return{...g7($),...l7($)}},"resolveDefaultRuntimeConfig");K(k1,"extendedEncodeURIComponent");var n7=K(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),fW=K(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=fW($[G]);return $},"getValueFromTextNode"),i0=K(function(){const $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");i0.prototype=Object.create(String.prototype,{constructor:{value:i0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(i0,String);var qW=class $ extends i0{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))}};K(qW,"LazyJsonString");var i7=qW;K(QU,"map");var r7=K(($)=>{const U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),o7=K(($,U)=>{const G={};for(let W in U)NW(G,$,U,W);return G},"take"),a7=K(($,U,G)=>{return QU($,Object.entries(G).reduce((W,[X,Z])=>{if(Array.isArray(Z))W[X]=Z;else if(typeof Z==="function")W[X]=[U,Z()];else W[X]=[U,Z];return W},{}))},"mapWithFilter"),NW=K(($,U,G,W)=>{if(U!==null){let L=G[W];if(typeof L==="function")L=[,L];const[Y=t7,w=e7,Q=W]=L;if(typeof Y==="function"&&Y(U[Q])||typeof Y!=="function"&&!!Y)$[W]=w(U[Q]);return}let[X,Z]=G[W];if(typeof Z==="function"){let L;const Y=X===void 0&&(L=Z())!=null,w=typeof X==="function"&&!!X(void 0)||typeof X!=="function"&&!!X;if(Y)$[W]=L;else if(w)$[W]=Z()}else{const L=X===void 0&&Z!=null,Y=typeof X==="function"&&!!X(Z)||typeof X!=="function"&&!!X;if(L||Y)$[W]=Z}},"applyInstruction"),t7=K(($)=>$!=null,"nonNullish"),e7=K(($)=>$,"pass"),$z=K(($,U,G,W,X,Z)=>{if(U!=null&&U[G]!==void 0){const L=W();if(L.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(X,Z?L.split("/").map((Y)=>k1(Y)).join("/"):k1(L))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),Uz=K(($)=>{if($!==$)return"NaN";switch($){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return $}},"serializeFloat"),Gz=K(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),XU=K(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(XU);if(typeof $==="object"){const U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=XU($[G])}return U}return $},"_json");K(jW,"splitEvery")});var kW=M((SW)=>{Object.defineProperty(SW,"__esModule",{value:!0});SW.isStreamingPayload=void 0;var Wz=import.meta.require("stream"),Xz=($)=>($===null||$===void 0?void 0:$.body)instanceof Wz.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;SW.isStreamingPayload=Xz});var oW=M((e3,rW)=>{var{defineProperty:h1,getOwnPropertyDescriptor:Zz,getOwnPropertyNames:Lz}=Object,Yz=Object.prototype.hasOwnProperty,P=($,U)=>h1($,"name",{value:U,configurable:!0}),wz=($,U)=>{for(var G in U)h1($,G,{get:U[G],enumerable:!0})},Qz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Lz(U))if(!Yz.call($,X)&&X!==G)h1($,X,{get:()=>U[X],enumerable:!(W=Zz(U,X))||W.enumerable})}return $},zz=($)=>Qz(h1({},"__esModule",{value:!0}),$),hW={};wz(hW,{AdaptiveRetryStrategy:()=>Jz,CONFIG_MAX_ATTEMPTS:()=>FU,CONFIG_RETRY_MODE:()=>pW,ENV_MAX_ATTEMPTS:()=>zU,ENV_RETRY_MODE:()=>gW,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>Iz,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>Mz,StandardRetryStrategy:()=>_W,defaultDelayDecider:()=>vW,defaultRetryDecider:()=>cW,getOmitRetryHeadersPlugin:()=>Bz,getRetryAfterHint:()=>iW,getRetryPlugin:()=>Oz,omitRetryHeadersMiddleware:()=>lW,omitRetryHeadersMiddlewareOptions:()=>sW,resolveRetryConfig:()=>Kz,retryMiddleware:()=>mW,retryMiddlewareOptions:()=>nW});rW.exports=zz(hW);var N0=o(),xW=M$(),q=C4(),Fz=P(($,U)=>{const G=$,W=(U==null?void 0:U.noRetryIncrement)??q.NO_RETRY_INCREMENT,X=(U==null?void 0:U.retryCost)??q.RETRY_COST,Z=(U==null?void 0:U.timeoutRetryCost)??q.TIMEOUT_RETRY_COST;let L=$;const Y=P((F)=>F.name==="TimeoutError"?Z:X,"getCapacityAmount"),w=P((F)=>Y(F)<=L,"hasRetryTokens");return Object.freeze({hasRetryTokens:w,retrieveRetryTokens:P((F)=>{if(!w(F))throw new Error("No retry token available");const R=Y(F);return L-=R,R},"retrieveRetryTokens"),releaseRetryTokens:P((F)=>{L+=F??W,L=Math.min(L,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),vW=P(($,U)=>Math.floor(Math.min(q.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),W0=k$(),cW=P(($)=>{if(!$)return!1;return W0.isRetryableByTrait($)||W0.isClockSkewError($)||W0.isThrottlingError($)||W0.isTransientError($)},"defaultRetryDecider"),yW=P(($)=>{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"),uW=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=q.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??cW,this.delayDecider=(G==null?void 0:G.delayDecider)??vW,this.retryQuota=(G==null?void 0:G.retryQuota)??Fz(q.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=q.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,W){let X,Z=0,L=0;const Y=await this.getMaxAttempts(),{request:w}=G;if(N0.HttpRequest.isInstance(w))w.headers[q.INVOCATION_ID_HEADER]=xW.v4();while(!0)try{if(N0.HttpRequest.isInstance(w))w.headers[q.REQUEST_HEADER]=`attempt=${Z+1}; max=${Y}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();const{response:Q,output:z}=await U(G);if(W==null?void 0:W.afterRequest)W.afterRequest(Q);return this.retryQuota.releaseRetryTokens(X),z.$metadata.attempts=Z+1,z.$metadata.totalRetryDelay=L,{response:Q,output:z}}catch(Q){const z=yW(Q);if(Z++,this.shouldRetry(z,Z,Y)){X=this.retryQuota.retrieveRetryTokens(z);const F=this.delayDecider(W0.isThrottlingError(z)?q.THROTTLING_RETRY_DELAY_BASE:q.DEFAULT_RETRY_DELAY_BASE,Z),R=Rz(z.$response),J=Math.max(R||0,F);L+=J,await new Promise((I)=>setTimeout(I,J));continue}if(!z.$metadata)z.$metadata={};throw z.$metadata.attempts=Z,z.$metadata.totalRetryDelay=L,z}}};P(uW,"StandardRetryStrategy");var _W=uW,Rz=P(($)=>{if(!N0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return W*1000;return new Date(G).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),dW=class $ extends _W{constructor(U,G){const{rateLimiter:W,...X}=G??{};super(U,X);this.rateLimiter=W??new q.DefaultRateLimiter,this.mode=q.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};P(dW,"AdaptiveRetryStrategy");var Jz=dW,bW=x0(),zU="AWS_MAX_ATTEMPTS",FU="max_attempts",Iz={environmentVariableSelector:($)=>{const U=$[zU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${zU} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[FU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${FU} mast be a number, got "${U}"`);return G},default:q.DEFAULT_MAX_ATTEMPTS},Kz=P(($)=>{const{retryStrategy:U}=$,G=bW.normalizeProvider($.maxAttempts??q.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await bW.normalizeProvider($.retryMode)()===q.RETRY_MODES.ADAPTIVE)return new q.AdaptiveRetryStrategy(G);return new q.StandardRetryStrategy(G)}}},"resolveRetryConfig"),gW="AWS_RETRY_MODE",pW="retry_mode",Mz={environmentVariableSelector:($)=>$[gW],configFileSelector:($)=>$[pW],default:q.DEFAULT_RETRY_MODE},lW=P(()=>($)=>async(U)=>{const{request:G}=U;if(N0.HttpRequest.isInstance(G))delete G.headers[q.INVOCATION_ID_HEADER],delete G.headers[q.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),sW={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},Bz=P(($)=>({applyToStack:(U)=>{U.addRelativeTo(lW(),sW)}}),"getOmitRetryHeadersPlugin"),Ez=q0(),Vz=kW(),mW=P(($)=>(U,G)=>async(W)=>{var X;let Z=await $.retryStrategy();const L=await $.maxAttempts();if(Tz(Z)){Z=Z;let Y=await Z.acquireInitialRetryToken(G.partition_id),w=new Error,Q=0,z=0;const{request:F}=W,R=N0.HttpRequest.isInstance(F);if(R)F.headers[q.INVOCATION_ID_HEADER]=xW.v4();while(!0)try{if(R)F.headers[q.REQUEST_HEADER]=`attempt=${Q+1}; max=${L}`;const{response:J,output:I}=await U(W);return Z.recordSuccess(Y),I.$metadata.attempts=Q+1,I.$metadata.totalRetryDelay=z,{response:J,output:I}}catch(J){const I=Hz(J);if(w=yW(J),R&&Vz.isStreamingPayload(F))throw(X=G.logger instanceof Ez.NoOpLogger?console:G.logger)==null||X.warn("An error was encountered in a non-retryable streaming request."),w;try{Y=await Z.refreshRetryTokenForRetry(Y,I)}catch(B){if(!w.$metadata)w.$metadata={};throw w.$metadata.attempts=Q+1,w.$metadata.totalRetryDelay=z,w}Q=Y.getRetryCount();const E=Y.getRetryDelay();z+=E,await new Promise((B)=>setTimeout(B,E))}}else{if(Z=Z,Z==null?void 0:Z.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",Z.mode]];return Z.retry(U,W)}},"retryMiddleware"),Tz=P(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),Hz=P(($)=>{const U={error:$,errorType:Az($)},G=iW($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),Az=P(($)=>{if(W0.isThrottlingError($))return"THROTTLING";if(W0.isTransientError($))return"TRANSIENT";if(W0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),nW={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Oz=P(($)=>({applyToStack:(U)=>{U.add(mW($),nW)}}),"getRetryPlugin"),iW=P(($)=>{if(!N0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)},"getRetryAfterHint")});var JU=M(($K,KX)=>{function eW($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U}function FX($,U){return new JX($,U)}function IX($,U,G,W,X){return f(async function*Z(L,Y,...w){let Q=L.startingToken||void 0,z=!0,F;while(z){if(Y[G]=Q,X)Y[X]=Y[X]??L.pageSize;if(L.client instanceof $)F=await nz(U,L.client,Y,...w);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield F;const R=Q;Q=iz(F,W),z=!!(Q&&(!L.stopOnSameToken||Q!==R))}return},"paginateOperation")}var{defineProperty:v1,getOwnPropertyDescriptor:Cz,getOwnPropertyNames:fz}=Object,qz=Object.prototype.hasOwnProperty,f=($,U)=>v1($,"name",{value:U,configurable:!0}),Nz=($,U)=>{for(var G in U)v1($,G,{get:U[G],enumerable:!0})},jz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of fz(U))if(!qz.call($,X)&&X!==G)v1($,X,{get:()=>U[X],enumerable:!(W=Cz(U,X))||W.enumerable})}return $},Pz=($)=>jz(v1({},"__esModule",{value:!0}),$),aW={};Nz(aW,{DefaultIdentityProviderConfig:()=>yz,EXPIRATION_MS:()=>QX,HttpApiKeyAuthSigner:()=>uz,HttpBearerAuthSigner:()=>_z,NoAuthSigner:()=>dz,RequestBuilder:()=>JX,createIsIdentityExpiredFunction:()=>wX,createPaginator:()=>IX,doesIdentityRequireRefresh:()=>zX,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Dz,getHttpAuthSchemePlugin:()=>bz,getHttpSigningPlugin:()=>cz,getSmithyContext:()=>lz,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>$X,httpAuthSchemeMiddleware:()=>RU,httpAuthSchemeMiddlewareOptions:()=>UX,httpSigningMiddleware:()=>GX,httpSigningMiddlewareOptions:()=>WX,isIdentityExpired:()=>gz,memoizeIdentityProvider:()=>pz,normalizeProvider:()=>sz,requestBuilder:()=>FX});KX.exports=Pz(aW);var tW=x0();f(eW,"convertHttpAuthSchemesToMap");var RU=f(($,U)=>(G,W)=>async(X)=>{var Z;const L=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,X.input)),Y=eW($.httpAuthSchemes),w=tW.getSmithyContext(W),Q=[];for(let z of L){const F=Y.get(z.schemeId);if(!F){Q.push(`HttpAuthScheme \`${z.schemeId}\` was not enabled for this service.`);continue}const R=F.identityProvider(await U.identityProviderConfigProvider($));if(!R){Q.push(`HttpAuthScheme \`${z.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:J={},signingProperties:I={}}=((Z=z.propertiesExtractor)==null?void 0:Z.call(z,$,W))||{};z.identityProperties=Object.assign(z.identityProperties||{},J),z.signingProperties=Object.assign(z.signingProperties||{},I),w.selectedHttpAuthScheme={httpAuthOption:z,identity:await R(z.identityProperties),signer:F.signer};break}if(!w.selectedHttpAuthScheme)throw new Error(Q.join("\n"));return G(X)},"httpAuthSchemeMiddleware"),Sz=a8(),$X={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Sz.endpointMiddlewareOptions.name},Dz=f(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(RU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),$X)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),kz=S$(),UX={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:kz.serializerMiddlewareOption.name},bz=f(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(RU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),UX)}}),"getHttpAuthSchemePlugin"),c1=o(),hz=f(($)=>(U)=>{throw U},"defaultErrorHandler"),xz=f(($,U)=>{},"defaultSuccessHandler"),GX=f(($)=>(U,G)=>async(W)=>{if(!c1.HttpRequest.isInstance(W.request))return U(W);const Z=tW.getSmithyContext(G).selectedHttpAuthScheme;if(!Z)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:L={}},identity:Y,signer:w}=Z,Q=await U({...W,request:await w.sign(W.request,Y,L)}).catch((w.errorHandler||hz)(L));return(w.successHandler||xz)(Q.response,L),Q},"httpSigningMiddleware"),vz=oW(),WX={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:vz.retryMiddlewareOptions.name},cz=f(($)=>({applyToStack:(U)=>{U.addRelativeTo(GX($),WX)}}),"getHttpSigningPlugin"),XX=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(XX,"DefaultIdentityProviderConfig");var yz=XX,x1=Q0(),ZX=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");const X=c1.HttpRequest.clone(U);if(W.in===x1.HttpApiKeyAuthLocation.QUERY)X.query[W.name]=G.apiKey;else if(W.in===x1.HttpApiKeyAuthLocation.HEADER)X.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 X}};f(ZX,"HttpApiKeyAuthSigner");var uz=ZX,LX=class ${async sign(U,G,W){const X=c1.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return X.headers.Authorization=`Bearer ${G.token}`,X}};f(LX,"HttpBearerAuthSigner");var _z=LX,YX=class ${async sign(U,G,W){return U}};f(YX,"NoAuthSigner");var dz=YX,wX=f(($)=>(U)=>zX(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),QX=300000,gz=wX(QX),zX=f(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),pz=f(($,U,G)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let X,Z,L,Y=!1;const w=f(async(Q)=>{if(!Z)Z=W(Q);try{X=await Z,L=!0,Y=!1}finally{Z=void 0}return X},"coalesceProvider");if(U===void 0)return async(Q)=>{if(!L||(Q==null?void 0:Q.forceRefresh))X=await w(Q);return X};return async(Q)=>{if(!L||(Q==null?void 0:Q.forceRefresh))X=await w(Q);if(Y)return X;if(!G(X))return Y=!0,X;if(U(X))return await w(Q),X;return X}},"memoizeIdentityProvider"),lz=f(($)=>$[x1.SMITHY_CONTEXT_KEY]||($[x1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),sz=f(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),mz=q0();f(FX,"requestBuilder");var RX=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(){const{hostname:U,protocol:G="https",port:W,path:X}=await this.context.endpoint();this.path=X;for(let Z of this.resolvePathStack)Z(this.path);return new c1.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,X){return this.resolvePathStack.push((Z)=>{this.path=mz.resolvedPath(Z,this.input,U,G,W,X)}),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(RX,"RequestBuilder");var JX=RX,nz=f(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");f(IX,"createPaginator");var iz=f(($,U)=>{let G=$;const W=U.split(".");for(let X of W){if(!G||typeof G!=="object")return;G=G[X]}return G},"get")});var zZ=M((AH,QZ)=>{var{defineProperty:$$,getOwnPropertyDescriptor:PF,getOwnPropertyNames:SF}=Object,DF=Object.prototype.hasOwnProperty,kF=($,U)=>$$($,"name",{value:U,configurable:!0}),bF=($,U)=>{for(var G in U)$$($,G,{get:U[G],enumerable:!0})},hF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of SF(U))if(!DF.call($,X)&&X!==G)$$($,X,{get:()=>U[X],enumerable:!(W=PF(U,X))||W.enumerable})}return $},xF=($)=>hF($$({},"__esModule",{value:!0}),$),wZ={};bF(wZ,{emitWarningIfUnsupportedVersion:()=>vF});QZ.exports=xF(wZ);var YZ=!1,vF=kF(($)=>{if($&&!YZ&&parseInt($.substring(1,$.indexOf(".")))<18)YZ=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
4
|
+
no longer support Node.js 16.x on January 6, 2025.
|
|
5
|
+
|
|
6
|
+
To continue receiving updates to AWS services, bug fixes, and security
|
|
7
|
+
updates please upgrade to a supported Node.js LTS version.
|
|
8
|
+
|
|
9
|
+
More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var SZ=M((OH,PZ)=>{function yU($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break}var{defineProperty:L$,getOwnPropertyDescriptor:cF,getOwnPropertyNames:yF}=Object,uF=Object.prototype.hasOwnProperty,D=($,U)=>L$($,"name",{value:U,configurable:!0}),_F=($,U)=>{for(var G in U)L$($,G,{get:U[G],enumerable:!0})},dF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of yF(U))if(!uF.call($,X)&&X!==G)L$($,X,{get:()=>U[X],enumerable:!(W=cF(U,X))||W.enumerable})}return $},gF=($)=>dF(L$({},"__esModule",{value:!0}),$),KZ={};_F(KZ,{SignatureV4:()=>IR,clearCredentialCache:()=>ZR,createScope:()=>W$,getCanonicalHeaders:()=>cU,getCanonicalQuery:()=>OZ,getPayloadHash:()=>Z$,getSigningKey:()=>AZ,moveHeadersToQuery:()=>NZ,prepareRequest:()=>uU});PZ.exports=gF(KZ);var FZ=x0(),hU=G0(),pF="X-Amz-Algorithm",lF="X-Amz-Credential",MZ="X-Amz-Date",sF="X-Amz-SignedHeaders",mF="X-Amz-Expires",BZ="X-Amz-Signature",EZ="X-Amz-Security-Token",VZ="authorization",TZ=MZ.toLowerCase(),nF="date",iF=[VZ,TZ,nF],rF=BZ.toLowerCase(),vU="x-amz-content-sha256",oF=EZ.toLowerCase(),aF={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},tF=/^proxy-/,eF=/^sec-/,xU="AWS4-HMAC-SHA256",$R="AWS4-HMAC-SHA256-PAYLOAD",UR="UNSIGNED-PAYLOAD",GR=50,HZ="aws4_request",WR=604800,L0=b6(),XR=G0(),k0={},G$=[],W$=D(($,U,G)=>`${$}/${U}/${G}/${HZ}`,"createScope"),AZ=D(async($,U,G,W,X)=>{const Z=await RZ($,U.secretAccessKey,U.accessKeyId),L=`${G}:${W}:${X}:${L0.toHex(Z)}:${U.sessionToken}`;if(L in k0)return k0[L];G$.push(L);while(G$.length>GR)delete k0[G$.shift()];let Y=`AWS4${U.secretAccessKey}`;for(let w of[G,W,X,HZ])Y=await RZ($,Y,w);return k0[L]=Y},"getSigningKey"),ZR=D(()=>{G$.length=0,Object.keys(k0).forEach(($)=>{delete k0[$]})},"clearCredentialCache"),RZ=D(($,U,G)=>{const W=new $(U);return W.update(XR.toUint8Array(G)),W.digest()},"hmac"),cU=D(({headers:$},U,G)=>{const W={};for(let X of Object.keys($).sort()){if($[X]==null)continue;const Z=X.toLowerCase();if(Z in aF||(U==null?void 0:U.has(Z))||tF.test(Z)||eF.test(Z)){if(!G||G&&!G.has(Z))continue}W[Z]=$[X].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),X$=o4(),OZ=D(({query:$={}})=>{const U=[],G={};for(let W of Object.keys($)){if(W.toLowerCase()===rF)continue;const X=X$.escapeUri(W);U.push(X);const Z=$[W];if(typeof Z==="string")G[X]=`${X}=${X$.escapeUri(Z)}`;else if(Array.isArray(Z))G[X]=Z.slice(0).reduce((L,Y)=>L.concat([`${X}=${X$.escapeUri(Y)}`]),[]).sort().join("&")}return U.sort().map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),LR=y$(),YR=G0(),Z$=D(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)||LR.isArrayBuffer(U)){const W=new G;return W.update(YR.toUint8Array(U)),L0.toHex(await W.digest())}return UR},"getPayloadHash"),JZ=G0(),CZ=class ${format(U){const G=[];for(let Z of Object.keys(U)){const L=JZ.fromUtf8(Z);G.push(Uint8Array.from([L.byteLength]),L,this.formatHeaderValue(U[Z]))}const W=new Uint8Array(G.reduce((Z,L)=>Z+L.byteLength,0));let X=0;for(let Z of G)W.set(Z,X),X+=Z.byteLength;return W}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":const G=new DataView(new ArrayBuffer(3));return G.setUint8(0,3),G.setInt16(1,U.value,!1),new Uint8Array(G.buffer);case"integer":const W=new DataView(new ArrayBuffer(5));return W.setUint8(0,4),W.setInt32(1,U.value,!1),new Uint8Array(W.buffer);case"long":const X=new Uint8Array(9);return X[0]=5,X.set(U.value.bytes,1),X;case"binary":const Z=new DataView(new ArrayBuffer(3+U.value.byteLength));Z.setUint8(0,6),Z.setUint16(1,U.value.byteLength,!1);const L=new Uint8Array(Z.buffer);return L.set(U.value,3),L;case"string":const Y=JZ.fromUtf8(U.value),w=new DataView(new ArrayBuffer(3+Y.byteLength));w.setUint8(0,7),w.setUint16(1,Y.byteLength,!1);const Q=new Uint8Array(w.buffer);return Q.set(Y,3),Q;case"timestamp":const z=new Uint8Array(9);return z[0]=8,z.set(zR.fromNumber(U.value.valueOf()).bytes,1),z;case"uuid":if(!QR.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const F=new Uint8Array(17);return F[0]=9,F.set(L0.fromHex(U.value.replace(/\-/g,"")),1),F}}};D(CZ,"HeaderFormatter");var wR=CZ,QR=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,fZ=class ${constructor(U){if(this.bytes=U,U.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(U){if(U>9223372036854776000||U<-9223372036854776000)throw new Error(`${U} is too large (or, if negative, too small) to represent as an Int64`);const G=new Uint8Array(8);for(let W=7,X=Math.abs(Math.round(U));W>-1&&X>0;W--,X/=256)G[W]=X;if(U<0)yU(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)yU(U);return parseInt(L0.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};D(fZ,"Int64");var zR=fZ;D(yU,"negate");var FR=D(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),qZ=o(),NZ=D(($,U={})=>{var G;const{headers:W,query:X={}}=qZ.HttpRequest.clone($);for(let Z of Object.keys(W)){const L=Z.toLowerCase();if(L.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(L)))X[Z]=W[Z],delete W[Z]}return{...$,headers:W,query:X}},"moveHeadersToQuery"),uU=D(($)=>{$=qZ.HttpRequest.clone($);for(let U of Object.keys($.headers))if(iF.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),RR=D(($)=>JR($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),JR=D(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),jZ=class ${constructor({applyChecksum:U,credentials:G,region:W,service:X,sha256:Z,uriEscapePath:L=!0}){this.headerFormatter=new wR,this.service=X,this.sha256=Z,this.uriEscapePath=L,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=FZ.normalizeProvider(W),this.credentialProvider=FZ.normalizeProvider(G)}async presign(U,G={}){const{signingDate:W=new Date,expiresIn:X=3600,unsignableHeaders:Z,unhoistableHeaders:L,signableHeaders:Y,signingRegion:w,signingService:Q}=G,z=await this.credentialProvider();this.validateResolvedCredentials(z);const F=w??await this.regionProvider(),{longDate:R,shortDate:J}=U$(W);if(X>WR)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const I=W$(J,F,Q??this.service),E=NZ(uU(U),{unhoistableHeaders:L});if(z.sessionToken)E.query[EZ]=z.sessionToken;E.query[pF]=xU,E.query[lF]=`${z.accessKeyId}/${I}`,E.query[MZ]=R,E.query[mF]=X.toString(10);const B=cU(E,Z,Y);return E.query[sF]=IZ(B),E.query[BZ]=await this.getSignature(R,I,this.getSigningKey(z,F,J,Q),this.createCanonicalRequest(E,B,await Z$(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:X,signingRegion:Z,signingService:L}){const Y=Z??await this.regionProvider(),{shortDate:w,longDate:Q}=U$(W),z=W$(w,Y,L??this.service),F=await Z$({headers:{},body:G},this.sha256),R=new this.sha256;R.update(U);const J=L0.toHex(await R.digest()),I=[$R,Q,z,X,J,F].join("\n");return this.signString(I,{signingDate:W,signingRegion:Y,signingService:L})}async signMessage(U,{signingDate:G=new Date,signingRegion:W,signingService:X}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:W,signingService:X,priorSignature:U.priorSignature}).then((L)=>{return{message:U.message,signature:L}})}async signString(U,{signingDate:G=new Date,signingRegion:W,signingService:X}={}){const Z=await this.credentialProvider();this.validateResolvedCredentials(Z);const L=W??await this.regionProvider(),{shortDate:Y}=U$(G),w=new this.sha256(await this.getSigningKey(Z,L,Y,X));return w.update(hU.toUint8Array(U)),L0.toHex(await w.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:X,signingRegion:Z,signingService:L}={}){const Y=await this.credentialProvider();this.validateResolvedCredentials(Y);const w=Z??await this.regionProvider(),Q=uU(U),{longDate:z,shortDate:F}=U$(G),R=W$(F,w,L??this.service);if(Q.headers[TZ]=z,Y.sessionToken)Q.headers[oF]=Y.sessionToken;const J=await Z$(Q,this.sha256);if(!FR(vU,Q.headers)&&this.applyChecksum)Q.headers[vU]=J;const I=cU(Q,X,W),E=await this.getSignature(z,R,this.getSigningKey(Y,w,F,L),this.createCanonicalRequest(Q,I,J));return Q.headers[VZ]=`${xU} Credential=${Y.accessKeyId}/${R}, SignedHeaders=${IZ(I)}, Signature=${E}`,Q}createCanonicalRequest(U,G,W){const X=Object.keys(G).sort();return`${U.method}
|
|
10
|
+
${this.getCanonicalPath(U)}
|
|
11
|
+
${OZ(U)}
|
|
12
|
+
${X.map((Z)=>`${Z}:${G[Z]}`).join("\n")}
|
|
13
|
+
|
|
14
|
+
${X.join(";")}
|
|
15
|
+
${W}`}async createStringToSign(U,G,W){const X=new this.sha256;X.update(hU.toUint8Array(W));const Z=await X.digest();return`${xU}
|
|
16
|
+
${U}
|
|
17
|
+
${G}
|
|
18
|
+
${L0.toHex(Z)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const G=[];for(let Z of U.split("/")){if((Z==null?void 0:Z.length)===0)continue;if(Z===".")continue;if(Z==="..")G.pop();else G.push(Z)}const W=`${(U==null?void 0:U.startsWith("/"))?"/":""}${G.join("/")}${G.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return X$.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,G,W,X){const Z=await this.createStringToSign(U,G,X),L=new this.sha256(await W);return L.update(hU.toUint8Array(Z)),L0.toHex(await L.digest())}getSigningKey(U,G,W,X){return AZ(this.sha256,U,W,G,X||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")}};D(jZ,"SignatureV4");var IR=jZ,U$=D(($)=>{const U=RR($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),IZ=D(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var _Z=M((CH,uZ)=>{var{defineProperty:Y$,getOwnPropertyDescriptor:KR,getOwnPropertyNames:MR}=Object,BR=Object.prototype.hasOwnProperty,x=($,U)=>Y$($,"name",{value:U,configurable:!0}),ER=($,U)=>{for(var G in U)Y$($,G,{get:U[G],enumerable:!0})},VR=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of MR(U))if(!BR.call($,X)&&X!==G)Y$($,X,{get:()=>U[X],enumerable:!(W=KR(U,X))||W.enumerable})}return $},TR=($)=>VR(Y$({},"__esModule",{value:!0}),$),xZ={};ER(xZ,{AWSSDKSigV4Signer:()=>CR,AwsSdkSigV4ASigner:()=>qR,AwsSdkSigV4Signer:()=>gU,NODE_SIGV4A_CONFIG_OPTIONS:()=>PR,resolveAWSSDKSigV4Config:()=>SR,resolveAwsSdkSigV4AConfig:()=>jR,resolveAwsSdkSigV4Config:()=>yZ,validateSigningProperties:()=>dU});uZ.exports=TR(xZ);var HR=o(),AR=o(),DZ=x(($)=>{var U,G;return AR.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),_U=x(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),OR=x(($,U)=>Math.abs(_U(U).getTime()-$)>=300000,"isClockSkewed"),kZ=x(($,U)=>{const G=Date.parse($);if(OR(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),e0=x(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),dU=x(async($)=>{var U,G,W;const X=e0("context",$.context),Z=e0("config",$.config),L=(W=(G=(U=X.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:W[0],w=await e0("signer",Z.signer)(L),Q=$==null?void 0:$.signingRegion,z=$==null?void 0:$.signingRegionSet,F=$==null?void 0:$.signingName;return{config:Z,signer:w,signingRegion:Q,signingRegionSet:z,signingName:F}},"validateSigningProperties"),vZ=class ${async sign(U,G,W){var X;if(!HR.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const Z=await dU(W),{config:L,signer:Y}=Z;let{signingRegion:w,signingName:Q}=Z;const z=W.context;if(((X=z==null?void 0:z.authSchemes)==null?void 0:X.length)??0>1){const[R,J]=z.authSchemes;if((R==null?void 0:R.name)==="sigv4a"&&(J==null?void 0:J.name)==="sigv4")w=(J==null?void 0:J.signingRegion)??w,Q=(J==null?void 0:J.signingName)??Q}return await Y.sign(U,{signingDate:_U(L.systemClockOffset),signingRegion:w,signingService:Q})}errorHandler(U){return(G)=>{const W=G.ServerTime??DZ(G.$response);if(W){const X=e0("config",U.config),Z=X.systemClockOffset;if(X.systemClockOffset=kZ(W,X.systemClockOffset),X.systemClockOffset!==Z&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const W=DZ(U);if(W){const X=e0("config",G.config);X.systemClockOffset=kZ(W,X.systemClockOffset)}}};x(vZ,"AwsSdkSigV4Signer");var gU=vZ,CR=gU,fR=o(),cZ=class $ extends gU{async sign(U,G,W){var X;if(!fR.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:Z,signer:L,signingRegion:Y,signingRegionSet:w,signingName:Q}=await dU(W),F=(await((X=Z.sigv4aSigningRegionSet)==null?void 0:X.call(Z))??w??[Y]).join(",");return await L.sign(U,{signingDate:_U(Z.systemClockOffset),signingRegion:F,signingService:Q})}};x(cZ,"AwsSdkSigV4ASigner");var qR=cZ,NR=JU(),bZ=E$(),jR=x(($)=>{return $.sigv4aSigningRegionSet=NR.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),PR={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new bZ.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 bZ.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},E0=JU(),hZ=SZ(),yZ=x(($)=>{let U;if($.credentials)U=E0.memoizeIdentityProvider($.credentials,E0.isIdentityExpired,E0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=E0.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=x(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:G=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:X}=$;let Z;if($.signer)Z=E0.normalizeProvider($.signer);else if($.regionInfoProvider)Z=x(()=>E0.normalizeProvider($.region)().then(async(L)=>[await $.regionInfoProvider(L,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},L]).then(([L,Y])=>{const{signingRegion:w,signingService:Q}=L;$.signingRegion=$.signingRegion||w||Y,$.signingName=$.signingName||Q||$.serviceId;const z={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||hZ.SignatureV4)(z)}),"signer");else Z=x(async(L)=>{L=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await E0.normalizeProvider($.region)(),properties:{}},L);const{signingRegion:Y,signingName:w}=L;$.signingRegion=$.signingRegion||Y,$.signingName=$.signingName||w||$.serviceId;const Q={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||hZ.SignatureV4)(Q)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:Z}},"resolveAwsSdkSigV4Config"),SR=yZ});var w$=M((xR)=>{var DR=":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",dZ="[: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]["+DR+"]*",kR=new RegExp("^"+dZ+"$"),bR=function($,U){const G=[];let W=U.exec($);while(W){const X=[];X.startIndex=U.lastIndex-W[0].length;const Z=W.length;for(let L=0;L<Z;L++)X.push(W[L]);G.push(X),W=U.exec($)}return G},hR=function($){const U=kR.exec($);return!(U===null||typeof U==="undefined")};xR.isExist=function($){return typeof $!=="undefined"};xR.isEmptyObject=function($){return Object.keys($).length===0};xR.merge=function($,U,G){if(U){const W=Object.keys(U),X=W.length;for(let Z=0;Z<X;Z++)if(G==="strict")$[W[Z]]=[U[W[Z]]];else $[W[Z]]=U[W[Z]]}};xR.getValue=function($){if(xR.isExist($))return $;else return""};xR.isName=hR;xR.getAllMatches=bR;xR.nameRegexp=dZ});var lU=M((aR)=>{function pZ($){return $===" "||$==="\t"||$==="\n"||$==="\r"}function lZ($,U){const G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const W=$.substr(G,U-G);if(U>5&&W==="xml")return j("InvalidXml","XML declaration allowed only at the start of the document.",b($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U}function sZ($,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}function sR($,U){let G="",W="",X=!1;for(;U<$.length;U++){if($[U]===pR||$[U]===lR)if(W==="")W=$[U];else if(W!==$[U]);else W="";else if($[U]===">"){if(W===""){X=!0;break}}G+=$[U]}if(W!=="")return!1;return{value:G,index:U,tagClosed:X}}function mZ($,U){const G=pU.getAllMatches($,mR),W={};for(let X=0;X<G.length;X++){if(G[X][1].length===0)return j("InvalidAttr","Attribute '"+G[X][2]+"' has no space in starting.",$1(G[X]));else if(G[X][3]!==void 0&&G[X][4]===void 0)return j("InvalidAttr","Attribute '"+G[X][2]+"' is without value.",$1(G[X]));else if(G[X][3]===void 0&&!U.allowBooleanAttributes)return j("InvalidAttr","boolean attribute '"+G[X][2]+"' is not allowed.",$1(G[X]));const Z=G[X][2];if(!rR(Z))return j("InvalidAttr","Attribute '"+Z+"' is an invalid name.",$1(G[X]));if(!W.hasOwnProperty(Z))W[Z]=1;else return j("InvalidAttr","Attribute '"+Z+"' is repeated.",$1(G[X]))}return!0}function nR($,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 iR($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,nR($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U}function j($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}}function rR($){return pU.isName($)}function oR($){return pU.isName($)}function b($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}}function $1($){return $.startIndex+$[1].length}var pU=w$(),gR={allowBooleanAttributes:!1,unpairedTags:[]};aR.validate=function($,U){U=Object.assign({},gR,U);const G=[];let W=!1,X=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let Z=0;Z<$.length;Z++)if($[Z]==="<"&&$[Z+1]==="?"){if(Z+=2,Z=lZ($,Z),Z.err)return Z}else if($[Z]==="<"){let L=Z;if(Z++,$[Z]==="!"){Z=sZ($,Z);continue}else{let Y=!1;if($[Z]==="/")Y=!0,Z++;let w="";for(;Z<$.length&&$[Z]!==">"&&$[Z]!==" "&&$[Z]!=="\t"&&$[Z]!=="\n"&&$[Z]!=="\r";Z++)w+=$[Z];if(w=w.trim(),w[w.length-1]==="/")w=w.substring(0,w.length-1),Z--;if(!oR(w)){let F;if(w.trim().length===0)F="Invalid space after '<'.";else F="Tag '"+w+"' is an invalid name.";return j("InvalidTag",F,b($,Z))}const Q=sR($,Z);if(Q===!1)return j("InvalidAttr","Attributes for '"+w+"' have open quote.",b($,Z));let z=Q.value;if(Z=Q.index,z[z.length-1]==="/"){const F=Z-z.length;z=z.substring(0,z.length-1);const R=mZ(z,U);if(R===!0)W=!0;else return j(R.err.code,R.err.msg,b($,F+R.err.line))}else if(Y)if(!Q.tagClosed)return j("InvalidTag","Closing tag '"+w+"' doesn't have proper closing.",b($,Z));else if(z.trim().length>0)return j("InvalidTag","Closing tag '"+w+"' can't have attributes or invalid starting.",b($,L));else if(G.length===0)return j("InvalidTag","Closing tag '"+w+"' has not been opened.",b($,L));else{const F=G.pop();if(w!==F.tagName){let R=b($,F.tagStartPos);return j("InvalidTag","Expected closing tag '"+F.tagName+"' (opened in line "+R.line+", col "+R.col+") instead of closing tag '"+w+"'.",b($,L))}if(G.length==0)X=!0}else{const F=mZ(z,U);if(F!==!0)return j(F.err.code,F.err.msg,b($,Z-z.length+F.err.line));if(X===!0)return j("InvalidXml","Multiple possible root nodes found.",b($,Z));else if(U.unpairedTags.indexOf(w)!==-1);else G.push({tagName:w,tagStartPos:L});W=!0}for(Z++;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="!"){Z++,Z=sZ($,Z);continue}else if($[Z+1]==="?"){if(Z=lZ($,++Z),Z.err)return Z}else break;else if($[Z]==="&"){const F=iR($,Z);if(F==-1)return j("InvalidChar","char '&' is not expected.",b($,Z));Z=F}else if(X===!0&&!pZ($[Z]))return j("InvalidXml","Extra text at the end",b($,Z));if($[Z]==="<")Z--}}else{if(pZ($[Z]))continue;return j("InvalidChar","char '"+$[Z]+"' is not expected.",b($,Z))}if(!W)return j("InvalidXml","Start tag expected.",1);else if(G.length==1)return j("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",b($,G[0].tagStartPos));else if(G.length>0)return j("InvalidXml","Invalid '"+JSON.stringify(G.map((Z)=>Z.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var pR='"',lR="'",mR=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var iZ=M(($J)=>{var nZ={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 $}},eR=function($){return Object.assign({},nZ,$)};$J.buildOptions=eR;$J.defaultOptions=nZ});var aZ=M((jH,oZ)=>{class rZ{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})}}oZ.exports=rZ});var eZ=M((PH,tZ)=>{function XJ($,U){const 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,X=!1,Z=!1,L="";for(;U<$.length;U++)if($[U]==="<"&&!Z){if(X&&YJ($,U)){if(U+=7,[entityName,val,U]=ZJ($,U+1),val.indexOf("&")===-1)G[FJ(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(X&&wJ($,U))U+=8;else if(X&&QJ($,U))U+=8;else if(X&&zJ($,U))U+=9;else if(LJ)Z=!0;else throw new Error("Invalid DOCTYPE");W++,L=""}else if($[U]===">"){if(Z){if($[U-1]==="-"&&$[U-2]==="-")Z=!1,W--}else W--;if(W===0)break}else if($[U]==="[")X=!0;else L+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}}function ZJ($,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");const W=$[U++];let X="";for(;U<$.length&&$[U]!==W;U++)X+=$[U];return[G,X,U]}function LJ($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1}function YJ($,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 wJ($,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 QJ($,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 zJ($,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 FJ($){if(WJ.isName($))return $;else throw new Error(`Invalid entity name ${$}`)}var WJ=w$();tZ.exports=XJ});var UL=M((SH,$L)=>{function KJ($,U={}){if(U=Object.assign({},IJ,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&RJ.test(G))return Number.parseInt(G,16);else{const W=JJ.exec(G);if(W){const X=W[1],Z=W[2];let L=MJ(W[3]);const Y=W[4]||W[6];if(!U.leadingZeros&&Z.length>0&&X&&G[2]!==".")return $;else if(!U.leadingZeros&&Z.length>0&&!X&&G[1]!==".")return $;else{const w=Number(G),Q=""+w;if(Q.search(/[eE]/)!==-1)if(U.eNotation)return w;else return $;else if(Y)if(U.eNotation)return w;else return $;else if(G.indexOf(".")!==-1)if(Q==="0"&&L==="")return w;else if(Q===L)return w;else if(X&&Q==="-"+L)return w;else return $;if(Z)if(L===Q)return w;else if(X+L===Q)return w;else return $;if(G===Q)return w;else if(G===X+Q)return w;return $}}else return $}}function MJ($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $}var RJ=/^[-+]?0x[a-fA-F0-9]+$/,JJ=/^([\-\+])?(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 IJ={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};$L.exports=KJ});var ZL=M((DH,XL)=>{function VJ($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];this.lastEntities[W]={regex:new RegExp("&"+W+";","g"),val:$[W]}}}function TJ($,U,G,W,X,Z,L){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!L)$=this.replaceEntitiesValue($);const Y=this.options.tagValueProcessor(U,$,G,X,Z);if(Y===null||Y===void 0)return $;else if(typeof Y!==typeof $||Y!==$)return Y;else if(this.options.trimValues)return mU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return mU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}}function HJ($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $}function OJ($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=GL.getAllMatches($,AJ),X=W.length,Z={};for(let L=0;L<X;L++){const Y=this.resolveNameSpace(W[L][1]);let w=W[L][4],Q=this.options.attributeNamePrefix+Y;if(Y.length){if(this.options.transformAttributeName)Q=this.options.transformAttributeName(Q);if(Q==="__proto__")Q="#__proto__";if(w!==void 0){if(this.options.trimValues)w=w.trim();w=this.replaceEntitiesValue(w);const z=this.options.attributeValueProcessor(Y,w,U);if(z===null||z===void 0)Z[Q]=w;else if(typeof z!==typeof w||z!==w)Z[Q]=z;else Z[Q]=mU(w,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)Z[Q]=!0}}if(!Object.keys(Z).length)return;if(this.options.attributesGroupName){const L={};return L[this.options.attributesGroupName]=Z,L}return Z}}function fJ($,U,G){const W=this.options.updateTag(U.tagname,G,U[":@"]);if(W===!1);else if(typeof W==="string")U.tagname=W,$.addChild(U);else $.addChild(U)}function NJ($,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 jJ($,U,G){const W="*."+G;for(let X in $){const Z=$[X];if(W===Z||U===Z)return!0}return!1}function PJ($,U,G=">"){let W,X="";for(let Z=U;Z<$.length;Z++){let L=$[Z];if(W){if(L===W)W=""}else if(L==='"'||L==="'")W=L;else if(L===G[0])if(G[1]){if($[Z+1]===G[1])return{data:X,index:Z}}else return{data:X,index:Z};else if(L==="\t")L=" ";X+=L}}function V0($,U,G,W){const X=$.indexOf(U,G);if(X===-1)throw new Error(W);else return X+U.length-1}function sU($,U,G,W=">"){const X=PJ($,U+1,W);if(!X)return;let Z=X.data;const L=X.index,Y=Z.search(/\s/);let w=Z,Q=!0;if(Y!==-1)w=Z.substring(0,Y),Z=Z.substring(Y+1).trimStart();const z=w;if(G){const F=w.indexOf(":");if(F!==-1)w=w.substr(F+1),Q=w!==X.data.substr(F+1)}return{tagName:w,tagExp:Z,closeIndex:L,attrExpPresent:Q,rawTagName:z}}function SJ($,U,G){const W=G;let X=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const Z=V0($,">",G,`${U} is not closed`);if($.substring(G+2,Z).trim()===U){if(X--,X===0)return{tagContent:$.substring(W,G),i:Z}}G=Z}else if($[G+1]==="?")G=V0($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=V0($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=V0($,"]]>",G,"StopNode is not closed.")-2;else{const Z=sU($,G,">");if(Z){if((Z&&Z.tagName)===U&&Z.tagExp[Z.tagExp.length-1]!=="/")X++;G=Z.closeIndex}}}function mU($,U,G){if(U&&typeof $==="string"){const W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return EJ($,G)}else if(GL.isExist($))return $;else return""}var GL=w$(),U1=aZ(),BJ=eZ(),EJ=UL();class WL{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=VJ,this.parseXml=CJ,this.parseTextData=TJ,this.resolveNameSpace=HJ,this.buildAttributesMap=OJ,this.isItStopNode=jJ,this.replaceEntitiesValue=qJ,this.readStopNodeData=SJ,this.saveTextToParentTag=NJ,this.addChild=fJ}}var AJ=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),CJ=function($){$=$.replace(/\r\n?/g,"\n");const U=new U1("!xml");let G=U,W="",X="";for(let Z=0;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="/"){const Y=V0($,">",Z,"Closing Tag is not closed.");let w=$.substring(Z+2,Y).trim();if(this.options.removeNSPrefix){const F=w.indexOf(":");if(F!==-1)w=w.substr(F+1)}if(this.options.transformTagName)w=this.options.transformTagName(w);if(G)W=this.saveTextToParentTag(W,G,X);const Q=X.substring(X.lastIndexOf(".")+1);if(w&&this.options.unpairedTags.indexOf(w)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${w}>`);let z=0;if(Q&&this.options.unpairedTags.indexOf(Q)!==-1)z=X.lastIndexOf(".",X.lastIndexOf(".")-1),this.tagsNodeStack.pop();else z=X.lastIndexOf(".");X=X.substring(0,z),G=this.tagsNodeStack.pop(),W="",Z=Y}else if($[Z+1]==="?"){let Y=sU($,Z,!1,"?>");if(!Y)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,X),this.options.ignoreDeclaration&&Y.tagName==="?xml"||this.options.ignorePiTags);else{const w=new U1(Y.tagName);if(w.add(this.options.textNodeName,""),Y.tagName!==Y.tagExp&&Y.attrExpPresent)w[":@"]=this.buildAttributesMap(Y.tagExp,X,Y.tagName);this.addChild(G,w,X)}Z=Y.closeIndex+1}else if($.substr(Z+1,3)==="!--"){const Y=V0($,"-->",Z+4,"Comment is not closed.");if(this.options.commentPropName){const w=$.substring(Z+4,Y-2);W=this.saveTextToParentTag(W,G,X),G.add(this.options.commentPropName,[{[this.options.textNodeName]:w}])}Z=Y}else if($.substr(Z+1,2)==="!D"){const Y=BJ($,Z);this.docTypeEntities=Y.entities,Z=Y.i}else if($.substr(Z+1,2)==="!["){const Y=V0($,"]]>",Z,"CDATA is not closed.")-2,w=$.substring(Z+9,Y);W=this.saveTextToParentTag(W,G,X);let Q=this.parseTextData(w,G.tagname,X,!0,!1,!0,!0);if(Q==null)Q="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:w}]);else G.add(this.options.textNodeName,Q);Z=Y+2}else{let Y=sU($,Z,this.options.removeNSPrefix),w=Y.tagName;const Q=Y.rawTagName;let{tagExp:z,attrExpPresent:F,closeIndex:R}=Y;if(this.options.transformTagName)w=this.options.transformTagName(w);if(G&&W){if(G.tagname!=="!xml")W=this.saveTextToParentTag(W,G,X,!1)}const J=G;if(J&&this.options.unpairedTags.indexOf(J.tagname)!==-1)G=this.tagsNodeStack.pop(),X=X.substring(0,X.lastIndexOf("."));if(w!==U.tagname)X+=X?"."+w:w;if(this.isItStopNode(this.options.stopNodes,X,w)){let I="";if(z.length>0&&z.lastIndexOf("/")===z.length-1){if(w[w.length-1]==="/")w=w.substr(0,w.length-1),X=X.substr(0,X.length-1),z=w;else z=z.substr(0,z.length-1);Z=Y.closeIndex}else if(this.options.unpairedTags.indexOf(w)!==-1)Z=Y.closeIndex;else{const B=this.readStopNodeData($,Q,R+1);if(!B)throw new Error(`Unexpected end of ${Q}`);Z=B.i,I=B.tagContent}const E=new U1(w);if(w!==z&&F)E[":@"]=this.buildAttributesMap(z,X,w);if(I)I=this.parseTextData(I,w,X,!0,F,!0,!0);X=X.substr(0,X.lastIndexOf(".")),E.add(this.options.textNodeName,I),this.addChild(G,E,X)}else{if(z.length>0&&z.lastIndexOf("/")===z.length-1){if(w[w.length-1]==="/")w=w.substr(0,w.length-1),X=X.substr(0,X.length-1),z=w;else z=z.substr(0,z.length-1);if(this.options.transformTagName)w=this.options.transformTagName(w);const I=new U1(w);if(w!==z&&F)I[":@"]=this.buildAttributesMap(z,X,w);this.addChild(G,I,X),X=X.substr(0,X.lastIndexOf("."))}else{const I=new U1(w);if(this.tagsNodeStack.push(G),w!==z&&F)I[":@"]=this.buildAttributesMap(z,X,w);this.addChild(G,I,X),G=I}W="",Z=R}}else W+=$[Z];return U.child},qJ=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){const G=this.docTypeEntities[U];$=$.replace(G.regx,G.val)}for(let U in this.lastEntities){const G=this.lastEntities[U];$=$.replace(G.regex,G.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){const G=this.htmlEntities[U];$=$.replace(G.regex,G.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};XL.exports=WL});var YL=M((xJ)=>{function DJ($,U){return LL($,U)}function LL($,U,G){let W;const X={};for(let Z=0;Z<$.length;Z++){const L=$[Z],Y=kJ(L);let w="";if(G===void 0)w=Y;else w=G+"."+Y;if(Y===U.textNodeName)if(W===void 0)W=L[Y];else W+=""+L[Y];else if(Y===void 0)continue;else if(L[Y]){let Q=LL(L[Y],U,w);const z=hJ(Q,U);if(L[":@"])bJ(Q,L[":@"],w,U);else if(Object.keys(Q).length===1&&Q[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)Q=Q[U.textNodeName];else if(Object.keys(Q).length===0)if(U.alwaysCreateTextNode)Q[U.textNodeName]="";else Q="";if(X[Y]!==void 0&&X.hasOwnProperty(Y)){if(!Array.isArray(X[Y]))X[Y]=[X[Y]];X[Y].push(Q)}else if(U.isArray(Y,w,z))X[Y]=[Q];else X[Y]=Q}}if(typeof W==="string"){if(W.length>0)X[U.textNodeName]=W}else if(W!==void 0)X[U.textNodeName]=W;return X}function kJ($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(W!==":@")return W}}function bJ($,U,G,W){if(U){const X=Object.keys(U),Z=X.length;for(let L=0;L<Z;L++){const Y=X[L];if(W.isArray(Y,G+"."+Y,!0,!0))$[Y]=[U[Y]];else $[Y]=U[Y]}}}function hJ($,U){const{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}xJ.prettify=DJ});var zL=M((bH,QL)=>{var{buildOptions:cJ}=iZ(),yJ=ZL(),{prettify:uJ}=YL(),_J=lU();class wL{constructor($){this.externalEntities={},this.options=cJ($)}parse($,U){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(U){if(U===!0)U={};const X=_J.validate($,U);if(X!==!0)throw Error(`${X.err.msg}:${X.err.line}:${X.err.col}`)}const G=new yJ(this.options);G.addExternalEntities(this.externalEntities);const W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return uJ(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 '
'");else if(U==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=U}}QL.exports=wL});var KL=M((hH,IL)=>{function dJ($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return RL($,U,"",G)}function RL($,U,G,W){let X="",Z=!1;for(let L=0;L<$.length;L++){const Y=$[L],w=gJ(Y);if(w===void 0)continue;let Q="";if(G.length===0)Q=w;else Q=`${G}.${w}`;if(w===U.textNodeName){let I=Y[w];if(!pJ(Q,U))I=U.tagValueProcessor(w,I),I=JL(I,U);if(Z)X+=W;X+=I,Z=!1;continue}else if(w===U.cdataPropName){if(Z)X+=W;X+=`<![CDATA[${Y[w][0][U.textNodeName]}]]>`,Z=!1;continue}else if(w===U.commentPropName){X+=W+`<!--${Y[w][0][U.textNodeName]}-->`,Z=!0;continue}else if(w[0]==="?"){const I=FL(Y[":@"],U),E=w==="?xml"?"":W;let B=Y[w][0][U.textNodeName];B=B.length!==0?" "+B:"",X+=E+`<${w}${B}${I}?>`,Z=!0;continue}let z=W;if(z!=="")z+=U.indentBy;const F=FL(Y[":@"],U),R=W+`<${w}${F}`,J=RL(Y[w],U,Q,z);if(U.unpairedTags.indexOf(w)!==-1)if(U.suppressUnpairedNode)X+=R+">";else X+=R+"/>";else if((!J||J.length===0)&&U.suppressEmptyNode)X+=R+"/>";else if(J&&J.endsWith(">"))X+=R+`>${J}${W}</${w}>`;else{if(X+=R+">",J&&W!==""&&(J.includes("/>")||J.includes("</")))X+=W+U.indentBy+J+W;else X+=J;X+=`</${w}>`}Z=!0}return X}function gJ($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(!$.hasOwnProperty(W))continue;if(W!==":@")return W}}function FL($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let X=U.attributeValueProcessor(W,$[W]);if(X=JL(X,U),X===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${X}"`}return G}function pJ($,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 JL($,U){if($&&$.length>0&&U.processEntities)for(let G=0;G<U.entities.length;G++){const W=U.entities[G];$=$.replace(W.regex,W.val)}return $}IL.exports=dJ});var BL=M((xH,ML)=>{function Y0($){if(this.options=Object.assign({},sJ,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=iJ;if(this.processTextOrObjNode=mJ,this.options.format)this.indentate=nJ,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function mJ($,U,G){const 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)}function nJ($){return this.options.indentBy.repeat($)}function iJ($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1}var lJ=KL(),sJ={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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("\'","g"),val:"'"},{regex:new RegExp("\"","g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};Y0.prototype.build=function($){if(this.options.preserveOrder)return lJ($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};Y0.prototype.j2x=function($,U){let G="",W="";for(let X in $){if(!Object.prototype.hasOwnProperty.call($,X))continue;if(typeof $[X]==="undefined"){if(this.isAttribute(X))W+=""}else if($[X]===null)if(this.isAttribute(X))W+="";else if(X[0]==="?")W+=this.indentate(U)+"<"+X+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+X+"/"+this.tagEndChar;else if($[X]instanceof Date)W+=this.buildTextValNode($[X],X,"",U);else if(typeof $[X]!=="object"){const Z=this.isAttribute(X);if(Z)G+=this.buildAttrPairStr(Z,""+$[X]);else if(X===this.options.textNodeName){let L=this.options.tagValueProcessor(X,""+$[X]);W+=this.replaceEntitiesValue(L)}else W+=this.buildTextValNode($[X],X,"",U)}else if(Array.isArray($[X])){const Z=$[X].length;let L="",Y="";for(let w=0;w<Z;w++){const Q=$[X][w];if(typeof Q==="undefined");else if(Q===null)if(X[0]==="?")W+=this.indentate(U)+"<"+X+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+X+"/"+this.tagEndChar;else if(typeof Q==="object")if(this.options.oneListGroup){const z=this.j2x(Q,U+1);if(L+=z.val,this.options.attributesGroupName&&Q.hasOwnProperty(this.options.attributesGroupName))Y+=z.attrStr}else L+=this.processTextOrObjNode(Q,X,U);else if(this.options.oneListGroup){let z=this.options.tagValueProcessor(X,Q);z=this.replaceEntitiesValue(z),L+=z}else L+=this.buildTextValNode(Q,X,"",U)}if(this.options.oneListGroup)L=this.buildObjectNode(L,X,Y,U);W+=L}else if(this.options.attributesGroupName&&X===this.options.attributesGroupName){const Z=Object.keys($[X]),L=Z.length;for(let Y=0;Y<L;Y++)G+=this.buildAttrPairStr(Z[Y],""+$[X][Z[Y]])}else W+=this.processTextOrObjNode($[X],X,U)}return{attrStr:G,val:W}};Y0.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};Y0.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 X="</"+U+this.tagEndChar,Z="";if(U[0]==="?")Z="?",X="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(W)+"<"+U+G+Z+">"+$+X;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&Z.length===0)return this.indentate(W)+`<!--${$}-->`+this.newLine;else return this.indentate(W)+"<"+U+G+Z+this.tagEndChar+$+this.indentate(W)+X}};Y0.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};Y0.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 X=this.options.tagValueProcessor(U,$);if(X=this.replaceEntitiesValue(X),X==="")return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(W)+"<"+U+G+">"+X+"</"+U+this.tagEndChar}};Y0.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const G=this.options.entities[U];$=$.replace(G.regex,G.val)}return $};ML.exports=Y0});var VL=M((vH,EL)=>{var rJ=lU(),oJ=zL(),aJ=BL();EL.exports={XMLParser:oJ,XMLValidator:rJ,XMLBuilder:aJ}});var fL=M((cH,CL)=>{var{defineProperty:Q$,getOwnPropertyDescriptor:tJ,getOwnPropertyNames:eJ}=Object,$I=Object.prototype.hasOwnProperty,v=($,U)=>Q$($,"name",{value:U,configurable:!0}),UI=($,U)=>{for(var G in U)Q$($,G,{get:U[G],enumerable:!0})},GI=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of eJ(U))if(!$I.call($,X)&&X!==G)Q$($,X,{get:()=>U[X],enumerable:!(W=tJ(U,X))||W.enumerable})}return $},WI=($)=>GI(Q$({},"__esModule",{value:!0}),$),TL={};UI(TL,{_toBool:()=>ZI,_toNum:()=>LI,_toStr:()=>XI,awsExpectUnion:()=>wI,loadRestJsonErrorCode:()=>FI,loadRestXmlErrorCode:()=>KI,parseJsonBody:()=>AL,parseJsonErrorBody:()=>zI,parseXmlBody:()=>OL,parseXmlErrorBody:()=>II});CL.exports=WI(TL);var XI=v(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){const U=new Error(`Received number ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}if(typeof $==="boolean"){const U=new Error(`Received boolean ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}return $},"_toStr"),ZI=v(($)=>{if($==null)return $;if(typeof $==="string"){const U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){const G=new Error(`Received string "${$}" where a boolean was expected.`);G.name="Warning",console.warn(G)}return $!==""&&U!=="false"}return $},"_toBool"),LI=v(($)=>{if($==null)return $;if(typeof $==="string"){const U=Number($);if(U.toString()!==$){const G=new Error(`Received string "${$}" where a number was expected.`);return G.name="Warning",console.warn(G),$}return U}return $},"_toNum"),YI=q0(),wI=v(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return YI.expectUnion($)},"awsExpectUnion"),QI=q0(),HL=v(($,U)=>QI.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),AL=v(($,U)=>HL($,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"),zI=v(async($,U)=>{const G=await AL($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),FI=v(($,U)=>{const G=v((Z,L)=>Object.keys(Z).find((Y)=>Y.toLowerCase()===L.toLowerCase()),"findKey"),W=v((Z)=>{let L=Z;if(typeof L==="number")L=L.toString();if(L.indexOf(",")>=0)L=L.split(",")[0];if(L.indexOf(":")>=0)L=L.split(":")[0];if(L.indexOf("#")>=0)L=L.split("#")[1];return L},"sanitizeErrorCode"),X=G($.headers,"x-amzn-errortype");if(X!==void 0)return W($.headers[X]);if(U.code!==void 0)return W(U.code);if(U.__type!==void 0)return W(U.__type)},"loadRestJsonErrorCode"),RI=q0(),JI=VL(),OL=v(($,U)=>HL($,U).then((G)=>{if(G.length){const W=new JI.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(w,Q)=>Q.trim()===""&&Q.includes("\n")?"":void 0});W.addEntity("#xD","\r"),W.addEntity("#10","\n");let X;try{X=W.parse(G,!0)}catch(w){if(w&&typeof w==="object")Object.defineProperty(w,"$responseBodyText",{value:G});throw w}const Z="#text",L=Object.keys(X)[0],Y=X[L];if(Y[Z])Y[L]=Y[Z],delete Y[Z];return RI.getValueFromTextNode(Y)}return{}}),"parseXmlBody"),II=v(async($,U)=>{const G=await OL($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),KI=v(($,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 BI=M((G1)=>{Object.defineProperty(G1,"__esModule",{value:!0});var nU=MI();nU.__exportStar(zZ(),G1);nU.__exportStar(_Z(),G1);nU.__exportStar(fL(),G1)});var n=B$(M$(),1),iI=n.default.v1,rI=n.default.v3,sG=n.default.v4,oI=n.default.v5,aI=n.default.NIL,tI=n.default.version,eI=n.default.validate,$3=n.default.stringify,U3=n.default.parse;function X3($){return $}var a5=($)=>(U)=>async(G)=>{if(!y.isInstance(G.request))return U(G);const{request:W}=G,{handlerProtocol:X=""}=$.requestHandler.metadata||{};if(X.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 Z=W.hostname;if(W.port!=null)Z+=`:${W.port}`;W.headers.host=Z}return U(G)},t5={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Z3=($)=>({applyToStack:(U)=>{U.add(a5($),t5)}});var e5=()=>($,U)=>async(G)=>{try{const W=await $(G),{clientName:X,commandName:Z,logger:L,dynamoDbDocumentClientOptions:Y={}}=U,{overrideInputFilterSensitiveLog:w,overrideOutputFilterSensitiveLog:Q}=Y,z=w??U.inputFilterSensitiveLog,F=Q??U.outputFilterSensitiveLog,{$metadata:R,...J}=W.output;return L?.info?.({clientName:X,commandName:Z,input:z(G.input),output:F(J),metadata:R}),W}catch(W){const{clientName:X,commandName:Z,logger:L,dynamoDbDocumentClientOptions:Y={}}=U,{overrideInputFilterSensitiveLog:w}=Y,Q=w??U.inputFilterSensitiveLog;throw L?.error?.({clientName:X,commandName:Z,input:Q(G.input),error:W,metadata:W.$metadata}),W}},$Y={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Y3=($)=>({applyToStack:(U)=>{U.add(e5(),$Y)}});var mG="X-Amzn-Trace-Id",UY="AWS_LAMBDA_FUNCTION_NAME",GY="_X_AMZN_TRACE_ID",WY=($)=>(U)=>async(G)=>{const{request:W}=G;if(!y.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(mG))return U(G);const X=process.env[UY],Z=process.env[GY],L=(Y)=>typeof Y==="string"&&Y.length>0;if(L(X)&&L(Z))W.headers[mG]=Z;return U({...G,request:W})},XY={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},R3=($)=>({applyToStack:(U)=>{U.add(WY($),XY)}});function UK($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}class rz{constructor({size:$,params:U}){if(this.data=new Map,this.parameters=[],this.capacity=$??50,U)this.parameters=U}get($,U){const G=this.hash($);if(G===!1)return U();if(!this.data.has(G)){if(this.data.size>this.capacity+10){const W=this.data.keys();let X=0;while(!0){const{value:Z,done:L}=W.next();if(this.data.delete(Z),L||++X>10)break}}this.data.set(G,U())}return this.data.get(G)}size(){return this.data.size}hash($){let U="";const{parameters:G}=this;if(G.length===0)return!1;for(let W of G){const X=String($[W]??"");if(X.includes("|;"))return!1;U+=X+"|;"}return U}}var oz=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}$"),r0=($)=>oz.test($)||$.startsWith("[")&&$.endsWith("]");var az=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),o0=($,U=!1)=>{if(!U)return az.test($);const G=$.split(".");for(let W of G)if(!o0(W))return!1;return!0};var a0={};var t="endpoints";function d($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${d($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(d).join(", ")})`;return JSON.stringify($,null,2)}class C extends Error{constructor($){super($);this.name="EndpointError"}}var MX=($,U)=>$===U;var BX=($)=>{const U=$.split("."),G=[];for(let W of U){const X=W.indexOf("[");if(X!==-1){if(W.indexOf("]")!==W.length-1)throw new C(`Path: '${$}' does not end with ']'`);const Z=W.slice(X+1,-1);if(Number.isNaN(parseInt(Z)))throw new C(`Invalid array index: '${Z}' in path: '${$}'`);if(X!==0)G.push(W.slice(0,X));G.push(Z)}else G.push(W)}return G};var y1=($,U)=>BX(U).reduce((G,W)=>{if(typeof G!=="object")throw new C(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(W)];return G[W]},$);var EX=($)=>$!=null;var VX=($)=>!$;var u1=B$(Q0(),1);var IU={[u1.EndpointURLScheme.HTTP]:80,[u1.EndpointURLScheme.HTTPS]:443},TX=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:R,port:J,protocol:I="",path:E="",query:B={}}=$,V=new URL(`${I}//${R}${J?`:${J}`:""}${E}`);return V.search=Object.entries(B).map(([T,H])=>`${T}=${H}`).join("&"),V}return new URL($)}catch(R){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const G=U.href,{host:W,hostname:X,pathname:Z,protocol:L,search:Y}=U;if(Y)return null;const w=L.slice(0,-1);if(!Object.values(u1.EndpointURLScheme).includes(w))return null;const Q=r0(X),z=G.includes(`${W}:${IU[w]}`)||typeof $==="string"&&$.includes(`${W}:${IU[w]}`),F=`${W}${z?`:${IU[w]}`:""}`;return{scheme:w,authority:F,path:Z,normalizedPath:Z.endsWith("/")?Z:`${Z}/`,isIp:Q}};var HX=($,U)=>$===U;var AX=($,U,G,W)=>{if(U>=G||$.length<G)return null;if(!W)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var OX=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var CX={booleanEquals:MX,getAttr:y1,isSet:EX,isValidHostLabel:o0,not:VX,parseURL:TX,stringEquals:HX,substring:AX,uriEncode:OX};var _1=($,U)=>{const G=[],W={...U.endpointParams,...U.referenceRecord};let X=0;while(X<$.length){const Z=$.indexOf("{",X);if(Z===-1){G.push($.slice(X));break}G.push($.slice(X,Z));const L=$.indexOf("}",Z);if(L===-1){G.push($.slice(Z));break}if($[Z+1]==="{"&&$[L+1]==="}")G.push($.slice(Z+1,L)),X=L+2;const Y=$.substring(Z+1,L);if(Y.includes("#")){const[w,Q]=Y.split("#");G.push(y1(W[w],Q))}else G.push(W[Y]);X=L+1}return G.join("")};var fX=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var X0=($,U,G)=>{if(typeof $==="string")return _1($,G);else if($.fn)return d1($,G);else if($.ref)return fX($,G);throw new C(`'${U}': ${String($)} is not a string, function or reference.`)};var d1=({fn:$,argv:U},G)=>{const W=U.map((Z)=>["boolean","number"].includes(typeof Z)?Z:X0(Z,"arg",G)),X=$.split(".");if(X[0]in a0&&X[1]!=null)return a0[X[0]][X[1]](...W);return CX[$](...W)};var qX=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new C(`'${$}' is already defined in Reference Record.`);const W=d1(U,G);return G.logger?.debug?.(`${t} evaluateCondition: ${d(U)} = ${d(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var j0=($=[],U)=>{const G={};for(let W of $){const{result:X,toAssign:Z}=qX(W,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!X)return{result:X};if(Z)G[Z.name]=Z.value,U.logger?.debug?.(`${t} assign: ${Z.name} := ${d(Z.value)}`)}return{result:!0,referenceRecord:G}};var NX=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:X.map((Z)=>{const L=X0(Z,"Header value entry",U);if(typeof L!=="string")throw new C(`Header '${W}' value '${L}' is not a string`);return L})}),{});var KU=($,U)=>{if(Array.isArray($))return $.map((G)=>KU(G,U));switch(typeof $){case"string":return _1($,U);case"object":if($===null)throw new C(`Unexpected endpoint property: ${$}`);return g1($,U);case"boolean":return $;default:throw new C(`Unexpected endpoint property type: ${typeof $}`)}};var g1=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:KU(X,U)}),{});var jX=($,U)=>{const G=X0($,"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 C(`Endpoint URL must be a string, got ${typeof G}`)};var PX=($,U)=>{const{conditions:G,endpoint:W}=$,{result:X,referenceRecord:Z}=j0(G,U);if(!X)return;const L={...U,referenceRecord:{...U.referenceRecord,...Z}},{url:Y,properties:w,headers:Q}=W;return U.logger?.debug?.(`${t} Resolving endpoint from template: ${d(W)}`),{...Q!=null&&{headers:NX(Q,L)},...w!=null&&{properties:g1(w,L)},url:jX(Y,L)}};var SX=($,U)=>{const{conditions:G,error:W}=$,{result:X,referenceRecord:Z}=j0(G,U);if(!X)return;throw new C(X0(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...Z}}))};var DX=($,U)=>{const{conditions:G,rules:W}=$,{result:X,referenceRecord:Z}=j0(G,U);if(!X)return;return p1(W,{...U,referenceRecord:{...U.referenceRecord,...Z}})};var p1=($,U)=>{for(let G of $)if(G.type==="endpoint"){const W=PX(G,U);if(W)return W}else if(G.type==="error")SX(G,U);else if(G.type==="tree"){const W=DX(G,U);if(W)return W}else throw new C(`Unknown endpoint rule: ${G}`);throw new C("Rules evaluation failed")};var tz=($,U)=>{const{endpointParams:G,logger:W}=U,{parameters:X,rules:Z}=$;U.logger?.debug?.(`${t} Initial EndpointParams: ${d(G)}`);const L=Object.entries(X).filter(([,Q])=>Q.default!=null).map(([Q,z])=>[Q,z.default]);if(L.length>0)for(let[Q,z]of L)G[Q]=G[Q]??z;const Y=Object.entries(X).filter(([,Q])=>Q.required).map(([Q])=>Q);for(let Q of Y)if(G[Q]==null)throw new C(`Missing required parameter: '${Q}'`);const w=p1(Z,{endpointParams:G,logger:W,referenceRecord:{}});return U.logger?.debug?.(`${t} Resolved endpoint: ${d(w)}`),w};var MU=($,U=!1)=>{if(U){for(let G of $.split("."))if(!MU(G))return!1;return!0}if(!o0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(r0($))return!1;return!0};var kX=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,W,X,Z,L,...Y]=U;if(G!=="arn"||W===""||X===""||Y.join(":")==="")return null;const w=Y.map((Q)=>Q.split("/")).flat();return{partition:W,service:X,region:Z,accountId:L,resourceId:w}};var bX={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 $F=bX,UF="",hX=($)=>{const{partitions:U}=$F;for(let W of U){const{regions:X,outputs:Z}=W;for(let[L,Y]of Object.entries(X))if(L===$)return{...Z,...Y}}for(let W of U){const{regionRegex:X,outputs:Z}=W;if(new RegExp(X).test($))return{...Z}}const 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 xX=()=>UF;var GF={isVirtualHostableS3Bucket:MU,parseArn:kX,partition:hX};a0.aws=GF;var BU="user-agent",l1="x-amz-user-agent",EU=" ",s1="/",vX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,cX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,VU="-";var WF=($)=>(U,G)=>async(W)=>{const{request:X}=W;if(!y.isInstance(X))return U(W);const{headers:Z}=X,L=G?.userAgent?.map(TU)||[],Y=(await $.defaultUserAgentProvider()).map(TU),w=$?.customUserAgent?.map(TU)||[],Q=xX(),z=(Q?[Q]:[]).concat([...Y,...L,...w]).join(EU),F=[...Y.filter((R)=>R.startsWith("aws-sdk-")),...w].join(EU);if($.runtime!=="browser"){if(F)Z[l1]=Z[l1]?`${Z[BU]} ${F}`:F;Z[BU]=z}else Z[l1]=z;return U({...W,request:X})},TU=($)=>{const U=$[0].split(s1).map((L)=>L.replace(vX,VU)).join(s1),G=$[1]?.replace(cX,VU),W=U.indexOf(s1),X=U.substring(0,W);let Z=U.substring(W+1);if(X==="api")Z=Z.toLowerCase();return[X,Z,G].filter((L)=>L&&L.length>0).reduce((L,Y,w)=>{switch(w){case 0:return Y;case 1:return`${L}/${Y}`;default:return`${L}#${Y}`}},"")},XF={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},vB=($)=>({applyToStack:(U)=>{U.add(WF($),XF)}});var m1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var HU=($)=>m1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var mB=($)=>{const{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return HU(U);const W=await U();return HU(W)},useFipsEndpoint:async()=>{const W=typeof U==="string"?U:await U();if(m1(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var P0=($,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 Z0;(function($){$.ENV="env",$.CONFIG="shared config entry"})(Z0||(Z0={}));var ZF="AWS_USE_DUALSTACK_ENDPOINT",LF="use_dualstack_endpoint";var GE={environmentVariableSelector:($)=>P0($,ZF,Z0.ENV),configFileSelector:($)=>P0($,LF,Z0.CONFIG),default:!1};var YF="AWS_USE_FIPS_ENDPOINT",wF="use_fips_endpoint";var ZE={environmentVariableSelector:($)=>P0($,YF,Z0.ENV),configFileSelector:($)=>P0($,wF,Z0.CONFIG),default:!1};var AU=B$(Q0(),1),yX=($)=>$[AU.SMITHY_CONTEXT_KEY]||($[AU.SMITHY_CONTEXT_KEY]={});var e=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var uX={environmentVariableSelector:($)=>$.AWS_REGION,configFileSelector:($)=>$.region,default:()=>{throw new Error("Region is missing")}},CE={preferredFile:"credentials"};function QF($){return(U)=>async(G)=>{const W=G.request;if(y.isInstance(W)){const{body:X,headers:Z}=W;if(X&&Object.keys(Z).map((L)=>L.toLowerCase()).indexOf(_X)===-1)try{const L=$(X);W.headers={...W.headers,[_X]:String(L)}}catch(L){}}return U({...G,request:W})}}var _X="content-length",zF={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},aE=($)=>({applyToStack:(U)=>{U.add(QF($.bodyLengthChecker),zF)}});var dX=($,U)=>(G)=>async(W)=>{const{response:X}=await G(W);try{const Z=await U(X,$);return{response:X,output:Z}}catch(Z){if(Object.defineProperty(Z,"$response",{value:X}),!("$metadata"in Z)){if(Z.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof Z.$responseBodyText!=="undefined"){if(Z.$response)Z.$response.body=Z.$responseBodyText}}throw Z}};var gX=($,U)=>(G,W)=>async(X)=>{const Z=W.endpointV2?.url&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!Z)throw new Error("No valid endpoint provider available.");const L=await U(X.input,{...$,endpoint:Z});return G({...X,request:L})};function WV($,U,G){return{applyToStack:(W)=>{W.add(dX($,G),FF),W.add(gX($,U),OU)}}}var FF={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},OU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var pX=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(MF(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!KF(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},RF=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,JF=/(\d+\.){3}\d+/,IF=/\.\./;var KF=($)=>RF.test($)&&!JF.test($)&&!IF.test($),MF=($)=>{const[U,G,W,,,X]=$.split(":"),Z=U==="arn"&&$.split(":").length>=6,L=Boolean(Z&&G&&W&&X);if(Z&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L};var lX=($,U,G)=>{const W=async()=>{const X=G[$]??G[U];if(typeof X==="function")return X();return X};if($==="credentialScope"||U==="CredentialScope")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return X?.credentialScope??X?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return X?.accountId??X?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const X=await W();if(X&&typeof X==="object"){if("url"in X)return X.url.href;if("hostname"in X){const{protocol:Z,hostname:L,port:Y,path:w}=X;return`${Z}//${L}${Y?":"+Y:""}${w}`}}return X};return W};var sX="AWS_ENDPOINT_URL",mX="endpoint_url",nX=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[sX,...G].join("_")];if(W)return W;const X=U[sX];if(X)return X;return},configFileSelector:(U,G)=>{if(G&&U.services){const X=G[["services",U.services].join(CU)];if(X){const Z=$.split(" ").map((Y)=>Y.toLowerCase()),L=X[[Z.join("_"),mX].join(CU)];if(L)return L}}const W=U[mX];if(W)return W;return},default:void 0});var n1=async($)=>K0(nX($??""))();var i1=($)=>{if(typeof $==="object"){if("url"in $)return fU($.url);return $}return fU($)};var iX=async($,U,G,W)=>{if(!G.endpoint){let L;if(G.serviceConfiguredEndpoint)L=await G.serviceConfiguredEndpoint();else L=await n1(G.serviceId);if(L)G.endpoint=()=>Promise.resolve(i1(L))}const X=await BF($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},BF=async($,U,G)=>{const W={},X=U?.getEndpointParameterInstructions?.()||{};for(let[Z,L]of Object.entries(X))switch(L.type){case"staticContextParams":W[Z]=L.value;break;case"contextParams":W[Z]=$[L.name];break;case"clientContextParams":case"builtInParams":W[Z]=await lX(L.name,Z,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(X).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await pX(W);return W};var rX=({config:$,instructions:U})=>{return(G,W)=>async(X)=>{const Z=await iX(X.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=Z,W.authSchemes=Z.properties?.authSchemes;const L=W.authSchemes?.[0];if(L){W.signing_region=L.signingRegion,W.signing_service=L.signingName;const w=yX(W)?.selectedHttpAuthScheme?.httpAuthOption;if(w)w.signingProperties=Object.assign(w.signingProperties||{},{signing_region:L.signingRegion,signingRegion:L.signingRegion,signing_service:L.signingName,signingName:L.signingName,signingRegionSet:L.signingRegionSet},L.properties)}return G({...X})}};var EF={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:OU.name},SV=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(rX({config:$,instructions:U}),EF)}});var xV=($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>i1(await e(G)()):void 0,Z={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:e($.useDualstackEndpoint??!1),useFipsEndpoint:e($.useFipsEndpoint??!1)};let L=void 0;return Z.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!L)L=n1($.serviceId);return L},Z};var g;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(g||(g={}));var M0=3,oX=g.STANDARD;var aX=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],tX=["TimeoutError","RequestTimeout","RequestTimeoutException"],eX=[500,502,503,504],$Z=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var VF=($)=>$.$metadata?.clockSkewCorrected,S0=($)=>$.$metadata?.httpStatusCode===429||aX.includes($.name)||$.$retryable?.throttling==!0,r1=($)=>VF($)||tX.includes($.name)||$Z.includes($?.code||"")||eX.includes($.$metadata?.httpStatusCode||0),UZ=($)=>{if($.$metadata?.httpStatusCode!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!r1($))return!0;return!1}return!1};class o1{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;const U=this.getCurrentTimeInSeconds();this.lastThrottleTime=U,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.currentCapacity){const U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),S0($)){const W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const 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(){const $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const 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 B0=100,t0=20000,qU=500,a1=500,NU=5,jU=10,PU=1,t1="amz-sdk-invocation-id",e1="amz-sdk-request";var GZ=()=>{let $=B0;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min(t0,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var SU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(t0,$),getRetryCost:()=>G}};class D0{constructor($){this.maxAttempts=$,this.mode=g.STANDARD,this.capacity=a1,this.retryBackoffStrategy=GZ(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return SU({retryDelay:B0,retryCount:0})}async refreshRetryTokenForRetry($,U){const G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){const W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?qU:B0);const X=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),Z=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,X):X,L=this.getCapacityCost(W);return this.capacity-=L,SU({retryDelay:Z,retryCount:$.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(a1,this.capacity+($.getRetryCost()??PU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${M0}`),M0}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?jU:NU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class DU{constructor($,U){this.maxAttemptsProvider=$,this.mode=g.ADAPTIVE;const{rateLimiter:G}=U??{};this.rateLimiter=G??new o1,this.standardRetryStrategy=new D0($)}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 WZ="AWS_MAX_ATTEMPTS",XZ="max_attempts",qT={environmentVariableSelector:($)=>{const U=$[WZ];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${WZ} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[XZ];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${XZ} mast be a number, got "${U}"`);return G},default:M0},NT=($)=>{const{retryStrategy:U}=$,G=e($.maxAttempts??M0);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await e($.retryMode)()===g.ADAPTIVE)return new DU(G);return new D0(G)}}},TF="AWS_RETRY_MODE",HF="retry_mode",jT={environmentVariableSelector:($)=>$[TF],configFileSelector:($)=>$[HF],default:oX};import{Readable as AF}from"stream";var ZZ=($)=>$?.body instanceof AF||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var kU=($)=>{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 OF=($)=>(U,G)=>async(W)=>{let X=await $.retryStrategy();const Z=await $.maxAttempts();if(CF(X)){X=X;let L=await X.acquireInitialRetryToken(G.partition_id),Y=new Error,w=0,Q=0;const{request:z}=W,F=y.isInstance(z);if(F)z.headers[t1]=sG();while(!0)try{if(F)z.headers[e1]=`attempt=${w+1}; max=${Z}`;const{response:R,output:J}=await U(W);return X.recordSuccess(L),J.$metadata.attempts=w+1,J.$metadata.totalRetryDelay=Q,{response:R,output:J}}catch(R){const J=fF(R);if(Y=kU(R),F&&ZZ(z))throw(G.logger instanceof LZ?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),Y;try{L=await X.refreshRetryTokenForRetry(L,J)}catch(E){if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=w+1,Y.$metadata.totalRetryDelay=Q,Y}w=L.getRetryCount();const I=L.getRetryDelay();Q+=I,await new Promise((E)=>setTimeout(E,I))}}else{if(X=X,X?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(U,W)}},CF=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",fF=($)=>{const U={error:$,errorType:qF($)},G=jF($.$response);if(G)U.retryAfterHint=G;return U},qF=($)=>{if(S0($))return"THROTTLING";if(r1($))return"TRANSIENT";if(UZ($))return"SERVER_ERROR";return"CLIENT_ERROR"},NF={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},_T=($)=>({applyToStack:(U)=>{U.add(OF($),NF)}}),jF=($)=>{if(!bU.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)};import{platform as EI,release as VI}from"os";import{env as NL,versions as TI}from"process";var iU={isCrtAvailable:!1};var qL=()=>{if(iU.isCrtAvailable)return["md/crt-avail"];return null};var HI="AWS_SDK_UA_APP_ID",AI="sdk-ua-app-id",mH=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${EI()}`,VI()],["lang/js"],["md/nodejs",`${TI.node}`]],W=qL();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(NL.AWS_EXECUTION_ENV)G.push([`exec-env/${NL.AWS_EXECUTION_ENV}`]);const X=K0({environmentVariableSelector:(L)=>L[HI],configFileSelector:(L)=>L[AI],default:void 0})();let Z=void 0;return async()=>{if(!Z){const L=await X;Z=L?[...G,[`app/${L}`]]:[...G]}return Z}};import{Buffer as OI}from"buffer";import{createHash as CI,createHmac as fI}from"crypto";function jL($,U){if(OI.isBuffer($))return $;if(typeof $==="string")return PL($,U);if(ArrayBuffer.isView($))return rU($.buffer,$.byteOffset,$.byteLength);return rU($)}class qI{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(SL(jL($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?fI(this.algorithmIdentifier,jL(this.secret)):CI(this.algorithmIdentifier)}}import{fstatSync as NI,lstatSync as jI}from"fs";var UA=($)=>{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 jI($.path).size;else if(typeof $.fd==="number")return NI($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var DL="AWS_EXECUTION_ENV",oU="AWS_REGION",aU="AWS_DEFAULT_REGION",kL="AWS_EC2_METADATA_DISABLED",bL=["in-region","cross-region","mobile","standard","legacy"],hL="/latest/meta-data/placement/region";var xL={environmentVariableSelector:($)=>{return $.AWS_DEFAULTS_MODE},configFileSelector:($)=>{return $.defaults_mode},default:"legacy"};var RA=({region:$=K0(uX),defaultsMode:U=K0(xL)}={})=>vL(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return PI($);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 ${bL.join(", ")}, got ${G}`)}}),PI=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await SI();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},SI=async()=>{if(process.env[DL]&&(process.env[oU]||process.env[aU]))return process.env[oU]??process.env[aU];if(!process.env[kL])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-cw23pjra.js"),G=await $();return(await U({...G,path:hL})).toString()}catch($){}};var MA=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const G=$.region;if(typeof G==="string")return G;return G()};return{setRegion(G){U=G},region(){return U}}},BA=($)=>{return{region:$.region()}};export{sG as V,yX as W,e as X,X3 as Y,Z3 as Z,Y3 as _,R3 as $,SZ as aa,P0 as ba,Z0 as ca,JU as da,UK as ea,rz as fa,a0 as ga,tz as ha,GF as ia,vB as ja,GE as ka,ZE as la,uX as ma,CE as na,mB as oa,aE as pa,BF as qa,WV as ra,SV as sa,xV as ta,oX as ua,qT as va,NT as wa,jT as xa,_T as ya,BI as za,mH as Aa,qI as Ba,UA as Ca,RA as Da,MA as Ea,BA as Fa};
|
|
19
|
+
|
|
20
|
+
//# debugId=8C87C3B6A881AD6764756E2164756E21
|