gemi 0.4.98 → 0.4.99
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/index.js +2 -2
- package/dist/app/index.js.map +1 -1
- package/dist/broadcasting/index.js +1 -1
- package/dist/chunk-0f8949935ef3c862.js +1 -1
- package/dist/chunk-280cabf2f360003f.js +4 -0
- package/dist/{chunk-8660ff1b3cc94b99.js.map → chunk-280cabf2f360003f.js.map} +5 -5
- package/dist/chunk-28689250fae96e36.js +20 -0
- package/dist/{chunk-6477d7e9d0a3c143.js.map → chunk-28689250fae96e36.js.map} +7 -6
- package/dist/{chunk-7b222caedbdd07ff.js → chunk-2b3b4a0aa3edf9ec.js} +2 -2
- package/dist/{chunk-7b222caedbdd07ff.js.map → chunk-2b3b4a0aa3edf9ec.js.map} +1 -1
- package/dist/chunk-2c5231fcdfa1d6f2.js +4 -0
- package/dist/{chunk-99c32e4d937131e0.js.map → chunk-2c5231fcdfa1d6f2.js.map} +1 -1
- package/dist/chunk-44bbc0745a2b4b82.js +4 -0
- package/dist/chunk-44bbc0745a2b4b82.js.map +14 -0
- package/dist/{chunk-23d3df5f8342ecc6.js → chunk-58fb175982676253.js} +3 -3
- package/dist/{chunk-23d3df5f8342ecc6.js.map → chunk-58fb175982676253.js.map} +1 -1
- package/dist/{chunk-5a217af54dd6ae53.js → chunk-59b0df586fa6a917.js} +3 -3
- package/dist/{chunk-5a217af54dd6ae53.js.map → chunk-59b0df586fa6a917.js.map} +1 -1
- package/dist/chunk-6177d9eb9e7bf615.js +1 -1
- package/dist/{chunk-a32dc07245e51d1d.js → chunk-622a799c82e348e7.js} +2 -2
- package/dist/{chunk-a32dc07245e51d1d.js.map → chunk-622a799c82e348e7.js.map} +1 -1
- package/dist/chunk-7a46d8409a08609d.js +4 -0
- package/dist/{chunk-3507a0044b99a2cc.js.map → chunk-7a46d8409a08609d.js.map} +2 -2
- package/dist/chunk-7afadccff63d6a14.js +1 -1
- package/dist/{chunk-90436b32a64fc784.js → chunk-7ef6dd56fdc9381a.js} +3 -3
- package/dist/{chunk-90436b32a64fc784.js.map → chunk-7ef6dd56fdc9381a.js.map} +1 -1
- package/dist/chunk-874ce9ed3695d6dc.js +4 -0
- package/dist/{chunk-3c0b9555ac26f279.js.map → chunk-874ce9ed3695d6dc.js.map} +2 -2
- package/dist/chunk-8fb697a1aeea8f96.js +1 -1
- package/dist/chunk-92168dbc9ed3cb8e.js +4 -0
- package/dist/{chunk-2f8cf8372320b622.js.map → chunk-92168dbc9ed3cb8e.js.map} +4 -5
- package/dist/{chunk-961bb9fd54d10bbe.js → chunk-934537cc925d759e.js} +2 -2
- package/dist/{chunk-961bb9fd54d10bbe.js.map → chunk-934537cc925d759e.js.map} +1 -1
- package/dist/chunk-9d768d777b1aaf33.js +4 -0
- package/dist/{chunk-797989fd6dd03d3e.js.map → chunk-9d768d777b1aaf33.js.map} +1 -1
- package/dist/{chunk-28ec4c2b20e69deb.js → chunk-9e77cade8671df8d.js} +3 -3
- package/dist/{chunk-28ec4c2b20e69deb.js.map → chunk-9e77cade8671df8d.js.map} +1 -1
- package/dist/{chunk-643529c2ad120db7.js → chunk-a75fda9e77cb626c.js} +3 -3
- package/dist/{chunk-643529c2ad120db7.js.map → chunk-a75fda9e77cb626c.js.map} +1 -1
- package/dist/{chunk-f4faa3f602dc49fa.js → chunk-af12ac64b60b8669.js} +2 -2
- package/dist/{chunk-f4faa3f602dc49fa.js.map → chunk-af12ac64b60b8669.js.map} +1 -1
- package/dist/chunk-c2eec0de415bd820.js +4 -0
- package/dist/{chunk-22c02fbb1a96d282.js.map → chunk-c2eec0de415bd820.js.map} +2 -2
- package/dist/{chunk-0d97333b6af9fc45.js → chunk-c83dcc500d5fefe3.js} +2 -2
- package/dist/{chunk-0d97333b6af9fc45.js.map → chunk-c83dcc500d5fefe3.js.map} +1 -1
- package/dist/{chunk-53b0fab00d83f47e.js → chunk-df2ecbce6f94352a.js} +2 -2
- package/dist/{chunk-53b0fab00d83f47e.js.map → chunk-df2ecbce6f94352a.js.map} +1 -1
- package/dist/chunk-df507e740b7ba846.js +4 -0
- package/dist/{chunk-078b5ca64822d227.js.map → chunk-df507e740b7ba846.js.map} +4 -4
- package/dist/{chunk-9b1d4127b8980a77.js → chunk-e5683d4213970b67.js} +2 -2
- package/dist/{chunk-9b1d4127b8980a77.js.map → chunk-e5683d4213970b67.js.map} +1 -1
- package/dist/{chunk-ae14a8d462938b8e.js → chunk-ebd1b8ef83ffde0a.js} +2 -2
- package/dist/{chunk-ae14a8d462938b8e.js.map → chunk-ebd1b8ef83ffde0a.js.map} +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +1 -1
- package/dist/server/index.js +5 -5
- package/dist/server/index.js.map +4 -3
- package/dist/services/index.js +3 -3
- package/dist/services/index.js.map +3 -3
- package/dist/services/router/ViewRouterServiceContainer.d.ts +1 -1
- package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
- package/dist/services/router/ViewRouterServiceProvider.d.ts +1 -1
- package/dist/services/router/ViewRouterServiceProvider.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-078b5ca64822d227.js +0 -4
- package/dist/chunk-22c02fbb1a96d282.js +0 -4
- package/dist/chunk-2f8cf8372320b622.js +0 -4
- package/dist/chunk-3507a0044b99a2cc.js +0 -4
- package/dist/chunk-3c0b9555ac26f279.js +0 -4
- package/dist/chunk-6477d7e9d0a3c143.js +0 -20
- package/dist/chunk-797989fd6dd03d3e.js +0 -4
- package/dist/chunk-8660ff1b3cc94b99.js +0 -3
- package/dist/chunk-99c32e4d937131e0.js +0 -4
- package/dist/chunk-b9c722a5cdfab5dd.js +0 -4
- package/dist/chunk-b9c722a5cdfab5dd.js.map +0 -33
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{J as $0,K as M} from"./chunk-0d97333b6af9fc45.js";import{V as wI} from"./chunk-28ec4c2b20e69deb.js";import{Ha as y,Ia as hU,Ka as oU,La as fL,Na as qL,Pa as GZ,Xa as P6} from"./chunk-5a217af54dd6ae53.js";import{Bb as y8,Cb as K0} from"./chunk-8660ff1b3cc94b99.js";import{Db as T0} from"./chunk-9b1d4127b8980a77.js";import{Jb as CU} from"./chunk-961bb9fd54d10bbe.js";import{Sb as DL} from"./chunk-2214ecbc4b85c724.js";var F$=M((eU)=>{var xL=function($){return $&&$.__esModule?$:{default:$}},vL=function(){if(W1>X1.length-16)hL.default.randomFillSync(X1),W1=0;return X1.slice(W1,W1+=16)};Object.defineProperty(eU,"__esModule",{value:!0});eU.default=vL;var hL=xL(import.meta.require("crypto")),X1=new Uint8Array(256),W1=X1.length});var GG=M(($G)=>{Object.defineProperty($G,"__esModule",{value:!0});$G.default=void 0;var yL=/^(?:[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;$G.default=yL});var h0=M((WG)=>{var _L=function($){return $&&$.__esModule?$:{default:$}},dL=function($){return typeof $==="string"&&uL.default.test($)};Object.defineProperty(WG,"__esModule",{value:!0});WG.default=void 0;var uL=_L(GG()),gL=dL;WG.default=gL});var x0=M((LG)=>{var lL=function($){return $&&$.__esModule?$:{default:$}},ZG=function($,U=0){return D[$[U+0]]+D[$[U+1]]+D[$[U+2]]+D[$[U+3]]+"-"+D[$[U+4]]+D[$[U+5]]+"-"+D[$[U+6]]+D[$[U+7]]+"-"+D[$[U+8]]+D[$[U+9]]+"-"+D[$[U+10]]+D[$[U+11]]+D[$[U+12]]+D[$[U+13]]+D[$[U+14]]+D[$[U+15]]},sL=function($,U=0){const G=ZG($,U);if(!pL.default(G))throw TypeError("Stringified UUID is invalid");return G};Object.defineProperty(LG,"__esModule",{value:!0});LG.default=void 0;LG.unsafeStringify=ZG;var pL=lL(h0()),D=[];for(let $=0;$<256;++$)D.push(($+256).toString(16).slice(1));var mL=sL;LG.default=mL});var zG=M((QG)=>{var oL=function($){return $&&$.__esModule?$:{default:$}},aL=function($,U,G){let W=U&&G||0;const X=U||new Array(16);$=$||{};let Z=$.node||YG,L=$.clockseq!==void 0?$.clockseq:z$;if(Z==null||L==null){const J=$.random||($.rng||iL.default)();if(Z==null)Z=YG=[J[0]|1,J[1],J[2],J[3],J[4],J[5]];if(L==null)L=z$=(J[6]<<8|J[7])&16383}let w=$.msecs!==void 0?$.msecs:Date.now(),Y=$.nsecs!==void 0?$.nsecs:R$+1;const Q=w-J$+(Y-R$)/1e4;if(Q<0&&$.clockseq===void 0)L=L+1&16383;if((Q<0||w>J$)&&$.nsecs===void 0)Y=0;if(Y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");J$=w,R$=Y,z$=L,w+=12219292800000;const F=((w&268435455)*1e4+Y)%4294967296;X[W++]=F>>>24&255,X[W++]=F>>>16&255,X[W++]=F>>>8&255,X[W++]=F&255;const z=w/4294967296*1e4&268435455;X[W++]=z>>>8&255,X[W++]=z&255,X[W++]=z>>>24&15|16,X[W++]=z>>>16&255,X[W++]=L>>>8|128,X[W++]=L&255;for(let J=0;J<6;++J)X[W+J]=Z[J];return U||rL.unsafeStringify(X)};Object.defineProperty(QG,"__esModule",{value:!0});QG.default=void 0;var iL=oL(F$()),rL=x0(),YG,z$,J$=0,R$=0,tL=aL;QG.default=tL});var I$=M((JG)=>{var $5=function($){return $&&$.__esModule?$:{default:$}},U5=function($){if(!eL.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(JG,"__esModule",{value:!0});JG.default=void 0;var eL=$5(h0()),G5=U5;JG.default=G5});var K$=M((MG)=>{var Z5=function($){return $&&$.__esModule?$:{default:$}},L5=function($){$=unescape(encodeURIComponent($));const U=[];for(let G=0;G<$.length;++G)U.push($.charCodeAt(G));return U},w5=function($,U,G){function W(X,Z,L,w){var Y;if(typeof X==="string")X=L5(X);if(typeof Z==="string")Z=X5.default(Z);if(((Y=Z)===null||Y===void 0?void 0:Y.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){w=w||0;for(let F=0;F<16;++F)L[w+F]=Q[F];return L}return W5.unsafeStringify(Q)}try{W.name=$}catch(X){}return W.DNS=IG,W.URL=KG,W};Object.defineProperty(MG,"__esModule",{value:!0});MG.URL=MG.DNS=void 0;MG.default=w5;var W5=x0(),X5=Z5(I$()),IG="6ba7b810-9dad-11d1-80b4-00c04fd430c8";MG.DNS=IG;var KG="6ba7b811-9dad-11d1-80b4-00c04fd430c8";MG.URL=KG});var TG=M((VG)=>{var z5=function($){return $&&$.__esModule?$:{default:$}},J5=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return F5.default.createHash("md5").update($).digest()};Object.defineProperty(VG,"__esModule",{value:!0});VG.default=void 0;var F5=z5(import.meta.require("crypto")),R5=J5;VG.default=R5});var CG=M((HG)=>{var AG=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(HG,"__esModule",{value:!0});HG.default=void 0;var I5=AG(K$()),K5=AG(TG()),M5=I5.default("v3",48,K5.default),B5=M5;HG.default=B5});var NG=M((fG)=>{var E5=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(fG,"__esModule",{value:!0});fG.default=void 0;var V5=E5(import.meta.require("crypto")),T5={randomUUID:V5.default.randomUUID};fG.default=T5});var DG=M((SG)=>{var PG=function($){return $&&$.__esModule?$:{default:$}},O5=function($,U,G){if(jG.default.randomUUID&&!U&&!$)return jG.default.randomUUID();$=$||{};const W=$.random||($.rng||A5.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 H5.unsafeStringify(W)};Object.defineProperty(SG,"__esModule",{value:!0});SG.default=void 0;var jG=PG(NG()),A5=PG(F$()),H5=x0(),C5=O5;SG.default=C5});var xG=M((bG)=>{var q5=function($){return $&&$.__esModule?$:{default:$}},N5=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return f5.default.createHash("sha1").update($).digest()};Object.defineProperty(bG,"__esModule",{value:!0});bG.default=void 0;var f5=q5(import.meta.require("crypto")),j5=N5;bG.default=j5});var uG=M((cG)=>{var vG=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(cG,"__esModule",{value:!0});cG.default=void 0;var P5=vG(K$()),S5=vG(xG()),k5=P5.default("v5",80,S5.default),D5=k5;cG.default=D5});var gG=M((_G)=>{Object.defineProperty(_G,"__esModule",{value:!0});_G.default=void 0;var b5="00000000-0000-0000-0000-000000000000";_G.default=b5});var sG=M((pG)=>{var x5=function($){return $&&$.__esModule?$:{default:$}},v5=function($){if(!h5.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(pG,"__esModule",{value:!0});pG.default=void 0;var h5=x5(h0()),c5=v5;pG.default=c5});var M$=M((p)=>{var o=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(p,"__esModule",{value:!0});Object.defineProperty(p,"NIL",{enumerable:!0,get:function(){return g5.default}});Object.defineProperty(p,"parse",{enumerable:!0,get:function(){return m5.default}});Object.defineProperty(p,"stringify",{enumerable:!0,get:function(){return s5.default}});Object.defineProperty(p,"v1",{enumerable:!0,get:function(){return y5.default}});Object.defineProperty(p,"v3",{enumerable:!0,get:function(){return u5.default}});Object.defineProperty(p,"v4",{enumerable:!0,get:function(){return _5.default}});Object.defineProperty(p,"v5",{enumerable:!0,get:function(){return d5.default}});Object.defineProperty(p,"validate",{enumerable:!0,get:function(){return l5.default}});Object.defineProperty(p,"version",{enumerable:!0,get:function(){return p5.default}});var y5=o(zG()),u5=o(CG()),_5=o(DG()),d5=o(uG()),g5=o(gG()),p5=o(sG()),l5=o(h0()),s5=o(x0()),m5=o(I$())});var i=M((Z3,aG)=>{var{defineProperty:Z1,getOwnPropertyDescriptor:Uw,getOwnPropertyNames:Gw}=Object,Ww=Object.prototype.hasOwnProperty,rG=($,U)=>Z1($,"name",{value:U,configurable:!0}),Xw=($,U)=>{for(var G in U)Z1($,G,{get:U[G],enumerable:!0})},Zw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Gw(U))if(!Ww.call($,X)&&X!==G)Z1($,X,{get:()=>U[X],enumerable:!(W=Uw(U,X))||W.enumerable})}return $},Lw=($)=>Zw(Z1({},"__esModule",{value:!0}),$),oG={};Xw(oG,{getSmithyContext:()=>ww,normalizeProvider:()=>Yw});aG.exports=Lw(oG);var iG=T0(),ww=rG(($)=>$[iG.SMITHY_CONTEXT_KEY]||($[iG.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Yw=rG(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var B$=M((L3,G8)=>{var{defineProperty:L1,getOwnPropertyDescriptor:Qw,getOwnPropertyNames:Fw}=Object,zw=Object.prototype.hasOwnProperty,F0=($,U)=>L1($,"name",{value:U,configurable:!0}),Jw=($,U)=>{for(var G in U)L1($,G,{get:U[G],enumerable:!0})},Rw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Fw(U))if(!zw.call($,X)&&X!==G)L1($,X,{get:()=>U[X],enumerable:!(W=Qw(U,X))||W.enumerable})}return $},Iw=($)=>Rw(L1({},"__esModule",{value:!0}),$),tG={};Jw(tG,{CredentialsProviderError:()=>Kw,ProviderError:()=>w1,TokenProviderError:()=>Mw,chain:()=>Bw,fromStatic:()=>Vw,memoize:()=>Ew});G8.exports=Iw(tG);var eG=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)}};F0(eG,"ProviderError");var w1=eG,$8=class $ extends w1{constructor(U,G=!0){super(U,G);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};F0($8,"CredentialsProviderError");var Kw=$8,U8=class $ extends w1{constructor(U,G=!0){super(U,G);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};F0(U8,"TokenProviderError");var Mw=U8,Bw=F0((...$)=>async()=>{if($.length===0)throw new w1("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"),Vw=F0(($)=>()=>Promise.resolve($),"fromStatic"),Ew=F0(($,U,G)=>{let W,X,Z,L=!1;const w=F0(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(Y)=>{if(!Z||(Y==null?void 0:Y.forceRefresh))W=await w();return W};return async(Y)=>{if(!Z||(Y==null?void 0:Y.forceRefresh))W=await w();if(L)return W;if(G&&!G(W))return L=!0,W;if(U(W))return await w(),W;return W}},"memoize")});var A0=M((W8)=>{Object.defineProperty(W8,"__esModule",{value:!0});W8.getHomeDir=void 0;var Tw=import.meta.require("os"),Aw=import.meta.require("path"),V$={},Hw=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Ow=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${Aw.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;const X=Hw();if(!V$[X])V$[X]=Tw.homedir();return V$[X]};W8.getHomeDir=Ow});var E$=M((Z8)=>{Object.defineProperty(Z8,"__esModule",{value:!0});Z8.getSSOTokenFilepath=void 0;var Cw=import.meta.require("crypto"),fw=import.meta.require("path"),qw=A0(),Nw=($)=>{const G=Cw.createHash("sha1").update($).digest("hex");return fw.join(qw.getHomeDir(),".aws","sso","cache",`${G}.json`)};Z8.getSSOTokenFilepath=Nw});var Q8=M((w8)=>{Object.defineProperty(w8,"__esModule",{value:!0});w8.getSSOTokenFromFile=void 0;var jw=import.meta.require("fs"),Pw=E$(),{readFile:Sw}=jw.promises,kw=async($)=>{const U=Pw.getSSOTokenFilepath($),G=await Sw(U,"utf8");return JSON.parse(G)};w8.getSSOTokenFromFile=kw});var A$=M((F8)=>{Object.defineProperty(F8,"__esModule",{value:!0});F8.slurpFile=void 0;var Dw=import.meta.require("fs"),{readFile:bw}=Dw.promises,T$={},hw=($,U)=>{if(!T$[$]||(U===null||U===void 0?void 0:U.ignoreCache))T$[$]=bw($,"utf8");return T$[$]};F8.slurpFile=hw});var f$=M((z3,c0)=>{var{defineProperty:F1,getOwnPropertyDescriptor:xw,getOwnPropertyNames:vw}=Object,cw=Object.prototype.hasOwnProperty,u=($,U)=>F1($,"name",{value:U,configurable:!0}),yw=($,U)=>{for(var G in U)F1($,G,{get:U[G],enumerable:!0})},H$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of vw(U))if(!cw.call($,X)&&X!==G)F1($,X,{get:()=>U[X],enumerable:!(W=xw(U,X))||W.enumerable})}return $},C$=($,U,G)=>(H$($,U,"default"),G&&H$(G,U,"default")),uw=($)=>H$(F1({},"__esModule",{value:!0}),$),v0={};yw(v0,{CONFIG_PREFIX_SEPARATOR:()=>z0,DEFAULT_PROFILE:()=>K8,ENV_PROFILE:()=>I8,getProfileName:()=>_w,loadSharedConfigFiles:()=>B8,loadSsoSessionData:()=>ew,parseKnownFiles:()=>UY});c0.exports=uw(v0);C$(v0,A0(),c0.exports);var I8="AWS_PROFILE",K8="default",_w=u(($)=>$.profile||process.env[I8]||K8,"getProfileName");C$(v0,E$(),c0.exports);C$(v0,Q8(),c0.exports);var Y1=T0(),dw=u(($)=>Object.entries($).filter(([U])=>{const G=U.indexOf(z0);if(G===-1)return!1;return Object.values(Y1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{const X=G.indexOf(z0),Z=G.substring(0,X)===Y1.IniSectionType.PROFILE?G.substring(X+1):G;return U[Z]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),Q1=import.meta.require("path"),gw=A0(),pw="AWS_CONFIG_FILE",M8=u(()=>process.env[pw]||Q1.join(gw.getHomeDir(),".aws","config"),"getConfigFilepath"),lw=A0(),sw="AWS_SHARED_CREDENTIALS_FILE",mw=u(()=>process.env[sw]||Q1.join(lw.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),nw=A0(),iw=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,rw=["__proto__","profile __proto__"],O$=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 w=Z.substring(1,Z.length-1),Y=iw.exec(w);if(Y){const[,Q,,F]=Y;if(Object.values(Y1.IniSectionType).includes(Q))G=[Q,F].join(z0)}else G=w;if(rw.includes(w))throw new Error(`Found invalid profile name "${w}"`)}else if(G){const w=Z.indexOf("=");if(![0,-1].includes(w)){const[Y,Q]=[Z.substring(0,w).trim(),Z.substring(w+1).trim()];if(Q==="")W=Y;else{if(W&&X.trimStart()===X)W=void 0;U[G]=U[G]||{};const F=W?[W,Y].join(z0):Y;U[G][F]=Q}}}}return U},"parseIni"),J8=A$(),R8=u(()=>({}),"swallowError"),z0=".",B8=u(async($={})=>{const{filepath:U=mw(),configFilepath:G=M8()}=$,W=nw.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 w=await Promise.all([J8.slurpFile(L,{ignoreCache:$.ignoreCache}).then(O$).then(dw).catch(R8),J8.slurpFile(Z,{ignoreCache:$.ignoreCache}).then(O$).catch(R8)]);return{configFile:w[0],credentialsFile:w[1]}},"loadSharedConfigFiles"),ow=u(($)=>Object.entries($).filter(([U])=>U.startsWith(Y1.IniSectionType.SSO_SESSION+z0)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(z0)+1)]:W}),{}),"getSsoSessionData"),aw=A$(),tw=u(()=>({}),"swallowError"),ew=u(async($={})=>aw.slurpFile($.configFilepath??M8()).then(O$).then(ow).catch(tw),"loadSsoSessionData"),$Y=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"),UY=u(async($)=>{const U=await B8($);return $Y(U.configFile,U.credentialsFile)},"parseKnownFiles")});var A8=M((J3,T8)=>{var q$=function($){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 $}},z1=Object.defineProperty,GY=Object.getOwnPropertyDescriptor,WY=Object.getOwnPropertyNames,XY=Object.prototype.hasOwnProperty,H0=($,U)=>z1($,"name",{value:U,configurable:!0}),ZY=($,U)=>{for(var G in U)z1($,G,{get:U[G],enumerable:!0})},LY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of WY(U))if(!XY.call($,X)&&X!==G)z1($,X,{get:()=>U[X],enumerable:!(W=GY(U,X))||W.enumerable})}return $},wY=($)=>LY(z1({},"__esModule",{value:!0}),$),E8={};ZY(E8,{loadConfig:()=>JY});T8.exports=wY(E8);var y0=B$();H0(q$,"getSelectorName");var YY=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: ${q$($.toString())}`,{logger:U})}},"fromEnv"),V8=f$(),QY=H0(($,{preferredFile:U="config",...G}={})=>async()=>{const W=V8.getProfileName(G),{configFile:X,credentialsFile:Z}=await V8.loadSharedConfigFiles(G),L=Z[W]||{},w=X[W]||{},Y=U==="config"?{...L,...w}:{...w,...L};try{const F=$(Y,U==="config"?X:Z);if(F===void 0)throw new Error;return F}catch(Q){throw new y0.CredentialsProviderError(Q.message||`Not found in config files w/ profile [${W}]: ${q$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),FY=H0(($)=>typeof $==="function","isFunction"),zY=H0(($)=>FY($)?async()=>await $():y0.fromStatic($),"fromStatic"),JY=H0(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>y0.memoize(y0.chain(YY($),QY(U,W),zY(G))),"loadConfig")});var N8=M((f8)=>{Object.defineProperty(f8,"__esModule",{value:!0});f8.getEndpointUrlConfig=void 0;var H8=f$(),O8="AWS_ENDPOINT_URL",C8="endpoint_url",RY=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[O8,...G].join("_")];if(W)return W;const X=U[O8];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((w)=>w.toLowerCase()),L=X[[Z.join("_"),C8].join(H8.CONFIG_PREFIX_SEPARATOR)];if(L)return L}}const W=U[C8];if(W)return W;return},default:void 0});f8.getEndpointUrlConfig=RY});var N$=M((j8)=>{Object.defineProperty(j8,"__esModule",{value:!0});j8.getEndpointFromConfig=void 0;var IY=A8(),KY=N8(),MY=async($)=>IY.loadConfig(KY.getEndpointUrlConfig($!==null&&$!==void 0?$:""))();j8.getEndpointFromConfig=MY});var P$=M((K3,v8)=>{var x8=function($,U,G){return{applyToStack:(W)=>{W.add(k8($,G),b8),W.add(D8($,U),h8)}}},J1=Object.defineProperty,BY=Object.getOwnPropertyDescriptor,VY=Object.getOwnPropertyNames,EY=Object.prototype.hasOwnProperty,j$=($,U)=>J1($,"name",{value:U,configurable:!0}),TY=($,U)=>{for(var G in U)J1($,G,{get:U[G],enumerable:!0})},AY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of VY(U))if(!EY.call($,X)&&X!==G)J1($,X,{get:()=>U[X],enumerable:!(W=BY(U,X))||W.enumerable})}return $},HY=($)=>AY(J1({},"__esModule",{value:!0}),$),S8={};TY(S8,{deserializerMiddleware:()=>k8,deserializerMiddlewareOption:()=>b8,getSerdePlugin:()=>x8,serializerMiddleware:()=>D8,serializerMiddlewareOption:()=>h8});v8.exports=HY(S8);var k8=j$(($,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"),D8=j$(($,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 w=await U(X.input,{...$,endpoint:L});return G({...X,request:w})},"serializerMiddleware"),b8={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},h8={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};j$(x8,"getSerdePlugin")});var s8=M((M3,l8)=>{var{defineProperty:I1,getOwnPropertyDescriptor:OY,getOwnPropertyNames:CY}=Object,fY=Object.prototype.hasOwnProperty,l=($,U)=>I1($,"name",{value:U,configurable:!0}),qY=($,U)=>{for(var G in U)I1($,G,{get:U[G],enumerable:!0})},NY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of CY(U))if(!fY.call($,X)&&X!==G)I1($,X,{get:()=>U[X],enumerable:!(W=OY(U,X))||W.enumerable})}return $},jY=($)=>NY(I1({},"__esModule",{value:!0}),$),u8={};qY(u8,{endpointMiddleware:()=>g8,endpointMiddlewareOptions:()=>p8,getEndpointFromInstructions:()=>_8,getEndpointPlugin:()=>yY,resolveEndpointConfig:()=>_Y,resolveParams:()=>d8,toEndpointV1:()=>S$});l8.exports=jY(u8);var PY=l(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(hY(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!bY(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),SY=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,kY=/(\d+\.){3}\d+/,DY=/\.\./,bY=l(($)=>SY.test($)&&!kY.test($)&&!DY.test($),"isDnsCompatibleBucketName"),hY=l(($)=>{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"),xY=l(($,U,G)=>{const W=l(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:w,path:Y}=X;return`${Z}//${L}${w?":"+w:""}${Y}`}}return X};return W},"createConfigValueProvider"),vY=N$(),c8=y8(),S$=l(($)=>{if(typeof $==="object"){if("url"in $)return c8.parseUrl($.url);return $}return c8.parseUrl($)},"toEndpointV1"),_8=l(async($,U,G,W)=>{if(!G.endpoint){let L;if(G.serviceConfiguredEndpoint)L=await G.serviceConfiguredEndpoint();else L=await vY.getEndpointFromConfig(G.serviceId);if(L)G.endpoint=()=>Promise.resolve(S$(L))}const X=await d8($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},"getEndpointFromInstructions"),d8=l(async($,U,G)=>{var W;const X={},Z=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[L,w]of Object.entries(Z))switch(w.type){case"staticContextParams":X[L]=w.value;break;case"contextParams":X[L]=$[w.name];break;case"clientContextParams":case"builtInParams":X[L]=await xY(w.name,L,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(w))}if(Object.keys(Z).length===0)Object.assign(X,G);if(String(G.serviceId).toLowerCase()==="s3")await PY(X);return X},"resolveParams"),R1=i(),g8=l(({config:$,instructions:U})=>{return(G,W)=>async(X)=>{var Z,L,w;const Y=await _8(X.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=Y,W.authSchemes=(Z=Y.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 F=R1.getSmithyContext(W),z=(w=F==null?void 0:F.selectedHttpAuthScheme)==null?void 0:w.httpAuthOption;if(z)z.signingProperties=Object.assign(z.signingProperties||{},{signing_region:Q.signingRegion,signingRegion:Q.signingRegion,signing_service:Q.signingName,signingName:Q.signingName,signingRegionSet:Q.signingRegionSet},Q.properties)}return G({...X})}},"endpointMiddleware"),cY=P$(),p8={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:cY.serializerMiddlewareOption.name},yY=l(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(g8({config:$,instructions:U}),p8)}}),"getEndpointPlugin"),uY=N$(),_Y=l(($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>S$(await R1.normalizeProvider(G)()):void 0,Z={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:R1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:R1.normalizeProvider($.useFipsEndpoint??!1)};let L=void 0;return Z.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!L)L=uY.getEndpointFromConfig($.serviceId);return L},Z},"resolveEndpointConfig")});var a=M((B3,$4)=>{var a8=function($){return Object.keys($).reduce((U,G)=>{const W=$[G];return{...U,[G]:Array.isArray(W)?[...W]:W}},{})},e8=function($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)},K1=Object.defineProperty,dY=Object.getOwnPropertyDescriptor,gY=Object.getOwnPropertyNames,pY=Object.prototype.hasOwnProperty,U0=($,U)=>K1($,"name",{value:U,configurable:!0}),lY=($,U)=>{for(var G in U)K1($,G,{get:U[G],enumerable:!0})},sY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of gY(U))if(!pY.call($,X)&&X!==G)K1($,X,{get:()=>U[X],enumerable:!(W=dY(U,X))||W.enumerable})}return $},mY=($)=>sY(K1({},"__esModule",{value:!0}),$),m8={};lY(m8,{Field:()=>rY,Fields:()=>oY,HttpRequest:()=>aY,HttpResponse:()=>tY,IHttpRequest:()=>n8.HttpRequest,getHttpHandlerExtensionConfiguration:()=>nY,isValidHostname:()=>e8,resolveHttpHandlerRuntimeConfig:()=>iY});$4.exports=mY(m8);var nY=U0(($)=>{let U=$.httpHandler;return{setHttpHandler(G){U=G},httpHandler(){return U},updateHttpClientConfig(G,W){U.updateHttpClientConfig(G,W)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),iY=U0(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),n8=T0(),i8=class ${constructor({name:U,kind:G=n8.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}};U0(i8,"Field");var rY=i8,r8=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)}};U0(r8,"Fields");var oY=r8,o8=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=a8(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)}};U0(o8,"HttpRequest");var aY=o8;U0(a8,"cloneQuery");var t8=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"}};U0(t8,"HttpResponse");var tY=t8;U0(e8,"isValidHostname")});var k$=M((V3,X4)=>{var{defineProperty:M1,getOwnPropertyDescriptor:eY,getOwnPropertyNames:$2}=Object,U2=Object.prototype.hasOwnProperty,O0=($,U)=>M1($,"name",{value:U,configurable:!0}),G2=($,U)=>{for(var G in U)M1($,G,{get:U[G],enumerable:!0})},W2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of $2(U))if(!U2.call($,X)&&X!==G)M1($,X,{get:()=>U[X],enumerable:!(W=eY(U,X))||W.enumerable})}return $},X2=($)=>W2(M1({},"__esModule",{value:!0}),$),U4={};G2(U4,{isClockSkewCorrectedError:()=>G4,isClockSkewError:()=>z2,isRetryableByTrait:()=>F2,isServerError:()=>R2,isThrottlingError:()=>J2,isTransientError:()=>W4});X4.exports=X2(U4);var Z2=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],L2=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],w2=["TimeoutError","RequestTimeout","RequestTimeoutException"],Y2=[500,502,503,504],Q2=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],F2=O0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),z2=O0(($)=>Z2.includes($.name),"isClockSkewError"),G4=O0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),J2=O0(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||L2.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),W4=O0(($)=>{var U;return G4($)||w2.includes($.name)||Q2.includes(($==null?void 0:$.code)||"")||Y2.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),R2=O0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!W4($))return!0;return!1}return!1},"isServerError")});var V4=M((E3,B4)=>{var{defineProperty:B1,getOwnPropertyDescriptor:I2,getOwnPropertyNames:K2}=Object,M2=Object.prototype.hasOwnProperty,s=($,U)=>B1($,"name",{value:U,configurable:!0}),B2=($,U)=>{for(var G in U)B1($,G,{get:U[G],enumerable:!0})},V2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of K2(U))if(!M2.call($,X)&&X!==G)B1($,X,{get:()=>U[X],enumerable:!(W=I2(U,X))||W.enumerable})}return $},E2=($)=>V2(B1({},"__esModule",{value:!0}),$),L4={};B2(L4,{AdaptiveRetryStrategy:()=>f2,ConfiguredRetryStrategy:()=>q2,DEFAULT_MAX_ATTEMPTS:()=>D$,DEFAULT_RETRY_DELAY_BASE:()=>u0,DEFAULT_RETRY_MODE:()=>T2,DefaultRateLimiter:()=>Q4,INITIAL_RETRY_TOKENS:()=>b$,INVOCATION_ID_HEADER:()=>H2,MAXIMUM_RETRY_DELAY:()=>h$,NO_RETRY_INCREMENT:()=>R4,REQUEST_HEADER:()=>O2,RETRY_COST:()=>z4,RETRY_MODES:()=>w4,StandardRetryStrategy:()=>x$,THROTTLING_RETRY_DELAY_BASE:()=>F4,TIMEOUT_RETRY_COST:()=>J4});B4.exports=E2(L4);var w4=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(w4||{}),D$=3,T2="standard",A2=k$(),Y4=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(),A2.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))}};s(Y4,"DefaultRateLimiter");var Q4=Y4,u0=100,h$=20000,F4=500,b$=500,z4=5,J4=10,R4=1,H2="amz-sdk-invocation-id",O2="amz-sdk-request",C2=s(()=>{let $=u0;return{computeNextBackoffDelay:s((W)=>{return Math.floor(Math.min(h$,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:s((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),Z4=s(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:s(()=>U,"getRetryCount"),getRetryDelay:s(()=>Math.min(h$,$),"getRetryDelay"),getRetryCost:s(()=>G,"getRetryCost")}},"createDefaultRetryToken"),I4=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=b$,this.retryBackoffStrategy=C2(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return Z4({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"?F4:u0);const Z=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),L=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,Z):Z,w=this.getCapacityCost(X);return this.capacity-=w,Z4({retryDelay:L,retryCount:U.getRetryCount()+1,retryCost:w})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(b$,this.capacity+(U.getRetryCost()??R4))}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 ${D$}`),D$}}shouldRetry(U,G,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?J4:z4}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};s(I4,"StandardRetryStrategy");var x$=I4,K4=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=G??{};this.rateLimiter=W??new Q4,this.standardRetryStrategy=new x$(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)}};s(K4,"AdaptiveRetryStrategy");var f2=K4,M4=class $ extends x${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}};s(M4,"ConfiguredRetryStrategy");var q2=M4});var O4=M((T3,H4)=>{var{defineProperty:V1,getOwnPropertyDescriptor:N2,getOwnPropertyNames:j2}=Object,P2=Object.prototype.hasOwnProperty,_=($,U)=>V1($,"name",{value:U,configurable:!0}),S2=($,U)=>{for(var G in U)V1($,G,{get:U[G],enumerable:!0})},k2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of j2(U))if(!P2.call($,X)&&X!==G)V1($,X,{get:()=>U[X],enumerable:!(W=N2(U,X))||W.enumerable})}return $},D2=($)=>k2(V1({},"__esModule",{value:!0}),$),A4={};S2(A4,{constructStack:()=>v$});H4.exports=D2(A4);var J0=_(($,U)=>{const G=[];if($)G.push($);if(U)for(let W of U)G.push(W);return G},"getAllAliases"),G0=_(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),v$=_(()=>{let $=[],U=[],G=!1;const W=new Set,X=_((z)=>z.sort((J,R)=>E4[R.step]-E4[J.step]||T4[R.priority||"normal"]-T4[J.priority||"normal"]),"sort"),Z=_((z)=>{let J=!1;const R=_((I)=>{const V=J0(I.name,I.aliases);if(V.includes(z)){J=!0;for(let B of V)W.delete(B);return!1}return!0},"filterCb");return $=$.filter(R),U=U.filter(R),J},"removeByName"),L=_((z)=>{let J=!1;const R=_((I)=>{if(I.middleware===z){J=!0;for(let V of J0(I.name,I.aliases))W.delete(V);return!1}return!0},"filterCb");return $=$.filter(R),U=U.filter(R),J},"removeByReference"),w=_((z)=>{var J;return $.forEach((R)=>{z.add(R.middleware,{...R})}),U.forEach((R)=>{z.addRelativeTo(R.middleware,{...R})}),(J=z.identifyOnResolve)==null||J.call(z,F.identifyOnResolve()),z},"cloneTo"),Y=_((z)=>{const J=[];return z.before.forEach((R)=>{if(R.before.length===0&&R.after.length===0)J.push(R);else J.push(...Y(R))}),J.push(z),z.after.reverse().forEach((R)=>{if(R.before.length===0&&R.after.length===0)J.push(R);else J.push(...Y(R))}),J},"expandRelativeMiddlewareList"),Q=_((z=!1)=>{const J=[],R=[],I={};return $.forEach((B)=>{const E={...B,before:[],after:[]};for(let T of J0(E.name,E.aliases))I[T]=E;J.push(E)}),U.forEach((B)=>{const E={...B,before:[],after:[]};for(let T of J0(E.name,E.aliases))I[T]=E;R.push(E)}),R.forEach((B)=>{if(B.toMiddleware){const E=I[B.toMiddleware];if(E===void 0){if(z)return;throw new Error(`${B.toMiddleware} is not found when adding ${G0(B.name,B.aliases)} middleware ${B.relation} ${B.toMiddleware}`)}if(B.relation==="after")E.after.push(B);if(B.relation==="before")E.before.push(B)}}),X(J).map(Y).reduce((B,E)=>{return B.push(...E),B},[])},"getMiddlewareList"),F={add:(z,J={})=>{const{name:R,override:I,aliases:V}=J,B={step:"initialize",priority:"normal",middleware:z,...J},E=J0(R,V);if(E.length>0){if(E.some((T)=>W.has(T))){if(!I)throw new Error(`Duplicate middleware name '${G0(R,V)}'`);for(let T of E){const A=$.findIndex((S)=>{var h;return S.name===T||((h=S.aliases)==null?void 0:h.some((Q0)=>Q0===T))});if(A===-1)continue;const H=$[A];if(H.step!==B.step||B.priority!==H.priority)throw new Error(`"${G0(H.name,H.aliases)}" middleware with ${H.priority} priority in ${H.step} step cannot be overridden by "${G0(R,V)}" middleware with ${B.priority} priority in ${B.step} step.`);$.splice(A,1)}}for(let T of E)W.add(T)}$.push(B)},addRelativeTo:(z,J)=>{const{name:R,override:I,aliases:V}=J,B={middleware:z,...J},E=J0(R,V);if(E.length>0){if(E.some((T)=>W.has(T))){if(!I)throw new Error(`Duplicate middleware name '${G0(R,V)}'`);for(let T of E){const A=U.findIndex((S)=>{var h;return S.name===T||((h=S.aliases)==null?void 0:h.some((Q0)=>Q0===T))});if(A===-1)continue;const H=U[A];if(H.toMiddleware!==B.toMiddleware||H.relation!==B.relation)throw new Error(`"${G0(H.name,H.aliases)}" middleware ${H.relation} "${H.toMiddleware}" middleware cannot be overridden by "${G0(R,V)}" middleware ${B.relation} "${B.toMiddleware}" middleware.`);U.splice(A,1)}}for(let T of E)W.add(T)}U.push(B)},clone:()=>w(v$()),use:(z)=>{z.applyToStack(F)},remove:(z)=>{if(typeof z==="string")return Z(z);else return L(z)},removeByTag:(z)=>{let J=!1;const R=_((I)=>{const{tags:V,name:B,aliases:E}=I;if(V&&V.includes(z)){const T=J0(B,E);for(let A of T)W.delete(A);return J=!0,!1}return!0},"filterCb");return $=$.filter(R),U=U.filter(R),J},concat:(z)=>{var J;const R=w(v$());return R.use(z),R.identifyOnResolve(G||R.identifyOnResolve()||(((J=z.identifyOnResolve)==null?void 0:J.call(z))??!1)),R},applyToStack:w,identify:()=>{return Q(!0).map((z)=>{const J=z.step??z.relation+" "+z.toMiddleware;return G0(z.name,z.aliases)+" - "+J})},identifyOnResolve(z){if(typeof z==="boolean")G=z;return G},resolve:(z,J)=>{for(let R of Q().map((I)=>I.middleware).reverse())z=R(z,J);if(G)console.log(F.identify());return z}};return F},"constructStack"),E4={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},T4={high:3,normal:2,low:1}});var c$=M((A3,f4)=>{var{defineProperty:E1,getOwnPropertyDescriptor:b2,getOwnPropertyNames:h2}=Object,x2=Object.prototype.hasOwnProperty,v2=($,U)=>E1($,"name",{value:U,configurable:!0}),c2=($,U)=>{for(var G in U)E1($,G,{get:U[G],enumerable:!0})},y2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of h2(U))if(!x2.call($,X)&&X!==G)E1($,X,{get:()=>U[X],enumerable:!(W=b2(U,X))||W.enumerable})}return $},u2=($)=>y2(E1({},"__esModule",{value:!0}),$),C4={};c2(C4,{isArrayBuffer:()=>_2});f4.exports=u2(C4);var _2=v2(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var _0=M((H3,j4)=>{var{defineProperty:T1,getOwnPropertyDescriptor:d2,getOwnPropertyNames:g2}=Object,p2=Object.prototype.hasOwnProperty,q4=($,U)=>T1($,"name",{value:U,configurable:!0}),l2=($,U)=>{for(var G in U)T1($,G,{get:U[G],enumerable:!0})},s2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of g2(U))if(!p2.call($,X)&&X!==G)T1($,X,{get:()=>U[X],enumerable:!(W=d2(U,X))||W.enumerable})}return $},m2=($)=>s2(T1({},"__esModule",{value:!0}),$),N4={};l2(N4,{fromArrayBuffer:()=>i2,fromString:()=>r2});j4.exports=m2(N4);var n2=c$(),y$=import.meta.require("buffer"),i2=q4(($,U=0,G=$.byteLength-U)=>{if(!n2.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return y$.Buffer.from($,U,G)},"fromArrayBuffer"),r2=q4(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?y$.Buffer.from($,U):y$.Buffer.from($)},"fromString")});var k4=M((P4)=>{Object.defineProperty(P4,"__esModule",{value:!0});P4.fromBase64=void 0;var o2=_0(),a2=/^[A-Za-z0-9+/]*={0,2}$/,t2=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!a2.exec($))throw new TypeError("Invalid base64 string.");const U=o2.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};P4.fromBase64=t2});var W0=M((C3,x4)=>{var{defineProperty:A1,getOwnPropertyDescriptor:e2,getOwnPropertyNames:$9}=Object,U9=Object.prototype.hasOwnProperty,u$=($,U)=>A1($,"name",{value:U,configurable:!0}),G9=($,U)=>{for(var G in U)A1($,G,{get:U[G],enumerable:!0})},W9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of $9(U))if(!U9.call($,X)&&X!==G)A1($,X,{get:()=>U[X],enumerable:!(W=e2(U,X))||W.enumerable})}return $},X9=($)=>W9(A1({},"__esModule",{value:!0}),$),D4={};G9(D4,{fromUtf8:()=>h4,toUint8Array:()=>Z9,toUtf8:()=>L9});x4.exports=X9(D4);var b4=_0(),h4=u$(($)=>{const U=b4.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Z9=u$(($)=>{if(typeof $==="string")return h4($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),L9=u$(($)=>{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 b4.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var y4=M((v4)=>{Object.defineProperty(v4,"__esModule",{value:!0});v4.toBase64=void 0;var w9=_0(),Y9=W0(),Q9=($)=>{let U;if(typeof $==="string")U=Y9.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 w9.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};v4.toBase64=Q9});var O1=M((q3,H1)=>{var{defineProperty:u4,getOwnPropertyDescriptor:F9,getOwnPropertyNames:z9}=Object,J9=Object.prototype.hasOwnProperty,_$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of z9(U))if(!J9.call($,X)&&X!==G)u4($,X,{get:()=>U[X],enumerable:!(W=F9(U,X))||W.enumerable})}return $},_4=($,U,G)=>(_$($,U,"default"),G&&_$(G,U,"default")),R9=($)=>_$(u4({},"__esModule",{value:!0}),$),d$={};H1.exports=R9(d$);_4(d$,k4(),H1.exports);_4(d$,y4(),H1.exports)});var p4=M((d4)=>{Object.defineProperty(d4,"__esModule",{value:!0});d4.getAwsChunkedEncodingStream=void 0;var I9=import.meta.require("stream"),K9=($,U)=>{const{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:X,checksumLocationName:Z,streamHasher:L}=U,w=G!==void 0&&X!==void 0&&Z!==void 0&&L!==void 0,Y=w?L(X,$):void 0,Q=new I9.Readable({read:()=>{}});return $.on("data",(F)=>{const z=W(F)||0;Q.push(`${z.toString(16)}\r\n`),Q.push(F),Q.push("\r\n")}),$.on("end",async()=>{if(Q.push("0\r\n"),w){const F=G(await Y);Q.push(`${Z}:${F}\r\n`),Q.push("\r\n")}Q.push(null)}),Q};d4.getAwsChunkedEncodingStream=K9});var p$=M((j3,m4)=>{var{defineProperty:C1,getOwnPropertyDescriptor:M9,getOwnPropertyNames:B9}=Object,V9=Object.prototype.hasOwnProperty,g$=($,U)=>C1($,"name",{value:U,configurable:!0}),E9=($,U)=>{for(var G in U)C1($,G,{get:U[G],enumerable:!0})},T9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of B9(U))if(!V9.call($,X)&&X!==G)C1($,X,{get:()=>U[X],enumerable:!(W=M9(U,X))||W.enumerable})}return $},A9=($)=>T9(C1({},"__esModule",{value:!0}),$),l4={};E9(l4,{escapeUri:()=>s4,escapeUriPath:()=>O9});m4.exports=A9(l4);var s4=g$(($)=>encodeURIComponent($).replace(/[!'()*]/g,H9),"escapeUri"),H9=g$(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),O9=g$(($)=>$.split("/").map(s4).join("/"),"escapeUriPath")});var s$=M((P3,r4)=>{var i4=function($){const U=[];for(let G of Object.keys($).sort()){const W=$[G];if(G=l$.escapeUri(G),Array.isArray(W))for(let X=0,Z=W.length;X<Z;X++)U.push(`${G}=${l$.escapeUri(W[X])}`);else{let X=G;if(W||typeof W==="string")X+=`=${l$.escapeUri(W)}`;U.push(X)}}return U.join("&")},f1=Object.defineProperty,C9=Object.getOwnPropertyDescriptor,f9=Object.getOwnPropertyNames,q9=Object.prototype.hasOwnProperty,N9=($,U)=>f1($,"name",{value:U,configurable:!0}),j9=($,U)=>{for(var G in U)f1($,G,{get:U[G],enumerable:!0})},P9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of f9(U))if(!q9.call($,X)&&X!==G)f1($,X,{get:()=>U[X],enumerable:!(W=C9(U,X))||W.enumerable})}return $},S9=($)=>P9(f1({},"__esModule",{value:!0}),$),n4={};j9(n4,{buildQueryString:()=>i4});r4.exports=S9(n4);var l$=p$();N9(i4,"buildQueryString")});var I6=M((S3,R6)=>{async function i$($,U,G=t4){const W=U.headers??{},X=W.Expect||W.expect;let Z=-1,L=!1;if(X==="100-continue")await Promise.race([new Promise((w)=>{Z=Number(setTimeout(w,Math.max(t4,G)))}),new Promise((w)=>{$.on("continue",()=>{clearTimeout(Z),w()}),$.on("error",()=>{L=!0,clearTimeout(Z),w()})})]);if(!L)L6($,U.body)}var L6=function($,U){if(U instanceof Z6.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 J6($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:w,value:Y}=await G.read();if(Y)U.push(Y),X+=Y.length;W=w}const Z=new Uint8Array(X);let L=0;for(let w of U)Z.set(w,L),L+=w.length;return Z}var{create:k9,defineProperty:d0,getOwnPropertyDescriptor:D9,getOwnPropertyNames:b9,getPrototypeOf:h9}=Object,x9=Object.prototype.hasOwnProperty,O=($,U)=>d0($,"name",{value:U,configurable:!0}),v9=($,U)=>{for(var G in U)d0($,G,{get:U[G],enumerable:!0})},$6=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of b9(U))if(!x9.call($,X)&&X!==G)d0($,X,{get:()=>U[X],enumerable:!(W=D9(U,X))||W.enumerable})}return $},c9=($,U,G)=>(G=$!=null?k9(h9($)):{},$6(U||!$||!$.__esModule?d0(G,"default",{value:$,enumerable:!0}):G,$)),y9=($)=>$6(d0({},"__esModule",{value:!0}),$),U6={};v9(U6,{DEFAULT_REQUEST_TIMEOUT:()=>l9,NodeHttp2Handler:()=>r9,NodeHttpHandler:()=>s9,streamCollector:()=>a9});R6.exports=y9(U6);var G6=a(),W6=s$(),m$=import.meta.require("http"),n$=import.meta.require("https"),u9=["ECONNRESET","EPIPE","ETIMEDOUT"],X6=O(($)=>{const U={};for(let G of Object.keys($)){const W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),o4=1000,_9=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((w)=>{if(w==null?void 0:w.connecting)w.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,o4),o4)},"setConnectionTimeout"),d9=3000,g9=O(($,{keepAlive:U,keepAliveMsecs:G},W=d9)=>{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"),a4=3000,p9=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:a4),a4)},"setSocketTimeout"),Z6=import.meta.require("stream"),t4=1000;O(i$,"writeRequestBody");O(L6,"writeBody");var l9=0,w6=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:w,requests:Y,maxSockets:Q}=U;if(typeof Q!=="number"||Q===Infinity)return G;const F=15000;if(Date.now()-F<G)return G;if(w&&Y)for(let z in w){const J=((X=w[z])==null?void 0:X.length)??0,R=((Z=Y[z])==null?void 0:Z.length)??0;if(J>=Q&&R>=2*Q)return(L=W==null?void 0:W.warn)==null||L.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${J} and ${R} additional requests are enqueued.
|
|
2
|
-
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
-
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return 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 m$.Agent||typeof(Z==null?void 0:Z.destroy)==="function")return Z;return new m$.Agent({keepAlive:!0,maxSockets:50,...Z})})(),httpsAgent:(()=>{if(L instanceof n$.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new n$.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=[],w=O(async(A)=>{await Z,L.forEach(clearTimeout),W(A)},"resolve"),Y=O(async(A)=>{await Z,L.forEach(clearTimeout),X(A)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const A=new Error("Request aborted");A.name="AbortError",Y(A);return}const Q=U.protocol==="https:",F=Q?this.config.httpsAgent:this.config.httpAgent;L.push(setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const z=W6.buildQueryString(U.query||{});let J=void 0;if(U.username!=null||U.password!=null){const A=U.username??"",H=U.password??"";J=`${A}:${H}`}let R=U.path;if(z)R+=`?${z}`;if(U.fragment)R+=`#${U.fragment}`;let I=U.hostname??"";if(I[0]==="["&&I.endsWith("]"))I=U.hostname.slice(1,-1);else I=U.hostname;const V={headers:U.headers,host:I,method:U.method,path:R,port:U.port,agent:F,auth:J},E=(Q?n$.request:m$.request)(V,(A)=>{const H=new G6.HttpResponse({statusCode:A.statusCode||-1,reason:A.statusMessage,headers:X6(A.headers),body:A});w({response:H})});if(E.on("error",(A)=>{if(u9.includes(A.code))Y(Object.assign(A,{name:"TimeoutError"}));else Y(A)}),G){const A=O(()=>{E.destroy();const H=new Error("Request aborted");H.name="AbortError",Y(H)},"onAbort");if(typeof G.addEventListener==="function"){const H=G;H.addEventListener("abort",A,{once:!0}),E.once("close",()=>H.removeEventListener("abort",A))}else G.onabort=A}L.push(_9(E,Y,this.config.connectionTimeout)),L.push(p9(E,Y,this.config.requestTimeout));const T=V.agent;if(typeof T==="object"&&"keepAlive"in T)L.push(g9(E,{keepAlive:T.keepAlive,keepAliveMsecs:T.keepAliveMsecs}));Z=i$(E,U,this.config.requestTimeout).catch((A)=>{return L.forEach(clearTimeout),X(A)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};O(w6,"NodeHttpHandler");var s9=w6,e4=import.meta.require("http2"),m9=c9(import.meta.require("http2")),Y6=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(Y6,"NodeHttp2ConnectionPool");var n9=Y6,Q6=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 Y=X.poll();if(Y&&!this.config.disableConcurrency)return Y}const Z=m9.default.connect(W);if(this.config.maxConcurrency)Z.settings({maxConcurrentStreams:this.config.maxConcurrency},(Y)=>{if(Y)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});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 w=this.sessionCache.get(W)||new n9;return w.offerLast(Z),this.sessionCache.set(W,w),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(Q6,"NodeHttp2ConnectionManager");var i9=Q6,F6=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new i9({}),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 w;let Y=!1,Q=void 0;const F=O(async(N)=>{await Q,Z(N)},"resolve"),z=O(async(N)=>{await Q,L(N)},"reject");if(G==null?void 0:G.aborted){Y=!0;const N=new Error("Request aborted");N.name="AbortError",z(N);return}const{hostname:J,method:R,port:I,protocol:V,query:B}=U;let E="";if(U.username!=null||U.password!=null){const N=U.username??"",g=U.password??"";E=`${N}:${g}@`}const T=`${V}//${E}${J}${I?`:${I}`:""}`,A={destination:new URL(T)},H=this.connectionManager.lease(A,{requestTimeout:(w=this.config)==null?void 0:w.sessionTimeout,disableConcurrentStreams:X||!1}),S=O((N)=>{if(X)this.destroySession(H);Y=!0,z(N)},"rejectWithDestroy"),h=W6.buildQueryString(B||{});let Q0=U.path;if(h)Q0+=`?${h}`;if(U.fragment)Q0+=`#${U.fragment}`;const c=H.request({...U.headers,[e4.constants.HTTP2_HEADER_PATH]:Q0,[e4.constants.HTTP2_HEADER_METHOD]:R});if(H.ref(),c.on("response",(N)=>{const g=new G6.HttpResponse({statusCode:N[":status"]||-1,headers:X6(N),body:c});if(Y=!0,F({response:g}),X)H.close(),this.connectionManager.deleteSession(T,H)}),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 g=new Error("Request aborted");g.name="AbortError",S(g)},"onAbort");if(typeof G.addEventListener==="function"){const g=G;g.addEventListener("abort",N,{once:!0}),c.once("close",()=>g.removeEventListener("abort",N))}else G.onabort=N}c.on("frameError",(N,g,bL)=>{S(new Error(`Frame type id ${N} in stream id ${bL} has failed with code ${g}.`))}),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(H.unref(),X)H.destroy();if(!Y)S(new Error("Unexpected error: http2 request did not get a response"))}),Q=i$(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(F6,"NodeHttp2Handler");var r9=F6,z6=class $ extends Z6.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};O(z6,"Collector");var o9=z6,a9=O(($)=>{if(t9($))return J6($);return new Promise((U,G)=>{const W=new o9;$.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"),t9=O(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");O(J6,"collectReadableStream")});var O6=M((k3,H6)=>{var B6=function($=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 E6($){const U=await A6($),G=wQ.fromBase64(U);return new Uint8Array(G)}async function T6($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:w,value:Y}=await G.read();if(Y)U.push(Y),X+=Y.length;W=w}const Z=new Uint8Array(X);let L=0;for(let w of U)Z.set(w,L),L+=w.length;return Z}var A6=function($){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($)})},N1=Object.defineProperty,e9=Object.getOwnPropertyDescriptor,$Q=Object.getOwnPropertyNames,UQ=Object.prototype.hasOwnProperty,t=($,U)=>N1($,"name",{value:U,configurable:!0}),GQ=($,U)=>{for(var G in U)N1($,G,{get:U[G],enumerable:!0})},WQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of $Q(U))if(!UQ.call($,X)&&X!==G)N1($,X,{get:()=>U[X],enumerable:!(W=e9(U,X))||W.enumerable})}return $},XQ=($)=>WQ(N1({},"__esModule",{value:!0}),$),M6={};GQ(M6,{FetchHttpHandler:()=>LQ,keepAliveSupport:()=>q1,streamCollector:()=>YQ});H6.exports=XQ(M6);var K6=a(),ZQ=s$();t(B6,"requestTimeout");var q1={supported:void 0},V6=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(q1.supported===void 0)q1.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 w=U.path;const Y=ZQ.buildQueryString(U.query||{});if(Y)w+=`?${Y}`;if(U.fragment)w+=`#${U.fragment}`;let Q="";if(U.username!=null||U.password!=null){const T=U.username??"",A=U.password??"";Q=`${T}:${A}@`}const{port:F,method:z}=U,J=`${U.protocol}//${Q}${U.hostname}${F?`:${F}`:""}${w}`,R=z==="GET"||z==="HEAD"?void 0:U.body,I={body:R,headers:new Headers(U.headers),method:z,credentials:L};if((W=this.config)==null?void 0:W.cache)I.cache=this.config.cache;if(R)I.duplex="half";if(typeof AbortController!=="undefined")I.signal=G;if(q1.supported)I.keepalive=Z;if(typeof this.config.requestInit==="function")Object.assign(I,this.config.requestInit(U));let V=t(()=>{},"removeSignalEventListener");const B=new Request(J,I),E=[fetch(B).then((T)=>{const A=T.headers,H={};for(let h of A.entries())H[h[0]]=h[1];if(T.body==null)return T.blob().then((h)=>({response:new K6.HttpResponse({headers:H,reason:T.statusText,statusCode:T.status,body:h})}));return{response:new K6.HttpResponse({headers:H,reason:T.statusText,statusCode:T.status,body:T.body})}}),B6(X)];if(G)E.push(new Promise((T,A)=>{const H=t(()=>{const S=new Error("Request aborted");S.name="AbortError",A(S)},"onAbort");if(typeof G.addEventListener==="function"){const S=G;S.addEventListener("abort",H,{once:!0}),V=t(()=>S.removeEventListener("abort",H),"removeSignalEventListener")}else G.onabort=H}));return Promise.race(E).finally(V)}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return W[U]=G,W})}httpHandlerConfigs(){return this.config??{}}};t(V6,"FetchHttpHandler");var LQ=V6,wQ=O1(),YQ=t(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return E6($);return T6($)},"streamCollector");t(E6,"collectBlob");t(T6,"collectStream");t(A6,"readToBase64")});var g0=M((C6)=>{Object.defineProperty(C6,"__esModule",{value:!0});C6.isReadableStream=void 0;var QQ=($)=>{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)};C6.isReadableStream=QQ});var D6=M((S6)=>{Object.defineProperty(S6,"__esModule",{value:!0});S6.sdkStreamMixin=void 0;var FQ=O6(),zQ=O1(),JQ=P6(),RQ=W0(),q6=g0(),N6="The stream has already been transformed.",IQ=($)=>{var U,G;if(!j6($)&&!q6.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(N6);return W=!0,await FQ.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 w=await X();if(L==="base64")return zQ.toBase64(w);else if(L==="hex")return JQ.toHex(w);else if(L===void 0||L==="utf8"||L==="utf-8")return RQ.toUtf8(w);else if(typeof TextDecoder==="function")return new TextDecoder(L).decode(w);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(N6);if(W=!0,j6($))return Z($);else if(q6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};S6.sdkStreamMixin=IQ;var j6=($)=>typeof Blob==="function"&&$ instanceof Blob});var v6=M((h6)=>{Object.defineProperty(h6,"__esModule",{value:!0});h6.sdkStreamMixin=void 0;var KQ=I6(),MQ=_0(),r$=import.meta.require("stream"),BQ=import.meta.require("util"),VQ=D6(),b6="The stream has already been transformed.",EQ=($)=>{var U,G;if(!($ instanceof r$.Readable))try{return VQ.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(b6);return W=!0,await KQ.streamCollector($)};return Object.assign($,{transformToByteArray:X,transformToString:async(Z)=>{const L=await X();if(Z===void 0||Buffer.isEncoding(Z))return MQ.fromArrayBuffer(L.buffer,L.byteOffset,L.byteLength).toString(Z);else return new BQ.TextDecoder(Z).decode(L)},transformToWebStream:()=>{if(W)throw new Error(b6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof r$.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,r$.Readable.toWeb($)}})};h6.sdkStreamMixin=EQ});var u6=M((c6)=>{async function TQ($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(c6,"__esModule",{value:!0});c6.splitStream=void 0;c6.splitStream=TQ});var p6=M((d6)=>{async function OQ($){if(HQ.isReadableStream($))return AQ.splitStream($);const U=new _6.PassThrough,G=new _6.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(d6,"__esModule",{value:!0});d6.splitStream=void 0;var _6=import.meta.require("stream"),AQ=u6(),HQ=g0();d6.splitStream=OQ});var m6=M((l6)=>{async function CQ($,U){var G;let W=0;const X=[],Z=$.getReader();let L=!1;while(!L){const{done:Q,value:F}=await Z.read();if(F)X.push(F),W+=(G=F===null||F===void 0?void 0:F.byteLength)!==null&&G!==void 0?G:0;if(W>=U)break;L=Q}Z.releaseLock();const w=new Uint8Array(Math.min(U,W));let Y=0;for(let Q of X){if(Q.byteLength>w.byteLength-Y){w.set(Q.subarray(0,w.byteLength-Y),Y);break}else w.set(Q,Y);Y+=Q.length}return w}Object.defineProperty(l6,"__esModule",{value:!0});l6.headStream=void 0;l6.headStream=CQ});var o6=M((i6)=>{Object.defineProperty(i6,"__esModule",{value:!0});i6.headStream=void 0;var fQ=import.meta.require("stream"),qQ=m6(),NQ=g0(),jQ=($,U)=>{if(NQ.isReadableStream($))return qQ.headStream($,U);return new Promise((G,W)=>{const X=new n6;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)})})};i6.headStream=jQ;class n6 extends fQ.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,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 GW=M((u3,I0)=>{var e6=function($,U="utf-8"){if(U==="base64")return a6.toBase64($);return t6.toUtf8($)},$W=function($,U){if(U==="base64")return a$.mutate(a6.fromBase64($));return a$.mutate(t6.fromUtf8($))},j1=Object.defineProperty,PQ=Object.getOwnPropertyDescriptor,SQ=Object.getOwnPropertyNames,kQ=Object.prototype.hasOwnProperty,t$=($,U)=>j1($,"name",{value:U,configurable:!0}),DQ=($,U)=>{for(var G in U)j1($,G,{get:U[G],enumerable:!0})},o$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of SQ(U))if(!kQ.call($,X)&&X!==G)j1($,X,{get:()=>U[X],enumerable:!(W=PQ(U,X))||W.enumerable})}return $},p0=($,U,G)=>(o$($,U,"default"),G&&o$(G,U,"default")),bQ=($)=>o$(j1({},"__esModule",{value:!0}),$),R0={};DQ(R0,{Uint8ArrayBlobAdapter:()=>a$});I0.exports=bQ(R0);var a6=O1(),t6=W0();t$(e6,"transformToString");t$($W,"transformFromString");var UW=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return $W(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 e6(this,U)}};t$(UW,"Uint8ArrayBlobAdapter");var a$=UW;p0(R0,p4(),I0.exports);p0(R0,v6(),I0.exports);p0(R0,p6(),I0.exports);p0(R0,o6(),I0.exports);p0(R0,g0(),I0.exports)});var N0=M((_3,fW)=>{var MW=function($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),X=$.getUTCDate(),Z=$.getUTCHours(),L=$.getUTCMinutes(),w=$.getUTCSeconds(),Y=X<10?`0${X}`:`${X}`,Q=Z<10?`0${Z}`:`${Z}`,F=L<10?`0${L}`:`${L}`,z=w<10?`0${w}`:`${w}`;return`${w7[W]}, ${Y} ${QU[G]} ${U} ${Q}:${F}:${z} GMT`},k1=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})},FU=function($,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,_7(W,X,Z);else Z=U;for(let L of Object.keys(Z)){if(!Array.isArray(Z[L])){W[L]=Z[L];continue}OW(W,null,Z,L)}return W},CW=function($,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},D1=Object.defineProperty,hQ=Object.getOwnPropertyDescriptor,xQ=Object.getOwnPropertyNames,vQ=Object.prototype.hasOwnProperty,K=($,U)=>D1($,"name",{value:U,configurable:!0}),cQ=($,U)=>{for(var G in U)D1($,G,{get:U[G],enumerable:!0})},yQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of xQ(U))if(!vQ.call($,X)&&X!==G)D1($,X,{get:()=>U[X],enumerable:!(W=hQ(U,X))||W.enumerable})}return $},uQ=($)=>yQ(D1({},"__esModule",{value:!0}),$),XW={};cQ(XW,{Client:()=>dQ,Command:()=>QW,LazyJsonString:()=>c7,NoOpLogger:()=>_Q,SENSITIVE_STRING:()=>lQ,ServiceException:()=>f7,StringWrapper:()=>i0,_json:()=>ZU,collectBody:()=>gQ,convertMap:()=>y7,createAggregatedClient:()=>sQ,dateToUtcString:()=>MW,decorateServiceException:()=>VW,emitWarningIfUnsupportedVersion:()=>P7,expectBoolean:()=>nQ,expectByte:()=>XU,expectFloat32:()=>P1,expectInt:()=>rQ,expectInt32:()=>GU,expectLong:()=>m0,expectNonNull:()=>aQ,expectNumber:()=>s0,expectObject:()=>zW,expectShort:()=>WU,expectString:()=>tQ,expectUnion:()=>eQ,extendedEncodeURIComponent:()=>k1,getArrayIfSingleItem:()=>v7,getDefaultClientConfiguration:()=>h7,getDefaultExtensionConfiguration:()=>TW,getValueFromTextNode:()=>AW,handleFloat:()=>G7,limitedParseDouble:()=>YU,limitedParseFloat:()=>W7,limitedParseFloat32:()=>X7,loadConfigsForDefaultMode:()=>j7,logger:()=>n0,map:()=>FU,parseBoolean:()=>mQ,parseEpochTimestamp:()=>M7,parseRfc3339DateTime:()=>Q7,parseRfc3339DateTimeWithOffset:()=>z7,parseRfc7231DateTime:()=>K7,resolveDefaultRuntimeConfig:()=>x7,resolvedPath:()=>p7,serializeDateTime:()=>s7,serializeFloat:()=>l7,splitEvery:()=>CW,strictParseByte:()=>KW,strictParseDouble:()=>wU,strictParseFloat:()=>$7,strictParseFloat32:()=>JW,strictParseInt:()=>Z7,strictParseInt32:()=>L7,strictParseLong:()=>IW,strictParseShort:()=>C0,take:()=>u7,throwDefaultError:()=>EW,withBaseException:()=>q7});fW.exports=uQ(XW);var ZW=class ${trace(){}debug(){}info(){}warn(){}error(){}};K(ZW,"NoOpLogger");var _Q=ZW,LW=O4(),wW=class ${constructor(U){this.config=U,this.middlewareStack=LW.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 w;if(L){if(!this.handlers)this.handlers=new WeakMap;const Y=this.handlers;if(Y.has(U.constructor))w=Y.get(U.constructor);else w=U.resolveMiddleware(this.middlewareStack,this.config,X),Y.set(U.constructor,w)}else delete this.handlers,w=U.resolveMiddleware(this.middlewareStack,this.config,X);if(Z)w(U).then((Y)=>Z(null,Y.output),(Y)=>Z(Y)).catch(()=>{});else return w(U).then((Y)=>Y.output)}destroy(){var U,G,W;(W=(G=(U=this.config)==null?void 0:U.requestHandler)==null?void 0:G.destroy)==null||W.call(G),delete this.handlers}};K(wW,"Client");var dQ=wW,e$=GW(),gQ=K(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return e$.Uint8ArrayBlobAdapter.mutate($);if(!$)return e$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const G=U.streamCollector($);return e$.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),UU=T0(),YW=class ${constructor(){this.middlewareStack=LW.constructStack()}static classBuilder(){return new pQ}resolveMiddlewareWithContext(U,G,W,{middlewareFn:X,clientName:Z,commandName:L,inputFilterSensitiveLog:w,outputFilterSensitiveLog:Y,smithyContext:Q,additionalContext:F,CommandCtor:z}){for(let B of X.bind(this)(z,U,G,W))this.middlewareStack.use(B);const J=U.concat(this.middlewareStack),{logger:R}=G,I={logger:R,clientName:Z,commandName:L,inputFilterSensitiveLog:w,outputFilterSensitiveLog:Y,[UU.SMITHY_CONTEXT_KEY]:{commandInstance:this,...Q},...F},{requestHandler:V}=G;return J.resolve((B)=>V.handle(B.request,W||{}),I)}};K(YW,"Command");var QW=YW,FW=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 QW{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(FW,"ClassBuilder");var pQ=FW,lQ="***SensitiveInformation***",sQ=K(($,U)=>{for(let G of Object.keys($)){const W=$[G],X=K(async function(L,w,Y){const Q=new W(L);if(typeof w==="function")this.send(Q,w);else if(typeof Y==="function"){if(typeof w!=="object")throw new Error(`Expected http options but got ${typeof w}`);this.send(Q,w||{},Y)}else return this.send(Q,w)},"methodImpl"),Z=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[Z]=X}},"createAggregatedClient"),mQ=K(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),nQ=K(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)n0.warn(S1(`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(S1(`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(S1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),iQ=Math.ceil(340282346638528860000000000000000000000),P1=K(($)=>{const U=s0($);if(U!==void 0&&!Number.isNaN(U)&&U!==Infinity&&U!==(-Infinity)){if(Math.abs(U)>iQ)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"),rQ=m0,GU=K(($)=>LU($,32),"expectInt32"),WU=K(($)=>LU($,16),"expectShort"),XU=K(($)=>LU($,8),"expectByte"),LU=K(($,U)=>{const G=m0($);if(G!==void 0&&oQ(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),oQ=K(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),aQ=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"),zW=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"),tQ=K(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return n0.warn(S1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),eQ=K(($)=>{if($===null||$===void 0)return;const U=zW($),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"),wU=K(($)=>{if(typeof $=="string")return s0(q0($));return s0($)},"strictParseDouble"),$7=wU,JW=K(($)=>{if(typeof $=="string")return P1(q0($));return P1($)},"strictParseFloat32"),U7=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,q0=K(($)=>{const U=$.match(U7);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 RW($);return s0($)},"limitedParseDouble"),G7=YU,W7=YU,X7=K(($)=>{if(typeof $=="string")return RW($);return P1($)},"limitedParseFloat32"),RW=K(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),IW=K(($)=>{if(typeof $==="string")return m0(q0($));return m0($)},"strictParseLong"),Z7=IW,L7=K(($)=>{if(typeof $==="string")return GU(q0($));return GU($)},"strictParseInt32"),C0=K(($)=>{if(typeof $==="string")return WU(q0($));return WU($)},"strictParseShort"),KW=K(($)=>{if(typeof $==="string")return XU(q0($));return XU($)},"strictParseByte"),S1=K(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),n0={warn:console.warn},w7=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],QU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];K(MW,"dateToUtcString");var Y7=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Q7=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=Y7.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,L,w,Y,Q]=U,F=C0(f0(W)),z=r(X,"month",1,12),J=r(Z,"day",1,31);return l0(F,z,J,{hours:L,minutes:w,seconds:Y,fractionalMilliseconds:Q})},"parseRfc3339DateTime"),F7=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),z7=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=F7.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,L,w,Y,Q,F]=U,z=C0(f0(W)),J=r(X,"month",1,12),R=r(Z,"day",1,31),I=l0(z,J,R,{hours:L,minutes:w,seconds:Y,fractionalMilliseconds:Q});if(F.toUpperCase()!="Z")I.setTime(I.getTime()-C7(F));return I},"parseRfc3339DateTimeWithOffset"),J7=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$/),R7=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$/),I7=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})$/),K7=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=J7.exec($);if(U){const[G,W,X,Z,L,w,Y,Q]=U;return l0(C0(f0(Z)),$U(X),r(W,"day",1,31),{hours:L,minutes:w,seconds:Y,fractionalMilliseconds:Q})}if(U=R7.exec($),U){const[G,W,X,Z,L,w,Y,Q]=U;return E7(l0(B7(Z),$U(X),r(W,"day",1,31),{hours:L,minutes:w,seconds:Y,fractionalMilliseconds:Q}))}if(U=I7.exec($),U){const[G,W,X,Z,L,w,Y,Q]=U;return l0(C0(f0(Q)),$U(W),r(X.trimLeft(),"day",1,31),{hours:Z,minutes:L,seconds:w,fractionalMilliseconds:Y})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),M7=K(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=wU($);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===Infinity||U===(-Infinity))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 A7($,X,G),new Date(Date.UTC($,X,G,r(W.hours,"hour",0,23),r(W.minutes,"minute",0,59),r(W.seconds,"seconds",0,60),O7(W.fractionalMilliseconds)))},"buildDate"),B7=K(($)=>{const U=(new Date()).getUTCFullYear(),G=Math.floor(U/100)*100+C0(f0($));if(G<U)return G+100;return G},"parseTwoDigitYear"),V7=1576800000000,E7=K(($)=>{if($.getTime()-(new Date()).getTime()>V7)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),$U=K(($)=>{const U=QU.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),T7=[31,28,31,30,31,30,31,31,30,31,30,31],A7=K(($,U,G)=>{let W=T7[U];if(U===1&&H7($))W=29;if(G>W)throw new TypeError(`Invalid day for ${QU[U]} in ${$}: ${G}`)},"validateDayOfMonth"),H7=K(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),r=K(($,U,G,W)=>{const X=KW(f0($));if(X<G||X>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return X},"parseDateValue"),O7=K(($)=>{if($===null||$===void 0)return 0;return JW("0."+$)*1000},"parseMilliseconds"),C7=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"),f0=K(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),BW=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(BW,"ServiceException");var f7=BW,VW=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"),EW=K(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{const X=N7($),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 VW(L,U)},"throwDefaultError"),q7=K(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{EW({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),N7=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"),j7=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"),WW=!1,P7=K(($)=>{if($&&!WW&&parseInt($.substring(1,$.indexOf(".")))<16)WW=!0},"emitWarningIfUnsupportedVersion"),S7=K(($)=>{const U=[];for(let G in UU.AlgorithmId){const W=UU.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"),k7=K(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),D7=K(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),b7=K(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),TW=K(($)=>{return{...S7($),...D7($)}},"getDefaultExtensionConfiguration"),h7=TW,x7=K(($)=>{return{...k7($),...b7($)}},"resolveDefaultRuntimeConfig");K(k1,"extendedEncodeURIComponent");var v7=K(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),AW=K(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=AW($[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 HW=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(HW,"LazyJsonString");var c7=HW;K(FU,"map");var y7=K(($)=>{const U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),u7=K(($,U)=>{const G={};for(let W in U)OW(G,$,U,W);return G},"take"),_7=K(($,U,G)=>{return FU($,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"),OW=K(($,U,G,W)=>{if(U!==null){let L=G[W];if(typeof L==="function")L=[,L];const[w=d7,Y=g7,Q=W]=L;if(typeof w==="function"&&w(U[Q])||typeof w!=="function"&&!!w)$[W]=Y(U[Q]);return}let[X,Z]=G[W];if(typeof Z==="function"){let L;const w=X===void 0&&(L=Z())!=null,Y=typeof X==="function"&&!!X(void 0)||typeof X!=="function"&&!!X;if(w)$[W]=L;else if(Y)$[W]=Z()}else{const L=X===void 0&&Z!=null,w=typeof X==="function"&&!!X(Z)||typeof X!=="function"&&!!X;if(L||w)$[W]=Z}},"applyInstruction"),d7=K(($)=>$!=null,"nonNullish"),g7=K(($)=>$,"pass"),p7=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((w)=>k1(w)).join("/"):k1(L))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),l7=K(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),s7=K(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),ZU=K(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(ZU);if(typeof $==="object"){const U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=ZU($[G])}return U}return $},"_json");K(CW,"splitEvery")});var jW=M((qW)=>{Object.defineProperty(qW,"__esModule",{value:!0});qW.isStreamingPayload=void 0;var m7=import.meta.require("stream"),n7=($)=>($===null||$===void 0?void 0:$.body)instanceof m7.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;qW.isStreamingPayload=n7});var mW=M((p3,sW)=>{var{defineProperty:b1,getOwnPropertyDescriptor:i7,getOwnPropertyNames:r7}=Object,o7=Object.prototype.hasOwnProperty,P=($,U)=>b1($,"name",{value:U,configurable:!0}),a7=($,U)=>{for(var G in U)b1($,G,{get:U[G],enumerable:!0})},t7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of r7(U))if(!o7.call($,X)&&X!==G)b1($,X,{get:()=>U[X],enumerable:!(W=i7(U,X))||W.enumerable})}return $},e7=($)=>t7(b1({},"__esModule",{value:!0}),$),SW={};a7(SW,{AdaptiveRetryStrategy:()=>GF,CONFIG_MAX_ATTEMPTS:()=>JU,CONFIG_RETRY_MODE:()=>uW,ENV_MAX_ATTEMPTS:()=>zU,ENV_RETRY_MODE:()=>yW,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>WF,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>ZF,StandardRetryStrategy:()=>vW,defaultDelayDecider:()=>DW,defaultRetryDecider:()=>bW,getOmitRetryHeadersPlugin:()=>LF,getRetryAfterHint:()=>lW,getRetryPlugin:()=>JF,omitRetryHeadersMiddleware:()=>_W,omitRetryHeadersMiddlewareOptions:()=>dW,resolveRetryConfig:()=>XF,retryMiddleware:()=>gW,retryMiddlewareOptions:()=>pW});sW.exports=e7(SW);var j0=a(),kW=M$(),q=V4(),$F=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 w=P((z)=>z.name==="TimeoutError"?Z:X,"getCapacityAmount"),Y=P((z)=>w(z)<=L,"hasRetryTokens");return Object.freeze({hasRetryTokens:Y,retrieveRetryTokens:P((z)=>{if(!Y(z))throw new Error("No retry token available");const J=w(z);return L-=J,J},"retrieveRetryTokens"),releaseRetryTokens:P((z)=>{L+=z??W,L=Math.min(L,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),DW=P(($,U)=>Math.floor(Math.min(q.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),X0=k$(),bW=P(($)=>{if(!$)return!1;return X0.isRetryableByTrait($)||X0.isClockSkewError($)||X0.isThrottlingError($)||X0.isTransientError($)},"defaultRetryDecider"),hW=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"),xW=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=q.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??bW,this.delayDecider=(G==null?void 0:G.delayDecider)??DW,this.retryQuota=(G==null?void 0:G.retryQuota)??$F(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 w=await this.getMaxAttempts(),{request:Y}=G;if(j0.HttpRequest.isInstance(Y))Y.headers[q.INVOCATION_ID_HEADER]=kW.v4();while(!0)try{if(j0.HttpRequest.isInstance(Y))Y.headers[q.REQUEST_HEADER]=`attempt=${Z+1}; max=${w}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();const{response:Q,output:F}=await U(G);if(W==null?void 0:W.afterRequest)W.afterRequest(Q);return this.retryQuota.releaseRetryTokens(X),F.$metadata.attempts=Z+1,F.$metadata.totalRetryDelay=L,{response:Q,output:F}}catch(Q){const F=hW(Q);if(Z++,this.shouldRetry(F,Z,w)){X=this.retryQuota.retrieveRetryTokens(F);const z=this.delayDecider(X0.isThrottlingError(F)?q.THROTTLING_RETRY_DELAY_BASE:q.DEFAULT_RETRY_DELAY_BASE,Z),J=UF(F.$response),R=Math.max(J||0,z);L+=R,await new Promise((I)=>setTimeout(I,R));continue}if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=Z,F.$metadata.totalRetryDelay=L,F}}};P(xW,"StandardRetryStrategy");var vW=xW,UF=P(($)=>{if(!j0.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"),cW=class $ extends vW{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(cW,"AdaptiveRetryStrategy");var GF=cW,PW=i(),zU="AWS_MAX_ATTEMPTS",JU="max_attempts",WF={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=$[JU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${JU} mast be a number, got "${U}"`);return G},default:q.DEFAULT_MAX_ATTEMPTS},XF=P(($)=>{const{retryStrategy:U}=$,G=PW.normalizeProvider($.maxAttempts??q.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await PW.normalizeProvider($.retryMode)()===q.RETRY_MODES.ADAPTIVE)return new q.AdaptiveRetryStrategy(G);return new q.StandardRetryStrategy(G)}}},"resolveRetryConfig"),yW="AWS_RETRY_MODE",uW="retry_mode",ZF={environmentVariableSelector:($)=>$[yW],configFileSelector:($)=>$[uW],default:q.DEFAULT_RETRY_MODE},_W=P(()=>($)=>async(U)=>{const{request:G}=U;if(j0.HttpRequest.isInstance(G))delete G.headers[q.INVOCATION_ID_HEADER],delete G.headers[q.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),dW={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},LF=P(($)=>({applyToStack:(U)=>{U.addRelativeTo(_W(),dW)}}),"getOmitRetryHeadersPlugin"),wF=N0(),YF=jW(),gW=P(($)=>(U,G)=>async(W)=>{var X;let Z=await $.retryStrategy();const L=await $.maxAttempts();if(QF(Z)){Z=Z;let w=await Z.acquireInitialRetryToken(G.partition_id),Y=new Error,Q=0,F=0;const{request:z}=W,J=j0.HttpRequest.isInstance(z);if(J)z.headers[q.INVOCATION_ID_HEADER]=kW.v4();while(!0)try{if(J)z.headers[q.REQUEST_HEADER]=`attempt=${Q+1}; max=${L}`;const{response:R,output:I}=await U(W);return Z.recordSuccess(w),I.$metadata.attempts=Q+1,I.$metadata.totalRetryDelay=F,{response:R,output:I}}catch(R){const I=FF(R);if(Y=hW(R),J&&YF.isStreamingPayload(z))throw(X=G.logger instanceof wF.NoOpLogger?console:G.logger)==null||X.warn("An error was encountered in a non-retryable streaming request."),Y;try{w=await Z.refreshRetryTokenForRetry(w,I)}catch(B){if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=Q+1,Y.$metadata.totalRetryDelay=F,Y}Q=w.getRetryCount();const V=w.getRetryDelay();F+=V,await new Promise((B)=>setTimeout(B,V))}}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"),QF=P(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),FF=P(($)=>{const U={error:$,errorType:zF($)},G=lW($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),zF=P(($)=>{if(X0.isThrottlingError($))return"THROTTLING";if(X0.isTransientError($))return"TRANSIENT";if(X0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),pW={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},JF=P(($)=>({applyToStack:(U)=>{U.add(gW($),pW)}}),"getRetryPlugin"),lW=P(($)=>{if(!j0.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 IU=M((l3,zX)=>{var rW=function($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U},wX=function($,U){return new QX($,U)},FX=function($,U,G,W,X){return f(async function*Z(L,w,...Y){let Q=L.startingToken||void 0,F=!0,z;while(F){if(w[G]=Q,X)w[X]=w[X]??L.pageSize;if(L.client instanceof $)z=await vF(U,L.client,w,...Y);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield z;const J=Q;Q=cF(z,W),F=!!(Q&&(!L.stopOnSameToken||Q!==J))}return},"paginateOperation")},x1=Object.defineProperty,RF=Object.getOwnPropertyDescriptor,IF=Object.getOwnPropertyNames,KF=Object.prototype.hasOwnProperty,f=($,U)=>x1($,"name",{value:U,configurable:!0}),MF=($,U)=>{for(var G in U)x1($,G,{get:U[G],enumerable:!0})},BF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of IF(U))if(!KF.call($,X)&&X!==G)x1($,X,{get:()=>U[X],enumerable:!(W=RF(U,X))||W.enumerable})}return $},VF=($)=>BF(x1({},"__esModule",{value:!0}),$),nW={};MF(nW,{DefaultIdentityProviderConfig:()=>NF,EXPIRATION_MS:()=>ZX,HttpApiKeyAuthSigner:()=>jF,HttpBearerAuthSigner:()=>PF,NoAuthSigner:()=>SF,RequestBuilder:()=>QX,createIsIdentityExpiredFunction:()=>XX,createPaginator:()=>FX,doesIdentityRequireRefresh:()=>LX,getHttpAuthSchemeEndpointRuleSetPlugin:()=>TF,getHttpAuthSchemePlugin:()=>HF,getHttpSigningPlugin:()=>qF,getSmithyContext:()=>bF,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>oW,httpAuthSchemeMiddleware:()=>RU,httpAuthSchemeMiddlewareOptions:()=>aW,httpSigningMiddleware:()=>tW,httpSigningMiddlewareOptions:()=>eW,isIdentityExpired:()=>kF,memoizeIdentityProvider:()=>DF,normalizeProvider:()=>hF,requestBuilder:()=>wX});zX.exports=VF(nW);var iW=i();f(rW,"convertHttpAuthSchemesToMap");var RU=f(($,U)=>(G,W)=>async(X)=>{var Z;const L=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,X.input)),w=rW($.httpAuthSchemes),Y=iW.getSmithyContext(W),Q=[];for(let F of L){const z=w.get(F.schemeId);if(!z){Q.push(`HttpAuthScheme \`${F.schemeId}\` was not enabled for this service.`);continue}const J=z.identityProvider(await U.identityProviderConfigProvider($));if(!J){Q.push(`HttpAuthScheme \`${F.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:R={},signingProperties:I={}}=((Z=F.propertiesExtractor)==null?void 0:Z.call(F,$,W))||{};F.identityProperties=Object.assign(F.identityProperties||{},R),F.signingProperties=Object.assign(F.signingProperties||{},I),Y.selectedHttpAuthScheme={httpAuthOption:F,identity:await J(F.identityProperties),signer:z.signer};break}if(!Y.selectedHttpAuthScheme)throw new Error(Q.join("\n"));return G(X)},"httpAuthSchemeMiddleware"),EF=s8(),oW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:EF.endpointMiddlewareOptions.name},TF=f(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(RU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),oW)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),AF=P$(),aW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:AF.serializerMiddlewareOption.name},HF=f(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(RU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),aW)}}),"getHttpAuthSchemePlugin"),v1=a(),OF=f(($)=>(U)=>{throw U},"defaultErrorHandler"),CF=f(($,U)=>{},"defaultSuccessHandler"),tW=f(($)=>(U,G)=>async(W)=>{if(!v1.HttpRequest.isInstance(W.request))return U(W);const Z=iW.getSmithyContext(G).selectedHttpAuthScheme;if(!Z)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:L={}},identity:w,signer:Y}=Z,Q=await U({...W,request:await Y.sign(W.request,w,L)}).catch((Y.errorHandler||OF)(L));return(Y.successHandler||CF)(Q.response,L),Q},"httpSigningMiddleware"),fF=mW(),eW={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:fF.retryMiddlewareOptions.name},qF=f(($)=>({applyToStack:(U)=>{U.addRelativeTo(tW($),eW)}}),"getHttpSigningPlugin"),$X=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($X,"DefaultIdentityProviderConfig");var NF=$X,h1=T0(),UX=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=v1.HttpRequest.clone(U);if(W.in===h1.HttpApiKeyAuthLocation.QUERY)X.query[W.name]=G.apiKey;else if(W.in===h1.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(UX,"HttpApiKeyAuthSigner");var jF=UX,GX=class ${async sign(U,G,W){const X=v1.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(GX,"HttpBearerAuthSigner");var PF=GX,WX=class ${async sign(U,G,W){return U}};f(WX,"NoAuthSigner");var SF=WX,XX=f(($)=>(U)=>LX(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),ZX=300000,kF=XX(ZX),LX=f(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),DF=f(($,U,G)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let X,Z,L,w=!1;const Y=f(async(Q)=>{if(!Z)Z=W(Q);try{X=await Z,L=!0,w=!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 Y(Q);return X};return async(Q)=>{if(!L||(Q==null?void 0:Q.forceRefresh))X=await Y(Q);if(w)return X;if(!G(X))return w=!0,X;if(U(X))return await Y(Q),X;return X}},"memoizeIdentityProvider"),bF=f(($)=>$[h1.SMITHY_CONTEXT_KEY]||($[h1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),hF=f(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),xF=N0();f(wX,"requestBuilder");var YX=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 v1.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=xF.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(YX,"RequestBuilder");var QX=YX,vF=f(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");f(FX,"createPaginator");var cF=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 LZ=M((UA,ZZ)=>{var{defineProperty:$$,getOwnPropertyDescriptor:Tz,getOwnPropertyNames:Az}=Object,Hz=Object.prototype.hasOwnProperty,Oz=($,U)=>$$($,"name",{value:U,configurable:!0}),Cz=($,U)=>{for(var G in U)$$($,G,{get:U[G],enumerable:!0})},fz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Az(U))if(!Hz.call($,X)&&X!==G)$$($,X,{get:()=>U[X],enumerable:!(W=Tz(U,X))||W.enumerable})}return $},qz=($)=>fz($$({},"__esModule",{value:!0}),$),XZ={};Cz(XZ,{emitWarningIfUnsupportedVersion:()=>Nz});ZZ.exports=qz(XZ);var WZ=!1,Nz=Oz(($)=>{if($&&!WZ&&parseInt($.substring(1,$.indexOf(".")))<18)WZ=!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 qZ=M((GA,fZ)=>{var uU=function($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break},L$=Object.defineProperty,jz=Object.getOwnPropertyDescriptor,Pz=Object.getOwnPropertyNames,Sz=Object.prototype.hasOwnProperty,k=($,U)=>L$($,"name",{value:U,configurable:!0}),kz=($,U)=>{for(var G in U)L$($,G,{get:U[G],enumerable:!0})},Dz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Pz(U))if(!Sz.call($,X)&&X!==G)L$($,X,{get:()=>U[X],enumerable:!(W=jz(U,X))||W.enumerable})}return $},bz=($)=>Dz(L$({},"__esModule",{value:!0}),$),zZ={};kz(zZ,{SignatureV4:()=>ZJ,clearCredentialCache:()=>oz,createScope:()=>W$,getCanonicalHeaders:()=>yU,getCanonicalQuery:()=>EZ,getPayloadHash:()=>Z$,getSigningKey:()=>VZ,moveHeadersToQuery:()=>OZ,prepareRequest:()=>_U});fZ.exports=bz(zZ);var wZ=i(),xU=W0(),hz="X-Amz-Algorithm",xz="X-Amz-Credential",JZ="X-Amz-Date",vz="X-Amz-SignedHeaders",cz="X-Amz-Expires",RZ="X-Amz-Signature",IZ="X-Amz-Security-Token",KZ="authorization",MZ=JZ.toLowerCase(),yz="date",uz=[KZ,MZ,yz],_z=RZ.toLowerCase(),cU="x-amz-content-sha256",dz=IZ.toLowerCase(),gz={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},pz=/^proxy-/,lz=/^sec-/,vU="AWS4-HMAC-SHA256",sz="AWS4-HMAC-SHA256-PAYLOAD",mz="UNSIGNED-PAYLOAD",nz=50,BZ="aws4_request",iz=604800,w0=P6(),rz=W0(),b0={},G$=[],W$=k(($,U,G)=>`${$}/${U}/${G}/${BZ}`,"createScope"),VZ=k(async($,U,G,W,X)=>{const Z=await YZ($,U.secretAccessKey,U.accessKeyId),L=`${G}:${W}:${X}:${w0.toHex(Z)}:${U.sessionToken}`;if(L in b0)return b0[L];G$.push(L);while(G$.length>nz)delete b0[G$.shift()];let w=`AWS4${U.secretAccessKey}`;for(let Y of[G,W,X,BZ])w=await YZ($,w,Y);return b0[L]=w},"getSigningKey"),oz=k(()=>{G$.length=0,Object.keys(b0).forEach(($)=>{delete b0[$]})},"clearCredentialCache"),YZ=k(($,U,G)=>{const W=new $(U);return W.update(rz.toUint8Array(G)),W.digest()},"hmac"),yU=k(({headers:$},U,G)=>{const W={};for(let X of Object.keys($).sort()){if($[X]==null)continue;const Z=X.toLowerCase();if(Z in gz||(U==null?void 0:U.has(Z))||pz.test(Z)||lz.test(Z)){if(!G||G&&!G.has(Z))continue}W[Z]=$[X].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),X$=p$(),EZ=k(({query:$={}})=>{const U=[],G={};for(let W of Object.keys($)){if(W.toLowerCase()===_z)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,w)=>L.concat([`${X}=${X$.escapeUri(w)}`]),[]).sort().join("&")}return U.sort().map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),az=c$(),tz=W0(),Z$=k(async({headers:$,body:U},G)=>{for(let W of Object.keys($))if(W.toLowerCase()===cU)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||az.isArrayBuffer(U)){const W=new G;return W.update(tz.toUint8Array(U)),w0.toHex(await W.digest())}return mz},"getPayloadHash"),QZ=W0(),TZ=class ${format(U){const G=[];for(let Z of Object.keys(U)){const L=QZ.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 w=QZ.fromUtf8(U.value),Y=new DataView(new ArrayBuffer(3+w.byteLength));Y.setUint8(0,7),Y.setUint16(1,w.byteLength,!1);const Q=new Uint8Array(Y.buffer);return Q.set(w,3),Q;case"timestamp":const F=new Uint8Array(9);return F[0]=8,F.set(UJ.fromNumber(U.value.valueOf()).bytes,1),F;case"uuid":if(!$J.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const z=new Uint8Array(17);return z[0]=9,z.set(w0.fromHex(U.value.replace(/\-/g,"")),1),z}}};k(TZ,"HeaderFormatter");var ez=TZ,$J=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,AZ=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)uU(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)uU(U);return parseInt(w0.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};k(AZ,"Int64");var UJ=AZ;k(uU,"negate");var GJ=k(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),HZ=a(),OZ=k(($,U={})=>{var G;const{headers:W,query:X={}}=HZ.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"),_U=k(($)=>{$=HZ.HttpRequest.clone($);for(let U of Object.keys($.headers))if(uz.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),WJ=k(($)=>XJ($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),XJ=k(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),CZ=class ${constructor({applyChecksum:U,credentials:G,region:W,service:X,sha256:Z,uriEscapePath:L=!0}){this.headerFormatter=new ez,this.service=X,this.sha256=Z,this.uriEscapePath=L,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=wZ.normalizeProvider(W),this.credentialProvider=wZ.normalizeProvider(G)}async presign(U,G={}){const{signingDate:W=new Date,expiresIn:X=3600,unsignableHeaders:Z,unhoistableHeaders:L,signableHeaders:w,signingRegion:Y,signingService:Q}=G,F=await this.credentialProvider();this.validateResolvedCredentials(F);const z=Y??await this.regionProvider(),{longDate:J,shortDate:R}=U$(W);if(X>iz)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const I=W$(R,z,Q??this.service),V=OZ(_U(U),{unhoistableHeaders:L});if(F.sessionToken)V.query[IZ]=F.sessionToken;V.query[hz]=vU,V.query[xz]=`${F.accessKeyId}/${I}`,V.query[JZ]=J,V.query[cz]=X.toString(10);const B=yU(V,Z,w);return V.query[vz]=FZ(B),V.query[RZ]=await this.getSignature(J,I,this.getSigningKey(F,z,R,Q),this.createCanonicalRequest(V,B,await Z$(U,this.sha256))),V}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 w=Z??await this.regionProvider(),{shortDate:Y,longDate:Q}=U$(W),F=W$(Y,w,L??this.service),z=await Z$({headers:{},body:G},this.sha256),J=new this.sha256;J.update(U);const R=w0.toHex(await J.digest()),I=[sz,Q,F,X,R,z].join("\n");return this.signString(I,{signingDate:W,signingRegion:w,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:w}=U$(G),Y=new this.sha256(await this.getSigningKey(Z,L,w,X));return Y.update(xU.toUint8Array(U)),w0.toHex(await Y.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:X,signingRegion:Z,signingService:L}={}){const w=await this.credentialProvider();this.validateResolvedCredentials(w);const Y=Z??await this.regionProvider(),Q=_U(U),{longDate:F,shortDate:z}=U$(G),J=W$(z,Y,L??this.service);if(Q.headers[MZ]=F,w.sessionToken)Q.headers[dz]=w.sessionToken;const R=await Z$(Q,this.sha256);if(!GJ(cU,Q.headers)&&this.applyChecksum)Q.headers[cU]=R;const I=yU(Q,X,W),V=await this.getSignature(F,J,this.getSigningKey(w,Y,z,L),this.createCanonicalRequest(Q,I,R));return Q.headers[KZ]=`${vU} Credential=${w.accessKeyId}/${J}, SignedHeaders=${FZ(I)}, Signature=${V}`,Q}createCanonicalRequest(U,G,W){const X=Object.keys(G).sort();return`${U.method}
|
|
10
|
-
${this.getCanonicalPath(U)}
|
|
11
|
-
${EZ(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(xU.toUint8Array(W));const Z=await X.digest();return`${vU}
|
|
16
|
-
${U}
|
|
17
|
-
${G}
|
|
18
|
-
${w0.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(xU.toUint8Array(Z)),w0.toHex(await L.digest())}getSigningKey(U,G,W,X){return VZ(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")}};k(CZ,"SignatureV4");var ZJ=CZ,U$=k(($)=>{const U=WJ($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),FZ=k(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var vZ=M((WA,xZ)=>{var{defineProperty:w$,getOwnPropertyDescriptor:LJ,getOwnPropertyNames:wJ}=Object,YJ=Object.prototype.hasOwnProperty,x=($,U)=>w$($,"name",{value:U,configurable:!0}),QJ=($,U)=>{for(var G in U)w$($,G,{get:U[G],enumerable:!0})},FJ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of wJ(U))if(!YJ.call($,X)&&X!==G)w$($,X,{get:()=>U[X],enumerable:!(W=LJ(U,X))||W.enumerable})}return $},zJ=($)=>FJ(w$({},"__esModule",{value:!0}),$),kZ={};QJ(kZ,{AWSSDKSigV4Signer:()=>KJ,AwsSdkSigV4ASigner:()=>BJ,AwsSdkSigV4Signer:()=>pU,NODE_SIGV4A_CONFIG_OPTIONS:()=>TJ,resolveAWSSDKSigV4Config:()=>AJ,resolveAwsSdkSigV4AConfig:()=>EJ,resolveAwsSdkSigV4Config:()=>hZ,validateSigningProperties:()=>gU});xZ.exports=zJ(kZ);var JJ=a(),RJ=a(),NZ=x(($)=>{var U,G;return RJ.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),dU=x(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),IJ=x(($,U)=>Math.abs(dU(U).getTime()-$)>=300000,"isClockSkewed"),jZ=x(($,U)=>{const G=Date.parse($);if(IJ(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"),gU=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],Y=await e0("signer",Z.signer)(L),Q=$==null?void 0:$.signingRegion,F=$==null?void 0:$.signingRegionSet,z=$==null?void 0:$.signingName;return{config:Z,signer:Y,signingRegion:Q,signingRegionSet:F,signingName:z}},"validateSigningProperties"),DZ=class ${async sign(U,G,W){var X;if(!JJ.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const Z=await gU(W),{config:L,signer:w}=Z;let{signingRegion:Y,signingName:Q}=Z;const F=W.context;if(((X=F==null?void 0:F.authSchemes)==null?void 0:X.length)??0>1){const[J,R]=F.authSchemes;if((J==null?void 0:J.name)==="sigv4a"&&(R==null?void 0:R.name)==="sigv4")Y=(R==null?void 0:R.signingRegion)??Y,Q=(R==null?void 0:R.signingName)??Q}return await w.sign(U,{signingDate:dU(L.systemClockOffset),signingRegion:Y,signingService:Q})}errorHandler(U){return(G)=>{const W=G.ServerTime??NZ(G.$response);if(W){const X=e0("config",U.config),Z=X.systemClockOffset;if(X.systemClockOffset=jZ(W,X.systemClockOffset),X.systemClockOffset!==Z&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const W=NZ(U);if(W){const X=e0("config",G.config);X.systemClockOffset=jZ(W,X.systemClockOffset)}}};x(DZ,"AwsSdkSigV4Signer");var pU=DZ,KJ=pU,MJ=a(),bZ=class $ extends pU{async sign(U,G,W){var X;if(!MJ.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:Z,signer:L,signingRegion:w,signingRegionSet:Y,signingName:Q}=await gU(W),z=(await((X=Z.sigv4aSigningRegionSet)==null?void 0:X.call(Z))??Y??[w]).join(",");return await L.sign(U,{signingDate:dU(Z.systemClockOffset),signingRegion:z,signingService:Q})}};x(bZ,"AwsSdkSigV4ASigner");var BJ=bZ,VJ=IU(),PZ=B$(),EJ=x(($)=>{return $.sigv4aSigningRegionSet=VJ.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),TJ={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new PZ.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 PZ.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},V0=IU(),SZ=qZ(),hZ=x(($)=>{let U;if($.credentials)U=V0.memoizeIdentityProvider($.credentials,V0.isIdentityExpired,V0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=V0.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=V0.normalizeProvider($.signer);else if($.regionInfoProvider)Z=x(()=>V0.normalizeProvider($.region)().then(async(L)=>[await $.regionInfoProvider(L,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},L]).then(([L,w])=>{const{signingRegion:Y,signingService:Q}=L;$.signingRegion=$.signingRegion||Y||w,$.signingName=$.signingName||Q||$.serviceId;const F={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||SZ.SignatureV4)(F)}),"signer");else Z=x(async(L)=>{L=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await V0.normalizeProvider($.region)(),properties:{}},L);const{signingRegion:w,signingName:Y}=L;$.signingRegion=$.signingRegion||w,$.signingName=$.signingName||Y||$.serviceId;const Q={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||SZ.SignatureV4)(Q)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:Z}},"resolveAwsSdkSigV4Config"),AJ=hZ});var Y$=M((qJ)=>{var HJ=":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",cZ="[: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]["+HJ+"]*",OJ=new RegExp("^"+cZ+"$"),CJ=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},fJ=function($){const U=OJ.exec($);return!(U===null||typeof U==="undefined")};qJ.isExist=function($){return typeof $!=="undefined"};qJ.isEmptyObject=function($){return Object.keys($).length===0};qJ.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]]}};qJ.getValue=function($){if(qJ.isExist($))return $;else return""};qJ.isName=fJ;qJ.getAllMatches=CJ;qJ.nameRegexp=cZ});var sU=M((gJ)=>{var uZ=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},_Z=function($,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},dZ=function($,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},vJ=function($,U){let G="",W="",X=!1;for(;U<$.length;U++){if($[U]===hJ||$[U]===xJ)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}},gZ=function($,U){const G=lU.getAllMatches($,cJ),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(!_J(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},yJ=function($,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},uJ=function($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,yJ($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U},j=function($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}},_J=function($){return lU.isName($)},dJ=function($){return lU.isName($)},b=function($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}},$1=function($){return $.startIndex+$[1].length},lU=Y$(),bJ={allowBooleanAttributes:!1,unpairedTags:[]};gJ.validate=function($,U){U=Object.assign({},bJ,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=_Z($,Z),Z.err)return Z}else if($[Z]==="<"){let L=Z;if(Z++,$[Z]==="!"){Z=dZ($,Z);continue}else{let w=!1;if($[Z]==="/")w=!0,Z++;let Y="";for(;Z<$.length&&$[Z]!==">"&&$[Z]!==" "&&$[Z]!=="\t"&&$[Z]!=="\n"&&$[Z]!=="\r";Z++)Y+=$[Z];if(Y=Y.trim(),Y[Y.length-1]==="/")Y=Y.substring(0,Y.length-1),Z--;if(!dJ(Y)){let z;if(Y.trim().length===0)z="Invalid space after '<'.";else z="Tag '"+Y+"' is an invalid name.";return j("InvalidTag",z,b($,Z))}const Q=vJ($,Z);if(Q===!1)return j("InvalidAttr","Attributes for '"+Y+"' have open quote.",b($,Z));let F=Q.value;if(Z=Q.index,F[F.length-1]==="/"){const z=Z-F.length;F=F.substring(0,F.length-1);const J=gZ(F,U);if(J===!0)W=!0;else return j(J.err.code,J.err.msg,b($,z+J.err.line))}else if(w)if(!Q.tagClosed)return j("InvalidTag","Closing tag '"+Y+"' doesn't have proper closing.",b($,Z));else if(F.trim().length>0)return j("InvalidTag","Closing tag '"+Y+"' can't have attributes or invalid starting.",b($,L));else if(G.length===0)return j("InvalidTag","Closing tag '"+Y+"' has not been opened.",b($,L));else{const z=G.pop();if(Y!==z.tagName){let J=b($,z.tagStartPos);return j("InvalidTag","Expected closing tag '"+z.tagName+"' (opened in line "+J.line+", col "+J.col+") instead of closing tag '"+Y+"'.",b($,L))}if(G.length==0)X=!0}else{const z=gZ(F,U);if(z!==!0)return j(z.err.code,z.err.msg,b($,Z-F.length+z.err.line));if(X===!0)return j("InvalidXml","Multiple possible root nodes found.",b($,Z));else if(U.unpairedTags.indexOf(Y)!==-1);else G.push({tagName:Y,tagStartPos:L});W=!0}for(Z++;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="!"){Z++,Z=dZ($,Z);continue}else if($[Z+1]==="?"){if(Z=_Z($,++Z),Z.err)return Z}else break;else if($[Z]==="&"){const z=uJ($,Z);if(z==-1)return j("InvalidChar","char '&' is not expected.",b($,Z));Z=z}else if(X===!0&&!uZ($[Z]))return j("InvalidXml","Extra text at the end",b($,Z));if($[Z]==="<")Z--}}else{if(uZ($[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 hJ='"',xJ="'",cJ=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var lZ=M((sJ)=>{var pZ={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 $}},lJ=function($){return Object.assign({},pZ,$)};sJ.buildOptions=lJ;sJ.defaultOptions=pZ});var nZ=M((wA,mZ)=>{class sZ{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})}}mZ.exports=sZ});var rZ=M((YA,iZ)=>{var rJ=function($,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&&tJ($,U)){if(U+=7,[entityName,val,U]=oJ($,U+1),val.indexOf("&")===-1)G[GR(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(X&&eJ($,U))U+=8;else if(X&&$R($,U))U+=8;else if(X&&UR($,U))U+=9;else if(aJ)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}},oJ=function($,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]},aJ=function($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1},tJ=function($,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},eJ=function($,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},$R=function($,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},UR=function($,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},GR=function($){if(iJ.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},iJ=Y$();iZ.exports=rJ});var aZ=M((QA,oZ)=>{var LR=function($,U={}){if(U=Object.assign({},ZR,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&WR.test(G))return Number.parseInt(G,16);else{const W=XR.exec(G);if(W){const X=W[1],Z=W[2];let L=wR(W[3]);const w=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 Y=Number(G),Q=""+Y;if(Q.search(/[eE]/)!==-1)if(U.eNotation)return Y;else return $;else if(w)if(U.eNotation)return Y;else return $;else if(G.indexOf(".")!==-1)if(Q==="0"&&L==="")return Y;else if(Q===L)return Y;else if(X&&Q==="-"+L)return Y;else return $;if(Z)if(L===Q)return Y;else if(X+L===Q)return Y;else return $;if(G===Q)return Y;else if(G===X+Q)return Y;return $}}else return $}},wR=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},WR=/^[-+]?0x[a-fA-F0-9]+$/,XR=/^([\-\+])?(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 ZR={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};oZ.exports=LR});var UL=M((FA,$L)=>{var FR=function($){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]}}},zR=function($,U,G,W,X,Z,L){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!L)$=this.replaceEntitiesValue($);const w=this.options.tagValueProcessor(U,$,G,X,Z);if(w===null||w===void 0)return $;else if(typeof w!==typeof $||w!==$)return w;else if(this.options.trimValues)return nU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return nU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},JR=function($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $},IR=function($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=tZ.getAllMatches($,RR),X=W.length,Z={};for(let L=0;L<X;L++){const w=this.resolveNameSpace(W[L][1]);let Y=W[L][4],Q=this.options.attributeNamePrefix+w;if(w.length){if(this.options.transformAttributeName)Q=this.options.transformAttributeName(Q);if(Q==="__proto__")Q="#__proto__";if(Y!==void 0){if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y);const F=this.options.attributeValueProcessor(w,Y,U);if(F===null||F===void 0)Z[Q]=Y;else if(typeof F!==typeof Y||F!==Y)Z[Q]=F;else Z[Q]=nU(Y,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}},MR=function($,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)},VR=function($,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 $},ER=function($,U,G){const W="*."+G;for(let X in $){const Z=$[X];if(W===Z||U===Z)return!0}return!1},TR=function($,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}},E0=function($,U,G,W){const X=$.indexOf(U,G);if(X===-1)throw new Error(W);else return X+U.length-1},mU=function($,U,G,W=">"){const X=TR($,U+1,W);if(!X)return;let Z=X.data;const L=X.index,w=Z.search(/\s/);let Y=Z,Q=!0;if(w!==-1)Y=Z.substring(0,w),Z=Z.substring(w+1).trimStart();const F=Y;if(G){const z=Y.indexOf(":");if(z!==-1)Y=Y.substr(z+1),Q=Y!==X.data.substr(z+1)}return{tagName:Y,tagExp:Z,closeIndex:L,attrExpPresent:Q,rawTagName:F}},AR=function($,U,G){const W=G;let X=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const Z=E0($,">",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=E0($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=E0($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=E0($,"]]>",G,"StopNode is not closed.")-2;else{const Z=mU($,G,">");if(Z){if((Z&&Z.tagName)===U&&Z.tagExp[Z.tagExp.length-1]!=="/")X++;G=Z.closeIndex}}},nU=function($,U,G){if(U&&typeof $==="string"){const W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return QR($,G)}else if(tZ.isExist($))return $;else return""},tZ=Y$(),U1=nZ(),YR=rZ(),QR=aZ();class eZ{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=FR,this.parseXml=KR,this.parseTextData=zR,this.resolveNameSpace=JR,this.buildAttributesMap=IR,this.isItStopNode=ER,this.replaceEntitiesValue=BR,this.readStopNodeData=AR,this.saveTextToParentTag=VR,this.addChild=MR}}var RR=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),KR=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 w=E0($,">",Z,"Closing Tag is not closed.");let Y=$.substring(Z+2,w).trim();if(this.options.removeNSPrefix){const z=Y.indexOf(":");if(z!==-1)Y=Y.substr(z+1)}if(this.options.transformTagName)Y=this.options.transformTagName(Y);if(G)W=this.saveTextToParentTag(W,G,X);const Q=X.substring(X.lastIndexOf(".")+1);if(Y&&this.options.unpairedTags.indexOf(Y)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${Y}>`);let F=0;if(Q&&this.options.unpairedTags.indexOf(Q)!==-1)F=X.lastIndexOf(".",X.lastIndexOf(".")-1),this.tagsNodeStack.pop();else F=X.lastIndexOf(".");X=X.substring(0,F),G=this.tagsNodeStack.pop(),W="",Z=w}else if($[Z+1]==="?"){let w=mU($,Z,!1,"?>");if(!w)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,X),this.options.ignoreDeclaration&&w.tagName==="?xml"||this.options.ignorePiTags);else{const Y=new U1(w.tagName);if(Y.add(this.options.textNodeName,""),w.tagName!==w.tagExp&&w.attrExpPresent)Y[":@"]=this.buildAttributesMap(w.tagExp,X,w.tagName);this.addChild(G,Y,X)}Z=w.closeIndex+1}else if($.substr(Z+1,3)==="!--"){const w=E0($,"-->",Z+4,"Comment is not closed.");if(this.options.commentPropName){const Y=$.substring(Z+4,w-2);W=this.saveTextToParentTag(W,G,X),G.add(this.options.commentPropName,[{[this.options.textNodeName]:Y}])}Z=w}else if($.substr(Z+1,2)==="!D"){const w=YR($,Z);this.docTypeEntities=w.entities,Z=w.i}else if($.substr(Z+1,2)==="!["){const w=E0($,"]]>",Z,"CDATA is not closed.")-2,Y=$.substring(Z+9,w);W=this.saveTextToParentTag(W,G,X);let Q=this.parseTextData(Y,G.tagname,X,!0,!1,!0,!0);if(Q==null)Q="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:Y}]);else G.add(this.options.textNodeName,Q);Z=w+2}else{let w=mU($,Z,this.options.removeNSPrefix),Y=w.tagName;const Q=w.rawTagName;let{tagExp:F,attrExpPresent:z,closeIndex:J}=w;if(this.options.transformTagName)Y=this.options.transformTagName(Y);if(G&&W){if(G.tagname!=="!xml")W=this.saveTextToParentTag(W,G,X,!1)}const R=G;if(R&&this.options.unpairedTags.indexOf(R.tagname)!==-1)G=this.tagsNodeStack.pop(),X=X.substring(0,X.lastIndexOf("."));if(Y!==U.tagname)X+=X?"."+Y:Y;if(this.isItStopNode(this.options.stopNodes,X,Y)){let I="";if(F.length>0&&F.lastIndexOf("/")===F.length-1){if(Y[Y.length-1]==="/")Y=Y.substr(0,Y.length-1),X=X.substr(0,X.length-1),F=Y;else F=F.substr(0,F.length-1);Z=w.closeIndex}else if(this.options.unpairedTags.indexOf(Y)!==-1)Z=w.closeIndex;else{const B=this.readStopNodeData($,Q,J+1);if(!B)throw new Error(`Unexpected end of ${Q}`);Z=B.i,I=B.tagContent}const V=new U1(Y);if(Y!==F&&z)V[":@"]=this.buildAttributesMap(F,X,Y);if(I)I=this.parseTextData(I,Y,X,!0,z,!0,!0);X=X.substr(0,X.lastIndexOf(".")),V.add(this.options.textNodeName,I),this.addChild(G,V,X)}else{if(F.length>0&&F.lastIndexOf("/")===F.length-1){if(Y[Y.length-1]==="/")Y=Y.substr(0,Y.length-1),X=X.substr(0,X.length-1),F=Y;else F=F.substr(0,F.length-1);if(this.options.transformTagName)Y=this.options.transformTagName(Y);const I=new U1(Y);if(Y!==F&&z)I[":@"]=this.buildAttributesMap(F,X,Y);this.addChild(G,I,X),X=X.substr(0,X.lastIndexOf("."))}else{const I=new U1(Y);if(this.tagsNodeStack.push(G),Y!==F&&z)I[":@"]=this.buildAttributesMap(F,X,Y);this.addChild(G,I,X),G=I}W="",Z=J}}else W+=$[Z];return U.child},BR=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 $};$L.exports=eZ});var WL=M((qR)=>{var HR=function($,U){return GL($,U)},GL=function($,U,G){let W;const X={};for(let Z=0;Z<$.length;Z++){const L=$[Z],w=OR(L);let Y="";if(G===void 0)Y=w;else Y=G+"."+w;if(w===U.textNodeName)if(W===void 0)W=L[w];else W+=""+L[w];else if(w===void 0)continue;else if(L[w]){let Q=GL(L[w],U,Y);const F=fR(Q,U);if(L[":@"])CR(Q,L[":@"],Y,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[w]!==void 0&&X.hasOwnProperty(w)){if(!Array.isArray(X[w]))X[w]=[X[w]];X[w].push(Q)}else if(U.isArray(w,Y,F))X[w]=[Q];else X[w]=Q}}if(typeof W==="string"){if(W.length>0)X[U.textNodeName]=W}else if(W!==void 0)X[U.textNodeName]=W;return X},OR=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(W!==":@")return W}},CR=function($,U,G,W){if(U){const X=Object.keys(U),Z=X.length;for(let L=0;L<Z;L++){const w=X[L];if(W.isArray(w,G+"."+w,!0,!0))$[w]=[U[w]];else $[w]=U[w]}}},fR=function($,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};qR.prettify=HR});var LL=M((JA,ZL)=>{var{buildOptions:jR}=lZ(),PR=UL(),{prettify:SR}=WL(),kR=sU();class XL{constructor($){this.externalEntities={},this.options=jR($)}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=kR.validate($,U);if(X!==!0)throw Error(`${X.err.msg}:${X.err.line}:${X.err.col}`)}const G=new PR(this.options);G.addExternalEntities(this.externalEntities);const W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return SR(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}}ZL.exports=XL});var zL=M((RA,FL)=>{var DR=function($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return YL($,U,"",G)},YL=function($,U,G,W){let X="",Z=!1;for(let L=0;L<$.length;L++){const w=$[L],Y=bR(w);if(Y===void 0)continue;let Q="";if(G.length===0)Q=Y;else Q=`${G}.${Y}`;if(Y===U.textNodeName){let I=w[Y];if(!hR(Q,U))I=U.tagValueProcessor(Y,I),I=QL(I,U);if(Z)X+=W;X+=I,Z=!1;continue}else if(Y===U.cdataPropName){if(Z)X+=W;X+=`<![CDATA[${w[Y][0][U.textNodeName]}]]>`,Z=!1;continue}else if(Y===U.commentPropName){X+=W+`<!--${w[Y][0][U.textNodeName]}-->`,Z=!0;continue}else if(Y[0]==="?"){const I=wL(w[":@"],U),V=Y==="?xml"?"":W;let B=w[Y][0][U.textNodeName];B=B.length!==0?" "+B:"",X+=V+`<${Y}${B}${I}?>`,Z=!0;continue}let F=W;if(F!=="")F+=U.indentBy;const z=wL(w[":@"],U),J=W+`<${Y}${z}`,R=YL(w[Y],U,Q,F);if(U.unpairedTags.indexOf(Y)!==-1)if(U.suppressUnpairedNode)X+=J+">";else X+=J+"/>";else if((!R||R.length===0)&&U.suppressEmptyNode)X+=J+"/>";else if(R&&R.endsWith(">"))X+=J+`>${R}${W}</${Y}>`;else{if(X+=J+">",R&&W!==""&&(R.includes("/>")||R.includes("</")))X+=W+U.indentBy+R+W;else X+=R;X+=`</${Y}>`}Z=!0}return X},bR=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(!$.hasOwnProperty(W))continue;if(W!==":@")return W}},wL=function($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let X=U.attributeValueProcessor(W,$[W]);if(X=QL(X,U),X===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${X}"`}return G},hR=function($,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},QL=function($,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 $};FL.exports=DR});var RL=M((IA,JL)=>{var Y0=function($){if(this.options=Object.assign({},vR,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=uR;if(this.processTextOrObjNode=cR,this.options.format)this.indentate=yR,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},cR=function($,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)},yR=function($){return this.options.indentBy.repeat($)},uR=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},xR=zL(),vR={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 xR($,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="",w="";for(let Y=0;Y<Z;Y++){const Q=$[X][Y];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 F=this.j2x(Q,U+1);if(L+=F.val,this.options.attributesGroupName&&Q.hasOwnProperty(this.options.attributesGroupName))w+=F.attrStr}else L+=this.processTextOrObjNode(Q,X,U);else if(this.options.oneListGroup){let F=this.options.tagValueProcessor(X,Q);F=this.replaceEntitiesValue(F),L+=F}else L+=this.buildTextValNode(Q,X,"",U)}if(this.options.oneListGroup)L=this.buildObjectNode(L,X,w,U);W+=L}else if(this.options.attributesGroupName&&X===this.options.attributesGroupName){const Z=Object.keys($[X]),L=Z.length;for(let w=0;w<L;w++)G+=this.buildAttrPairStr(Z[w],""+$[X][Z[w]])}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 $};JL.exports=Y0});var KL=M((KA,IL)=>{var _R=sU(),dR=LL(),gR=RL();IL.exports={XMLParser:dR,XMLValidator:_R,XMLBuilder:gR}});var AL=M((MA,TL)=>{var{defineProperty:Q$,getOwnPropertyDescriptor:pR,getOwnPropertyNames:lR}=Object,sR=Object.prototype.hasOwnProperty,v=($,U)=>Q$($,"name",{value:U,configurable:!0}),mR=($,U)=>{for(var G in U)Q$($,G,{get:U[G],enumerable:!0})},nR=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of lR(U))if(!sR.call($,X)&&X!==G)Q$($,X,{get:()=>U[X],enumerable:!(W=pR(U,X))||W.enumerable})}return $},iR=($)=>nR(Q$({},"__esModule",{value:!0}),$),ML={};mR(ML,{_toBool:()=>oR,_toNum:()=>aR,_toStr:()=>rR,awsExpectUnion:()=>eR,loadRestJsonErrorCode:()=>GI,loadRestXmlErrorCode:()=>LI,parseJsonBody:()=>VL,parseJsonErrorBody:()=>UI,parseXmlBody:()=>EL,parseXmlErrorBody:()=>ZI});TL.exports=iR(ML);var rR=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"),oR=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"),aR=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"),tR=N0(),eR=v(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return tR.expectUnion($)},"awsExpectUnion"),$I=N0(),BL=v(($,U)=>$I.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),VL=v(($,U)=>BL($,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"),UI=v(async($,U)=>{const G=await VL($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),GI=v(($,U)=>{const G=v((Z,L)=>Object.keys(Z).find((w)=>w.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"),WI=N0(),XI=KL(),EL=v(($,U)=>BL($,U).then((G)=>{if(G.length){const W=new XI.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(Y,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(Y){if(Y&&typeof Y==="object")Object.defineProperty(Y,"$responseBodyText",{value:G});throw Y}const Z="#text",L=Object.keys(X)[0],w=X[L];if(w[Z])w[L]=w[Z],delete w[Z];return WI.getValueFromTextNode(w)}return{}}),"parseXmlBody"),ZI=v(async($,U)=>{const G=await EL($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),LI=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 YI=M((G1)=>{Object.defineProperty(G1,"__esModule",{value:!0});var iU=wI();iU.__exportStar(LZ(),G1);iU.__exportStar(vZ(),G1);iU.__exportStar(AL(),G1)});var n=$0(M$(),1),uI=n.default.v1,_I=n.default.v3,mG=n.default.v4,dI=n.default.v5,gI=n.default.NIL,pI=n.default.version,lI=n.default.validate,sI=n.default.stringify,mI=n.default.parse;function rI($){return $}var n5=($)=>(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)},i5={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},oI=($)=>({applyToStack:(U)=>{U.add(n5($),i5)}});var r5=()=>($,U)=>async(G)=>{try{const W=await $(G),{clientName:X,commandName:Z,logger:L,dynamoDbDocumentClientOptions:w={}}=U,{overrideInputFilterSensitiveLog:Y,overrideOutputFilterSensitiveLog:Q}=w,F=Y??U.inputFilterSensitiveLog,z=Q??U.outputFilterSensitiveLog,{$metadata:J,...R}=W.output;return L?.info?.({clientName:X,commandName:Z,input:F(G.input),output:z(R),metadata:J}),W}catch(W){const{clientName:X,commandName:Z,logger:L,dynamoDbDocumentClientOptions:w={}}=U,{overrideInputFilterSensitiveLog:Y}=w,Q=Y??U.inputFilterSensitiveLog;throw L?.error?.({clientName:X,commandName:Z,input:Q(G.input),error:W,metadata:W.$metadata}),W}},o5={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},tI=($)=>({applyToStack:(U)=>{U.add(r5(),o5)}});var nG="X-Amzn-Trace-Id",a5="AWS_LAMBDA_FUNCTION_NAME",t5="_X_AMZN_TRACE_ID",e5=($)=>(U)=>async(G)=>{const{request:W}=G;if(!y.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(nG))return U(G);const X=process.env[a5],Z=process.env[t5],L=(w)=>typeof w==="string"&&w.length>0;if(L(X)&&L(Z))W.headers[nG]=Z;return U({...G,request:W})},$w={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},W3=($)=>({applyToStack:(U)=>{U.add(e5($),$w)}});function s3($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}class yF{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 uF=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=($)=>uF.test($)||$.startsWith("[")&&$.endsWith("]");var _F=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),o0=($,U=!1)=>{if(!U)return _F.test($);const G=$.split(".");for(let W of G)if(!o0(W))return!1;return!0};var a0={};var e="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 JX=($,U)=>$===U;var RX=($)=>{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 c1=($,U)=>RX(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 IX=($)=>$!=null;var KX=($)=>!$;var y1=$0(T0(),1);var KU={[y1.EndpointURLScheme.HTTP]:80,[y1.EndpointURLScheme.HTTPS]:443},MX=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:J,port:R,protocol:I="",path:V="",query:B={}}=$,E=new URL(`${I}//${J}${R?`:${R}`:""}${V}`);return E.search=Object.entries(B).map(([T,A])=>`${T}=${A}`).join("&"),E}return new URL($)}catch(J){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:w}=U;if(w)return null;const Y=L.slice(0,-1);if(!Object.values(y1.EndpointURLScheme).includes(Y))return null;const Q=r0(X),F=G.includes(`${W}:${KU[Y]}`)||typeof $==="string"&&$.includes(`${W}:${KU[Y]}`),z=`${W}${F?`:${KU[Y]}`:""}`;return{scheme:Y,authority:z,path:Z,normalizedPath:Z.endsWith("/")?Z:`${Z}/`,isIp:Q}};var BX=($,U)=>$===U;var VX=($,U,G,W)=>{if(U>=G||$.length<G)return null;if(!W)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var EX=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var TX={booleanEquals:JX,getAttr:c1,isSet:IX,isValidHostLabel:o0,not:KX,parseURL:MX,stringEquals:BX,substring:VX,uriEncode:EX};var u1=($,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 w=$.substring(Z+1,L);if(w.includes("#")){const[Y,Q]=w.split("#");G.push(c1(W[Y],Q))}else G.push(W[w]);X=L+1}return G.join("")};var AX=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var Z0=($,U,G)=>{if(typeof $==="string")return u1($,G);else if($.fn)return _1($,G);else if($.ref)return AX($,G);throw new C(`'${U}': ${String($)} is not a string, function or reference.`)};var _1=({fn:$,argv:U},G)=>{const W=U.map((Z)=>["boolean","number"].includes(typeof Z)?Z:Z0(Z,"arg",G)),X=$.split(".");if(X[0]in a0&&X[1]!=null)return a0[X[0]][X[1]](...W);return TX[$](...W)};var HX=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new C(`'${$}' is already defined in Reference Record.`);const W=_1(U,G);return G.logger?.debug?.(`${e} evaluateCondition: ${d(U)} = ${d(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var P0=($=[],U)=>{const G={};for(let W of $){const{result:X,toAssign:Z}=HX(W,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!X)return{result:X};if(Z)G[Z.name]=Z.value,U.logger?.debug?.(`${e} assign: ${Z.name} := ${d(Z.value)}`)}return{result:!0,referenceRecord:G}};var OX=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:X.map((Z)=>{const L=Z0(Z,"Header value entry",U);if(typeof L!=="string")throw new C(`Header '${W}' value '${L}' is not a string`);return L})}),{});var MU=($,U)=>{if(Array.isArray($))return $.map((G)=>MU(G,U));switch(typeof $){case"string":return u1($,U);case"object":if($===null)throw new C(`Unexpected endpoint property: ${$}`);return d1($,U);case"boolean":return $;default:throw new C(`Unexpected endpoint property type: ${typeof $}`)}};var d1=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:MU(X,U)}),{});var CX=($,U)=>{const G=Z0($,"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 fX=($,U)=>{const{conditions:G,endpoint:W}=$,{result:X,referenceRecord:Z}=P0(G,U);if(!X)return;const L={...U,referenceRecord:{...U.referenceRecord,...Z}},{url:w,properties:Y,headers:Q}=W;return U.logger?.debug?.(`${e} Resolving endpoint from template: ${d(W)}`),{...Q!=null&&{headers:OX(Q,L)},...Y!=null&&{properties:d1(Y,L)},url:CX(w,L)}};var qX=($,U)=>{const{conditions:G,error:W}=$,{result:X,referenceRecord:Z}=P0(G,U);if(!X)return;throw new C(Z0(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...Z}}))};var NX=($,U)=>{const{conditions:G,rules:W}=$,{result:X,referenceRecord:Z}=P0(G,U);if(!X)return;return g1(W,{...U,referenceRecord:{...U.referenceRecord,...Z}})};var g1=($,U)=>{for(let G of $)if(G.type==="endpoint"){const W=fX(G,U);if(W)return W}else if(G.type==="error")qX(G,U);else if(G.type==="tree"){const W=NX(G,U);if(W)return W}else throw new C(`Unknown endpoint rule: ${G}`);throw new C("Rules evaluation failed")};var dF=($,U)=>{const{endpointParams:G,logger:W}=U,{parameters:X,rules:Z}=$;U.logger?.debug?.(`${e} Initial EndpointParams: ${d(G)}`);const L=Object.entries(X).filter(([,Q])=>Q.default!=null).map(([Q,F])=>[Q,F.default]);if(L.length>0)for(let[Q,F]of L)G[Q]=G[Q]??F;const w=Object.entries(X).filter(([,Q])=>Q.required).map(([Q])=>Q);for(let Q of w)if(G[Q]==null)throw new C(`Missing required parameter: '${Q}'`);const Y=g1(Z,{endpointParams:G,logger:W,referenceRecord:{}});return U.logger?.debug?.(`${e} Resolved endpoint: ${d(Y)}`),Y};var BU=($,U=!1)=>{if(U){for(let G of $.split("."))if(!BU(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 jX=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,W,X,Z,L,...w]=U;if(G!=="arn"||W===""||X===""||w.join(":")==="")return null;const Y=w.map((Q)=>Q.split("/")).flat();return{partition:W,service:X,region:Z,accountId:L,resourceId:Y}};var PX={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 pF=PX,lF="",SX=($)=>{const{partitions:U}=pF;for(let W of U){const{regions:X,outputs:Z}=W;for(let[L,w]of Object.entries(X))if(L===$)return{...Z,...w}}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 kX=()=>lF;var sF={isVirtualHostableS3Bucket:BU,parseArn:jX,partition:SX};a0.aws=sF;var VU="user-agent",p1="x-amz-user-agent",EU=" ",l1="/",DX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,bX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,TU="-";var mF=($)=>(U,G)=>async(W)=>{const{request:X}=W;if(!y.isInstance(X))return U(W);const{headers:Z}=X,L=G?.userAgent?.map(AU)||[],w=(await $.defaultUserAgentProvider()).map(AU),Y=$?.customUserAgent?.map(AU)||[],Q=kX(),F=(Q?[Q]:[]).concat([...w,...L,...Y]).join(EU),z=[...w.filter((J)=>J.startsWith("aws-sdk-")),...Y].join(EU);if($.runtime!=="browser"){if(z)Z[p1]=Z[p1]?`${Z[VU]} ${z}`:z;Z[VU]=F}else Z[p1]=F;return U({...W,request:X})},AU=($)=>{const U=$[0].split(l1).map((L)=>L.replace(DX,TU)).join(l1),G=$[1]?.replace(bX,TU),W=U.indexOf(l1),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,w,Y)=>{switch(Y){case 0:return w;case 1:return`${L}/${w}`;default:return`${L}#${w}`}},"")},nF={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},qB=($)=>({applyToStack:(U)=>{U.add(mF($),nF)}});var s1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var HU=($)=>s1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var vB=($)=>{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(s1(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var S0=($,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 L0;(function($){$.ENV="env",$.CONFIG="shared config entry"})(L0||(L0={}));var iF="AWS_USE_DUALSTACK_ENDPOINT",rF="use_dualstack_endpoint";var mB={environmentVariableSelector:($)=>S0($,iF,L0.ENV),configFileSelector:($)=>S0($,rF,L0.CONFIG),default:!1};var oF="AWS_USE_FIPS_ENDPOINT",aF="use_fips_endpoint";var rB={environmentVariableSelector:($)=>S0($,oF,L0.ENV),configFileSelector:($)=>S0($,aF,L0.CONFIG),default:!1};var tF=$0(i(),1);var eF=$0(i(),1);var hX={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},wV={preferredFile:"credentials"};function $z($){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(xX)===-1)try{const L=$(X);W.headers={...W.headers,[xX]:String(L)}}catch(L){}}return U({...G,request:W})}}var xX="content-length",Uz={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},hV=($)=>({applyToStack:(U)=>{U.add($z($.bodyLengthChecker),Uz)}});var vX=($,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 cX=($,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 _V($,U,G){return{applyToStack:(W)=>{W.add(vX($,G),Gz),W.add(cX($,U),OU)}}}var Gz={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},OU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var lX=$0(i(),1);var yX=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(wz(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Lz(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},Wz=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Xz=/(\d+\.){3}\d+/,Zz=/\.\./;var Lz=($)=>Wz.test($)&&!Xz.test($)&&!Zz.test($),wz=($)=>{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 uX=($,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:w,path:Y}=X;return`${Z}//${L}${w?":"+w:""}${Y}`}}return X};return W};var _X="AWS_ENDPOINT_URL",dX="endpoint_url",gX=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[_X,...G].join("_")];if(W)return W;const X=U[_X];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((w)=>w.toLowerCase()),L=X[[Z.join("_"),dX].join(CU)];if(L)return L}}const W=U[dX];if(W)return W;return},default:void 0});var m1=async($)=>K0(gX($??""))();var fU=$0(y8(),1),n1=($)=>{if(typeof $==="object"){if("url"in $)return fU.parseUrl($.url);return $}return fU.parseUrl($)};var pX=async($,U,G,W)=>{if(!G.endpoint){let L;if(G.serviceConfiguredEndpoint)L=await G.serviceConfiguredEndpoint();else L=await m1(G.serviceId);if(L)G.endpoint=()=>Promise.resolve(n1(L))}const X=await Yz($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},Yz=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 uX(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 yX(W);return W};var sX=({config:$,instructions:U})=>{return(G,W)=>async(X)=>{const Z=await pX(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 Y=lX.getSmithyContext(W)?.selectedHttpAuthScheme?.httpAuthOption;if(Y)Y.signingProperties=Object.assign(Y.signingProperties||{},{signing_region:L.signingRegion,signingRegion:L.signingRegion,signing_service:L.signingName,signingName:L.signingName,signingRegionSet:L.signingRegionSet},L.properties)}return G({...X})}};var Qz={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:OU.name},zE=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(sX({config:$,instructions:U}),Qz)}});var i1=$0(i(),1);var KE=($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>n1(await i1.normalizeProvider(G)()):void 0,Z={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:i1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:i1.normalizeProvider($.useFipsEndpoint??!1)};let L=void 0;return Z.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!L)L=m1($.serviceId);return L},Z};var DU=$0(i(),1);var m;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(m||(m={}));var M0=3,mX=m.STANDARD;var nX=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],iX=["TimeoutError","RequestTimeout","RequestTimeoutException"],rX=[500,502,503,504],oX=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var Fz=($)=>$.$metadata?.clockSkewCorrected,k0=($)=>$.$metadata?.httpStatusCode===429||nX.includes($.name)||$.$retryable?.throttling==!0,r1=($)=>Fz($)||iX.includes($.name)||oX.includes($?.code||"")||rX.includes($.$metadata?.httpStatusCode||0),aX=($)=>{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(),k0($)){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 tX=()=>{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=m.STANDARD,this.capacity=a1,this.retryBackoffStrategy=tX(),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 kU{constructor($,U){this.maxAttemptsProvider=$,this.mode=m.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 eX="AWS_MAX_ATTEMPTS",$Z="max_attempts",ZT={environmentVariableSelector:($)=>{const U=$[eX];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${eX} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[$Z];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${$Z} mast be a number, got "${U}"`);return G},default:M0},LT=($)=>{const{retryStrategy:U}=$,G=DU.normalizeProvider($.maxAttempts??M0);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await DU.normalizeProvider($.retryMode)()===m.ADAPTIVE)return new kU(G);return new D0(G)}}},zz="AWS_RETRY_MODE",Jz="retry_mode",wT={environmentVariableSelector:($)=>$[zz],configFileSelector:($)=>$[Jz],default:mX};import{Readable as Rz} from"stream";var UZ=($)=>$?.body instanceof Rz||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var bU=($)=>{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 Iz=($)=>(U,G)=>async(W)=>{let X=await $.retryStrategy();const Z=await $.maxAttempts();if(Kz(X)){X=X;let L=await X.acquireInitialRetryToken(G.partition_id),w=new Error,Y=0,Q=0;const{request:F}=W,z=y.isInstance(F);if(z)F.headers[t1]=mG();while(!0)try{if(z)F.headers[e1]=`attempt=${Y+1}; max=${Z}`;const{response:J,output:R}=await U(W);return X.recordSuccess(L),R.$metadata.attempts=Y+1,R.$metadata.totalRetryDelay=Q,{response:J,output:R}}catch(J){const R=Mz(J);if(w=bU(J),z&&UZ(F))throw(G.logger instanceof GZ?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),w;try{L=await X.refreshRetryTokenForRetry(L,R)}catch(V){if(!w.$metadata)w.$metadata={};throw w.$metadata.attempts=Y+1,w.$metadata.totalRetryDelay=Q,w}Y=L.getRetryCount();const I=L.getRetryDelay();Q+=I,await new Promise((V)=>setTimeout(V,I))}}else{if(X=X,X?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(U,W)}},Kz=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",Mz=($)=>{const U={error:$,errorType:Bz($)},G=Ez($.$response);if(G)U.retryAfterHint=G;return U},Bz=($)=>{if(k0($))return"THROTTLING";if(r1($))return"TRANSIENT";if(aX($))return"SERVER_ERROR";return"CLIENT_ERROR"},Vz={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ET=($)=>({applyToStack:(U)=>{U.add(Iz($),Vz)}}),Ez=($)=>{if(!hU.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 QI,release as FI} from"os";import{env as OL,versions as zI} from"process";var rU={isCrtAvailable:!1};var HL=()=>{if(rU.isCrtAvailable)return["md/crt-avail"];return null};var JI="AWS_SDK_UA_APP_ID",RI="sdk-ua-app-id",fA=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${QI()}`,FI()],["lang/js"],["md/nodejs",`${zI.node}`]],W=HL();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(OL.AWS_EXECUTION_ENV)G.push([`exec-env/${OL.AWS_EXECUTION_ENV}`]);const X=K0({environmentVariableSelector:(L)=>L[JI],configFileSelector:(L)=>L[RI],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 II} from"buffer";import{createHash as KI,createHmac as MI} from"crypto";var CL=function($,U){if(II.isBuffer($))return $;if(typeof $==="string")return fL($,U);if(ArrayBuffer.isView($))return oU($.buffer,$.byteOffset,$.byteLength);return oU($)};class BI{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(qL(CL($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?MI(this.algorithmIdentifier,CL(this.secret)):KI(this.algorithmIdentifier)}}import{fstatSync as VI,lstatSync as EI} from"fs";var hA=($)=>{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 EI($.path).size;else if(typeof $.fd==="number")return VI($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var NL="AWS_EXECUTION_ENV",aU="AWS_REGION",tU="AWS_DEFAULT_REGION",jL="AWS_EC2_METADATA_DISABLED",PL=["in-region","cross-region","mobile","standard","legacy"],SL="/latest/meta-data/placement/region";var kL={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var sA=({region:$=K0(hX),defaultsMode:U=K0(kL)}={})=>DL(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return TI($);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 ${PL.join(", ")}, got ${G}`)}}),TI=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await AI();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},AI=async()=>{if(process.env[NL]&&(process.env[aU]||process.env[tU]))return process.env[aU]??process.env[tU];if(!process.env[jL])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-078b5ca64822d227.js"),G=await $();return(await U({...G,path:SL})).toString()}catch($){}};var rA=($)=>{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}}},oA=($)=>{return{region:$.region()}};export{mG as W,i as X,rI as Y,oI as Z,tI as _,W3 as $,S0 as aa,L0 as ba,IU as ca,s3 as da,yF as ea,a0 as fa,dF as ga,sF as ha,qB as ia,mB as ja,rB as ka,hX as la,wV as ma,vB as na,hV as oa,Yz as pa,_V as qa,zE as ra,KE as sa,mX as ta,ZT as ua,LT as va,wT as wa,ET as xa,YI as ya,fA as za,BI as Aa,hA as Ba,sA as Ca,rA as Da,oA as Ea};
|
|
19
|
-
|
|
20
|
-
//# debugId=6477D7E9D0A3C14364756e2164756e21
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{K as g} from"./chunk-0d97333b6af9fc45.js";import{Gb as Z,Kb as b} from"./chunk-961bb9fd54d10bbe.js";import{Ob as h,Qb as L,Rb as H,Sb as V} from"./chunk-2214ecbc4b85c724.js";var T=g((a,S)=>{var G=function(c){const i={};if(c=c.replace(/^\?/,""),c)for(let n of c.split("&")){let[F,f=null]=n.split("=");if(F=decodeURIComponent(F),f)f=decodeURIComponent(f);if(!(F in i))i[F]=f;else if(Array.isArray(i[F]))i[F].push(f);else i[F]=[i[F],f]}return i},o=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,M=Object.prototype.hasOwnProperty,Q=(c,i)=>o(c,"name",{value:i,configurable:!0}),U=(c,i)=>{for(var n in i)o(c,n,{get:i[n],enumerable:!0})},O=(c,i,n,F)=>{if(i&&typeof i==="object"||typeof i==="function"){for(let f of D(i))if(!M.call(c,f)&&f!==n)o(c,f,{get:()=>i[f],enumerable:!(F=Y(i,f))||F.enumerable})}return c},d=(c)=>O(o({},"__esModule",{value:!0}),c),A={};U(A,{parseQueryString:()=>G});S.exports=d(A);Q(G,"parseQueryString")});var q=g((u,z)=>{var{defineProperty:w,getOwnPropertyDescriptor:v,getOwnPropertyNames:J}=Object,x=Object.prototype.hasOwnProperty,P=(c,i)=>w(c,"name",{value:i,configurable:!0}),s=(c,i)=>{for(var n in i)w(c,n,{get:i[n],enumerable:!0})},l=(c,i,n,F)=>{if(i&&typeof i==="object"||typeof i==="function"){for(let f of J(i))if(!x.call(c,f)&&f!==n)w(c,f,{get:()=>i[f],enumerable:!(F=v(i,f))||F.enumerable})}return c},m=(c)=>l(w({},"__esModule",{value:!0}),c),j={};s(j,{parseUrl:()=>t});z.exports=m(j);var k=T(),t=P((c)=>{if(typeof c==="string")return t(new URL(c));const{hostname:i,pathname:n,port:F,protocol:f,search:E}=c;let N;if(E)N=k.parseQueryString(E);return{hostname:i,port:F?parseInt(F):void 0,protocol:f,path:n,query:N}},"parseUrl")});function C(c){try{const i=new Set(Array.from(c.match(/([A-Z_]){3,}/g)??[]));return i.delete("CONFIG"),i.delete("CONFIG_PREFIX_SEPARATOR"),i.delete("ENV"),[...i].join(", ")}catch(i){return c}}var X=(c,i)=>async()=>{try{const n=c(process.env);if(n===void 0)throw new Error;return n}catch(n){throw new h(n.message||`Not found in ENV: ${C(c.toString())}`,{logger:i})}};var B=(c,{preferredFile:i="config",...n}={})=>async()=>{const F=Z(n),{configFile:f,credentialsFile:E}=await b(n),N=E[F]||{},I=f[F]||{},W=i==="config"?{...N,...I}:{...I,...N};try{const $=c(W,i==="config"?f:E);if($===void 0)throw new Error;return $}catch(R){throw new h(R.message||`Not found in config files w/ profile [${F}]: ${C(c.toString())}`,{logger:n.logger})}};var p=(c)=>typeof c==="function",K=(c)=>p(c)?async()=>await c():H(c);var hi=({environmentVariableSelector:c,configFileSelector:i,default:n},F={})=>V(L(X(c),B(i,F),K(n)));export{q as Bb,hi as Cb};
|
|
2
|
-
|
|
3
|
-
//# debugId=8660FF1B3CC94B9964756e2164756e21
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{e as zr,h as or,i as ur} from"./http/index.js";import{q as tr,r as Gr,t as Yr,v as Xr} from"./facades/index.js";import{H as kr} from"./chunk-a32dc07245e51d1d.js";import{N as Y} from"./chunk-2f8cf8372320b622.js";import{Suspense as Re,useContext as nr,useEffect as Wr,useState as yr,StrictMode as be} from"react";import{createContext as qr} from"react";import{jsxDEV as Br} from"react/jsx-dev-runtime";var Q=qr({}),ir=(r)=>{let e=r.value;if(r.value)e=r.value;else e=window.__GEMI_DATA__;return Br(Q.Provider,{value:e,children:r.children},void 0,!1,void 0,this)};var G=function(){return G=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)({}).hasOwnProperty.call(t,s)&&(r[s]=t[s])}return r},G.apply(null,arguments)};var Ur=function(r,e){if(!r){if(typeof console!=="undefined")console.warn(e);try{throw new Error(e)}catch(t){}}},ar=function(r){if(r===void 0)r={};var e=r,t=e.window,s=t===void 0?document.defaultView:t,n=s.history;function o(){var m=s.location,a=m.pathname,M=m.search,P=m.hash,S=n.state||{};return[S.idx,cr({pathname:a,search:M,hash:P,state:S.usr||null,key:S.key||"default"})]}var u=null;function i(){if(u)l.call(u),u=null;else{var m=J.Pop,a=o(),M=a[0],P=a[1];if(l.length)if(M!=null){var S=f-M;if(S)u={action:m,location:P,retry:function c(){T(S*-1)}},T(S)}else Ur(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else R(m)}}s.addEventListener(Ir,i);var g=J.Pop,C=o(),f=C[0],h=C[1],V=pr(),l=pr();if(f==null)f=0,n.replaceState(G({},n.state,{idx:f}),"");function v(m){return typeof m==="string"?m:Lr(m)}function W(m,a){if(a===void 0)a=null;return cr(G({pathname:h.pathname,hash:"",search:""},typeof m==="string"?_r(m):m,{state:a,key:Hr()}))}function p(m,a){return[{usr:m.state,key:m.key,idx:a},v(m)]}function b(m,a,M){return!l.length||(l.call({action:m,location:a,retry:M}),!1)}function R(m){g=m;var a=o();f=a[0],h=a[1],V.call({action:g,location:h})}function D(m,a){var M=J.Push,P=W(m,a);function S(){D(m,a)}if(b(M,P,S)){var c=p(P,f+1),w=c[0],y=c[1];try{n.pushState(w,"",y)}catch(E){s.location.assign(y)}R(M)}}function j(m,a){var M=J.Replace,P=W(m,a);function S(){j(m,a)}if(b(M,P,S)){var c=p(P,f),w=c[0],y=c[1];n.replaceState(w,"",y),R(M)}}function T(m){n.go(m)}var F={get action(){return g},get location(){return h},createHref:v,push:D,replace:j,go:T,back:function m(){T(-1)},forward:function m(){T(1)},listen:function m(a){return V.push(a)},block:function m(a){var M=l.push(a);if(l.length===1)s.addEventListener(mr,fr);return function(){if(M(),!l.length)s.removeEventListener(mr,fr)}}};return F};var fr=function(r){r.preventDefault(),r.returnValue=""},pr=function(){var r=[];return{get length(){return r.length},push:function e(t){return r.push(t),function(){r=r.filter(function(s){return s!==t})}},call:function e(t){r.forEach(function(s){return s&&s(t)})}}},Hr=function(){return Math.random().toString(36).substr(2,8)},Lr=function(r){var e=r.pathname,t=e===void 0?"/":e,s=r.search,n=s===void 0?"":s,o=r.hash,u=o===void 0?"":o;if(n&&n!=="?")t+=n.charAt(0)==="?"?n:"?"+n;if(u&&u!=="#")t+=u.charAt(0)==="#"?u:"#"+u;return t},_r=function(r){var e={};if(r){var t=r.indexOf("#");if(t>=0)e.hash=r.substr(t),r=r.substr(0,t);var s=r.indexOf("?");if(s>=0)e.search=r.substr(s),r=r.substr(0,s);if(r)e.pathname=r}return e},J;(function(r){r.Pop="POP",r.Push="PUSH",r.Replace="REPLACE"})(J||(J={}));var cr=function(r){return Object.freeze(r)},mr="beforeunload";var Ir="popstate";import{createContext as ce,useContext as Vr,useEffect as jr,useRef as B,useState as z} from"react";class N{subscribers=new Set;value;constructor(r){this.value=r}subscribe(r){return this.subscribers.add(r),()=>{this.subscribers.delete(r)}}next(r){this.value=r,this.subscribers.forEach((e)=>e(r))}getValue(){return this.value}}function gr(r){return new Promise((e)=>setTimeout(e,r))}class K{state=new N(100);unsubscribe;timer;tick=0;isTicking=!1;constructor(r){this.unsubscribe=r.subscribe((e)=>{if(e)this.start();else this.end()})}getNextIncrement(){const r=this.state.getValue();if(r===100)return Math.ceil(Math.random()*10);if(r<=20){if(Math.ceil(Math.random()*100)>80)return r;return r+Math.ceil(Math.random()*5)+1}if(r<=50){if(Math.ceil(Math.random()*100)>50)return r;return Math.min(r+Math.ceil(Math.random()*10),70)}if(r<=70){if(Math.ceil(Math.random()*100)>60)return r;return Math.min(r+Math.ceil(Math.random()*3),80)}if(r<=80)return Math.min(r+Math.ceil(Math.random()*1),90);if(r<=90){const e=Math.ceil(Math.random()*100)>50?0:1;return Math.min(r+e,94)}if(r<=94){const e=Math.ceil(Math.random()*100)>20?0:1;return Math.min(r+e,99)}}getNextInterval(){if(this.tick===0)return this.tick=1,200;const r=this.state.getValue();if(r>=88)return 400;if(r>=94)return 1000;if(r>=98)return 2000;return 100}async nextTick(){if(!this.isTicking)return;if(await gr(this.getNextInterval()),!this.isTicking)return;const r=this.getNextIncrement();this.state.next(Math.min(r,96)),await this.nextTick()}start(){this.isTicking=!0,this.nextTick()}end(){this.state.next(99),this.isTicking=!1,this.tick=0,setTimeout(()=>{this.state.next(100)},200)}destroy(){this.end(),this.unsubscribe()}}import{useEffect as oe,useState as ue} from"react";import{useContext as er} from"react";import{createContext as Kr,useContext as Ar,useState as A} from"react";import{jsxDEV as xr} from"react/jsx-dev-runtime";var x=Kr({}),lr=(r)=>{const{i18n:e}=Ar(Q),[t,s]=A(e.currentLocale),[n]=A(()=>{const f=new Map;for(let[h,V]of Object.entries(e.dictionary)){const l=new Map;for(let[v,W]of Object.entries(V))l.set(v,W);f.set(h,l)}return f}),[o,u]=A(()=>{if(!n.has(t))return{};return Object.fromEntries(n.get(t).entries())});function i(f){for(let[h,V]of Object.entries(f)){if(!n.has(h))n.set(h,new Map);const l=n.get(h);for(let[v,W]of Object.entries(V)){if(!l.has(v))l.set(v,{});l.set(v,W)}}u(Object.fromEntries(n.get(t).entries()))}const g=(f)=>{if(n.has(f))s(f),u(Object.fromEntries(n.get(f).entries()))},C=async(f,h,V)=>{if(Object.keys(e).length===0)return;const v=await(await fetch(`/api/__gemi__/services/i18n/translations?scope=${f}&locale=${h||t}`,{signal:V})).json();i(v)};return xr(x.Provider,{value:{locale:t,translations:o,changeLocale:g,updateDictionary:i,fetchTranslations:C},children:r.children},void 0,!1,void 0,this)};import{createContext as re,useContext as ee,useRef as hr} from"react";class Z{store;staleVariants=new Set;lastFetchRecord=new Map;key;constructor(r,e={}){this.key=r;const t=new Map,s=Date.now();for(let[n,o]of Object.entries(e))if(o)t.set(n,{loading:!1,data:o,error:null}),this.lastFetchRecord.set(n,s);this.store=new N(t)}getVariant(r){const e=this.store.getValue();if(!e.has(r))this.resolveVariant(r);else{const t=e.get(r);if(!t.loading){if(!t.data)return this.resolveVariant(r),e.get(r);else if(t.data){const s=this.staleVariants.has(r),n=Date.now(),o=n-(this.lastFetchRecord.get(r)??n)>5000;if(s||o)return this.lastFetchRecord.set(r,n),this.resolveVariant(r,!0),e.get(r)}}}return e.get(r)}mutate(r,e){const t=this.store.getValue(),s=t.get(r),n=e(s.data);this.staleVariants.add(r),this.store.next(t.set(r,{loading:!1,data:n,error:null})),this.resolveVariant(r);const o=[window.location.origin,this.key,r].filter((u)=>u.length>0).join("?");caches.delete(o)}async resolveVariant(r,e=!1){if(typeof window==="undefined")return;const t=this.store.getValue(),s=t.get(r);if(!e)t.set(r,{loading:!0,data:s?.data,error:s?.data});const n=[this.key,r].filter((i)=>i.length).join("?"),o=await fetch(`/api${n}`);let u=null;try{u=await o.json()}catch(i){this.store.next(t.set(r,{loading:!1,data:s?.data,error:i}))}if(o.ok)this.store.next(t.set(r,{loading:!1,data:u,error:null})),this.staleVariants.delete(r),this.lastFetchRecord.set(r,Date.now());else this.store.next(t.set(r,{loading:!1,data:s?.data,error:u}))}}import{jsxDEV as te} from"react/jsx-dev-runtime";var rr=re({getResource:(r,e={})=>{return new Z(r,e)},updatePrefecthedData:(r)=>{}}),Pr=({children:r})=>{const e=hr(new Map),{prefetchedData:t}=ee(Q),s=hr(t),n=(o)=>{for(let[u,i]of Object.entries(o))s.current[u]=i};return te(rr.Provider,{value:{updatePrefecthedData:n,getResource:(o,u)=>{let i=u;if(!i&&s.current[o])i=s.current[o];if(!e.current.has(o))e.current.set(o,new Z(o,i??{}));return e.current.get(o)}},children:r},void 0,!1,void 0,this)};function $(){const{updatePageData:r,history:e,getViewPathsFromPathname:t,getRoutePathnameFromHref:s,isNavigatingSubject:n,setNavigationAbortController:o,getScrollPosition:u}=er(d),{updatePrefecthedData:i}=er(rr),{fetchTranslations:g}=er(x);function C(f){return async(h,...V)=>{const l=new AbortController;o(l);const[v={}]=V,{search:W={},params:p={},shallow:b}={params:{},shallow:!1,...v},R=new URLSearchParams(W),D=tr(h,p),j=[tr(h,p),R.toString()].join("?");if(b){e?.[f](j);return}const T=t(h),F=new URLSearchParams(R);F.set("json","true");const m=[D,F.toString()].join("?");R.set("json","true");const a=s(h);n.next(!0);try{const[M]=await Promise.all([fetch(m,{signal:l.signal}),g(a,void 0,l.signal),...T.map((P)=>window.loaders[P]())]);if(M.ok){const{data:P,prefetchedData:S,directive:c={},is404:w=!1}=await M.json();if(c?.kind==="Redirect"){if(c?.path)n.next(!1),C("replace")(c.path,{params:{}});return}r(P),i(S),e?.[f](j,w?{status:404}:{}),setTimeout(()=>{window.scrollTo(0,u(j))},1)}}catch(M){n.next(!1)}n.next(!1)}}return{push:C("push"),replace:C("replace")}}function Rr(){const{push:r}=$(),e=q(),t=(n,o)=>{r(e.pathname,{search:n,shallow:o})};return new Cr(new URLSearchParams(e.search),t)}class Cr{r;e;constructor(r,e){this.searchParams=r;this.callback=e}get(r){return this.searchParams.get(r)}set(r,e){let t={};if(typeof r==="string"){let s=e;if(typeof e==="function")s=e(this.get(r)??"");t[r]=s}else t=r??{};for(let[s,n]of Object.entries(t)){let o=n;if(typeof n==="function")o=n(this.get(s)??"");this.searchParams.set(s,o)}return this}append(r,e){return this.searchParams.append(r,e),this}sort(){return this.searchParams.sort(),this}clear(){return this.searchParams=new URLSearchParams,this}delete(r){const e=Array.isArray(r)?r:[r];for(let t of e)this.searchParams.delete(t);return this}toJSON(){const r=new Map;for(let[e,t]of this.searchParams)if(r.has(e)){const s=r.get(e);if(Array.isArray(s))s.push(t),r.set(e,s);else r.set(e,[s,t])}else r.set(e,t);return Object.fromEntries(r.entries())}toString(){return this.searchParams.toString()}push(r="soft"){this.callback(this.toJSON(),r==="soft")}}import{useContext as se} from"react";function br(){const{getRoutePathnameFromHref:r}=se(d),e=q(),t=r(e.pathname);return{pathname:t,startsWith:(s)=>{return t.startsWith(s)}}}import{useContext as ne} from"react";function Mr(){const{params:r}=ne(d);return r}import{createPortal as ie} from"react-dom";import{jsxDEV as wr} from"react/jsx-dev-runtime";var vr=()=>{const{replace:r}=$(),e=Rr(),{pathname:t}=br(),s=Mr(),[n,o]=ue(!1),u=()=>{o(!0),r(t,{params:s,search:e.toJSON()}).catch(console.log).finally(()=>{o(!1)})};if(oe(()=>{if(import.meta.hot)import.meta.hot.on("vite:beforeFullReload",()=>{throw console.log("HELLO"),"(skipping full reload)"}),import.meta.hot.on("beforeFullReload",()=>{throw console.log("HELLO"),"(skipping full reload)"});return()=>{if(import.meta.hot)import.meta.hot.off("http-reload",u)}},[u]),!n||typeof document==="undefined")return null;return ie(wr("div",{className:"fixed z-[1000] bottom-0 right-0 p-2",children:wr("div",{className:"p-2 bg-white text-black rounded-md shadow-md",children:"..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),document.body)};var me=function(r){const{locationSubject:e}=Vr(d);jr(()=>{return r(e.getValue()),e.subscribe(r)},[])};function q(){const r=Vr(d);if(!r)throw new Error("useLocation must be used within a ClientRouterProvider");const{locationSubject:e}=r,[t,s]=z(e?.getValue());return me((n)=>{s(n)}),t}import{jsxDEV as Sr} from"react/jsx-dev-runtime";var d=ce({}),Dr=(r)=>{const{children:e,pathname:t,currentPath:s,is404:n,routeManifest:o,pageData:u,params:i,searchParams:g}=r,[C,f]=z(i),h=B(new AbortController),[V]=z(()=>{return new N(!1)}),[l]=z(new K(V)),v=B(structuredClone(u)),W=B(new Map),p=n?["404"]:o[t]??["404"],b=B(new N(p)),[R]=z(()=>new N({hash:"",pathname:s,search:g,state:{},key:""})),[D]=z(()=>{let c=null;if(typeof window!=="undefined")c=ar();return c}),j=()=>{const c=[`${R.getValue().pathname}?${R.getValue().search}`].filter((w)=>w.length>0).join("");W.current.set(c,window.scrollY)},T=(c)=>{const w=[];for(let k of Object.keys(o))if(new Y({pathname:k}).test({pathname:c}))w.push(k);const y=w.sort((k,_)=>{const Zr=k.split("/").length+k.split(":").length,$r=_.split("/").length+_.split(":").length;return Zr-$r}),[E]=y??[];return E},F=(c)=>{const w=T(c);return o[w]??[]},m=(c)=>{return T(c)},a=(c)=>{const w=T(c);return new Y({pathname:w}).exec({pathname:c})?.pathname.groups};jr(()=>{return D?.listen(({location:c})=>{R.next(structuredClone(c)),f(a(c.pathname)),b.current.next((()=>{if(c.state?.status===404)return["404"];return F(c.pathname)})())}),window.addEventListener("scrollend",j),()=>{window.removeEventListener("scroll",j)}},[]);const M=(c)=>{const[w,y]=Object.entries(c)[0];if(!v.current?.[w])v.current[w]={};v.current[w]=y},P=(c)=>{return v.current[R.getValue().pathname][c]},S=(c)=>{h.current.abort(),h.current=c};return Sr(d.Provider,{value:{isNavigatingSubject:V,getViewPathsFromPathname:F,history:D,params:C,locationSubject:R,getScrollPosition:(c)=>{return W.current.get(c)||0},viewEntriesSubject:b.current,updatePageData:M,getPageData:P,getRoutePathnameFromHref:m,setNavigationAbortController:S,progressManager:l},children:[e,import.meta.hot&&Sr(vr,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};import{createContext as fe,lazy as pe} from"react";function X(r){let e=[];for(let[t,s]of r)e.push(t,...X(s).flat());return Array.from(new Set(e))}import{jsxDEV as ae} from"react/jsx-dev-runtime";var U=null;if(typeof window!=="undefined"){U={};const{componentTree:r}=window.__GEMI_DATA__;for(let e of X(r))U[e]=pe(window.loaders[e])}var sr=fe({viewImportMap:U}),Tr=(r)=>{return ae(sr.Provider,{value:{viewImportMap:r.viewImportMap??U},children:r.children},void 0,!1,void 0,this)};import{createContext as ge,useEffect as le,useRef as he} from"react";import{jsxDEV as Ce} from"react/jsx-dev-runtime";var Pe=ge({}),Or=(r)=>{const e=he(null);function t(){return new Promise((u)=>{if(e.current)u(e.current);else{const i=new WebSocket("ws://localhost:5173/");i.onopen=()=>{e.current=i,i.addEventListener("close",()=>{e.current=null}),u(i)}}})}const s=async(u,i)=>{const g=await t();g.send(JSON.stringify({type:"subscribe",topic:u})),g.addEventListener("message",i)},n=async(u,i)=>{const g=await t();g.send(JSON.stringify({type:"unsubscribe",topic:u})),g.removeEventListener("message",i)},o=async(u,i={})=>{(await t()).send(JSON.stringify({type:"broadcast",topic:u,payload:i}))};return le(()=>{return()=>{if(e.current)e.current.close(),e.current=null}},[]),Ce(Pe.Provider,{value:{subscribe:s,unsubscribe:n,broadcast:o},children:r.children},void 0,!1,void 0,this)};import{jsxDEV as O} from"react/jsx-dev-runtime";var dr=(r)=>{const{componentPath:e}=r,{viewImportMap:t}=nr(sr),{viewEntriesSubject:s,getPageData:n,history:o}=nr(d),[u,i]=yr(()=>s.getValue().includes(e)),[g,C]=yr(()=>n(e));if(Wr(()=>{return s.subscribe((V)=>{i(V.includes(e))})},[e]),Wr(()=>{return o?.listen(()=>{C(n(e))})},[]),!u)return null;const f=t[e];if(f)return O(f,{...g,children:r.children},void 0,!1,void 0,this);const h=t["404"];return O(h,{},void 0,!1,void 0,this)},Fr=(r)=>{const{componentTree:e}=r;return O(Re,{children:e.map((t)=>{const[s,n]=t;if(n.length>0)return O(dr,{componentPath:s,children:O(Fr,{componentTree:n},void 0,!1,void 0,this)},s,!1,void 0,this);return O(dr,{componentPath:s},s,!1,void 0,this)})},void 0,!1,void 0,this)},Nr=(r)=>{const{RootLayout:e}=r,{routeManifest:t,router:s,componentTree:n,pageData:o,auth:u}=nr(Q);return O(lr,{children:O(Or,{children:O(Pr,{children:O(Tr,{viewImportMap:r.viewImportMap,children:O(Dr,{searchParams:s.searchParams,params:s.params,pageData:o,is404:s.is404,pathname:s.pathname,currentPath:s.currentPath,routeManifest:t,children:O(be,{children:O(e,{children:O(Fr,{componentTree:n},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)};function Er(r){return(e)=>Qr(ir,{value:e.data,children:Qr(Nr,{RootLayout:r,viewImportMap:e.viewImportMap},void 0,!1,void 0,this)},void 0,!1,void 0,this)}import{jsxDEV as Qr} from"react/jsx-dev-runtime";function I(r){const e={};for(let[t,s]of Object.entries(r))if("run"in s){const n=s;if("children"in n){const o=new n.children,u=I(o.routes);for(let[i,{exec:g,middleware:C}]of Object.entries(u)){const f=t==="/"?i:`${t}${i}`,h=i==="/"&&t!=="/"?t:f;e[h]={exec:[n.run.bind(n),...g],middleware:[...n.middlewares,...C]}}}else e[t]={exec:[n.run.bind(n)],middleware:n.middlewares}}else{const n=new s,o=I(n.routes);for(let[u,{exec:i,middleware:g}]of Object.entries(o)){const C=t==="/"?u:`${t}${u}`,f=u==="/"&&t!=="/"?t:C;e[f]={exec:i,middleware:[...n.middlewares,...g]}}}return Object.fromEntries(Object.entries(e).sort(([t],[s])=>{const n=t.split("/").length+t.split(":").length,o=s.split("/").length+s.split(":").length;return n-o}))}import{renderToReadableStream as Me} from"react-dom/server.browser";import{createElement as Jr,Fragment as we} from"react";function H(r){const e={};for(let[t,s]of Object.entries(r))if("run"in s){const n=s.viewPath;if("children"in s)e[t]=[n];if("children"in s){const o=new s.children,u=H(o.routes);for(let[i,g]of Object.entries(u)){const C=t==="/"?i:`${t}${i}`,f=i==="/"&&t!=="/"?t:C;e[f]=[n,...g]}}else e[t]=[n]}else{const n=new s,o=H(n.routes);for(let[u,i]of Object.entries(o)){const g=t==="/"?u:`${t}${u}`,C=u==="/"&&t!=="/"?t:g;e[C]=i}}return e}function L(r){const e=[];for(let[t,s]of Object.entries(r))if("run"in s){const n=s.viewPath;if("children"in s){const o=new s.children,u=L(o.routes);e.push([n,u])}else e.push([n,[]])}else{const n=new s,o=L(n.routes);e.push(...o)}return e}class ve extends kr{r;static _name="ViewRouterServiceContainer";flatViewRoutes={};routeManifest={};componentTree=[];flatComponentTree=[];RootLayout=null;constructor(r){super();this.service=r;const e={"/":r.rootRouter,"/auth":Yr};this.flatViewRoutes=I(e),this.routeManifest=H(e),this.componentTree=L(e),this.flatComponentTree=X(this.componentTree),this.RootLayout=Er(r.rootLayout)}boot(){}async handleViewRequest(r){const e=new URL(r.url),t=e.searchParams.get("json");let s=null;try{let p=[],b=[],R=null,D={};for(let[P,S]of Object.entries(this.flatViewRoutes)){const c=new Y({pathname:P});if(c.test({pathname:e.pathname})){R=P,D=c.exec({pathname:e.pathname})?.pathname.groups,p=S.exec,b=S.middleware;break}}const j=new ur(r,D),{data:T,cookies:F,headers:m,user:a,prefetchedData:M}=await or.run(j,async()=>{const P=or.getStore();P.setRequest(j),await Xr.use().runMiddleware(b,R);const S=await Promise.all([...p.map((E)=>E(j)),...Array.from(P.prefetchPromiseQueue).map((E)=>E())]),c=P.cookies,w=P.headers,y=P.prefetchedResources;return{data:S,cookies:c,headers:w,user:P.user,prefetchedData:Object.fromEntries(y.entries())}});s={data:T,prefetchedData:M,currentPathName:R,user:a,params:D,cookies:F,headers:m}}catch(p){if(p.kind===zr)if(t){const{status:b=400,data:R,directive:D,headers:j}=p.payload.api;return new Response(JSON.stringify({data:R,directive:D}),{headers:j,status:b})}else{const{status:b=400,error:R}=p.payload.view;return new Response(R?.message,{...p.payload.view,status:b})}else throw p}const{data:n,params:o,currentPathName:u,user:i,cookies:g}=s,C=n.reduce((p,b)=>{return{...p,...b}},{}),f=Gr.use(),h=f.isEnabled;let V={};if(h){const p=f.detectLocale(new ur(r,o)),b=f.getPageTranslations(p,u);V={supportedLocales:f.supportedLocales,currentLocale:p,dictionary:{[p]:b}}}if(t){const p=new Headers;return p.set("Content-Type","application/json"),g.forEach((b)=>p.append("Set-Cookie",b.toString())),p.append("Cache-Control",i?"private, no-cache, no-store, max-age=0, must-revalidate":"public, max-age=864000, must-revalidate"),new Response(JSON.stringify({data:{[e.pathname]:C},prefetchedData:s.prefetchedData,i18n:V,is404:!u}),{headers:p})}const l=new Headers;l.set("Content-Type","text/html"),l.set("Cache-Control",i?"private, no-cache, no-store, max-age=0, must-revalidate":"public, max-age=864000, must-revalidate"),l.set("ETag",'W/"'+Math.random().toString(36).substring(7)+'"'),s.cookies.forEach((p)=>l.append("Set-Cookie",p.toString()));const v={kind:"view",data:{pageData:{[e.pathname]:C},prefetchedData:s.prefetchedData,i18n:V,auth:{user:i},routeManifest:this.routeManifest,router:{pathname:u,params:o,currentPath:e.pathname,searchParams:e.search,is404:!u?!0:!1},componentTree:[["404",[]],...this.componentTree]},head:{}},W=this.RootLayout;return async(p)=>{const{bootstrapModules:b,loaders:R,styles:D,viewImportMap:j}=p,T=await Me(Jr(we,{children:[D,Jr(W,{data:v.data,viewImportMap:j})]}),{bootstrapScriptContent:`window.__GEMI_DATA__ = ${JSON.stringify(v.data)}; window.loaders=${R}`,bootstrapModules:b});return new Response(T,{status:!u?404:200,headers:l})}}}
|
|
2
|
-
export{ve as L};
|
|
3
|
-
|
|
4
|
-
//# debugId=B9C722A5CDFAB5DD64756e2164756e21
|