gemi 0.4.102 → 0.4.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/{chunk-83f822c222295a62.js → chunk-087e1dd06f85d588.js} +2 -2
  2. package/dist/{chunk-83f822c222295a62.js.map → chunk-087e1dd06f85d588.js.map} +1 -1
  3. package/dist/{chunk-225a2ac22f559ca4.js → chunk-0a78bb530df845c9.js} +2 -2
  4. package/dist/{chunk-225a2ac22f559ca4.js.map → chunk-0a78bb530df845c9.js.map} +1 -1
  5. package/dist/{chunk-b2c75658070c9da8.js → chunk-0bc8cb0a7994c85d.js} +2 -2
  6. package/dist/{chunk-b2c75658070c9da8.js.map → chunk-0bc8cb0a7994c85d.js.map} +1 -1
  7. package/dist/chunk-17c3f49735b660d5.js +3 -0
  8. package/dist/chunk-17c3f49735b660d5.js.map +17 -0
  9. package/dist/{chunk-3840523c97bd28e4.js → chunk-28edd25587946042.js} +2 -2
  10. package/dist/{chunk-3840523c97bd28e4.js.map → chunk-28edd25587946042.js.map} +1 -1
  11. package/dist/chunk-4b2790e55056a146.js +4 -0
  12. package/dist/{chunk-76ab9cb416bb617d.js.map → chunk-4b2790e55056a146.js.map} +2 -2
  13. package/dist/chunk-4bda8e5e6ea82011.js +4 -0
  14. package/dist/{chunk-c69698325e61e6cf.js.map → chunk-4bda8e5e6ea82011.js.map} +2 -2
  15. package/dist/{chunk-f5707f3bdba77464.js → chunk-643d1c40e2a0f67f.js} +2 -2
  16. package/dist/{chunk-f5707f3bdba77464.js.map → chunk-643d1c40e2a0f67f.js.map} +1 -1
  17. package/dist/chunk-79168b7162a45077.js +3 -0
  18. package/dist/{chunk-4e3d8823a08776e9.js.map → chunk-79168b7162a45077.js.map} +4 -4
  19. package/dist/{chunk-9fefc0c4a022180f.js → chunk-7bf700c2348ef918.js} +2 -2
  20. package/dist/{chunk-9fefc0c4a022180f.js.map → chunk-7bf700c2348ef918.js.map} +1 -1
  21. package/dist/{chunk-89e42f2de63525a8.js → chunk-9037f8f927d4caff.js} +2 -2
  22. package/dist/{chunk-89e42f2de63525a8.js.map → chunk-9037f8f927d4caff.js.map} +1 -1
  23. package/dist/chunk-c4a5b4177603f458.js +8 -0
  24. package/dist/{chunk-056c4bd9d2ac239c.js.map → chunk-c4a5b4177603f458.js.map} +2 -2
  25. package/dist/chunk-ce40ec049b04e1d1.js +4 -0
  26. package/dist/{chunk-fea6a8b61878c7b7.js.map → chunk-ce40ec049b04e1d1.js.map} +2 -2
  27. package/dist/chunk-d8d25380b8f0c36e.js +18 -0
  28. package/dist/{chunk-de8906c4ce089607.js.map → chunk-d8d25380b8f0c36e.js.map} +15 -31
  29. package/dist/{chunk-7c5cdd2ff0c5a588.js → chunk-e3363367fe4893a2.js} +3 -3
  30. package/dist/{chunk-7c5cdd2ff0c5a588.js.map → chunk-e3363367fe4893a2.js.map} +1 -1
  31. package/dist/chunk-ebc6b30a0275d2f7.js +7 -0
  32. package/dist/chunk-ebc6b30a0275d2f7.js.map +65 -0
  33. package/dist/{chunk-8d48861243d49671.js → chunk-f53ed6a7a3dad8ec.js} +2 -2
  34. package/dist/{chunk-8d48861243d49671.js.map → chunk-f53ed6a7a3dad8ec.js.map} +1 -1
  35. package/dist/http/index.js +2 -2
  36. package/dist/http/index.js.map +3 -3
  37. package/dist/kernel/index.js +1 -1
  38. package/dist/services/index.js +2 -11
  39. package/dist/services/index.js.map +4 -15
  40. package/package.json +1 -1
  41. package/dist/chunk-056c4bd9d2ac239c.js +0 -8
  42. package/dist/chunk-1c2835b8ab6601e6.js +0 -5
  43. package/dist/chunk-1c2835b8ab6601e6.js.map +0 -64
  44. package/dist/chunk-4e3d8823a08776e9.js +0 -3
  45. package/dist/chunk-76ab9cb416bb617d.js +0 -4
  46. package/dist/chunk-7f095ebadaafbe12.js +0 -4
  47. package/dist/chunk-7f095ebadaafbe12.js.map +0 -10
  48. package/dist/chunk-c69698325e61e6cf.js +0 -4
  49. package/dist/chunk-de8906c4ce089607.js +0 -20
  50. package/dist/chunk-fea6a8b61878c7b7.js +0 -4
