gemi 0.4.40 → 0.4.42

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 (149) hide show
  1. package/dist/app/App.d.ts +1 -0
  2. package/dist/app/App.d.ts.map +1 -1
  3. package/dist/app/createFlatApiRoutes.d.ts +6 -4
  4. package/dist/app/createFlatApiRoutes.d.ts.map +1 -1
  5. package/dist/app/createFlatViewRoutes.d.ts +6 -4
  6. package/dist/app/createFlatViewRoutes.d.ts.map +1 -1
  7. package/dist/app/index.js +65 -65
  8. package/dist/chunk-00935722c776a294.js +2 -0
  9. package/dist/chunk-030b4fb955329860.js +16 -0
  10. package/dist/chunk-05fa767ab29abb0f.js +2 -0
  11. package/dist/chunk-08539d08fa7362f7.js +2 -0
  12. package/dist/chunk-09dd89e1046786a5.js +2 -0
  13. package/dist/chunk-187a09f46e2b36e5.js +2 -0
  14. package/dist/chunk-21fe96d1a3bb5a27.js +2 -0
  15. package/dist/chunk-26a5c9db5d17f5e7.js +3 -0
  16. package/dist/chunk-29c46abebbc0f09b.js +2 -0
  17. package/dist/chunk-2b3eabd01b2ae3f8.js +2 -0
  18. package/dist/chunk-2f6867d08b95f2d2.js +2 -0
  19. package/dist/chunk-3567e8e424a60c99.js +18 -0
  20. package/dist/chunk-3a3092db69408490.js +2 -0
  21. package/dist/chunk-3aecba8553e036bf.js +6 -0
  22. package/dist/chunk-40c21fe243675250.js +2 -0
  23. package/dist/chunk-488b4db0c522d44a.js +1 -0
  24. package/dist/chunk-4960e27e19bbe42a.js +2 -0
  25. package/dist/chunk-4d19e16340534ed0.js +1 -1
  26. package/dist/chunk-4eeee2f82b1fa8bb.js +2 -0
  27. package/dist/chunk-51bad63147c3be4e.js +6 -0
  28. package/dist/chunk-584e33c96b1a78e4.js +2 -0
  29. package/dist/chunk-60f3b8242209ac3e.js +18 -0
  30. package/dist/chunk-61abf77c3eee8698.js +2 -0
  31. package/dist/chunk-625025af819f55f5.js +2 -0
  32. package/dist/chunk-6259cd13f53334df.js +2 -0
  33. package/dist/chunk-66ab377654806d08.js +2 -0
  34. package/dist/chunk-68af0a6f6be163ce.js +2 -0
  35. package/dist/chunk-6a28d299b5726bba.js +2 -0
  36. package/dist/chunk-6e415d0e12fc9539.js +1 -0
  37. package/dist/chunk-722f2aeae58daaa3.js +18 -0
  38. package/dist/chunk-76a525af0575486d.js +5 -0
  39. package/dist/chunk-798f550643937b6d.js +2 -0
  40. package/dist/chunk-7ce930fe69575c87.js +2 -0
  41. package/dist/chunk-7e9d5eea3aa359ad.js +2 -0
  42. package/dist/chunk-7ea1baca4032004f.js +2 -0
  43. package/dist/chunk-7ffe2ce59a054e35.js +2 -0
  44. package/dist/chunk-8133ed564834cff3.js +2 -0
  45. package/dist/chunk-81ce9b491b290639.js +1 -0
  46. package/dist/chunk-8a993922ea970923.js +2 -0
  47. package/dist/chunk-8af626a703659719.js +18 -0
  48. package/dist/chunk-901e700a2c2d43f3.js +18 -0
  49. package/dist/chunk-9326224d1e4c1a64.js +2 -0
  50. package/dist/chunk-9501e589e3e86a96.js +2 -0
  51. package/dist/chunk-955e2bfcdb7a7e71.js +2 -0
  52. package/dist/chunk-a2fcc46e344ae7ae.js +2 -0
  53. package/dist/chunk-a3f85d0d3261ae44.js +9 -0
  54. package/dist/chunk-a693f8ec2e8af8ca.js +2 -0
  55. package/dist/chunk-a719a1f305964521.js +1 -1
  56. package/dist/chunk-b05e4833f4bb2f8f.js +9 -0
  57. package/dist/chunk-b3bfe533d66f6a17.js +2 -0
  58. package/dist/chunk-b5d6eb761760b2a7.js +6 -0
  59. package/dist/chunk-b66a9e50afbac035.js +1 -1
  60. package/dist/chunk-b7b365f7e6038104.js +2 -0
  61. package/dist/chunk-b9e4546aaa58319c.js +2 -0
  62. package/dist/chunk-bd2888a454e50cfd.js +1 -0
  63. package/dist/chunk-be095501304df604.js +9 -0
  64. package/dist/chunk-bee6075c5738d87a.js +1 -1
  65. package/dist/chunk-bfccfb070c1630e9.js +2 -0
  66. package/dist/chunk-c041f058dc3d571b.js +1 -0
  67. package/dist/chunk-c0bd8e19395d722b.js +2 -0
  68. package/dist/chunk-c124bf801cec12d9.js +2 -0
  69. package/dist/chunk-c153b192112b0d44.js +2 -0
  70. package/dist/chunk-c72bfaa252a03f6f.js +2 -0
  71. package/dist/chunk-c85fc7168a708cb6.js +3 -0
  72. package/dist/chunk-cb65fe402653c65e.js +1 -1
  73. package/dist/chunk-d0806df6defd9dce.js +2 -0
  74. package/dist/chunk-d2e057b6f3f9d500.js +2 -0
  75. package/dist/chunk-d33a0e61ccf1bab5.js +2 -0
  76. package/dist/chunk-da1c673d9685624e.js +2 -0
  77. package/dist/chunk-dcc432bd72fb7e46.js +3 -0
  78. package/dist/chunk-ddef8961cbf08a05.js +6 -0
  79. package/dist/chunk-dfc390f0bbdf5a81.js +1 -0
  80. package/dist/chunk-e53fdd0a1888c5e8.js +2 -0
  81. package/dist/chunk-e9695f3cdafee20b.js +2 -0
  82. package/dist/chunk-edeefd833c30a5ed.js +2 -0
  83. package/dist/chunk-ee4ff285d7f4ccdf.js +1 -1
  84. package/dist/chunk-f08ca4bd263b132b.js +2 -0
  85. package/dist/chunk-f2dca6305fcba70b.js +1 -1
  86. package/dist/chunk-f99bdfc336b2ac57.js +1 -1
  87. package/dist/chunk-ffe161a589b4c44b.js +1 -0
  88. package/dist/client/ClientRouter.d.ts.map +1 -1
  89. package/dist/client/ClientRouterContext.d.ts +3 -11
  90. package/dist/client/ClientRouterContext.d.ts.map +1 -1
  91. package/dist/client/Link.d.ts +13 -0
  92. package/dist/client/Link.d.ts.map +1 -0
  93. package/dist/client/QueryManager.d.ts.map +1 -1
  94. package/dist/client/ServerDataProvider.d.ts +2 -0
  95. package/dist/client/ServerDataProvider.d.ts.map +1 -1
  96. package/dist/client/auth/useForgotPassword.d.ts.map +1 -1
  97. package/dist/client/auth/useResetPassword.d.ts.map +1 -1
  98. package/dist/client/auth/useSignIn.d.ts.map +1 -1
  99. package/dist/client/auth/useSignOut.d.ts.map +1 -1
  100. package/dist/client/auth/useUser.d.ts.map +1 -1
  101. package/dist/client/i18n/I18nContext.d.ts +18 -0
  102. package/dist/client/i18n/I18nContext.d.ts.map +1 -0
  103. package/dist/client/i18n/useLocale.d.ts +2 -0
  104. package/dist/client/i18n/useLocale.d.ts.map +1 -0
  105. package/dist/client/i18n/useScopedTranslator.d.ts +8 -0
  106. package/dist/client/i18n/useScopedTranslator.d.ts.map +1 -0
  107. package/dist/client/i18n/useTranslator.d.ts +2 -0
  108. package/dist/client/i18n/useTranslator.d.ts.map +1 -0
  109. package/dist/client/index.d.ts +7 -2
  110. package/dist/client/index.d.ts.map +1 -1
  111. package/dist/client/index.js +305 -141
  112. package/dist/client/rpc.d.ts +6 -5
  113. package/dist/client/rpc.d.ts.map +1 -1
  114. package/dist/client/types.d.ts +9 -0
  115. package/dist/client/types.d.ts.map +1 -1
  116. package/dist/client/useRouter.d.ts +15 -0
  117. package/dist/client/useRouter.d.ts.map +1 -0
  118. package/dist/client/useSearchParams.d.ts +21 -0
  119. package/dist/client/useSearchParams.d.ts.map +1 -0
  120. package/dist/email/index.js +1 -1
  121. package/dist/facades/I18n.d.ts +5 -0
  122. package/dist/facades/I18n.d.ts.map +1 -0
  123. package/dist/facades/index.d.ts +1 -0
  124. package/dist/facades/index.d.ts.map +1 -1
  125. package/dist/facades/index.js +1 -1
  126. package/dist/http/HttpRequest.d.ts +2 -0
  127. package/dist/http/HttpRequest.d.ts.map +1 -1
  128. package/dist/http/I18nServiceContainer.d.ts +31 -0
  129. package/dist/http/I18nServiceContainer.d.ts.map +1 -0
  130. package/dist/http/I18nServiceProvider.d.ts +10 -0
  131. package/dist/http/I18nServiceProvider.d.ts.map +1 -0
  132. package/dist/http/index.d.ts +1 -0
  133. package/dist/http/index.d.ts.map +1 -1
  134. package/dist/http/index.js +1 -1
  135. package/dist/http/requestContext.d.ts +2 -0
  136. package/dist/http/requestContext.d.ts.map +1 -1
  137. package/dist/kernel/Kernel.d.ts +5 -0
  138. package/dist/kernel/Kernel.d.ts.map +1 -1
  139. package/dist/kernel/context.d.ts +6 -2
  140. package/dist/kernel/context.d.ts.map +1 -1
  141. package/dist/kernel/index.js +2 -2
  142. package/dist/server/index.js +1 -1
  143. package/dist/storage/index.js +4 -4
  144. package/dist/utils/applyParams.d.ts +2 -0
  145. package/dist/utils/applyParams.d.ts.map +1 -0
  146. package/dist/utils/type.d.ts +1 -0
  147. package/dist/utils/type.d.ts.map +1 -1
  148. package/dist/vite/index.js +1 -1
  149. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ import{y as J,z as L} from"./chunk-7ce930fe69575c87.js";import{gb as p} from"./chunk-40c21fe243675250.js";var xn=L((Dr,Pn)=>{var{defineProperty:l,getOwnPropertyDescriptor:Fi,getOwnPropertyNames:Ci}=Object,Ui=Object.prototype.hasOwnProperty,Y=(n,t)=>l(n,"name",{value:t,configurable:!0}),Ei=(n,t)=>{for(var c in t)l(n,c,{get:t[c],enumerable:!0})},Ii=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of Ci(t))if(!Ui.call(n,f)&&f!==c)l(n,f,{get:()=>t[f],enumerable:!(i=Fi(t,f))||i.enumerable})}return n},yi=(n)=>Ii(l({},"__esModule",{value:!0}),n),Hn={};Ei(Hn,{constructStack:()=>Tn});Pn.exports=yi(Hn);var A=Y((n,t)=>{const c=[];if(n)c.push(n);if(t)for(let i of t)c.push(i);return c},"getAllAliases"),G=Y((n,t)=>{return`${n||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`},"getMiddlewareNameWithAliases"),Tn=Y(()=>{let n=[],t=[],c=!1;const i=new Set,f=Y(($)=>$.sort((o,T)=>jn[T.step]-jn[o.step]||Rn[T.priority||"normal"]-Rn[o.priority||"normal"]),"sort"),h=Y(($)=>{let o=!1;const T=Y((U)=>{const E=A(U.name,U.aliases);if(E.includes($)){o=!0;for(let F of E)i.delete(F);return!1}return!0},"filterCb");return n=n.filter(T),t=t.filter(T),o},"removeByName"),r=Y(($)=>{let o=!1;const T=Y((U)=>{if(U.middleware===$){o=!0;for(let E of A(U.name,U.aliases))i.delete(E);return!1}return!0},"filterCb");return n=n.filter(T),t=t.filter(T),o},"removeByReference"),s=Y(($)=>{var o;return n.forEach((T)=>{$.add(T.middleware,{...T})}),t.forEach((T)=>{$.addRelativeTo(T.middleware,{...T})}),(o=$.identifyOnResolve)==null||o.call($,C.identifyOnResolve()),$},"cloneTo"),u=Y(($)=>{const o=[];return $.before.forEach((T)=>{if(T.before.length===0&&T.after.length===0)o.push(T);else o.push(...u(T))}),o.push($),$.after.reverse().forEach((T)=>{if(T.before.length===0&&T.after.length===0)o.push(T);else o.push(...u(T))}),o},"expandRelativeMiddlewareList"),d=Y(($=!1)=>{const o=[],T=[],U={};return n.forEach((F)=>{const w={...F,before:[],after:[]};for(let x of A(w.name,w.aliases))U[x]=w;o.push(w)}),t.forEach((F)=>{const w={...F,before:[],after:[]};for(let x of A(w.name,w.aliases))U[x]=w;T.push(w)}),T.forEach((F)=>{if(F.toMiddleware){const w=U[F.toMiddleware];if(w===void 0){if($)return;throw new Error(`${F.toMiddleware} is not found when adding ${G(F.name,F.aliases)} middleware ${F.relation} ${F.toMiddleware}`)}if(F.relation==="after")w.after.push(F);if(F.relation==="before")w.before.push(F)}}),f(o).map(u).reduce((F,w)=>{return F.push(...w),F},[])},"getMiddlewareList"),C={add:($,o={})=>{const{name:T,override:U,aliases:E}=o,F={step:"initialize",priority:"normal",middleware:$,...o},w=A(T,E);if(w.length>0){if(w.some((x)=>i.has(x))){if(!U)throw new Error(`Duplicate middleware name '${G(T,E)}'`);for(let x of w){const I=n.findIndex((g)=>{var V;return g.name===x||((V=g.aliases)==null?void 0:V.some((M)=>M===x))});if(I===-1)continue;const y=n[I];if(y.step!==F.step||F.priority!==y.priority)throw new Error(`"${G(y.name,y.aliases)}" middleware with ${y.priority} priority in ${y.step} step cannot be overridden by "${G(T,E)}" middleware with ${F.priority} priority in ${F.step} step.`);n.splice(I,1)}}for(let x of w)i.add(x)}n.push(F)},addRelativeTo:($,o)=>{const{name:T,override:U,aliases:E}=o,F={middleware:$,...o},w=A(T,E);if(w.length>0){if(w.some((x)=>i.has(x))){if(!U)throw new Error(`Duplicate middleware name '${G(T,E)}'`);for(let x of w){const I=t.findIndex((g)=>{var V;return g.name===x||((V=g.aliases)==null?void 0:V.some((M)=>M===x))});if(I===-1)continue;const y=t[I];if(y.toMiddleware!==F.toMiddleware||y.relation!==F.relation)throw new Error(`"${G(y.name,y.aliases)}" middleware ${y.relation} "${y.toMiddleware}" middleware cannot be overridden by "${G(T,E)}" middleware ${F.relation} "${F.toMiddleware}" middleware.`);t.splice(I,1)}}for(let x of w)i.add(x)}t.push(F)},clone:()=>s(Tn()),use:($)=>{$.applyToStack(C)},remove:($)=>{if(typeof $==="string")return h($);else return r($)},removeByTag:($)=>{let o=!1;const T=Y((U)=>{const{tags:E,name:F,aliases:w}=U;if(E&&E.includes($)){const x=A(F,w);for(let I of x)i.delete(I);return o=!0,!1}return!0},"filterCb");return n=n.filter(T),t=t.filter(T),o},concat:($)=>{var o;const T=s(Tn());return T.use($),T.identifyOnResolve(c||T.identifyOnResolve()||(((o=$.identifyOnResolve)==null?void 0:o.call($))??!1)),T},applyToStack:s,identify:()=>{return d(!0).map(($)=>{const o=$.step??$.relation+" "+$.toMiddleware;return G($.name,$.aliases)+" - "+o})},identifyOnResolve($){if(typeof $==="boolean")c=$;return c},resolve:($,o)=>{for(let T of d().map((U)=>U.middleware).reverse())$=T($,o);if(c)console.log(C.identify());return $}};return C},"constructStack"),jn={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Rn={high:3,normal:2,low:1}});var nt=L((Mr,_n)=>{var{defineProperty:v,getOwnPropertyDescriptor:Di,getOwnPropertyNames:gi}=Object,Ni=Object.prototype.hasOwnProperty,Yi=(n,t)=>v(n,"name",{value:t,configurable:!0}),Si=(n,t)=>{for(var c in t)v(n,c,{get:t[c],enumerable:!0})},zi=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of gi(t))if(!Ni.call(n,f)&&f!==c)v(n,f,{get:()=>t[f],enumerable:!(i=Di(t,f))||i.enumerable})}return n},Zi=(n)=>zi(v({},"__esModule",{value:!0}),n),mn={};Si(mn,{isArrayBuffer:()=>Vi});_n.exports=Zi(mn);var Vi=Yi((n)=>typeof ArrayBuffer==="function"&&n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]","isArrayBuffer")});var B=L((Ar,it)=>{var{defineProperty:q,getOwnPropertyDescriptor:Gi,getOwnPropertyNames:Qi}=Object,Mi=Object.prototype.hasOwnProperty,tt=(n,t)=>q(n,"name",{value:t,configurable:!0}),Ai=(n,t)=>{for(var c in t)q(n,c,{get:t[c],enumerable:!0})},Ki=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of Qi(t))if(!Mi.call(n,f)&&f!==c)q(n,f,{get:()=>t[f],enumerable:!(i=Gi(t,f))||i.enumerable})}return n},Xi=(n)=>Ki(q({},"__esModule",{value:!0}),n),ct={};Ai(ct,{fromArrayBuffer:()=>Wi,fromString:()=>bi});it.exports=Xi(ct);var Ji=nt(),dn=import.meta.require("buffer"),Wi=tt((n,t=0,c=n.byteLength-t)=>{if(!Ji.isArrayBuffer(n))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof n} (${n})`);return dn.Buffer.from(n,t,c)},"fromArrayBuffer"),bi=tt((n,t)=>{if(typeof n!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof n} (${n})`);return t?dn.Buffer.from(n,t):dn.Buffer.from(n)},"fromString")});var rt=L((ft)=>{Object.defineProperty(ft,"__esModule",{value:!0});ft.fromBase64=void 0;var Bi=B(),ji=/^[A-Za-z0-9+/]*={0,2}$/,Ri=(n)=>{if(n.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!ji.exec(n))throw new TypeError("Invalid base64 string.");const t=Bi.fromString(n,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};ft.fromBase64=Ri});var m=L((Xr,$t)=>{var{defineProperty:a,getOwnPropertyDescriptor:Hi,getOwnPropertyNames:Pi}=Object,ki=Object.prototype.hasOwnProperty,on=(n,t)=>a(n,"name",{value:t,configurable:!0}),Oi=(n,t)=>{for(var c in t)a(n,c,{get:t[c],enumerable:!0})},li=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of Pi(t))if(!ki.call(n,f)&&f!==c)a(n,f,{get:()=>t[f],enumerable:!(i=Hi(t,f))||i.enumerable})}return n},pi=(n)=>li(a({},"__esModule",{value:!0}),n),st={};Oi(st,{fromUtf8:()=>wt,toUint8Array:()=>vi,toUtf8:()=>qi});$t.exports=pi(st);var ut=B(),wt=on((n)=>{const t=ut.fromString(n,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),vi=on((n)=>{if(typeof n==="string")return wt(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(n)},"toUint8Array"),qi=on((n)=>{if(typeof n==="string")return n;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return ut.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("utf8")},"toUtf8")});var dt=L((Tt)=>{Object.defineProperty(Tt,"__esModule",{value:!0});Tt.toBase64=void 0;var ai=B(),mi=m(),_i=(n)=>{let t;if(typeof n==="string")t=mi.fromUtf8(n);else t=n;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return ai.fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength).toString("base64")};Tt.toBase64=_i});var nn=L((Wr,_)=>{var{defineProperty:ot,getOwnPropertyDescriptor:nf,getOwnPropertyNames:tf}=Object,cf=Object.prototype.hasOwnProperty,Fn=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of tf(t))if(!cf.call(n,f)&&f!==c)ot(n,f,{get:()=>t[f],enumerable:!(i=nf(t,f))||i.enumerable})}return n},Ft=(n,t,c)=>(Fn(n,t,"default"),c&&Fn(c,t,"default")),ff=(n)=>Fn(ot({},"__esModule",{value:!0}),n),Cn={};_.exports=ff(Cn);Ft(Cn,rt(),_.exports);Ft(Cn,dt(),_.exports)});var Et=L((Ct)=>{Object.defineProperty(Ct,"__esModule",{value:!0});Ct.getAwsChunkedEncodingStream=void 0;var hf=import.meta.require("stream"),rf=(n,t)=>{const{base64Encoder:c,bodyLengthChecker:i,checksumAlgorithmFn:f,checksumLocationName:h,streamHasher:r}=t,s=c!==void 0&&f!==void 0&&h!==void 0&&r!==void 0,u=s?r(f,n):void 0,d=new hf.Readable({read:()=>{}});return n.on("data",(C)=>{const $=i(C)||0;d.push(`${$.toString(16)}\r\n`),d.push(C),d.push("\r\n")}),n.on("end",async()=>{if(d.push("0\r\n"),s){const C=c(await u);d.push(`${h}:${C}\r\n`),d.push("\r\n")}d.push(null)}),d};Ct.getAwsChunkedEncodingStream=rf});var Un=L((Br,St)=>{var gt=function(n){return Object.keys(n).reduce((t,c)=>{const i=n[c];return{...t,[c]:Array.isArray(i)?[...i]:i}},{})},Yt=function(n){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(n)},tn=Object.defineProperty,sf=Object.getOwnPropertyDescriptor,uf=Object.getOwnPropertyNames,wf=Object.prototype.hasOwnProperty,Q=(n,t)=>tn(n,"name",{value:t,configurable:!0}),$f=(n,t)=>{for(var c in t)tn(n,c,{get:t[c],enumerable:!0})},Tf=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of uf(t))if(!wf.call(n,f)&&f!==c)tn(n,f,{get:()=>t[f],enumerable:!(i=sf(t,f))||i.enumerable})}return n},xf=(n)=>Tf(tn({},"__esModule",{value:!0}),n),It={};$f(It,{Field:()=>Ff,Fields:()=>Cf,HttpRequest:()=>Uf,HttpResponse:()=>Ef,IHttpRequest:()=>yt.HttpRequest,getHttpHandlerExtensionConfiguration:()=>df,isValidHostname:()=>Yt,resolveHttpHandlerRuntimeConfig:()=>of});St.exports=xf(It);var df=Q((n)=>{let t=n.httpHandler;return{setHttpHandler(c){t=c},httpHandler(){return t},updateHttpClientConfig(c,i){t.updateHttpClientConfig(c,i)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),of=Q((n)=>{return{httpHandler:n.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),yt=p(),et=class n{constructor({name:t,kind:c=yt.FieldPosition.HEADER,values:i=[]}){this.name=t,this.kind=c,this.values=i}add(t){this.values.push(t)}set(t){this.values=t}remove(t){this.values=this.values.filter((c)=>c!==t)}toString(){return this.values.map((t)=>t.includes(",")||t.includes(" ")?`"${t}"`:t).join(", ")}get(){return this.values}};Q(et,"Field");var Ff=et,Lt=class n{constructor({fields:t=[],encoding:c="utf-8"}){this.entries={},t.forEach(this.setField.bind(this)),this.encoding=c}setField(t){this.entries[t.name.toLowerCase()]=t}getField(t){return this.entries[t.toLowerCase()]}removeField(t){delete this.entries[t.toLowerCase()]}getByType(t){return Object.values(this.entries).filter((c)=>c.kind===t)}};Q(Lt,"Fields");var Cf=Lt,Dt=class n{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const c=new n({...t,headers:{...t.headers}});if(c.query)c.query=gt(c.query);return c}static isInstance(t){if(!t)return!1;const c=t;return"method"in c&&"protocol"in c&&"hostname"in c&&"path"in c&&typeof c.query==="object"&&typeof c.headers==="object"}clone(){return n.clone(this)}};Q(Dt,"HttpRequest");var Uf=Dt;Q(gt,"cloneQuery");var Nt=class n{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const c=t;return typeof c.statusCode==="number"&&typeof c.headers==="object"}};Q(Nt,"HttpResponse");var Ef=Nt;Q(Yt,"isValidHostname")});var Gt=L((jr,Vt)=>{var{defineProperty:cn,getOwnPropertyDescriptor:If,getOwnPropertyNames:yf}=Object,ef=Object.prototype.hasOwnProperty,En=(n,t)=>cn(n,"name",{value:t,configurable:!0}),Lf=(n,t)=>{for(var c in t)cn(n,c,{get:t[c],enumerable:!0})},Df=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of yf(t))if(!ef.call(n,f)&&f!==c)cn(n,f,{get:()=>t[f],enumerable:!(i=If(t,f))||i.enumerable})}return n},gf=(n)=>Df(cn({},"__esModule",{value:!0}),n),zt={};Lf(zt,{escapeUri:()=>Zt,escapeUriPath:()=>Yf});Vt.exports=gf(zt);var Zt=En((n)=>encodeURIComponent(n).replace(/[!'()*]/g,Nf),"escapeUri"),Nf=En((n)=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Yf=En((n)=>n.split("/").map(Zt).join("/"),"escapeUriPath")});var yn=L((Rr,At)=>{var Mt=function(n){const t=[];for(let c of Object.keys(n).sort()){const i=n[c];if(c=In.escapeUri(c),Array.isArray(i))for(let f=0,h=i.length;f<h;f++)t.push(`${c}=${In.escapeUri(i[f])}`);else{let f=c;if(i||typeof i==="string")f+=`=${In.escapeUri(i)}`;t.push(f)}}return t.join("&")},fn=Object.defineProperty,Sf=Object.getOwnPropertyDescriptor,zf=Object.getOwnPropertyNames,Zf=Object.prototype.hasOwnProperty,Vf=(n,t)=>fn(n,"name",{value:t,configurable:!0}),Gf=(n,t)=>{for(var c in t)fn(n,c,{get:t[c],enumerable:!0})},Qf=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of zf(t))if(!Zf.call(n,f)&&f!==c)fn(n,f,{get:()=>t[f],enumerable:!(i=Sf(t,f))||i.enumerable})}return n},Mf=(n)=>Qf(fn({},"__esModule",{value:!0}),n),Qt={};Gf(Qt,{buildQueryString:()=>Mt});At.exports=Mf(Qt);var In=Gt();Vf(Mt,"buildQueryString")});var at=L((Hr,qt)=>{async function Dn(n,t,c=Kt){const i=t.headers??{},f=i.Expect||i.expect;let h=-1,r=!1;if(f==="100-continue")await Promise.race([new Promise((s)=>{h=Number(setTimeout(s,Math.max(Kt,c)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(h),s()}),n.on("error",()=>{r=!0,clearTimeout(h),s()})})]);if(!r)Ht(n,t.body)}var Ht=function(n,t){if(t instanceof Rt.Readable){t.pipe(n);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){n.end(t);return}const c=t;if(typeof c==="object"&&c.buffer&&typeof c.byteOffset==="number"&&typeof c.byteLength==="number"){n.end(Buffer.from(c.buffer,c.byteOffset,c.byteLength));return}n.end(Buffer.from(t));return}n.end()};async function vt(n){const t=[],c=n.getReader();let i=!1,f=0;while(!i){const{done:s,value:u}=await c.read();if(u)t.push(u),f+=u.length;i=s}const h=new Uint8Array(f);let r=0;for(let s of t)h.set(s,r),r+=s.length;return h}var{create:Af,defineProperty:j,getOwnPropertyDescriptor:Kf,getOwnPropertyNames:Xf,getPrototypeOf:Jf}=Object,Wf=Object.prototype.hasOwnProperty,D=(n,t)=>j(n,"name",{value:t,configurable:!0}),bf=(n,t)=>{for(var c in t)j(n,c,{get:t[c],enumerable:!0})},Jt=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of Xf(t))if(!Wf.call(n,f)&&f!==c)j(n,f,{get:()=>t[f],enumerable:!(i=Kf(t,f))||i.enumerable})}return n},Bf=(n,t,c)=>(c=n!=null?Af(Jf(n)):{},Jt(t||!n||!n.__esModule?j(c,"default",{value:n,enumerable:!0}):c,n)),jf=(n)=>Jt(j({},"__esModule",{value:!0}),n),Wt={};bf(Wt,{DEFAULT_REQUEST_TIMEOUT:()=>Of,NodeHttp2Handler:()=>af,NodeHttpHandler:()=>lf,streamCollector:()=>_f});qt.exports=jf(Wt);var bt=Un(),Bt=yn(),en=import.meta.require("http"),Ln=import.meta.require("https"),Rf=["ECONNRESET","EPIPE","ETIMEDOUT"],jt=D((n)=>{const t={};for(let c of Object.keys(n)){const i=n[c];t[c]=Array.isArray(i)?i.join(","):i}return t},"getTransformedHeaders"),Hf=D((n,t,c=0)=>{if(!c)return;const i=setTimeout(()=>{n.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${c} ms`),{name:"TimeoutError"}))},c);n.on("socket",(f)=>{if(f.connecting)f.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)})},"setConnectionTimeout"),Pf=D((n,{keepAlive:t,keepAliveMsecs:c})=>{if(t!==!0)return;n.on("socket",(i)=>{i.setKeepAlive(t,c||0)})},"setSocketKeepAlive"),kf=D((n,t,c=0)=>{n.setTimeout(c,()=>{n.destroy(),t(Object.assign(new Error(`Connection timed out after ${c} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),Rt=import.meta.require("stream"),Kt=1000;D(Dn,"writeRequestBody");D(Ht,"writeBody");var Of=0,Pt=class n{constructor(t){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((c,i)=>{if(typeof t==="function")t().then((f)=>{c(this.resolveDefaultConfig(f))}).catch(i);else c(this.resolveDefaultConfig(t))})}static create(t){if(typeof(t==null?void 0:t.handle)==="function")return t;return new n(t)}static checkSocketUsage(t,c,i=console){var f,h,r;const{sockets:s,requests:u,maxSockets:d}=t;if(typeof d!=="number"||d===Infinity)return c;const C=15000;if(Date.now()-C<c)return c;if(s&&u)for(let $ in s){const o=((f=s[$])==null?void 0:f.length)??0,T=((h=u[$])==null?void 0:h.length)??0;if(o>=d&&T>=2*d)return(r=i==null?void 0:i.warn)==null||r.call(i,`@smithy/node-http-handler:WARN - socket usage at capacity=${o} and ${T} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return c}resolveDefaultConfig(t){const{requestTimeout:c,connectionTimeout:i,socketTimeout:f,httpAgent:h,httpsAgent:r}=t||{};return{connectionTimeout:i,requestTimeout:c??f,httpAgent:(()=>{if(h instanceof en.Agent||typeof(h==null?void 0:h.destroy)==="function")return h;return new en.Agent({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if(r instanceof Ln.Agent||typeof(r==null?void 0:r.destroy)==="function")return r;return new Ln.Agent({keepAlive:!0,maxSockets:50,...r})})(),logger:console}}destroy(){var t,c,i,f;(c=(t=this.config)==null?void 0:t.httpAgent)==null||c.destroy(),(f=(i=this.config)==null?void 0:i.httpsAgent)==null||f.destroy()}async handle(t,{abortSignal:c}={}){if(!this.config)this.config=await this.configProvider;let i;return new Promise((f,h)=>{let r=void 0;const s=D(async(x)=>{await r,clearTimeout(i),f(x)},"resolve"),u=D(async(x)=>{await r,clearTimeout(i),h(x)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(c==null?void 0:c.aborted){const x=new Error("Request aborted");x.name="AbortError",u(x);return}const d=t.protocol==="https:",C=d?this.config.httpsAgent:this.config.httpAgent;i=setTimeout(()=>{this.socketWarningTimestamp=n.checkSocketUsage(C,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const $=Bt.buildQueryString(t.query||{});let o=void 0;if(t.username!=null||t.password!=null){const x=t.username??"",I=t.password??"";o=`${x}:${I}`}let T=t.path;if($)T+=`?${$}`;if(t.fragment)T+=`#${t.fragment}`;const U={headers:t.headers,host:t.hostname,method:t.method,path:T,port:t.port,agent:C,auth:o},F=(d?Ln.request:en.request)(U,(x)=>{const I=new bt.HttpResponse({statusCode:x.statusCode||-1,reason:x.statusMessage,headers:jt(x.headers),body:x});s({response:I})});if(F.on("error",(x)=>{if(Rf.includes(x.code))u(Object.assign(x,{name:"TimeoutError"}));else u(x)}),Hf(F,u,this.config.connectionTimeout),kf(F,u,this.config.requestTimeout),c){const x=D(()=>{F.destroy();const I=new Error("Request aborted");I.name="AbortError",u(I)},"onAbort");if(typeof c.addEventListener==="function"){const I=c;I.addEventListener("abort",x,{once:!0}),F.once("close",()=>I.removeEventListener("abort",x))}else c.onabort=x}const w=U.agent;if(typeof w==="object"&&"keepAlive"in w)Pf(F,{keepAlive:w.keepAlive,keepAliveMsecs:w.keepAliveMsecs});r=Dn(F,t,this.config.requestTimeout).catch((x)=>{return clearTimeout(i),h(x)})})}updateHttpClientConfig(t,c){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return{...i,[t]:c}})}httpHandlerConfigs(){return this.config??{}}};D(Pt,"NodeHttpHandler");var lf=Pt,Xt=import.meta.require("http2"),pf=Bf(import.meta.require("http2")),kt=class n{constructor(t){this.sessions=[],this.sessions=t??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(t){this.sessions.push(t)}contains(t){return this.sessions.includes(t)}remove(t){this.sessions=this.sessions.filter((c)=>c!==t)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(t){for(let c of this.sessions)if(c===t){if(!c.destroyed)c.destroy()}}};D(kt,"NodeHttp2ConnectionPool");var vf=kt,Ot=class n{constructor(t){if(this.sessionCache=new Map,this.config=t,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(t,c){const i=this.getUrlString(t),f=this.sessionCache.get(i);if(f){const u=f.poll();if(u&&!this.config.disableConcurrency)return u}const h=pf.default.connect(i);if(this.config.maxConcurrency)h.settings({maxConcurrentStreams:this.config.maxConcurrency},(u)=>{if(u)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+t.destination.toString())});h.unref();const r=D(()=>{h.destroy(),this.deleteSession(i,h)},"destroySessionCb");if(h.on("goaway",r),h.on("error",r),h.on("frameError",r),h.on("close",()=>this.deleteSession(i,h)),c.requestTimeout)h.setTimeout(c.requestTimeout,r);const s=this.sessionCache.get(i)||new vf;return s.offerLast(h),this.sessionCache.set(i,s),h}deleteSession(t,c){const i=this.sessionCache.get(t);if(!i)return;if(!i.contains(c))return;i.remove(c),this.sessionCache.set(t,i)}release(t,c){var i;const f=this.getUrlString(t);(i=this.sessionCache.get(f))==null||i.offerLast(c)}destroy(){for(let[t,c]of this.sessionCache){for(let i of c){if(!i.destroyed)i.destroy();c.remove(i)}this.sessionCache.delete(t)}}setMaxConcurrentStreams(t){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=t}setDisableConcurrentStreams(t){this.config.disableConcurrency=t}getUrlString(t){return t.destination.toString()}};D(Ot,"NodeHttp2ConnectionManager");var qf=Ot,lt=class n{constructor(t){this.metadata={handlerProtocol:"h2"},this.connectionManager=new qf({}),this.configProvider=new Promise((c,i)=>{if(typeof t==="function")t().then((f)=>{c(f||{})}).catch(i);else c(t||{})})}static create(t){if(typeof(t==null?void 0:t.handle)==="function")return t;return new n(t)}destroy(){this.connectionManager.destroy()}async handle(t,{abortSignal:c}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:i,disableConcurrentStreams:f}=this.config;return new Promise((h,r)=>{var s;let u=!1,d=void 0;const C=D(async(e)=>{await d,h(e)},"resolve"),$=D(async(e)=>{await d,r(e)},"reject");if(c==null?void 0:c.aborted){u=!0;const e=new Error("Request aborted");e.name="AbortError",$(e);return}const{hostname:o,method:T,port:U,protocol:E,query:F}=t;let w="";if(t.username!=null||t.password!=null){const e=t.username??"",S=t.password??"";w=`${e}:${S}@`}const x=`${E}//${w}${o}${U?`:${U}`:""}`,I={destination:new URL(x)},y=this.connectionManager.lease(I,{requestTimeout:(s=this.config)==null?void 0:s.sessionTimeout,disableConcurrentStreams:f||!1}),g=D((e)=>{if(f)this.destroySession(y);u=!0,$(e)},"rejectWithDestroy"),V=Bt.buildQueryString(F||{});let M=t.path;if(V)M+=`?${V}`;if(t.fragment)M+=`#${t.fragment}`;const N=y.request({...t.headers,[Xt.constants.HTTP2_HEADER_PATH]:M,[Xt.constants.HTTP2_HEADER_METHOD]:T});if(y.ref(),N.on("response",(e)=>{const S=new bt.HttpResponse({statusCode:e[":status"]||-1,headers:jt(e),body:N});if(u=!0,C({response:S}),f)y.close(),this.connectionManager.deleteSession(x,y)}),i)N.setTimeout(i,()=>{N.close();const e=new Error(`Stream timed out because of no activity for ${i} ms`);e.name="TimeoutError",g(e)});if(c){const e=D(()=>{N.close();const S=new Error("Request aborted");S.name="AbortError",g(S)},"onAbort");if(typeof c.addEventListener==="function"){const S=c;S.addEventListener("abort",e,{once:!0}),N.once("close",()=>S.removeEventListener("abort",e))}else c.onabort=e}N.on("frameError",(e,S,oi)=>{g(new Error(`Frame type id ${e} in stream id ${oi} has failed with code ${S}.`))}),N.on("error",g),N.on("aborted",()=>{g(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${N.rstCode}.`))}),N.on("close",()=>{if(y.unref(),f)y.destroy();if(!u)g(new Error("Unexpected error: http2 request did not get a response"))}),d=Dn(N,t,i)})}updateHttpClientConfig(t,c){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return{...i,[t]:c}})}httpHandlerConfigs(){return this.config??{}}destroySession(t){if(!t.destroyed)t.destroy()}};D(lt,"NodeHttp2Handler");var af=lt,pt=class n extends Rt.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(t,c,i){this.bufferedBytes.push(t),i()}};D(pt,"Collector");var mf=pt,_f=D((n)=>{if(nh(n))return vt(n);return new Promise((t,c)=>{const i=new mf;n.pipe(i),n.on("error",(f)=>{i.end(),c(f)}),i.on("error",c),i.on("finish",function(){const f=new Uint8Array(Buffer.concat(this.bufferedBytes));t(f)})})},"streamCollector"),nh=D((n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream,"isReadableStreamInstance");D(vt,"collectReadableStream")});var rc=L((Pr,hc)=>{var nc=function(n=0){return new Promise((t,c)=>{if(n)setTimeout(()=>{const i=new Error(`Request did not complete within ${n} ms`);i.name="TimeoutError",c(i)},n)})};async function cc(n){const t=await fc(n),c=wh.fromBase64(t);return new Uint8Array(c)}async function ic(n){const t=[],c=n.getReader();let i=!1,f=0;while(!i){const{done:s,value:u}=await c.read();if(u)t.push(u),f+=u.length;i=s}const h=new Uint8Array(f);let r=0;for(let s of t)h.set(s,r),r+=s.length;return h}var fc=function(n){return new Promise((t,c)=>{const i=new FileReader;i.onloadend=()=>{if(i.readyState!==2)return c(new Error("Reader aborted too early"));const f=i.result??"",h=f.indexOf(","),r=h>-1?h+1:f.length;t(f.substring(r))},i.onabort=()=>c(new Error("Read aborted")),i.onerror=()=>c(i.error),i.readAsDataURL(n)})},rn=Object.defineProperty,th=Object.getOwnPropertyDescriptor,ch=Object.getOwnPropertyNames,ih=Object.prototype.hasOwnProperty,Z=(n,t)=>rn(n,"name",{value:t,configurable:!0}),fh=(n,t)=>{for(var c in t)rn(n,c,{get:t[c],enumerable:!0})},hh=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of ch(t))if(!ih.call(n,f)&&f!==c)rn(n,f,{get:()=>t[f],enumerable:!(i=th(t,f))||i.enumerable})}return n},rh=(n)=>hh(rn({},"__esModule",{value:!0}),n),_t={};fh(_t,{FetchHttpHandler:()=>uh,keepAliveSupport:()=>hn,streamCollector:()=>$h});hc.exports=rh(_t);var mt=Un(),sh=yn();Z(nc,"requestTimeout");var hn={supported:void 0},tc=class n{static create(t){if(typeof(t==null?void 0:t.handle)==="function")return t;return new n(t)}constructor(t){if(typeof t==="function")this.configProvider=t().then((c)=>c||{});else this.config=t??{},this.configProvider=Promise.resolve(this.config);if(hn.supported===void 0)hn.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(t,{abortSignal:c}={}){if(!this.config)this.config=await this.configProvider;const i=this.config.requestTimeout,f=this.config.keepAlive===!0,h=this.config.credentials;if(c==null?void 0:c.aborted){const w=new Error("Request aborted");return w.name="AbortError",Promise.reject(w)}let r=t.path;const s=sh.buildQueryString(t.query||{});if(s)r+=`?${s}`;if(t.fragment)r+=`#${t.fragment}`;let u="";if(t.username!=null||t.password!=null){const w=t.username??"",x=t.password??"";u=`${w}:${x}@`}const{port:d,method:C}=t,$=`${t.protocol}//${u}${t.hostname}${d?`:${d}`:""}${r}`,o=C==="GET"||C==="HEAD"?void 0:t.body,T={body:o,headers:new Headers(t.headers),method:C,credentials:h};if(o)T.duplex="half";if(typeof AbortController!=="undefined")T.signal=c;if(hn.supported)T.keepalive=f;let U=Z(()=>{},"removeSignalEventListener");const E=new Request($,T),F=[fetch(E).then((w)=>{const x=w.headers,I={};for(let g of x.entries())I[g[0]]=g[1];if(w.body==null)return w.blob().then((g)=>({response:new mt.HttpResponse({headers:I,reason:w.statusText,statusCode:w.status,body:g})}));return{response:new mt.HttpResponse({headers:I,reason:w.statusText,statusCode:w.status,body:w.body})}}),nc(i)];if(c)F.push(new Promise((w,x)=>{const I=Z(()=>{const y=new Error("Request aborted");y.name="AbortError",x(y)},"onAbort");if(typeof c.addEventListener==="function"){const y=c;y.addEventListener("abort",I,{once:!0}),U=Z(()=>y.removeEventListener("abort",I),"removeSignalEventListener")}else c.onabort=I}));return Promise.race(F).finally(U)}updateHttpClientConfig(t,c){this.config=void 0,this.configProvider=this.configProvider.then((i)=>{return i[t]=c,i})}httpHandlerConfigs(){return this.config??{}}};Z(tc,"FetchHttpHandler");var uh=tc,wh=nn(),$h=Z((n)=>{if(typeof Blob==="function"&&n instanceof Blob)return cc(n);return ic(n)},"streamCollector");Z(cc,"collectBlob");Z(ic,"collectStream");Z(fc,"readToBase64")});var dc=L((kr,xc)=>{var $c=function(n){if(n.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(n.length/2);for(let c=0;c<n.length;c+=2){const i=n.slice(c,c+2).toLowerCase();if(i in gn)t[c/2]=gn[i];else throw new Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`)}return t},Tc=function(n){let t="";for(let c=0;c<n.byteLength;c++)t+=wc[n[c]];return t},sn=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,xh=Object.getOwnPropertyNames,dh=Object.prototype.hasOwnProperty,sc=(n,t)=>sn(n,"name",{value:t,configurable:!0}),oh=(n,t)=>{for(var c in t)sn(n,c,{get:t[c],enumerable:!0})},Fh=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of xh(t))if(!dh.call(n,f)&&f!==c)sn(n,f,{get:()=>t[f],enumerable:!(i=Th(t,f))||i.enumerable})}return n},Ch=(n)=>Fh(sn({},"__esModule",{value:!0}),n),uc={};oh(uc,{fromHex:()=>$c,toHex:()=>Tc});xc.exports=Ch(uc);var wc={},gn={};for(let n=0;n<256;n++){let t=n.toString(16).toLowerCase();if(t.length===1)t=`0${t}`;wc[n]=t,gn[t]=n}sc($c,"fromHex");sc(Tc,"toHex")});var R=L((oc)=>{Object.defineProperty(oc,"__esModule",{value:!0});oc.isReadableStream=void 0;var Uh=(n)=>{var t;return typeof ReadableStream==="function"&&(((t=n===null||n===void 0?void 0:n.constructor)===null||t===void 0?void 0:t.name)===ReadableStream.name||n instanceof ReadableStream)};oc.isReadableStream=Uh});var ec=L((Ic)=>{Object.defineProperty(Ic,"__esModule",{value:!0});Ic.sdkStreamMixin=void 0;var Eh=rc(),Ih=nn(),yh=dc(),eh=m(),Cc=R(),Uc="The stream has already been transformed.",Lh=(n)=>{var t,c;if(!Ec(n)&&!Cc.isReadableStream(n)){const r=((c=(t=n===null||n===void 0?void 0:n.__proto__)===null||t===void 0?void 0:t.constructor)===null||c===void 0?void 0:c.name)||n;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${r}`)}let i=!1;const f=async()=>{if(i)throw new Error(Uc);return i=!0,await Eh.streamCollector(n)},h=(r)=>{if(typeof r.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return r.stream()};return Object.assign(n,{transformToByteArray:f,transformToString:async(r)=>{const s=await f();if(r==="base64")return Ih.toBase64(s);else if(r==="hex")return yh.toHex(s);else if(r===void 0||r==="utf8"||r==="utf-8")return eh.toUtf8(s);else if(typeof TextDecoder==="function")return new TextDecoder(r).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(i)throw new Error(Uc);if(i=!0,Ec(n))return h(n);else if(Cc.isReadableStream(n))return n;else throw new Error(`Cannot transform payload to web stream, got ${n}`)}})};Ic.sdkStreamMixin=Lh;var Ec=(n)=>typeof Blob==="function"&&n instanceof Blob});var Nc=L((Dc)=>{Object.defineProperty(Dc,"__esModule",{value:!0});Dc.sdkStreamMixin=void 0;var Dh=at(),gh=B(),Nn=import.meta.require("stream"),Nh=import.meta.require("util"),Yh=ec(),Lc="The stream has already been transformed.",Sh=(n)=>{var t,c;if(!(n instanceof Nn.Readable))try{return Yh.sdkStreamMixin(n)}catch(h){const r=((c=(t=n===null||n===void 0?void 0:n.__proto__)===null||t===void 0?void 0:t.constructor)===null||c===void 0?void 0:c.name)||n;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${r}`)}let i=!1;const f=async()=>{if(i)throw new Error(Lc);return i=!0,await Dh.streamCollector(n)};return Object.assign(n,{transformToByteArray:f,transformToString:async(h)=>{const r=await f();if(h===void 0||Buffer.isEncoding(h))return gh.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString(h);else return new Nh.TextDecoder(h).decode(r)},transformToWebStream:()=>{if(i)throw new Error(Lc);if(n.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Nn.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return i=!0,Nn.Readable.toWeb(n)}})};Dc.sdkStreamMixin=Sh});var zc=L((Yc)=>{async function zh(n){if(typeof n.stream==="function")n=n.stream();return n.tee()}Object.defineProperty(Yc,"__esModule",{value:!0});Yc.splitStream=void 0;Yc.splitStream=zh});var Qc=L((Vc)=>{async function Gh(n){if(Vh.isReadableStream(n))return Zh.splitStream(n);const t=new Zc.PassThrough,c=new Zc.PassThrough;return n.pipe(t),n.pipe(c),[t,c]}Object.defineProperty(Vc,"__esModule",{value:!0});Vc.splitStream=void 0;var Zc=import.meta.require("stream"),Zh=zc(),Vh=R();Vc.splitStream=Gh});var Kc=L((Mc)=>{async function Qh(n,t){var c;let i=0;const f=[],h=n.getReader();let r=!1;while(!r){const{done:d,value:C}=await h.read();if(C)f.push(C),i+=(c=C===null||C===void 0?void 0:C.byteLength)!==null&&c!==void 0?c:0;if(i>=t)break;r=d}h.releaseLock();const s=new Uint8Array(Math.min(t,i));let u=0;for(let d of f){if(d.byteLength>s.byteLength-u){s.set(d.subarray(0,s.byteLength-u),u);break}else s.set(d,u);u+=d.length}return s}Object.defineProperty(Mc,"__esModule",{value:!0});Mc.headStream=void 0;Mc.headStream=Qh});var bc=L((Jc)=>{Object.defineProperty(Jc,"__esModule",{value:!0});Jc.headStream=void 0;var Mh=import.meta.require("stream"),Ah=Kc(),Kh=R(),Xh=(n,t)=>{if(Kh.isReadableStream(n))return Ah.headStream(n,t);return new Promise((c,i)=>{const f=new Xc;f.limit=t,n.pipe(f),n.on("error",(h)=>{f.end(),i(h)}),f.on("error",i),f.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.buffers));c(h)})})};Jc.headStream=Xh;class Xc extends Mh.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(n,t,c){var i;if(this.buffers.push(n),this.bytesBuffered+=(i=n.byteLength)!==null&&i!==void 0?i:0,this.bytesBuffered>=this.limit){const f=this.bytesBuffered-this.limit,h=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=h.subarray(0,h.byteLength-f),this.emit("finish")}c()}}});var kc=L((_r,X)=>{var Rc=function(n,t="utf-8"){if(t==="base64")return Bc.toBase64(n);return jc.toUtf8(n)},Hc=function(n,t){if(t==="base64")return Sn.mutate(Bc.fromBase64(n));return Sn.mutate(jc.fromUtf8(n))},un=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,Wh=Object.getOwnPropertyNames,bh=Object.prototype.hasOwnProperty,zn=(n,t)=>un(n,"name",{value:t,configurable:!0}),Bh=(n,t)=>{for(var c in t)un(n,c,{get:t[c],enumerable:!0})},Yn=(n,t,c,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let f of Wh(t))if(!bh.call(n,f)&&f!==c)un(n,f,{get:()=>t[f],enumerable:!(i=Jh(t,f))||i.enumerable})}return n},H=(n,t,c)=>(Yn(n,t,"default"),c&&Yn(c,t,"default")),jh=(n)=>Yn(un({},"__esModule",{value:!0}),n),K={};Bh(K,{Uint8ArrayBlobAdapter:()=>Sn});X.exports=jh(K);var Bc=nn(),jc=m();zn(Rc,"transformToString");zn(Hc,"transformFromString");var Pc=class n extends Uint8Array{static fromString(t,c="utf-8"){switch(typeof t){case"string":return Hc(t,c);default:throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}}static mutate(t){return Object.setPrototypeOf(t,n.prototype),t}transformToString(t="utf-8"){return Rc(this,t)}};zn(Pc,"Uint8ArrayBlobAdapter");var Sn=Pc;H(K,Et(),X.exports);H(K,Nc(),X.exports);H(K,Qc(),X.exports);H(K,bc(),X.exports);H(K,R(),X.exports)});var kn=J(xn(),1);class ei{constructor(n){this.middlewareStack=kn.constructStack(),this.config=n}send(n,t,c){const i=typeof t!=="function"?t:void 0,f=typeof t==="function"?t:c,h=n.resolveMiddleware(this.middlewareStack,this.config,i);if(f)h(n).then((r)=>f(null,r.output),(r)=>f(r)).catch(()=>{});else return h(n).then((r)=>r.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var On=J(xn(),1),ln=J(p(),1);class pn{constructor(){this.middlewareStack=On.constructStack()}static classBuilder(){return new vn}resolveMiddlewareWithContext(n,t,c,{middlewareFn:i,clientName:f,commandName:h,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,smithyContext:u,additionalContext:d,CommandCtor:C}){for(let E of i.bind(this)(C,n,t,c))this.middlewareStack.use(E);const $=n.concat(this.middlewareStack),{logger:o}=t,T={logger:o,clientName:f,commandName:h,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,[ln.SMITHY_CONTEXT_KEY]:{commandInstance:this,...u},...d},{requestHandler:U}=t;return $.resolve((E)=>U.handle(E.request,c||{}),T)}}class vn{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(n)=>n,this._outputFilterSensitiveLog=(n)=>n,this._serializer=null,this._deserializer=null}init(n){this._init=n}ep(n){return this._ep=n,this}m(n){return this._middlewareFn=n,this}s(n,t,c={}){return this._smithyContext={service:n,operation:t,...c},this}c(n={}){return this._additionalContext=n,this}n(n,t){return this._clientName=n,this._commandName=t,this}f(n=(c)=>c,t=(c)=>c){return this._inputFilterSensitiveLog=n,this._outputFilterSensitiveLog=t,this}ser(n){return this._serializer=n,this}de(n){return this._deserializer=n,this}build(){const n=this;let t;return t=class extends pn{static getEndpointParameterInstructions(){return n._ep}constructor(...[c]){super();this.serialize=n._serializer,this.deserialize=n._deserializer,this.input=c??{},n._init(this)}resolveMiddleware(c,i,f){return this.resolveMiddlewareWithContext(c,i,f,{CommandCtor:t,middlewareFn:n._middlewareFn,clientName:n._clientName,commandName:n._commandName,inputFilterSensitiveLog:n._inputFilterSensitiveLog,outputFilterSensitiveLog:n._outputFilterSensitiveLog,smithyContext:n._smithyContext,additionalContext:n._additionalContext})}}}}var Sr="***SensitiveInformation***";var Zr=(n,t)=>{for(let c of Object.keys(n)){const i=n[c],f=async function(r,s,u){const d=new i(r);if(typeof s==="function")this.send(d,s);else if(typeof u==="function"){if(typeof s!=="object")throw new Error(`Expected http options but got ${typeof s}`);this.send(d,s||{},u)}else return this.send(d,s)},h=(c[0].toLowerCase()+c.slice(1)).replace(/Command$/,"");t.prototype[h]=f}};class qn extends Error{constructor(n){super(n.message);Object.setPrototypeOf(this,qn.prototype),this.name=n.name,this.$fault=n.$fault,this.$metadata=n.$metadata}}var an=(n,t={})=>{Object.entries(t).filter(([,i])=>i!==void 0).forEach(([i,f])=>{if(n[i]==null||n[i]==="")n[i]=f});const c=n.message||n.Message||"UnknownError";return n.message=c,delete n.Message,n};class Li{trace(){}debug(){}info(){}warn(){}error(){}}var wn=J(kc(),1),ns=async(n=new Uint8Array,t)=>{if(n instanceof Uint8Array)return wn.Uint8ArrayBlobAdapter.mutate(n);if(!n)return wn.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const c=t.streamCollector(n);return wn.Uint8ArrayBlobAdapter.mutate(await c)};var cs=(n)=>{switch(n){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${n}"`)}};var Rh=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string"){const t=parseFloat(n);if(!Number.isNaN(t)){if(String(t)!==String(n))_c.warn(mc(`Expected number but observed string: ${n}`));return t}}if(typeof n==="number")return n;throw new TypeError(`Expected number, got ${typeof n}: ${n}`)},Hh=Math.ceil(340282346638528860000000000000000000000),Oc=(n)=>{const t=Rh(n);if(t!==void 0&&!Number.isNaN(t)&&t!==Infinity&&t!==(-Infinity)){if(Math.abs(t)>Hh)throw new TypeError(`Expected 32-bit float, got ${n}`)}return t},Zn=(n)=>{if(n===null||n===void 0)return;if(Number.isInteger(n)&&!Number.isNaN(n))return n;throw new TypeError(`Expected integer, got ${typeof n}: ${n}`)};var lc=(n)=>Vn(n,32),pc=(n)=>Vn(n,16),vc=(n)=>Vn(n,8),Vn=(n,t)=>{const c=Zn(n);if(c!==void 0&&Ph(c,t)!==c)throw new TypeError(`Expected ${t}-bit integer, got ${n}`);return c},Ph=(n,t)=>{switch(t){case 32:return Int32Array.of(n)[0];case 16:return Int16Array.of(n)[0];case 8:return Int8Array.of(n)[0]}},is=(n,t)=>{if(n===null||n===void 0){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return n},fs=(n)=>{if(n===null||n===void 0)return;if(typeof n==="object"&&!Array.isArray(n))return n;const t=Array.isArray(n)?"array":typeof n;throw new TypeError(`Expected object, got ${t}: ${n}`)},hs=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string")return n;if(["boolean","number","bigint"].includes(typeof n))return _c.warn(mc(`Expected string, got ${typeof n}: ${n}`)),String(n);throw new TypeError(`Expected string, got ${typeof n}: ${n}`)};var qc=(n)=>{if(typeof n=="string")return Oc(P(n));return Oc(n)},kh=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,P=(n)=>{const t=n.match(kh);if(t===null||t[0].length!==n.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(n)};var rs=(n)=>{if(typeof n==="string")return Zn(P(n));return Zn(n)};var ss=(n)=>{if(typeof n==="string")return lc(P(n));return lc(n)},W=(n)=>{if(typeof n==="string")return pc(P(n));return pc(n)},ac=(n)=>{if(typeof n==="string")return vc(P(n));return vc(n)},mc=(n)=>{return String(new TypeError(n).stack||n).split("\n").slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join("\n")},_c={warn:console.warn};function Ts(n){const t=n.getUTCFullYear(),c=n.getUTCMonth(),i=n.getUTCDay(),f=n.getUTCDate(),h=n.getUTCHours(),r=n.getUTCMinutes(),s=n.getUTCSeconds(),u=f<10?`0${f}`:`${f}`,d=h<10?`0${h}`:`${h}`,C=r<10?`0${r}`:`${r}`,$=s<10?`0${s}`:`${s}`;return`${Oh[i]}, ${u} ${Qn[c]} ${t} ${d}:${C}:${$} GMT`}var Oh=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Qn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],lh=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),xs=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=lh.exec(n);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[c,i,f,h,r,s,u,d]=t,C=W(b(i)),$=z(f,"month",1,12),o=z(h,"day",1,31);return k(C,$,o,{hours:r,minutes:s,seconds:u,fractionalMilliseconds:d})},ph=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),ds=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=ph.exec(n);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[c,i,f,h,r,s,u,d,C]=t,$=W(b(i)),o=z(f,"month",1,12),T=z(h,"day",1,31),U=k($,o,T,{hours:r,minutes:s,seconds:u,fractionalMilliseconds:d});if(C.toUpperCase()!="Z")U.setTime(U.getTime()-hr(C));return U},vh=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$/),qh=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$/),ah=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})$/),os=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=vh.exec(n);if(t){const[c,i,f,h,r,s,u,d]=t;return k(W(b(h)),Gn(f),z(i,"day",1,31),{hours:r,minutes:s,seconds:u,fractionalMilliseconds:d})}if(t=qh.exec(n),t){const[c,i,f,h,r,s,u,d]=t;return nr(k(mh(h),Gn(f),z(i,"day",1,31),{hours:r,minutes:s,seconds:u,fractionalMilliseconds:d}))}if(t=ah.exec(n),t){const[c,i,f,h,r,s,u,d]=t;return k(W(b(d)),Gn(i),z(f.trimLeft(),"day",1,31),{hours:h,minutes:r,seconds:s,fractionalMilliseconds:u})}throw new TypeError("Invalid RFC-7231 date-time value")};var k=(n,t,c,i)=>{const f=t-1;return cr(n,f,c),new Date(Date.UTC(n,f,c,z(i.hours,"hour",0,23),z(i.minutes,"minute",0,59),z(i.seconds,"seconds",0,60),fr(i.fractionalMilliseconds)))},mh=(n)=>{const t=(new Date()).getUTCFullYear(),c=Math.floor(t/100)*100+W(b(n));if(c<t)return c+100;return c},_h=1576800000000,nr=(n)=>{if(n.getTime()-(new Date()).getTime()>_h)return new Date(Date.UTC(n.getUTCFullYear()-100,n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()));return n},Gn=(n)=>{const t=Qn.indexOf(n);if(t<0)throw new TypeError(`Invalid month: ${n}`);return t+1},tr=[31,28,31,30,31,30,31,31,30,31,30,31],cr=(n,t,c)=>{let i=tr[t];if(t===1&&ir(n))i=29;if(c>i)throw new TypeError(`Invalid day for ${Qn[t]} in ${n}: ${c}`)},ir=(n)=>{return n%4===0&&(n%100!==0||n%400===0)},z=(n,t,c,i)=>{const f=ac(b(n));if(f<c||f>i)throw new TypeError(`${t} must be between ${c} and ${i}, inclusive`);return f},fr=(n)=>{if(n===null||n===void 0)return 0;return qc("0."+n)*1000},hr=(n)=>{const t=n[0];let c=1;if(t=="+")c=1;else if(t=="-")c=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const i=Number(n.substring(1,3)),f=Number(n.substring(4,6));return c*(i*60+f)*60*1000},b=(n)=>{let t=0;while(t<n.length-1&&n.charAt(t)==="0")t++;if(t===0)return n;return n.slice(t)};var rr=({output:n,parsedBody:t,exceptionCtor:c,errorCode:i})=>{const f=sr(n),h=f.httpStatusCode?f.httpStatusCode+"":void 0,r=new c({name:t?.code||t?.Code||i||h||"UnknownError",$fault:"client",$metadata:f});throw an(r,t)},Us=(n)=>{return({output:t,parsedBody:c,errorCode:i})=>{rr({output:t,parsedBody:c,exceptionCtor:n,errorCode:i})}},sr=(n)=>({httpStatusCode:n.statusCode,requestId:n.headers["x-amzn-requestid"]??n.headers["x-amzn-request-id"]??n.headers["x-amz-request-id"],extendedRequestId:n.headers["x-amz-id-2"],cfId:n.headers["x-amz-cf-id"]});var Is=(n)=>{switch(n){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{}}};var ni=!1,es=(n)=>{if(n&&!ni&&parseInt(n.substring(1,n.indexOf(".")))<16)ni=!0};var Mn=J(p(),1);var ti=(n)=>{const t=[];for(let c in Mn.AlgorithmId){const i=Mn.AlgorithmId[c];if(n[i]===void 0)continue;t.push({algorithmId:()=>i,checksumConstructor:()=>n[i]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(c){this._checksumAlgorithms.push(c)},checksumAlgorithms(){return this._checksumAlgorithms}}},ci=(n)=>{const t={};return n.checksumAlgorithms().forEach((c)=>{t[c.algorithmId()]=c.checksumConstructor()}),t};var ii=(n)=>{let t=n.retryStrategy;return{setRetryStrategy(c){t=c},retryStrategy(){return t}}},fi=(n)=>{const t={};return t.retryStrategy=n.retryStrategy(),t};var Ss=(n)=>{return{...ti(n),...ii(n)}};var zs=(n)=>{return{...ci(n),...fi(n)}};function ur(n){return encodeURIComponent(n).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}var An=function(){const n=Object.getPrototypeOf(this).constructor,c=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(c,n.prototype),c};An.prototype=Object.create(String.prototype,{constructor:{value:An,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(An,String);function wr(n,t,c){let i,f,h;if(typeof t==="undefined"&&typeof c==="undefined")i={},h=n;else if(i=n,typeof t==="function")return f=t,h=c,$r(i,f,h);else h=t;for(let r of Object.keys(h)){if(!Array.isArray(h[r])){i[r]=h[r];continue}hi(i,null,h,r)}return i}var Xs=(n,t)=>{const c={};for(let i in t)hi(c,n,t,i);return c},$r=(n,t,c)=>{return wr(n,Object.entries(c).reduce((i,[f,h])=>{if(Array.isArray(h))i[f]=h;else if(typeof h==="function")i[f]=[t,h()];else i[f]=[t,h];return i},{}))},hi=(n,t,c,i)=>{if(t!==null){let r=c[i];if(typeof r==="function")r=[,r];const[s=Tr,u=xr,d=i]=r;if(typeof s==="function"&&s(t[d])||typeof s!=="function"&&!!s)n[i]=u(t[d]);return}let[f,h]=c[i];if(typeof h==="function"){let r;const s=f===void 0&&(r=h())!=null,u=typeof f==="function"&&!!f(void 0)||typeof f!=="function"&&!!f;if(s)n[i]=r;else if(u)n[i]=h()}else{const r=f===void 0&&h!=null,s=typeof f==="function"&&!!f(h)||typeof f!=="function"&&!!f;if(r||s)n[i]=h}},Tr=(n)=>n!=null,xr=(n)=>n;var Bs=(n)=>n.toISOString().replace(".000Z","Z");var ri=(n)=>{if(n==null)return{};if(Array.isArray(n))return n.filter((t)=>t!=null).map(ri);if(typeof n==="object"){const t={};for(let c of Object.keys(n)){if(n[c]==null)continue;t[c]=ri(n[c])}return t}return n};var du=(n)=>{let t=n.httpHandler;return{setHttpHandler(c){t=c},httpHandler(){return t},updateHttpClientConfig(c,i){t.updateHttpClientConfig(c,i)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},ou=(n)=>{return{httpHandler:n.httpHandler()}};var dr=J(p(),1);var or=function(n){return Object.keys(n).reduce((t,c)=>{const i=n[c];return{...t,[c]:Array.isArray(i)?[...i]:i}},{})};class Kn{constructor(n){this.method=n.method||"GET",this.hostname=n.hostname||"localhost",this.port=n.port,this.query=n.query||{},this.headers=n.headers||{},this.body=n.body,this.protocol=n.protocol?n.protocol.slice(-1)!==":"?`${n.protocol}:`:n.protocol:"https:",this.path=n.path?n.path.charAt(0)!=="/"?`/${n.path}`:n.path:"/",this.username=n.username,this.password=n.password,this.fragment=n.fragment}static clone(n){const t=new Kn({...n,headers:{...n.headers}});if(t.query)t.query=or(t.query);return t}static isInstance(n){if(!n)return!1;const t=n;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return Kn.clone(this)}}class $n{constructor(n){this.statusCode=n.statusCode,this.reason=n.reason,this.headers=n.headers||{},this.body=n.body}static isInstance(n){if(!n)return!1;const t=n;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}var O=(n)=>encodeURIComponent(n).replace(/[!'()*]/g,Fr),Fr=(n)=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`;function Xn(n){const t=[];for(let c of Object.keys(n).sort()){const i=n[c];if(c=O(c),Array.isArray(i))for(let f=0,h=i.length;f<h;f++)t.push(`${c}=${O(i[f])}`);else{let f=c;if(i||typeof i==="string")f+=`=${O(i)}`;t.push(f)}}return t.join("&")}import{Agent as xi,request as Er} from"http";import{Agent as di,request as Ir} from"https";var si=["ECONNRESET","EPIPE","ETIMEDOUT"];var Jn=(n)=>{const t={};for(let c of Object.keys(n)){const i=n[c];t[c]=Array.isArray(i)?i.join(","):i}return t};var ui=(n,t,c=0)=>{if(!c)return;const i=setTimeout(()=>{n.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${c} ms`),{name:"TimeoutError"}))},c);n.on("socket",(f)=>{if(f.connecting)f.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)})};var wi=(n,{keepAlive:t,keepAliveMsecs:c})=>{if(t!==!0)return;n.on("socket",(i)=>{i.setKeepAlive(t,c||0)})};var $i=(n,t,c=0)=>{n.setTimeout(c,()=>{n.destroy(),t(Object.assign(new Error(`Connection timed out after ${c} ms`),{name:"TimeoutError"}))})};import{Readable as Cr} from"stream";async function Wn(n,t,c=Ti){const i=t.headers??{},f=i.Expect||i.expect;let h=-1,r=!1;if(f==="100-continue")await Promise.race([new Promise((s)=>{h=Number(setTimeout(s,Math.max(Ti,c)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(h),s()}),n.on("error",()=>{r=!0,clearTimeout(h),s()})})]);if(!r)Ur(n,t.body)}var Ur=function(n,t){if(t instanceof Cr){t.pipe(n);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){n.end(t);return}const c=t;if(typeof c==="object"&&c.buffer&&typeof c.byteOffset==="number"&&typeof c.byteLength==="number"){n.end(Buffer.from(c.buffer,c.byteOffset,c.byteLength));return}n.end(Buffer.from(t));return}n.end()},Ti=1000;class bn{static create(n){if(typeof n?.handle==="function")return n;return new bn(n)}static checkSocketUsage(n,t,c=console){const{sockets:i,requests:f,maxSockets:h}=n;if(typeof h!=="number"||h===Infinity)return t;const r=15000;if(Date.now()-r<t)return t;if(i&&f)for(let s in i){const u=i[s]?.length??0,d=f[s]?.length??0;if(u>=h&&d>=2*h)return c?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${u} and ${d} additional requests are enqueued.
4
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
5
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(n){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,c)=>{if(typeof n==="function")n().then((i)=>{t(this.resolveDefaultConfig(i))}).catch(c);else t(this.resolveDefaultConfig(n))})}resolveDefaultConfig(n){const{requestTimeout:t,connectionTimeout:c,socketTimeout:i,httpAgent:f,httpsAgent:h}=n||{};return{connectionTimeout:c,requestTimeout:t??i,httpAgent:(()=>{if(f instanceof xi||typeof f?.destroy==="function")return f;return new xi({keepAlive:!0,maxSockets:50,...f})})(),httpsAgent:(()=>{if(h instanceof di||typeof h?.destroy==="function")return h;return new di({keepAlive:!0,maxSockets:50,...h})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(n,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;let c;return new Promise((i,f)=>{let h=void 0;const r=async(w)=>{await h,clearTimeout(c),i(w)},s=async(w)=>{await h,clearTimeout(c),f(w)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){const w=new Error("Request aborted");w.name="AbortError",s(w);return}const u=n.protocol==="https:",d=u?this.config.httpsAgent:this.config.httpAgent;c=setTimeout(()=>{this.socketWarningTimestamp=bn.checkSocketUsage(d,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const C=Xn(n.query||{});let $=void 0;if(n.username!=null||n.password!=null){const w=n.username??"",x=n.password??"";$=`${w}:${x}`}let o=n.path;if(C)o+=`?${C}`;if(n.fragment)o+=`#${n.fragment}`;const T={headers:n.headers,host:n.hostname,method:n.method,path:o,port:n.port,agent:d,auth:$},E=(u?Ir:Er)(T,(w)=>{const x=new $n({statusCode:w.statusCode||-1,reason:w.statusMessage,headers:Jn(w.headers),body:w});r({response:x})});if(E.on("error",(w)=>{if(si.includes(w.code))s(Object.assign(w,{name:"TimeoutError"}));else s(w)}),ui(E,s,this.config.connectionTimeout),$i(E,s,this.config.requestTimeout),t){const w=()=>{E.destroy();const x=new Error("Request aborted");x.name="AbortError",s(x)};if(typeof t.addEventListener==="function"){const x=t;x.addEventListener("abort",w,{once:!0}),E.once("close",()=>x.removeEventListener("abort",w))}else t.onabort=w}const F=T.agent;if(typeof F==="object"&&"keepAlive"in F)wi(E,{keepAlive:F.keepAlive,keepAliveMsecs:F.keepAliveMsecs});h=Wn(E,n,this.config.requestTimeout).catch((w)=>{return clearTimeout(c),f(w)})})}updateHttpClientConfig(n,t){this.config=void 0,this.configProvider=this.configProvider.then((c)=>{return{...c,[n]:t}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as yr} from"stream";class Bn extends yr{constructor(){super(...arguments);this.bufferedBytes=[]}_write(n,t,c){this.bufferedBytes.push(n),c()}}async function Lr(n){const t=[],c=n.getReader();let i=!1,f=0;while(!i){const{done:s,value:u}=await c.read();if(u)t.push(u),f+=u.length;i=s}const h=new Uint8Array(f);let r=0;for(let s of t)h.set(s,r),r+=s.length;return h}var E0=(n)=>{if(er(n))return Lr(n);return new Promise((t,c)=>{const i=new Bn;n.pipe(i),n.on("error",(f)=>{i.end(),c(f)}),i.on("error",c),i.on("finish",function(){const f=new Uint8Array(Buffer.concat(this.bufferedBytes));t(f)})})},er=(n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream;export{du as A,ou as B,Kn as C,$n as D,Li as E,xn as F,ei as G,nt as H,m as I,Un as J,Gt as K,dc as L,kc as M,ns as N,pn as O,Sr as P,Zr as Q,cs as R,Zn as S,lc as T,is as U,fs as V,hs as W,rs as X,ss as Y,Ts as Z,xs as _,ds as $,os as aa,qn as ba,an as ca,Us as da,Is as ea,es as fa,Ss as ga,zs as ha,ur as ia,wr as ja,Xs as ka,Bs as la,ri as ma,O as na,bn as oa,E0 as pa};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-7ce930fe69575c87.js";import"./chunk-40c21fe243675250.js";import{lb as K,rb as S} from"./chunk-6e415d0e12fc9539.js";import{tb as o} from"./chunk-dfc390f0bbdf5a81.js";import{exec as _} from"child_process";import{promisify as y} from"util";var i=(c,n,s)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){const t=new Date;if(new Date(n.Expiration)<t)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let e=n.AccountId;if(!e&&s?.[c]?.aws_account_id)e=s[c].aws_account_id;return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...e&&{accountId:e}}};var x=async(c,n,s)=>{const e=n[c];if(n[c]){const t=e.credential_process;if(t!==void 0){const u=y(_);try{const{stdout:r}=await u(t);let w;try{w=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return i(c,w,n)}catch(r){throw new o(r.message,{logger:s})}}else throw new o(`Profile ${c} did not contain credential_process.`,{logger:s})}else throw new o(`Profile ${c} could not be found in shared credentials file.`,{logger:s})};var $=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await S(c);return x(K(c),n,c.logger)};export{$ as fromProcess};
@@ -0,0 +1,2 @@
1
+ var g=Object.create;var{defineProperty:f,getPrototypeOf:h,getOwnPropertyNames:i}=Object;var j=Object.prototype.hasOwnProperty;var k=(a,b,c)=>{c=a!=null?g(h(a)):{};const d=b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c;for(let e of i(a))if(!j.call(d,e))f(d,e,{get:()=>a[e],enumerable:!0});return d};var l=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);
2
+ export{k as y,l as z};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-d2e057b6f3f9d500.js";import{y as J} from"./chunk-7ce930fe69575c87.js";import{$ as A0,A as w0,B as G0,C as W0,E as Nl,G as F0,O as F,P as Hh,Q as Id,U as T0,W as S,Y as u,ba as $0,ca as T,da as R0,ea as sl,fa as _l,ga as I0,ha as H0,ia as eh,oa as cl,pa as el} from"./chunk-76a525af0575486d.js";import{$a as nl,Ca as b,Da as Qh,Ea as B0,Fa as Pl,Ga as vl,Ha as Ml,Ia as q0,Ja as bl,Ka as fl,La as Cl,Ma as Ol,Na as y0,Oa as Q0,Qa as B,Ra as X0,Sa as gl,Ua as xl,Va as Y0,Wa as il,Xa as Z0,Za as dh,_a as pl,ab as ol,bb as Al,cb as Rl,db as ul,eb as S0,fb as m0,ra as D0,sa as E0,ta as k0,ua as K0,va as Bd,xa as Wl,za as Tl} from"./chunk-030b4fb955329860.js";import"./chunk-40c21fe243675250.js";import{hb as Yd,ib as f} from"./chunk-81ce9b491b290639.js";import{jb as Xh} from"./chunk-be095501304df604.js";import"./chunk-6e415d0e12fc9539.js";import"./chunk-dfc390f0bbdf5a81.js";var C=J(Qh(),1);var wl=J(dh(),1),wh=J(Bd(),1);var qd=function(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(d,l)=>({signingProperties:{config:d,context:l}})}},dl=function(h){return{schemeId:"smithy.api#noAuth"}},Gl=async(h,d,l)=>{return{operation:wh.getSmithyContext(d).operation,region:await wh.normalizeProvider(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Il=(h)=>{const d=[];switch(h.operation){case"AssumeRoleWithSAML":{d.push(dl(h));break}case"AssumeRoleWithWebIdentity":{d.push(dl(h));break}default:d.push(qd(h))}return d},yd=(h)=>({...h,stsClientCtor:A}),Hl=(h)=>{const d=yd(h);return{...wl.resolveAwsSdkSigV4Config(d)}};var Sl=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},E={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var ml={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts 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-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && 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 sts",test:"yarn test:unit","test:unit":"jest"},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/client-sso-oidc":"3.629.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",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-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var Gh=J(dh(),1);var tl=J(Qh(),1);var Ll=J(dh(),1),jl=J(Qh(),1);var al=J(Yd(),1);var Jl={["required"]:!1,["type"]:"String"},yh={["required"]:!0,default:!1,["type"]:"Boolean"},Ql={["ref"]:"Endpoint"},Dl={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},D={["ref"]:"Region"},El={["fn"]:"aws.partition",["argv"]:[D],assign:"PartitionResult"},Xl={["ref"]:"UseFIPS"},Yl={["ref"]:"UseDualStack"},k={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},X={},kl={conditions:[{["fn"]:"stringEquals",["argv"]:[D,"aws-global"]}],["endpoint"]:k,["type"]:"endpoint"},Zl={["fn"]:"booleanEquals",["argv"]:[Xl,!0]},$l={["fn"]:"booleanEquals",["argv"]:[Yl,!0]},Kl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Ul={["ref"]:"PartitionResult"},Fl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Ul,"supportsDualStack"]}]},Bl=[{["fn"]:"isSet",["argv"]:[Ql]}],ql=[Zl],yl=[$l],Xd={version:"1.0",parameters:{Region:Jl,UseDualStack:yh,UseFIPS:yh,Endpoint:Jl,UseGlobalEndpoint:yh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:Bl},Dl,El,{["fn"]:"booleanEquals",["argv"]:[Xl,!1]},{["fn"]:"booleanEquals",["argv"]:[Yl,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-northeast-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-south-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-southeast-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ap-southeast-2"]}],endpoint:k,["type"]:"endpoint"},kl,{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"ca-central-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-central-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-north-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-west-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-west-2"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"eu-west-3"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"sa-east-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-east-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-east-2"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-west-1"]}],endpoint:k,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[D,"us-west-2"]}],endpoint:k,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:Bl,rules:[{conditions:ql,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:yl,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Ql,properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[Dl],rules:[{conditions:[El],rules:[{conditions:[Zl,$l],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Kl]},Fl],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:ql,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Kl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Ul,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:X,headers:X},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:[Fl],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},kl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},Vl=Xd;var zl=(h,d={})=>{return vl(Vl,{endpointParams:h,logger:d.logger})};Pl.aws=Ml;var rl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??Al,base64Encoder:h?.base64Encoder??Rl,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??zl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Il,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(d)=>d.getIdentityProvider("aws.auth#sigv4"),signer:new Ll.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(d)=>d.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new jl.NoAuthSigner}],logger:h?.logger??new Nl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??al.parseUrl,utf8Decoder:h?.utf8Decoder??Wl,utf8Encoder:h?.utf8Encoder??Tl}};var h0=(h)=>{_l(process.version);const d=ul(h),l=()=>d().then(sl),w=rl(h);return Gh.emitWarningIfUnsupportedVersion(process.version),{...w,...h,runtime:"node",defaultsMode:d,bodyLengthChecker:h?.bodyLengthChecker??ol,credentialDefaultProvider:h?.credentialDefaultProvider??Xh,defaultUserAgentProvider:h?.defaultUserAgentProvider??pl({serviceId:w.serviceId,clientVersion:ml.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(G)=>G.getIdentityProvider("aws.auth#sigv4")||(async(H)=>await Xh(H?.__config||{})()),signer:new Gh.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(G)=>G.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new tl.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(xl),region:h?.region??f(Cl,Ol),requestHandler:cl.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...il,default:async()=>(await l()).retryMode||gl}),sha256:h?.sha256??nl.bind(null,"sha256"),streamCollector:h?.streamCollector??el,useDualstackEndpoint:h?.useDualstackEndpoint??f(bl),useFipsEndpoint:h?.useFipsEndpoint??f(fl)}};var l0=(h)=>{const d=h.httpAuthSchemes;let{httpAuthSchemeProvider:l,credentials:w}=h;return{setHttpAuthScheme(G){const H=d.findIndex((I)=>I.schemeId===G.schemeId);if(H===-1)d.push(G);else d.splice(H,1,G)},httpAuthSchemes(){return d},setHttpAuthSchemeProvider(G){l=G},httpAuthSchemeProvider(){return l},setCredentials(G){w=G},credentials(){return w}}},d0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Ih=(h)=>h,J0=(h,d)=>{const l={...Ih(S0(h)),...Ih(I0(h)),...Ih(w0(h)),...Ih(l0(h))};return d.forEach((w)=>w.configure(l)),{...h,...m0(l),...H0(l),...G0(l),...d0(l)}};class A extends F0{constructor(...[h]){const d=h0(h||{}),l=Sl(d),w=B0(l),G=Y0(w),H=y0(G),I=D0(H),Q=X0(I),v=Hl(Q),M=J0(v,h?.extensions||[]);super(M);this.config=M,this.middlewareStack.use(q0(this.config)),this.middlewareStack.use(Z0(this.config)),this.middlewareStack.use(Q0(this.config)),this.middlewareStack.use(E0(this.config)),this.middlewareStack.use(k0(this.config)),this.middlewareStack.use(K0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Gl,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var o0=J(b(),1);class Y extends $0{constructor(h){super(h);Object.setPrototypeOf(this,Y.prototype)}}class Sh extends Y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Sh.prototype)}}class mh extends Y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends Y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Fh extends Y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Fh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Hh}}),U0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),V0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Hh}}),P0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),v0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Hh}}),M0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),z0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),N0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var P=J(dh(),1);var L0=async(h,d)=>{const l=j;let w;return w=_({...Nd(h,d),[r]:Hw,[s]:a}),L(d,l,"/",void 0,w)},j0=async(h,d)=>{const l=j;let w;return w=_({...Wd(h,d),[r]:Sw,[s]:a}),L(d,l,"/",void 0,w)},a0=async(h,d)=>{const l=j;let w;return w=_({...Td(h,d),[r]:mw,[s]:a}),L(d,l,"/",void 0,w)},r0=async(h,d)=>{const l=j;let w;return w=_({...Ad(h,d),[r]:Jw,[s]:a}),L(d,l,"/",void 0,w)},s0=async(h,d)=>{const l=j;let w;return w=_({...Rd(h,d),[r]:Dw,[s]:a}),L(d,l,"/",void 0,w)},_0=async(h,d)=>{const l=j;let w;return w=_({...Ld(h,d),[r]:Ew,[s]:a}),L(d,l,"/",void 0,w)},b0=async(h,d)=>{const l=j;let w;return w=_({...jd(h,d),[r]:kw,[s]:a}),L(d,l,"/",void 0,w)},f0=async(h,d)=>{const l=j;let w;return w=_({...ad(h,d),[r]:Kw,[s]:a}),L(d,l,"/",void 0,w)},C0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Cd(l.AssumeRoleResult,d),{$metadata:K(h),...w}},O0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Od(l.AssumeRoleWithSAMLResult,d),{$metadata:K(h),...w}},g0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=gd(l.AssumeRoleWithWebIdentityResult,d),{$metadata:K(h),...w}},x0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=xd(l.DecodeAuthorizationMessageResult,d),{$metadata:K(h),...w}},i0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=ed(l.GetAccessKeyInfoResult,d),{$metadata:K(h),...w}},c0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=pd(l.GetCallerIdentityResult,d),{$metadata:K(h),...w}},e0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=nd(l.GetFederationTokenResult,d),{$metadata:K(h),...w}},p0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=od(l.GetSessionTokenResult,d),{$metadata:K(h),...w}},R=async(h,d)=>{const l={...h,body:await P.parseXmlErrorBody(h.body,d)},w=Fw(h,l.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Zd(l,d);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await vd(l,d);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Md(l,d);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await zd(l,d);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Ud(l,d);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Pd(l,d);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await $d(l,d);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Vd(l,d);default:const G=l.body;return Iw({output:h,parsedBody:G.Error,errorCode:w})}},Zd=async(h,d)=>{const l=h.body,w=id(l.Error,d),G=new Sh({$metadata:K(h),...w});return T(G,l)},$d=async(h,d)=>{const l=h.body,w=ud(l.Error,d),G=new Kh({$metadata:K(h),...w});return T(G,l)},Ud=async(h,d)=>{const l=h.body,w=td(l.Error,d),G=new Eh({$metadata:K(h),...w});return T(G,l)},Vd=async(h,d)=>{const l=h.body,w=hw(l.Error,d),G=new Fh({$metadata:K(h),...w});return T(G,l)},Pd=async(h,d)=>{const l=h.body,w=lw(l.Error,d),G=new kh({$metadata:K(h),...w});return T(G,l)},vd=async(h,d)=>{const l=h.body,w=dw(l.Error,d),G=new mh({$metadata:K(h),...w});return T(G,l)},Md=async(h,d)=>{const l=h.body,w=ww(l.Error,d),G=new Jh({$metadata:K(h),...w});return T(G,l)},zd=async(h,d)=>{const l=h.body,w=Gw(l.Error,d),G=new Dh({$metadata:K(h),...w});return T(G,l)},Nd=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){const w=Bh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const w=n0(h[e],d);if(h[e]?.length===0)l.Tags=[];Object.entries(w).forEach(([G,H])=>{const I=`Tags.${G}`;l[I]=H})}if(h[Oh]!=null){const w=fd(h[Oh],d);if(h[Oh]?.length===0)l.TransitiveTagKeys=[];Object.entries(w).forEach(([G,H])=>{const I=`TransitiveTagKeys.${G}`;l[I]=H})}if(h[Vh]!=null)l[Vh]=h[Vh];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];if(h[V]!=null)l[V]=h[V];if(h[Lh]!=null){const w=_d(h[Lh],d);if(h[Lh]?.length===0)l.ProvidedContexts=[];Object.entries(w).forEach(([G,H])=>{const I=`ProvidedContexts.${G}`;l[I]=H})}return l},Wd=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[Ah]!=null)l[Ah]=h[Ah];if(h[_h]!=null)l[_h]=h[_h];if(h[$]!=null){const w=Bh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Td=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[ih]!=null)l[ih]=h[ih];if(h[jh]!=null)l[jh]=h[jh];if(h[$]!=null){const w=Bh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Ad=(h,d)=>{const l={};if(h[Ph]!=null)l[Ph]=h[Ph];return l},Rd=(h,d)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},Ld=(h,d)=>{return{}},jd=(h,d)=>{const l={};if(h[Wh]!=null)l[Wh]=h[Wh];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){const w=Bh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const w=n0(h[e],d);if(h[e]?.length===0)l.Tags=[];Object.entries(w).forEach(([G,H])=>{const I=`Tags.${G}`;l[I]=H})}return l},ad=(h,d)=>{const l={};if(h[y]!=null)l[y]=h[y];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},Bh=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=rd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},rd=(h,d)=>{const l={};if(h[ch]!=null)l[ch]=h[ch];return l},sd=(h,d)=>{const l={};if(h[Rh]!=null)l[Rh]=h[Rh];if(h[Zh]!=null)l[Zh]=h[Zh];return l},_d=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=sd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},bd=(h,d)=>{const l={};if(h[Nh]!=null)l[Nh]=h[Nh];if(h[xh]!=null)l[xh]=h[xh];return l},fd=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;l[`member.${w}`]=G,w++}return l},n0=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=bd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},ph=(h,d)=>{const l={};if(h[Yh]!=null)l[Yh]=S(h[Yh]);if(h[N]!=null)l[N]=S(h[N]);return l},Cd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[z]!=null)l[z]=ph(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[V]!=null)l[V]=S(h[V]);return l},Od=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[z]!=null)l[z]=ph(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[rh]!=null)l[rh]=S(h[rh]);if(h[fh]!=null)l[fh]=S(h[fh]);if(h[zh]!=null)l[zh]=S(h[zh]);if(h[x]!=null)l[x]=S(h[x]);if(h[Th]!=null)l[Th]=S(h[Th]);if(h[V]!=null)l[V]=S(h[V]);return l},gd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[bh]!=null)l[bh]=S(h[bh]);if(h[z]!=null)l[z]=ph(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[ah]!=null)l[ah]=S(h[ah]);if(h[x]!=null)l[x]=S(h[x]);if(h[V]!=null)l[V]=S(h[V]);return l},t=(h,d)=>{const l={};if(h[O]!=null)l[O]=S(h[O]);if(h[sh]!=null)l[sh]=S(h[sh]);if(h[Ch]!=null)l[Ch]=S(h[Ch]);if(h[Uh]!=null)l[Uh]=T0(A0(h[Uh]));return l},xd=(h,d)=>{const l={};if(h[$h]!=null)l[$h]=S(h[$h]);return l},id=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},cd=(h,d)=>{const l={};if(h[Mh]!=null)l[Mh]=S(h[Mh]);if(h[N]!=null)l[N]=S(h[N]);return l},ed=(h,d)=>{const l={};if(h[g]!=null)l[g]=S(h[g]);return l},pd=(h,d)=>{const l={};if(h[gh]!=null)l[gh]=S(h[gh]);if(h[g]!=null)l[g]=S(h[g]);if(h[N]!=null)l[N]=S(h[N]);return l},nd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[vh]!=null)l[vh]=cd(h[vh],d);if(h[U]!=null)l[U]=u(h[U]);return l},od=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);return l},ud=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},td=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},hw=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},lw=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},dw=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},ww=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},Gw=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},K=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var Iw=R0(Y),L=async(h,d,l,w,G)=>{const{hostname:H,protocol:I="https",port:Q,path:v}=await h.endpoint(),M={protocol:I,hostname:H,port:Q,method:"POST",path:v.endsWith("/")?v.slice(0,-1)+l:v+l,headers:d};if(w!==void 0)M.hostname=w;if(G!==void 0)M.body=G;return new W0(M)},j={"content-type":"application/x-www-form-urlencoded"},a="2011-06-15",r="Action",O="AccessKeyId",Hw="AssumeRole",Yh="AssumedRoleId",z="AssumedRoleUser",Sw="AssumeRoleWithSAML",mw="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",q="Credentials",Zh="ContextAssertion",Jw="DecodeAuthorizationMessage",$h="DecodedMessage",y="DurationSeconds",Uh="Expiration",Vh="ExternalId",Ph="EncodedMessage",vh="FederatedUser",Mh="FederatedUserId",Dw="GetAccessKeyInfo",Ew="GetCallerIdentity",kw="GetFederationToken",Kw="GetSessionToken",zh="Issuer",Nh="Key",Wh="Name",Th="NameQualifier",Z="Policy",$="PolicyArns",Ah="PrincipalArn",Rh="ProviderArn",Lh="ProvidedContexts",jh="ProviderId",U="PackedPolicySize",ah="Provider",W="RoleArn",i="RoleSessionName",rh="Subject",sh="SecretAccessKey",_h="SAMLAssertion",bh="SubjectFromWebIdentityToken",V="SourceIdentity",c="SerialNumber",fh="SubjectType",Ch="SessionToken",e="Tags",p="TokenCode",Oh="TransitiveTagKeys",gh="UserId",s="Version",xh="Value",ih="WebIdentityToken",ch="arn",m="message",_=(h)=>Object.entries(h).map(([d,l])=>eh(d)+"="+eh(l)).join("&"),Fw=(h,d)=>{if(d.Error?.Code!==void 0)return d.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[o0.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,U0).ser(L0).de(C0).build(){}var u0=J(b(),1);class nh extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[u0.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(V0,P0).ser(j0).de(O0).build(){}var t0=J(b(),1);class lh extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[t0.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(v0,M0).ser(a0).de(g0).build(){}var hd=J(b(),1);class oh extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[hd.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(r0).de(x0).build(){}var ld=J(b(),1);class uh extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[ld.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(s0).de(i0).build(){}var dd=J(b(),1);class th extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[dd.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(_0).de(c0).build(){}var wd=J(b(),1);class hl extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[wd.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,z0).ser(b0).de(e0).build(){}var Gd=J(b(),1);class ll extends F.classBuilder().ep({...E}).m(function(h,d,l,w){return[Gd.getSerdePlugin(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,N0).ser(f0).de(p0).build(){}var Bw={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:nh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:oh,GetAccessKeyInfoCommand:uh,GetCallerIdentityCommand:th,GetFederationTokenCommand:hl,GetSessionTokenCommand:ll};class Hd extends A{}Id(Bw,Hd);var Sd="us-east-1",md=(h)=>{if(typeof h?.Arn==="string"){const d=h.Arn.split(":");if(d.length>4&&d[4]!=="")return d[4]}return},Jd=async(h,d,l)=>{const w=typeof h==="function"?await h():h,G=typeof d==="function"?await d():d;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${w} (provider)`,`${G} (parent client)`,`${Sd} (STS default)`),w??G??Sd},Dd=(h,d)=>{let l,w;return async(G,H)=>{if(w=G,!l){const{logger:M=h?.parentClientConfig?.logger,region:n,requestHandler:qh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Kd}=h,Fd=await Jd(n,h?.parentClientConfig?.region,Kd);l=new d({credentialDefaultProvider:()=>async()=>w,region:Fd,requestHandler:qh,logger:M})}const{Credentials:I,AssumedRoleUser:Q}=await l.send(new hh(H));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${H.RoleArn}`);const v=md(Q);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...v&&{accountId:v}}}},Ed=(h,d)=>{let l;return async(w)=>{if(!l){const{logger:Q=h?.parentClientConfig?.logger,region:v,requestHandler:M=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,qh=await Jd(v,h?.parentClientConfig?.region,n);l=new d({region:qh,requestHandler:M,logger:Q})}const{Credentials:G,AssumedRoleUser:H}=await l.send(new lh(w));if(!G||!G.AccessKeyId||!G.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const I=md(H);return{accessKeyId:G.AccessKeyId,secretAccessKey:G.SecretAccessKey,sessionToken:G.SessionToken,expiration:G.Expiration,...G.CredentialScope&&{credentialScope:G.CredentialScope},...I&&{accountId:I}}}};var kd=(h,d)=>{if(!d)return h;else return class l extends h{constructor(w){super(w);for(let G of d)this.middlewareStack.use(G)}}},qw=(h={},d)=>Dd(h,kd(A,d)),yw=(h={},d)=>Ed(h,kd(A,d)),AG=(h)=>(d)=>h({roleAssumer:qw(d),roleAssumerWithWebIdentity:yw(d),...d});export{yw as getDefaultRoleAssumerWithWebIdentity,qw as getDefaultRoleAssumer,AG as decorateDefaultCredentialProvider,F0 as __Client,Y as STSServiceException,A as STSClient,Hd as STS,Dh as RegionDisabledException,Jh as PackedPolicyTooLargeException,mh as MalformedPolicyDocumentException,kh as InvalidIdentityTokenException,Fh as InvalidAuthorizationMessageException,Eh as IDPRejectedClaimException,Kh as IDPCommunicationErrorException,N0 as GetSessionTokenResponseFilterSensitiveLog,ll as GetSessionTokenCommand,z0 as GetFederationTokenResponseFilterSensitiveLog,hl as GetFederationTokenCommand,th as GetCallerIdentityCommand,uh as GetAccessKeyInfoCommand,Sh as ExpiredTokenException,oh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,M0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,v0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,P0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,V0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,nh as AssumeRoleWithSAMLCommand,U0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,F as $Command};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-50b440397d41ab5a.js";import{x as m} from"./chunk-a5c18c07abe8fd9c.js";import{$ as T,A as er,D as be,E as cr,I as je,J as Fe,L as De,M as qe,P as Je,Q as Ve,W as E,X as t,Y as Kr,_,aa as b,ba as j,ca as h,ja as Sr,ka as a,la as jr,ma as We,na as fe,oa as rr,pa as sr,ra as d,sa as o,ua as $,z as ue} from"./chunk-d9968563c6c84405.js";import{$a as D,Aa as ee,Ba as re,Ea as Y,Fa as H,Ga as tr,Ha as Ie,Ia as Re,Ja as Pe,Ka as ar,La as Ae,Ma as Ke,Na as Me,Oa as Be,Pa as mr,Qa as wr,Sa as S,Ta as kr,Ua as Le,Wa as Qe,Xa as vr,Ya as Xe,Za as Er,ab as Ye,bb as Ze,cb as He,db as Ne,eb as ir,fb as lr,wa as nr,xa as or,ya as dr,za as yr} from"./chunk-60f3b8242209ac3e.js";import"./chunk-3bf6f8c8e8589e3d.js";import{hb as Hr,ib as I} from"./chunk-bd2888a454e50cfd.js";import"./chunk-2ec287222364c6b6.js";import{kb as Ce} from"./chunk-f99bdfc336b2ac57.js";import"./chunk-c62b5c4cec67029c.js";var R=m(H(),1);var se=m(D(),1);var Xr=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(Xr(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=m(D(),1);var Ue=m(D(),1),xe=m(H(),1);var ze=m(Hr(),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]},w={},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"}],Zr={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:w,headers:w},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:w,headers:w},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:w,headers:w},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:w,headers:w},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:w,headers:w},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:w,headers:w},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},$e=Zr;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??je,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??Fe,utf8Encoder:e?.utf8Encoder??De}};var pe=(e)=>{fe(process.version);const s=Ne(e),r=()=>s().then(We),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??I(Qe),region:e?.region??I(Me,Be),requestHandler:Je.create(e?.requestHandler??r),retryMode:e?.retryMode??I({...Xe,default:async()=>(await r()).retryMode||Le}),sha256:e?.sha256??Ze.bind(null,"sha256"),streamCollector:e?.streamCollector??Ve,useDualstackEndpoint:e?.useDualstackEndpoint??I(Ae),useFipsEndpoint:e?.useFipsEndpoint??I(Ke)}};var ge=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((P)=>P.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 q=(e)=>e,hr=(e,s)=>{const r={...q(ir(e)),...q(rr(e)),...q(ue(e)),...q(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),P=nr(n),Br=kr(P),Lr=he(Br),u=hr(Lr,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(R.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Qr)=>new R.DefaultIdentityProviderConfig({"aws.auth#sigv4":Qr.credentials})})),this.middlewareStack.use(R.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var Vr=m(Y(),1);class y extends Sr{constructor(e){super(e);Object.setPrototypeOf(this,y.prototype)}}class U extends y{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,U.prototype),this.error=e.error,this.error_description=e.error_description}}class x extends y{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",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:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",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:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends y{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends y{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",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:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",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:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",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:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",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:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",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:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",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:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class L extends y{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description}}class Q extends y{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,Q.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 k=m(D(),1),F=m(H(),1);var Fr=async(e,s)=>{const r=F.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)=>$(n)})),r.m("POST").h(i).b(l),r.build()},Dr=async(e,s)=>{const r=F.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[ds]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(P)=>$(P),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{const r=F.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)=>$(n),issuerUrl:[],redirectUris:(n)=>$(n),scopes:(n)=>$(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{const r=F.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 X(e,s);const r=d({$metadata:c(e)}),i=b(j(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:T,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return X(e,s);const r=d({$metadata:c(e)}),i=b(j(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:T,idToken:h,issuedTokenType:h,refreshToken:h,scope:$,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return X(e,s);const r=d({$metadata:c(e)}),i=b(j(await k.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 X(e,s);const r=d({$metadata:c(e)}),i=b(j(await k.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:T,interval:T,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},X=async(e,s)=>{const r={...e,body:await k.parseJsonErrorBody(e.body,s)},i=k.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await _r(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await pr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Cr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await gr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Or(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await es(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await ss(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ls(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await hs(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ns(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await os(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await is(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await ur(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await rs(r,s);default:const l=r.body;return Nr({output:e,parsedBody:l,errorCode:i})}},Nr=jr(y),_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 U({$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 x({$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 z({$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 G({$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 J({$metadata:c(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description: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 V({$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 Q({$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 W({$metadata:c(e),...r});return a(n,e.body)},is=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 B({$metadata:c(e),...r});return a(n,e.body)},ls=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)},hs=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)},ns=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)},os=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)},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 ds="aws_iam";class p extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[Vr.getSerdePlugin(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f($r,Ir).ser(Fr).de(xr).build(){}var Wr=m(Y(),1);class C extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[Wr.getSerdePlugin(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Rr,Pr).ser(Dr).de(zr).build(){}var fr=m(Y(),1);class g extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[fr.getSerdePlugin(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Tr).ser(qr).de(Gr).build(){}var Ar=m(Y(),1);class O extends E.classBuilder().ep({...v}).m(function(e,s,r,i){return[Ar.getSerdePlugin(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(br,void 0).ser(Ur).de(Jr).build(){}var ys={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class Mr extends N{}Kr(ys,Mr);export{cr as __Client,M as UnsupportedGrantTypeException,K as UnauthorizedClientException,br as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,A as SlowDownException,y as SSOOIDCServiceException,N as SSOOIDCClient,Mr as SSOOIDC,Tr as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,f as InvalidScopeException,B as InvalidRequestRegionException,W as InvalidRequestException,Q as InvalidRedirectUriException,V as InvalidGrantException,L as InvalidClientMetadataException,J as InvalidClientException,G as InternalServerException,z as ExpiredTokenException,Pr as CreateTokenWithIAMResponseFilterSensitiveLog,Rr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Ir as CreateTokenResponseFilterSensitiveLog,$r as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,x as AuthorizationPendingException,U as AccessDeniedException,E as $Command};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{y as o} from"./chunk-7ce930fe69575c87.js";import{A as Be,B as Fe,Ba as i,Ca as y,E as g,Ea as Ne,G as We,K as ee,L as se,N as te,O as re,R as ce,S as ie,ea as ss,fa as R,ka as D,la as Ge,ma as h,ta as Te,ua as u,va as Ve,wa as le,xa as pe,ya as _e,za as $e} from"./chunk-dcc432bd72fb7e46.js";import{$a as ts,Ga as Ie,Ha as Le,Ia as Ce,Ja as Me,Ka as os,Na as Ds,Oa as F,Pa as Ae,Qa as G,Ra as V,Sa as N,Ta as Ke,Ua as ye,Va as me,Wa as he,Xa as ue,Ya as Qe,Za as Xe,ab as Ye,bb as we,db as be,eb as Ze,fb as xe,gb as je,ib as x,jb as ve,kb as ke,lb as Re,mb as qe,nb as Pe,ob as Je} from"./chunk-901e700a2c2d43f3.js";import"./chunk-9501e589e3e86a96.js";import{rb as l,sb as ae} from"./chunk-08539d08fa7362f7.js";import"./chunk-c041f058dc3d571b.js";import"./chunk-488b4db0c522d44a.js";var p=o(F(),1);var $=o(x(),1),v=o(os(),1),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"}},P=async(e,s,t)=>{return{operation:v.getSmithyContext(s).operation,region:await v.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},J=(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},U=(e)=>{return{...$.resolveAwsSdkSigV4Config(e)}};var I=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},L={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var C={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 Ee=o(x(),1);var ne=o(x(),1),de=o(F(),1);var M={["required"]:!1,type:"String"},W={["required"]:!0,default:!1,type:"Boolean"},A={["ref"]:"Endpoint"},j={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},K={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},H={["ref"]:"PartitionResult"},Q={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[H,"supportsDualStack"]}]},X=[j],Y=[T],Z=[{["ref"]:"Region"}],ls={version:"1.0",parameters:{Region:M,UseDualStack:W,UseFIPS:W,Endpoint:M},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[A]}],rules:[{conditions:X,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Y,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:A,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:Z}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:Z,assign:"PartitionResult"}],rules:[{conditions:[j,T],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,K]},Q],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:X,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[K,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[H,"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:Y,rules:[{conditions:[Q],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"}]},O=ls;var f=(e,s={})=>{return V(O,{endpointParams:e,logger:s.logger})};G.aws=N;var oe=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ee,base64Encoder:e?.base64Encoder??re,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??f,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??J,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 g,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ae,utf8Decoder:e?.utf8Decoder??se,utf8Encoder:e?.utf8Encoder??te}};var Se=(e)=>{pe(process.version);const s=qe(e),t=()=>s().then(le),r=oe(e);return Ee.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Re,defaultUserAgentProvider:e?.defaultUserAgentProvider??ve({serviceId:r.serviceId,clientVersion:C.version}),maxAttempts:e?.maxAttempts??l(be),region:e?.region??l(he,ue),requestHandler:ce.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...xe,default:async()=>(await t()).retryMode||we}),sha256:e?.sha256??ke.bind(null,"sha256"),streamCollector:e?.streamCollector??ie,useDualstackEndpoint:e?.useDualstackEndpoint??l(ye),useFipsEndpoint:e?.useFipsEndpoint??l(me)}};var ze=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){const n=s.findIndex((B)=>B.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}}},De=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var k=(e)=>e,Ue=(e,s)=>{const t={...k(Pe(e)),...k(_e(e)),...k(Be(e)),...k(ze(e))};return s.forEach((r)=>r.configure(t)),{...e,...Je(t),...$e(t),...Fe(t),...De(t)}};class ps extends We{constructor(...[e]){const s=Se(e||{}),t=I(s),r=Ae(t),a=Ze(r),n=Qe(a),B=Ie(n),as=Ye(B),ns=U(as),_=Ue(ns,e?.extensions||[]);super(_);this.config=_,this.middlewareStack.use(Ke(this.config)),this.middlewareStack.use(je(this.config)),this.middlewareStack.use(Xe(this.config)),this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(Ce(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:P,identityProviderConfigProvider:async(ds)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":ds.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var rs=o(Ds(),1);class c extends Te{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class q extends c{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class E extends c{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class S extends c{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}class z extends c{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,z.prototype)}}var He=(e)=>({...e,...e.accessToken&&{accessToken:R}}),ys=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:R},...e.sessionToken&&{sessionToken:R}}),Oe=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ys(e.roleCredentials)}});var m=o(x(),1),fe=o(F(),1);var ge=async(e,s)=>{const t=fe.requestBuilder(e,s),r=i({},vs,{[zs]:e[Rs]});t.bp("/federation/credentials");const a=i({[Ss]:[,D(e[Es],"roleName")],[qs]:[,D(e[ks],"accountId")]});let n;return t.m("GET").h(r).q(a).b(n),t.build()};var es=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return ms(e,s);const t=i({$metadata:w(e)}),r=D(Ge(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:Ne});return Object.assign(t,a),t};var ms=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 us(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await ws(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await bs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await xs(t,s);default:const a=t.body;return hs({output:e,parsedBody:a,errorCode:r})}},hs=Ve(c),us=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)},ws=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)},bs=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)},xs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new z({$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 vs=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),ks="accountId",Rs="accessToken",qs="account_id";var Es="roleName",Ss="role_name",zs="x-amz-sso_bearer_token";class Bs extends ss.classBuilder().ep({...L}).m(function(e,s,t,r){return[rs.getSerdePlugin(t,this.serialize,this.deserialize),ts(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(He,Oe).ser(ge).de(es).build(){}export{ps as SSOClient,Bs as GetRoleCredentialsCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{y as K} from"./chunk-7ce930fe69575c87.js";import"./chunk-09dd89e1046786a5.js";import{jb as v,kb as P} from"./chunk-d33a0e61ccf1bab5.js";import{lb as _} from"./chunk-c72bfaa252a03f6f.js";import"./chunk-ffe161a589b4c44b.js";var m=K(_(),1);import{parse as o} from"url";var z=K(_(),1);import{Buffer as a} from"buffer";import{request as n} from"http";function f(c){return new Promise((I,x)=>{const T=n({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new z.ProviderError("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new z.ProviderError("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{const{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new z.ProviderError("Error response received from instance metadata service"),{statusCode:O})),T.destroy();const u=[];N.on("data",(y)=>{u.push(y)}),N.on("end",()=>{I(a.concat(u)),T.destroy()})}),T.end()})}var D=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",G=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var fc=1000,uc=0,Q=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var J=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var Z="AWS_CONTAINER_CREDENTIALS_FULL_URI",L="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",B="AWS_CONTAINER_AUTHORIZATION_TOKEN",zc=(c={})=>{const{timeout:I,maxRetries:x}=Q(c);return()=>J(async()=>{const T=await d({logger:c.logger}),N=JSON.parse(await s(I,T));if(!D(N))throw new m.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:c.logger});return G(N)},x)},s=async(c,I)=>{if(process.env[B])I.headers={...I.headers,Authorization:process.env[B]};return(await f({...I,timeout:c})).toString()},g="169.254.170.2",l={localhost:!0,"127.0.0.1":!0},r={"http:":!0,"https:":!0},d=async({logger:c})=>{if(process.env[L])return{hostname:g,path:process.env[L]};if(process.env[Z]){const I=o(process.env[Z]);if(!I.hostname||!(I.hostname in l))throw new m.CredentialsProviderError(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in r))throw new m.CredentialsProviderError(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new m.CredentialsProviderError("The container metadata credential provider cannot be used unless"+` the ${L} or ${Z} environment`+" variable is set",{tryNextLink:!1,logger:c})};var q=K(_(),1);var U=K(_(),1);class X extends U.CredentialsProviderError{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,X.prototype)}}var j;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(j||(j={}));var t={environmentVariableSelector:(c)=>c["AWS_EC2_METADATA_SERVICE_ENDPOINT"],configFileSelector:(c)=>c["ec2_metadata_service_endpoint"],default:void 0};var S;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(S||(S={}));var e="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",i="ec2_metadata_service_endpoint_mode",F={environmentVariableSelector:(c)=>c[e],configFileSelector:(c)=>c[i],default:S.IPv4};var W=async()=>P(await cc()||await Ic()),cc=async()=>v(t)(),Ic=async()=>{const c=await v(F)();switch(c){case S.IPv4:return j.IPv4;case S.IPv6:return j.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}.`+` Select from ${Object.values(S)}`)}};var b=(c,I)=>{const x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these "+`credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: `+"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html");const N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var V=(c,I={})=>{const x=I?.logger||console;let T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=b(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=b(T,x);else throw O}return T=N,N}};var k="/latest/meta-data/iam/security-credentials/",Tc="/latest/api/token",H="AWS_EC2_METADATA_V1_DISABLED",R="ec2_metadata_v1_disabled",M="x-aws-ec2-metadata-token",oc=(c={})=>V(Nc(c),{logger:c.logger}),Nc=(c={})=>{let I=!1;const{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=Q(c),u=async(y,E)=>{if(I||E.headers?.[M]==null){let w=!1,h=!1;const C=await v({environmentVariableSelector:(Y)=>{const $=Y[H];if(h=!!$&&$!=="false",$===void 0)throw new q.CredentialsProviderError(`${H} not set in env, checking config file next.`,{logger:c.logger});return h},configFileSelector:(Y)=>{const $=Y[R];return w=!!$&&$!=="false",w},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||C){const Y=[];if(c.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(w)Y.push(`config file profile (${R})`);if(h)Y.push(`process environment variable (${H})`);throw new X(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}const p=(await J(async()=>{let w;try{w=await Oc(E)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)).trim();return J(async()=>{let w;try{w=await yc(p,E,c)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)};return async()=>{const y=await W();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),u(O,{...y,timeout:N});else{let E;try{E=(await xc({...y,timeout:N})).toString()}catch(A){if(A?.statusCode===400)throw Object.assign(A,{message:"EC2 Metadata token request returned error"});else if(A.message==="TimeoutError"||[403,404,405].includes(A.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),u(O,{...y,timeout:N})}return u(O,{...y,headers:{[M]:E},timeout:N})}}},xc=async(c)=>f({...c,path:Tc,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Oc=async(c)=>(await f({...c,path:k})).toString(),yc=async(c,I,x)=>{const T=JSON.parse((await f({...I,path:k+c})).toString());if(!D(T))throw new q.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:x.logger});return G(T)};export{Q as providerConfigFromInit,f as httpRequest,W as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,zc as fromContainerMetadata,j as Endpoint,L as ENV_CMDS_RELATIVE_URI,Z as ENV_CMDS_FULL_URI,B as ENV_CMDS_AUTH_TOKEN,fc as DEFAULT_TIMEOUT,uc as DEFAULT_MAX_RETRIES};
@@ -0,0 +1 @@
1
+ import{z as g} from"./chunk-7ce930fe69575c87.js";import{lb as Z,pb as b} from"./chunk-6e415d0e12fc9539.js";import{tb as h,vb as L,wb as H,xb as V} from"./chunk-dfc390f0bbdf5a81.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 hb,hi as ib};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-68af0a6f6be163ce.js";import{y as b} from"./chunk-7ce930fe69575c87.js";import{A as G0,B as I0,C as T0,E as Wl,F as B0,J as Tl,K as Al,M as Rl,N as Ll,Q as _l,R as bl,X as K,Y as Ih,Z as u0,ba as A0,da as S,fa as u,ia as R0,ka as U0,la as T,ma as L0,na as fl,oa as Cl,pa as H0,qa as S0,ra as ch} from"./chunk-c85fc7168a708cb6.js";import{$a as $0,Aa as F0,Ea as yh,Fa as dl,Ga as wl,Ha as q0,Ia as vl,Ja as Ml,Ka as zl,La as y0,Ma as Ol,Na as gl,Oa as xl,Pa as il,Qa as Q0,Ra as X0,Ta as F,Ua as B,Va as Y0,Wa as cl,Ya as el,Za as Z0,_a as pl,bb as dh,cb as nl,db as ol,eb as ul,fb as tl,gb as m0,hb as J0,xa as E0,ya as k0,za as K0} from"./chunk-3567e8e424a60c99.js";import"./chunk-09dd89e1046786a5.js";import{jb as f,kb as jl} from"./chunk-d33a0e61ccf1bab5.js";import"./chunk-c72bfaa252a03f6f.js";import{mb as Qh} from"./chunk-a3f85d0d3261ae44.js";import"./chunk-ffe161a589b4c44b.js";var C=b(yh(),1);var Gl=b(dh(),1);var md=function(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(d,l)=>({signingProperties:{config:d,context:l}})}},ll=function(h){return{schemeId:"smithy.api#noAuth"}},Il=async(h,d,l)=>{return{operation:dl(d).operation,region:await wl(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Hl=(h)=>{const d=[];switch(h.operation){case"AssumeRoleWithSAML":{d.push(ll(h));break}case"AssumeRoleWithWebIdentity":{d.push(ll(h));break}default:d.push(md(h))}return d},Jd=(h)=>({...h,stsClientCtor:A}),Sl=(h)=>{const d=Jd(h);return{...Gl.resolveAwsSdkSigV4Config(d)}};var ml=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},D={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Jl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts 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-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && 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 sts",test:"yarn test:unit","test:unit":"jest"},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/client-sso-oidc":"3.629.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",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-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var wh=b(dh(),1);var h0=b(yh(),1);var al=b(dh(),1),rl=b(yh(),1);var Dl={["required"]:!1,["type"]:"String"},qh={["required"]:!0,default:!1,["type"]:"Boolean"},Xl={["ref"]:"Endpoint"},El={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},kl={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},Yl={["ref"]:"UseFIPS"},Zl={["ref"]:"UseDualStack"},E={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},X={},Kl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:E,["type"]:"endpoint"},$l={["fn"]:"booleanEquals",["argv"]:[Yl,!0]},Ul={["fn"]:"booleanEquals",["argv"]:[Zl,!0]},Fl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Vl={["ref"]:"PartitionResult"},Bl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Vl,"supportsDualStack"]}]},ql=[{["fn"]:"isSet",["argv"]:[Xl]}],yl=[$l],Ql=[Ul],Ed={version:"1.0",parameters:{Region:Dl,UseDualStack:qh,UseFIPS:qh,Endpoint:Dl,UseGlobalEndpoint:qh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:ql},El,kl,{["fn"]:"booleanEquals",["argv"]:[Yl,!1]},{["fn"]:"booleanEquals",["argv"]:[Zl,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-northeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:E,["type"]:"endpoint"},Kl,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:E,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:ql,rules:[{conditions:yl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:Ql,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Xl,properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[El],rules:[{conditions:[kl],rules:[{conditions:[$l,Ul],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Fl]},Bl],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Fl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Vl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:X,headers:X},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:Ql,rules:[{conditions:[Bl],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},Kl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},Pl=Ed;var Nl=(h,d={})=>{return Ml(Pl,{endpointParams:h,logger:d.logger})};vl.aws=zl;var sl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??Tl,base64Encoder:h?.base64Encoder??Ll,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??Nl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Hl,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(d)=>d.getIdentityProvider("aws.auth#sigv4"),signer:new al.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(d)=>d.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new rl.NoAuthSigner}],logger:h?.logger??new Wl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??jl,utf8Decoder:h?.utf8Decoder??Al,utf8Encoder:h?.utf8Encoder??Rl}};var l0=(h)=>{Cl(process.version);const d=tl(h),l=()=>d().then(fl),w=sl(h);return wh.emitWarningIfUnsupportedVersion(process.version),{...w,...h,runtime:"node",defaultsMode:d,bodyLengthChecker:h?.bodyLengthChecker??ul,credentialDefaultProvider:h?.credentialDefaultProvider??Qh,defaultUserAgentProvider:h?.defaultUserAgentProvider??nl({serviceId:w.serviceId,clientVersion:Jl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(G)=>G.getIdentityProvider("aws.auth#sigv4")||(async(H)=>await Qh(H?.__config||{})()),signer:new wh.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(G)=>G.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new h0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(el),region:h?.region??f(xl,il),requestHandler:_l.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...pl,default:async()=>(await l()).retryMode||cl}),sha256:h?.sha256??ol.bind(null,"sha256"),streamCollector:h?.streamCollector??bl,useDualstackEndpoint:h?.useDualstackEndpoint??f(Ol),useFipsEndpoint:h?.useFipsEndpoint??f(gl)}};var d0=(h)=>{const d=h.httpAuthSchemes;let{httpAuthSchemeProvider:l,credentials:w}=h;return{setHttpAuthScheme(G){const H=d.findIndex((I)=>I.schemeId===G.schemeId);if(H===-1)d.push(G);else d.splice(H,1,G)},httpAuthSchemes(){return d},setHttpAuthSchemeProvider(G){l=G},httpAuthSchemeProvider(){return l},setCredentials(G){w=G},credentials(){return w}}},w0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Gh=(h)=>h,D0=(h,d)=>{const l={...Gh(m0(h)),...Gh(H0(h)),...Gh(G0(h)),...Gh(d0(h))};return d.forEach((w)=>w.configure(l)),{...h,...J0(l),...S0(l),...I0(l),...w0(l)}};class A extends B0{constructor(...[h]){const d=l0(h||{}),l=ml(d),w=q0(l),G=Z0(w),H=Q0(G),I=E0(H),Q=Y0(I),v=Sl(Q),M=D0(v,h?.extensions||[]);super(M);this.config=M,this.middlewareStack.use(y0(this.config)),this.middlewareStack.use($0(this.config)),this.middlewareStack.use(X0(this.config)),this.middlewareStack.use(k0(this.config)),this.middlewareStack.use(K0(this.config)),this.middlewareStack.use(F0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Il,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class Y extends U0{constructor(h){super(h);Object.setPrototypeOf(this,Y.prototype)}}class Hh extends Y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Hh.prototype)}}class Sh extends Y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Sh.prototype)}}class mh extends Y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends Y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Ih}}),V0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),P0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Ih}}),v0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),M0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Ih}}),z0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),N0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),W0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var P=b(dh(),1);var j0=async(h,d)=>{const l=j;let w;return w=_({...Yd(h,d),[r]:od,[s]:a}),L(d,l,"/",void 0,w)},a0=async(h,d)=>{const l=j;let w;return w=_({...Zd(h,d),[r]:ud,[s]:a}),L(d,l,"/",void 0,w)},r0=async(h,d)=>{const l=j;let w;return w=_({...$d(h,d),[r]:td,[s]:a}),L(d,l,"/",void 0,w)},s0=async(h,d)=>{const l=j;let w;return w=_({...Ud(h,d),[r]:hw,[s]:a}),L(d,l,"/",void 0,w)},_0=async(h,d)=>{const l=j;let w;return w=_({...Vd(h,d),[r]:lw,[s]:a}),L(d,l,"/",void 0,w)},b0=async(h,d)=>{const l=j;let w;return w=_({...Pd(h,d),[r]:dw,[s]:a}),L(d,l,"/",void 0,w)},f0=async(h,d)=>{const l=j;let w;return w=_({...vd(h,d),[r]:ww,[s]:a}),L(d,l,"/",void 0,w)},C0=async(h,d)=>{const l=j;let w;return w=_({...Md(h,d),[r]:Gw,[s]:a}),L(d,l,"/",void 0,w)},O0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Rd(l.AssumeRoleResult,d),{$metadata:k(h),...w}},g0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Ld(l.AssumeRoleWithSAMLResult,d),{$metadata:k(h),...w}},x0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=jd(l.AssumeRoleWithWebIdentityResult,d),{$metadata:k(h),...w}},i0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=ad(l.DecodeAuthorizationMessageResult,d),{$metadata:k(h),...w}},c0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=_d(l.GetAccessKeyInfoResult,d),{$metadata:k(h),...w}},e0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=bd(l.GetCallerIdentityResult,d),{$metadata:k(h),...w}},p0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=fd(l.GetFederationTokenResult,d),{$metadata:k(h),...w}},n0=async(h,d)=>{if(h.statusCode>=300)return R(h,d);const l=await P.parseXmlBody(h.body,d);let w={};return w=Cd(l.GetSessionTokenResult,d),{$metadata:k(h),...w}},R=async(h,d)=>{const l={...h,body:await P.parseXmlErrorBody(h.body,d)},w=Iw(h,l.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await kd(l,d);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await yd(l,d);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Qd(l,d);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Xd(l,d);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Fd(l,d);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await qd(l,d);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Kd(l,d);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Bd(l,d);default:const G=l.body;return nd({output:h,parsedBody:G.Error,errorCode:w})}},kd=async(h,d)=>{const l=h.body,w=rd(l.Error,d),G=new Hh({$metadata:k(h),...w});return T(G,l)},Kd=async(h,d)=>{const l=h.body,w=Od(l.Error,d),G=new kh({$metadata:k(h),...w});return T(G,l)},Fd=async(h,d)=>{const l=h.body,w=gd(l.Error,d),G=new Dh({$metadata:k(h),...w});return T(G,l)},Bd=async(h,d)=>{const l=h.body,w=xd(l.Error,d),G=new Kh({$metadata:k(h),...w});return T(G,l)},qd=async(h,d)=>{const l=h.body,w=id(l.Error,d),G=new Eh({$metadata:k(h),...w});return T(G,l)},yd=async(h,d)=>{const l=h.body,w=cd(l.Error,d),G=new Sh({$metadata:k(h),...w});return T(G,l)},Qd=async(h,d)=>{const l=h.body,w=ed(l.Error,d),G=new mh({$metadata:k(h),...w});return T(G,l)},Xd=async(h,d)=>{const l=h.body,w=pd(l.Error,d),G=new Jh({$metadata:k(h),...w});return T(G,l)},Yd=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){const w=Fh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const w=o0(h[e],d);if(h[e]?.length===0)l.Tags=[];Object.entries(w).forEach(([G,H])=>{const I=`Tags.${G}`;l[I]=H})}if(h[Ch]!=null){const w=Ad(h[Ch],d);if(h[Ch]?.length===0)l.TransitiveTagKeys=[];Object.entries(w).forEach(([G,H])=>{const I=`TransitiveTagKeys.${G}`;l[I]=H})}if(h[Uh]!=null)l[Uh]=h[Uh];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];if(h[V]!=null)l[V]=h[V];if(h[Rh]!=null){const w=Wd(h[Rh],d);if(h[Rh]?.length===0)l.ProvidedContexts=[];Object.entries(w).forEach(([G,H])=>{const I=`ProvidedContexts.${G}`;l[I]=H})}return l},Zd=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[Th]!=null)l[Th]=h[Th];if(h[sh]!=null)l[sh]=h[sh];if(h[$]!=null){const w=Fh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},$d=(h,d)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[xh]!=null)l[xh]=h[xh];if(h[Lh]!=null)l[Lh]=h[Lh];if(h[$]!=null){const w=Fh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Ud=(h,d)=>{const l={};if(h[Vh]!=null)l[Vh]=h[Vh];return l},Vd=(h,d)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},Pd=(h,d)=>{return{}},vd=(h,d)=>{const l={};if(h[Nh]!=null)l[Nh]=h[Nh];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){const w=Fh(h[$],d);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(w).forEach(([G,H])=>{const I=`PolicyArns.${G}`;l[I]=H})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const w=o0(h[e],d);if(h[e]?.length===0)l.Tags=[];Object.entries(w).forEach(([G,H])=>{const I=`Tags.${G}`;l[I]=H})}return l},Md=(h,d)=>{const l={};if(h[y]!=null)l[y]=h[y];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},Fh=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=zd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},zd=(h,d)=>{const l={};if(h[ih]!=null)l[ih]=h[ih];return l},Nd=(h,d)=>{const l={};if(h[Ah]!=null)l[Ah]=h[Ah];if(h[Yh]!=null)l[Yh]=h[Yh];return l},Wd=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=Nd(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},Td=(h,d)=>{const l={};if(h[zh]!=null)l[zh]=h[zh];if(h[gh]!=null)l[gh]=h[gh];return l},Ad=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;l[`member.${w}`]=G,w++}return l},o0=(h,d)=>{const l={};let w=1;for(let G of h){if(G===null)continue;const H=Td(G,d);Object.entries(H).forEach(([I,Q])=>{l[`member.${w}.${I}`]=Q}),w++}return l},eh=(h,d)=>{const l={};if(h[Xh]!=null)l[Xh]=S(h[Xh]);if(h[N]!=null)l[N]=S(h[N]);return l},Rd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[z]!=null)l[z]=eh(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[V]!=null)l[V]=S(h[V]);return l},Ld=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[z]!=null)l[z]=eh(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[ah]!=null)l[ah]=S(h[ah]);if(h[bh]!=null)l[bh]=S(h[bh]);if(h[Mh]!=null)l[Mh]=S(h[Mh]);if(h[x]!=null)l[x]=S(h[x]);if(h[Wh]!=null)l[Wh]=S(h[Wh]);if(h[V]!=null)l[V]=S(h[V]);return l},jd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[_h]!=null)l[_h]=S(h[_h]);if(h[z]!=null)l[z]=eh(h[z],d);if(h[U]!=null)l[U]=u(h[U]);if(h[jh]!=null)l[jh]=S(h[jh]);if(h[x]!=null)l[x]=S(h[x]);if(h[V]!=null)l[V]=S(h[V]);return l},t=(h,d)=>{const l={};if(h[O]!=null)l[O]=S(h[O]);if(h[rh]!=null)l[rh]=S(h[rh]);if(h[fh]!=null)l[fh]=S(h[fh]);if(h[$h]!=null)l[$h]=A0(R0(h[$h]));return l},ad=(h,d)=>{const l={};if(h[Zh]!=null)l[Zh]=S(h[Zh]);return l},rd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},sd=(h,d)=>{const l={};if(h[vh]!=null)l[vh]=S(h[vh]);if(h[N]!=null)l[N]=S(h[N]);return l},_d=(h,d)=>{const l={};if(h[g]!=null)l[g]=S(h[g]);return l},bd=(h,d)=>{const l={};if(h[Oh]!=null)l[Oh]=S(h[Oh]);if(h[g]!=null)l[g]=S(h[g]);if(h[N]!=null)l[N]=S(h[N]);return l},fd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);if(h[Ph]!=null)l[Ph]=sd(h[Ph],d);if(h[U]!=null)l[U]=u(h[U]);return l},Cd=(h,d)=>{const l={};if(h[q]!=null)l[q]=t(h[q],d);return l},Od=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},gd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},xd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},id=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},cd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},ed=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},pd=(h,d)=>{const l={};if(h[m]!=null)l[m]=S(h[m]);return l},k=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var nd=L0(Y),L=async(h,d,l,w,G)=>{const{hostname:H,protocol:I="https",port:Q,path:v}=await h.endpoint(),M={protocol:I,hostname:H,port:Q,method:"POST",path:v.endsWith("/")?v.slice(0,-1)+l:v+l,headers:d};if(w!==void 0)M.hostname=w;if(G!==void 0)M.body=G;return new T0(M)},j={"content-type":"application/x-www-form-urlencoded"},a="2011-06-15",r="Action",O="AccessKeyId",od="AssumeRole",Xh="AssumedRoleId",z="AssumedRoleUser",ud="AssumeRoleWithSAML",td="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",q="Credentials",Yh="ContextAssertion",hw="DecodeAuthorizationMessage",Zh="DecodedMessage",y="DurationSeconds",$h="Expiration",Uh="ExternalId",Vh="EncodedMessage",Ph="FederatedUser",vh="FederatedUserId",lw="GetAccessKeyInfo",dw="GetCallerIdentity",ww="GetFederationToken",Gw="GetSessionToken",Mh="Issuer",zh="Key",Nh="Name",Wh="NameQualifier",Z="Policy",$="PolicyArns",Th="PrincipalArn",Ah="ProviderArn",Rh="ProvidedContexts",Lh="ProviderId",U="PackedPolicySize",jh="Provider",W="RoleArn",i="RoleSessionName",ah="Subject",rh="SecretAccessKey",sh="SAMLAssertion",_h="SubjectFromWebIdentityToken",V="SourceIdentity",c="SerialNumber",bh="SubjectType",fh="SessionToken",e="Tags",p="TokenCode",Ch="TransitiveTagKeys",Oh="UserId",s="Version",gh="Value",xh="WebIdentityToken",ih="arn",m="message",_=(h)=>Object.entries(h).map(([d,l])=>ch(d)+"="+ch(l)).join("&"),Iw=(h,d)=>{if(d.Error?.Code!==void 0)return d.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,V0).ser(j0).de(O0).build(){}class ph extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(P0,v0).ser(a0).de(g0).build(){}class lh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(M0,z0).ser(r0).de(x0).build(){}class nh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(s0).de(i0).build(){}class oh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(_0).de(c0).build(){}class uh extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(b0).de(e0).build(){}class th extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,N0).ser(f0).de(p0).build(){}class hl extends K.classBuilder().ep({...D}).m(function(h,d,l,w){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,W0).ser(C0).de(n0).build(){}var Hw={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:ph,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:nh,GetAccessKeyInfoCommand:oh,GetCallerIdentityCommand:uh,GetFederationTokenCommand:th,GetSessionTokenCommand:hl};class t0 extends A{}u0(Hw,t0);var hd="us-east-1",ld=(h)=>{if(typeof h?.Arn==="string"){const d=h.Arn.split(":");if(d.length>4&&d[4]!=="")return d[4]}return},dd=async(h,d,l)=>{const w=typeof h==="function"?await h():h,G=typeof d==="function"?await d():d;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${w} (provider)`,`${G} (parent client)`,`${hd} (STS default)`),w??G??hd},wd=(h,d)=>{let l,w;return async(G,H)=>{if(w=G,!l){const{logger:M=h?.parentClientConfig?.logger,region:n,requestHandler:Bh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Hd}=h,Sd=await dd(n,h?.parentClientConfig?.region,Hd);l=new d({credentialDefaultProvider:()=>async()=>w,region:Sd,requestHandler:Bh,logger:M})}const{Credentials:I,AssumedRoleUser:Q}=await l.send(new hh(H));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${H.RoleArn}`);const v=ld(Q);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...v&&{accountId:v}}}},Gd=(h,d)=>{let l;return async(w)=>{if(!l){const{logger:Q=h?.parentClientConfig?.logger,region:v,requestHandler:M=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,Bh=await dd(v,h?.parentClientConfig?.region,n);l=new d({region:Bh,requestHandler:M,logger:Q})}const{Credentials:G,AssumedRoleUser:H}=await l.send(new lh(w));if(!G||!G.AccessKeyId||!G.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const I=ld(H);return{accessKeyId:G.AccessKeyId,secretAccessKey:G.SecretAccessKey,sessionToken:G.SessionToken,expiration:G.Expiration,...G.CredentialScope&&{credentialScope:G.CredentialScope},...I&&{accountId:I}}}};var Id=(h,d)=>{if(!d)return h;else return class l extends h{constructor(w){super(w);for(let G of d)this.middlewareStack.use(G)}}},Sw=(h={},d)=>wd(h,Id(A,d)),mw=(h={},d)=>Gd(h,Id(A,d)),RG=(h)=>(d)=>h({roleAssumer:Sw(d),roleAssumerWithWebIdentity:mw(d),...d});export{mw as getDefaultRoleAssumerWithWebIdentity,Sw as getDefaultRoleAssumer,RG as decorateDefaultCredentialProvider,B0 as __Client,Y as STSServiceException,A as STSClient,t0 as STS,Jh as RegionDisabledException,mh as PackedPolicyTooLargeException,Sh as MalformedPolicyDocumentException,Eh as InvalidIdentityTokenException,Kh as InvalidAuthorizationMessageException,Dh as IDPRejectedClaimException,kh as IDPCommunicationErrorException,W0 as GetSessionTokenResponseFilterSensitiveLog,hl as GetSessionTokenCommand,N0 as GetFederationTokenResponseFilterSensitiveLog,th as GetFederationTokenCommand,uh as GetCallerIdentityCommand,oh as GetAccessKeyInfoCommand,Hh as ExpiredTokenException,nh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,z0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,M0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,v0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,P0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,ph as AssumeRoleWithSAMLCommand,V0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,K as $Command};