@stacksjs/buddy 0.70.8 → 0.70.10
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-yw7gqyfc.js → chunk-2pj0cr49.js} +1 -1
- package/dist/chunk-2xrqj8ap.js +2 -0
- package/dist/{chunk-z9kxm35m.js → chunk-5eh2tfep.js} +2 -2
- package/dist/chunk-5vhayxpk.js +25 -0
- package/dist/{chunk-mcvmy82q.js → chunk-5x7y4ng3.js} +1 -1
- package/dist/chunk-5yawz4bx.js +2 -0
- package/dist/{chunk-c9810eh8.js → chunk-7kc7thq5.js} +83 -83
- package/dist/{chunk-0ph6gshe.js → chunk-7mjm5rg8.js} +2 -2
- package/dist/{chunk-sam82sz4.js → chunk-8acb2bq0.js} +1 -1
- package/dist/chunk-9gzvq5jq.js +2 -0
- package/dist/{chunk-7ddwd2rs.js → chunk-bgqy98qw.js} +2 -2
- package/dist/chunk-e1kefb68.js +2 -0
- package/dist/{chunk-7mbz5p0r.js → chunk-fds99vbx.js} +1 -1
- package/dist/{chunk-gwz7xtq2.js → chunk-jky37dv1.js} +1 -1
- package/dist/{chunk-7kkd5jvd.js → chunk-ks9kq37e.js} +1 -1
- package/dist/chunk-mzgfvbmm.js +2 -0
- package/dist/chunk-tv4f0d0g.js +2 -0
- package/dist/{chunk-cx6dran4.js → chunk-tx5yb9wb.js} +1 -1
- package/dist/chunk-v3a5yzn6.js +3 -0
- package/dist/chunk-vrd8j1ky.js +3 -0
- package/dist/{chunk-2sybz1kv.js → chunk-ww48v0ap.js} +2 -2
- package/dist/chunk-wz2wxp9f.js +6 -0
- package/dist/chunk-y4k8k1by.js +3 -0
- package/dist/chunk-yatzvt36.js +2 -0
- package/dist/{chunk-pac9xw2e.js → chunk-yv49ttdw.js} +1 -1
- package/dist/chunk-z80nypa9.js +1 -0
- package/dist/{chunk-td6r88hs.js → chunk-zm0j2nyb.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +45 -45
- package/dist/chunk-295712vp.js +0 -2
- package/dist/chunk-3brfg8yr.js +0 -3
- package/dist/chunk-68weqe1q.js +0 -2
- package/dist/chunk-9p4cqdee.js +0 -2
- package/dist/chunk-bh567hxp.js +0 -2
- package/dist/chunk-eba8j44p.js +0 -6
- package/dist/chunk-fe2marcb.js +0 -2
- package/dist/chunk-jynwrazb.js +0 -3
- package/dist/chunk-pkq51vpd.js +0 -2
- package/dist/chunk-pzca288k.js +0 -2
- package/dist/chunk-sn6qz88f.js +0 -3
- package/dist/chunk-t901c751.js +0 -2
- package/dist/chunk-xc8sfz3m.js +0 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Eb as F,Fb as Ee}from"./chunk-295712vp.js";import{Ib as m,Jb as Te,ac as wt}from"./chunk-gwz7xtq2.js";import{hc as _r,ic as be,lc as or,mc as Or}from"./chunk-xc8sfz3m.js";import{Bc as me}from"./chunk-sam82sz4.js";import{Fc as Le}from"./chunk-z9kxm35m.js";import{Kc as jr}from"./chunk-bh567hxp.js";import{Lc as h,Qc as Yr}from"./chunk-yw7gqyfc.js";function Jr(e){return e}var Gt=(e)=>(t)=>async(r)=>{if(!m.isInstance(r.request))return t(r);let{request:o}=r,{handlerProtocol:n=""}=e.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!o.headers[":authority"])delete o.headers.host,o.headers[":authority"]=o.hostname+(o.port?":"+o.port:"");else if(!o.headers.host){let s=o.hostname;if(o.port!=null)s+=`:${o.port}`;o.headers.host=s}return t(r)},Vt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Kr=(e)=>({applyToStack:(t)=>{t.add(Gt(e),Vt)}});var Bt=()=>(e,t)=>async(r)=>{try{let o=await e(r),{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:f}=a,u=c??t.inputFilterSensitiveLog,R=f??t.outputFilterSensitiveLog,{$metadata:l,...d}=o.output;return i?.info?.({clientName:n,commandName:s,input:u(r.input),output:R(d),metadata:l}),o}catch(o){let{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c}=a,f=c??t.inputFilterSensitiveLog;throw i?.error?.({clientName:n,commandName:s,input:f(r.input),error:o,metadata:o.$metadata}),o}},Wt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},eo=(e)=>({applyToStack:(t)=>{t.add(Bt(),Wt)}});var ne="X-Amzn-Trace-Id",Yt="AWS_LAMBDA_FUNCTION_NAME",jt="_X_AMZN_TRACE_ID",zt=(e)=>(t)=>async(r)=>{let{request:o}=r;if(!m.isInstance(o)||e.runtime!=="node")return t(r);let n=Object.keys(o.headers??{}).find((c)=>c.toLowerCase()===ne.toLowerCase())??ne;if(o.headers.hasOwnProperty(n))return t(r);let s=process.env[Yt],i=process.env[jt],a=(c)=>typeof c==="string"&&c.length>0;if(a(s)&&a(i))o.headers[ne]=i;return t({...r,request:o})},Xt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},so=(e)=>({applyToStack:(t)=>{t.add(zt(e),Xt)}});var Ce=h(be(),1),se=void 0;function Ht(e){if(e===void 0)return!0;return typeof e==="string"&&e.length<=50}function ao(e){let t=Ce.normalizeProvider(e.userAgentAppId??se);return{...e,customUserAgent:typeof e.customUserAgent==="string"?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{let r=await t();if(!Ht(r)){let o=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;if(typeof r!=="string")o?.warn("userAgentAppId must be a string or undefined.");else if(r.length>50)o?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}}}class qt{constructor({size:e,params:t}){if(this.data=new Map,this.parameters=[],this.capacity=e??50,t)this.parameters=t}get(e,t){let r=this.hash(e);if(r===!1)return t();if(!this.data.has(r)){if(this.data.size>this.capacity+10){let o=this.data.keys(),n=0;while(!0){let{value:s,done:i}=o.next();if(this.data.delete(s),i||++n>10)break}}this.data.set(r,t())}return this.data.get(r)}size(){return this.data.size}hash(e){let t="",{parameters:r}=this;if(r.length===0)return!1;for(let o of r){let n=String(e[o]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}var Zt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),L=(e)=>Zt.test(e)||e.startsWith("[")&&e.endsWith("]");var Jt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),M=(e,t=!1)=>{if(!t)return Jt.test(e);let r=e.split(".");for(let o of r)if(!M(o))return!1;return!0};var $={};var A="endpoints";function E(e){if(typeof e!=="object"||e==null)return e;if("ref"in e)return`$${E(e.ref)}`;if("fn"in e)return`${e.fn}(${(e.argv||[]).map(E).join(", ")})`;return JSON.stringify(e,null,2)}class p extends Error{constructor(e){super(e);this.name="EndpointError"}}var De=(e,t)=>e===t;var Ue=(e)=>{let t=e.split("."),r=[];for(let o of t){let n=o.indexOf("[");if(n!==-1){if(o.indexOf("]")!==o.length-1)throw new p(`Path: '${e}' does not end with ']'`);let s=o.slice(n+1,-1);if(Number.isNaN(parseInt(s)))throw new p(`Invalid array index: '${s}' in path: '${e}'`);if(n!==0)r.push(o.slice(0,n));r.push(s)}else r.push(o)}return r};var B=(e,t)=>Ue(t).reduce((r,o)=>{if(typeof r!=="object")throw new p(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`);else if(Array.isArray(r))return r[parseInt(o)];return r[o]},e);var Pe=(e)=>e!=null;var ve=(e)=>!e;var W=h(Le(),1);var ie={[W.EndpointURLScheme.HTTP]:80,[W.EndpointURLScheme.HTTPS]:443},Me=(e)=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e==="object"&&"hostname"in e){let{hostname:l,port:d,protocol:I="",path:V="",query:$t={}}=e,Ie=new URL(`${I}//${l}${d?`:${d}`:""}${V}`);return Ie.search=Object.entries($t).map(([Ft,kt])=>`${Ft}=${kt}`).join("&"),Ie}return new URL(e)}catch(l){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let r=t.href,{host:o,hostname:n,pathname:s,protocol:i,search:a}=t;if(a)return null;let c=i.slice(0,-1);if(!Object.values(W.EndpointURLScheme).includes(c))return null;let f=L(n),u=r.includes(`${o}:${ie[c]}`)||typeof e==="string"&&e.includes(`${o}:${ie[c]}`),R=`${o}${u?`:${ie[c]}`:""}`;return{scheme:c,authority:R,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:f}};var $e=(e,t)=>e===t;var Fe=(e,t,r,o)=>{if(t>=r||e.length<r)return null;if(!o)return e.substring(t,r);return e.substring(e.length-r,e.length-t)};var ke=(e)=>encodeURIComponent(e).replace(/[!*'()]/g,(t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`);var Ge={booleanEquals:De,getAttr:B,isSet:Pe,isValidHostLabel:M,not:ve,parseURL:Me,stringEquals:$e,substring:Fe,uriEncode:ke};var Y=(e,t)=>{let r=[],o={...t.endpointParams,...t.referenceRecord},n=0;while(n<e.length){let s=e.indexOf("{",n);if(s===-1){r.push(e.slice(n));break}r.push(e.slice(n,s));let i=e.indexOf("}",s);if(i===-1){r.push(e.slice(s));break}if(e[s+1]==="{"&&e[i+1]==="}")r.push(e.slice(s+1,i)),n=i+2;let a=e.substring(s+1,i);if(a.includes("#")){let[c,f]=a.split("#");r.push(B(o[c],f))}else r.push(o[a]);n=i+1}return r.join("")};var Ve=({ref:e},t)=>{return{...t.endpointParams,...t.referenceRecord}[e]};var T=(e,t,r)=>{if(typeof e==="string")return Y(e,r);else if(e.fn)return j(e,r);else if(e.ref)return Ve(e,r);throw new p(`'${t}': ${String(e)} is not a string, function or reference.`)};var j=({fn:e,argv:t},r)=>{let o=t.map((s)=>["boolean","number"].includes(typeof s)?s:T(s,"arg",r)),n=e.split(".");if(n[0]in $&&n[1]!=null)return $[n[0]][n[1]](...o);return Ge[e](...o)};var Be=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new p(`'${e}' is already defined in Reference Record.`);let o=j(t,r);return r.logger?.debug?.(`${A} evaluateCondition: ${E(t)} = ${E(o)}`),{result:o===""?!0:!!o,...e!=null&&{toAssign:{name:e,value:o}}}};var b=(e=[],t)=>{let r={};for(let o of e){let{result:n,toAssign:s}=Be(o,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!n)return{result:n};if(s)r[s.name]=s.value,t.logger?.debug?.(`${A} assign: ${s.name} := ${E(s.value)}`)}return{result:!0,referenceRecord:r}};var We=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:n.map((s)=>{let i=T(s,"Header value entry",t);if(typeof i!=="string")throw new p(`Header '${o}' value '${i}' is not a string`);return i})}),{});var ae=(e,t)=>{if(Array.isArray(e))return e.map((r)=>ae(r,t));switch(typeof e){case"string":return Y(e,t);case"object":if(e===null)throw new p(`Unexpected endpoint property: ${e}`);return z(e,t);case"boolean":return e;default:throw new p(`Unexpected endpoint property type: ${typeof e}`)}};var z=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:ae(n,t)}),{});var Ye=(e,t)=>{let r=T(e,"Endpoint URL",t);if(typeof r==="string")try{return new URL(r)}catch(o){throw console.error(`Failed to construct URL with ${r}`,o),o}throw new p(`Endpoint URL must be a string, got ${typeof r}`)};var je=(e,t)=>{let{conditions:r,endpoint:o}=e,{result:n,referenceRecord:s}=b(r,t);if(!n)return;let i={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:f}=o;return t.logger?.debug?.(`${A} Resolving endpoint from template: ${E(o)}`),{...f!=null&&{headers:We(f,i)},...c!=null&&{properties:z(c,i)},url:Ye(a,i)}};var ze=(e,t)=>{let{conditions:r,error:o}=e,{result:n,referenceRecord:s}=b(r,t);if(!n)return;throw new p(T(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))};var Xe=(e,t)=>{let{conditions:r,rules:o}=e,{result:n,referenceRecord:s}=b(r,t);if(!n)return;return X(o,{...t,referenceRecord:{...t.referenceRecord,...s}})};var X=(e,t)=>{for(let r of e)if(r.type==="endpoint"){let o=je(r,t);if(o)return o}else if(r.type==="error")ze(r,t);else if(r.type==="tree"){let o=Xe(r,t);if(o)return o}else throw new p(`Unknown endpoint rule: ${r}`);throw new p("Rules evaluation failed")};var Kt=(e,t)=>{let{endpointParams:r,logger:o}=t,{parameters:n,rules:s}=e;t.logger?.debug?.(`${A} Initial EndpointParams: ${E(r)}`);let i=Object.entries(n).filter(([,f])=>f.default!=null).map(([f,u])=>[f,u.default]);if(i.length>0)for(let[f,u]of i)r[f]=r[f]??u;let a=Object.entries(n).filter(([,f])=>f.required).map(([f])=>f);for(let f of a)if(r[f]==null)throw new p(`Missing required parameter: '${f}'`);let c=X(s,{endpointParams:r,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${A} Resolved endpoint: ${E(c)}`),c};var ce=(e,t=!1)=>{if(t){for(let r of e.split("."))if(!ce(r))return!1;return!0}if(!M(e))return!1;if(e.length<3||e.length>63)return!1;if(e!==e.toLowerCase())return!1;if(L(e))return!1;return!0};var He=(e)=>{let t=e.split(":");if(t.length<6)return null;let[r,o,n,s,i,...a]=t;if(r!=="arn"||o===""||n===""||a.join(":")==="")return null;let c=a.map((f)=>f.split("/")).flat();return{partition:o,service:n,region:s,accountId:i,resourceId:c}};var qe={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"};var er=qe,tr="",Ze=(e)=>{let{partitions:t}=er;for(let o of t){let{regions:n,outputs:s}=o;for(let[i,a]of Object.entries(n))if(i===e)return{...s,...a}}for(let o of t){let{regionRegex:n,outputs:s}=o;if(new RegExp(n).test(e))return{...s}}let r=t.find((o)=>o.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}};var Je=()=>tr;var rr={isVirtualHostableS3Bucket:ce,parseArn:He,partition:Ze};$.aws=rr;var x=h(or(),1),nr=/\d{12}\.ddb/;async function Ke(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")x.setFeature(e,"PROTOCOL_RPC_V2_CBOR","M");if(typeof t.retryStrategy==="function"){let s=await t.retryStrategy();if(typeof s.acquireInitialRetryToken==="function")if(s.constructor?.name?.includes("Adaptive"))x.setFeature(e,"RETRY_MODE_ADAPTIVE","F");else x.setFeature(e,"RETRY_MODE_STANDARD","E");else x.setFeature(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode==="function"){let s=e.endpointV2;if(String(s?.url?.hostname).match(nr))x.setFeature(e,"ACCOUNT_ID_ENDPOINT","O");switch(await t.accountIdEndpointMode?.()){case"disabled":x.setFeature(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":x.setFeature(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":x.setFeature(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){let s=n;if(s.accountId)x.setFeature(e,"RESOLVED_ACCOUNT_ID","T");for(let[i,a]of Object.entries(s.$source??{}))x.setFeature(e,i,a)}}var fe="user-agent",H="x-amz-user-agent",pe=" ",q="/",Qe=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,et=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,ue="-";function tt(e){let t="";for(let r in e){let o=e[r];if(t.length+o.length+1<=1024){if(t.length)t+=","+o;else t+=o;continue}break}return t}var sr=(e)=>(t,r)=>async(o)=>{let{request:n}=o;if(!m.isInstance(n))return t(o);let{headers:s}=n,i=r?.userAgent?.map(Z)||[],a=(await e.defaultUserAgentProvider()).map(Z);await Ke(r,e,o);let c=r;a.push(`m/${tt(Object.assign({},r.__smithy_context?.features,c.__aws_sdk_context?.features))}`);let f=e?.customUserAgent?.map(Z)||[],u=await e.userAgentAppId();if(u)a.push(Z([`app/${u}`]));let R=Je(),l=(R?[R]:[]).concat([...a,...i,...f]).join(pe),d=[...a.filter((I)=>I.startsWith("aws-sdk-")),...f].join(pe);if(e.runtime!=="browser"){if(d)s[H]=s[H]?`${s[fe]} ${d}`:d;s[fe]=l}else s[H]=l;return t({...o,request:n})},Z=(e)=>{let t=e[0].split(q).map((i)=>i.replace(Qe,ue)).join(q),r=e[1]?.replace(et,ue),o=t.indexOf(q),n=t.substring(0,o),s=t.substring(o+1);if(n==="api")s=s.toLowerCase();return[n,s,r].filter((i)=>i&&i.length>0).reduce((i,a,c)=>{switch(c){case 0:return a;case 1:return`${i}/${a}`;default:return`${i}#${a}`}},"")},ir={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Hs=(e)=>({applyToStack:(t)=>{t.add(sr(e),ir)}});var J=(e)=>typeof e==="string"&&(e.startsWith("fips-")||e.endsWith("-fips"));var de=(e)=>J(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;var ni=(e)=>{let{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if(typeof t==="string")return de(t);let o=await t();return de(o)},useFipsEndpoint:async()=>{let o=typeof t==="string"?t:await t();if(J(o))return!0;return typeof r!=="function"?Promise.resolve(!!r):r()}}};var C=(e,t,r)=>{if(!(t in e))return;if(e[t]==="true")return!0;if(e[t]==="false")return!1;throw new Error(`Cannot load ${r} "${t}". Expected "true" or "false", got ${e[t]}.`)};var O;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(O||(O={}));var ar="AWS_USE_DUALSTACK_ENDPOINT",cr="use_dualstack_endpoint";var mi={environmentVariableSelector:(e)=>C(e,ar,O.ENV),configFileSelector:(e)=>C(e,cr,O.CONFIG),default:!1};var fr="AWS_USE_FIPS_ENDPOINT",pr="use_fips_endpoint";var xi={environmentVariableSelector:(e)=>C(e,fr,O.ENV),configFileSelector:(e)=>C(e,pr,O.CONFIG),default:!1};var le=h(Le(),1),rt=(e)=>e[le.SMITHY_CONTEXT_KEY]||(e[le.SMITHY_CONTEXT_KEY]={});var S=(e)=>{if(typeof e==="function")return e;let t=Promise.resolve(e);return()=>t};var ot={environmentVariableSelector:(e)=>e.AWS_REGION,configFileSelector:(e)=>e.region,default:()=>{throw new Error("Region is missing")}},Mi={preferredFile:"credentials"};var nt="content-length";function ur(e){return(t)=>async(r)=>{let o=r.request;if(m.isInstance(o)){let{body:n,headers:s}=o;if(n&&Object.keys(s).map((i)=>i.toLowerCase()).indexOf(nt)===-1)try{let i=e(n);o.headers={...o.headers,[nt]:String(i)}}catch(i){}}return t({...r,request:o})}}var dr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fa=(e)=>({applyToStack:(t)=>{t.add(ur(e.bodyLengthChecker),dr)}});var lt=h(_r(),1);var ut=h(be(),1);var st=async(e)=>{let t=e?.Bucket||"";if(typeof e.Bucket==="string")e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(xr(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!gr(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)e.ForcePathStyle=!0;if(e.DisableMultiRegionAccessPoints)e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0;return e},lr=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,mr=/(\d+\.){3}\d+/,Er=/\.\./;var gr=(e)=>lr.test(e)&&!mr.test(e)&&!Er.test(e),xr=(e)=>{let[t,r,o,,,n]=e.split(":"),s=t==="arn"&&e.split(":").length>=6,i=Boolean(s&&r&&o&&n);if(s&&!i)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return i};var it=(e,t,r)=>{let o=async()=>{let n=r[e]??r[t];if(typeof n==="function")return n();return n};if(e==="credentialScope"||t==="CredentialScope")return async()=>{let n=typeof r.credentials==="function"?await r.credentials():r.credentials;return n?.credentialScope??n?.CredentialScope};if(e==="accountId"||t==="AccountId")return async()=>{let n=typeof r.credentials==="function"?await r.credentials():r.credentials;return n?.accountId??n?.AccountId};if(e==="endpoint"||t==="endpoint")return async()=>{let n=await o();if(n&&typeof n==="object"){if("url"in n)return n.url.href;if("hostname"in n){let{protocol:s,hostname:i,port:a,path:c}=n;return`${s}//${i}${a?":"+a:""}${c}`}}return n};return o};var at="AWS_ENDPOINT_URL",ct="endpoint_url",ft=(e)=>({environmentVariableSelector:(t)=>{let r=e.split(" ").map((s)=>s.toUpperCase()),o=t[[at,...r].join("_")];if(o)return o;let n=t[at];if(n)return n;return},configFileSelector:(t,r)=>{if(r&&t.services){let n=r[["services",t.services].join(me)];if(n){let s=e.split(" ").map((a)=>a.toLowerCase()),i=n[[s.join("_"),ct].join(me)];if(i)return i}}let o=t[ct];if(o)return o;return},default:void 0});var K=async(e)=>F(ft(e??""))();var Q=(e)=>{if(typeof e==="object"){if("url"in e)return Ee(e.url);return e}return Ee(e)};var pt=async(e,t,r,o)=>{if(!r.endpoint){let i;if(r.serviceConfiguredEndpoint)i=await r.serviceConfiguredEndpoint();else i=await K(r.serviceId);if(i)r.endpoint=()=>Promise.resolve(Q(i))}let n=await Rr(e,t,r);if(typeof r.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(n,o)},Rr=async(e,t,r)=>{let o={},n=t?.getEndpointParameterInstructions?.()||{};for(let[s,i]of Object.entries(n))switch(i.type){case"staticContextParams":o[s]=i.value;break;case"contextParams":o[s]=e[i.name];break;case"clientContextParams":case"builtInParams":o[s]=await it(i.name,s,r)();break;case"operationContextParams":o[s]=i.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(i))}if(Object.keys(n).length===0)Object.assign(o,r);if(String(r.serviceId).toLowerCase()==="s3")await st(o);return o};var dt=({config:e,instructions:t})=>{return(r,o)=>async(n)=>{if(e.endpoint)ut.setFeature(o,"ENDPOINT_OVERRIDE","N");let s=await pt(n.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=s,o.authSchemes=s.properties?.authSchemes;let i=o.authSchemes?.[0];if(i){o.signing_region=i.signingRegion,o.signing_service=i.signingName;let c=rt(o)?.selectedHttpAuthScheme?.httpAuthOption;if(c)c.signingProperties=Object.assign(c.signingProperties||{},{signing_region:i.signingRegion,signingRegion:i.signingRegion,signing_service:i.signingName,signingName:i.signingName,signingRegionSet:i.signingRegionSet},i.properties)}return r({...n})}};var hr={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:lt.serializerMiddlewareOption.name},Da=(e,t)=>({applyToStack:(r)=>{r.addRelativeTo(dt({config:e,instructions:t}),hr)}});var Ma=(e)=>{let t=e.tls??!0,{endpoint:r}=e,o=r!=null?async()=>Q(await S(r)()):void 0,s={...e,endpoint:o,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:S(e.useDualstackEndpoint??!1),useFipsEndpoint:S(e.useFipsEndpoint??!1)},i=void 0;return s.serviceConfiguredEndpoint=async()=>{if(e.serviceId&&!i)i=K(e.serviceId);return i},s};var g;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(g||(g={}));var w=3,mt=g.STANDARD;var Et=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],gt=["TimeoutError","RequestTimeout","RequestTimeoutException"],xt=[500,502,503,504],Rt=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var Ar=(e)=>e.$metadata?.clockSkewCorrected,D=(e)=>e.$metadata?.httpStatusCode===429||Et.includes(e.name)||e.$retryable?.throttling==!0,k=(e,t=0)=>Ar(e)||gt.includes(e.name)||Rt.includes(e?.code||"")||xt.includes(e.$metadata?.httpStatusCode||0)||e.cause!==void 0&&t<=10&&k(e.cause,t+1),_t=(e)=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;if(500<=t&&t<=599&&!k(e))return!0;return!1}return!1};class U{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??0.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??0.5,this.scaleConstant=e?.scaleConstant??0.4,this.smooth=e?.smooth??0.8;let t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(!this.enabled)return;if(this.refillTokenBucket(),e>this.currentCapacity){let t=(e-this.currentCapacity)/this.fillRate*1000;await new Promise((r)=>U.setTimeoutFn(r,t))}this.currentCapacity=this.currentCapacity-e}refillTokenBucket(){let e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}let t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),D(e)){let o=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=o,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(o),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());let r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let e=this.getCurrentTimeInSeconds(),t=Math.floor(e*2)/2;if(this.requestCount++,t>this.lastTxRateBucket){let r=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}U.setTimeoutFn=setTimeout;var y=100,G=20000,ge=500,ee=500,xe=5,Re=10,_e=1,te="amz-sdk-invocation-id",re="amz-sdk-request";var ht=()=>{let e=y;return{computeNextBackoffDelay:(o)=>{return Math.floor(Math.min(G,Math.random()*2**o*e))},setDelayBase:(o)=>{e=o}}};var he=({retryDelay:e,retryCount:t,retryCost:r})=>{return{getRetryCount:()=>t,getRetryDelay:()=>Math.min(G,e),getRetryCost:()=>r}};class P{constructor(e){this.maxAttempts=e,this.mode=g.STANDARD,this.capacity=ee,this.retryBackoffStrategy=ht(),this.maxAttemptsProvider=typeof e==="function"?e:async()=>e}async acquireInitialRetryToken(e){return he({retryDelay:y,retryCount:0})}async refreshRetryTokenForRetry(e,t){let r=await this.getMaxAttempts();if(this.shouldRetry(e,t,r)){let o=t.errorType;this.retryBackoffStrategy.setDelayBase(o==="THROTTLING"?ge:y);let n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),s=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,i=this.getCapacityCost(o);return this.capacity-=i,he({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:i})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(ee,this.capacity+(e.getRetryCost()??_e))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${w}`),w}}shouldRetry(e,t,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e==="TRANSIENT"?Re:xe}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class Ae{constructor(e,t){this.maxAttemptsProvider=e,this.mode=g.ADAPTIVE;let{rateLimiter:r}=t??{};this.rateLimiter=r??new U,this.standardRetryStrategy=new P(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}var At="AWS_MAX_ATTEMPTS",St="max_attempts",Nc={environmentVariableSelector:(e)=>{let t=e[At];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${At} mast be a number, got "${t}"`);return r},configFileSelector:(e)=>{let t=e[St];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${St} mast be a number, got "${t}"`);return r},default:w},Ic=(e)=>{let{retryStrategy:t}=e,r=S(e.maxAttempts??w);return{...e,maxAttempts:r,retryStrategy:async()=>{if(t)return t;if(await S(e.retryMode)()===g.ADAPTIVE)return new Ae(r);return new P(r)}}},Sr="AWS_RETRY_MODE",Tr="retry_mode",bc={environmentVariableSelector:(e)=>e[Sr],configFileSelector:(e)=>e[Tr],default:mt};var _=h(Or(),1),Dc=_.default.v1,Uc=_.default.v3,Tt=_.default.v4,Pc=_.default.v5,vc=_.default.NIL,Lc=_.default.version,Mc=_.default.validate,$c=_.default.stringify,Fc=_.default.parse;import{Readable as wr}from"stream";var Ot=(e)=>e?.body instanceof wr||typeof ReadableStream!=="undefined"&&e?.body instanceof ReadableStream;var Se=(e)=>{if(e instanceof Error)return e;if(e instanceof Object)return Object.assign(new Error,e);if(typeof e==="string")return new Error(e);return new Error(`AWS SDK error wrapper for ${e}`)};var yr=(e)=>(t,r)=>async(o)=>{let n=await e.retryStrategy(),s=await e.maxAttempts();if(Nr(n)){n=n;let i=await n.acquireInitialRetryToken(r.partition_id),a=new Error,c=0,f=0,{request:u}=o,R=m.isInstance(u);if(R)u.headers[te]=Tt();while(!0)try{if(R)u.headers[re]=`attempt=${c+1}; max=${s}`;let{response:l,output:d}=await t(o);return n.recordSuccess(i),d.$metadata.attempts=c+1,d.$metadata.totalRetryDelay=f,{response:l,output:d}}catch(l){let d=Ir(l);if(a=Se(l),R&&Ot(u))throw(r.logger instanceof wt?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{i=await n.refreshRetryTokenForRetry(i,d)}catch(V){if(!a.$metadata)a.$metadata={};throw a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=f,a}c=i.getRetryCount();let I=i.getRetryDelay();f+=I,await new Promise((V)=>setTimeout(V,I))}}else{if(n=n,n?.mode)r.userAgent=[...r.userAgent||[],["cfg/retry-mode",n.mode]];return n.retry(t,o)}},Nr=(e)=>typeof e.acquireInitialRetryToken!=="undefined"&&typeof e.refreshRetryTokenForRetry!=="undefined"&&typeof e.recordSuccess!=="undefined",Ir=(e)=>{let t={error:e,errorType:br(e)},r=Dr(e.$response);if(r)t.retryAfterHint=r;return t},br=(e)=>{if(D(e))return"THROTTLING";if(k(e))return"TRANSIENT";if(_t(e))return"SERVER_ERROR";return"CLIENT_ERROR"},Cr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Zc=(e)=>({applyToStack:(t)=>{t.add(yr(e),Cr)}}),Dr=(e)=>{if(!Te.isInstance(e))return;let t=Object.keys(e.headers).find((s)=>s.toLowerCase()==="retry-after");if(!t)return;let r=e.headers[t],o=Number(r);if(!Number.isNaN(o))return new Date(o*1000);return new Date(r)};import{platform as Ur,release as Pr}from"os";import{env as Nt,versions as vr}from"process";var Oe={isCrtAvailable:!1};var yt=()=>{if(Oe.isCrtAvailable)return["md/crt-avail"];return null};var kf=({serviceId:e,clientVersion:t})=>{return async(r)=>{let o=[["aws-sdk-js",t],["ua","2.1"],[`os/${Ur()}`,Pr()],["lang/js"],["md/nodejs",`${vr.node}`]],n=yt();if(n)o.push(n);if(e)o.push([`api/${e}`,t]);if(Nt.AWS_EXECUTION_ENV)o.push([`exec-env/${Nt.AWS_EXECUTION_ENV}`]);let s=await r?.userAgentAppId?.();return s?[...o,[`app/${s}`]]:[...o]}};var Lr="AWS_SDK_UA_APP_ID",Mr="sdk_ua_app_id",$r="sdk-ua-app-id",Wf={environmentVariableSelector:(e)=>e[Lr],configFileSelector:(e)=>e[Mr]??e[$r],default:se};var It=(e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";import{Buffer as we}from"buffer";var N=(e,t=0,r=e.byteLength-t)=>{if(!It(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return we.from(e,t,r)},v=(e,t)=>{if(typeof e!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?we.from(e,t):we.from(e)};var oe=(e)=>{let t=v(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var bt=(e)=>{if(typeof e==="string")return oe(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)};var op=(e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return N(e.buffer,e.byteOffset,e.byteLength).toString("utf8")};import{Buffer as Fr}from"buffer";import{createHash as kr,createHmac as Gr}from"crypto";class Vr{constructor(e,t){this.algorithmIdentifier=e,this.secret=t,this.reset()}update(e,t){this.hash.update(bt(Ct(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Gr(this.algorithmIdentifier,Ct(this.secret)):kr(this.algorithmIdentifier)}}function Ct(e,t){if(Fr.isBuffer(e))return e;if(typeof e==="string")return v(e,t);if(ArrayBuffer.isView(e))return N(e.buffer,e.byteOffset,e.byteLength);return N(e)}import{fstatSync as Br,lstatSync as Wr}from"fs";var Ep=(e)=>{if(!e)return 0;if(typeof e==="string")return Buffer.byteLength(e);else if(typeof e.byteLength==="number")return e.byteLength;else if(typeof e.size==="number")return e.size;else if(typeof e.start==="number"&&typeof e.end==="number")return e.end+1-e.start;else if(typeof e.path==="string"||Buffer.isBuffer(e.path))return Wr(e.path).size;else if(typeof e.fd==="number")return Br(e.fd).size;throw new Error(`Body Length computation failed for ${e}`)};var Mt=h(jr(),1);var Dt="AWS_EXECUTION_ENV",ye="AWS_REGION",Ne="AWS_DEFAULT_REGION",Ut="AWS_EC2_METADATA_DISABLED",Pt=["in-region","cross-region","mobile","standard","legacy"],vt="/latest/meta-data/placement/region";var Lt={environmentVariableSelector:(e)=>{return e.AWS_DEFAULTS_MODE},configFileSelector:(e)=>{return e.defaults_mode},default:"legacy"};var wp=({region:e=F(ot),defaultsMode:t=F(Lt)}={})=>Mt.memoize(async()=>{let r=typeof t==="function"?await t():t;switch(r?.toLowerCase()){case"auto":return zr(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Pt.join(", ")}, got ${r}`)}}),zr=async(e)=>{if(e){let t=typeof e==="function"?await e():e,r=await Xr();if(!r)return"standard";if(t===r)return"in-region";else return"cross-region"}return"standard"},Xr=async()=>{if(process.env[Dt]&&(process.env[ye]||process.env[Ne]))return process.env[ye]??process.env[Ne];if(!process.env[Ut])try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await import("./chunk-sn6qz88f.js"),r=await e();return(await t({...r,path:vt})).toString()}catch(e){}};var bp=(e)=>{let t=async()=>{if(e.region===void 0)throw new Error("Region is missing from runtimeConfig");let r=e.region;if(typeof r==="string")return r;return r()};return{setRegion(r){t=r},region(){return t}}},Cp=(e)=>{return{region:e.region()}};var qr=/^[A-Za-z0-9+/]*={0,2}$/,Xp=(e)=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!qr.exec(e))throw new TypeError("Invalid base64 string.");let t=v(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};var Jp=(e)=>{let t;if(typeof e==="string")t=oe(e);else t=e;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 N(t.buffer,t.byteOffset,t.byteLength).toString("base64")};export{Jr as Wa,Kr as Xa,eo as Ya,so as Za,ao as _a,qt as $a,$ as ab,Kt as bb,rr as cb,Hs as db,mi as eb,xi as fb,rt as gb,S as hb,ot as ib,Mi as jb,ni as kb,fa as lb,Da as mb,Ma as nb,mt as ob,Nc as pb,Ic as qb,bc as rb,Zc as sb,kf as tb,Wf as ub,oe as vb,op as wb,Vr as xb,Ep as yb,Xp as zb,Jp as Ab,wp as Bb,bp as Cb,Cp as Db};
|
|
1
|
+
import{Eb as F,Fb as Ee}from"./chunk-e1kefb68.js";import{Ib as m,Jb as Te,ac as wt}from"./chunk-jky37dv1.js";import{hc as _r,ic as be,mc as or,nc as Or}from"./chunk-5vhayxpk.js";import{Cc as me}from"./chunk-8acb2bq0.js";import{Gc as Le}from"./chunk-5eh2tfep.js";import{Pc as Mt}from"./chunk-z80nypa9.js";import{Rc as S,Wc as Yr}from"./chunk-2pj0cr49.js";function Zr(e){return e}var Gt=(e)=>(t)=>async(r)=>{if(!m.isInstance(r.request))return t(r);let{request:o}=r,{handlerProtocol:n=""}=e.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!o.headers[":authority"])delete o.headers.host,o.headers[":authority"]=o.hostname+(o.port?":"+o.port:"");else if(!o.headers.host){let s=o.hostname;if(o.port!=null)s+=`:${o.port}`;o.headers.host=s}return t(r)},Vt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Jr=(e)=>({applyToStack:(t)=>{t.add(Gt(e),Vt)}});var Bt=()=>(e,t)=>async(r)=>{try{let o=await e(r),{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:f}=a,u=c??t.inputFilterSensitiveLog,R=f??t.outputFilterSensitiveLog,{$metadata:l,...d}=o.output;return i?.info?.({clientName:n,commandName:s,input:u(r.input),output:R(d),metadata:l}),o}catch(o){let{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c}=a,f=c??t.inputFilterSensitiveLog;throw i?.error?.({clientName:n,commandName:s,input:f(r.input),error:o,metadata:o.$metadata}),o}},Wt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Qr=(e)=>({applyToStack:(t)=>{t.add(Bt(),Wt)}});var ne="X-Amzn-Trace-Id",Yt="AWS_LAMBDA_FUNCTION_NAME",jt="_X_AMZN_TRACE_ID",zt=(e)=>(t)=>async(r)=>{let{request:o}=r;if(!m.isInstance(o)||e.runtime!=="node")return t(r);let n=Object.keys(o.headers??{}).find((c)=>c.toLowerCase()===ne.toLowerCase())??ne;if(o.headers.hasOwnProperty(n))return t(r);let s=process.env[Yt],i=process.env[jt],a=(c)=>typeof c==="string"&&c.length>0;if(a(s)&&a(i))o.headers[ne]=i;return t({...r,request:o})},Xt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},no=(e)=>({applyToStack:(t)=>{t.add(zt(e),Xt)}});var Ce=S(be(),1),se=void 0;function Ht(e){if(e===void 0)return!0;return typeof e==="string"&&e.length<=50}function io(e){let t=Ce.normalizeProvider(e.userAgentAppId??se);return{...e,customUserAgent:typeof e.customUserAgent==="string"?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{let r=await t();if(!Ht(r)){let o=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;if(typeof r!=="string")o?.warn("userAgentAppId must be a string or undefined.");else if(r.length>50)o?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}}}class qt{constructor({size:e,params:t}){if(this.data=new Map,this.parameters=[],this.capacity=e??50,t)this.parameters=t}get(e,t){let r=this.hash(e);if(r===!1)return t();if(!this.data.has(r)){if(this.data.size>this.capacity+10){let o=this.data.keys(),n=0;while(!0){let{value:s,done:i}=o.next();if(this.data.delete(s),i||++n>10)break}}this.data.set(r,t())}return this.data.get(r)}size(){return this.data.size}hash(e){let t="",{parameters:r}=this;if(r.length===0)return!1;for(let o of r){let n=String(e[o]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}var Zt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),L=(e)=>Zt.test(e)||e.startsWith("[")&&e.endsWith("]");var Jt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),M=(e,t=!1)=>{if(!t)return Jt.test(e);let r=e.split(".");for(let o of r)if(!M(o))return!1;return!0};var $={};var h="endpoints";function E(e){if(typeof e!=="object"||e==null)return e;if("ref"in e)return`$${E(e.ref)}`;if("fn"in e)return`${e.fn}(${(e.argv||[]).map(E).join(", ")})`;return JSON.stringify(e,null,2)}class p extends Error{constructor(e){super(e);this.name="EndpointError"}}var De=(e,t)=>e===t;var Ue=(e)=>{let t=e.split("."),r=[];for(let o of t){let n=o.indexOf("[");if(n!==-1){if(o.indexOf("]")!==o.length-1)throw new p(`Path: '${e}' does not end with ']'`);let s=o.slice(n+1,-1);if(Number.isNaN(parseInt(s)))throw new p(`Invalid array index: '${s}' in path: '${e}'`);if(n!==0)r.push(o.slice(0,n));r.push(s)}else r.push(o)}return r};var B=(e,t)=>Ue(t).reduce((r,o)=>{if(typeof r!=="object")throw new p(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`);else if(Array.isArray(r))return r[parseInt(o)];return r[o]},e);var Pe=(e)=>e!=null;var ve=(e)=>!e;var W=S(Le(),1);var ie={[W.EndpointURLScheme.HTTP]:80,[W.EndpointURLScheme.HTTPS]:443},Me=(e)=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e==="object"&&"hostname"in e){let{hostname:l,port:d,protocol:I="",path:V="",query:$t={}}=e,Ie=new URL(`${I}//${l}${d?`:${d}`:""}${V}`);return Ie.search=Object.entries($t).map(([Ft,kt])=>`${Ft}=${kt}`).join("&"),Ie}return new URL(e)}catch(l){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let r=t.href,{host:o,hostname:n,pathname:s,protocol:i,search:a}=t;if(a)return null;let c=i.slice(0,-1);if(!Object.values(W.EndpointURLScheme).includes(c))return null;let f=L(n),u=r.includes(`${o}:${ie[c]}`)||typeof e==="string"&&e.includes(`${o}:${ie[c]}`),R=`${o}${u?`:${ie[c]}`:""}`;return{scheme:c,authority:R,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:f}};var $e=(e,t)=>e===t;var Fe=(e,t,r,o)=>{if(t>=r||e.length<r)return null;if(!o)return e.substring(t,r);return e.substring(e.length-r,e.length-t)};var ke=(e)=>encodeURIComponent(e).replace(/[!*'()]/g,(t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`);var Ge={booleanEquals:De,getAttr:B,isSet:Pe,isValidHostLabel:M,not:ve,parseURL:Me,stringEquals:$e,substring:Fe,uriEncode:ke};var Y=(e,t)=>{let r=[],o={...t.endpointParams,...t.referenceRecord},n=0;while(n<e.length){let s=e.indexOf("{",n);if(s===-1){r.push(e.slice(n));break}r.push(e.slice(n,s));let i=e.indexOf("}",s);if(i===-1){r.push(e.slice(s));break}if(e[s+1]==="{"&&e[i+1]==="}")r.push(e.slice(s+1,i)),n=i+2;let a=e.substring(s+1,i);if(a.includes("#")){let[c,f]=a.split("#");r.push(B(o[c],f))}else r.push(o[a]);n=i+1}return r.join("")};var Ve=({ref:e},t)=>{return{...t.endpointParams,...t.referenceRecord}[e]};var T=(e,t,r)=>{if(typeof e==="string")return Y(e,r);else if(e.fn)return j(e,r);else if(e.ref)return Ve(e,r);throw new p(`'${t}': ${String(e)} is not a string, function or reference.`)};var j=({fn:e,argv:t},r)=>{let o=t.map((s)=>["boolean","number"].includes(typeof s)?s:T(s,"arg",r)),n=e.split(".");if(n[0]in $&&n[1]!=null)return $[n[0]][n[1]](...o);return Ge[e](...o)};var Be=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new p(`'${e}' is already defined in Reference Record.`);let o=j(t,r);return r.logger?.debug?.(`${h} evaluateCondition: ${E(t)} = ${E(o)}`),{result:o===""?!0:!!o,...e!=null&&{toAssign:{name:e,value:o}}}};var b=(e=[],t)=>{let r={};for(let o of e){let{result:n,toAssign:s}=Be(o,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!n)return{result:n};if(s)r[s.name]=s.value,t.logger?.debug?.(`${h} assign: ${s.name} := ${E(s.value)}`)}return{result:!0,referenceRecord:r}};var We=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:n.map((s)=>{let i=T(s,"Header value entry",t);if(typeof i!=="string")throw new p(`Header '${o}' value '${i}' is not a string`);return i})}),{});var ae=(e,t)=>{if(Array.isArray(e))return e.map((r)=>ae(r,t));switch(typeof e){case"string":return Y(e,t);case"object":if(e===null)throw new p(`Unexpected endpoint property: ${e}`);return z(e,t);case"boolean":return e;default:throw new p(`Unexpected endpoint property type: ${typeof e}`)}};var z=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:ae(n,t)}),{});var Ye=(e,t)=>{let r=T(e,"Endpoint URL",t);if(typeof r==="string")try{return new URL(r)}catch(o){throw console.error(`Failed to construct URL with ${r}`,o),o}throw new p(`Endpoint URL must be a string, got ${typeof r}`)};var je=(e,t)=>{let{conditions:r,endpoint:o}=e,{result:n,referenceRecord:s}=b(r,t);if(!n)return;let i={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:f}=o;return t.logger?.debug?.(`${h} Resolving endpoint from template: ${E(o)}`),{...f!=null&&{headers:We(f,i)},...c!=null&&{properties:z(c,i)},url:Ye(a,i)}};var ze=(e,t)=>{let{conditions:r,error:o}=e,{result:n,referenceRecord:s}=b(r,t);if(!n)return;throw new p(T(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))};var Xe=(e,t)=>{let{conditions:r,rules:o}=e,{result:n,referenceRecord:s}=b(r,t);if(!n)return;return X(o,{...t,referenceRecord:{...t.referenceRecord,...s}})};var X=(e,t)=>{for(let r of e)if(r.type==="endpoint"){let o=je(r,t);if(o)return o}else if(r.type==="error")ze(r,t);else if(r.type==="tree"){let o=Xe(r,t);if(o)return o}else throw new p(`Unknown endpoint rule: ${r}`);throw new p("Rules evaluation failed")};var Kt=(e,t)=>{let{endpointParams:r,logger:o}=t,{parameters:n,rules:s}=e;t.logger?.debug?.(`${h} Initial EndpointParams: ${E(r)}`);let i=Object.entries(n).filter(([,f])=>f.default!=null).map(([f,u])=>[f,u.default]);if(i.length>0)for(let[f,u]of i)r[f]=r[f]??u;let a=Object.entries(n).filter(([,f])=>f.required).map(([f])=>f);for(let f of a)if(r[f]==null)throw new p(`Missing required parameter: '${f}'`);let c=X(s,{endpointParams:r,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${h} Resolved endpoint: ${E(c)}`),c};var ce=(e,t=!1)=>{if(t){for(let r of e.split("."))if(!ce(r))return!1;return!0}if(!M(e))return!1;if(e.length<3||e.length>63)return!1;if(e!==e.toLowerCase())return!1;if(L(e))return!1;return!0};var He=(e)=>{let t=e.split(":");if(t.length<6)return null;let[r,o,n,s,i,...a]=t;if(r!=="arn"||o===""||n===""||a.join(":")==="")return null;let c=a.map((f)=>f.split("/")).flat();return{partition:o,service:n,region:s,accountId:i,resourceId:c}};var qe={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"};var er=qe,tr="",Ze=(e)=>{let{partitions:t}=er;for(let o of t){let{regions:n,outputs:s}=o;for(let[i,a]of Object.entries(n))if(i===e)return{...s,...a}}for(let o of t){let{regionRegex:n,outputs:s}=o;if(new RegExp(n).test(e))return{...s}}let r=t.find((o)=>o.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}};var Je=()=>tr;var rr={isVirtualHostableS3Bucket:ce,parseArn:He,partition:Ze};$.aws=rr;var x=S(or(),1),nr=/\d{12}\.ddb/;async function Ke(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")x.setFeature(e,"PROTOCOL_RPC_V2_CBOR","M");if(typeof t.retryStrategy==="function"){let s=await t.retryStrategy();if(typeof s.acquireInitialRetryToken==="function")if(s.constructor?.name?.includes("Adaptive"))x.setFeature(e,"RETRY_MODE_ADAPTIVE","F");else x.setFeature(e,"RETRY_MODE_STANDARD","E");else x.setFeature(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode==="function"){let s=e.endpointV2;if(String(s?.url?.hostname).match(nr))x.setFeature(e,"ACCOUNT_ID_ENDPOINT","O");switch(await t.accountIdEndpointMode?.()){case"disabled":x.setFeature(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":x.setFeature(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":x.setFeature(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){let s=n;if(s.accountId)x.setFeature(e,"RESOLVED_ACCOUNT_ID","T");for(let[i,a]of Object.entries(s.$source??{}))x.setFeature(e,i,a)}}var fe="user-agent",H="x-amz-user-agent",pe=" ",q="/",Qe=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,et=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,ue="-";function tt(e){let t="";for(let r in e){let o=e[r];if(t.length+o.length+1<=1024){if(t.length)t+=","+o;else t+=o;continue}break}return t}var sr=(e)=>(t,r)=>async(o)=>{let{request:n}=o;if(!m.isInstance(n))return t(o);let{headers:s}=n,i=r?.userAgent?.map(Z)||[],a=(await e.defaultUserAgentProvider()).map(Z);await Ke(r,e,o);let c=r;a.push(`m/${tt(Object.assign({},r.__smithy_context?.features,c.__aws_sdk_context?.features))}`);let f=e?.customUserAgent?.map(Z)||[],u=await e.userAgentAppId();if(u)a.push(Z([`app/${u}`]));let R=Je(),l=(R?[R]:[]).concat([...a,...i,...f]).join(pe),d=[...a.filter((I)=>I.startsWith("aws-sdk-")),...f].join(pe);if(e.runtime!=="browser"){if(d)s[H]=s[H]?`${s[fe]} ${d}`:d;s[fe]=l}else s[H]=l;return t({...o,request:n})},Z=(e)=>{let t=e[0].split(q).map((i)=>i.replace(Qe,ue)).join(q),r=e[1]?.replace(et,ue),o=t.indexOf(q),n=t.substring(0,o),s=t.substring(o+1);if(n==="api")s=s.toLowerCase();return[n,s,r].filter((i)=>i&&i.length>0).reduce((i,a,c)=>{switch(c){case 0:return a;case 1:return`${i}/${a}`;default:return`${i}#${a}`}},"")},ir={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Xs=(e)=>({applyToStack:(t)=>{t.add(sr(e),ir)}});var J=(e)=>typeof e==="string"&&(e.startsWith("fips-")||e.endsWith("-fips"));var de=(e)=>J(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;var oi=(e)=>{let{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if(typeof t==="string")return de(t);let o=await t();return de(o)},useFipsEndpoint:async()=>{let o=typeof t==="string"?t:await t();if(J(o))return!0;return typeof r!=="function"?Promise.resolve(!!r):r()}}};var C=(e,t,r)=>{if(!(t in e))return;if(e[t]==="true")return!0;if(e[t]==="false")return!1;throw new Error(`Cannot load ${r} "${t}". Expected "true" or "false", got ${e[t]}.`)};var O;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(O||(O={}));var ar="AWS_USE_DUALSTACK_ENDPOINT",cr="use_dualstack_endpoint";var li={environmentVariableSelector:(e)=>C(e,ar,O.ENV),configFileSelector:(e)=>C(e,cr,O.CONFIG),default:!1};var fr="AWS_USE_FIPS_ENDPOINT",pr="use_fips_endpoint";var gi={environmentVariableSelector:(e)=>C(e,fr,O.ENV),configFileSelector:(e)=>C(e,pr,O.CONFIG),default:!1};var le=S(Le(),1),rt=(e)=>e[le.SMITHY_CONTEXT_KEY]||(e[le.SMITHY_CONTEXT_KEY]={});var A=(e)=>{if(typeof e==="function")return e;let t=Promise.resolve(e);return()=>t};var ot={environmentVariableSelector:(e)=>e.AWS_REGION,configFileSelector:(e)=>e.region,default:()=>{throw new Error("Region is missing")}},Li={preferredFile:"credentials"};var nt="content-length";function ur(e){return(t)=>async(r)=>{let o=r.request;if(m.isInstance(o)){let{body:n,headers:s}=o;if(n&&Object.keys(s).map((i)=>i.toLowerCase()).indexOf(nt)===-1)try{let i=e(n);o.headers={...o.headers,[nt]:String(i)}}catch(i){}}return t({...r,request:o})}}var dr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ca=(e)=>({applyToStack:(t)=>{t.add(ur(e.bodyLengthChecker),dr)}});var lt=S(_r(),1);var ut=S(be(),1);var st=async(e)=>{let t=e?.Bucket||"";if(typeof e.Bucket==="string")e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(xr(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!gr(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)e.ForcePathStyle=!0;if(e.DisableMultiRegionAccessPoints)e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0;return e},lr=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,mr=/(\d+\.){3}\d+/,Er=/\.\./;var gr=(e)=>lr.test(e)&&!mr.test(e)&&!Er.test(e),xr=(e)=>{let[t,r,o,,,n]=e.split(":"),s=t==="arn"&&e.split(":").length>=6,i=Boolean(s&&r&&o&&n);if(s&&!i)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return i};var it=(e,t,r)=>{let o=async()=>{let n=r[e]??r[t];if(typeof n==="function")return n();return n};if(e==="credentialScope"||t==="CredentialScope")return async()=>{let n=typeof r.credentials==="function"?await r.credentials():r.credentials;return n?.credentialScope??n?.CredentialScope};if(e==="accountId"||t==="AccountId")return async()=>{let n=typeof r.credentials==="function"?await r.credentials():r.credentials;return n?.accountId??n?.AccountId};if(e==="endpoint"||t==="endpoint")return async()=>{let n=await o();if(n&&typeof n==="object"){if("url"in n)return n.url.href;if("hostname"in n){let{protocol:s,hostname:i,port:a,path:c}=n;return`${s}//${i}${a?":"+a:""}${c}`}}return n};return o};var at="AWS_ENDPOINT_URL",ct="endpoint_url",ft=(e)=>({environmentVariableSelector:(t)=>{let r=e.split(" ").map((s)=>s.toUpperCase()),o=t[[at,...r].join("_")];if(o)return o;let n=t[at];if(n)return n;return},configFileSelector:(t,r)=>{if(r&&t.services){let n=r[["services",t.services].join(me)];if(n){let s=e.split(" ").map((a)=>a.toLowerCase()),i=n[[s.join("_"),ct].join(me)];if(i)return i}}let o=t[ct];if(o)return o;return},default:void 0});var K=async(e)=>F(ft(e??""))();var Q=(e)=>{if(typeof e==="object"){if("url"in e)return Ee(e.url);return e}return Ee(e)};var pt=async(e,t,r,o)=>{if(!r.endpoint){let i;if(r.serviceConfiguredEndpoint)i=await r.serviceConfiguredEndpoint();else i=await K(r.serviceId);if(i)r.endpoint=()=>Promise.resolve(Q(i))}let n=await Rr(e,t,r);if(typeof r.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(n,o)},Rr=async(e,t,r)=>{let o={},n=t?.getEndpointParameterInstructions?.()||{};for(let[s,i]of Object.entries(n))switch(i.type){case"staticContextParams":o[s]=i.value;break;case"contextParams":o[s]=e[i.name];break;case"clientContextParams":case"builtInParams":o[s]=await it(i.name,s,r)();break;case"operationContextParams":o[s]=i.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(i))}if(Object.keys(n).length===0)Object.assign(o,r);if(String(r.serviceId).toLowerCase()==="s3")await st(o);return o};var dt=({config:e,instructions:t})=>{return(r,o)=>async(n)=>{if(e.endpoint)ut.setFeature(o,"ENDPOINT_OVERRIDE","N");let s=await pt(n.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=s,o.authSchemes=s.properties?.authSchemes;let i=o.authSchemes?.[0];if(i){o.signing_region=i.signingRegion,o.signing_service=i.signingName;let c=rt(o)?.selectedHttpAuthScheme?.httpAuthOption;if(c)c.signingProperties=Object.assign(c.signingProperties||{},{signing_region:i.signingRegion,signingRegion:i.signingRegion,signing_service:i.signingName,signingName:i.signingName,signingRegionSet:i.signingRegionSet},i.properties)}return r({...n})}};var hr={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:lt.serializerMiddlewareOption.name},Ca=(e,t)=>({applyToStack:(r)=>{r.addRelativeTo(dt({config:e,instructions:t}),hr)}});var La=(e)=>{let t=e.tls??!0,{endpoint:r}=e,o=r!=null?async()=>Q(await A(r)()):void 0,s={...e,endpoint:o,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:A(e.useDualstackEndpoint??!1),useFipsEndpoint:A(e.useFipsEndpoint??!1)},i=void 0;return s.serviceConfiguredEndpoint=async()=>{if(e.serviceId&&!i)i=K(e.serviceId);return i},s};var g;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(g||(g={}));var w=3,mt=g.STANDARD;var Et=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],gt=["TimeoutError","RequestTimeout","RequestTimeoutException"],xt=[500,502,503,504],Rt=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var Ar=(e)=>e.$metadata?.clockSkewCorrected,D=(e)=>e.$metadata?.httpStatusCode===429||Et.includes(e.name)||e.$retryable?.throttling==!0,k=(e,t=0)=>Ar(e)||gt.includes(e.name)||Rt.includes(e?.code||"")||xt.includes(e.$metadata?.httpStatusCode||0)||e.cause!==void 0&&t<=10&&k(e.cause,t+1),_t=(e)=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;if(500<=t&&t<=599&&!k(e))return!0;return!1}return!1};class U{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??0.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??0.5,this.scaleConstant=e?.scaleConstant??0.4,this.smooth=e?.smooth??0.8;let t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(!this.enabled)return;if(this.refillTokenBucket(),e>this.currentCapacity){let t=(e-this.currentCapacity)/this.fillRate*1000;await new Promise((r)=>U.setTimeoutFn(r,t))}this.currentCapacity=this.currentCapacity-e}refillTokenBucket(){let e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}let t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),D(e)){let o=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=o,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(o),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());let r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let e=this.getCurrentTimeInSeconds(),t=Math.floor(e*2)/2;if(this.requestCount++,t>this.lastTxRateBucket){let r=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}U.setTimeoutFn=setTimeout;var y=100,G=20000,ge=500,ee=500,xe=5,Re=10,_e=1,te="amz-sdk-invocation-id",re="amz-sdk-request";var ht=()=>{let e=y;return{computeNextBackoffDelay:(o)=>{return Math.floor(Math.min(G,Math.random()*2**o*e))},setDelayBase:(o)=>{e=o}}};var he=({retryDelay:e,retryCount:t,retryCost:r})=>{return{getRetryCount:()=>t,getRetryDelay:()=>Math.min(G,e),getRetryCost:()=>r}};class P{constructor(e){this.maxAttempts=e,this.mode=g.STANDARD,this.capacity=ee,this.retryBackoffStrategy=ht(),this.maxAttemptsProvider=typeof e==="function"?e:async()=>e}async acquireInitialRetryToken(e){return he({retryDelay:y,retryCount:0})}async refreshRetryTokenForRetry(e,t){let r=await this.getMaxAttempts();if(this.shouldRetry(e,t,r)){let o=t.errorType;this.retryBackoffStrategy.setDelayBase(o==="THROTTLING"?ge:y);let n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),s=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,i=this.getCapacityCost(o);return this.capacity-=i,he({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:i})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(ee,this.capacity+(e.getRetryCost()??_e))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${w}`),w}}shouldRetry(e,t,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e==="TRANSIENT"?Re:xe}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class Ae{constructor(e,t){this.maxAttemptsProvider=e,this.mode=g.ADAPTIVE;let{rateLimiter:r}=t??{};this.rateLimiter=r??new U,this.standardRetryStrategy=new P(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}var At="AWS_MAX_ATTEMPTS",St="max_attempts",yc={environmentVariableSelector:(e)=>{let t=e[At];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${At} mast be a number, got "${t}"`);return r},configFileSelector:(e)=>{let t=e[St];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${St} mast be a number, got "${t}"`);return r},default:w},Nc=(e)=>{let{retryStrategy:t}=e,r=A(e.maxAttempts??w);return{...e,maxAttempts:r,retryStrategy:async()=>{if(t)return t;if(await A(e.retryMode)()===g.ADAPTIVE)return new Ae(r);return new P(r)}}},Sr="AWS_RETRY_MODE",Tr="retry_mode",Ic={environmentVariableSelector:(e)=>e[Sr],configFileSelector:(e)=>e[Tr],default:mt};var _=S(Or(),1),Cc=_.default.v1,Dc=_.default.v3,Tt=_.default.v4,Uc=_.default.v5,Pc=_.default.NIL,vc=_.default.version,Lc=_.default.validate,Mc=_.default.stringify,$c=_.default.parse;import{Readable as wr}from"stream";var Ot=(e)=>e?.body instanceof wr||typeof ReadableStream!=="undefined"&&e?.body instanceof ReadableStream;var Se=(e)=>{if(e instanceof Error)return e;if(e instanceof Object)return Object.assign(new Error,e);if(typeof e==="string")return new Error(e);return new Error(`AWS SDK error wrapper for ${e}`)};var yr=(e)=>(t,r)=>async(o)=>{let n=await e.retryStrategy(),s=await e.maxAttempts();if(Nr(n)){n=n;let i=await n.acquireInitialRetryToken(r.partition_id),a=new Error,c=0,f=0,{request:u}=o,R=m.isInstance(u);if(R)u.headers[te]=Tt();while(!0)try{if(R)u.headers[re]=`attempt=${c+1}; max=${s}`;let{response:l,output:d}=await t(o);return n.recordSuccess(i),d.$metadata.attempts=c+1,d.$metadata.totalRetryDelay=f,{response:l,output:d}}catch(l){let d=Ir(l);if(a=Se(l),R&&Ot(u))throw(r.logger instanceof wt?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{i=await n.refreshRetryTokenForRetry(i,d)}catch(V){if(!a.$metadata)a.$metadata={};throw a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=f,a}c=i.getRetryCount();let I=i.getRetryDelay();f+=I,await new Promise((V)=>setTimeout(V,I))}}else{if(n=n,n?.mode)r.userAgent=[...r.userAgent||[],["cfg/retry-mode",n.mode]];return n.retry(t,o)}},Nr=(e)=>typeof e.acquireInitialRetryToken!=="undefined"&&typeof e.refreshRetryTokenForRetry!=="undefined"&&typeof e.recordSuccess!=="undefined",Ir=(e)=>{let t={error:e,errorType:br(e)},r=Dr(e.$response);if(r)t.retryAfterHint=r;return t},br=(e)=>{if(D(e))return"THROTTLING";if(k(e))return"TRANSIENT";if(_t(e))return"SERVER_ERROR";return"CLIENT_ERROR"},Cr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},qc=(e)=>({applyToStack:(t)=>{t.add(yr(e),Cr)}}),Dr=(e)=>{if(!Te.isInstance(e))return;let t=Object.keys(e.headers).find((s)=>s.toLowerCase()==="retry-after");if(!t)return;let r=e.headers[t],o=Number(r);if(!Number.isNaN(o))return new Date(o*1000);return new Date(r)};import{platform as Ur,release as Pr}from"os";import{env as Nt,versions as vr}from"process";var Oe={isCrtAvailable:!1};var yt=()=>{if(Oe.isCrtAvailable)return["md/crt-avail"];return null};var Ff=({serviceId:e,clientVersion:t})=>{return async(r)=>{let o=[["aws-sdk-js",t],["ua","2.1"],[`os/${Ur()}`,Pr()],["lang/js"],["md/nodejs",`${vr.node}`]],n=yt();if(n)o.push(n);if(e)o.push([`api/${e}`,t]);if(Nt.AWS_EXECUTION_ENV)o.push([`exec-env/${Nt.AWS_EXECUTION_ENV}`]);let s=await r?.userAgentAppId?.();return s?[...o,[`app/${s}`]]:[...o]}};var Lr="AWS_SDK_UA_APP_ID",Mr="sdk_ua_app_id",$r="sdk-ua-app-id",Bf={environmentVariableSelector:(e)=>e[Lr],configFileSelector:(e)=>e[Mr]??e[$r],default:se};var It=(e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";import{Buffer as we}from"buffer";var N=(e,t=0,r=e.byteLength-t)=>{if(!It(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return we.from(e,t,r)},v=(e,t)=>{if(typeof e!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?we.from(e,t):we.from(e)};var oe=(e)=>{let t=v(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var bt=(e)=>{if(typeof e==="string")return oe(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)};var rp=(e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return N(e.buffer,e.byteOffset,e.byteLength).toString("utf8")};import{Buffer as Fr}from"buffer";import{createHash as kr,createHmac as Gr}from"crypto";class Vr{constructor(e,t){this.algorithmIdentifier=e,this.secret=t,this.reset()}update(e,t){this.hash.update(bt(Ct(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Gr(this.algorithmIdentifier,Ct(this.secret)):kr(this.algorithmIdentifier)}}function Ct(e,t){if(Fr.isBuffer(e))return e;if(typeof e==="string")return v(e,t);if(ArrayBuffer.isView(e))return N(e.buffer,e.byteOffset,e.byteLength);return N(e)}import{fstatSync as Br,lstatSync as Wr}from"fs";var mp=(e)=>{if(!e)return 0;if(typeof e==="string")return Buffer.byteLength(e);else if(typeof e.byteLength==="number")return e.byteLength;else if(typeof e.size==="number")return e.size;else if(typeof e.start==="number"&&typeof e.end==="number")return e.end+1-e.start;else if(typeof e.path==="string"||Buffer.isBuffer(e.path))return Wr(e.path).size;else if(typeof e.fd==="number")return Br(e.fd).size;throw new Error(`Body Length computation failed for ${e}`)};var Dt="AWS_EXECUTION_ENV",ye="AWS_REGION",Ne="AWS_DEFAULT_REGION",Ut="AWS_EC2_METADATA_DISABLED",Pt=["in-region","cross-region","mobile","standard","legacy"],vt="/latest/meta-data/placement/region";var Lt={environmentVariableSelector:(e)=>{return e.AWS_DEFAULTS_MODE},configFileSelector:(e)=>{return e.defaults_mode},default:"legacy"};var wp=({region:e=F(ot),defaultsMode:t=F(Lt)}={})=>Mt(async()=>{let r=typeof t==="function"?await t():t;switch(r?.toLowerCase()){case"auto":return jr(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Pt.join(", ")}, got ${r}`)}}),jr=async(e)=>{if(e){let t=typeof e==="function"?await e():e,r=await zr();if(!r)return"standard";if(t===r)return"in-region";else return"cross-region"}return"standard"},zr=async()=>{if(process.env[Dt]&&(process.env[ye]||process.env[Ne]))return process.env[ye]??process.env[Ne];if(!process.env[Ut])try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await import("./chunk-vrd8j1ky.js"),r=await e();return(await t({...r,path:vt})).toString()}catch(e){}};var bp=(e)=>{let t=async()=>{if(e.region===void 0)throw new Error("Region is missing from runtimeConfig");let r=e.region;if(typeof r==="string")return r;return r()};return{setRegion(r){t=r},region(){return t}}},Cp=(e)=>{return{region:e.region()}};var Hr=/^[A-Za-z0-9+/]*={0,2}$/,Xp=(e)=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Hr.exec(e))throw new TypeError("Invalid base64 string.");let t=v(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};var Jp=(e)=>{let t;if(typeof e==="string")t=oe(e);else t=e;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 N(t.buffer,t.byteOffset,t.byteLength).toString("base64")};export{Zr as Wa,Jr as Xa,Qr as Ya,no as Za,io as _a,qt as $a,$ as ab,Kt as bb,rr as cb,Xs as db,li as eb,gi as fb,rt as gb,A as hb,ot as ib,Li as jb,oi as kb,ca as lb,Ca as mb,La as nb,mt as ob,yc as pb,Nc as qb,Ic as rb,qc as sb,Ff as tb,Bf as ub,oe as vb,rp as wb,Vr as xb,mp as yb,Xp as zb,Jp as Ab,wp as Bb,bp as Cb,Cp as Db};
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$ as X,Aa as i,Ba as c,P as M,Q as N,R as O,S as Q,T as R,U as S,W as T,X as U,Z as V,_ as W,aa as Y,ba as Z,ca as _,da as $,ea as x,fa as z,ga as C,ha as F,ia as P,ja as h,ka as A,la as D,ma as k,na as f,oa as j,pa as I,qa as g,ra as p,sa as a,ta as m,ua as J,xa as n,ya as l}from"./chunk-
|
|
2
|
+
import{$ as X,Aa as i,Ba as c,P as M,Q as N,R as O,S as Q,T as R,U as S,W as T,X as U,Z as V,_ as W,aa as Y,ba as Z,ca as _,da as $,ea as x,fa as z,ga as C,ha as F,ia as P,ja as h,ka as A,la as D,ma as k,na as f,oa as j,pa as I,qa as g,ra as p,sa as a,ta as m,ua as J,xa as n,ya as l}from"./chunk-7kc7thq5.js";import"./chunk-yv49ttdw.js";import"./chunk-ks9kq37e.js";import"./chunk-zm0j2nyb.js";import"./chunk-e1kefb68.js";import"./chunk-jky37dv1.js";import"./chunk-5vhayxpk.js";import"./chunk-ww48v0ap.js";import"./chunk-8acb2bq0.js";import"./chunk-5eh2tfep.js";import"./chunk-2xrqj8ap.js";import"./chunk-z80nypa9.js";import"./chunk-bgqy98qw.js";import"./chunk-2pj0cr49.js";import w from"process";import{runAction as t}from"@stacksjs/actions";import{cli as e,log as v}from"@stacksjs/cli";import{Action as o}from"@stacksjs/enums";import{path as L}from"@stacksjs/path";import{fs as r}from"@stacksjs/storage";import{ensureProjectIsInitialized as b}from"@stacksjs/utils";w.on("uncaughtException",(q)=>{v.debug("Buddy uncaughtException"),v.error(q),w.exit(1)});w.on("unhandledRejection",(q)=>{v.debug("Buddy unhandledRejection"),v.error(q),w.exit(1)});async function s(){let q=e("buddy");if(J(q),x(q),await b())v.debug("Project is initialized");else{v.info("Your `APP_KEY` is not yet set"),v.info("Generating application key...");let B=await t(o.KeyGenerate);if(B.isErr())v.error("Failed to set random application key.",B.error),w.exit()}M(q),N(q),O(q),Q(q),R(q),S(q),U(q),W(q),T(q),V(q),A(q),k(q),Y(q),Z(q),_(q),$(q),z(q),C(q),F(q),P(q),h(q),f(q),j(q),I(q),g(q),a(q),X(q),m(q),J(q),p(q),n(q),l(q),c(q),D(q),i(q),await y(q),q.help(),q.parse()}await s();async function y(q){let G=L.appPath("Commands"),B=r.readdirSync(G).filter((E)=>E.endsWith(".ts"));for(let E of B){let H=await import(`${G}/${E}`);if(typeof H.default==="function")H.default(q);else console.error(`Expected a default export function in ${E}, but got:`,H.default)}let K=await import(L.listenersPath("Console.ts"));if(typeof K.default==="function")K.default(q)}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$ as i,Aa as P,Ba as Q,P as e,Q as f,R as m,S as p,T as t,U as x,V as a,W as b,X as c,Y as d,Z as g,_ as h,aa as j,ba as k,ca as l,da as n,ea as q,fa as s,ga as u,ha as v,ia as w,ja as y,ka as z,la as A,ma as B,na as C,oa as D,pa as E,qa as F,ra as G,sa as H,ta as I,ua as J,va as K,wa as L,xa as M,ya as N,za as O}from"./chunk-
|
|
2
|
+
import{$ as i,Aa as P,Ba as Q,P as e,Q as f,R as m,S as p,T as t,U as x,V as a,W as b,X as c,Y as d,Z as g,_ as h,aa as j,ba as k,ca as l,da as n,ea as q,fa as s,ga as u,ha as v,ia as w,ja as y,ka as z,la as A,ma as B,na as C,oa as D,pa as E,qa as F,ra as G,sa as H,ta as I,ua as J,va as K,wa as L,xa as M,ya as N,za as O}from"./chunk-7kc7thq5.js";import"./chunk-yv49ttdw.js";import"./chunk-ks9kq37e.js";import"./chunk-zm0j2nyb.js";import"./chunk-e1kefb68.js";import"./chunk-jky37dv1.js";import"./chunk-5vhayxpk.js";import"./chunk-ww48v0ap.js";import"./chunk-8acb2bq0.js";import"./chunk-5eh2tfep.js";import"./chunk-2xrqj8ap.js";import"./chunk-z80nypa9.js";import"./chunk-bgqy98qw.js";import"./chunk-2pj0cr49.js";export{Q as version,P as upgrade,O as types,N as tinker,M as test,d as startDevelopmentServer,J as setup,I as seed,H as search,G as schedule,F as saas,E as route,D as release,C as queue,B as projects,A as prepublish,z as ports,y as outdated,K as optimizePkgxDeps,w as migrate,v as make,u as list,s as lint,q as key,n as install,l as http,k as generate,j as fresh,i as env,L as ensureEnvIsSet,h as domains,g as dns,c as dev,b as deploy,a as create,x as configure,t as commit,p as cloud,m as clean,f as changelog,e as build};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/buddy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.70.
|
|
4
|
+
"version": "0.70.10",
|
|
5
5
|
"description": "Meet Buddy. The Stacks runtime.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"contributors": ["Chris Breuer <chris@stacksjs.org>"],
|
|
@@ -71,52 +71,52 @@
|
|
|
71
71
|
"prepublishOnly": "bun run build && bun run compile:all"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@stacksjs/actions": "0.70.
|
|
75
|
-
"@stacksjs/ai": "0.70.
|
|
76
|
-
"@stacksjs/alias": "0.70.
|
|
77
|
-
"@stacksjs/arrays": "0.70.
|
|
78
|
-
"@stacksjs/auth": "0.70.
|
|
79
|
-
"@stacksjs/build": "0.70.
|
|
80
|
-
"@stacksjs/cache": "0.70.
|
|
81
|
-
"@stacksjs/cli": "0.70.
|
|
82
|
-
"@stacksjs/cloud": "0.70.
|
|
83
|
-
"@stacksjs/collections": "0.70.
|
|
84
|
-
"@stacksjs/config": "0.70.
|
|
85
|
-
"@stacksjs/database": "0.70.
|
|
86
|
-
"@stacksjs/desktop": "0.70.
|
|
87
|
-
"@stacksjs/development": "0.70.
|
|
88
|
-
"@stacksjs/dns": "0.70.
|
|
89
|
-
"@stacksjs/docs": "0.70.
|
|
90
|
-
"@stacksjs/email": "0.70.
|
|
91
|
-
"@stacksjs/enums": "0.70.
|
|
92
|
-
"@stacksjs/error-handling": "0.70.
|
|
93
|
-
"@stacksjs/events": "0.70.
|
|
94
|
-
"@stacksjs/faker": "0.70.
|
|
95
|
-
"@stacksjs/git": "0.70.
|
|
96
|
-
"@stacksjs/health": "0.70.
|
|
97
|
-
"@stacksjs/lint": "0.70.
|
|
98
|
-
"@stacksjs/logging": "0.70.
|
|
99
|
-
"@stacksjs/notifications": "0.70.
|
|
100
|
-
"@stacksjs/objects": "0.70.
|
|
101
|
-
"@stacksjs/orm": "0.70.
|
|
102
|
-
"@stacksjs/path": "0.70.
|
|
103
|
-
"@stacksjs/payments": "0.70.
|
|
104
|
-
"@stacksjs/realtime": "0.70.
|
|
105
|
-
"@stacksjs/router": "0.70.
|
|
106
|
-
"@stacksjs/search-engine": "0.70.
|
|
107
|
-
"@stacksjs/security": "0.70.
|
|
108
|
-
"@stacksjs/server": "0.70.
|
|
109
|
-
"@stacksjs/storage": "0.70.
|
|
110
|
-
"@stacksjs/strings": "0.70.
|
|
111
|
-
"@stacksjs/testing": "0.70.
|
|
112
|
-
"@stacksjs/tunnel": "0.70.
|
|
113
|
-
"@stacksjs/types": "0.70.
|
|
114
|
-
"@stacksjs/ui": "0.70.
|
|
115
|
-
"@stacksjs/utils": "0.70.
|
|
116
|
-
"@stacksjs/validation": "0.70.
|
|
74
|
+
"@stacksjs/actions": "0.70.8",
|
|
75
|
+
"@stacksjs/ai": "0.70.8",
|
|
76
|
+
"@stacksjs/alias": "0.70.8",
|
|
77
|
+
"@stacksjs/arrays": "0.70.8",
|
|
78
|
+
"@stacksjs/auth": "0.70.8",
|
|
79
|
+
"@stacksjs/build": "0.70.8",
|
|
80
|
+
"@stacksjs/cache": "0.70.8",
|
|
81
|
+
"@stacksjs/cli": "0.70.8",
|
|
82
|
+
"@stacksjs/cloud": "0.70.8",
|
|
83
|
+
"@stacksjs/collections": "0.70.8",
|
|
84
|
+
"@stacksjs/config": "0.70.8",
|
|
85
|
+
"@stacksjs/database": "0.70.8",
|
|
86
|
+
"@stacksjs/desktop": "0.70.8",
|
|
87
|
+
"@stacksjs/development": "0.70.8",
|
|
88
|
+
"@stacksjs/dns": "0.70.8",
|
|
89
|
+
"@stacksjs/docs": "0.70.8",
|
|
90
|
+
"@stacksjs/email": "0.70.8",
|
|
91
|
+
"@stacksjs/enums": "0.70.8",
|
|
92
|
+
"@stacksjs/error-handling": "0.70.8",
|
|
93
|
+
"@stacksjs/events": "0.70.8",
|
|
94
|
+
"@stacksjs/faker": "0.70.8",
|
|
95
|
+
"@stacksjs/git": "0.70.8",
|
|
96
|
+
"@stacksjs/health": "0.70.8",
|
|
97
|
+
"@stacksjs/lint": "0.70.8",
|
|
98
|
+
"@stacksjs/logging": "0.70.8",
|
|
99
|
+
"@stacksjs/notifications": "0.70.8",
|
|
100
|
+
"@stacksjs/objects": "0.70.8",
|
|
101
|
+
"@stacksjs/orm": "0.70.8",
|
|
102
|
+
"@stacksjs/path": "0.70.8",
|
|
103
|
+
"@stacksjs/payments": "0.70.8",
|
|
104
|
+
"@stacksjs/realtime": "0.70.8",
|
|
105
|
+
"@stacksjs/router": "0.70.8",
|
|
106
|
+
"@stacksjs/search-engine": "0.70.8",
|
|
107
|
+
"@stacksjs/security": "0.70.8",
|
|
108
|
+
"@stacksjs/server": "0.70.8",
|
|
109
|
+
"@stacksjs/storage": "0.70.8",
|
|
110
|
+
"@stacksjs/strings": "0.70.8",
|
|
111
|
+
"@stacksjs/testing": "0.70.8",
|
|
112
|
+
"@stacksjs/tunnel": "0.70.8",
|
|
113
|
+
"@stacksjs/types": "0.70.8",
|
|
114
|
+
"@stacksjs/ui": "0.70.8",
|
|
115
|
+
"@stacksjs/utils": "0.70.8",
|
|
116
|
+
"@stacksjs/validation": "0.70.8"
|
|
117
117
|
},
|
|
118
118
|
"devDependencies": {
|
|
119
|
-
"@stacksjs/development": "0.70.
|
|
119
|
+
"@stacksjs/development": "0.70.8"
|
|
120
120
|
},
|
|
121
121
|
"config": {
|
|
122
122
|
"commitizen": {
|
package/dist/chunk-295712vp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Cc as w,yc as u}from"./chunk-sam82sz4.js";import{Kc as m}from"./chunk-bh567hxp.js";import{Lc as s}from"./chunk-yw7gqyfc.js";var a=s(m(),1);var g=s(m(),1);function c(o){try{let r=new Set(Array.from(o.match(/([A-Z_]){3,}/g)??[]));return r.delete("CONFIG"),r.delete("CONFIG_PREFIX_SEPARATOR"),r.delete("ENV"),[...r].join(", ")}catch(r){return o}}var h=(o,r)=>async()=>{try{let t=o(process.env);if(t===void 0)throw new Error;return t}catch(t){throw new g.CredentialsProviderError(t.message||`Not found in ENV: ${c(o.toString())}`,{logger:r})}};var y=s(m(),1);var C=(o,{preferredFile:r="config",...t}={})=>async()=>{let e=u(t),{configFile:n,credentialsFile:i}=await w(t),f=i[e]||{},p=n[e]||{},N=r==="config"?{...f,...p}:{...p,...f};try{let d=o(N,r==="config"?n:i);if(d===void 0)throw new Error;return d}catch(l){throw new y.CredentialsProviderError(l.message||`Not found in config files w/ profile [${e}]: ${c(o.toString())}`,{logger:t.logger})}};var F=s(m(),1),x=(o)=>typeof o==="function",S=(o)=>x(o)?async()=>await o():F.fromStatic(o);var T=({environmentVariableSelector:o,configFileSelector:r,default:t},e={})=>a.memoize(a.chain(h(o),C(r,e),S(t)));function E(o){let r={};if(o=o.replace(/^\?/,""),o)for(let t of o.split("&")){let[e,n=null]=t.split("=");if(e=decodeURIComponent(e),n)n=decodeURIComponent(n);if(!(e in r))r[e]=n;else if(Array.isArray(r[e]))r[e].push(n);else r[e]=[r[e],n]}return r}var v=(o)=>{if(typeof o==="string")return v(new URL(o));let{hostname:r,pathname:t,port:e,protocol:n,search:i}=o,f;if(i)f=E(i);return{hostname:r,port:e?parseInt(e):void 0,protocol:n,path:t,query:f}};
|
|
2
|
-
export{T as Eb,v as Fb};
|
package/dist/chunk-3brfg8yr.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ac as R,Dc as v,Ec as A,yc as I,zc as z}from"./chunk-sam82sz4.js";import"./chunk-z9kxm35m.js";import{Jc as oe}from"./chunk-7ddwd2rs.js";import{Kc as u}from"./chunk-bh567hxp.js";import{Lc as S,Qc as D}from"./chunk-yw7gqyfc.js";var T=S(u(),1);var H=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var F=S(oe(),1);var x=S(u(),1);var U=300000,h="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var q=async(e,s={})=>{let{SSOOIDCClient:o}=await import("./chunk-pkq51vpd.js");return new o(Object.assign({},s.clientConfig??{},{region:e??s.clientConfig?.region,logger:s.clientConfig?.logger??s.parentClientConfig?.logger}))};var W=async(e,s,o={})=>{let{CreateTokenCommand:i}=await import("./chunk-pkq51vpd.js");return(await q(s,o)).send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var j=S(u(),1);var $=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new j.TokenProviderError(`Token is expired. ${h}`,!1)};var X=S(u(),1);var g=(e,s,o=!1)=>{if(typeof s==="undefined")throw new X.TokenProviderError(`Value not present for '${e}' in SSO Token${o?". Cannot refresh":""}. ${h}`,!1)};import{promises as Z}from"fs";var{writeFile:ee}=Z,J=(e,s)=>{let o=z(e),i=JSON.stringify(s,null,2);return ee(o,i)};var V=new Date(0),Y=(e={})=>async({callerClientConfig:s}={})=>{let o={...e,parentClientConfig:{...s,...e.parentClientConfig}};o.logger?.debug("@aws-sdk/token-providers - fromSso");let i=await A(o),r=I({profile:o.profile??s?.profile}),f=i[r];if(!f)throw new x.TokenProviderError(`Profile '${r}' could not be found in shared credentials file.`,!1);else if(!f.sso_session)throw new x.TokenProviderError(`Profile '${r}' is missing required property 'sso_session'.`);let l=f.sso_session,a=(await v(o))[l];if(!a)throw new x.TokenProviderError(`Sso session '${l}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new x.TokenProviderError(`Sso session '${l}' is missing required property '${n}'.`,!1);let{sso_start_url:w,sso_region:t}=a,c;try{c=await R(l)}catch(n){throw new x.TokenProviderError(`The SSO session token associated with profile=${r} was not found or is invalid. ${h}`,!1)}g("accessToken",c.accessToken),g("expiresAt",c.expiresAt);let{accessToken:E,expiresAt:O}=c,p={token:E,expiration:new Date(O)};if(p.expiration.getTime()-Date.now()>U)return p;if(Date.now()-V.getTime()<30000)return $(p),p;g("clientId",c.clientId,!0),g("clientSecret",c.clientSecret,!0),g("refreshToken",c.refreshToken,!0);try{V.setTime(Date.now());let n=await W(c,t,o);g("accessToken",n.accessToken),g("expiresIn",n.expiresIn);let _=new Date(Date.now()+n.expiresIn*1000);try{await J(l,{...c,accessToken:n.accessToken,expiresAt:_.toISOString(),refreshToken:n.refreshToken})}catch(m){}return{token:n.accessToken,expiration:_}}catch(n){return $(p),p}};var k=S(u(),1);var N=!1,L=async({ssoStartUrl:e,ssoSession:s,ssoAccountId:o,ssoRegion:i,ssoRoleName:r,ssoClient:f,clientConfig:l,parentClientConfig:y,profile:a,logger:w})=>{let t,c="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{let d=await Y({profile:a})();t={accessToken:d.token,expiresAt:new Date(d.expiration).toISOString()}}catch(d){throw new k.CredentialsProviderError(d.message,{tryNextLink:N,logger:w})}else try{t=await R(e)}catch(d){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:N,logger:w})}if(new Date(t.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:N,logger:w});let{accessToken:E}=t,{SSOClient:O,GetRoleCredentialsCommand:p}=await import("./chunk-7mbz5p0r.js"),n=f||new O(Object.assign({},l??{},{logger:l?.logger??y?.logger,region:l?.region??i})),_;try{_=await n.send(new p({accountId:o,roleName:r,accessToken:E}))}catch(d){throw new k.CredentialsProviderError(d,{tryNextLink:N,logger:w})}let{roleCredentials:{accessKeyId:m,secretAccessKey:C,sessionToken:M,expiration:G,credentialScope:K,accountId:b}={}}=_;if(!m||!C||!M||!G)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:N,logger:w});let P={accessKeyId:m,secretAccessKey:C,sessionToken:M,expiration:new Date(G),...K&&{credentialScope:K},...b&&{accountId:b}};if(s)F.setCredentialFeature(P,"CREDENTIALS_SSO","s");else F.setCredentialFeature(P,"CREDENTIALS_SSO_LEGACY","u");return P};var B=S(u(),1),Q=(e,s)=>{let{sso_start_url:o,sso_account_id:i,sso_region:r,sso_role_name:f}=e;if(!o||!i||!r||!f)throw new B.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}
|
|
3
|
-
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:s});return e};var Re=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:o,ssoAccountId:i,ssoRegion:r,ssoRoleName:f,ssoSession:l}=e,{ssoClient:y}=e,a=I({profile:e.profile??s?.profile});if(!o&&!i&&!r&&!f&&!l){let t=(await A(e))[a];if(!t)throw new T.CredentialsProviderError(`Profile ${a} was not found.`,{logger:e.logger});if(!H(t))throw new T.CredentialsProviderError(`Profile ${a} is not configured with SSO credentials.`,{logger:e.logger});if(t?.sso_session){let m=(await v(e))[t.sso_session],C=` configurations in profile ${a} and sso-session ${t.sso_session}`;if(r&&r!==m.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+C,{tryNextLink:!1,logger:e.logger});if(o&&o!==m.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+C,{tryNextLink:!1,logger:e.logger});t.sso_region=m.sso_region,t.sso_start_url=m.sso_start_url}let{sso_start_url:c,sso_account_id:E,sso_region:O,sso_role_name:p,sso_session:n}=Q(t,e.logger);return L({ssoStartUrl:c,ssoSession:n,ssoAccountId:E,ssoRegion:O,ssoRoleName:p,ssoClient:y,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:a})}else if(!o||!i||!r||!f)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return L({ssoStartUrl:o,ssoSession:l,ssoAccountId:i,ssoRegion:r,ssoRoleName:f,ssoClient:y,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:a})};export{Q as validateSsoProfile,H as isSsoProfile,Re as fromSSO};
|
package/dist/chunk-68weqe1q.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Jc as T}from"./chunk-7ddwd2rs.js";import{Kc as f}from"./chunk-bh567hxp.js";import{Lc as E,Qc as p}from"./chunk-yw7gqyfc.js";var c=E(T(),1),N=E(f(),1);import{readFileSync as A}from"fs";var i=(e)=>async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:r,roleSessionName:s,webIdentityToken:n,providerId:S,policyArns:d,policy:l,durationSeconds:m}=e,{roleAssumerWithWebIdentity:t}=e;if(!t){let{getDefaultRoleAssumerWithWebIdentity:a}=await import("./chunk-fe2marcb.js");t=a({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...o?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return t({RoleArn:r,RoleSessionName:s??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:S,PolicyArns:d,Policy:l,DurationSeconds:m})};var _="AWS_WEB_IDENTITY_TOKEN_FILE",I="AWS_ROLE_ARN",O="AWS_ROLE_SESSION_NAME",k=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[_],r=e?.roleArn??process.env[I],s=e?.roleSessionName??process.env[O];if(!o||!r)throw new N.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});let n=await i({...e,webIdentityToken:A(o,{encoding:"ascii"}),roleArn:r,roleSessionName:s})();if(o===process.env[_])c.setCredentialFeature(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return n};export{i as fromWebToken,k as fromTokenFile};
|
package/dist/chunk-9p4cqdee.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Jc as A}from"./chunk-7ddwd2rs.js";import{Kc as C}from"./chunk-bh567hxp.js";import{Lc as _}from"./chunk-yw7gqyfc.js";var S=_(A(),1),p=_(C(),1),N="AWS_ACCESS_KEY_ID",a="AWS_SECRET_ACCESS_KEY",i="AWS_SESSION_TOKEN",I="AWS_CREDENTIAL_EXPIRATION",d="AWS_CREDENTIAL_SCOPE",v="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[N],r=process.env[a],n=process.env[i],s=process.env[I],t=process.env[d],E=process.env[v];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new p.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{T as fromEnv,i as ENV_SESSION,a as ENV_SECRET,N as ENV_KEY,I as ENV_EXPIRATION,d as ENV_CREDENTIAL_SCOPE,v as ENV_ACCOUNT_ID};export{N as Gc,a as Hc,T as Ic};
|
package/dist/chunk-bh567hxp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Nc as $}from"./chunk-yw7gqyfc.js";var S=$((N,Z)=>{var{defineProperty:I,getOwnPropertyDescriptor:z,getOwnPropertyNames:A}=Object,D=Object.prototype.hasOwnProperty,H=(j,b)=>I(j,"name",{value:b,configurable:!0}),M=(j,b)=>{for(var F in b)I(j,F,{get:b[F],enumerable:!0})},J=(j,b,F,B)=>{if(b&&typeof b==="object"||typeof b==="function"){for(let G of A(b))if(!D.call(j,G)&&G!==F)I(j,G,{get:()=>b[G],enumerable:!(B=z(b,G))||B.enumerable})}return j},T=(j)=>J(I({},"__esModule",{value:!0}),j),Y={};M(Y,{CredentialsProviderError:()=>V,ProviderError:()=>K,TokenProviderError:()=>w,chain:()=>O,fromStatic:()=>q,memoize:()=>L});Z.exports=T(Y);var K=class j extends Error{constructor(b,F=!0){let B,G=!0;if(typeof F==="boolean")B=void 0,G=F;else if(F!=null&&typeof F==="object")B=F.logger,G=F.tryNextLink??!0;super(b);this.name="ProviderError",this.tryNextLink=G,Object.setPrototypeOf(this,j.prototype),B?.debug?.(`@smithy/property-provider ${G?"->":"(!)"} ${b}`)}static{H(this,"ProviderError")}static from(b,F=!0){return Object.assign(new this(b.message,F),b)}},V=class j extends K{constructor(b,F=!0){super(b,F);this.name="CredentialsProviderError",Object.setPrototypeOf(this,j.prototype)}static{H(this,"CredentialsProviderError")}},w=class j extends K{constructor(b,F=!0){super(b,F);this.name="TokenProviderError",Object.setPrototypeOf(this,j.prototype)}static{H(this,"TokenProviderError")}},O=H((...j)=>async()=>{if(j.length===0)throw new K("No providers in chain");let b;for(let F of j)try{return await F()}catch(B){if(b=B,B?.tryNextLink)continue;throw B}throw b},"chain"),q=H((j)=>()=>Promise.resolve(j),"fromStatic"),L=H((j,b,F)=>{let B,G,Q,U=!1,W=H(async()=>{if(!G)G=j();try{B=await G,Q=!0,U=!1}finally{G=void 0}return B},"coalesceProvider");if(b===void 0)return async(X)=>{if(!Q||X?.forceRefresh)B=await W();return B};return async(X)=>{if(!Q||X?.forceRefresh)B=await W();if(U)return B;if(F&&!F(B))return U=!0,B;if(b(B))return await W(),B;return B}},"memoize")});
|
|
2
|
-
export{S as Kc};
|
package/dist/chunk-eba8j44p.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ib as g,Rb as w,ec as x}from"./chunk-gwz7xtq2.js";import{vc as b}from"./chunk-2sybz1kv.js";import"./chunk-z9kxm35m.js";import{Jc as v}from"./chunk-7ddwd2rs.js";import{Kc as i}from"./chunk-bh567hxp.js";import{Lc as n}from"./chunk-yw7gqyfc.js";var E=n(v(),1);var d=n(i(),1);import _ from"fs/promises";var C=n(i(),1);var u="169.254.170.2",A="169.254.170.23",O="[fd00:ec2::23]",S=(e,a)=>{if(e.protocol==="https:")return;if(e.hostname===u||e.hostname===A||e.hostname===O)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let c=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(c[0]==="127"&&r(c[1])&&r(c[2])&&r(c[3])&&c.length===4)return}throw new C.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
|
-
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
|
-
- ECS container host 169.254.170.2
|
|
5
|
-
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:a})};var o=n(i(),1);var I=n(b(),1);function P(e){return new g({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((a,[c,r])=>{return a[c]=r,a},{}),fragment:e.hash})}async function K(e,a){let r=await I.sdkStreamMixin(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new o.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:a});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:w(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new o.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:a}),{Code:t.Code,Message:t.Message})}throw new o.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:a})}var T=(e,a,c)=>{return async()=>{for(let r=0;r<a;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,c))}return await e()}};var B="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",D="http://169.254.170.2",M="AWS_CONTAINER_CREDENTIALS_FULL_URI",N="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",j="AWS_CONTAINER_AUTHORIZATION_TOKEN",H=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let a,c=e.awsContainerCredentialsRelativeUri??process.env[B],r=e.awsContainerCredentialsFullUri??process.env[M],t=e.awsContainerAuthorizationToken??process.env[j],s=e.awsContainerAuthorizationTokenFile??process.env[N],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(c&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)a=r;else if(c)a=`${D}${c}`;else throw new d.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
6
|
-
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let y=new URL(a);S(y,e.logger);let R=new x({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return T(async()=>{let f=P(y);if(t)f.headers.Authorization=t;else if(s)f.headers.Authorization=(await _.readFile(s)).toString();try{let h=await R.handle(f);return K(h.response).then((p)=>E.setCredentialFeature(p,"CREDENTIALS_HTTP","z"))}catch(h){throw new d.CredentialsProviderError(String(h),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{H as fromHttp};
|
package/dist/chunk-fe2marcb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Da as LI,Ea as WI,Fa as YI,Ga as fd,Ha as yd,Ia as JI,Ja as Vl,Ka as KI,La as II,Ma as xd,Na as I1,Oa as PI,Pa as Bl,Qa as EI,Ra as SI,Sa as DI,Ta as NI,Ua as FI,Va as BI}from"./chunk-jynwrazb.js";import{gc as kd,hc as xl,ic as l1,jc as dI,kc as T,lc as m}from"./chunk-xc8sfz3m.js";import{nc as jl,qc as Cd,rc as id,tc as lI}from"./chunk-2sybz1kv.js";import"./chunk-z9kxm35m.js";import{Jc as fI}from"./chunk-7ddwd2rs.js";import"./chunk-bh567hxp.js";import{Nc as V}from"./chunk-yw7gqyfc.js";var o=V((H1)=>{Object.defineProperty(H1,"__esModule",{value:!0});H1.resolveHttpAuthSchemeConfig=H1.resolveStsAuthConfig=H1.defaultSTSHttpAuthSchemeProvider=H1.defaultSTSHttpAuthSchemeParametersProvider=void 0;var Ld=m(),j1=kd(),Wd=O(),Yd=async(l,I,d)=>{return{operation:j1.getSmithyContext(I).operation,region:await j1.normalizeProvider(l.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};H1.defaultSTSHttpAuthSchemeParametersProvider=Yd;function Jd(l){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:l.region},propertiesExtractor:(I,d)=>({signingProperties:{config:I,context:d}})}}function Kd(l){return{schemeId:"smithy.api#noAuth"}}var Xd=(l)=>{let I=[];switch(l.operation){case"AssumeRoleWithWebIdentity":{I.push(Kd(l));break}default:I.push(Jd(l))}return I};H1.defaultSTSHttpAuthSchemeProvider=Xd;var Qd=(l)=>({...l,stsClientCtor:Wd.STSClient});H1.resolveStsAuthConfig=Qd;var Zd=(l)=>{let I=H1.resolveStsAuthConfig(l);return{...Ld.resolveAwsSdkSigV4Config(I)}};H1.resolveHttpAuthSchemeConfig=Zd});var s=V((f1)=>{Object.defineProperty(f1,"__esModule",{value:!0});f1.commonParams=f1.resolveClientEndpointParameters=void 0;var Hd=(l)=>{return{...l,useDualstackEndpoint:l.useDualstackEndpoint??!1,useFipsEndpoint:l.useFipsEndpoint??!1,useGlobalEndpoint:l.useGlobalEndpoint??!1,defaultSigningName:"sts"}};f1.resolveClientEndpointParameters=Hd;f1.commonParams={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var ql=V((Nl)=>{Object.defineProperty(Nl,"__esModule",{value:!0});Nl.ruleSet=void 0;var p1="required",D="type",F="fn",q="argv",J="ref",O1=!1,n=!0,Y="booleanEquals",U="stringEquals",u1="sigv4",t1="sts",ll="us-east-1",r="endpoint",s1="https://sts.{Region}.{PartitionResult#dnsSuffix}",B="tree",X="error",u="getAttr",g1={[p1]:!1,[D]:"String"},p={[p1]:!0,default:!1,[D]:"Boolean"},dl={[J]:"Endpoint"},m1={[F]:"isSet",[q]:[{[J]:"Region"}]},G={[J]:"Region"},C1={[F]:"aws.partition",[q]:[G],assign:"PartitionResult"},Il={[J]:"UseFIPS"},Pl={[J]:"UseDualStack"},M={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:u1,signingName:t1,signingRegion:ll}]},headers:{}},_={},i1={conditions:[{[F]:U,[q]:[G,"aws-global"]}],[r]:M,[D]:r},El={[F]:Y,[q]:[Il,!0]},Sl={[F]:Y,[q]:[Pl,!0]},x1={[F]:u,[q]:[{[J]:"PartitionResult"},"supportsFIPS"]},Dl={[J]:"PartitionResult"},c1={[F]:Y,[q]:[!0,{[F]:u,[q]:[Dl,"supportsDualStack"]}]},e1=[{[F]:"isSet",[q]:[dl]}],o1=[El],n1=[Sl],bd={version:"1.0",parameters:{Region:g1,UseDualStack:p,UseFIPS:p,Endpoint:g1,UseGlobalEndpoint:p},rules:[{conditions:[{[F]:Y,[q]:[{[J]:"UseGlobalEndpoint"},n]},{[F]:"not",[q]:e1},m1,C1,{[F]:Y,[q]:[Il,O1]},{[F]:Y,[q]:[Pl,O1]}],rules:[{conditions:[{[F]:U,[q]:[G,"ap-northeast-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"ap-south-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"ap-southeast-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"ap-southeast-2"]}],endpoint:M,[D]:r},i1,{conditions:[{[F]:U,[q]:[G,"ca-central-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"eu-central-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"eu-north-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"eu-west-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"eu-west-2"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"eu-west-3"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"sa-east-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,ll]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"us-east-2"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"us-west-1"]}],endpoint:M,[D]:r},{conditions:[{[F]:U,[q]:[G,"us-west-2"]}],endpoint:M,[D]:r},{endpoint:{url:s1,properties:{authSchemes:[{name:u1,signingName:t1,signingRegion:"{Region}"}]},headers:_},[D]:r}],[D]:B},{conditions:e1,rules:[{conditions:o1,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[D]:X},{conditions:n1,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[D]:X},{endpoint:{url:dl,properties:_,headers:_},[D]:r}],[D]:B},{conditions:[m1],rules:[{conditions:[C1],rules:[{conditions:[El,Sl],rules:[{conditions:[{[F]:Y,[q]:[n,x1]},c1],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:_,headers:_},[D]:r}],[D]:B},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[D]:X}],[D]:B},{conditions:o1,rules:[{conditions:[{[F]:Y,[q]:[x1,n]}],rules:[{conditions:[{[F]:U,[q]:[{[F]:u,[q]:[Dl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:_,headers:_},[D]:r},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:_,headers:_},[D]:r}],[D]:B},{error:"FIPS is enabled but this partition does not support FIPS",[D]:X}],[D]:B},{conditions:n1,rules:[{conditions:[c1],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:_,headers:_},[D]:r}],[D]:B},{error:"DualStack is enabled but this partition does not support DualStack",[D]:X}],[D]:B},i1,{endpoint:{url:s1,properties:_,headers:_},[D]:r}],[D]:B}],[D]:B},{error:"Invalid Configuration: Missing Region",[D]:X}]};Nl.ruleSet=bd});var rl=V((vl)=>{Object.defineProperty(vl,"__esModule",{value:!0});vl.defaultEndpointResolver=void 0;var Od=yd(),t=fd(),sd=ql(),gd=new t.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),md=(l,I={})=>{return gd.get(l,()=>t.resolveEndpoint(sd.ruleSet,{endpointParams:l,logger:I.logger}))};vl.defaultEndpointResolver=md;t.customEndpointFunctions.aws=Od.awsEndpointFunctions});var hl=V((Gl)=>{Object.defineProperty(Gl,"__esModule",{value:!0});Gl.getRuntimeConfig=void 0;var cd=m(),ed=l1(),od=T(),nd=xd(),Rl=id(),Ul=Cd(),pd=o(),ud=rl(),td=(l)=>{return{apiVersion:"2011-06-15",base64Decoder:l?.base64Decoder??Rl.fromBase64,base64Encoder:l?.base64Encoder??Rl.toBase64,disableHostPrefix:l?.disableHostPrefix??!1,endpointProvider:l?.endpointProvider??ud.defaultEndpointResolver,extensions:l?.extensions??[],httpAuthSchemeProvider:l?.httpAuthSchemeProvider??pd.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:l?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(I)=>I.getIdentityProvider("aws.auth#sigv4"),signer:new cd.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(I)=>I.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ed.NoAuthSigner}],logger:l?.logger??new od.NoOpLogger,serviceId:l?.serviceId??"STS",urlParser:l?.urlParser??nd.parseUrl,utf8Decoder:l?.utf8Decoder??Ul.fromUtf8,utf8Encoder:l?.utf8Encoder??Ul.toUtf8}};Gl.getRuntimeConfig=td});var Wl=V((kl)=>{Object.defineProperty(kl,"__esModule",{value:!0});kl.getRuntimeConfig=void 0;var qI=dI(),vI=qI.__importDefault(EI()),_l=m(),Al=SI(),C=Vl(),wI=l1(),rI=DI(),Tl=Bl(),Q=II(),al=lI(),RI=NI(),UI=PI(),GI=hl(),MI=T(),hI=FI(),_I=T(),AI=(l)=>{_I.emitWarningIfUnsupportedVersion(process.version);let I=hI.resolveDefaultsModeConfig(l),d=()=>I().then(MI.loadConfigsForDefaultMode),E=GI.getRuntimeConfig(l);_l.emitWarningIfUnsupportedVersion(process.version);let P={profile:l?.profile};return{...E,...l,runtime:"node",defaultsMode:I,bodyLengthChecker:l?.bodyLengthChecker??RI.calculateBodyLength,defaultUserAgentProvider:l?.defaultUserAgentProvider??Al.createDefaultUserAgentProvider({serviceId:E.serviceId,clientVersion:vI.default.version}),httpAuthSchemes:l?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(v)=>v.getIdentityProvider("aws.auth#sigv4")||(async(N)=>await l.credentialDefaultProvider(N?.__config||{})()),signer:new _l.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(v)=>v.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new wI.NoAuthSigner}],maxAttempts:l?.maxAttempts??Q.loadConfig(Tl.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,l),region:l?.region??Q.loadConfig(C.NODE_REGION_CONFIG_OPTIONS,{...C.NODE_REGION_CONFIG_FILE_OPTIONS,...P}),requestHandler:al.NodeHttpHandler.create(l?.requestHandler??d),retryMode:l?.retryMode??Q.loadConfig({...Tl.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await d()).retryMode||UI.DEFAULT_RETRY_MODE},l),sha256:l?.sha256??rI.Hash.bind(null,"sha256"),streamCollector:l?.streamCollector??al.streamCollector,useDualstackEndpoint:l?.useDualstackEndpoint??Q.loadConfig(C.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,P),useFipsEndpoint:l?.useFipsEndpoint??Q.loadConfig(C.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,P),userAgentAppId:l?.userAgentAppId??Q.loadConfig(Al.NODE_APP_ID_CONFIG_OPTIONS,P)}};kl.getRuntimeConfig=AI});var Kl=V((Yl)=>{Object.defineProperty(Yl,"__esModule",{value:!0});Yl.resolveHttpAuthRuntimeConfig=Yl.getHttpAuthExtensionConfiguration=void 0;var TI=(l)=>{let{httpAuthSchemes:I,httpAuthSchemeProvider:d,credentials:E}=l;return{setHttpAuthScheme(P){let v=I.findIndex((N)=>N.schemeId===P.schemeId);if(v===-1)I.push(P);else I.splice(v,1,P)},httpAuthSchemes(){return I},setHttpAuthSchemeProvider(P){d=P},httpAuthSchemeProvider(){return d},setCredentials(P){E=P},credentials(){return E}}};Yl.getHttpAuthExtensionConfiguration=TI;var aI=(l)=>{return{httpAuthSchemes:l.httpAuthSchemes(),httpAuthSchemeProvider:l.httpAuthSchemeProvider(),credentials:l.credentials()}};Yl.resolveHttpAuthRuntimeConfig=aI});var bl=V((Hl)=>{Object.defineProperty(Hl,"__esModule",{value:!0});Hl.resolveRuntimeExtensions=void 0;var Xl=BI(),Ql=jl(),Zl=T(),$l=Kl(),i=(l)=>l,kI=(l,I)=>{let d={...i(Xl.getAwsRegionExtensionConfiguration(l)),...i(Zl.getDefaultExtensionConfiguration(l)),...i(Ql.getHttpHandlerExtensionConfiguration(l)),...i($l.getHttpAuthExtensionConfiguration(l))};return I.forEach((E)=>E.configure(d)),{...l,...Xl.resolveAwsRegionExtensionConfiguration(d),...Zl.resolveDefaultRuntimeConfig(d),...Ql.resolveHttpHandlerRuntimeConfig(d),...$l.resolveHttpAuthRuntimeConfig(d)}};Hl.resolveRuntimeExtensions=kI});var O=V((P1)=>{Object.defineProperty(P1,"__esModule",{value:!0});P1.STSClient=P1.__Client=void 0;var fl=LI(),XI=WI(),QI=YI(),yl=JI(),ZI=Vl(),d1=l1(),$I=KI(),jI=I1(),Ol=Bl(),gl=T();Object.defineProperty(P1,"__Client",{enumerable:!0,get:function(){return gl.Client}});var sl=o(),HI=s(),zI=Wl(),bI=bl();class ml extends gl.Client{config;constructor(...[l]){let I=zI.getRuntimeConfig(l||{}),d=HI.resolveClientEndpointParameters(I),E=yl.resolveUserAgentConfig(d),P=Ol.resolveRetryConfig(E),v=ZI.resolveRegionConfig(P),N=fl.resolveHostHeaderConfig(v),h=jI.resolveEndpointConfig(N),a=sl.resolveHttpAuthSchemeConfig(h),A=bI.resolveRuntimeExtensions(a,l?.extensions||[]);super(A);this.config=A,this.middlewareStack.use(yl.getUserAgentPlugin(this.config)),this.middlewareStack.use(Ol.getRetryPlugin(this.config)),this.middlewareStack.use($I.getContentLengthPlugin(this.config)),this.middlewareStack.use(fl.getHostHeaderPlugin(this.config)),this.middlewareStack.use(XI.getLoggerPlugin(this.config)),this.middlewareStack.use(QI.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(d1.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:sl.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(K)=>new d1.DefaultIdentityProviderConfig({"aws.auth#sigv4":K.credentials})})),this.middlewareStack.use(d1.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}P1.STSClient=ml});var OP=V((pP,$1)=>{var{defineProperty:x,getOwnPropertyDescriptor:yI,getOwnPropertyNames:OI}=Object,sI=Object.prototype.hasOwnProperty,S=(l,I)=>x(l,"name",{value:I,configurable:!0}),gI=(l,I)=>{for(var d in I)x(l,d,{get:I[d],enumerable:!0})},W1=(l,I,d,E)=>{if(I&&typeof I==="object"||typeof I==="function"){for(let P of OI(I))if(!sI.call(l,P)&&P!==d)x(l,P,{get:()=>I[P],enumerable:!(E=yI(I,P))||E.enumerable})}return l},mI=(l,I,d)=>(W1(l,I,"default"),d&&W1(d,I,"default")),CI=(l)=>W1(x({},"__esModule",{value:!0}),l),J1={};gI(J1,{AssumeRoleCommand:()=>Q1,AssumeRoleResponseFilterSensitiveLog:()=>el,AssumeRoleWithWebIdentityCommand:()=>Z1,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>dd,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>Id,ClientInputEndpointParameters:()=>zP.ClientInputEndpointParameters,CredentialsFilterSensitiveLog:()=>K1,ExpiredTokenException:()=>ol,IDPCommunicationErrorException:()=>Pd,IDPRejectedClaimException:()=>tl,InvalidIdentityTokenException:()=>ld,MalformedPolicyDocumentException:()=>nl,PackedPolicyTooLargeException:()=>pl,RegionDisabledException:()=>ul,STS:()=>Ud,STSServiceException:()=>L,decorateDefaultCredentialProvider:()=>yP,getDefaultRoleAssumer:()=>Td,getDefaultRoleAssumerWithWebIdentity:()=>ad});$1.exports=CI(J1);mI(J1,O(),$1.exports);var iI=T(),xI=I1(),cI=xl(),eI=T(),oI=s(),cl=T(),nI=T(),L=class l extends nI.ServiceException{static{S(this,"STSServiceException")}constructor(I){super(I);Object.setPrototypeOf(this,l.prototype)}},K1=S((l)=>({...l,...l.SecretAccessKey&&{SecretAccessKey:cl.SENSITIVE_STRING}}),"CredentialsFilterSensitiveLog"),el=S((l)=>({...l,...l.Credentials&&{Credentials:K1(l.Credentials)}}),"AssumeRoleResponseFilterSensitiveLog"),ol=class l extends L{static{S(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";constructor(I){super({name:"ExpiredTokenException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},nl=class l extends L{static{S(this,"MalformedPolicyDocumentException")}name="MalformedPolicyDocumentException";$fault="client";constructor(I){super({name:"MalformedPolicyDocumentException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},pl=class l extends L{static{S(this,"PackedPolicyTooLargeException")}name="PackedPolicyTooLargeException";$fault="client";constructor(I){super({name:"PackedPolicyTooLargeException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},ul=class l extends L{static{S(this,"RegionDisabledException")}name="RegionDisabledException";$fault="client";constructor(I){super({name:"RegionDisabledException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},tl=class l extends L{static{S(this,"IDPRejectedClaimException")}name="IDPRejectedClaimException";$fault="client";constructor(I){super({name:"IDPRejectedClaimException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},ld=class l extends L{static{S(this,"InvalidIdentityTokenException")}name="InvalidIdentityTokenException";$fault="client";constructor(I){super({name:"InvalidIdentityTokenException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},dd=S((l)=>({...l,...l.WebIdentityToken&&{WebIdentityToken:cl.SENSITIVE_STRING}}),"AssumeRoleWithWebIdentityRequestFilterSensitiveLog"),Id=S((l)=>({...l,...l.Credentials&&{Credentials:K1(l.Credentials)}}),"AssumeRoleWithWebIdentityResponseFilterSensitiveLog"),Pd=class l extends L{static{S(this,"IDPCommunicationErrorException")}name="IDPCommunicationErrorException";$fault="client";constructor(I){super({name:"IDPCommunicationErrorException",$fault:"client",...I});Object.setPrototypeOf(this,l.prototype)}},X1=m(),pI=jl(),w=T(),uI=S(async(l,I)=>{let d=qd,E;return E=Rd({...qP(l,I),[wd]:YP,[rd]:vd}),Fd(I,d,"/",void 0,E)},"se_AssumeRoleCommand"),tI=S(async(l,I)=>{let d=qd,E;return E=Rd({...vP(l,I),[wd]:JP,[rd]:vd}),Fd(I,d,"/",void 0,E)},"se_AssumeRoleWithWebIdentityCommand"),lP=S(async(l,I)=>{if(l.statusCode>=300)return Ed(l,I);let d=await X1.parseXmlBody(l.body,I),E={};return E=hP(d.AssumeRoleResult,I),{$metadata:W(l),...E}},"de_AssumeRoleCommand"),dP=S(async(l,I)=>{if(l.statusCode>=300)return Ed(l,I);let d=await X1.parseXmlBody(l.body,I),E={};return E=_P(d.AssumeRoleWithWebIdentityResult,I),{$metadata:W(l),...E}},"de_AssumeRoleWithWebIdentityCommand"),Ed=S(async(l,I)=>{let d={...l,body:await X1.parseXmlErrorBody(l.body,I)},E=KP(l,d.body);switch(E){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await IP(d,I);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await DP(d,I);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await NP(d,I);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await FP(d,I);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await PP(d,I);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await EP(d,I);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await SP(d,I);default:let P=d.body;return WP({output:l,parsedBody:P.Error,errorCode:E})}},"de_CommandError"),IP=S(async(l,I)=>{let d=l.body,E=AP(d.Error,I),P=new ol({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_ExpiredTokenExceptionRes"),PP=S(async(l,I)=>{let d=l.body,E=TP(d.Error,I),P=new Pd({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_IDPCommunicationErrorExceptionRes"),EP=S(async(l,I)=>{let d=l.body,E=aP(d.Error,I),P=new tl({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_IDPRejectedClaimExceptionRes"),SP=S(async(l,I)=>{let d=l.body,E=VP(d.Error,I),P=new ld({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_InvalidIdentityTokenExceptionRes"),DP=S(async(l,I)=>{let d=l.body,E=BP(d.Error,I),P=new nl({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_MalformedPolicyDocumentExceptionRes"),NP=S(async(l,I)=>{let d=l.body,E=kP(d.Error,I),P=new pl({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_PackedPolicyTooLargeExceptionRes"),FP=S(async(l,I)=>{let d=l.body,E=LP(d.Error,I),P=new ul({$metadata:W(l),...E});return w.decorateServiceException(P,d)},"de_RegionDisabledExceptionRes"),qP=S((l,I)=>{let d={};if(l[f]!=null)d[f]=l[f];if(l[y]!=null)d[y]=l[y];if(l[z]!=null){let E=Sd(l[z],I);if(l[z]?.length===0)d.PolicyArns=[];Object.entries(E).forEach(([P,v])=>{let N=`PolicyArns.${P}`;d[N]=v})}if(l[H]!=null)d[H]=l[H];if(l[j]!=null)d[j]=l[j];if(l[T1]!=null){let E=MP(l[T1],I);if(l[T1]?.length===0)d.Tags=[];Object.entries(E).forEach(([P,v])=>{let N=`Tags.${P}`;d[N]=v})}if(l[V1]!=null){let E=GP(l[V1],I);if(l[V1]?.length===0)d.TransitiveTagKeys=[];Object.entries(E).forEach(([P,v])=>{let N=`TransitiveTagKeys.${P}`;d[N]=v})}if(l[v1]!=null)d[v1]=l[v1];if(l[_1]!=null)d[_1]=l[_1];if(l[a1]!=null)d[a1]=l[a1];if(l[k]!=null)d[k]=l[k];if(l[R1]!=null){let E=RP(l[R1],I);if(l[R1]?.length===0)d.ProvidedContexts=[];Object.entries(E).forEach(([P,v])=>{let N=`ProvidedContexts.${P}`;d[N]=v})}return d},"se_AssumeRoleRequest"),vP=S((l,I)=>{let d={};if(l[f]!=null)d[f]=l[f];if(l[y]!=null)d[y]=l[y];if(l[k1]!=null)d[k1]=l[k1];if(l[U1]!=null)d[U1]=l[U1];if(l[z]!=null){let E=Sd(l[z],I);if(l[z]?.length===0)d.PolicyArns=[];Object.entries(E).forEach(([P,v])=>{let N=`PolicyArns.${P}`;d[N]=v})}if(l[H]!=null)d[H]=l[H];if(l[j]!=null)d[j]=l[j];return d},"se_AssumeRoleWithWebIdentityRequest"),Sd=S((l,I)=>{let d={},E=1;for(let P of l){if(P===null)continue;let v=wP(P,I);Object.entries(v).forEach(([N,h])=>{d[`member.${E}.${N}`]=h}),E++}return d},"se_policyDescriptorListType"),wP=S((l,I)=>{let d={};if(l[L1]!=null)d[L1]=l[L1];return d},"se_PolicyDescriptorType"),rP=S((l,I)=>{let d={};if(l[r1]!=null)d[r1]=l[r1];if(l[F1]!=null)d[F1]=l[F1];return d},"se_ProvidedContext"),RP=S((l,I)=>{let d={},E=1;for(let P of l){if(P===null)continue;let v=rP(P,I);Object.entries(v).forEach(([N,h])=>{d[`member.${E}.${N}`]=h}),E++}return d},"se_ProvidedContextsListType"),UP=S((l,I)=>{let d={};if(l[w1]!=null)d[w1]=l[w1];if(l[B1]!=null)d[B1]=l[B1];return d},"se_Tag"),GP=S((l,I)=>{let d={},E=1;for(let P of l){if(P===null)continue;d[`member.${E}`]=P,E++}return d},"se_tagKeyListType"),MP=S((l,I)=>{let d={},E=1;for(let P of l){if(P===null)continue;let v=UP(P,I);Object.entries(v).forEach(([N,h])=>{d[`member.${E}.${N}`]=h}),E++}return d},"se_tagListType"),Dd=S((l,I)=>{let d={};if(l[S1]!=null)d[S1]=w.expectString(l[S1]);if(l[D1]!=null)d[D1]=w.expectString(l[D1]);return d},"de_AssumedRoleUser"),hP=S((l,I)=>{let d={};if(l[$]!=null)d[$]=Nd(l[$],I);if(l[Z]!=null)d[Z]=Dd(l[Z],I);if(l[b]!=null)d[b]=w.strictParseInt32(l[b]);if(l[k]!=null)d[k]=w.expectString(l[k]);return d},"de_AssumeRoleResponse"),_P=S((l,I)=>{let d={};if(l[$]!=null)d[$]=Nd(l[$],I);if(l[h1]!=null)d[h1]=w.expectString(l[h1]);if(l[Z]!=null)d[Z]=Dd(l[Z],I);if(l[b]!=null)d[b]=w.strictParseInt32(l[b]);if(l[G1]!=null)d[G1]=w.expectString(l[G1]);if(l[N1]!=null)d[N1]=w.expectString(l[N1]);if(l[k]!=null)d[k]=w.expectString(l[k]);return d},"de_AssumeRoleWithWebIdentityResponse"),Nd=S((l,I)=>{let d={};if(l[E1]!=null)d[E1]=w.expectString(l[E1]);if(l[M1]!=null)d[M1]=w.expectString(l[M1]);if(l[A1]!=null)d[A1]=w.expectString(l[A1]);if(l[q1]!=null)d[q1]=w.expectNonNull(w.parseRfc3339DateTimeWithOffset(l[q1]));return d},"de_Credentials"),AP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_ExpiredTokenException"),TP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_IDPCommunicationErrorException"),aP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_IDPRejectedClaimException"),VP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_InvalidIdentityTokenException"),BP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_MalformedPolicyDocumentException"),kP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_PackedPolicyTooLargeException"),LP=S((l,I)=>{let d={};if(l[R]!=null)d[R]=w.expectString(l[R]);return d},"de_RegionDisabledException"),W=S((l)=>({httpStatusCode:l.statusCode,requestId:l.headers["x-amzn-requestid"]??l.headers["x-amzn-request-id"]??l.headers["x-amz-request-id"],extendedRequestId:l.headers["x-amz-id-2"],cfId:l.headers["x-amz-cf-id"]}),"deserializeMetadata"),WP=w.withBaseException(L),Fd=S(async(l,I,d,E,P)=>{let{hostname:v,protocol:N="https",port:h,path:a}=await l.endpoint(),A={protocol:N,hostname:v,port:h,method:"POST",path:a.endsWith("/")?a.slice(0,-1)+d:a+d,headers:I};if(E!==void 0)A.hostname=E;if(P!==void 0)A.body=P;return new pI.HttpRequest(A)},"buildHttpRpcRequest"),qd={"content-type":"application/x-www-form-urlencoded"},vd="2011-06-15",wd="Action",E1="AccessKeyId",YP="AssumeRole",S1="AssumedRoleId",Z="AssumedRoleUser",JP="AssumeRoleWithWebIdentity",D1="Arn",N1="Audience",$="Credentials",F1="ContextAssertion",j="DurationSeconds",q1="Expiration",v1="ExternalId",w1="Key",H="Policy",z="PolicyArns",r1="ProviderArn",R1="ProvidedContexts",U1="ProviderId",b="PackedPolicySize",G1="Provider",f="RoleArn",y="RoleSessionName",M1="SecretAccessKey",h1="SubjectFromWebIdentityToken",k="SourceIdentity",_1="SerialNumber",A1="SessionToken",T1="Tags",a1="TokenCode",V1="TransitiveTagKeys",rd="Version",B1="Value",k1="WebIdentityToken",L1="arn",R="message",Rd=S((l)=>Object.entries(l).map(([I,d])=>w.extendedEncodeURIComponent(I)+"="+w.extendedEncodeURIComponent(d)).join("&"),"buildFormUrlencodedString"),KP=S((l,I)=>{if(I.Error?.Code!==void 0)return I.Error.Code;if(l.statusCode==404)return"NotFound"},"loadQueryErrorCode"),Q1=class extends eI.Command.classBuilder().ep(oI.commonParams).m(function(l,I,d,E){return[cI.getSerdePlugin(d,this.serialize,this.deserialize),xI.getEndpointPlugin(d,l.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,el).ser(uI).de(lP).build(){static{S(this,"AssumeRoleCommand")}},XP=I1(),QP=xl(),ZP=T(),$P=s(),Z1=class extends ZP.Command.classBuilder().ep($P.commonParams).m(function(l,I,d,E){return[QP.getSerdePlugin(d,this.serialize,this.deserialize),XP.getEndpointPlugin(d,l.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(dd,Id).ser(tI).de(dP).build(){static{S(this,"AssumeRoleWithWebIdentityCommand")}},jP=O(),HP={AssumeRoleCommand:Q1,AssumeRoleWithWebIdentityCommand:Z1},Ud=class extends jP.STSClient{static{S(this,"STS")}};iI.createAggregatedClient(HP,Ud);var zP=s(),Y1=fI(),il="us-east-1",Gd=S((l)=>{if(typeof l?.Arn==="string"){let I=l.Arn.split(":");if(I.length>4&&I[4]!=="")return I[4]}return},"getAccountIdFromAssumedRoleUser"),Md=S(async(l,I,d)=>{let E=typeof l==="function"?await l():l,P=typeof I==="function"?await I():I;return d?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${E} (provider)`,`${P} (parent client)`,`${il} (STS default)`),E??P??il},"resolveRegion"),bP=S((l,I)=>{let d,E;return async(P,v)=>{if(E=P,!d){let{logger:K=l?.parentClientConfig?.logger,region:c,requestHandler:g=l?.parentClientConfig?.requestHandler,credentialProviderLogger:e}=l,Vd=await Md(c,l?.parentClientConfig?.region,e),Bd=!hd(g);d=new I({profile:l?.parentClientConfig?.profile,credentialDefaultProvider:S(()=>async()=>E,"credentialDefaultProvider"),region:Vd,requestHandler:Bd?g:void 0,logger:K})}let{Credentials:N,AssumedRoleUser:h}=await d.send(new Q1(v));if(!N||!N.AccessKeyId||!N.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${v.RoleArn}`);let a=Gd(h),A={accessKeyId:N.AccessKeyId,secretAccessKey:N.SecretAccessKey,sessionToken:N.SessionToken,expiration:N.Expiration,...N.CredentialScope&&{credentialScope:N.CredentialScope},...a&&{accountId:a}};return Y1.setCredentialFeature(A,"CREDENTIALS_STS_ASSUME_ROLE","i"),A}},"getDefaultRoleAssumer"),fP=S((l,I)=>{let d;return async(E)=>{if(!d){let{logger:a=l?.parentClientConfig?.logger,region:A,requestHandler:K=l?.parentClientConfig?.requestHandler,credentialProviderLogger:c}=l,g=await Md(A,l?.parentClientConfig?.region,c),e=!hd(K);d=new I({profile:l?.parentClientConfig?.profile,region:g,requestHandler:e?K:void 0,logger:a})}let{Credentials:P,AssumedRoleUser:v}=await d.send(new Z1(E));if(!P||!P.AccessKeyId||!P.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${E.RoleArn}`);let N=Gd(v),h={accessKeyId:P.AccessKeyId,secretAccessKey:P.SecretAccessKey,sessionToken:P.SessionToken,expiration:P.Expiration,...P.CredentialScope&&{credentialScope:P.CredentialScope},...N&&{accountId:N}};if(N)Y1.setCredentialFeature(h,"RESOLVED_ACCOUNT_ID","T");return Y1.setCredentialFeature(h,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),h}},"getDefaultRoleAssumerWithWebIdentity"),hd=S((l)=>{return l?.metadata?.handlerProtocol==="h2"},"isH2"),_d=O(),Ad=S((l,I)=>{if(!I)return l;else return class d extends l{static{S(this,"CustomizableSTSClient")}constructor(E){super(E);for(let P of I)this.middlewareStack.use(P)}}},"getCustomizableStsClientCtor"),Td=S((l={},I)=>bP(l,Ad(_d.STSClient,I)),"getDefaultRoleAssumer"),ad=S((l={},I)=>fP(l,Ad(_d.STSClient,I)),"getDefaultRoleAssumerWithWebIdentity"),yP=S((l)=>(I)=>l({roleAssumer:Td(I),roleAssumerWithWebIdentity:ad(I),...I}),"decorateDefaultCredentialProvider")});export default OP();
|