gemi 0.4.80 → 0.4.82

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 (45) hide show
  1. package/dist/auth/AuthenticationServiceProvider.d.ts +7 -2
  2. package/dist/auth/AuthenticationServiceProvider.d.ts.map +1 -1
  3. package/dist/chunk-111f0589f69a05b1.js +1 -0
  4. package/dist/chunk-40944e185c025271.js +2 -0
  5. package/dist/chunk-5b8fb522ae72415c.js +2 -0
  6. package/dist/chunk-8f3b5c5ff77a538d.js +5 -0
  7. package/dist/chunk-90bbf6a9e83613c5.js +2 -0
  8. package/dist/chunk-91b6ef5e24ab5b68.js +1 -0
  9. package/dist/chunk-97dc0038c2c61747.js +2 -0
  10. package/dist/chunk-aead527dfd7392c4.js +16 -0
  11. package/dist/chunk-b42d49e516e08f8f.js +6 -0
  12. package/dist/chunk-b88d77955168b486.js +9 -0
  13. package/dist/chunk-b8d464c89c783b71.js +2 -0
  14. package/dist/chunk-cfc36fa4387e9969.js +2 -0
  15. package/dist/chunk-e5d43a7ba83f74df.js +2 -0
  16. package/dist/chunk-e78e6f198869b6d2.js +2 -0
  17. package/dist/chunk-ecc1d0c7ff25f19f.js +1 -0
  18. package/dist/chunk-f44ef133dae89ec6.js +2 -0
  19. package/dist/chunk-f6546172b47b47d2.js +1 -0
  20. package/dist/client/auth/useForgotPassword.d.ts +3 -1
  21. package/dist/client/auth/useForgotPassword.d.ts.map +1 -1
  22. package/dist/client/auth/useResetPassword.d.ts +4 -1
  23. package/dist/client/auth/useResetPassword.d.ts.map +1 -1
  24. package/dist/client/index.js +13 -3
  25. package/dist/client/useQuery.d.ts.map +1 -1
  26. package/dist/kernel/index.js +1 -1
  27. package/dist/services/index.js +1 -1
  28. package/package.json +1 -1
  29. package/dist/chunk-02ba977a552fd2da.js +0 -18
  30. package/dist/chunk-1e6b656dc70ab1fd.js +0 -3
  31. package/dist/chunk-357d6f34be7eafaa.js +0 -2
  32. package/dist/chunk-5075c75a0b45f02c.js +0 -2
  33. package/dist/chunk-55c7fe17750b0378.js +0 -9
  34. package/dist/chunk-5ddf530ee3afe1d4.js +0 -2
  35. package/dist/chunk-6a97611e6bd65152.js +0 -2
  36. package/dist/chunk-813a4c185ab4c0c0.js +0 -1
  37. package/dist/chunk-81fb135d80e84b06.js +0 -2
  38. package/dist/chunk-a7246b5b3e2f2366.js +0 -2
  39. package/dist/chunk-aebf7df48200842b.js +0 -2
  40. package/dist/chunk-b3b228374e54f4ff.js +0 -6
  41. package/dist/chunk-c22e0fc22de0403a.js +0 -2
  42. package/dist/chunk-e1a9177afdc46b3b.js +0 -2
  43. package/dist/chunk-e834f558250dac89.js +0 -2
  44. package/dist/chunk-e910e2a8677bca82.js +0 -2
  45. package/dist/chunk-f47acd04bf65c5c9.js +0 -2
