@stacksjs/buddy 0.64.5 → 0.64.6
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-1nyept5d.js +5 -0
- package/dist/{chunk-kkb03h19.js.map → chunk-1nyept5d.js.map} +2 -2
- package/dist/chunk-3472npd1.js +19 -0
- package/dist/{chunk-p9n9dek4.js.map → chunk-3472npd1.js.map} +12 -26
- package/dist/{chunk-89jmvbwz.js → chunk-34xxhapv.js} +3 -3
- package/dist/{chunk-89jmvbwz.js.map → chunk-34xxhapv.js.map} +1 -1
- package/dist/chunk-3y8aq9qa.js +8 -0
- package/dist/chunk-3y8aq9qa.js.map +65 -0
- package/dist/chunk-44mrj8pm.js +5 -0
- package/dist/{chunk-6qhap62a.js.map → chunk-44mrj8pm.js.map} +2 -2
- package/dist/chunk-8adez9b9.js +5 -0
- package/dist/chunk-8adez9b9.js.map +10 -0
- package/dist/chunk-b685jsh2.js +5 -0
- package/dist/{chunk-6a30kt0n.js.map → chunk-b685jsh2.js.map} +2 -2
- package/dist/chunk-been0qrs.js +5 -0
- package/dist/{chunk-pe71p33y.js.map → chunk-been0qrs.js.map} +5 -5
- package/dist/chunk-dnr3cyf7.js +7 -0
- package/dist/{chunk-s03s5x4g.js.map → chunk-dnr3cyf7.js.map} +2 -2
- package/dist/{chunk-b6hb11ta.js → chunk-e9xdp71t.js} +3 -3
- package/dist/{chunk-b6hb11ta.js.map → chunk-e9xdp71t.js.map} +1 -1
- package/dist/chunk-ebp27f3t.js +5 -0
- package/dist/{chunk-qkk1z4t3.js.map → chunk-ebp27f3t.js.map} +2 -2
- package/dist/chunk-een41wce.js +5 -0
- package/dist/{chunk-0aqj22dq.js.map → chunk-een41wce.js.map} +6 -6
- package/dist/chunk-gsnfg0v2.js +9 -0
- package/dist/{chunk-9f43d1kt.js.map → chunk-gsnfg0v2.js.map} +2 -2
- package/dist/chunk-kkckr1p6.js +5 -0
- package/dist/{chunk-4b0aba5k.js.map → chunk-kkckr1p6.js.map} +2 -2
- package/dist/chunk-pq8pr524.js +5 -0
- package/dist/{chunk-953dm442.js.map → chunk-pq8pr524.js.map} +5 -5
- package/dist/chunk-qrw0tzf0.js +5 -0
- package/dist/{chunk-gc8bvwm2.js.map → chunk-qrw0tzf0.js.map} +2 -2
- package/dist/chunk-v7d1bf8z.js +12 -0
- package/dist/{chunk-knp3sj60.js.map → chunk-v7d1bf8z.js.map} +5 -5
- package/dist/chunk-ygxh9jsp.js +5 -0
- package/dist/{chunk-yxrf386g.js.map → chunk-ygxh9jsp.js.map} +5 -5
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/stacks +0 -0
- package/package.json +1 -1
- package/dist/chunk-0aqj22dq.js +0 -5
- package/dist/chunk-4b0aba5k.js +0 -5
- package/dist/chunk-5eg9jpdw.js +0 -4
- package/dist/chunk-5eg9jpdw.js.map +0 -15
- package/dist/chunk-6a30kt0n.js +0 -5
- package/dist/chunk-6qhap62a.js +0 -5
- package/dist/chunk-953dm442.js +0 -5
- package/dist/chunk-9f43d1kt.js +0 -9
- package/dist/chunk-a365bfhw.js +0 -6
- package/dist/chunk-a365bfhw.js.map +0 -56
- package/dist/chunk-gc8bvwm2.js +0 -5
- package/dist/chunk-kkb03h19.js +0 -5
- package/dist/chunk-knp3sj60.js +0 -12
- package/dist/chunk-p9n9dek4.js +0 -21
- package/dist/chunk-pe71p33y.js +0 -5
- package/dist/chunk-qkk1z4t3.js +0 -5
- package/dist/chunk-s03s5x4g.js +0 -7
- package/dist/chunk-yxrf386g.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{N as x}from"./chunk-wmfxrbxe.js";import{
|
|
1
|
+
import{N as x}from"./chunk-wmfxrbxe.js";import{ib as S}from"./chunk-e9xdp71t.js";var q="AWS_PROFILE";var B=(o)=>o.profile||process.env.AWS_PROFILE||"default";import{join as b}from"path";import{homedir as N}from"os";import{sep as L}from"path";var d={},w=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},f=()=>{const{HOME:o,USERPROFILE:e,HOMEPATH:t,HOMEDRIVE:r=`C:${L}`}=process.env;if(o)return o;if(e)return e;if(t)return`${r}${t}`;const i=w();if(!d[i])d[i]=N();return d[i]};var v="AWS_CONFIG_FILE",g=()=>process.env[v]||b(f(),".aws","config");var D=x(S(),1);import{join as I}from"path";var h=x(S(),1);var O=(o)=>Object.entries(o).filter(([e])=>{const t=e.indexOf(c);if(t===-1)return!1;return Object.values(h.IniSectionType).includes(e.substring(0,t))}).reduce((e,[t,r])=>{const i=t.indexOf(c),s=t.substring(0,i)===h.IniSectionType.PROFILE?t.substring(i+1):t;return e[s]=r,e},{...o.default&&{default:o.default}});import{join as j}from"path";var y="AWS_SHARED_CREDENTIALS_FILE",_=()=>process.env[y]||j(f(),".aws","credentials");var C=x(S(),1);var $=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,G=["__proto__","profile __proto__"],a=(o)=>{const e={};let t,r;for(let i of o.split(/\r?\n/)){const s=i.split(/(^|\s)[;#]/)[0].trim();if(s[0]==="["&&s[s.length-1]==="]"){t=void 0,r=void 0;const n=s.substring(1,s.length-1),m=$.exec(n);if(m){const[,p,,F]=m;if(Object.values(C.IniSectionType).includes(p))t=[p,F].join(c)}else t=n;if(G.includes(n))throw new Error(`Found invalid profile name "${n}"`)}else if(t){const n=s.indexOf("=");if(![0,-1].includes(n)){const[m,p]=[s.substring(0,n).trim(),s.substring(n+1).trim()];if(p==="")r=m;else{if(r&&i.trimStart()===i)r=void 0;e[t]=e[t]||{};const F=r?[r,m].join(c):m;e[t][F]=p}}}}return e};import{promises as W}from"fs";var{readFile:K}=W,E={},l=(o,e)=>{if(!E[o]||e?.ignoreCache)E[o]=K(o,"utf8");return E[o]};var P=()=>({}),c=".",R=async(o={})=>{const{filepath:e=_(),configFilepath:t=g()}=o,r=f();let s=e;if(e.startsWith("~/"))s=I(r,e.slice(2));let u=t;if(t.startsWith("~/"))u=I(r,t.slice(2));const n=await Promise.all([l(u,{ignoreCache:o.ignoreCache}).then(a).then(O).catch(P),l(s,{ignoreCache:o.ignoreCache}).then(a).catch(P)]);return{configFile:n[0],credentialsFile:n[1]}};var T=(o)=>Object.entries(o).filter(([e])=>e.startsWith(D.IniSectionType.SSO_SESSION+c)).reduce((e,[t,r])=>({...e,[t.substring(t.indexOf(c)+1)]:r}),{});var V=()=>({}),Pe=async(o={})=>l(o.configFilepath??g()).then(a).then(T).catch(V);var A=(...o)=>{const e={};for(let t of o)for(let[r,i]of Object.entries(t))if(e[r]!==void 0)Object.assign(e[r],i);else e[r]=i;return e};var He=async(o)=>{const e=await R(o);return A(e.configFile,e.credentialsFile)};import{createHash as U}from"crypto";import{join as X}from"path";var H=(o)=>{const t=U("sha1").update(o).digest("hex");return X(f(),".aws","sso","cache",`${t}.json`)};import{promises as k}from"fs";var{readFile:M}=k,$e=async(o)=>{const e=H(o),t=await M(e,"utf8");return JSON.parse(t)};export{q as nb,B as ob,H as pb,$e as qb,c as rb,R as sb,Pe as tb,He as ub};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# debugId=C091FCE6F670C8CE64756E2164756E21
|
|
4
|
+
//# sourceMappingURL=chunk-34xxhapv.js.map
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"import { promises as fsPromises } from \"fs\";\nimport { getSSOTokenFilepath } from \"./getSSOTokenFilepath\";\nconst { readFile } = fsPromises;\nexport const getSSOTokenFromFile = async (id) => {\n const ssoTokenFilepath = getSSOTokenFilepath(id);\n const ssoTokenText = await readFile(ssoTokenFilepath, \"utf8\");\n return JSON.parse(ssoTokenText);\n};\n"
|
|
19
19
|
],
|
|
20
20
|
"mappings": "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",
|
|
21
|
-
"debugId": "
|
|
21
|
+
"debugId": "C091FCE6F670C8CE64756E2164756E21",
|
|
22
22
|
"names": []
|
|
23
23
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{N as K,O as D}from"./chunk-wmfxrbxe.js";import{ib as H}from"./chunk-e9xdp71t.js";var un=D((Fr,Bn)=>{var{defineProperty:R,getOwnPropertyDescriptor:xf,getOwnPropertyNames:df}=Object,Ff=Object.prototype.hasOwnProperty,S=(n,t)=>R(n,"name",{value:t,configurable:!0}),Cf=(n,t)=>{for(var c in t)R(n,c,{get:t[c],enumerable:!0})},of=(n,t,c,f)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of df(t))if(!Ff.call(n,i)&&i!==c)R(n,i,{get:()=>t[i],enumerable:!(f=xf(t,i))||f.enumerable})}return n},Ef=(n)=>of(R({},"__esModule",{value:!0}),n),bn={};Cf(bn,{constructStack:()=>sn});Bn.exports=Ef(bn);var M=S((n,t)=>{const c=[];if(n)c.push(n);if(t)for(let f of t)c.push(f);return c},"getAllAliases"),V=S((n,t)=>{return`${n||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`},"getMiddlewareNameWithAliases"),sn=S(()=>{let n=[],t=[],c=!1;const f=new Set,i=S((w)=>w.sort((d,T)=>Jn[T.step]-Jn[d.step]||Wn[T.priority||"normal"]-Wn[d.priority||"normal"]),"sort"),h=S((w)=>{let d=!1;const T=S((E)=>{const y=M(E.name,E.aliases);if(y.includes(w)){d=!0;for(let C of y)f.delete(C);return!1}return!0},"filterCb");return n=n.filter(T),t=t.filter(T),d},"removeByName"),r=S((w)=>{let d=!1;const T=S((E)=>{if(E.middleware===w){d=!0;for(let y of M(E.name,E.aliases))f.delete(y);return!1}return!0},"filterCb");return n=n.filter(T),t=t.filter(T),d},"removeByReference"),s=S((w)=>{var d;return n.forEach((T)=>{w.add(T.middleware,{...T})}),t.forEach((T)=>{w.addRelativeTo(T.middleware,{...T})}),(d=w.identifyOnResolve)==null||d.call(w,o.identifyOnResolve()),w},"cloneTo"),$=S((w)=>{const d=[];return w.before.forEach((T)=>{if(T.before.length===0&&T.after.length===0)d.push(T);else d.push(...$(T))}),d.push(w),w.after.reverse().forEach((T)=>{if(T.before.length===0&&T.after.length===0)d.push(T);else d.push(...$(T))}),d},"expandRelativeMiddlewareList"),F=S((w=!1)=>{const d=[],T=[],E={};return n.forEach((C)=>{const u={...C,before:[],after:[]};for(let x of M(u.name,u.aliases))E[x]=u;d.push(u)}),t.forEach((C)=>{const u={...C,before:[],after:[]};for(let x of M(u.name,u.aliases))E[x]=u;T.push(u)}),T.forEach((C)=>{if(C.toMiddleware){const u=E[C.toMiddleware];if(u===void 0){if(w)return;throw new Error(`${C.toMiddleware} is not found when adding ${V(C.name,C.aliases)} middleware ${C.relation} ${C.toMiddleware}`)}if(C.relation==="after")u.after.push(C);if(C.relation==="before")u.before.push(C)}}),i(d).map($).reduce((C,u)=>{return C.push(...u),C},[])},"getMiddlewareList"),o={add:(w,d={})=>{const{name:T,override:E,aliases:y}=d,C={step:"initialize",priority:"normal",middleware:w,...d},u=M(T,y);if(u.length>0){if(u.some((x)=>f.has(x))){if(!E)throw new Error(`Duplicate middleware name '${V(T,y)}'`);for(let x of u){const I=n.findIndex((N)=>{var Z;return N.name===x||((Z=N.aliases)==null?void 0:Z.some((Q)=>Q===x))});if(I===-1)continue;const U=n[I];if(U.step!==C.step||C.priority!==U.priority)throw new Error(`"${V(U.name,U.aliases)}" middleware with ${U.priority} priority in ${U.step} step cannot be overridden by "${V(T,y)}" middleware with ${C.priority} priority in ${C.step} step.`);n.splice(I,1)}}for(let x of u)f.add(x)}n.push(C)},addRelativeTo:(w,d)=>{const{name:T,override:E,aliases:y}=d,C={middleware:w,...d},u=M(T,y);if(u.length>0){if(u.some((x)=>f.has(x))){if(!E)throw new Error(`Duplicate middleware name '${V(T,y)}'`);for(let x of u){const I=t.findIndex((N)=>{var Z;return N.name===x||((Z=N.aliases)==null?void 0:Z.some((Q)=>Q===x))});if(I===-1)continue;const U=t[I];if(U.toMiddleware!==C.toMiddleware||U.relation!==C.relation)throw new Error(`"${V(U.name,U.aliases)}" middleware ${U.relation} "${U.toMiddleware}" middleware cannot be overridden by "${V(T,y)}" middleware ${C.relation} "${C.toMiddleware}" middleware.`);t.splice(I,1)}}for(let x of u)f.add(x)}t.push(C)},clone:()=>s(sn()),use:(w)=>{w.applyToStack(o)},remove:(w)=>{if(typeof w==="string")return h(w);else return r(w)},removeByTag:(w)=>{let d=!1;const T=S((E)=>{const{tags:y,name:C,aliases:u}=E;if(y&&y.includes(w)){const x=M(C,u);for(let I of x)f.delete(I);return d=!0,!1}return!0},"filterCb");return n=n.filter(T),t=t.filter(T),d},concat:(w)=>{var d;const T=s(sn());return T.use(w),T.identifyOnResolve(c||T.identifyOnResolve()||(((d=w.identifyOnResolve)==null?void 0:d.call(w))??!1)),T},applyToStack:s,identify:()=>{return F(!0).map((w)=>{const d=w.step??w.relation+" "+w.toMiddleware;return V(w.name,w.aliases)+" - "+d})},identifyOnResolve(w){if(typeof w==="boolean")c=w;return c},resolve:(w,d)=>{for(let T of F().map((E)=>E.middleware).reverse())w=T(w,d);if(c)console.log(o.identify());return w}};return o},"constructStack"),Jn={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Wn={high:3,normal:2,low:1}});var qn=D((Nr,vn)=>{var{defineProperty:P,getOwnPropertyDescriptor:Uf,getOwnPropertyNames:Lf}=Object,Df=Object.prototype.hasOwnProperty,gf=(n,t)=>P(n,"name",{value:t,configurable:!0}),Nf=(n,t)=>{for(var c in t)P(n,c,{get:t[c],enumerable:!0})},Yf=(n,t,c,f)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of Lf(t))if(!Df.call(n,i)&&i!==c)P(n,i,{get:()=>t[i],enumerable:!(f=Uf(t,i))||f.enumerable})}return n},Sf=(n)=>Yf(P({},"__esModule",{value:!0}),n),pn={};Nf(pn,{isArrayBuffer:()=>ef});vn.exports=Sf(pn);var ef=gf((n)=>typeof ArrayBuffer==="function"&&n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]","isArrayBuffer")});var W=D((Yr,_n)=>{var{defineProperty:k,getOwnPropertyDescriptor:zf,getOwnPropertyNames:Zf}=Object,Vf=Object.prototype.hasOwnProperty,an=(n,t)=>k(n,"name",{value:t,configurable:!0}),Gf=(n,t)=>{for(var c in t)k(n,c,{get:t[c],enumerable:!0})},Qf=(n,t,c,f)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of Zf(t))if(!Vf.call(n,i)&&i!==c)k(n,i,{get:()=>t[i],enumerable:!(f=zf(t,i))||f.enumerable})}return n},Mf=(n)=>Qf(k({},"__esModule",{value:!0}),n),mn={};Gf(mn,{fromArrayBuffer:()=>Xf,fromString:()=>Af});_n.exports=Mf(mn);var Kf=qn(),wn=import.meta.require("buffer"),Xf=an((n,t=0,c=n.byteLength-t)=>{if(!Kf.isArrayBuffer(n))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof n} (${n})`);return wn.Buffer.from(n,t,c)},"fromArrayBuffer"),Af=an((n,t)=>{if(typeof n!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof n} (${n})`);return t?wn.Buffer.from(n,t):wn.Buffer.from(n)},"fromString")});var ct=D((nt)=>{Object.defineProperty(nt,"__esModule",{value:!0});nt.fromBase64=void 0;var Jf=W(),Wf=/^[A-Za-z0-9+/]*={0,2}$/,bf=(n)=>{if(n.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Wf.exec(n))throw new TypeError("Invalid base64 string.");const t=Jf.fromString(n,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};nt.fromBase64=bf});var l=D((er,rt)=>{var{defineProperty:O,getOwnPropertyDescriptor:Bf,getOwnPropertyNames:jf}=Object,Rf=Object.prototype.hasOwnProperty,$n=(n,t)=>O(n,"name",{value:t,configurable:!0}),Hf=(n,t)=>{for(var c in t)O(n,c,{get:t[c],enumerable:!0})},Pf=(n,t,c,f)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of jf(t))if(!Rf.call(n,i)&&i!==c)O(n,i,{get:()=>t[i],enumerable:!(f=Bf(t,i))||f.enumerable})}return n},kf=(n)=>Pf(O({},"__esModule",{value:!0}),n),ft={};Hf(ft,{fromUtf8:()=>ht,toUint8Array:()=>Of,toUtf8:()=>lf});rt.exports=kf(ft);var it=W(),ht=$n((n)=>{const t=it.fromString(n,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Of=$n((n)=>{if(typeof n==="string")return ht(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(n)},"toUint8Array"),lf=$n((n)=>{if(typeof n==="string")return n;if(typeof n!=="object"||typeof n.byteOffset!=="number"||typeof n.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return it.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("utf8")},"toUtf8")});var wt=D((st)=>{Object.defineProperty(st,"__esModule",{value:!0});st.toBase64=void 0;var pf=W(),vf=l(),qf=(n)=>{let t;if(typeof n==="string")t=vf.fromUtf8(n);else t=n;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return pf.fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength).toString("base64")};st.toBase64=qf});var v=D((Zr,p)=>{var{defineProperty:$t,getOwnPropertyDescriptor:af,getOwnPropertyNames:mf}=Object,_f=Object.prototype.hasOwnProperty,Tn=(n,t,c,f)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of mf(t))if(!_f.call(n,i)&&i!==c)$t(n,i,{get:()=>t[i],enumerable:!(f=af(t,i))||f.enumerable})}return n},Tt=(n,t,c)=>(Tn(n,t,"default"),c&&Tn(c,t,"default")),ni=(n)=>Tn($t({},"__esModule",{value:!0}),n),xn={};p.exports=ni(xn);Tt(xn,ct(),p.exports);Tt(xn,wt(),p.exports)});var Ft=D((xt)=>{Object.defineProperty(xt,"__esModule",{value:!0});xt.getAwsChunkedEncodingStream=void 0;var ti=import.meta.require("stream"),ci=(n,t)=>{const{base64Encoder:c,bodyLengthChecker:f,checksumAlgorithmFn:i,checksumLocationName:h,streamHasher:r}=t,s=c!==void 0&&i!==void 0&&h!==void 0&&r!==void 0,$=s?r(i,n):void 0,F=new ti.Readable({read:()=>{}});return n.on("data",(o)=>{const w=f(o)||0;F.push(`${w.toString(16)}\r\n`),F.push(o),F.push("\r\n")}),n.on("end",async()=>{if(F.push("0\r\n"),s){const o=c(await $);F.push(`${h}:${o}\r\n`),F.push("\r\n")}F.push(null)}),F};xt.getAwsChunkedEncodingStream=ci});var dn=D((Gr,gt)=>{function Ut(n){return Object.keys(n).reduce((t,c)=>{const f=n[c];return{...t,[c]:Array.isArray(f)?[...f]:f}},{})}function Dt(n){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(n)}var{defineProperty:q,getOwnPropertyDescriptor:fi,getOwnPropertyNames:ii}=Object,hi=Object.prototype.hasOwnProperty,G=(n,t)=>q(n,"name",{value:t,configurable:!0}),ri=(n,t)=>{for(var c in t)q(n,c,{get:t[c],enumerable:!0})},si=(n,t,c,f)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of ii(t))if(!hi.call(n,i)&&i!==c)q(n,i,{get:()=>t[i],enumerable:!(f=fi(t,i))||f.enumerable})}return n},ui=(n)=>si(q({},"__esModule",{value:!0}),n),Ct={};ri(Ct,{Field:()=>Ti,Fields:()=>xi,HttpRequest:()=>di,HttpResponse:()=>Fi,IHttpRequest:()=>ot.HttpRequest,getHttpHandlerExtensionConfiguration:()=>wi,isValidHostname:()=>Dt,resolveHttpHandlerRuntimeConfig:()=>$i});gt.exports=ui(Ct);var wi=G((n)=>{let t=n.httpHandler;return{setHttpHandler(c){t=c},httpHandler(){return t},updateHttpClientConfig(c,f){t.updateHttpClientConfig(c,f)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),$i=G((n)=>{return{httpHandler:n.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),ot=H(),Et=class n{constructor({name:t,kind:c=ot.FieldPosition.HEADER,values:f=[]}){this.name=t,this.kind=c,this.values=f}add(t){this.values.push(t)}set(t){this.values=t}remove(t){this.values=this.values.filter((c)=>c!==t)}toString(){return this.values.map((t)=>t.includes(",")||t.includes(" ")?`"${t}"`:t).join(", ")}get(){return this.values}};G(Et,"Field");var Ti=Et,yt=class n{constructor({fields:t=[],encoding:c="utf-8"}){this.entries={},t.forEach(this.setField.bind(this)),this.encoding=c}setField(t){this.entries[t.name.toLowerCase()]=t}getField(t){return this.entries[t.toLowerCase()]}removeField(t){delete this.entries[t.toLowerCase()]}getByType(t){return Object.values(this.entries).filter((c)=>c.kind===t)}};G(yt,"Fields");var xi=yt,It=class n{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const c=new n({...t,headers:{...t.headers}});if(c.query)c.query=Ut(c.query);return c}static isInstance(t){if(!t)return!1;const c=t;return"method"in c&&"protocol"in c&&"hostname"in c&&"path"in c&&typeof c.query==="object"&&typeof c.headers==="object"}clone(){return n.clone(this)}};G(It,"HttpRequest");var di=It;G(Ut,"cloneQuery");var Lt=class n{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const c=t;return typeof c.statusCode==="number"&&typeof c.headers==="object"}};G(Lt,"HttpResponse");var Fi=Lt;G(Dt,"isValidHostname")});var Cn=D((Qr,St)=>{var{defineProperty:a,getOwnPropertyDescriptor:Ci,getOwnPropertyNames:oi}=Object,Ei=Object.prototype.hasOwnProperty,Fn=(n,t)=>a(n,"name",{value:t,configurable:!0}),yi=(n,t)=>{for(var c in t)a(n,c,{get:t[c],enumerable:!0})},Ii=(n,t,c,f)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of oi(t))if(!Ei.call(n,i)&&i!==c)a(n,i,{get:()=>t[i],enumerable:!(f=Ci(t,i))||f.enumerable})}return n},Ui=(n)=>Ii(a({},"__esModule",{value:!0}),n),Nt={};yi(Nt,{escapeUri:()=>Yt,escapeUriPath:()=>Di});St.exports=Ui(Nt);var Yt=Fn((n)=>encodeURIComponent(n).replace(/[!'()*]/g,Li),"escapeUri"),Li=Fn((n)=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Di=Fn((n)=>n.split("/").map(Yt).join("/"),"escapeUriPath")});var En=D((Mr,Zt)=>{function zt(n){const t=[];for(let c of Object.keys(n).sort()){const f=n[c];if(c=on.escapeUri(c),Array.isArray(f))for(let i=0,h=f.length;i<h;i++)t.push(`${c}=${on.escapeUri(f[i])}`);else{let i=c;if(f||typeof f==="string")i+=`=${on.escapeUri(f)}`;t.push(i)}}return t.join("&")}var{defineProperty:m,getOwnPropertyDescriptor:gi,getOwnPropertyNames:Ni}=Object,Yi=Object.prototype.hasOwnProperty,Si=(n,t)=>m(n,"name",{value:t,configurable:!0}),ei=(n,t)=>{for(var c in t)m(n,c,{get:t[c],enumerable:!0})},zi=(n,t,c,f)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of Ni(t))if(!Yi.call(n,i)&&i!==c)m(n,i,{get:()=>t[i],enumerable:!(f=gi(t,i))||f.enumerable})}return n},Zi=(n)=>zi(m({},"__esModule",{value:!0}),n),et={};ei(et,{buildQueryString:()=>zt});Zt.exports=Zi(et);var on=Cn();Si(zt,"buildQueryString")});var Ot=D((Kr,kt)=>{async function Un(n,t,c=Vt){const f=t.headers??{},i=f.Expect||f.expect;let h=-1,r=!1;if(i==="100-continue")await Promise.race([new Promise((s)=>{h=Number(setTimeout(s,Math.max(Vt,c)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(h),s()}),n.on("error",()=>{r=!0,clearTimeout(h),s()})})]);if(!r)Wt(n,t.body)}function Wt(n,t){if(t instanceof Jt.Readable){t.pipe(n);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){n.end(t);return}const c=t;if(typeof c==="object"&&c.buffer&&typeof c.byteOffset==="number"&&typeof c.byteLength==="number"){n.end(Buffer.from(c.buffer,c.byteOffset,c.byteLength));return}n.end(Buffer.from(t));return}n.end()}async function Pt(n){const t=[],c=n.getReader();let f=!1,i=0;while(!f){const{done:s,value:$}=await c.read();if($)t.push($),i+=$.length;f=s}const h=new Uint8Array(i);let r=0;for(let s of t)h.set(s,r),r+=s.length;return h}var{create:Vi,defineProperty:b,getOwnPropertyDescriptor:Gi,getOwnPropertyNames:Qi,getPrototypeOf:Mi}=Object,Ki=Object.prototype.hasOwnProperty,g=(n,t)=>b(n,"name",{value:t,configurable:!0}),Xi=(n,t)=>{for(var c in t)b(n,c,{get:t[c],enumerable:!0})},Qt=(n,t,c,f)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of Qi(t))if(!Ki.call(n,i)&&i!==c)b(n,i,{get:()=>t[i],enumerable:!(f=Gi(t,i))||f.enumerable})}return n},Ai=(n,t,c)=>(c=n!=null?Vi(Mi(n)):{},Qt(t||!n||!n.__esModule?b(c,"default",{value:n,enumerable:!0}):c,n)),Ji=(n)=>Qt(b({},"__esModule",{value:!0}),n),Mt={};Xi(Mt,{DEFAULT_REQUEST_TIMEOUT:()=>Ri,NodeHttp2Handler:()=>li,NodeHttpHandler:()=>Hi,streamCollector:()=>vi});kt.exports=Ji(Mt);var Kt=dn(),Xt=En(),yn=import.meta.require("http"),In=import.meta.require("https"),Wi=["ECONNRESET","EPIPE","ETIMEDOUT"],At=g((n)=>{const t={};for(let c of Object.keys(n)){const f=n[c];t[c]=Array.isArray(f)?f.join(","):f}return t},"getTransformedHeaders"),bi=g((n,t,c=0)=>{if(!c)return;const f=setTimeout(()=>{n.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${c} ms`),{name:"TimeoutError"}))},c);n.on("socket",(i)=>{if(i.connecting)i.on("connect",()=>{clearTimeout(f)});else clearTimeout(f)})},"setConnectionTimeout"),Bi=g((n,{keepAlive:t,keepAliveMsecs:c})=>{if(t!==!0)return;n.on("socket",(f)=>{f.setKeepAlive(t,c||0)})},"setSocketKeepAlive"),ji=g((n,t,c=0)=>{n.setTimeout(c,()=>{n.destroy(),t(Object.assign(new Error(`Connection timed out after ${c} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),Jt=import.meta.require("stream"),Vt=1000;g(Un,"writeRequestBody");g(Wt,"writeBody");var Ri=0,bt=class n{constructor(t){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((c,f)=>{if(typeof t==="function")t().then((i)=>{c(this.resolveDefaultConfig(i))}).catch(f);else c(this.resolveDefaultConfig(t))})}static create(t){if(typeof(t==null?void 0:t.handle)==="function")return t;return new n(t)}static checkSocketUsage(t,c,f=console){var i,h,r;const{sockets:s,requests:$,maxSockets:F}=t;if(typeof F!=="number"||F===1/0)return c;const o=15000;if(Date.now()-o<c)return c;if(s&&$)for(let w in s){const d=((i=s[w])==null?void 0:i.length)??0,T=((h=$[w])==null?void 0:h.length)??0;if(d>=F&&T>=2*F)return(r=f==null?void 0:f.warn)==null||r.call(f,`@smithy/node-http-handler:WARN - socket usage at capacity=${d} and ${T} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return c}resolveDefaultConfig(t){const{requestTimeout:c,connectionTimeout:f,socketTimeout:i,httpAgent:h,httpsAgent:r}=t||{};return{connectionTimeout:f,requestTimeout:c??i,httpAgent:(()=>{if(h instanceof yn.Agent||typeof(h==null?void 0:h.destroy)==="function")return h;return new yn.Agent({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if(r instanceof In.Agent||typeof(r==null?void 0:r.destroy)==="function")return r;return new In.Agent({keepAlive:!0,maxSockets:50,...r})})(),logger:console}}destroy(){var t,c,f,i;(c=(t=this.config)==null?void 0:t.httpAgent)==null||c.destroy(),(i=(f=this.config)==null?void 0:f.httpsAgent)==null||i.destroy()}async handle(t,{abortSignal:c}={}){if(!this.config)this.config=await this.configProvider;let f;return new Promise((i,h)=>{let r=void 0;const s=g(async(x)=>{await r,clearTimeout(f),i(x)},"resolve"),$=g(async(x)=>{await r,clearTimeout(f),h(x)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(c==null?void 0:c.aborted){const x=new Error("Request aborted");x.name="AbortError",$(x);return}const F=t.protocol==="https:",o=F?this.config.httpsAgent:this.config.httpAgent;f=setTimeout(()=>{this.socketWarningTimestamp=n.checkSocketUsage(o,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const w=Xt.buildQueryString(t.query||{});let d=void 0;if(t.username!=null||t.password!=null){const x=t.username??"",I=t.password??"";d=`${x}:${I}`}let T=t.path;if(w)T+=`?${w}`;if(t.fragment)T+=`#${t.fragment}`;const E={headers:t.headers,host:t.hostname,method:t.method,path:T,port:t.port,agent:o,auth:d},C=(F?In.request:yn.request)(E,(x)=>{const I=new Kt.HttpResponse({statusCode:x.statusCode||-1,reason:x.statusMessage,headers:At(x.headers),body:x});s({response:I})});if(C.on("error",(x)=>{if(Wi.includes(x.code))$(Object.assign(x,{name:"TimeoutError"}));else $(x)}),bi(C,$,this.config.connectionTimeout),ji(C,$,this.config.requestTimeout),c){const x=g(()=>{C.destroy();const I=new Error("Request aborted");I.name="AbortError",$(I)},"onAbort");if(typeof c.addEventListener==="function"){const I=c;I.addEventListener("abort",x,{once:!0}),C.once("close",()=>I.removeEventListener("abort",x))}else c.onabort=x}const u=E.agent;if(typeof u==="object"&&"keepAlive"in u)Bi(C,{keepAlive:u.keepAlive,keepAliveMsecs:u.keepAliveMsecs});r=Un(C,t,this.config.requestTimeout).catch((x)=>{return clearTimeout(f),h(x)})})}updateHttpClientConfig(t,c){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[t]:c}})}httpHandlerConfigs(){return this.config??{}}};g(bt,"NodeHttpHandler");var Hi=bt,Gt=import.meta.require("http2"),Pi=Ai(import.meta.require("http2")),Bt=class n{constructor(t){this.sessions=[],this.sessions=t??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(t){this.sessions.push(t)}contains(t){return this.sessions.includes(t)}remove(t){this.sessions=this.sessions.filter((c)=>c!==t)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(t){for(let c of this.sessions)if(c===t){if(!c.destroyed)c.destroy()}}};g(Bt,"NodeHttp2ConnectionPool");var ki=Bt,jt=class n{constructor(t){if(this.sessionCache=new Map,this.config=t,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(t,c){const f=this.getUrlString(t),i=this.sessionCache.get(f);if(i){const $=i.poll();if($&&!this.config.disableConcurrency)return $}const h=Pi.default.connect(f);if(this.config.maxConcurrency)h.settings({maxConcurrentStreams:this.config.maxConcurrency},($)=>{if($)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+t.destination.toString())});h.unref();const r=g(()=>{h.destroy(),this.deleteSession(f,h)},"destroySessionCb");if(h.on("goaway",r),h.on("error",r),h.on("frameError",r),h.on("close",()=>this.deleteSession(f,h)),c.requestTimeout)h.setTimeout(c.requestTimeout,r);const s=this.sessionCache.get(f)||new ki;return s.offerLast(h),this.sessionCache.set(f,s),h}deleteSession(t,c){const f=this.sessionCache.get(t);if(!f)return;if(!f.contains(c))return;f.remove(c),this.sessionCache.set(t,f)}release(t,c){var f;const i=this.getUrlString(t);(f=this.sessionCache.get(i))==null||f.offerLast(c)}destroy(){for(let[t,c]of this.sessionCache){for(let f of c){if(!f.destroyed)f.destroy();c.remove(f)}this.sessionCache.delete(t)}}setMaxConcurrentStreams(t){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=t}setDisableConcurrentStreams(t){this.config.disableConcurrency=t}getUrlString(t){return t.destination.toString()}};g(jt,"NodeHttp2ConnectionManager");var Oi=jt,Rt=class n{constructor(t){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Oi({}),this.configProvider=new Promise((c,f)=>{if(typeof t==="function")t().then((i)=>{c(i||{})}).catch(f);else c(t||{})})}static create(t){if(typeof(t==null?void 0:t.handle)==="function")return t;return new n(t)}destroy(){this.connectionManager.destroy()}async handle(t,{abortSignal:c}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:f,disableConcurrentStreams:i}=this.config;return new Promise((h,r)=>{var s;let $=!1,F=void 0;const o=g(async(L)=>{await F,h(L)},"resolve"),w=g(async(L)=>{await F,r(L)},"reject");if(c==null?void 0:c.aborted){$=!0;const L=new Error("Request aborted");L.name="AbortError",w(L);return}const{hostname:d,method:T,port:E,protocol:y,query:C}=t;let u="";if(t.username!=null||t.password!=null){const L=t.username??"",e=t.password??"";u=`${L}:${e}@`}const x=`${y}//${u}${d}${E?`:${E}`:""}`,I={destination:new URL(x)},U=this.connectionManager.lease(I,{requestTimeout:(s=this.config)==null?void 0:s.sessionTimeout,disableConcurrentStreams:i||!1}),N=g((L)=>{if(i)this.destroySession(U);$=!0,w(L)},"rejectWithDestroy"),Z=Xt.buildQueryString(C||{});let Q=t.path;if(Z)Q+=`?${Z}`;if(t.fragment)Q+=`#${t.fragment}`;const Y=U.request({...t.headers,[Gt.constants.HTTP2_HEADER_PATH]:Q,[Gt.constants.HTTP2_HEADER_METHOD]:T});if(U.ref(),Y.on("response",(L)=>{const e=new Kt.HttpResponse({statusCode:L[":status"]||-1,headers:At(L),body:Y});if($=!0,o({response:e}),i)U.close(),this.connectionManager.deleteSession(x,U)}),f)Y.setTimeout(f,()=>{Y.close();const L=new Error(`Stream timed out because of no activity for ${f} ms`);L.name="TimeoutError",N(L)});if(c){const L=g(()=>{Y.close();const e=new Error("Request aborted");e.name="AbortError",N(e)},"onAbort");if(typeof c.addEventListener==="function"){const e=c;e.addEventListener("abort",L,{once:!0}),Y.once("close",()=>e.removeEventListener("abort",L))}else c.onabort=L}Y.on("frameError",(L,e,Tf)=>{N(new Error(`Frame type id ${L} in stream id ${Tf} has failed with code ${e}.`))}),Y.on("error",N),Y.on("aborted",()=>{N(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Y.rstCode}.`))}),Y.on("close",()=>{if(U.unref(),i)U.destroy();if(!$)N(new Error("Unexpected error: http2 request did not get a response"))}),F=Un(Y,t,f)})}updateHttpClientConfig(t,c){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[t]:c}})}httpHandlerConfigs(){return this.config??{}}destroySession(t){if(!t.destroyed)t.destroy()}};g(Rt,"NodeHttp2Handler");var li=Rt,Ht=class n extends Jt.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(t,c,f){this.bufferedBytes.push(t),f()}};g(Ht,"Collector");var pi=Ht,vi=g((n)=>{if(qi(n))return Pt(n);return new Promise((t,c)=>{const f=new pi;n.pipe(f),n.on("error",(i)=>{f.end(),c(i)}),f.on("error",c),f.on("finish",function(){const i=new Uint8Array(Buffer.concat(this.bufferedBytes));t(i)})})},"streamCollector"),qi=g((n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream,"isReadableStreamInstance");g(Pt,"collectReadableStream")});var tc=D((Xr,nc)=>{function vt(n=0){return new Promise((t,c)=>{if(n)setTimeout(()=>{const f=new Error(`Request did not complete within ${n} ms`);f.name="TimeoutError",c(f)},n)})}async function at(n){const t=await _t(n),c=hh.fromBase64(t);return new Uint8Array(c)}async function mt(n){const t=[],c=n.getReader();let f=!1,i=0;while(!f){const{done:s,value:$}=await c.read();if($)t.push($),i+=$.length;f=s}const h=new Uint8Array(i);let r=0;for(let s of t)h.set(s,r),r+=s.length;return h}function _t(n){return new Promise((t,c)=>{const f=new FileReader;f.onloadend=()=>{if(f.readyState!==2)return c(new Error("Reader aborted too early"));const i=f.result??"",h=i.indexOf(","),r=h>-1?h+1:i.length;t(i.substring(r))},f.onabort=()=>c(new Error("Read aborted")),f.onerror=()=>c(f.error),f.readAsDataURL(n)})}var{defineProperty:nn,getOwnPropertyDescriptor:ai,getOwnPropertyNames:mi}=Object,_i=Object.prototype.hasOwnProperty,z=(n,t)=>nn(n,"name",{value:t,configurable:!0}),nh=(n,t)=>{for(var c in t)nn(n,c,{get:t[c],enumerable:!0})},th=(n,t,c,f)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of mi(t))if(!_i.call(n,i)&&i!==c)nn(n,i,{get:()=>t[i],enumerable:!(f=ai(t,i))||f.enumerable})}return n},ch=(n)=>th(nn({},"__esModule",{value:!0}),n),pt={};nh(pt,{FetchHttpHandler:()=>ih,keepAliveSupport:()=>_,streamCollector:()=>rh});nc.exports=ch(pt);var lt=dn(),fh=En();z(vt,"requestTimeout");var _={supported:void 0},qt=class n{static create(t){if(typeof(t==null?void 0:t.handle)==="function")return t;return new n(t)}constructor(t){if(typeof t==="function")this.configProvider=t().then((c)=>c||{});else this.config=t??{},this.configProvider=Promise.resolve(this.config);if(_.supported===void 0)_.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(t,{abortSignal:c}={}){if(!this.config)this.config=await this.configProvider;const f=this.config.requestTimeout,i=this.config.keepAlive===!0,h=this.config.credentials;if(c==null?void 0:c.aborted){const u=new Error("Request aborted");return u.name="AbortError",Promise.reject(u)}let r=t.path;const s=fh.buildQueryString(t.query||{});if(s)r+=`?${s}`;if(t.fragment)r+=`#${t.fragment}`;let $="";if(t.username!=null||t.password!=null){const u=t.username??"",x=t.password??"";$=`${u}:${x}@`}const{port:F,method:o}=t,w=`${t.protocol}//${$}${t.hostname}${F?`:${F}`:""}${r}`,d=o==="GET"||o==="HEAD"?void 0:t.body,T={body:d,headers:new Headers(t.headers),method:o,credentials:h};if(d)T.duplex="half";if(typeof AbortController!=="undefined")T.signal=c;if(_.supported)T.keepalive=i;let E=z(()=>{},"removeSignalEventListener");const y=new Request(w,T),C=[fetch(y).then((u)=>{const x=u.headers,I={};for(let N of x.entries())I[N[0]]=N[1];if(u.body==null)return u.blob().then((N)=>({response:new lt.HttpResponse({headers:I,reason:u.statusText,statusCode:u.status,body:N})}));return{response:new lt.HttpResponse({headers:I,reason:u.statusText,statusCode:u.status,body:u.body})}}),vt(f)];if(c)C.push(new Promise((u,x)=>{const I=z(()=>{const U=new Error("Request aborted");U.name="AbortError",x(U)},"onAbort");if(typeof c.addEventListener==="function"){const U=c;U.addEventListener("abort",I,{once:!0}),E=z(()=>U.removeEventListener("abort",I),"removeSignalEventListener")}else c.onabort=I}));return Promise.race(C).finally(E)}updateHttpClientConfig(t,c){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return f[t]=c,f})}httpHandlerConfigs(){return this.config??{}}};z(qt,"FetchHttpHandler");var ih=qt,hh=v(),rh=z((n)=>{if(typeof Blob==="function"&&n instanceof Blob)return at(n);return mt(n)},"streamCollector");z(at,"collectBlob");z(mt,"collectStream");z(_t,"readToBase64")});var uc=D((Ar,sc)=>{function hc(n){if(n.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(n.length/2);for(let c=0;c<n.length;c+=2){const f=n.slice(c,c+2).toLowerCase();if(f in Ln)t[c/2]=Ln[f];else throw new Error(`Cannot decode unrecognized sequence ${f} as hexadecimal`)}return t}function rc(n){let t="";for(let c=0;c<n.byteLength;c++)t+=ic[n[c]];return t}var{defineProperty:tn,getOwnPropertyDescriptor:sh,getOwnPropertyNames:uh}=Object,wh=Object.prototype.hasOwnProperty,cc=(n,t)=>tn(n,"name",{value:t,configurable:!0}),$h=(n,t)=>{for(var c in t)tn(n,c,{get:t[c],enumerable:!0})},Th=(n,t,c,f)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of uh(t))if(!wh.call(n,i)&&i!==c)tn(n,i,{get:()=>t[i],enumerable:!(f=sh(t,i))||f.enumerable})}return n},xh=(n)=>Th(tn({},"__esModule",{value:!0}),n),fc={};$h(fc,{fromHex:()=>hc,toHex:()=>rc});sc.exports=xh(fc);var ic={},Ln={};for(let n=0;n<256;n++){let t=n.toString(16).toLowerCase();if(t.length===1)t=`0${t}`;ic[n]=t,Ln[t]=n}cc(hc,"fromHex");cc(rc,"toHex")});var B=D((wc)=>{Object.defineProperty(wc,"__esModule",{value:!0});wc.isReadableStream=void 0;var dh=(n)=>{var t;return typeof ReadableStream==="function"&&(((t=n===null||n===void 0?void 0:n.constructor)===null||t===void 0?void 0:t.name)===ReadableStream.name||n instanceof ReadableStream)};wc.isReadableStream=dh});var oc=D((Fc)=>{Object.defineProperty(Fc,"__esModule",{value:!0});Fc.sdkStreamMixin=void 0;var Fh=tc(),Ch=v(),oh=uc(),Eh=l(),Tc=B(),xc="The stream has already been transformed.",yh=(n)=>{var t,c;if(!dc(n)&&!Tc.isReadableStream(n)){const r=((c=(t=n===null||n===void 0?void 0:n.__proto__)===null||t===void 0?void 0:t.constructor)===null||c===void 0?void 0:c.name)||n;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${r}`)}let f=!1;const i=async()=>{if(f)throw new Error(xc);return f=!0,await Fh.streamCollector(n)},h=(r)=>{if(typeof r.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return r.stream()};return Object.assign(n,{transformToByteArray:i,transformToString:async(r)=>{const s=await i();if(r==="base64")return Ch.toBase64(s);else if(r==="hex")return oh.toHex(s);else if(r===void 0||r==="utf8"||r==="utf-8")return Eh.toUtf8(s);else if(typeof TextDecoder==="function")return new TextDecoder(r).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(f)throw new Error(xc);if(f=!0,dc(n))return h(n);else if(Tc.isReadableStream(n))return n;else throw new Error(`Cannot transform payload to web stream, got ${n}`)}})};Fc.sdkStreamMixin=yh;var dc=(n)=>typeof Blob==="function"&&n instanceof Blob});var Uc=D((yc)=>{Object.defineProperty(yc,"__esModule",{value:!0});yc.sdkStreamMixin=void 0;var Ih=Ot(),Uh=W(),Dn=import.meta.require("stream"),Lh=import.meta.require("util"),Dh=oc(),Ec="The stream has already been transformed.",gh=(n)=>{var t,c;if(!(n instanceof Dn.Readable))try{return Dh.sdkStreamMixin(n)}catch(h){const r=((c=(t=n===null||n===void 0?void 0:n.__proto__)===null||t===void 0?void 0:t.constructor)===null||c===void 0?void 0:c.name)||n;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${r}`)}let f=!1;const i=async()=>{if(f)throw new Error(Ec);return f=!0,await Ih.streamCollector(n)};return Object.assign(n,{transformToByteArray:i,transformToString:async(h)=>{const r=await i();if(h===void 0||Buffer.isEncoding(h))return Uh.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString(h);else return new Lh.TextDecoder(h).decode(r)},transformToWebStream:()=>{if(f)throw new Error(Ec);if(n.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Dn.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return f=!0,Dn.Readable.toWeb(n)}})};yc.sdkStreamMixin=gh});var gc=D((Lc)=>{async function Nh(n){if(typeof n.stream==="function")n=n.stream();return n.tee()}Object.defineProperty(Lc,"__esModule",{value:!0});Lc.splitStream=void 0;Lc.splitStream=Nh});var ec=D((Yc)=>{async function eh(n){if(Sh.isReadableStream(n))return Yh.splitStream(n);const t=new Nc.PassThrough,c=new Nc.PassThrough;return n.pipe(t),n.pipe(c),[t,c]}Object.defineProperty(Yc,"__esModule",{value:!0});Yc.splitStream=void 0;var Nc=import.meta.require("stream"),Yh=gc(),Sh=B();Yc.splitStream=eh});var Vc=D((zc)=>{async function zh(n,t){var c;let f=0;const i=[],h=n.getReader();let r=!1;while(!r){const{done:F,value:o}=await h.read();if(o)i.push(o),f+=(c=o===null||o===void 0?void 0:o.byteLength)!==null&&c!==void 0?c:0;if(f>=t)break;r=F}h.releaseLock();const s=new Uint8Array(Math.min(t,f));let $=0;for(let F of i){if(F.byteLength>s.byteLength-$){s.set(F.subarray(0,s.byteLength-$),$);break}else s.set(F,$);$+=F.length}return s}Object.defineProperty(zc,"__esModule",{value:!0});zc.headStream=void 0;zc.headStream=zh});var Kc=D((Qc)=>{Object.defineProperty(Qc,"__esModule",{value:!0});Qc.headStream=void 0;var Zh=import.meta.require("stream"),Vh=Vc(),Gh=B(),Qh=(n,t)=>{if(Gh.isReadableStream(n))return Vh.headStream(n,t);return new Promise((c,f)=>{const i=new Gc;i.limit=t,n.pipe(i),n.on("error",(h)=>{i.end(),f(h)}),i.on("error",f),i.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.buffers));c(h)})})};Qc.headStream=Qh;class Gc extends Zh.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(n,t,c){var f;if(this.buffers.push(n),this.bytesBuffered+=(f=n.byteLength)!==null&&f!==void 0?f:0,this.bytesBuffered>=this.limit){const i=this.bytesBuffered-this.limit,h=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=h.subarray(0,h.byteLength-i),this.emit("finish")}c()}}});var Bc=D((Pr,A)=>{function Jc(n,t="utf-8"){if(t==="base64")return Xc.toBase64(n);return Ac.toUtf8(n)}function Wc(n,t){if(t==="base64")return Nn.mutate(Xc.fromBase64(n));return Nn.mutate(Ac.fromUtf8(n))}var{defineProperty:cn,getOwnPropertyDescriptor:Mh,getOwnPropertyNames:Kh}=Object,Xh=Object.prototype.hasOwnProperty,Yn=(n,t)=>cn(n,"name",{value:t,configurable:!0}),Ah=(n,t)=>{for(var c in t)cn(n,c,{get:t[c],enumerable:!0})},gn=(n,t,c,f)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of Kh(t))if(!Xh.call(n,i)&&i!==c)cn(n,i,{get:()=>t[i],enumerable:!(f=Mh(t,i))||f.enumerable})}return n},j=(n,t,c)=>(gn(n,t,"default"),c&&gn(c,t,"default")),Jh=(n)=>gn(cn({},"__esModule",{value:!0}),n),X={};Ah(X,{Uint8ArrayBlobAdapter:()=>Nn});A.exports=Jh(X);var Xc=v(),Ac=l();Yn(Jc,"transformToString");Yn(Wc,"transformFromString");var bc=class n extends Uint8Array{static fromString(t,c="utf-8"){switch(typeof t){case"string":return Wc(t,c);default:throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}}static mutate(t){return Object.setPrototypeOf(t,n.prototype),t}transformToString(t="utf-8"){return Jc(this,t)}};Yn(bc,"Uint8ArrayBlobAdapter");var Nn=bc;j(X,Ft(),A.exports);j(X,Uc(),A.exports);j(X,ec(),A.exports);j(X,Kc(),A.exports);j(X,B(),A.exports)});var jn=K(un(),1);class yf{constructor(n){this.middlewareStack=jn.constructStack(),this.config=n}send(n,t,c){const f=typeof t!=="function"?t:void 0,i=typeof t==="function"?t:c,h=n.resolveMiddleware(this.middlewareStack,this.config,f);if(i)h(n).then((r)=>i(null,r.output),(r)=>i(r)).catch(()=>{});else return h(n).then((r)=>r.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var Rn=K(un(),1),Hn=K(H(),1);class Pn{constructor(){this.middlewareStack=Rn.constructStack()}static classBuilder(){return new kn}resolveMiddlewareWithContext(n,t,c,{middlewareFn:f,clientName:i,commandName:h,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,smithyContext:$,additionalContext:F,CommandCtor:o}){for(let y of f.bind(this)(o,n,t,c))this.middlewareStack.use(y);const w=n.concat(this.middlewareStack),{logger:d}=t,T={logger:d,clientName:i,commandName:h,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,[Hn.SMITHY_CONTEXT_KEY]:{commandInstance:this,...$},...F},{requestHandler:E}=t;return w.resolve((y)=>E.handle(y.request,c||{}),T)}}class kn{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(n)=>n,this._outputFilterSensitiveLog=(n)=>n,this._serializer=null,this._deserializer=null}init(n){this._init=n}ep(n){return this._ep=n,this}m(n){return this._middlewareFn=n,this}s(n,t,c={}){return this._smithyContext={service:n,operation:t,...c},this}c(n={}){return this._additionalContext=n,this}n(n,t){return this._clientName=n,this._commandName=t,this}f(n=(c)=>c,t=(c)=>c){return this._inputFilterSensitiveLog=n,this._outputFilterSensitiveLog=t,this}ser(n){return this._serializer=n,this}de(n){return this._deserializer=n,this}build(){const n=this;let t;return t=class extends Pn{static getEndpointParameterInstructions(){return n._ep}constructor(...[c]){super();this.serialize=n._serializer,this.deserialize=n._deserializer,this.input=c??{},n._init(this)}resolveMiddleware(c,f,i){return this.resolveMiddlewareWithContext(c,f,i,{CommandCtor:t,middlewareFn:n._middlewareFn,clientName:n._clientName,commandName:n._commandName,inputFilterSensitiveLog:n._inputFilterSensitiveLog,outputFilterSensitiveLog:n._outputFilterSensitiveLog,smithyContext:n._smithyContext,additionalContext:n._additionalContext})}}}}var yr="***SensitiveInformation***";var Ur=(n,t)=>{for(let c of Object.keys(n)){const f=n[c],i=async function(r,s,$){const F=new f(r);if(typeof s==="function")this.send(F,s);else if(typeof $==="function"){if(typeof s!=="object")throw new Error(`Expected http options but got ${typeof s}`);this.send(F,s||{},$)}else return this.send(F,s)},h=(c[0].toLowerCase()+c.slice(1)).replace(/Command$/,"");t.prototype[h]=i}};class On extends Error{constructor(n){super(n.message);Object.setPrototypeOf(this,On.prototype),this.name=n.name,this.$fault=n.$fault,this.$metadata=n.$metadata}}var ln=(n,t={})=>{Object.entries(t).filter(([,f])=>f!==void 0).forEach(([f,i])=>{if(n[f]==null||n[f]==="")n[f]=i});const c=n.message||n.Message||"UnknownError";return n.message=c,delete n.Message,n};class If{trace(){}debug(){}info(){}warn(){}error(){}}var Wh=K(Bc(),1);var bh=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string"){const t=parseFloat(n);if(!Number.isNaN(t)){if(String(t)!==String(n))pc.warn(lc(`Expected number but observed string: ${n}`));return t}}if(typeof n==="number")return n;throw new TypeError(`Expected number, got ${typeof n}: ${n}`)},Bh=Math.ceil(340282346638528860000000000000000000000),jc=(n)=>{const t=bh(n);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0){if(Math.abs(t)>Bh)throw new TypeError(`Expected 32-bit float, got ${n}`)}return t},jh=(n)=>{if(n===null||n===void 0)return;if(Number.isInteger(n)&&!Number.isNaN(n))return n;throw new TypeError(`Expected integer, got ${typeof n}: ${n}`)};var Rc=(n)=>Sn(n,32),Hc=(n)=>Sn(n,16),Pc=(n)=>Sn(n,8),Sn=(n,t)=>{const c=jh(n);if(c!==void 0&&Rh(c,t)!==c)throw new TypeError(`Expected ${t}-bit integer, got ${n}`);return c},Rh=(n,t)=>{switch(t){case 32:return Int32Array.of(n)[0];case 16:return Int16Array.of(n)[0];case 8:return Int8Array.of(n)[0]}},Or=(n,t)=>{if(n===null||n===void 0){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return n},lr=(n)=>{if(n===null||n===void 0)return;if(typeof n==="object"&&!Array.isArray(n))return n;const t=Array.isArray(n)?"array":typeof n;throw new TypeError(`Expected object, got ${t}: ${n}`)},pr=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string")return n;if(["boolean","number","bigint"].includes(typeof n))return pc.warn(lc(`Expected string, got ${typeof n}: ${n}`)),String(n);throw new TypeError(`Expected string, got ${typeof n}: ${n}`)};var kc=(n)=>{if(typeof n=="string")return jc(fn(n));return jc(n)},Hh=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,fn=(n)=>{const t=n.match(Hh);if(t===null||t[0].length!==n.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(n)};var vr=(n)=>{if(typeof n==="string")return Rc(fn(n));return Rc(n)},en=(n)=>{if(typeof n==="string")return Hc(fn(n));return Hc(n)},Oc=(n)=>{if(typeof n==="string")return Pc(fn(n));return Pc(n)},lc=(n)=>{return String(new TypeError(n).stack||n).split("\n").slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join("\n")},pc={warn:console.warn};var Ph=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],kh=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),_r=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=kh.exec(n);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[c,f,i,h,r,s,$,F]=t,o=en(zn(f)),w=J(i,"month",1,12),d=J(h,"day",1,31);return vc(o,w,d,{hours:r,minutes:s,seconds:$,fractionalMilliseconds:F})},Oh=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),ns=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Oh.exec(n);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[c,f,i,h,r,s,$,F,o]=t,w=en(zn(f)),d=J(i,"month",1,12),T=J(h,"day",1,31),E=vc(w,d,T,{hours:r,minutes:s,seconds:$,fractionalMilliseconds:F});if(o.toUpperCase()!="Z")E.setTime(E.getTime()-ah(o));return E},ts=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$/),cs=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$/),fs=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 vc=(n,t,c,f)=>{const i=t-1;return ph(n,i,c),new Date(Date.UTC(n,i,c,J(f.hours,"hour",0,23),J(f.minutes,"minute",0,59),J(f.seconds,"seconds",0,60),qh(f.fractionalMilliseconds)))};var lh=[31,28,31,30,31,30,31,31,30,31,30,31],ph=(n,t,c)=>{let f=lh[t];if(t===1&&vh(n))f=29;if(c>f)throw new TypeError(`Invalid day for ${Ph[t]} in ${n}: ${c}`)},vh=(n)=>{return n%4===0&&(n%100!==0||n%400===0)},J=(n,t,c,f)=>{const i=Oc(zn(n));if(i<c||i>f)throw new TypeError(`${t} must be between ${c} and ${f}, inclusive`);return i},qh=(n)=>{if(n===null||n===void 0)return 0;return kc("0."+n)*1000},ah=(n)=>{const t=n[0];let c=1;if(t=="+")c=1;else if(t=="-")c=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const f=Number(n.substring(1,3)),i=Number(n.substring(4,6));return c*(f*60+i)*60*1000},zn=(n)=>{let t=0;while(t<n.length-1&&n.charAt(t)==="0")t++;if(t===0)return n;return n.slice(t)};var mh=({output:n,parsedBody:t,exceptionCtor:c,errorCode:f})=>{const i=_h(n),h=i.httpStatusCode?i.httpStatusCode+"":void 0,r=new c({name:t?.code||t?.Code||f||h||"UnknownError",$fault:"client",$metadata:i});throw ln(r,t)},rs=(n)=>{return({output:t,parsedBody:c,errorCode:f})=>{mh({output:t,parsedBody:c,exceptionCtor:n,errorCode:f})}},_h=(n)=>({httpStatusCode:n.statusCode,requestId:n.headers["x-amzn-requestid"]??n.headers["x-amzn-request-id"]??n.headers["x-amz-request-id"],extendedRequestId:n.headers["x-amz-id-2"],cfId:n.headers["x-amz-cf-id"]});var us=(n)=>{switch(n){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var qc=!1,$s=(n)=>{if(n&&!qc&&parseInt(n.substring(1,n.indexOf(".")))<16)qc=!0};var Zn=K(H(),1);var ac=(n)=>{const t=[];for(let c in Zn.AlgorithmId){const f=Zn.AlgorithmId[c];if(n[f]===void 0)continue;t.push({algorithmId:()=>f,checksumConstructor:()=>n[f]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(c){this._checksumAlgorithms.push(c)},checksumAlgorithms(){return this._checksumAlgorithms}}},mc=(n)=>{const t={};return n.checksumAlgorithms().forEach((c)=>{t[c.algorithmId()]=c.checksumConstructor()}),t};var _c=(n)=>{let t=n.retryStrategy;return{setRetryStrategy(c){t=c},retryStrategy(){return t}}},nf=(n)=>{const t={};return t.retryStrategy=n.retryStrategy(),t};var os=(n)=>{return{...ac(n),..._c(n)}};var Es=(n)=>{return{...mc(n),...nf(n)}};function nr(n){return encodeURIComponent(n).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}var Ds=(n)=>Array.isArray(n)?n:[n];var Vn=function(){const n=Object.getPrototypeOf(this).constructor,c=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(c,n.prototype),c};Vn.prototype=Object.create(String.prototype,{constructor:{value:Vn,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Vn,String);function tr(n,t,c){let f,i,h;if(typeof t==="undefined"&&typeof c==="undefined")f={},h=n;else if(f=n,typeof t==="function")return i=t,h=c,cr(f,i,h);else h=t;for(let r of Object.keys(h)){if(!Array.isArray(h[r])){f[r]=h[r];continue}tf(f,null,h,r)}return f}var Ss=(n,t)=>{const c={};for(let f in t)tf(c,n,t,f);return c},cr=(n,t,c)=>{return tr(n,Object.entries(c).reduce((f,[i,h])=>{if(Array.isArray(h))f[i]=h;else if(typeof h==="function")f[i]=[t,h()];else f[i]=[t,h];return f},{}))},tf=(n,t,c,f)=>{if(t!==null){let r=c[f];if(typeof r==="function")r=[,r];const[s=fr,$=ir,F=f]=r;if(typeof s==="function"&&s(t[F])||typeof s!=="function"&&!!s)n[f]=$(t[F]);return}let[i,h]=c[f];if(typeof h==="function"){let r;const s=i===void 0&&(r=h())!=null,$=typeof i==="function"&&!!i(void 0)||typeof i!=="function"&&!!i;if(s)n[f]=r;else if($)n[f]=h()}else{const r=i===void 0&&h!=null,s=typeof i==="function"&&!!i(h)||typeof i!=="function"&&!!i;if(r||s)n[f]=h}},fr=(n)=>n!=null,ir=(n)=>n;var cf=(n)=>{if(n==null)return{};if(Array.isArray(n))return n.filter((t)=>t!=null).map(cf);if(typeof n==="object"){const t={};for(let c of Object.keys(n)){if(n[c]==null)continue;t[c]=cf(n[c])}return t}return n};var cu=(n)=>{let t=n.httpHandler;return{setHttpHandler(c){t=c},httpHandler(){return t},updateHttpClientConfig(c,f){t.updateHttpClientConfig(c,f)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},fu=(n)=>{return{httpHandler:n.httpHandler()}};var hr=K(H(),1);function rr(n){return Object.keys(n).reduce((t,c)=>{const f=n[c];return{...t,[c]:Array.isArray(f)?[...f]:f}},{})}class Gn{constructor(n){this.method=n.method||"GET",this.hostname=n.hostname||"localhost",this.port=n.port,this.query=n.query||{},this.headers=n.headers||{},this.body=n.body,this.protocol=n.protocol?n.protocol.slice(-1)!==":"?`${n.protocol}:`:n.protocol:"https:",this.path=n.path?n.path.charAt(0)!=="/"?`/${n.path}`:n.path:"/",this.username=n.username,this.password=n.password,this.fragment=n.fragment}static clone(n){const t=new Gn({...n,headers:{...n.headers}});if(t.query)t.query=rr(t.query);return t}static isInstance(n){if(!n)return!1;const t=n;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return Gn.clone(this)}}class hn{constructor(n){this.statusCode=n.statusCode,this.reason=n.reason,this.headers=n.headers||{},this.body=n.body}static isInstance(n){if(!n)return!1;const t=n;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}var rn=K(Cn(),1);function Qn(n){const t=[];for(let c of Object.keys(n).sort()){const f=n[c];if(c=rn.escapeUri(c),Array.isArray(f))for(let i=0,h=f.length;i<h;i++)t.push(`${c}=${rn.escapeUri(f[i])}`);else{let i=c;if(f||typeof f==="string")i+=`=${rn.escapeUri(f)}`;t.push(i)}}return t.join("&")}import{Agent as wf,request as wr}from"http";import{Agent as $f,request as $r}from"https";var ff=["ECONNRESET","EPIPE","ETIMEDOUT"];var Mn=(n)=>{const t={};for(let c of Object.keys(n)){const f=n[c];t[c]=Array.isArray(f)?f.join(","):f}return t};var hf=(n,t,c=0)=>{if(!c)return;const f=setTimeout(()=>{n.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${c} ms`),{name:"TimeoutError"}))},c);n.on("socket",(i)=>{if(i.connecting)i.on("connect",()=>{clearTimeout(f)});else clearTimeout(f)})};var rf=(n,{keepAlive:t,keepAliveMsecs:c})=>{if(t!==!0)return;n.on("socket",(f)=>{f.setKeepAlive(t,c||0)})};var sf=(n,t,c=0)=>{n.setTimeout(c,()=>{n.destroy(),t(Object.assign(new Error(`Connection timed out after ${c} ms`),{name:"TimeoutError"}))})};import{Readable as sr}from"stream";async function Kn(n,t,c=uf){const f=t.headers??{},i=f.Expect||f.expect;let h=-1,r=!1;if(i==="100-continue")await Promise.race([new Promise((s)=>{h=Number(setTimeout(s,Math.max(uf,c)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(h),s()}),n.on("error",()=>{r=!0,clearTimeout(h),s()})})]);if(!r)ur(n,t.body)}function ur(n,t){if(t instanceof sr){t.pipe(n);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){n.end(t);return}const c=t;if(typeof c==="object"&&c.buffer&&typeof c.byteOffset==="number"&&typeof c.byteLength==="number"){n.end(Buffer.from(c.buffer,c.byteOffset,c.byteLength));return}n.end(Buffer.from(t));return}n.end()}var uf=1000;class Xn{static create(n){if(typeof n?.handle==="function")return n;return new Xn(n)}static checkSocketUsage(n,t,c=console){const{sockets:f,requests:i,maxSockets:h}=n;if(typeof h!=="number"||h===1/0)return t;const r=15000;if(Date.now()-r<t)return t;if(f&&i)for(let s in f){const $=f[s]?.length??0,F=i[s]?.length??0;if($>=h&&F>=2*h)return c?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${$} and ${F} additional requests are enqueued.
|
|
4
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
5
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(n){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,c)=>{if(typeof n==="function")n().then((f)=>{t(this.resolveDefaultConfig(f))}).catch(c);else t(this.resolveDefaultConfig(n))})}resolveDefaultConfig(n){const{requestTimeout:t,connectionTimeout:c,socketTimeout:f,httpAgent:i,httpsAgent:h}=n||{};return{connectionTimeout:c,requestTimeout:t??f,httpAgent:(()=>{if(i instanceof wf||typeof i?.destroy==="function")return i;return new wf({keepAlive:!0,maxSockets:50,...i})})(),httpsAgent:(()=>{if(h instanceof $f||typeof h?.destroy==="function")return h;return new $f({keepAlive:!0,maxSockets:50,...h})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(n,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;let c;return new Promise((f,i)=>{let h=void 0;const r=async(u)=>{await h,clearTimeout(c),f(u)},s=async(u)=>{await h,clearTimeout(c),i(u)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){const u=new Error("Request aborted");u.name="AbortError",s(u);return}const $=n.protocol==="https:",F=$?this.config.httpsAgent:this.config.httpAgent;c=setTimeout(()=>{this.socketWarningTimestamp=Xn.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const o=Qn(n.query||{});let w=void 0;if(n.username!=null||n.password!=null){const u=n.username??"",x=n.password??"";w=`${u}:${x}`}let d=n.path;if(o)d+=`?${o}`;if(n.fragment)d+=`#${n.fragment}`;const T={headers:n.headers,host:n.hostname,method:n.method,path:d,port:n.port,agent:F,auth:w},y=($?$r:wr)(T,(u)=>{const x=new hn({statusCode:u.statusCode||-1,reason:u.statusMessage,headers:Mn(u.headers),body:u});r({response:x})});if(y.on("error",(u)=>{if(ff.includes(u.code))s(Object.assign(u,{name:"TimeoutError"}));else s(u)}),hf(y,s,this.config.connectionTimeout),sf(y,s,this.config.requestTimeout),t){const u=()=>{y.destroy();const x=new Error("Request aborted");x.name="AbortError",s(x)};if(typeof t.addEventListener==="function"){const x=t;x.addEventListener("abort",u,{once:!0}),y.once("close",()=>x.removeEventListener("abort",u))}else t.onabort=u}const C=T.agent;if(typeof C==="object"&&"keepAlive"in C)rf(y,{keepAlive:C.keepAlive,keepAliveMsecs:C.keepAliveMsecs});h=Kn(y,n,this.config.requestTimeout).catch((u)=>{return clearTimeout(c),i(u)})})}updateHttpClientConfig(n,t){this.config=void 0,this.configProvider=this.configProvider.then((c)=>{return{...c,[n]:t}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as Tr}from"stream";class An extends Tr{constructor(){super(...arguments);this.bufferedBytes=[]}_write(n,t,c){this.bufferedBytes.push(n),c()}}async function dr(n){const t=[],c=n.getReader();let f=!1,i=0;while(!f){const{done:s,value:$}=await c.read();if($)t.push($),i+=$.length;f=s}const h=new Uint8Array(i);let r=0;for(let s of t)h.set(s,r),r+=s.length;return h}var n0=(n)=>{if(xr(n))return dr(n);return new Promise((t,c)=>{const f=new An;n.pipe(f),n.on("error",(i)=>{f.end(),c(i)}),f.on("error",c),f.on("finish",function(){const i=new Uint8Array(Buffer.concat(this.bufferedBytes));t(i)})})},xr=(n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream;export{cu as P,fu as Q,Gn as R,hn as S,dn as T,un as U,qn as V,l as W,Cn as X,uc as Y,Bc as Z,If as _,yf as $,Pn as aa,yr as ba,Ur as ca,jh as da,Rc as ea,Or as fa,lr as ga,pr as ha,vr as ia,_r as ja,ns as ka,On as la,ln as ma,rs as na,us as oa,$s as pa,os as qa,Es as ra,nr as sa,Ds as ta,tr as ua,Ss as va,cf as wa,Xn as xa,n0 as ya};
|
|
6
|
+
|
|
7
|
+
//# debugId=02572CFF4E6328C764756E2164756E21
|
|
8
|
+
//# sourceMappingURL=chunk-3y8aq9qa.js.map
|