gemi 0.5.0 → 0.5.2
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/app/index.js +2 -2
- package/dist/app/index.js.map +1 -1
- package/dist/bin/index.js +77 -5778
- package/dist/broadcasting/index.js +1 -1
- package/dist/chunk-0643qpn8.js +4 -0
- package/dist/{chunk-vc1yv3v5.js.map → chunk-0643qpn8.js.map} +2 -2
- package/dist/chunk-0970v4jx.js +4 -0
- package/dist/chunk-0970v4jx.js.map +10 -0
- package/dist/{chunk-83snmykp.js → chunk-0rvh1r84.js} +2 -2
- package/dist/{chunk-83snmykp.js.map → chunk-0rvh1r84.js.map} +1 -1
- package/dist/chunk-0ykbtpxc.js +4 -0
- package/dist/{chunk-t34vnmky.js.map → chunk-0ykbtpxc.js.map} +1 -1
- package/dist/chunk-259kgv1j.js +18 -0
- package/dist/{chunk-1tpqxqmt.js.map → chunk-259kgv1j.js.map} +11 -29
- package/dist/{chunk-0s3yapam.js → chunk-39ynan33.js} +3 -3
- package/dist/{chunk-0s3yapam.js.map → chunk-39ynan33.js.map} +1 -1
- package/dist/{chunk-7v15p9nn.js → chunk-54v7tmfv.js} +3 -3
- package/dist/{chunk-7v15p9nn.js.map → chunk-54v7tmfv.js.map} +1 -1
- package/dist/chunk-5jvxqe5r.js +4 -0
- package/dist/{chunk-3pfpq2xc.js.map → chunk-5jvxqe5r.js.map} +1 -1
- package/dist/{chunk-ch0p7trm.js → chunk-5kh25wbv.js} +2 -2
- package/dist/{chunk-ch0p7trm.js.map → chunk-5kh25wbv.js.map} +1 -1
- package/dist/chunk-6twxqxj0.js +3 -0
- package/dist/chunk-6twxqxj0.js.map +16 -0
- package/dist/chunk-8pghf7ne.js +3 -0
- package/dist/{chunk-ac7dhq1c.js.map → chunk-8pghf7ne.js.map} +4 -4
- package/dist/chunk-99tdk5x5.js +4 -0
- package/dist/{chunk-sqgv2xyc.js.map → chunk-99tdk5x5.js.map} +2 -2
- package/dist/chunk-b5ke2zpg.js +4 -0
- package/dist/{chunk-9em80ypy.js.map → chunk-b5ke2zpg.js.map} +2 -2
- package/dist/chunk-bxwnddma.js +3 -0
- package/dist/chunk-bxwnddma.js.map +17 -0
- package/dist/{chunk-hnyegpzf.js → chunk-djfe1w23.js} +3 -3
- package/dist/{chunk-hnyegpzf.js.map → chunk-djfe1w23.js.map} +1 -1
- package/dist/chunk-e0yxdcan.js +4 -0
- package/dist/{chunk-k8t4vgx8.js.map → chunk-e0yxdcan.js.map} +2 -2
- package/dist/chunk-ee0c21b5.js +4 -0
- package/dist/{chunk-dfc3y8yn.js.map → chunk-ee0c21b5.js.map} +5 -5
- package/dist/{chunk-rr5j1686.js → chunk-exvtvmb6.js} +2 -2
- package/dist/{chunk-rr5j1686.js.map → chunk-exvtvmb6.js.map} +1 -1
- package/dist/chunk-fskmyztg.js +4 -0
- package/dist/{chunk-vp96f2zv.js.map → chunk-fskmyztg.js.map} +2 -2
- package/dist/{chunk-ewp71f92.js → chunk-g3838fme.js} +2 -2
- package/dist/{chunk-ewp71f92.js.map → chunk-g3838fme.js.map} +1 -1
- package/dist/{chunk-95hz1khz.js → chunk-hydta8h3.js} +2 -2
- package/dist/{chunk-95hz1khz.js.map → chunk-hydta8h3.js.map} +1 -1
- package/dist/{chunk-6y378xez.js → chunk-jwx1ymkq.js} +2 -2
- package/dist/{chunk-6y378xez.js.map → chunk-jwx1ymkq.js.map} +1 -1
- package/dist/chunk-n76mw527.js +11 -0
- package/dist/{chunk-hhbd5qn0.js.map → chunk-n76mw527.js.map} +5 -5
- package/dist/chunk-nwqqr50x.js +4 -0
- package/dist/{chunk-fn89vt9j.js.map → chunk-nwqqr50x.js.map} +6 -6
- package/dist/chunk-setbnv6k.js +7 -0
- package/dist/chunk-setbnv6k.js.map +66 -0
- package/dist/chunk-sywb9k1q.js +4 -0
- package/dist/{chunk-yq60hz8s.js.map → chunk-sywb9k1q.js.map} +6 -6
- package/dist/chunk-zq31anzs.js +8 -0
- package/dist/{chunk-hrf5jh5c.js.map → chunk-zq31anzs.js.map} +2 -2
- package/dist/chunk-zqcc4jxj.js +4 -0
- package/dist/{chunk-77gdtbj7.js.map → chunk-zqcc4jxj.js.map} +2 -2
- package/dist/email/index.js +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/index.js +3 -12
- package/dist/services/index.js.map +4 -15
- package/package.json +2 -2
- package/dist/chunk-1tpqxqmt.js +0 -20
- package/dist/chunk-3pfpq2xc.js +0 -4
- package/dist/chunk-45df2pgm.js +0 -5
- package/dist/chunk-45df2pgm.js.map +0 -65
- package/dist/chunk-740bx4ar.js +0 -3
- package/dist/chunk-740bx4ar.js.map +0 -15
- package/dist/chunk-77gdtbj7.js +0 -4
- package/dist/chunk-9em80ypy.js +0 -4
- package/dist/chunk-ac7dhq1c.js +0 -3
- package/dist/chunk-dfc3y8yn.js +0 -4
- package/dist/chunk-fn89vt9j.js +0 -4
- package/dist/chunk-hhbd5qn0.js +0 -11
- package/dist/chunk-hrf5jh5c.js +0 -8
- package/dist/chunk-k8t4vgx8.js +0 -4
- package/dist/chunk-n34j31ss.js +0 -4
- package/dist/chunk-n34j31ss.js.map +0 -16
- package/dist/chunk-sqgv2xyc.js +0 -4
- package/dist/chunk-srsjrh5y.js +0 -4
- package/dist/chunk-srsjrh5y.js.map +0 -10
- package/dist/chunk-t34vnmky.js +0 -4
- package/dist/chunk-vc1yv3v5.js +0 -4
- package/dist/chunk-vp96f2zv.js +0 -4
- package/dist/chunk-yq60hz8s.js +0 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{Fb as Bn,Gb as pn}from"./chunk-bxwnddma.js";import{Tb as v,Ub as I}from"./chunk-exvtvmb6.js";var En=I((v0,vn)=>{var{defineProperty:l,getOwnPropertyDescriptor:Xt,getOwnPropertyNames:bt}=Object,Kt=Object.prototype.hasOwnProperty,L=(n,c)=>l(n,"name",{value:c,configurable:!0}),St=(n,c)=>{for(var f in c)l(n,f,{get:c[f],enumerable:!0})},Wt=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of bt(c))if(!Kt.call(n,h)&&h!==f)l(n,h,{get:()=>c[h],enumerable:!(t=Xt(c,h))||t.enumerable})}return n},Jt=(n)=>Wt(l({},"__esModule",{value:!0}),n),ln={};St(ln,{constructStack:()=>xn});vn.exports=Jt(ln);var J=L((n,c)=>{let f=[];if(n)f.push(n);if(c)for(let t of c)f.push(t);return f},"getAllAliases"),K=L((n,c)=>{return`${n||"anonymous"}${c&&c.length>0?` (a.k.a. ${c.join(",")})`:""}`},"getMiddlewareNameWithAliases"),xn=L(()=>{let n=[],c=[],f=!1,t=new Set,h=L((u)=>u.sort((E,$)=>On[$.step]-On[E.step]||kn[$.priority||"normal"]-kn[E.priority||"normal"]),"sort"),i=L((u)=>{let E=!1,$=L((N)=>{let y=J(N.name,N.aliases);if(y.includes(u)){E=!0;for(let C of y)t.delete(C);return!1}return!0},"filterCb");return n=n.filter($),c=c.filter($),E},"removeByName"),r=L((u)=>{let E=!1,$=L((N)=>{if(N.middleware===u){E=!0;for(let y of J(N.name,N.aliases))t.delete(y);return!1}return!0},"filterCb");return n=n.filter($),c=c.filter($),E},"removeByReference"),s=L((u)=>{var E;return n.forEach(($)=>{u.add($.middleware,{...$})}),c.forEach(($)=>{u.addRelativeTo($.middleware,{...$})}),(E=u.identifyOnResolve)==null||E.call(u,D.identifyOnResolve()),u},"cloneTo"),w=L((u)=>{let E=[];return u.before.forEach(($)=>{if($.before.length===0&&$.after.length===0)E.push($);else E.push(...w($))}),E.push(u),u.after.reverse().forEach(($)=>{if($.before.length===0&&$.after.length===0)E.push($);else E.push(...w($))}),E},"expandRelativeMiddlewareList"),x=L((u=!1)=>{let E=[],$=[],N={};return n.forEach((C)=>{let U={...C,before:[],after:[]};for(let T of J(U.name,U.aliases))N[T]=U;E.push(U)}),c.forEach((C)=>{let U={...C,before:[],after:[]};for(let T of J(U.name,U.aliases))N[T]=U;$.push(U)}),$.forEach((C)=>{if(C.toMiddleware){let U=N[C.toMiddleware];if(U===void 0){if(u)return;throw new Error(`${C.toMiddleware} is not found when adding ${K(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)}}),h(E).map(w).reduce((C,U)=>{return C.push(...U),C},[])},"getMiddlewareList"),D={add:(u,E={})=>{let{name:$,override:N,aliases:y}=E,C={step:"initialize",priority:"normal",middleware:u,...E},U=J($,y);if(U.length>0){if(U.some((T)=>t.has(T))){if(!N)throw new Error(`Duplicate middleware name '${K($,y)}'`);for(let T of U){let F=n.findIndex((V)=>{var Z;return V.name===T||((Z=V.aliases)==null?void 0:Z.some((W)=>W===T))});if(F===-1)continue;let d=n[F];if(d.step!==C.step||C.priority!==d.priority)throw new Error(`"${K(d.name,d.aliases)}" middleware with ${d.priority} priority in ${d.step} step cannot be overridden by "${K($,y)}" middleware with ${C.priority} priority in ${C.step} step.`);n.splice(F,1)}}for(let T of U)t.add(T)}n.push(C)},addRelativeTo:(u,E)=>{let{name:$,override:N,aliases:y}=E,C={middleware:u,...E},U=J($,y);if(U.length>0){if(U.some((T)=>t.has(T))){if(!N)throw new Error(`Duplicate middleware name '${K($,y)}'`);for(let T of U){let F=c.findIndex((V)=>{var Z;return V.name===T||((Z=V.aliases)==null?void 0:Z.some((W)=>W===T))});if(F===-1)continue;let d=c[F];if(d.toMiddleware!==C.toMiddleware||d.relation!==C.relation)throw new Error(`"${K(d.name,d.aliases)}" middleware ${d.relation} "${d.toMiddleware}" middleware cannot be overridden by "${K($,y)}" middleware ${C.relation} "${C.toMiddleware}" middleware.`);c.splice(F,1)}}for(let T of U)t.add(T)}c.push(C)},clone:()=>s(xn()),use:(u)=>{u.applyToStack(D)},remove:(u)=>{if(typeof u==="string")return i(u);else return r(u)},removeByTag:(u)=>{let E=!1,$=L((N)=>{let{tags:y,name:C,aliases:U}=N;if(y&&y.includes(u)){let T=J(C,U);for(let F of T)t.delete(F);return E=!0,!1}return!0},"filterCb");return n=n.filter($),c=c.filter($),E},concat:(u)=>{var E;let $=s(xn());return $.use(u),$.identifyOnResolve(f||$.identifyOnResolve()||(((E=u.identifyOnResolve)==null?void 0:E.call(u))??!1)),$},applyToStack:s,identify:()=>{return x(!0).map((u)=>{let E=u.step??u.relation+" "+u.toMiddleware;return K(u.name,u.aliases)+" - "+E})},identifyOnResolve(u){if(typeof u==="boolean")f=u;return f},resolve:(u,E)=>{for(let $ of x().map((N)=>N.middleware).reverse())u=$(u,E);if(f)console.log(D.identify());return u}};return D},"constructStack"),On={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},kn={high:3,normal:2,low:1}});var fc=I((tr,cc)=>{var{defineProperty:o,getOwnPropertyDescriptor:Mt,getOwnPropertyNames:Rt}=Object,gt=Object.prototype.hasOwnProperty,At=(n,c)=>o(n,"name",{value:c,configurable:!0}),Ht=(n,c)=>{for(var f in c)o(n,f,{get:c[f],enumerable:!0})},Pt=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Rt(c))if(!gt.call(n,h)&&h!==f)o(n,h,{get:()=>c[h],enumerable:!(t=Mt(c,h))||t.enumerable})}return n},Ot=(n)=>Pt(o({},"__esModule",{value:!0}),n),nc={};Ht(nc,{isArrayBuffer:()=>kt});cc.exports=Ot(nc);var kt=At((n)=>typeof ArrayBuffer==="function"&&n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]","isArrayBuffer")});var g=I((hr,ic)=>{var{defineProperty:p,getOwnPropertyDescriptor:lt,getOwnPropertyNames:vt}=Object,ot=Object.prototype.hasOwnProperty,tc=(n,c)=>p(n,"name",{value:c,configurable:!0}),pt=(n,c)=>{for(var f in c)p(n,f,{get:c[f],enumerable:!0})},qt=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of vt(c))if(!ot.call(n,h)&&h!==f)p(n,h,{get:()=>c[h],enumerable:!(t=lt(c,h))||t.enumerable})}return n},et=(n)=>qt(p({},"__esModule",{value:!0}),n),hc={};pt(hc,{fromArrayBuffer:()=>mt,fromString:()=>_t});ic.exports=et(hc);var at=fc(),Fn=import.meta.require("buffer"),mt=tc((n,c=0,f=n.byteLength-c)=>{if(!at.isArrayBuffer(n))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof n} (${n})`);return Fn.Buffer.from(n,c,f)},"fromArrayBuffer"),_t=tc((n,c)=>{if(typeof n!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof n} (${n})`);return c?Fn.Buffer.from(n,c):Fn.Buffer.from(n)},"fromString")});var wc=I((rc)=>{Object.defineProperty(rc,"__esModule",{value:!0});rc.fromBase64=void 0;var nh=g(),ch=/^[A-Za-z0-9+/]*={0,2}$/,fh=(n)=>{if(n.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!ch.exec(n))throw new TypeError("Invalid base64 string.");let c=nh.fromString(n,"base64");return new Uint8Array(c.buffer,c.byteOffset,c.byteLength)};rc.fromBase64=fh});var e=I((rr,xc)=>{var{defineProperty:q,getOwnPropertyDescriptor:th,getOwnPropertyNames:hh}=Object,ih=Object.prototype.hasOwnProperty,Cn=(n,c)=>q(n,"name",{value:c,configurable:!0}),rh=(n,c)=>{for(var f in c)q(n,f,{get:c[f],enumerable:!0})},sh=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of hh(c))if(!ih.call(n,h)&&h!==f)q(n,h,{get:()=>c[h],enumerable:!(t=th(c,h))||t.enumerable})}return n},wh=(n)=>sh(q({},"__esModule",{value:!0}),n),uc={};rh(uc,{fromUtf8:()=>Tc,toUint8Array:()=>uh,toUtf8:()=>$h});xc.exports=wh(uc);var $c=g(),Tc=Cn((n)=>{let c=$c.fromString(n,"utf8");return new Uint8Array(c.buffer,c.byteOffset,c.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),uh=Cn((n)=>{if(typeof n==="string")return Tc(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(n)},"toUint8Array"),$h=Cn((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 $c.fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength).toString("utf8")},"toUtf8")});var Cc=I((Ec)=>{Object.defineProperty(Ec,"__esModule",{value:!0});Ec.toBase64=void 0;var Th=g(),xh=e(),Eh=(n)=>{let c;if(typeof n==="string")c=xh.fromUtf8(n);else c=n;if(typeof c!=="object"||typeof c.byteOffset!=="number"||typeof c.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Th.fromArrayBuffer(c.buffer,c.byteOffset,c.byteLength).toString("base64")};Ec.toBase64=Eh});var m=I((wr,a)=>{var{defineProperty:Uc,getOwnPropertyDescriptor:Fh,getOwnPropertyNames:Ch}=Object,Uh=Object.prototype.hasOwnProperty,Un=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Ch(c))if(!Uh.call(n,h)&&h!==f)Uc(n,h,{get:()=>c[h],enumerable:!(t=Fh(c,h))||t.enumerable})}return n},Nc=(n,c,f)=>(Un(n,c,"default"),f&&Un(f,c,"default")),Nh=(n)=>Un(Uc({},"__esModule",{value:!0}),n),Nn={};a.exports=Nh(Nn);Nc(Nn,wc(),a.exports);Nc(Nn,Cc(),a.exports)});var yc=I((dc)=>{Object.defineProperty(dc,"__esModule",{value:!0});dc.getAwsChunkedEncodingStream=void 0;var dh=import.meta.require("stream"),Dh=(n,c)=>{let{base64Encoder:f,bodyLengthChecker:t,checksumAlgorithmFn:h,checksumLocationName:i,streamHasher:r}=c,s=f!==void 0&&h!==void 0&&i!==void 0&&r!==void 0,w=s?r(h,n):void 0,x=new dh.Readable({read:()=>{}});return n.on("data",(D)=>{let u=t(D)||0;x.push(`${u.toString(16)}\r\n`),x.push(D),x.push("\r\n")}),n.on("end",async()=>{if(x.push("0\r\n"),s){let D=f(await w);x.push(`${i}:${D}\r\n`),x.push("\r\n")}x.push(null)}),x};dc.getAwsChunkedEncodingStream=Dh});var bc=I(($r,Xc)=>{var{defineProperty:_,getOwnPropertyDescriptor:yh,getOwnPropertyNames:Yh}=Object,Ih=Object.prototype.hasOwnProperty,nn=(n,c)=>_(n,"name",{value:c,configurable:!0}),zh=(n,c)=>{for(var f in c)_(n,f,{get:c[f],enumerable:!0})},Vh=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Yh(c))if(!Ih.call(n,h)&&h!==f)_(n,h,{get:()=>c[h],enumerable:!(t=yh(c,h))||t.enumerable})}return n},Zh=(n)=>Vh(_({},"__esModule",{value:!0}),n),Yc={};zh(Yc,{AlgorithmId:()=>Zc,EndpointURLScheme:()=>Vc,FieldPosition:()=>Gc,HttpApiKeyAuthLocation:()=>zc,HttpAuthLocation:()=>Ic,IniSectionType:()=>Lc,RequestHandlerProtocol:()=>Qc,SMITHY_CONTEXT_KEY:()=>bh,getDefaultClientConfiguration:()=>Qh,resolveDefaultRuntimeConfig:()=>Xh});Xc.exports=Zh(Yc);var Ic=((n)=>{return n.HEADER="header",n.QUERY="query",n})(Ic||{}),zc=((n)=>{return n.HEADER="header",n.QUERY="query",n})(zc||{}),Vc=((n)=>{return n.HTTP="http",n.HTTPS="https",n})(Vc||{}),Zc=((n)=>{return n.MD5="md5",n.CRC32="crc32",n.CRC32C="crc32c",n.SHA1="sha1",n.SHA256="sha256",n})(Zc||{}),Gh=nn((n)=>{let c=[];if(n.sha256!==void 0)c.push({algorithmId:()=>"sha256",checksumConstructor:()=>n.sha256});if(n.md5!=null)c.push({algorithmId:()=>"md5",checksumConstructor:()=>n.md5});return{_checksumAlgorithms:c,addChecksumAlgorithm(f){this._checksumAlgorithms.push(f)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),Lh=nn((n)=>{let c={};return n.checksumAlgorithms().forEach((f)=>{c[f.algorithmId()]=f.checksumConstructor()}),c},"resolveChecksumRuntimeConfig"),Qh=nn((n)=>{return{...Gh(n)}},"getDefaultClientConfiguration"),Xh=nn((n)=>{return{...Lh(n)}},"resolveDefaultRuntimeConfig"),Gc=((n)=>{return n[n.HEADER=0]="HEADER",n[n.TRAILER=1]="TRAILER",n})(Gc||{}),bh="__smithy_context",Lc=((n)=>{return n.PROFILE="profile",n.SSO_SESSION="sso-session",n.SERVICES="services",n})(Lc||{}),Qc=((n)=>{return n.HTTP_0_9="http/0.9",n.HTTP_1_0="http/1.0",n.TDS_8_0="tds/8.0",n})(Qc||{})});var dn=I((Tr,gc)=>{var{defineProperty:cn,getOwnPropertyDescriptor:Kh,getOwnPropertyNames:Sh}=Object,Wh=Object.prototype.hasOwnProperty,S=(n,c)=>cn(n,"name",{value:c,configurable:!0}),Jh=(n,c)=>{for(var f in c)cn(n,f,{get:c[f],enumerable:!0})},Bh=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Sh(c))if(!Wh.call(n,h)&&h!==f)cn(n,h,{get:()=>c[h],enumerable:!(t=Kh(c,h))||t.enumerable})}return n},jh=(n)=>Bh(cn({},"__esModule",{value:!0}),n),Kc={};Jh(Kc,{Field:()=>gh,Fields:()=>Ah,HttpRequest:()=>Hh,HttpResponse:()=>Ph,IHttpRequest:()=>Sc.HttpRequest,getHttpHandlerExtensionConfiguration:()=>Mh,isValidHostname:()=>Rc,resolveHttpHandlerRuntimeConfig:()=>Rh});gc.exports=jh(Kc);var Mh=S((n)=>{let c=n.httpHandler;return{setHttpHandler(f){c=f},httpHandler(){return c},updateHttpClientConfig(f,t){c.updateHttpClientConfig(f,t)},httpHandlerConfigs(){return c.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),Rh=S((n)=>{return{httpHandler:n.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),Sc=bc(),Wc=class n{constructor({name:c,kind:f=Sc.FieldPosition.HEADER,values:t=[]}){this.name=c,this.kind=f,this.values=t}add(c){this.values.push(c)}set(c){this.values=c}remove(c){this.values=this.values.filter((f)=>f!==c)}toString(){return this.values.map((c)=>c.includes(",")||c.includes(" ")?`"${c}"`:c).join(", ")}get(){return this.values}};S(Wc,"Field");var gh=Wc,Jc=class n{constructor({fields:c=[],encoding:f="utf-8"}){this.entries={},c.forEach(this.setField.bind(this)),this.encoding=f}setField(c){this.entries[c.name.toLowerCase()]=c}getField(c){return this.entries[c.toLowerCase()]}removeField(c){delete this.entries[c.toLowerCase()]}getByType(c){return Object.values(this.entries).filter((f)=>f.kind===c)}};S(Jc,"Fields");var Ah=Jc,Bc=class n{constructor(c){this.method=c.method||"GET",this.hostname=c.hostname||"localhost",this.port=c.port,this.query=c.query||{},this.headers=c.headers||{},this.body=c.body,this.protocol=c.protocol?c.protocol.slice(-1)!==":"?`${c.protocol}:`:c.protocol:"https:",this.path=c.path?c.path.charAt(0)!=="/"?`/${c.path}`:c.path:"/",this.username=c.username,this.password=c.password,this.fragment=c.fragment}static clone(c){let f=new n({...c,headers:{...c.headers}});if(f.query)f.query=jc(f.query);return f}static isInstance(c){if(!c)return!1;let f=c;return"method"in f&&"protocol"in f&&"hostname"in f&&"path"in f&&typeof f.query==="object"&&typeof f.headers==="object"}clone(){return n.clone(this)}};S(Bc,"HttpRequest");var Hh=Bc;function jc(n){return Object.keys(n).reduce((c,f)=>{let t=n[f];return{...c,[f]:Array.isArray(t)?[...t]:t}},{})}S(jc,"cloneQuery");var Mc=class n{constructor(c){this.statusCode=c.statusCode,this.reason=c.reason,this.headers=c.headers||{},this.body=c.body}static isInstance(c){if(!c)return!1;let f=c;return typeof f.statusCode==="number"&&typeof f.headers==="object"}};S(Mc,"HttpResponse");var Ph=Mc;function Rc(n){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(n)}S(Rc,"isValidHostname")});var yn=I((xr,Pc)=>{var{defineProperty:fn,getOwnPropertyDescriptor:Oh,getOwnPropertyNames:kh}=Object,lh=Object.prototype.hasOwnProperty,Dn=(n,c)=>fn(n,"name",{value:c,configurable:!0}),vh=(n,c)=>{for(var f in c)fn(n,f,{get:c[f],enumerable:!0})},oh=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of kh(c))if(!lh.call(n,h)&&h!==f)fn(n,h,{get:()=>c[h],enumerable:!(t=Oh(c,h))||t.enumerable})}return n},ph=(n)=>oh(fn({},"__esModule",{value:!0}),n),Ac={};vh(Ac,{escapeUri:()=>Hc,escapeUriPath:()=>eh});Pc.exports=ph(Ac);var Hc=Dn((n)=>encodeURIComponent(n).replace(/[!'()*]/g,qh),"escapeUri"),qh=Dn((n)=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),eh=Dn((n)=>n.split("/").map(Hc).join("/"),"escapeUriPath")});var In=I((Er,lc)=>{var{defineProperty:tn,getOwnPropertyDescriptor:ah,getOwnPropertyNames:mh}=Object,_h=Object.prototype.hasOwnProperty,ni=(n,c)=>tn(n,"name",{value:c,configurable:!0}),ci=(n,c)=>{for(var f in c)tn(n,f,{get:c[f],enumerable:!0})},fi=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of mh(c))if(!_h.call(n,h)&&h!==f)tn(n,h,{get:()=>c[h],enumerable:!(t=ah(c,h))||t.enumerable})}return n},ti=(n)=>fi(tn({},"__esModule",{value:!0}),n),Oc={};ci(Oc,{buildQueryString:()=>kc});lc.exports=ti(Oc);var Yn=yn();function kc(n){let c=[];for(let f of Object.keys(n).sort()){let t=n[f];if(f=Yn.escapeUri(f),Array.isArray(t))for(let h=0,i=t.length;h<i;h++)c.push(`${f}=${Yn.escapeUri(t[h])}`);else{let h=f;if(t||typeof t==="string")h+=`=${Yn.escapeUri(t)}`;c.push(h)}}return c.join("&")}ni(kc,"buildQueryString")});var Tf=I((Fr,$f)=>{var{create:hi,defineProperty:A,getOwnPropertyDescriptor:ii,getOwnPropertyNames:ri,getPrototypeOf:si}=Object,wi=Object.prototype.hasOwnProperty,Y=(n,c)=>A(n,"name",{value:c,configurable:!0}),ui=(n,c)=>{for(var f in c)A(n,f,{get:c[f],enumerable:!0})},ec=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of ri(c))if(!wi.call(n,h)&&h!==f)A(n,h,{get:()=>c[h],enumerable:!(t=ii(c,h))||t.enumerable})}return n},$i=(n,c,f)=>(f=n!=null?hi(si(n)):{},ec(c||!n||!n.__esModule?A(f,"default",{value:n,enumerable:!0}):f,n)),Ti=(n)=>ec(A({},"__esModule",{value:!0}),n),ac={};ui(ac,{DEFAULT_REQUEST_TIMEOUT:()=>Ni,NodeHttp2Handler:()=>Ii,NodeHttpHandler:()=>di,streamCollector:()=>Vi});$f.exports=Ti(ac);var mc=dn(),_c=In(),zn=import.meta.require("http"),Vn=import.meta.require("https"),xi=["ECONNRESET","EPIPE","ETIMEDOUT"],nf=Y((n)=>{let c={};for(let f of Object.keys(n)){let t=n[f];c[f]=Array.isArray(t)?t.join(","):t}return c},"getTransformedHeaders"),vc=1000,Ei=Y((n,c,f=0)=>{if(!f)return-1;let t=Y((h)=>{let i=setTimeout(()=>{n.destroy(),c(Object.assign(new Error(`Socket timed out without establishing a connection within ${f} ms`),{name:"TimeoutError"}))},f-h),r=Y((s)=>{if(s==null?void 0:s.connecting)s.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)},"doWithSocket");if(n.socket)r(n.socket);else n.on("socket",r)},"registerTimeout");if(f<2000)return t(0),0;return setTimeout(t.bind(null,vc),vc)},"setConnectionTimeout"),Fi=3000,Ci=Y((n,{keepAlive:c,keepAliveMsecs:f},t=Fi)=>{if(c!==!0)return-1;let h=Y(()=>{if(n.socket)n.socket.setKeepAlive(c,f||0);else n.on("socket",(i)=>{i.setKeepAlive(c,f||0)})},"registerListener");if(t===0)return h(),0;return setTimeout(h,t)},"setSocketKeepAlive"),oc=3000,Ui=Y((n,c,f=0)=>{let t=Y((h)=>{n.setTimeout(f-h,()=>{n.destroy(),c(Object.assign(new Error(`Connection timed out after ${f} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<f&&f<6000)return t(0),0;return setTimeout(t.bind(null,f===0?0:oc),oc)},"setSocketTimeout"),cf=import.meta.require("stream"),pc=1000;async function Zn(n,c,f=pc){let t=c.headers??{},h=t.Expect||t.expect,i=-1,r=!1;if(h==="100-continue")await Promise.race([new Promise((s)=>{i=Number(setTimeout(s,Math.max(pc,f)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(i),s()}),n.on("error",()=>{r=!0,clearTimeout(i),s()})})]);if(!r)ff(n,c.body)}Y(Zn,"writeRequestBody");function ff(n,c){if(c instanceof cf.Readable){c.pipe(n);return}if(c){if(Buffer.isBuffer(c)||typeof c==="string"){n.end(c);return}let f=c;if(typeof f==="object"&&f.buffer&&typeof f.byteOffset==="number"&&typeof f.byteLength==="number"){n.end(Buffer.from(f.buffer,f.byteOffset,f.byteLength));return}n.end(Buffer.from(c));return}n.end()}Y(ff,"writeBody");var Ni=0,tf=class n{constructor(c){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((f,t)=>{if(typeof c==="function")c().then((h)=>{f(this.resolveDefaultConfig(h))}).catch(t);else f(this.resolveDefaultConfig(c))})}static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}static checkSocketUsage(c,f,t=console){var h,i,r;let{sockets:s,requests:w,maxSockets:x}=c;if(typeof x!=="number"||x===1/0)return f;let D=15000;if(Date.now()-D<f)return f;if(s&&w)for(let u in s){let E=((h=s[u])==null?void 0:h.length)??0,$=((i=w[u])==null?void 0:i.length)??0;if(E>=x&&$>=2*x)return(r=t==null?void 0:t.warn)==null||r.call(t,`@smithy/node-http-handler:WARN - socket usage at capacity=${E} and ${$} 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 f}resolveDefaultConfig(c){let{requestTimeout:f,connectionTimeout:t,socketTimeout:h,httpAgent:i,httpsAgent:r}=c||{},s=!0,w=50;return{connectionTimeout:t,requestTimeout:f??h,httpAgent:(()=>{if(i instanceof zn.Agent||typeof(i==null?void 0:i.destroy)==="function")return i;return new zn.Agent({keepAlive:!0,maxSockets:50,...i})})(),httpsAgent:(()=>{if(r instanceof Vn.Agent||typeof(r==null?void 0:r.destroy)==="function")return r;return new Vn.Agent({keepAlive:!0,maxSockets:50,...r})})(),logger:console}}destroy(){var c,f,t,h;(f=(c=this.config)==null?void 0:c.httpAgent)==null||f.destroy(),(h=(t=this.config)==null?void 0:t.httpsAgent)==null||h.destroy()}async handle(c,{abortSignal:f}={}){if(!this.config)this.config=await this.configProvider;return new Promise((t,h)=>{let i=void 0,r=[],s=Y(async(F)=>{await i,r.forEach(clearTimeout),t(F)},"resolve"),w=Y(async(F)=>{await i,r.forEach(clearTimeout),h(F)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(f==null?void 0:f.aborted){let F=new Error("Request aborted");F.name="AbortError",w(F);return}let x=c.protocol==="https:",D=x?this.config.httpsAgent:this.config.httpAgent;r.push(setTimeout(()=>{this.socketWarningTimestamp=n.checkSocketUsage(D,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let u=_c.buildQueryString(c.query||{}),E=void 0;if(c.username!=null||c.password!=null){let F=c.username??"",d=c.password??"";E=`${F}:${d}`}let $=c.path;if(u)$+=`?${u}`;if(c.fragment)$+=`#${c.fragment}`;let N=c.hostname??"";if(N[0]==="["&&N.endsWith("]"))N=c.hostname.slice(1,-1);else N=c.hostname;let y={headers:c.headers,host:N,method:c.method,path:$,port:c.port,agent:D,auth:E},U=(x?Vn.request:zn.request)(y,(F)=>{let d=new mc.HttpResponse({statusCode:F.statusCode||-1,reason:F.statusMessage,headers:nf(F.headers),body:F});s({response:d})});if(U.on("error",(F)=>{if(xi.includes(F.code))w(Object.assign(F,{name:"TimeoutError"}));else w(F)}),f){let F=Y(()=>{U.destroy();let d=new Error("Request aborted");d.name="AbortError",w(d)},"onAbort");if(typeof f.addEventListener==="function"){let d=f;d.addEventListener("abort",F,{once:!0}),U.once("close",()=>d.removeEventListener("abort",F))}else f.onabort=F}r.push(Ei(U,w,this.config.connectionTimeout)),r.push(Ui(U,w,this.config.requestTimeout));let T=y.agent;if(typeof T==="object"&&"keepAlive"in T)r.push(Ci(U,{keepAlive:T.keepAlive,keepAliveMsecs:T.keepAliveMsecs}));i=Zn(U,c,this.config.requestTimeout).catch((F)=>{return r.forEach(clearTimeout),h(F)})})}updateHttpClientConfig(c,f){this.config=void 0,this.configProvider=this.configProvider.then((t)=>{return{...t,[c]:f}})}httpHandlerConfigs(){return this.config??{}}};Y(tf,"NodeHttpHandler");var di=tf,qc=import.meta.require("http2"),Di=$i(import.meta.require("http2")),hf=class n{constructor(c){this.sessions=[],this.sessions=c??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(c){this.sessions.push(c)}contains(c){return this.sessions.includes(c)}remove(c){this.sessions=this.sessions.filter((f)=>f!==c)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(c){for(let f of this.sessions)if(f===c){if(!f.destroyed)f.destroy()}}};Y(hf,"NodeHttp2ConnectionPool");var yi=hf,rf=class n{constructor(c){if(this.sessionCache=new Map,this.config=c,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(c,f){let t=this.getUrlString(c),h=this.sessionCache.get(t);if(h){let w=h.poll();if(w&&!this.config.disableConcurrency)return w}let i=Di.default.connect(t);if(this.config.maxConcurrency)i.settings({maxConcurrentStreams:this.config.maxConcurrency},(w)=>{if(w)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+c.destination.toString())});i.unref();let r=Y(()=>{i.destroy(),this.deleteSession(t,i)},"destroySessionCb");if(i.on("goaway",r),i.on("error",r),i.on("frameError",r),i.on("close",()=>this.deleteSession(t,i)),f.requestTimeout)i.setTimeout(f.requestTimeout,r);let s=this.sessionCache.get(t)||new yi;return s.offerLast(i),this.sessionCache.set(t,s),i}deleteSession(c,f){let t=this.sessionCache.get(c);if(!t)return;if(!t.contains(f))return;t.remove(f),this.sessionCache.set(c,t)}release(c,f){var t;let h=this.getUrlString(c);(t=this.sessionCache.get(h))==null||t.offerLast(f)}destroy(){for(let[c,f]of this.sessionCache){for(let t of f){if(!t.destroyed)t.destroy();f.remove(t)}this.sessionCache.delete(c)}}setMaxConcurrentStreams(c){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=c}setDisableConcurrentStreams(c){this.config.disableConcurrency=c}getUrlString(c){return c.destination.toString()}};Y(rf,"NodeHttp2ConnectionManager");var Yi=rf,sf=class n{constructor(c){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Yi({}),this.configProvider=new Promise((f,t)=>{if(typeof c==="function")c().then((h)=>{f(h||{})}).catch(t);else f(c||{})})}static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}destroy(){this.connectionManager.destroy()}async handle(c,{abortSignal:f}={}){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:t,disableConcurrentStreams:h}=this.config;return new Promise((i,r)=>{var s;let w=!1,x=void 0,D=Y(async(z)=>{await x,i(z)},"resolve"),u=Y(async(z)=>{await x,r(z)},"reject");if(f==null?void 0:f.aborted){w=!0;let z=new Error("Request aborted");z.name="AbortError",u(z);return}let{hostname:E,method:$,port:N,protocol:y,query:C}=c,U="";if(c.username!=null||c.password!=null){let z=c.username??"",Q=c.password??"";U=`${z}:${Q}@`}let T=`${y}//${U}${E}${N?`:${N}`:""}`,F={destination:new URL(T)},d=this.connectionManager.lease(F,{requestTimeout:(s=this.config)==null?void 0:s.sessionTimeout,disableConcurrentStreams:h||!1}),V=Y((z)=>{if(h)this.destroySession(d);w=!0,u(z)},"rejectWithDestroy"),Z=_c.buildQueryString(C||{}),W=c.path;if(Z)W+=`?${Z}`;if(c.fragment)W+=`#${c.fragment}`;let G=d.request({...c.headers,[qc.constants.HTTP2_HEADER_PATH]:W,[qc.constants.HTTP2_HEADER_METHOD]:$});if(d.ref(),G.on("response",(z)=>{let Q=new mc.HttpResponse({statusCode:z[":status"]||-1,headers:nf(z),body:G});if(w=!0,D({response:Q}),h)d.close(),this.connectionManager.deleteSession(T,d)}),t)G.setTimeout(t,()=>{G.close();let z=new Error(`Stream timed out because of no activity for ${t} ms`);z.name="TimeoutError",V(z)});if(f){let z=Y(()=>{G.close();let Q=new Error("Request aborted");Q.name="AbortError",V(Q)},"onAbort");if(typeof f.addEventListener==="function"){let Q=f;Q.addEventListener("abort",z,{once:!0}),G.once("close",()=>Q.removeEventListener("abort",z))}else f.onabort=z}G.on("frameError",(z,Q,Qt)=>{V(new Error(`Frame type id ${z} in stream id ${Qt} has failed with code ${Q}.`))}),G.on("error",V),G.on("aborted",()=>{V(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${G.rstCode}.`))}),G.on("close",()=>{if(d.unref(),h)d.destroy();if(!w)V(new Error("Unexpected error: http2 request did not get a response"))}),x=Zn(G,c,t)})}updateHttpClientConfig(c,f){this.config=void 0,this.configProvider=this.configProvider.then((t)=>{return{...t,[c]:f}})}httpHandlerConfigs(){return this.config??{}}destroySession(c){if(!c.destroyed)c.destroy()}};Y(sf,"NodeHttp2Handler");var Ii=sf,wf=class n extends cf.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(c,f,t){this.bufferedBytes.push(c),t()}};Y(wf,"Collector");var zi=wf,Vi=Y((n)=>{if(Zi(n))return uf(n);return new Promise((c,f)=>{let t=new zi;n.pipe(t),n.on("error",(h)=>{t.end(),f(h)}),t.on("error",f),t.on("finish",function(){let h=new Uint8Array(Buffer.concat(this.bufferedBytes));c(h)})})},"streamCollector"),Zi=Y((n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream,"isReadableStreamInstance");async function uf(n){let c=[],f=n.getReader(),t=!1,h=0;while(!t){let{done:s,value:w}=await f.read();if(w)c.push(w),h+=w.length;t=s}let i=new Uint8Array(h),r=0;for(let s of c)i.set(s,r),r+=s.length;return i}Y(uf,"collectReadableStream")});var yf=I((Cr,Df)=>{var{defineProperty:rn,getOwnPropertyDescriptor:Gi,getOwnPropertyNames:Li}=Object,Qi=Object.prototype.hasOwnProperty,b=(n,c)=>rn(n,"name",{value:c,configurable:!0}),Xi=(n,c)=>{for(var f in c)rn(n,f,{get:c[f],enumerable:!0})},bi=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Li(c))if(!Qi.call(n,h)&&h!==f)rn(n,h,{get:()=>c[h],enumerable:!(t=Gi(c,h))||t.enumerable})}return n},Ki=(n)=>bi(rn({},"__esModule",{value:!0}),n),Ef={};Xi(Ef,{FetchHttpHandler:()=>Wi,keepAliveSupport:()=>hn,streamCollector:()=>Bi});Df.exports=Ki(Ef);var xf=dn(),Si=In();function Ff(n=0){return new Promise((c,f)=>{if(n)setTimeout(()=>{let t=new Error(`Request did not complete within ${n} ms`);t.name="TimeoutError",f(t)},n)})}b(Ff,"requestTimeout");var hn={supported:void 0},Cf=class n{static create(c){if(typeof(c==null?void 0:c.handle)==="function")return c;return new n(c)}constructor(c){if(typeof c==="function")this.configProvider=c().then((f)=>f||{});else this.config=c??{},this.configProvider=Promise.resolve(this.config);if(hn.supported===void 0)hn.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(c,{abortSignal:f}={}){var t;if(!this.config)this.config=await this.configProvider;let h=this.config.requestTimeout,i=this.config.keepAlive===!0,r=this.config.credentials;if(f==null?void 0:f.aborted){let T=new Error("Request aborted");return T.name="AbortError",Promise.reject(T)}let s=c.path,w=Si.buildQueryString(c.query||{});if(w)s+=`?${w}`;if(c.fragment)s+=`#${c.fragment}`;let x="";if(c.username!=null||c.password!=null){let T=c.username??"",F=c.password??"";x=`${T}:${F}@`}let{port:D,method:u}=c,E=`${c.protocol}//${x}${c.hostname}${D?`:${D}`:""}${s}`,$=u==="GET"||u==="HEAD"?void 0:c.body,N={body:$,headers:new Headers(c.headers),method:u,credentials:r};if((t=this.config)==null?void 0:t.cache)N.cache=this.config.cache;if($)N.duplex="half";if(typeof AbortController!=="undefined")N.signal=f;if(hn.supported)N.keepalive=i;if(typeof this.config.requestInit==="function")Object.assign(N,this.config.requestInit(c));let y=b(()=>{},"removeSignalEventListener"),C=new Request(E,N),U=[fetch(C).then((T)=>{let F=T.headers,d={};for(let Z of F.entries())d[Z[0]]=Z[1];if(T.body==null)return T.blob().then((Z)=>({response:new xf.HttpResponse({headers:d,reason:T.statusText,statusCode:T.status,body:Z})}));return{response:new xf.HttpResponse({headers:d,reason:T.statusText,statusCode:T.status,body:T.body})}}),Ff(h)];if(f)U.push(new Promise((T,F)=>{let d=b(()=>{let V=new Error("Request aborted");V.name="AbortError",F(V)},"onAbort");if(typeof f.addEventListener==="function"){let V=f;V.addEventListener("abort",d,{once:!0}),y=b(()=>V.removeEventListener("abort",d),"removeSignalEventListener")}else f.onabort=d}));return Promise.race(U).finally(y)}updateHttpClientConfig(c,f){this.config=void 0,this.configProvider=this.configProvider.then((t)=>{return t[c]=f,t})}httpHandlerConfigs(){return this.config??{}}};b(Cf,"FetchHttpHandler");var Wi=Cf,Ji=m(),Bi=b((n)=>{if(typeof Blob==="function"&&n instanceof Blob)return Uf(n);return Nf(n)},"streamCollector");async function Uf(n){let c=await df(n),f=Ji.fromBase64(c);return new Uint8Array(f)}b(Uf,"collectBlob");async function Nf(n){let c=[],f=n.getReader(),t=!1,h=0;while(!t){let{done:s,value:w}=await f.read();if(w)c.push(w),h+=w.length;t=s}let i=new Uint8Array(h),r=0;for(let s of c)i.set(s,r),r+=s.length;return i}b(Nf,"collectStream");function df(n){return new Promise((c,f)=>{let t=new FileReader;t.onloadend=()=>{if(t.readyState!==2)return f(new Error("Reader aborted too early"));let h=t.result??"",i=h.indexOf(","),r=i>-1?i+1:h.length;c(h.substring(r))},t.onabort=()=>f(new Error("Read aborted")),t.onerror=()=>f(t.error),t.readAsDataURL(n)})}b(df,"readToBase64")});var Lf=I((Ur,Gf)=>{var{defineProperty:sn,getOwnPropertyDescriptor:ji,getOwnPropertyNames:Mi}=Object,Ri=Object.prototype.hasOwnProperty,Yf=(n,c)=>sn(n,"name",{value:c,configurable:!0}),gi=(n,c)=>{for(var f in c)sn(n,f,{get:c[f],enumerable:!0})},Ai=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of Mi(c))if(!Ri.call(n,h)&&h!==f)sn(n,h,{get:()=>c[h],enumerable:!(t=ji(c,h))||t.enumerable})}return n},Hi=(n)=>Ai(sn({},"__esModule",{value:!0}),n),If={};gi(If,{fromHex:()=>Vf,toHex:()=>Zf});Gf.exports=Hi(If);var zf={},Gn={};for(let n=0;n<256;n++){let c=n.toString(16).toLowerCase();if(c.length===1)c=`0${c}`;zf[n]=c,Gn[c]=n}function Vf(n){if(n.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let c=new Uint8Array(n.length/2);for(let f=0;f<n.length;f+=2){let t=n.slice(f,f+2).toLowerCase();if(t in Gn)c[f/2]=Gn[t];else throw new Error(`Cannot decode unrecognized sequence ${t} as hexadecimal`)}return c}Yf(Vf,"fromHex");function Zf(n){let c="";for(let f=0;f<n.byteLength;f++)c+=zf[n[f]];return c}Yf(Zf,"toHex")});var H=I((Qf)=>{Object.defineProperty(Qf,"__esModule",{value:!0});Qf.isReadableStream=void 0;var Pi=(n)=>{var c;return typeof ReadableStream==="function"&&(((c=n===null||n===void 0?void 0:n.constructor)===null||c===void 0?void 0:c.name)===ReadableStream.name||n instanceof ReadableStream)};Qf.isReadableStream=Pi});var Bf=I((Wf)=>{Object.defineProperty(Wf,"__esModule",{value:!0});Wf.sdkStreamMixin=void 0;var Oi=yf(),ki=m(),li=Lf(),vi=e(),bf=H(),Kf="The stream has already been transformed.",oi=(n)=>{var c,f;if(!Sf(n)&&!bf.isReadableStream(n)){let r=((f=(c=n===null||n===void 0?void 0:n.__proto__)===null||c===void 0?void 0:c.constructor)===null||f===void 0?void 0:f.name)||n;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${r}`)}let t=!1,h=async()=>{if(t)throw new Error(Kf);return t=!0,await Oi.streamCollector(n)},i=(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:h,transformToString:async(r)=>{let s=await h();if(r==="base64")return ki.toBase64(s);else if(r==="hex")return li.toHex(s);else if(r===void 0||r==="utf8"||r==="utf-8")return vi.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(t)throw new Error(Kf);if(t=!0,Sf(n))return i(n);else if(bf.isReadableStream(n))return n;else throw new Error(`Cannot transform payload to web stream, got ${n}`)}})};Wf.sdkStreamMixin=oi;var Sf=(n)=>typeof Blob==="function"&&n instanceof Blob});var gf=I((Mf)=>{Object.defineProperty(Mf,"__esModule",{value:!0});Mf.sdkStreamMixin=void 0;var pi=Tf(),qi=g(),Ln=import.meta.require("stream"),ei=import.meta.require("util"),ai=Bf(),jf="The stream has already been transformed.",mi=(n)=>{var c,f;if(!(n instanceof Ln.Readable))try{return ai.sdkStreamMixin(n)}catch(i){let r=((f=(c=n===null||n===void 0?void 0:n.__proto__)===null||c===void 0?void 0:c.constructor)===null||f===void 0?void 0:f.name)||n;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${r}`)}let t=!1,h=async()=>{if(t)throw new Error(jf);return t=!0,await pi.streamCollector(n)};return Object.assign(n,{transformToByteArray:h,transformToString:async(i)=>{let r=await h();if(i===void 0||Buffer.isEncoding(i))return qi.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString(i);else return new ei.TextDecoder(i).decode(r)},transformToWebStream:()=>{if(t)throw new Error(jf);if(n.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Ln.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 t=!0,Ln.Readable.toWeb(n)}})};Mf.sdkStreamMixin=mi});var Pf=I((Af)=>{Object.defineProperty(Af,"__esModule",{value:!0});Af.splitStream=void 0;async function _i(n){if(typeof n.stream==="function")n=n.stream();return n.tee()}Af.splitStream=_i});var vf=I((kf)=>{Object.defineProperty(kf,"__esModule",{value:!0});kf.splitStream=void 0;var Of=import.meta.require("stream"),n0=Pf(),c0=H();async function f0(n){if(c0.isReadableStream(n))return n0.splitStream(n);let c=new Of.PassThrough,f=new Of.PassThrough;return n.pipe(c),n.pipe(f),[c,f]}kf.splitStream=f0});var qf=I((of)=>{Object.defineProperty(of,"__esModule",{value:!0});of.headStream=void 0;async function t0(n,c){var f;let t=0,h=[],i=n.getReader(),r=!1;while(!r){let{done:x,value:D}=await i.read();if(D)h.push(D),t+=(f=D===null||D===void 0?void 0:D.byteLength)!==null&&f!==void 0?f:0;if(t>=c)break;r=x}i.releaseLock();let s=new Uint8Array(Math.min(c,t)),w=0;for(let x of h){if(x.byteLength>s.byteLength-w){s.set(x.subarray(0,s.byteLength-w),w);break}else s.set(x,w);w+=x.length}return s}of.headStream=t0});var _f=I((af)=>{Object.defineProperty(af,"__esModule",{value:!0});af.headStream=void 0;var h0=import.meta.require("stream"),i0=qf(),r0=H(),s0=(n,c)=>{if(r0.isReadableStream(n))return i0.headStream(n,c);return new Promise((f,t)=>{let h=new ef;h.limit=c,n.pipe(h),n.on("error",(i)=>{h.end(),t(i)}),h.on("error",t),h.on("finish",function(){let i=new Uint8Array(Buffer.concat(this.buffers));f(i)})})};af.headStream=s0;class ef extends h0.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(n,c,f){var t;if(this.buffers.push(n),this.bytesBuffered+=(t=n.byteLength)!==null&&t!==void 0?t:0,this.bytesBuffered>=this.limit){let h=this.bytesBuffered-this.limit,i=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=i.subarray(0,i.byteLength-h),this.emit("finish")}f()}}});var it=I((Vr,j)=>{var{defineProperty:wn,getOwnPropertyDescriptor:w0,getOwnPropertyNames:u0}=Object,$0=Object.prototype.hasOwnProperty,bn=(n,c)=>wn(n,"name",{value:c,configurable:!0}),T0=(n,c)=>{for(var f in c)wn(n,f,{get:c[f],enumerable:!0})},Qn=(n,c,f,t)=>{if(c&&typeof c==="object"||typeof c==="function"){for(let h of u0(c))if(!$0.call(n,h)&&h!==f)wn(n,h,{get:()=>c[h],enumerable:!(t=w0(c,h))||t.enumerable})}return n},P=(n,c,f)=>(Qn(n,c,"default"),f&&Qn(f,c,"default")),x0=(n)=>Qn(wn({},"__esModule",{value:!0}),n),B={};T0(B,{Uint8ArrayBlobAdapter:()=>Xn});j.exports=x0(B);var nt=m(),ct=e();function ft(n,c="utf-8"){if(c==="base64")return nt.toBase64(n);return ct.toUtf8(n)}bn(ft,"transformToString");function tt(n,c){if(c==="base64")return Xn.mutate(nt.fromBase64(n));return Xn.mutate(ct.fromUtf8(n))}bn(tt,"transformFromString");var ht=class n extends Uint8Array{static fromString(c,f="utf-8"){switch(typeof c){case"string":return tt(c,f);default:throw new Error(`Unsupported conversion from ${typeof c} to Uint8ArrayBlobAdapter.`)}}static mutate(c){return Object.setPrototypeOf(c,n.prototype),c}transformToString(c="utf-8"){return ft(this,c)}};bn(ht,"Uint8ArrayBlobAdapter");var Xn=ht;P(B,yc(),j.exports);P(B,gf(),j.exports);P(B,vf(),j.exports);P(B,_f(),j.exports);P(B,H(),j.exports)});var on=v(En(),1);class Bt{constructor(n){this.config=n,this.middlewareStack=on.constructStack()}send(n,c,f){let t=typeof c!=="function"?c:void 0,h=typeof c==="function"?c:f,i=t===void 0&&this.config.cacheMiddleware===!0,r;if(i){if(!this.handlers)this.handlers=new WeakMap;let s=this.handlers;if(s.has(n.constructor))r=s.get(n.constructor);else r=n.resolveMiddleware(this.middlewareStack,this.config,t),s.set(n.constructor,r)}else delete this.handlers,r=n.resolveMiddleware(this.middlewareStack,this.config,t);if(h)r(n).then((s)=>h(null,s.output),(s)=>h(s)).catch(()=>{});else return r(n).then((s)=>s.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var qn=v(En(),1);class en{constructor(){this.middlewareStack=qn.constructStack()}static classBuilder(){return new an}resolveMiddlewareWithContext(n,c,f,{middlewareFn:t,clientName:h,commandName:i,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,smithyContext:w,additionalContext:x,CommandCtor:D}){for(let y of t.bind(this)(D,n,c,f))this.middlewareStack.use(y);let u=n.concat(this.middlewareStack),{logger:E}=c,$={logger:E,clientName:h,commandName:i,inputFilterSensitiveLog:r,outputFilterSensitiveLog:s,[pn]:{commandInstance:this,...w},...x},{requestHandler:N}=c;return u.resolve((y)=>N.handle(y.request,f||{}),$)}}class an{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,c,f={}){return this._smithyContext={service:n,operation:c,...f},this}c(n={}){return this._additionalContext=n,this}n(n,c){return this._clientName=n,this._commandName=c,this}f(n=(f)=>f,c=(f)=>f){return this._inputFilterSensitiveLog=n,this._outputFilterSensitiveLog=c,this}ser(n){return this._serializer=n,this}de(n){return this._deserializer=n,this}build(){let n=this,c;return c=class extends en{static getEndpointParameterInstructions(){return n._ep}constructor(...[f]){super();this.serialize=n._serializer,this.deserialize=n._deserializer,this.input=f??{},n._init(this)}resolveMiddleware(f,t,h){return this.resolveMiddlewareWithContext(f,t,h,{CommandCtor:c,middlewareFn:n._middlewareFn,clientName:n._clientName,commandName:n._commandName,inputFilterSensitiveLog:n._inputFilterSensitiveLog,outputFilterSensitiveLog:n._outputFilterSensitiveLog,smithyContext:n._smithyContext,additionalContext:n._additionalContext})}}}}var a0="***SensitiveInformation***";var _0=(n,c)=>{for(let f of Object.keys(n)){let t=n[f],h=async function(r,s,w){let x=new t(r);if(typeof s==="function")this.send(x,s);else if(typeof w==="function"){if(typeof s!=="object")throw new Error(`Expected http options but got ${typeof s}`);this.send(x,s||{},w)}else return this.send(x,s)},i=(f[0].toLowerCase()+f.slice(1)).replace(/Command$/,"");c.prototype[i]=h}};class mn extends Error{constructor(n){super(n.message);Object.setPrototypeOf(this,mn.prototype),this.name=n.name,this.$fault=n.$fault,this.$metadata=n.$metadata}}var _n=(n,c={})=>{Object.entries(c).filter(([,t])=>t!==void 0).forEach(([t,h])=>{if(n[t]==null||n[t]==="")n[t]=h});let f=n.message||n.Message||"UnknownError";return n.message=f,delete n.Message,n};class jt{trace(){}debug(){}info(){}warn(){}error(){}}var un=v(it(),1),Zr=async(n=new Uint8Array,c)=>{if(n instanceof Uint8Array)return un.Uint8ArrayBlobAdapter.mutate(n);if(!n)return un.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let f=c.streamCollector(n);return un.Uint8ArrayBlobAdapter.mutate(await f)};var Lr=(n)=>{switch(n){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${n}"`)}};var E0=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string"){let c=parseFloat(n);if(!Number.isNaN(c)){if(String(c)!==String(n))Et.warn(xt(`Expected number but observed string: ${n}`));return c}}if(typeof n==="number")return n;throw new TypeError(`Expected number, got ${typeof n}: ${n}`)},F0=Math.ceil(340282346638528860000000000000000000000),rt=(n)=>{let c=E0(n);if(c!==void 0&&!Number.isNaN(c)&&c!==1/0&&c!==-1/0){if(Math.abs(c)>F0)throw new TypeError(`Expected 32-bit float, got ${n}`)}return c},Kn=(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 st=(n)=>Sn(n,32),wt=(n)=>Sn(n,16),ut=(n)=>Sn(n,8),Sn=(n,c)=>{let f=Kn(n);if(f!==void 0&&C0(f,c)!==f)throw new TypeError(`Expected ${c}-bit integer, got ${n}`);return f},C0=(n,c)=>{switch(c){case 32:return Int32Array.of(n)[0];case 16:return Int16Array.of(n)[0];case 8:return Int8Array.of(n)[0]}},Qr=(n,c)=>{if(n===null||n===void 0){if(c)throw new TypeError(`Expected a non-null value for ${c}`);throw new TypeError("Expected a non-null value")}return n},Xr=(n)=>{if(n===null||n===void 0)return;if(typeof n==="object"&&!Array.isArray(n))return n;let c=Array.isArray(n)?"array":typeof n;throw new TypeError(`Expected object, got ${c}: ${n}`)},br=(n)=>{if(n===null||n===void 0)return;if(typeof n==="string")return n;if(["boolean","number","bigint"].includes(typeof n))return Et.warn(xt(`Expected string, got ${typeof n}: ${n}`)),String(n);throw new TypeError(`Expected string, got ${typeof n}: ${n}`)};var $t=(n)=>{if(typeof n=="string")return rt(O(n));return rt(n)},U0=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,O=(n)=>{let c=n.match(U0);if(c===null||c[0].length!==n.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(n)};var Kr=(n)=>{if(typeof n==="string")return Kn(O(n));return Kn(n)};var Sr=(n)=>{if(typeof n==="string")return st(O(n));return st(n)},M=(n)=>{if(typeof n==="string")return wt(O(n));return wt(n)},Tt=(n)=>{if(typeof n==="string")return ut(O(n));return ut(n)},xt=(n)=>{return String(new TypeError(n).stack||n).split("\n").slice(0,5).filter((c)=>!c.includes("stackTraceWarning")).join("\n")},Et={warn:console.warn};var N0=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Jn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function jr(n){let c=n.getUTCFullYear(),f=n.getUTCMonth(),t=n.getUTCDay(),h=n.getUTCDate(),i=n.getUTCHours(),r=n.getUTCMinutes(),s=n.getUTCSeconds(),w=h<10?`0${h}`:`${h}`,x=i<10?`0${i}`:`${i}`,D=r<10?`0${r}`:`${r}`,u=s<10?`0${s}`:`${s}`;return`${N0[t]}, ${w} ${Jn[f]} ${c} ${x}:${D}:${u} GMT`}var d0=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Mr=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let c=d0.exec(n);if(!c)throw new TypeError("Invalid RFC-3339 date-time value");let[f,t,h,i,r,s,w,x]=c,D=M(R(t)),u=X(h,"month",1,12),E=X(i,"day",1,31);return k(D,u,E,{hours:r,minutes:s,seconds:w,fractionalMilliseconds:x})},D0=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Rr=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let c=D0.exec(n);if(!c)throw new TypeError("Invalid RFC-3339 date-time value");let[f,t,h,i,r,s,w,x,D]=c,u=M(R(t)),E=X(h,"month",1,12),$=X(i,"day",1,31),N=k(u,E,$,{hours:r,minutes:s,seconds:w,fractionalMilliseconds:x});if(D.toUpperCase()!="Z")N.setTime(N.getTime()-b0(D));return N},y0=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$/),Y0=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$/),I0=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})$/),gr=(n)=>{if(n===null||n===void 0)return;if(typeof n!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let c=y0.exec(n);if(c){let[f,t,h,i,r,s,w,x]=c;return k(M(R(i)),Wn(h),X(t,"day",1,31),{hours:r,minutes:s,seconds:w,fractionalMilliseconds:x})}if(c=Y0.exec(n),c){let[f,t,h,i,r,s,w,x]=c;return Z0(k(z0(i),Wn(h),X(t,"day",1,31),{hours:r,minutes:s,seconds:w,fractionalMilliseconds:x}))}if(c=I0.exec(n),c){let[f,t,h,i,r,s,w,x]=c;return k(M(R(x)),Wn(t),X(h.trimLeft(),"day",1,31),{hours:i,minutes:r,seconds:s,fractionalMilliseconds:w})}throw new TypeError("Invalid RFC-7231 date-time value")};var k=(n,c,f,t)=>{let h=c-1;return L0(n,h,f),new Date(Date.UTC(n,h,f,X(t.hours,"hour",0,23),X(t.minutes,"minute",0,59),X(t.seconds,"seconds",0,60),X0(t.fractionalMilliseconds)))},z0=(n)=>{let c=new Date().getUTCFullYear(),f=Math.floor(c/100)*100+M(R(n));if(f<c)return f+100;return f},V0=1576800000000,Z0=(n)=>{if(n.getTime()-new Date().getTime()>V0)return new Date(Date.UTC(n.getUTCFullYear()-100,n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()));return n},Wn=(n)=>{let c=Jn.indexOf(n);if(c<0)throw new TypeError(`Invalid month: ${n}`);return c+1},G0=[31,28,31,30,31,30,31,31,30,31,30,31],L0=(n,c,f)=>{let t=G0[c];if(c===1&&Q0(n))t=29;if(f>t)throw new TypeError(`Invalid day for ${Jn[c]} in ${n}: ${f}`)},Q0=(n)=>{return n%4===0&&(n%100!==0||n%400===0)},X=(n,c,f,t)=>{let h=Tt(R(n));if(h<f||h>t)throw new TypeError(`${c} must be between ${f} and ${t}, inclusive`);return h},X0=(n)=>{if(n===null||n===void 0)return 0;return $t("0."+n)*1000},b0=(n)=>{let c=n[0],f=1;if(c=="+")f=1;else if(c=="-")f=-1;else throw new TypeError(`Offset direction, ${c}, must be "+" or "-"`);let t=Number(n.substring(1,3)),h=Number(n.substring(4,6));return f*(t*60+h)*60*1000},R=(n)=>{let c=0;while(c<n.length-1&&n.charAt(c)==="0")c++;if(c===0)return n;return n.slice(c)};var K0=({output:n,parsedBody:c,exceptionCtor:f,errorCode:t})=>{let h=S0(n),i=h.httpStatusCode?h.httpStatusCode+"":void 0,r=new f({name:c?.code||c?.Code||t||i||"UnknownError",$fault:"client",$metadata:h});throw _n(r,c)},Pr=(n)=>{return({output:c,parsedBody:f,errorCode:t})=>{K0({output:c,parsedBody:f,exceptionCtor:n,errorCode:t})}},S0=(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 kr=(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 Ft=!1,vr=(n)=>{if(n&&!Ft&&parseInt(n.substring(1,n.indexOf(".")))<16)Ft=!0};var Ct=(n)=>{let c=[];for(let f in Bn){let t=Bn[f];if(n[t]===void 0)continue;c.push({algorithmId:()=>t,checksumConstructor:()=>n[t]})}return{_checksumAlgorithms:c,addChecksumAlgorithm(f){this._checksumAlgorithms.push(f)},checksumAlgorithms(){return this._checksumAlgorithms}}},Ut=(n)=>{let c={};return n.checksumAlgorithms().forEach((f)=>{c[f.algorithmId()]=f.checksumConstructor()}),c};var Nt=(n)=>{let c=n.retryStrategy;return{setRetryStrategy(f){c=f},retryStrategy(){return c}}},dt=(n)=>{let c={};return c.retryStrategy=n.retryStrategy(),c};var _r=(n)=>{return{...Ct(n),...Nt(n)}};var ns=(n)=>{return{...Ut(n),...dt(n)}};function W0(n){return encodeURIComponent(n).replace(/[!'()*]/g,function(c){return"%"+c.charCodeAt(0).toString(16).toUpperCase()})}var is=(n)=>Array.isArray(n)?n:[n];var jn=function(){let n=Object.getPrototypeOf(this).constructor,f=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(f,n.prototype),f};jn.prototype=Object.create(String.prototype,{constructor:{value:jn,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(jn,String);function J0(n,c,f){let t,h,i;if(typeof c==="undefined"&&typeof f==="undefined")t={},i=n;else if(t=n,typeof c==="function")return h=c,i=f,B0(t,h,i);else i=c;for(let r of Object.keys(i)){if(!Array.isArray(i[r])){t[r]=i[r];continue}Dt(t,null,i,r)}return t}var us=(n,c)=>{let f={};for(let t in c)Dt(f,n,c,t);return f},B0=(n,c,f)=>{return J0(n,Object.entries(f).reduce((t,[h,i])=>{if(Array.isArray(i))t[h]=i;else if(typeof i==="function")t[h]=[c,i()];else t[h]=[c,i];return t},{}))},Dt=(n,c,f,t)=>{if(c!==null){let r=f[t];if(typeof r==="function")r=[,r];let[s=j0,w=M0,x=t]=r;if(typeof s==="function"&&s(c[x])||typeof s!=="function"&&!!s)n[t]=w(c[x]);return}let[h,i]=f[t];if(typeof i==="function"){let r,s=h===void 0&&(r=i())!=null,w=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(s)n[t]=r;else if(w)n[t]=i()}else{let r=h===void 0&&i!=null,s=typeof h==="function"&&!!h(i)||typeof h!=="function"&&!!h;if(r||s)n[t]=i}},j0=(n)=>n!=null,M0=(n)=>n;var Es=(n)=>n.toISOString().replace(".000Z","Z");var yt=(n)=>{if(n==null)return{};if(Array.isArray(n))return n.filter((c)=>c!=null).map(yt);if(typeof n==="object"){let c={};for(let f of Object.keys(n)){if(n[f]==null)continue;c[f]=yt(n[f])}return c}return n};var As=(n)=>{let c=n.httpHandler;return{setHttpHandler(f){c=f},httpHandler(){return c},updateHttpClientConfig(f,t){c.updateHttpClientConfig(f,t)},httpHandlerConfigs(){return c.httpHandlerConfigs()}}},Hs=(n)=>{return{httpHandler:n.httpHandler()}};class Mn{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){let c=new Mn({...n,headers:{...n.headers}});if(c.query)c.query=R0(c.query);return c}static isInstance(n){if(!n)return!1;let c=n;return"method"in c&&"protocol"in c&&"hostname"in c&&"path"in c&&typeof c.query==="object"&&typeof c.headers==="object"}clone(){return Mn.clone(this)}}function R0(n){return Object.keys(n).reduce((c,f)=>{let t=n[f];return{...c,[f]:Array.isArray(t)?[...t]:t}},{})}class $n{constructor(n){this.statusCode=n.statusCode,this.reason=n.reason,this.headers=n.headers||{},this.body=n.body}static isInstance(n){if(!n)return!1;let c=n;return typeof c.statusCode==="number"&&typeof c.headers==="object"}}var Tn=v(yn(),1);function Rn(n){let c=[];for(let f of Object.keys(n).sort()){let t=n[f];if(f=Tn.escapeUri(f),Array.isArray(t))for(let h=0,i=t.length;h<i;h++)c.push(`${f}=${Tn.escapeUri(t[h])}`);else{let h=f;if(t||typeof t==="string")h+=`=${Tn.escapeUri(t)}`;c.push(h)}}return c.join("&")}import{Agent as Gt,request as H0}from"http";import{Agent as Lt,request as P0}from"https";var Yt=["ECONNRESET","EPIPE","ETIMEDOUT"];var gn=(n)=>{let c={};for(let f of Object.keys(n)){let t=n[f];c[f]=Array.isArray(t)?t.join(","):t}return c};var It=(n,c,f=0)=>{if(!f)return-1;let t=(h)=>{let i=setTimeout(()=>{n.destroy(),c(Object.assign(new Error(`Socket timed out without establishing a connection within ${f} ms`),{name:"TimeoutError"}))},f-h),r=(s)=>{if(s?.connecting)s.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)};if(n.socket)r(n.socket);else n.on("socket",r)};if(f<2000)return t(0),0;return setTimeout(t.bind(null,1000),1000)};var zt=(n,{keepAlive:c,keepAliveMsecs:f},t=3000)=>{if(c!==!0)return-1;let h=()=>{if(n.socket)n.socket.setKeepAlive(c,f||0);else n.on("socket",(i)=>{i.setKeepAlive(c,f||0)})};if(t===0)return h(),0;return setTimeout(h,t)};var Vt=(n,c,f=0)=>{let t=(h)=>{n.setTimeout(f-h,()=>{n.destroy(),c(Object.assign(new Error(`Connection timed out after ${f} ms`),{name:"TimeoutError"}))})};if(0<f&&f<6000)return t(0),0;return setTimeout(t.bind(null,f===0?0:3000),3000)};import{Readable as g0}from"stream";var Zt=1000;async function An(n,c,f=Zt){let t=c.headers??{},h=t.Expect||t.expect,i=-1,r=!1;if(h==="100-continue")await Promise.race([new Promise((s)=>{i=Number(setTimeout(s,Math.max(Zt,f)))}),new Promise((s)=>{n.on("continue",()=>{clearTimeout(i),s()}),n.on("error",()=>{r=!0,clearTimeout(i),s()})})]);if(!r)A0(n,c.body)}function A0(n,c){if(c instanceof g0){c.pipe(n);return}if(c){if(Buffer.isBuffer(c)||typeof c==="string"){n.end(c);return}let f=c;if(typeof f==="object"&&f.buffer&&typeof f.byteOffset==="number"&&typeof f.byteLength==="number"){n.end(Buffer.from(f.buffer,f.byteOffset,f.byteLength));return}n.end(Buffer.from(c));return}n.end()}class Hn{static create(n){if(typeof n?.handle==="function")return n;return new Hn(n)}static checkSocketUsage(n,c,f=console){let{sockets:t,requests:h,maxSockets:i}=n;if(typeof i!=="number"||i===1/0)return c;let r=15000;if(Date.now()-r<c)return c;if(t&&h)for(let s in t){let w=t[s]?.length??0,x=h[s]?.length??0;if(w>=i&&x>=2*i)return f?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${w} 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 c}constructor(n){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((c,f)=>{if(typeof n==="function")n().then((t)=>{c(this.resolveDefaultConfig(t))}).catch(f);else c(this.resolveDefaultConfig(n))})}resolveDefaultConfig(n){let{requestTimeout:c,connectionTimeout:f,socketTimeout:t,httpAgent:h,httpsAgent:i}=n||{},r=!0,s=50;return{connectionTimeout:f,requestTimeout:c??t,httpAgent:(()=>{if(h instanceof Gt||typeof h?.destroy==="function")return h;return new Gt({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if(i instanceof Lt||typeof i?.destroy==="function")return i;return new Lt({keepAlive:!0,maxSockets:50,...i})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(n,{abortSignal:c}={}){if(!this.config)this.config=await this.configProvider;return new Promise((f,t)=>{let h=void 0,i=[],r=async(T)=>{await h,i.forEach(clearTimeout),f(T)},s=async(T)=>{await h,i.forEach(clearTimeout),t(T)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(c?.aborted){let T=new Error("Request aborted");T.name="AbortError",s(T);return}let w=n.protocol==="https:",x=w?this.config.httpsAgent:this.config.httpAgent;i.push(setTimeout(()=>{this.socketWarningTimestamp=Hn.checkSocketUsage(x,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let D=Rn(n.query||{}),u=void 0;if(n.username!=null||n.password!=null){let T=n.username??"",F=n.password??"";u=`${T}:${F}`}let E=n.path;if(D)E+=`?${D}`;if(n.fragment)E+=`#${n.fragment}`;let $=n.hostname??"";if($[0]==="["&&$.endsWith("]"))$=n.hostname.slice(1,-1);else $=n.hostname;let N={headers:n.headers,host:$,method:n.method,path:E,port:n.port,agent:x,auth:u},C=(w?P0:H0)(N,(T)=>{let F=new $n({statusCode:T.statusCode||-1,reason:T.statusMessage,headers:gn(T.headers),body:T});r({response:F})});if(C.on("error",(T)=>{if(Yt.includes(T.code))s(Object.assign(T,{name:"TimeoutError"}));else s(T)}),c){let T=()=>{C.destroy();let F=new Error("Request aborted");F.name="AbortError",s(F)};if(typeof c.addEventListener==="function"){let F=c;F.addEventListener("abort",T,{once:!0}),C.once("close",()=>F.removeEventListener("abort",T))}else c.onabort=T}i.push(It(C,s,this.config.connectionTimeout)),i.push(Vt(C,s,this.config.requestTimeout));let U=N.agent;if(typeof U==="object"&&"keepAlive"in U)i.push(zt(C,{keepAlive:U.keepAlive,keepAliveMsecs:U.keepAliveMsecs}));h=An(C,n,this.config.requestTimeout).catch((T)=>{return i.forEach(clearTimeout),t(T)})})}updateHttpClientConfig(n,c){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[n]:c}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as O0}from"stream";class Pn extends O0{constructor(){super(...arguments);this.bufferedBytes=[]}_write(n,c,f){this.bufferedBytes.push(n),f()}}var Aw=(n)=>{if(k0(n))return l0(n);return new Promise((c,f)=>{let t=new Pn;n.pipe(t),n.on("error",(h)=>{t.end(),f(h)}),t.on("error",f),t.on("finish",function(){let h=new Uint8Array(Buffer.concat(this.bufferedBytes));c(h)})})},k0=(n)=>typeof ReadableStream==="function"&&n instanceof ReadableStream;async function l0(n){let c=[],f=n.getReader(),t=!1,h=0;while(!t){let{done:s,value:w}=await f.read();if(w)c.push(w),h+=w.length;t=s}let i=new Uint8Array(h),r=0;for(let s of c)i.set(s,r),r+=s.length;return i}export{As as Fa,Hs as Ga,Mn as Ha,$n as Ia,fc as Ja,jt as Ka,En as La,Bt as Ma,e as Na,bc as Oa,dn as Pa,yn as Qa,Lf as Ra,it as Sa,Zr as Ta,en as Ua,a0 as Va,_0 as Wa,Lr as Xa,Kn as Ya,st as Za,Qr as _a,Xr as $a,br as ab,Kr as bb,Sr as cb,jr as db,Mr as eb,Rr as fb,gr as gb,mn as hb,_n as ib,Pr as jb,kr as kb,vr as lb,_r as mb,ns as nb,W0 as ob,is as pb,J0 as qb,us as rb,Es as sb,yt as tb,Hn as ub,Aw as vb};
|
|
6
|
+
|
|
7
|
+
//# debugId=CEBB75FF315A287864756E2164756E21
|