@@ -0,0 +1,16 @@
1
+ import{B as U0,C as Q} from"./chunk-24a86f8f5ddc0cbd.js";import{M as UE} from"./chunk-ff8cd8fd047cfee5.js";import{Fa as S,Ga as v$,Ha as FW,Ia as CX,Ka as K2,La as N1,Ma as y0,Na as E0,Oa as B2,Pa as O2,Qa as NX} from"./chunk-8f3b5c5ff77a538d.js";import{tb as sf,ub as o} from"./chunk-ecc1d0c7ff25f19f.js";import{vb as Z1,xb as N$} from"./chunk-f6546172b47b47d2.js";import{Eb as S$} from"./chunk-111f0589f69a05b1.js";import{Nb as g8} from"./chunk-91b6ef5e24ab5b68.js";var h1=Q((GU)=>{var l8=function($){return $&&$.__esModule?$:{default:$}},r8=function(){if(v0>u0.length-16)m8.default.randomFillSync(u0),v0=0;return u0.slice(v0,v0+=16)};Object.defineProperty(GU,"__esModule",{value:!0});GU.default=r8;var m8=l8(import.meta.require("crypto")),u0=new Uint8Array(256),v0=u0.length});var XU=Q((WU)=>{Object.defineProperty(WU,"__esModule",{value:!0});WU.default=void 0;var i8=/^(?:[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;WU.default=i8});var J0=Q((ZU)=>{var a8=function($){return $&&$.__esModule?$:{default:$}},e8=function($){return typeof $==="string"&&t8.default.test($)};Object.defineProperty(ZU,"__esModule",{value:!0});ZU.default=void 0;var t8=a8(XU()),$4=e8;ZU.default=$4});var A0=Q((YU)=>{var f4=function($){return $&&$.__esModule?$:{default:$}},EU=function($,U=0){return V[$[U+0]]+V[$[U+1]]+V[$[U+2]]+V[$[U+3]]+"-"+V[$[U+4]]+V[$[U+5]]+"-"+V[$[U+6]]+V[$[U+7]]+"-"+V[$[U+8]]+V[$[U+9]]+"-"+V[$[U+10]]+V[$[U+11]]+V[$[U+12]]+V[$[U+13]]+V[$[U+14]]+V[$[U+15]]},w4=function($,U=0){const f=EU($,U);if(!U4.default(f))throw TypeError("Stringified UUID is invalid");return f};Object.defineProperty(YU,"__esModule",{value:!0});YU.default=void 0;YU.unsafeStringify=EU;var U4=f4(J0()),V=[];for(let $=0;$<256;++$)V.push(($+256).toString(16).slice(1));var G4=w4;YU.default=G4});var RU=Q((zU)=>{var Z4=function($){return $&&$.__esModule?$:{default:$}},M4=function($,U,f){let w=U&&f||0;const G=U||new Array(16);$=$||{};let W=$.node||FU,L=$.clockseq!==void 0?$.clockseq:D1;if(W==null||L==null){const F=$.random||($.rng||L4.default)();if(W==null)W=FU=[F[0]|1,F[1],F[2],F[3],F[4],F[5]];if(L==null)L=D1=(F[6]<<8|F[7])&16383}let X=$.msecs!==void 0?$.msecs:Date.now(),Z=$.nsecs!==void 0?$.nsecs:x1+1;const M=X-c1+(Z-x1)/1e4;if(M<0&&$.clockseq===void 0)L=L+1&16383;if((M<0||X>c1)&&$.nsecs===void 0)Z=0;if(Z>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c1=X,x1=Z,D1=L,X+=12219292800000;const E=((X&268435455)*1e4+Z)%4294967296;G[w++]=E>>>24&255,G[w++]=E>>>16&255,G[w++]=E>>>8&255,G[w++]=E&255;const Y=X/4294967296*1e4&268435455;G[w++]=Y>>>8&255,G[w++]=Y&255,G[w++]=Y>>>24&15|16,G[w++]=Y>>>16&255,G[w++]=L>>>8|128,G[w++]=L&255;for(let F=0;F<6;++F)G[w+F]=W[F];return U||X4.unsafeStringify(G)};Object.defineProperty(zU,"__esModule",{value:!0});zU.default=void 0;var L4=Z4(h1()),X4=A0(),FU,D1,c1=0,x1=0,E4=M4;zU.default=E4});var _1=Q((JU)=>{var I4=function($){return $&&$.__esModule?$:{default:$}},F4=function($){if(!Y4.default($))throw TypeError("Invalid UUID");let U;const f=new Uint8Array(16);return f[0]=(U=parseInt($.slice(0,8),16))>>>24,f[1]=U>>>16&255,f[2]=U>>>8&255,f[3]=U&255,f[4]=(U=parseInt($.slice(9,13),16))>>>8,f[5]=U&255,f[6]=(U=parseInt($.slice(14,18),16))>>>8,f[7]=U&255,f[8]=(U=parseInt($.slice(19,23),16))>>>8,f[9]=U&255,f[10]=(U=parseInt($.slice(24,36),16))/1099511627776&255,f[11]=U/4294967296&255,f[12]=U>>>24&255,f[13]=U>>>16&255,f[14]=U>>>8&255,f[15]=U&255,f};Object.defineProperty(JU,"__esModule",{value:!0});JU.default=void 0;var Y4=I4(J0()),z4=F4;JU.default=z4});var v1=Q((OU)=>{var J4=function($){return $&&$.__esModule?$:{default:$}},A4=function($){$=unescape(encodeURIComponent($));const U=[];for(let f=0;f<$.length;++f)U.push($.charCodeAt(f));return U},K4=function($,U,f){function w(G,W,L,X){var Z;if(typeof G==="string")G=A4(G);if(typeof W==="string")W=R4.default(W);if(((Z=W)===null||Z===void 0?void 0:Z.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let M=new Uint8Array(16+G.length);if(M.set(W),M.set(G,W.length),M=f(M),M[6]=M[6]&15|U,M[8]=M[8]&63|128,L){X=X||0;for(let E=0;E<16;++E)L[X+E]=M[E];return L}return Q4.unsafeStringify(M)}try{w.name=$}catch(G){}return w.DNS=KU,w.URL=BU,w};Object.defineProperty(OU,"__esModule",{value:!0});OU.URL=OU.DNS=void 0;OU.default=K4;var Q4=A0(),R4=J4(_1()),KU="6ba7b810-9dad-11d1-80b4-00c04fd430c8";OU.DNS=KU;var BU="6ba7b811-9dad-11d1-80b4-00c04fd430c8";OU.URL=BU});var VU=Q((TU)=>{var T4=function($){return $&&$.__esModule?$:{default:$}},H4=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return q4.default.createHash("md5").update($).digest()};Object.defineProperty(TU,"__esModule",{value:!0});TU.default=void 0;var q4=T4(import.meta.require("crypto")),V4=H4;TU.default=V4});var SU=Q((NU)=>{var CU=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(NU,"__esModule",{value:!0});NU.default=void 0;var C4=CU(v1()),N4=CU(VU()),P4=C4.default("v3",48,N4.default),S4=P4;NU.default=S4});var kU=Q((jU)=>{var b4=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(jU,"__esModule",{value:!0});jU.default=void 0;var j4=b4(import.meta.require("crypto")),k4={randomUUID:j4.default.randomUUID};jU.default=k4});var _U=Q((cU)=>{var DU=function($){return $&&$.__esModule?$:{default:$}},c4=function($,U,f){if(hU.default.randomUUID&&!U&&!$)return hU.default.randomUUID();$=$||{};const w=$.random||($.rng||h4.default)();if(w[6]=w[6]&15|64,w[8]=w[8]&63|128,U){f=f||0;for(let G=0;G<16;++G)U[f+G]=w[G];return U}return D4.unsafeStringify(w)};Object.defineProperty(cU,"__esModule",{value:!0});cU.default=void 0;var hU=DU(kU()),h4=DU(h1()),D4=A0(),x4=c4;cU.default=x4});var yU=Q((vU)=>{var v4=function($){return $&&$.__esModule?$:{default:$}},u4=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return _4.default.createHash("sha1").update($).digest()};Object.defineProperty(vU,"__esModule",{value:!0});vU.default=void 0;var _4=v4(import.meta.require("crypto")),y4=u4;vU.default=y4});var sU=Q((dU)=>{var pU=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(dU,"__esModule",{value:!0});dU.default=void 0;var p4=pU(v1()),d4=pU(yU()),g4=p4.default("v5",80,d4.default),s4=g4;dU.default=s4});var lU=Q((nU)=>{Object.defineProperty(nU,"__esModule",{value:!0});nU.default=void 0;var n4="00000000-0000-0000-0000-000000000000";nU.default=n4});var iU=Q((rU)=>{var l4=function($){return $&&$.__esModule?$:{default:$}},r4=function($){if(!m4.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(rU,"__esModule",{value:!0});rU.default=void 0;var m4=l4(J0()),o4=r4;rU.default=o4});var u1=Q((k)=>{var v=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(k,"__esModule",{value:!0});Object.defineProperty(k,"NIL",{enumerable:!0,get:function(){return $6.default}});Object.defineProperty(k,"parse",{enumerable:!0,get:function(){return G6.default}});Object.defineProperty(k,"stringify",{enumerable:!0,get:function(){return w6.default}});Object.defineProperty(k,"v1",{enumerable:!0,get:function(){return i4.default}});Object.defineProperty(k,"v3",{enumerable:!0,get:function(){return t4.default}});Object.defineProperty(k,"v4",{enumerable:!0,get:function(){return a4.default}});Object.defineProperty(k,"v5",{enumerable:!0,get:function(){return e4.default}});Object.defineProperty(k,"validate",{enumerable:!0,get:function(){return f6.default}});Object.defineProperty(k,"version",{enumerable:!0,get:function(){return U6.default}});var i4=v(RU()),t4=v(SU()),a4=v(_U()),e4=v(sU()),$6=v(lU()),U6=v(iU()),f6=v(J0()),w6=v(A0()),G6=v(_1())});var K0=Q(($Y,ff)=>{var{defineProperty:p0,getOwnPropertyDescriptor:F6,getOwnPropertyNames:z6}=Object,Q6=Object.prototype.hasOwnProperty,$f=($,U)=>p0($,"name",{value:U,configurable:!0}),R6=($,U)=>{for(var f in U)p0($,f,{get:U[f],enumerable:!0})},J6=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of z6(U))if(!Q6.call($,G)&&G!==f)p0($,G,{get:()=>U[G],enumerable:!(w=F6(U,G))||w.enumerable})}return $},A6=($)=>J6(p0({},"__esModule",{value:!0}),$),Uf={};R6(Uf,{getSmithyContext:()=>K6,normalizeProvider:()=>B6});ff.exports=A6(Uf);var eU=y0(),K6=$f(($)=>$[eU.SMITHY_CONTEXT_KEY]||($[eU.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),B6=$f(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var y1=Q((UY,Xf)=>{var{defineProperty:d0,getOwnPropertyDescriptor:O6,getOwnPropertyNames:q6}=Object,T6=Object.prototype.hasOwnProperty,m=($,U)=>d0($,"name",{value:U,configurable:!0}),H6=($,U)=>{for(var f in U)d0($,f,{get:U[f],enumerable:!0})},V6=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of q6(U))if(!T6.call($,G)&&G!==f)d0($,G,{get:()=>U[G],enumerable:!(w=O6(U,G))||w.enumerable})}return $},C6=($)=>V6(d0({},"__esModule",{value:!0}),$),wf={};H6(wf,{CredentialsProviderError:()=>N6,ProviderError:()=>g0,TokenProviderError:()=>P6,chain:()=>S6,fromStatic:()=>j6,memoize:()=>b6});Xf.exports=C6(wf);var Gf=class $ extends Error{constructor(U,f=!0){var w;let G,W=!0;if(typeof f==="boolean")G=void 0,W=f;else if(f!=null&&typeof f==="object")G=f.logger,W=f.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=W,Object.setPrototypeOf(this,$.prototype),(w=G==null?void 0:G.debug)==null||w.call(G,`@smithy/property-provider ${W?"->":"(!)"} ${U}`)}static from(U,f=!0){return Object.assign(new this(U.message,f),U)}};m(Gf,"ProviderError");var g0=Gf,Wf=class $ extends g0{constructor(U,f=!0){super(U,f);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};m(Wf,"CredentialsProviderError");var N6=Wf,Lf=class $ extends g0{constructor(U,f=!0){super(U,f);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};m(Lf,"TokenProviderError");var P6=Lf,S6=m((...$)=>async()=>{if($.length===0)throw new g0("No providers in chain");let U;for(let f of $)try{return await f()}catch(w){if(U=w,w==null?void 0:w.tryNextLink)continue;throw w}throw U},"chain"),j6=m(($)=>()=>Promise.resolve($),"fromStatic"),b6=m(($,U,f)=>{let w,G,W,L=!1;const X=m(async()=>{if(!G)G=$();try{w=await G,W=!0,L=!1}finally{G=void 0}return w},"coalesceProvider");if(U===void 0)return async(Z)=>{if(!W||(Z==null?void 0:Z.forceRefresh))w=await X();return w};return async(Z)=>{if(!W||(Z==null?void 0:Z.forceRefresh))w=await X();if(L)return w;if(f&&!f(w))return L=!0,w;if(U(w))return await X(),w;return w}},"memoize")});var f0=Q((Zf)=>{Object.defineProperty(Zf,"__esModule",{value:!0});Zf.getHomeDir=void 0;var k6=import.meta.require("os"),h6=import.meta.require("path"),p1={},D6=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},c6=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:f,HOMEDRIVE:w=`C:${h6.sep}`}=process.env;if($)return $;if(U)return U;if(f)return`${w}${f}`;const G=D6();if(!p1[G])p1[G]=k6.homedir();return p1[G]};Zf.getHomeDir=c6});var d1=Q((Ef)=>{Object.defineProperty(Ef,"__esModule",{value:!0});Ef.getSSOTokenFilepath=void 0;var x6=import.meta.require("crypto"),_6=import.meta.require("path"),v6=f0(),u6=($)=>{const f=x6.createHash("sha1").update($).digest("hex");return _6.join(v6.getHomeDir(),".aws","sso","cache",`${f}.json`)};Ef.getSSOTokenFilepath=u6});var zf=Q((If)=>{Object.defineProperty(If,"__esModule",{value:!0});If.getSSOTokenFromFile=void 0;var y6=import.meta.require("fs"),p6=d1(),{readFile:d6}=y6.promises,g6=async($)=>{const U=p6.getSSOTokenFilepath($),f=await d6(U,"utf8");return JSON.parse(f)};If.getSSOTokenFromFile=g6});var s1=Q((Qf)=>{Object.defineProperty(Qf,"__esModule",{value:!0});Qf.slurpFile=void 0;var s6=import.meta.require("fs"),{readFile:n6}=s6.promises,g1={},m6=($,U)=>{if(!g1[$]||(U===null||U===void 0?void 0:U.ignoreCache))g1[$]=n6($,"utf8");return g1[$]};Qf.slurpFile=m6});var r1=Q((LY,O0)=>{var{defineProperty:m0,getOwnPropertyDescriptor:l6,getOwnPropertyNames:r6}=Object,o6=Object.prototype.hasOwnProperty,j=($,U)=>m0($,"name",{value:U,configurable:!0}),i6=($,U)=>{for(var f in U)m0($,f,{get:U[f],enumerable:!0})},n1=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of r6(U))if(!o6.call($,G)&&G!==f)m0($,G,{get:()=>U[G],enumerable:!(w=l6(U,G))||w.enumerable})}return $},l1=($,U,f)=>(n1($,U,"default"),f&&n1(f,U,"default")),t6=($)=>n1(m0({},"__esModule",{value:!0}),$),B0={};i6(B0,{CONFIG_PREFIX_SEPARATOR:()=>l,DEFAULT_PROFILE:()=>Bf,ENV_PROFILE:()=>Kf,getProfileName:()=>a6,loadSharedConfigFiles:()=>qf,loadSsoSessionData:()=>YL,parseKnownFiles:()=>FL});O0.exports=t6(B0);l1(B0,f0(),O0.exports);var Kf="AWS_PROFILE",Bf="default",a6=j(($)=>$.profile||process.env[Kf]||Bf,"getProfileName");l1(B0,d1(),O0.exports);l1(B0,zf(),O0.exports);var s0=y0(),e6=j(($)=>Object.entries($).filter(([U])=>{const f=U.indexOf(l);if(f===-1)return!1;return Object.values(s0.IniSectionType).includes(U.substring(0,f))}).reduce((U,[f,w])=>{const G=f.indexOf(l),W=f.substring(0,G)===s0.IniSectionType.PROFILE?f.substring(G+1):f;return U[W]=w,U},{...$.default&&{default:$.default}}),"getConfigData"),n0=import.meta.require("path"),$L=f0(),UL="AWS_CONFIG_FILE",Of=j(()=>process.env[UL]||n0.join($L.getHomeDir(),".aws","config"),"getConfigFilepath"),fL=f0(),wL="AWS_SHARED_CREDENTIALS_FILE",GL=j(()=>process.env[wL]||n0.join(fL.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),WL=f0(),LL=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,XL=["__proto__","profile __proto__"],m1=j(($)=>{const U={};let f,w;for(let G of $.split(/\r?\n/)){const W=G.split(/(^|\s)[;#]/)[0].trim();if(W[0]==="["&&W[W.length-1]==="]"){f=void 0,w=void 0;const X=W.substring(1,W.length-1),Z=LL.exec(X);if(Z){const[,M,,E]=Z;if(Object.values(s0.IniSectionType).includes(M))f=[M,E].join(l)}else f=X;if(XL.includes(X))throw new Error(`Found invalid profile name "${X}"`)}else if(f){const X=W.indexOf("=");if(![0,-1].includes(X)){const[Z,M]=[W.substring(0,X).trim(),W.substring(X+1).trim()];if(M==="")w=Z;else{if(w&&G.trimStart()===G)w=void 0;U[f]=U[f]||{};const E=w?[w,Z].join(l):Z;U[f][E]=M}}}}return U},"parseIni"),Jf=s1(),Af=j(()=>({}),"swallowError"),l=".",qf=j(async($={})=>{const{filepath:U=GL(),configFilepath:f=Of()}=$,w=WL.getHomeDir();let W=U;if(U.startsWith("~/"))W=n0.join(w,U.slice(2));let L=f;if(f.startsWith("~/"))L=n0.join(w,f.slice(2));const X=await Promise.all([Jf.slurpFile(L,{ignoreCache:$.ignoreCache}).then(m1).then(e6).catch(Af),Jf.slurpFile(W,{ignoreCache:$.ignoreCache}).then(m1).catch(Af)]);return{configFile:X[0],credentialsFile:X[1]}},"loadSharedConfigFiles"),ZL=j(($)=>Object.entries($).filter(([U])=>U.startsWith(s0.IniSectionType.SSO_SESSION+l)).reduce((U,[f,w])=>({...U,[f.substring(f.indexOf(l)+1)]:w}),{}),"getSsoSessionData"),ML=s1(),EL=j(()=>({}),"swallowError"),YL=j(async($={})=>ML.slurpFile($.configFilepath??Of()).then(m1).then(ZL).catch(EL),"loadSsoSessionData"),IL=j((...$)=>{const U={};for(let f of $)for(let[w,G]of Object.entries(f))if(U[w]!==void 0)Object.assign(U[w],G);else U[w]=G;return U},"mergeConfigFiles"),FL=j(async($)=>{const U=await qf($);return IL(U.configFile,U.credentialsFile)},"parseKnownFiles")});var Cf=Q((XY,Vf)=>{var o1=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 $}},l0=Object.defineProperty,zL=Object.getOwnPropertyDescriptor,QL=Object.getOwnPropertyNames,RL=Object.prototype.hasOwnProperty,w0=($,U)=>l0($,"name",{value:U,configurable:!0}),JL=($,U)=>{for(var f in U)l0($,f,{get:U[f],enumerable:!0})},AL=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of QL(U))if(!RL.call($,G)&&G!==f)l0($,G,{get:()=>U[G],enumerable:!(w=zL(U,G))||w.enumerable})}return $},KL=($)=>AL(l0({},"__esModule",{value:!0}),$),Hf={};JL(Hf,{loadConfig:()=>HL});Vf.exports=KL(Hf);var q0=y1();w0(o1,"getSelectorName");var BL=w0(($,U)=>async()=>{try{const f=$(process.env);if(f===void 0)throw new Error;return f}catch(f){throw new q0.CredentialsProviderError(f.message||`Not found in ENV: ${o1($.toString())}`,{logger:U})}},"fromEnv"),Tf=r1(),OL=w0(($,{preferredFile:U="config",...f}={})=>async()=>{const w=Tf.getProfileName(f),{configFile:G,credentialsFile:W}=await Tf.loadSharedConfigFiles(f),L=W[w]||{},X=G[w]||{},Z=U==="config"?{...L,...X}:{...X,...L};try{const E=$(Z,U==="config"?G:W);if(E===void 0)throw new Error;return E}catch(M){throw new q0.CredentialsProviderError(M.message||`Not found in config files w/ profile [${w}]: ${o1($.toString())}`,{logger:f.logger})}},"fromSharedConfigFiles"),qL=w0(($)=>typeof $==="function","isFunction"),TL=w0(($)=>qL($)?async()=>await $():q0.fromStatic($),"fromStatic"),HL=w0(({environmentVariableSelector:$,configFileSelector:U,default:f},w={})=>q0.memoize(q0.chain(BL($),OL(U,w),TL(f))),"loadConfig")});var kf=Q((jf)=>{Object.defineProperty(jf,"__esModule",{value:!0});jf.getEndpointUrlConfig=void 0;var Nf=r1(),Pf="AWS_ENDPOINT_URL",Sf="endpoint_url",VL=($)=>({environmentVariableSelector:(U)=>{const f=$.split(" ").map((W)=>W.toUpperCase()),w=U[[Pf,...f].join("_")];if(w)return w;const G=U[Pf];if(G)return G;return},configFileSelector:(U,f)=>{if(f&&U.services){const G=f[["services",U.services].join(Nf.CONFIG_PREFIX_SEPARATOR)];if(G){const W=$.split(" ").map((X)=>X.toLowerCase()),L=G[[W.join("_"),Sf].join(Nf.CONFIG_PREFIX_SEPARATOR)];if(L)return L}}const w=U[Sf];if(w)return w;return},default:void 0});jf.getEndpointUrlConfig=VL});var cf=Q((hf)=>{Object.defineProperty(hf,"__esModule",{value:!0});hf.getEndpointFromConfig=void 0;var CL=Cf(),NL=kf(),PL=async($)=>CL.loadConfig(NL.getEndpointUrlConfig($))();hf.getEndpointFromConfig=PL});var t1=Q((EY,df)=>{var pf=function($,U,f){return{applyToStack:(w)=>{w.add(_f($,f),uf),w.add(vf($,U),yf)}}},r0=Object.defineProperty,SL=Object.getOwnPropertyDescriptor,jL=Object.getOwnPropertyNames,bL=Object.prototype.hasOwnProperty,i1=($,U)=>r0($,"name",{value:U,configurable:!0}),kL=($,U)=>{for(var f in U)r0($,f,{get:U[f],enumerable:!0})},hL=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of jL(U))if(!bL.call($,G)&&G!==f)r0($,G,{get:()=>U[G],enumerable:!(w=SL(U,G))||w.enumerable})}return $},DL=($)=>hL(r0({},"__esModule",{value:!0}),$),xf={};kL(xf,{deserializerMiddleware:()=>_f,deserializerMiddlewareOption:()=>uf,getSerdePlugin:()=>pf,serializerMiddleware:()=>vf,serializerMiddlewareOption:()=>yf});df.exports=DL(xf);var _f=i1(($,U)=>(f)=>async(w)=>{const{response:G}=await f(w);try{const W=await U(G,$);return{response:G,output:W}}catch(W){if(Object.defineProperty(W,"$response",{value:G}),!("$metadata"in W)){if(W.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof W.$responseBodyText!=="undefined"){if(W.$response)W.$response.body=W.$responseBodyText}}throw W}},"deserializerMiddleware"),vf=i1(($,U)=>(f,w)=>async(G)=>{var W;const L=((W=w.endpointV2)==null?void 0:W.url)&&$.urlParser?async()=>$.urlParser(w.endpointV2.url):$.endpoint;if(!L)throw new Error("No valid endpoint provider available.");const X=await U(G.input,{...$,endpoint:L});return f({...G,request:X})},"serializerMiddleware"),uf={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},yf={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};i1(pf,"getSerdePlugin")});var af=Q((YY,tf)=>{var{defineProperty:i0,getOwnPropertyDescriptor:cL,getOwnPropertyNames:xL}=Object,_L=Object.prototype.hasOwnProperty,h=($,U)=>i0($,"name",{value:U,configurable:!0}),vL=($,U)=>{for(var f in U)i0($,f,{get:U[f],enumerable:!0})},uL=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of xL(U))if(!_L.call($,G)&&G!==f)i0($,G,{get:()=>U[G],enumerable:!(w=cL(U,G))||w.enumerable})}return $},yL=($)=>uL(i0({},"__esModule",{value:!0}),$),nf={};vL(nf,{endpointMiddleware:()=>rf,endpointMiddlewareOptions:()=>of,getEndpointFromInstructions:()=>mf,getEndpointPlugin:()=>iL,resolveEndpointConfig:()=>tL,resolveParams:()=>lf,toEndpointV1:()=>a1});tf.exports=yL(nf);var pL=h(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(mL(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!nL(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),dL=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,gL=/(\d+\.){3}\d+/,sL=/\.\./,nL=h(($)=>dL.test($)&&!gL.test($)&&!sL.test($),"isDnsCompatibleBucketName"),mL=h(($)=>{const[U,f,w,,,G]=$.split(":"),W=U==="arn"&&$.split(":").length>=6,L=Boolean(W&&f&&w&&G);if(W&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L},"isArnBucketName"),lL=h(($,U,f)=>{const w=h(async()=>{const G=f[$]??f[U];if(typeof G==="function")return G();return G},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const G=typeof f.credentials==="function"?await f.credentials():f.credentials;return(G==null?void 0:G.credentialScope)??(G==null?void 0:G.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const G=typeof f.credentials==="function"?await f.credentials():f.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:W,hostname:L,port:X,path:Z}=G;return`${W}//${L}${X?":"+X:""}${Z}`}}return G};return w},"createConfigValueProvider"),rL=cf(),gf=sf(),a1=h(($)=>{if(typeof $==="object"){if("url"in $)return gf.parseUrl($.url);return $}return gf.parseUrl($)},"toEndpointV1"),mf=h(async($,U,f,w)=>{if(!f.endpoint){const L=await rL.getEndpointFromConfig(f.serviceId||"");if(L)f.endpoint=()=>Promise.resolve(a1(L))}const G=await lf($,U,f);if(typeof f.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return f.endpointProvider(G,w)},"getEndpointFromInstructions"),lf=h(async($,U,f)=>{var w;const G={},W=((w=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:w.call(U))||{};for(let[L,X]of Object.entries(W))switch(X.type){case"staticContextParams":G[L]=X.value;break;case"contextParams":G[L]=$[X.name];break;case"clientContextParams":case"builtInParams":G[L]=await lL(X.name,L,f)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(X))}if(Object.keys(W).length===0)Object.assign(G,f);if(String(f.serviceId).toLowerCase()==="s3")await pL(G);return G},"resolveParams"),o0=K0(),rf=h(({config:$,instructions:U})=>{return(f,w)=>async(G)=>{var W,L,X;const Z=await mf(G.input,{getEndpointParameterInstructions(){return U}},{...$},w);w.endpointV2=Z,w.authSchemes=(W=Z.properties)==null?void 0:W.authSchemes;const M=(L=w.authSchemes)==null?void 0:L[0];if(M){w.signing_region=M.signingRegion,w.signing_service=M.signingName;const E=o0.getSmithyContext(w),Y=(X=E==null?void 0:E.selectedHttpAuthScheme)==null?void 0:X.httpAuthOption;if(Y)Y.signingProperties=Object.assign(Y.signingProperties||{},{signing_region:M.signingRegion,signingRegion:M.signingRegion,signing_service:M.signingName,signingName:M.signingName,signingRegionSet:M.signingRegionSet},M.properties)}return f({...G})}},"endpointMiddleware"),oL=t1(),of={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:oL.serializerMiddlewareOption.name},iL=h(($,U)=>({applyToStack:(f)=>{f.addRelativeTo(rf({config:$,instructions:U}),of)}}),"getEndpointPlugin"),tL=h(($)=>{const U=$.tls??!0,{endpoint:f}=$,w=f!=null?async()=>a1(await o0.normalizeProvider(f)()):void 0;return{...$,endpoint:w,tls:U,isCustomEndpoint:!!f,useDualstackEndpoint:o0.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:o0.normalizeProvider($.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var r=Q((IY,fw)=>{var{defineProperty:t0,getOwnPropertyDescriptor:aL,getOwnPropertyNames:eL}=Object,$X=Object.prototype.hasOwnProperty,G0=($,U)=>t0($,"name",{value:U,configurable:!0}),UX=($,U)=>{for(var f in U)t0($,f,{get:U[f],enumerable:!0})},fX=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of eL(U))if(!$X.call($,G)&&G!==f)t0($,G,{get:()=>U[G],enumerable:!(w=aL(U,G))||w.enumerable})}return $},wX=($)=>fX(t0({},"__esModule",{value:!0}),$),ef={};UX(ef,{isClockSkewCorrectedError:()=>$w,isClockSkewError:()=>EX,isRetryableByTrait:()=>MX,isServerError:()=>IX,isThrottlingError:()=>YX,isTransientError:()=>Uw});fw.exports=wX(ef);var GX=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],WX=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],LX=["TimeoutError","RequestTimeout","RequestTimeoutException"],XX=[500,502,503,504],ZX=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],MX=G0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),EX=G0(($)=>GX.includes($.name),"isClockSkewError"),$w=G0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),YX=G0(($)=>{var U,f;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||WX.includes($.name)||((f=$.$retryable)==null?void 0:f.throttling)==!0},"isThrottlingError"),Uw=G0(($)=>{var U;return $w($)||LX.includes($.name)||ZX.includes(($==null?void 0:$.code)||"")||XX.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),IX=G0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const f=$.$metadata.httpStatusCode;if(500<=f&&f<=599&&!Uw($))return!0;return!1}return!1},"isServerError")});var Rw=Q((FY,Qw)=>{var{defineProperty:a0,getOwnPropertyDescriptor:FX,getOwnPropertyNames:zX}=Object,QX=Object.prototype.hasOwnProperty,D=($,U)=>a0($,"name",{value:U,configurable:!0}),RX=($,U)=>{for(var f in U)a0($,f,{get:U[f],enumerable:!0})},JX=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of zX(U))if(!QX.call($,G)&&G!==f)a0($,G,{get:()=>U[G],enumerable:!(w=FX(U,G))||w.enumerable})}return $},AX=($)=>JX(a0({},"__esModule",{value:!0}),$),Gw={};RX(Gw,{AdaptiveRetryStrategy:()=>HX,ConfiguredRetryStrategy:()=>VX,DEFAULT_MAX_ATTEMPTS:()=>e1,DEFAULT_RETRY_DELAY_BASE:()=>T0,DEFAULT_RETRY_MODE:()=>KX,DefaultRateLimiter:()=>Xw,INITIAL_RETRY_TOKENS:()=>$$,INVOCATION_ID_HEADER:()=>OX,MAXIMUM_RETRY_DELAY:()=>U$,NO_RETRY_INCREMENT:()=>Yw,REQUEST_HEADER:()=>qX,RETRY_COST:()=>Mw,RETRY_MODES:()=>Ww,StandardRetryStrategy:()=>f$,THROTTLING_RETRY_DELAY_BASE:()=>Zw,TIMEOUT_RETRY_COST:()=>Ew});Qw.exports=AX(Gw);var Ww=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(Ww||{}),e1=3,KX="standard",BX=r(),Lw=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 f=this.getCurrentTimeInSeconds();this.lastThrottleTime=f,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 f=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,f))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){const U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}const f=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+f),this.lastTimestamp=U}updateClientSendingRate(U){let f;if(this.updateMeasuredRate(),BX.isThrottlingError(U)){const G=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=G,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),f=this.cubicThrottle(G),this.enableTokenBucket()}else this.calculateTimeWindow(),f=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(f,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(),f=Math.floor(U*2)/2;if(this.requestCount++,f>this.lastTxRateBucket){const w=this.requestCount/(f-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=f}}getPrecise(U){return parseFloat(U.toFixed(8))}};D(Lw,"DefaultRateLimiter");var Xw=Lw,T0=100,U$=20000,Zw=500,$$=500,Mw=5,Ew=10,Yw=1,OX="amz-sdk-invocation-id",qX="amz-sdk-request",TX=D(()=>{let $=T0;return{computeNextBackoffDelay:D((w)=>{return Math.floor(Math.min(U$,Math.random()*2**w*$))},"computeNextBackoffDelay"),setDelayBase:D((w)=>{$=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),ww=D(({retryDelay:$,retryCount:U,retryCost:f})=>{return{getRetryCount:D(()=>U,"getRetryCount"),getRetryDelay:D(()=>Math.min(U$,$),"getRetryDelay"),getRetryCost:D(()=>f,"getRetryCost")}},"createDefaultRetryToken"),Iw=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=$$,this.retryBackoffStrategy=TX(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return ww({retryDelay:T0,retryCount:0})}async refreshRetryTokenForRetry(U,f){const w=await this.getMaxAttempts();if(this.shouldRetry(U,f,w)){const G=f.errorType;this.retryBackoffStrategy.setDelayBase(G==="THROTTLING"?Zw:T0);const W=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),L=f.retryAfterHint?Math.max(f.retryAfterHint.getTime()-Date.now()||0,W):W,X=this.getCapacityCost(G);return this.capacity-=X,ww({retryDelay:L,retryCount:U.getRetryCount()+1,retryCost:X})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max($$,this.capacity+(U.getRetryCost()??Yw))}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 ${e1}`),e1}}shouldRetry(U,f,w){return U.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(f.errorType)&&this.isRetryableError(f.errorType)}getCapacityCost(U){return U==="TRANSIENT"?Ew:Mw}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};D(Iw,"StandardRetryStrategy");var f$=Iw,Fw=class ${constructor(U,f){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:w}=f??{};this.rateLimiter=w??new Xw,this.standardRetryStrategy=new f$(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,f){return this.rateLimiter.updateClientSendingRate(f),this.standardRetryStrategy.refreshRetryTokenForRetry(U,f)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};D(Fw,"AdaptiveRetryStrategy");var HX=Fw,zw=class $ extends f${constructor(U,f=T0){super(typeof U==="function"?U:async()=>U);if(typeof f==="number")this.computeNextBackoffDelay=()=>f;else this.computeNextBackoffDelay=f}async refreshRetryTokenForRetry(U,f){const w=await super.refreshRetryTokenForRetry(U,f);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}};D(zw,"ConfiguredRetryStrategy");var VX=zw});var Z0=Q((zY,uw)=>{var jw=function($){const U=$.getUTCFullYear(),f=$.getUTCMonth(),w=$.getUTCDay(),G=$.getUTCDate(),W=$.getUTCHours(),L=$.getUTCMinutes(),X=$.getUTCSeconds(),Z=G<10?`0${G}`:`${G}`,M=W<10?`0${W}`:`${W}`,E=L<10?`0${L}`:`${L}`,Y=X<10?`0${X}`:`${X}`;return`${UZ[w]}, ${Z} ${F$[f]} ${U} ${M}:${E}:${Y} GMT`},U1=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})},z$=function($,U,f){let w,G,W;if(typeof U==="undefined"&&typeof f==="undefined")w={},W=$;else if(w=$,typeof U==="function")return G=U,W=f,DZ(w,G,W);else W=U;for(let L of Object.keys(W)){if(!Array.isArray(W[L])){w[L]=W[L];continue}_w(w,null,W,L)}return w},vw=function($,U,f){if(f<=0||!Number.isInteger(f))throw new Error("Invalid number of delimiters ("+f+") for splitEvery.");const w=$.split(U);if(f===1)return w;const G=[];let W="";for(let L=0;L<w.length;L++){if(W==="")W=w[L];else W+=U+w[L];if((L+1)%f===0)G.push(W),W=""}if(W!=="")G.push(W);return G},f1=Object.defineProperty,PX=Object.getOwnPropertyDescriptor,SX=Object.getOwnPropertyNames,jX=Object.prototype.hasOwnProperty,I=($,U)=>f1($,"name",{value:U,configurable:!0}),bX=($,U)=>{for(var f in U)f1($,f,{get:U[f],enumerable:!0})},kX=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of SX(U))if(!jX.call($,G)&&G!==f)f1($,G,{get:()=>U[G],enumerable:!(w=PX(U,G))||w.enumerable})}return $},hX=($)=>kX(f1({},"__esModule",{value:!0}),$),Aw={};bX(Aw,{Client:()=>cX,Command:()=>Tw,LazyJsonString:()=>bZ,NoOpLogger:()=>DX,SENSITIVE_STRING:()=>vX,ServiceException:()=>KZ,StringWrapper:()=>P0,_json:()=>M$,collectBody:()=>xX,convertMap:()=>kZ,createAggregatedClient:()=>uX,dateToUtcString:()=>jw,decorateServiceException:()=>kw,emitWarningIfUnsupportedVersion:()=>TZ,expectBoolean:()=>pX,expectByte:()=>Z$,expectFloat32:()=>e0,expectInt:()=>gX,expectInt32:()=>L$,expectLong:()=>C0,expectNonNull:()=>nX,expectNumber:()=>V0,expectObject:()=>Vw,expectShort:()=>X$,expectString:()=>mX,expectUnion:()=>lX,extendedEncodeURIComponent:()=>U1,getArrayIfSingleItem:()=>jZ,getDefaultClientConfiguration:()=>PZ,getDefaultExtensionConfiguration:()=>Dw,getValueFromTextNode:()=>cw,handleFloat:()=>iX,limitedParseDouble:()=>I$,limitedParseFloat:()=>tX,limitedParseFloat32:()=>aX,loadConfigsForDefaultMode:()=>qZ,logger:()=>N0,map:()=>z$,parseBoolean:()=>yX,parseEpochTimestamp:()=>EZ,parseRfc3339DateTime:()=>wZ,parseRfc3339DateTimeWithOffset:()=>WZ,parseRfc7231DateTime:()=>MZ,resolveDefaultRuntimeConfig:()=>SZ,resolvedPath:()=>_Z,serializeDateTime:()=>uZ,serializeFloat:()=>vZ,splitEvery:()=>vw,strictParseByte:()=>Sw,strictParseDouble:()=>Y$,strictParseFloat:()=>rX,strictParseFloat32:()=>Cw,strictParseInt:()=>eX,strictParseInt32:()=>$Z,strictParseLong:()=>Pw,strictParseShort:()=>W0,take:()=>hZ,throwDefaultError:()=>hw,withBaseException:()=>BZ});uw.exports=hX(Aw);var Kw=class ${trace(){}debug(){}info(){}warn(){}error(){}};I(Kw,"NoOpLogger");var DX=Kw,Bw=CX(),Ow=class ${constructor(U){this.middlewareStack=Bw.constructStack(),this.config=U}send(U,f,w){const G=typeof f!=="function"?f:void 0,W=typeof f==="function"?f:w,L=U.resolveMiddleware(this.middlewareStack,this.config,G);if(W)L(U).then((X)=>W(null,X.output),(X)=>W(X)).catch(()=>{});else return L(U).then((X)=>X.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};I(Ow,"Client");var cX=Ow,w$=NX(),xX=I(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return w$.Uint8ArrayBlobAdapter.mutate($);if(!$)return w$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const f=U.streamCollector($);return w$.Uint8ArrayBlobAdapter.mutate(await f)},"collectBody"),W$=y0(),qw=class ${constructor(){this.middlewareStack=Bw.constructStack()}static classBuilder(){return new _X}resolveMiddlewareWithContext(U,f,w,{middlewareFn:G,clientName:W,commandName:L,inputFilterSensitiveLog:X,outputFilterSensitiveLog:Z,smithyContext:M,additionalContext:E,CommandCtor:Y}){for(let q of G.bind(this)(Y,U,f,w))this.middlewareStack.use(q);const F=U.concat(this.middlewareStack),{logger:z}=f,R={logger:z,clientName:W,commandName:L,inputFilterSensitiveLog:X,outputFilterSensitiveLog:Z,[W$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...M},...E},{requestHandler:J}=f;return F.resolve((q)=>J.handle(q.request,w||{}),R)}};I(qw,"Command");var Tw=qw,Hw=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,f,w={}){return this._smithyContext={service:U,operation:f,...w},this}c(U={}){return this._additionalContext=U,this}n(U,f){return this._clientName=U,this._commandName=f,this}f(U=(w)=>w,f=(w)=>w){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=f,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;const f=this;let w;return w=(U=class extends Tw{constructor(...[G]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=G??{},f._init(this)}static getEndpointParameterInstructions(){return f._ep}resolveMiddleware(G,W,L){return this.resolveMiddlewareWithContext(G,W,L,{CommandCtor:w,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}},I(U,"CommandRef"),U)}};I(Hw,"ClassBuilder");var _X=Hw,vX="***SensitiveInformation***",uX=I(($,U)=>{for(let f of Object.keys($)){const w=$[f],G=I(async function(L,X,Z){const M=new w(L);if(typeof X==="function")this.send(M,X);else if(typeof Z==="function"){if(typeof X!=="object")throw new Error(`Expected http options but got ${typeof X}`);this.send(M,X||{},Z)}else return this.send(M,X)},"methodImpl"),W=(f[0].toLowerCase()+f.slice(1)).replace(/Command$/,"");U.prototype[W]=G}},"createAggregatedClient"),yX=I(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),pX=I(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)N0.warn($1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")N0.warn($1(`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"),V0=I(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))N0.warn($1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),dX=Math.ceil(340282346638528860000000000000000000000),e0=I(($)=>{const U=V0($);if(U!==void 0&&!Number.isNaN(U)&&U!==Infinity&&U!==(-Infinity)){if(Math.abs(U)>dX)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),C0=I(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),gX=C0,L$=I(($)=>E$($,32),"expectInt32"),X$=I(($)=>E$($,16),"expectShort"),Z$=I(($)=>E$($,8),"expectByte"),E$=I(($,U)=>{const f=C0($);if(f!==void 0&&sX(f,U)!==f)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return f},"expectSizedInt"),sX=I(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),nX=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"),Vw=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"),mX=I(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return N0.warn($1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),lX=I(($)=>{if($===null||$===void 0)return;const U=Vw($),f=Object.entries(U).filter(([,w])=>w!=null).map(([w])=>w);if(f.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(f.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${f} were not null.`);return U},"expectUnion"),Y$=I(($)=>{if(typeof $=="string")return V0(X0($));return V0($)},"strictParseDouble"),rX=Y$,Cw=I(($)=>{if(typeof $=="string")return e0(X0($));return e0($)},"strictParseFloat32"),oX=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,X0=I(($)=>{const U=$.match(oX);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),I$=I(($)=>{if(typeof $=="string")return Nw($);return V0($)},"limitedParseDouble"),iX=I$,tX=I$,aX=I(($)=>{if(typeof $=="string")return Nw($);return e0($)},"limitedParseFloat32"),Nw=I(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),Pw=I(($)=>{if(typeof $==="string")return C0(X0($));return C0($)},"strictParseLong"),eX=Pw,$Z=I(($)=>{if(typeof $==="string")return L$(X0($));return L$($)},"strictParseInt32"),W0=I(($)=>{if(typeof $==="string")return X$(X0($));return X$($)},"strictParseShort"),Sw=I(($)=>{if(typeof $==="string")return Z$(X0($));return Z$($)},"strictParseByte"),$1=I(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),N0={warn:console.warn},UZ=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],F$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];I(jw,"dateToUtcString");var fZ=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),wZ=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=fZ.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,G,W,L,X,Z,M]=U,E=W0(L0(w)),Y=_(G,"month",1,12),F=_(W,"day",1,31);return H0(E,Y,F,{hours:L,minutes:X,seconds:Z,fractionalMilliseconds:M})},"parseRfc3339DateTime"),GZ=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),WZ=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=GZ.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,G,W,L,X,Z,M,E]=U,Y=W0(L0(w)),F=_(G,"month",1,12),z=_(W,"day",1,31),R=H0(Y,F,z,{hours:L,minutes:X,seconds:Z,fractionalMilliseconds:M});if(E.toUpperCase()!="Z")R.setTime(R.getTime()-AZ(E));return R},"parseRfc3339DateTimeWithOffset"),LZ=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$/),XZ=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$/),ZZ=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})$/),MZ=I(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=LZ.exec($);if(U){const[f,w,G,W,L,X,Z,M]=U;return H0(W0(L0(W)),G$(G),_(w,"day",1,31),{hours:L,minutes:X,seconds:Z,fractionalMilliseconds:M})}if(U=XZ.exec($),U){const[f,w,G,W,L,X,Z,M]=U;return FZ(H0(YZ(W),G$(G),_(w,"day",1,31),{hours:L,minutes:X,seconds:Z,fractionalMilliseconds:M}))}if(U=ZZ.exec($),U){const[f,w,G,W,L,X,Z,M]=U;return H0(W0(L0(M)),G$(w),_(G.trimLeft(),"day",1,31),{hours:W,minutes:L,seconds:X,fractionalMilliseconds:Z})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),EZ=I(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=Y$($);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"),H0=I(($,U,f,w)=>{const G=U-1;return QZ($,G,f),new Date(Date.UTC($,G,f,_(w.hours,"hour",0,23),_(w.minutes,"minute",0,59),_(w.seconds,"seconds",0,60),JZ(w.fractionalMilliseconds)))},"buildDate"),YZ=I(($)=>{const U=(new Date()).getUTCFullYear(),f=Math.floor(U/100)*100+W0(L0($));if(f<U)return f+100;return f},"parseTwoDigitYear"),IZ=1576800000000,FZ=I(($)=>{if($.getTime()-(new Date()).getTime()>IZ)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),G$=I(($)=>{const U=F$.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),zZ=[31,28,31,30,31,30,31,31,30,31,30,31],QZ=I(($,U,f)=>{let w=zZ[U];if(U===1&&RZ($))w=29;if(f>w)throw new TypeError(`Invalid day for ${F$[U]} in ${$}: ${f}`)},"validateDayOfMonth"),RZ=I(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),_=I(($,U,f,w)=>{const G=Sw(L0($));if(G<f||G>w)throw new TypeError(`${U} must be between ${f} and ${w}, inclusive`);return G},"parseDateValue"),JZ=I(($)=>{if($===null||$===void 0)return 0;return Cw("0."+$)*1000},"parseMilliseconds"),AZ=I(($)=>{const U=$[0];let f=1;if(U=="+")f=1;else if(U=="-")f=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const w=Number($.substring(1,3)),G=Number($.substring(4,6));return f*(w*60+G)*60*1000},"parseOffsetToMilliseconds"),L0=I(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),bw=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};I(bw,"ServiceException");var KZ=bw,kw=I(($,U={})=>{Object.entries(U).filter(([,w])=>w!==void 0).forEach(([w,G])=>{if($[w]==null||$[w]==="")$[w]=G});const f=$.message||$.Message||"UnknownError";return $.message=f,delete $.Message,$},"decorateServiceException"),hw=I(({output:$,parsedBody:U,exceptionCtor:f,errorCode:w})=>{const G=OZ($),W=G.httpStatusCode?G.httpStatusCode+"":void 0,L=new f({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||w||W||"UnknownError",$fault:"client",$metadata:G});throw kw(L,U)},"throwDefaultError"),BZ=I(($)=>{return({output:U,parsedBody:f,errorCode:w})=>{hw({output:U,parsedBody:f,exceptionCtor:$,errorCode:w})}},"withBaseException"),OZ=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"),qZ=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"),Jw=!1,TZ=I(($)=>{if($&&!Jw&&parseInt($.substring(1,$.indexOf(".")))<16)Jw=!0},"emitWarningIfUnsupportedVersion"),HZ=I(($)=>{const U=[];for(let f in W$.AlgorithmId){const w=W$.AlgorithmId[f];if($[w]===void 0)continue;U.push({algorithmId:()=>w,checksumConstructor:()=>$[w]})}return{_checksumAlgorithms:U,addChecksumAlgorithm(f){this._checksumAlgorithms.push(f)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),VZ=I(($)=>{const U={};return $.checksumAlgorithms().forEach((f)=>{U[f.algorithmId()]=f.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),CZ=I(($)=>{let U=$.retryStrategy;return{setRetryStrategy(f){U=f},retryStrategy(){return U}}},"getRetryConfiguration"),NZ=I(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),Dw=I(($)=>{return{...HZ($),...CZ($)}},"getDefaultExtensionConfiguration"),PZ=Dw,SZ=I(($)=>{return{...VZ($),...NZ($)}},"resolveDefaultRuntimeConfig");I(U1,"extendedEncodeURIComponent");var jZ=I(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),cw=I(($)=>{for(let f in $)if($.hasOwnProperty(f)&&$[f]["#text"]!==void 0)$[f]=$[f]["#text"];else if(typeof $[f]==="object"&&$[f]!==null)$[f]=cw($[f]);return $},"getValueFromTextNode"),P0=I(function(){const $=Object.getPrototypeOf(this).constructor,f=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(f,$.prototype),f},"StringWrapper");P0.prototype=Object.create(String.prototype,{constructor:{value:P0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(P0,String);var xw=class $ extends P0{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(xw,"LazyJsonString");var bZ=xw;I(z$,"map");var kZ=I(($)=>{const U={};for(let[f,w]of Object.entries($||{}))U[f]=[,w];return U},"convertMap"),hZ=I(($,U)=>{const f={};for(let w in U)_w(f,$,U,w);return f},"take"),DZ=I(($,U,f)=>{return z$($,Object.entries(f).reduce((w,[G,W])=>{if(Array.isArray(W))w[G]=W;else if(typeof W==="function")w[G]=[U,W()];else w[G]=[U,W];return w},{}))},"mapWithFilter"),_w=I(($,U,f,w)=>{if(U!==null){let L=f[w];if(typeof L==="function")L=[,L];const[X=cZ,Z=xZ,M=w]=L;if(typeof X==="function"&&X(U[M])||typeof X!=="function"&&!!X)$[w]=Z(U[M]);return}let[G,W]=f[w];if(typeof W==="function"){let L;const X=G===void 0&&(L=W())!=null,Z=typeof G==="function"&&!!G(void 0)||typeof G!=="function"&&!!G;if(X)$[w]=L;else if(Z)$[w]=W()}else{const L=G===void 0&&W!=null,X=typeof G==="function"&&!!G(W)||typeof G!=="function"&&!!G;if(L||X)$[w]=W}},"applyInstruction"),cZ=I(($)=>$!=null,"nonNullish"),xZ=I(($)=>$,"pass"),_Z=I(($,U,f,w,G,W)=>{if(U!=null&&U[f]!==void 0){const L=w();if(L.length<=0)throw new Error("Empty value provided for input HTTP label: "+f+".");$=$.replace(G,W?L.split("/").map((X)=>U1(X)).join("/"):U1(L))}else throw new Error("No value provided for input HTTP label: "+f+".");return $},"resolvedPath"),vZ=I(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),uZ=I(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),M$=I(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(M$);if(typeof $==="object"){const U={};for(let f of Object.keys($)){if($[f]==null)continue;U[f]=M$($[f])}return U}return $},"_json");I(vw,"splitEvery")});var dw=Q((yw)=>{Object.defineProperty(yw,"__esModule",{value:!0});yw.isStreamingPayload=void 0;var yZ=import.meta.require("stream"),pZ=($)=>($===null||$===void 0?void 0:$.body)instanceof yZ.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;yw.isStreamingPayload=pZ});var LG=Q((JY,WG)=>{var{defineProperty:w1,getOwnPropertyDescriptor:dZ,getOwnPropertyNames:gZ}=Object,sZ=Object.prototype.hasOwnProperty,T=($,U)=>w1($,"name",{value:U,configurable:!0}),nZ=($,U)=>{for(var f in U)w1($,f,{get:U[f],enumerable:!0})},mZ=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of gZ(U))if(!sZ.call($,G)&&G!==f)w1($,G,{get:()=>U[G],enumerable:!(w=dZ(U,G))||w.enumerable})}return $},lZ=($)=>mZ(w1({},"__esModule",{value:!0}),$),sw={};nZ(sw,{AdaptiveRetryStrategy:()=>iZ,CONFIG_MAX_ATTEMPTS:()=>R$,CONFIG_RETRY_MODE:()=>ew,ENV_MAX_ATTEMPTS:()=>Q$,ENV_RETRY_MODE:()=>aw,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>tZ,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>eZ,StandardRetryStrategy:()=>iw,defaultDelayDecider:()=>mw,defaultRetryDecider:()=>lw,getOmitRetryHeadersPlugin:()=>$M,getRetryAfterHint:()=>GG,getRetryPlugin:()=>LM,omitRetryHeadersMiddleware:()=>$G,omitRetryHeadersMiddlewareOptions:()=>UG,resolveRetryConfig:()=>aZ,retryMiddleware:()=>fG,retryMiddlewareOptions:()=>wG});WG.exports=lZ(sw);var M0=E0(),nw=u1(),B=Rw(),rZ=T(($,U)=>{const f=$,w=(U==null?void 0:U.noRetryIncrement)??B.NO_RETRY_INCREMENT,G=(U==null?void 0:U.retryCost)??B.RETRY_COST,W=(U==null?void 0:U.timeoutRetryCost)??B.TIMEOUT_RETRY_COST;let L=$;const X=T((Y)=>Y.name==="TimeoutError"?W:G,"getCapacityAmount"),Z=T((Y)=>X(Y)<=L,"hasRetryTokens");return Object.freeze({hasRetryTokens:Z,retrieveRetryTokens:T((Y)=>{if(!Z(Y))throw new Error("No retry token available");const F=X(Y);return L-=F,F},"retrieveRetryTokens"),releaseRetryTokens:T((Y)=>{L+=Y??w,L=Math.min(L,f)},"releaseRetryTokens")})},"getDefaultRetryQuota"),mw=T(($,U)=>Math.floor(Math.min(B.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),p=r(),lw=T(($)=>{if(!$)return!1;return p.isRetryableByTrait($)||p.isClockSkewError($)||p.isThrottlingError($)||p.isTransientError($)},"defaultRetryDecider"),rw=T(($)=>{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"),ow=class ${constructor(U,f){this.maxAttemptsProvider=U,this.mode=B.RETRY_MODES.STANDARD,this.retryDecider=(f==null?void 0:f.retryDecider)??lw,this.delayDecider=(f==null?void 0:f.delayDecider)??mw,this.retryQuota=(f==null?void 0:f.retryQuota)??rZ(B.INITIAL_RETRY_TOKENS)}shouldRetry(U,f,w){return f<w&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(f){U=B.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,f,w){let G,W=0,L=0;const X=await this.getMaxAttempts(),{request:Z}=f;if(M0.HttpRequest.isInstance(Z))Z.headers[B.INVOCATION_ID_HEADER]=nw.v4();while(!0)try{if(M0.HttpRequest.isInstance(Z))Z.headers[B.REQUEST_HEADER]=`attempt=${W+1}; max=${X}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();const{response:M,output:E}=await U(f);if(w==null?void 0:w.afterRequest)w.afterRequest(M);return this.retryQuota.releaseRetryTokens(G),E.$metadata.attempts=W+1,E.$metadata.totalRetryDelay=L,{response:M,output:E}}catch(M){const E=rw(M);if(W++,this.shouldRetry(E,W,X)){G=this.retryQuota.retrieveRetryTokens(E);const Y=this.delayDecider(p.isThrottlingError(E)?B.THROTTLING_RETRY_DELAY_BASE:B.DEFAULT_RETRY_DELAY_BASE,W),F=oZ(E.$response),z=Math.max(F||0,Y);L+=z,await new Promise((R)=>setTimeout(R,z));continue}if(!E.$metadata)E.$metadata={};throw E.$metadata.attempts=W,E.$metadata.totalRetryDelay=L,E}}};T(ow,"StandardRetryStrategy");var iw=ow,oZ=T(($)=>{if(!M0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((W)=>W.toLowerCase()==="retry-after");if(!U)return;const f=$.headers[U],w=Number(f);if(!Number.isNaN(w))return w*1000;return new Date(f).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),tw=class $ extends iw{constructor(U,f){const{rateLimiter:w,...G}=f??{};super(U,G);this.rateLimiter=w??new B.DefaultRateLimiter,this.mode=B.RETRY_MODES.ADAPTIVE}async retry(U,f){return super.retry(U,f,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}};T(tw,"AdaptiveRetryStrategy");var iZ=tw,gw=K0(),Q$="AWS_MAX_ATTEMPTS",R$="max_attempts",tZ={environmentVariableSelector:($)=>{const U=$[Q$];if(!U)return;const f=parseInt(U);if(Number.isNaN(f))throw new Error(`Environment variable ${Q$} mast be a number, got "${U}"`);return f},configFileSelector:($)=>{const U=$[R$];if(!U)return;const f=parseInt(U);if(Number.isNaN(f))throw new Error(`Shared config file entry ${R$} mast be a number, got "${U}"`);return f},default:B.DEFAULT_MAX_ATTEMPTS},aZ=T(($)=>{const{retryStrategy:U}=$,f=gw.normalizeProvider($.maxAttempts??B.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:f,retryStrategy:async()=>{if(U)return U;if(await gw.normalizeProvider($.retryMode)()===B.RETRY_MODES.ADAPTIVE)return new B.AdaptiveRetryStrategy(f);return new B.StandardRetryStrategy(f)}}},"resolveRetryConfig"),aw="AWS_RETRY_MODE",ew="retry_mode",eZ={environmentVariableSelector:($)=>$[aw],configFileSelector:($)=>$[ew],default:B.DEFAULT_RETRY_MODE},$G=T(()=>($)=>async(U)=>{const{request:f}=U;if(M0.HttpRequest.isInstance(f))delete f.headers[B.INVOCATION_ID_HEADER],delete f.headers[B.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),UG={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},$M=T(($)=>({applyToStack:(U)=>{U.addRelativeTo($G(),UG)}}),"getOmitRetryHeadersPlugin"),UM=Z0(),fM=dw(),fG=T(($)=>(U,f)=>async(w)=>{var G;let W=await $.retryStrategy();const L=await $.maxAttempts();if(wM(W)){W=W;let X=await W.acquireInitialRetryToken(f.partition_id),Z=new Error,M=0,E=0;const{request:Y}=w,F=M0.HttpRequest.isInstance(Y);if(F)Y.headers[B.INVOCATION_ID_HEADER]=nw.v4();while(!0)try{if(F)Y.headers[B.REQUEST_HEADER]=`attempt=${M+1}; max=${L}`;const{response:z,output:R}=await U(w);return W.recordSuccess(X),R.$metadata.attempts=M+1,R.$metadata.totalRetryDelay=E,{response:z,output:R}}catch(z){const R=GM(z);if(Z=rw(z),F&&fM.isStreamingPayload(Y))throw(G=f.logger instanceof UM.NoOpLogger?console:f.logger)==null||G.warn("An error was encountered in a non-retryable streaming request."),Z;try{X=await W.refreshRetryTokenForRetry(X,R)}catch(q){if(!Z.$metadata)Z.$metadata={};throw Z.$metadata.attempts=M+1,Z.$metadata.totalRetryDelay=E,Z}M=X.getRetryCount();const J=X.getRetryDelay();E+=J,await new Promise((q)=>setTimeout(q,J))}}else{if(W=W,W==null?void 0:W.mode)f.userAgent=[...f.userAgent||[],["cfg/retry-mode",W.mode]];return W.retry(U,w)}},"retryMiddleware"),wM=T(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),GM=T(($)=>{const U={error:$,errorType:WM($)},f=GG($.$response);if(f)U.retryAfterHint=f;return U},"getRetryErrorInfo"),WM=T(($)=>{if(p.isThrottlingError($))return"THROTTLING";if(p.isTransientError($))return"TRANSIENT";if(p.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),wG={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},LM=T(($)=>({applyToStack:(U)=>{U.add(fG($),wG)}}),"getRetryPlugin"),GG=T(($)=>{if(!M0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((W)=>W.toLowerCase()==="retry-after");if(!U)return;const f=$.headers[U],w=Number(f);if(!Number.isNaN(w))return new Date(w*1000);return new Date(f)},"getRetryAfterHint")});var A$=Q((AY,VG)=>{var MG=function($){const U=new Map;for(let f of $)U.set(f.schemeId,f);return U},OG=function($,U){return new TG($,U)},HG=function($,U,f,w,G){return K(async function*W(L,X,...Z){let M=L.startingToken||void 0,E=!0,Y;while(E){if(X[f]=M,G)X[G]=X[G]??L.pageSize;if(L.client instanceof $)Y=await jM(U,L.client,X,...Z);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield Y;const F=M;M=bM(Y,w),E=!!(M&&(!L.stopOnSameToken||M!==F))}return},"paginateOperation")},W1=Object.defineProperty,XM=Object.getOwnPropertyDescriptor,ZM=Object.getOwnPropertyNames,MM=Object.prototype.hasOwnProperty,K=($,U)=>W1($,"name",{value:U,configurable:!0}),EM=($,U)=>{for(var f in U)W1($,f,{get:U[f],enumerable:!0})},YM=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of ZM(U))if(!MM.call($,G)&&G!==f)W1($,G,{get:()=>U[G],enumerable:!(w=XM(U,G))||w.enumerable})}return $},IM=($)=>YM(W1({},"__esModule",{value:!0}),$),XG={};EM(XG,{DefaultIdentityProviderConfig:()=>OM,EXPIRATION_MS:()=>KG,HttpApiKeyAuthSigner:()=>qM,HttpBearerAuthSigner:()=>TM,NoAuthSigner:()=>HM,RequestBuilder:()=>TG,createIsIdentityExpiredFunction:()=>AG,createPaginator:()=>HG,doesIdentityRequireRefresh:()=>BG,getHttpAuthSchemeEndpointRuleSetPlugin:()=>zM,getHttpAuthSchemePlugin:()=>RM,getHttpSigningPlugin:()=>BM,getSmithyContext:()=>NM,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>EG,httpAuthSchemeMiddleware:()=>J$,httpAuthSchemeMiddlewareOptions:()=>YG,httpSigningMiddleware:()=>IG,httpSigningMiddlewareOptions:()=>FG,isIdentityExpired:()=>VM,memoizeIdentityProvider:()=>CM,normalizeProvider:()=>PM,requestBuilder:()=>OG});VG.exports=IM(XG);var ZG=K0();K(MG,"convertHttpAuthSchemesToMap");var J$=K(($,U)=>(f,w)=>async(G)=>{var W;const L=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,w,G.input)),X=MG($.httpAuthSchemes),Z=ZG.getSmithyContext(w),M=[];for(let E of L){const Y=X.get(E.schemeId);if(!Y){M.push(`HttpAuthScheme \`${E.schemeId}\` was not enabled for this service.`);continue}const F=Y.identityProvider(await U.identityProviderConfigProvider($));if(!F){M.push(`HttpAuthScheme \`${E.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:z={},signingProperties:R={}}=((W=E.propertiesExtractor)==null?void 0:W.call(E,$,w))||{};E.identityProperties=Object.assign(E.identityProperties||{},z),E.signingProperties=Object.assign(E.signingProperties||{},R),Z.selectedHttpAuthScheme={httpAuthOption:E,identity:await F(E.identityProperties),signer:Y.signer};break}if(!Z.selectedHttpAuthScheme)throw new Error(M.join("\n"));return f(G)},"httpAuthSchemeMiddleware"),FM=af(),EG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:FM.endpointMiddlewareOptions.name},zM=K(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:f})=>({applyToStack:(w)=>{w.addRelativeTo(J$($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:f}),EG)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),QM=t1(),YG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:QM.serializerMiddlewareOption.name},RM=K(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:f})=>({applyToStack:(w)=>{w.addRelativeTo(J$($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:f}),YG)}}),"getHttpAuthSchemePlugin"),L1=E0(),JM=K(($)=>(U)=>{throw U},"defaultErrorHandler"),AM=K(($,U)=>{},"defaultSuccessHandler"),IG=K(($)=>(U,f)=>async(w)=>{if(!L1.HttpRequest.isInstance(w.request))return U(w);const W=ZG.getSmithyContext(f).selectedHttpAuthScheme;if(!W)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:L={}},identity:X,signer:Z}=W,M=await U({...w,request:await Z.sign(w.request,X,L)}).catch((Z.errorHandler||JM)(L));return(Z.successHandler||AM)(M.response,L),M},"httpSigningMiddleware"),KM=LG(),FG={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:KM.retryMiddlewareOptions.name},BM=K(($)=>({applyToStack:(U)=>{U.addRelativeTo(IG($),FG)}}),"getHttpSigningPlugin"),zG=class ${constructor(U){this.authSchemes=new Map;for(let[f,w]of Object.entries(U))if(w!==void 0)this.authSchemes.set(f,w)}getIdentityProvider(U){return this.authSchemes.get(U)}};K(zG,"DefaultIdentityProviderConfig");var OM=zG,G1=y0(),QG=class ${async sign(U,f,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(!f.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const G=L1.HttpRequest.clone(U);if(w.in===G1.HttpApiKeyAuthLocation.QUERY)G.query[w.name]=f.apiKey;else if(w.in===G1.HttpApiKeyAuthLocation.HEADER)G.headers[w.name]=w.scheme?`${w.scheme} ${f.apiKey}`:f.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return G}};K(QG,"HttpApiKeyAuthSigner");var qM=QG,RG=class ${async sign(U,f,w){const G=L1.HttpRequest.clone(U);if(!f.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return G.headers.Authorization=`Bearer ${f.token}`,G}};K(RG,"HttpBearerAuthSigner");var TM=RG,JG=class ${async sign(U,f,w){return U}};K(JG,"NoAuthSigner");var HM=JG,AG=K(($)=>(U)=>BG(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),KG=300000,VM=AG(KG),BG=K(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),CM=K(($,U,f)=>{if($===void 0)return;const w=typeof $!=="function"?async()=>Promise.resolve($):$;let G,W,L,X=!1;const Z=K(async(M)=>{if(!W)W=w(M);try{G=await W,L=!0,X=!1}finally{W=void 0}return G},"coalesceProvider");if(U===void 0)return async(M)=>{if(!L||(M==null?void 0:M.forceRefresh))G=await Z(M);return G};return async(M)=>{if(!L||(M==null?void 0:M.forceRefresh))G=await Z(M);if(X)return G;if(!f(G))return X=!0,G;if(U(G))return await Z(M),G;return G}},"memoizeIdentityProvider"),NM=K(($)=>$[G1.SMITHY_CONTEXT_KEY]||($[G1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),PM=K(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),SM=Z0();K(OG,"requestBuilder");var qG=class ${constructor(U,f){this.input=U,this.context=f,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:U,protocol:f="https",port:w,path:G}=await this.context.endpoint();this.path=G;for(let W of this.resolvePathStack)W(this.path);return new L1.HttpRequest({protocol:f,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((f)=>{this.path=`${(f==null?void 0:f.endsWith("/"))?f.slice(0,-1):f||""}`+U}),this}p(U,f,w,G){return this.resolvePathStack.push((W)=>{this.path=SM.resolvedPath(W,this.input,U,f,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}};K(qG,"RequestBuilder");var TG=qG,jM=K(async($,U,f,...w)=>{return await U.send(new $(f),...w)},"makePagedClientRequest");K(HG,"createPaginator");var bM=K(($,U)=>{let f=$;const w=U.split(".");for(let G of w){if(!f||typeof f!=="object")return;f=f[G]}return f},"get")});var JW=Q((PR,RW)=>{var{defineProperty:q1,getOwnPropertyDescriptor:Y2,getOwnPropertyNames:I2}=Object,F2=Object.prototype.hasOwnProperty,z2=($,U)=>q1($,"name",{value:U,configurable:!0}),Q2=($,U)=>{for(var f in U)q1($,f,{get:U[f],enumerable:!0})},R2=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of I2(U))if(!F2.call($,G)&&G!==f)q1($,G,{get:()=>U[G],enumerable:!(w=Y2(U,G))||w.enumerable})}return $},J2=($)=>R2(q1({},"__esModule",{value:!0}),$),QW={};Q2(QW,{emitWarningIfUnsupportedVersion:()=>A2});RW.exports=J2(QW);var zW=!1,A2=z2(($)=>{if($&&!zW&&parseInt($.substring(1,$.indexOf(".")))<18)zW=!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 _W=Q((SR,xW)=>{var g$=function($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break},P1=Object.defineProperty,q2=Object.getOwnPropertyDescriptor,T2=Object.getOwnPropertyNames,H2=Object.prototype.hasOwnProperty,H=($,U)=>P1($,"name",{value:U,configurable:!0}),V2=($,U)=>{for(var f in U)P1($,f,{get:U[f],enumerable:!0})},C2=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of T2(U))if(!H2.call($,G)&&G!==f)P1($,G,{get:()=>U[G],enumerable:!(w=q2(U,G))||w.enumerable})}return $},N2=($)=>C2(P1({},"__esModule",{value:!0}),$),qW={};V2(qW,{SignatureV4:()=>e2,clearCredentialCache:()=>s2,createScope:()=>V1,getCanonicalHeaders:()=>d$,getCanonicalQuery:()=>jW,getPayloadHash:()=>C1,getSigningKey:()=>SW,moveHeadersToQuery:()=>DW,prepareRequest:()=>s$});xW.exports=N2(qW);var AW=K0(),u$=N1(),P2="X-Amz-Algorithm",S2="X-Amz-Credential",TW="X-Amz-Date",j2="X-Amz-SignedHeaders",b2="X-Amz-Expires",HW="X-Amz-Signature",VW="X-Amz-Security-Token",CW="authorization",NW=TW.toLowerCase(),k2="date",h2=[CW,NW,k2],D2=HW.toLowerCase(),p$="x-amz-content-sha256",c2=VW.toLowerCase(),x2={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},_2=/^proxy-/,v2=/^sec-/,y$="AWS4-HMAC-SHA256",u2="AWS4-HMAC-SHA256-PAYLOAD",y2="UNSIGNED-PAYLOAD",p2=50,PW="aws4_request",d2=604800,s=O2(),g2=N1(),Q0={},H1=[],V1=H(($,U,f)=>`${$}/${U}/${f}/${PW}`,"createScope"),SW=H(async($,U,f,w,G)=>{const W=await KW($,U.secretAccessKey,U.accessKeyId),L=`${f}:${w}:${G}:${s.toHex(W)}:${U.sessionToken}`;if(L in Q0)return Q0[L];H1.push(L);while(H1.length>p2)delete Q0[H1.shift()];let X=`AWS4${U.secretAccessKey}`;for(let Z of[f,w,G,PW])X=await KW($,X,Z);return Q0[L]=X},"getSigningKey"),s2=H(()=>{H1.length=0,Object.keys(Q0).forEach(($)=>{delete Q0[$]})},"clearCredentialCache"),KW=H(($,U,f)=>{const w=new $(U);return w.update(g2.toUint8Array(f)),w.digest()},"hmac"),d$=H(({headers:$},U,f)=>{const w={};for(let G of Object.keys($).sort()){if($[G]==null)continue;const W=G.toLowerCase();if(W in x2||(U==null?void 0:U.has(W))||_2.test(W)||v2.test(W)){if(!f||f&&!f.has(W))continue}w[W]=$[G].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),h0=B2(),jW=H(({query:$={}})=>{const U=[],f={};for(let w of Object.keys($).sort()){if(w.toLowerCase()===D2)continue;U.push(w);const G=$[w];if(typeof G==="string")f[w]=`${h0.escapeUri(w)}=${h0.escapeUri(G)}`;else if(Array.isArray(G))f[w]=G.slice(0).reduce((W,L)=>W.concat([`${h0.escapeUri(w)}=${h0.escapeUri(L)}`]),[]).sort().join("&")}return U.map((w)=>f[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),n2=K2(),m2=N1(),C1=H(async({headers:$,body:U},f)=>{for(let w of Object.keys($))if(w.toLowerCase()===p$)return $[w];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||n2.isArrayBuffer(U)){const w=new f;return w.update(m2.toUint8Array(U)),s.toHex(await w.digest())}return y2},"getPayloadHash"),BW=N1(),bW=class ${format(U){const f=[];for(let W of Object.keys(U)){const L=BW.fromUtf8(W);f.push(Uint8Array.from([L.byteLength]),L,this.formatHeaderValue(U[W]))}const w=new Uint8Array(f.reduce((W,L)=>W+L.byteLength,0));let G=0;for(let W of f)w.set(W,G),G+=W.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 f=new DataView(new ArrayBuffer(3));return f.setUint8(0,3),f.setInt16(1,U.value,!1),new Uint8Array(f.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 W=new DataView(new ArrayBuffer(3+U.value.byteLength));W.setUint8(0,6),W.setUint16(1,U.value.byteLength,!1);const L=new Uint8Array(W.buffer);return L.set(U.value,3),L;case"string":const X=BW.fromUtf8(U.value),Z=new DataView(new ArrayBuffer(3+X.byteLength));Z.setUint8(0,7),Z.setUint16(1,X.byteLength,!1);const M=new Uint8Array(Z.buffer);return M.set(X,3),M;case"timestamp":const E=new Uint8Array(9);return E[0]=8,E.set(o2.fromNumber(U.value.valueOf()).bytes,1),E;case"uuid":if(!r2.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const Y=new Uint8Array(17);return Y[0]=9,Y.set(s.fromHex(U.value.replace(/\-/g,"")),1),Y}}};H(bW,"HeaderFormatter");var l2=bW,r2=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,kW=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 f=new Uint8Array(8);for(let w=7,G=Math.abs(Math.round(U));w>-1&&G>0;w--,G/=256)f[w]=G;if(U<0)g$(f);return new $(f)}valueOf(){const U=this.bytes.slice(0),f=U[0]&128;if(f)g$(U);return parseInt(s.toHex(U),16)*(f?-1:1)}toString(){return String(this.valueOf())}};H(kW,"Int64");var o2=kW;H(g$,"negate");var i2=H(($,U)=>{$=$.toLowerCase();for(let f of Object.keys(U))if($===f.toLowerCase())return!0;return!1},"hasHeader"),hW=E0(),DW=H(($,U={})=>{var f;const{headers:w,query:G={}}=hW.HttpRequest.clone($);for(let W of Object.keys(w)){const L=W.toLowerCase();if(L.slice(0,6)==="x-amz-"&&!((f=U.unhoistableHeaders)==null?void 0:f.has(L)))G[W]=w[W],delete w[W]}return{...$,headers:w,query:G}},"moveHeadersToQuery"),s$=H(($)=>{$=hW.HttpRequest.clone($);for(let U of Object.keys($.headers))if(h2.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),t2=H(($)=>a2($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),a2=H(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),cW=class ${constructor({applyChecksum:U,credentials:f,region:w,service:G,sha256:W,uriEscapePath:L=!0}){this.headerFormatter=new l2,this.service=G,this.sha256=W,this.uriEscapePath=L,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=AW.normalizeProvider(w),this.credentialProvider=AW.normalizeProvider(f)}async presign(U,f={}){const{signingDate:w=new Date,expiresIn:G=3600,unsignableHeaders:W,unhoistableHeaders:L,signableHeaders:X,signingRegion:Z,signingService:M}=f,E=await this.credentialProvider();this.validateResolvedCredentials(E);const Y=Z??await this.regionProvider(),{longDate:F,shortDate:z}=T1(w);if(G>d2)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const R=V1(z,Y,M??this.service),J=DW(s$(U),{unhoistableHeaders:L});if(E.sessionToken)J.query[VW]=E.sessionToken;J.query[P2]=y$,J.query[S2]=`${E.accessKeyId}/${R}`,J.query[TW]=F,J.query[b2]=G.toString(10);const q=d$(J,W,X);return J.query[j2]=OW(q),J.query[HW]=await this.getSignature(F,R,this.getSigningKey(E,Y,z,M),this.createCanonicalRequest(J,q,await C1(U,this.sha256))),J}async sign(U,f){if(typeof U==="string")return this.signString(U,f);else if(U.headers&&U.payload)return this.signEvent(U,f);else if(U.message)return this.signMessage(U,f);else return this.signRequest(U,f)}async signEvent({headers:U,payload:f},{signingDate:w=new Date,priorSignature:G,signingRegion:W,signingService:L}){const X=W??await this.regionProvider(),{shortDate:Z,longDate:M}=T1(w),E=V1(Z,X,L??this.service),Y=await C1({headers:{},body:f},this.sha256),F=new this.sha256;F.update(U);const z=s.toHex(await F.digest()),R=[u2,M,E,G,z,Y].join("\n");return this.signString(R,{signingDate:w,signingRegion:X,signingService:L})}async signMessage(U,{signingDate:f=new Date,signingRegion:w,signingService:G}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:f,signingRegion:w,signingService:G,priorSignature:U.priorSignature}).then((L)=>{return{message:U.message,signature:L}})}async signString(U,{signingDate:f=new Date,signingRegion:w,signingService:G}={}){const W=await this.credentialProvider();this.validateResolvedCredentials(W);const L=w??await this.regionProvider(),{shortDate:X}=T1(f),Z=new this.sha256(await this.getSigningKey(W,L,X,G));return Z.update(u$.toUint8Array(U)),s.toHex(await Z.digest())}async signRequest(U,{signingDate:f=new Date,signableHeaders:w,unsignableHeaders:G,signingRegion:W,signingService:L}={}){const X=await this.credentialProvider();this.validateResolvedCredentials(X);const Z=W??await this.regionProvider(),M=s$(U),{longDate:E,shortDate:Y}=T1(f),F=V1(Y,Z,L??this.service);if(M.headers[NW]=E,X.sessionToken)M.headers[c2]=X.sessionToken;const z=await C1(M,this.sha256);if(!i2(p$,M.headers)&&this.applyChecksum)M.headers[p$]=z;const R=d$(M,G,w),J=await this.getSignature(E,F,this.getSigningKey(X,Z,Y,L),this.createCanonicalRequest(M,R,z));return M.headers[CW]=`${y$} Credential=${X.accessKeyId}/${F}, SignedHeaders=${OW(R)}, Signature=${J}`,M}createCanonicalRequest(U,f,w){const G=Object.keys(f).sort();return`${U.method}
8
+ ${this.getCanonicalPath(U)}
9
+ ${jW(U)}
10
+ ${G.map((W)=>`${W}:${f[W]}`).join("\n")}
11
+
12
+ ${G.join(";")}
13
+ ${w}`}async createStringToSign(U,f,w){const G=new this.sha256;G.update(u$.toUint8Array(w));const W=await G.digest();return`${y$}
14
+ ${U}
15
+ ${f}
16
+ ${s.toHex(W)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const f=[];for(let W of U.split("/")){if((W==null?void 0:W.length)===0)continue;if(W===".")continue;if(W==="..")f.pop();else f.push(W)}const w=`${(U==null?void 0:U.startsWith("/"))?"/":""}${f.join("/")}${f.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return h0.escapeUri(w).replace(/%2F/g,"/")}return U}async getSignature(U,f,w,G){const W=await this.createStringToSign(U,f,G),L=new this.sha256(await w);return L.update(u$.toUint8Array(W)),s.toHex(await L.digest())}getSigningKey(U,f,w,G){return SW(this.sha256,U,w,f,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")}};H(cW,"SignatureV4");var e2=cW,T1=H(($)=>{const U=t2($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),OW=H(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var lW=Q((jR,mW)=>{var{defineProperty:S1,getOwnPropertyDescriptor:$9,getOwnPropertyNames:U9}=Object,f9=Object.prototype.hasOwnProperty,N=($,U)=>S1($,"name",{value:U,configurable:!0}),w9=($,U)=>{for(var f in U)S1($,f,{get:U[f],enumerable:!0})},G9=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of U9(U))if(!f9.call($,G)&&G!==f)S1($,G,{get:()=>U[G],enumerable:!(w=$9(U,G))||w.enumerable})}return $},W9=($)=>G9(S1({},"__esModule",{value:!0}),$),dW={};w9(dW,{AWSSDKSigV4Signer:()=>M9,AwsSdkSigV4ASigner:()=>Y9,AwsSdkSigV4Signer:()=>l$,NODE_SIGV4A_CONFIG_OPTIONS:()=>z9,resolveAWSSDKSigV4Config:()=>Q9,resolveAwsSdkSigV4AConfig:()=>F9,resolveAwsSdkSigV4Config:()=>nW,validateSigningProperties:()=>m$});mW.exports=W9(dW);var L9=E0(),X9=E0(),vW=N(($)=>{var U,f;return X9.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((f=$.headers)==null?void 0:f.Date):void 0},"getDateHeader"),n$=N(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),Z9=N(($,U)=>Math.abs(n$(U).getTime()-$)>=300000,"isClockSkewed"),uW=N(($,U)=>{const f=Date.parse($);if(Z9(f,U))return f-Date.now();return U},"getUpdatedSystemClockOffset"),D0=N(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),m$=N(async($)=>{var U,f,w;const G=D0("context",$.context),W=D0("config",$.config),L=(w=(f=(U=G.endpointV2)==null?void 0:U.properties)==null?void 0:f.authSchemes)==null?void 0:w[0],Z=await D0("signer",W.signer)(L),M=$==null?void 0:$.signingRegion,E=$==null?void 0:$.signingRegionSet,Y=$==null?void 0:$.signingName;return{config:W,signer:Z,signingRegion:M,signingRegionSet:E,signingName:Y}},"validateSigningProperties"),gW=class ${async sign(U,f,w){var G;if(!L9.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const W=await m$(w),{config:L,signer:X}=W;let{signingRegion:Z,signingName:M}=W;const E=w.context;if(((G=E==null?void 0:E.authSchemes)==null?void 0:G.length)??0>1){const[F,z]=E.authSchemes;if((F==null?void 0:F.name)==="sigv4a"&&(z==null?void 0:z.name)==="sigv4")Z=(z==null?void 0:z.signingRegion)??Z,M=(z==null?void 0:z.signingName)??M}return await X.sign(U,{signingDate:n$(L.systemClockOffset),signingRegion:Z,signingService:M})}errorHandler(U){return(f)=>{const w=f.ServerTime??vW(f.$response);if(w){const G=D0("config",U.config),W=G.systemClockOffset;if(G.systemClockOffset=uW(w,G.systemClockOffset),G.systemClockOffset!==W&&f.$metadata)f.$metadata.clockSkewCorrected=!0}throw f}}successHandler(U,f){const w=vW(U);if(w){const G=D0("config",f.config);G.systemClockOffset=uW(w,G.systemClockOffset)}}};N(gW,"AwsSdkSigV4Signer");var l$=gW,M9=l$,E9=E0(),sW=class $ extends l${async sign(U,f,w){var G;if(!E9.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:W,signer:L,signingRegion:X,signingRegionSet:Z,signingName:M}=await m$(w),Y=(await((G=W.sigv4aSigningRegionSet)==null?void 0:G.call(W))??Z??[X]).join(",");return await L.sign(U,{signingDate:n$(W.systemClockOffset),signingRegion:Y,signingService:M})}};N(sW,"AwsSdkSigV4ASigner");var Y9=sW,I9=A$(),yW=y1(),F9=N(($)=>{return $.sigv4aSigningRegionSet=I9.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),z9={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new yW.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 yW.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},a=A$(),pW=_W(),nW=N(($)=>{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=N(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:f=!0,systemClockOffset:w=$.systemClockOffset||0,sha256:G}=$;let W;if($.signer)W=a.normalizeProvider($.signer);else if($.regionInfoProvider)W=N(()=>a.normalizeProvider($.region)().then(async(L)=>[await $.regionInfoProvider(L,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},L]).then(([L,X])=>{const{signingRegion:Z,signingService:M}=L;$.signingRegion=$.signingRegion||Z||X,$.signingName=$.signingName||M||$.serviceId;const E={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:G,uriEscapePath:f};return new($.signerConstructor||pW.SignatureV4)(E)}),"signer");else W=N(async(L)=>{L=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await a.normalizeProvider($.region)(),properties:{}},L);const{signingRegion:X,signingName:Z}=L;$.signingRegion=$.signingRegion||X,$.signingName=$.signingName||Z||$.serviceId;const M={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:G,uriEscapePath:f};return new($.signerConstructor||pW.SignatureV4)(M)},"signer");return{...$,systemClockOffset:w,signingEscapePath:f,credentials:U,signer:W}},"resolveAwsSdkSigV4Config"),Q9=nW});var j1=Q((B9)=>{var R9=":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",rW="[: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]["+R9+"]*",J9=new RegExp("^"+rW+"$"),A9=function($,U){const f=[];let w=U.exec($);while(w){const G=[];G.startIndex=U.lastIndex-w[0].length;const W=w.length;for(let L=0;L<W;L++)G.push(w[L]);f.push(G),w=U.exec($)}return f},K9=function($){const U=J9.exec($);return!(U===null||typeof U==="undefined")};B9.isExist=function($){return typeof $!=="undefined"};B9.isEmptyObject=function($){return Object.keys($).length===0};B9.merge=function($,U,f){if(U){const w=Object.keys(U),G=w.length;for(let W=0;W<G;W++)if(f==="strict")$[w[W]]=[U[w[W]]];else $[w[W]]=U[w[W]]}};B9.getValue=function($){if(B9.isExist($))return $;else return""};B9.isName=K9;B9.getAllMatches=A9;B9.nameRegexp=rW});var o$=Q((x9)=>{var iW=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},tW=function($,U){const f=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const w=$.substr(f,U-f);if(U>5&&w==="xml")return O("InvalidXml","XML declaration allowed only at the start of the document.",C($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U},aW=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 f=1;for(U+=8;U<$.length;U++)if($[U]==="<")f++;else if($[U]===">"){if(f--,f===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},j9=function($,U){let f="",w="",G=!1;for(;U<$.length;U++){if($[U]===P9||$[U]===S9)if(w==="")w=$[U];else if(w!==$[U]);else w="";else if($[U]===">"){if(w===""){G=!0;break}}f+=$[U]}if(w!=="")return!1;return{value:f,index:U,tagClosed:G}},eW=function($,U){const f=r$.getAllMatches($,b9),w={};for(let G=0;G<f.length;G++){if(f[G][1].length===0)return O("InvalidAttr","Attribute '"+f[G][2]+"' has no space in starting.",c0(f[G]));else if(f[G][3]!==void 0&&f[G][4]===void 0)return O("InvalidAttr","Attribute '"+f[G][2]+"' is without value.",c0(f[G]));else if(f[G][3]===void 0&&!U.allowBooleanAttributes)return O("InvalidAttr","boolean attribute '"+f[G][2]+"' is not allowed.",c0(f[G]));const W=f[G][2];if(!D9(W))return O("InvalidAttr","Attribute '"+W+"' is an invalid name.",c0(f[G]));if(!w.hasOwnProperty(W))w[W]=1;else return O("InvalidAttr","Attribute '"+W+"' is repeated.",c0(f[G]))}return!0},k9=function($,U){let f=/\d/;if($[U]==="x")U++,f=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(f))break}return-1},h9=function($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,k9($,U);let f=0;for(;U<$.length;U++,f++){if($[U].match(/\w/)&&f<20)continue;if($[U]===";")break;return-1}return U},O=function($,U,f){return{err:{code:$,msg:U,line:f.line||f,col:f.col}}},D9=function($){return r$.isName($)},c9=function($){return r$.isName($)},C=function($,U){const f=$.substring(0,U).split(/\r?\n/);return{line:f.length,col:f[f.length-1].length+1}},c0=function($){return $.startIndex+$[1].length},r$=j1(),N9={allowBooleanAttributes:!1,unpairedTags:[]};x9.validate=function($,U){U=Object.assign({},N9,U);const f=[];let w=!1,G=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let W=0;W<$.length;W++)if($[W]==="<"&&$[W+1]==="?"){if(W+=2,W=tW($,W),W.err)return W}else if($[W]==="<"){let L=W;if(W++,$[W]==="!"){W=aW($,W);continue}else{let X=!1;if($[W]==="/")X=!0,W++;let Z="";for(;W<$.length&&$[W]!==">"&&$[W]!==" "&&$[W]!=="\t"&&$[W]!=="\n"&&$[W]!=="\r";W++)Z+=$[W];if(Z=Z.trim(),Z[Z.length-1]==="/")Z=Z.substring(0,Z.length-1),W--;if(!c9(Z)){let Y;if(Z.trim().length===0)Y="Invalid space after '<'.";else Y="Tag '"+Z+"' is an invalid name.";return O("InvalidTag",Y,C($,W))}const M=j9($,W);if(M===!1)return O("InvalidAttr","Attributes for '"+Z+"' have open quote.",C($,W));let E=M.value;if(W=M.index,E[E.length-1]==="/"){const Y=W-E.length;E=E.substring(0,E.length-1);const F=eW(E,U);if(F===!0)w=!0;else return O(F.err.code,F.err.msg,C($,Y+F.err.line))}else if(X)if(!M.tagClosed)return O("InvalidTag","Closing tag '"+Z+"' doesn't have proper closing.",C($,W));else if(E.trim().length>0)return O("InvalidTag","Closing tag '"+Z+"' can't have attributes or invalid starting.",C($,L));else if(f.length===0)return O("InvalidTag","Closing tag '"+Z+"' has not been opened.",C($,L));else{const Y=f.pop();if(Z!==Y.tagName){let F=C($,Y.tagStartPos);return O("InvalidTag","Expected closing tag '"+Y.tagName+"' (opened in line "+F.line+", col "+F.col+") instead of closing tag '"+Z+"'.",C($,L))}if(f.length==0)G=!0}else{const Y=eW(E,U);if(Y!==!0)return O(Y.err.code,Y.err.msg,C($,W-E.length+Y.err.line));if(G===!0)return O("InvalidXml","Multiple possible root nodes found.",C($,W));else if(U.unpairedTags.indexOf(Z)!==-1);else f.push({tagName:Z,tagStartPos:L});w=!0}for(W++;W<$.length;W++)if($[W]==="<")if($[W+1]==="!"){W++,W=aW($,W);continue}else if($[W+1]==="?"){if(W=tW($,++W),W.err)return W}else break;else if($[W]==="&"){const Y=h9($,W);if(Y==-1)return O("InvalidChar","char '&' is not expected.",C($,W));W=Y}else if(G===!0&&!iW($[W]))return O("InvalidXml","Extra text at the end",C($,W));if($[W]==="<")W--}}else{if(iW($[W]))continue;return O("InvalidChar","char '"+$[W]+"' is not expected.",C($,W))}if(!w)return O("InvalidXml","Start tag expected.",1);else if(f.length==1)return O("InvalidTag","Unclosed tag '"+f[0].tagName+"'.",C($,f[0].tagStartPos));else if(f.length>0)return O("InvalidXml","Invalid '"+JSON.stringify(f.map((W)=>W.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var P9='"',S9="'",b9=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var U8=Q((u9)=>{var $8={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,f){return $}},v9=function($){return Object.assign({},$8,$)};u9.buildOptions=v9;u9.defaultOptions=$8});var G8=Q((DR,w8)=>{class f8{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})}}w8.exports=f8});var L8=Q((cR,W8)=>{var g9=function($,U){const f={};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,W=!1,L="";for(;U<$.length;U++)if($[U]==="<"&&!W){if(G&&m9($,U)){if(U+=7,[entityName,val,U]=s9($,U+1),val.indexOf("&")===-1)f[i9(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(G&&l9($,U))U+=8;else if(G&&r9($,U))U+=8;else if(G&&o9($,U))U+=9;else if(n9)W=!0;else throw new Error("Invalid DOCTYPE");w++,L=""}else if($[U]===">"){if(W){if($[U-1]==="-"&&$[U-2]==="-")W=!1,w--}else w--;if(w===0)break}else if($[U]==="[")G=!0;else L+=$[U];if(w!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:f,i:U}},s9=function($,U){let f="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)f+=$[U];if(f=f.trim(),f.indexOf(" ")!==-1)throw new Error("External entites are not supported");const w=$[U++];let G="";for(;U<$.length&&$[U]!==w;U++)G+=$[U];return[f,G,U]},n9=function($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1},m9=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},l9=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},r9=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},o9=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},i9=function($){if(d9.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},d9=j1();W8.exports=g9});var Z8=Q((xR,X8)=>{var $5=function($,U={}){if(U=Object.assign({},e9,U),!$||typeof $!=="string")return $;let f=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(f))return $;else if(U.hex&&t9.test(f))return Number.parseInt(f,16);else{const w=a9.exec(f);if(w){const G=w[1],W=w[2];let L=U5(w[3]);const X=w[4]||w[6];if(!U.leadingZeros&&W.length>0&&G&&f[2]!==".")return $;else if(!U.leadingZeros&&W.length>0&&!G&&f[1]!==".")return $;else{const Z=Number(f),M=""+Z;if(M.search(/[eE]/)!==-1)if(U.eNotation)return Z;else return $;else if(X)if(U.eNotation)return Z;else return $;else if(f.indexOf(".")!==-1)if(M==="0"&&L==="")return Z;else if(M===L)return Z;else if(G&&M==="-"+L)return Z;else return $;if(W)if(L===M)return Z;else if(G+L===M)return Z;else return $;if(f===M)return Z;else if(f===G+M)return Z;return $}}else return $}},U5=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},t9=/^[-+]?0x[a-fA-F0-9]+$/,a9=/^([\-\+])?(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 e9={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};X8.exports=$5});var I8=Q((_R,Y8)=>{var G5=function($){const U=Object.keys($);for(let f=0;f<U.length;f++){const w=U[f];this.lastEntities[w]={regex:new RegExp("&"+w+";","g"),val:$[w]}}},W5=function($,U,f,w,G,W,L){if($!==void 0){if(this.options.trimValues&&!w)$=$.trim();if($.length>0){if(!L)$=this.replaceEntitiesValue($);const X=this.options.tagValueProcessor(U,$,f,G,W);if(X===null||X===void 0)return $;else if(typeof X!==typeof $||X!==$)return X;else if(this.options.trimValues)return t$($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return t$($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},L5=function($){if(this.options.removeNSPrefix){const U=$.split(":"),f=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=f+U[1]}return $},Z5=function($,U,f){if(!this.options.ignoreAttributes&&typeof $==="string"){const w=M8.getAllMatches($,X5),G=w.length,W={};for(let L=0;L<G;L++){const X=this.resolveNameSpace(w[L][1]);let Z=w[L][4],M=this.options.attributeNamePrefix+X;if(X.length){if(this.options.transformAttributeName)M=this.options.transformAttributeName(M);if(M==="__proto__")M="#__proto__";if(Z!==void 0){if(this.options.trimValues)Z=Z.trim();Z=this.replaceEntitiesValue(Z);const E=this.options.attributeValueProcessor(X,Z,U);if(E===null||E===void 0)W[M]=Z;else if(typeof E!==typeof Z||E!==Z)W[M]=E;else W[M]=t$(Z,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)W[M]=!0}}if(!Object.keys(W).length)return;if(this.options.attributesGroupName){const L={};return L[this.options.attributesGroupName]=W,L}return W}},E5=function($,U,f){const w=this.options.updateTag(U.tagname,f,U[":@"]);if(w===!1);else if(typeof w==="string")U.tagname=w,$.addChild(U);else $.addChild(U)},I5=function($,U,f,w){if($){if(w===void 0)w=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,f,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,w),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $},F5=function($,U,f){const w="*."+f;for(let G in $){const W=$[G];if(w===W||U===W)return!0}return!1},z5=function($,U,f=">"){let w,G="";for(let W=U;W<$.length;W++){let L=$[W];if(w){if(L===w)w=""}else if(L==='"'||L==="'")w=L;else if(L===f[0])if(f[1]){if($[W+1]===f[1])return{data:G,index:W}}else return{data:G,index:W};else if(L==="\t")L=" ";G+=L}},e=function($,U,f,w){const G=$.indexOf(U,f);if(G===-1)throw new Error(w);else return G+U.length-1},i$=function($,U,f,w=">"){const G=z5($,U+1,w);if(!G)return;let W=G.data;const L=G.index,X=W.search(/\s/);let Z=W,M=!0;if(X!==-1)Z=W.substring(0,X),W=W.substring(X+1).trimStart();const E=Z;if(f){const Y=Z.indexOf(":");if(Y!==-1)Z=Z.substr(Y+1),M=Z!==G.data.substr(Y+1)}return{tagName:Z,tagExp:W,closeIndex:L,attrExpPresent:M,rawTagName:E}},Q5=function($,U,f){const w=f;let G=1;for(;f<$.length;f++)if($[f]==="<")if($[f+1]==="/"){const W=e($,">",f,`${U} is not closed`);if($.substring(f+2,W).trim()===U){if(G--,G===0)return{tagContent:$.substring(w,f),i:W}}f=W}else if($[f+1]==="?")f=e($,"?>",f+1,"StopNode is not closed.");else if($.substr(f+1,3)==="!--")f=e($,"-->",f+3,"StopNode is not closed.");else if($.substr(f+1,2)==="![")f=e($,"]]>",f,"StopNode is not closed.")-2;else{const W=i$($,f,">");if(W){if((W&&W.tagName)===U&&W.tagExp[W.tagExp.length-1]!=="/")G++;f=W.closeIndex}}},t$=function($,U,f){if(U&&typeof $==="string"){const w=$.trim();if(w==="true")return!0;else if(w==="false")return!1;else return w5($,f)}else if(M8.isExist($))return $;else return""},M8=j1(),x0=G8(),f5=L8(),w5=Z8();class E8{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,f)=>String.fromCharCode(Number.parseInt(f,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(U,f)=>String.fromCharCode(Number.parseInt(f,16))}},this.addExternalEntities=G5,this.parseXml=M5,this.parseTextData=W5,this.resolveNameSpace=L5,this.buildAttributesMap=Z5,this.isItStopNode=F5,this.replaceEntitiesValue=Y5,this.readStopNodeData=Q5,this.saveTextToParentTag=I5,this.addChild=E5}}var X5=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),M5=function($){$=$.replace(/\r\n?/g,"\n");const U=new x0("!xml");let f=U,w="",G="";for(let W=0;W<$.length;W++)if($[W]==="<")if($[W+1]==="/"){const X=e($,">",W,"Closing Tag is not closed.");let Z=$.substring(W+2,X).trim();if(this.options.removeNSPrefix){const Y=Z.indexOf(":");if(Y!==-1)Z=Z.substr(Y+1)}if(this.options.transformTagName)Z=this.options.transformTagName(Z);if(f)w=this.saveTextToParentTag(w,f,G);const M=G.substring(G.lastIndexOf(".")+1);if(Z&&this.options.unpairedTags.indexOf(Z)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${Z}>`);let E=0;if(M&&this.options.unpairedTags.indexOf(M)!==-1)E=G.lastIndexOf(".",G.lastIndexOf(".")-1),this.tagsNodeStack.pop();else E=G.lastIndexOf(".");G=G.substring(0,E),f=this.tagsNodeStack.pop(),w="",W=X}else if($[W+1]==="?"){let X=i$($,W,!1,"?>");if(!X)throw new Error("Pi Tag is not closed.");if(w=this.saveTextToParentTag(w,f,G),this.options.ignoreDeclaration&&X.tagName==="?xml"||this.options.ignorePiTags);else{const Z=new x0(X.tagName);if(Z.add(this.options.textNodeName,""),X.tagName!==X.tagExp&&X.attrExpPresent)Z[":@"]=this.buildAttributesMap(X.tagExp,G,X.tagName);this.addChild(f,Z,G)}W=X.closeIndex+1}else if($.substr(W+1,3)==="!--"){const X=e($,"-->",W+4,"Comment is not closed.");if(this.options.commentPropName){const Z=$.substring(W+4,X-2);w=this.saveTextToParentTag(w,f,G),f.add(this.options.commentPropName,[{[this.options.textNodeName]:Z}])}W=X}else if($.substr(W+1,2)==="!D"){const X=f5($,W);this.docTypeEntities=X.entities,W=X.i}else if($.substr(W+1,2)==="!["){const X=e($,"]]>",W,"CDATA is not closed.")-2,Z=$.substring(W+9,X);w=this.saveTextToParentTag(w,f,G);let M=this.parseTextData(Z,f.tagname,G,!0,!1,!0,!0);if(M==null)M="";if(this.options.cdataPropName)f.add(this.options.cdataPropName,[{[this.options.textNodeName]:Z}]);else f.add(this.options.textNodeName,M);W=X+2}else{let X=i$($,W,this.options.removeNSPrefix),Z=X.tagName;const M=X.rawTagName;let{tagExp:E,attrExpPresent:Y,closeIndex:F}=X;if(this.options.transformTagName)Z=this.options.transformTagName(Z);if(f&&w){if(f.tagname!=="!xml")w=this.saveTextToParentTag(w,f,G,!1)}const z=f;if(z&&this.options.unpairedTags.indexOf(z.tagname)!==-1)f=this.tagsNodeStack.pop(),G=G.substring(0,G.lastIndexOf("."));if(Z!==U.tagname)G+=G?"."+Z:Z;if(this.isItStopNode(this.options.stopNodes,G,Z)){let R="";if(E.length>0&&E.lastIndexOf("/")===E.length-1){if(Z[Z.length-1]==="/")Z=Z.substr(0,Z.length-1),G=G.substr(0,G.length-1),E=Z;else E=E.substr(0,E.length-1);W=X.closeIndex}else if(this.options.unpairedTags.indexOf(Z)!==-1)W=X.closeIndex;else{const q=this.readStopNodeData($,M,F+1);if(!q)throw new Error(`Unexpected end of ${M}`);W=q.i,R=q.tagContent}const J=new x0(Z);if(Z!==E&&Y)J[":@"]=this.buildAttributesMap(E,G,Z);if(R)R=this.parseTextData(R,Z,G,!0,Y,!0,!0);G=G.substr(0,G.lastIndexOf(".")),J.add(this.options.textNodeName,R),this.addChild(f,J,G)}else{if(E.length>0&&E.lastIndexOf("/")===E.length-1){if(Z[Z.length-1]==="/")Z=Z.substr(0,Z.length-1),G=G.substr(0,G.length-1),E=Z;else E=E.substr(0,E.length-1);if(this.options.transformTagName)Z=this.options.transformTagName(Z);const R=new x0(Z);if(Z!==E&&Y)R[":@"]=this.buildAttributesMap(E,G,Z);this.addChild(f,R,G),G=G.substr(0,G.lastIndexOf("."))}else{const R=new x0(Z);if(this.tagsNodeStack.push(f),Z!==E&&Y)R[":@"]=this.buildAttributesMap(E,G,Z);this.addChild(f,R,G),f=R}w="",W=F}}else w+=$[W];return U.child},Y5=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){const f=this.docTypeEntities[U];$=$.replace(f.regx,f.val)}for(let U in this.lastEntities){const f=this.lastEntities[U];$=$.replace(f.regex,f.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){const f=this.htmlEntities[U];$=$.replace(f.regex,f.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};Y8.exports=E8});var z8=Q((B5)=>{var R5=function($,U){return F8($,U)},F8=function($,U,f){let w;const G={};for(let W=0;W<$.length;W++){const L=$[W],X=J5(L);let Z="";if(f===void 0)Z=X;else Z=f+"."+X;if(X===U.textNodeName)if(w===void 0)w=L[X];else w+=""+L[X];else if(X===void 0)continue;else if(L[X]){let M=F8(L[X],U,Z);const E=K5(M,U);if(L[":@"])A5(M,L[":@"],Z,U);else if(Object.keys(M).length===1&&M[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)M=M[U.textNodeName];else if(Object.keys(M).length===0)if(U.alwaysCreateTextNode)M[U.textNodeName]="";else M="";if(G[X]!==void 0&&G.hasOwnProperty(X)){if(!Array.isArray(G[X]))G[X]=[G[X]];G[X].push(M)}else if(U.isArray(X,Z,E))G[X]=[M];else G[X]=M}}if(typeof w==="string"){if(w.length>0)G[U.textNodeName]=w}else if(w!==void 0)G[U.textNodeName]=w;return G},J5=function($){const U=Object.keys($);for(let f=0;f<U.length;f++){const w=U[f];if(w!==":@")return w}},A5=function($,U,f,w){if(U){const G=Object.keys(U),W=G.length;for(let L=0;L<W;L++){const X=G[L];if(w.isArray(X,f+"."+X,!0,!0))$[X]=[U[X]];else $[X]=U[X]}}},K5=function($,U){const{textNodeName:f}=U,w=Object.keys($).length;if(w===0)return!0;if(w===1&&($[f]||typeof $[f]==="boolean"||$[f]===0))return!0;return!1};B5.prettify=R5});var J8=Q((uR,R8)=>{var{buildOptions:q5}=U8(),T5=I8(),{prettify:H5}=z8(),V5=o$();class Q8{constructor($){this.externalEntities={},this.options=q5($)}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=V5.validate($,U);if(G!==!0)throw Error(`${G.err.msg}:${G.err.line}:${G.err.col}`)}const f=new T5(this.options);f.addExternalEntities(this.externalEntities);const w=f.parseXml($);if(this.options.preserveOrder||w===void 0)return w;else return H5(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}}R8.exports=Q8});var q8=Q((yR,O8)=>{var C5=function($,U){let f="";if(U.format&&U.indentBy.length>0)f="\n";return K8($,U,"",f)},K8=function($,U,f,w){let G="",W=!1;for(let L=0;L<$.length;L++){const X=$[L],Z=N5(X);if(Z===void 0)continue;let M="";if(f.length===0)M=Z;else M=`${f}.${Z}`;if(Z===U.textNodeName){let R=X[Z];if(!P5(M,U))R=U.tagValueProcessor(Z,R),R=B8(R,U);if(W)G+=w;G+=R,W=!1;continue}else if(Z===U.cdataPropName){if(W)G+=w;G+=`<![CDATA[${X[Z][0][U.textNodeName]}]]>`,W=!1;continue}else if(Z===U.commentPropName){G+=w+`<!--${X[Z][0][U.textNodeName]}-->`,W=!0;continue}else if(Z[0]==="?"){const R=A8(X[":@"],U),J=Z==="?xml"?"":w;let q=X[Z][0][U.textNodeName];q=q.length!==0?" "+q:"",G+=J+`<${Z}${q}${R}?>`,W=!0;continue}let E=w;if(E!=="")E+=U.indentBy;const Y=A8(X[":@"],U),F=w+`<${Z}${Y}`,z=K8(X[Z],U,M,E);if(U.unpairedTags.indexOf(Z)!==-1)if(U.suppressUnpairedNode)G+=F+">";else G+=F+"/>";else if((!z||z.length===0)&&U.suppressEmptyNode)G+=F+"/>";else if(z&&z.endsWith(">"))G+=F+`>${z}${w}</${Z}>`;else{if(G+=F+">",z&&w!==""&&(z.includes("/>")||z.includes("</")))G+=w+U.indentBy+z+w;else G+=z;G+=`</${Z}>`}W=!0}return G},N5=function($){const U=Object.keys($);for(let f=0;f<U.length;f++){const w=U[f];if(!$.hasOwnProperty(w))continue;if(w!==":@")return w}},A8=function($,U){let f="";if($&&!U.ignoreAttributes)for(let w in $){if(!$.hasOwnProperty(w))continue;let G=U.attributeValueProcessor(w,$[w]);if(G=B8(G,U),G===!0&&U.suppressBooleanAttributes)f+=` ${w.substr(U.attributeNamePrefix.length)}`;else f+=` ${w.substr(U.attributeNamePrefix.length)}="${G}"`}return f},P5=function($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let f=$.substr($.lastIndexOf(".")+1);for(let w in U.stopNodes)if(U.stopNodes[w]===$||U.stopNodes[w]==="*."+f)return!0;return!1},B8=function($,U){if($&&$.length>0&&U.processEntities)for(let f=0;f<U.entities.length;f++){const w=U.entities[f];$=$.replace(w.regex,w.val)}return $};O8.exports=C5});var H8=Q((pR,T8)=>{var n=function($){if(this.options=Object.assign({},j5,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=h5;if(this.processTextOrObjNode=b5,this.options.format)this.indentate=k5,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},b5=function($,U,f){const w=this.j2x($,f+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,w.attrStr,f);else return this.buildObjectNode(w.val,U,w.attrStr,f)},k5=function($){return this.options.indentBy.repeat($)},h5=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},S5=q8(),j5={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};n.prototype.build=function($){if(this.options.preserveOrder)return S5($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};n.prototype.j2x=function($,U){let f="",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 W=this.isAttribute(G);if(W)f+=this.buildAttrPairStr(W,""+$[G]);else if(G===this.options.textNodeName){let L=this.options.tagValueProcessor(G,""+$[G]);w+=this.replaceEntitiesValue(L)}else w+=this.buildTextValNode($[G],G,"",U)}else if(Array.isArray($[G])){const W=$[G].length;let L="",X="";for(let Z=0;Z<W;Z++){const M=$[G][Z];if(typeof M==="undefined");else if(M===null)if(G[0]==="?")w+=this.indentate(U)+"<"+G+"?"+this.tagEndChar;else w+=this.indentate(U)+"<"+G+"/"+this.tagEndChar;else if(typeof M==="object")if(this.options.oneListGroup){const E=this.j2x(M,U+1);if(L+=E.val,this.options.attributesGroupName&&M.hasOwnProperty(this.options.attributesGroupName))X+=E.attrStr}else L+=this.processTextOrObjNode(M,G,U);else if(this.options.oneListGroup){let E=this.options.tagValueProcessor(G,M);E=this.replaceEntitiesValue(E),L+=E}else L+=this.buildTextValNode(M,G,"",U)}if(this.options.oneListGroup)L=this.buildObjectNode(L,G,X,U);w+=L}else if(this.options.attributesGroupName&&G===this.options.attributesGroupName){const W=Object.keys($[G]),L=W.length;for(let X=0;X<L;X++)f+=this.buildAttrPairStr(W[X],""+$[G][W[X]])}else w+=this.processTextOrObjNode($[G],G,U)}return{attrStr:f,val:w}};n.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};n.prototype.buildObjectNode=function($,U,f,w){if($==="")if(U[0]==="?")return this.indentate(w)+"<"+U+f+"?"+this.tagEndChar;else return this.indentate(w)+"<"+U+f+this.closeTag(U)+this.tagEndChar;else{let G="</"+U+this.tagEndChar,W="";if(U[0]==="?")W="?",G="";if((f||f==="")&&$.indexOf("<")===-1)return this.indentate(w)+"<"+U+f+W+">"+$+G;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&W.length===0)return this.indentate(w)+`<!--${$}-->`+this.newLine;else return this.indentate(w)+"<"+U+f+W+this.tagEndChar+$+this.indentate(w)+G}};n.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};n.prototype.buildTextValNode=function($,U,f,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+f+"?"+this.tagEndChar;else{let G=this.options.tagValueProcessor(U,$);if(G=this.replaceEntitiesValue(G),G==="")return this.indentate(w)+"<"+U+f+this.closeTag(U)+this.tagEndChar;else return this.indentate(w)+"<"+U+f+">"+G+"</"+U+this.tagEndChar}};n.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const f=this.options.entities[U];$=$.replace(f.regex,f.val)}return $};T8.exports=n});var C8=Q((dR,V8)=>{var D5=o$(),c5=J8(),x5=H8();V8.exports={XMLParser:c5,XMLValidator:D5,XMLBuilder:x5}});var k8=Q((gR,b8)=>{var{defineProperty:b1,getOwnPropertyDescriptor:_5,getOwnPropertyNames:v5}=Object,u5=Object.prototype.hasOwnProperty,P=($,U)=>b1($,"name",{value:U,configurable:!0}),y5=($,U)=>{for(var f in U)b1($,f,{get:U[f],enumerable:!0})},p5=($,U,f,w)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let G of v5(U))if(!u5.call($,G)&&G!==f)b1($,G,{get:()=>U[G],enumerable:!(w=_5(U,G))||w.enumerable})}return $},d5=($)=>p5(b1({},"__esModule",{value:!0}),$),N8={};y5(N8,{_toBool:()=>s5,_toNum:()=>n5,_toStr:()=>g5,awsExpectUnion:()=>l5,loadRestJsonErrorCode:()=>i5,loadRestXmlErrorCode:()=>$E,parseJsonBody:()=>S8,parseJsonErrorBody:()=>o5,parseXmlBody:()=>j8,parseXmlErrorBody:()=>e5});b8.exports=d5(N8);var g5=P(($)=>{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"),s5=P(($)=>{if($==null)return $;if(typeof $==="string"){const U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){const f=new Error(`Received string "${$}" where a boolean was expected.`);f.name="Warning",console.warn(f)}return $!==""&&U!=="false"}return $},"_toBool"),n5=P(($)=>{if($==null)return $;if(typeof $==="string"){const U=Number($);if(U.toString()!==$){const f=new Error(`Received string "${$}" where a number was expected.`);return f.name="Warning",console.warn(f),$}return U}return $},"_toNum"),m5=Z0(),l5=P(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return m5.expectUnion($)},"awsExpectUnion"),r5=Z0(),P8=P(($,U)=>r5.collectBody($,U).then((f)=>U.utf8Encoder(f)),"collectBodyString"),S8=P(($,U)=>P8($,U).then((f)=>{if(f.length)try{return JSON.parse(f)}catch(w){if((w==null?void 0:w.name)==="SyntaxError")Object.defineProperty(w,"$responseBodyText",{value:f});throw w}return{}}),"parseJsonBody"),o5=P(async($,U)=>{const f=await S8($,U);return f.message=f.message??f.Message,f},"parseJsonErrorBody"),i5=P(($,U)=>{const f=P((W,L)=>Object.keys(W).find((X)=>X.toLowerCase()===L.toLowerCase()),"findKey"),w=P((W)=>{let L=W;if(typeof L==="number")L=L.toString();if(L.indexOf(",")>=0)L=L.split(",")[0];if(L.indexOf(":")>=0)L=L.split(":")[0];if(L.indexOf("#")>=0)L=L.split("#")[1];return L},"sanitizeErrorCode"),G=f($.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"),t5=Z0(),a5=C8(),j8=P(($,U)=>P8($,U).then((f)=>{if(f.length){const w=new a5.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(Z,M)=>M.trim()===""&&M.includes("\n")?"":void 0});w.addEntity("#xD","\r"),w.addEntity("#10","\n");let G;try{G=w.parse(f,!0)}catch(Z){if(Z&&typeof Z==="object")Object.defineProperty(Z,"$responseBodyText",{value:f});throw Z}const W="#text",L=Object.keys(G)[0],X=G[L];if(X[W])X[L]=X[W],delete X[W];return t5.getValueFromTextNode(X)}return{}}),"parseXmlBody"),e5=P(async($,U)=>{const f=await j8($,U);if(f.Error)f.Error.message=f.Error.message??f.Error.Message;return f},"parseXmlErrorBody"),$E=P(($,U)=>{var f;if(((f=U==null?void 0:U.Error)==null?void 0:f.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 fE=Q((_0)=>{Object.defineProperty(_0,"__esModule",{value:!0});var a$=UE();a$.__exportStar(JW(),_0);a$.__exportStar(lW(),_0);a$.__exportStar(k8(),_0)});var x=U0(u1(),1),DE=x.default.v1,cE=x.default.v3,tU=x.default.v4,xE=x.default.v5,_E=x.default.NIL,vE=x.default.version,uE=x.default.validate,yE=x.default.stringify,pE=x.default.parse;function sE($){return $}var W6=($)=>(U)=>async(f)=>{if(!S.isInstance(f.request))return U(f);const{request:w}=f,{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 W=w.hostname;if(w.port!=null)W+=`:${w.port}`;w.headers.host=W}return U(f)},L6={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},nE=($)=>({applyToStack:(U)=>{U.add(W6($),L6)}});var X6=()=>($,U)=>async(f)=>{try{const w=await $(f),{clientName:G,commandName:W,logger:L,dynamoDbDocumentClientOptions:X={}}=U,{overrideInputFilterSensitiveLog:Z,overrideOutputFilterSensitiveLog:M}=X,E=Z??U.inputFilterSensitiveLog,Y=M??U.outputFilterSensitiveLog,{$metadata:F,...z}=w.output;return L?.info?.({clientName:G,commandName:W,input:E(f.input),output:Y(z),metadata:F}),w}catch(w){const{clientName:G,commandName:W,logger:L,dynamoDbDocumentClientOptions:X={}}=U,{overrideInputFilterSensitiveLog:Z}=X,M=Z??U.inputFilterSensitiveLog;throw L?.error?.({clientName:G,commandName:W,input:M(f.input),error:w,metadata:w.$metadata}),w}},Z6={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},lE=($)=>({applyToStack:(U)=>{U.add(X6(),Z6)}});var aU="X-Amzn-Trace-Id",M6="AWS_LAMBDA_FUNCTION_NAME",E6="_X_AMZN_TRACE_ID",Y6=($)=>(U)=>async(f)=>{const{request:w}=f;if(!S.isInstance(w)||$.runtime!=="node"||w.headers.hasOwnProperty(aU))return U(f);const G=process.env[M6],W=process.env[E6],L=(X)=>typeof X==="string"&&X.length>0;if(L(G)&&L(W))w.headers[aU]=W;return U({...f,request:w})},I6={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},aE=($)=>({applyToStack:(U)=>{U.add(Y6($),I6)}});function KY($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}var kM=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}$"),S0=($)=>kM.test($)||$.startsWith("[")&&$.endsWith("]");var hM=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),j0=($,U=!1)=>{if(!U)return hM.test($);const f=$.split(".");for(let w of f)if(!j0(w))return!1;return!0};var b0={};var u="endpoints";function b($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${b($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(b).join(", ")})`;return JSON.stringify($,null,2)}class A extends Error{constructor($){super($);this.name="EndpointError"}}var CG=($,U)=>$===U;var NG=($)=>{const U=$.split("."),f=[];for(let w of U){const G=w.indexOf("[");if(G!==-1){if(w.indexOf("]")!==w.length-1)throw new A(`Path: '${$}' does not end with ']'`);const W=w.slice(G+1,-1);if(Number.isNaN(parseInt(W)))throw new A(`Invalid array index: '${W}' in path: '${$}'`);if(G!==0)f.push(w.slice(0,G));f.push(W)}else f.push(w)}return f};var X1=($,U)=>NG(U).reduce((f,w)=>{if(typeof f!=="object")throw new A(`Index '${w}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(f))return f[parseInt(w)];return f[w]},$);var PG=($)=>$!=null;var SG=($)=>!$;var K$={[Z1.HTTP]:80,[Z1.HTTPS]:443},jG=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:F,port:z,protocol:R="",path:J="",query:q={}}=$,wU=new URL(`${R}//${F}${z?`:${z}`:""}${J}`);return wU.search=Object.entries(q).map(([s8,n8])=>`${s8}=${n8}`).join("&"),wU}return new URL($)}catch(F){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const f=U.href,{host:w,hostname:G,pathname:W,protocol:L,search:X}=U;if(X)return null;const Z=L.slice(0,-1);if(!Object.values(Z1).includes(Z))return null;const M=S0(G),E=f.includes(`${w}:${K$[Z]}`)||typeof $==="string"&&$.includes(`${w}:${K$[Z]}`),Y=`${w}${E?`:${K$[Z]}`:""}`;return{scheme:Z,authority:Y,path:W,normalizedPath:W.endsWith("/")?W:`${W}/`,isIp:M}};var bG=($,U)=>$===U;var kG=($,U,f,w)=>{if(U>=f||$.length<f)return null;if(!w)return $.substring(U,f);return $.substring($.length-f,$.length-U)};var hG=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var DG={booleanEquals:CG,getAttr:X1,isSet:PG,isValidHostLabel:j0,not:SG,parseURL:jG,stringEquals:bG,substring:kG,uriEncode:hG};var M1=($,U)=>{const f=[],w={...U.endpointParams,...U.referenceRecord};let G=0;while(G<$.length){const W=$.indexOf("{",G);if(W===-1){f.push($.slice(G));break}f.push($.slice(G,W));const L=$.indexOf("}",W);if(L===-1){f.push($.slice(W));break}if($[W+1]==="{"&&$[L+1]==="}")f.push($.slice(W+1,L)),G=L+2;const X=$.substring(W+1,L);if(X.includes("#")){const[Z,M]=X.split("#");f.push(X1(w[Z],M))}else f.push(w[X]);G=L+1}return f.join("")};var cG=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var d=($,U,f)=>{if(typeof $==="string")return M1($,f);else if($.fn)return E1($,f);else if($.ref)return cG($,f);throw new A(`'${U}': ${String($)} is not a string, function or reference.`)};var E1=({fn:$,argv:U},f)=>{const w=U.map((W)=>["boolean","number"].includes(typeof W)?W:d(W,"arg",f)),G=$.split(".");if(G[0]in b0&&G[1]!=null)return b0[G[0]][G[1]](...w);return DG[$](...w)};var xG=({assign:$,...U},f)=>{if($&&$ in f.referenceRecord)throw new A(`'${$}' is already defined in Reference Record.`);const w=E1(U,f);return f.logger?.debug?.(`${u} evaluateCondition: ${b(U)} = ${b(w)}`),{result:w===""?!0:!!w,...$!=null&&{toAssign:{name:$,value:w}}}};var Y0=($=[],U)=>{const f={};for(let w of $){const{result:G,toAssign:W}=xG(w,{...U,referenceRecord:{...U.referenceRecord,...f}});if(!G)return{result:G};if(W)f[W.name]=W.value,U.logger?.debug?.(`${u} assign: ${W.name} := ${b(W.value)}`)}return{result:!0,referenceRecord:f}};var _G=($,U)=>Object.entries($).reduce((f,[w,G])=>({...f,[w]:G.map((W)=>{const L=d(W,"Header value entry",U);if(typeof L!=="string")throw new A(`Header '${w}' value '${L}' is not a string`);return L})}),{});var B$=($,U)=>{if(Array.isArray($))return $.map((f)=>B$(f,U));switch(typeof $){case"string":return M1($,U);case"object":if($===null)throw new A(`Unexpected endpoint property: ${$}`);return Y1($,U);case"boolean":return $;default:throw new A(`Unexpected endpoint property type: ${typeof $}`)}};var Y1=($,U)=>Object.entries($).reduce((f,[w,G])=>({...f,[w]:B$(G,U)}),{});var vG=($,U)=>{const f=d($,"Endpoint URL",U);if(typeof f==="string")try{return new URL(f)}catch(w){throw console.error(`Failed to construct URL with ${f}`,w),w}throw new A(`Endpoint URL must be a string, got ${typeof f}`)};var uG=($,U)=>{const{conditions:f,endpoint:w}=$,{result:G,referenceRecord:W}=Y0(f,U);if(!G)return;const L={...U,referenceRecord:{...U.referenceRecord,...W}},{url:X,properties:Z,headers:M}=w;return U.logger?.debug?.(`${u} Resolving endpoint from template: ${b(w)}`),{...M!=null&&{headers:_G(M,L)},...Z!=null&&{properties:Y1(Z,L)},url:vG(X,L)}};var yG=($,U)=>{const{conditions:f,error:w}=$,{result:G,referenceRecord:W}=Y0(f,U);if(!G)return;throw new A(d(w,"Error",{...U,referenceRecord:{...U.referenceRecord,...W}}))};var pG=($,U)=>{const{conditions:f,rules:w}=$,{result:G,referenceRecord:W}=Y0(f,U);if(!G)return;return I1(w,{...U,referenceRecord:{...U.referenceRecord,...W}})};var I1=($,U)=>{for(let f of $)if(f.type==="endpoint"){const w=uG(f,U);if(w)return w}else if(f.type==="error")yG(f,U);else if(f.type==="tree"){const w=pG(f,U);if(w)return w}else throw new A(`Unknown endpoint rule: ${f}`);throw new A("Rules evaluation failed")};var DM=($,U)=>{const{endpointParams:f,logger:w}=U,{parameters:G,rules:W}=$;U.logger?.debug?.(`${u} Initial EndpointParams: ${b(f)}`);const L=Object.entries(G).filter(([,M])=>M.default!=null).map(([M,E])=>[M,E.default]);if(L.length>0)for(let[M,E]of L)f[M]=f[M]??E;const X=Object.entries(G).filter(([,M])=>M.required).map(([M])=>M);for(let M of X)if(f[M]==null)throw new A(`Missing required parameter: '${M}'`);const Z=I1(W,{endpointParams:f,logger:w,referenceRecord:{}});if(U.endpointParams?.Endpoint)try{const M=new URL(U.endpointParams.Endpoint),{protocol:E,port:Y}=M;Z.url.protocol=E,Z.url.port=Y}catch(M){}return U.logger?.debug?.(`${u} Resolved endpoint: ${b(Z)}`),Z};var O$=($,U=!1)=>{if(U){for(let f of $.split("."))if(!O$(f))return!1;return!0}if(!j0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(S0($))return!1;return!0};var dG=($)=>{const U=$.split(":");if(U.length<6)return null;const[f,w,G,W,L,...X]=U;if(f!=="arn"||w===""||G===""||X[0]==="")return null;return{partition:w,service:G,region:W,accountId:L,resourceId:X[0].includes("/")?X[0].split("/"):X}};var gG={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"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 xM=gG,_M="",sG=($)=>{const{partitions:U}=xM;for(let w of U){const{regions:G,outputs:W}=w;for(let[L,X]of Object.entries(G))if(L===$)return{...W,...X}}for(let w of U){const{regionRegex:G,outputs:W}=w;if(new RegExp(G).test($))return{...W}}const f=U.find((w)=>w.id==="aws");if(!f)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...f.outputs}};var nG=()=>_M;var vM={isVirtualHostableS3Bucket:O$,parseArn:dG,partition:sG};b0.aws=vM;var q$="user-agent",F1="x-amz-user-agent",T$=" ",z1="/",mG=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,lG=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,H$="-";var uM=($)=>(U,f)=>async(w)=>{const{request:G}=w;if(!S.isInstance(G))return U(w);const{headers:W}=G,L=f?.userAgent?.map(V$)||[],X=(await $.defaultUserAgentProvider()).map(V$),Z=$?.customUserAgent?.map(V$)||[],M=nG(),E=(M?[M]:[]).concat([...X,...L,...Z]).join(T$),Y=[...X.filter((F)=>F.startsWith("aws-sdk-")),...Z].join(T$);if($.runtime!=="browser"){if(Y)W[F1]=W[F1]?`${W[q$]} ${Y}`:Y;W[q$]=E}else W[F1]=E;return U({...w,request:G})},V$=($)=>{const U=$[0].split(z1).map((L)=>L.replace(mG,H$)).join(z1),f=$[1]?.replace(lG,H$),w=U.indexOf(z1),G=U.substring(0,w);let W=U.substring(w+1);if(G==="api")W=W.toLowerCase();return[G,W,f].filter((L)=>L&&L.length>0).reduce((L,X,Z)=>{switch(Z){case 0:return X;case 1:return`${L}/${X}`;default:return`${L}#${X}`}},"")},yM={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},eF=($)=>({applyToStack:(U)=>{U.add(uM($),yM)}});var Q1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var C$=($)=>Q1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var M7=($)=>{const{region:U,useFipsEndpoint:f}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return C$(U);const w=await U();return C$(w)},useFipsEndpoint:async()=>{const w=typeof U==="string"?U:await U();if(Q1(w))return!0;return typeof f!=="function"?Promise.resolve(!!f):f()}}};var I0=($,U,f)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${f} "${U}". Expected "true" or "false", got ${$[U]}.`)};var g;(function($){$.ENV="env",$.CONFIG="shared config entry"})(g||(g={}));var pM="AWS_USE_DUALSTACK_ENDPOINT",dM="use_dualstack_endpoint";var K7={environmentVariableSelector:($)=>I0($,pM,g.ENV),configFileSelector:($)=>I0($,dM,g.CONFIG),default:!1};var gM="AWS_USE_FIPS_ENDPOINT",sM="use_fips_endpoint";var q7={environmentVariableSelector:($)=>I0($,gM,g.ENV),configFileSelector:($)=>I0($,sM,g.CONFIG),default:!1};var rG=($)=>$[N$]||($[N$]={});var y=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var oG={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},d7={preferredFile:"credentials"};function nM($){return(U)=>async(f)=>{const w=f.request;if(S.isInstance(w)){const{body:G,headers:W}=w;if(G&&Object.keys(W).map((L)=>L.toLowerCase()).indexOf(iG)===-1)try{const L=$(G);w.headers={...w.headers,[iG]:String(L)}}catch(L){}}return U({...f,request:w})}}var iG="content-length",mM={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Qz=($)=>({applyToStack:(U)=>{U.add(nM($.bodyLengthChecker),mM)}});var tG=($,U)=>(f)=>async(w)=>{const{response:G}=await f(w);try{const W=await U(G,$);return{response:G,output:W}}catch(W){if(Object.defineProperty(W,"$response",{value:G}),!("$metadata"in W)){if(W.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof W.$responseBodyText!=="undefined"){if(W.$response)W.$response.body=W.$responseBodyText}}throw W}};var aG=($,U)=>(f,w)=>async(G)=>{const W=w.endpointV2?.url&&$.urlParser?async()=>$.urlParser(w.endpointV2.url):$.endpoint;if(!W)throw new Error("No valid endpoint provider available.");const L=await U(G.input,{...$,endpoint:W});return f({...G,request:L})};function Oz($,U,f){return{applyToStack:(w)=>{w.add(tG($,f),lM),w.add(aG($,U),P$)}}}var lM={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},P$={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var eG=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(aM(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!tM(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},rM=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,oM=/(\d+\.){3}\d+/,iM=/\.\./;var tM=($)=>rM.test($)&&!oM.test($)&&!iM.test($),aM=($)=>{const[U,f,w,,,G]=$.split(":"),W=U==="arn"&&$.split(":").length>=6,L=Boolean(W&&f&&w&&G);if(W&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L};var $W=($,U,f)=>{const w=async()=>{const G=f[$]??f[U];if(typeof G==="function")return G();return G};if($==="credentialScope"||U==="CredentialScope")return async()=>{const G=typeof f.credentials==="function"?await f.credentials():f.credentials;return G?.credentialScope??G?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const G=typeof f.credentials==="function"?await f.credentials():f.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:W,hostname:L,port:X,path:Z}=G;return`${W}//${L}${X?":"+X:""}${Z}`}}return G};return w};var UW="AWS_ENDPOINT_URL",fW="endpoint_url",wW=($)=>({environmentVariableSelector:(U)=>{const f=$.split(" ").map((W)=>W.toUpperCase()),w=U[[UW,...f].join("_")];if(w)return w;const G=U[UW];if(G)return G;return},configFileSelector:(U,f)=>{if(f&&U.services){const G=f[["services",U.services].join(S$)];if(G){const W=$.split(" ").map((X)=>X.toLowerCase()),L=G[[W.join("_"),fW].join(S$)];if(L)return L}}const w=U[fW];if(w)return w;return},default:void 0});var GW=async($)=>o(wW($))();var j$=U0(sf(),1),R1=($)=>{if(typeof $==="object"){if("url"in $)return j$.parseUrl($.url);return $}return j$.parseUrl($)};var WW=async($,U,f,w)=>{if(!f.endpoint){const L=await GW(f.serviceId||"");if(L)f.endpoint=()=>Promise.resolve(R1(L))}const G=await eM($,U,f);if(typeof f.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return f.endpointProvider(G,w)},eM=async($,U,f)=>{const w={},G=U?.getEndpointParameterInstructions?.()||{};for(let[W,L]of Object.entries(G))switch(L.type){case"staticContextParams":w[W]=L.value;break;case"contextParams":w[W]=$[L.name];break;case"clientContextParams":case"builtInParams":w[W]=await $W(L.name,W,f)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(G).length===0)Object.assign(w,f);if(String(f.serviceId).toLowerCase()==="s3")await eG(w);return w};var LW=({config:$,instructions:U})=>{return(f,w)=>async(G)=>{const W=await WW(G.input,{getEndpointParameterInstructions(){return U}},{...$},w);w.endpointV2=W,w.authSchemes=W.properties?.authSchemes;const L=w.authSchemes?.[0];if(L){w.signing_region=L.signingRegion,w.signing_service=L.signingName;const Z=rG(w)?.selectedHttpAuthScheme?.httpAuthOption;if(Z)Z.signingProperties=Object.assign(Z.signingProperties||{},{signing_region:L.signingRegion,signingRegion:L.signingRegion,signing_service:L.signingName,signingName:L.signingName,signingRegionSet:L.signingRegionSet},L.properties)}return f({...G})}};var $2={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:P$.name},lz=($,U)=>({applyToStack:(f)=>{f.addRelativeTo(LW({config:$,instructions:U}),$2)}});var tz=($)=>{const U=$.tls??!0,{endpoint:f}=$,w=f!=null?async()=>R1(await y(f)()):void 0;return{...$,endpoint:w,tls:U,isCustomEndpoint:!!f,useDualstackEndpoint:y($.useDualstackEndpoint??!1),useFipsEndpoint:y($.useFipsEndpoint??!1)}};var c;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(c||(c={}));var i=3,XW=c.STANDARD;var ZW=U0(r(),1);class J1{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;const U=this.getCurrentTimeInSeconds();this.lastThrottleTime=U,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.currentCapacity){const U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((f)=>setTimeout(f,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),ZW.isThrottlingError($)){const w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const f=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(f)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const f=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(f*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var t=100,k0=20000,b$=500,A1=500,k$=5,h$=10,D$=1,K1="amz-sdk-invocation-id",B1="amz-sdk-request";var MW=()=>{let $=t;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(k0,Math.random()*2**w*$))},setDelayBase:(w)=>{$=w}}};var c$=({retryDelay:$,retryCount:U,retryCost:f})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(k0,$),getRetryCost:()=>f}};class F0{constructor($){this.maxAttempts=$,this.mode=c.STANDARD,this.capacity=A1,this.retryBackoffStrategy=MW(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return c$({retryDelay:t,retryCount:0})}async refreshRetryTokenForRetry($,U){const f=await this.getMaxAttempts();if(this.shouldRetry($,U,f)){const w=U.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?b$:t);const G=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),W=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,G):G,L=this.getCapacityCost(w);return this.capacity-=L,c$({retryDelay:W,retryCount:$.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(A1,this.capacity+($.getRetryCost()??D$))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${i}`),i}}shouldRetry($,U,f){return $.getRetryCount()+1<f&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?h$:k$}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class x${constructor($,U){this.maxAttemptsProvider=$,this.mode=c.ADAPTIVE;const{rateLimiter:f}=U??{};this.rateLimiter=f??new J1,this.standardRetryStrategy=new F0($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry($,U)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}}var EW="AWS_MAX_ATTEMPTS",YW="max_attempts",_Q={environmentVariableSelector:($)=>{const U=$[EW];if(!U)return;const f=parseInt(U);if(Number.isNaN(f))throw new Error(`Environment variable ${EW} mast be a number, got "${U}"`);return f},configFileSelector:($)=>{const U=$[YW];if(!U)return;const f=parseInt(U);if(Number.isNaN(f))throw new Error(`Shared config file entry ${YW} mast be a number, got "${U}"`);return f},default:i},vQ=($)=>{const{retryStrategy:U}=$,f=y($.maxAttempts??i);return{...$,maxAttempts:f,retryStrategy:async()=>{if(U)return U;if(await y($.retryMode)()===c.ADAPTIVE)return new x$(f);return new F0(f)}}},U2="AWS_RETRY_MODE",f2="retry_mode",uQ={environmentVariableSelector:($)=>$[U2],configFileSelector:($)=>$[f2],default:XW};var z0=U0(r(),1);import{Readable as w2} from"stream";var IW=($)=>$?.body instanceof w2||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var _$=($)=>{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 G2=($)=>(U,f)=>async(w)=>{let G=await $.retryStrategy();const W=await $.maxAttempts();if(W2(G)){G=G;let L=await G.acquireInitialRetryToken(f.partition_id),X=new Error,Z=0,M=0;const{request:E}=w,Y=S.isInstance(E);if(Y)E.headers[K1]=tU();while(!0)try{if(Y)E.headers[B1]=`attempt=${Z+1}; max=${W}`;const{response:F,output:z}=await U(w);return G.recordSuccess(L),z.$metadata.attempts=Z+1,z.$metadata.totalRetryDelay=M,{response:F,output:z}}catch(F){const z=L2(F);if(X=_$(F),Y&&IW(E))throw(f.logger instanceof FW?console:f.logger)?.warn("An error was encountered in a non-retryable streaming request."),X;try{L=await G.refreshRetryTokenForRetry(L,z)}catch(J){if(!X.$metadata)X.$metadata={};throw X.$metadata.attempts=Z+1,X.$metadata.totalRetryDelay=M,X}Z=L.getRetryCount();const R=L.getRetryDelay();M+=R,await new Promise((J)=>setTimeout(J,R))}}else{if(G=G,G?.mode)f.userAgent=[...f.userAgent||[],["cfg/retry-mode",G.mode]];return G.retry(U,w)}},W2=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",L2=($)=>{const U={error:$,errorType:X2($)},f=M2($.$response);if(f)U.retryAfterHint=f;return U},X2=($)=>{if(z0.isThrottlingError($))return"THROTTLING";if(z0.isTransientError($))return"TRANSIENT";if(z0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},Z2={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},iQ=($)=>({applyToStack:(U)=>{U.add(G2($),Z2)}}),M2=($)=>{if(!v$.isInstance($))return;const U=Object.keys($.headers).find((W)=>W.toLowerCase()==="retry-after");if(!U)return;const f=$.headers[U],w=Number(f);if(!Number.isNaN(w))return new Date(w*1000);return new Date(f)};var E2=U0(r(),1);var O1=U0(r(),1);import{platform as wE,release as GE} from"os";import{env as D8,versions as WE} from"process";var e$={isCrtAvailable:!1};var h8=()=>{if(e$.isCrtAvailable)return["md/crt-avail"];return null};var LE="AWS_SDK_UA_APP_ID",XE="sdk-ua-app-id",aR=({serviceId:$,clientVersion:U})=>{const f=[["aws-sdk-js",U],["ua","2.0"],[`os/${wE()}`,GE()],["lang/js"],["md/nodejs",`${WE.node}`]],w=h8();if(w)f.push(w);if($)f.push([`api/${$}`,U]);if(D8.AWS_EXECUTION_ENV)f.push([`exec-env/${D8.AWS_EXECUTION_ENV}`]);const G=o({environmentVariableSelector:(L)=>L[LE],configFileSelector:(L)=>L[XE],default:void 0})();let W=void 0;return async()=>{if(!W){const L=await G;W=L?[...f,[`app/${L}`]]:[...f]}return W}};var c8=($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]";import{Buffer as $U} from"buffer";var $0=($,U=0,f=$.byteLength-U)=>{if(!c8($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return $U.from($,U,f)},R0=($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?$U.from($,U):$U.from($)};var k1=($)=>{const U=R0($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var x8=($)=>{if(typeof $==="string")return k1($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)};var EJ=($)=>{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 ZE} from"buffer";import{createHash as ME,createHmac as EE} from"crypto";var _8=function($,U){if(ZE.isBuffer($))return $;if(typeof $==="string")return R0($,U);if(ArrayBuffer.isView($))return $0($.buffer,$.byteOffset,$.byteLength);return $0($)};class YE{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(x8(_8($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?EE(this.algorithmIdentifier,_8(this.secret)):ME(this.algorithmIdentifier)}}import{fstatSync as IE,lstatSync as FE} from"fs";var qJ=($)=>{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 FE($.path).size;else if(typeof $.fd==="number")return IE($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var v8="AWS_EXECUTION_ENV",UU="AWS_REGION",fU="AWS_DEFAULT_REGION",u8="AWS_EC2_METADATA_DISABLED",y8=["in-region","cross-region","mobile","standard","legacy"],p8="/latest/meta-data/placement/region";var d8={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var hJ=({region:$=o(oG),defaultsMode:U=o(d8)}={})=>g8(async()=>{const f=typeof U==="function"?await U():U;switch(f?.toLowerCase()){case"auto":return zE($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(f?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${y8.join(", ")}, got ${f}`)}}),zE=async($)=>{if($){const U=typeof $==="function"?await $():$,f=await QE();if(!f)return"standard";if(U===f)return"in-region";else return"cross-region"}return"standard"},QE=async()=>{if(process.env[v8]&&(process.env[UU]||process.env[fU]))return process.env[UU]??process.env[fU];if(!process.env[u8])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-5b8fb522ae72415c.js"),f=await $();return(await U({...f,path:p8})).toString()}catch($){}};var _J=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const f=$.region;if(typeof f==="string")return f;return f()};return{setRegion(f){U=f},region(){return U}}},vJ=($)=>{return{region:$.region()}};var JE=/^[A-Za-z0-9+/]*={0,2}$/,U3=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!JE.exec($))throw new TypeError("Invalid base64 string.");const U=R0($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};var W3=($)=>{let U;if(typeof $==="string")U=k1($);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{tU as N,sE as O,nE as P,lE as Q,aE as R,_W as S,I0 as T,g as U,A$ as V,rG as W,y as X,KY as Y,b0 as Z,DM as _,vM as $,eF as aa,K7 as ba,q7 as ca,oG as da,d7 as ea,M7 as fa,Qz as ga,eM as ha,Oz as ia,lz as ja,tz as ka,XW as la,_Q as ma,vQ as na,uQ as oa,iQ as pa,fE as qa,aR as ra,c8 as sa,k1 as ta,x8 as ua,EJ as va,YE as wa,qJ as xa,U3 as ya,W3 as za,hJ as Aa,_J as Ba,vJ as Ca};
@@ -0,0 +1,6 @@
1
+ // @bun
2
+ import{B as u} from"./chunk-24a86f8f5ddc0cbd.js";import{Fa as i,Qa as E,cb as y,rb as I} from"./chunk-8f3b5c5ff77a538d.js";import"./chunk-f6546172b47b47d2.js";import{Jb as n} from"./chunk-91b6ef5e24ab5b68.js";import R from"fs/promises";var T="169.254.170.2",x="169.254.170.23",P="[fd00:ec2::23]",d=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===T||e.hostname===x||e.hostname===P)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;const a=e.hostname.split("."),r=(t)=>{const s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new n(`URL not accepted. It must either be HTTPS or match one of the following:
3
+ - loopback CIDR 127.0.0.0/8 or [::1/128]
4
+ - ECS container host 169.254.170.2
5
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:c})};var C=u(E(),1);function S(e){return new i({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function g(e,c){const r=await C.sdkStreamMixin(e.body).transformToString();if(e.statusCode===200){const t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new n("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:y(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new n(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new n(`Server responded with status: ${e.statusCode}`,{logger:c})}var w=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var p="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",A="http://169.254.170.2",O="AWS_CONTAINER_CREDENTIALS_FULL_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",_="AWS_CONTAINER_AUTHORIZATION_TOKEN",v=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c;const a=e.awsContainerCredentialsRelativeUri??process.env[p],r=e.awsContainerCredentialsFullUri??process.env[O],t=e.awsContainerAuthorizationToken??process.env[_],s=e.awsContainerAuthorizationTokenFile??process.env[b],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(a&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${A}${a}`;else throw new n(`No HTTP credential provider host provided.
6
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});const h=new URL(c);d(h,e.logger);const K=new I({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return w(async()=>{const o=S(h);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await R.readFile(s)).toString();try{const f=await K.handle(o);return g(f.response)}catch(f){throw new n(String(f),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{v as fromHttp};
@@ -0,0 +1,9 @@
1
+ import{u as $,v as w,w as z} from"./chunk-90bbf6a9e83613c5.js";import{Ab as Z} from"./chunk-111f0589f69a05b1.js";import{Jb as q,Lb as G,Nb as Y} from"./chunk-91b6ef5e24ab5b68.js";var H="AWS_EC2_METADATA_DISABLED",Q=async(b)=>{const{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:x,fromContainerMetadata:y,fromInstanceMetadata:J}=await import("./chunk-5b8fb522ae72415c.js");if(process.env[x]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:K}=await import("./chunk-b42d49e516e08f8f.js");return G(K(b),y(b))}if(process.env[H])return async()=>{throw new q("EC2 Instance Metadata Service access disabled",{logger:b.logger})};return b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),J(b)};var X=!1,W=(b={})=>Y(G(async()=>{if(b.profile??process.env[Z]){if(process.env[$]&&process.env[w]){if(!X)(b.logger?.warn&&b.logger?.constructor?.name!=="NoOpLogger"?b.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
2
+ Multiple credential sources detected:
3
+ Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
4
+ This SDK will proceed with the AWS_PROFILE value.
5
+
6
+ However, a future version may change this behavior to prefer the ENV static credentials.
7
+ Please ensure that your environment only sets either the AWS_PROFILE or the
8
+ AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
9
+ `),X=!0}throw new q("AWS_PROFILE is set, skipping fromEnv provider.",{logger:b.logger,tryNextLink:!0})}return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),z(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:j,ssoAccountId:x,ssoRegion:y,ssoRoleName:J,ssoSession:K}=b;if(!j&&!x&&!y&&!J&&!K)throw new q("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:b.logger});const{fromSSO:B}=await import("./chunk-e78e6f198869b6d2.js");return B(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:j}=await import("./chunk-97dc0038c2c61747.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:j}=await import("./chunk-40944e185c025271.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:j}=await import("./chunk-b8d464c89c783b71.js");return j(b)()},async()=>{return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Q(b))()},async()=>{throw new q("Could not load credentials from any providers",{tryNextLink:!1,logger:b.logger})}),v,k),k=(b)=>b?.expiration!==void 0,v=(b)=>b?.expiration!==void 0&&b.expiration.getTime()-Date.now()<300000;export{W as zb};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-24a86f8f5ddc0cbd.js";import{Jb as E} from"./chunk-91b6ef5e24ab5b68.js";import{readFileSync as l} from"fs";var t=(e)=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:c,policyArns:i,policy:_,durationSeconds:N}=e;let{roleAssumerWithWebIdentity:s}=e;if(!s){const{getDefaultRoleAssumerWithWebIdentity:d}=await import("./chunk-f44ef133dae89ec6.js");s=d({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return s({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:c,PolicyArns:i,Policy:_,DurationSeconds:N})};var m="AWS_WEB_IDENTITY_TOKEN_FILE",S="AWS_ROLE_ARN",p="AWS_ROLE_SESSION_NAME",A=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const o=e?.webIdentityTokenFile??process.env[m],r=e?.roleArn??process.env[S],n=e?.roleSessionName??process.env[p];if(!o||!r)throw new E("Web identity configuration not specified",{logger:e.logger});return t({...e,webIdentityToken:l(o,{encoding:"ascii"}),roleArn:r,roleSessionName:n})()};export{t as fromWebToken,A as fromTokenFile};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-90bbf6a9e83613c5.js";import{B as k} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-ff8cd8fd047cfee5.js";import{$ as Pe,Aa as Ne,Ba as ir,Ca as lr,O as nr,P as or,Q as dr,R as yr,V as H,W as ee,X as re,Y as tr,Z as Ie,_ as Re,aa as ar,ba as We,ca as fe,da as Ae,ea as Ke,fa as mr,ga as wr,ia as S,ja as $,ka as kr,la as Me,ma as Be,na as vr,oa as Le,pa as Er,qa as q,ra as Ye,ta as je,va as Fe,wa as Ze,xa as He,ya as De,za as qe} from"./chunk-aead527dfd7392c4.js";import{Da as ue,Ea as er,Ha as be,Ja as cr,Sa as E,Ta as t,Ua as Vr,Wa as _,Xa as b,Ya as j,Za as F,_a as h,fb as Sr,gb as a,hb as jr,ib as Je,jb as Ve,kb as rr,lb as sr,nb as d,ob as o,qb as I,rb as Qe,sb as Xe} from"./chunk-8f3b5c5ff77a538d.js";import{tb as Qr,ub as R} from"./chunk-ecc1d0c7ff25f19f.js";import"./chunk-f6546172b47b47d2.js";import{zb as Ce} from"./chunk-b88d77955168b486.js";import"./chunk-111f0589f69a05b1.js";import"./chunk-91b6ef5e24ab5b68.js";var P=k(H(),1);var se=k(q(),1);var Mr=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},Z=function(e){return{schemeId:"smithy.api#noAuth"}},ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},le=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Mr(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},v={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oe={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.629.0","@aws-sdk/credential-provider-node":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.629.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var _e=k(q(),1);var Ue=k(q(),1),xe=k(H(),1);var ze=k(Qr(),1);var de={["required"]:!1,type:"String"},ye={["required"]:!0,default:!1,type:"Boolean"},ce={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Lr={version:"1.0",parameters:{Region:de,UseDualStack:ye,UseFIPS:ye,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ce]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ce,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:we,rules:[{conditions:[ae],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},$e=Lr;var Te=(e,s={})=>{return Re($e,{endpointParams:e,logger:s.logger})};Ie.aws=Pe;var Ge=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??De,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Te,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new Ue.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new xe.NoAuthSigner}],logger:e?.logger??new be,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??ze.parseUrl,utf8Decoder:e?.utf8Decoder??je,utf8Encoder:e?.utf8Encoder??Fe}};var pe=(e)=>{Ve(process.version);const s=Ne(e),r=()=>s().then(Je),i=Ge(e);return _e.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??He,credentialDefaultProvider:e?.credentialDefaultProvider??Ce,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ye({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??R(Be),region:e?.region??R(Ae,Ke),requestHandler:Qe.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Le,default:async()=>(await r()).retryMode||Me}),sha256:e?.sha256??Ze.bind(null,"sha256"),streamCollector:e?.streamCollector??Xe,useDualstackEndpoint:e?.useDualstackEndpoint??R(We),useFipsEndpoint:e?.useFipsEndpoint??R(fe)}};var ge=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((T)=>T.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},Oe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var U=(e)=>e,hr=(e,s)=>{const r={...U(ir(e)),...U(rr(e)),...U(ue(e)),...U(ge(e))};return s.forEach((i)=>i.configure(r)),{...e,...lr(r),...sr(r),...er(r),...Oe(r)}};class N extends cr{constructor(...[e]){const s=pe(e||{}),r=ne(s),i=tr(r),l=vr(i),n=mr(l),T=nr(n),fr=kr(T),Ar=he(fr),u=hr(Ar,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(ar(this.config)),this.middlewareStack.use(Er(this.config)),this.middlewareStack.use(wr(this.config)),this.middlewareStack.use(or(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Kr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Kr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class y extends Sr{constructor(e){super(e);Object.setPrototypeOf(this,y.prototype)}}class x extends y{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends y{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends y{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends y{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends y{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends y{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends y{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends y{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends y{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends y{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends y{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends y{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Q extends y{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}class X extends y{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}var $r=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Ir=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Rr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Pr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Tr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=k(q(),1),D=k(H(),1);var Fr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Dr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[ls]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(T)=>I(T),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Y=async(e,s)=>{const r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Yr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Zr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Hr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Nr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await _r(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Cr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Or(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await es(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await rs(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ss(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await is(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await ur(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await pr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await gr(r,s);default:const l=r.body;return Xr({output:e,parsedBody:l,errorCode:i})}},Xr=jr(y),Yr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new x({$metadata:c(e),...r});return a(n,e.body)},Zr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new z({$metadata:c(e),...r});return a(n,e.body)},Hr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new G({$metadata:c(e),...r});return a(n,e.body)},Nr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new J({$metadata:c(e),...r});return a(n,e.body)},_r=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new V({$metadata:c(e),...r});return a(n,e.body)},pr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Q({$metadata:c(e),...r});return a(n,e.body)},Cr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new W({$metadata:c(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new X({$metadata:c(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:c(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new L({$metadata:c(e),...r});return a(n,e.body)},es=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:c(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:c(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:c(e),...r});return a(n,e.body)},is=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new B({$metadata:c(e),...r});return a(n,e.body)},c=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var ls="aws_iam";class p extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f($r,Ir).ser(Fr).de(xr).build(){}class C extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Rr,Pr).ser(Dr).de(zr).build(){}class g extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Tr).ser(qr).de(Gr).build(){}class O extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[S(r,this.serialize,this.deserialize),$(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(br,void 0).ser(Ur).de(Jr).build(){}var hs={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class Wr extends N{}Vr(hs,Wr);export{cr as __Client,B as UnsupportedGrantTypeException,M as UnauthorizedClientException,br as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,K as SlowDownException,y as SSOOIDCServiceException,N as SSOOIDCClient,Wr as SSOOIDC,Tr as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,A as InvalidScopeException,L as InvalidRequestRegionException,f as InvalidRequestException,X as InvalidRedirectUriException,W as InvalidGrantException,Q as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Pr as CreateTokenWithIAMResponseFilterSensitiveLog,Rr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Ir as CreateTokenResponseFilterSensitiveLog,$r as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,E as $Command};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{B as c} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-ff8cd8fd047cfee5.js";import{$ as f,Aa as Ee,Ba as Je,Ca as Ue,O as Le,P as Ce,Q as Me,R as We,V as B,W as _,X as $,Y as Ke,Z as V,_ as N,aa as Qe,ba as pe,ca as ye,da as me,ea as he,fa as Xe,ga as Ye,ia as rs,ja as as,ka as Ze,la as ue,ma as we,na as je,oa as be,pa as Te,qa as x,ra as ke,ta as se,va as te,wa as Re,xa as qe,ya as re,za as ae} from"./chunk-aead527dfd7392c4.js";import{Da as Fe,Ea as _e,Ha as ee,Ja as Ae,Sa as ts,Ta as k,Ya as z,Za as Ve,_a as h,fb as He,gb as u,hb as Ne,ib as ie,jb as le,kb as $e,lb as Pe,nb as i,ob as y,qb as fe,rb as xe,sb as ve} from"./chunk-8f3b5c5ff77a538d.js";import{tb as ps,ub as l} from"./chunk-ecc1d0c7ff25f19f.js";import"./chunk-f6546172b47b47d2.js";import"./chunk-111f0589f69a05b1.js";import"./chunk-91b6ef5e24ab5b68.js";var p=c(B(),1);var P=c(x(),1);var cs=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}},b=function(e){return{schemeId:"smithy.api#noAuth"}},J=async(e,s,t)=>{return{operation:_(s).operation,region:await $(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},U=(e)=>{const s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(cs(e))}return s},I=(e)=>{return{...P.resolveAwsSdkSigV4Config(e)}};var L=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},C={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var M={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var Se=c(x(),1);var ne=c(x(),1),de=c(B(),1);var oe=c(ps(),1);var W={["required"]:!1,type:"String"},A={["required"]:!0,default:!1,type:"Boolean"},K={["ref"]:"Endpoint"},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},H={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},Q={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},O={["ref"]:"PartitionResult"},X={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[O,"supportsDualStack"]}]},Y=[T],Z=[H],j=[{["ref"]:"Region"}],ls={version:"1.0",parameters:{Region:W,UseDualStack:A,UseFIPS:A,Endpoint:W},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[K]}],rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:K,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:j}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:j,assign:"PartitionResult"}],rules:[{conditions:[T,H],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Q]},X],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Q,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[O,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Z,rules:[{conditions:[X],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},G=ls;var g=(e,s={})=>{return N(G,{endpointParams:e,logger:s.logger})};V.aws=f;var ce=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??re,base64Encoder:e?.base64Encoder??ae,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??g,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??U,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new ne.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new de.NoAuthSigner}],logger:e?.logger??new ee,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??oe.parseUrl,utf8Decoder:e?.utf8Decoder??se,utf8Encoder:e?.utf8Encoder??te}};var ze=(e)=>{le(process.version);const s=Ee(e),t=()=>s().then(ie),r=ce(e);return Se.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??qe,defaultUserAgentProvider:e?.defaultUserAgentProvider??ke({serviceId:r.serviceId,clientVersion:M.version}),maxAttempts:e?.maxAttempts??l(we),region:e?.region??l(me,he),requestHandler:xe.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...be,default:async()=>(await t()).retryMode||ue}),sha256:e?.sha256??Re.bind(null,"sha256"),streamCollector:e?.streamCollector??ve,useDualstackEndpoint:e?.useDualstackEndpoint??l(pe),useFipsEndpoint:e?.useFipsEndpoint??l(ye)}};var De=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){const n=s.findIndex((D)=>D.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Be=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var v=(e)=>e,Ie=(e,s)=>{const t={...v(Je(e)),...v($e(e)),...v(Fe(e)),...v(De(e))};return s.forEach((r)=>r.configure(t)),{...e,...Ue(t),...Pe(t),..._e(t),...Be(t)}};class ys extends Ae{constructor(...[e]){const s=ze(e||{}),t=L(s),r=Ke(t),a=je(r),n=Xe(a),D=Le(n),ns=Ze(D),ds=I(ns),F=Ie(ds,e?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(Ye(this.config)),this.middlewareStack.use(Ce(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:async(os)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":os.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class o extends He{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class R extends o{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,R.prototype)}}class q extends o{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class E extends o{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class S extends o{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}var Oe=(e)=>({...e,...e.accessToken&&{accessToken:k}}),ms=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:k},...e.sessionToken&&{sessionToken:k}}),Ge=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ms(e.roleCredentials)}});var m=c(x(),1),ge=c(B(),1);var es=async(e,s)=>{const t=ge.requestBuilder(e,s),r=i({},ks,{[Ds]:e[qs]});t.bp("/federation/credentials");const a=i({[zs]:[,z(e[Ss],"roleName")],[Es]:[,z(e[Rs],"accountId")]});let n;return t.m("GET").h(r).q(a).b(n),t.build()};var ss=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return hs(e,s);const t=i({$metadata:w(e)}),r=z(Ve(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:fe});return Object.assign(t,a),t};var hs=async(e,s)=>{const t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await ws(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await bs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await xs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await vs(t,s);default:const a=t.body;return us({output:e,parsedBody:a,errorCode:r})}},us=Ne(o),ws=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new R({$metadata:w(e),...t});return u(n,e.body)},bs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new q({$metadata:w(e),...t});return u(n,e.body)},xs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new E({$metadata:w(e),...t});return u(n,e.body)},vs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new S({$metadata:w(e),...t});return u(n,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var ks=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),Rs="accountId",qs="accessToken",Es="account_id";var Ss="roleName",zs="role_name",Ds="x-amz-sso_bearer_token";class Bs extends ts.classBuilder().ep({...C}).m(function(e,s,t,r){return[rs(t,this.serialize,this.deserialize),as(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Oe,Ge).ser(es).de(ss).build(){}export{ys as SSOClient,Bs as GetRoleCredentialsCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-f6546172b47b47d2.js";import{Bb as y,Cb as K,Db as E,Gb as C,Hb as N} from"./chunk-111f0589f69a05b1.js";import{Jb as i,Kb as f} from"./chunk-91b6ef5e24ab5b68.js";var F=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var L=300000,_="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var I={},M=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-cfc36fa4387e9969.js");if(I[e])return I[e];const s=new r({region:e});return I[e]=s,s};var H=async(e,r)=>{const{CreateTokenCommand:s}=await import("./chunk-cfc36fa4387e9969.js");return(await M(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var v=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new f(`Token is expired. ${_}`,!1)};var m=(e,r,s=!1)=>{if(typeof r==="undefined")throw new f(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${_}`,!1)};import{promises as W} from"fs";var{writeFile:j}=W,b=(e,r)=>{const s=K(e),t=JSON.stringify(r,null,2);return j(s,t)};var G=new Date(0),U=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await N(e),s=y(e),t=r[s];if(!t)throw new f(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new f(`Profile '${s}' is missing required property 'sso_session'.`);const a=t.sso_session,c=(await C(e))[a];if(!c)throw new f(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!c[n])throw new f(`Sso session '${a}' is missing required property '${n}'.`,!1);const{sso_start_url:p,sso_region:S}=c;let o;try{o=await E(a)}catch(n){throw new f(`The SSO session token associated with profile=${s} was not found or is invalid. ${_}`,!1)}m("accessToken",o.accessToken),m("expiresAt",o.expiresAt);const{accessToken:x,expiresAt:u}=o,l={token:x,expiration:new Date(u)};if(l.expiration.getTime()-Date.now()>L)return l;if(Date.now()-G.getTime()<30000)return v(l),l;m("clientId",o.clientId,!0),m("clientSecret",o.clientSecret,!0),m("refreshToken",o.refreshToken,!0);try{G.setTime(Date.now());const n=await H(o,S);m("accessToken",n.accessToken),m("expiresIn",n.expiresIn);const h=new Date(Date.now()+n.expiresIn*1000);try{await b(a,{...o,accessToken:n.accessToken,expiresAt:h.toISOString(),refreshToken:n.refreshToken})}catch(O){}return{token:n.accessToken,expiration:h}}catch(n){return v(l),l}};var T=!1,P=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoClient:d,clientConfig:c,profile:p,logger:S})=>{let o;const x="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{const g=await U({profile:p})();o={accessToken:g.token,expiresAt:new Date(g.expiration).toISOString()}}catch(g){throw new i(g.message,{tryNextLink:T,logger:S})}else try{o=await E(e)}catch(g){throw new i("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:T,logger:S})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new i("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:T,logger:S});const{accessToken:u}=o,{SSOClient:l,GetRoleCredentialsCommand:n}=await import("./chunk-e5d43a7ba83f74df.js"),h=d||new l(Object.assign({},c??{},{region:c?.region??t}));let O;try{O=await h.send(new n({accountId:s,roleName:a,accessToken:u}))}catch(g){throw new i(g,{tryNextLink:T,logger:S})}const{roleCredentials:{accessKeyId:w,secretAccessKey:k,sessionToken:R,expiration:D,credentialScope:A,accountId:$}={}}=O;if(!w||!k||!R||!D)throw new i("SSO returns an invalid temporary credential.",{tryNextLink:T,logger:S});return{accessKeyId:w,secretAccessKey:k,sessionToken:R,expiration:new Date(D),...A&&{credentialScope:A},...$&&{accountId:$}}};var q=(e,r)=>{const{sso_start_url:s,sso_account_id:t,sso_region:a,sso_role_name:d}=e;if(!s||!t||!a||!d)throw new i('Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", '+`"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ee=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoSession:d}=e,{ssoClient:c}=e,p=y(e);if(!r&&!s&&!t&&!a&&!d){const o=(await N(e))[p];if(!o)throw new i(`Profile ${p} was not found.`,{logger:e.logger});if(!F(o))throw new i(`Profile ${p} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const w=(await C(e))[o.sso_session],k=` configurations in profile ${p} and sso-session ${o.sso_session}`;if(t&&t!==w.sso_region)throw new i("Conflicting SSO region"+k,{tryNextLink:!1,logger:e.logger});if(r&&r!==w.sso_start_url)throw new i("Conflicting SSO start_url"+k,{tryNextLink:!1,logger:e.logger});o.sso_region=w.sso_region,o.sso_start_url=w.sso_start_url}const{sso_start_url:x,sso_account_id:u,sso_region:l,sso_role_name:n,sso_session:h}=q(o,e.logger);return P({ssoStartUrl:x,ssoSession:h,ssoAccountId:u,ssoRegion:l,ssoRoleName:n,ssoClient:c,clientConfig:e.clientConfig,profile:p})}else if(!r||!s||!t||!a)throw new i('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return P({ssoStartUrl:r,ssoSession:d,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoClient:c,clientConfig:e.clientConfig,profile:p})};export{q as validateSsoProfile,F as isSsoProfile,Ee as fromSSO};
@@ -0,0 +1 @@
1
+ import{C as g} from"./chunk-24a86f8f5ddc0cbd.js";import{Bb as Z,Fb as b} from"./chunk-111f0589f69a05b1.js";import{Jb as h,Lb as L,Mb as H,Nb as V} from"./chunk-91b6ef5e24ab5b68.js";var T=g((a,S)=>{var G=function(c){const i={};if(c=c.replace(/^\?/,""),c)for(let n of c.split("&")){let[F,f=null]=n.split("=");if(F=decodeURIComponent(F),f)f=decodeURIComponent(f);if(!(F in i))i[F]=f;else if(Array.isArray(i[F]))i[F].push(f);else i[F]=[i[F],f]}return i},o=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,M=Object.prototype.hasOwnProperty,Q=(c,i)=>o(c,"name",{value:i,configurable:!0}),U=(c,i)=>{for(var n in i)o(c,n,{get:i[n],enumerable:!0})},O=(c,i,n,F)=>{if(i&&typeof i==="object"||typeof i==="function"){for(let f of D(i))if(!M.call(c,f)&&f!==n)o(c,f,{get:()=>i[f],enumerable:!(F=Y(i,f))||F.enumerable})}return c},d=(c)=>O(o({},"__esModule",{value:!0}),c),A={};U(A,{parseQueryString:()=>G});S.exports=d(A);Q(G,"parseQueryString")});var q=g((u,z)=>{var{defineProperty:w,getOwnPropertyDescriptor:v,getOwnPropertyNames:J}=Object,x=Object.prototype.hasOwnProperty,P=(c,i)=>w(c,"name",{value:i,configurable:!0}),s=(c,i)=>{for(var n in i)w(c,n,{get:i[n],enumerable:!0})},l=(c,i,n,F)=>{if(i&&typeof i==="object"||typeof i==="function"){for(let f of J(i))if(!x.call(c,f)&&f!==n)w(c,f,{get:()=>i[f],enumerable:!(F=v(i,f))||F.enumerable})}return c},m=(c)=>l(w({},"__esModule",{value:!0}),c),j={};s(j,{parseUrl:()=>t});z.exports=m(j);var k=T(),t=P((c)=>{if(typeof c==="string")return t(new URL(c));const{hostname:i,pathname:n,port:F,protocol:f,search:E}=c;let N;if(E)N=k.parseQueryString(E);return{hostname:i,port:F?parseInt(F):void 0,protocol:f,path:n,query:N}},"parseUrl")});function C(c){try{const i=new Set(Array.from(c.match(/([A-Z_]){3,}/g)??[]));return i.delete("CONFIG"),i.delete("CONFIG_PREFIX_SEPARATOR"),i.delete("ENV"),[...i].join(", ")}catch(i){return c}}var X=(c,i)=>async()=>{try{const n=c(process.env);if(n===void 0)throw new Error;return n}catch(n){throw new h(n.message||`Not found in ENV: ${C(c.toString())}`,{logger:i})}};var B=(c,{preferredFile:i="config",...n}={})=>async()=>{const F=Z(n),{configFile:f,credentialsFile:E}=await b(n),N=E[F]||{},I=f[F]||{},W=i==="config"?{...N,...I}:{...I,...N};try{const $=c(W,i==="config"?f:E);if($===void 0)throw new Error;return $}catch(R){throw new h(R.message||`Not found in config files w/ profile [${F}]: ${C(c.toString())}`,{logger:n.logger})}};var p=(c)=>typeof c==="function",K=(c)=>p(c)?async()=>await c():H(c);var hi=({environmentVariableSelector:c,configFileSelector:i,default:n},F={})=>V(L(X(c),B(i,F),K(n)));export{q as tb,hi as ub};