gemi 0.4.72 → 0.4.73
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-98d9ccc476ab91dc.js → chunk-027f8856aa132d85.js} +1 -1
- package/dist/{chunk-d03b02d5f8128f13.js → chunk-035e233acf299392.js} +2 -2
- package/dist/{chunk-d7c78cd1ab7dc7ed.js → chunk-0c3a31bca25291a6.js} +1 -1
- package/dist/{chunk-a1efc60864e65ef2.js → chunk-2c49184ec3c45a26.js} +1 -1
- package/dist/{chunk-4672a061bfa698ce.js → chunk-3e2f1f65cba86ad5.js} +1 -1
- package/dist/{chunk-11cd81b560d496a3.js → chunk-474c8dc0ac6b3cdf.js} +1 -1
- package/dist/chunk-6a30174fcc338251.js +2 -0
- package/dist/{chunk-db03a0a05fbe3bc4.js → chunk-6def55ea02e050ec.js} +1 -1
- package/dist/chunk-722959aee5ef3fae.js +2 -0
- package/dist/{chunk-6c1b62f2d8dc48e2.js → chunk-89067bce11a12276.js} +1 -1
- package/dist/{chunk-f25e3644c98f64a7.js → chunk-89c603058a8ca2e0.js} +1 -1
- package/dist/{chunk-32483f77b064cc0a.js → chunk-9c10a08ee4b4d468.js} +2 -2
- package/dist/{chunk-f90e2f05651f95fc.js → chunk-9e6c223585edf12e.js} +1 -1
- package/dist/{chunk-dfc59075d409b16e.js → chunk-a2fa7b0b7cb9d696.js} +1 -1
- package/dist/{chunk-6596f9d480e68b0a.js → chunk-a75cb687951e66a0.js} +2 -2
- package/dist/{chunk-aa3cd1ebb3cef8cf.js → chunk-b240c1abcf310471.js} +1 -1
- package/dist/chunk-b3d1c993471a0dbe.js +2 -0
- package/dist/{chunk-65cd4d128b79bd93.js → chunk-b9d952fe3db3df1c.js} +1 -1
- package/dist/{chunk-e565da7343a33b65.js → chunk-c4424c04ab2ac6d1.js} +2 -2
- package/dist/chunk-db704ae1cdab22a5.js +18 -0
- package/dist/chunk-e1c93f98afc62202.js +2 -0
- package/dist/{chunk-7ffc808402a7646b.js → chunk-e4119fe2a26e4a22.js} +1 -1
- package/dist/chunk-e4fa4d02a212da4f.js +2 -0
- package/dist/client/Link.d.ts +4 -2
- package/dist/client/Link.d.ts.map +1 -1
- package/dist/client/auth/useUser.d.ts +1 -11
- package/dist/client/auth/useUser.d.ts.map +1 -1
- package/dist/client/useNavigate.d.ts +2 -2
- package/dist/client/useNavigate.d.ts.map +1 -1
- package/dist/client/useQuery.d.ts +2 -2
- package/dist/client/useQuery.d.ts.map +1 -1
- package/dist/email/index.js +1 -1
- package/dist/facades/FileStorage.d.ts +12 -0
- package/dist/facades/FileStorage.d.ts.map +1 -0
- package/dist/facades/index.d.ts +1 -0
- package/dist/facades/index.d.ts.map +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/index.js +1 -1
- package/dist/kernel/Kernel.d.ts +5 -0
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/context.d.ts +2 -0
- package/dist/kernel/context.d.ts.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/server/index.js +1 -1
- package/dist/services/file-storage/FileStorageServiceContainer.d.ts +6 -0
- package/dist/services/file-storage/FileStorageServiceContainer.d.ts.map +1 -0
- package/dist/services/file-storage/FileStorageServiceProvider.d.ts +5 -0
- package/dist/services/file-storage/FileStorageServiceProvider.d.ts.map +1 -0
- package/dist/services/file-storage/drivers/FileStorageDriver.d.ts +6 -0
- package/dist/services/file-storage/drivers/FileStorageDriver.d.ts.map +1 -0
- package/dist/services/file-storage/drivers/FileSystemDriver.d.ts +9 -0
- package/dist/services/file-storage/drivers/FileSystemDriver.d.ts.map +1 -0
- package/dist/services/file-storage/drivers/S3Driver.d.ts +10 -0
- package/dist/services/file-storage/drivers/S3Driver.d.ts.map +1 -0
- package/dist/services/file-storage/drivers/types.d.ts +19 -0
- package/dist/services/file-storage/drivers/types.d.ts.map +1 -0
- package/dist/services/index.d.ts +6 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +2 -0
- package/package.json +2 -2
- package/dist/chunk-466213c5585251ad.js +0 -2
- package/dist/chunk-718d1e84f3207c29.js +0 -2
- package/dist/chunk-c4927c583b31b4be.js +0 -18
- package/dist/chunk-d1c7d307baac84fb.js +0 -2
- package/dist/storage/File.d.ts +0 -26
- package/dist/storage/File.d.ts.map +0 -1
- package/dist/storage/index.d.ts +0 -2
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js +0 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{y as i0,z as M} from"./chunk-7ce930fe69575c87.js";import{J as qz} from"./chunk-0c3a31bca25291a6.js";import{K as E9,L as dW} from"./chunk-e4fa4d02a212da4f.js";import{$ as k6,O as v,P as IU,Q as pW,T as PU,U as zZ,X as RZ,ca as I4} from"./chunk-c4424c04ab2ac6d1.js";import{rb as Z1} from"./chunk-b9d952fe3db3df1c.js";import{sb as Q1,tb as ZU} from"./chunk-a75cb687951e66a0.js";import{ub as L0} from"./chunk-89067bce11a12276.js";import{Ab as XU} from"./chunk-2c49184ec3c45a26.js";var j1=M((ez,vU)=>{var{defineProperty:a1,getOwnPropertyDescriptor:jZ,getOwnPropertyNames:PZ}=Object,bZ=Object.prototype.hasOwnProperty,hU=($,U)=>a1($,"name",{value:U,configurable:!0}),SZ=($,U)=>{for(var G in U)a1($,G,{get:U[G],enumerable:!0})},kZ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of PZ(U))if(!bZ.call($,X)&&X!==G)a1($,X,{get:()=>U[X],enumerable:!(W=jZ(U,X))||W.enumerable})}return $},DZ=($)=>kZ(a1({},"__esModule",{value:!0}),$),xU={};SZ(xU,{getSmithyContext:()=>hZ,normalizeProvider:()=>xZ});vU.exports=DZ(xU);var DU=Z1(),hZ=hU(($)=>$[DU.SMITHY_CONTEXT_KEY]||($[DU.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),xZ=hU(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var E1=M((cU)=>{Object.defineProperty(cU,"__esModule",{value:!0});cU.getHomeDir=void 0;var vZ=import.meta.require("os"),cZ=import.meta.require("path"),t$={},yZ=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},_Z=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${cZ.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;const X=yZ();if(!t$[X])t$[X]=vZ.homedir();return t$[X]};cU.getHomeDir=_Z});var e$=M((_U)=>{Object.defineProperty(_U,"__esModule",{value:!0});_U.getSSOTokenFilepath=void 0;var uZ=import.meta.require("crypto"),dZ=import.meta.require("path"),pZ=E1(),gZ=($)=>{const G=uZ.createHash("sha1").update($).digest("hex");return dZ.join(pZ.getHomeDir(),".aws","sso","cache",`${G}.json`)};_U.getSSOTokenFilepath=gZ});var gU=M((dU)=>{Object.defineProperty(dU,"__esModule",{value:!0});dU.getSSOTokenFromFile=void 0;var sZ=import.meta.require("fs"),lZ=e$(),{readFile:mZ}=sZ.promises,nZ=async($)=>{const U=lZ.getSSOTokenFilepath($),G=await mZ(U,"utf8");return JSON.parse(G)};dU.getSSOTokenFromFile=nZ});var U0=M((sU)=>{Object.defineProperty(sU,"__esModule",{value:!0});sU.slurpFile=void 0;var iZ=import.meta.require("fs"),{readFile:oZ}=iZ.promises,$0={},rZ=($,U)=>{if(!$0[$]||(U===null||U===void 0?void 0:U.ignoreCache))$0[$]=oZ($,"utf8");return $0[$]};sU.slurpFile=rZ});var Z0=M((XR,b1)=>{var{defineProperty:$$,getOwnPropertyDescriptor:aZ,getOwnPropertyNames:tZ}=Object,eZ=Object.prototype.hasOwnProperty,c=($,U)=>$$($,"name",{value:U,configurable:!0}),$L=($,U)=>{for(var G in U)$$($,G,{get:U[G],enumerable:!0})},G0=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of tZ(U))if(!eZ.call($,X)&&X!==G)$$($,X,{get:()=>U[X],enumerable:!(W=aZ(U,X))||W.enumerable})}return $},X0=($,U,G)=>(G0($,U,"default"),G&&G0(G,U,"default")),UL=($)=>G0($$({},"__esModule",{value:!0}),$),P1={};$L(P1,{CONFIG_PREFIX_SEPARATOR:()=>L1,DEFAULT_PROFILE:()=>oU,ENV_PROFILE:()=>iU,getProfileName:()=>GL,loadSharedConfigFiles:()=>aU,loadSsoSessionData:()=>EL,parseKnownFiles:()=>ML});b1.exports=UL(P1);X0(P1,E1(),b1.exports);var iU="AWS_PROFILE",oU="default",GL=c(($)=>$.profile||process.env[iU]||oU,"getProfileName");X0(P1,e$(),b1.exports);X0(P1,gU(),b1.exports);var t1=Z1(),WL=c(($)=>Object.entries($).filter(([U])=>{const G=U.indexOf(L1);if(G===-1)return!1;return Object.values(t1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{const X=G.indexOf(L1),Z=G.substring(0,X)===t1.IniSectionType.PROFILE?G.substring(X+1):G;return U[Z]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),e1=import.meta.require("path"),XL=E1(),ZL="AWS_CONFIG_FILE",rU=c(()=>process.env[ZL]||e1.join(XL.getHomeDir(),".aws","config"),"getConfigFilepath"),LL=E1(),YL="AWS_SHARED_CREDENTIALS_FILE",wL=c(()=>process.env[YL]||e1.join(LL.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),FL=E1(),QL=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,zL=["__proto__","profile __proto__"],W0=c(($)=>{const U={};let G,W;for(let X of $.split(/\r?\n/)){const Z=X.split(/(^|\s)[;#]/)[0].trim();if(Z[0]==="["&&Z[Z.length-1]==="]"){G=void 0,W=void 0;const Y=Z.substring(1,Z.length-1),w=QL.exec(Y);if(w){const[,F,,Q]=w;if(Object.values(t1.IniSectionType).includes(F))G=[F,Q].join(L1)}else G=Y;if(zL.includes(Y))throw new Error(`Found invalid profile name "${Y}"`)}else if(G){const Y=Z.indexOf("=");if(![0,-1].includes(Y)){const[w,F]=[Z.substring(0,Y).trim(),Z.substring(Y+1).trim()];if(F==="")W=w;else{if(W&&X.trimStart()===X)W=void 0;U[G]=U[G]||{};const Q=W?[W,w].join(L1):w;U[G][Q]=F}}}}return U},"parseIni"),mU=U0(),nU=c(()=>({}),"swallowError"),L1=".",aU=c(async($={})=>{const{filepath:U=wL(),configFilepath:G=rU()}=$,W=FL.getHomeDir();let Z=U;if(U.startsWith("~/"))Z=e1.join(W,U.slice(2));let L=G;if(G.startsWith("~/"))L=e1.join(W,G.slice(2));const Y=await Promise.all([mU.slurpFile(L,{ignoreCache:$.ignoreCache}).then(W0).then(WL).catch(nU),mU.slurpFile(Z,{ignoreCache:$.ignoreCache}).then(W0).catch(nU)]);return{configFile:Y[0],credentialsFile:Y[1]}},"loadSharedConfigFiles"),RL=c(($)=>Object.entries($).filter(([U])=>U.startsWith(t1.IniSectionType.SSO_SESSION+L1)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(L1)+1)]:W}),{}),"getSsoSessionData"),IL=U0(),JL=c(()=>({}),"swallowError"),EL=c(async($={})=>IL.slurpFile($.configFilepath??rU()).then(W0).then(RL).catch(JL),"loadSsoSessionData"),KL=c((...$)=>{const U={};for(let G of $)for(let[W,X]of Object.entries(G))if(U[W]!==void 0)Object.assign(U[W],X);else U[W]=X;return U},"mergeConfigFiles"),ML=c(async($)=>{const U=await aU($);return KL(U.configFile,U.credentialsFile)},"parseKnownFiles")});var UG=M((ZR,$G)=>{var Y0=function($){try{const U=new Set(Array.from($.match(/([A-Z_]){3,}/g)??[]));return U.delete("CONFIG"),U.delete("CONFIG_PREFIX_SEPARATOR"),U.delete("ENV"),[...U].join(", ")}catch(U){return $}},U$=Object.defineProperty,TL=Object.getOwnPropertyDescriptor,BL=Object.getOwnPropertyNames,VL=Object.prototype.hasOwnProperty,K1=($,U)=>U$($,"name",{value:U,configurable:!0}),HL=($,U)=>{for(var G in U)U$($,G,{get:U[G],enumerable:!0})},AL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of BL(U))if(!VL.call($,X)&&X!==G)U$($,X,{get:()=>U[X],enumerable:!(W=TL(U,X))||W.enumerable})}return $},OL=($)=>AL(U$({},"__esModule",{value:!0}),$),eU={};HL(eU,{loadConfig:()=>jL});$G.exports=OL(eU);var S1=L0();K1(Y0,"getSelectorName");var fL=K1(($,U)=>async()=>{try{const G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new S1.CredentialsProviderError(G.message||`Not found in ENV: ${Y0($.toString())}`,{logger:U})}},"fromEnv"),tU=Z0(),CL=K1(($,{preferredFile:U="config",...G}={})=>async()=>{const W=tU.getProfileName(G),{configFile:X,credentialsFile:Z}=await tU.loadSharedConfigFiles(G),L=Z[W]||{},Y=X[W]||{},w=U==="config"?{...L,...Y}:{...Y,...L};try{const Q=$(w,U==="config"?X:Z);if(Q===void 0)throw new Error;return Q}catch(F){throw new S1.CredentialsProviderError(F.message||`Not found in config files w/ profile [${W}]: ${Y0($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),qL=K1(($)=>typeof $==="function","isFunction"),NL=K1(($)=>qL($)?async()=>await $():S1.fromStatic($),"fromStatic"),jL=K1(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>S1.memoize(S1.chain(fL($),CL(U,W),NL(G))),"loadConfig")});var YG=M((ZG)=>{Object.defineProperty(ZG,"__esModule",{value:!0});ZG.getEndpointUrlConfig=void 0;var GG=Z0(),WG="AWS_ENDPOINT_URL",XG="endpoint_url",PL=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[WG,...G].join("_")];if(W)return W;const X=U[WG];if(X)return X;return},configFileSelector:(U,G)=>{if(G&&U.services){const X=G[["services",U.services].join(GG.CONFIG_PREFIX_SEPARATOR)];if(X){const Z=$.split(" ").map((Y)=>Y.toLowerCase()),L=X[[Z.join("_"),XG].join(GG.CONFIG_PREFIX_SEPARATOR)];if(L)return L}}const W=U[XG];if(W)return W;return},default:void 0});ZG.getEndpointUrlConfig=PL});var QG=M((wG)=>{Object.defineProperty(wG,"__esModule",{value:!0});wG.getEndpointFromConfig=void 0;var bL=UG(),SL=YG(),kL=async($)=>bL.loadConfig(SL.getEndpointUrlConfig($))();wG.getEndpointFromConfig=kL});var JG=M((wR,IG)=>{var RG=function($){const U={};if($=$.replace(/^\?/,""),$)for(let G of $.split("&")){let[W,X=null]=G.split("=");if(W=decodeURIComponent(W),X)X=decodeURIComponent(X);if(!(W in U))U[W]=X;else if(Array.isArray(U[W]))U[W].push(X);else U[W]=[U[W],X]}return U},G$=Object.defineProperty,DL=Object.getOwnPropertyDescriptor,hL=Object.getOwnPropertyNames,xL=Object.prototype.hasOwnProperty,vL=($,U)=>G$($,"name",{value:U,configurable:!0}),cL=($,U)=>{for(var G in U)G$($,G,{get:U[G],enumerable:!0})},yL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of hL(U))if(!xL.call($,X)&&X!==G)G$($,X,{get:()=>U[X],enumerable:!(W=DL(U,X))||W.enumerable})}return $},_L=($)=>yL(G$({},"__esModule",{value:!0}),$),zG={};cL(zG,{parseQueryString:()=>RG});IG.exports=_L(zG);vL(RG,"parseQueryString")});var TG=M((FR,MG)=>{var{defineProperty:W$,getOwnPropertyDescriptor:uL,getOwnPropertyNames:dL}=Object,pL=Object.prototype.hasOwnProperty,gL=($,U)=>W$($,"name",{value:U,configurable:!0}),sL=($,U)=>{for(var G in U)W$($,G,{get:U[G],enumerable:!0})},lL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of dL(U))if(!pL.call($,X)&&X!==G)W$($,X,{get:()=>U[X],enumerable:!(W=uL(U,X))||W.enumerable})}return $},mL=($)=>lL(W$({},"__esModule",{value:!0}),$),EG={};sL(EG,{parseUrl:()=>KG});MG.exports=mL(EG);var nL=JG(),KG=gL(($)=>{if(typeof $==="string")return KG(new URL($));const{hostname:U,pathname:G,port:W,protocol:X,search:Z}=$;let L;if(Z)L=nL.parseQueryString(Z);return{hostname:U,port:W?parseInt(W):void 0,protocol:X,path:G,query:L}},"parseUrl")});var F0=M((QR,CG)=>{var fG=function($,U,G){return{applyToStack:(W)=>{W.add(VG($,G),AG),W.add(HG($,U),OG)}}},X$=Object.defineProperty,iL=Object.getOwnPropertyDescriptor,oL=Object.getOwnPropertyNames,rL=Object.prototype.hasOwnProperty,w0=($,U)=>X$($,"name",{value:U,configurable:!0}),aL=($,U)=>{for(var G in U)X$($,G,{get:U[G],enumerable:!0})},tL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of oL(U))if(!rL.call($,X)&&X!==G)X$($,X,{get:()=>U[X],enumerable:!(W=iL(U,X))||W.enumerable})}return $},eL=($)=>tL(X$({},"__esModule",{value:!0}),$),BG={};aL(BG,{deserializerMiddleware:()=>VG,deserializerMiddlewareOption:()=>AG,getSerdePlugin:()=>fG,serializerMiddleware:()=>HG,serializerMiddlewareOption:()=>OG});CG.exports=eL(BG);var VG=w0(($,U)=>(G)=>async(W)=>{const{response:X}=await G(W);try{const Z=await U(X,$);return{response:X,output:Z}}catch(Z){if(Object.defineProperty(Z,"$response",{value:X}),!("$metadata"in Z)){if(Z.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof Z.$responseBodyText!=="undefined"){if(Z.$response)Z.$response.body=Z.$responseBodyText}}throw Z}},"deserializerMiddleware"),HG=w0(($,U)=>(G,W)=>async(X)=>{var Z;const L=((Z=W.endpointV2)==null?void 0:Z.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!L)throw new Error("No valid endpoint provider available.");const Y=await U(X.input,{...$,endpoint:L});return G({...X,request:Y})},"serializerMiddleware"),AG={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},OG={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};w0(fG,"getSerdePlugin")});var DG=M((zR,kG)=>{var{defineProperty:L$,getOwnPropertyDescriptor:$2,getOwnPropertyNames:U2}=Object,G2=Object.prototype.hasOwnProperty,d=($,U)=>L$($,"name",{value:U,configurable:!0}),W2=($,U)=>{for(var G in U)L$($,G,{get:U[G],enumerable:!0})},X2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of U2(U))if(!G2.call($,X)&&X!==G)L$($,X,{get:()=>U[X],enumerable:!(W=$2(U,X))||W.enumerable})}return $},Z2=($)=>X2(L$({},"__esModule",{value:!0}),$),NG={};W2(NG,{endpointMiddleware:()=>bG,endpointMiddlewareOptions:()=>SG,getEndpointFromInstructions:()=>jG,getEndpointPlugin:()=>E2,resolveEndpointConfig:()=>K2,resolveParams:()=>PG,toEndpointV1:()=>Q0});kG.exports=Z2(NG);var L2=d(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(z2(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Q2(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),Y2=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,w2=/(\d+\.){3}\d+/,F2=/\.\./,Q2=d(($)=>Y2.test($)&&!w2.test($)&&!F2.test($),"isDnsCompatibleBucketName"),z2=d(($)=>{const[U,G,W,,,X]=$.split(":"),Z=U==="arn"&&$.split(":").length>=6,L=Boolean(Z&&G&&W&&X);if(Z&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L},"isArnBucketName"),R2=d(($,U,G)=>{const W=d(async()=>{const X=G[$]??G[U];if(typeof X==="function")return X();return X},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return(X==null?void 0:X.credentialScope)??(X==null?void 0:X.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return(X==null?void 0:X.accountId)??(X==null?void 0:X.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const X=await W();if(X&&typeof X==="object"){if("url"in X)return X.url.href;if("hostname"in X){const{protocol:Z,hostname:L,port:Y,path:w}=X;return`${Z}//${L}${Y?":"+Y:""}${w}`}}return X};return W},"createConfigValueProvider"),I2=QG(),qG=TG(),Q0=d(($)=>{if(typeof $==="object"){if("url"in $)return qG.parseUrl($.url);return $}return qG.parseUrl($)},"toEndpointV1"),jG=d(async($,U,G,W)=>{if(!G.endpoint){const L=await I2.getEndpointFromConfig(G.serviceId||"");if(L)G.endpoint=()=>Promise.resolve(Q0(L))}const X=await PG($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},"getEndpointFromInstructions"),PG=d(async($,U,G)=>{var W;const X={},Z=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[L,Y]of Object.entries(Z))switch(Y.type){case"staticContextParams":X[L]=Y.value;break;case"contextParams":X[L]=$[Y.name];break;case"clientContextParams":case"builtInParams":X[L]=await R2(Y.name,L,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Y))}if(Object.keys(Z).length===0)Object.assign(X,G);if(String(G.serviceId).toLowerCase()==="s3")await L2(X);return X},"resolveParams"),Z$=j1(),bG=d(({config:$,instructions:U})=>{return(G,W)=>async(X)=>{var Z,L,Y;const w=await jG(X.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=w,W.authSchemes=(Z=w.properties)==null?void 0:Z.authSchemes;const F=(L=W.authSchemes)==null?void 0:L[0];if(F){W.signing_region=F.signingRegion,W.signing_service=F.signingName;const Q=Z$.getSmithyContext(W),z=(Y=Q==null?void 0:Q.selectedHttpAuthScheme)==null?void 0:Y.httpAuthOption;if(z)z.signingProperties=Object.assign(z.signingProperties||{},{signing_region:F.signingRegion,signingRegion:F.signingRegion,signing_service:F.signingName,signingName:F.signingName,signingRegionSet:F.signingRegionSet},F.properties)}return G({...X})}},"endpointMiddleware"),J2=F0(),SG={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:J2.serializerMiddlewareOption.name},E2=d(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(bG({config:$,instructions:U}),SG)}}),"getEndpointPlugin"),K2=d(($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>Q0(await Z$.normalizeProvider(G)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:Z$.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:Z$.normalizeProvider($.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var l=M((RR,pG)=>{var _G=function($){return Object.keys($).reduce((U,G)=>{const W=$[G];return{...U,[G]:Array.isArray(W)?[...W]:W}},{})},dG=function($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)},Y$=Object.defineProperty,M2=Object.getOwnPropertyDescriptor,T2=Object.getOwnPropertyNames,B2=Object.prototype.hasOwnProperty,r=($,U)=>Y$($,"name",{value:U,configurable:!0}),V2=($,U)=>{for(var G in U)Y$($,G,{get:U[G],enumerable:!0})},H2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of T2(U))if(!B2.call($,X)&&X!==G)Y$($,X,{get:()=>U[X],enumerable:!(W=M2(U,X))||W.enumerable})}return $},A2=($)=>H2(Y$({},"__esModule",{value:!0}),$),hG={};V2(hG,{Field:()=>C2,Fields:()=>q2,HttpRequest:()=>N2,HttpResponse:()=>j2,IHttpRequest:()=>xG.HttpRequest,getHttpHandlerExtensionConfiguration:()=>O2,isValidHostname:()=>dG,resolveHttpHandlerRuntimeConfig:()=>f2});pG.exports=A2(hG);var O2=r(($)=>{let U=$.httpHandler;return{setHttpHandler(G){U=G},httpHandler(){return U},updateHttpClientConfig(G,W){U.updateHttpClientConfig(G,W)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),f2=r(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),xG=Z1(),vG=class ${constructor({name:U,kind:G=xG.FieldPosition.HEADER,values:W=[]}){this.name=U,this.kind=G,this.values=W}add(U){this.values.push(U)}set(U){this.values=U}remove(U){this.values=this.values.filter((G)=>G!==U)}toString(){return this.values.map((U)=>U.includes(",")||U.includes(" ")?`"${U}"`:U).join(", ")}get(){return this.values}};r(vG,"Field");var C2=vG,cG=class ${constructor({fields:U=[],encoding:G="utf-8"}){this.entries={},U.forEach(this.setField.bind(this)),this.encoding=G}setField(U){this.entries[U.name.toLowerCase()]=U}getField(U){return this.entries[U.toLowerCase()]}removeField(U){delete this.entries[U.toLowerCase()]}getByType(U){return Object.values(this.entries).filter((G)=>G.kind===U)}};r(cG,"Fields");var q2=cG,yG=class ${constructor(U){this.method=U.method||"GET",this.hostname=U.hostname||"localhost",this.port=U.port,this.query=U.query||{},this.headers=U.headers||{},this.body=U.body,this.protocol=U.protocol?U.protocol.slice(-1)!==":"?`${U.protocol}:`:U.protocol:"https:",this.path=U.path?U.path.charAt(0)!=="/"?`/${U.path}`:U.path:"/",this.username=U.username,this.password=U.password,this.fragment=U.fragment}static clone(U){const G=new $({...U,headers:{...U.headers}});if(G.query)G.query=_G(G.query);return G}static isInstance(U){if(!U)return!1;const G=U;return"method"in G&&"protocol"in G&&"hostname"in G&&"path"in G&&typeof G.query==="object"&&typeof G.headers==="object"}clone(){return $.clone(this)}};r(yG,"HttpRequest");var N2=yG;r(_G,"cloneQuery");var uG=class ${constructor(U){this.statusCode=U.statusCode,this.reason=U.reason,this.headers=U.headers||{},this.body=U.body}static isInstance(U){if(!U)return!1;const G=U;return typeof G.statusCode==="number"&&typeof G.headers==="object"}};r(uG,"HttpResponse");var j2=uG;r(dG,"isValidHostname")});var z0=M((IR,mG)=>{var{defineProperty:w$,getOwnPropertyDescriptor:P2,getOwnPropertyNames:b2}=Object,S2=Object.prototype.hasOwnProperty,M1=($,U)=>w$($,"name",{value:U,configurable:!0}),k2=($,U)=>{for(var G in U)w$($,G,{get:U[G],enumerable:!0})},D2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of b2(U))if(!S2.call($,X)&&X!==G)w$($,X,{get:()=>U[X],enumerable:!(W=P2(U,X))||W.enumerable})}return $},h2=($)=>D2(w$({},"__esModule",{value:!0}),$),gG={};k2(gG,{isClockSkewCorrectedError:()=>sG,isClockSkewError:()=>d2,isRetryableByTrait:()=>u2,isServerError:()=>g2,isThrottlingError:()=>p2,isTransientError:()=>lG});mG.exports=h2(gG);var x2=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],v2=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],c2=["TimeoutError","RequestTimeout","RequestTimeoutException"],y2=[500,502,503,504],_2=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],u2=M1(($)=>$.$retryable!==void 0,"isRetryableByTrait"),d2=M1(($)=>x2.includes($.name),"isClockSkewError"),sG=M1(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),p2=M1(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||v2.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),lG=M1(($)=>{var U;return sG($)||c2.includes($.name)||_2.includes(($==null?void 0:$.code)||"")||y2.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),g2=M1(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!lG($))return!0;return!1}return!1},"isServerError")});var L6=M((JR,Z6)=>{var{defineProperty:F$,getOwnPropertyDescriptor:s2,getOwnPropertyNames:l2}=Object,m2=Object.prototype.hasOwnProperty,p=($,U)=>F$($,"name",{value:U,configurable:!0}),n2=($,U)=>{for(var G in U)F$($,G,{get:U[G],enumerable:!0})},i2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of l2(U))if(!m2.call($,X)&&X!==G)F$($,X,{get:()=>U[X],enumerable:!(W=s2(U,X))||W.enumerable})}return $},o2=($)=>i2(F$({},"__esModule",{value:!0}),$),iG={};n2(iG,{AdaptiveRetryStrategy:()=>UY,ConfiguredRetryStrategy:()=>GY,DEFAULT_MAX_ATTEMPTS:()=>R0,DEFAULT_RETRY_DELAY_BASE:()=>k1,DEFAULT_RETRY_MODE:()=>r2,DefaultRateLimiter:()=>aG,INITIAL_RETRY_TOKENS:()=>I0,INVOCATION_ID_HEADER:()=>t2,MAXIMUM_RETRY_DELAY:()=>J0,NO_RETRY_INCREMENT:()=>U6,REQUEST_HEADER:()=>e2,RETRY_COST:()=>eG,RETRY_MODES:()=>oG,StandardRetryStrategy:()=>E0,THROTTLING_RETRY_DELAY_BASE:()=>tG,TIMEOUT_RETRY_COST:()=>$6});Z6.exports=o2(iG);var oG=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(oG||{}),R0=3,r2="standard",a2=z0(),rG=class ${constructor(U){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(U==null?void 0:U.beta)??0.7,this.minCapacity=(U==null?void 0:U.minCapacity)??1,this.minFillRate=(U==null?void 0:U.minFillRate)??0.5,this.scaleConstant=(U==null?void 0:U.scaleConstant)??0.4,this.smooth=(U==null?void 0:U.smooth)??0.8;const G=this.getCurrentTimeInSeconds();this.lastThrottleTime=G,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(U){if(!this.enabled)return;if(this.refillTokenBucket(),U>this.currentCapacity){const G=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((W)=>setTimeout(W,G))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){const U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}const G=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+G),this.lastTimestamp=U}updateClientSendingRate(U){let G;if(this.updateMeasuredRate(),a2.isThrottlingError(U)){const X=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=X,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),G=this.cubicThrottle(X),this.enableTokenBucket()}else this.calculateTimeWindow(),G=this.cubicSuccess(this.getCurrentTimeInSeconds());const W=Math.min(G,2*this.measuredTxRate);this.updateTokenBucketRate(W)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(U){return this.getPrecise(U*this.beta)}cubicSuccess(U){return this.getPrecise(this.scaleConstant*Math.pow(U-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(U){this.refillTokenBucket(),this.fillRate=Math.max(U,this.minFillRate),this.maxCapacity=Math.max(U,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const U=this.getCurrentTimeInSeconds(),G=Math.floor(U*2)/2;if(this.requestCount++,G>this.lastTxRateBucket){const W=this.requestCount/(G-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(W*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=G}}getPrecise(U){return parseFloat(U.toFixed(8))}};p(rG,"DefaultRateLimiter");var aG=rG,k1=100,J0=20000,tG=500,I0=500,eG=5,$6=10,U6=1,t2="amz-sdk-invocation-id",e2="amz-sdk-request",$Y=p(()=>{let $=k1;return{computeNextBackoffDelay:p((W)=>{return Math.floor(Math.min(J0,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:p((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),nG=p(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:p(()=>U,"getRetryCount"),getRetryDelay:p(()=>Math.min(J0,$),"getRetryDelay"),getRetryCost:p(()=>G,"getRetryCost")}},"createDefaultRetryToken"),G6=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=I0,this.retryBackoffStrategy=$Y(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return nG({retryDelay:k1,retryCount:0})}async refreshRetryTokenForRetry(U,G){const W=await this.getMaxAttempts();if(this.shouldRetry(U,G,W)){const X=G.errorType;this.retryBackoffStrategy.setDelayBase(X==="THROTTLING"?tG:k1);const Z=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),L=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,Z):Z,Y=this.getCapacityCost(X);return this.capacity-=Y,nG({retryDelay:L,retryCount:U.getRetryCount()+1,retryCost:Y})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(I0,this.capacity+(U.getRetryCost()??U6))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(U){return console.warn(`Max attempts provider could not resolve. Using default of ${R0}`),R0}}shouldRetry(U,G,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?$6:eG}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};p(G6,"StandardRetryStrategy");var E0=G6,W6=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=G??{};this.rateLimiter=W??new aG,this.standardRetryStrategy=new E0(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,G){return this.rateLimiter.updateClientSendingRate(G),this.standardRetryStrategy.refreshRetryTokenForRetry(U,G)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};p(W6,"AdaptiveRetryStrategy");var UY=W6,X6=class $ extends E0{constructor(U,G=k1){super(typeof U==="function"?U:async()=>U);if(typeof G==="number")this.computeNextBackoffDelay=()=>G;else this.computeNextBackoffDelay=G}async refreshRetryTokenForRetry(U,G){const W=await super.refreshRetryTokenForRetry(U,G);return W.getRetryDelay=()=>this.computeNextBackoffDelay(W.getRetryCount()),W}};p(X6,"ConfiguredRetryStrategy");var GY=X6});var z6=M((ER,Q6)=>{var{defineProperty:Q$,getOwnPropertyDescriptor:WY,getOwnPropertyNames:XY}=Object,ZY=Object.prototype.hasOwnProperty,y=($,U)=>Q$($,"name",{value:U,configurable:!0}),LY=($,U)=>{for(var G in U)Q$($,G,{get:U[G],enumerable:!0})},YY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of XY(U))if(!ZY.call($,X)&&X!==G)Q$($,X,{get:()=>U[X],enumerable:!(W=WY(U,X))||W.enumerable})}return $},wY=($)=>YY(Q$({},"__esModule",{value:!0}),$),F6={};LY(F6,{constructStack:()=>K0});Q6.exports=wY(F6);var Y1=y(($,U)=>{const G=[];if($)G.push($);if(U)for(let W of U)G.push(W);return G},"getAllAliases"),a=y(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),K0=y(()=>{let $=[],U=[],G=!1;const W=new Set,X=y((z)=>z.sort((I,R)=>Y6[R.step]-Y6[I.step]||w6[R.priority||"normal"]-w6[I.priority||"normal"]),"sort"),Z=y((z)=>{let I=!1;const R=y((E)=>{const V=Y1(E.name,E.aliases);if(V.includes(z)){I=!0;for(let K of V)W.delete(K);return!1}return!0},"filterCb");return $=$.filter(R),U=U.filter(R),I},"removeByName"),L=y((z)=>{let I=!1;const R=y((E)=>{if(E.middleware===z){I=!0;for(let V of Y1(E.name,E.aliases))W.delete(V);return!1}return!0},"filterCb");return $=$.filter(R),U=U.filter(R),I},"removeByReference"),Y=y((z)=>{var I;return $.forEach((R)=>{z.add(R.middleware,{...R})}),U.forEach((R)=>{z.addRelativeTo(R.middleware,{...R})}),(I=z.identifyOnResolve)==null||I.call(z,Q.identifyOnResolve()),z},"cloneTo"),w=y((z)=>{const I=[];return z.before.forEach((R)=>{if(R.before.length===0&&R.after.length===0)I.push(R);else I.push(...w(R))}),I.push(z),z.after.reverse().forEach((R)=>{if(R.before.length===0&&R.after.length===0)I.push(R);else I.push(...w(R))}),I},"expandRelativeMiddlewareList"),F=y((z=!1)=>{const I=[],R=[],E={};return $.forEach((K)=>{const B={...K,before:[],after:[]};for(let T of Y1(B.name,B.aliases))E[T]=B;I.push(B)}),U.forEach((K)=>{const B={...K,before:[],after:[]};for(let T of Y1(B.name,B.aliases))E[T]=B;R.push(B)}),R.forEach((K)=>{if(K.toMiddleware){const B=E[K.toMiddleware];if(B===void 0){if(z)return;throw new Error(`${K.toMiddleware} is not found when adding ${a(K.name,K.aliases)} middleware ${K.relation} ${K.toMiddleware}`)}if(K.relation==="after")B.after.push(K);if(K.relation==="before")B.before.push(K)}}),X(I).map(w).reduce((K,B)=>{return K.push(...B),K},[])},"getMiddlewareList"),Q={add:(z,I={})=>{const{name:R,override:E,aliases:V}=I,K={step:"initialize",priority:"normal",middleware:z,...I},B=Y1(R,V);if(B.length>0){if(B.some((T)=>W.has(T))){if(!E)throw new Error(`Duplicate middleware name '${a(R,V)}'`);for(let T of B){const H=$.findIndex((S)=>{var o;return S.name===T||((o=S.aliases)==null?void 0:o.some((X1)=>X1===T))});if(H===-1)continue;const A=$[H];if(A.step!==K.step||K.priority!==A.priority)throw new Error(`"${a(A.name,A.aliases)}" middleware with ${A.priority} priority in ${A.step} step cannot be overridden by "${a(R,V)}" middleware with ${K.priority} priority in ${K.step} step.`);$.splice(H,1)}}for(let T of B)W.add(T)}$.push(K)},addRelativeTo:(z,I)=>{const{name:R,override:E,aliases:V}=I,K={middleware:z,...I},B=Y1(R,V);if(B.length>0){if(B.some((T)=>W.has(T))){if(!E)throw new Error(`Duplicate middleware name '${a(R,V)}'`);for(let T of B){const H=U.findIndex((S)=>{var o;return S.name===T||((o=S.aliases)==null?void 0:o.some((X1)=>X1===T))});if(H===-1)continue;const A=U[H];if(A.toMiddleware!==K.toMiddleware||A.relation!==K.relation)throw new Error(`"${a(A.name,A.aliases)}" middleware ${A.relation} "${A.toMiddleware}" middleware cannot be overridden by "${a(R,V)}" middleware ${K.relation} "${K.toMiddleware}" middleware.`);U.splice(H,1)}}for(let T of B)W.add(T)}U.push(K)},clone:()=>Y(K0()),use:(z)=>{z.applyToStack(Q)},remove:(z)=>{if(typeof z==="string")return Z(z);else return L(z)},removeByTag:(z)=>{let I=!1;const R=y((E)=>{const{tags:V,name:K,aliases:B}=E;if(V&&V.includes(z)){const T=Y1(K,B);for(let H of T)W.delete(H);return I=!0,!1}return!0},"filterCb");return $=$.filter(R),U=U.filter(R),I},concat:(z)=>{var I;const R=Y(K0());return R.use(z),R.identifyOnResolve(G||R.identifyOnResolve()||(((I=z.identifyOnResolve)==null?void 0:I.call(z))??!1)),R},applyToStack:Y,identify:()=>{return F(!0).map((z)=>{const I=z.step??z.relation+" "+z.toMiddleware;return a(z.name,z.aliases)+" - "+I})},identifyOnResolve(z){if(typeof z==="boolean")G=z;return G},resolve:(z,I)=>{for(let R of F().map((E)=>E.middleware).reverse())z=R(z,I);if(G)console.log(Q.identify());return z}};return Q},"constructStack"),Y6={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},w6={high:3,normal:2,low:1}});var M0=M((KR,I6)=>{var{defineProperty:z$,getOwnPropertyDescriptor:FY,getOwnPropertyNames:QY}=Object,zY=Object.prototype.hasOwnProperty,RY=($,U)=>z$($,"name",{value:U,configurable:!0}),IY=($,U)=>{for(var G in U)z$($,G,{get:U[G],enumerable:!0})},JY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of QY(U))if(!zY.call($,X)&&X!==G)z$($,X,{get:()=>U[X],enumerable:!(W=FY(U,X))||W.enumerable})}return $},EY=($)=>JY(z$({},"__esModule",{value:!0}),$),R6={};IY(R6,{isArrayBuffer:()=>KY});I6.exports=EY(R6);var KY=RY(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var D1=M((MR,K6)=>{var{defineProperty:R$,getOwnPropertyDescriptor:MY,getOwnPropertyNames:TY}=Object,BY=Object.prototype.hasOwnProperty,J6=($,U)=>R$($,"name",{value:U,configurable:!0}),VY=($,U)=>{for(var G in U)R$($,G,{get:U[G],enumerable:!0})},HY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of TY(U))if(!BY.call($,X)&&X!==G)R$($,X,{get:()=>U[X],enumerable:!(W=MY(U,X))||W.enumerable})}return $},AY=($)=>HY(R$({},"__esModule",{value:!0}),$),E6={};VY(E6,{fromArrayBuffer:()=>fY,fromString:()=>CY});K6.exports=AY(E6);var OY=M0(),T0=import.meta.require("buffer"),fY=J6(($,U=0,G=$.byteLength-U)=>{if(!OY.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return T0.Buffer.from($,U,G)},"fromArrayBuffer"),CY=J6(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?T0.Buffer.from($,U):T0.Buffer.from($)},"fromString")});var B6=M((M6)=>{Object.defineProperty(M6,"__esModule",{value:!0});M6.fromBase64=void 0;var qY=D1(),NY=/^[A-Za-z0-9+/]*={0,2}$/,jY=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!NY.exec($))throw new TypeError("Invalid base64 string.");const U=qY.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};M6.fromBase64=jY});var t=M((BR,O6)=>{var{defineProperty:I$,getOwnPropertyDescriptor:PY,getOwnPropertyNames:bY}=Object,SY=Object.prototype.hasOwnProperty,B0=($,U)=>I$($,"name",{value:U,configurable:!0}),kY=($,U)=>{for(var G in U)I$($,G,{get:U[G],enumerable:!0})},DY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of bY(U))if(!SY.call($,X)&&X!==G)I$($,X,{get:()=>U[X],enumerable:!(W=PY(U,X))||W.enumerable})}return $},hY=($)=>DY(I$({},"__esModule",{value:!0}),$),V6={};kY(V6,{fromUtf8:()=>A6,toUint8Array:()=>xY,toUtf8:()=>vY});O6.exports=hY(V6);var H6=D1(),A6=B0(($)=>{const U=H6.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),xY=B0(($)=>{if(typeof $==="string")return A6($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),vY=B0(($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return H6.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var q6=M((f6)=>{Object.defineProperty(f6,"__esModule",{value:!0});f6.toBase64=void 0;var cY=D1(),yY=t(),_Y=($)=>{let U;if(typeof $==="string")U=yY.fromUtf8($);else U=$;if(typeof U!=="object"||typeof U.byteOffset!=="number"||typeof U.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return cY.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};f6.toBase64=_Y});var E$=M((HR,J$)=>{var{defineProperty:N6,getOwnPropertyDescriptor:uY,getOwnPropertyNames:dY}=Object,pY=Object.prototype.hasOwnProperty,V0=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of dY(U))if(!pY.call($,X)&&X!==G)N6($,X,{get:()=>U[X],enumerable:!(W=uY(U,X))||W.enumerable})}return $},j6=($,U,G)=>(V0($,U,"default"),G&&V0(G,U,"default")),gY=($)=>V0(N6({},"__esModule",{value:!0}),$),H0={};J$.exports=gY(H0);j6(H0,B6(),J$.exports);j6(H0,q6(),J$.exports)});var S6=M((P6)=>{Object.defineProperty(P6,"__esModule",{value:!0});P6.getAwsChunkedEncodingStream=void 0;var sY=import.meta.require("stream"),lY=($,U)=>{const{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:X,checksumLocationName:Z,streamHasher:L}=U,Y=G!==void 0&&X!==void 0&&Z!==void 0&&L!==void 0,w=Y?L(X,$):void 0,F=new sY.Readable({read:()=>{}});return $.on("data",(Q)=>{const z=W(Q)||0;F.push(`${z.toString(16)}\r\n`),F.push(Q),F.push("\r\n")}),$.on("end",async()=>{if(F.push("0\r\n"),Y){const Q=G(await w);F.push(`${Z}:${Q}\r\n`),F.push("\r\n")}F.push(null)}),F};P6.getAwsChunkedEncodingStream=lY});var O0=M((OR,x6)=>{var h6=function($){const U=[];for(let G of Object.keys($).sort()){const W=$[G];if(G=A0.escapeUri(G),Array.isArray(W))for(let X=0,Z=W.length;X<Z;X++)U.push(`${G}=${A0.escapeUri(W[X])}`);else{let X=G;if(W||typeof W==="string")X+=`=${A0.escapeUri(W)}`;U.push(X)}}return U.join("&")},K$=Object.defineProperty,mY=Object.getOwnPropertyDescriptor,nY=Object.getOwnPropertyNames,iY=Object.prototype.hasOwnProperty,oY=($,U)=>K$($,"name",{value:U,configurable:!0}),rY=($,U)=>{for(var G in U)K$($,G,{get:U[G],enumerable:!0})},aY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of nY(U))if(!iY.call($,X)&&X!==G)K$($,X,{get:()=>U[X],enumerable:!(W=mY(U,X))||W.enumerable})}return $},tY=($)=>aY(K$({},"__esModule",{value:!0}),$),D6={};rY(D6,{buildQueryString:()=>h6});x6.exports=tY(D6);var A0=k6();oY(h6,"buildQueryString")});var t6=M((fR,a6)=>{async function q0($,U,G=v6){const W=U.headers??{},X=W.Expect||W.expect;let Z=-1,L=!1;if(X==="100-continue")await Promise.race([new Promise((Y)=>{Z=Number(setTimeout(Y,Math.max(v6,G)))}),new Promise((Y)=>{$.on("continue",()=>{clearTimeout(Z),Y()}),$.on("error",()=>{L=!0,clearTimeout(Z),Y()})})]);if(!L)s6($,U.body)}var s6=function($,U){if(U instanceof g6.Readable){U.pipe($);return}if(U){if(Buffer.isBuffer(U)||typeof U==="string"){$.end(U);return}const G=U;if(typeof G==="object"&&G.buffer&&typeof G.byteOffset==="number"&&typeof G.byteLength==="number"){$.end(Buffer.from(G.buffer,G.byteOffset,G.byteLength));return}$.end(Buffer.from(U));return}$.end()};async function r6($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:Y,value:w}=await G.read();if(w)U.push(w),X+=w.length;W=Y}const Z=new Uint8Array(X);let L=0;for(let Y of U)Z.set(Y,L),L+=Y.length;return Z}var{create:eY,defineProperty:h1,getOwnPropertyDescriptor:$w,getOwnPropertyNames:Uw,getPrototypeOf:Gw}=Object,Ww=Object.prototype.hasOwnProperty,N=($,U)=>h1($,"name",{value:U,configurable:!0}),Xw=($,U)=>{for(var G in U)h1($,G,{get:U[G],enumerable:!0})},y6=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Uw(U))if(!Ww.call($,X)&&X!==G)h1($,X,{get:()=>U[X],enumerable:!(W=$w(U,X))||W.enumerable})}return $},Zw=($,U,G)=>(G=$!=null?eY(Gw($)):{},y6(U||!$||!$.__esModule?h1(G,"default",{value:$,enumerable:!0}):G,$)),Lw=($)=>y6(h1({},"__esModule",{value:!0}),$),_6={};Xw(_6,{DEFAULT_REQUEST_TIMEOUT:()=>zw,NodeHttp2Handler:()=>Kw,NodeHttpHandler:()=>Rw,streamCollector:()=>Tw});a6.exports=Lw(_6);var u6=l(),d6=O0(),f0=import.meta.require("http"),C0=import.meta.require("https"),Yw=["ECONNRESET","EPIPE","ETIMEDOUT"],p6=N(($)=>{const U={};for(let G of Object.keys($)){const W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),ww=N(($,U,G=0)=>{if(!G)return;const W=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G);$.on("socket",(X)=>{if(X.connecting)X.on("connect",()=>{clearTimeout(W)});else clearTimeout(W)})},"setConnectionTimeout"),Fw=N(($,{keepAlive:U,keepAliveMsecs:G})=>{if(U!==!0)return;$.on("socket",(W)=>{W.setKeepAlive(U,G||0)})},"setSocketKeepAlive"),Qw=N(($,U,G=0)=>{$.setTimeout(G,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${G} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),g6=import.meta.require("stream"),v6=1000;N(q0,"writeRequestBody");N(s6,"writeBody");var zw=0,l6=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((X)=>{G(this.resolveDefaultConfig(X))}).catch(W);else G(this.resolveDefaultConfig(U))})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}static checkSocketUsage(U,G,W=console){var X,Z,L;const{sockets:Y,requests:w,maxSockets:F}=U;if(typeof F!=="number"||F===Infinity)return G;const Q=15000;if(Date.now()-Q<G)return G;if(Y&&w)for(let z in Y){const I=((X=Y[z])==null?void 0:X.length)??0,R=((Z=w[z])==null?void 0:Z.length)??0;if(I>=F&&R>=2*F)return(L=W==null?void 0:W.warn)==null||L.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${I} and ${R} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return G}resolveDefaultConfig(U){const{requestTimeout:G,connectionTimeout:W,socketTimeout:X,httpAgent:Z,httpsAgent:L}=U||{};return{connectionTimeout:W,requestTimeout:G??X,httpAgent:(()=>{if(Z instanceof f0.Agent||typeof(Z==null?void 0:Z.destroy)==="function")return Z;return new f0.Agent({keepAlive:!0,maxSockets:50,...Z})})(),httpsAgent:(()=>{if(L instanceof C0.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new C0.Agent({keepAlive:!0,maxSockets:50,...L})})(),logger:console}}destroy(){var U,G,W,X;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(X=(W=this.config)==null?void 0:W.httpsAgent)==null||X.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;let W;return new Promise((X,Z)=>{let L=void 0;const Y=N(async(T)=>{await L,clearTimeout(W),X(T)},"resolve"),w=N(async(T)=>{await L,clearTimeout(W),Z(T)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const T=new Error("Request aborted");T.name="AbortError",w(T);return}const F=U.protocol==="https:",Q=F?this.config.httpsAgent:this.config.httpAgent;W=setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(Q,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const z=d6.buildQueryString(U.query||{});let I=void 0;if(U.username!=null||U.password!=null){const T=U.username??"",H=U.password??"";I=`${T}:${H}`}let R=U.path;if(z)R+=`?${z}`;if(U.fragment)R+=`#${U.fragment}`;const E={headers:U.headers,host:U.hostname,method:U.method,path:R,port:U.port,agent:Q,auth:I},K=(F?C0.request:f0.request)(E,(T)=>{const H=new u6.HttpResponse({statusCode:T.statusCode||-1,reason:T.statusMessage,headers:p6(T.headers),body:T});Y({response:H})});if(K.on("error",(T)=>{if(Yw.includes(T.code))w(Object.assign(T,{name:"TimeoutError"}));else w(T)}),ww(K,w,this.config.connectionTimeout),Qw(K,w,this.config.requestTimeout),G){const T=N(()=>{K.destroy();const H=new Error("Request aborted");H.name="AbortError",w(H)},"onAbort");if(typeof G.addEventListener==="function"){const H=G;H.addEventListener("abort",T,{once:!0}),K.once("close",()=>H.removeEventListener("abort",T))}else G.onabort=T}const B=E.agent;if(typeof B==="object"&&"keepAlive"in B)Fw(K,{keepAlive:B.keepAlive,keepAliveMsecs:B.keepAliveMsecs});L=q0(K,U,this.config.requestTimeout).catch((T)=>{return clearTimeout(W),Z(T)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};N(l6,"NodeHttpHandler");var Rw=l6,c6=import.meta.require("http2"),Iw=Zw(import.meta.require("http2")),m6=class ${constructor(U){this.sessions=[],this.sessions=U??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(U){this.sessions.push(U)}contains(U){return this.sessions.includes(U)}remove(U){this.sessions=this.sessions.filter((G)=>G!==U)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(U){for(let G of this.sessions)if(G===U){if(!G.destroyed)G.destroy()}}};N(m6,"NodeHttp2ConnectionPool");var Jw=m6,n6=class ${constructor(U){if(this.sessionCache=new Map,this.config=U,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(U,G){const W=this.getUrlString(U),X=this.sessionCache.get(W);if(X){const w=X.poll();if(w&&!this.config.disableConcurrency)return w}const Z=Iw.default.connect(W);if(this.config.maxConcurrency)Z.settings({maxConcurrentStreams:this.config.maxConcurrency},(w)=>{if(w)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});Z.unref();const L=N(()=>{Z.destroy(),this.deleteSession(W,Z)},"destroySessionCb");if(Z.on("goaway",L),Z.on("error",L),Z.on("frameError",L),Z.on("close",()=>this.deleteSession(W,Z)),G.requestTimeout)Z.setTimeout(G.requestTimeout,L);const Y=this.sessionCache.get(W)||new Jw;return Y.offerLast(Z),this.sessionCache.set(W,Y),Z}deleteSession(U,G){const W=this.sessionCache.get(U);if(!W)return;if(!W.contains(G))return;W.remove(G),this.sessionCache.set(U,W)}release(U,G){var W;const X=this.getUrlString(U);(W=this.sessionCache.get(X))==null||W.offerLast(G)}destroy(){for(let[U,G]of this.sessionCache){for(let W of G){if(!W.destroyed)W.destroy();G.remove(W)}this.sessionCache.delete(U)}}setMaxConcurrentStreams(U){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=U}setDisableConcurrentStreams(U){this.config.disableConcurrency=U}getUrlString(U){return U.destination.toString()}};N(n6,"NodeHttp2ConnectionManager");var Ew=n6,i6=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Ew({}),this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((X)=>{G(X||{})}).catch(W);else G(U||{})})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}destroy(){this.connectionManager.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:W,disableConcurrentStreams:X}=this.config;return new Promise((Z,L)=>{var Y;let w=!1,F=void 0;const Q=N(async(q)=>{await F,Z(q)},"resolve"),z=N(async(q)=>{await F,L(q)},"reject");if(G==null?void 0:G.aborted){w=!0;const q=new Error("Request aborted");q.name="AbortError",z(q);return}const{hostname:I,method:R,port:E,protocol:V,query:K}=U;let B="";if(U.username!=null||U.password!=null){const q=U.username??"",u=U.password??"";B=`${q}:${u}@`}const T=`${V}//${B}${I}${E?`:${E}`:""}`,H={destination:new URL(T)},A=this.connectionManager.lease(H,{requestTimeout:(Y=this.config)==null?void 0:Y.sessionTimeout,disableConcurrentStreams:X||!1}),S=N((q)=>{if(X)this.destroySession(A);w=!0,z(q)},"rejectWithDestroy"),o=d6.buildQueryString(K||{});let X1=U.path;if(o)X1+=`?${o}`;if(U.fragment)X1+=`#${U.fragment}`;const x=A.request({...U.headers,[c6.constants.HTTP2_HEADER_PATH]:X1,[c6.constants.HTTP2_HEADER_METHOD]:R});if(A.ref(),x.on("response",(q)=>{const u=new u6.HttpResponse({statusCode:q[":status"]||-1,headers:p6(q),body:x});if(w=!0,Q({response:u}),X)A.close(),this.connectionManager.deleteSession(T,A)}),W)x.setTimeout(W,()=>{x.close();const q=new Error(`Stream timed out because of no activity for ${W} ms`);q.name="TimeoutError",S(q)});if(G){const q=N(()=>{x.close();const u=new Error("Request aborted");u.name="AbortError",S(u)},"onAbort");if(typeof G.addEventListener==="function"){const u=G;u.addEventListener("abort",q,{once:!0}),x.once("close",()=>u.removeEventListener("abort",q))}else G.onabort=q}x.on("frameError",(q,u,BZ)=>{S(new Error(`Frame type id ${q} in stream id ${BZ} has failed with code ${u}.`))}),x.on("error",S),x.on("aborted",()=>{S(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${x.rstCode}.`))}),x.on("close",()=>{if(A.unref(),X)A.destroy();if(!w)S(new Error("Unexpected error: http2 request did not get a response"))}),F=q0(x,U,W)})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}destroySession(U){if(!U.destroyed)U.destroy()}};N(i6,"NodeHttp2Handler");var Kw=i6,o6=class $ extends g6.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};N(o6,"Collector");var Mw=o6,Tw=N(($)=>{if(Bw($))return r6($);return new Promise((U,G)=>{const W=new Mw;$.pipe(W),$.on("error",(X)=>{W.end(),G(X)}),W.on("error",G),W.on("finish",function(){const X=new Uint8Array(Buffer.concat(this.bufferedBytes));U(X)})})},"streamCollector"),Bw=N(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");N(r6,"collectReadableStream")});var Y4=M((CR,L4)=>{var U4=function($=0){return new Promise((U,G)=>{if($)setTimeout(()=>{const W=new Error(`Request did not complete within ${$} ms`);W.name="TimeoutError",G(W)},$)})};async function W4($){const U=await Z4($),G=jw.fromBase64(U);return new Uint8Array(G)}async function X4($){const U=[],G=$.getReader();let W=!1,X=0;while(!W){const{done:Y,value:w}=await G.read();if(w)U.push(w),X+=w.length;W=Y}const Z=new Uint8Array(X);let L=0;for(let Y of U)Z.set(Y,L),L+=Y.length;return Z}var Z4=function($){return new Promise((U,G)=>{const W=new FileReader;W.onloadend=()=>{if(W.readyState!==2)return G(new Error("Reader aborted too early"));const X=W.result??"",Z=X.indexOf(","),L=Z>-1?Z+1:X.length;U(X.substring(L))},W.onabort=()=>G(new Error("Read aborted")),W.onerror=()=>G(W.error),W.readAsDataURL($)})},T$=Object.defineProperty,Vw=Object.getOwnPropertyDescriptor,Hw=Object.getOwnPropertyNames,Aw=Object.prototype.hasOwnProperty,m=($,U)=>T$($,"name",{value:U,configurable:!0}),Ow=($,U)=>{for(var G in U)T$($,G,{get:U[G],enumerable:!0})},fw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Hw(U))if(!Aw.call($,X)&&X!==G)T$($,X,{get:()=>U[X],enumerable:!(W=Vw(U,X))||W.enumerable})}return $},Cw=($)=>fw(T$({},"__esModule",{value:!0}),$),$4={};Ow($4,{FetchHttpHandler:()=>Nw,keepAliveSupport:()=>M$,streamCollector:()=>Pw});L4.exports=Cw($4);var e6=l(),qw=O0();m(U4,"requestTimeout");var M$={supported:void 0},G4=class ${static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}constructor(U){if(typeof U==="function")this.configProvider=U().then((G)=>G||{});else this.config=U??{},this.configProvider=Promise.resolve(this.config);if(M$.supported===void 0)M$.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;const W=this.config.requestTimeout,X=this.config.keepAlive===!0,Z=this.config.credentials;if(G==null?void 0:G.aborted){const B=new Error("Request aborted");return B.name="AbortError",Promise.reject(B)}let L=U.path;const Y=qw.buildQueryString(U.query||{});if(Y)L+=`?${Y}`;if(U.fragment)L+=`#${U.fragment}`;let w="";if(U.username!=null||U.password!=null){const B=U.username??"",T=U.password??"";w=`${B}:${T}@`}const{port:F,method:Q}=U,z=`${U.protocol}//${w}${U.hostname}${F?`:${F}`:""}${L}`,I=Q==="GET"||Q==="HEAD"?void 0:U.body,R={body:I,headers:new Headers(U.headers),method:Q,credentials:Z};if(I)R.duplex="half";if(typeof AbortController!=="undefined")R.signal=G;if(M$.supported)R.keepalive=X;let E=m(()=>{},"removeSignalEventListener");const V=new Request(z,R),K=[fetch(V).then((B)=>{const T=B.headers,H={};for(let S of T.entries())H[S[0]]=S[1];if(B.body==null)return B.blob().then((S)=>({response:new e6.HttpResponse({headers:H,reason:B.statusText,statusCode:B.status,body:S})}));return{response:new e6.HttpResponse({headers:H,reason:B.statusText,statusCode:B.status,body:B.body})}}),U4(W)];if(G)K.push(new Promise((B,T)=>{const H=m(()=>{const A=new Error("Request aborted");A.name="AbortError",T(A)},"onAbort");if(typeof G.addEventListener==="function"){const A=G;A.addEventListener("abort",H,{once:!0}),E=m(()=>A.removeEventListener("abort",H),"removeSignalEventListener")}else G.onabort=H}));return Promise.race(K).finally(E)}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return W[U]=G,W})}httpHandlerConfigs(){return this.config??{}}};m(G4,"FetchHttpHandler");var Nw=G4,jw=E$(),Pw=m(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return W4($);return X4($)},"streamCollector");m(W4,"collectBlob");m(X4,"collectStream");m(Z4,"readToBase64")});var x1=M((w4)=>{Object.defineProperty(w4,"__esModule",{value:!0});w4.isReadableStream=void 0;var bw=($)=>{var U;return typeof ReadableStream==="function"&&(((U=$===null||$===void 0?void 0:$.constructor)===null||U===void 0?void 0:U.name)===ReadableStream.name||$ instanceof ReadableStream)};w4.isReadableStream=bw});var K4=M((J4)=>{Object.defineProperty(J4,"__esModule",{value:!0});J4.sdkStreamMixin=void 0;var Sw=Y4(),kw=E$(),Dw=I4(),hw=t(),Q4=x1(),z4="The stream has already been transformed.",xw=($)=>{var U,G;if(!R4($)&&!Q4.isReadableStream($)){const L=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${L}`)}let W=!1;const X=async()=>{if(W)throw new Error(z4);return W=!0,await Sw.streamCollector($)},Z=(L)=>{if(typeof L.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return L.stream()};return Object.assign($,{transformToByteArray:X,transformToString:async(L)=>{const Y=await X();if(L==="base64")return kw.toBase64(Y);else if(L==="hex")return Dw.toHex(Y);else if(L===void 0||L==="utf8"||L==="utf-8")return hw.toUtf8(Y);else if(typeof TextDecoder==="function")return new TextDecoder(L).decode(Y);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(z4);if(W=!0,R4($))return Z($);else if(Q4.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};J4.sdkStreamMixin=xw;var R4=($)=>typeof Blob==="function"&&$ instanceof Blob});var V4=M((T4)=>{Object.defineProperty(T4,"__esModule",{value:!0});T4.sdkStreamMixin=void 0;var vw=t6(),cw=D1(),N0=import.meta.require("stream"),yw=import.meta.require("util"),_w=K4(),M4="The stream has already been transformed.",uw=($)=>{var U,G;if(!($ instanceof N0.Readable))try{return _w.sdkStreamMixin($)}catch(Z){const L=((G=(U=$===null||$===void 0?void 0:$.__proto__)===null||U===void 0?void 0:U.constructor)===null||G===void 0?void 0:G.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${L}`)}let W=!1;const X=async()=>{if(W)throw new Error(M4);return W=!0,await vw.streamCollector($)};return Object.assign($,{transformToByteArray:X,transformToString:async(Z)=>{const L=await X();if(Z===void 0||Buffer.isEncoding(Z))return cw.fromArrayBuffer(L.buffer,L.byteOffset,L.byteLength).toString(Z);else return new yw.TextDecoder(Z).decode(L)},transformToWebStream:()=>{if(W)throw new Error(M4);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof N0.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return W=!0,N0.Readable.toWeb($)}})};T4.sdkStreamMixin=uw});var O4=M((H4)=>{async function dw($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(H4,"__esModule",{value:!0});H4.splitStream=void 0;H4.splitStream=dw});var N4=M((C4)=>{async function sw($){if(gw.isReadableStream($))return pw.splitStream($);const U=new f4.PassThrough,G=new f4.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(C4,"__esModule",{value:!0});C4.splitStream=void 0;var f4=import.meta.require("stream"),pw=O4(),gw=x1();C4.splitStream=sw});var b4=M((j4)=>{async function lw($,U){var G;let W=0;const X=[],Z=$.getReader();let L=!1;while(!L){const{done:F,value:Q}=await Z.read();if(Q)X.push(Q),W+=(G=Q===null||Q===void 0?void 0:Q.byteLength)!==null&&G!==void 0?G:0;if(W>=U)break;L=F}Z.releaseLock();const Y=new Uint8Array(Math.min(U,W));let w=0;for(let F of X){if(F.byteLength>Y.byteLength-w){Y.set(F.subarray(0,Y.byteLength-w),w);break}else Y.set(F,w);w+=F.length}return Y}Object.defineProperty(j4,"__esModule",{value:!0});j4.headStream=void 0;j4.headStream=lw});var h4=M((k4)=>{Object.defineProperty(k4,"__esModule",{value:!0});k4.headStream=void 0;var mw=import.meta.require("stream"),nw=b4(),iw=x1(),ow=($,U)=>{if(iw.isReadableStream($))return nw.headStream($,U);return new Promise((G,W)=>{const X=new S4;X.limit=U,$.pipe(X),$.on("error",(Z)=>{X.end(),W(Z)}),X.on("error",W),X.on("finish",function(){const Z=new Uint8Array(Buffer.concat(this.buffers));G(Z)})})};k4.headStream=ow;class S4 extends mw.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write($,U,G){var W;if(this.buffers.push($),this.bytesBuffered+=(W=$.byteLength)!==null&&W!==void 0?W:0,this.bytesBuffered>=this.limit){const X=this.bytesBuffered-this.limit,Z=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=Z.subarray(0,Z.byteLength-X),this.emit("finish")}G()}}});var u4=M((DR,F1)=>{var c4=function($,U="utf-8"){if(U==="base64")return x4.toBase64($);return v4.toUtf8($)},y4=function($,U){if(U==="base64")return P0.mutate(x4.fromBase64($));return P0.mutate(v4.fromUtf8($))},B$=Object.defineProperty,rw=Object.getOwnPropertyDescriptor,aw=Object.getOwnPropertyNames,tw=Object.prototype.hasOwnProperty,b0=($,U)=>B$($,"name",{value:U,configurable:!0}),ew=($,U)=>{for(var G in U)B$($,G,{get:U[G],enumerable:!0})},j0=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of aw(U))if(!tw.call($,X)&&X!==G)B$($,X,{get:()=>U[X],enumerable:!(W=rw(U,X))||W.enumerable})}return $},v1=($,U,G)=>(j0($,U,"default"),G&&j0(G,U,"default")),$F=($)=>j0(B$({},"__esModule",{value:!0}),$),w1={};ew(w1,{Uint8ArrayBlobAdapter:()=>P0});F1.exports=$F(w1);var x4=E$(),v4=t();b0(c4,"transformToString");b0(y4,"transformFromString");var _4=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return y4(U,G);default:throw new Error(`Unsupported conversion from ${typeof U} to Uint8ArrayBlobAdapter.`)}}static mutate(U){return Object.setPrototypeOf(U,$.prototype),U}transformToString(U="utf-8"){return c4(this,U)}};b0(_4,"Uint8ArrayBlobAdapter");var P0=_4;v1(w1,S6(),F1.exports);v1(w1,V4(),F1.exports);v1(w1,N4(),F1.exports);v1(w1,h4(),F1.exports);v1(w1,x1(),F1.exports)});var H1=M((hR,F8)=>{var $8=function($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),X=$.getUTCDate(),Z=$.getUTCHours(),L=$.getUTCMinutes(),Y=$.getUTCSeconds(),w=X<10?`0${X}`:`${X}`,F=Z<10?`0${Z}`:`${Z}`,Q=L<10?`0${L}`:`${L}`,z=Y<10?`0${Y}`:`${Y}`;return`${jF[W]}, ${w} ${d0[G]} ${U} ${F}:${Q}:${z} GMT`},A$=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})},p0=function($,U,G){let W,X,Z;if(typeof U==="undefined"&&typeof G==="undefined")W={},Z=$;else if(W=$,typeof U==="function")return X=U,Z=G,Y9(W,X,Z);else Z=U;for(let L of Object.keys(Z)){if(!Array.isArray(Z[L])){W[L]=Z[L];continue}Y8(W,null,Z,L)}return W},w8=function($,U,G){if(G<=0||!Number.isInteger(G))throw new Error("Invalid number of delimiters ("+G+") for splitEvery.");const W=$.split(U);if(G===1)return W;const X=[];let Z="";for(let L=0;L<W.length;L++){if(Z==="")Z=W[L];else Z+=U+W[L];if((L+1)%G===0)X.push(Z),Z=""}if(Z!=="")X.push(Z);return X},O$=Object.defineProperty,UF=Object.getOwnPropertyDescriptor,GF=Object.getOwnPropertyNames,WF=Object.prototype.hasOwnProperty,J=($,U)=>O$($,"name",{value:U,configurable:!0}),XF=($,U)=>{for(var G in U)O$($,G,{get:U[G],enumerable:!0})},ZF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of GF(U))if(!WF.call($,X)&&X!==G)O$($,X,{get:()=>U[X],enumerable:!(W=UF(U,X))||W.enumerable})}return $},LF=($)=>ZF(O$({},"__esModule",{value:!0}),$),p4={};XF(p4,{Client:()=>wF,Command:()=>n4,LazyJsonString:()=>X9,NoOpLogger:()=>YF,SENSITIVE_STRING:()=>zF,ServiceException:()=>mF,StringWrapper:()=>d1,_json:()=>c0,collectBody:()=>FF,convertMap:()=>Z9,createAggregatedClient:()=>RF,dateToUtcString:()=>$8,decorateServiceException:()=>G8,emitWarningIfUnsupportedVersion:()=>rF,expectBoolean:()=>JF,expectByte:()=>v0,expectFloat32:()=>V$,expectInt:()=>KF,expectInt32:()=>h0,expectLong:()=>_1,expectNonNull:()=>TF,expectNumber:()=>y1,expectObject:()=>o4,expectShort:()=>x0,expectString:()=>BF,expectUnion:()=>VF,extendedEncodeURIComponent:()=>A$,getArrayIfSingleItem:()=>W9,getDefaultClientConfiguration:()=>U9,getDefaultExtensionConfiguration:()=>X8,getValueFromTextNode:()=>Z8,handleFloat:()=>OF,limitedParseDouble:()=>u0,limitedParseFloat:()=>fF,limitedParseFloat32:()=>CF,loadConfigsForDefaultMode:()=>oF,logger:()=>u1,map:()=>p0,parseBoolean:()=>IF,parseEpochTimestamp:()=>cF,parseRfc3339DateTime:()=>bF,parseRfc3339DateTimeWithOffset:()=>kF,parseRfc7231DateTime:()=>vF,resolveDefaultRuntimeConfig:()=>G9,resolvedPath:()=>Q9,serializeDateTime:()=>R9,serializeFloat:()=>z9,splitEvery:()=>w8,strictParseByte:()=>e4,strictParseDouble:()=>_0,strictParseFloat:()=>HF,strictParseFloat32:()=>r4,strictParseInt:()=>qF,strictParseInt32:()=>NF,strictParseLong:()=>t4,strictParseShort:()=>T1,take:()=>L9,throwDefaultError:()=>W8,withBaseException:()=>nF});F8.exports=LF(p4);var g4=class ${trace(){}debug(){}info(){}warn(){}error(){}};J(g4,"NoOpLogger");var YF=g4,s4=z6(),l4=class ${constructor(U){this.middlewareStack=s4.constructStack(),this.config=U}send(U,G,W){const X=typeof G!=="function"?G:void 0,Z=typeof G==="function"?G:W,L=U.resolveMiddleware(this.middlewareStack,this.config,X);if(Z)L(U).then((Y)=>Z(null,Y.output),(Y)=>Z(Y)).catch(()=>{});else return L(U).then((Y)=>Y.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};J(l4,"Client");var wF=l4,S0=u4(),FF=J(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return S0.Uint8ArrayBlobAdapter.mutate($);if(!$)return S0.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const G=U.streamCollector($);return S0.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),D0=Z1(),m4=class ${constructor(){this.middlewareStack=s4.constructStack()}static classBuilder(){return new QF}resolveMiddlewareWithContext(U,G,W,{middlewareFn:X,clientName:Z,commandName:L,inputFilterSensitiveLog:Y,outputFilterSensitiveLog:w,smithyContext:F,additionalContext:Q,CommandCtor:z}){for(let K of X.bind(this)(z,U,G,W))this.middlewareStack.use(K);const I=U.concat(this.middlewareStack),{logger:R}=G,E={logger:R,clientName:Z,commandName:L,inputFilterSensitiveLog:Y,outputFilterSensitiveLog:w,[D0.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...Q},{requestHandler:V}=G;return I.resolve((K)=>V.handle(K.request,W||{}),E)}};J(m4,"Command");var n4=m4,i4=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(U)=>U,this._outputFilterSensitiveLog=(U)=>U,this._serializer=null,this._deserializer=null}init(U){this._init=U}ep(U){return this._ep=U,this}m(U){return this._middlewareFn=U,this}s(U,G,W={}){return this._smithyContext={service:U,operation:G,...W},this}c(U={}){return this._additionalContext=U,this}n(U,G){return this._clientName=U,this._commandName=G,this}f(U=(W)=>W,G=(W)=>W){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=G,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;const G=this;let W;return W=(U=class extends n4{constructor(...[X]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=X??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(X,Z,L){return this.resolveMiddlewareWithContext(X,Z,L,{CommandCtor:W,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},J(U,"CommandRef"),U)}};J(i4,"ClassBuilder");var QF=i4,zF="***SensitiveInformation***",RF=J(($,U)=>{for(let G of Object.keys($)){const W=$[G],X=J(async function(L,Y,w){const F=new W(L);if(typeof Y==="function")this.send(F,Y);else if(typeof w==="function"){if(typeof Y!=="object")throw new Error(`Expected http options but got ${typeof Y}`);this.send(F,Y||{},w)}else return this.send(F,Y)},"methodImpl"),Z=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[Z]=X}},"createAggregatedClient"),IF=J(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),JF=J(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)u1.warn(H$(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")u1.warn(H$(`Expected boolean, got ${typeof $}: ${$}`));if(U==="false")return!1;if(U==="true")return!0}if(typeof $==="boolean")return $;throw new TypeError(`Expected boolean, got ${typeof $}: ${$}`)},"expectBoolean"),y1=J(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))u1.warn(H$(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),EF=Math.ceil(340282346638528860000000000000000000000),V$=J(($)=>{const U=y1($);if(U!==void 0&&!Number.isNaN(U)&&U!==Infinity&&U!==(-Infinity)){if(Math.abs(U)>EF)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),_1=J(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),KF=_1,h0=J(($)=>y0($,32),"expectInt32"),x0=J(($)=>y0($,16),"expectShort"),v0=J(($)=>y0($,8),"expectByte"),y0=J(($,U)=>{const G=_1($);if(G!==void 0&&MF(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),MF=J(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),TF=J(($,U)=>{if($===null||$===void 0){if(U)throw new TypeError(`Expected a non-null value for ${U}`);throw new TypeError("Expected a non-null value")}return $},"expectNonNull"),o4=J(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;const U=Array.isArray($)?"array":typeof $;throw new TypeError(`Expected object, got ${U}: ${$}`)},"expectObject"),BF=J(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return u1.warn(H$(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),VF=J(($)=>{if($===null||$===void 0)return;const U=o4($),G=Object.entries(U).filter(([,W])=>W!=null).map(([W])=>W);if(G.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(G.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${G} were not null.`);return U},"expectUnion"),_0=J(($)=>{if(typeof $=="string")return y1(V1($));return y1($)},"strictParseDouble"),HF=_0,r4=J(($)=>{if(typeof $=="string")return V$(V1($));return V$($)},"strictParseFloat32"),AF=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,V1=J(($)=>{const U=$.match(AF);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),u0=J(($)=>{if(typeof $=="string")return a4($);return y1($)},"limitedParseDouble"),OF=u0,fF=u0,CF=J(($)=>{if(typeof $=="string")return a4($);return V$($)},"limitedParseFloat32"),a4=J(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),t4=J(($)=>{if(typeof $==="string")return _1(V1($));return _1($)},"strictParseLong"),qF=t4,NF=J(($)=>{if(typeof $==="string")return h0(V1($));return h0($)},"strictParseInt32"),T1=J(($)=>{if(typeof $==="string")return x0(V1($));return x0($)},"strictParseShort"),e4=J(($)=>{if(typeof $==="string")return v0(V1($));return v0($)},"strictParseByte"),H$=J(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),u1={warn:console.warn},jF=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],d0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];J($8,"dateToUtcString");var PF=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),bF=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=PF.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,L,Y,w,F]=U,Q=T1(B1(W)),z=s(X,"month",1,12),I=s(Z,"day",1,31);return c1(Q,z,I,{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:F})},"parseRfc3339DateTime"),SF=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),kF=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=SF.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,X,Z,L,Y,w,F,Q]=U,z=T1(B1(W)),I=s(X,"month",1,12),R=s(Z,"day",1,31),E=c1(z,I,R,{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:F});if(Q.toUpperCase()!="Z")E.setTime(E.getTime()-lF(Q));return E},"parseRfc3339DateTimeWithOffset"),DF=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),hF=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),xF=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),vF=J(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=DF.exec($);if(U){const[G,W,X,Z,L,Y,w,F]=U;return c1(T1(B1(Z)),k0(X),s(W,"day",1,31),{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:F})}if(U=hF.exec($),U){const[G,W,X,Z,L,Y,w,F]=U;return uF(c1(yF(Z),k0(X),s(W,"day",1,31),{hours:L,minutes:Y,seconds:w,fractionalMilliseconds:F}))}if(U=xF.exec($),U){const[G,W,X,Z,L,Y,w,F]=U;return c1(T1(B1(F)),k0(W),s(X.trimLeft(),"day",1,31),{hours:Z,minutes:L,seconds:Y,fractionalMilliseconds:w})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),cF=J(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=_0($);else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(U)||U===Infinity||U===(-Infinity))throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(U*1000))},"parseEpochTimestamp"),c1=J(($,U,G,W)=>{const X=U-1;return pF($,X,G),new Date(Date.UTC($,X,G,s(W.hours,"hour",0,23),s(W.minutes,"minute",0,59),s(W.seconds,"seconds",0,60),sF(W.fractionalMilliseconds)))},"buildDate"),yF=J(($)=>{const U=(new Date()).getUTCFullYear(),G=Math.floor(U/100)*100+T1(B1($));if(G<U)return G+100;return G},"parseTwoDigitYear"),_F=1576800000000,uF=J(($)=>{if($.getTime()-(new Date()).getTime()>_F)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),k0=J(($)=>{const U=d0.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),dF=[31,28,31,30,31,30,31,31,30,31,30,31],pF=J(($,U,G)=>{let W=dF[U];if(U===1&&gF($))W=29;if(G>W)throw new TypeError(`Invalid day for ${d0[U]} in ${$}: ${G}`)},"validateDayOfMonth"),gF=J(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),s=J(($,U,G,W)=>{const X=e4(B1($));if(X<G||X>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return X},"parseDateValue"),sF=J(($)=>{if($===null||$===void 0)return 0;return r4("0."+$)*1000},"parseMilliseconds"),lF=J(($)=>{const U=$[0];let G=1;if(U=="+")G=1;else if(U=="-")G=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const W=Number($.substring(1,3)),X=Number($.substring(4,6));return G*(W*60+X)*60*1000},"parseOffsetToMilliseconds"),B1=J(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),U8=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};J(U8,"ServiceException");var mF=U8,G8=J(($,U={})=>{Object.entries(U).filter(([,W])=>W!==void 0).forEach(([W,X])=>{if($[W]==null||$[W]==="")$[W]=X});const G=$.message||$.Message||"UnknownError";return $.message=G,delete $.Message,$},"decorateServiceException"),W8=J(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{const X=iF($),Z=X.httpStatusCode?X.httpStatusCode+"":void 0,L=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||Z||"UnknownError",$fault:"client",$metadata:X});throw G8(L,U)},"throwDefaultError"),nF=J(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{W8({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),iF=J(($)=>({httpStatusCode:$.statusCode,requestId:$.headers["x-amzn-requestid"]??$.headers["x-amzn-request-id"]??$.headers["x-amz-request-id"],extendedRequestId:$.headers["x-amz-id-2"],cfId:$.headers["x-amz-cf-id"]}),"deserializeMetadata"),oF=J(($)=>{switch($){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),d4=!1,rF=J(($)=>{if($&&!d4&&parseInt($.substring(1,$.indexOf(".")))<16)d4=!0},"emitWarningIfUnsupportedVersion"),aF=J(($)=>{const U=[];for(let G in D0.AlgorithmId){const W=D0.AlgorithmId[G];if($[W]===void 0)continue;U.push({algorithmId:()=>W,checksumConstructor:()=>$[W]})}return{_checksumAlgorithms:U,addChecksumAlgorithm(G){this._checksumAlgorithms.push(G)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),tF=J(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),eF=J(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),$9=J(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),X8=J(($)=>{return{...aF($),...eF($)}},"getDefaultExtensionConfiguration"),U9=X8,G9=J(($)=>{return{...tF($),...$9($)}},"resolveDefaultRuntimeConfig");J(A$,"extendedEncodeURIComponent");var W9=J(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),Z8=J(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=Z8($[G]);return $},"getValueFromTextNode"),d1=J(function(){const $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");d1.prototype=Object.create(String.prototype,{constructor:{value:d1,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(d1,String);var L8=class $ extends d1{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(U){if(U instanceof $)return U;else if(U instanceof String||typeof U==="string")return new $(U);return new $(JSON.stringify(U))}};J(L8,"LazyJsonString");var X9=L8;J(p0,"map");var Z9=J(($)=>{const U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),L9=J(($,U)=>{const G={};for(let W in U)Y8(G,$,U,W);return G},"take"),Y9=J(($,U,G)=>{return p0($,Object.entries(G).reduce((W,[X,Z])=>{if(Array.isArray(Z))W[X]=Z;else if(typeof Z==="function")W[X]=[U,Z()];else W[X]=[U,Z];return W},{}))},"mapWithFilter"),Y8=J(($,U,G,W)=>{if(U!==null){let L=G[W];if(typeof L==="function")L=[,L];const[Y=w9,w=F9,F=W]=L;if(typeof Y==="function"&&Y(U[F])||typeof Y!=="function"&&!!Y)$[W]=w(U[F]);return}let[X,Z]=G[W];if(typeof Z==="function"){let L;const Y=X===void 0&&(L=Z())!=null,w=typeof X==="function"&&!!X(void 0)||typeof X!=="function"&&!!X;if(Y)$[W]=L;else if(w)$[W]=Z()}else{const L=X===void 0&&Z!=null,Y=typeof X==="function"&&!!X(Z)||typeof X!=="function"&&!!X;if(L||Y)$[W]=Z}},"applyInstruction"),w9=J(($)=>$!=null,"nonNullish"),F9=J(($)=>$,"pass"),Q9=J(($,U,G,W,X,Z)=>{if(U!=null&&U[G]!==void 0){const L=W();if(L.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(X,Z?L.split("/").map((Y)=>A$(Y)).join("/"):A$(L))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),z9=J(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),R9=J(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),c0=J(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(c0);if(typeof $==="object"){const U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=c0($[G])}return U}return $},"_json");J(w8,"splitEvery")});var R8=M((Q8)=>{Object.defineProperty(Q8,"__esModule",{value:!0});Q8.isStreamingPayload=void 0;var I9=import.meta.require("stream"),J9=($)=>($===null||$===void 0?void 0:$.body)instanceof I9.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;Q8.isStreamingPayload=J9});var b8=M((cR,P8)=>{var{defineProperty:f$,getOwnPropertyDescriptor:K9,getOwnPropertyNames:M9}=Object,T9=Object.prototype.hasOwnProperty,P=($,U)=>f$($,"name",{value:U,configurable:!0}),B9=($,U)=>{for(var G in U)f$($,G,{get:U[G],enumerable:!0})},V9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of M9(U))if(!T9.call($,X)&&X!==G)f$($,X,{get:()=>U[X],enumerable:!(W=K9(U,X))||W.enumerable})}return $},H9=($)=>V9(f$({},"__esModule",{value:!0}),$),J8={};B9(J8,{AdaptiveRetryStrategy:()=>f9,CONFIG_MAX_ATTEMPTS:()=>s0,CONFIG_RETRY_MODE:()=>O8,ENV_MAX_ATTEMPTS:()=>g0,ENV_RETRY_MODE:()=>A8,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>C9,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>N9,StandardRetryStrategy:()=>V8,defaultDelayDecider:()=>K8,defaultRetryDecider:()=>M8,getOmitRetryHeadersPlugin:()=>j9,getRetryAfterHint:()=>j8,getRetryPlugin:()=>h9,omitRetryHeadersMiddleware:()=>f8,omitRetryHeadersMiddlewareOptions:()=>C8,resolveRetryConfig:()=>q9,retryMiddleware:()=>q8,retryMiddlewareOptions:()=>N8});P8.exports=H9(J8);var A1=l(),E8=E9(),C=L6(),A9=P(($,U)=>{const G=$,W=(U==null?void 0:U.noRetryIncrement)??C.NO_RETRY_INCREMENT,X=(U==null?void 0:U.retryCost)??C.RETRY_COST,Z=(U==null?void 0:U.timeoutRetryCost)??C.TIMEOUT_RETRY_COST;let L=$;const Y=P((z)=>z.name==="TimeoutError"?Z:X,"getCapacityAmount"),w=P((z)=>Y(z)<=L,"hasRetryTokens");return Object.freeze({hasRetryTokens:w,retrieveRetryTokens:P((z)=>{if(!w(z))throw new Error("No retry token available");const I=Y(z);return L-=I,I},"retrieveRetryTokens"),releaseRetryTokens:P((z)=>{L+=z??W,L=Math.min(L,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),K8=P(($,U)=>Math.floor(Math.min(C.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),e=z0(),M8=P(($)=>{if(!$)return!1;return e.isRetryableByTrait($)||e.isClockSkewError($)||e.isThrottlingError($)||e.isTransientError($)},"defaultRetryDecider"),T8=P(($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)},"asSdkError"),B8=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=C.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??M8,this.delayDecider=(G==null?void 0:G.delayDecider)??K8,this.retryQuota=(G==null?void 0:G.retryQuota)??A9(C.INITIAL_RETRY_TOKENS)}shouldRetry(U,G,W){return G<W&&this.retryDecider(U)&&this.retryQuota.hasRetryTokens(U)}async getMaxAttempts(){let U;try{U=await this.maxAttemptsProvider()}catch(G){U=C.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,W){let X,Z=0,L=0;const Y=await this.getMaxAttempts(),{request:w}=G;if(A1.HttpRequest.isInstance(w))w.headers[C.INVOCATION_ID_HEADER]=E8.v4();while(!0)try{if(A1.HttpRequest.isInstance(w))w.headers[C.REQUEST_HEADER]=`attempt=${Z+1}; max=${Y}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();const{response:F,output:Q}=await U(G);if(W==null?void 0:W.afterRequest)W.afterRequest(F);return this.retryQuota.releaseRetryTokens(X),Q.$metadata.attempts=Z+1,Q.$metadata.totalRetryDelay=L,{response:F,output:Q}}catch(F){const Q=T8(F);if(Z++,this.shouldRetry(Q,Z,Y)){X=this.retryQuota.retrieveRetryTokens(Q);const z=this.delayDecider(e.isThrottlingError(Q)?C.THROTTLING_RETRY_DELAY_BASE:C.DEFAULT_RETRY_DELAY_BASE,Z),I=O9(Q.$response),R=Math.max(I||0,z);L+=R,await new Promise((E)=>setTimeout(E,R));continue}if(!Q.$metadata)Q.$metadata={};throw Q.$metadata.attempts=Z,Q.$metadata.totalRetryDelay=L,Q}}};P(B8,"StandardRetryStrategy");var V8=B8,O9=P(($)=>{if(!A1.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return W*1000;return new Date(G).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),H8=class $ extends V8{constructor(U,G){const{rateLimiter:W,...X}=G??{};super(U,X);this.rateLimiter=W??new C.DefaultRateLimiter,this.mode=C.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};P(H8,"AdaptiveRetryStrategy");var f9=H8,I8=j1(),g0="AWS_MAX_ATTEMPTS",s0="max_attempts",C9={environmentVariableSelector:($)=>{const U=$[g0];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${g0} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[s0];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${s0} mast be a number, got "${U}"`);return G},default:C.DEFAULT_MAX_ATTEMPTS},q9=P(($)=>{const{retryStrategy:U}=$,G=I8.normalizeProvider($.maxAttempts??C.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await I8.normalizeProvider($.retryMode)()===C.RETRY_MODES.ADAPTIVE)return new C.AdaptiveRetryStrategy(G);return new C.StandardRetryStrategy(G)}}},"resolveRetryConfig"),A8="AWS_RETRY_MODE",O8="retry_mode",N9={environmentVariableSelector:($)=>$[A8],configFileSelector:($)=>$[O8],default:C.DEFAULT_RETRY_MODE},f8=P(()=>($)=>async(U)=>{const{request:G}=U;if(A1.HttpRequest.isInstance(G))delete G.headers[C.INVOCATION_ID_HEADER],delete G.headers[C.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),C8={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},j9=P(($)=>({applyToStack:(U)=>{U.addRelativeTo(f8(),C8)}}),"getOmitRetryHeadersPlugin"),P9=H1(),b9=R8(),q8=P(($)=>(U,G)=>async(W)=>{var X;let Z=await $.retryStrategy();const L=await $.maxAttempts();if(S9(Z)){Z=Z;let Y=await Z.acquireInitialRetryToken(G.partition_id),w=new Error,F=0,Q=0;const{request:z}=W,I=A1.HttpRequest.isInstance(z);if(I)z.headers[C.INVOCATION_ID_HEADER]=E8.v4();while(!0)try{if(I)z.headers[C.REQUEST_HEADER]=`attempt=${F+1}; max=${L}`;const{response:R,output:E}=await U(W);return Z.recordSuccess(Y),E.$metadata.attempts=F+1,E.$metadata.totalRetryDelay=Q,{response:R,output:E}}catch(R){const E=k9(R);if(w=T8(R),I&&b9.isStreamingPayload(z))throw(X=G.logger instanceof P9.NoOpLogger?console:G.logger)==null||X.warn("An error was encountered in a non-retryable streaming request."),w;try{Y=await Z.refreshRetryTokenForRetry(Y,E)}catch(K){if(!w.$metadata)w.$metadata={};throw w.$metadata.attempts=F+1,w.$metadata.totalRetryDelay=Q,w}F=Y.getRetryCount();const V=Y.getRetryDelay();Q+=V,await new Promise((K)=>setTimeout(K,V))}}else{if(Z=Z,Z==null?void 0:Z.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",Z.mode]];return Z.retry(U,W)}},"retryMiddleware"),S9=P(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),k9=P(($)=>{const U={error:$,errorType:D9($)},G=j8($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),D9=P(($)=>{if(e.isThrottlingError($))return"THROTTLING";if(e.isTransientError($))return"TRANSIENT";if(e.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),N8={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},h9=P(($)=>({applyToStack:(U)=>{U.add(q8($),N8)}}),"getRetryPlugin"),j8=P(($)=>{if(!A1.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)},"getRetryAfterHint")});var m0=M((yR,o8)=>{var D8=function($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U},l8=function($,U){return new n8($,U)},i8=function($,U,G,W,X){return f(async function*Z(L,Y,...w){let F=L.startingToken||void 0,Q=!0,z;while(Q){if(Y[G]=F,X)Y[X]=Y[X]??L.pageSize;if(L.client instanceof $)z=await XQ(U,L.client,Y,...w);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield z;const I=F;F=ZQ(z,W),Q=!!(F&&(!L.stopOnSameToken||F!==I))}return},"paginateOperation")},q$=Object.defineProperty,x9=Object.getOwnPropertyDescriptor,v9=Object.getOwnPropertyNames,c9=Object.prototype.hasOwnProperty,f=($,U)=>q$($,"name",{value:U,configurable:!0}),y9=($,U)=>{for(var G in U)q$($,G,{get:U[G],enumerable:!0})},_9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of v9(U))if(!c9.call($,X)&&X!==G)q$($,X,{get:()=>U[X],enumerable:!(W=x9(U,X))||W.enumerable})}return $},u9=($)=>_9(q$({},"__esModule",{value:!0}),$),S8={};y9(S8,{DefaultIdentityProviderConfig:()=>o9,EXPIRATION_MS:()=>g8,HttpApiKeyAuthSigner:()=>r9,HttpBearerAuthSigner:()=>a9,NoAuthSigner:()=>t9,RequestBuilder:()=>n8,createIsIdentityExpiredFunction:()=>p8,createPaginator:()=>i8,doesIdentityRequireRefresh:()=>s8,getHttpAuthSchemeEndpointRuleSetPlugin:()=>p9,getHttpAuthSchemePlugin:()=>s9,getHttpSigningPlugin:()=>i9,getSmithyContext:()=>UQ,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>h8,httpAuthSchemeMiddleware:()=>l0,httpAuthSchemeMiddlewareOptions:()=>x8,httpSigningMiddleware:()=>v8,httpSigningMiddlewareOptions:()=>c8,isIdentityExpired:()=>e9,memoizeIdentityProvider:()=>$Q,normalizeProvider:()=>GQ,requestBuilder:()=>l8});o8.exports=u9(S8);var k8=j1();f(D8,"convertHttpAuthSchemesToMap");var l0=f(($,U)=>(G,W)=>async(X)=>{var Z;const L=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,X.input)),Y=D8($.httpAuthSchemes),w=k8.getSmithyContext(W),F=[];for(let Q of L){const z=Y.get(Q.schemeId);if(!z){F.push(`HttpAuthScheme \`${Q.schemeId}\` was not enabled for this service.`);continue}const I=z.identityProvider(await U.identityProviderConfigProvider($));if(!I){F.push(`HttpAuthScheme \`${Q.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:R={},signingProperties:E={}}=((Z=Q.propertiesExtractor)==null?void 0:Z.call(Q,$,W))||{};Q.identityProperties=Object.assign(Q.identityProperties||{},R),Q.signingProperties=Object.assign(Q.signingProperties||{},E),w.selectedHttpAuthScheme={httpAuthOption:Q,identity:await I(Q.identityProperties),signer:z.signer};break}if(!w.selectedHttpAuthScheme)throw new Error(F.join("\n"));return G(X)},"httpAuthSchemeMiddleware"),d9=DG(),h8={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:d9.endpointMiddlewareOptions.name},p9=f(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(l0($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),h8)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),g9=F0(),x8={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:g9.serializerMiddlewareOption.name},s9=f(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(l0($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),x8)}}),"getHttpAuthSchemePlugin"),N$=l(),l9=f(($)=>(U)=>{throw U},"defaultErrorHandler"),m9=f(($,U)=>{},"defaultSuccessHandler"),v8=f(($)=>(U,G)=>async(W)=>{if(!N$.HttpRequest.isInstance(W.request))return U(W);const Z=k8.getSmithyContext(G).selectedHttpAuthScheme;if(!Z)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:L={}},identity:Y,signer:w}=Z,F=await U({...W,request:await w.sign(W.request,Y,L)}).catch((w.errorHandler||l9)(L));return(w.successHandler||m9)(F.response,L),F},"httpSigningMiddleware"),n9=b8(),c8={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:n9.retryMiddlewareOptions.name},i9=f(($)=>({applyToStack:(U)=>{U.addRelativeTo(v8($),c8)}}),"getHttpSigningPlugin"),y8=class ${constructor(U){this.authSchemes=new Map;for(let[G,W]of Object.entries(U))if(W!==void 0)this.authSchemes.set(G,W)}getIdentityProvider(U){return this.authSchemes.get(U)}};f(y8,"DefaultIdentityProviderConfig");var o9=y8,C$=Z1(),_8=class ${async sign(U,G,W){if(!W)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!W.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!W.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!G.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const X=N$.HttpRequest.clone(U);if(W.in===C$.HttpApiKeyAuthLocation.QUERY)X.query[W.name]=G.apiKey;else if(W.in===C$.HttpApiKeyAuthLocation.HEADER)X.headers[W.name]=W.scheme?`${W.scheme} ${G.apiKey}`:G.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+W.in+"`");return X}};f(_8,"HttpApiKeyAuthSigner");var r9=_8,u8=class ${async sign(U,G,W){const X=N$.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return X.headers.Authorization=`Bearer ${G.token}`,X}};f(u8,"HttpBearerAuthSigner");var a9=u8,d8=class ${async sign(U,G,W){return U}};f(d8,"NoAuthSigner");var t9=d8,p8=f(($)=>(U)=>s8(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),g8=300000,e9=p8(g8),s8=f(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),$Q=f(($,U,G)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let X,Z,L,Y=!1;const w=f(async(F)=>{if(!Z)Z=W(F);try{X=await Z,L=!0,Y=!1}finally{Z=void 0}return X},"coalesceProvider");if(U===void 0)return async(F)=>{if(!L||(F==null?void 0:F.forceRefresh))X=await w(F);return X};return async(F)=>{if(!L||(F==null?void 0:F.forceRefresh))X=await w(F);if(Y)return X;if(!G(X))return Y=!0,X;if(U(X))return await w(F),X;return X}},"memoizeIdentityProvider"),UQ=f(($)=>$[C$.SMITHY_CONTEXT_KEY]||($[C$.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),GQ=f(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),WQ=H1();f(l8,"requestBuilder");var m8=class ${constructor(U,G){this.input=U,this.context=G,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:U,protocol:G="https",port:W,path:X}=await this.context.endpoint();this.path=X;for(let Z of this.resolvePathStack)Z(this.path);return new N$.HttpRequest({protocol:G,hostname:this.hostname||U,port:W,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(U){return this.hostname=U,this}bp(U){return this.resolvePathStack.push((G)=>{this.path=`${(G==null?void 0:G.endsWith("/"))?G.slice(0,-1):G||""}`+U}),this}p(U,G,W,X){return this.resolvePathStack.push((Z)=>{this.path=WQ.resolvedPath(Z,this.input,U,G,W,X)}),this}h(U){return this.headers=U,this}q(U){return this.query=U,this}b(U){return this.body=U,this}m(U){return this.method=U,this}};f(m8,"RequestBuilder");var n8=m8,XQ=f(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");f(i8,"createPaginator");var ZQ=f(($,U)=>{let G=$;const W=U.split(".");for(let X of W){if(!G||typeof G!=="object")return;G=G[X]}return G},"get")});var mW=M((WT,lW)=>{var{defineProperty:g$,getOwnPropertyDescriptor:_Q,getOwnPropertyNames:uQ}=Object,dQ=Object.prototype.hasOwnProperty,pQ=($,U)=>g$($,"name",{value:U,configurable:!0}),gQ=($,U)=>{for(var G in U)g$($,G,{get:U[G],enumerable:!0})},sQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of uQ(U))if(!dQ.call($,X)&&X!==G)g$($,X,{get:()=>U[X],enumerable:!(W=_Q(U,X))||W.enumerable})}return $},lQ=($)=>sQ(g$({},"__esModule",{value:!0}),$),sW={};gQ(sW,{emitWarningIfUnsupportedVersion:()=>mQ});lW.exports=lQ(sW);var gW=!1,mQ=pQ(($)=>{if($&&!gW&&parseInt($.substring(1,$.indexOf(".")))<18)gW=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
4
|
+
no longer support Node.js 16.x on January 6, 2025.
|
|
5
|
+
|
|
6
|
+
To continue receiving updates to AWS services, bug fixes, and security
|
|
7
|
+
updates please upgrade to a supported Node.js LTS version.
|
|
8
|
+
|
|
9
|
+
More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var RX=M((XT,zX)=>{var TU=function($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break},i$=Object.defineProperty,nQ=Object.getOwnPropertyDescriptor,iQ=Object.getOwnPropertyNames,oQ=Object.prototype.hasOwnProperty,b=($,U)=>i$($,"name",{value:U,configurable:!0}),rQ=($,U)=>{for(var G in U)i$($,G,{get:U[G],enumerable:!0})},aQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of iQ(U))if(!oQ.call($,X)&&X!==G)i$($,X,{get:()=>U[X],enumerable:!(W=nQ(U,X))||W.enumerable})}return $},tQ=($)=>aQ(i$({},"__esModule",{value:!0}),$),aW={};rQ(aW,{SignatureV4:()=>f7,clearCredentialCache:()=>E7,createScope:()=>m$,getCanonicalHeaders:()=>MU,getCanonicalQuery:()=>ZX,getPayloadHash:()=>n$,getSigningKey:()=>XX,moveHeadersToQuery:()=>FX,prepareRequest:()=>BU});zX.exports=tQ(aW);var nW=j1(),JU=t(),eQ="X-Amz-Algorithm",$7="X-Amz-Credential",tW="X-Amz-Date",U7="X-Amz-SignedHeaders",G7="X-Amz-Expires",eW="X-Amz-Signature",$X="X-Amz-Security-Token",UX="authorization",GX=tW.toLowerCase(),W7="date",X7=[UX,GX,W7],Z7=eW.toLowerCase(),KU="x-amz-content-sha256",L7=$X.toLowerCase(),Y7={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},w7=/^proxy-/,F7=/^sec-/,EU="AWS4-HMAC-SHA256",Q7="AWS4-HMAC-SHA256-PAYLOAD",z7="UNSIGNED-PAYLOAD",R7=50,WX="aws4_request",I7=604800,G1=I4(),J7=t(),N1={},l$=[],m$=b(($,U,G)=>`${$}/${U}/${G}/${WX}`,"createScope"),XX=b(async($,U,G,W,X)=>{const Z=await iW($,U.secretAccessKey,U.accessKeyId),L=`${G}:${W}:${X}:${G1.toHex(Z)}:${U.sessionToken}`;if(L in N1)return N1[L];l$.push(L);while(l$.length>R7)delete N1[l$.shift()];let Y=`AWS4${U.secretAccessKey}`;for(let w of[G,W,X,WX])Y=await iW($,Y,w);return N1[L]=Y},"getSigningKey"),E7=b(()=>{l$.length=0,Object.keys(N1).forEach(($)=>{delete N1[$]})},"clearCredentialCache"),iW=b(($,U,G)=>{const W=new $(U);return W.update(J7.toUint8Array(G)),W.digest()},"hmac"),MU=b(({headers:$},U,G)=>{const W={};for(let X of Object.keys($).sort()){if($[X]==null)continue;const Z=X.toLowerCase();if(Z in Y7||(U==null?void 0:U.has(Z))||w7.test(Z)||F7.test(Z)){if(!G||G&&!G.has(Z))continue}W[Z]=$[X].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),m1=k6(),ZX=b(({query:$={}})=>{const U=[],G={};for(let W of Object.keys($).sort()){if(W.toLowerCase()===Z7)continue;U.push(W);const X=$[W];if(typeof X==="string")G[W]=`${m1.escapeUri(W)}=${m1.escapeUri(X)}`;else if(Array.isArray(X))G[W]=X.slice(0).reduce((Z,L)=>Z.concat([`${m1.escapeUri(W)}=${m1.escapeUri(L)}`]),[]).sort().join("&")}return U.map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),K7=M0(),M7=t(),n$=b(async({headers:$,body:U},G)=>{for(let W of Object.keys($))if(W.toLowerCase()===KU)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||K7.isArrayBuffer(U)){const W=new G;return W.update(M7.toUint8Array(U)),G1.toHex(await W.digest())}return z7},"getPayloadHash"),oW=t(),LX=class ${format(U){const G=[];for(let Z of Object.keys(U)){const L=oW.fromUtf8(Z);G.push(Uint8Array.from([L.byteLength]),L,this.formatHeaderValue(U[Z]))}const W=new Uint8Array(G.reduce((Z,L)=>Z+L.byteLength,0));let X=0;for(let Z of G)W.set(Z,X),X+=Z.byteLength;return W}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":const G=new DataView(new ArrayBuffer(3));return G.setUint8(0,3),G.setInt16(1,U.value,!1),new Uint8Array(G.buffer);case"integer":const W=new DataView(new ArrayBuffer(5));return W.setUint8(0,4),W.setInt32(1,U.value,!1),new Uint8Array(W.buffer);case"long":const X=new Uint8Array(9);return X[0]=5,X.set(U.value.bytes,1),X;case"binary":const Z=new DataView(new ArrayBuffer(3+U.value.byteLength));Z.setUint8(0,6),Z.setUint16(1,U.value.byteLength,!1);const L=new Uint8Array(Z.buffer);return L.set(U.value,3),L;case"string":const Y=oW.fromUtf8(U.value),w=new DataView(new ArrayBuffer(3+Y.byteLength));w.setUint8(0,7),w.setUint16(1,Y.byteLength,!1);const F=new Uint8Array(w.buffer);return F.set(Y,3),F;case"timestamp":const Q=new Uint8Array(9);return Q[0]=8,Q.set(V7.fromNumber(U.value.valueOf()).bytes,1),Q;case"uuid":if(!B7.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const z=new Uint8Array(17);return z[0]=9,z.set(G1.fromHex(U.value.replace(/\-/g,"")),1),z}}};b(LX,"HeaderFormatter");var T7=LX,B7=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,YX=class ${constructor(U){if(this.bytes=U,U.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(U){if(U>9223372036854776000||U<-9223372036854776000)throw new Error(`${U} is too large (or, if negative, too small) to represent as an Int64`);const G=new Uint8Array(8);for(let W=7,X=Math.abs(Math.round(U));W>-1&&X>0;W--,X/=256)G[W]=X;if(U<0)TU(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)TU(U);return parseInt(G1.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};b(YX,"Int64");var V7=YX;b(TU,"negate");var H7=b(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),wX=l(),FX=b(($,U={})=>{var G;const{headers:W,query:X={}}=wX.HttpRequest.clone($);for(let Z of Object.keys(W)){const L=Z.toLowerCase();if(L.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(L)))X[Z]=W[Z],delete W[Z]}return{...$,headers:W,query:X}},"moveHeadersToQuery"),BU=b(($)=>{$=wX.HttpRequest.clone($);for(let U of Object.keys($.headers))if(X7.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),A7=b(($)=>O7($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),O7=b(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),QX=class ${constructor({applyChecksum:U,credentials:G,region:W,service:X,sha256:Z,uriEscapePath:L=!0}){this.headerFormatter=new T7,this.service=X,this.sha256=Z,this.uriEscapePath=L,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=nW.normalizeProvider(W),this.credentialProvider=nW.normalizeProvider(G)}async presign(U,G={}){const{signingDate:W=new Date,expiresIn:X=3600,unsignableHeaders:Z,unhoistableHeaders:L,signableHeaders:Y,signingRegion:w,signingService:F}=G,Q=await this.credentialProvider();this.validateResolvedCredentials(Q);const z=w??await this.regionProvider(),{longDate:I,shortDate:R}=s$(W);if(X>I7)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const E=m$(R,z,F??this.service),V=FX(BU(U),{unhoistableHeaders:L});if(Q.sessionToken)V.query[$X]=Q.sessionToken;V.query[eQ]=EU,V.query[$7]=`${Q.accessKeyId}/${E}`,V.query[tW]=I,V.query[G7]=X.toString(10);const K=MU(V,Z,Y);return V.query[U7]=rW(K),V.query[eW]=await this.getSignature(I,E,this.getSigningKey(Q,z,R,F),this.createCanonicalRequest(V,K,await n$(U,this.sha256))),V}async sign(U,G){if(typeof U==="string")return this.signString(U,G);else if(U.headers&&U.payload)return this.signEvent(U,G);else if(U.message)return this.signMessage(U,G);else return this.signRequest(U,G)}async signEvent({headers:U,payload:G},{signingDate:W=new Date,priorSignature:X,signingRegion:Z,signingService:L}){const Y=Z??await this.regionProvider(),{shortDate:w,longDate:F}=s$(W),Q=m$(w,Y,L??this.service),z=await n$({headers:{},body:G},this.sha256),I=new this.sha256;I.update(U);const R=G1.toHex(await I.digest()),E=[Q7,F,Q,X,R,z].join("\n");return this.signString(E,{signingDate:W,signingRegion:Y,signingService:L})}async signMessage(U,{signingDate:G=new Date,signingRegion:W,signingService:X}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:W,signingService:X,priorSignature:U.priorSignature}).then((L)=>{return{message:U.message,signature:L}})}async signString(U,{signingDate:G=new Date,signingRegion:W,signingService:X}={}){const Z=await this.credentialProvider();this.validateResolvedCredentials(Z);const L=W??await this.regionProvider(),{shortDate:Y}=s$(G),w=new this.sha256(await this.getSigningKey(Z,L,Y,X));return w.update(JU.toUint8Array(U)),G1.toHex(await w.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:X,signingRegion:Z,signingService:L}={}){const Y=await this.credentialProvider();this.validateResolvedCredentials(Y);const w=Z??await this.regionProvider(),F=BU(U),{longDate:Q,shortDate:z}=s$(G),I=m$(z,w,L??this.service);if(F.headers[GX]=Q,Y.sessionToken)F.headers[L7]=Y.sessionToken;const R=await n$(F,this.sha256);if(!H7(KU,F.headers)&&this.applyChecksum)F.headers[KU]=R;const E=MU(F,X,W),V=await this.getSignature(Q,I,this.getSigningKey(Y,w,z,L),this.createCanonicalRequest(F,E,R));return F.headers[UX]=`${EU} Credential=${Y.accessKeyId}/${I}, SignedHeaders=${rW(E)}, Signature=${V}`,F}createCanonicalRequest(U,G,W){const X=Object.keys(G).sort();return`${U.method}
|
|
10
|
+
${this.getCanonicalPath(U)}
|
|
11
|
+
${ZX(U)}
|
|
12
|
+
${X.map((Z)=>`${Z}:${G[Z]}`).join("\n")}
|
|
13
|
+
|
|
14
|
+
${X.join(";")}
|
|
15
|
+
${W}`}async createStringToSign(U,G,W){const X=new this.sha256;X.update(JU.toUint8Array(W));const Z=await X.digest();return`${EU}
|
|
16
|
+
${U}
|
|
17
|
+
${G}
|
|
18
|
+
${G1.toHex(Z)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const G=[];for(let Z of U.split("/")){if((Z==null?void 0:Z.length)===0)continue;if(Z===".")continue;if(Z==="..")G.pop();else G.push(Z)}const W=`${(U==null?void 0:U.startsWith("/"))?"/":""}${G.join("/")}${G.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return m1.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,G,W,X){const Z=await this.createStringToSign(U,G,X),L=new this.sha256(await W);return L.update(JU.toUint8Array(Z)),G1.toHex(await L.digest())}getSigningKey(U,G,W,X){return XX(this.sha256,U,W,G,X||this.service)}validateResolvedCredentials(U){if(typeof U!=="object"||typeof U.accessKeyId!=="string"||typeof U.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};b(QX,"SignatureV4");var f7=QX,s$=b(($)=>{const U=A7($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),rW=b(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var AX=M((ZT,HX)=>{var{defineProperty:o$,getOwnPropertyDescriptor:C7,getOwnPropertyNames:q7}=Object,N7=Object.prototype.hasOwnProperty,D=($,U)=>o$($,"name",{value:U,configurable:!0}),j7=($,U)=>{for(var G in U)o$($,G,{get:U[G],enumerable:!0})},P7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of q7(U))if(!N7.call($,X)&&X!==G)o$($,X,{get:()=>U[X],enumerable:!(W=C7(U,X))||W.enumerable})}return $},b7=($)=>P7(o$({},"__esModule",{value:!0}),$),MX={};j7(MX,{AWSSDKSigV4Signer:()=>h7,AwsSdkSigV4ASigner:()=>v7,AwsSdkSigV4Signer:()=>AU,NODE_SIGV4A_CONFIG_OPTIONS:()=>_7,resolveAWSSDKSigV4Config:()=>u7,resolveAwsSdkSigV4AConfig:()=>y7,resolveAwsSdkSigV4Config:()=>VX,validateSigningProperties:()=>HU});HX.exports=b7(MX);var S7=l(),k7=l(),IX=D(($)=>{var U,G;return k7.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),VU=D(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),D7=D(($,U)=>Math.abs(VU(U).getTime()-$)>=300000,"isClockSkewed"),JX=D(($,U)=>{const G=Date.parse($);if(D7(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),n1=D(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),HU=D(async($)=>{var U,G,W;const X=n1("context",$.context),Z=n1("config",$.config),L=(W=(G=(U=X.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:W[0],w=await n1("signer",Z.signer)(L),F=$==null?void 0:$.signingRegion,Q=$==null?void 0:$.signingRegionSet,z=$==null?void 0:$.signingName;return{config:Z,signer:w,signingRegion:F,signingRegionSet:Q,signingName:z}},"validateSigningProperties"),TX=class ${async sign(U,G,W){var X;if(!S7.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const Z=await HU(W),{config:L,signer:Y}=Z;let{signingRegion:w,signingName:F}=Z;const Q=W.context;if(((X=Q==null?void 0:Q.authSchemes)==null?void 0:X.length)??0>1){const[I,R]=Q.authSchemes;if((I==null?void 0:I.name)==="sigv4a"&&(R==null?void 0:R.name)==="sigv4")w=(R==null?void 0:R.signingRegion)??w,F=(R==null?void 0:R.signingName)??F}return await Y.sign(U,{signingDate:VU(L.systemClockOffset),signingRegion:w,signingService:F})}errorHandler(U){return(G)=>{const W=G.ServerTime??IX(G.$response);if(W){const X=n1("config",U.config),Z=X.systemClockOffset;if(X.systemClockOffset=JX(W,X.systemClockOffset),X.systemClockOffset!==Z&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const W=IX(U);if(W){const X=n1("config",G.config);X.systemClockOffset=JX(W,X.systemClockOffset)}}};D(TX,"AwsSdkSigV4Signer");var AU=TX,h7=AU,x7=l(),BX=class $ extends AU{async sign(U,G,W){var X;if(!x7.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:Z,signer:L,signingRegion:Y,signingRegionSet:w,signingName:F}=await HU(W),z=(await((X=Z.sigv4aSigningRegionSet)==null?void 0:X.call(Z))??w??[Y]).join(",");return await L.sign(U,{signingDate:VU(Z.systemClockOffset),signingRegion:z,signingService:F})}};D(BX,"AwsSdkSigV4ASigner");var v7=BX,c7=m0(),EX=L0(),y7=D(($)=>{return $.sigv4aSigningRegionSet=c7.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),_7={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new EX.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector($){if($.sigv4a_signing_region_set)return($.sigv4a_signing_region_set??"").split(",").map((U)=>U.trim());throw new EX.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},I1=m0(),KX=RX(),VX=D(($)=>{let U;if($.credentials)U=I1.memoizeIdentityProvider($.credentials,I1.isIdentityExpired,I1.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=I1.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=D(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:G=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:X}=$;let Z;if($.signer)Z=I1.normalizeProvider($.signer);else if($.regionInfoProvider)Z=D(()=>I1.normalizeProvider($.region)().then(async(L)=>[await $.regionInfoProvider(L,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},L]).then(([L,Y])=>{const{signingRegion:w,signingService:F}=L;$.signingRegion=$.signingRegion||w||Y,$.signingName=$.signingName||F||$.serviceId;const Q={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||KX.SignatureV4)(Q)}),"signer");else Z=D(async(L)=>{L=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await I1.normalizeProvider($.region)(),properties:{}},L);const{signingRegion:Y,signingName:w}=L;$.signingRegion=$.signingRegion||Y,$.signingName=$.signingName||w||$.serviceId;const F={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:X,uriEscapePath:G};return new($.signerConstructor||KX.SignatureV4)(F)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:Z}},"resolveAwsSdkSigV4Config"),u7=VX});var r$=M((l7)=>{var d7=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",OX="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+d7+"]*",p7=new RegExp("^"+OX+"$"),g7=function($,U){const G=[];let W=U.exec($);while(W){const X=[];X.startIndex=U.lastIndex-W[0].length;const Z=W.length;for(let L=0;L<Z;L++)X.push(W[L]);G.push(X),W=U.exec($)}return G},s7=function($){const U=p7.exec($);return!(U===null||typeof U==="undefined")};l7.isExist=function($){return typeof $!=="undefined"};l7.isEmptyObject=function($){return Object.keys($).length===0};l7.merge=function($,U,G){if(U){const W=Object.keys(U),X=W.length;for(let Z=0;Z<X;Z++)if(G==="strict")$[W[Z]]=[U[W[Z]]];else $[W[Z]]=U[W[Z]]}};l7.getValue=function($){if(l7.isExist($))return $;else return""};l7.isName=s7;l7.getAllMatches=g7;l7.nameRegexp=OX});var fU=M((Y5)=>{var CX=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},qX=function($,U){const G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const W=$.substr(G,U-G);if(U>5&&W==="xml")return j("InvalidXml","XML declaration allowed only at the start of the document.",k($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U},NX=function($,U){if($.length>U+5&&$[U+1]==="-"&&$[U+2]==="-"){for(U+=3;U<$.length;U++)if($[U]==="-"&&$[U+1]==="-"&&$[U+2]===">"){U+=2;break}}else if($.length>U+8&&$[U+1]==="D"&&$[U+2]==="O"&&$[U+3]==="C"&&$[U+4]==="T"&&$[U+5]==="Y"&&$[U+6]==="P"&&$[U+7]==="E"){let G=1;for(U+=8;U<$.length;U++)if($[U]==="<")G++;else if($[U]===">"){if(G--,G===0)break}}else if($.length>U+9&&$[U+1]==="["&&$[U+2]==="C"&&$[U+3]==="D"&&$[U+4]==="A"&&$[U+5]==="T"&&$[U+6]==="A"&&$[U+7]==="["){for(U+=8;U<$.length;U++)if($[U]==="]"&&$[U+1]==="]"&&$[U+2]===">"){U+=2;break}}return U},U5=function($,U){let G="",W="",X=!1;for(;U<$.length;U++){if($[U]===e7||$[U]===$5)if(W==="")W=$[U];else if(W!==$[U]);else W="";else if($[U]===">"){if(W===""){X=!0;break}}G+=$[U]}if(W!=="")return!1;return{value:G,index:U,tagClosed:X}},jX=function($,U){const G=OU.getAllMatches($,G5),W={};for(let X=0;X<G.length;X++){if(G[X][1].length===0)return j("InvalidAttr","Attribute '"+G[X][2]+"' has no space in starting.",i1(G[X]));else if(G[X][3]!==void 0&&G[X][4]===void 0)return j("InvalidAttr","Attribute '"+G[X][2]+"' is without value.",i1(G[X]));else if(G[X][3]===void 0&&!U.allowBooleanAttributes)return j("InvalidAttr","boolean attribute '"+G[X][2]+"' is not allowed.",i1(G[X]));const Z=G[X][2];if(!Z5(Z))return j("InvalidAttr","Attribute '"+Z+"' is an invalid name.",i1(G[X]));if(!W.hasOwnProperty(Z))W[Z]=1;else return j("InvalidAttr","Attribute '"+Z+"' is repeated.",i1(G[X]))}return!0},W5=function($,U){let G=/\d/;if($[U]==="x")U++,G=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(G))break}return-1},X5=function($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,W5($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U},j=function($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}},Z5=function($){return OU.isName($)},L5=function($){return OU.isName($)},k=function($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}},i1=function($){return $.startIndex+$[1].length},OU=r$(),t7={allowBooleanAttributes:!1,unpairedTags:[]};Y5.validate=function($,U){U=Object.assign({},t7,U);const G=[];let W=!1,X=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let Z=0;Z<$.length;Z++)if($[Z]==="<"&&$[Z+1]==="?"){if(Z+=2,Z=qX($,Z),Z.err)return Z}else if($[Z]==="<"){let L=Z;if(Z++,$[Z]==="!"){Z=NX($,Z);continue}else{let Y=!1;if($[Z]==="/")Y=!0,Z++;let w="";for(;Z<$.length&&$[Z]!==">"&&$[Z]!==" "&&$[Z]!=="\t"&&$[Z]!=="\n"&&$[Z]!=="\r";Z++)w+=$[Z];if(w=w.trim(),w[w.length-1]==="/")w=w.substring(0,w.length-1),Z--;if(!L5(w)){let z;if(w.trim().length===0)z="Invalid space after '<'.";else z="Tag '"+w+"' is an invalid name.";return j("InvalidTag",z,k($,Z))}const F=U5($,Z);if(F===!1)return j("InvalidAttr","Attributes for '"+w+"' have open quote.",k($,Z));let Q=F.value;if(Z=F.index,Q[Q.length-1]==="/"){const z=Z-Q.length;Q=Q.substring(0,Q.length-1);const I=jX(Q,U);if(I===!0)W=!0;else return j(I.err.code,I.err.msg,k($,z+I.err.line))}else if(Y)if(!F.tagClosed)return j("InvalidTag","Closing tag '"+w+"' doesn't have proper closing.",k($,Z));else if(Q.trim().length>0)return j("InvalidTag","Closing tag '"+w+"' can't have attributes or invalid starting.",k($,L));else if(G.length===0)return j("InvalidTag","Closing tag '"+w+"' has not been opened.",k($,L));else{const z=G.pop();if(w!==z.tagName){let I=k($,z.tagStartPos);return j("InvalidTag","Expected closing tag '"+z.tagName+"' (opened in line "+I.line+", col "+I.col+") instead of closing tag '"+w+"'.",k($,L))}if(G.length==0)X=!0}else{const z=jX(Q,U);if(z!==!0)return j(z.err.code,z.err.msg,k($,Z-Q.length+z.err.line));if(X===!0)return j("InvalidXml","Multiple possible root nodes found.",k($,Z));else if(U.unpairedTags.indexOf(w)!==-1);else G.push({tagName:w,tagStartPos:L});W=!0}for(Z++;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="!"){Z++,Z=NX($,Z);continue}else if($[Z+1]==="?"){if(Z=qX($,++Z),Z.err)return Z}else break;else if($[Z]==="&"){const z=X5($,Z);if(z==-1)return j("InvalidChar","char '&' is not expected.",k($,Z));Z=z}else if(X===!0&&!CX($[Z]))return j("InvalidXml","Extra text at the end",k($,Z));if($[Z]==="<")Z--}}else{if(CX($[Z]))continue;return j("InvalidChar","char '"+$[Z]+"' is not expected.",k($,Z))}if(!W)return j("InvalidXml","Start tag expected.",1);else if(G.length==1)return j("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",k($,G[0].tagStartPos));else if(G.length>0)return j("InvalidXml","Invalid '"+JSON.stringify(G.map((Z)=>Z.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var e7='"',$5="'",G5=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var bX=M((Q5)=>{var PX={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function($,U,G){return $}},F5=function($){return Object.assign({},PX,$)};Q5.buildOptions=F5;Q5.defaultOptions=PX});var DX=M((FT,kX)=>{class SX{constructor($){this.tagname=$,this.child=[],this[":@"]={}}add($,U){if($==="__proto__")$="#__proto__";this.child.push({[$]:U})}addChild($){if($.tagname==="__proto__")$.tagname="#__proto__";if($[":@"]&&Object.keys($[":@"]).length>0)this.child.push({[$.tagname]:$.child,[":@"]:$[":@"]});else this.child.push({[$.tagname]:$.child})}}kX.exports=SX});var xX=M((QT,hX)=>{var J5=function($,U){const G={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let W=1,X=!1,Z=!1,L="";for(;U<$.length;U++)if($[U]==="<"&&!Z){if(X&&M5($,U)){if(U+=7,[entityName,val,U]=E5($,U+1),val.indexOf("&")===-1)G[H5(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(X&&T5($,U))U+=8;else if(X&&B5($,U))U+=8;else if(X&&V5($,U))U+=9;else if(K5)Z=!0;else throw new Error("Invalid DOCTYPE");W++,L=""}else if($[U]===">"){if(Z){if($[U-1]==="-"&&$[U-2]==="-")Z=!1,W--}else W--;if(W===0)break}else if($[U]==="[")X=!0;else L+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}},E5=function($,U){let G="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)G+=$[U];if(G=G.trim(),G.indexOf(" ")!==-1)throw new Error("External entites are not supported");const W=$[U++];let X="";for(;U<$.length&&$[U]!==W;U++)X+=$[U];return[G,X,U]},K5=function($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1},M5=function($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="N"&&$[U+4]==="T"&&$[U+5]==="I"&&$[U+6]==="T"&&$[U+7]==="Y")return!0;return!1},T5=function($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="L"&&$[U+4]==="E"&&$[U+5]==="M"&&$[U+6]==="E"&&$[U+7]==="N"&&$[U+8]==="T")return!0;return!1},B5=function($,U){if($[U+1]==="!"&&$[U+2]==="A"&&$[U+3]==="T"&&$[U+4]==="T"&&$[U+5]==="L"&&$[U+6]==="I"&&$[U+7]==="S"&&$[U+8]==="T")return!0;return!1},V5=function($,U){if($[U+1]==="!"&&$[U+2]==="N"&&$[U+3]==="O"&&$[U+4]==="T"&&$[U+5]==="A"&&$[U+6]==="T"&&$[U+7]==="I"&&$[U+8]==="O"&&$[U+9]==="N")return!0;return!1},H5=function($){if(I5.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},I5=r$();hX.exports=J5});var cX=M((zT,vX)=>{var C5=function($,U={}){if(U=Object.assign({},f5,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&A5.test(G))return Number.parseInt(G,16);else{const W=O5.exec(G);if(W){const X=W[1],Z=W[2];let L=q5(W[3]);const Y=W[4]||W[6];if(!U.leadingZeros&&Z.length>0&&X&&G[2]!==".")return $;else if(!U.leadingZeros&&Z.length>0&&!X&&G[1]!==".")return $;else{const w=Number(G),F=""+w;if(F.search(/[eE]/)!==-1)if(U.eNotation)return w;else return $;else if(Y)if(U.eNotation)return w;else return $;else if(G.indexOf(".")!==-1)if(F==="0"&&L==="")return w;else if(F===L)return w;else if(X&&F==="-"+L)return w;else return $;if(Z)if(L===F)return w;else if(X+L===F)return w;else return $;if(G===F)return w;else if(G===X+F)return w;return $}}else return $}},q5=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},A5=/^[-+]?0x[a-fA-F0-9]+$/,O5=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;if(!Number.parseInt&&window.parseInt)Number.parseInt=window.parseInt;if(!Number.parseFloat&&window.parseFloat)Number.parseFloat=window.parseFloat;var f5={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};vX.exports=C5});var dX=M((RT,uX)=>{var P5=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];this.lastEntities[W]={regex:new RegExp("&"+W+";","g"),val:$[W]}}},b5=function($,U,G,W,X,Z,L){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!L)$=this.replaceEntitiesValue($);const Y=this.options.tagValueProcessor(U,$,G,X,Z);if(Y===null||Y===void 0)return $;else if(typeof Y!==typeof $||Y!==$)return Y;else if(this.options.trimValues)return qU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return qU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},S5=function($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $},D5=function($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=yX.getAllMatches($,k5),X=W.length,Z={};for(let L=0;L<X;L++){const Y=this.resolveNameSpace(W[L][1]);let w=W[L][4],F=this.options.attributeNamePrefix+Y;if(Y.length){if(this.options.transformAttributeName)F=this.options.transformAttributeName(F);if(F==="__proto__")F="#__proto__";if(w!==void 0){if(this.options.trimValues)w=w.trim();w=this.replaceEntitiesValue(w);const Q=this.options.attributeValueProcessor(Y,w,U);if(Q===null||Q===void 0)Z[F]=w;else if(typeof Q!==typeof w||Q!==w)Z[F]=Q;else Z[F]=qU(w,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)Z[F]=!0}}if(!Object.keys(Z).length)return;if(this.options.attributesGroupName){const L={};return L[this.options.attributesGroupName]=Z,L}return Z}},x5=function($,U,G){const W=this.options.updateTag(U.tagname,G,U[":@"]);if(W===!1);else if(typeof W==="string")U.tagname=W,$.addChild(U);else $.addChild(U)},c5=function($,U,G,W){if($){if(W===void 0)W=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,G,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,W),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $},y5=function($,U,G){const W="*."+G;for(let X in $){const Z=$[X];if(W===Z||U===Z)return!0}return!1},_5=function($,U,G=">"){let W,X="";for(let Z=U;Z<$.length;Z++){let L=$[Z];if(W){if(L===W)W=""}else if(L==='"'||L==="'")W=L;else if(L===G[0])if(G[1]){if($[Z+1]===G[1])return{data:X,index:Z}}else return{data:X,index:Z};else if(L==="\t")L=" ";X+=L}},J1=function($,U,G,W){const X=$.indexOf(U,G);if(X===-1)throw new Error(W);else return X+U.length-1},CU=function($,U,G,W=">"){const X=_5($,U+1,W);if(!X)return;let Z=X.data;const L=X.index,Y=Z.search(/\s/);let w=Z,F=!0;if(Y!==-1)w=Z.substring(0,Y),Z=Z.substring(Y+1).trimStart();const Q=w;if(G){const z=w.indexOf(":");if(z!==-1)w=w.substr(z+1),F=w!==X.data.substr(z+1)}return{tagName:w,tagExp:Z,closeIndex:L,attrExpPresent:F,rawTagName:Q}},u5=function($,U,G){const W=G;let X=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const Z=J1($,">",G,`${U} is not closed`);if($.substring(G+2,Z).trim()===U){if(X--,X===0)return{tagContent:$.substring(W,G),i:Z}}G=Z}else if($[G+1]==="?")G=J1($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=J1($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=J1($,"]]>",G,"StopNode is not closed.")-2;else{const Z=CU($,G,">");if(Z){if((Z&&Z.tagName)===U&&Z.tagExp[Z.tagExp.length-1]!=="/")X++;G=Z.closeIndex}}},qU=function($,U,G){if(U&&typeof $==="string"){const W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return j5($,G)}else if(yX.isExist($))return $;else return""},yX=r$(),o1=DX(),N5=xX(),j5=cX();class _X{constructor($){this.options=$,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(U,G)=>String.fromCharCode(Number.parseInt(G,16))}},this.addExternalEntities=P5,this.parseXml=h5,this.parseTextData=b5,this.resolveNameSpace=S5,this.buildAttributesMap=D5,this.isItStopNode=y5,this.replaceEntitiesValue=v5,this.readStopNodeData=u5,this.saveTextToParentTag=c5,this.addChild=x5}}var k5=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),h5=function($){$=$.replace(/\r\n?/g,"\n");const U=new o1("!xml");let G=U,W="",X="";for(let Z=0;Z<$.length;Z++)if($[Z]==="<")if($[Z+1]==="/"){const Y=J1($,">",Z,"Closing Tag is not closed.");let w=$.substring(Z+2,Y).trim();if(this.options.removeNSPrefix){const z=w.indexOf(":");if(z!==-1)w=w.substr(z+1)}if(this.options.transformTagName)w=this.options.transformTagName(w);if(G)W=this.saveTextToParentTag(W,G,X);const F=X.substring(X.lastIndexOf(".")+1);if(w&&this.options.unpairedTags.indexOf(w)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${w}>`);let Q=0;if(F&&this.options.unpairedTags.indexOf(F)!==-1)Q=X.lastIndexOf(".",X.lastIndexOf(".")-1),this.tagsNodeStack.pop();else Q=X.lastIndexOf(".");X=X.substring(0,Q),G=this.tagsNodeStack.pop(),W="",Z=Y}else if($[Z+1]==="?"){let Y=CU($,Z,!1,"?>");if(!Y)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,X),this.options.ignoreDeclaration&&Y.tagName==="?xml"||this.options.ignorePiTags);else{const w=new o1(Y.tagName);if(w.add(this.options.textNodeName,""),Y.tagName!==Y.tagExp&&Y.attrExpPresent)w[":@"]=this.buildAttributesMap(Y.tagExp,X,Y.tagName);this.addChild(G,w,X)}Z=Y.closeIndex+1}else if($.substr(Z+1,3)==="!--"){const Y=J1($,"-->",Z+4,"Comment is not closed.");if(this.options.commentPropName){const w=$.substring(Z+4,Y-2);W=this.saveTextToParentTag(W,G,X),G.add(this.options.commentPropName,[{[this.options.textNodeName]:w}])}Z=Y}else if($.substr(Z+1,2)==="!D"){const Y=N5($,Z);this.docTypeEntities=Y.entities,Z=Y.i}else if($.substr(Z+1,2)==="!["){const Y=J1($,"]]>",Z,"CDATA is not closed.")-2,w=$.substring(Z+9,Y);W=this.saveTextToParentTag(W,G,X);let F=this.parseTextData(w,G.tagname,X,!0,!1,!0,!0);if(F==null)F="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:w}]);else G.add(this.options.textNodeName,F);Z=Y+2}else{let Y=CU($,Z,this.options.removeNSPrefix),w=Y.tagName;const F=Y.rawTagName;let{tagExp:Q,attrExpPresent:z,closeIndex:I}=Y;if(this.options.transformTagName)w=this.options.transformTagName(w);if(G&&W){if(G.tagname!=="!xml")W=this.saveTextToParentTag(W,G,X,!1)}const R=G;if(R&&this.options.unpairedTags.indexOf(R.tagname)!==-1)G=this.tagsNodeStack.pop(),X=X.substring(0,X.lastIndexOf("."));if(w!==U.tagname)X+=X?"."+w:w;if(this.isItStopNode(this.options.stopNodes,X,w)){let E="";if(Q.length>0&&Q.lastIndexOf("/")===Q.length-1){if(w[w.length-1]==="/")w=w.substr(0,w.length-1),X=X.substr(0,X.length-1),Q=w;else Q=Q.substr(0,Q.length-1);Z=Y.closeIndex}else if(this.options.unpairedTags.indexOf(w)!==-1)Z=Y.closeIndex;else{const K=this.readStopNodeData($,F,I+1);if(!K)throw new Error(`Unexpected end of ${F}`);Z=K.i,E=K.tagContent}const V=new o1(w);if(w!==Q&&z)V[":@"]=this.buildAttributesMap(Q,X,w);if(E)E=this.parseTextData(E,w,X,!0,z,!0,!0);X=X.substr(0,X.lastIndexOf(".")),V.add(this.options.textNodeName,E),this.addChild(G,V,X)}else{if(Q.length>0&&Q.lastIndexOf("/")===Q.length-1){if(w[w.length-1]==="/")w=w.substr(0,w.length-1),X=X.substr(0,X.length-1),Q=w;else Q=Q.substr(0,Q.length-1);if(this.options.transformTagName)w=this.options.transformTagName(w);const E=new o1(w);if(w!==Q&&z)E[":@"]=this.buildAttributesMap(Q,X,w);this.addChild(G,E,X),X=X.substr(0,X.lastIndexOf("."))}else{const E=new o1(w);if(this.tagsNodeStack.push(G),w!==Q&&z)E[":@"]=this.buildAttributesMap(Q,X,w);this.addChild(G,E,X),G=E}W="",Z=I}}else W+=$[Z];return U.child},v5=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){const G=this.docTypeEntities[U];$=$.replace(G.regx,G.val)}for(let U in this.lastEntities){const G=this.lastEntities[U];$=$.replace(G.regex,G.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){const G=this.htmlEntities[U];$=$.replace(G.regex,G.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};uX.exports=_X});var gX=M((l5)=>{var d5=function($,U){return pX($,U)},pX=function($,U,G){let W;const X={};for(let Z=0;Z<$.length;Z++){const L=$[Z],Y=p5(L);let w="";if(G===void 0)w=Y;else w=G+"."+Y;if(Y===U.textNodeName)if(W===void 0)W=L[Y];else W+=""+L[Y];else if(Y===void 0)continue;else if(L[Y]){let F=pX(L[Y],U,w);const Q=s5(F,U);if(L[":@"])g5(F,L[":@"],w,U);else if(Object.keys(F).length===1&&F[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)F=F[U.textNodeName];else if(Object.keys(F).length===0)if(U.alwaysCreateTextNode)F[U.textNodeName]="";else F="";if(X[Y]!==void 0&&X.hasOwnProperty(Y)){if(!Array.isArray(X[Y]))X[Y]=[X[Y]];X[Y].push(F)}else if(U.isArray(Y,w,Q))X[Y]=[F];else X[Y]=F}}if(typeof W==="string"){if(W.length>0)X[U.textNodeName]=W}else if(W!==void 0)X[U.textNodeName]=W;return X},p5=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(W!==":@")return W}},g5=function($,U,G,W){if(U){const X=Object.keys(U),Z=X.length;for(let L=0;L<Z;L++){const Y=X[L];if(W.isArray(Y,G+"."+Y,!0,!0))$[Y]=[U[Y]];else $[Y]=U[Y]}}},s5=function($,U){const{textNodeName:G}=U,W=Object.keys($).length;if(W===0)return!0;if(W===1&&($[G]||typeof $[G]==="boolean"||$[G]===0))return!0;return!1};l5.prettify=d5});var mX=M((JT,lX)=>{var{buildOptions:n5}=bX(),i5=dX(),{prettify:o5}=gX(),r5=fU();class sX{constructor($){this.externalEntities={},this.options=n5($)}parse($,U){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(U){if(U===!0)U={};const X=r5.validate($,U);if(X!==!0)throw Error(`${X.err.msg}:${X.err.line}:${X.err.col}`)}const G=new i5(this.options);G.addExternalEntities(this.externalEntities);const W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return o5(W,this.options)}addEntity($,U){if(U.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if($.indexOf("&")!==-1||$.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");else if(U==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=U}}lX.exports=sX});var aX=M((ET,rX)=>{var a5=function($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return iX($,U,"",G)},iX=function($,U,G,W){let X="",Z=!1;for(let L=0;L<$.length;L++){const Y=$[L],w=t5(Y);if(w===void 0)continue;let F="";if(G.length===0)F=w;else F=`${G}.${w}`;if(w===U.textNodeName){let E=Y[w];if(!e5(F,U))E=U.tagValueProcessor(w,E),E=oX(E,U);if(Z)X+=W;X+=E,Z=!1;continue}else if(w===U.cdataPropName){if(Z)X+=W;X+=`<![CDATA[${Y[w][0][U.textNodeName]}]]>`,Z=!1;continue}else if(w===U.commentPropName){X+=W+`<!--${Y[w][0][U.textNodeName]}-->`,Z=!0;continue}else if(w[0]==="?"){const E=nX(Y[":@"],U),V=w==="?xml"?"":W;let K=Y[w][0][U.textNodeName];K=K.length!==0?" "+K:"",X+=V+`<${w}${K}${E}?>`,Z=!0;continue}let Q=W;if(Q!=="")Q+=U.indentBy;const z=nX(Y[":@"],U),I=W+`<${w}${z}`,R=iX(Y[w],U,F,Q);if(U.unpairedTags.indexOf(w)!==-1)if(U.suppressUnpairedNode)X+=I+">";else X+=I+"/>";else if((!R||R.length===0)&&U.suppressEmptyNode)X+=I+"/>";else if(R&&R.endsWith(">"))X+=I+`>${R}${W}</${w}>`;else{if(X+=I+">",R&&W!==""&&(R.includes("/>")||R.includes("</")))X+=W+U.indentBy+R+W;else X+=R;X+=`</${w}>`}Z=!0}return X},t5=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(!$.hasOwnProperty(W))continue;if(W!==":@")return W}},nX=function($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let X=U.attributeValueProcessor(W,$[W]);if(X=oX(X,U),X===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${X}"`}return G},e5=function($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let G=$.substr($.lastIndexOf(".")+1);for(let W in U.stopNodes)if(U.stopNodes[W]===$||U.stopNodes[W]==="*."+G)return!0;return!1},oX=function($,U){if($&&$.length>0&&U.processEntities)for(let G=0;G<U.entities.length;G++){const W=U.entities[G];$=$.replace(W.regex,W.val)}return $};rX.exports=a5});var eX=M((KT,tX)=>{var W1=function($){if(this.options=Object.assign({},Uz,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Xz;if(this.processTextOrObjNode=Gz,this.options.format)this.indentate=Wz,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},Gz=function($,U,G){const W=this.j2x($,G+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,W.attrStr,G);else return this.buildObjectNode(W.val,U,W.attrStr,G)},Wz=function($){return this.options.indentBy.repeat($)},Xz=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},$z=aX(),Uz={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function($,U){return U},attributeValueProcessor:function($,U){return U},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("\'","g"),val:"'"},{regex:new RegExp("\"","g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};W1.prototype.build=function($){if(this.options.preserveOrder)return $z($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};W1.prototype.j2x=function($,U){let G="",W="";for(let X in $){if(!Object.prototype.hasOwnProperty.call($,X))continue;if(typeof $[X]==="undefined"){if(this.isAttribute(X))W+=""}else if($[X]===null)if(this.isAttribute(X))W+="";else if(X[0]==="?")W+=this.indentate(U)+"<"+X+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+X+"/"+this.tagEndChar;else if($[X]instanceof Date)W+=this.buildTextValNode($[X],X,"",U);else if(typeof $[X]!=="object"){const Z=this.isAttribute(X);if(Z)G+=this.buildAttrPairStr(Z,""+$[X]);else if(X===this.options.textNodeName){let L=this.options.tagValueProcessor(X,""+$[X]);W+=this.replaceEntitiesValue(L)}else W+=this.buildTextValNode($[X],X,"",U)}else if(Array.isArray($[X])){const Z=$[X].length;let L="",Y="";for(let w=0;w<Z;w++){const F=$[X][w];if(typeof F==="undefined");else if(F===null)if(X[0]==="?")W+=this.indentate(U)+"<"+X+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+X+"/"+this.tagEndChar;else if(typeof F==="object")if(this.options.oneListGroup){const Q=this.j2x(F,U+1);if(L+=Q.val,this.options.attributesGroupName&&F.hasOwnProperty(this.options.attributesGroupName))Y+=Q.attrStr}else L+=this.processTextOrObjNode(F,X,U);else if(this.options.oneListGroup){let Q=this.options.tagValueProcessor(X,F);Q=this.replaceEntitiesValue(Q),L+=Q}else L+=this.buildTextValNode(F,X,"",U)}if(this.options.oneListGroup)L=this.buildObjectNode(L,X,Y,U);W+=L}else if(this.options.attributesGroupName&&X===this.options.attributesGroupName){const Z=Object.keys($[X]),L=Z.length;for(let Y=0;Y<L;Y++)G+=this.buildAttrPairStr(Z[Y],""+$[X][Z[Y]])}else W+=this.processTextOrObjNode($[X],X,U)}return{attrStr:G,val:W}};W1.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};W1.prototype.buildObjectNode=function($,U,G,W){if($==="")if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else{let X="</"+U+this.tagEndChar,Z="";if(U[0]==="?")Z="?",X="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(W)+"<"+U+G+Z+">"+$+X;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&Z.length===0)return this.indentate(W)+`<!--${$}-->`+this.newLine;else return this.indentate(W)+"<"+U+G+Z+this.tagEndChar+$+this.indentate(W)+X}};W1.prototype.closeTag=function($){let U="";if(this.options.unpairedTags.indexOf($)!==-1){if(!this.options.suppressUnpairedNode)U="/"}else if(this.options.suppressEmptyNode)U="/";else U=`></${$}`;return U};W1.prototype.buildTextValNode=function($,U,G,W){if(this.options.cdataPropName!==!1&&U===this.options.cdataPropName)return this.indentate(W)+`<![CDATA[${$}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName)return this.indentate(W)+`<!--${$}-->`+this.newLine;else if(U[0]==="?")return this.indentate(W)+"<"+U+G+"?"+this.tagEndChar;else{let X=this.options.tagValueProcessor(U,$);if(X=this.replaceEntitiesValue(X),X==="")return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(W)+"<"+U+G+">"+X+"</"+U+this.tagEndChar}};W1.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const G=this.options.entities[U];$=$.replace(G.regex,G.val)}return $};tX.exports=W1});var UZ=M((MT,$Z)=>{var Zz=fU(),Lz=mX(),Yz=eX();$Z.exports={XMLParser:Lz,XMLValidator:Zz,XMLBuilder:Yz}});var YZ=M((TT,LZ)=>{var{defineProperty:a$,getOwnPropertyDescriptor:wz,getOwnPropertyNames:Fz}=Object,Qz=Object.prototype.hasOwnProperty,h=($,U)=>a$($,"name",{value:U,configurable:!0}),zz=($,U)=>{for(var G in U)a$($,G,{get:U[G],enumerable:!0})},Rz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let X of Fz(U))if(!Qz.call($,X)&&X!==G)a$($,X,{get:()=>U[X],enumerable:!(W=wz(U,X))||W.enumerable})}return $},Iz=($)=>Rz(a$({},"__esModule",{value:!0}),$),GZ={};zz(GZ,{_toBool:()=>Ez,_toNum:()=>Kz,_toStr:()=>Jz,awsExpectUnion:()=>Tz,loadRestJsonErrorCode:()=>Hz,loadRestXmlErrorCode:()=>Cz,parseJsonBody:()=>XZ,parseJsonErrorBody:()=>Vz,parseXmlBody:()=>ZZ,parseXmlErrorBody:()=>fz});LZ.exports=Iz(GZ);var Jz=h(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){const U=new Error(`Received number ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}if(typeof $==="boolean"){const U=new Error(`Received boolean ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}return $},"_toStr"),Ez=h(($)=>{if($==null)return $;if(typeof $==="string"){const U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){const G=new Error(`Received string "${$}" where a boolean was expected.`);G.name="Warning",console.warn(G)}return $!==""&&U!=="false"}return $},"_toBool"),Kz=h(($)=>{if($==null)return $;if(typeof $==="string"){const U=Number($);if(U.toString()!==$){const G=new Error(`Received string "${$}" where a number was expected.`);return G.name="Warning",console.warn(G),$}return U}return $},"_toNum"),Mz=H1(),Tz=h(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return Mz.expectUnion($)},"awsExpectUnion"),Bz=H1(),WZ=h(($,U)=>Bz.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),XZ=h(($,U)=>WZ($,U).then((G)=>{if(G.length)try{return JSON.parse(G)}catch(W){if((W==null?void 0:W.name)==="SyntaxError")Object.defineProperty(W,"$responseBodyText",{value:G});throw W}return{}}),"parseJsonBody"),Vz=h(async($,U)=>{const G=await XZ($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),Hz=h(($,U)=>{const G=h((Z,L)=>Object.keys(Z).find((Y)=>Y.toLowerCase()===L.toLowerCase()),"findKey"),W=h((Z)=>{let L=Z;if(typeof L==="number")L=L.toString();if(L.indexOf(",")>=0)L=L.split(",")[0];if(L.indexOf(":")>=0)L=L.split(":")[0];if(L.indexOf("#")>=0)L=L.split("#")[1];return L},"sanitizeErrorCode"),X=G($.headers,"x-amzn-errortype");if(X!==void 0)return W($.headers[X]);if(U.code!==void 0)return W(U.code);if(U.__type!==void 0)return W(U.__type)},"loadRestJsonErrorCode"),Az=H1(),Oz=UZ(),ZZ=h(($,U)=>WZ($,U).then((G)=>{if(G.length){const W=new Oz.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(w,F)=>F.trim()===""&&F.includes("\n")?"":void 0});W.addEntity("#xD","\r"),W.addEntity("#10","\n");let X;try{X=W.parse(G,!0)}catch(w){if(w&&typeof w==="object")Object.defineProperty(w,"$responseBodyText",{value:G});throw w}const Z="#text",L=Object.keys(X)[0],Y=X[L];if(Y[Z])Y[L]=Y[Z],delete Y[Z];return Az.getValueFromTextNode(Y)}return{}}),"parseXmlBody"),fz=h(async($,U)=>{const G=await ZZ($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),Cz=h(($,U)=>{var G;if(((G=U==null?void 0:U.Error)==null?void 0:G.Code)!==void 0)return U.Error.Code;if((U==null?void 0:U.Code)!==void 0)return U.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var Nz=M((r1)=>{Object.defineProperty(r1,"__esModule",{value:!0});var NU=qz();NU.__exportStar(mW(),r1);NU.__exportStar(AX(),r1);NU.__exportStar(YZ(),r1)});function gz($){return $}var VZ=($)=>(U)=>async(G)=>{if(!v.isInstance(G.request))return U(G);const{request:W}=G,{handlerProtocol:X=""}=$.requestHandler.metadata||{};if(X.indexOf("h2")>=0&&!W.headers[":authority"])delete W.headers.host,W.headers[":authority"]=W.hostname+(W.port?":"+W.port:"");else if(!W.headers.host){let Z=W.hostname;if(W.port!=null)Z+=`:${W.port}`;W.headers.host=Z}return U(G)},HZ={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},sz=($)=>({applyToStack:(U)=>{U.add(VZ($),HZ)}});var AZ=()=>($,U)=>async(G)=>{try{const W=await $(G),{clientName:X,commandName:Z,logger:L,dynamoDbDocumentClientOptions:Y={}}=U,{overrideInputFilterSensitiveLog:w,overrideOutputFilterSensitiveLog:F}=Y,Q=w??U.inputFilterSensitiveLog,z=F??U.outputFilterSensitiveLog,{$metadata:I,...R}=W.output;return L?.info?.({clientName:X,commandName:Z,input:Q(G.input),output:z(R),metadata:I}),W}catch(W){const{clientName:X,commandName:Z,logger:L,dynamoDbDocumentClientOptions:Y={}}=U,{overrideInputFilterSensitiveLog:w}=Y,F=w??U.inputFilterSensitiveLog;throw L?.error?.({clientName:X,commandName:Z,input:F(G.input),error:W,metadata:W.$metadata}),W}},OZ={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},mz=($)=>({applyToStack:(U)=>{U.add(AZ(),OZ)}});var kU="X-Amzn-Trace-Id",fZ="AWS_LAMBDA_FUNCTION_NAME",CZ="_X_AMZN_TRACE_ID",qZ=($)=>(U)=>async(G)=>{const{request:W}=G;if(!v.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(kU))return U(G);const X=process.env[fZ],Z=process.env[CZ],L=(Y)=>typeof Y==="string"&&Y.length>0;if(L(X)&&L(Z))W.headers[kU]=Z;return U({...G,request:W})},NZ={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},az=($)=>({applyToStack:(U)=>{U.add(qZ($),NZ)}});function _R($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}var LQ=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),p1=($)=>LQ.test($)||$.startsWith("[")&&$.endsWith("]");var YQ=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),g1=($,U=!1)=>{if(!U)return YQ.test($);const G=$.split(".");for(let W of G)if(!g1(W))return!1;return!0};var s1={};var n="endpoints";function _($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${_($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(_).join(", ")})`;return JSON.stringify($,null,2)}class O extends Error{constructor($){super($);this.name="EndpointError"}}var r8=($,U)=>$===U;var a8=($)=>{const U=$.split("."),G=[];for(let W of U){const X=W.indexOf("[");if(X!==-1){if(W.indexOf("]")!==W.length-1)throw new O(`Path: '${$}' does not end with ']'`);const Z=W.slice(X+1,-1);if(Number.isNaN(parseInt(Z)))throw new O(`Invalid array index: '${Z}' in path: '${$}'`);if(X!==0)G.push(W.slice(0,X));G.push(Z)}else G.push(W)}return G};var j$=($,U)=>a8(U).reduce((G,W)=>{if(typeof G!=="object")throw new O(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(W)];return G[W]},$);var t8=($)=>$!=null;var e8=($)=>!$;var P$=i0(Z1(),1);var n0={[P$.EndpointURLScheme.HTTP]:80,[P$.EndpointURLScheme.HTTPS]:443},$W=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:I,port:R,protocol:E="",path:V="",query:K={}}=$,B=new URL(`${E}//${I}${R?`:${R}`:""}${V}`);return B.search=Object.entries(K).map(([T,H])=>`${T}=${H}`).join("&"),B}return new URL($)}catch(I){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const G=U.href,{host:W,hostname:X,pathname:Z,protocol:L,search:Y}=U;if(Y)return null;const w=L.slice(0,-1);if(!Object.values(P$.EndpointURLScheme).includes(w))return null;const F=p1(X),Q=G.includes(`${W}:${n0[w]}`)||typeof $==="string"&&$.includes(`${W}:${n0[w]}`),z=`${W}${Q?`:${n0[w]}`:""}`;return{scheme:w,authority:z,path:Z,normalizedPath:Z.endsWith("/")?Z:`${Z}/`,isIp:F}};var UW=($,U)=>$===U;var GW=($,U,G,W)=>{if(U>=G||$.length<G)return null;if(!W)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var WW=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var XW={booleanEquals:r8,getAttr:j$,isSet:t8,isValidHostLabel:g1,not:e8,parseURL:$W,stringEquals:UW,substring:GW,uriEncode:WW};var b$=($,U)=>{const G=[],W={...U.endpointParams,...U.referenceRecord};let X=0;while(X<$.length){const Z=$.indexOf("{",X);if(Z===-1){G.push($.slice(X));break}G.push($.slice(X,Z));const L=$.indexOf("}",Z);if(L===-1){G.push($.slice(Z));break}if($[Z+1]==="{"&&$[L+1]==="}")G.push($.slice(Z+1,L)),X=L+2;const Y=$.substring(Z+1,L);if(Y.includes("#")){const[w,F]=Y.split("#");G.push(j$(W[w],F))}else G.push(W[Y]);X=L+1}return G.join("")};var ZW=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var $1=($,U,G)=>{if(typeof $==="string")return b$($,G);else if($.fn)return S$($,G);else if($.ref)return ZW($,G);throw new O(`'${U}': ${String($)} is not a string, function or reference.`)};var S$=({fn:$,argv:U},G)=>{const W=U.map((Z)=>["boolean","number"].includes(typeof Z)?Z:$1(Z,"arg",G)),X=$.split(".");if(X[0]in s1&&X[1]!=null)return s1[X[0]][X[1]](...W);return XW[$](...W)};var LW=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new O(`'${$}' is already defined in Reference Record.`);const W=S$(U,G);return G.logger?.debug?.(`${n} evaluateCondition: ${_(U)} = ${_(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var O1=($=[],U)=>{const G={};for(let W of $){const{result:X,toAssign:Z}=LW(W,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!X)return{result:X};if(Z)G[Z.name]=Z.value,U.logger?.debug?.(`${n} assign: ${Z.name} := ${_(Z.value)}`)}return{result:!0,referenceRecord:G}};var YW=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:X.map((Z)=>{const L=$1(Z,"Header value entry",U);if(typeof L!=="string")throw new O(`Header '${W}' value '${L}' is not a string`);return L})}),{});var o0=($,U)=>{if(Array.isArray($))return $.map((G)=>o0(G,U));switch(typeof $){case"string":return b$($,U);case"object":if($===null)throw new O(`Unexpected endpoint property: ${$}`);return k$($,U);case"boolean":return $;default:throw new O(`Unexpected endpoint property type: ${typeof $}`)}};var k$=($,U)=>Object.entries($).reduce((G,[W,X])=>({...G,[W]:o0(X,U)}),{});var wW=($,U)=>{const G=$1($,"Endpoint URL",U);if(typeof G==="string")try{return new URL(G)}catch(W){throw console.error(`Failed to construct URL with ${G}`,W),W}throw new O(`Endpoint URL must be a string, got ${typeof G}`)};var FW=($,U)=>{const{conditions:G,endpoint:W}=$,{result:X,referenceRecord:Z}=O1(G,U);if(!X)return;const L={...U,referenceRecord:{...U.referenceRecord,...Z}},{url:Y,properties:w,headers:F}=W;return U.logger?.debug?.(`${n} Resolving endpoint from template: ${_(W)}`),{...F!=null&&{headers:YW(F,L)},...w!=null&&{properties:k$(w,L)},url:wW(Y,L)}};var QW=($,U)=>{const{conditions:G,error:W}=$,{result:X,referenceRecord:Z}=O1(G,U);if(!X)return;throw new O($1(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...Z}}))};var zW=($,U)=>{const{conditions:G,rules:W}=$,{result:X,referenceRecord:Z}=O1(G,U);if(!X)return;return D$(W,{...U,referenceRecord:{...U.referenceRecord,...Z}})};var D$=($,U)=>{for(let G of $)if(G.type==="endpoint"){const W=FW(G,U);if(W)return W}else if(G.type==="error")QW(G,U);else if(G.type==="tree"){const W=zW(G,U);if(W)return W}else throw new O(`Unknown endpoint rule: ${G}`);throw new O("Rules evaluation failed")};var wQ=($,U)=>{const{endpointParams:G,logger:W}=U,{parameters:X,rules:Z}=$;U.logger?.debug?.(`${n} Initial EndpointParams: ${_(G)}`);const L=Object.entries(X).filter(([,F])=>F.default!=null).map(([F,Q])=>[F,Q.default]);if(L.length>0)for(let[F,Q]of L)G[F]=G[F]??Q;const Y=Object.entries(X).filter(([,F])=>F.required).map(([F])=>F);for(let F of Y)if(G[F]==null)throw new O(`Missing required parameter: '${F}'`);const w=D$(Z,{endpointParams:G,logger:W,referenceRecord:{}});if(U.endpointParams?.Endpoint)try{const F=new URL(U.endpointParams.Endpoint),{protocol:Q,port:z}=F;w.url.protocol=Q,w.url.port=z}catch(F){}return U.logger?.debug?.(`${n} Resolved endpoint: ${_(w)}`),w};var r0=($,U=!1)=>{if(U){for(let G of $.split("."))if(!r0(G))return!1;return!0}if(!g1($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(p1($))return!1;return!0};var RW=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,W,X,Z,L,...Y]=U;if(G!=="arn"||W===""||X===""||Y[0]==="")return null;return{partition:W,service:X,region:Z,accountId:L,resourceId:Y[0].includes("/")?Y[0].split("/"):Y}};var IW={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)\\-\\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)"},"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)"},"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:{}}],version:"1.1"};var QQ=IW,zQ="",JW=($)=>{const{partitions:U}=QQ;for(let W of U){const{regions:X,outputs:Z}=W;for(let[L,Y]of Object.entries(X))if(L===$)return{...Z,...Y}}for(let W of U){const{regionRegex:X,outputs:Z}=W;if(new RegExp(X).test($))return{...Z}}const G=U.find((W)=>W.id==="aws");if(!G)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...G.outputs}};var EW=()=>zQ;var RQ={isVirtualHostableS3Bucket:r0,parseArn:RW,partition:JW};s1.aws=RQ;var a0="user-agent",h$="x-amz-user-agent",t0=" ",x$="/",KW=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,MW=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,e0="-";var IQ=($)=>(U,G)=>async(W)=>{const{request:X}=W;if(!v.isInstance(X))return U(W);const{headers:Z}=X,L=G?.userAgent?.map($U)||[],Y=(await $.defaultUserAgentProvider()).map($U),w=$?.customUserAgent?.map($U)||[],F=EW(),Q=(F?[F]:[]).concat([...Y,...L,...w]).join(t0),z=[...Y.filter((I)=>I.startsWith("aws-sdk-")),...w].join(t0);if($.runtime!=="browser"){if(z)Z[h$]=Z[h$]?`${Z[a0]} ${z}`:z;Z[a0]=Q}else Z[h$]=Q;return U({...W,request:X})},$U=($)=>{const U=$[0].split(x$).map((L)=>L.replace(KW,e0)).join(x$),G=$[1]?.replace(MW,e0),W=U.indexOf(x$),X=U.substring(0,W);let Z=U.substring(W+1);if(X==="api")Z=Z.toLowerCase();return[X,Z,G].filter((L)=>L&&L.length>0).reduce((L,Y,w)=>{switch(w){case 0:return Y;case 1:return`${L}/${Y}`;default:return`${L}#${Y}`}},"")},JQ={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},TE=($)=>({applyToStack:(U)=>{U.add(IQ($),JQ)}});var v$=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var UU=($)=>v$($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var jE=($)=>{const{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return UU(U);const W=await U();return UU(W)},useFipsEndpoint:async()=>{const W=typeof U==="string"?U:await U();if(v$(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var f1=($,U,G)=>{if(!(U in $))return;if($[U]==="true")return!0;if($[U]==="false")return!1;throw new Error(`Cannot load ${G} "${U}". Expected "true" or "false", got ${$[U]}.`)};var U1;(function($){$.ENV="env",$.CONFIG="shared config entry"})(U1||(U1={}));var EQ="AWS_USE_DUALSTACK_ENDPOINT",KQ="use_dualstack_endpoint";var yE={environmentVariableSelector:($)=>f1($,EQ,U1.ENV),configFileSelector:($)=>f1($,KQ,U1.CONFIG),default:!1};var MQ="AWS_USE_FIPS_ENDPOINT",TQ="use_fips_endpoint";var dE={environmentVariableSelector:($)=>f1($,MQ,U1.ENV),configFileSelector:($)=>f1($,TQ,U1.CONFIG),default:!1};var GU=i0(Z1(),1),TW=($)=>$[GU.SMITHY_CONTEXT_KEY]||($[GU.SMITHY_CONTEXT_KEY]={});var i=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var BW={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},LK={preferredFile:"credentials"};function BQ($){return(U)=>async(G)=>{const W=G.request;if(v.isInstance(W)){const{body:X,headers:Z}=W;if(X&&Object.keys(Z).map((L)=>L.toLowerCase()).indexOf(VW)===-1)try{const L=$(X);W.headers={...W.headers,[VW]:String(L)}}catch(L){}}return U({...G,request:W})}}var VW="content-length",VQ={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},DK=($)=>({applyToStack:(U)=>{U.add(BQ($.bodyLengthChecker),VQ)}});var HW=($,U)=>(G)=>async(W)=>{const{response:X}=await G(W);try{const Z=await U(X,$);return{response:X,output:Z}}catch(Z){if(Object.defineProperty(Z,"$response",{value:X}),!("$metadata"in Z)){if(Z.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof Z.$responseBodyText!=="undefined"){if(Z.$response)Z.$response.body=Z.$responseBodyText}}throw Z}};var AW=($,U)=>(G,W)=>async(X)=>{const Z=W.endpointV2?.url&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!Z)throw new Error("No valid endpoint provider available.");const L=await U(X.input,{...$,endpoint:Z});return G({...X,request:L})};function _K($,U,G){return{applyToStack:(W)=>{W.add(HW($,G),HQ),W.add(AW($,U),WU)}}}var HQ={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},WU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var OW=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(qQ(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!CQ(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},AQ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,OQ=/(\d+\.){3}\d+/,fQ=/\.\./;var CQ=($)=>AQ.test($)&&!OQ.test($)&&!fQ.test($),qQ=($)=>{const[U,G,W,,,X]=$.split(":"),Z=U==="arn"&&$.split(":").length>=6,L=Boolean(Z&&G&&W&&X);if(Z&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L};var fW=($,U,G)=>{const W=async()=>{const X=G[$]??G[U];if(typeof X==="function")return X();return X};if($==="credentialScope"||U==="CredentialScope")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return X?.credentialScope??X?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const X=typeof G.credentials==="function"?await G.credentials():G.credentials;return X?.accountId??X?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const X=await W();if(X&&typeof X==="object"){if("url"in X)return X.url.href;if("hostname"in X){const{protocol:Z,hostname:L,port:Y,path:w}=X;return`${Z}//${L}${Y?":"+Y:""}${w}`}}return X};return W};var CW="AWS_ENDPOINT_URL",qW="endpoint_url",NW=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((Z)=>Z.toUpperCase()),W=U[[CW,...G].join("_")];if(W)return W;const X=U[CW];if(X)return X;return},configFileSelector:(U,G)=>{if(G&&U.services){const X=G[["services",U.services].join(XU)];if(X){const Z=$.split(" ").map((Y)=>Y.toLowerCase()),L=X[[Z.join("_"),qW].join(XU)];if(L)return L}}const W=U[qW];if(W)return W;return},default:void 0});var jW=async($)=>Q1(NW($))();var c$=($)=>{if(typeof $==="object"){if("url"in $)return ZU($.url);return $}return ZU($)};var PW=async($,U,G,W)=>{if(!G.endpoint){const L=await jW(G.serviceId||"");if(L)G.endpoint=()=>Promise.resolve(c$(L))}const X=await NQ($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(X,W)},NQ=async($,U,G)=>{const W={},X=U?.getEndpointParameterInstructions?.()||{};for(let[Z,L]of Object.entries(X))switch(L.type){case"staticContextParams":W[Z]=L.value;break;case"contextParams":W[Z]=$[L.name];break;case"clientContextParams":case"builtInParams":W[Z]=await fW(L.name,Z,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(X).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await OW(W);return W};var bW=({config:$,instructions:U})=>{return(G,W)=>async(X)=>{const Z=await PW(X.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=Z,W.authSchemes=Z.properties?.authSchemes;const L=W.authSchemes?.[0];if(L){W.signing_region=L.signingRegion,W.signing_service=L.signingName;const w=TW(W)?.selectedHttpAuthScheme?.httpAuthOption;if(w)w.signingProperties=Object.assign(w.signingProperties||{},{signing_region:L.signingRegion,signingRegion:L.signingRegion,signing_service:L.signingName,signingName:L.signingName,signingRegionSet:L.signingRegionSet},L.properties)}return G({...X})}};var jQ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:WU.name},R3=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(bW({config:$,instructions:U}),jQ)}});var K3=($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>c$(await i(G)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:i($.useDualstackEndpoint??!1),useFipsEndpoint:i($.useFipsEndpoint??!1)}};var g;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(g||(g={}));var z1=3,SW=g.STANDARD;var kW=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],DW=["TimeoutError","RequestTimeout","RequestTimeoutException"],hW=[500,502,503,504],xW=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var PQ=($)=>$.$metadata?.clockSkewCorrected,C1=($)=>$.$metadata?.httpStatusCode===429||kW.includes($.name)||$.$retryable?.throttling==!0,y$=($)=>PQ($)||DW.includes($.name)||xW.includes($?.code||"")||hW.includes($.$metadata?.httpStatusCode||0),vW=($)=>{if($.$metadata?.httpStatusCode!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!y$($))return!0;return!1}return!1};class _${constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;const U=this.getCurrentTimeInSeconds();this.lastThrottleTime=U,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($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.currentCapacity){const U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),C1($)){const W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const G=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(G)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const G=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var R1=100,l1=20000,LU=500,u$=500,YU=5,wU=10,FU=1,d$="amz-sdk-invocation-id",p$="amz-sdk-request";var cW=()=>{let $=R1;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min(l1,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var QU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(l1,$),getRetryCost:()=>G}};class q1{constructor($){this.maxAttempts=$,this.mode=g.STANDARD,this.capacity=u$,this.retryBackoffStrategy=cW(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return QU({retryDelay:R1,retryCount:0})}async refreshRetryTokenForRetry($,U){const G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){const W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?LU:R1);const X=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),Z=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,X):X,L=this.getCapacityCost(W);return this.capacity-=L,QU({retryDelay:Z,retryCount:$.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(u$,this.capacity+($.getRetryCost()??FU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${z1}`),z1}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?wU:YU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class zU{constructor($,U){this.maxAttemptsProvider=$,this.mode=g.ADAPTIVE;const{rateLimiter:G}=U??{};this.rateLimiter=G??new _$,this.standardRetryStrategy=new q1($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,U){return this.rateLimiter.updateClientSendingRate(U),this.standardRetryStrategy.refreshRetryTokenForRetry($,U)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}}var yW="AWS_MAX_ATTEMPTS",_W="max_attempts",YM={environmentVariableSelector:($)=>{const U=$[yW];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${yW} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[_W];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${_W} mast be a number, got "${U}"`);return G},default:z1},wM=($)=>{const{retryStrategy:U}=$,G=i($.maxAttempts??z1);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await i($.retryMode)()===g.ADAPTIVE)return new zU(G);return new q1(G)}}},bQ="AWS_RETRY_MODE",SQ="retry_mode",FM={environmentVariableSelector:($)=>$[bQ],configFileSelector:($)=>$[SQ],default:SW};import{Readable as kQ} from"stream";var uW=($)=>$?.body instanceof kQ||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var RU=($)=>{if($ instanceof Error)return $;if($ instanceof Object)return Object.assign(new Error,$);if(typeof $==="string")return new Error($);return new Error(`AWS SDK error wrapper for ${$}`)};var DQ=($)=>(U,G)=>async(W)=>{let X=await $.retryStrategy();const Z=await $.maxAttempts();if(hQ(X)){X=X;let L=await X.acquireInitialRetryToken(G.partition_id),Y=new Error,w=0,F=0;const{request:Q}=W,z=v.isInstance(Q);if(z)Q.headers[d$]=dW();while(!0)try{if(z)Q.headers[p$]=`attempt=${w+1}; max=${Z}`;const{response:I,output:R}=await U(W);return X.recordSuccess(L),R.$metadata.attempts=w+1,R.$metadata.totalRetryDelay=F,{response:I,output:R}}catch(I){const R=xQ(I);if(Y=RU(I),z&&uW(Q))throw(G.logger instanceof pW?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),Y;try{L=await X.refreshRetryTokenForRetry(L,R)}catch(V){if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=w+1,Y.$metadata.totalRetryDelay=F,Y}w=L.getRetryCount();const E=L.getRetryDelay();F+=E,await new Promise((V)=>setTimeout(V,E))}}else{if(X=X,X?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(U,W)}},hQ=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",xQ=($)=>{const U={error:$,errorType:vQ($)},G=yQ($.$response);if(G)U.retryAfterHint=G;return U},vQ=($)=>{if(C1($))return"THROTTLING";if(y$($))return"TRANSIENT";if(vW($))return"SERVER_ERROR";return"CLIENT_ERROR"},cQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},HM=($)=>({applyToStack:(U)=>{U.add(DQ($),cQ)}}),yQ=($)=>{if(!IU.isInstance($))return;const U=Object.keys($.headers).find((Z)=>Z.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)};import{platform as jz,release as Pz} from"os";import{env as FZ,versions as bz} from"process";var jU={isCrtAvailable:!1};var wZ=()=>{if(jU.isCrtAvailable)return["md/crt-avail"];return null};var Sz="AWS_SDK_UA_APP_ID",kz="sdk-ua-app-id",NT=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${jz()}`,Pz()],["lang/js"],["md/nodejs",`${bz.node}`]],W=wZ();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(FZ.AWS_EXECUTION_ENV)G.push([`exec-env/${FZ.AWS_EXECUTION_ENV}`]);const X=Q1({environmentVariableSelector:(L)=>L[Sz],configFileSelector:(L)=>L[kz],default:void 0})();let Z=void 0;return async()=>{if(!Z){const L=await X;Z=L?[...G,[`app/${L}`]]:[...G]}return Z}};import{Buffer as Dz} from"buffer";import{createHash as hz,createHmac as xz} from"crypto";var QZ=function($,U){if(Dz.isBuffer($))return $;if(typeof $==="string")return zZ($,U);if(ArrayBuffer.isView($))return PU($.buffer,$.byteOffset,$.byteLength);return PU($)};class vz{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(RZ(QZ($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?xz(this.algorithmIdentifier,QZ(this.secret)):hz(this.algorithmIdentifier)}}import{fstatSync as cz,lstatSync as yz} from"fs";var vT=($)=>{if(!$)return 0;if(typeof $==="string")return Buffer.byteLength($);else if(typeof $.byteLength==="number")return $.byteLength;else if(typeof $.size==="number")return $.size;else if(typeof $.start==="number"&&typeof $.end==="number")return $.end+1-$.start;else if(typeof $.path==="string"||Buffer.isBuffer($.path))return yz($.path).size;else if(typeof $.fd==="number")return cz($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var TZ=i0(L0(),1);var IZ="AWS_EXECUTION_ENV",bU="AWS_REGION",SU="AWS_DEFAULT_REGION",JZ="AWS_EC2_METADATA_DISABLED",EZ=["in-region","cross-region","mobile","standard","legacy"],KZ="/latest/meta-data/placement/region";var MZ={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var mT=({region:$=Q1(BW),defaultsMode:U=Q1(MZ)}={})=>TZ.memoize(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return _z($);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(G?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${EZ.join(", ")}, got ${G}`)}}),_z=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await uz();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},uz=async()=>{if(process.env[IZ]&&(process.env[bU]||process.env[SU]))return process.env[bU]??process.env[SU];if(!process.env[JZ])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-9e6c223585edf12e.js"),G=await $();return(await U({...G,path:KZ})).toString()}catch($){}};var rT=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const G=$.region;if(typeof G==="string")return G;return G()};return{setRegion(G){U=G},region(){return U}}},aT=($)=>{return{region:$.region()}};export{gz as Ia,sz as Ja,mz as Ka,az as La,RX as Ma,f1 as Na,U1 as Oa,m0 as Pa,TW as Qa,i as Ra,_R as Sa,s1 as Ta,wQ as Ua,RQ as Va,TE as Wa,yE as Xa,dE as Ya,BW as Za,LK as _a,jE as $a,DK as ab,NQ as bb,_K as cb,R3 as db,K3 as eb,SW as fb,YM as gb,wM as hb,FM as ib,HM as jb,Nz as kb,NT as lb,vz as mb,vT as nb,mT as ob,rT as pb,aT as qb};
|