@stacksjs/buddy 0.70.17 → 0.70.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-0jxg9wtp.js +25 -0
- package/dist/{chunk-tb4wat6y.js → chunk-32hzcz6w.js} +1 -1
- package/dist/chunk-38tjpppq.js +2 -0
- package/dist/{chunk-yjmev4jy.js → chunk-46gp2nz5.js} +2 -2
- package/dist/{chunk-6bsjhkd1.js → chunk-52kyqrp3.js} +1 -1
- package/dist/{chunk-xhnxfews.js → chunk-5tcm3e40.js} +1 -1
- package/dist/{chunk-w410kf33.js → chunk-6cj2q4z5.js} +1 -1
- package/dist/{chunk-y6xd7gz4.js → chunk-7qshr3j6.js} +1 -1
- package/dist/{chunk-tnexd1vh.js → chunk-8shfhpe4.js} +1 -1
- package/dist/{chunk-x50q43zy.js → chunk-adkpvcss.js} +2 -2
- package/dist/{chunk-enzd7k3d.js → chunk-bd2fcep6.js} +1 -1
- package/dist/chunk-bt8w5dcz.js +2 -0
- package/dist/chunk-cqn8te7s.js +3 -0
- package/dist/chunk-d8m7se01.js +6 -0
- package/dist/chunk-ecyvtfdz.js +2 -0
- package/dist/{chunk-swrx1kwt.js → chunk-ejjg44ge.js} +1 -1
- package/dist/chunk-fbvjqk5b.js +2 -0
- package/dist/{chunk-s8p639n9.js → chunk-g30vw45j.js} +115 -115
- package/dist/chunk-hc21eaj7.js +1 -0
- package/dist/{chunk-y9we573f.js → chunk-hytw59py.js} +1 -1
- package/dist/chunk-kjs2w927.js +5 -0
- package/dist/chunk-mcrcnw62.js +3 -0
- package/dist/{chunk-51z2y1an.js → chunk-mnxsveqe.js} +2 -2
- package/dist/chunk-mznacez6.js +2 -0
- package/dist/{chunk-1xg8yqzr.js → chunk-t1zcfas5.js} +2 -2
- package/dist/{chunk-jaw9rsy5.js → chunk-t6dr6rak.js} +1 -1
- package/dist/chunk-tgjbbxam.js +3 -0
- package/dist/chunk-x63gk2p6.js +2 -0
- package/dist/chunk-xf3x08tz.js +2 -0
- package/dist/{chunk-0pctvmzj.js → chunk-yfn5e0ky.js} +1 -1
- package/dist/{chunk-2kgzc9hn.js → chunk-zxb0bj0c.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-02xryjt7.js +0 -2
- package/dist/chunk-18tc3app.js +0 -2
- package/dist/chunk-1hyckzds.js +0 -2
- package/dist/chunk-225rwa7q.js +0 -2
- package/dist/chunk-59wz96e5.js +0 -25
- package/dist/chunk-5ac533gv.js +0 -2
- package/dist/chunk-7pzg81vs.js +0 -5
- package/dist/chunk-97y685k1.js +0 -3
- package/dist/chunk-c57y9ssg.js +0 -3
- package/dist/chunk-f6ns0rrk.js +0 -2
- package/dist/chunk-mq9sjfzt.js +0 -6
- package/dist/chunk-rjjeq0tb.js +0 -3
- package/dist/chunk-y21redjp.js +0 -2
- package/dist/chunk-yen4jxhm.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class n extends Error{constructor(t,e=!0){let o,r=!0;if(typeof e==="boolean")o=void 0,r=e;else if(e!=null&&typeof e==="object")o=e.logger,r=e.tryNextLink??!0;super(t);this.name="ProviderError",this.tryNextLink=r,Object.setPrototypeOf(this,n.prototype),o?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,e=!0){return Object.assign(new this(t.message,e),t)}}class u extends n{constructor(t,e=!0){super(t,e);this.name="CredentialsProviderError",Object.setPrototypeOf(this,u.prototype)}}class l extends n{constructor(t,e=!0){super(t,e);this.name="TokenProviderError",Object.setPrototypeOf(this,l.prototype)}}var v=(...t)=>async()=>{if(t.length===0)throw new n("No providers in chain");let e;for(let o of t)try{return await o()}catch(r){if(e=r,r?.tryNextLink)continue;throw r}throw e};var w=(t)=>()=>Promise.resolve(t);var b=(t,e,o)=>{let r,i,s,f=!1,a=async()=>{if(!i)i=t();try{r=await i,s=!0,f=!1}finally{i=void 0}return r};if(e===void 0)return async(c)=>{if(!s||c?.forceRefresh)r=await a();return r};return async(c)=>{if(!s||c?.forceRefresh)r=await a();if(f)return r;if(o&&!o(r))return f=!0,r;if(e(r))return await a(),r;return r}};export{n as Tc,u as Uc,l as Vc,v as Wc,w as Xc,b as Yc};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ga as U,Ha as m}from"./chunk-6v69415e.js";import"./chunk-
|
|
2
|
+
import{Ga as U,Ha as m}from"./chunk-6v69415e.js";import"./chunk-yfn5e0ky.js";/*!
|
|
3
3
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{Gc as U}from"./chunk-mnxsveqe.js";import{Pc as D}from"./chunk-adkpvcss.js";import{_c as M}from"./chunk-yfn5e0ky.js";var b=(e,t)=>{let r=[];if(e)r.push(e);if(t)for(let n of t)r.push(n);return r},S=(e,t)=>{return`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`},$=()=>{let e=[],t=[],r=!1,n=new Set,o=(a)=>a.sort((f,d)=>Q[d.step]-Q[f.step]||G[d.priority||"normal"]-G[f.priority||"normal"]),s=(a)=>{let f=!1,d=(m)=>{let g=b(m.name,m.aliases);if(g.includes(a)){f=!0;for(let l of g)n.delete(l);return!1}return!0};return e=e.filter(d),t=t.filter(d),f},i=(a)=>{let f=!1,d=(m)=>{if(m.middleware===a){f=!0;for(let g of b(m.name,m.aliases))n.delete(g);return!1}return!0};return e=e.filter(d),t=t.filter(d),f},c=(a)=>{return e.forEach((f)=>{a.add(f.middleware,{...f})}),t.forEach((f)=>{a.addRelativeTo(f.middleware,{...f})}),a.identifyOnResolve?.(E.identifyOnResolve()),a},p=(a)=>{let f=[];return a.before.forEach((d)=>{if(d.before.length===0&&d.after.length===0)f.push(d);else f.push(...p(d))}),f.push(a),a.after.reverse().forEach((d)=>{if(d.before.length===0&&d.after.length===0)f.push(d);else f.push(...p(d))}),f},x=(a=!1)=>{let f=[],d=[],m={};return e.forEach((l)=>{let h={...l,before:[],after:[]};for(let u of b(h.name,h.aliases))m[u]=h;f.push(h)}),t.forEach((l)=>{let h={...l,before:[],after:[]};for(let u of b(h.name,h.aliases))m[u]=h;d.push(h)}),d.forEach((l)=>{if(l.toMiddleware){let h=m[l.toMiddleware];if(h===void 0){if(a)return;throw new Error(`${l.toMiddleware} is not found when adding ${S(l.name,l.aliases)} middleware ${l.relation} ${l.toMiddleware}`)}if(l.relation==="after")h.after.push(l);if(l.relation==="before")h.before.push(l)}}),o(f).map(p).reduce((l,h)=>{return l.push(...h),l},[])},E={add:(a,f={})=>{let{name:d,override:m,aliases:g}=f,l={step:"initialize",priority:"normal",middleware:a,...f},h=b(d,g);if(h.length>0){if(h.some((u)=>n.has(u))){if(!m)throw new Error(`Duplicate middleware name '${S(d,g)}'`);for(let u of h){let y=e.findIndex((A)=>A.name===u||A.aliases?.some((O)=>O===u));if(y===-1)continue;let T=e[y];if(T.step!==l.step||l.priority!==T.priority)throw new Error(`"${S(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${S(d,g)}" middleware with ${l.priority} priority in ${l.step} step.`);e.splice(y,1)}}for(let u of h)n.add(u)}e.push(l)},addRelativeTo:(a,f)=>{let{name:d,override:m,aliases:g}=f,l={middleware:a,...f},h=b(d,g);if(h.length>0){if(h.some((u)=>n.has(u))){if(!m)throw new Error(`Duplicate middleware name '${S(d,g)}'`);for(let u of h){let y=t.findIndex((A)=>A.name===u||A.aliases?.some((O)=>O===u));if(y===-1)continue;let T=t[y];if(T.toMiddleware!==l.toMiddleware||T.relation!==l.relation)throw new Error(`"${S(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${S(d,g)}" middleware ${l.relation} "${l.toMiddleware}" middleware.`);t.splice(y,1)}}for(let u of h)n.add(u)}t.push(l)},clone:()=>c($()),use:(a)=>{a.applyToStack(E)},remove:(a)=>{if(typeof a==="string")return s(a);else return i(a)},removeByTag:(a)=>{let f=!1,d=(m)=>{let{tags:g,name:l,aliases:h}=m;if(g&&g.includes(a)){let u=b(l,h);for(let y of u)n.delete(y);return f=!0,!1}return!0};return e=e.filter(d),t=t.filter(d),f},concat:(a)=>{let f=c($());return f.use(a),f.identifyOnResolve(r||f.identifyOnResolve()||(a.identifyOnResolve?.()??!1)),f},applyToStack:c,identify:()=>{return x(!0).map((a)=>{let f=a.step??a.relation+" "+a.toMiddleware;return S(a.name,a.aliases)+" - "+f})},identifyOnResolve(a){if(typeof a==="boolean")r=a;return r},resolve:(a,f)=>{for(let d of x().map((m)=>m.middleware).reverse())a=d(a,f);if(r)console.log(E.identify());return a}};return E},Q={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},G={high:3,normal:2,low:1};class $e{constructor(e){this.config=e,this.middlewareStack=$()}send(e,t,r){let n=typeof t!=="function"?t:void 0,o=typeof t==="function"?t:r,s=n===void 0&&this.config.cacheMiddleware===!0,i;if(s){if(!this.handlers)this.handlers=new WeakMap;let c=this.handlers;if(c.has(e.constructor))i=c.get(e.constructor);else i=e.resolveMiddleware(this.middlewareStack,this.config,n),c.set(e.constructor,i)}else delete this.handlers,i=e.resolveMiddleware(this.middlewareStack,this.config,n);if(o)i(e).then((c)=>o(null,c.output),(c)=>o(c)).catch(()=>{});else return i(e).then((c)=>c.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var Z=M(D(),1);class X{constructor(){this.middlewareStack=$()}static classBuilder(){return new K}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:i,outputFilterSensitiveLog:c,smithyContext:p,additionalContext:x,CommandCtor:E}){for(let g of n.bind(this)(E,e,t,r))this.middlewareStack.use(g);let a=e.concat(this.middlewareStack),{logger:f}=t,d={logger:f,clientName:o,commandName:s,inputFilterSensitiveLog:i,outputFilterSensitiveLog:c,[Z.SMITHY_CONTEXT_KEY]:{commandInstance:this,...p},...x},{requestHandler:m}=t;return a.resolve((g)=>m.handle(g.request,r||{}),d)}}class K{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(e)=>e,this._outputFilterSensitiveLog=(e)=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=(r)=>r,t=(r)=>r){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){let e=this,t;return t=class extends X{static getEndpointParameterInstructions(){return e._ep}constructor(...[r]){super();this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=r??{},e._init(this)}resolveMiddleware(r,n,o){return this.resolveMiddlewareWithContext(r,n,o,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}var Me=M(U(),1);var pt="***SensitiveInformation***";var wt=(e)=>{if(e===null||e===void 0)return;if(typeof e==="number"){if(e===0||e===1)k.warn(R(`Expected boolean, got ${typeof e}: ${e}`));if(e===0)return!1;if(e===1)return!0}if(typeof e==="string"){let t=e.toLowerCase();if(t==="false"||t==="true")k.warn(R(`Expected boolean, got ${typeof e}: ${e}`));if(t==="false")return!1;if(t==="true")return!0}if(typeof e==="boolean")return e;throw new TypeError(`Expected boolean, got ${typeof e}: ${e}`)},ne=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string"){let t=parseFloat(e);if(!Number.isNaN(t)){if(String(t)!==String(e))k.warn(R(`Expected number but observed string: ${e}`));return t}}if(typeof e==="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)},Ie=Math.ceil(340282346638528860000000000000000000000),v=(e)=>{let t=ne(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0){if(Math.abs(t)>Ie)throw new TypeError(`Expected 32-bit float, got ${e}`)}return t},Ae=(e)=>{if(e===null||e===void 0)return;if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)};var ee=(e)=>L(e,32),te=(e)=>L(e,16),re=(e)=>L(e,8),L=(e,t)=>{let r=Ae(e);if(r!==void 0&&Ne(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Ne=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},xt=(e,t)=>{if(e===null||e===void 0){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e},Et=(e)=>{if(e===null||e===void 0)return;if(typeof e==="object"&&!Array.isArray(e))return e;let t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},Tt=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string")return e;if(["boolean","number","bigint"].includes(typeof e))return k.warn(R(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)};var oe=(e)=>{if(typeof e=="string")return v(F(e));return v(e)},_e=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,F=(e)=>{let t=e.match(_e);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},St=(e)=>{if(typeof e=="string")return Re(e);return ne(e)};var Re=(e)=>{switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${e}`)}};var bt=(e)=>{if(typeof e==="string")return ee(F(e));return ee(e)},z=(e)=>{if(typeof e==="string")return te(F(e));return te(e)},se=(e)=>{if(typeof e==="string")return re(F(e));return re(e)},R=(e)=>{return String(new TypeError(e).stack||e).split(`
|
|
2
|
+
`).slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join(`
|
|
3
|
+
`)},k={warn:console.warn};var ke=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var Fe=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),It=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=Fe.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,s,i,c,p,x]=t,E=z(H(n)),a=C(o,"month",1,12),f=C(s,"day",1,31);return ie(E,a,f,{hours:i,minutes:c,seconds:p,fractionalMilliseconds:x})},Pe=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),At=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=Pe.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,s,i,c,p,x,E]=t,a=z(H(n)),f=C(o,"month",1,12),d=C(s,"day",1,31),m=ie(a,f,d,{hours:i,minutes:c,seconds:p,fractionalMilliseconds:x});if(E.toUpperCase()!="Z")m.setTime(m.getTime()-ze(E));return m},Nt=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$/),_t=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$/),Rt=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})$/);var ie=(e,t,r,n)=>{let o=t-1;return De(e,o,r),new Date(Date.UTC(e,o,r,C(n.hours,"hour",0,23),C(n.minutes,"minute",0,59),C(n.seconds,"seconds",0,60),Le(n.fractionalMilliseconds)))};var Oe=[31,28,31,30,31,30,31,31,30,31,30,31],De=(e,t,r)=>{let n=Oe[t];if(t===1&&Ue(e))n=29;if(r>n)throw new TypeError(`Invalid day for ${ke[t]} in ${e}: ${r}`)},Ue=(e)=>{return e%4===0&&(e%100!==0||e%400===0)},C=(e,t,r,n)=>{let o=se(H(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},Le=(e)=>{if(e===null||e===void 0)return 0;return oe("0."+e)*1000},ze=(e)=>{let t=e[0],r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);let n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1000},H=(e)=>{let t=0;while(t<e.length-1&&e.charAt(t)==="0")t++;if(t===0)return e;return e.slice(t)};class N extends Error{constructor(e){super(e.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;let t=e;return N.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&(t.$fault==="client"||t.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;let t=e;if(this===N)return N.isInstance(e);if(N.isInstance(e)){if(t.name&&this.name)return this.prototype.isPrototypeOf(e)||t.name===this.name;return this.prototype.isPrototypeOf(e)}return!1}}var ce=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,o])=>{if(e[n]==null||e[n]==="")e[n]=o});let r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e};var He=({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{let o=Be(e),s=o.httpStatusCode?o.httpStatusCode+"":void 0,i=new r({name:t?.code||t?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw ce(i,t)},Ot=(e)=>{return({output:t,parsedBody:r,errorCode:n})=>{He({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})}},Be=(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 Ut=(e)=>{switch(e){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 ae=!1,zt=(e)=>{if(e&&!ae&&parseInt(e.substring(1,e.indexOf(".")))<16)ae=!0};var We=M(U(),1);var B=M(D(),1);var fe=(e)=>{let t=[];for(let r in B.AlgorithmId){let n=B.AlgorithmId[r];if(e[n]===void 0)continue;t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{addChecksumAlgorithm(r){t.push(r)},checksumAlgorithms(){return t}}},de=(e)=>{let t={};return e.checksumAlgorithms().forEach((r)=>{t[r.algorithmId()]=r.checksumConstructor()}),t};var ue=(e)=>{return{setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}},le=(e)=>{let t={};return t.retryStrategy=e.retryStrategy(),t};var qt=(e)=>{return Object.assign(fe(e),ue(e))};var Vt=(e)=>{return Object.assign(de(e),le(e))};var Xt=(e)=>Array.isArray(e)?e:[e];var er=(e)=>{return e!=null};var I=function e(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};I.from=(e)=>{if(e&&typeof e==="object"&&(e instanceof I||("deserializeJSON"in e)))return e;else if(typeof e==="string"||Object.getPrototypeOf(e)===String.prototype)return I(String(e));return I(JSON.stringify(e))};I.fromObject=I.from;class Je{trace(){}debug(){}info(){}warn(){}error(){}}function je(e,t,r){let n,o,s;if(typeof t==="undefined"&&typeof r==="undefined")n={},s=e;else if(n=e,typeof t==="function")return o=t,s=r,Ye(n,o,s);else s=t;for(let i of Object.keys(s)){if(!Array.isArray(s[i])){n[i]=s[i];continue}he(n,null,s,i)}return n}var or=(e,t)=>{let r={};for(let n in t)he(r,e,t,n);return r},Ye=(e,t,r)=>{return je(e,Object.entries(r).reduce((n,[o,s])=>{if(Array.isArray(s))n[o]=s;else if(typeof s==="function")n[o]=[t,s()];else n[o]=[t,s];return n},{}))},he=(e,t,r,n)=>{if(t!==null){let i=r[n];if(typeof i==="function")i=[,i];let[c=qe,p=Ve,x=n]=i;if(typeof c==="function"&&c(t[x])||typeof c!=="function"&&!!c)e[n]=p(t[x]);return}let[o,s]=r[n];if(typeof s==="function"){let i,c=o===void 0&&(i=s())!=null,p=typeof o==="function"&&!!o(void 0)||typeof o!=="function"&&!!o;if(c)e[n]=i;else if(p)e[n]=s()}else{let i=o===void 0&&s!=null,c=typeof o==="function"&&!!o(s)||typeof o!=="function"&&!!o;if(i||c)e[n]=s}},qe=(e)=>e!=null,Ve=(e)=>e;var Qe=M(U(),1);var me=(e)=>{if(e==null)return{};if(Array.isArray(e))return e.filter((t)=>t!=null).map(me);if(typeof e==="object"){let t={};for(let r of Object.keys(e)){if(e[r]==null)continue;t[r]=me(e[r])}return t}return e};var Lr=(e)=>{return{setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}},zr=(e)=>{return{httpHandler:e.httpHandler()}};var Ge=M(D(),1);class W{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){let t=new W({...e,headers:{...e.headers}});if(t.query)t.query=Ze(t.query);return t}static isInstance(e){if(!e)return!1;let t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return W.clone(this)}}function Ze(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class P{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;let t=e;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}var _=(e)=>encodeURIComponent(e).replace(/[!'()*]/g,Xe),Xe=(e)=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function J(e){let t=[];for(let r of Object.keys(e).sort()){let n=e[r];if(r=_(r),Array.isArray(n))for(let o=0,s=n.length;o<s;o++)t.push(`${r}=${_(n[o])}`);else{let o=r;if(n||typeof n==="string")o+=`=${_(n)}`;t.push(o)}}return t.join("&")}import{Agent as be,request as tt}from"node:http";import{Agent as Ce,request as rt}from"node:https";var pe=["ECONNRESET","EPIPE","ETIMEDOUT"];var j=(e)=>{let t={};for(let r of Object.keys(e)){let n=e[r];t[r]=Array.isArray(n)?n.join(","):n}return t};var w={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:(e)=>clearTimeout(e)};var ge=1000,ye=(e,t,r=0)=>{if(!r)return-1;let n=(o)=>{let s=w.setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r-o),i=(c)=>{if(c?.connecting)c.on("connect",()=>{w.clearTimeout(s)});else w.clearTimeout(s)};if(e.socket)i(e.socket);else e.on("socket",i)};if(r<2000)return n(0),0;return w.setTimeout(n.bind(null,ge),ge)};var Ke=3000,we=(e,{keepAlive:t,keepAliveMsecs:r},n=Ke)=>{if(t!==!0)return-1;let o=()=>{if(e.socket)e.socket.setKeepAlive(t,r||0);else e.on("socket",(s)=>{s.setKeepAlive(t,r||0)})};if(n===0)return o(),0;return w.setTimeout(o,n)};var xe=3000,Ee=(e,t,r=Te)=>{let n=(o)=>{let s=r-o,i=()=>{e.destroy(),t(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))};if(e.socket)e.socket.setTimeout(s,i),e.on("close",()=>e.socket?.removeListener("timeout",i));else e.setTimeout(s,i)};if(0<r&&r<6000)return n(0),0;return w.setTimeout(n.bind(null,r===0?0:xe),xe)};import{Readable as ve}from"node:stream";var Se=6000;async function Y(e,t,r=Se){let n=t.headers??{},o=n.Expect||n.expect,s=-1,i=!0;if(o==="100-continue")i=await Promise.race([new Promise((c)=>{s=Number(w.setTimeout(()=>c(!0),Math.max(Se,r)))}),new Promise((c)=>{e.on("continue",()=>{w.clearTimeout(s),c(!0)}),e.on("response",()=>{w.clearTimeout(s),c(!1)}),e.on("error",()=>{w.clearTimeout(s),c(!1)})})]);if(i)et(e,t.body)}function et(e,t){if(t instanceof ve){t.pipe(e);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){e.end(t);return}let r=t;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){e.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}e.end(Buffer.from(t));return}e.end()}var Te=0;class q{static create(e){if(typeof e?.handle==="function")return e;return new q(e)}static checkSocketUsage(e,t,r=console){let{sockets:n,requests:o,maxSockets:s}=e;if(typeof s!=="number"||s===1/0)return t;let i=15000;if(Date.now()-i<t)return t;if(n&&o)for(let c in n){let p=n[c]?.length??0,x=o[c]?.length??0;if(p>=s&&x>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${p} and ${x} 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(e){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,r)=>{if(typeof e==="function")e().then((n)=>{t(this.resolveDefaultConfig(n))}).catch(r);else t(this.resolveDefaultConfig(e))})}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:r,socketTimeout:n,socketAcquisitionWarningTimeout:o,httpAgent:s,httpsAgent:i}=e||{},c=!0,p=50;return{connectionTimeout:r,requestTimeout:t??n,socketAcquisitionWarningTimeout:o,httpAgent:(()=>{if(s instanceof be||typeof s?.destroy==="function")return s;return new be({keepAlive:!0,maxSockets:50,...s})})(),httpsAgent:(()=>{if(i instanceof Ce||typeof i?.destroy==="function")return i;return new Ce({keepAlive:!0,maxSockets:50,...i})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;return new Promise((r,n)=>{let o=void 0,s=[],i=async(u)=>{await o,s.forEach(w.clearTimeout),r(u)},c=async(u)=>{await o,s.forEach(w.clearTimeout),n(u)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){let u=new Error("Request aborted");u.name="AbortError",c(u);return}let p=e.protocol==="https:",x=p?this.config.httpsAgent:this.config.httpAgent;s.push(w.setTimeout(()=>{this.socketWarningTimestamp=q.checkSocketUsage(x,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let E=J(e.query||{}),a=void 0;if(e.username!=null||e.password!=null){let u=e.username??"",y=e.password??"";a=`${u}:${y}`}let f=e.path;if(E)f+=`?${E}`;if(e.fragment)f+=`#${e.fragment}`;let d=e.hostname??"";if(d[0]==="["&&d.endsWith("]"))d=e.hostname.slice(1,-1);else d=e.hostname;let m={headers:e.headers,host:d,method:e.method,path:f,port:e.port,agent:x,auth:a},l=(p?rt:tt)(m,(u)=>{let y=new P({statusCode:u.statusCode||-1,reason:u.statusMessage,headers:j(u.headers),body:u});i({response:y})});if(l.on("error",(u)=>{if(pe.includes(u.code))c(Object.assign(u,{name:"TimeoutError"}));else c(u)}),t){let u=()=>{l.destroy();let y=new Error("Request aborted");y.name="AbortError",c(y)};if(typeof t.addEventListener==="function"){let y=t;y.addEventListener("abort",u,{once:!0}),l.once("close",()=>y.removeEventListener("abort",u))}else t.onabort=u}s.push(ye(l,c,this.config.connectionTimeout)),s.push(Ee(l,c,this.config.requestTimeout));let h=m.agent;if(typeof h==="object"&&"keepAlive"in h)s.push(we(l,{keepAlive:h.keepAlive,keepAliveMsecs:h.keepAliveMsecs}));o=Y(l,e,this.config.requestTimeout).catch((u)=>{return s.forEach(w.clearTimeout),n(u)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[e]:t}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as nt}from"node:stream";class V extends nt{constructor(){super(...arguments);this.bufferedBytes=[]}_write(e,t,r){this.bufferedBytes.push(e),r()}}var Xn=(e)=>{if(ot(e))return st(e);return new Promise((t,r)=>{let n=new V;e.pipe(n),e.on("error",(o)=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){let o=new Uint8Array(Buffer.concat(this.bufferedBytes));t(o)})})},ot=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;async function st(e){let t=[],r=e.getReader(),n=!1,o=0;while(!n){let{done:c,value:p}=await r.read();if(p)t.push(p),o+=p.length;n=c}let s=new Uint8Array(o),i=0;for(let c of t)s.set(c,i),i+=c.length;return s}export{Lr as Mb,zr as Nb,W as Ob,P as Pb,$e as Qb,X as Rb,pt as Sb,wt as Tb,ee as Ub,xt as Vb,Et as Wb,Tt as Xb,St as Yb,bt as Zb,It as _b,At as $b,N as ac,ce as bc,Ot as cc,Ut as dc,zt as ec,qt as fc,Vt as gc,Xt as hc,er as ic,Je as jc,je as kc,or as lc,me as mc,q as nc,Xn as oc};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{pc as f0,qc as X6,rc as $7,tc as a0,uc as Q2,vc as rj,wc as W2}from"./chunk-0jxg9wtp.js";import{Ac as t2,xc as l,zc as o2}from"./chunk-mnxsveqe.js";import{Pc as S1}from"./chunk-adkpvcss.js";import{ad as q,dd as F}from"./chunk-yfn5e0ky.js";var a5=q((F9,D1)=>{var{defineProperty:r,getOwnPropertyDescriptor:c5,getOwnPropertyNames:d5}=Object,l5=Object.prototype.hasOwnProperty,n=(j,$)=>r(j,"name",{value:$,configurable:!0}),_5=(j,$)=>{for(var z in $)r(j,z,{get:$[z],enumerable:!0})},s5=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of d5($))if(!l5.call(j,Q)&&Q!==z)r(j,Q,{get:()=>$[Q],enumerable:!(W=c5($,Q))||W.enumerable})}return j},m5=(j)=>s5(r({},"__esModule",{value:!0}),j),L1={};_5(L1,{getHostHeaderPlugin:()=>i5,hostHeaderMiddleware:()=>b1,hostHeaderMiddlewareOptions:()=>F1,resolveHostHeaderConfig:()=>M1});D1.exports=m5(L1);var p5=l();function M1(j){return j}n(M1,"resolveHostHeaderConfig");var b1=n((j)=>($)=>async(z)=>{if(!p5.HttpRequest.isInstance(z.request))return $(z);let{request:W}=z,{handlerProtocol:Q=""}=j.requestHandler.metadata||{};if(Q.indexOf("h2")>=0&&!W.headers[":authority"])delete W.headers.host,W.headers[":authority"]=W.hostname+(W.port?":"+W.port:"");else if(!W.headers.host){let Z=W.hostname;if(W.port!=null)Z+=`:${W.port}`;W.headers.host=Z}return $(z)},"hostHeaderMiddleware"),F1={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},i5=n((j)=>({applyToStack:n(($)=>{$.add(b1(j),F1)},"applyToStack")}),"getHostHeaderPlugin")});var zj=q((D9,C1)=>{var{defineProperty:o,getOwnPropertyDescriptor:n5,getOwnPropertyNames:r5}=Object,o5=Object.prototype.hasOwnProperty,R0=(j,$)=>o(j,"name",{value:$,configurable:!0}),t5=(j,$)=>{for(var z in $)o(j,z,{get:$[z],enumerable:!0})},e5=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of r5($))if(!o5.call(j,Q)&&Q!==z)o(j,Q,{get:()=>$[Q],enumerable:!(W=n5($,Q))||W.enumerable})}return j},jj=(j)=>e5(o({},"__esModule",{value:!0}),j),h1={};t5(h1,{getLoggerPlugin:()=>$j,loggerMiddleware:()=>N1,loggerMiddlewareOptions:()=>O1});C1.exports=jj(h1);var N1=R0(()=>(j,$)=>async(z)=>{try{let W=await j(z),{clientName:Q,commandName:Z,logger:X,dynamoDbDocumentClientOptions:J={}}=$,{overrideInputFilterSensitiveLog:K,overrideOutputFilterSensitiveLog:G}=J,V=K??$.inputFilterSensitiveLog,Y=G??$.outputFilterSensitiveLog,{$metadata:B,...b}=W.output;return X?.info?.({clientName:Q,commandName:Z,input:V(z.input),output:Y(b),metadata:B}),W}catch(W){let{clientName:Q,commandName:Z,logger:X,dynamoDbDocumentClientOptions:J={}}=$,{overrideInputFilterSensitiveLog:K}=J,G=K??$.inputFilterSensitiveLog;throw X?.error?.({clientName:Q,commandName:Z,input:G(z.input),error:W,metadata:W.$metadata}),W}},"loggerMiddleware"),O1={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},$j=R0((j)=>({applyToStack:R0(($)=>{$.add(N1(),O1)},"applyToStack")}),"getLoggerPlugin")});var Vj=q((h9,R1)=>{var{defineProperty:e,getOwnPropertyDescriptor:Qj,getOwnPropertyNames:Wj}=Object,Zj=Object.prototype.hasOwnProperty,t=(j,$)=>e(j,"name",{value:$,configurable:!0}),Xj=(j,$)=>{for(var z in $)e(j,z,{get:$[z],enumerable:!0})},Jj=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of Wj($))if(!Zj.call(j,Q)&&Q!==z)e(j,Q,{get:()=>$[Q],enumerable:!(W=Qj($,Q))||W.enumerable})}return j},Kj=(j)=>Jj(e({},"__esModule",{value:!0}),j),T1={};Xj(T1,{addRecursionDetectionMiddlewareOptions:()=>v1,getRecursionDetectionPlugin:()=>qj,recursionDetectionMiddleware:()=>I1});R1.exports=Kj(T1);var Gj=l(),S0="X-Amzn-Trace-Id",Yj="AWS_LAMBDA_FUNCTION_NAME",Bj="_X_AMZN_TRACE_ID",I1=t((j)=>($)=>async(z)=>{let{request:W}=z;if(!Gj.HttpRequest.isInstance(W)||j.runtime!=="node")return $(z);let Q=Object.keys(W.headers??{}).find((K)=>K.toLowerCase()===S0.toLowerCase())??S0;if(W.headers.hasOwnProperty(Q))return $(z);let Z=process.env[Yj],X=process.env[Bj],J=t((K)=>typeof K==="string"&&K.length>0,"nonEmptyString");if(J(Z)&&J(X))W.headers[S0]=X;return $({...z,request:W})},"recursionDetectionMiddleware"),v1={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},qj=t((j)=>({applyToStack:t(($)=>{$.add(I1(j),v1)},"applyToStack")}),"getRecursionDetectionPlugin")});var c1=q((N9,u1)=>{var{defineProperty:j0,getOwnPropertyDescriptor:Hj,getOwnPropertyNames:wj}=Object,Uj=Object.prototype.hasOwnProperty,H=(j,$)=>j0(j,"name",{value:$,configurable:!0}),Lj=(j,$)=>{for(var z in $)j0(j,z,{get:$[z],enumerable:!0})},Mj=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of wj($))if(!Uj.call(j,Q)&&Q!==z)j0(j,Q,{get:()=>$[Q],enumerable:!(W=Hj($,Q))||W.enumerable})}return j},bj=(j)=>Mj(j0({},"__esModule",{value:!0}),j),k1={};Lj(k1,{EndpointCache:()=>Fj,EndpointError:()=>h,customEndpointFunctions:()=>P0,isIpAddress:()=>P1,isValidHostLabel:()=>x0,resolveEndpoint:()=>uj});u1.exports=bj(k1);var Fj=class{constructor({size:j,params:$}){if(this.data=new Map,this.parameters=[],this.capacity=j??50,$)this.parameters=$}static{H(this,"EndpointCache")}get(j,$){let z=this.hash(j);if(z===!1)return $();if(!this.data.has(z)){if(this.data.size>this.capacity+10){let W=this.data.keys(),Q=0;while(!0){let{value:Z,done:X}=W.next();if(this.data.delete(Z),X||++Q>10)break}}this.data.set(z,$())}return this.data.get(z)}size(){return this.data.size}hash(j){let $="",{parameters:z}=this;if(z.length===0)return!1;for(let W of z){let Q=String(j[W]??"");if(Q.includes("|;"))return!1;$+=Q+"|;"}return $}},Dj=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),P1=H((j)=>Dj.test(j)||j.startsWith("[")&&j.endsWith("]"),"isIpAddress"),hj=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),x0=H((j,$=!1)=>{if(!$)return hj.test(j);let z=j.split(".");for(let W of z)if(!x0(W))return!1;return!0},"isValidHostLabel"),P0={},_="endpoints";function k(j){if(typeof j!=="object"||j==null)return j;if("ref"in j)return`$${k(j.ref)}`;if("fn"in j)return`${j.fn}(${(j.argv||[]).map(k).join(", ")})`;return JSON.stringify(j,null,2)}H(k,"toDebugString");var h=class extends Error{static{H(this,"EndpointError")}constructor(j){super(j);this.name="EndpointError"}},Nj=H((j,$)=>j===$,"booleanEquals"),Oj=H((j)=>{let $=j.split("."),z=[];for(let W of $){let Q=W.indexOf("[");if(Q!==-1){if(W.indexOf("]")!==W.length-1)throw new h(`Path: '${j}' does not end with ']'`);let Z=W.slice(Q+1,-1);if(Number.isNaN(parseInt(Z)))throw new h(`Invalid array index: '${Z}' in path: '${j}'`);if(Q!==0)z.push(W.slice(0,Q));z.push(Z)}else z.push(W)}return z},"getAttrPathList"),A1=H((j,$)=>Oj($).reduce((z,W)=>{if(typeof z!=="object")throw new h(`Index '${W}' in '${$}' not found in '${JSON.stringify(j)}'`);else if(Array.isArray(z))return z[parseInt(W)];return z[W]},j),"getAttr"),Cj=H((j)=>j!=null,"isSet"),Tj=H((j)=>!j,"not"),A0=S1(),k0={[A0.EndpointURLScheme.HTTP]:80,[A0.EndpointURLScheme.HTTPS]:443},Ij=H((j)=>{let $=(()=>{try{if(j instanceof URL)return j;if(typeof j==="object"&&"hostname"in j){let{hostname:B,port:b,protocol:D="",path:O="",query:g5={}}=j,U1=new URL(`${D}//${B}${b?`:${b}`:""}${O}`);return U1.search=Object.entries(g5).map(([f5,u5])=>`${f5}=${u5}`).join("&"),U1}return new URL(j)}catch(B){return null}})();if(!$)return console.error(`Unable to parse ${JSON.stringify(j)} as a whatwg URL.`),null;let z=$.href,{host:W,hostname:Q,pathname:Z,protocol:X,search:J}=$;if(J)return null;let K=X.slice(0,-1);if(!Object.values(A0.EndpointURLScheme).includes(K))return null;let G=P1(Q),V=z.includes(`${W}:${k0[K]}`)||typeof j==="string"&&j.includes(`${W}:${k0[K]}`),Y=`${W}${V?`:${k0[K]}`:""}`;return{scheme:K,authority:Y,path:Z,normalizedPath:Z.endsWith("/")?Z:`${Z}/`,isIp:G}},"parseURL"),vj=H((j,$)=>j===$,"stringEquals"),Rj=H((j,$,z,W)=>{if($>=z||j.length<z)return null;if(!W)return j.substring($,z);return j.substring(j.length-z,j.length-$)},"substring"),Sj=H((j)=>encodeURIComponent(j).replace(/[!*'()]/g,($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode"),kj={booleanEquals:Nj,getAttr:A1,isSet:Cj,isValidHostLabel:x0,not:Tj,parseURL:Ij,stringEquals:vj,substring:Rj,uriEncode:Sj},x1=H((j,$)=>{let z=[],W={...$.endpointParams,...$.referenceRecord},Q=0;while(Q<j.length){let Z=j.indexOf("{",Q);if(Z===-1){z.push(j.slice(Q));break}z.push(j.slice(Q,Z));let X=j.indexOf("}",Z);if(X===-1){z.push(j.slice(Z));break}if(j[Z+1]==="{"&&j[X+1]==="}")z.push(j.slice(Z+1,X)),Q=X+2;let J=j.substring(Z+1,X);if(J.includes("#")){let[K,G]=J.split("#");z.push(A1(W[K],G))}else z.push(W[J]);Q=X+1}return z.join("")},"evaluateTemplate"),Pj=H(({ref:j},$)=>{return{...$.endpointParams,...$.referenceRecord}[j]},"getReferenceValue"),$0=H((j,$,z)=>{if(typeof j==="string")return x1(j,z);else if(j.fn)return E1(j,z);else if(j.ref)return Pj(j,z);throw new h(`'${$}': ${String(j)} is not a string, function or reference.`)},"evaluateExpression"),E1=H(({fn:j,argv:$},z)=>{let W=$.map((Z)=>["boolean","number"].includes(typeof Z)?Z:$0(Z,"arg",z)),Q=j.split(".");if(Q[0]in P0&&Q[1]!=null)return P0[Q[0]][Q[1]](...W);return kj[j](...W)},"callFunction"),Aj=H(({assign:j,...$},z)=>{if(j&&j in z.referenceRecord)throw new h(`'${j}' is already defined in Reference Record.`);let W=E1($,z);return z.logger?.debug?.(`${_} evaluateCondition: ${k($)} = ${k(W)}`),{result:W===""?!0:!!W,...j!=null&&{toAssign:{name:j,value:W}}}},"evaluateCondition"),E0=H((j=[],$)=>{let z={};for(let W of j){let{result:Q,toAssign:Z}=Aj(W,{...$,referenceRecord:{...$.referenceRecord,...z}});if(!Q)return{result:Q};if(Z)z[Z.name]=Z.value,$.logger?.debug?.(`${_} assign: ${Z.name} := ${k(Z.value)}`)}return{result:!0,referenceRecord:z}},"evaluateConditions"),xj=H((j,$)=>Object.entries(j).reduce((z,[W,Q])=>({...z,[W]:Q.map((Z)=>{let X=$0(Z,"Header value entry",$);if(typeof X!=="string")throw new h(`Header '${W}' value '${X}' is not a string`);return X})}),{}),"getEndpointHeaders"),y1=H((j,$)=>{if(Array.isArray(j))return j.map((z)=>y1(z,$));switch(typeof j){case"string":return x1(j,$);case"object":if(j===null)throw new h(`Unexpected endpoint property: ${j}`);return g1(j,$);case"boolean":return j;default:throw new h(`Unexpected endpoint property type: ${typeof j}`)}},"getEndpointProperty"),g1=H((j,$)=>Object.entries(j).reduce((z,[W,Q])=>({...z,[W]:y1(Q,$)}),{}),"getEndpointProperties"),Ej=H((j,$)=>{let z=$0(j,"Endpoint URL",$);if(typeof z==="string")try{return new URL(z)}catch(W){throw console.error(`Failed to construct URL with ${z}`,W),W}throw new h(`Endpoint URL must be a string, got ${typeof z}`)},"getEndpointUrl"),yj=H((j,$)=>{let{conditions:z,endpoint:W}=j,{result:Q,referenceRecord:Z}=E0(z,$);if(!Q)return;let X={...$,referenceRecord:{...$.referenceRecord,...Z}},{url:J,properties:K,headers:G}=W;return $.logger?.debug?.(`${_} Resolving endpoint from template: ${k(W)}`),{...G!=null&&{headers:xj(G,X)},...K!=null&&{properties:g1(K,X)},url:Ej(J,X)}},"evaluateEndpointRule"),gj=H((j,$)=>{let{conditions:z,error:W}=j,{result:Q,referenceRecord:Z}=E0(z,$);if(!Q)return;throw new h($0(W,"Error",{...$,referenceRecord:{...$.referenceRecord,...Z}}))},"evaluateErrorRule"),fj=H((j,$)=>{let{conditions:z,rules:W}=j,{result:Q,referenceRecord:Z}=E0(z,$);if(!Q)return;return f1(W,{...$,referenceRecord:{...$.referenceRecord,...Z}})},"evaluateTreeRule"),f1=H((j,$)=>{for(let z of j)if(z.type==="endpoint"){let W=yj(z,$);if(W)return W}else if(z.type==="error")gj(z,$);else if(z.type==="tree"){let W=fj(z,$);if(W)return W}else throw new h(`Unknown endpoint rule: ${z}`);throw new h("Rules evaluation failed")},"evaluateRules"),uj=H((j,$)=>{let{endpointParams:z,logger:W}=$,{parameters:Q,rules:Z}=j;$.logger?.debug?.(`${_} Initial EndpointParams: ${k(z)}`);let X=Object.entries(Q).filter(([,G])=>G.default!=null).map(([G,V])=>[G,V.default]);if(X.length>0)for(let[G,V]of X)z[G]=z[G]??V;let J=Object.entries(Q).filter(([,G])=>G.required).map(([G])=>G);for(let G of J)if(z[G]==null)throw new h(`Missing required parameter: '${G}'`);let K=f1(Z,{endpointParams:z,logger:W,referenceRecord:{}});return $.logger?.debug?.(`${_} Resolved endpoint: ${k(K)}`),K},"resolveEndpoint")});var o1=q((T9,r1)=>{var{defineProperty:z0,getOwnPropertyDescriptor:cj,getOwnPropertyNames:dj}=Object,lj=Object.prototype.hasOwnProperty,y=(j,$)=>z0(j,"name",{value:$,configurable:!0}),_j=(j,$)=>{for(var z in $)z0(j,z,{get:$[z],enumerable:!0})},sj=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of dj($))if(!lj.call(j,Q)&&Q!==z)z0(j,Q,{get:()=>$[Q],enumerable:!(W=cj($,Q))||W.enumerable})}return j},mj=(j)=>sj(z0({},"__esModule",{value:!0}),j),l1={};_j(l1,{ConditionObject:()=>w.ConditionObject,DeprecatedObject:()=>w.DeprecatedObject,EndpointError:()=>w.EndpointError,EndpointObject:()=>w.EndpointObject,EndpointObjectHeaders:()=>w.EndpointObjectHeaders,EndpointObjectProperties:()=>w.EndpointObjectProperties,EndpointParams:()=>w.EndpointParams,EndpointResolverOptions:()=>w.EndpointResolverOptions,EndpointRuleObject:()=>w.EndpointRuleObject,ErrorRuleObject:()=>w.ErrorRuleObject,EvaluateOptions:()=>w.EvaluateOptions,Expression:()=>w.Expression,FunctionArgv:()=>w.FunctionArgv,FunctionObject:()=>w.FunctionObject,FunctionReturn:()=>w.FunctionReturn,ParameterObject:()=>w.ParameterObject,ReferenceObject:()=>w.ReferenceObject,ReferenceRecord:()=>w.ReferenceRecord,RuleSetObject:()=>w.RuleSetObject,RuleSetRules:()=>w.RuleSetRules,TreeRuleObject:()=>w.TreeRuleObject,awsEndpointFunctions:()=>n1,getUserAgentPrefix:()=>nj,isIpAddress:()=>w.isIpAddress,partition:()=>i1,resolveEndpoint:()=>w.resolveEndpoint,setPartitionInfo:()=>a1,useDefaultPartitionInfo:()=>aj});r1.exports=mj(l1);var w=c1(),_1=y((j,$=!1)=>{if($){for(let z of j.split("."))if(!_1(z))return!1;return!0}if(!w.isValidHostLabel(j))return!1;if(j.length<3||j.length>63)return!1;if(j!==j.toLowerCase())return!1;if(w.isIpAddress(j))return!1;return!0},"isVirtualHostableS3Bucket"),d1=":",pj="/",ij=y((j)=>{let $=j.split(d1);if($.length<6)return null;let[z,W,Q,Z,X,...J]=$;if(z!=="arn"||W===""||Q===""||J.join(d1)==="")return null;let K=J.map((G)=>G.split(pj)).flat();return{partition:W,service:Q,region:Z,accountId:X,resourceId:K}},"parseArn"),s1={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"},m1=s1,p1="",i1=y((j)=>{let{partitions:$}=m1;for(let W of $){let{regions:Q,outputs:Z}=W;for(let[X,J]of Object.entries(Q))if(X===j)return{...Z,...J}}for(let W of $){let{regionRegex:Q,outputs:Z}=W;if(new RegExp(Q).test(j))return{...Z}}let z=$.find((W)=>W.id==="aws");if(!z)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...z.outputs}},"partition"),a1=y((j,$="")=>{m1=j,p1=$},"setPartitionInfo"),aj=y(()=>{a1(s1,"")},"useDefaultPartitionInfo"),nj=y(()=>p1,"getUserAgentPrefix"),n1={isVirtualHostableS3Bucket:_1,parseArn:ij,partition:i1};w.customEndpointFunctions.aws=n1});var B7=q((I9,Y7)=>{var{defineProperty:W0,getOwnPropertyDescriptor:oj,getOwnPropertyNames:tj}=Object,ej=Object.prototype.hasOwnProperty,P=(j,$)=>W0(j,"name",{value:$,configurable:!0}),j8=(j,$)=>{for(var z in $)W0(j,z,{get:$[z],enumerable:!0})},$8=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of tj($))if(!ej.call(j,Q)&&Q!==z)W0(j,Q,{get:()=>$[Q],enumerable:!(W=oj($,Q))||W.enumerable})}return j},z8=(j)=>$8(W0({},"__esModule",{value:!0}),j),z7={};j8(z7,{DEFAULT_UA_APP_ID:()=>Q7,getUserAgentMiddlewareOptions:()=>G7,getUserAgentPlugin:()=>Y8,resolveUserAgentConfig:()=>Z7,userAgentMiddleware:()=>K7});Y7.exports=z8(z7);var Q8=$7(),Q7=void 0;function W7(j){if(j===void 0)return!0;return typeof j==="string"&&j.length<=50}P(W7,"isValidUserAgentAppId");function Z7(j){let $=Q8.normalizeProvider(j.userAgentAppId??Q7),{customUserAgent:z}=j;return Object.assign(j,{customUserAgent:typeof z==="string"?[[z]]:z,userAgentAppId:P(async()=>{let W=await $();if(!W7(W)){let Q=j.logger?.constructor?.name==="NoOpLogger"||!j.logger?console:j.logger;if(typeof W!=="string")Q?.warn("userAgentAppId must be a string or undefined.");else if(W.length>50)Q?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return W},"userAgentAppId")})}P(Z7,"resolveUserAgentConfig");var W8=o1(),Z8=l(),v=rj(),X8=/\d{12}\.ddb/;async function X7(j,$,z){if(z.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")v.setFeature(j,"PROTOCOL_RPC_V2_CBOR","M");if(typeof $.retryStrategy==="function"){let Z=await $.retryStrategy();if(typeof Z.acquireInitialRetryToken==="function")if(Z.constructor?.name?.includes("Adaptive"))v.setFeature(j,"RETRY_MODE_ADAPTIVE","F");else v.setFeature(j,"RETRY_MODE_STANDARD","E");else v.setFeature(j,"RETRY_MODE_LEGACY","D")}if(typeof $.accountIdEndpointMode==="function"){let Z=j.endpointV2;if(String(Z?.url?.hostname).match(X8))v.setFeature(j,"ACCOUNT_ID_ENDPOINT","O");switch(await $.accountIdEndpointMode?.()){case"disabled":v.setFeature(j,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":v.setFeature(j,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":v.setFeature(j,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let Q=j.__smithy_context?.selectedHttpAuthScheme?.identity;if(Q?.$source){let Z=Q;if(Z.accountId)v.setFeature(j,"RESOLVED_ACCOUNT_ID","T");for(let[X,J]of Object.entries(Z.$source??{}))v.setFeature(j,X,J)}}P(X7,"checkFeatures");var t1="user-agent",y0="x-amz-user-agent",e1=" ",g0="/",J8=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,K8=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,j7="-",G8=1024;function J7(j){let $="";for(let z in j){let W=j[z];if($.length+W.length+1<=G8){if($.length)$+=","+W;else $+=W;continue}break}return $}P(J7,"encodeFeatures");var K7=P((j)=>($,z)=>async(W)=>{let{request:Q}=W;if(!Z8.HttpRequest.isInstance(Q))return $(W);let{headers:Z}=Q,X=z?.userAgent?.map(Q0)||[],J=(await j.defaultUserAgentProvider()).map(Q0);await X7(z,j,W);let K=z;J.push(`m/${J7(Object.assign({},z.__smithy_context?.features,K.__aws_sdk_context?.features))}`);let G=j?.customUserAgent?.map(Q0)||[],V=await j.userAgentAppId();if(V)J.push(Q0([`app/${V}`]));let Y=W8.getUserAgentPrefix(),B=(Y?[Y]:[]).concat([...J,...X,...G]).join(e1),b=[...J.filter((D)=>D.startsWith("aws-sdk-")),...G].join(e1);if(j.runtime!=="browser"){if(b)Z[y0]=Z[y0]?`${Z[t1]} ${b}`:b;Z[t1]=B}else Z[y0]=B;return $({...W,request:Q})},"userAgentMiddleware"),Q0=P((j)=>{let $=j[0].split(g0).map((X)=>X.replace(J8,j7)).join(g0),z=j[1]?.replace(K8,j7),W=$.indexOf(g0),Q=$.substring(0,W),Z=$.substring(W+1);if(Q==="api")Z=Z.toLowerCase();return[Q,Z,z].filter((X)=>X&&X.length>0).reduce((X,J,K)=>{switch(K){case 0:return J;case 1:return`${X}/${J}`;default:return`${X}#${J}`}},"")},"escapeUserAgent"),G7={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Y8=P((j)=>({applyToStack:P(($)=>{$.add(K7(j),G7)},"applyToStack")}),"getUserAgentPlugin")});var U7=q((v9,w7)=>{var{defineProperty:Z0,getOwnPropertyDescriptor:B8,getOwnPropertyNames:q8}=Object,V8=Object.prototype.hasOwnProperty,q7=(j,$)=>Z0(j,"name",{value:$,configurable:!0}),H8=(j,$)=>{for(var z in $)Z0(j,z,{get:$[z],enumerable:!0})},w8=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of q8($))if(!V8.call(j,Q)&&Q!==z)Z0(j,Q,{get:()=>$[Q],enumerable:!(W=B8($,Q))||W.enumerable})}return j},U8=(j)=>w8(Z0({},"__esModule",{value:!0}),j),V7={};H8(V7,{SelectorType:()=>H7,booleanSelector:()=>L8,numberSelector:()=>M8});w7.exports=U8(V7);var L8=q7((j,$,z)=>{if(!($ in j))return;if(j[$]==="true")return!0;if(j[$]==="false")return!1;throw new Error(`Cannot load ${z} "${$}". Expected "true" or "false", got ${j[$]}.`)},"booleanSelector"),M8=q7((j,$,z)=>{if(!($ in j))return;let W=parseInt(j[$],10);if(Number.isNaN(W))throw new TypeError(`Cannot load ${z} '${$}'. Expected number, got '${j[$]}'.`);return W},"numberSelector"),H7=((j)=>{return j.ENV="env",j.CONFIG="shared config entry",j})(H7||{})});var v7=q((R9,I7)=>{var{defineProperty:J0,getOwnPropertyDescriptor:b8,getOwnPropertyNames:F8}=Object,D8=Object.prototype.hasOwnProperty,C=(j,$)=>J0(j,"name",{value:$,configurable:!0}),h8=(j,$)=>{for(var z in $)J0(j,z,{get:$[z],enumerable:!0})},N8=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of F8($))if(!D8.call(j,Q)&&Q!==z)J0(j,Q,{get:()=>$[Q],enumerable:!(W=b8($,Q))||W.enumerable})}return j},O8=(j)=>N8(J0({},"__esModule",{value:!0}),j),b7={};h8(b7,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>D7,CONFIG_USE_FIPS_ENDPOINT:()=>N7,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>C8,DEFAULT_USE_FIPS_ENDPOINT:()=>I8,ENV_USE_DUALSTACK_ENDPOINT:()=>F7,ENV_USE_FIPS_ENDPOINT:()=>h7,NODE_REGION_CONFIG_FILE_OPTIONS:()=>A8,NODE_REGION_CONFIG_OPTIONS:()=>P8,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>T8,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>v8,REGION_ENV_NAME:()=>O7,REGION_INI_NAME:()=>C7,getRegionInfo:()=>f8,resolveCustomEndpointsConfig:()=>R8,resolveEndpointsConfig:()=>k8,resolveRegionConfig:()=>x8});I7.exports=O8(b7);var A=U7(),F7="AWS_USE_DUALSTACK_ENDPOINT",D7="use_dualstack_endpoint",C8=!1,T8={environmentVariableSelector:(j)=>A.booleanSelector(j,F7,A.SelectorType.ENV),configFileSelector:(j)=>A.booleanSelector(j,D7,A.SelectorType.CONFIG),default:!1},h7="AWS_USE_FIPS_ENDPOINT",N7="use_fips_endpoint",I8=!1,v8={environmentVariableSelector:(j)=>A.booleanSelector(j,h7,A.SelectorType.ENV),configFileSelector:(j)=>A.booleanSelector(j,N7,A.SelectorType.CONFIG),default:!1},X0=f0(),R8=C((j)=>{let{tls:$,endpoint:z,urlParser:W,useDualstackEndpoint:Q}=j;return Object.assign(j,{tls:$??!0,endpoint:X0.normalizeProvider(typeof z==="string"?W(z):z),isCustomEndpoint:!0,useDualstackEndpoint:X0.normalizeProvider(Q??!1)})},"resolveCustomEndpointsConfig"),S8=C(async(j)=>{let{tls:$=!0}=j,z=await j.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(z))throw new Error("Invalid region in client config");let Q=await j.useDualstackEndpoint(),Z=await j.useFipsEndpoint(),{hostname:X}=await j.regionInfoProvider(z,{useDualstackEndpoint:Q,useFipsEndpoint:Z})??{};if(!X)throw new Error("Cannot resolve hostname from client config");return j.urlParser(`${$?"https:":"http:"}//${X}`)},"getEndpointFromRegion"),k8=C((j)=>{let $=X0.normalizeProvider(j.useDualstackEndpoint??!1),{endpoint:z,useFipsEndpoint:W,urlParser:Q,tls:Z}=j;return Object.assign(j,{tls:Z??!0,endpoint:z?X0.normalizeProvider(typeof z==="string"?Q(z):z):()=>S8({...j,useDualstackEndpoint:$,useFipsEndpoint:W}),isCustomEndpoint:!!z,useDualstackEndpoint:$})},"resolveEndpointsConfig"),O7="AWS_REGION",C7="region",P8={environmentVariableSelector:(j)=>j[O7],configFileSelector:(j)=>j[C7],default:()=>{throw new Error("Region is missing")}},A8={preferredFile:"credentials"},T7=C((j)=>typeof j==="string"&&(j.startsWith("fips-")||j.endsWith("-fips")),"isFipsRegion"),L7=C((j)=>T7(j)?["fips-aws-global","aws-fips"].includes(j)?"us-east-1":j.replace(/fips-(dkr-|prod-)?|-fips/,""):j,"getRealRegion"),x8=C((j)=>{let{region:$,useFipsEndpoint:z}=j;if(!$)throw new Error("Region is missing");return Object.assign(j,{region:async()=>{if(typeof $==="string")return L7($);let W=await $();return L7(W)},useFipsEndpoint:async()=>{let W=typeof $==="string"?$:await $();if(T7(W))return!0;return typeof z!=="function"?Promise.resolve(!!z):z()}})},"resolveRegionConfig"),M7=C((j=[],{useFipsEndpoint:$,useDualstackEndpoint:z})=>j.find(({tags:W})=>$===W.includes("fips")&&z===W.includes("dualstack"))?.hostname,"getHostnameFromVariants"),E8=C((j,{regionHostname:$,partitionHostname:z})=>$?$:z?z.replace("{region}",j):void 0,"getResolvedHostname"),y8=C((j,{partitionHash:$})=>Object.keys($||{}).find((z)=>$[z].regions.includes(j))??"aws","getResolvedPartition"),g8=C((j,{signingRegion:$,regionRegex:z,useFipsEndpoint:W})=>{if($)return $;else if(W){let Q=z.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),Z=j.match(Q);if(Z)return Z[0].slice(1,-1)}},"getResolvedSigningRegion"),f8=C((j,{useFipsEndpoint:$=!1,useDualstackEndpoint:z=!1,signingService:W,regionHash:Q,partitionHash:Z})=>{let X=y8(j,{partitionHash:Z}),J=j in Q?j:Z[X]?.endpoint??j,K={useFipsEndpoint:$,useDualstackEndpoint:z},G=M7(Q[J]?.variants,K),V=M7(Z[X]?.variants,K),Y=E8(J,{regionHostname:G,partitionHostname:V});if(Y===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:J,useFipsEndpoint:$,useDualstackEndpoint:z}}`);let B=g8(Y,{signingRegion:Q[J]?.signingRegion,regionRegex:Z[X].regionRegex,useFipsEndpoint:$});return{partition:X,signingService:W,hostname:Y,...B&&{signingRegion:B},...Q[J]?.signingService&&{signingService:Q[J].signingService}}},"getRegionInfo")});var i8=q((S9,A7)=>{var{defineProperty:K0,getOwnPropertyDescriptor:u8,getOwnPropertyNames:c8}=Object,d8=Object.prototype.hasOwnProperty,S7=(j,$)=>K0(j,"name",{value:$,configurable:!0}),l8=(j,$)=>{for(var z in $)K0(j,z,{get:$[z],enumerable:!0})},_8=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of c8($))if(!d8.call(j,Q)&&Q!==z)K0(j,Q,{get:()=>$[Q],enumerable:!(W=u8($,Q))||W.enumerable})}return j},s8=(j)=>_8(K0({},"__esModule",{value:!0}),j),k7={};l8(k7,{contentLengthMiddleware:()=>u0,contentLengthMiddlewareOptions:()=>P7,getContentLengthPlugin:()=>p8});A7.exports=s8(k7);var m8=l(),R7="content-length";function u0(j){return($)=>async(z)=>{let W=z.request;if(m8.HttpRequest.isInstance(W)){let{body:Q,headers:Z}=W;if(Q&&Object.keys(Z).map((X)=>X.toLowerCase()).indexOf(R7)===-1)try{let X=j(Q);W.headers={...W.headers,[R7]:String(X)}}catch(X){}}return $({...z,request:W})}}S7(u0,"contentLengthMiddleware");var P7={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},p8=S7((j)=>({applyToStack:($)=>{$.add(u0(j.bodyLengthChecker),P7)}}),"getContentLengthPlugin")});var g=q((x7)=>{Object.defineProperty(x7,"__esModule",{value:!0});x7.getHomeDir=void 0;var a8=F("node:os"),n8=F("node:path"),c0={},r8=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},o8=()=>{let{HOME:j,USERPROFILE:$,HOMEPATH:z,HOMEDRIVE:W=`C:${n8.sep}`}=process.env;if(j)return j;if($)return $;if(z)return`${W}${z}`;let Q=r8();if(!c0[Q])c0[Q]=a8.homedir();return c0[Q]};x7.getHomeDir=o8});var d0=q((y7)=>{Object.defineProperty(y7,"__esModule",{value:!0});y7.getSSOTokenFilepath=void 0;var t8=F("node:crypto"),e8=F("node:path"),j$=g(),$$=(j)=>{let z=t8.createHash("sha1").update(j).digest("hex");return e8.join(j$.getHomeDir(),".aws","sso","cache",`${z}.json`)};y7.getSSOTokenFilepath=$$});var c7=q((f7)=>{Object.defineProperty(f7,"__esModule",{value:!0});f7.getSSOTokenFromFile=void 0;var z$=F("node:fs"),Q$=d0(),{readFile:W$}=z$.promises,Z$=async(j)=>{let $=Q$.getSSOTokenFilepath(j),z=await W$($,"utf8");return JSON.parse(z)};f7.getSSOTokenFromFile=Z$});var _0=q((d7)=>{Object.defineProperty(d7,"__esModule",{value:!0});d7.slurpFile=void 0;var X$=F("node:fs"),{readFile:J$}=X$.promises,l0={},K$=(j,$)=>{if(!l0[j]||($===null||$===void 0?void 0:$.ignoreCache))l0[j]=J$(j,"utf8");return l0[j]};d7.slurpFile=K$});var i0=q((E9,m)=>{var{defineProperty:B0,getOwnPropertyDescriptor:G$,getOwnPropertyNames:Y$}=Object,B$=Object.prototype.hasOwnProperty,N=(j,$)=>B0(j,"name",{value:$,configurable:!0}),q$=(j,$)=>{for(var z in $)B0(j,z,{get:$[z],enumerable:!0})},s0=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of Y$($))if(!B$.call(j,Q)&&Q!==z)B0(j,Q,{get:()=>$[Q],enumerable:!(W=G$($,Q))||W.enumerable})}return j},p0=(j,$,z)=>(s0(j,$,"default"),z&&s0(z,$,"default")),V$=(j)=>s0(B0({},"__esModule",{value:!0}),j),s={};q$(s,{CONFIG_PREFIX_SEPARATOR:()=>E,DEFAULT_PROFILE:()=>p7,ENV_PROFILE:()=>m7,getProfileName:()=>H$,loadSharedConfigFiles:()=>a7,loadSsoSessionData:()=>I$,parseKnownFiles:()=>R$});m.exports=V$(s);p0(s,g(),m.exports);var m7="AWS_PROFILE",p7="default",H$=N((j)=>j.profile||process.env[m7]||p7,"getProfileName");p0(s,d0(),m.exports);p0(s,c7(),m.exports);var G0=S1(),w$=N((j)=>Object.entries(j).filter(([$])=>{let z=$.indexOf(E);if(z===-1)return!1;return Object.values(G0.IniSectionType).includes($.substring(0,z))}).reduce(($,[z,W])=>{let Q=z.indexOf(E),Z=z.substring(0,Q)===G0.IniSectionType.PROFILE?z.substring(Q+1):z;return $[Z]=W,$},{...j.default&&{default:j.default}}),"getConfigData"),Y0=F("node:path"),U$=g(),L$="AWS_CONFIG_FILE",i7=N(()=>process.env[L$]||Y0.join(U$.getHomeDir(),".aws","config"),"getConfigFilepath"),M$=g(),b$="AWS_SHARED_CREDENTIALS_FILE",F$=N(()=>process.env[b$]||Y0.join(M$.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),D$=g(),h$=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,N$=["__proto__","profile __proto__"],m0=N((j)=>{let $={},z,W;for(let Q of j.split(/\r?\n/)){let Z=Q.split(/(^|\s)[;#]/)[0].trim();if(Z[0]==="["&&Z[Z.length-1]==="]"){z=void 0,W=void 0;let J=Z.substring(1,Z.length-1),K=h$.exec(J);if(K){let[,G,,V]=K;if(Object.values(G0.IniSectionType).includes(G))z=[G,V].join(E)}else z=J;if(N$.includes(J))throw new Error(`Found invalid profile name "${J}"`)}else if(z){let J=Z.indexOf("=");if(![0,-1].includes(J)){let[K,G]=[Z.substring(0,J).trim(),Z.substring(J+1).trim()];if(G==="")W=K;else{if(W&&Q.trimStart()===Q)W=void 0;$[z]=$[z]||{};let V=W?[W,K].join(E):K;$[z][V]=G}}}}return $},"parseIni"),_7=_0(),s7=N(()=>({}),"swallowError"),E=".",a7=N(async(j={})=>{let{filepath:$=F$(),configFilepath:z=i7()}=j,W=D$.getHomeDir(),Q="~/",Z=$;if($.startsWith("~/"))Z=Y0.join(W,$.slice(2));let X=z;if(z.startsWith("~/"))X=Y0.join(W,z.slice(2));let J=await Promise.all([_7.slurpFile(X,{ignoreCache:j.ignoreCache}).then(m0).then(w$).catch(s7),_7.slurpFile(Z,{ignoreCache:j.ignoreCache}).then(m0).catch(s7)]);return{configFile:J[0],credentialsFile:J[1]}},"loadSharedConfigFiles"),O$=N((j)=>Object.entries(j).filter(([$])=>$.startsWith(G0.IniSectionType.SSO_SESSION+E)).reduce(($,[z,W])=>({...$,[z.substring(z.indexOf(E)+1)]:W}),{}),"getSsoSessionData"),C$=_0(),T$=N(()=>({}),"swallowError"),I$=N(async(j={})=>C$.slurpFile(j.configFilepath??i7()).then(m0).then(O$).catch(T$),"loadSsoSessionData"),v$=N((...j)=>{let $={};for(let z of j)for(let[W,Q]of Object.entries(z))if($[W]!==void 0)Object.assign($[W],Q);else $[W]=Q;return $},"mergeConfigFiles"),R$=N(async(j)=>{let $=await a7(j);return v$($.configFile,$.credentialsFile)},"parseKnownFiles")});var V0=q((y9,o7)=>{var{defineProperty:q0,getOwnPropertyDescriptor:S$,getOwnPropertyNames:k$}=Object,P$=Object.prototype.hasOwnProperty,f=(j,$)=>q0(j,"name",{value:$,configurable:!0}),A$=(j,$)=>{for(var z in $)q0(j,z,{get:$[z],enumerable:!0})},x$=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of k$($))if(!P$.call(j,Q)&&Q!==z)q0(j,Q,{get:()=>$[Q],enumerable:!(W=S$($,Q))||W.enumerable})}return j},E$=(j)=>x$(q0({},"__esModule",{value:!0}),j),r7={};A$(r7,{loadConfig:()=>c$});o7.exports=E$(r7);var p=a0();function n0(j){try{let $=new Set(Array.from(j.match(/([A-Z_]){3,}/g)??[]));return $.delete("CONFIG"),$.delete("CONFIG_PREFIX_SEPARATOR"),$.delete("ENV"),[...$].join(", ")}catch($){return j}}f(n0,"getSelectorName");var y$=f((j,$)=>async()=>{try{let z=j(process.env);if(z===void 0)throw new Error;return z}catch(z){throw new p.CredentialsProviderError(z.message||`Not found in ENV: ${n0(j.toString())}`,{logger:$})}},"fromEnv"),n7=i0(),g$=f((j,{preferredFile:$="config",...z}={})=>async()=>{let W=n7.getProfileName(z),{configFile:Q,credentialsFile:Z}=await n7.loadSharedConfigFiles(z),X=Z[W]||{},J=Q[W]||{},K=$==="config"?{...X,...J}:{...J,...X};try{let V=j(K,$==="config"?Q:Z);if(V===void 0)throw new Error;return V}catch(G){throw new p.CredentialsProviderError(G.message||`Not found in config files w/ profile [${W}]: ${n0(j.toString())}`,{logger:z.logger})}},"fromSharedConfigFiles"),f$=f((j)=>typeof j==="function","isFunction"),u$=f((j)=>f$(j)?async()=>await j():p.fromStatic(j),"fromStatic"),c$=f(({environmentVariableSelector:j,configFileSelector:$,default:z},W={})=>p.memoize(p.chain(y$(j),g$($,W),u$(z))),"loadConfig")});var Q4=q(($4)=>{Object.defineProperty($4,"__esModule",{value:!0});$4.getEndpointUrlConfig=void 0;var t7=i0(),e7="AWS_ENDPOINT_URL",j4="endpoint_url",d$=(j)=>({environmentVariableSelector:($)=>{let z=j.split(" ").map((Z)=>Z.toUpperCase()),W=$[[e7,...z].join("_")];if(W)return W;let Q=$[e7];if(Q)return Q;return},configFileSelector:($,z)=>{if(z&&$.services){let Q=z[["services",$.services].join(t7.CONFIG_PREFIX_SEPARATOR)];if(Q){let Z=j.split(" ").map((J)=>J.toLowerCase()),X=Q[[Z.join("_"),j4].join(t7.CONFIG_PREFIX_SEPARATOR)];if(X)return X}}let W=$[j4];if(W)return W;return},default:void 0});$4.getEndpointUrlConfig=d$});var r0=q((W4)=>{Object.defineProperty(W4,"__esModule",{value:!0});W4.getEndpointFromConfig=void 0;var l$=V0(),_$=Q4(),s$=async(j)=>l$.loadConfig(_$.getEndpointUrlConfig(j!==null&&j!==void 0?j:""))();W4.getEndpointFromConfig=s$});var G4=q((u9,K4)=>{var{defineProperty:H0,getOwnPropertyDescriptor:m$,getOwnPropertyNames:p$}=Object,i$=Object.prototype.hasOwnProperty,a$=(j,$)=>H0(j,"name",{value:$,configurable:!0}),n$=(j,$)=>{for(var z in $)H0(j,z,{get:$[z],enumerable:!0})},r$=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of p$($))if(!i$.call(j,Q)&&Q!==z)H0(j,Q,{get:()=>$[Q],enumerable:!(W=m$($,Q))||W.enumerable})}return j},o$=(j)=>r$(H0({},"__esModule",{value:!0}),j),X4={};n$(X4,{parseQueryString:()=>J4});K4.exports=o$(X4);function J4(j){let $={};if(j=j.replace(/^\?/,""),j)for(let z of j.split("&")){let[W,Q=null]=z.split("=");if(W=decodeURIComponent(W),Q)Q=decodeURIComponent(Q);if(!(W in $))$[W]=Q;else if(Array.isArray($[W]))$[W].push(Q);else $[W]=[$[W],Q]}return $}a$(J4,"parseQueryString")});var o0=q((c9,q4)=>{var{defineProperty:w0,getOwnPropertyDescriptor:t$,getOwnPropertyNames:e$}=Object,j6=Object.prototype.hasOwnProperty,$6=(j,$)=>w0(j,"name",{value:$,configurable:!0}),z6=(j,$)=>{for(var z in $)w0(j,z,{get:$[z],enumerable:!0})},Q6=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of e$($))if(!j6.call(j,Q)&&Q!==z)w0(j,Q,{get:()=>$[Q],enumerable:!(W=t$($,Q))||W.enumerable})}return j},W6=(j)=>Q6(w0({},"__esModule",{value:!0}),j),Y4={};z6(Y4,{parseUrl:()=>B4});q4.exports=W6(Y4);var Z6=G4(),B4=$6((j)=>{if(typeof j==="string")return B4(new URL(j));let{hostname:$,pathname:z,port:W,protocol:Q,search:Z}=j,X;if(Z)X=Z6.parseQueryString(Z);return{hostname:$,port:W?parseInt(W):void 0,protocol:Q,path:z,query:X}},"parseUrl")});var T6=q((d9,b4)=>{var{defineProperty:L0,getOwnPropertyDescriptor:J6,getOwnPropertyNames:K6}=Object,G6=Object.prototype.hasOwnProperty,T=(j,$)=>L0(j,"name",{value:$,configurable:!0}),Y6=(j,$)=>{for(var z in $)L0(j,z,{get:$[z],enumerable:!0})},B6=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of K6($))if(!G6.call(j,Q)&&Q!==z)L0(j,Q,{get:()=>$[Q],enumerable:!(W=J6($,Q))||W.enumerable})}return j},q6=(j)=>B6(L0({},"__esModule",{value:!0}),j),H4={};Y6(H4,{endpointMiddleware:()=>L4,endpointMiddlewareOptions:()=>M4,getEndpointFromInstructions:()=>w4,getEndpointPlugin:()=>N6,resolveEndpointConfig:()=>C6,resolveParams:()=>U4,toEndpointV1:()=>t0});b4.exports=q6(H4);var V6=T(async(j)=>{let $=j?.Bucket||"";if(typeof j.Bucket==="string")j.Bucket=$.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(M6($)){if(j.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!L6($)||$.indexOf(".")!==-1&&!String(j.Endpoint).startsWith("http:")||$.toLowerCase()!==$||$.length<3)j.ForcePathStyle=!0;if(j.DisableMultiRegionAccessPoints)j.disableMultiRegionAccessPoints=!0,j.DisableMRAP=!0;return j},"resolveParamsForS3"),H6=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,w6=/(\d+\.){3}\d+/,U6=/\.\./,L6=T((j)=>H6.test(j)&&!w6.test(j)&&!U6.test(j),"isDnsCompatibleBucketName"),M6=T((j)=>{let[$,z,W,,,Q]=j.split(":"),Z=$==="arn"&&j.split(":").length>=6,X=Boolean(Z&&z&&W&&Q);if(Z&&!X)throw new Error(`Invalid ARN: ${j} was an invalid ARN.`);return X},"isArnBucketName"),b6=T((j,$,z)=>{let W=T(async()=>{let Q=z[j]??z[$];if(typeof Q==="function")return Q();return Q},"configProvider");if(j==="credentialScope"||$==="CredentialScope")return async()=>{let Q=typeof z.credentials==="function"?await z.credentials():z.credentials;return Q?.credentialScope??Q?.CredentialScope};if(j==="accountId"||$==="AccountId")return async()=>{let Q=typeof z.credentials==="function"?await z.credentials():z.credentials;return Q?.accountId??Q?.AccountId};if(j==="endpoint"||$==="endpoint")return async()=>{let Q=await W();if(Q&&typeof Q==="object"){if("url"in Q)return Q.url.href;if("hostname"in Q){let{protocol:Z,hostname:X,port:J,path:K}=Q;return`${Z}//${X}${J?":"+J:""}${K}`}}return Q};return W},"createConfigValueProvider"),F6=r0(),V4=o0(),t0=T((j)=>{if(typeof j==="object"){if("url"in j)return V4.parseUrl(j.url);return j}return V4.parseUrl(j)},"toEndpointV1"),w4=T(async(j,$,z,W)=>{if(!z.endpoint){let X;if(z.serviceConfiguredEndpoint)X=await z.serviceConfiguredEndpoint();else X=await F6.getEndpointFromConfig(z.serviceId);if(X)z.endpoint=()=>Promise.resolve(t0(X))}let Q=await U4(j,$,z);if(typeof z.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return z.endpointProvider(Q,W)},"getEndpointFromInstructions"),U4=T(async(j,$,z)=>{let W={},Q=$?.getEndpointParameterInstructions?.()||{};for(let[Z,X]of Object.entries(Q))switch(X.type){case"staticContextParams":W[Z]=X.value;break;case"contextParams":W[Z]=j[X.name];break;case"clientContextParams":case"builtInParams":W[Z]=await b6(X.name,Z,z)();break;case"operationContextParams":W[Z]=X.get(j);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(X))}if(Object.keys(Q).length===0)Object.assign(W,z);if(String(z.serviceId).toLowerCase()==="s3")await V6(W);return W},"resolveParams"),D6=$7(),U0=f0(),L4=T(({config:j,instructions:$})=>{return(z,W)=>async(Q)=>{if(j.endpoint)D6.setFeature(W,"ENDPOINT_OVERRIDE","N");let Z=await w4(Q.input,{getEndpointParameterInstructions(){return $}},{...j},W);W.endpointV2=Z,W.authSchemes=Z.properties?.authSchemes;let X=W.authSchemes?.[0];if(X){W.signing_region=X.signingRegion,W.signing_service=X.signingName;let K=U0.getSmithyContext(W)?.selectedHttpAuthScheme?.httpAuthOption;if(K)K.signingProperties=Object.assign(K.signingProperties||{},{signing_region:X.signingRegion,signingRegion:X.signingRegion,signing_service:X.signingName,signingName:X.signingName,signingRegionSet:X.signingRegionSet},X.properties)}return z({...Q})}},"endpointMiddleware"),h6=X6(),M4={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:h6.serializerMiddlewareOption.name},N6=T((j,$)=>({applyToStack:(z)=>{z.addRelativeTo(L4({config:j,instructions:$}),M4)}}),"getEndpointPlugin"),O6=r0(),C6=T((j)=>{let $=j.tls??!0,{endpoint:z,useDualstackEndpoint:W,useFipsEndpoint:Q}=j,Z=z!=null?async()=>t0(await U0.normalizeProvider(z)()):void 0,J=Object.assign(j,{endpoint:Z,tls:$,isCustomEndpoint:!!z,useDualstackEndpoint:U0.normalizeProvider(W??!1),useFipsEndpoint:U0.normalizeProvider(Q??!1)}),K=void 0;return J.serviceConfiguredEndpoint=async()=>{if(j.serviceId&&!K)K=O6.getEndpointFromConfig(j.serviceId);return K},J},"resolveEndpointConfig")});var j1=q((l9,h4)=>{var{defineProperty:M0,getOwnPropertyDescriptor:I6,getOwnPropertyNames:v6}=Object,R6=Object.prototype.hasOwnProperty,u=(j,$)=>M0(j,"name",{value:$,configurable:!0}),S6=(j,$)=>{for(var z in $)M0(j,z,{get:$[z],enumerable:!0})},k6=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of v6($))if(!R6.call(j,Q)&&Q!==z)M0(j,Q,{get:()=>$[Q],enumerable:!(W=I6($,Q))||W.enumerable})}return j},P6=(j)=>k6(M0({},"__esModule",{value:!0}),j),F4={};S6(F4,{isClockSkewCorrectedError:()=>D4,isClockSkewError:()=>u6,isRetryableByTrait:()=>f6,isServerError:()=>d6,isThrottlingError:()=>c6,isTransientError:()=>e0});h4.exports=P6(F4);var A6=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],x6=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],E6=["TimeoutError","RequestTimeout","RequestTimeoutException"],y6=[500,502,503,504],g6=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],f6=u((j)=>j.$retryable!==void 0,"isRetryableByTrait"),u6=u((j)=>A6.includes(j.name),"isClockSkewError"),D4=u((j)=>j.$metadata?.clockSkewCorrected,"isClockSkewCorrectedError"),c6=u((j)=>j.$metadata?.httpStatusCode===429||x6.includes(j.name)||j.$retryable?.throttling==!0,"isThrottlingError"),e0=u((j,$=0)=>D4(j)||E6.includes(j.name)||g6.includes(j?.code||"")||y6.includes(j.$metadata?.httpStatusCode||0)||j.cause!==void 0&&$<=10&&e0(j.cause,$+1),"isTransientError"),d6=u((j)=>{if(j.$metadata?.httpStatusCode!==void 0){let $=j.$metadata.httpStatusCode;if(500<=$&&$<=599&&!e0(j))return!0;return!1}return!1},"isServerError")});var P4=q((_9,k4)=>{var{defineProperty:b0,getOwnPropertyDescriptor:l6,getOwnPropertyNames:_6}=Object,s6=Object.prototype.hasOwnProperty,I=(j,$)=>b0(j,"name",{value:$,configurable:!0}),m6=(j,$)=>{for(var z in $)b0(j,z,{get:$[z],enumerable:!0})},p6=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of _6($))if(!s6.call(j,Q)&&Q!==z)b0(j,Q,{get:()=>$[Q],enumerable:!(W=l6($,Q))||W.enumerable})}return j},i6=(j)=>p6(b0({},"__esModule",{value:!0}),j),O4={};m6(O4,{AdaptiveRetryStrategy:()=>e6,ConfiguredRetryStrategy:()=>j2,DEFAULT_MAX_ATTEMPTS:()=>$1,DEFAULT_RETRY_DELAY_BASE:()=>i,DEFAULT_RETRY_MODE:()=>a6,DefaultRateLimiter:()=>T4,INITIAL_RETRY_TOKENS:()=>z1,INVOCATION_ID_HEADER:()=>r6,MAXIMUM_RETRY_DELAY:()=>Q1,NO_RETRY_INCREMENT:()=>S4,REQUEST_HEADER:()=>o6,RETRY_COST:()=>v4,RETRY_MODES:()=>C4,StandardRetryStrategy:()=>W1,THROTTLING_RETRY_DELAY_BASE:()=>I4,TIMEOUT_RETRY_COST:()=>R4});k4.exports=i6(O4);var C4=((j)=>{return j.STANDARD="standard",j.ADAPTIVE="adaptive",j})(C4||{}),$1=3,a6="standard",n6=j1(),T4=class j{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;let z=this.getCurrentTimeInSeconds();this.lastThrottleTime=z,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}static{I(this,"DefaultRateLimiter")}static{this.setTimeoutFn=setTimeout}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.currentCapacity){let z=($-this.currentCapacity)/this.fillRate*1000;await new Promise((W)=>j.setTimeoutFn(W,z))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){let $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}let z=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+z),this.lastTimestamp=$}updateClientSendingRate($){let z;if(this.updateMeasuredRate(),n6.isThrottlingError($)){let Q=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=Q,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),z=this.cubicThrottle(Q),this.enableTokenBucket()}else this.calculateTimeWindow(),z=this.cubicSuccess(this.getCurrentTimeInSeconds());let W=Math.min(z,2*this.measuredTxRate);this.updateTokenBucketRate(W)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let $=this.getCurrentTimeInSeconds(),z=Math.floor($*2)/2;if(this.requestCount++,z>this.lastTxRateBucket){let W=this.requestCount/(z-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(W*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=z}}getPrecise($){return parseFloat($.toFixed(8))}},i=100,Q1=20000,I4=500,z1=500,v4=5,R4=10,S4=1,r6="amz-sdk-invocation-id",o6="amz-sdk-request",t6=I(()=>{let j=i;return{computeNextBackoffDelay:I((W)=>{return Math.floor(Math.min(Q1,Math.random()*2**W*j))},"computeNextBackoffDelay"),setDelayBase:I((W)=>{j=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),N4=I(({retryDelay:j,retryCount:$,retryCost:z})=>{return{getRetryCount:I(()=>$,"getRetryCount"),getRetryDelay:I(()=>Math.min(Q1,j),"getRetryDelay"),getRetryCost:I(()=>z,"getRetryCost")}},"createDefaultRetryToken"),W1=class{constructor(j){this.maxAttempts=j,this.mode="standard",this.capacity=z1,this.retryBackoffStrategy=t6(),this.maxAttemptsProvider=typeof j==="function"?j:async()=>j}static{I(this,"StandardRetryStrategy")}async acquireInitialRetryToken(j){return N4({retryDelay:i,retryCount:0})}async refreshRetryTokenForRetry(j,$){let z=await this.getMaxAttempts();if(this.shouldRetry(j,$,z)){let W=$.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?I4:i);let Q=this.retryBackoffStrategy.computeNextBackoffDelay(j.getRetryCount()),Z=$.retryAfterHint?Math.max($.retryAfterHint.getTime()-Date.now()||0,Q):Q,X=this.getCapacityCost(W);return this.capacity-=X,N4({retryDelay:Z,retryCount:j.getRetryCount()+1,retryCost:X})}throw new Error("No retry token available")}recordSuccess(j){this.capacity=Math.max(z1,this.capacity+(j.getRetryCost()??S4))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(j){return console.warn(`Max attempts provider could not resolve. Using default of ${$1}`),$1}}shouldRetry(j,$,z){return j.getRetryCount()+1<z&&this.capacity>=this.getCapacityCost($.errorType)&&this.isRetryableError($.errorType)}getCapacityCost(j){return j==="TRANSIENT"?R4:v4}isRetryableError(j){return j==="THROTTLING"||j==="TRANSIENT"}},e6=class{constructor(j,$){this.maxAttemptsProvider=j,this.mode="adaptive";let{rateLimiter:z}=$??{};this.rateLimiter=z??new T4,this.standardRetryStrategy=new W1(j)}static{I(this,"AdaptiveRetryStrategy")}async acquireInitialRetryToken(j){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(j)}async refreshRetryTokenForRetry(j,$){return this.rateLimiter.updateClientSendingRate($),this.standardRetryStrategy.refreshRetryTokenForRetry(j,$)}recordSuccess(j){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(j)}},j2=class extends W1{static{I(this,"ConfiguredRetryStrategy")}constructor(j,$=i){super(typeof j==="function"?j:async()=>j);if(typeof $==="number")this.computeNextBackoffDelay=()=>$;else this.computeNextBackoffDelay=$}async refreshRetryTokenForRetry(j,$){let z=await super.refreshRetryTokenForRetry(j,$);return z.getRetryDelay=()=>this.computeNextBackoffDelay(z.getRetryCount()),z}}});var E4=q((A4)=>{Object.defineProperty(A4,"__esModule",{value:!0});A4.isStreamingPayload=void 0;var $2=F("node:stream"),z2=(j)=>(j===null||j===void 0?void 0:j.body)instanceof $2.Readable||typeof ReadableStream!=="undefined"&&(j===null||j===void 0?void 0:j.body)instanceof ReadableStream;A4.isStreamingPayload=z2});var O2=q((a9,r4)=>{var{defineProperty:F0,getOwnPropertyDescriptor:Z2,getOwnPropertyNames:X2}=Object,J2=Object.prototype.hasOwnProperty,L=(j,$)=>F0(j,"name",{value:$,configurable:!0}),K2=(j,$)=>{for(var z in $)F0(j,z,{get:$[z],enumerable:!0})},G2=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of X2($))if(!J2.call(j,Q)&&Q!==z)F0(j,Q,{get:()=>$[Q],enumerable:!(W=Z2($,Q))||W.enumerable})}return j},Y2=(j)=>G2(F0({},"__esModule",{value:!0}),j),g4={};K2(g4,{AdaptiveRetryStrategy:()=>V2,CONFIG_MAX_ATTEMPTS:()=>X1,CONFIG_RETRY_MODE:()=>s4,ENV_MAX_ATTEMPTS:()=>Z1,ENV_RETRY_MODE:()=>_4,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>H2,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>U2,StandardRetryStrategy:()=>l4,defaultDelayDecider:()=>u4,defaultRetryDecider:()=>c4,getOmitRetryHeadersPlugin:()=>L2,getRetryAfterHint:()=>n4,getRetryPlugin:()=>N2,omitRetryHeadersMiddleware:()=>m4,omitRetryHeadersMiddlewareOptions:()=>p4,resolveRetryConfig:()=>w2,retryMiddleware:()=>i4,retryMiddlewareOptions:()=>a4});r4.exports=Y2(g4);var c=l(),f4=W2(),U=P4(),B2=L((j,$)=>{let z=j,W=$?.noRetryIncrement??U.NO_RETRY_INCREMENT,Q=$?.retryCost??U.RETRY_COST,Z=$?.timeoutRetryCost??U.TIMEOUT_RETRY_COST,X=j,J=L((Y)=>Y.name==="TimeoutError"?Z:Q,"getCapacityAmount"),K=L((Y)=>J(Y)<=X,"hasRetryTokens");return Object.freeze({hasRetryTokens:K,retrieveRetryTokens:L((Y)=>{if(!K(Y))throw new Error("No retry token available");let B=J(Y);return X-=B,B},"retrieveRetryTokens"),releaseRetryTokens:L((Y)=>{X+=Y??W,X=Math.min(X,z)},"releaseRetryTokens")})},"getDefaultRetryQuota"),u4=L((j,$)=>Math.floor(Math.min(U.MAXIMUM_RETRY_DELAY,Math.random()*2**$*j)),"defaultDelayDecider"),x=j1(),c4=L((j)=>{if(!j)return!1;return x.isRetryableByTrait(j)||x.isClockSkewError(j)||x.isThrottlingError(j)||x.isTransientError(j)},"defaultRetryDecider"),d4=L((j)=>{if(j instanceof Error)return j;if(j instanceof Object)return Object.assign(new Error,j);if(typeof j==="string")return new Error(j);return new Error(`AWS SDK error wrapper for ${j}`)},"asSdkError"),l4=class{constructor(j,$){this.maxAttemptsProvider=j,this.mode=U.RETRY_MODES.STANDARD,this.retryDecider=$?.retryDecider??c4,this.delayDecider=$?.delayDecider??u4,this.retryQuota=$?.retryQuota??B2(U.INITIAL_RETRY_TOKENS)}static{L(this,"StandardRetryStrategy")}shouldRetry(j,$,z){return $<z&&this.retryDecider(j)&&this.retryQuota.hasRetryTokens(j)}async getMaxAttempts(){let j;try{j=await this.maxAttemptsProvider()}catch($){j=U.DEFAULT_MAX_ATTEMPTS}return j}async retry(j,$,z){let W,Q=0,Z=0,X=await this.getMaxAttempts(),{request:J}=$;if(c.HttpRequest.isInstance(J))J.headers[U.INVOCATION_ID_HEADER]=f4.v4();while(!0)try{if(c.HttpRequest.isInstance(J))J.headers[U.REQUEST_HEADER]=`attempt=${Q+1}; max=${X}`;if(z?.beforeRequest)await z.beforeRequest();let{response:K,output:G}=await j($);if(z?.afterRequest)z.afterRequest(K);return this.retryQuota.releaseRetryTokens(W),G.$metadata.attempts=Q+1,G.$metadata.totalRetryDelay=Z,{response:K,output:G}}catch(K){let G=d4(K);if(Q++,this.shouldRetry(G,Q,X)){W=this.retryQuota.retrieveRetryTokens(G);let V=this.delayDecider(x.isThrottlingError(G)?U.THROTTLING_RETRY_DELAY_BASE:U.DEFAULT_RETRY_DELAY_BASE,Q),Y=q2(G.$response),B=Math.max(Y||0,V);Z+=B,await new Promise((b)=>setTimeout(b,B));continue}if(!G.$metadata)G.$metadata={};throw G.$metadata.attempts=Q,G.$metadata.totalRetryDelay=Z,G}}},q2=L((j)=>{if(!c.HttpResponse.isInstance(j))return;let $=Object.keys(j.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!$)return;let z=j.headers[$],W=Number(z);if(!Number.isNaN(W))return W*1000;return new Date(z).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),V2=class extends l4{static{L(this,"AdaptiveRetryStrategy")}constructor(j,$){let{rateLimiter:z,...W}=$??{};super(j,W);this.rateLimiter=z??new U.DefaultRateLimiter,this.mode=U.RETRY_MODES.ADAPTIVE}async retry(j,$){return super.retry(j,$,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(z)=>{this.rateLimiter.updateClientSendingRate(z)}})}},y4=f0(),Z1="AWS_MAX_ATTEMPTS",X1="max_attempts",H2={environmentVariableSelector:(j)=>{let $=j[Z1];if(!$)return;let z=parseInt($);if(Number.isNaN(z))throw new Error(`Environment variable ${Z1} mast be a number, got "${$}"`);return z},configFileSelector:(j)=>{let $=j[X1];if(!$)return;let z=parseInt($);if(Number.isNaN(z))throw new Error(`Shared config file entry ${X1} mast be a number, got "${$}"`);return z},default:U.DEFAULT_MAX_ATTEMPTS},w2=L((j)=>{let{retryStrategy:$,retryMode:z,maxAttempts:W}=j,Q=y4.normalizeProvider(W??U.DEFAULT_MAX_ATTEMPTS);return Object.assign(j,{maxAttempts:Q,retryStrategy:async()=>{if($)return $;if(await y4.normalizeProvider(z)()===U.RETRY_MODES.ADAPTIVE)return new U.AdaptiveRetryStrategy(Q);return new U.StandardRetryStrategy(Q)}})},"resolveRetryConfig"),_4="AWS_RETRY_MODE",s4="retry_mode",U2={environmentVariableSelector:(j)=>j[_4],configFileSelector:(j)=>j[s4],default:U.DEFAULT_RETRY_MODE},m4=L(()=>(j)=>async($)=>{let{request:z}=$;if(c.HttpRequest.isInstance(z))delete z.headers[U.INVOCATION_ID_HEADER],delete z.headers[U.REQUEST_HEADER];return j($)},"omitRetryHeadersMiddleware"),p4={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},L2=L((j)=>({applyToStack:($)=>{$.addRelativeTo(m4(),p4)}}),"getOmitRetryHeadersPlugin"),M2=Q2(),b2=E4(),i4=L((j)=>($,z)=>async(W)=>{let Q=await j.retryStrategy(),Z=await j.maxAttempts();if(F2(Q)){Q=Q;let X=await Q.acquireInitialRetryToken(z.partition_id),J=new Error,K=0,G=0,{request:V}=W,Y=c.HttpRequest.isInstance(V);if(Y)V.headers[U.INVOCATION_ID_HEADER]=f4.v4();while(!0)try{if(Y)V.headers[U.REQUEST_HEADER]=`attempt=${K+1}; max=${Z}`;let{response:B,output:b}=await $(W);return Q.recordSuccess(X),b.$metadata.attempts=K+1,b.$metadata.totalRetryDelay=G,{response:B,output:b}}catch(B){let b=D2(B);if(J=d4(B),Y&&b2.isStreamingPayload(V))throw(z.logger instanceof M2.NoOpLogger?console:z.logger)?.warn("An error was encountered in a non-retryable streaming request."),J;try{X=await Q.refreshRetryTokenForRetry(X,b)}catch(O){if(!J.$metadata)J.$metadata={};throw J.$metadata.attempts=K+1,J.$metadata.totalRetryDelay=G,J}K=X.getRetryCount();let D=X.getRetryDelay();G+=D,await new Promise((O)=>setTimeout(O,D))}}else{if(Q=Q,Q?.mode)z.userAgent=[...z.userAgent||[],["cfg/retry-mode",Q.mode]];return Q.retry($,W)}},"retryMiddleware"),F2=L((j)=>typeof j.acquireInitialRetryToken!=="undefined"&&typeof j.refreshRetryTokenForRetry!=="undefined"&&typeof j.recordSuccess!=="undefined","isRetryStrategyV2"),D2=L((j)=>{let $={error:j,errorType:h2(j)},z=n4(j.$response);if(z)$.retryAfterHint=z;return $},"getRetryErrorInfo"),h2=L((j)=>{if(x.isThrottlingError(j))return"THROTTLING";if(x.isTransientError(j))return"TRANSIENT";if(x.isServerError(j))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),a4={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},N2=L((j)=>({applyToStack:($)=>{$.add(i4(j),a4)}}),"getRetryPlugin"),n4=L((j)=>{if(!c.HttpResponse.isInstance(j))return;let $=Object.keys(j.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!$)return;let z=j.headers[$],W=Number(z);if(!Number.isNaN(W))return new Date(W*1000);return new Date(z)},"getRetryAfterHint")});var y2=q((o9,z5)=>{var{defineProperty:D0,getOwnPropertyDescriptor:C2,getOwnPropertyNames:T2}=Object,I2=Object.prototype.hasOwnProperty,R=(j,$)=>D0(j,"name",{value:$,configurable:!0}),v2=(j,$)=>{for(var z in $)D0(j,z,{get:$[z],enumerable:!0})},R2=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of T2($))if(!I2.call(j,Q)&&Q!==z)D0(j,Q,{get:()=>$[Q],enumerable:!(W=C2($,Q))||W.enumerable})}return j},S2=(j)=>R2(D0({},"__esModule",{value:!0}),j),t4={};v2(t4,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>x2,NODE_REGION_CONFIG_OPTIONS:()=>A2,REGION_ENV_NAME:()=>e4,REGION_INI_NAME:()=>j5,getAwsRegionExtensionConfiguration:()=>k2,resolveAwsRegionExtensionConfiguration:()=>P2,resolveRegionConfig:()=>E2});z5.exports=S2(t4);var k2=R((j)=>{return{setRegion($){j.region=$},region(){return j.region}}},"getAwsRegionExtensionConfiguration"),P2=R((j)=>{return{region:j.region()}},"resolveAwsRegionExtensionConfiguration"),e4="AWS_REGION",j5="region",A2={environmentVariableSelector:R((j)=>j[e4],"environmentVariableSelector"),configFileSelector:R((j)=>j[j5],"configFileSelector"),default:R(()=>{throw new Error("Region is missing")},"default")},x2={preferredFile:"credentials"},$5=R((j)=>typeof j==="string"&&(j.startsWith("fips-")||j.endsWith("-fips")),"isFipsRegion"),o4=R((j)=>$5(j)?["fips-aws-global","aws-fips"].includes(j)?"us-east-1":j.replace(/fips-(dkr-|prod-)?|-fips/,""):j,"getRealRegion"),E2=R((j)=>{let{region:$,useFipsEndpoint:z}=j;if(!$)throw new Error("Region is missing");return Object.assign(j,{region:R(async()=>{if(typeof $==="string")return o4($);let W=await $();return o4(W)},"region"),useFipsEndpoint:R(async()=>{let W=typeof $==="string"?$:await $();if($5(W))return!0;return typeof z!=="function"?Promise.resolve(!!z):z()},"useFipsEndpoint")})},"resolveRegionConfig")});var f2=q((t9,g2)=>{g2.exports={name:"@aws-sdk/nested-clients",version:"3.775.0",description:"Nested clients for AWS SDK packages.",main:"./dist-cjs/index.js",module:"./dist-es/index.js",types:"./dist-types/index.d.ts",scripts:{build:"yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline nested-clients","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",lint:"node ../../scripts/validation/submodules-linter.js --pkg nested-clients",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},engines:{node:">=18.0.0"},author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],browser:{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"packages/nested-clients"},exports:{"./sso-oidc":{types:"./dist-types/submodules/sso-oidc/index.d.ts",module:"./dist-es/submodules/sso-oidc/index.js",node:"./dist-cjs/submodules/sso-oidc/index.js",import:"./dist-es/submodules/sso-oidc/index.js",require:"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{types:"./dist-types/submodules/sts/index.d.ts",module:"./dist-es/submodules/sts/index.js",node:"./dist-cjs/submodules/sts/index.js",import:"./dist-es/submodules/sts/index.js",require:"./dist-cjs/submodules/sts/index.js"}}}});var r2=q((e9,G5)=>{var{defineProperty:N0,getOwnPropertyDescriptor:u2,getOwnPropertyNames:c2}=Object,d2=Object.prototype.hasOwnProperty,h0=(j,$)=>N0(j,"name",{value:$,configurable:!0}),l2=(j,$)=>{for(var z in $)N0(j,z,{get:$[z],enumerable:!0})},_2=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of c2($))if(!d2.call(j,Q)&&Q!==z)N0(j,Q,{get:()=>$[Q],enumerable:!(W=u2($,Q))||W.enumerable})}return j},s2=(j)=>_2(N0({},"__esModule",{value:!0}),j),W5={};l2(W5,{NODE_APP_ID_CONFIG_OPTIONS:()=>n2,UA_APP_ID_ENV_NAME:()=>J5,UA_APP_ID_INI_NAME:()=>K5,createDefaultUserAgentProvider:()=>X5,crtAvailability:()=>Z5,defaultUserAgent:()=>p2});G5.exports=s2(W5);var Q5=F("node:os"),J1=F("node:process"),Z5={isCrtAvailable:!1},m2=h0(()=>{if(Z5.isCrtAvailable)return["md/crt-avail"];return null},"isCrtAvailable"),X5=h0(({serviceId:j,clientVersion:$})=>{return async(z)=>{let W=[["aws-sdk-js",$],["ua","2.1"],[`os/${Q5.platform()}`,Q5.release()],["lang/js"],["md/nodejs",`${J1.versions.node}`]],Q=m2();if(Q)W.push(Q);if(j)W.push([`api/${j}`,$]);if(J1.env.AWS_EXECUTION_ENV)W.push([`exec-env/${J1.env.AWS_EXECUTION_ENV}`]);let Z=await z?.userAgentAppId?.();return Z?[...W,[`app/${Z}`]]:[...W]}},"createDefaultUserAgentProvider"),p2=X5,i2=B7(),J5="AWS_SDK_UA_APP_ID",K5="sdk_ua_app_id",a2="sdk-ua-app-id",n2={environmentVariableSelector:h0((j)=>j[J5],"environmentVariableSelector"),configFileSelector:h0((j)=>j[K5]??j[a2],"configFileSelector"),default:i2.DEFAULT_UA_APP_ID}});var Kz=q((jQ,V5)=>{var{defineProperty:O0,getOwnPropertyDescriptor:e2,getOwnPropertyNames:jz}=Object,$z=Object.prototype.hasOwnProperty,B5=(j,$)=>O0(j,"name",{value:$,configurable:!0}),zz=(j,$)=>{for(var z in $)O0(j,z,{get:$[z],enumerable:!0})},Qz=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of jz($))if(!$z.call(j,Q)&&Q!==z)O0(j,Q,{get:()=>$[Q],enumerable:!(W=e2($,Q))||W.enumerable})}return j},Wz=(j)=>Qz(O0({},"__esModule",{value:!0}),j),q5={};zz(q5,{Hash:()=>Jz});V5.exports=Wz(q5);var K1=o2(),Zz=t2(),Xz=F("node:buffer"),Y5=F("node:crypto"),Jz=class{static{B5(this,"Hash")}constructor(j,$){this.algorithmIdentifier=j,this.secret=$,this.reset()}update(j,$){this.hash.update(Zz.toUint8Array(G1(j,$)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Y5.createHmac(this.algorithmIdentifier,G1(this.secret)):Y5.createHash(this.algorithmIdentifier)}};function G1(j,$){if(Xz.Buffer.isBuffer(j))return j;if(typeof j==="string")return K1.fromString(j,$);if(ArrayBuffer.isView(j))return K1.fromArrayBuffer(j.buffer,j.byteOffset,j.byteLength);return K1.fromArrayBuffer(j)}B5(G1,"castSourceData")});var Lz=q((zQ,U5)=>{var{defineProperty:C0,getOwnPropertyDescriptor:Gz,getOwnPropertyNames:Yz}=Object,Bz=Object.prototype.hasOwnProperty,qz=(j,$)=>C0(j,"name",{value:$,configurable:!0}),Vz=(j,$)=>{for(var z in $)C0(j,z,{get:$[z],enumerable:!0})},Hz=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of Yz($))if(!Bz.call(j,Q)&&Q!==z)C0(j,Q,{get:()=>$[Q],enumerable:!(W=Gz($,Q))||W.enumerable})}return j},wz=(j)=>Hz(C0({},"__esModule",{value:!0}),j),w5={};Vz(w5,{calculateBodyLength:()=>Uz});U5.exports=wz(w5);var H5=F("node:fs"),Uz=qz((j)=>{if(!j)return 0;if(typeof j==="string")return Buffer.byteLength(j);else if(typeof j.byteLength==="number")return j.byteLength;else if(typeof j.size==="number")return j.size;else if(typeof j.start==="number"&&typeof j.end==="number")return j.end+1-j.start;else if(typeof j.path==="string"||Buffer.isBuffer(j.path))return H5.lstatSync(j.path).size;else if(typeof j.fd==="number")return H5.fstatSync(j.fd).size;throw new Error(`Body Length computation failed for ${j}`)},"calculateBodyLength")});var S5=q((QQ,R5)=>{var{defineProperty:v0,getOwnPropertyDescriptor:Mz,getOwnPropertyNames:bz}=Object,Fz=Object.prototype.hasOwnProperty,M=(j,$)=>v0(j,"name",{value:$,configurable:!0}),Dz=(j,$)=>{for(var z in $)v0(j,z,{get:$[z],enumerable:!0})},hz=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of bz($))if(!Fz.call(j,Q)&&Q!==z)v0(j,Q,{get:()=>$[Q],enumerable:!(W=Mz($,Q))||W.enumerable})}return j},Nz=(j)=>hz(v0({},"__esModule",{value:!0}),j),F5={};Dz(F5,{DEFAULT_MAX_RETRIES:()=>O5,DEFAULT_TIMEOUT:()=>N5,ENV_CMDS_AUTH_TOKEN:()=>q1,ENV_CMDS_FULL_URI:()=>T0,ENV_CMDS_RELATIVE_URI:()=>I0,Endpoint:()=>C5,fromContainerMetadata:()=>Iz,fromInstanceMetadata:()=>az,getInstanceMetadataEndpoint:()=>I5,httpRequest:()=>d,providerConfigFromInit:()=>V1});R5.exports=Nz(F5);var Oz=F("node:url"),S=a0(),Cz=F("node:buffer"),Tz=F("node:http");function d(j){return new Promise(($,z)=>{let W=Tz.request({method:"GET",...j,hostname:j.hostname?.replace(/^\[(.+)\]$/,"$1")});W.on("error",(Q)=>{z(Object.assign(new S.ProviderError("Unable to connect to instance metadata service"),Q)),W.destroy()}),W.on("timeout",()=>{z(new S.ProviderError("TimeoutError from instance metadata service")),W.destroy()}),W.on("response",(Q)=>{let{statusCode:Z=400}=Q;if(Z<200||300<=Z)z(Object.assign(new S.ProviderError("Error response received from instance metadata service"),{statusCode:Z})),W.destroy();let X=[];Q.on("data",(J)=>{X.push(J)}),Q.on("end",()=>{$(Cz.Buffer.concat(X)),W.destroy()})}),W.end()})}M(d,"httpRequest");var D5=M((j)=>Boolean(j)&&typeof j==="object"&&typeof j.AccessKeyId==="string"&&typeof j.SecretAccessKey==="string"&&typeof j.Token==="string"&&typeof j.Expiration==="string","isImdsCredentials"),h5=M((j)=>({accessKeyId:j.AccessKeyId,secretAccessKey:j.SecretAccessKey,sessionToken:j.Token,expiration:new Date(j.Expiration),...j.AccountId&&{accountId:j.AccountId}}),"fromImdsCredentials"),N5=1000,O5=0,V1=M(({maxRetries:j=O5,timeout:$=N5})=>({maxRetries:j,timeout:$}),"providerConfigFromInit"),B1=M((j,$)=>{let z=j();for(let W=0;W<$;W++)z=z.catch(j);return z},"retry"),T0="AWS_CONTAINER_CREDENTIALS_FULL_URI",I0="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",q1="AWS_CONTAINER_AUTHORIZATION_TOKEN",Iz=M((j={})=>{let{timeout:$,maxRetries:z}=V1(j);return()=>B1(async()=>{let W=await Pz({logger:j.logger}),Q=JSON.parse(await vz($,W));if(!D5(Q))throw new S.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:j.logger});return h5(Q)},z)},"fromContainerMetadata"),vz=M(async(j,$)=>{if(process.env[q1])$.headers={...$.headers,Authorization:process.env[q1]};return(await d({...$,timeout:j})).toString()},"requestFromEcsImds"),Rz="169.254.170.2",Sz={localhost:!0,"127.0.0.1":!0},kz={"http:":!0,"https:":!0},Pz=M(async({logger:j})=>{if(process.env[I0])return{hostname:Rz,path:process.env[I0]};if(process.env[T0]){let $=Oz.parse(process.env[T0]);if(!$.hostname||!($.hostname in Sz))throw new S.CredentialsProviderError(`${$.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:j});if(!$.protocol||!($.protocol in kz))throw new S.CredentialsProviderError(`${$.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:j});return{...$,port:$.port?parseInt($.port,10):void 0}}throw new S.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${I0} or ${T0} environment variable is set`,{tryNextLink:!1,logger:j})},"getCmdsUri"),Az=class j extends S.CredentialsProviderError{constructor($,z=!0){super($,z);this.tryNextLink=z,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,j.prototype)}static{M(this,"InstanceMetadataV1FallbackError")}},H1=V0(),xz=o0(),C5=((j)=>{return j.IPv4="http://169.254.169.254",j.IPv6="http://[fd00:ec2::254]",j})(C5||{}),Ez="AWS_EC2_METADATA_SERVICE_ENDPOINT",yz="ec2_metadata_service_endpoint",gz={environmentVariableSelector:(j)=>j[Ez],configFileSelector:(j)=>j[yz],default:void 0},T5=((j)=>{return j.IPv4="IPv4",j.IPv6="IPv6",j})(T5||{}),fz="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",uz="ec2_metadata_service_endpoint_mode",cz={environmentVariableSelector:(j)=>j[fz],configFileSelector:(j)=>j[uz],default:"IPv4"},I5=M(async()=>xz.parseUrl(await dz()||await lz()),"getInstanceMetadataEndpoint"),dz=M(async()=>H1.loadConfig(gz)(),"getFromEndpointConfig"),lz=M(async()=>{let j=await H1.loadConfig(cz)();switch(j){case"IPv4":return"http://169.254.169.254";case"IPv6":return"http://[fd00:ec2::254]";default:throw new Error(`Unsupported endpoint mode: ${j}. Select from ${Object.values(T5)}`)}},"getFromEndpointModeConfig"),_z=300,sz=300,mz="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",L5=M((j,$)=>{let z=_z+Math.floor(Math.random()*sz),W=new Date(Date.now()+z*1000);$.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(W)}.
|
|
2
|
+
For more information, please visit: `+mz);let Q=j.originalExpiration??j.expiration;return{...j,...Q?{originalExpiration:Q}:{},expiration:W}},"getExtendedInstanceMetadataCredentials"),pz=M((j,$={})=>{let z=$?.logger||console,W;return async()=>{let Q;try{if(Q=await j(),Q.expiration&&Q.expiration.getTime()<Date.now())Q=L5(Q,z)}catch(Z){if(W)z.warn("Credential renew failed: ",Z),Q=L5(W,z);else throw Z}return W=Q,Q}},"staticStabilityProvider"),v5="/latest/meta-data/iam/security-credentials/",iz="/latest/api/token",Y1="AWS_EC2_METADATA_V1_DISABLED",M5="ec2_metadata_v1_disabled",b5="x-aws-ec2-metadata-token",az=M((j={})=>pz(nz(j),{logger:j.logger}),"fromInstanceMetadata"),nz=M((j={})=>{let $=!1,{logger:z,profile:W}=j,{timeout:Q,maxRetries:Z}=V1(j),X=M(async(J,K)=>{if($||K.headers?.[b5]==null){let Y=!1,B=!1,b=await H1.loadConfig({environmentVariableSelector:(D)=>{let O=D[Y1];if(B=!!O&&O!=="false",O===void 0)throw new S.CredentialsProviderError(`${Y1} not set in env, checking config file next.`,{logger:j.logger});return B},configFileSelector:(D)=>{let O=D[M5];return Y=!!O&&O!=="false",Y},default:!1},{profile:W})();if(j.ec2MetadataV1Disabled||b){let D=[];if(j.ec2MetadataV1Disabled)D.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(Y)D.push(`config file profile (${M5})`);if(B)D.push(`process environment variable (${Y1})`);throw new Az(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${D.join(", ")}].`)}}let V=(await B1(async()=>{let Y;try{Y=await oz(K)}catch(B){if(B.statusCode===401)$=!1;throw B}return Y},J)).trim();return B1(async()=>{let Y;try{Y=await tz(V,K,j)}catch(B){if(B.statusCode===401)$=!1;throw B}return Y},J)},"getCredentials");return async()=>{let J=await I5();if($)return z?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),X(Z,{...J,timeout:Q});else{let K;try{K=(await rz({...J,timeout:Q})).toString()}catch(G){if(G?.statusCode===400)throw Object.assign(G,{message:"EC2 Metadata token request returned error"});else if(G.message==="TimeoutError"||[403,404,405].includes(G.statusCode))$=!0;return z?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),X(Z,{...J,timeout:Q})}return X(Z,{...J,headers:{[b5]:K},timeout:Q})}}},"getInstanceMetadataProvider"),rz=M(async(j)=>d({...j,path:iz,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),"getMetadataToken"),oz=M(async(j)=>(await d({...j,path:v5})).toString(),"getProfile"),tz=M(async(j,$,z)=>{let W=JSON.parse((await d({...$,path:v5+j})).toString());if(!D5(W))throw new S.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:z.logger});return h5(W)},"getCredentialsFromProfile")});var b9=q((WQ,y5)=>{var{create:ez,defineProperty:a,getOwnPropertyDescriptor:j9,getOwnPropertyNames:$9,getPrototypeOf:z9}=Object,Q9=Object.prototype.hasOwnProperty,w1=(j,$)=>a(j,"name",{value:$,configurable:!0}),W9=(j,$)=>{for(var z in $)a(j,z,{get:$[z],enumerable:!0})},x5=(j,$,z,W)=>{if($&&typeof $==="object"||typeof $==="function"){for(let Q of $9($))if(!Q9.call(j,Q)&&Q!==z)a(j,Q,{get:()=>$[Q],enumerable:!(W=j9($,Q))||W.enumerable})}return j},Z9=(j,$,z)=>(z=j!=null?ez(z9(j)):{},x5($||!j||!j.__esModule?a(z,"default",{value:j,enumerable:!0}):z,j)),X9=(j)=>x5(a({},"__esModule",{value:!0}),j),E5={};W9(E5,{resolveDefaultsModeConfig:()=>U9});y5.exports=X9(E5);var J9=v7(),k5=V0(),K9=a0(),G9="AWS_EXECUTION_ENV",P5="AWS_REGION",A5="AWS_DEFAULT_REGION",Y9="AWS_EC2_METADATA_DISABLED",B9=["in-region","cross-region","mobile","standard","legacy"],q9="/latest/meta-data/placement/region",V9="AWS_DEFAULTS_MODE",H9="defaults_mode",w9={environmentVariableSelector:(j)=>{return j[V9]},configFileSelector:(j)=>{return j[H9]},default:"legacy"},U9=w1(({region:j=k5.loadConfig(J9.NODE_REGION_CONFIG_OPTIONS),defaultsMode:$=k5.loadConfig(w9)}={})=>K9.memoize(async()=>{let z=typeof $==="function"?await $():$;switch(z?.toLowerCase()){case"auto":return L9(j);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(z?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${B9.join(", ")}, got ${z}`)}}),"resolveDefaultsModeConfig"),L9=w1(async(j)=>{if(j){let $=typeof j==="function"?await j():j,z=await M9();if(!z)return"standard";if($===z)return"in-region";else return"cross-region"}return"standard"},"resolveNodeDefaultsModeAuto"),M9=w1(async()=>{if(process.env[G9]&&(process.env[P5]||process.env[A5]))return process.env[P5]??process.env[A5];if(!process.env[Y9])try{let{getInstanceMetadataEndpoint:j,httpRequest:$}=await Promise.resolve().then(()=>Z9(S5())),z=await j();return(await $({...z,path:q9})).toString()}catch(j){}},"inferPhysicalRegion")});
|
|
3
|
+
export{a5 as Ia,zj as Ja,Vj as Ka,c1 as La,o1 as Ma,B7 as Na,v7 as Oa,i8 as Pa,V0 as Qa,o0 as Ra,T6 as Sa,P4 as Ta,O2 as Ua,f2 as Va,r2 as Wa,Kz as Xa,Lz as Ya,b9 as Za,y2 as _a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pc as u6}from"./chunk-adkpvcss.js";import{ad as U,dd as N}from"./chunk-yfn5e0ky.js";var l=U((Ew,M0)=>{var{defineProperty:u,getOwnPropertyDescriptor:l6,getOwnPropertyNames:d6}=Object,i6=Object.prototype.hasOwnProperty,y=($,w)=>u($,"name",{value:w,configurable:!0}),p6=($,w)=>{for(var z in w)u($,z,{get:w[z],enumerable:!0})},_6=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of d6(w))if(!i6.call($,Z)&&Z!==z)u($,Z,{get:()=>w[Z],enumerable:!(L=l6(w,Z))||L.enumerable})}return $},a6=($)=>_6(u({},"__esModule",{value:!0}),$),A0={};p6(A0,{Field:()=>s6,Fields:()=>r6,HttpRequest:()=>t6,HttpResponse:()=>o6,IHttpRequest:()=>R0.HttpRequest,getHttpHandlerExtensionConfiguration:()=>n6,isValidHostname:()=>I0,resolveHttpHandlerRuntimeConfig:()=>m6});M0.exports=a6(A0);var n6=y(($)=>{return{setHttpHandler(w){$.httpHandler=w},httpHandler(){return $.httpHandler},updateHttpClientConfig(w,z){$.httpHandler?.updateHttpClientConfig(w,z)},httpHandlerConfigs(){return $.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),m6=y(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),R0=u6(),s6=class{static{y(this,"Field")}constructor({name:$,kind:w=R0.FieldPosition.HEADER,values:z=[]}){this.name=$,this.kind=w,this.values=z}add($){this.values.push($)}set($){this.values=$}remove($){this.values=this.values.filter((w)=>w!==$)}toString(){return this.values.map(($)=>$.includes(",")||$.includes(" ")?`"${$}"`:$).join(", ")}get(){return this.values}},r6=class{constructor({fields:$=[],encoding:w="utf-8"}){this.entries={},$.forEach(this.setField.bind(this)),this.encoding=w}static{y(this,"Fields")}setField($){this.entries[$.name.toLowerCase()]=$}getField($){return this.entries[$.toLowerCase()]}removeField($){delete this.entries[$.toLowerCase()]}getByType($){return Object.values(this.entries).filter((w)=>w.kind===$)}},t6=class ${static{y(this,"HttpRequest")}constructor(w){this.method=w.method||"GET",this.hostname=w.hostname||"localhost",this.port=w.port,this.query=w.query||{},this.headers=w.headers||{},this.body=w.body,this.protocol=w.protocol?w.protocol.slice(-1)!==":"?`${w.protocol}:`:w.protocol:"https:",this.path=w.path?w.path.charAt(0)!=="/"?`/${w.path}`:w.path:"/",this.username=w.username,this.password=w.password,this.fragment=w.fragment}static clone(w){let z=new $({...w,headers:{...w.headers}});if(z.query)z.query=N0(z.query);return z}static isInstance(w){if(!w)return!1;let z=w;return"method"in z&&"protocol"in z&&"hostname"in z&&"path"in z&&typeof z.query==="object"&&typeof z.headers==="object"}clone(){return $.clone(this)}};function N0($){return Object.keys($).reduce((w,z)=>{let L=$[z];return{...w,[z]:Array.isArray(L)?[...L]:L}},{})}y(N0,"cloneQuery");var o6=class{static{y(this,"HttpResponse")}constructor($){this.statusCode=$.statusCode,this.reason=$.reason,this.headers=$.headers||{},this.body=$.body}static isInstance($){if(!$)return!1;let w=$;return typeof w.statusCode==="number"&&typeof w.headers==="object"}};function I0($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}y(I0,"isValidHostname")});var x0=U((gw,S0)=>{var{defineProperty:d,getOwnPropertyDescriptor:e6,getOwnPropertyNames:$4}=Object,w4=Object.prototype.hasOwnProperty,w0=($,w)=>d($,"name",{value:w,configurable:!0}),z4=($,w)=>{for(var z in w)d($,z,{get:w[z],enumerable:!0})},Z4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of $4(w))if(!w4.call($,Z)&&Z!==z)d($,Z,{get:()=>w[Z],enumerable:!(L=e6(w,Z))||L.enumerable})}return $},L4=($)=>Z4(d({},"__esModule",{value:!0}),$),O0={};z4(O0,{escapeUri:()=>b0,escapeUriPath:()=>K4});S0.exports=L4(O0);var b0=w0(($)=>encodeURIComponent($).replace(/[!'()*]/g,Y4),"escapeUri"),Y4=w0(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),K4=w0(($)=>$.split("/").map(b0).join("/"),"escapeUriPath")});var Z0=U((uw,k0)=>{var{defineProperty:i,getOwnPropertyDescriptor:Q4,getOwnPropertyNames:X4}=Object,G4=Object.prototype.hasOwnProperty,B4=($,w)=>i($,"name",{value:w,configurable:!0}),F4=($,w)=>{for(var z in w)i($,z,{get:w[z],enumerable:!0})},U4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of X4(w))if(!G4.call($,Z)&&Z!==z)i($,Z,{get:()=>w[Z],enumerable:!(L=Q4(w,Z))||L.enumerable})}return $},V4=($)=>U4(i({},"__esModule",{value:!0}),$),T0={};F4(T0,{buildQueryString:()=>y0});k0.exports=V4(T0);var z0=x0();function y0($){let w=[];for(let z of Object.keys($).sort()){let L=$[z];if(z=z0.escapeUri(z),Array.isArray(L))for(let Z=0,Q=L.length;Z<Q;Z++)w.push(`${z}=${z0.escapeUri(L[Z])}`);else{let Z=z;if(L||typeof L==="string")Z+=`=${z0.escapeUri(L)}`;w.push(Z)}}return w.join("&")}B4(y0,"buildQueryString")});var m0=U((lw,n0)=>{var{create:h4,defineProperty:q,getOwnPropertyDescriptor:W4,getOwnPropertyNames:J4,getPrototypeOf:j4}=Object,D4=Object.prototype.hasOwnProperty,V=($,w)=>q($,"name",{value:w,configurable:!0}),v4=($,w)=>{for(var z in w)q($,z,{get:w[z],enumerable:!0})},q0=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of J4(w))if(!D4.call($,Z)&&Z!==z)q($,Z,{get:()=>w[Z],enumerable:!(L=W4(w,Z))||L.enumerable})}return $},C4=($,w,z)=>(z=$!=null?h4(j4($)):{},q0(w||!$||!$.__esModule?q(z,"default",{value:$,enumerable:!0}):z,$)),H4=($)=>q0(q({},"__esModule",{value:!0}),$),g0={};v4(g0,{DEFAULT_REQUEST_TIMEOUT:()=>_0,NodeHttp2Handler:()=>T4,NodeHttpHandler:()=>O4,streamCollector:()=>k4});n0.exports=H4(g0);var u0=l(),l0=Z0(),L0=N("node:http"),Y0=N("node:https"),A4=["ECONNRESET","EPIPE","ETIMEDOUT"],d0=V(($)=>{let w={};for(let z of Object.keys($)){let L=$[z];w[z]=Array.isArray(L)?L.join(","):L}return w},"getTransformedHeaders"),H={setTimeout:($,w)=>setTimeout($,w),clearTimeout:($)=>clearTimeout($)},f0=1000,R4=V(($,w,z=0)=>{if(!z)return-1;let L=V((Z)=>{let Q=H.setTimeout(()=>{$.destroy(),w(Object.assign(new Error(`Socket timed out without establishing a connection within ${z} ms`),{name:"TimeoutError"}))},z-Z),Y=V((K)=>{if(K?.connecting)K.on("connect",()=>{H.clearTimeout(Q)});else H.clearTimeout(Q)},"doWithSocket");if($.socket)Y($.socket);else $.on("socket",Y)},"registerTimeout");if(z<2000)return L(0),0;return H.setTimeout(L.bind(null,f0),f0)},"setConnectionTimeout"),N4=3000,I4=V(($,{keepAlive:w,keepAliveMsecs:z},L=N4)=>{if(w!==!0)return-1;let Z=V(()=>{if($.socket)$.socket.setKeepAlive(w,z||0);else $.on("socket",(Q)=>{Q.setKeepAlive(w,z||0)})},"registerListener");if(L===0)return Z(),0;return H.setTimeout(Z,L)},"setSocketKeepAlive"),E0=3000,M4=V(($,w,z=_0)=>{let L=V((Z)=>{let Q=z-Z,Y=V(()=>{$.destroy(),w(Object.assign(new Error(`Connection timed out after ${z} ms`),{name:"TimeoutError"}))},"onTimeout");if($.socket)$.socket.setTimeout(Q,Y),$.on("close",()=>$.socket?.removeListener("timeout",Y));else $.setTimeout(Q,Y)},"registerTimeout");if(0<z&&z<6000)return L(0),0;return H.setTimeout(L.bind(null,z===0?0:E0),E0)},"setSocketTimeout"),i0=N("node:stream"),P0=6000;async function K0($,w,z=P0){let L=w.headers??{},Z=L.Expect||L.expect,Q=-1,Y=!0;if(Z==="100-continue")Y=await Promise.race([new Promise((K)=>{Q=Number(H.setTimeout(()=>K(!0),Math.max(P0,z)))}),new Promise((K)=>{$.on("continue",()=>{H.clearTimeout(Q),K(!0)}),$.on("response",()=>{H.clearTimeout(Q),K(!1)}),$.on("error",()=>{H.clearTimeout(Q),K(!1)})})]);if(Y)p0($,w.body)}V(K0,"writeRequestBody");function p0($,w){if(w instanceof i0.Readable){w.pipe($);return}if(w){if(Buffer.isBuffer(w)||typeof w==="string"){$.end(w);return}let z=w;if(typeof z==="object"&&z.buffer&&typeof z.byteOffset==="number"&&typeof z.byteLength==="number"){$.end(Buffer.from(z.buffer,z.byteOffset,z.byteLength));return}$.end(Buffer.from(w));return}$.end()}V(p0,"writeBody");var _0=0,O4=class ${constructor(w){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((z,L)=>{if(typeof w==="function")w().then((Z)=>{z(this.resolveDefaultConfig(Z))}).catch(L);else z(this.resolveDefaultConfig(w))})}static{V(this,"NodeHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}static checkSocketUsage(w,z,L=console){let{sockets:Z,requests:Q,maxSockets:Y}=w;if(typeof Y!=="number"||Y===1/0)return z;let K=15000;if(Date.now()-K<z)return z;if(Z&&Q)for(let X in Z){let G=Z[X]?.length??0,F=Q[X]?.length??0;if(G>=Y&&F>=2*Y)return L?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${G} and ${F} additional requests are enqueued.
|
|
2
2
|
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
3
|
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return z}resolveDefaultConfig(w){let{requestTimeout:z,connectionTimeout:L,socketTimeout:Z,socketAcquisitionWarningTimeout:Q,httpAgent:Y,httpsAgent:K}=w||{},X=!0,G=50;return{connectionTimeout:L,requestTimeout:z??Z,socketAcquisitionWarningTimeout:Q,httpAgent:(()=>{if(Y instanceof L0.Agent||typeof Y?.destroy==="function")return Y;return new L0.Agent({keepAlive:!0,maxSockets:50,...Y})})(),httpsAgent:(()=>{if(K instanceof Y0.Agent||typeof K?.destroy==="function")return K;return new Y0.Agent({keepAlive:!0,maxSockets:50,...K})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(w,{abortSignal:z}={}){if(!this.config)this.config=await this.configProvider;return new Promise((L,Z)=>{let Q=void 0,Y=[],K=V(async(B)=>{await Q,Y.forEach(H.clearTimeout),L(B)},"resolve"),X=V(async(B)=>{await Q,Y.forEach(H.clearTimeout),Z(B)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(z?.aborted){let B=new Error("Request aborted");B.name="AbortError",X(B);return}let G=w.protocol==="https:",F=G?this.config.httpsAgent:this.config.httpAgent;Y.push(H.setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let v=l0.buildQueryString(w.query||{}),D=void 0;if(w.username!=null||w.password!=null){let B=w.username??"",W=w.password??"";D=`${B}:${W}`}let j=w.path;if(v)j+=`?${v}`;if(w.fragment)j+=`#${w.fragment}`;let C=w.hostname??"";if(C[0]==="["&&C.endsWith("]"))C=w.hostname.slice(1,-1);else C=w.hostname;let x={headers:w.headers,host:C,method:w.method,path:j,port:w.port,agent:F,auth:D},h=(G?Y0.request:L0.request)(x,(B)=>{let W=new u0.HttpResponse({statusCode:B.statusCode||-1,reason:B.statusMessage,headers:d0(B.headers),body:B});K({response:W})});if(h.on("error",(B)=>{if(A4.includes(B.code))X(Object.assign(B,{name:"TimeoutError"}));else X(B)}),z){let B=V(()=>{h.destroy();let W=new Error("Request aborted");W.name="AbortError",X(W)},"onAbort");if(typeof z.addEventListener==="function"){let W=z;W.addEventListener("abort",B,{once:!0}),h.once("close",()=>W.removeEventListener("abort",B))}else z.onabort=B}Y.push(R4(h,X,this.config.connectionTimeout)),Y.push(M4(h,X,this.config.requestTimeout));let A=x.agent;if(typeof A==="object"&&"keepAlive"in A)Y.push(I4(h,{keepAlive:A.keepAlive,keepAliveMsecs:A.keepAliveMsecs}));Q=K0(h,w,this.config.requestTimeout).catch((B)=>{return Y.forEach(H.clearTimeout),Z(B)})})}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((L)=>{return{...L,[w]:z}})}httpHandlerConfigs(){return this.config??{}}},c0=N("node:http2"),b4=C4(N("node:http2")),S4=class{constructor($){this.sessions=[],this.sessions=$??[]}static{V(this,"NodeHttp2ConnectionPool")}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast($){this.sessions.push($)}contains($){return this.sessions.includes($)}remove($){this.sessions=this.sessions.filter((w)=>w!==$)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy($){for(let w of this.sessions)if(w===$){if(!w.destroyed)w.destroy()}}},x4=class{constructor($){if(this.sessionCache=new Map,this.config=$,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}static{V(this,"NodeHttp2ConnectionManager")}lease($,w){let z=this.getUrlString($),L=this.sessionCache.get(z);if(L){let K=L.poll();if(K&&!this.config.disableConcurrency)return K}let Z=b4.default.connect(z);if(this.config.maxConcurrency)Z.settings({maxConcurrentStreams:this.config.maxConcurrency},(K)=>{if(K)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+$.destination.toString())});Z.unref();let Q=V(()=>{Z.destroy(),this.deleteSession(z,Z)},"destroySessionCb");if(Z.on("goaway",Q),Z.on("error",Q),Z.on("frameError",Q),Z.on("close",()=>this.deleteSession(z,Z)),w.requestTimeout)Z.setTimeout(w.requestTimeout,Q);let Y=this.sessionCache.get(z)||new S4;return Y.offerLast(Z),this.sessionCache.set(z,Y),Z}deleteSession($,w){let z=this.sessionCache.get($);if(!z)return;if(!z.contains(w))return;z.remove(w),this.sessionCache.set($,z)}release($,w){let z=this.getUrlString($);this.sessionCache.get(z)?.offerLast(w)}destroy(){for(let[$,w]of this.sessionCache){for(let z of w){if(!z.destroyed)z.destroy();w.remove(z)}this.sessionCache.delete($)}}setMaxConcurrentStreams($){if($&&$<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=$}setDisableConcurrentStreams($){this.config.disableConcurrency=$}getUrlString($){return $.destination.toString()}},T4=class ${constructor(w){this.metadata={handlerProtocol:"h2"},this.connectionManager=new x4({}),this.configProvider=new Promise((z,L)=>{if(typeof w==="function")w().then((Z)=>{z(Z||{})}).catch(L);else z(w||{})})}static{V(this,"NodeHttp2Handler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}destroy(){this.connectionManager.destroy()}async handle(w,{abortSignal:z}={}){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)}let{requestTimeout:L,disableConcurrentStreams:Z}=this.config;return new Promise((Q,Y)=>{let K=!1,X=void 0,G=V(async(J)=>{await X,Q(J)},"resolve"),F=V(async(J)=>{await X,Y(J)},"reject");if(z?.aborted){K=!0;let J=new Error("Request aborted");J.name="AbortError",F(J);return}let{hostname:v,method:D,port:j,protocol:C,query:x}=w,T="";if(w.username!=null||w.password!=null){let J=w.username??"",I=w.password??"";T=`${J}:${I}@`}let h=`${C}//${T}${v}${j?`:${j}`:""}`,A={destination:new URL(h)},B=this.connectionManager.lease(A,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:Z||!1}),W=V((J)=>{if(Z)this.destroySession(B);K=!0,F(J)},"rejectWithDestroy"),E=l0.buildQueryString(x||{}),$0=w.path;if(E)$0+=`?${E}`;if(w.fragment)$0+=`#${w.fragment}`;let R=B.request({...w.headers,[c0.constants.HTTP2_HEADER_PATH]:$0,[c0.constants.HTTP2_HEADER_METHOD]:D});if(B.ref(),R.on("response",(J)=>{let I=new u0.HttpResponse({statusCode:J[":status"]||-1,headers:d0(J),body:R});if(K=!0,G({response:I}),Z)B.close(),this.connectionManager.deleteSession(h,B)}),L)R.setTimeout(L,()=>{R.close();let J=new Error(`Stream timed out because of no activity for ${L} ms`);J.name="TimeoutError",W(J)});if(z){let J=V(()=>{R.close();let I=new Error("Request aborted");I.name="AbortError",W(I)},"onAbort");if(typeof z.addEventListener==="function"){let I=z;I.addEventListener("abort",J,{once:!0}),R.once("close",()=>I.removeEventListener("abort",J))}else z.onabort=J}R.on("frameError",(J,I,g6)=>{W(new Error(`Frame type id ${J} in stream id ${g6} has failed with code ${I}.`))}),R.on("error",W),R.on("aborted",()=>{W(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${R.rstCode}.`))}),R.on("close",()=>{if(B.unref(),Z)B.destroy();if(!K)W(new Error("Unexpected error: http2 request did not get a response"))}),X=K0(R,w,L)})}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((L)=>{return{...L,[w]:z}})}httpHandlerConfigs(){return this.config??{}}destroySession(w){if(!w.destroyed)w.destroy()}},y4=class extends i0.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{V(this,"Collector")}_write($,w,z){this.bufferedBytes.push($),z()}},k4=V(($)=>{if(f4($))return a0($);return new Promise((w,z)=>{let L=new y4;$.pipe(L),$.on("error",(Z)=>{L.end(),z(Z)}),L.on("error",z),L.on("finish",function(){let Z=new Uint8Array(Buffer.concat(this.bufferedBytes));w(Z)})})},"streamCollector"),f4=V(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");async function a0($){let w=[],z=$.getReader(),L=!1,Z=0;while(!L){let{done:K,value:X}=await z.read();if(X)w.push(X),Z+=X.length;L=K}let Q=new Uint8Array(Z),Y=0;for(let K of w)Q.set(K,Y),Y+=K.length;return Q}V(a0,"collectReadableStream")});var t0=U((_w,r0)=>{var{defineProperty:p,getOwnPropertyDescriptor:E4,getOwnPropertyNames:P4}=Object,c4=Object.prototype.hasOwnProperty,q4=($,w)=>p($,"name",{value:w,configurable:!0}),g4=($,w)=>{for(var z in w)p($,z,{get:w[z],enumerable:!0})},u4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of P4(w))if(!c4.call($,Z)&&Z!==z)p($,Z,{get:()=>w[Z],enumerable:!(L=E4(w,Z))||L.enumerable})}return $},l4=($)=>u4(p({},"__esModule",{value:!0}),$),s0={};g4(s0,{isArrayBuffer:()=>d4});r0.exports=l4(s0);var d4=q4(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var g=U((aw,$1)=>{var{defineProperty:_,getOwnPropertyDescriptor:i4,getOwnPropertyNames:p4}=Object,_4=Object.prototype.hasOwnProperty,o0=($,w)=>_($,"name",{value:w,configurable:!0}),a4=($,w)=>{for(var z in w)_($,z,{get:w[z],enumerable:!0})},n4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of p4(w))if(!_4.call($,Z)&&Z!==z)_($,Z,{get:()=>w[Z],enumerable:!(L=i4(w,Z))||L.enumerable})}return $},m4=($)=>n4(_({},"__esModule",{value:!0}),$),e0={};a4(e0,{fromArrayBuffer:()=>r4,fromString:()=>t4});$1.exports=m4(e0);var s4=t0(),Q0=N("node:buffer"),r4=o0(($,w=0,z=$.byteLength-w)=>{if(!s4.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return Q0.Buffer.from($,w,z)},"fromArrayBuffer"),t4=o0(($,w)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return w?Q0.Buffer.from($,w):Q0.Buffer.from($)},"fromString")});var Z1=U((w1)=>{Object.defineProperty(w1,"__esModule",{value:!0});w1.fromBase64=void 0;var o4=g(),e4=/^[A-Za-z0-9+/]*={0,2}$/,$$=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!e4.exec($))throw new TypeError("Invalid base64 string.");let w=o4.fromString($,"base64");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength)};w1.fromBase64=$$});var n=U((mw,Q1)=>{var{defineProperty:a,getOwnPropertyDescriptor:w$,getOwnPropertyNames:z$}=Object,Z$=Object.prototype.hasOwnProperty,X0=($,w)=>a($,"name",{value:w,configurable:!0}),L$=($,w)=>{for(var z in w)a($,z,{get:w[z],enumerable:!0})},Y$=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of z$(w))if(!Z$.call($,Z)&&Z!==z)a($,Z,{get:()=>w[Z],enumerable:!(L=w$(w,Z))||L.enumerable})}return $},K$=($)=>Y$(a({},"__esModule",{value:!0}),$),L1={};L$(L1,{fromUtf8:()=>K1,toUint8Array:()=>Q$,toUtf8:()=>X$});Q1.exports=K$(L1);var Y1=g(),K1=X0(($)=>{let w=Y1.fromString($,"utf8");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Q$=X0(($)=>{if(typeof $==="string")return K1($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),X$=X0(($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Y1.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var B1=U((X1)=>{Object.defineProperty(X1,"__esModule",{value:!0});X1.toBase64=void 0;var G$=g(),B$=n(),F$=($)=>{let w;if(typeof $==="string")w=B$.fromUtf8($);else w=$;if(typeof w!=="object"||typeof w.byteOffset!=="number"||typeof w.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return G$.fromArrayBuffer(w.buffer,w.byteOffset,w.byteLength).toString("base64")};X1.toBase64=F$});var P=U((rw,m)=>{var{defineProperty:F1,getOwnPropertyDescriptor:U$,getOwnPropertyNames:V$}=Object,h$=Object.prototype.hasOwnProperty,G0=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of V$(w))if(!h$.call($,Z)&&Z!==z)F1($,Z,{get:()=>w[Z],enumerable:!(L=U$(w,Z))||L.enumerable})}return $},U1=($,w,z)=>(G0($,w,"default"),z&&G0(z,w,"default")),W$=($)=>G0(F1({},"__esModule",{value:!0}),$),B0={};m.exports=W$(B0);U1(B0,Z1(),m.exports);U1(B0,B1(),m.exports)});var F0=U((h1)=>{Object.defineProperty(h1,"__esModule",{value:!0});h1.ChecksumStream=void 0;var J$=P(),j$=N("node:stream");class V1 extends j$.Duplex{constructor({expectedChecksum:$,checksum:w,source:z,checksumSourceLocation:L,base64Encoder:Z}){var Q,Y;super();if(typeof z.pipe==="function")this.source=z;else throw new Error(`@smithy/util-stream: unsupported source type ${(Y=(Q=z===null||z===void 0?void 0:z.constructor)===null||Q===void 0?void 0:Q.name)!==null&&Y!==void 0?Y:z} in ChecksumStream.`);this.base64Encoder=Z!==null&&Z!==void 0?Z:J$.toBase64,this.expectedChecksum=$,this.checksum=w,this.checksumSourceLocation=L,this.source.pipe(this)}_read($){}_write($,w,z){try{this.checksum.update($),this.push($)}catch(L){return z(L)}return z()}async _final($){try{let w=await this.checksum.digest(),z=this.base64Encoder(w);if(this.expectedChecksum!==z)return $(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${z}" in response header "${this.checksumSourceLocation}".`))}catch(w){return $(w)}return this.push(null),$()}}h1.ChecksumStream=V1});var k=U((J1)=>{Object.defineProperty(J1,"__esModule",{value:!0});J1.isBlob=J1.isReadableStream=void 0;var D$=($)=>{var w;return typeof ReadableStream==="function"&&(((w=$===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)===ReadableStream.name||$ instanceof ReadableStream)};J1.isReadableStream=D$;var v$=($)=>{var w;return typeof Blob==="function"&&(((w=$===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)===Blob.name||$ instanceof Blob)};J1.isBlob=v$});var H1=U((v1)=>{Object.defineProperty(v1,"__esModule",{value:!0});v1.ChecksumStream=void 0;var H$=typeof ReadableStream==="function"?ReadableStream:function(){};class D1 extends H${}v1.ChecksumStream=D1});var N1=U((A1)=>{Object.defineProperty(A1,"__esModule",{value:!0});A1.createChecksumStream=void 0;var A$=P(),R$=k(),N$=H1(),I$=({expectedChecksum:$,checksum:w,source:z,checksumSourceLocation:L,base64Encoder:Z})=>{var Q,Y;if(!R$.isReadableStream(z))throw new Error(`@smithy/util-stream: unsupported source type ${(Y=(Q=z===null||z===void 0?void 0:z.constructor)===null||Q===void 0?void 0:Q.name)!==null&&Y!==void 0?Y:z} in ChecksumStream.`);let K=Z!==null&&Z!==void 0?Z:A$.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let X=new TransformStream({start(){},async transform(F,v){w.update(F),v.enqueue(F)},async flush(F){let v=await w.digest(),D=K(v);if($!==D){let j=new Error(`Checksum mismatch: expected "${$}" but received "${D}" in response header "${L}".`);F.error(j)}else F.terminate()}});z.pipeThrough(X);let G=X.readable;return Object.setPrototypeOf(G,N$.ChecksumStream.prototype),G};A1.createChecksumStream=I$});var O1=U((I1)=>{Object.defineProperty(I1,"__esModule",{value:!0});I1.createChecksumStream=void 0;var M$=k(),O$=F0(),b$=N1();function S$($){if(typeof ReadableStream==="function"&&M$.isReadableStream($.source))return b$.createChecksumStream($);return new O$.ChecksumStream($)}I1.createChecksumStream=S$});var U0=U((S1)=>{Object.defineProperty(S1,"__esModule",{value:!0});S1.ByteArrayCollector=void 0;class b1{constructor($){this.allocByteArray=$,this.byteLength=0,this.byteArrays=[]}push($){this.byteArrays.push($),this.byteLength+=$.byteLength}flush(){if(this.byteArrays.length===1){let z=this.byteArrays[0];return this.reset(),z}let $=this.allocByteArray(this.byteLength),w=0;for(let z=0;z<this.byteArrays.length;++z){let L=this.byteArrays[z];$.set(L,w),w+=L.byteLength}return this.reset(),$}reset(){this.byteArrays=[],this.byteLength=0}}S1.ByteArrayCollector=b1});var P1=U((f1)=>{Object.defineProperty(f1,"__esModule",{value:!0});f1.modeOf=f1.sizeOf=f1.flush=f1.merge=f1.createBufferedReadable=f1.createBufferedReadableStream=void 0;var x$=U0();function T1($,w,z){let L=$.getReader(),Z=!1,Q=0,Y=["",new x$.ByteArrayCollector((G)=>new Uint8Array(G))],K=-1,X=async(G)=>{let{value:F,done:v}=await L.read(),D=F;if(v){if(K!==-1){let j=s(Y,K);if(c(j)>0)G.enqueue(j)}G.close()}else{let j=k1(D,!1);if(K!==j){if(K>=0)G.enqueue(s(Y,K));K=j}if(K===-1){G.enqueue(D);return}let C=c(D);Q+=C;let x=c(Y[K]);if(C>=w&&x===0)G.enqueue(D);else{let T=y1(Y,K,D);if(!Z&&Q>w*2)Z=!0,z===null||z===void 0||z.warn(`@smithy/util-stream - stream chunk size ${C} is below threshold of ${w}, automatically buffering.`);if(T>=w)G.enqueue(s(Y,K));else await X(G)}}};return new ReadableStream({pull:X})}f1.createBufferedReadableStream=T1;f1.createBufferedReadable=T1;function y1($,w,z){switch(w){case 0:return $[0]+=z,c($[0]);case 1:case 2:return $[w].push(z),c($[w])}}f1.merge=y1;function s($,w){switch(w){case 0:let z=$[0];return $[0]="",z;case 1:case 2:return $[w].flush()}throw new Error(`@smithy/util-stream - invalid index ${w} given to flush()`)}f1.flush=s;function c($){var w,z;return(z=(w=$===null||$===void 0?void 0:$.byteLength)!==null&&w!==void 0?w:$===null||$===void 0?void 0:$.length)!==null&&z!==void 0?z:0}f1.sizeOf=c;function k1($,w=!0){if(w&&typeof Buffer!=="undefined"&&$ instanceof Buffer)return 2;if($ instanceof Uint8Array)return 1;if(typeof $==="string")return 0;return-1}f1.modeOf=k1});var u1=U((q1)=>{Object.defineProperty(q1,"__esModule",{value:!0});q1.createBufferedReadable=void 0;var P$=N("node:stream"),c1=U0(),S=P1(),c$=k();function q$($,w,z){if(c$.isReadableStream($))return S.createBufferedReadableStream($,w,z);let L=new P$.Readable({read(){}}),Z=!1,Q=0,Y=["",new c1.ByteArrayCollector((X)=>new Uint8Array(X)),new c1.ByteArrayCollector((X)=>Buffer.from(new Uint8Array(X)))],K=-1;return $.on("data",(X)=>{let G=S.modeOf(X,!0);if(K!==G){if(K>=0)L.push(S.flush(Y,K));K=G}if(K===-1){L.push(X);return}let F=S.sizeOf(X);Q+=F;let v=S.sizeOf(Y[K]);if(F>=w&&v===0)L.push(X);else{let D=S.merge(Y,K,X);if(!Z&&Q>w*2)Z=!0,z===null||z===void 0||z.warn(`@smithy/util-stream - stream chunk size ${F} is below threshold of ${w}, automatically buffering.`);if(D>=w)L.push(S.flush(Y,K))}}),$.on("end",()=>{if(K!==-1){let X=S.flush(Y,K);if(S.sizeOf(X)>0)L.push(X)}L.push(null)}),L}q1.createBufferedReadable=q$});var i1=U((l1)=>{Object.defineProperty(l1,"__esModule",{value:!0});l1.getAwsChunkedEncodingStream=void 0;var g$=N("node:stream"),u$=($,w)=>{let{base64Encoder:z,bodyLengthChecker:L,checksumAlgorithmFn:Z,checksumLocationName:Q,streamHasher:Y}=w,K=z!==void 0&&Z!==void 0&&Q!==void 0&&Y!==void 0,X=K?Y(Z,$):void 0,G=new g$.Readable({read:()=>{}});return $.on("data",(F)=>{let v=L(F)||0;G.push(`${v.toString(16)}\r
|
|
4
4
|
`),G.push(F),G.push(`\r
|
|
@@ -7,4 +7,4 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
7
7
|
`),G.push(`\r
|
|
8
8
|
`)}G.push(null)}),G};l1.getAwsChunkedEncodingStream=u$});var a1=U((p1)=>{Object.defineProperty(p1,"__esModule",{value:!0});p1.headStream=void 0;async function l$($,w){var z;let L=0,Z=[],Q=$.getReader(),Y=!1;while(!Y){let{done:G,value:F}=await Q.read();if(F)Z.push(F),L+=(z=F===null||F===void 0?void 0:F.byteLength)!==null&&z!==void 0?z:0;if(L>=w)break;Y=G}Q.releaseLock();let K=new Uint8Array(Math.min(w,L)),X=0;for(let G of Z){if(G.byteLength>K.byteLength-X){K.set(G.subarray(0,K.byteLength-X),X);break}else K.set(G,X);X+=G.length}return K}p1.headStream=l$});var r1=U((m1)=>{Object.defineProperty(m1,"__esModule",{value:!0});m1.headStream=void 0;var d$=N("node:stream"),i$=a1(),p$=k(),_$=($,w)=>{if(p$.isReadableStream($))return i$.headStream($,w);return new Promise((z,L)=>{let Z=new n1;Z.limit=w,$.pipe(Z),$.on("error",(Q)=>{Z.end(),L(Q)}),Z.on("error",L),Z.on("finish",function(){let Q=new Uint8Array(Buffer.concat(this.buffers));z(Q)})})};m1.headStream=_$;class n1 extends d$.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write($,w,z){var L;if(this.buffers.push($),this.bytesBuffered+=(L=$.byteLength)!==null&&L!==void 0?L:0,this.bytesBuffered>=this.limit){let Z=this.bytesBuffered-this.limit,Q=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=Q.subarray(0,Q.byteLength-Z),this.emit("finish")}z()}}});var L6=U((X8,Z6)=>{var{defineProperty:t,getOwnPropertyDescriptor:a$,getOwnPropertyNames:n$}=Object,m$=Object.prototype.hasOwnProperty,M=($,w)=>t($,"name",{value:w,configurable:!0}),s$=($,w)=>{for(var z in w)t($,z,{get:w[z],enumerable:!0})},r$=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of n$(w))if(!m$.call($,Z)&&Z!==z)t($,Z,{get:()=>w[Z],enumerable:!(L=a$(w,Z))||L.enumerable})}return $},t$=($)=>r$(t({},"__esModule",{value:!0}),$),o1={};s$(o1,{FetchHttpHandler:()=>e$,keepAliveSupport:()=>r,streamCollector:()=>ww});Z6.exports=t$(o1);var t1=l(),o$=Z0();function V0($,w){return new Request($,w)}M(V0,"createRequest");function e1($=0){return new Promise((w,z)=>{if($)setTimeout(()=>{let L=new Error(`Request did not complete within ${$} ms`);L.name="TimeoutError",z(L)},$)})}M(e1,"requestTimeout");var r={supported:void 0},e$=class ${static{M(this,"FetchHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}constructor(w){if(typeof w==="function")this.configProvider=w().then((z)=>z||{});else this.config=w??{},this.configProvider=Promise.resolve(this.config);if(r.supported===void 0)r.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in V0("https://[::1]"))}destroy(){}async handle(w,{abortSignal:z}={}){if(!this.config)this.config=await this.configProvider;let L=this.config.requestTimeout,Z=this.config.keepAlive===!0,Q=this.config.credentials;if(z?.aborted){let h=new Error("Request aborted");return h.name="AbortError",Promise.reject(h)}let Y=w.path,K=o$.buildQueryString(w.query||{});if(K)Y+=`?${K}`;if(w.fragment)Y+=`#${w.fragment}`;let X="";if(w.username!=null||w.password!=null){let h=w.username??"",A=w.password??"";X=`${h}:${A}@`}let{port:G,method:F}=w,v=`${w.protocol}//${X}${w.hostname}${G?`:${G}`:""}${Y}`,D=F==="GET"||F==="HEAD"?void 0:w.body,j={body:D,headers:new Headers(w.headers),method:F,credentials:Q};if(this.config?.cache)j.cache=this.config.cache;if(D)j.duplex="half";if(typeof AbortController!=="undefined")j.signal=z;if(r.supported)j.keepalive=Z;if(typeof this.config.requestInit==="function")Object.assign(j,this.config.requestInit(w));let C=M(()=>{},"removeSignalEventListener"),x=V0(v,j),T=[fetch(x).then((h)=>{let A=h.headers,B={};for(let E of A.entries())B[E[0]]=E[1];if(h.body==null)return h.blob().then((E)=>({response:new t1.HttpResponse({headers:B,reason:h.statusText,statusCode:h.status,body:E})}));return{response:new t1.HttpResponse({headers:B,reason:h.statusText,statusCode:h.status,body:h.body})}}),e1(L)];if(z)T.push(new Promise((h,A)=>{let B=M(()=>{let W=new Error("Request aborted");W.name="AbortError",A(W)},"onAbort");if(typeof z.addEventListener==="function"){let W=z;W.addEventListener("abort",B,{once:!0}),C=M(()=>W.removeEventListener("abort",B),"removeSignalEventListener")}else z.onabort=B}));return Promise.race(T).finally(C)}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((L)=>{return L[w]=z,L})}httpHandlerConfigs(){return this.config??{}}},$w=P(),ww=M(async($)=>{if(typeof Blob==="function"&&$ instanceof Blob||$.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await $.arrayBuffer());return $6($)}return w6($)},"streamCollector");async function $6($){let w=await z6($),z=$w.fromBase64(w);return new Uint8Array(z)}M($6,"collectBlob");async function w6($){let w=[],z=$.getReader(),L=!1,Z=0;while(!L){let{done:K,value:X}=await z.read();if(X)w.push(X),Z+=X.length;L=K}let Q=new Uint8Array(Z),Y=0;for(let K of w)Q.set(K,Y),Y+=K.length;return Q}M(w6,"collectStream");function z6($){return new Promise((w,z)=>{let L=new FileReader;L.onloadend=()=>{if(L.readyState!==2)return z(new Error("Reader aborted too early"));let Z=L.result??"",Q=Z.indexOf(","),Y=Q>-1?Q+1:Z.length;w(Z.substring(Y))},L.onabort=()=>z(new Error("Read aborted")),L.onerror=()=>z(L.error),L.readAsDataURL($)})}M(z6,"readToBase64")});var F6=U((G8,B6)=>{var{defineProperty:o,getOwnPropertyDescriptor:zw,getOwnPropertyNames:Zw}=Object,Lw=Object.prototype.hasOwnProperty,Y6=($,w)=>o($,"name",{value:w,configurable:!0}),Yw=($,w)=>{for(var z in w)o($,z,{get:w[z],enumerable:!0})},Kw=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Zw(w))if(!Lw.call($,Z)&&Z!==z)o($,Z,{get:()=>w[Z],enumerable:!(L=zw(w,Z))||L.enumerable})}return $},Qw=($)=>Kw(o({},"__esModule",{value:!0}),$),K6={};Yw(K6,{fromHex:()=>X6,toHex:()=>G6});B6.exports=Qw(K6);var Q6={},h0={};for(let $=0;$<256;$++){let w=$.toString(16).toLowerCase();if(w.length===1)w=`0${w}`;Q6[$]=w,h0[w]=$}function X6($){if($.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let w=new Uint8Array($.length/2);for(let z=0;z<$.length;z+=2){let L=$.slice(z,z+2).toLowerCase();if(L in h0)w[z/2]=h0[L];else throw new Error(`Cannot decode unrecognized sequence ${L} as hexadecimal`)}return w}Y6(X6,"fromHex");function G6($){let w="";for(let z=0;z<$.byteLength;z++)w+=Q6[$[z]];return w}Y6(G6,"toHex")});var j6=U((W6)=>{Object.defineProperty(W6,"__esModule",{value:!0});W6.sdkStreamMixin=void 0;var Xw=L6(),Gw=P(),Bw=F6(),Fw=n(),U6=k(),V6="The stream has already been transformed.",Uw=($)=>{var w,z;if(!h6($)&&!U6.isReadableStream($)){let Y=((z=(w=$===null||$===void 0?void 0:$.__proto__)===null||w===void 0?void 0:w.constructor)===null||z===void 0?void 0:z.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${Y}`)}let L=!1,Z=async()=>{if(L)throw new Error(V6);return L=!0,await Xw.streamCollector($)},Q=(Y)=>{if(typeof Y.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
|
|
9
9
|
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return Y.stream()};return Object.assign($,{transformToByteArray:Z,transformToString:async(Y)=>{let K=await Z();if(Y==="base64")return Gw.toBase64(K);else if(Y==="hex")return Bw.toHex(K);else if(Y===void 0||Y==="utf8"||Y==="utf-8")return Fw.toUtf8(K);else if(typeof TextDecoder==="function")return new TextDecoder(Y).decode(K);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(L)throw new Error(V6);if(L=!0,h6($))return Q($);else if(U6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};W6.sdkStreamMixin=Uw;var h6=($)=>typeof Blob==="function"&&$ instanceof Blob});var H6=U((v6)=>{Object.defineProperty(v6,"__esModule",{value:!0});v6.sdkStreamMixin=void 0;var Vw=m0(),hw=g(),W0=N("node:stream"),Ww=j6(),D6="The stream has already been transformed.",Jw=($)=>{var w,z;if(!($ instanceof W0.Readable))try{return Ww.sdkStreamMixin($)}catch(Q){let Y=((z=(w=$===null||$===void 0?void 0:$.__proto__)===null||w===void 0?void 0:w.constructor)===null||z===void 0?void 0:z.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${Y}`)}let L=!1,Z=async()=>{if(L)throw new Error(D6);return L=!0,await Vw.streamCollector($)};return Object.assign($,{transformToByteArray:Z,transformToString:async(Q)=>{let Y=await Z();if(Q===void 0||Buffer.isEncoding(Q))return hw.fromArrayBuffer(Y.buffer,Y.byteOffset,Y.byteLength).toString(Q);else return new TextDecoder(Q).decode(Y)},transformToWebStream:()=>{if(L)throw new Error(D6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof W0.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return L=!0,W0.Readable.toWeb($)}})};v6.sdkStreamMixin=Jw});var N6=U((A6)=>{Object.defineProperty(A6,"__esModule",{value:!0});A6.splitStream=void 0;async function jw($){if(typeof $.stream==="function")$=$.stream();return $.tee()}A6.splitStream=jw});var S6=U((O6)=>{Object.defineProperty(O6,"__esModule",{value:!0});O6.splitStream=void 0;var I6=N("node:stream"),Dw=N6(),M6=k();async function vw($){if(M6.isReadableStream($)||M6.isBlob($))return Dw.splitStream($);let w=new I6.PassThrough,z=new I6.PassThrough;return $.pipe(w),$.pipe(z),[w,z]}O6.splitStream=vw});var f6=U((h8,b)=>{var{defineProperty:e,getOwnPropertyDescriptor:Cw,getOwnPropertyNames:Hw}=Object,Aw=Object.prototype.hasOwnProperty,D0=($,w)=>e($,"name",{value:w,configurable:!0}),Rw=($,w)=>{for(var z in w)e($,z,{get:w[z],enumerable:!0})},J0=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Hw(w))if(!Aw.call($,Z)&&Z!==z)e($,Z,{get:()=>w[Z],enumerable:!(L=Cw(w,Z))||L.enumerable})}return $},f=($,w,z)=>(J0($,w,"default"),z&&J0(z,w,"default")),Nw=($)=>J0(e({},"__esModule",{value:!0}),$),O={};Rw(O,{Uint8ArrayBlobAdapter:()=>j0});b.exports=Nw(O);var x6=P(),T6=n();function y6($,w="utf-8"){if(w==="base64")return x6.toBase64($);return T6.toUtf8($)}D0(y6,"transformToString");function k6($,w){if(w==="base64")return j0.mutate(x6.fromBase64($));return j0.mutate(T6.fromUtf8($))}D0(k6,"transformFromString");var j0=class $ extends Uint8Array{static{D0(this,"Uint8ArrayBlobAdapter")}static fromString(w,z="utf-8"){switch(typeof w){case"string":return k6(w,z);default:throw new Error(`Unsupported conversion from ${typeof w} to Uint8ArrayBlobAdapter.`)}}static mutate(w){return Object.setPrototypeOf(w,$.prototype),w}transformToString(w="utf-8"){return y6(this,w)}};f(O,F0(),b.exports);f(O,O1(),b.exports);f(O,u1(),b.exports);f(O,i1(),b.exports);f(O,r1(),b.exports);f(O,H6(),b.exports);f(O,S6(),b.exports);f(O,k(),b.exports)});var fw=U((W8,q6)=>{var{defineProperty:H0,getOwnPropertyDescriptor:Iw,getOwnPropertyNames:Mw}=Object,Ow=Object.prototype.hasOwnProperty,bw=($,w)=>{for(var z in w)H0($,z,{get:w[z],enumerable:!0})},Sw=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Mw(w))if(!Ow.call($,Z)&&Z!==z)H0($,Z,{get:()=>w[Z],enumerable:!(L=Iw(w,Z))||L.enumerable})}return $},xw=($)=>Sw(H0({},"__esModule",{value:!0}),$),E6={};bw(E6,{RequestBuilder:()=>c6,collectBody:()=>Tw,extendedEncodeURIComponent:()=>C0,requestBuilder:()=>kw,resolvedPath:()=>P6});q6.exports=xw(E6);var v0=f6(),Tw=async($=new Uint8Array,w)=>{if($ instanceof Uint8Array)return v0.Uint8ArrayBlobAdapter.mutate($);if(!$)return v0.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let z=w.streamCollector($);return v0.Uint8ArrayBlobAdapter.mutate(await z)};function C0($){return encodeURIComponent($).replace(/[!'()*]/g,function(w){return"%"+w.charCodeAt(0).toString(16).toUpperCase()})}var yw=l(),P6=($,w,z,L,Z,Q)=>{if(w!=null&&w[z]!==void 0){let Y=L();if(Y.length<=0)throw new Error("Empty value provided for input HTTP label: "+z+".");$=$.replace(Z,Q?Y.split("/").map((K)=>C0(K)).join("/"):C0(Y))}else throw new Error("No value provided for input HTTP label: "+z+".");return $};function kw($,w){return new c6($,w)}var c6=class{constructor($,w){this.input=$,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:$,protocol:w="https",port:z,path:L}=await this.context.endpoint();this.path=L;for(let Z of this.resolvePathStack)Z(this.path);return new yw.HttpRequest({protocol:w,hostname:this.hostname||$,port:z,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn($){return this.hostname=$,this}bp($){return this.resolvePathStack.push((w)=>{this.path=`${w?.endsWith("/")?w.slice(0,-1):w||""}`+$}),this}p($,w,z,L){return this.resolvePathStack.push((Z)=>{this.path=P6(Z,this.input,$,w,z,L)}),this}h($){return this.headers=$,this}q($){return this.query=$,this}b($){return this.body=$,this}m($){return this.method=$,this}}});
|
|
10
|
-
export{l as
|
|
10
|
+
export{l as xc,t0 as yc,g as zc,n as Ac,P as Bc,x0 as Cc,m0 as Dc,F6 as Ec,f6 as Fc,fw as Gc};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ic as E,Oc as m}from"./chunk-7qshr3j6.js";import"./chunk-adkpvcss.js";import{Uc as O,Wc as Q}from"./chunk-hc21eaj7.js";import{Zc as j}from"./chunk-t1zcfas5.js";import{_c as k,dd as C}from"./chunk-yfn5e0ky.js";var $=k(j(),1);var T=k(j(),1);var U=(y,w,_)=>{let I={EcsContainer:async(b)=>{let{fromHttp:x}=await import("./chunk-d8m7se01.js"),{fromContainerMetadata:A}=await import("./chunk-cqn8te7s.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>Q(x(b??{}),A(b))().then(R)},Ec2InstanceMetadata:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:x}=await import("./chunk-cqn8te7s.js");return async()=>x(b)().then(R)},Environment:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:x}=await import("./chunk-x63gk2p6.js");return async()=>x(b)().then(R)}};if(y in I)return I[y];else throw new O(`Unsupported credential source in profile ${w}. Got ${y}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:_})},R=(y)=>T.setCredentialFeature(y,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var W=(y,{profile:w="default",logger:_}={})=>{return Boolean(y)&&typeof y==="object"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1&&["undefined","string"].indexOf(typeof y.external_id)>-1&&["undefined","string"].indexOf(typeof y.mfa_serial)>-1&&(P(y,{profile:w,logger:_})||N(y,{profile:w,logger:_}))},P=(y,{profile:w,logger:_})=>{let I=typeof y.source_profile==="string"&&typeof y.credential_source==="undefined";if(I)_?.debug?.(` ${w} isAssumeRoleWithSourceProfile source_profile=${y.source_profile}`);return I},N=(y,{profile:w,logger:_})=>{let I=typeof y.credential_source==="string"&&typeof y.source_profile==="undefined";if(I)_?.debug?.(` ${w} isCredentialSourceProfile credential_source=${y.credential_source}`);return I},X=async(y,w,_,I={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let b=w[y],{source_profile:x,region:A}=b;if(!_.roleAssumer){let{getDefaultRoleAssumer:K}=await import("./chunk-xf3x08tz.js");_.roleAssumer=K({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:{..._?.parentClientConfig,region:A??_?.parentClientConfig?.region}},_.clientPlugins)}if(x&&x in I)throw new O(`Detected a cycle attempting to resolve credentials for profile ${E(_)}. Profiles visited: `+Object.keys(I).join(", "),{logger:_.logger});_.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${x?`source_profile=[${x}]`:`profile=[${y}]`}`);let J=x?L(x,w,_,{...I,[x]:!0},V(w[x]??{})):(await U(b.credential_source,y,_.logger)(_))();if(V(b))return J.then((K)=>$.setCredentialFeature(K,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let K={RoleArn:b.role_arn,RoleSessionName:b.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:b.external_id,DurationSeconds:parseInt(b.duration_seconds||"3600",10)},{mfa_serial:B}=b;if(B){if(!_.mfaCodeProvider)throw new O(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});K.SerialNumber=B,K.TokenCode=await _.mfaCodeProvider(B)}let u=await J;return _.roleAssumer(u,K).then((v)=>$.setCredentialFeature(v,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},V=(y)=>{return!y.role_arn&&!!y.credential_source};var Y=k(j(),1),Z=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",H=async(y,w)=>import("./chunk-38tjpppq.js").then(({fromProcess:_})=>_({...y,profile:w})().then((I)=>Y.setCredentialFeature(I,"CREDENTIALS_PROFILE_PROCESS","v")));var q=k(j(),1),c=async(y,w,_={})=>{let{fromSSO:I}=await import("./chunk-tgjbbxam.js");return I({profile:y,logger:_.logger,parentClientConfig:_.parentClientConfig,clientConfig:_.clientConfig})().then((b)=>{if(w.sso_session)return q.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO","r");else return q.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},S=(y)=>y&&(typeof y.sso_start_url==="string"||typeof y.sso_account_id==="string"||typeof y.sso_session==="string"||typeof y.sso_region==="string"||typeof y.sso_role_name==="string");var F=k(j(),1),z=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.aws_access_key_id==="string"&&typeof y.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof y.aws_session_token)>-1&&["undefined","string"].indexOf(typeof y.aws_account_id)>-1,G=async(y,w)=>{w?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let _={accessKeyId:y.aws_access_key_id,secretAccessKey:y.aws_secret_access_key,sessionToken:y.aws_session_token,...y.aws_credential_scope&&{credentialScope:y.aws_credential_scope},...y.aws_account_id&&{accountId:y.aws_account_id}};return F.setCredentialFeature(_,"CREDENTIALS_PROFILE","n")};var M=k(j(),1),h=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.web_identity_token_file==="string"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1,D=async(y,w)=>import("./chunk-fbvjqk5b.js").then(({fromTokenFile:_})=>_({webIdentityTokenFile:y.web_identity_token_file,roleArn:y.role_arn,roleSessionName:y.role_session_name,roleAssumerWithWebIdentity:w.roleAssumerWithWebIdentity,logger:w.logger,parentClientConfig:w.parentClientConfig})().then((I)=>M.setCredentialFeature(I,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var L=async(y,w,_,I={},b=!1)=>{let x=w[y];if(Object.keys(I).length>0&&z(x))return G(x,_);if(b||W(x,{profile:y,logger:_.logger}))return X(y,w,_,I);if(z(x))return G(x,_);if(h(x))return D(x,_);if(Z(x))return H(_,y);if(S(x))return await c(y,x,_);throw new O(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var Cy=(y={})=>async({callerClientConfig:w}={})=>{let _={...y,parentClientConfig:{...w,...y.parentClientConfig}};_.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let I=await m(_);return L(E({profile:y.profile??w?.profile}),I,_)};export{Cy as fromIni};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ad as X}from"./chunk-yfn5e0ky.js";var M=X((N,T)=>{var{defineProperty:B,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z}=Object,$=Object.prototype.hasOwnProperty,H=(b,j)=>B(b,"name",{value:j,configurable:!0}),A=(b,j)=>{for(var q in j)B(b,q,{get:j[q],enumerable:!0})},D=(b,j,q,K)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let z of Z(j))if(!$.call(b,z)&&z!==q)B(b,z,{get:()=>j[z],enumerable:!(K=Y(j,z))||K.enumerable})}return b},E=(b)=>D(B({},"__esModule",{value:!0}),b),L={};A(L,{emitWarningIfUnsupportedVersion:()=>I,setCredentialFeature:()=>Q,setFeature:()=>R,state:()=>G});T.exports=E(L);var G={warningEmitted:!1},I=H((b)=>{if(b&&!G.warningEmitted&&parseInt(b.substring(1,b.indexOf(".")))<18)G.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
2
2
|
no longer support Node.js 16.x on January 6, 2025.
|
|
3
3
|
|
|
4
4
|
To continue receiving updates to AWS services, bug fixes, and security
|
|
5
5
|
updates please upgrade to a supported Node.js LTS version.
|
|
6
6
|
|
|
7
7
|
More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");function Q(b,j,q){if(!b.$source)b.$source={};return b.$source[j]=q,b}H(Q,"setCredentialFeature");function R(b,j,q){if(!b.__aws_sdk_context)b.__aws_sdk_context={features:{}};else if(!b.__aws_sdk_context.features)b.__aws_sdk_context.features={};b.__aws_sdk_context.features[j]=q}H(R,"setFeature")});
|
|
8
|
-
export{M as
|
|
8
|
+
export{M as Zc};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{G as D,i as C}from"./chunk-
|
|
2
|
+
import{G as D,i as C}from"./chunk-5tcm3e40.js";import"./chunk-yfn5e0ky.js";class E{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:(c)=>this.replacement=c}}replace(c,r,f,s){if(c&&r)if(f!=null)c[r][f]=s;else c[r]=s}remove(c,r,f){if(c&&r)if(f!==null&&f!==void 0)c[r].splice(f,1);else delete c[r]}}class w extends E{constructor(c,r){super();this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:(f)=>this.replacement=f},this.enter=c,this.leave=r}visit(c,r,f,s){if(c){if(this.enter){let i=this.should_skip,I=this.should_remove,l=this.replacement;if(this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,c,r,f,s),this.replacement)c=this.replacement,this.replace(r,f,s,c);if(this.should_remove)this.remove(r,f,s);let t=this.should_skip,m=this.should_remove;if(this.should_skip=i,this.should_remove=I,this.replacement=l,t)return c;if(m)return null}let a;for(a in c){let i=c[a];if(i&&typeof i==="object"){if(Array.isArray(i)){let I=i;for(let l=0;l<I.length;l+=1){let t=I[l];if(e(t)){if(!this.visit(t,c,a,l))l--}}}else if(e(i))this.visit(i,c,a,null)}}if(this.leave){let i=this.replacement,I=this.should_remove;if(this.replacement=null,this.should_remove=!1,this.leave.call(this.context,c,r,f,s),this.replacement)c=this.replacement,this.replace(r,f,s,c);if(this.should_remove)this.remove(r,f,s);let l=this.should_remove;if(this.replacement=i,this.should_remove=I,l)return null}}return c}}function e(c){return c!==null&&typeof c==="object"&&"type"in c&&typeof c.type==="string"}function b(c,{enter:r,leave:f}){return new w(r,f).visit(c,null)}async function G(c,r,f){let s=D(c),a=await r.getImportMap(),i=[],I=f?.autoImport!==!1,l=f?.transformVirtualImports!==!1&&r.options.virtualImports?.length;if(I||l){let t=C(s.original,{sourceType:"module",ecmaVersion:"latest",locations:!0}),m=y(a,r.options.virtualImports),u=V(t,l?m.walk:{});if(I){let S=u.unmatched;i.push(...Array.from(S).map((g)=>{let h=a.get(g);if(h&&!h.disabled)return h;return null}).filter(Boolean));for(let g of r.addons)i=await g.matchImports?.call(r,S,i)||i}m.ranges.forEach(([S,g])=>{s.remove(S,g)}),i.push(...m.imports)}return{s,strippedCode:c.toString(),matchedImports:i,isCJSContext:!1,firstOccurrence:0}}function V(c,r){let f=[],s=void 0,a=[];function i(t){s={node:t,parent:s,declarations:new Set,references:new Set},f.push(s),a.push(s)}function I(t){if(a.pop()?.node!==t)throw new Error("Scope mismatch");s=a[a.length-1]}i(void 0),b(c,{enter(t,m,u,S){switch(r?.enter?.call(this,t,m,u,S),t.type){case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":s.declarations.add(t.local.name);return;case"FunctionDeclaration":case"ClassDeclaration":if(t.id)s.declarations.add(t.id.name);return;case"VariableDeclarator":if(t.id.type==="Identifier")s.declarations.add(t.id.name);else b(t.id,{enter(g){if(g.type==="ObjectPattern")g.properties.forEach((h)=>{if(h.type==="Property"&&h.value.type==="Identifier")s.declarations.add(h.value.name);else if(h.type==="RestElement"&&h.argument.type==="Identifier")s.declarations.add(h.argument.name)});else if(g.type==="ArrayPattern")g.elements.forEach((h)=>{if(h?.type==="Identifier")s.declarations.add(h.name);if(h?.type==="RestElement"&&h.argument.type==="Identifier")s.declarations.add(h.argument.name)})}});return;case"BlockStatement":i(t);return;case"Identifier":switch(m?.type){case"CallExpression":if(m.callee===t||m.arguments.includes(t))s.references.add(t.name);return;case"MemberExpression":if(m.object===t)s.references.add(t.name);return;case"VariableDeclarator":if(m.init===t)s.references.add(t.name);return;case"SpreadElement":if(m.argument===t)s.references.add(t.name);return;case"ClassDeclaration":if(m.superClass===t)s.references.add(t.name);return;case"Property":if(m.value===t)s.references.add(t.name);return;case"TemplateLiteral":if(m.expressions.includes(t))s.references.add(t.name);return;case"AssignmentExpression":if(m.right===t)s.references.add(t.name);return;case"IfStatement":case"WhileStatement":case"DoWhileStatement":if(m.test===t)s.references.add(t.name);return;case"SwitchStatement":if(m.discriminant===t)s.references.add(t.name);return}if(m?.type.includes("Expression"))s.references.add(t.name)}},leave(t,m,u,S){switch(r?.leave?.call(this,t,m,u,S),t.type){case"BlockStatement":I(t)}}});let l=new Set;for(let t of f)for(let m of t.references){let u=!1,S=t;while(S){if(S.declarations.has(m)){u=!0;break}S=S?.parent}if(!u)l.add(m)}return{unmatched:l,scopes:f}}function y(c,r=[]){let f=[],s=[];return{imports:f,ranges:s,walk:{enter(a){if(a.type==="ImportDeclaration"){if(r.includes(a.source.value))s.push([a.start,a.end]),a.specifiers.forEach((i)=>{if(i.type==="ImportSpecifier"&&i.imported.type==="Identifier"){let I=c.get(i.imported.name);if(!I)throw new Error(`[unimport] failed to find "${i.imported.name}" imported from "${a.source.value}"`);f.push({from:I.from,name:I.name,as:i.local.name})}})}}}}}export{V as traveseScopes,G as detectImportsAcorn,y as createVirtualImportsAcronWalker};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ic as C,Jc as q,Kc as N,Nc as I,Oc as R}from"./chunk-7qshr3j6.js";import"./chunk-adkpvcss.js";import{Uc as a,Vc as m}from"./chunk-hc21eaj7.js";import{Zc as Y}from"./chunk-t1zcfas5.js";import{_c as O,dd as A}from"./chunk-yfn5e0ky.js";var K=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var D=O(Y(),1);var b=300000,u="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var H=async(e,s={})=>{let{SSOOIDCClient:o}=await import("./chunk-bt8w5dcz.js");return new o(Object.assign({},s.clientConfig??{},{region:e??s.clientConfig?.region,logger:s.clientConfig?.logger??s.parentClientConfig?.logger}))};var U=async(e,s,o={})=>{let{CreateTokenCommand:i}=await import("./chunk-bt8w5dcz.js");return(await H(s,o)).send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var P=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new m(`Token is expired. ${u}`,!1)};var w=(e,s,o=!1)=>{if(typeof s==="undefined")throw new m(`Value not present for '${e}' in SSO Token${o?". Cannot refresh":""}. ${u}`,!1)};import{promises as J}from"node:fs";var{writeFile:V}=J,W=(e,s)=>{let o=q(e),i=JSON.stringify(s,null,2);return V(o,i)};var j=new Date(0),X=(e={})=>async({callerClientConfig:s}={})=>{let o={...e,parentClientConfig:{...s,...e.parentClientConfig}};o.logger?.debug("@aws-sdk/token-providers - fromSso");let i=await R(o),r=C({profile:o.profile??s?.profile}),p=i[r];if(!p)throw new m(`Profile '${r}' could not be found in shared credentials file.`,!1);else if(!p.sso_session)throw new m(`Profile '${r}' is missing required property 'sso_session'.`);let c=p.sso_session,l=(await I(o))[c];if(!l)throw new m(`Sso session '${c}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!l[n])throw new m(`Sso session '${c}' is missing required property '${n}'.`,!1);let{sso_start_url:d,sso_region:t}=l,f;try{f=await N(c)}catch(n){throw new m(`The SSO session token associated with profile=${r} was not found or is invalid. ${u}`,!1)}w("accessToken",f.accessToken),w("expiresAt",f.expiresAt);let{accessToken:k,expiresAt:T}=f,S={token:k,expiration:new Date(T)};if(S.expiration.getTime()-Date.now()>b)return S;if(Date.now()-j.getTime()<30000)return P(S),S;w("clientId",f.clientId,!0),w("clientSecret",f.clientSecret,!0),w("refreshToken",f.refreshToken,!0);try{j.setTime(Date.now());let n=await U(f,t,o);w("accessToken",n.accessToken),w("expiresIn",n.expiresIn);let h=new Date(Date.now()+n.expiresIn*1000);try{await W(c,{...f,accessToken:n.accessToken,expiresAt:h.toISOString(),refreshToken:n.refreshToken})}catch(g){}return{token:n.accessToken,expiration:h}}catch(n){return P(S),S}};var E=!1,$=async({ssoStartUrl:e,ssoSession:s,ssoAccountId:o,ssoRegion:i,ssoRoleName:r,ssoClient:p,clientConfig:c,parentClientConfig:x,profile:l,logger:d})=>{let t,f="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{let _=await X({profile:l})();t={accessToken:_.token,expiresAt:new Date(_.expiration).toISOString()}}catch(_){throw new a(_.message,{tryNextLink:E,logger:d})}else try{t=await N(e)}catch(_){throw new a("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:E,logger:d})}if(new Date(t.expiresAt).getTime()-Date.now()<=0)throw new a("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:E,logger:d});let{accessToken:k}=t,{SSOClient:T,GetRoleCredentialsCommand:S}=await import("./chunk-ejjg44ge.js"),n=p||new T(Object.assign({},c??{},{logger:c?.logger??x?.logger,region:c?.region??i})),h;try{h=await n.send(new S({accountId:o,roleName:r,accessToken:k}))}catch(_){throw new a(_,{tryNextLink:E,logger:d})}let{roleCredentials:{accessKeyId:g,secretAccessKey:y,sessionToken:F,expiration:L,credentialScope:M,accountId:G}={}}=h;if(!g||!y||!F||!L)throw new a("SSO returns an invalid temporary credential.",{tryNextLink:E,logger:d});let v={accessKeyId:g,secretAccessKey:y,sessionToken:F,expiration:new Date(L),...M&&{credentialScope:M},...G&&{accountId:G}};if(s)D.setCredentialFeature(v,"CREDENTIALS_SSO","s");else D.setCredentialFeature(v,"CREDENTIALS_SSO_LEGACY","u");return v};var z=(e,s)=>{let{sso_start_url:o,sso_account_id:i,sso_region:r,sso_role_name:p}=e;if(!o||!i||!r||!p)throw new a(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}
|
|
3
|
+
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:s});return e};var ve=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:o,ssoAccountId:i,ssoRegion:r,ssoRoleName:p,ssoSession:c}=e,{ssoClient:x}=e,l=C({profile:e.profile??s?.profile});if(!o&&!i&&!r&&!p&&!c){let t=(await R(e))[l];if(!t)throw new a(`Profile ${l} was not found.`,{logger:e.logger});if(!K(t))throw new a(`Profile ${l} is not configured with SSO credentials.`,{logger:e.logger});if(t?.sso_session){let g=(await I(e))[t.sso_session],y=` configurations in profile ${l} and sso-session ${t.sso_session}`;if(r&&r!==g.sso_region)throw new a("Conflicting SSO region"+y,{tryNextLink:!1,logger:e.logger});if(o&&o!==g.sso_start_url)throw new a("Conflicting SSO start_url"+y,{tryNextLink:!1,logger:e.logger});t.sso_region=g.sso_region,t.sso_start_url=g.sso_start_url}let{sso_start_url:f,sso_account_id:k,sso_region:T,sso_role_name:S,sso_session:n}=z(t,e.logger);return $({ssoStartUrl:f,ssoSession:n,ssoAccountId:k,ssoRegion:T,ssoRoleName:S,ssoClient:x,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:l})}else if(!o||!i||!r||!p)throw new a('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return $({ssoStartUrl:o,ssoSession:c,ssoAccountId:i,ssoRegion:r,ssoRoleName:p,ssoClient:x,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:l})};export{z as validateSsoProfile,K as isSsoProfile,ve as fromSSO};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Uc as _}from"./chunk-hc21eaj7.js";import{Zc as A}from"./chunk-t1zcfas5.js";import{_c as p}from"./chunk-yfn5e0ky.js";var S=p(A(),1);var C="AWS_ACCESS_KEY_ID",N="AWS_SECRET_ACCESS_KEY",a="AWS_SESSION_TOKEN",i="AWS_CREDENTIAL_EXPIRATION",I="AWS_CREDENTIAL_SCOPE",d="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[C],r=process.env[N],n=process.env[a],s=process.env[i],t=process.env[I],E=process.env[d];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new _("Unable to find environment variable credentials.",{logger:e?.logger})};export{T as fromEnv,a as ENV_SESSION,N as ENV_SECRET,C as ENV_KEY,i as ENV_EXPIRATION,I as ENV_CREDENTIAL_SCOPE,d as ENV_ACCOUNT_ID};export{C as Qc,N as Rc,T as Sc};
|