@@ -0,0 +1,18 @@
1
+ import{I as C,J as Y} from"./chunk-c83dcc500d5fefe3.js";import{U as rL} from"./chunk-9e77cade8671df8d.js";import{Na as S,Oa as j$,Pa as c0,Qa as a8,Ra as YX,Ta as I5,Ua as H1,Va as z0,Wa as J5,Xa as F5,Ya as KX} from"./chunk-ebc6b30a0275d2f7.js";import{Bb as xw,Cb as i} from"./chunk-0a78bb530df845c9.js";import{Db as G1} from"./chunk-17c3f49735b660d5.js";import{Mb as T$} from"./chunk-79168b7162a45077.js";import{Vb as Sf} from"./chunk-9037f8f927d4caff.js";var j1=Y((i$)=>{var Df=function($){return $&&$.__esModule?$:{default:$}},xf=function(){if(D0>x0.length-16)hf.default.randomFillSync(x0),D0=0;return x0.slice(D0,D0+=16)};Object.defineProperty(i$,"__esModule",{value:!0});i$.default=xf;var hf=Df(import.meta.require("crypto")),x0=new Uint8Array(256),D0=x0.length});var e$=Y((t$)=>{Object.defineProperty(t$,"__esModule",{value:!0});t$.default=void 0;var _f=/^(?:[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;t$.default=_f});var K0=Y(($U)=>{var uf=function($){return $&&$.__esModule?$:{default:$}},yf=function($){return typeof $==="string"&&vf.default.test($)};Object.defineProperty($U,"__esModule",{value:!0});$U.default=void 0;var vf=uf(e$()),pf=yf;$U.default=pf});var A0=Y((WU)=>{var gf=function($){return $&&$.__esModule?$:{default:$}},wU=function($,U=0){return T[$[U+0]]+T[$[U+1]]+T[$[U+2]]+T[$[U+3]]+"-"+T[$[U+4]]+T[$[U+5]]+"-"+T[$[U+6]]+T[$[U+7]]+"-"+T[$[U+8]]+T[$[U+9]]+"-"+T[$[U+10]]+T[$[U+11]]+T[$[U+12]]+T[$[U+13]]+T[$[U+14]]+T[$[U+15]]},sf=function($,U=0){const w=wU($,U);if(!df.default(w))throw TypeError("Stringified UUID is invalid");return w};Object.defineProperty(WU,"__esModule",{value:!0});WU.default=void 0;WU.unsafeStringify=wU;var df=gf(K0()),T=[];for(let $=0;$<256;++$)T.push(($+256).toString(16).slice(1));var mf=sf;WU.default=mf});var LU=Y((ZU)=>{var of=function($){return $&&$.__esModule?$:{default:$}},tf=function($,U,w){let W=U&&w||0;const G=U||new Array(16);$=$||{};let f=$.node||fU,Z=$.clockseq!==void 0?$.clockseq:S1;if(f==null||Z==null){const J=$.random||($.rng||lf.default)();if(f==null)f=fU=[J[0]|1,J[1],J[2],J[3],J[4],J[5]];if(Z==null)Z=S1=(J[6]<<8|J[7])&16383}let L=$.msecs!==void 0?$.msecs:Date.now(),X=$.nsecs!==void 0?$.nsecs:k1+1;const Q=L-b1+(X-k1)/1e4;if(Q<0&&$.clockseq===void 0)Z=Z+1&16383;if((Q<0||L>b1)&&$.nsecs===void 0)X=0;if(X>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");b1=L,k1=X,S1=Z,L+=12219292800000;const z=((L&268435455)*1e4+X)%4294967296;G[W++]=z>>>24&255,G[W++]=z>>>16&255,G[W++]=z>>>8&255,G[W++]=z&255;const M=L/4294967296*1e4&268435455;G[W++]=M>>>8&255,G[W++]=M&255,G[W++]=M>>>24&15|16,G[W++]=M>>>16&255,G[W++]=Z>>>8|128,G[W++]=Z&255;for(let J=0;J<6;++J)G[W+J]=f[J];return U||rf.unsafeStringify(G)};Object.defineProperty(ZU,"__esModule",{value:!0});ZU.default=void 0;var lf=of(j1()),rf=A0(),fU,S1,b1=0,k1=0,af=tf;ZU.default=af});var h1=Y((QU)=>{var $4=function($){return $&&$.__esModule?$:{default:$}},U4=function($){if(!ef.default($))throw TypeError("Invalid UUID");let U;const w=new Uint8Array(16);return w[0]=(U=parseInt($.slice(0,8),16))>>>24,w[1]=U>>>16&255,w[2]=U>>>8&255,w[3]=U&255,w[4]=(U=parseInt($.slice(9,13),16))>>>8,w[5]=U&255,w[6]=(U=parseInt($.slice(14,18),16))>>>8,w[7]=U&255,w[8]=(U=parseInt($.slice(19,23),16))>>>8,w[9]=U&255,w[10]=(U=parseInt($.slice(24,36),16))/1099511627776&255,w[11]=U/4294967296&255,w[12]=U>>>24&255,w[13]=U>>>16&255,w[14]=U>>>8&255,w[15]=U&255,w};Object.defineProperty(QU,"__esModule",{value:!0});QU.default=void 0;var ef=$4(K0()),w4=U4;QU.default=w4});var D1=Y((JU)=>{var f4=function($){return $&&$.__esModule?$:{default:$}},Z4=function($){$=unescape(encodeURIComponent($));const U=[];for(let w=0;w<$.length;++w)U.push($.charCodeAt(w));return U},X4=function($,U,w){function W(G,f,Z,L){var X;if(typeof G==="string")G=Z4(G);if(typeof f==="string")f=G4.default(f);if(((X=f)===null||X===void 0?void 0:X.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let Q=new Uint8Array(16+G.length);if(Q.set(f),Q.set(G,f.length),Q=w(Q),Q[6]=Q[6]&15|U,Q[8]=Q[8]&63|128,Z){L=L||0;for(let z=0;z<16;++z)Z[L+z]=Q[z];return Z}return W4.unsafeStringify(Q)}try{W.name=$}catch(G){}return W.DNS=MU,W.URL=IU,W};Object.defineProperty(JU,"__esModule",{value:!0});JU.URL=JU.DNS=void 0;JU.default=X4;var W4=A0(),G4=f4(h1()),MU="6ba7b810-9dad-11d1-80b4-00c04fd430c8";JU.DNS=MU;var IU="6ba7b811-9dad-11d1-80b4-00c04fd430c8";JU.URL=IU});var AU=Y((YU)=>{var M4=function($){return $&&$.__esModule?$:{default:$}},I4=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return z4.default.createHash("md5").update($).digest()};Object.defineProperty(YU,"__esModule",{value:!0});YU.default=void 0;var z4=M4(import.meta.require("crypto")),J4=I4;YU.default=J4});var OU=Y((EU)=>{var BU=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(EU,"__esModule",{value:!0});EU.default=void 0;var F4=BU(D1()),Y4=BU(AU()),K4=F4.default("v3",48,Y4.default),A4=K4;EU.default=A4});var VU=Y((RU)=>{var E4=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(RU,"__esModule",{value:!0});RU.default=void 0;var B4=E4(import.meta.require("crypto")),q4={randomUUID:B4.default.randomUUID};RU.default=q4});var jU=Y((NU)=>{var CU=function($){return $&&$.__esModule?$:{default:$}},H4=function($,U,w){if(TU.default.randomUUID&&!U&&!$)return TU.default.randomUUID();$=$||{};const W=$.random||($.rng||O4.default)();if(W[6]=W[6]&15|64,W[8]=W[8]&63|128,U){w=w||0;for(let G=0;G<16;++G)U[w+G]=W[G];return U}return R4.unsafeStringify(W)};Object.defineProperty(NU,"__esModule",{value:!0});NU.default=void 0;var TU=CU(VU()),O4=CU(j1()),R4=A0(),V4=H4;NU.default=V4});var kU=Y((SU)=>{var C4=function($){return $&&$.__esModule?$:{default:$}},N4=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return T4.default.createHash("sha1").update($).digest()};Object.defineProperty(SU,"__esModule",{value:!0});SU.default=void 0;var T4=C4(import.meta.require("crypto")),P4=N4;SU.default=P4});var cU=Y((DU)=>{var hU=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(DU,"__esModule",{value:!0});DU.default=void 0;var j4=hU(D1()),S4=hU(kU()),b4=j4.default("v5",80,S4.default),k4=b4;DU.default=k4});var uU=Y((_U)=>{Object.defineProperty(_U,"__esModule",{value:!0});_U.default=void 0;var h4="00000000-0000-0000-0000-000000000000";_U.default=h4});var dU=Y((yU)=>{var x4=function($){return $&&$.__esModule?$:{default:$}},c4=function($){if(!D4.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(yU,"__esModule",{value:!0});yU.default=void 0;var D4=x4(K0()),_4=c4;yU.default=_4});var x1=Y((h)=>{var y=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(h,"__esModule",{value:!0});Object.defineProperty(h,"NIL",{enumerable:!0,get:function(){return d4.default}});Object.defineProperty(h,"parse",{enumerable:!0,get:function(){return n4.default}});Object.defineProperty(h,"stringify",{enumerable:!0,get:function(){return m4.default}});Object.defineProperty(h,"v1",{enumerable:!0,get:function(){return v4.default}});Object.defineProperty(h,"v3",{enumerable:!0,get:function(){return u4.default}});Object.defineProperty(h,"v4",{enumerable:!0,get:function(){return y4.default}});Object.defineProperty(h,"v5",{enumerable:!0,get:function(){return p4.default}});Object.defineProperty(h,"validate",{enumerable:!0,get:function(){return s4.default}});Object.defineProperty(h,"version",{enumerable:!0,get:function(){return g4.default}});var v4=y(LU()),u4=y(OU()),y4=y(jU()),p4=y(cU()),d4=y(uU()),g4=y(dU()),s4=y(K0()),m4=y(A0()),n4=y(h1())});var v=Y((lQ,rU)=>{var{defineProperty:_0,getOwnPropertyDescriptor:U6,getOwnPropertyNames:w6}=Object,W6=Object.prototype.hasOwnProperty,nU=($,U)=>_0($,"name",{value:U,configurable:!0}),G6=($,U)=>{for(var w in U)_0($,w,{get:U[w],enumerable:!0})},f6=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of w6(U))if(!W6.call($,G)&&G!==w)_0($,G,{get:()=>U[G],enumerable:!(W=U6(U,G))||W.enumerable})}return $},Z6=($)=>f6(_0({},"__esModule",{value:!0}),$),lU={};G6(lU,{getSmithyContext:()=>X6,normalizeProvider:()=>L6});rU.exports=Z6(lU);var mU=c0(),X6=nU(($)=>$[mU.SMITHY_CONTEXT_KEY]||($[mU.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),L6=nU(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var c1=Y((rQ,eU)=>{var{defineProperty:v0,getOwnPropertyDescriptor:Q6,getOwnPropertyNames:z6}=Object,M6=Object.prototype.hasOwnProperty,r=($,U)=>v0($,"name",{value:U,configurable:!0}),I6=($,U)=>{for(var w in U)v0($,w,{get:U[w],enumerable:!0})},J6=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of z6(U))if(!M6.call($,G)&&G!==w)v0($,G,{get:()=>U[G],enumerable:!(W=Q6(U,G))||W.enumerable})}return $},F6=($)=>J6(v0({},"__esModule",{value:!0}),$),oU={};I6(oU,{CredentialsProviderError:()=>Y6,ProviderError:()=>u0,TokenProviderError:()=>K6,chain:()=>A6,fromStatic:()=>B6,memoize:()=>E6});eU.exports=F6(oU);var iU=class $ extends Error{constructor(U,w=!0){var W;let G,f=!0;if(typeof w==="boolean")G=void 0,f=w;else if(w!=null&&typeof w==="object")G=w.logger,f=w.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=f,Object.setPrototypeOf(this,$.prototype),(W=G==null?void 0:G.debug)==null||W.call(G,`@smithy/property-provider ${f?"->":"(!)"} ${U}`)}static from(U,w=!0){return Object.assign(new this(U.message,w),U)}};r(iU,"ProviderError");var u0=iU,tU=class $ extends u0{constructor(U,w=!0){super(U,w);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};r(tU,"CredentialsProviderError");var Y6=tU,aU=class $ extends u0{constructor(U,w=!0){super(U,w);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};r(aU,"TokenProviderError");var K6=aU,A6=r((...$)=>async()=>{if($.length===0)throw new u0("No providers in chain");let U;for(let w of $)try{return await w()}catch(W){if(U=W,W==null?void 0:W.tryNextLink)continue;throw W}throw U},"chain"),B6=r(($)=>()=>Promise.resolve($),"fromStatic"),E6=r(($,U,w)=>{let W,G,f,Z=!1;const L=r(async()=>{if(!G)G=$();try{W=await G,f=!0,Z=!1}finally{G=void 0}return W},"coalesceProvider");if(U===void 0)return async(X)=>{if(!f||(X==null?void 0:X.forceRefresh))W=await L();return W};return async(X)=>{if(!f||(X==null?void 0:X.forceRefresh))W=await L();if(Z)return W;if(w&&!w(W))return Z=!0,W;if(U(W))return await L(),W;return W}},"memoize")});var U0=Y(($w)=>{Object.defineProperty($w,"__esModule",{value:!0});$w.getHomeDir=void 0;var q6=import.meta.require("os"),O6=import.meta.require("path"),_1={},R6=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},H6=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:w,HOMEDRIVE:W=`C:${O6.sep}`}=process.env;if($)return $;if(U)return U;if(w)return`${W}${w}`;const G=R6();if(!_1[G])_1[G]=q6.homedir();return _1[G]};$w.getHomeDir=H6});var v1=Y((ww)=>{Object.defineProperty(ww,"__esModule",{value:!0});ww.getSSOTokenFilepath=void 0;var V6=import.meta.require("crypto"),T6=import.meta.require("path"),C6=U0(),N6=($)=>{const w=V6.createHash("sha1").update($).digest("hex");return T6.join(C6.getHomeDir(),".aws","sso","cache",`${w}.json`)};ww.getSSOTokenFilepath=N6});var Zw=Y((Gw)=>{Object.defineProperty(Gw,"__esModule",{value:!0});Gw.getSSOTokenFromFile=void 0;var P6=import.meta.require("fs"),j6=v1(),{readFile:S6}=P6.promises,b6=async($)=>{const U=j6.getSSOTokenFilepath($),w=await S6(U,"utf8");return JSON.parse(w)};Gw.getSSOTokenFromFile=b6});var y1=Y((Xw)=>{Object.defineProperty(Xw,"__esModule",{value:!0});Xw.slurpFile=void 0;var k6=import.meta.require("fs"),{readFile:h6}=k6.promises,u1={},D6=($,U)=>{if(!u1[$]||(U===null||U===void 0?void 0:U.ignoreCache))u1[$]=h6($,"utf8");return u1[$]};Xw.slurpFile=D6});var s1=Y((eQ,E0)=>{var{defineProperty:d0,getOwnPropertyDescriptor:x6,getOwnPropertyNames:c6}=Object,_6=Object.prototype.hasOwnProperty,b=($,U)=>d0($,"name",{value:U,configurable:!0}),v6=($,U)=>{for(var w in U)d0($,w,{get:U[w],enumerable:!0})},p1=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of c6(U))if(!_6.call($,G)&&G!==w)d0($,G,{get:()=>U[G],enumerable:!(W=x6(U,G))||W.enumerable})}return $},g1=($,U,w)=>(p1($,U,"default"),w&&p1(w,U,"default")),u6=($)=>p1(d0({},"__esModule",{value:!0}),$),B0={};v6(B0,{CONFIG_PREFIX_SEPARATOR:()=>o,DEFAULT_PROFILE:()=>Iw,ENV_PROFILE:()=>Mw,getProfileName:()=>y6,loadSharedConfigFiles:()=>Fw,loadSsoSessionData:()=>e6,parseKnownFiles:()=>UZ});E0.exports=u6(B0);g1(B0,U0(),E0.exports);var Mw="AWS_PROFILE",Iw="default",y6=b(($)=>$.profile||process.env[Mw]||Iw,"getProfileName");g1(B0,v1(),E0.exports);g1(B0,Zw(),E0.exports);var y0=c0(),p6=b(($)=>Object.entries($).filter(([U])=>{const w=U.indexOf(o);if(w===-1)return!1;return Object.values(y0.IniSectionType).includes(U.substring(0,w))}).reduce((U,[w,W])=>{const G=w.indexOf(o),f=w.substring(0,G)===y0.IniSectionType.PROFILE?w.substring(G+1):w;return U[f]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),p0=import.meta.require("path"),d6=U0(),g6="AWS_CONFIG_FILE",Jw=b(()=>process.env[g6]||p0.join(d6.getHomeDir(),".aws","config"),"getConfigFilepath"),s6=U0(),m6="AWS_SHARED_CREDENTIALS_FILE",n6=b(()=>process.env[m6]||p0.join(s6.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),l6=U0(),r6=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,o6=["__proto__","profile __proto__"],d1=b(($)=>{const U={};let w,W;for(let G of $.split(/\r?\n/)){const f=G.split(/(^|\s)[;#]/)[0].trim();if(f[0]==="["&&f[f.length-1]==="]"){w=void 0,W=void 0;const L=f.substring(1,f.length-1),X=r6.exec(L);if(X){const[,Q,,z]=X;if(Object.values(y0.IniSectionType).includes(Q))w=[Q,z].join(o)}else w=L;if(o6.includes(L))throw new Error(`Found invalid profile name "${L}"`)}else if(w){const L=f.indexOf("=");if(![0,-1].includes(L)){const[X,Q]=[f.substring(0,L).trim(),f.substring(L+1).trim()];if(Q==="")W=X;else{if(W&&G.trimStart()===G)W=void 0;U[w]=U[w]||{};const z=W?[W,X].join(o):X;U[w][z]=Q}}}}return U},"parseIni"),Qw=y1(),zw=b(()=>({}),"swallowError"),o=".",Fw=b(async($={})=>{const{filepath:U=n6(),configFilepath:w=Jw()}=$,W=l6.getHomeDir();let f=U;if(U.startsWith("~/"))f=p0.join(W,U.slice(2));let Z=w;if(w.startsWith("~/"))Z=p0.join(W,w.slice(2));const L=await Promise.all([Qw.slurpFile(Z,{ignoreCache:$.ignoreCache}).then(d1).then(p6).catch(zw),Qw.slurpFile(f,{ignoreCache:$.ignoreCache}).then(d1).catch(zw)]);return{configFile:L[0],credentialsFile:L[1]}},"loadSharedConfigFiles"),i6=b(($)=>Object.entries($).filter(([U])=>U.startsWith(y0.IniSectionType.SSO_SESSION+o)).reduce((U,[w,W])=>({...U,[w.substring(w.indexOf(o)+1)]:W}),{}),"getSsoSessionData"),t6=y1(),a6=b(()=>({}),"swallowError"),e6=b(async($={})=>t6.slurpFile($.configFilepath??Jw()).then(d1).then(i6).catch(a6),"loadSsoSessionData"),$Z=b((...$)=>{const U={};for(let w of $)for(let[W,G]of Object.entries(w))if(U[W]!==void 0)Object.assign(U[W],G);else U[W]=G;return U},"mergeConfigFiles"),UZ=b(async($)=>{const U=await Fw($);return $Z(U.configFile,U.credentialsFile)},"parseKnownFiles")});var Bw=Y(($z,Aw)=>{var m1=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 $}},g0=Object.defineProperty,wZ=Object.getOwnPropertyDescriptor,WZ=Object.getOwnPropertyNames,GZ=Object.prototype.hasOwnProperty,w0=($,U)=>g0($,"name",{value:U,configurable:!0}),fZ=($,U)=>{for(var w in U)g0($,w,{get:U[w],enumerable:!0})},ZZ=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of WZ(U))if(!GZ.call($,G)&&G!==w)g0($,G,{get:()=>U[G],enumerable:!(W=wZ(U,G))||W.enumerable})}return $},XZ=($)=>ZZ(g0({},"__esModule",{value:!0}),$),Kw={};fZ(Kw,{loadConfig:()=>IZ});Aw.exports=XZ(Kw);var q0=c1();w0(m1,"getSelectorName");var LZ=w0(($,U)=>async()=>{try{const w=$(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new q0.CredentialsProviderError(w.message||`Not found in ENV: ${m1($.toString())}`,{logger:U})}},"fromEnv"),Yw=s1(),QZ=w0(($,{preferredFile:U="config",...w}={})=>async()=>{const W=Yw.getProfileName(w),{configFile:G,credentialsFile:f}=await Yw.loadSharedConfigFiles(w),Z=f[W]||{},L=G[W]||{},X=U==="config"?{...Z,...L}:{...L,...Z};try{const z=$(X,U==="config"?G:f);if(z===void 0)throw new Error;return z}catch(Q){throw new q0.CredentialsProviderError(Q.message||`Not found in config files w/ profile [${W}]: ${m1($.toString())}`,{logger:w.logger})}},"fromSharedConfigFiles"),zZ=w0(($)=>typeof $==="function","isFunction"),MZ=w0(($)=>zZ($)?async()=>await $():q0.fromStatic($),"fromStatic"),IZ=w0(({environmentVariableSelector:$,configFileSelector:U,default:w},W={})=>q0.memoize(q0.chain(LZ($),QZ(U,W),MZ(w))),"loadConfig")});var Vw=Y((Rw)=>{Object.defineProperty(Rw,"__esModule",{value:!0});Rw.getEndpointUrlConfig=void 0;var Ew=s1(),qw="AWS_ENDPOINT_URL",Ow="endpoint_url",JZ=($)=>({environmentVariableSelector:(U)=>{const w=$.split(" ").map((f)=>f.toUpperCase()),W=U[[qw,...w].join("_")];if(W)return W;const G=U[qw];if(G)return G;return},configFileSelector:(U,w)=>{if(w&&U.services){const G=w[["services",U.services].join(Ew.CONFIG_PREFIX_SEPARATOR)];if(G){const f=$.split(" ").map((L)=>L.toLowerCase()),Z=G[[f.join("_"),Ow].join(Ew.CONFIG_PREFIX_SEPARATOR)];if(Z)return Z}}const W=U[Ow];if(W)return W;return},default:void 0});Rw.getEndpointUrlConfig=JZ});var n1=Y((Tw)=>{Object.defineProperty(Tw,"__esModule",{value:!0});Tw.getEndpointFromConfig=void 0;var FZ=Bw(),YZ=Vw(),KZ=async($)=>FZ.loadConfig(YZ.getEndpointUrlConfig($!==null&&$!==void 0?$:""))();Tw.getEndpointFromConfig=KZ});var r1=Y((Wz,hw)=>{var kw=function($,U,w){return{applyToStack:(W)=>{W.add(Pw($,w),Sw),W.add(jw($,U),bw)}}},s0=Object.defineProperty,AZ=Object.getOwnPropertyDescriptor,BZ=Object.getOwnPropertyNames,EZ=Object.prototype.hasOwnProperty,l1=($,U)=>s0($,"name",{value:U,configurable:!0}),qZ=($,U)=>{for(var w in U)s0($,w,{get:U[w],enumerable:!0})},OZ=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of BZ(U))if(!EZ.call($,G)&&G!==w)s0($,G,{get:()=>U[G],enumerable:!(W=AZ(U,G))||W.enumerable})}return $},RZ=($)=>OZ(s0({},"__esModule",{value:!0}),$),Nw={};qZ(Nw,{deserializerMiddleware:()=>Pw,deserializerMiddlewareOption:()=>Sw,getSerdePlugin:()=>kw,serializerMiddleware:()=>jw,serializerMiddlewareOption:()=>bw});hw.exports=RZ(Nw);var Pw=l1(($,U)=>(w)=>async(W)=>{const{response:G}=await w(W);try{const f=await U(G,$);return{response:G,output:f}}catch(f){if(Object.defineProperty(f,"$response",{value:G}),!("$metadata"in f)){if(f.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof f.$responseBodyText!=="undefined"){if(f.$response)f.$response.body=f.$responseBodyText}}throw f}},"deserializerMiddleware"),jw=l1(($,U)=>(w,W)=>async(G)=>{var f;const Z=((f=W.endpointV2)==null?void 0:f.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!Z)throw new Error("No valid endpoint provider available.");const L=await U(G.input,{...$,endpoint:Z});return w({...G,request:L})},"serializerMiddleware"),Sw={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},bw={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};l1(kw,"getSerdePlugin")});var dw=Y((Gz,pw)=>{var{defineProperty:n0,getOwnPropertyDescriptor:HZ,getOwnPropertyNames:VZ}=Object,TZ=Object.prototype.hasOwnProperty,D=($,U)=>n0($,"name",{value:U,configurable:!0}),CZ=($,U)=>{for(var w in U)n0($,w,{get:U[w],enumerable:!0})},NZ=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of VZ(U))if(!TZ.call($,G)&&G!==w)n0($,G,{get:()=>U[G],enumerable:!(W=HZ(U,G))||W.enumerable})}return $},PZ=($)=>NZ(n0({},"__esModule",{value:!0}),$),cw={};CZ(cw,{endpointMiddleware:()=>uw,endpointMiddlewareOptions:()=>yw,getEndpointFromInstructions:()=>_w,getEndpointPlugin:()=>vZ,resolveEndpointConfig:()=>yZ,resolveParams:()=>vw,toEndpointV1:()=>o1});pw.exports=PZ(cw);var jZ=D(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(DZ(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!hZ(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),SZ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,bZ=/(\d+\.){3}\d+/,kZ=/\.\./,hZ=D(($)=>SZ.test($)&&!bZ.test($)&&!kZ.test($),"isDnsCompatibleBucketName"),DZ=D(($)=>{const[U,w,W,,,G]=$.split(":"),f=U==="arn"&&$.split(":").length>=6,Z=Boolean(f&&w&&W&&G);if(f&&!Z)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return Z},"isArnBucketName"),xZ=D(($,U,w)=>{const W=D(async()=>{const G=w[$]??w[U];if(typeof G==="function")return G();return G},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const G=typeof w.credentials==="function"?await w.credentials():w.credentials;return(G==null?void 0:G.credentialScope)??(G==null?void 0:G.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const G=typeof w.credentials==="function"?await w.credentials():w.credentials;return(G==null?void 0:G.accountId)??(G==null?void 0:G.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const G=await W();if(G&&typeof G==="object"){if("url"in G)return G.url.href;if("hostname"in G){const{protocol:f,hostname:Z,port:L,path:X}=G;return`${f}//${Z}${L?":"+L:""}${X}`}}return G};return W},"createConfigValueProvider"),cZ=n1(),Dw=xw(),o1=D(($)=>{if(typeof $==="object"){if("url"in $)return Dw.parseUrl($.url);return $}return Dw.parseUrl($)},"toEndpointV1"),_w=D(async($,U,w,W)=>{if(!w.endpoint){let Z;if(w.serviceConfiguredEndpoint)Z=await w.serviceConfiguredEndpoint();else Z=await cZ.getEndpointFromConfig(w.serviceId);if(Z)w.endpoint=()=>Promise.resolve(o1(Z))}const G=await vw($,U,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider(G,W)},"getEndpointFromInstructions"),vw=D(async($,U,w)=>{var W;const G={},f=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[Z,L]of Object.entries(f))switch(L.type){case"staticContextParams":G[Z]=L.value;break;case"contextParams":G[Z]=$[L.name];break;case"clientContextParams":case"builtInParams":G[Z]=await xZ(L.name,Z,w)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(f).length===0)Object.assign(G,w);if(String(w.serviceId).toLowerCase()==="s3")await jZ(G);return G},"resolveParams"),m0=v(),uw=D(({config:$,instructions:U})=>{return(w,W)=>async(G)=>{var f,Z,L;const X=await _w(G.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=X,W.authSchemes=(f=X.properties)==null?void 0:f.authSchemes;const Q=(Z=W.authSchemes)==null?void 0:Z[0];if(Q){W.signing_region=Q.signingRegion,W.signing_service=Q.signingName;const z=m0.getSmithyContext(W),M=(L=z==null?void 0:z.selectedHttpAuthScheme)==null?void 0:L.httpAuthOption;if(M)M.signingProperties=Object.assign(M.signingProperties||{},{signing_region:Q.signingRegion,signingRegion:Q.signingRegion,signing_service:Q.signingName,signingName:Q.signingName,signingRegionSet:Q.signingRegionSet},Q.properties)}return w({...G})}},"endpointMiddleware"),_Z=r1(),yw={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:_Z.serializerMiddlewareOption.name},vZ=D(($,U)=>({applyToStack:(w)=>{w.addRelativeTo(uw({config:$,instructions:U}),yw)}}),"getEndpointPlugin"),uZ=n1(),yZ=D(($)=>{const U=$.tls??!0,{endpoint:w}=$,W=w!=null?async()=>o1(await m0.normalizeProvider(w)()):void 0,f={...$,endpoint:W,tls:U,isCustomEndpoint:!!w,useDualstackEndpoint:m0.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:m0.normalizeProvider($.useFipsEndpoint??!1)};let Z=void 0;return f.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!Z)Z=uZ.getEndpointFromConfig($.serviceId);return Z},f},"resolveEndpointConfig")});var G0=Y((fz,nw)=>{var{defineProperty:l0,getOwnPropertyDescriptor:pZ,getOwnPropertyNames:dZ}=Object,gZ=Object.prototype.hasOwnProperty,W0=($,U)=>l0($,"name",{value:U,configurable:!0}),sZ=($,U)=>{for(var w in U)l0($,w,{get:U[w],enumerable:!0})},mZ=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of dZ(U))if(!gZ.call($,G)&&G!==w)l0($,G,{get:()=>U[G],enumerable:!(W=pZ(U,G))||W.enumerable})}return $},nZ=($)=>mZ(l0({},"__esModule",{value:!0}),$),gw={};sZ(gw,{isClockSkewCorrectedError:()=>sw,isClockSkewError:()=>eZ,isRetryableByTrait:()=>aZ,isServerError:()=>UX,isThrottlingError:()=>$X,isTransientError:()=>mw});nw.exports=nZ(gw);var lZ=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],rZ=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],oZ=["TimeoutError","RequestTimeout","RequestTimeoutException"],iZ=[500,502,503,504],tZ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],aZ=W0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),eZ=W0(($)=>lZ.includes($.name),"isClockSkewError"),sw=W0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),$X=W0(($)=>{var U,w;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||rZ.includes($.name)||((w=$.$retryable)==null?void 0:w.throttling)==!0},"isThrottlingError"),mw=W0(($)=>{var U;return sw($)||oZ.includes($.name)||tZ.includes(($==null?void 0:$.code)||"")||iZ.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),UX=W0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const w=$.$metadata.httpStatusCode;if(500<=w&&w<=599&&!mw($))return!0;return!1}return!1},"isServerError")});var p=Y((Zz,fW)=>{var{defineProperty:r0,getOwnPropertyDescriptor:wX,getOwnPropertyNames:WX}=Object,GX=Object.prototype.hasOwnProperty,x=($,U)=>r0($,"name",{value:U,configurable:!0}),fX=($,U)=>{for(var w in U)r0($,w,{get:U[w],enumerable:!0})},ZX=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of WX(U))if(!GX.call($,G)&&G!==w)r0($,G,{get:()=>U[G],enumerable:!(W=wX(U,G))||W.enumerable})}return $},XX=($)=>ZX(r0({},"__esModule",{value:!0}),$),rw={};fX(rw,{AdaptiveRetryStrategy:()=>JX,ConfiguredRetryStrategy:()=>FX,DEFAULT_MAX_ATTEMPTS:()=>i1,DEFAULT_RETRY_DELAY_BASE:()=>O0,DEFAULT_RETRY_MODE:()=>LX,DefaultRateLimiter:()=>tw,INITIAL_RETRY_TOKENS:()=>t1,INVOCATION_ID_HEADER:()=>zX,MAXIMUM_RETRY_DELAY:()=>a1,NO_RETRY_INCREMENT:()=>UW,REQUEST_HEADER:()=>MX,RETRY_COST:()=>ew,RETRY_MODES:()=>ow,StandardRetryStrategy:()=>e1,THROTTLING_RETRY_DELAY_BASE:()=>aw,TIMEOUT_RETRY_COST:()=>$W});fW.exports=XX(rw);var ow=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(ow||{}),i1=3,LX="standard",QX=G0(),iw=class ${constructor(U){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(U==null?void 0:U.beta)??0.7,this.minCapacity=(U==null?void 0:U.minCapacity)??1,this.minFillRate=(U==null?void 0:U.minFillRate)??0.5,this.scaleConstant=(U==null?void 0:U.scaleConstant)??0.4,this.smooth=(U==null?void 0:U.smooth)??0.8;const w=this.getCurrentTimeInSeconds();this.lastThrottleTime=w,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(U){if(!this.enabled)return;if(this.refillTokenBucket(),U>this.currentCapacity){const w=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((W)=>setTimeout(W,w))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){const U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}const w=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+w),this.lastTimestamp=U}updateClientSendingRate(U){let w;if(this.updateMeasuredRate(),QX.isThrottlingError(U)){const G=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=G,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle(G),this.enableTokenBucket()}else this.calculateTimeWindow(),w=this.cubicSuccess(this.getCurrentTimeInSeconds());const W=Math.min(w,2*this.measuredTxRate);this.updateTokenBucketRate(W)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(U){return this.getPrecise(U*this.beta)}cubicSuccess(U){return this.getPrecise(this.scaleConstant*Math.pow(U-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(U){this.refillTokenBucket(),this.fillRate=Math.max(U,this.minFillRate),this.maxCapacity=Math.max(U,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const U=this.getCurrentTimeInSeconds(),w=Math.floor(U*2)/2;if(this.requestCount++,w>this.lastTxRateBucket){const W=this.requestCount/(w-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(W*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=w}}getPrecise(U){return parseFloat(U.toFixed(8))}};x(iw,"DefaultRateLimiter");var tw=iw,O0=100,a1=20000,aw=500,t1=500,ew=5,$W=10,UW=1,zX="amz-sdk-invocation-id",MX="amz-sdk-request",IX=x(()=>{let $=O0;return{computeNextBackoffDelay:x((W)=>{return Math.floor(Math.min(a1,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:x((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),lw=x(({retryDelay:$,retryCount:U,retryCost:w})=>{return{getRetryCount:x(()=>U,"getRetryCount"),getRetryDelay:x(()=>Math.min(a1,$),"getRetryDelay"),getRetryCost:x(()=>w,"getRetryCost")}},"createDefaultRetryToken"),wW=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=t1,this.retryBackoffStrategy=IX(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return lw({retryDelay:O0,retryCount:0})}async refreshRetryTokenForRetry(U,w){const W=await this.getMaxAttempts();if(this.shouldRetry(U,w,W)){const G=w.errorType;this.retryBackoffStrategy.setDelayBase(G==="THROTTLING"?aw:O0);const f=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),Z=w.retryAfterHint?Math.max(w.retryAfterHint.getTime()-Date.now()||0,f):f,L=this.getCapacityCost(G);return this.capacity-=L,lw({retryDelay:Z,retryCount:U.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(t1,this.capacity+(U.getRetryCost()??UW))}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 ${i1}`),i1}}shouldRetry(U,w,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(w.errorType)&&this.isRetryableError(w.errorType)}getCapacityCost(U){return U==="TRANSIENT"?$W:ew}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};x(wW,"StandardRetryStrategy");var e1=wW,WW=class ${constructor(U,w){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=w??{};this.rateLimiter=W??new tw,this.standardRetryStrategy=new e1(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,w){return this.rateLimiter.updateClientSendingRate(w),this.standardRetryStrategy.refreshRetryTokenForRetry(U,w)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};x(WW,"AdaptiveRetryStrategy");var JX=WW,GW=class $ extends e1{constructor(U,w=O0){super(typeof U==="function"?U:async()=>U);if(typeof w==="number")this.computeNextBackoffDelay=()=>w;else this.computeNextBackoffDelay=w}async refreshRetryTokenForRetry(U,w){const W=await super.refreshRetryTokenForRetry(U,w);return W.getRetryDelay=()=>this.computeNextBackoffDelay(W.getRetryCount()),W}};x(GW,"ConfiguredRetryStrategy");var FX=GW});var L0=Y((Xz,PW)=>{var EW=function($){const U=$.getUTCFullYear(),w=$.getUTCMonth(),W=$.getUTCDay(),G=$.getUTCDate(),f=$.getUTCHours(),Z=$.getUTCMinutes(),L=$.getUTCSeconds(),X=G<10?`0${G}`:`${G}`,Q=f<10?`0${f}`:`${f}`,z=Z<10?`0${Z}`:`${Z}`,M=L<10?`0${L}`:`${L}`;return`${sX[W]}, ${X} ${z$[w]} ${U} ${Q}:${z}:${M} GMT`},t0=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})},M$=function($,U,w){let W,G,f;if(typeof U==="undefined"&&typeof w==="undefined")W={},f=$;else if(W=$,typeof U==="function")return G=U,f=w,H2(W,G,f);else f=U;for(let Z of Object.keys(f)){if(!Array.isArray(f[Z])){W[Z]=f[Z];continue}CW(W,null,f,Z)}return W},NW=function($,U,w){if(w<=0||!Number.isInteger(w))throw new Error("Invalid number of delimiters ("+w+") for splitEvery.");const W=$.split(U);if(w===1)return W;const G=[];let f="";for(let Z=0;Z<W.length;Z++){if(f==="")f=W[Z];else f+=U+W[Z];if((Z+1)%w===0)G.push(f),f=""}if(f!=="")G.push(f);return G},a0=Object.defineProperty,AX=Object.getOwnPropertyDescriptor,BX=Object.getOwnPropertyNames,EX=Object.prototype.hasOwnProperty,I=($,U)=>a0($,"name",{value:U,configurable:!0}),qX=($,U)=>{for(var w in U)a0($,w,{get:U[w],enumerable:!0})},OX=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of BX(U))if(!EX.call($,G)&&G!==w)a0($,G,{get:()=>U[G],enumerable:!(W=AX(U,G))||W.enumerable})}return $},RX=($)=>OX(a0({},"__esModule",{value:!0}),$),XW={};qX(XW,{Client:()=>VX,Command:()=>IW,LazyJsonString:()=>q2,NoOpLogger:()=>HX,SENSITIVE_STRING:()=>NX,ServiceException:()=>L2,StringWrapper:()=>C0,_json:()=>Z$,collectBody:()=>TX,convertMap:()=>O2,createAggregatedClient:()=>PX,dateToUtcString:()=>EW,decorateServiceException:()=>OW,emitWarningIfUnsupportedVersion:()=>I2,expectBoolean:()=>SX,expectByte:()=>f$,expectFloat32:()=>o0,expectInt:()=>kX,expectInt32:()=>W$,expectLong:()=>V0,expectNonNull:()=>DX,expectNumber:()=>H0,expectObject:()=>FW,expectShort:()=>G$,expectString:()=>xX,expectUnion:()=>cX,extendedEncodeURIComponent:()=>t0,getArrayIfSingleItem:()=>E2,getDefaultClientConfiguration:()=>A2,getDefaultExtensionConfiguration:()=>HW,getValueFromTextNode:()=>VW,handleFloat:()=>uX,limitedParseDouble:()=>Q$,limitedParseFloat:()=>yX,limitedParseFloat32:()=>pX,loadConfigsForDefaultMode:()=>M2,logger:()=>T0,map:()=>M$,parseBoolean:()=>jX,parseEpochTimestamp:()=>eX,parseRfc3339DateTime:()=>nX,parseRfc3339DateTimeWithOffset:()=>rX,parseRfc7231DateTime:()=>aX,resolveDefaultRuntimeConfig:()=>B2,resolvedPath:()=>C2,serializeDateTime:()=>P2,serializeFloat:()=>N2,splitEvery:()=>NW,strictParseByte:()=>BW,strictParseDouble:()=>L$,strictParseFloat:()=>_X,strictParseFloat32:()=>YW,strictParseInt:()=>dX,strictParseInt32:()=>gX,strictParseLong:()=>AW,strictParseShort:()=>f0,take:()=>R2,throwDefaultError:()=>RW,withBaseException:()=>Q2});PW.exports=RX(XW);var LW=class ${trace(){}debug(){}info(){}warn(){}error(){}};I(LW,"NoOpLogger");var HX=LW,QW=YX(),zW=class ${constructor(U){this.config=U,this.middlewareStack=QW.constructStack()}send(U,w,W){const G=typeof w!=="function"?w:void 0,f=typeof w==="function"?w:W,Z=G===void 0&&this.config.cacheMiddleware===!0;let L;if(Z){if(!this.handlers)this.handlers=new WeakMap;const X=this.handlers;if(X.has(U.constructor))L=X.get(U.constructor);else L=U.resolveMiddleware(this.middlewareStack,this.config,G),X.set(U.constructor,L)}else delete this.handlers,L=U.resolveMiddleware(this.middlewareStack,this.config,G);if(f)L(U).then((X)=>f(null,X.output),(X)=>f(X)).catch(()=>{});else return L(U).then((X)=>X.output)}destroy(){var U,w,W;(W=(w=(U=this.config)==null?void 0:U.requestHandler)==null?void 0:w.destroy)==null||W.call(w),delete this.handlers}};I(zW,"Client");var VX=zW,$$=KX(),TX=I(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return $$.Uint8ArrayBlobAdapter.mutate($);if(!$)return $$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const w=U.streamCollector($);return $$.Uint8ArrayBlobAdapter.mutate(await w)},"collectBody"),w$=c0(),MW=class ${constructor(){this.middlewareStack=QW.constructStack()}static classBuilder(){return new CX}resolveMiddlewareWithContext(U,w,W,{middlewareFn:G,clientName:f,commandName:Z,inputFilterSensitiveLog:L,outputFilterSensitiveLog:X,smithyContext:Q,additionalContext:z,CommandCtor:M}){for(let R of G.bind(this)(M,U,w,W))this.middlewareStack.use(R);const J=U.concat(this.middlewareStack),{logger:F}=w,K={logger:F,clientName:f,commandName:Z,inputFilterSensitiveLog:L,outputFilterSensitiveLog:X,[w$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...Q},...z},{requestHandler:A}=w;return J.resolve((R)=>A.handle(R.request,W||{}),K)}};I(MW,"Command");var IW=MW,JW=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(U)=>U,this._outputFilterSensitiveLog=(U)=>U,this._serializer=null,this._deserializer=null}init(U){this._init=U}ep(U){return this._ep=U,this}m(U){return this._middlewareFn=U,this}s(U,w,W={}){return this._smithyContext={service:U,operation:w,...W},this}c(U={}){return this._additionalContext=U,this}n(U,w){return this._clientName=U,this._commandName=w,this}f(U=(W)=>W,w=(W)=>W){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=w,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;const w=this;let W;return W=(U=class extends IW{constructor(...[G]){super();this.serialize=w._serializer,this.deserialize=w._deserializer,this.input=G??{},w._init(this)}static getEndpointParameterInstructions(){return w._ep}resolveMiddleware(G,f,Z){return this.resolveMiddlewareWithContext(G,f,Z,{CommandCtor:W,middlewareFn:w._middlewareFn,clientName:w._clientName,commandName:w._commandName,inputFilterSensitiveLog:w._inputFilterSensitiveLog,outputFilterSensitiveLog:w._outputFilterSensitiveLog,smithyContext:w._smithyContext,additionalContext:w._additionalContext})}},I(U,"CommandRef"),U)}};I(JW,"ClassBuilder");var CX=JW,NX="***SensitiveInformation***",PX=I(($,U)=>{for(let w of Object.keys($)){const W=$[w],G=I(async function(Z,L,X){const Q=new W(Z);if(typeof L==="function")this.send(Q,L);else if(typeof X==="function"){if(typeof L!=="object")throw new Error(`Expected http options but got ${typeof L}`);this.send(Q,L||{},X)}else return this.send(Q,L)},"methodImpl"),f=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");U.prototype[f]=G}},"createAggregatedClient"),jX=I(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),SX=I(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)T0.warn(i0(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")T0.warn(i0(`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"),H0=I(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))T0.warn(i0(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),bX=Math.ceil(340282346638528860000000000000000000000),o0=I(($)=>{const U=H0($);if(U!==void 0&&!Number.isNaN(U)&&U!==Infinity&&U!==(-Infinity)){if(Math.abs(U)>bX)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),V0=I(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),kX=V0,W$=I(($)=>X$($,32),"expectInt32"),G$=I(($)=>X$($,16),"expectShort"),f$=I(($)=>X$($,8),"expectByte"),X$=I(($,U)=>{const w=V0($);if(w!==void 0&&hX(w,U)!==w)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return w},"expectSizedInt"),hX=I(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),DX=I(($,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"),FW=I(($)=>{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"),xX=I(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return T0.warn(i0(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),cX=I(($)=>{if($===null||$===void 0)return;const U=FW($),w=Object.entries(U).filter(([,W])=>W!=null).map(([W])=>W);if(w.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(w.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${w} were not null.`);return U},"expectUnion"),L$=I(($)=>{if(typeof $=="string")return H0(X0($));return H0($)},"strictParseDouble"),_X=L$,YW=I(($)=>{if(typeof $=="string")return o0(X0($));return o0($)},"strictParseFloat32"),vX=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,X0=I(($)=>{const U=$.match(vX);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),Q$=I(($)=>{if(typeof $=="string")return KW($);return H0($)},"limitedParseDouble"),uX=Q$,yX=Q$,pX=I(($)=>{if(typeof $=="string")return KW($);return o0($)},"limitedParseFloat32"),KW=I(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),AW=I(($)=>{if(typeof $==="string")return V0(X0($));return V0($)},"strictParseLong"),dX=AW,gX=I(($)=>{if(typeof $==="string")return W$(X0($));return W$($)},"strictParseInt32"),f0=I(($)=>{if(typeof $==="string")return G$(X0($));return G$($)},"strictParseShort"),BW=I(($)=>{if(typeof $==="string")return f$(X0($));return f$($)},"strictParseByte"),i0=I(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),T0={warn:console.warn},sX=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],z$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];I(EW,"dateToUtcString");var mX=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),nX=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=mX.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[w,W,G,f,Z,L,X,Q]=U,z=f0(Z0(W)),M=u(G,"month",1,12),J=u(f,"day",1,31);return R0(z,M,J,{hours:Z,minutes:L,seconds:X,fractionalMilliseconds:Q})},"parseRfc3339DateTime"),lX=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),rX=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=lX.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[w,W,G,f,Z,L,X,Q,z]=U,M=f0(Z0(W)),J=u(G,"month",1,12),F=u(f,"day",1,31),K=R0(M,J,F,{hours:Z,minutes:L,seconds:X,fractionalMilliseconds:Q});if(z.toUpperCase()!="Z")K.setTime(K.getTime()-X2(z));return K},"parseRfc3339DateTimeWithOffset"),oX=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$/),iX=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$/),tX=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})$/),aX=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=oX.exec($);if(U){const[w,W,G,f,Z,L,X,Q]=U;return R0(f0(Z0(f)),U$(G),u(W,"day",1,31),{hours:Z,minutes:L,seconds:X,fractionalMilliseconds:Q})}if(U=iX.exec($),U){const[w,W,G,f,Z,L,X,Q]=U;return w2(R0($2(f),U$(G),u(W,"day",1,31),{hours:Z,minutes:L,seconds:X,fractionalMilliseconds:Q}))}if(U=tX.exec($),U){const[w,W,G,f,Z,L,X,Q]=U;return R0(f0(Z0(Q)),U$(W),u(G.trimLeft(),"day",1,31),{hours:f,minutes:Z,seconds:L,fractionalMilliseconds:X})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),eX=I(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=L$($);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"),R0=I(($,U,w,W)=>{const G=U-1;return G2($,G,w),new Date(Date.UTC($,G,w,u(W.hours,"hour",0,23),u(W.minutes,"minute",0,59),u(W.seconds,"seconds",0,60),Z2(W.fractionalMilliseconds)))},"buildDate"),$2=I(($)=>{const U=(new Date()).getUTCFullYear(),w=Math.floor(U/100)*100+f0(Z0($));if(w<U)return w+100;return w},"parseTwoDigitYear"),U2=1576800000000,w2=I(($)=>{if($.getTime()-(new Date()).getTime()>U2)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),U$=I(($)=>{const U=z$.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),W2=[31,28,31,30,31,30,31,31,30,31,30,31],G2=I(($,U,w)=>{let W=W2[U];if(U===1&&f2($))W=29;if(w>W)throw new TypeError(`Invalid day for ${z$[U]} in ${$}: ${w}`)},"validateDayOfMonth"),f2=I(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),u=I(($,U,w,W)=>{const G=BW(Z0($));if(G<w||G>W)throw new TypeError(`${U} must be between ${w} and ${W}, inclusive`);return G},"parseDateValue"),Z2=I(($)=>{if($===null||$===void 0)return 0;return YW("0."+$)*1000},"parseMilliseconds"),X2=I(($)=>{const U=$[0];let w=1;if(U=="+")w=1;else if(U=="-")w=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const W=Number($.substring(1,3)),G=Number($.substring(4,6));return w*(W*60+G)*60*1000},"parseOffsetToMilliseconds"),Z0=I(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),qW=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};I(qW,"ServiceException");var L2=qW,OW=I(($,U={})=>{Object.entries(U).filter(([,W])=>W!==void 0).forEach(([W,G])=>{if($[W]==null||$[W]==="")$[W]=G});const w=$.message||$.Message||"UnknownError";return $.message=w,delete $.Message,$},"decorateServiceException"),RW=I(({output:$,parsedBody:U,exceptionCtor:w,errorCode:W})=>{const G=z2($),f=G.httpStatusCode?G.httpStatusCode+"":void 0,Z=new w({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||f||"UnknownError",$fault:"client",$metadata:G});throw OW(Z,U)},"throwDefaultError"),Q2=I(($)=>{return({output:U,parsedBody:w,errorCode:W})=>{RW({output:U,parsedBody:w,exceptionCtor:$,errorCode:W})}},"withBaseException"),z2=I(($)=>({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"),M2=I(($)=>{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"),ZW=!1,I2=I(($)=>{if($&&!ZW&&parseInt($.substring(1,$.indexOf(".")))<16)ZW=!0},"emitWarningIfUnsupportedVersion"),J2=I(($)=>{const U=[];for(let w in w$.AlgorithmId){const W=w$.AlgorithmId[w];if($[W]===void 0)continue;U.push({algorithmId:()=>W,checksumConstructor:()=>$[W]})}return{_checksumAlgorithms:U,addChecksumAlgorithm(w){this._checksumAlgorithms.push(w)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),F2=I(($)=>{const U={};return $.checksumAlgorithms().forEach((w)=>{U[w.algorithmId()]=w.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),Y2=I(($)=>{let U=$.retryStrategy;return{setRetryStrategy(w){U=w},retryStrategy(){return U}}},"getRetryConfiguration"),K2=I(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),HW=I(($)=>{return{...J2($),...Y2($)}},"getDefaultExtensionConfiguration"),A2=HW,B2=I(($)=>{return{...F2($),...K2($)}},"resolveDefaultRuntimeConfig");I(t0,"extendedEncodeURIComponent");var E2=I(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),VW=I(($)=>{for(let w in $)if($.hasOwnProperty(w)&&$[w]["#text"]!==void 0)$[w]=$[w]["#text"];else if(typeof $[w]==="object"&&$[w]!==null)$[w]=VW($[w]);return $},"getValueFromTextNode"),C0=I(function(){const $=Object.getPrototypeOf(this).constructor,w=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(w,$.prototype),w},"StringWrapper");C0.prototype=Object.create(String.prototype,{constructor:{value:C0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(C0,String);var TW=class $ extends C0{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))}};I(TW,"LazyJsonString");var q2=TW;I(M$,"map");var O2=I(($)=>{const U={};for(let[w,W]of Object.entries($||{}))U[w]=[,W];return U},"convertMap"),R2=I(($,U)=>{const w={};for(let W in U)CW(w,$,U,W);return w},"take"),H2=I(($,U,w)=>{return M$($,Object.entries(w).reduce((W,[G,f])=>{if(Array.isArray(f))W[G]=f;else if(typeof f==="function")W[G]=[U,f()];else W[G]=[U,f];return W},{}))},"mapWithFilter"),CW=I(($,U,w,W)=>{if(U!==null){let Z=w[W];if(typeof Z==="function")Z=[,Z];const[L=V2,X=T2,Q=W]=Z;if(typeof L==="function"&&L(U[Q])||typeof L!=="function"&&!!L)$[W]=X(U[Q]);return}let[G,f]=w[W];if(typeof f==="function"){let Z;const L=G===void 0&&(Z=f())!=null,X=typeof G==="function"&&!!G(void 0)||typeof G!=="function"&&!!G;if(L)$[W]=Z;else if(X)$[W]=f()}else{const Z=G===void 0&&f!=null,L=typeof G==="function"&&!!G(f)||typeof G!=="function"&&!!G;if(Z||L)$[W]=f}},"applyInstruction"),V2=I(($)=>$!=null,"nonNullish"),T2=I(($)=>$,"pass"),C2=I(($,U,w,W,G,f)=>{if(U!=null&&U[w]!==void 0){const Z=W();if(Z.length<=0)throw new Error("Empty value provided for input HTTP label: "+w+".");$=$.replace(G,f?Z.split("/").map((L)=>t0(L)).join("/"):t0(Z))}else throw new Error("No value provided for input HTTP label: "+w+".");return $},"resolvedPath"),N2=I(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),P2=I(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),Z$=I(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(Z$);if(typeof $==="object"){const U={};for(let w of Object.keys($)){if($[w]==null)continue;U[w]=Z$($[w])}return U}return $},"_json");I(NW,"splitEvery")});var bW=Y((jW)=>{Object.defineProperty(jW,"__esModule",{value:!0});jW.isStreamingPayload=void 0;var j2=import.meta.require("stream"),S2=($)=>($===null||$===void 0?void 0:$.body)instanceof j2.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;jW.isStreamingPayload=S2});var oW=Y((zz,rW)=>{var{defineProperty:e0,getOwnPropertyDescriptor:b2,getOwnPropertyNames:k2}=Object,h2=Object.prototype.hasOwnProperty,H=($,U)=>e0($,"name",{value:U,configurable:!0}),D2=($,U)=>{for(var w in U)e0($,w,{get:U[w],enumerable:!0})},x2=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of k2(U))if(!h2.call($,G)&&G!==w)e0($,G,{get:()=>U[G],enumerable:!(W=b2(U,G))||W.enumerable})}return $},c2=($)=>x2(e0({},"__esModule",{value:!0}),$),hW={};D2(hW,{AdaptiveRetryStrategy:()=>u2,CONFIG_MAX_ATTEMPTS:()=>J$,CONFIG_RETRY_MODE:()=>dW,ENV_MAX_ATTEMPTS:()=>I$,ENV_RETRY_MODE:()=>pW,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>y2,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>d2,StandardRetryStrategy:()=>uW,defaultDelayDecider:()=>xW,defaultRetryDecider:()=>cW,getOmitRetryHeadersPlugin:()=>g2,getRetryAfterHint:()=>lW,getRetryPlugin:()=>o2,omitRetryHeadersMiddleware:()=>gW,omitRetryHeadersMiddlewareOptions:()=>sW,resolveRetryConfig:()=>p2,retryMiddleware:()=>mW,retryMiddlewareOptions:()=>nW});rW.exports=c2(hW);var Q0=z0(),DW=x1(),q=p(),_2=H(($,U)=>{const w=$,W=(U==null?void 0:U.noRetryIncrement)??q.NO_RETRY_INCREMENT,G=(U==null?void 0:U.retryCost)??q.RETRY_COST,f=(U==null?void 0:U.timeoutRetryCost)??q.TIMEOUT_RETRY_COST;let Z=$;const L=H((M)=>M.name==="TimeoutError"?f:G,"getCapacityAmount"),X=H((M)=>L(M)<=Z,"hasRetryTokens");return Object.freeze({hasRetryTokens:X,retrieveRetryTokens:H((M)=>{if(!X(M))throw new Error("No retry token available");const J=L(M);return Z-=J,J},"retrieveRetryTokens"),releaseRetryTokens:H((M)=>{Z+=M??W,Z=Math.min(Z,w)},"releaseRetryTokens")})},"getDefaultRetryQuota"),xW=H(($,U)=>Math.floor(Math.min(q.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),g=G0(),cW=H(($)=>{if(!$)return!1;return g.isRetryableByTrait($)||g.isClockSkewError($)||g.isThrottlingError($)||g.isTransientError($)},"defaultRetryDecider"),_W=H(($)=>{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"),vW=class ${constructor(U,w){this.maxAttemptsProvider=U,this.mode=q.RETRY_MODES.STANDARD,this.retryDecider=(w==null?void 0:w.retryDecider)??cW,this.delayDecider=(w==null?void 0:w.delayDecider)??xW,this.retryQuota=(w==null?void 0:w.retryQuota)??_2(q.INITIAL_RETRY_TOKENS)}shouldRetry(U,w,W){return w<W&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(w){U=q.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,w,W){let G,f=0,Z=0;const L=await this.getMaxAttempts(),{request:X}=w;if(Q0.HttpRequest.isInstance(X))X.headers[q.INVOCATION_ID_HEADER]=DW.v4();while(!0)try{if(Q0.HttpRequest.isInstance(X))X.headers[q.REQUEST_HEADER]=`attempt=${f+1}; max=${L}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();const{response:Q,output:z}=await U(w);if(W==null?void 0:W.afterRequest)W.afterRequest(Q);return this.retryQuota.releaseRetryTokens(G),z.$metadata.attempts=f+1,z.$metadata.totalRetryDelay=Z,{response:Q,output:z}}catch(Q){const z=_W(Q);if(f++,this.shouldRetry(z,f,L)){G=this.retryQuota.retrieveRetryTokens(z);const M=this.delayDecider(g.isThrottlingError(z)?q.THROTTLING_RETRY_DELAY_BASE:q.DEFAULT_RETRY_DELAY_BASE,f),J=v2(z.$response),F=Math.max(J||0,M);Z+=F,await new Promise((K)=>setTimeout(K,F));continue}if(!z.$metadata)z.$metadata={};throw z.$metadata.attempts=f,z.$metadata.totalRetryDelay=Z,z}}};H(vW,"StandardRetryStrategy");var uW=vW,v2=H(($)=>{if(!Q0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((f)=>f.toLowerCase()==="retry-after");if(!U)return;const w=$.headers[U],W=Number(w);if(!Number.isNaN(W))return W*1000;return new Date(w).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),yW=class $ extends uW{constructor(U,w){const{rateLimiter:W,...G}=w??{};super(U,G);this.rateLimiter=W??new q.DefaultRateLimiter,this.mode=q.RETRY_MODES.ADAPTIVE}async retry(U,w){return super.retry(U,w,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};H(yW,"AdaptiveRetryStrategy");var u2=yW,kW=v(),I$="AWS_MAX_ATTEMPTS",J$="max_attempts",y2={environmentVariableSelector:($)=>{const U=$[I$];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Environment variable ${I$} mast be a number, got "${U}"`);return w},configFileSelector:($)=>{const U=$[J$];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Shared config file entry ${J$} mast be a number, got "${U}"`);return w},default:q.DEFAULT_MAX_ATTEMPTS},p2=H(($)=>{const{retryStrategy:U}=$,w=kW.normalizeProvider($.maxAttempts??q.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:w,retryStrategy:async()=>{if(U)return U;if(await kW.normalizeProvider($.retryMode)()===q.RETRY_MODES.ADAPTIVE)return new q.AdaptiveRetryStrategy(w);return new q.StandardRetryStrategy(w)}}},"resolveRetryConfig"),pW="AWS_RETRY_MODE",dW="retry_mode",d2={environmentVariableSelector:($)=>$[pW],configFileSelector:($)=>$[dW],default:q.DEFAULT_RETRY_MODE},gW=H(()=>($)=>async(U)=>{const{request:w}=U;if(Q0.HttpRequest.isInstance(w))delete w.headers[q.INVOCATION_ID_HEADER],delete w.headers[q.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),sW={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},g2=H(($)=>({applyToStack:(U)=>{U.addRelativeTo(gW(),sW)}}),"getOmitRetryHeadersPlugin"),s2=L0(),m2=bW(),mW=H(($)=>(U,w)=>async(W)=>{var G;let f=await $.retryStrategy();const Z=await $.maxAttempts();if(n2(f)){f=f;let L=await f.acquireInitialRetryToken(w.partition_id),X=new Error,Q=0,z=0;const{request:M}=W,J=Q0.HttpRequest.isInstance(M);if(J)M.headers[q.INVOCATION_ID_HEADER]=DW.v4();while(!0)try{if(J)M.headers[q.REQUEST_HEADER]=`attempt=${Q+1}; max=${Z}`;const{response:F,output:K}=await U(W);return f.recordSuccess(L),K.$metadata.attempts=Q+1,K.$metadata.totalRetryDelay=z,{response:F,output:K}}catch(F){const K=l2(F);if(X=_W(F),J&&m2.isStreamingPayload(M))throw(G=w.logger instanceof s2.NoOpLogger?console:w.logger)==null||G.warn("An error was encountered in a non-retryable streaming request."),X;try{L=await f.refreshRetryTokenForRetry(L,K)}catch(R){if(!X.$metadata)X.$metadata={};throw X.$metadata.attempts=Q+1,X.$metadata.totalRetryDelay=z,X}Q=L.getRetryCount();const A=L.getRetryDelay();z+=A,await new Promise((R)=>setTimeout(R,A))}}else{if(f=f,f==null?void 0:f.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",f.mode]];return f.retry(U,W)}},"retryMiddleware"),n2=H(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),l2=H(($)=>{const U={error:$,errorType:r2($)},w=lW($.$response);if(w)U.retryAfterHint=w;return U},"getRetryErrorInfo"),r2=H(($)=>{if(g.isThrottlingError($))return"THROTTLING";if(g.isTransientError($))return"TRANSIENT";if(g.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),nW={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},o2=H(($)=>({applyToStack:(U)=>{U.add(mW($),nW)}}),"getRetryPlugin"),lW=H(($)=>{if(!Q0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((f)=>f.toLowerCase()==="retry-after");if(!U)return;const w=$.headers[U],W=Number(w);if(!Number.isNaN(W))return new Date(W*1000);return new Date(w)},"getRetryAfterHint")});var Y$=Y((Mz,F8)=>{var aW=function($){const U=new Map;for(let w of $)U.set(w.schemeId,w);return U},z8=function($,U){return new I8($,U)},J8=function($,U,w,W,G){return E(async function*f(Z,L,...X){let Q=Z.startingToken||void 0,z=!0,M;while(z){if(L[w]=Q,G)L[G]=L[G]??Z.pageSize;if(Z.client instanceof $)M=await E9(U,Z.client,L,...X);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield M;const J=Q;Q=q9(M,W),z=!!(Q&&(!Z.stopOnSameToken||Q!==J))}return},"paginateOperation")},U1=Object.defineProperty,i2=Object.getOwnPropertyDescriptor,t2=Object.getOwnPropertyNames,a2=Object.prototype.hasOwnProperty,E=($,U)=>U1($,"name",{value:U,configurable:!0}),e2=($,U)=>{for(var w in U)U1($,w,{get:U[w],enumerable:!0})},$9=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of t2(U))if(!a2.call($,G)&&G!==w)U1($,G,{get:()=>U[G],enumerable:!(W=i2(U,G))||W.enumerable})}return $},U9=($)=>$9(U1({},"__esModule",{value:!0}),$),iW={};e2(iW,{DefaultIdentityProviderConfig:()=>z9,EXPIRATION_MS:()=>L8,HttpApiKeyAuthSigner:()=>M9,HttpBearerAuthSigner:()=>I9,NoAuthSigner:()=>J9,RequestBuilder:()=>I8,createIsIdentityExpiredFunction:()=>X8,createPaginator:()=>J8,doesIdentityRequireRefresh:()=>Q8,getHttpAuthSchemeEndpointRuleSetPlugin:()=>W9,getHttpAuthSchemePlugin:()=>f9,getHttpSigningPlugin:()=>Q9,getSmithyContext:()=>K9,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>eW,httpAuthSchemeMiddleware:()=>F$,httpAuthSchemeMiddlewareOptions:()=>$8,httpSigningMiddleware:()=>U8,httpSigningMiddlewareOptions:()=>w8,isIdentityExpired:()=>F9,memoizeIdentityProvider:()=>Y9,normalizeProvider:()=>A9,requestBuilder:()=>z8});F8.exports=U9(iW);var tW=v();E(aW,"convertHttpAuthSchemesToMap");var F$=E(($,U)=>(w,W)=>async(G)=>{var f;const Z=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,G.input)),L=aW($.httpAuthSchemes),X=tW.getSmithyContext(W),Q=[];for(let z of Z){const M=L.get(z.schemeId);if(!M){Q.push(`HttpAuthScheme \`${z.schemeId}\` was not enabled for this service.`);continue}const J=M.identityProvider(await U.identityProviderConfigProvider($));if(!J){Q.push(`HttpAuthScheme \`${z.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:F={},signingProperties:K={}}=((f=z.propertiesExtractor)==null?void 0:f.call(z,$,W))||{};z.identityProperties=Object.assign(z.identityProperties||{},F),z.signingProperties=Object.assign(z.signingProperties||{},K),X.selectedHttpAuthScheme={httpAuthOption:z,identity:await J(z.identityProperties),signer:M.signer};break}if(!X.selectedHttpAuthScheme)throw new Error(Q.join("\n"));return w(G)},"httpAuthSchemeMiddleware"),w9=dw(),eW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:w9.endpointMiddlewareOptions.name},W9=E(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w})=>({applyToStack:(W)=>{W.addRelativeTo(F$($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w}),eW)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),G9=r1(),$8={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:G9.serializerMiddlewareOption.name},f9=E(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w})=>({applyToStack:(W)=>{W.addRelativeTo(F$($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:w}),$8)}}),"getHttpAuthSchemePlugin"),w1=z0(),Z9=E(($)=>(U)=>{throw U},"defaultErrorHandler"),X9=E(($,U)=>{},"defaultSuccessHandler"),U8=E(($)=>(U,w)=>async(W)=>{if(!w1.HttpRequest.isInstance(W.request))return U(W);const f=tW.getSmithyContext(w).selectedHttpAuthScheme;if(!f)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:Z={}},identity:L,signer:X}=f,Q=await U({...W,request:await X.sign(W.request,L,Z)}).catch((X.errorHandler||Z9)(Z));return(X.successHandler||X9)(Q.response,Z),Q},"httpSigningMiddleware"),L9=oW(),w8={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:L9.retryMiddlewareOptions.name},Q9=E(($)=>({applyToStack:(U)=>{U.addRelativeTo(U8($),w8)}}),"getHttpSigningPlugin"),W8=class ${constructor(U){this.authSchemes=new Map;for(let[w,W]of Object.entries(U))if(W!==void 0)this.authSchemes.set(w,W)}getIdentityProvider(U){return this.authSchemes.get(U)}};E(W8,"DefaultIdentityProviderConfig");var z9=W8,$1=c0(),G8=class ${async sign(U,w,W){if(!W)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!W.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!W.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!w.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const G=w1.HttpRequest.clone(U);if(W.in===$1.HttpApiKeyAuthLocation.QUERY)G.query[W.name]=w.apiKey;else if(W.in===$1.HttpApiKeyAuthLocation.HEADER)G.headers[W.name]=W.scheme?`${W.scheme} ${w.apiKey}`:w.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+W.in+"`");return G}};E(G8,"HttpApiKeyAuthSigner");var M9=G8,f8=class ${async sign(U,w,W){const G=w1.HttpRequest.clone(U);if(!w.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return G.headers.Authorization=`Bearer ${w.token}`,G}};E(f8,"HttpBearerAuthSigner");var I9=f8,Z8=class ${async sign(U,w,W){return U}};E(Z8,"NoAuthSigner");var J9=Z8,X8=E(($)=>(U)=>Q8(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),L8=300000,F9=X8(L8),Q8=E(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),Y9=E(($,U,w)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let G,f,Z,L=!1;const X=E(async(Q)=>{if(!f)f=W(Q);try{G=await f,Z=!0,L=!1}finally{f=void 0}return G},"coalesceProvider");if(U===void 0)return async(Q)=>{if(!Z||(Q==null?void 0:Q.forceRefresh))G=await X(Q);return G};return async(Q)=>{if(!Z||(Q==null?void 0:Q.forceRefresh))G=await X(Q);if(L)return G;if(!w(G))return L=!0,G;if(U(G))return await X(Q),G;return G}},"memoizeIdentityProvider"),K9=E(($)=>$[$1.SMITHY_CONTEXT_KEY]||($[$1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),A9=E(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),B9=L0();E(z8,"requestBuilder");var M8=class ${constructor(U,w){this.input=U,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:U,protocol:w="https",port:W,path:G}=await this.context.endpoint();this.path=G;for(let f of this.resolvePathStack)f(this.path);return new w1.HttpRequest({protocol:w,hostname:this.hostname||U,port:W,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(U){return this.hostname=U,this}bp(U){return this.resolvePathStack.push((w)=>{this.path=`${(w==null?void 0:w.endsWith("/"))?w.slice(0,-1):w||""}`+U}),this}p(U,w,W,G){return this.resolvePathStack.push((f)=>{this.path=B9.resolvedPath(f,this.input,U,w,W,G)}),this}h(U){return this.headers=U,this}q(U){return this.query=U,this}b(U){return this.body=U,this}m(U){return this.method=U,this}};E(M8,"RequestBuilder");var I8=M8,E9=E(async($,U,w,...W)=>{return await U.send(new $(w),...W)},"makePagedClientRequest");E(J8,"createPaginator");var q9=E(($,U)=>{let w=$;const W=U.split(".");for(let G of W){if(!w||typeof w!=="object")return;w=w[G]}return w},"get")});var GG=Y((hF,WG)=>{var{defineProperty:A1,getOwnPropertyDescriptor:G5,getOwnPropertyNames:f5}=Object,Z5=Object.prototype.hasOwnProperty,X5=($,U)=>A1($,"name",{value:U,configurable:!0}),L5=($,U)=>{for(var w in U)A1($,w,{get:U[w],enumerable:!0})},Q5=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of f5(U))if(!Z5.call($,G)&&G!==w)A1($,G,{get:()=>U[G],enumerable:!(W=G5(U,G))||W.enumerable})}return $},z5=($)=>Q5(A1({},"__esModule",{value:!0}),$),wG={};L5(wG,{emitWarningIfUnsupportedVersion:()=>M5});WG.exports=z5(wG);var UG=!1,M5=X5(($)=>{if($&&!UG&&parseInt($.substring(1,$.indexOf(".")))<18)UG=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
2
+ no longer support Node.js 16.x on January 6, 2025.
3
+
4
+ To continue receiving updates to AWS services, bug fixes, and security
5
+ updates please upgrade to a supported Node.js LTS version.
6
+
7
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var VG=Y((DF,HG)=>{var x$=function($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break},V1=Object.defineProperty,Y5=Object.getOwnPropertyDescriptor,K5=Object.getOwnPropertyNames,A5=Object.prototype.hasOwnProperty,V=($,U)=>V1($,"name",{value:U,configurable:!0}),B5=($,U)=>{for(var w in U)V1($,w,{get:U[w],enumerable:!0})},E5=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of K5(U))if(!A5.call($,G)&&G!==w)V1($,G,{get:()=>U[G],enumerable:!(W=Y5(U,G))||W.enumerable})}return $},q5=($)=>E5(V1({},"__esModule",{value:!0}),$),QG={};B5(QG,{SignatureV4:()=>n5,clearCredentialCache:()=>_5,createScope:()=>q1,getCanonicalHeaders:()=>D$,getCanonicalQuery:()=>AG,getPayloadHash:()=>R1,getSigningKey:()=>KG,moveHeadersToQuery:()=>OG,prepareRequest:()=>c$});HG.exports=q5(QG);var fG=v(),b$=H1(),O5="X-Amz-Algorithm",R5="X-Amz-Credential",zG="X-Amz-Date",H5="X-Amz-SignedHeaders",V5="X-Amz-Expires",MG="X-Amz-Signature",IG="X-Amz-Security-Token",JG="authorization",FG=zG.toLowerCase(),T5="date",C5=[JG,FG,T5],N5=MG.toLowerCase(),h$="x-amz-content-sha256",P5=IG.toLowerCase(),j5={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},S5=/^proxy-/,b5=/^sec-/,k$="AWS4-HMAC-SHA256",k5="AWS4-HMAC-SHA256-PAYLOAD",h5="UNSIGNED-PAYLOAD",D5=50,YG="aws4_request",x5=604800,n=F5(),c5=H1(),F0={},E1=[],q1=V(($,U,w)=>`${$}/${U}/${w}/${YG}`,"createScope"),KG=V(async($,U,w,W,G)=>{const f=await ZG($,U.secretAccessKey,U.accessKeyId),Z=`${w}:${W}:${G}:${n.toHex(f)}:${U.sessionToken}`;if(Z in F0)return F0[Z];E1.push(Z);while(E1.length>D5)delete F0[E1.shift()];let L=`AWS4${U.secretAccessKey}`;for(let X of[w,W,G,YG])L=await ZG($,L,X);return F0[Z]=L},"getSigningKey"),_5=V(()=>{E1.length=0,Object.keys(F0).forEach(($)=>{delete F0[$]})},"clearCredentialCache"),ZG=V(($,U,w)=>{const W=new $(U);return W.update(c5.toUint8Array(w)),W.digest()},"hmac"),D$=V(({headers:$},U,w)=>{const W={};for(let G of Object.keys($).sort()){if($[G]==null)continue;const f=G.toLowerCase();if(f in j5||(U==null?void 0:U.has(f))||S5.test(f)||b5.test(f)){if(!w||w&&!w.has(f))continue}W[f]=$[G].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),O1=J5(),AG=V(({query:$={}})=>{const U=[],w={};for(let W of Object.keys($)){if(W.toLowerCase()===N5)continue;const G=O1.escapeUri(W);U.push(G);const f=$[W];if(typeof f==="string")w[G]=`${G}=${O1.escapeUri(f)}`;else if(Array.isArray(f))w[G]=f.slice(0).reduce((Z,L)=>Z.concat([`${G}=${O1.escapeUri(L)}`]),[]).sort().join("&")}return U.sort().map((W)=>w[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),v5=I5(),u5=H1(),R1=V(async({headers:$,body:U},w)=>{for(let W of Object.keys($))if(W.toLowerCase()===h$)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||v5.isArrayBuffer(U)){const W=new w;return W.update(u5.toUint8Array(U)),n.toHex(await W.digest())}return h5},"getPayloadHash"),XG=H1(),BG=class ${format(U){const w=[];for(let f of Object.keys(U)){const Z=XG.fromUtf8(f);w.push(Uint8Array.from([Z.byteLength]),Z,this.formatHeaderValue(U[f]))}const W=new Uint8Array(w.reduce((f,Z)=>f+Z.byteLength,0));let G=0;for(let f of w)W.set(f,G),G+=f.byteLength;return W}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":const w=new DataView(new ArrayBuffer(3));return w.setUint8(0,3),w.setInt16(1,U.value,!1),new Uint8Array(w.buffer);case"integer":const W=new DataView(new ArrayBuffer(5));return W.setUint8(0,4),W.setInt32(1,U.value,!1),new Uint8Array(W.buffer);case"long":const G=new Uint8Array(9);return G[0]=5,G.set(U.value.bytes,1),G;case"binary":const f=new DataView(new ArrayBuffer(3+U.value.byteLength));f.setUint8(0,6),f.setUint16(1,U.value.byteLength,!1);const Z=new Uint8Array(f.buffer);return Z.set(U.value,3),Z;case"string":const L=XG.fromUtf8(U.value),X=new DataView(new ArrayBuffer(3+L.byteLength));X.setUint8(0,7),X.setUint16(1,L.byteLength,!1);const Q=new Uint8Array(X.buffer);return Q.set(L,3),Q;case"timestamp":const z=new Uint8Array(9);return z[0]=8,z.set(d5.fromNumber(U.value.valueOf()).bytes,1),z;case"uuid":if(!p5.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const M=new Uint8Array(17);return M[0]=9,M.set(n.fromHex(U.value.replace(/\-/g,"")),1),M}}};V(BG,"HeaderFormatter");var y5=BG,p5=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,EG=class ${constructor(U){if(this.bytes=U,U.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(U){if(U>9223372036854776000||U<-9223372036854776000)throw new Error(`${U} is too large (or, if negative, too small) to represent as an Int64`);const w=new Uint8Array(8);for(let W=7,G=Math.abs(Math.round(U));W>-1&&G>0;W--,G/=256)w[W]=G;if(U<0)x$(w);return new $(w)}valueOf(){const U=this.bytes.slice(0),w=U[0]&128;if(w)x$(U);return parseInt(n.toHex(U),16)*(w?-1:1)}toString(){return String(this.valueOf())}};V(EG,"Int64");var d5=EG;V(x$,"negate");var g5=V(($,U)=>{$=$.toLowerCase();for(let w of Object.keys(U))if($===w.toLowerCase())return!0;return!1},"hasHeader"),qG=z0(),OG=V(($,U={})=>{var w;const{headers:W,query:G={}}=qG.HttpRequest.clone($);for(let f of Object.keys(W)){const Z=f.toLowerCase();if(Z.slice(0,6)==="x-amz-"&&!((w=U.unhoistableHeaders)==null?void 0:w.has(Z)))G[f]=W[f],delete W[f]}return{...$,headers:W,query:G}},"moveHeadersToQuery"),c$=V(($)=>{$=qG.HttpRequest.clone($);for(let U of Object.keys($.headers))if(C5.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),s5=V(($)=>m5($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),m5=V(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),RG=class ${constructor({applyChecksum:U,credentials:w,region:W,service:G,sha256:f,uriEscapePath:Z=!0}){this.headerFormatter=new y5,this.service=G,this.sha256=f,this.uriEscapePath=Z,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=fG.normalizeProvider(W),this.credentialProvider=fG.normalizeProvider(w)}async presign(U,w={}){const{signingDate:W=new Date,expiresIn:G=3600,unsignableHeaders:f,unhoistableHeaders:Z,signableHeaders:L,signingRegion:X,signingService:Q}=w,z=await this.credentialProvider();this.validateResolvedCredentials(z);const M=X??await this.regionProvider(),{longDate:J,shortDate:F}=B1(W);if(G>x5)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const K=q1(F,M,Q??this.service),A=OG(c$(U),{unhoistableHeaders:Z});if(z.sessionToken)A.query[IG]=z.sessionToken;A.query[O5]=k$,A.query[R5]=`${z.accessKeyId}/${K}`,A.query[zG]=J,A.query[V5]=G.toString(10);const R=D$(A,f,L);return A.query[H5]=LG(R),A.query[MG]=await this.getSignature(J,K,this.getSigningKey(z,M,F,Q),this.createCanonicalRequest(A,R,await R1(U,this.sha256))),A}async sign(U,w){if(typeof U==="string")return this.signString(U,w);else if(U.headers&&U.payload)return this.signEvent(U,w);else if(U.message)return this.signMessage(U,w);else return this.signRequest(U,w)}async signEvent({headers:U,payload:w},{signingDate:W=new Date,priorSignature:G,signingRegion:f,signingService:Z}){const L=f??await this.regionProvider(),{shortDate:X,longDate:Q}=B1(W),z=q1(X,L,Z??this.service),M=await R1({headers:{},body:w},this.sha256),J=new this.sha256;J.update(U);const F=n.toHex(await J.digest()),K=[k5,Q,z,G,F,M].join("\n");return this.signString(K,{signingDate:W,signingRegion:L,signingService:Z})}async signMessage(U,{signingDate:w=new Date,signingRegion:W,signingService:G}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:w,signingRegion:W,signingService:G,priorSignature:U.priorSignature}).then((Z)=>{return{message:U.message,signature:Z}})}async signString(U,{signingDate:w=new Date,signingRegion:W,signingService:G}={}){const f=await this.credentialProvider();this.validateResolvedCredentials(f);const Z=W??await this.regionProvider(),{shortDate:L}=B1(w),X=new this.sha256(await this.getSigningKey(f,Z,L,G));return X.update(b$.toUint8Array(U)),n.toHex(await X.digest())}async signRequest(U,{signingDate:w=new Date,signableHeaders:W,unsignableHeaders:G,signingRegion:f,signingService:Z}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const X=f??await this.regionProvider(),Q=c$(U),{longDate:z,shortDate:M}=B1(w),J=q1(M,X,Z??this.service);if(Q.headers[FG]=z,L.sessionToken)Q.headers[P5]=L.sessionToken;const F=await R1(Q,this.sha256);if(!g5(h$,Q.headers)&&this.applyChecksum)Q.headers[h$]=F;const K=D$(Q,G,W),A=await this.getSignature(z,J,this.getSigningKey(L,X,M,Z),this.createCanonicalRequest(Q,K,F));return Q.headers[JG]=`${k$} Credential=${L.accessKeyId}/${J}, SignedHeaders=${LG(K)}, Signature=${A}`,Q}createCanonicalRequest(U,w,W){const G=Object.keys(w).sort();return`${U.method}
8
+ ${this.getCanonicalPath(U)}
9
+ ${AG(U)}
10
+ ${G.map((f)=>`${f}:${w[f]}`).join("\n")}
11
+
12
+ ${G.join(";")}
13
+ ${W}`}async createStringToSign(U,w,W){const G=new this.sha256;G.update(b$.toUint8Array(W));const f=await G.digest();return`${k$}
14
+ ${U}
15
+ ${w}
16
+ ${n.toHex(f)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const w=[];for(let f of U.split("/")){if((f==null?void 0:f.length)===0)continue;if(f===".")continue;if(f==="..")w.pop();else w.push(f)}const W=`${(U==null?void 0:U.startsWith("/"))?"/":""}${w.join("/")}${w.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return O1.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,w,W,G){const f=await this.createStringToSign(U,w,G),Z=new this.sha256(await W);return Z.update(b$.toUint8Array(f)),n.toHex(await Z.digest())}getSigningKey(U,w,W,G){return KG(this.sha256,U,W,w,G||this.service)}validateResolvedCredentials(U){if(typeof U!=="object"||typeof U.accessKeyId!=="string"||typeof U.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};V(RG,"SignatureV4");var n5=RG,B1=V(($)=>{const U=s5($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),LG=V(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var DG=Y((xF,hG)=>{var{defineProperty:T1,getOwnPropertyDescriptor:l5,getOwnPropertyNames:r5}=Object,o5=Object.prototype.hasOwnProperty,P=($,U)=>T1($,"name",{value:U,configurable:!0}),i5=($,U)=>{for(var w in U)T1($,w,{get:U[w],enumerable:!0})},t5=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of r5(U))if(!o5.call($,G)&&G!==w)T1($,G,{get:()=>U[G],enumerable:!(W=l5(U,G))||W.enumerable})}return $},a5=($)=>t5(T1({},"__esModule",{value:!0}),$),jG={};i5(jG,{AWSSDKSigV4Signer:()=>w7,AwsSdkSigV4ASigner:()=>G7,AwsSdkSigV4Signer:()=>u$,NODE_SIGV4A_CONFIG_OPTIONS:()=>X7,resolveAWSSDKSigV4Config:()=>L7,resolveAwsSdkSigV4AConfig:()=>Z7,resolveAwsSdkSigV4Config:()=>kG,validateSigningProperties:()=>v$});hG.exports=a5(jG);var e5=z0(),$7=z0(),TG=P(($)=>{var U,w;return $7.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((w=$.headers)==null?void 0:w.Date):void 0},"getDateHeader"),_$=P(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),U7=P(($,U)=>Math.abs(_$(U).getTime()-$)>=300000,"isClockSkewed"),CG=P(($,U)=>{const w=Date.parse($);if(U7(w,U))return w-Date.now();return U},"getUpdatedSystemClockOffset"),S0=P(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),v$=P(async($)=>{var U,w,W;const G=S0("context",$.context),f=S0("config",$.config),Z=(W=(w=(U=G.endpointV2)==null?void 0:U.properties)==null?void 0:w.authSchemes)==null?void 0:W[0],X=await S0("signer",f.signer)(Z),Q=$==null?void 0:$.signingRegion,z=$==null?void 0:$.signingRegionSet,M=$==null?void 0:$.signingName;return{config:f,signer:X,signingRegion:Q,signingRegionSet:z,signingName:M}},"validateSigningProperties"),SG=class ${async sign(U,w,W){var G;if(!e5.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const f=await v$(W),{config:Z,signer:L}=f;let{signingRegion:X,signingName:Q}=f;const z=W.context;if(((G=z==null?void 0:z.authSchemes)==null?void 0:G.length)??0>1){const[J,F]=z.authSchemes;if((J==null?void 0:J.name)==="sigv4a"&&(F==null?void 0:F.name)==="sigv4")X=(F==null?void 0:F.signingRegion)??X,Q=(F==null?void 0:F.signingName)??Q}return await L.sign(U,{signingDate:_$(Z.systemClockOffset),signingRegion:X,signingService:Q})}errorHandler(U){return(w)=>{const W=w.ServerTime??TG(w.$response);if(W){const G=S0("config",U.config),f=G.systemClockOffset;if(G.systemClockOffset=CG(W,G.systemClockOffset),G.systemClockOffset!==f&&w.$metadata)w.$metadata.clockSkewCorrected=!0}throw w}}successHandler(U,w){const W=TG(U);if(W){const G=S0("config",w.config);G.systemClockOffset=CG(W,G.systemClockOffset)}}};P(SG,"AwsSdkSigV4Signer");var u$=SG,w7=u$,W7=z0(),bG=class $ extends u${async sign(U,w,W){var G;if(!W7.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:f,signer:Z,signingRegion:L,signingRegionSet:X,signingName:Q}=await v$(W),M=(await((G=f.sigv4aSigningRegionSet)==null?void 0:G.call(f))??X??[L]).join(",");return await Z.sign(U,{signingDate:_$(f.systemClockOffset),signingRegion:M,signingService:Q})}};P(bG,"AwsSdkSigV4ASigner");var G7=bG,f7=Y$(),NG=c1(),Z7=P(($)=>{return $.sigv4aSigningRegionSet=f7.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),X7={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new NG.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 NG.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},a=Y$(),PG=VG(),kG=P(($)=>{let U;if($.credentials)U=a.memoizeIdentityProvider($.credentials,a.isIdentityExpired,a.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=a.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=P(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:w=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:G}=$;let f;if($.signer)f=a.normalizeProvider($.signer);else if($.regionInfoProvider)f=P(()=>a.normalizeProvider($.region)().then(async(Z)=>[await $.regionInfoProvider(Z,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},Z]).then(([Z,L])=>{const{signingRegion:X,signingService:Q}=Z;$.signingRegion=$.signingRegion||X||L,$.signingName=$.signingName||Q||$.serviceId;const z={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:G,uriEscapePath:w};return new($.signerConstructor||PG.SignatureV4)(z)}),"signer");else f=P(async(Z)=>{Z=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await a.normalizeProvider($.region)(),properties:{}},Z);const{signingRegion:L,signingName:X}=Z;$.signingRegion=$.signingRegion||L,$.signingName=$.signingName||X||$.serviceId;const Q={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:G,uriEscapePath:w};return new($.signerConstructor||PG.SignatureV4)(Q)},"signer");return{...$,systemClockOffset:W,signingEscapePath:w,credentials:U,signer:f}},"resolveAwsSdkSigV4Config"),L7=kG});var C1=Y((J7)=>{var Q7=":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",xG="[: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]["+Q7+"]*",z7=new RegExp("^"+xG+"$"),M7=function($,U){const w=[];let W=U.exec($);while(W){const G=[];G.startIndex=U.lastIndex-W[0].length;const f=W.length;for(let Z=0;Z<f;Z++)G.push(W[Z]);w.push(G),W=U.exec($)}return w},I7=function($){const U=z7.exec($);return!(U===null||typeof U==="undefined")};J7.isExist=function($){return typeof $!=="undefined"};J7.isEmptyObject=function($){return Object.keys($).length===0};J7.merge=function($,U,w){if(U){const W=Object.keys(U),G=W.length;for(let f=0;f<G;f++)if(w==="strict")$[W[f]]=[U[W[f]]];else $[W[f]]=U[W[f]]}};J7.getValue=function($){if(J7.isExist($))return $;else return""};J7.isName=I7;J7.getAllMatches=M7;J7.nameRegexp=xG});var p$=Y((j7)=>{var _G=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},vG=function($,U){const w=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const W=$.substr(w,U-w);if(U>5&&W==="xml")return O("InvalidXml","XML declaration allowed only at the start of the document.",N($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U},uG=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 w=1;for(U+=8;U<$.length;U++)if($[U]==="<")w++;else if($[U]===">"){if(w--,w===0)break}}else if($.length>U+9&&$[U+1]==="["&&$[U+2]==="C"&&$[U+3]==="D"&&$[U+4]==="A"&&$[U+5]==="T"&&$[U+6]==="A"&&$[U+7]==="["){for(U+=8;U<$.length;U++)if($[U]==="]"&&$[U+1]==="]"&&$[U+2]===">"){U+=2;break}}return U},H7=function($,U){let w="",W="",G=!1;for(;U<$.length;U++){if($[U]===O7||$[U]===R7)if(W==="")W=$[U];else if(W!==$[U]);else W="";else if($[U]===">"){if(W===""){G=!0;break}}w+=$[U]}if(W!=="")return!1;return{value:w,index:U,tagClosed:G}},yG=function($,U){const w=y$.getAllMatches($,V7),W={};for(let G=0;G<w.length;G++){if(w[G][1].length===0)return O("InvalidAttr","Attribute '"+w[G][2]+"' has no space in starting.",b0(w[G]));else if(w[G][3]!==void 0&&w[G][4]===void 0)return O("InvalidAttr","Attribute '"+w[G][2]+"' is without value.",b0(w[G]));else if(w[G][3]===void 0&&!U.allowBooleanAttributes)return O("InvalidAttr","boolean attribute '"+w[G][2]+"' is not allowed.",b0(w[G]));const f=w[G][2];if(!N7(f))return O("InvalidAttr","Attribute '"+f+"' is an invalid name.",b0(w[G]));if(!W.hasOwnProperty(f))W[f]=1;else return O("InvalidAttr","Attribute '"+f+"' is repeated.",b0(w[G]))}return!0},T7=function($,U){let w=/\d/;if($[U]==="x")U++,w=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(w))break}return-1},C7=function($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,T7($,U);let w=0;for(;U<$.length;U++,w++){if($[U].match(/\w/)&&w<20)continue;if($[U]===";")break;return-1}return U},O=function($,U,w){return{err:{code:$,msg:U,line:w.line||w,col:w.col}}},N7=function($){return y$.isName($)},P7=function($){return y$.isName($)},N=function($,U){const w=$.substring(0,U).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}},b0=function($){return $.startIndex+$[1].length},y$=C1(),q7={allowBooleanAttributes:!1,unpairedTags:[]};j7.validate=function($,U){U=Object.assign({},q7,U);const w=[];let W=!1,G=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let f=0;f<$.length;f++)if($[f]==="<"&&$[f+1]==="?"){if(f+=2,f=vG($,f),f.err)return f}else if($[f]==="<"){let Z=f;if(f++,$[f]==="!"){f=uG($,f);continue}else{let L=!1;if($[f]==="/")L=!0,f++;let X="";for(;f<$.length&&$[f]!==">"&&$[f]!==" "&&$[f]!=="\t"&&$[f]!=="\n"&&$[f]!=="\r";f++)X+=$[f];if(X=X.trim(),X[X.length-1]==="/")X=X.substring(0,X.length-1),f--;if(!P7(X)){let M;if(X.trim().length===0)M="Invalid space after '<'.";else M="Tag '"+X+"' is an invalid name.";return O("InvalidTag",M,N($,f))}const Q=H7($,f);if(Q===!1)return O("InvalidAttr","Attributes for '"+X+"' have open quote.",N($,f));let z=Q.value;if(f=Q.index,z[z.length-1]==="/"){const M=f-z.length;z=z.substring(0,z.length-1);const J=yG(z,U);if(J===!0)W=!0;else return O(J.err.code,J.err.msg,N($,M+J.err.line))}else if(L)if(!Q.tagClosed)return O("InvalidTag","Closing tag '"+X+"' doesn't have proper closing.",N($,f));else if(z.trim().length>0)return O("InvalidTag","Closing tag '"+X+"' can't have attributes or invalid starting.",N($,Z));else if(w.length===0)return O("InvalidTag","Closing tag '"+X+"' has not been opened.",N($,Z));else{const M=w.pop();if(X!==M.tagName){let J=N($,M.tagStartPos);return O("InvalidTag","Expected closing tag '"+M.tagName+"' (opened in line "+J.line+", col "+J.col+") instead of closing tag '"+X+"'.",N($,Z))}if(w.length==0)G=!0}else{const M=yG(z,U);if(M!==!0)return O(M.err.code,M.err.msg,N($,f-z.length+M.err.line));if(G===!0)return O("InvalidXml","Multiple possible root nodes found.",N($,f));else if(U.unpairedTags.indexOf(X)!==-1);else w.push({tagName:X,tagStartPos:Z});W=!0}for(f++;f<$.length;f++)if($[f]==="<")if($[f+1]==="!"){f++,f=uG($,f);continue}else if($[f+1]==="?"){if(f=vG($,++f),f.err)return f}else break;else if($[f]==="&"){const M=C7($,f);if(M==-1)return O("InvalidChar","char '&' is not expected.",N($,f));f=M}else if(G===!0&&!_G($[f]))return O("InvalidXml","Extra text at the end",N($,f));if($[f]==="<")f--}}else{if(_G($[f]))continue;return O("InvalidChar","char '"+$[f]+"' is not expected.",N($,f))}if(!W)return O("InvalidXml","Start tag expected.",1);else if(w.length==1)return O("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",N($,w[0].tagStartPos));else if(w.length>0)return O("InvalidXml","Invalid '"+JSON.stringify(w.map((f)=>f.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var O7='"',R7="'",V7=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var dG=Y((k7)=>{var pG={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function($,U,w){return $}},b7=function($){return Object.assign({},pG,$)};k7.buildOptions=b7;k7.defaultOptions=pG});var mG=Y((uF,sG)=>{class gG{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})}}sG.exports=gG});var lG=Y((yF,nG)=>{var c7=function($,U){const w={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let W=1,G=!1,f=!1,Z="";for(;U<$.length;U++)if($[U]==="<"&&!f){if(G&&u7($,U)){if(U+=7,[entityName,val,U]=_7($,U+1),val.indexOf("&")===-1)w[g7(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(G&&y7($,U))U+=8;else if(G&&p7($,U))U+=8;else if(G&&d7($,U))U+=9;else if(v7)f=!0;else throw new Error("Invalid DOCTYPE");W++,Z=""}else if($[U]===">"){if(f){if($[U-1]==="-"&&$[U-2]==="-")f=!1,W--}else W--;if(W===0)break}else if($[U]==="[")G=!0;else Z+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:w,i:U}},_7=function($,U){let w="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)w+=$[U];if(w=w.trim(),w.indexOf(" ")!==-1)throw new Error("External entites are not supported");const W=$[U++];let G="";for(;U<$.length&&$[U]!==W;U++)G+=$[U];return[w,G,U]},v7=function($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1},u7=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},y7=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},p7=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},d7=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},g7=function($){if(x7.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},x7=C1();nG.exports=c7});var oG=Y((pF,rG)=>{var l7=function($,U={}){if(U=Object.assign({},n7,U),!$||typeof $!=="string")return $;let w=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(w))return $;else if(U.hex&&s7.test(w))return Number.parseInt(w,16);else{const W=m7.exec(w);if(W){const G=W[1],f=W[2];let Z=r7(W[3]);const L=W[4]||W[6];if(!U.leadingZeros&&f.length>0&&G&&w[2]!==".")return $;else if(!U.leadingZeros&&f.length>0&&!G&&w[1]!==".")return $;else{const X=Number(w),Q=""+X;if(Q.search(/[eE]/)!==-1)if(U.eNotation)return X;else return $;else if(L)if(U.eNotation)return X;else return $;else if(w.indexOf(".")!==-1)if(Q==="0"&&Z==="")return X;else if(Q===Z)return X;else if(G&&Q==="-"+Z)return X;else return $;if(f)if(Z===Q)return X;else if(G+Z===Q)return X;else return $;if(w===Q)return X;else if(w===G+Q)return X;return $}}else return $}},r7=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},s7=/^[-+]?0x[a-fA-F0-9]+$/,m7=/^([\-\+])?(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 n7={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};rG.exports=l7});var eG=Y((dF,aG)=>{var t7=function($){const U=Object.keys($);for(let w=0;w<U.length;w++){const W=U[w];this.lastEntities[W]={regex:new RegExp("&"+W+";","g"),val:$[W]}}},a7=function($,U,w,W,G,f,Z){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!Z)$=this.replaceEntitiesValue($);const L=this.options.tagValueProcessor(U,$,w,G,f);if(L===null||L===void 0)return $;else if(typeof L!==typeof $||L!==$)return L;else if(this.options.trimValues)return g$($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return g$($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},e7=function($){if(this.options.removeNSPrefix){const U=$.split(":"),w=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=w+U[1]}return $},UL=function($,U,w){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=iG.getAllMatches($,$L),G=W.length,f={};for(let Z=0;Z<G;Z++){const L=this.resolveNameSpace(W[Z][1]);let X=W[Z][4],Q=this.options.attributeNamePrefix+L;if(L.length){if(this.options.transformAttributeName)Q=this.options.transformAttributeName(Q);if(Q==="__proto__")Q="#__proto__";if(X!==void 0){if(this.options.trimValues)X=X.trim();X=this.replaceEntitiesValue(X);const z=this.options.attributeValueProcessor(L,X,U);if(z===null||z===void 0)f[Q]=X;else if(typeof z!==typeof X||z!==X)f[Q]=z;else f[Q]=g$(X,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)f[Q]=!0}}if(!Object.keys(f).length)return;if(this.options.attributesGroupName){const Z={};return Z[this.options.attributesGroupName]=f,Z}return f}},WL=function($,U,w){const W=this.options.updateTag(U.tagname,w,U[":@"]);if(W===!1);else if(typeof W==="string")U.tagname=W,$.addChild(U);else $.addChild(U)},fL=function($,U,w,W){if($){if(W===void 0)W=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,w,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,W),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $},ZL=function($,U,w){const W="*."+w;for(let G in $){const f=$[G];if(W===f||U===f)return!0}return!1},XL=function($,U,w=">"){let W,G="";for(let f=U;f<$.length;f++){let Z=$[f];if(W){if(Z===W)W=""}else if(Z==='"'||Z==="'")W=Z;else if(Z===w[0])if(w[1]){if($[f+1]===w[1])return{data:G,index:f}}else return{data:G,index:f};else if(Z==="\t")Z=" ";G+=Z}},e=function($,U,w,W){const G=$.indexOf(U,w);if(G===-1)throw new Error(W);else return G+U.length-1},d$=function($,U,w,W=">"){const G=XL($,U+1,W);if(!G)return;let f=G.data;const Z=G.index,L=f.search(/\s/);let X=f,Q=!0;if(L!==-1)X=f.substring(0,L),f=f.substring(L+1).trimStart();const z=X;if(w){const M=X.indexOf(":");if(M!==-1)X=X.substr(M+1),Q=X!==G.data.substr(M+1)}return{tagName:X,tagExp:f,closeIndex:Z,attrExpPresent:Q,rawTagName:z}},LL=function($,U,w){const W=w;let G=1;for(;w<$.length;w++)if($[w]==="<")if($[w+1]==="/"){const f=e($,">",w,`${U} is not closed`);if($.substring(w+2,f).trim()===U){if(G--,G===0)return{tagContent:$.substring(W,w),i:f}}w=f}else if($[w+1]==="?")w=e($,"?>",w+1,"StopNode is not closed.");else if($.substr(w+1,3)==="!--")w=e($,"-->",w+3,"StopNode is not closed.");else if($.substr(w+1,2)==="![")w=e($,"]]>",w,"StopNode is not closed.")-2;else{const f=d$($,w,">");if(f){if((f&&f.tagName)===U&&f.tagExp[f.tagExp.length-1]!=="/")G++;w=f.closeIndex}}},g$=function($,U,w){if(U&&typeof $==="string"){const W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return i7($,w)}else if(iG.isExist($))return $;else return""},iG=C1(),k0=mG(),o7=lG(),i7=oG();class tG{constructor($){this.options=$,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(U,w)=>String.fromCharCode(Number.parseInt(w,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(U,w)=>String.fromCharCode(Number.parseInt(w,16))}},this.addExternalEntities=t7,this.parseXml=wL,this.parseTextData=a7,this.resolveNameSpace=e7,this.buildAttributesMap=UL,this.isItStopNode=ZL,this.replaceEntitiesValue=GL,this.readStopNodeData=LL,this.saveTextToParentTag=fL,this.addChild=WL}}var $L=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),wL=function($){$=$.replace(/\r\n?/g,"\n");const U=new k0("!xml");let w=U,W="",G="";for(let f=0;f<$.length;f++)if($[f]==="<")if($[f+1]==="/"){const L=e($,">",f,"Closing Tag is not closed.");let X=$.substring(f+2,L).trim();if(this.options.removeNSPrefix){const M=X.indexOf(":");if(M!==-1)X=X.substr(M+1)}if(this.options.transformTagName)X=this.options.transformTagName(X);if(w)W=this.saveTextToParentTag(W,w,G);const Q=G.substring(G.lastIndexOf(".")+1);if(X&&this.options.unpairedTags.indexOf(X)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${X}>`);let z=0;if(Q&&this.options.unpairedTags.indexOf(Q)!==-1)z=G.lastIndexOf(".",G.lastIndexOf(".")-1),this.tagsNodeStack.pop();else z=G.lastIndexOf(".");G=G.substring(0,z),w=this.tagsNodeStack.pop(),W="",f=L}else if($[f+1]==="?"){let L=d$($,f,!1,"?>");if(!L)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,w,G),this.options.ignoreDeclaration&&L.tagName==="?xml"||this.options.ignorePiTags);else{const X=new k0(L.tagName);if(X.add(this.options.textNodeName,""),L.tagName!==L.tagExp&&L.attrExpPresent)X[":@"]=this.buildAttributesMap(L.tagExp,G,L.tagName);this.addChild(w,X,G)}f=L.closeIndex+1}else if($.substr(f+1,3)==="!--"){const L=e($,"-->",f+4,"Comment is not closed.");if(this.options.commentPropName){const X=$.substring(f+4,L-2);W=this.saveTextToParentTag(W,w,G),w.add(this.options.commentPropName,[{[this.options.textNodeName]:X}])}f=L}else if($.substr(f+1,2)==="!D"){const L=o7($,f);this.docTypeEntities=L.entities,f=L.i}else if($.substr(f+1,2)==="!["){const L=e($,"]]>",f,"CDATA is not closed.")-2,X=$.substring(f+9,L);W=this.saveTextToParentTag(W,w,G);let Q=this.parseTextData(X,w.tagname,G,!0,!1,!0,!0);if(Q==null)Q="";if(this.options.cdataPropName)w.add(this.options.cdataPropName,[{[this.options.textNodeName]:X}]);else w.add(this.options.textNodeName,Q);f=L+2}else{let L=d$($,f,this.options.removeNSPrefix),X=L.tagName;const Q=L.rawTagName;let{tagExp:z,attrExpPresent:M,closeIndex:J}=L;if(this.options.transformTagName)X=this.options.transformTagName(X);if(w&&W){if(w.tagname!=="!xml")W=this.saveTextToParentTag(W,w,G,!1)}const F=w;if(F&&this.options.unpairedTags.indexOf(F.tagname)!==-1)w=this.tagsNodeStack.pop(),G=G.substring(0,G.lastIndexOf("."));if(X!==U.tagname)G+=G?"."+X:X;if(this.isItStopNode(this.options.stopNodes,G,X)){let K="";if(z.length>0&&z.lastIndexOf("/")===z.length-1){if(X[X.length-1]==="/")X=X.substr(0,X.length-1),G=G.substr(0,G.length-1),z=X;else z=z.substr(0,z.length-1);f=L.closeIndex}else if(this.options.unpairedTags.indexOf(X)!==-1)f=L.closeIndex;else{const R=this.readStopNodeData($,Q,J+1);if(!R)throw new Error(`Unexpected end of ${Q}`);f=R.i,K=R.tagContent}const A=new k0(X);if(X!==z&&M)A[":@"]=this.buildAttributesMap(z,G,X);if(K)K=this.parseTextData(K,X,G,!0,M,!0,!0);G=G.substr(0,G.lastIndexOf(".")),A.add(this.options.textNodeName,K),this.addChild(w,A,G)}else{if(z.length>0&&z.lastIndexOf("/")===z.length-1){if(X[X.length-1]==="/")X=X.substr(0,X.length-1),G=G.substr(0,G.length-1),z=X;else z=z.substr(0,z.length-1);if(this.options.transformTagName)X=this.options.transformTagName(X);const K=new k0(X);if(X!==z&&M)K[":@"]=this.buildAttributesMap(z,G,X);this.addChild(w,K,G),G=G.substr(0,G.lastIndexOf("."))}else{const K=new k0(X);if(this.tagsNodeStack.push(w),X!==z&&M)K[":@"]=this.buildAttributesMap(z,G,X);this.addChild(w,K,G),w=K}W="",f=J}}else W+=$[f];return U.child},GL=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){const w=this.docTypeEntities[U];$=$.replace(w.regx,w.val)}for(let U in this.lastEntities){const w=this.lastEntities[U];$=$.replace(w.regex,w.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){const w=this.htmlEntities[U];$=$.replace(w.regex,w.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};aG.exports=tG});var Uf=Y((JL)=>{var QL=function($,U){return $f($,U)},$f=function($,U,w){let W;const G={};for(let f=0;f<$.length;f++){const Z=$[f],L=zL(Z);let X="";if(w===void 0)X=L;else X=w+"."+L;if(L===U.textNodeName)if(W===void 0)W=Z[L];else W+=""+Z[L];else if(L===void 0)continue;else if(Z[L]){let Q=$f(Z[L],U,X);const z=IL(Q,U);if(Z[":@"])ML(Q,Z[":@"],X,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(G[L]!==void 0&&G.hasOwnProperty(L)){if(!Array.isArray(G[L]))G[L]=[G[L]];G[L].push(Q)}else if(U.isArray(L,X,z))G[L]=[Q];else G[L]=Q}}if(typeof W==="string"){if(W.length>0)G[U.textNodeName]=W}else if(W!==void 0)G[U.textNodeName]=W;return G},zL=function($){const U=Object.keys($);for(let w=0;w<U.length;w++){const W=U[w];if(W!==":@")return W}},ML=function($,U,w,W){if(U){const G=Object.keys(U),f=G.length;for(let Z=0;Z<f;Z++){const L=G[Z];if(W.isArray(L,w+"."+L,!0,!0))$[L]=[U[L]];else $[L]=U[L]}}},IL=function($,U){const{textNodeName:w}=U,W=Object.keys($).length;if(W===0)return!0;if(W===1&&($[w]||typeof $[w]==="boolean"||$[w]===0))return!0;return!1};JL.prettify=QL});var Gf=Y((sF,Wf)=>{var{buildOptions:YL}=dG(),KL=eG(),{prettify:AL}=Uf(),BL=p$();class wf{constructor($){this.externalEntities={},this.options=YL($)}parse($,U){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(U){if(U===!0)U={};const G=BL.validate($,U);if(G!==!0)throw Error(`${G.err.msg}:${G.err.line}:${G.err.col}`)}const w=new KL(this.options);w.addExternalEntities(this.externalEntities);const W=w.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return AL(W,this.options)}addEntity($,U){if(U.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if($.indexOf("&")!==-1||$.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(U==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=U}}Wf.exports=wf});var Qf=Y((mF,Lf)=>{var EL=function($,U){let w="";if(U.format&&U.indentBy.length>0)w="\n";return Zf($,U,"",w)},Zf=function($,U,w,W){let G="",f=!1;for(let Z=0;Z<$.length;Z++){const L=$[Z],X=qL(L);if(X===void 0)continue;let Q="";if(w.length===0)Q=X;else Q=`${w}.${X}`;if(X===U.textNodeName){let K=L[X];if(!OL(Q,U))K=U.tagValueProcessor(X,K),K=Xf(K,U);if(f)G+=W;G+=K,f=!1;continue}else if(X===U.cdataPropName){if(f)G+=W;G+=`<![CDATA[${L[X][0][U.textNodeName]}]]>`,f=!1;continue}else if(X===U.commentPropName){G+=W+`<!--${L[X][0][U.textNodeName]}-->`,f=!0;continue}else if(X[0]==="?"){const K=ff(L[":@"],U),A=X==="?xml"?"":W;let R=L[X][0][U.textNodeName];R=R.length!==0?" "+R:"",G+=A+`<${X}${R}${K}?>`,f=!0;continue}let z=W;if(z!=="")z+=U.indentBy;const M=ff(L[":@"],U),J=W+`<${X}${M}`,F=Zf(L[X],U,Q,z);if(U.unpairedTags.indexOf(X)!==-1)if(U.suppressUnpairedNode)G+=J+">";else G+=J+"/>";else if((!F||F.length===0)&&U.suppressEmptyNode)G+=J+"/>";else if(F&&F.endsWith(">"))G+=J+`>${F}${W}</${X}>`;else{if(G+=J+">",F&&W!==""&&(F.includes("/>")||F.includes("</")))G+=W+U.indentBy+F+W;else G+=F;G+=`</${X}>`}f=!0}return G},qL=function($){const U=Object.keys($);for(let w=0;w<U.length;w++){const W=U[w];if(!$.hasOwnProperty(W))continue;if(W!==":@")return W}},ff=function($,U){let w="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let G=U.attributeValueProcessor(W,$[W]);if(G=Xf(G,U),G===!0&&U.suppressBooleanAttributes)w+=` ${W.substr(U.attributeNamePrefix.length)}`;else w+=` ${W.substr(U.attributeNamePrefix.length)}="${G}"`}return w},OL=function($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let w=$.substr($.lastIndexOf(".")+1);for(let W in U.stopNodes)if(U.stopNodes[W]===$||U.stopNodes[W]==="*."+w)return!0;return!1},Xf=function($,U){if($&&$.length>0&&U.processEntities)for(let w=0;w<U.entities.length;w++){const W=U.entities[w];$=$.replace(W.regex,W.val)}return $};Lf.exports=EL});var Mf=Y((nF,zf)=>{var l=function($){if(this.options=Object.assign({},HL,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=CL;if(this.processTextOrObjNode=VL,this.options.format)this.indentate=TL,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},VL=function($,U,w){const W=this.j2x($,w+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,W.attrStr,w);else return this.buildObjectNode(W.val,U,W.attrStr,w)},TL=function($){return this.options.indentBy.repeat($)},CL=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},RL=Qf(),HL={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};l.prototype.build=function($){if(this.options.preserveOrder)return RL($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};l.prototype.j2x=function($,U){let w="",W="";for(let G in $){if(!Object.prototype.hasOwnProperty.call($,G))continue;if(typeof $[G]==="undefined"){if(this.isAttribute(G))W+=""}else if($[G]===null)if(this.isAttribute(G))W+="";else if(G[0]==="?")W+=this.indentate(U)+"<"+G+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+G+"/"+this.tagEndChar;else if($[G]instanceof Date)W+=this.buildTextValNode($[G],G,"",U);else if(typeof $[G]!=="object"){const f=this.isAttribute(G);if(f)w+=this.buildAttrPairStr(f,""+$[G]);else if(G===this.options.textNodeName){let Z=this.options.tagValueProcessor(G,""+$[G]);W+=this.replaceEntitiesValue(Z)}else W+=this.buildTextValNode($[G],G,"",U)}else if(Array.isArray($[G])){const f=$[G].length;let Z="",L="";for(let X=0;X<f;X++){const Q=$[G][X];if(typeof Q==="undefined");else if(Q===null)if(G[0]==="?")W+=this.indentate(U)+"<"+G+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+G+"/"+this.tagEndChar;else if(typeof Q==="object")if(this.options.oneListGroup){const z=this.j2x(Q,U+1);if(Z+=z.val,this.options.attributesGroupName&&Q.hasOwnProperty(this.options.attributesGroupName))L+=z.attrStr}else Z+=this.processTextOrObjNode(Q,G,U);else if(this.options.oneListGroup){let z=this.options.tagValueProcessor(G,Q);z=this.replaceEntitiesValue(z),Z+=z}else Z+=this.buildTextValNode(Q,G,"",U)}if(this.options.oneListGroup)Z=this.buildObjectNode(Z,G,L,U);W+=Z}else if(this.options.attributesGroupName&&G===this.options.attributesGroupName){const f=Object.keys($[G]),Z=f.length;for(let L=0;L<Z;L++)w+=this.buildAttrPairStr(f[L],""+$[G][f[L]])}else W+=this.processTextOrObjNode($[G],G,U)}return{attrStr:w,val:W}};l.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};l.prototype.buildObjectNode=function($,U,w,W){if($==="")if(U[0]==="?")return this.indentate(W)+"<"+U+w+"?"+this.tagEndChar;else return this.indentate(W)+"<"+U+w+this.closeTag(U)+this.tagEndChar;else{let G="</"+U+this.tagEndChar,f="";if(U[0]==="?")f="?",G="";if((w||w==="")&&$.indexOf("<")===-1)return this.indentate(W)+"<"+U+w+f+">"+$+G;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&f.length===0)return this.indentate(W)+`<!--${$}-->`+this.newLine;else return this.indentate(W)+"<"+U+w+f+this.tagEndChar+$+this.indentate(W)+G}};l.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};l.prototype.buildTextValNode=function($,U,w,W){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(W)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(W)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(W)+"<"+U+w+"?"+this.tagEndChar;else{let G=this.options.tagValueProcessor(U,$);if(G=this.replaceEntitiesValue(G),G==="")return this.indentate(W)+"<"+U+w+this.closeTag(U)+this.tagEndChar;else return this.indentate(W)+"<"+U+w+">"+G+"</"+U+this.tagEndChar}};l.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const w=this.options.entities[U];$=$.replace(w.regex,w.val)}return $};zf.exports=l});var Jf=Y((lF,If)=>{var NL=p$(),PL=Gf(),jL=Mf();If.exports={XMLParser:PL,XMLValidator:NL,XMLBuilder:jL}});var Ef=Y((rF,Bf)=>{var{defineProperty:N1,getOwnPropertyDescriptor:SL,getOwnPropertyNames:bL}=Object,kL=Object.prototype.hasOwnProperty,j=($,U)=>N1($,"name",{value:U,configurable:!0}),hL=($,U)=>{for(var w in U)N1($,w,{get:U[w],enumerable:!0})},DL=($,U,w,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of bL(U))if(!kL.call($,G)&&G!==w)N1($,G,{get:()=>U[G],enumerable:!(W=SL(U,G))||W.enumerable})}return $},xL=($)=>DL(N1({},"__esModule",{value:!0}),$),Ff={};hL(Ff,{_toBool:()=>_L,_toNum:()=>vL,_toStr:()=>cL,awsExpectUnion:()=>yL,loadRestJsonErrorCode:()=>gL,loadRestXmlErrorCode:()=>lL,parseJsonBody:()=>Kf,parseJsonErrorBody:()=>dL,parseXmlBody:()=>Af,parseXmlErrorBody:()=>nL});Bf.exports=xL(Ff);var cL=j(($)=>{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"),_L=j(($)=>{if($==null)return $;if(typeof $==="string"){const U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){const w=new Error(`Received string "${$}" where a boolean was expected.`);w.name="Warning",console.warn(w)}return $!==""&&U!=="false"}return $},"_toBool"),vL=j(($)=>{if($==null)return $;if(typeof $==="string"){const U=Number($);if(U.toString()!==$){const w=new Error(`Received string "${$}" where a number was expected.`);return w.name="Warning",console.warn(w),$}return U}return $},"_toNum"),uL=L0(),yL=j(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return uL.expectUnion($)},"awsExpectUnion"),pL=L0(),Yf=j(($,U)=>pL.collectBody($,U).then((w)=>U.utf8Encoder(w)),"collectBodyString"),Kf=j(($,U)=>Yf($,U).then((w)=>{if(w.length)try{return JSON.parse(w)}catch(W){if((W==null?void 0:W.name)==="SyntaxError")Object.defineProperty(W,"$responseBodyText",{value:w});throw W}return{}}),"parseJsonBody"),dL=j(async($,U)=>{const w=await Kf($,U);return w.message=w.message??w.Message,w},"parseJsonErrorBody"),gL=j(($,U)=>{const w=j((f,Z)=>Object.keys(f).find((L)=>L.toLowerCase()===Z.toLowerCase()),"findKey"),W=j((f)=>{let Z=f;if(typeof Z==="number")Z=Z.toString();if(Z.indexOf(",")>=0)Z=Z.split(",")[0];if(Z.indexOf(":")>=0)Z=Z.split(":")[0];if(Z.indexOf("#")>=0)Z=Z.split("#")[1];return Z},"sanitizeErrorCode"),G=w($.headers,"x-amzn-errortype");if(G!==void 0)return W($.headers[G]);if(U.code!==void 0)return W(U.code);if(U.__type!==void 0)return W(U.__type)},"loadRestJsonErrorCode"),sL=L0(),mL=Jf(),Af=j(($,U)=>Yf($,U).then((w)=>{if(w.length){const W=new mL.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(X,Q)=>Q.trim()===""&&Q.includes("\n")?"":void 0});W.addEntity("#xD","\r"),W.addEntity("#10","\n");let G;try{G=W.parse(w,!0)}catch(X){if(X&&typeof X==="object")Object.defineProperty(X,"$responseBodyText",{value:w});throw X}const f="#text",Z=Object.keys(G)[0],L=G[Z];if(L[f])L[Z]=L[f],delete L[f];return sL.getValueFromTextNode(L)}return{}}),"parseXmlBody"),nL=j(async($,U)=>{const w=await Af($,U);if(w.Error)w.Error.message=w.Error.message??w.Error.Message;return w},"parseXmlErrorBody"),lL=j(($,U)=>{var w;if(((w=U==null?void 0:U.Error)==null?void 0:w.Code)!==void 0)return U.Error.Code;if((U==null?void 0:U.Code)!==void 0)return U.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var oL=Y((h0)=>{Object.defineProperty(h0,"__esModule",{value:!0});var s$=rL();s$.__exportStar(GG(),h0);s$.__exportStar(DG(),h0);s$.__exportStar(Ef(),h0)});var _=C(x1(),1),NQ=_.default.v1,PQ=_.default.v3,gU=_.default.v4,jQ=_.default.v5,SQ=_.default.NIL,bQ=_.default.version,kQ=_.default.validate,hQ=_.default.stringify,DQ=_.default.parse;function _Q($){return $}var l4=($)=>(U)=>async(w)=>{if(!S.isInstance(w.request))return U(w);const{request:W}=w,{handlerProtocol:G=""}=$.requestHandler.metadata||{};if(G.indexOf("h2")>=0&&!W.headers[":authority"])delete W.headers.host,W.headers[":authority"]=W.hostname+(W.port?":"+W.port:"");else if(!W.headers.host){let f=W.hostname;if(W.port!=null)f+=`:${W.port}`;W.headers.host=f}return U(w)},r4={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},vQ=($)=>({applyToStack:(U)=>{U.add(l4($),r4)}});var o4=()=>($,U)=>async(w)=>{try{const W=await $(w),{clientName:G,commandName:f,logger:Z,dynamoDbDocumentClientOptions:L={}}=U,{overrideInputFilterSensitiveLog:X,overrideOutputFilterSensitiveLog:Q}=L,z=X??U.inputFilterSensitiveLog,M=Q??U.outputFilterSensitiveLog,{$metadata:J,...F}=W.output;return Z?.info?.({clientName:G,commandName:f,input:z(w.input),output:M(F),metadata:J}),W}catch(W){const{clientName:G,commandName:f,logger:Z,dynamoDbDocumentClientOptions:L={}}=U,{overrideInputFilterSensitiveLog:X}=L,Q=X??U.inputFilterSensitiveLog;throw Z?.error?.({clientName:G,commandName:f,input:Q(w.input),error:W,metadata:W.$metadata}),W}},i4={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},yQ=($)=>({applyToStack:(U)=>{U.add(o4(),i4)}});var sU="X-Amzn-Trace-Id",t4="AWS_LAMBDA_FUNCTION_NAME",a4="_X_AMZN_TRACE_ID",e4=($)=>(U)=>async(w)=>{const{request:W}=w;if(!S.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(sU))return U(w);const G=process.env[t4],f=process.env[a4],Z=(L)=>typeof L==="string"&&L.length>0;if(Z(G)&&Z(f))W.headers[sU]=f;return U({...w,request:W})},$6={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},mQ=($)=>({applyToStack:(U)=>{U.add(e4($),$6)}});function Iz($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}class O9{constructor({size:$,params:U}){if(this.data=new Map,this.parameters=[],this.capacity=$??50,U)this.parameters=U}get($,U){const w=this.hash($);if(w===!1)return U();if(!this.data.has(w)){if(this.data.size>this.capacity+10){const W=this.data.keys();let G=0;while(!0){const{value:f,done:Z}=W.next();if(this.data.delete(f),Z||++G>10)break}}this.data.set(w,U())}return this.data.get(w)}size(){return this.data.size}hash($){let U="";const{parameters:w}=this;if(w.length===0)return!1;for(let W of w){const G=String($[W]??"");if(G.includes("|;"))return!1;U+=G+"|;"}return U}}var R9=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}$"),N0=($)=>R9.test($)||$.startsWith("[")&&$.endsWith("]");var H9=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),P0=($,U=!1)=>{if(!U)return H9.test($);const w=$.split(".");for(let W of w)if(!P0(W))return!1;return!0};var j0={};var d="endpoints";function k($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${k($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(k).join(", ")})`;return JSON.stringify($,null,2)}class B extends Error{constructor($){super($);this.name="EndpointError"}}var Y8=($,U)=>$===U;var K8=($)=>{const U=$.split("."),w=[];for(let W of U){const G=W.indexOf("[");if(G!==-1){if(W.indexOf("]")!==W.length-1)throw new B(`Path: '${$}' does not end with ']'`);const f=W.slice(G+1,-1);if(Number.isNaN(parseInt(f)))throw new B(`Invalid array index: '${f}' in path: '${$}'`);if(G!==0)w.push(W.slice(0,G));w.push(f)}else w.push(W)}return w};var W1=($,U)=>K8(U).reduce((w,W)=>{if(typeof w!=="object")throw new B(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(w))return w[parseInt(W)];return w[W]},$);var A8=($)=>$!=null;var B8=($)=>!$;var K$={[G1.HTTP]:80,[G1.HTTPS]:443},E8=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:J,port:F,protocol:K="",path:A="",query:R={}}=$,o$=new URL(`${K}//${J}${F?`:${F}`:""}${A}`);return o$.search=Object.entries(R).map(([bf,kf])=>`${bf}=${kf}`).join("&"),o$}return new URL($)}catch(J){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const w=U.href,{host:W,hostname:G,pathname:f,protocol:Z,search:L}=U;if(L)return null;const X=Z.slice(0,-1);if(!Object.values(G1).includes(X))return null;const Q=N0(G),z=w.includes(`${W}:${K$[X]}`)||typeof $==="string"&&$.includes(`${W}:${K$[X]}`),M=`${W}${z?`:${K$[X]}`:""}`;return{scheme:X,authority:M,path:f,normalizedPath:f.endsWith("/")?f:`${f}/`,isIp:Q}};var q8=($,U)=>$===U;var O8=($,U,w,W)=>{if(U>=w||$.length<w)return null;if(!W)return $.substring(U,w);return $.substring($.length-w,$.length-U)};var R8=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var H8={booleanEquals:Y8,getAttr:W1,isSet:A8,isValidHostLabel:P0,not:B8,parseURL:E8,stringEquals:q8,substring:O8,uriEncode:R8};var f1=($,U)=>{const w=[],W={...U.endpointParams,...U.referenceRecord};let G=0;while(G<$.length){const f=$.indexOf("{",G);if(f===-1){w.push($.slice(G));break}w.push($.slice(G,f));const Z=$.indexOf("}",f);if(Z===-1){w.push($.slice(f));break}if($[f+1]==="{"&&$[Z+1]==="}")w.push($.slice(f+1,Z)),G=Z+2;const L=$.substring(f+1,Z);if(L.includes("#")){const[X,Q]=L.split("#");w.push(W1(W[X],Q))}else w.push(W[L]);G=Z+1}return w.join("")};var V8=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var s=($,U,w)=>{if(typeof $==="string")return f1($,w);else if($.fn)return Z1($,w);else if($.ref)return V8($,w);throw new B(`'${U}': ${String($)} is not a string, function or reference.`)};var Z1=({fn:$,argv:U},w)=>{const W=U.map((f)=>["boolean","number"].includes(typeof f)?f:s(f,"arg",w)),G=$.split(".");if(G[0]in j0&&G[1]!=null)return j0[G[0]][G[1]](...W);return H8[$](...W)};var T8=({assign:$,...U},w)=>{if($&&$ in w.referenceRecord)throw new B(`'${$}' is already defined in Reference Record.`);const W=Z1(U,w);return w.logger?.debug?.(`${d} evaluateCondition: ${k(U)} = ${k(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var M0=($=[],U)=>{const w={};for(let W of $){const{result:G,toAssign:f}=T8(W,{...U,referenceRecord:{...U.referenceRecord,...w}});if(!G)return{result:G};if(f)w[f.name]=f.value,U.logger?.debug?.(`${d} assign: ${f.name} := ${k(f.value)}`)}return{result:!0,referenceRecord:w}};var C8=($,U)=>Object.entries($).reduce((w,[W,G])=>({...w,[W]:G.map((f)=>{const Z=s(f,"Header value entry",U);if(typeof Z!=="string")throw new B(`Header '${W}' value '${Z}' is not a string`);return Z})}),{});var A$=($,U)=>{if(Array.isArray($))return $.map((w)=>A$(w,U));switch(typeof $){case"string":return f1($,U);case"object":if($===null)throw new B(`Unexpected endpoint property: ${$}`);return X1($,U);case"boolean":return $;default:throw new B(`Unexpected endpoint property type: ${typeof $}`)}};var X1=($,U)=>Object.entries($).reduce((w,[W,G])=>({...w,[W]:A$(G,U)}),{});var N8=($,U)=>{const w=s($,"Endpoint URL",U);if(typeof w==="string")try{return new URL(w)}catch(W){throw console.error(`Failed to construct URL with ${w}`,W),W}throw new B(`Endpoint URL must be a string, got ${typeof w}`)};var P8=($,U)=>{const{conditions:w,endpoint:W}=$,{result:G,referenceRecord:f}=M0(w,U);if(!G)return;const Z={...U,referenceRecord:{...U.referenceRecord,...f}},{url:L,properties:X,headers:Q}=W;return U.logger?.debug?.(`${d} Resolving endpoint from template: ${k(W)}`),{...Q!=null&&{headers:C8(Q,Z)},...X!=null&&{properties:X1(X,Z)},url:N8(L,Z)}};var j8=($,U)=>{const{conditions:w,error:W}=$,{result:G,referenceRecord:f}=M0(w,U);if(!G)return;throw new B(s(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...f}}))};var S8=($,U)=>{const{conditions:w,rules:W}=$,{result:G,referenceRecord:f}=M0(w,U);if(!G)return;return L1(W,{...U,referenceRecord:{...U.referenceRecord,...f}})};var L1=($,U)=>{for(let w of $)if(w.type==="endpoint"){const W=P8(w,U);if(W)return W}else if(w.type==="error")j8(w,U);else if(w.type==="tree"){const W=S8(w,U);if(W)return W}else throw new B(`Unknown endpoint rule: ${w}`);throw new B("Rules evaluation failed")};var V9=($,U)=>{const{endpointParams:w,logger:W}=U,{parameters:G,rules:f}=$;U.logger?.debug?.(`${d} Initial EndpointParams: ${k(w)}`);const Z=Object.entries(G).filter(([,Q])=>Q.default!=null).map(([Q,z])=>[Q,z.default]);if(Z.length>0)for(let[Q,z]of Z)w[Q]=w[Q]??z;const L=Object.entries(G).filter(([,Q])=>Q.required).map(([Q])=>Q);for(let Q of L)if(w[Q]==null)throw new B(`Missing required parameter: '${Q}'`);const X=L1(f,{endpointParams:w,logger:W,referenceRecord:{}});return U.logger?.debug?.(`${d} Resolved endpoint: ${k(X)}`),X};var B$=($,U=!1)=>{if(U){for(let w of $.split("."))if(!B$(w))return!1;return!0}if(!P0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(N0($))return!1;return!0};var b8=($)=>{const U=$.split(":");if(U.length<6)return null;const[w,W,G,f,Z,...L]=U;if(w!=="arn"||W===""||G===""||L.join(":")==="")return null;const X=L.map((Q)=>Q.split("/")).flat();return{partition:W,service:G,region:f,accountId:Z,resourceId:X}};var k8={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 C9=k8,N9="",h8=($)=>{const{partitions:U}=C9;for(let W of U){const{regions:G,outputs:f}=W;for(let[Z,L]of Object.entries(G))if(Z===$)return{...f,...L}}for(let W of U){const{regionRegex:G,outputs:f}=W;if(new RegExp(G).test($))return{...f}}const w=U.find((W)=>W.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}};var D8=()=>N9;var P9={isVirtualHostableS3Bucket:B$,parseArn:b8,partition:h8};j0.aws=P9;var E$="user-agent",Q1="x-amz-user-agent",q$=" ",z1="/",x8=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,c8=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,O$="-";var j9=($)=>(U,w)=>async(W)=>{const{request:G}=W;if(!S.isInstance(G))return U(W);const{headers:f}=G,Z=w?.userAgent?.map(R$)||[],L=(await $.defaultUserAgentProvider()).map(R$),X=$?.customUserAgent?.map(R$)||[],Q=D8(),z=(Q?[Q]:[]).concat([...L,...Z,...X]).join(q$),M=[...L.filter((J)=>J.startsWith("aws-sdk-")),...X].join(q$);if($.runtime!=="browser"){if(M)f[Q1]=f[Q1]?`${f[E$]} ${M}`:M;f[E$]=z}else f[Q1]=z;return U({...W,request:G})},R$=($)=>{const U=$[0].split(z1).map((Z)=>Z.replace(x8,O$)).join(z1),w=$[1]?.replace(c8,O$),W=U.indexOf(z1),G=U.substring(0,W);let f=U.substring(W+1);if(G==="api")f=f.toLowerCase();return[G,f,w].filter((Z)=>Z&&Z.length>0).reduce((Z,L,X)=>{switch(X){case 0:return L;case 1:return`${Z}/${L}`;default:return`${Z}#${L}`}},"")},S9={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},rI=($)=>({applyToStack:(U)=>{U.add(j9($),S9)}});var M1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var H$=($)=>M1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var GJ=($)=>{const{region:U,useFipsEndpoint:w}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return H$(U);const W=await U();return H$(W)},useFipsEndpoint:async()=>{const W=typeof U==="string"?U:await U();if(M1(W))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}}};var I0=($,U,w)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${w} "${U}". Expected "true" or "false", got ${$[U]}.`)};var m;(function($){$.ENV="env",$.CONFIG="shared config entry"})(m||(m={}));var b9="AWS_USE_DUALSTACK_ENDPOINT",k9="use_dualstack_endpoint";var FJ={environmentVariableSelector:($)=>I0($,b9,m.ENV),configFileSelector:($)=>I0($,k9,m.CONFIG),default:!1};var h9="AWS_USE_FIPS_ENDPOINT",D9="use_fips_endpoint";var AJ={environmentVariableSelector:($)=>I0($,h9,m.ENV),configFileSelector:($)=>I0($,D9,m.CONFIG),default:!1};var x9=C(v(),1);var c9=C(v(),1);var _8={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},jJ={preferredFile:"credentials"};function _9($){return(U)=>async(w)=>{const W=w.request;if(S.isInstance(W)){const{body:G,headers:f}=W;if(G&&Object.keys(f).map((Z)=>Z.toLowerCase()).indexOf(v8)===-1)try{const Z=$(G);W.headers={...W.headers,[v8]:String(Z)}}catch(Z){}}return U({...w,request:W})}}var v8="content-length",v9={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},w3=($)=>({applyToStack:(U)=>{U.add(_9($.bodyLengthChecker),v9)}});var u8=($,U)=>(w)=>async(W)=>{const{response:G}=await w(W);try{const f=await U(G,$);return{response:G,output:f}}catch(f){if(Object.defineProperty(f,"$response",{value:G}),!("$metadata"in f)){if(f.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof f.$responseBodyText!=="undefined"){if(f.$response)f.$response.body=f.$responseBodyText}}throw f}};var y8=($,U)=>(w,W)=>async(G)=>{const f=W.endpointV2?.url&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!f)throw new Error("No valid endpoint provider available.");const Z=await U(G.input,{...$,endpoint:f});return w({...G,request:Z})};function L3($,U,w){return{applyToStack:(W)=>{W.add(u8($,w),u9),W.add(y8($,U),V$)}}}var u9={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},V$={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var l8=C(v(),1);var p8=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(s9(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!g9(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},y9=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,p9=/(\d+\.){3}\d+/,d9=/\.\./;var g9=($)=>y9.test($)&&!p9.test($)&&!d9.test($),s9=($)=>{const[U,w,W,,,G]=$.split(":"),f=U==="arn"&&$.split(":").length>=6,Z=Boolean(f&&w&&W&&G);if(f&&!Z)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return Z};var d8=($,U,w)=>{const W=async()=>{const G=w[$]??w[U];if(typeof G==="function")return G();return G};if($==="credentialScope"||U==="CredentialScope")return async()=>{const G=typeof w.credentials==="function"?await w.credentials():w.credentials;return G?.credentialScope??G?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const G=typeof w.credentials==="function"?await w.credentials():w.credentials;return G?.accountId??G?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const G=await W();if(G&&typeof G==="object"){if("url"in G)return G.url.href;if("hostname"in G){const{protocol:f,hostname:Z,port:L,path:X}=G;return`${f}//${Z}${L?":"+L:""}${X}`}}return G};return W};var g8="AWS_ENDPOINT_URL",s8="endpoint_url",m8=($)=>({environmentVariableSelector:(U)=>{const w=$.split(" ").map((f)=>f.toUpperCase()),W=U[[g8,...w].join("_")];if(W)return W;const G=U[g8];if(G)return G;return},configFileSelector:(U,w)=>{if(w&&U.services){const G=w[["services",U.services].join(T$)];if(G){const f=$.split(" ").map((L)=>L.toLowerCase()),Z=G[[f.join("_"),s8].join(T$)];if(Z)return Z}}const W=U[s8];if(W)return W;return},default:void 0});var I1=async($)=>i(m8($??""))();var C$=C(xw(),1),J1=($)=>{if(typeof $==="object"){if("url"in $)return C$.parseUrl($.url);return $}return C$.parseUrl($)};var n8=async($,U,w,W)=>{if(!w.endpoint){let Z;if(w.serviceConfiguredEndpoint)Z=await w.serviceConfiguredEndpoint();else Z=await I1(w.serviceId);if(Z)w.endpoint=()=>Promise.resolve(J1(Z))}const G=await m9($,U,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider(G,W)},m9=async($,U,w)=>{const W={},G=U?.getEndpointParameterInstructions?.()||{};for(let[f,Z]of Object.entries(G))switch(Z.type){case"staticContextParams":W[f]=Z.value;break;case"contextParams":W[f]=$[Z.name];break;case"clientContextParams":case"builtInParams":W[f]=await d8(Z.name,f,w)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Z))}if(Object.keys(G).length===0)Object.assign(W,w);if(String(w.serviceId).toLowerCase()==="s3")await p8(W);return W};var r8=({config:$,instructions:U})=>{return(w,W)=>async(G)=>{const f=await n8(G.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=f,W.authSchemes=f.properties?.authSchemes;const Z=W.authSchemes?.[0];if(Z){W.signing_region=Z.signingRegion,W.signing_service=Z.signingName;const X=l8.getSmithyContext(W)?.selectedHttpAuthScheme?.httpAuthOption;if(X)X.signingProperties=Object.assign(X.signingProperties||{},{signing_region:Z.signingRegion,signingRegion:Z.signingRegion,signing_service:Z.signingName,signingName:Z.signingName,signingRegionSet:Z.signingRegionSet},Z.properties)}return w({...G})}};var n9={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:V$.name},h3=($,U)=>({applyToStack:(w)=>{w.addRelativeTo(r8({config:$,instructions:U}),n9)}});var F1=C(v(),1);var _3=($)=>{const U=$.tls??!0,{endpoint:w}=$,W=w!=null?async()=>J1(await F1.normalizeProvider(w)()):void 0,f={...$,endpoint:W,tls:U,isCustomEndpoint:!!w,useDualstackEndpoint:F1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:F1.normalizeProvider($.useFipsEndpoint??!1)};let Z=void 0;return f.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!Z)Z=I1($.serviceId);return Z},f};var N$=C(v(),1),c=C(p(),1),o8="AWS_MAX_ATTEMPTS",i8="max_attempts",r3={environmentVariableSelector:($)=>{const U=$[o8];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Environment variable ${o8} mast be a number, got "${U}"`);return w},configFileSelector:($)=>{const U=$[i8];if(!U)return;const w=parseInt(U);if(Number.isNaN(w))throw new Error(`Shared config file entry ${i8} mast be a number, got "${U}"`);return w},default:c.DEFAULT_MAX_ATTEMPTS},o3=($)=>{const{retryStrategy:U}=$,w=N$.normalizeProvider($.maxAttempts??c.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:w,retryStrategy:async()=>{if(U)return U;if(await N$.normalizeProvider($.retryMode)()===c.RETRY_MODES.ADAPTIVE)return new c.AdaptiveRetryStrategy(w);return new c.StandardRetryStrategy(w)}}},l9="AWS_RETRY_MODE",r9="retry_mode",i3={environmentVariableSelector:($)=>$[l9],configFileSelector:($)=>$[r9],default:c.DEFAULT_RETRY_MODE};var J0=C(G0(),1);var Y1=C(p(),1);import{Readable as o9} from"stream";var t8=($)=>$?.body instanceof o9||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var 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 ${$}`)};var i9=($)=>(U,w)=>async(W)=>{let G=await $.retryStrategy();const f=await $.maxAttempts();if(t9(G)){G=G;let Z=await G.acquireInitialRetryToken(w.partition_id),L=new Error,X=0,Q=0;const{request:z}=W,M=S.isInstance(z);if(M)z.headers[Y1.INVOCATION_ID_HEADER]=gU();while(!0)try{if(M)z.headers[Y1.REQUEST_HEADER]=`attempt=${X+1}; max=${f}`;const{response:J,output:F}=await U(W);return G.recordSuccess(Z),F.$metadata.attempts=X+1,F.$metadata.totalRetryDelay=Q,{response:J,output:F}}catch(J){const F=a9(J);if(L=P$(J),M&&t8(z))throw(w.logger instanceof a8?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),L;try{Z=await G.refreshRetryTokenForRetry(Z,F)}catch(A){if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=X+1,L.$metadata.totalRetryDelay=Q,L}X=Z.getRetryCount();const K=Z.getRetryDelay();Q+=K,await new Promise((A)=>setTimeout(A,K))}}else{if(G=G,G?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",G.mode]];return G.retry(U,W)}},t9=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",a9=($)=>{const U={error:$,errorType:e9($)},w=U5($.$response);if(w)U.retryAfterHint=w;return U},e9=($)=>{if(J0.isThrottlingError($))return"THROTTLING";if(J0.isTransientError($))return"TRANSIENT";if(J0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},$5={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ZF=($)=>({applyToStack:(U)=>{U.add(i9($),$5)}}),U5=($)=>{if(!j$.isInstance($))return;const U=Object.keys($.headers).find((f)=>f.toLowerCase()==="retry-after");if(!U)return;const w=$.headers[U],W=Number(w);if(!Number.isNaN(W))return new Date(W*1000);return new Date(w)};var e8=C(p(),1);var W5=C(G0(),1),t=C(p(),1);var S$=C(p(),1);var w5=C(p(),1);var K1=C(G0(),1);var $G=C(p(),1);import{platform as iL,release as tL} from"os";import{env as Of,versions as aL} from"process";var m$={isCrtAvailable:!1};var qf=()=>{if(m$.isCrtAvailable)return["md/crt-avail"];return null};var eL="AWS_SDK_UA_APP_ID",$Q="sdk-ua-app-id",WY=({serviceId:$,clientVersion:U})=>{const w=[["aws-sdk-js",U],["ua","2.0"],[`os/${iL()}`,tL()],["lang/js"],["md/nodejs",`${aL.node}`]],W=qf();if(W)w.push(W);if($)w.push([`api/${$}`,U]);if(Of.AWS_EXECUTION_ENV)w.push([`exec-env/${Of.AWS_EXECUTION_ENV}`]);const G=i({environmentVariableSelector:(Z)=>Z[eL],configFileSelector:(Z)=>Z[$Q],default:void 0})();let f=void 0;return async()=>{if(!f){const Z=await G;f=Z?[...w,[`app/${Z}`]]:[...w]}return f}};var Rf=($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]";import{Buffer as n$} from"buffer";var $0=($,U=0,w=$.byteLength-U)=>{if(!Rf($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return n$.from($,U,w)},Y0=($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?n$.from($,U):n$.from($)};var P1=($)=>{const U=Y0($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var Hf=($)=>{if(typeof $==="string")return P1($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)};var YY=($)=>{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 $0($.buffer,$.byteOffset,$.byteLength).toString("utf8")};import{Buffer as UQ} from"buffer";import{createHash as wQ,createHmac as WQ} from"crypto";var Vf=function($,U){if(UQ.isBuffer($))return $;if(typeof $==="string")return Y0($,U);if(ArrayBuffer.isView($))return $0($.buffer,$.byteOffset,$.byteLength);return $0($)};class GQ{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(Hf(Vf($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?WQ(this.algorithmIdentifier,Vf(this.secret)):wQ(this.algorithmIdentifier)}}import{fstatSync as fQ,lstatSync as ZQ} from"fs";var NY=($)=>{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 ZQ($.path).size;else if(typeof $.fd==="number")return fQ($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var Tf="AWS_EXECUTION_ENV",l$="AWS_REGION",r$="AWS_DEFAULT_REGION",Cf="AWS_EC2_METADATA_DISABLED",Nf=["in-region","cross-region","mobile","standard","legacy"],Pf="/latest/meta-data/placement/region";var jf={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var vY=({region:$=i(_8),defaultsMode:U=i(jf)}={})=>Sf(async()=>{const w=typeof U==="function"?await U():U;switch(w?.toLowerCase()){case"auto":return XQ($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Nf.join(", ")}, got ${w}`)}}),XQ=async($)=>{if($){const U=typeof $==="function"?await $():$,w=await LQ();if(!w)return"standard";if(U===w)return"in-region";else return"cross-region"}return"standard"},LQ=async()=>{if(process.env[Tf]&&(process.env[l$]||process.env[r$]))return process.env[l$]??process.env[r$];if(!process.env[Cf])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-28edd25587946042.js"),w=await $();return(await U({...w,path:Pf})).toString()}catch($){}};var dY=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const w=$.region;if(typeof w==="string")return w;return w()};return{setRegion(w){U=w},region(){return U}}},gY=($)=>{return{region:$.region()}};var zQ=/^[A-Za-z0-9+/]*={0,2}$/,ZK=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!zQ.exec($))throw new TypeError("Invalid base64 string.");const U=Y0($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};var zK=($)=>{let U;if(typeof $==="string")U=P1($);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 $0(U.buffer,U.byteOffset,U.byteLength).toString("base64")};export{gU as V,Rf as W,P1 as X,Hf as Y,YY as Z,v as _,_Q as $,vQ as aa,yQ as ba,mQ as ca,VG as da,I0 as ea,m as fa,p as ga,Y$ as ha,Iz as ia,O9 as ja,j0 as ka,V9 as la,P9 as ma,rI as na,FJ as oa,AJ as pa,_8 as qa,jJ as ra,GJ as sa,w3 as ta,m9 as ua,L3 as va,h3 as wa,_3 as xa,r3 as ya,o3 as za,i3 as Aa,ZF as Ba,oL as Ca,WY as Da,GQ as Ea,NY as Fa,ZK as Ga,zK as Ha,vY as Ia,dY as Ja,gY as Ka};
17
+
18
+ //# debugId=D8D25380B8F0C36E64756e2164756e21