gemi 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/bin/index.js +212 -232
  2. package/dist/chunk-18ce9t29.js +4 -0
  3. package/dist/{chunk-taxjvwa6.js.map → chunk-18ce9t29.js.map} +5 -5
  4. package/dist/{chunk-cbt3v889.js → chunk-471zprvy.js} +2 -2
  5. package/dist/{chunk-cbt3v889.js.map → chunk-471zprvy.js.map} +1 -1
  6. package/dist/chunk-686d5sc0.js +5 -0
  7. package/dist/{chunk-vq90tfsz.js.map → chunk-686d5sc0.js.map} +5 -5
  8. package/dist/{chunk-t2aat5vw.js → chunk-8mg4frr6.js} +1 -1
  9. package/dist/{chunk-9aaqjzzf.js → chunk-9hs4hzpr.js} +2 -2
  10. package/dist/{chunk-9aaqjzzf.js.map → chunk-9hs4hzpr.js.map} +1 -1
  11. package/dist/chunk-dgbadcr8.js +4 -0
  12. package/dist/{chunk-j1cwwmg0.js.map → chunk-dgbadcr8.js.map} +2 -2
  13. package/dist/{chunk-q11xg1z2.js → chunk-fe0yca19.js} +2 -2
  14. package/dist/{chunk-f3qyx9ah.js → chunk-pvqj4vwf.js} +1 -1
  15. package/dist/chunk-rbxbvagv.js +4 -0
  16. package/dist/{chunk-2g6dyn68.js.map → chunk-rbxbvagv.js.map} +4 -4
  17. package/dist/chunk-vegenqty.js +20 -0
  18. package/dist/{chunk-bs1xyw0h.js.map → chunk-vegenqty.js.map} +12 -10
  19. package/dist/chunk-xckygssg.js +4 -0
  20. package/dist/{chunk-9s54rg4n.js.map → chunk-xckygssg.js.map} +4 -4
  21. package/dist/{chunk-tc3amtc4.js → chunk-zvwbevjc.js} +1 -1
  22. package/dist/client/Mutation.d.ts +1 -1
  23. package/dist/client/Mutation.d.ts.map +1 -1
  24. package/dist/client/_Form.d.ts +1 -1
  25. package/dist/client/_Form.d.ts.map +1 -1
  26. package/dist/client/index.js +4977 -4512
  27. package/dist/client/index.js.map +1 -1
  28. package/dist/kernel/index.js +1 -1
  29. package/dist/services/index.js +6 -6
  30. package/dist/services/index.js.map +6 -6
  31. package/dist/services/router/ViewRouterServiceProvider.d.ts +2 -1
  32. package/dist/services/router/ViewRouterServiceProvider.d.ts.map +1 -1
  33. package/package.json +5 -3
  34. package/dist/chunk-2g6dyn68.js +0 -4
  35. package/dist/chunk-9s54rg4n.js +0 -4
  36. package/dist/chunk-bs1xyw0h.js +0 -20
  37. package/dist/chunk-j1cwwmg0.js +0 -4
  38. package/dist/chunk-taxjvwa6.js +0 -4
  39. package/dist/chunk-vq90tfsz.js +0 -5
  40. /package/dist/{chunk-t2aat5vw.js.map → chunk-8mg4frr6.js.map} +0 -0
  41. /package/dist/{chunk-q11xg1z2.js.map → chunk-fe0yca19.js.map} +0 -0
  42. /package/dist/{chunk-f3qyx9ah.js.map → chunk-pvqj4vwf.js.map} +0 -0
  43. /package/dist/{chunk-tc3amtc4.js.map → chunk-zvwbevjc.js.map} +0 -0
@@ -1,20 +0,0 @@
1
- import{$ as z1,aa as IU}from"./chunk-9aaqjzzf.js";import{da as c,ea as OU,ga as _U,ha as kX,ja as DX,la as FZ}from"./chunk-vq90tfsz.js";import{db as RU}from"./chunk-cfsd9356.js";import{hb as B1}from"./chunk-t098k1va.js";import{qb as _X}from"./chunk-8h7xg91g.js";import{sb as F7,tb as QZ}from"./chunk-04mpmtfe.js";import{Zb as AJ}from"./chunk-a8bwm1yn.js";import{$b as M,_b as $1}from"./chunk-yp5mh81v.js";var t1=M((oJ,oU)=>{var{defineProperty:a1,getOwnPropertyDescriptor:oX,getOwnPropertyNames:rX}=Object,aX=Object.prototype.hasOwnProperty,L$=($,U)=>a1($,"name",{value:U,configurable:!0}),tX=($,U)=>{for(var G in U)a1($,G,{get:U[G],enumerable:!0})},eX=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of rX(U))if(!aX.call($,Z)&&Z!==G)a1($,Z,{get:()=>U[Z],enumerable:!(W=oX(U,Z))||W.enumerable})}return $},$2=($)=>eX(a1({},"__esModule",{value:!0}),$),dU={};tX(dU,{deserializerMiddleware:()=>sU,deserializerMiddlewareOption:()=>mU,getSerdePlugin:()=>iU,serializerMiddleware:()=>lU,serializerMiddlewareOption:()=>nU});oU.exports=$2(dU);var sU=L$(($,U)=>(G)=>async(W)=>{let{response:Z}=await G(W);try{let X=await U(Z,$);return{response:Z,output:X}}catch(X){if(Object.defineProperty(X,"$response",{value:Z}),!("$metadata"in X)){if(X.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof X.$responseBodyText!=="undefined"){if(X.$response)X.$response.body=X.$responseBodyText}}throw X}},"deserializerMiddleware"),lU=L$(($,U)=>(G,W)=>async(Z)=>{var X;let L=((X=W.endpointV2)==null?void 0:X.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!L)throw new Error("No valid endpoint provider available.");let Y=await U(Z.input,{...$,endpoint:L});return G({...Z,request:Y})},"serializerMiddleware"),mU={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},nU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function iU($,U,G){return{applyToStack:(W)=>{W.add(sU($,G),mU),W.add(lU($,U),nU)}}}L$(iU,"getSerdePlugin")});var l=M((rJ,eU)=>{var{defineProperty:e1,getOwnPropertyDescriptor:U2,getOwnPropertyNames:G2}=Object,W2=Object.prototype.hasOwnProperty,aU=($,U)=>e1($,"name",{value:U,configurable:!0}),Z2=($,U)=>{for(var G in U)e1($,G,{get:U[G],enumerable:!0})},X2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of G2(U))if(!W2.call($,Z)&&Z!==G)e1($,Z,{get:()=>U[Z],enumerable:!(W=U2(U,Z))||W.enumerable})}return $},L2=($)=>X2(e1({},"__esModule",{value:!0}),$),tU={};Z2(tU,{getSmithyContext:()=>Y2,normalizeProvider:()=>Q2});eU.exports=L2(tU);var rU=B1(),Y2=aU(($)=>$[rU.SMITHY_CONTEXT_KEY]||($[rU.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Q2=aU(($)=>{if(typeof $==="function")return $;let U=Promise.resolve($);return()=>U},"normalizeProvider")});var Y$=M((aJ,ZG)=>{var{defineProperty:$0,getOwnPropertyDescriptor:F2,getOwnPropertyNames:w2}=Object,z2=Object.prototype.hasOwnProperty,L1=($,U)=>$0($,"name",{value:U,configurable:!0}),J2=($,U)=>{for(var G in U)$0($,G,{get:U[G],enumerable:!0})},R2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of w2(U))if(!z2.call($,Z)&&Z!==G)$0($,Z,{get:()=>U[Z],enumerable:!(W=F2(U,Z))||W.enumerable})}return $},I2=($)=>R2($0({},"__esModule",{value:!0}),$),$G={};J2($G,{CredentialsProviderError:()=>K2,ProviderError:()=>U0,TokenProviderError:()=>B2,chain:()=>M2,fromStatic:()=>V2,memoize:()=>T2});ZG.exports=I2($G);var UG=class $ extends Error{constructor(U,G=!0){var W;let Z,X=!0;if(typeof G==="boolean")Z=void 0,X=G;else if(G!=null&&typeof G==="object")Z=G.logger,X=G.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=X,Object.setPrototypeOf(this,$.prototype),(W=Z==null?void 0:Z.debug)==null||W.call(Z,`@smithy/property-provider ${X?"->":"(!)"} ${U}`)}static from(U,G=!0){return Object.assign(new this(U.message,G),U)}};L1(UG,"ProviderError");var U0=UG,GG=class $ extends U0{constructor(U,G=!0){super(U,G);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};L1(GG,"CredentialsProviderError");var K2=GG,WG=class $ extends U0{constructor(U,G=!0){super(U,G);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};L1(WG,"TokenProviderError");var B2=WG,M2=L1((...$)=>async()=>{if($.length===0)throw new U0("No providers in chain");let U;for(let G of $)try{return await G()}catch(W){if(U=W,W==null?void 0:W.tryNextLink)continue;throw W}throw U},"chain"),V2=L1(($)=>()=>Promise.resolve($),"fromStatic"),T2=L1(($,U,G)=>{let W,Z,X,L=!1,Y=L1(async()=>{if(!Z)Z=$();try{W=await Z,X=!0,L=!1}finally{Z=void 0}return W},"coalesceProvider");if(U===void 0)return async(Q)=>{if(!X||(Q==null?void 0:Q.forceRefresh))W=await Y();return W};return async(Q)=>{if(!X||(Q==null?void 0:Q.forceRefresh))W=await Y();if(L)return W;if(G&&!G(W))return L=!0,W;if(U(W))return await Y(),W;return W}},"memoize")});var M1=M((XG)=>{Object.defineProperty(XG,"__esModule",{value:!0});XG.getHomeDir=void 0;var E2=import.meta.require("os"),H2=import.meta.require("path"),Q$={},A2=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},O2=()=>{let{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${H2.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;let Z=A2();if(!Q$[Z])Q$[Z]=E2.homedir();return Q$[Z]};XG.getHomeDir=O2});var F$=M((YG)=>{Object.defineProperty(YG,"__esModule",{value:!0});YG.getSSOTokenFilepath=void 0;var C2=import.meta.require("crypto"),q2=import.meta.require("path"),N2=M1(),j2=($)=>{let G=C2.createHash("sha1").update($).digest("hex");return q2.join(N2.getHomeDir(),".aws","sso","cache",`${G}.json`)};YG.getSSOTokenFilepath=j2});var zG=M((FG)=>{Object.defineProperty(FG,"__esModule",{value:!0});FG.getSSOTokenFromFile=void 0;var f2=import.meta.require("fs"),b2=F$(),{readFile:P2}=f2.promises,S2=async($)=>{let U=b2.getSSOTokenFilepath($),G=await P2(U,"utf8");return JSON.parse(G)};FG.getSSOTokenFromFile=S2});var z$=M((JG)=>{Object.defineProperty(JG,"__esModule",{value:!0});JG.slurpFile=void 0;var k2=import.meta.require("fs"),{readFile:D2}=k2.promises,w$={},h2=($,U)=>{if(!w$[$]||(U===null||U===void 0?void 0:U.ignoreCache))w$[$]=D2($,"utf8");return w$[$]};JG.slurpFile=h2});var K$=M((GR,S1)=>{var{defineProperty:Z0,getOwnPropertyDescriptor:x2,getOwnPropertyNames:v2}=Object,c2=Object.prototype.hasOwnProperty,y=($,U)=>Z0($,"name",{value:U,configurable:!0}),y2=($,U)=>{for(var G in U)Z0($,G,{get:U[G],enumerable:!0})},J$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of v2(U))if(!c2.call($,Z)&&Z!==G)Z0($,Z,{get:()=>U[Z],enumerable:!(W=x2(U,Z))||W.enumerable})}return $},I$=($,U,G)=>(J$($,U,"default"),G&&J$(G,U,"default")),_2=($)=>J$(Z0({},"__esModule",{value:!0}),$),P1={};y2(P1,{CONFIG_PREFIX_SEPARATOR:()=>Y1,DEFAULT_PROFILE:()=>MG,ENV_PROFILE:()=>BG,getProfileName:()=>u2,loadSharedConfigFiles:()=>TG,loadSsoSessionData:()=>e2,parseKnownFiles:()=>UL});S1.exports=_2(P1);I$(P1,M1(),S1.exports);var BG="AWS_PROFILE",MG="default",u2=y(($)=>$.profile||process.env[BG]||MG,"getProfileName");I$(P1,F$(),S1.exports);I$(P1,zG(),S1.exports);var G0=B1(),g2=y(($)=>Object.entries($).filter(([U])=>{let G=U.indexOf(Y1);if(G===-1)return!1;return Object.values(G0.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{let Z=G.indexOf(Y1),X=G.substring(0,Z)===G0.IniSectionType.PROFILE?G.substring(Z+1):G;return U[X]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),W0=import.meta.require("path"),p2=M1(),d2="AWS_CONFIG_FILE",VG=y(()=>process.env[d2]||W0.join(p2.getHomeDir(),".aws","config"),"getConfigFilepath"),s2=M1(),l2="AWS_SHARED_CREDENTIALS_FILE",m2=y(()=>process.env[l2]||W0.join(s2.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),n2=M1(),i2=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,o2=["__proto__","profile __proto__"],R$=y(($)=>{let U={},G,W;for(let Z of $.split(/\r?\n/)){let X=Z.split(/(^|\s)[;#]/)[0].trim();if(X[0]==="["&&X[X.length-1]==="]"){G=void 0,W=void 0;let Y=X.substring(1,X.length-1),Q=i2.exec(Y);if(Q){let[,F,,w]=Q;if(Object.values(G0.IniSectionType).includes(F))G=[F,w].join(Y1)}else G=Y;if(o2.includes(Y))throw new Error(`Found invalid profile name "${Y}"`)}else if(G){let Y=X.indexOf("=");if(![0,-1].includes(Y)){let[Q,F]=[X.substring(0,Y).trim(),X.substring(Y+1).trim()];if(F==="")W=Q;else{if(W&&Z.trimStart()===Z)W=void 0;U[G]=U[G]||{};let w=W?[W,Q].join(Y1):Q;U[G][w]=F}}}}return U},"parseIni"),IG=z$(),KG=y(()=>({}),"swallowError"),Y1=".",TG=y(async($={})=>{let{filepath:U=m2(),configFilepath:G=VG()}=$,W=n2.getHomeDir(),Z="~/",X=U;if(U.startsWith("~/"))X=W0.join(W,U.slice(2));let L=G;if(G.startsWith("~/"))L=W0.join(W,G.slice(2));let Y=await Promise.all([IG.slurpFile(L,{ignoreCache:$.ignoreCache}).then(R$).then(g2).catch(KG),IG.slurpFile(X,{ignoreCache:$.ignoreCache}).then(R$).catch(KG)]);return{configFile:Y[0],credentialsFile:Y[1]}},"loadSharedConfigFiles"),r2=y(($)=>Object.entries($).filter(([U])=>U.startsWith(G0.IniSectionType.SSO_SESSION+Y1)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(Y1)+1)]:W}),{}),"getSsoSessionData"),a2=z$(),t2=y(()=>({}),"swallowError"),e2=y(async($={})=>a2.slurpFile($.configFilepath??VG()).then(R$).then(r2).catch(t2),"loadSsoSessionData"),$L=y((...$)=>{let U={};for(let G of $)for(let[W,Z]of Object.entries(G))if(U[W]!==void 0)Object.assign(U[W],Z);else U[W]=Z;return U},"mergeConfigFiles"),UL=y(async($)=>{let U=await TG($);return $L(U.configFile,U.credentialsFile)},"parseKnownFiles")});var OG=M((WR,AG)=>{var{defineProperty:X0,getOwnPropertyDescriptor:GL,getOwnPropertyNames:WL}=Object,ZL=Object.prototype.hasOwnProperty,V1=($,U)=>X0($,"name",{value:U,configurable:!0}),XL=($,U)=>{for(var G in U)X0($,G,{get:U[G],enumerable:!0})},LL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of WL(U))if(!ZL.call($,Z)&&Z!==G)X0($,Z,{get:()=>U[Z],enumerable:!(W=GL(U,Z))||W.enumerable})}return $},YL=($)=>LL(X0({},"__esModule",{value:!0}),$),HG={};XL(HG,{loadConfig:()=>JL});AG.exports=YL(HG);var k1=Y$();function B$($){try{let 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 $}}V1(B$,"getSelectorName");var QL=V1(($,U)=>async()=>{try{let G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new k1.CredentialsProviderError(G.message||`Not found in ENV: ${B$($.toString())}`,{logger:U})}},"fromEnv"),EG=K$(),FL=V1(($,{preferredFile:U="config",...G}={})=>async()=>{let W=EG.getProfileName(G),{configFile:Z,credentialsFile:X}=await EG.loadSharedConfigFiles(G),L=X[W]||{},Y=Z[W]||{},Q=U==="config"?{...L,...Y}:{...Y,...L};try{let w=$(Q,U==="config"?Z:X);if(w===void 0)throw new Error;return w}catch(F){throw new k1.CredentialsProviderError(F.message||`Not found in config files w/ profile [${W}]: ${B$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),wL=V1(($)=>typeof $==="function","isFunction"),zL=V1(($)=>wL($)?async()=>await $():k1.fromStatic($),"fromStatic"),JL=V1(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>k1.memoize(k1.chain(QL($),FL(U,W),zL(G))),"loadConfig")});var bG=M((jG)=>{Object.defineProperty(jG,"__esModule",{value:!0});jG.getEndpointUrlConfig=void 0;var CG=K$(),qG="AWS_ENDPOINT_URL",NG="endpoint_url",RL=($)=>({environmentVariableSelector:(U)=>{let G=$.split(" ").map((X)=>X.toUpperCase()),W=U[[qG,...G].join("_")];if(W)return W;let Z=U[qG];if(Z)return Z;return},configFileSelector:(U,G)=>{if(G&&U.services){let Z=G[["services",U.services].join(CG.CONFIG_PREFIX_SEPARATOR)];if(Z){let X=$.split(" ").map((Y)=>Y.toLowerCase()),L=Z[[X.join("_"),NG].join(CG.CONFIG_PREFIX_SEPARATOR)];if(L)return L}}let W=U[NG];if(W)return W;return},default:void 0});jG.getEndpointUrlConfig=RL});var M$=M((PG)=>{Object.defineProperty(PG,"__esModule",{value:!0});PG.getEndpointFromConfig=void 0;var IL=OG(),KL=bG(),BL=async($)=>IL.loadConfig(KL.getEndpointUrlConfig($!==null&&$!==void 0?$:""))();PG.getEndpointFromConfig=BL});var xG=M((LR,hG)=>{var{defineProperty:L0,getOwnPropertyDescriptor:ML,getOwnPropertyNames:VL}=Object,TL=Object.prototype.hasOwnProperty,EL=($,U)=>L0($,"name",{value:U,configurable:!0}),HL=($,U)=>{for(var G in U)L0($,G,{get:U[G],enumerable:!0})},AL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of VL(U))if(!TL.call($,Z)&&Z!==G)L0($,Z,{get:()=>U[Z],enumerable:!(W=ML(U,Z))||W.enumerable})}return $},OL=($)=>AL(L0({},"__esModule",{value:!0}),$),kG={};HL(kG,{parseQueryString:()=>DG});hG.exports=OL(kG);function DG($){let U={};if($=$.replace(/^\?/,""),$)for(let G of $.split("&")){let[W,Z=null]=G.split("=");if(W=decodeURIComponent(W),Z)Z=decodeURIComponent(Z);if(!(W in U))U[W]=Z;else if(Array.isArray(U[W]))U[W].push(Z);else U[W]=[U[W],Z]}return U}EL(DG,"parseQueryString")});var _G=M((YR,yG)=>{var{defineProperty:Y0,getOwnPropertyDescriptor:CL,getOwnPropertyNames:qL}=Object,NL=Object.prototype.hasOwnProperty,jL=($,U)=>Y0($,"name",{value:U,configurable:!0}),fL=($,U)=>{for(var G in U)Y0($,G,{get:U[G],enumerable:!0})},bL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of qL(U))if(!NL.call($,Z)&&Z!==G)Y0($,Z,{get:()=>U[Z],enumerable:!(W=CL(U,Z))||W.enumerable})}return $},PL=($)=>bL(Y0({},"__esModule",{value:!0}),$),vG={};fL(vG,{parseUrl:()=>cG});yG.exports=PL(vG);var SL=xG(),cG=jL(($)=>{if(typeof $==="string")return cG(new URL($));let{hostname:U,pathname:G,port:W,protocol:Z,search:X}=$,L;if(X)L=SL.parseQueryString(X);return{hostname:U,port:W?parseInt(W):void 0,protocol:Z,path:G,query:L}},"parseUrl")});var nG=M((QR,mG)=>{var{defineProperty:F0,getOwnPropertyDescriptor:kL,getOwnPropertyNames:DL}=Object,hL=Object.prototype.hasOwnProperty,d=($,U)=>F0($,"name",{value:U,configurable:!0}),xL=($,U)=>{for(var G in U)F0($,G,{get:U[G],enumerable:!0})},vL=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of DL(U))if(!hL.call($,Z)&&Z!==G)F0($,Z,{get:()=>U[Z],enumerable:!(W=kL(U,Z))||W.enumerable})}return $},cL=($)=>vL(F0({},"__esModule",{value:!0}),$),gG={};xL(gG,{endpointMiddleware:()=>sG,endpointMiddlewareOptions:()=>lG,getEndpointFromInstructions:()=>pG,getEndpointPlugin:()=>nL,resolveEndpointConfig:()=>oL,resolveParams:()=>dG,toEndpointV1:()=>V$});mG.exports=cL(gG);var yL=d(async($)=>{let U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(dL(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!pL(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),_L=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,uL=/(\d+\.){3}\d+/,gL=/\.\./,pL=d(($)=>_L.test($)&&!uL.test($)&&!gL.test($),"isDnsCompatibleBucketName"),dL=d(($)=>{let[U,G,W,,,Z]=$.split(":"),X=U==="arn"&&$.split(":").length>=6,L=Boolean(X&&G&&W&&Z);if(X&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L},"isArnBucketName"),sL=d(($,U,G)=>{let W=d(async()=>{let Z=G[$]??G[U];if(typeof Z==="function")return Z();return Z},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{let Z=typeof G.credentials==="function"?await G.credentials():G.credentials;return(Z==null?void 0:Z.credentialScope)??(Z==null?void 0:Z.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{let Z=typeof G.credentials==="function"?await G.credentials():G.credentials;return(Z==null?void 0:Z.accountId)??(Z==null?void 0:Z.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{let Z=await W();if(Z&&typeof Z==="object"){if("url"in Z)return Z.url.href;if("hostname"in Z){let{protocol:X,hostname:L,port:Y,path:Q}=Z;return`${X}//${L}${Y?":"+Y:""}${Q}`}}return Z};return W},"createConfigValueProvider"),lL=M$(),uG=_G(),V$=d(($)=>{if(typeof $==="object"){if("url"in $)return uG.parseUrl($.url);return $}return uG.parseUrl($)},"toEndpointV1"),pG=d(async($,U,G,W)=>{if(!G.endpoint){let L;if(G.serviceConfiguredEndpoint)L=await G.serviceConfiguredEndpoint();else L=await lL.getEndpointFromConfig(G.serviceId);if(L)G.endpoint=()=>Promise.resolve(V$(L))}let Z=await dG($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(Z,W)},"getEndpointFromInstructions"),dG=d(async($,U,G)=>{var W;let Z={},X=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[L,Y]of Object.entries(X))switch(Y.type){case"staticContextParams":Z[L]=Y.value;break;case"contextParams":Z[L]=$[Y.name];break;case"clientContextParams":case"builtInParams":Z[L]=await sL(Y.name,L,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Y))}if(Object.keys(X).length===0)Object.assign(Z,G);if(String(G.serviceId).toLowerCase()==="s3")await yL(Z);return Z},"resolveParams"),Q0=l(),sG=d(({config:$,instructions:U})=>{return(G,W)=>async(Z)=>{var X,L,Y;let Q=await pG(Z.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=Q,W.authSchemes=(X=Q.properties)==null?void 0:X.authSchemes;let F=(L=W.authSchemes)==null?void 0:L[0];if(F){W.signing_region=F.signingRegion,W.signing_service=F.signingName;let w=Q0.getSmithyContext(W),z=(Y=w==null?void 0:w.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({...Z})}},"endpointMiddleware"),mL=t1(),lG={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:mL.serializerMiddlewareOption.name},nL=d(($,U)=>({applyToStack:(G)=>{G.addRelativeTo(sG({config:$,instructions:U}),lG)}}),"getEndpointPlugin"),iL=M$(),oL=d(($)=>{let U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>V$(await Q0.normalizeProvider(G)()):void 0,X={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:Q0.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:Q0.normalizeProvider($.useFipsEndpoint??!1)},L=void 0;return X.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!L)L=iL.getEndpointFromConfig($.serviceId);return L},X},"resolveEndpointConfig")});var n=M((FR,G6)=>{var{defineProperty:w0,getOwnPropertyDescriptor:rL,getOwnPropertyNames:aL}=Object,tL=Object.prototype.hasOwnProperty,r=($,U)=>w0($,"name",{value:U,configurable:!0}),eL=($,U)=>{for(var G in U)w0($,G,{get:U[G],enumerable:!0})},$Y=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of aL(U))if(!tL.call($,Z)&&Z!==G)w0($,Z,{get:()=>U[Z],enumerable:!(W=rL(U,Z))||W.enumerable})}return $},UY=($)=>$Y(w0({},"__esModule",{value:!0}),$),iG={};eL(iG,{Field:()=>ZY,Fields:()=>XY,HttpRequest:()=>LY,HttpResponse:()=>YY,IHttpRequest:()=>oG.HttpRequest,getHttpHandlerExtensionConfiguration:()=>GY,isValidHostname:()=>U6,resolveHttpHandlerRuntimeConfig:()=>WY});G6.exports=UY(iG);var GY=r(($)=>{let U=$.httpHandler;return{setHttpHandler(G){U=G},httpHandler(){return U},updateHttpClientConfig(G,W){U.updateHttpClientConfig(G,W)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),WY=r(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),oG=B1(),rG=class ${constructor({name:U,kind:G=oG.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(rG,"Field");var ZY=rG,aG=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(aG,"Fields");var XY=aG,tG=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){let G=new $({...U,headers:{...U.headers}});if(G.query)G.query=eG(G.query);return G}static isInstance(U){if(!U)return!1;let 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(tG,"HttpRequest");var LY=tG;function eG($){return Object.keys($).reduce((U,G)=>{let W=$[G];return{...U,[G]:Array.isArray(W)?[...W]:W}},{})}r(eG,"cloneQuery");var $6=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;let G=U;return typeof G.statusCode==="number"&&typeof G.headers==="object"}};r($6,"HttpResponse");var YY=$6;function U6($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}r(U6,"isValidHostname")});var T$=M((wR,L6)=>{var{defineProperty:z0,getOwnPropertyDescriptor:QY,getOwnPropertyNames:FY}=Object,wY=Object.prototype.hasOwnProperty,T1=($,U)=>z0($,"name",{value:U,configurable:!0}),zY=($,U)=>{for(var G in U)z0($,G,{get:U[G],enumerable:!0})},JY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of FY(U))if(!wY.call($,Z)&&Z!==G)z0($,Z,{get:()=>U[Z],enumerable:!(W=QY(U,Z))||W.enumerable})}return $},RY=($)=>JY(z0({},"__esModule",{value:!0}),$),W6={};zY(W6,{isClockSkewCorrectedError:()=>Z6,isClockSkewError:()=>EY,isRetryableByTrait:()=>TY,isServerError:()=>AY,isThrottlingError:()=>HY,isTransientError:()=>X6});L6.exports=RY(W6);var IY=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],KY=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],BY=["TimeoutError","RequestTimeout","RequestTimeoutException"],MY=[500,502,503,504],VY=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],TY=T1(($)=>$.$retryable!==void 0,"isRetryableByTrait"),EY=T1(($)=>IY.includes($.name),"isClockSkewError"),Z6=T1(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),HY=T1(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||KY.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),X6=T1(($)=>{var U;return Z6($)||BY.includes($.name)||VY.includes(($==null?void 0:$.code)||"")||MY.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),AY=T1(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){let G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!X6($))return!0;return!1}return!1},"isServerError")});var E6=M((zR,T6)=>{var{defineProperty:J0,getOwnPropertyDescriptor:OY,getOwnPropertyNames:CY}=Object,qY=Object.prototype.hasOwnProperty,s=($,U)=>J0($,"name",{value:U,configurable:!0}),NY=($,U)=>{for(var G in U)J0($,G,{get:U[G],enumerable:!0})},jY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of CY(U))if(!qY.call($,Z)&&Z!==G)J0($,Z,{get:()=>U[Z],enumerable:!(W=OY(U,Z))||W.enumerable})}return $},fY=($)=>jY(J0({},"__esModule",{value:!0}),$),Q6={};NY(Q6,{AdaptiveRetryStrategy:()=>hY,ConfiguredRetryStrategy:()=>xY,DEFAULT_MAX_ATTEMPTS:()=>E$,DEFAULT_RETRY_DELAY_BASE:()=>D1,DEFAULT_RETRY_MODE:()=>bY,DefaultRateLimiter:()=>z6,INITIAL_RETRY_TOKENS:()=>H$,INVOCATION_ID_HEADER:()=>SY,MAXIMUM_RETRY_DELAY:()=>A$,NO_RETRY_INCREMENT:()=>K6,REQUEST_HEADER:()=>kY,RETRY_COST:()=>R6,RETRY_MODES:()=>F6,StandardRetryStrategy:()=>O$,THROTTLING_RETRY_DELAY_BASE:()=>J6,TIMEOUT_RETRY_COST:()=>I6});T6.exports=fY(Q6);var F6=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(F6||{}),E$=3,bY="standard",PY=T$(),w6=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;let 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){let G=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((W)=>setTimeout(W,G))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){let U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}let 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(),PY.isThrottlingError(U)){let Z=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=Z,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),G=this.cubicThrottle(Z),this.enableTokenBucket()}else this.calculateTimeWindow(),G=this.cubicSuccess(this.getCurrentTimeInSeconds());let 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(){let U=this.getCurrentTimeInSeconds(),G=Math.floor(U*2)/2;if(this.requestCount++,G>this.lastTxRateBucket){let 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))}};s(w6,"DefaultRateLimiter");var z6=w6,D1=100,A$=20000,J6=500,H$=500,R6=5,I6=10,K6=1,SY="amz-sdk-invocation-id",kY="amz-sdk-request",DY=s(()=>{let $=D1;return{computeNextBackoffDelay:s((W)=>{return Math.floor(Math.min(A$,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:s((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),Y6=s(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:s(()=>U,"getRetryCount"),getRetryDelay:s(()=>Math.min(A$,$),"getRetryDelay"),getRetryCost:s(()=>G,"getRetryCost")}},"createDefaultRetryToken"),B6=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=H$,this.retryBackoffStrategy=DY(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return Y6({retryDelay:D1,retryCount:0})}async refreshRetryTokenForRetry(U,G){let W=await this.getMaxAttempts();if(this.shouldRetry(U,G,W)){let Z=G.errorType;this.retryBackoffStrategy.setDelayBase(Z==="THROTTLING"?J6:D1);let X=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),L=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,X):X,Y=this.getCapacityCost(Z);return this.capacity-=Y,Y6({retryDelay:L,retryCount:U.getRetryCount()+1,retryCost:Y})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(H$,this.capacity+(U.getRetryCost()??K6))}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 ${E$}`),E$}}shouldRetry(U,G,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?I6:R6}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};s(B6,"StandardRetryStrategy");var O$=B6,M6=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";let{rateLimiter:W}=G??{};this.rateLimiter=W??new z6,this.standardRetryStrategy=new O$(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)}};s(M6,"AdaptiveRetryStrategy");var hY=M6,V6=class $ extends O${constructor(U,G=D1){super(typeof U==="function"?U:async()=>U);if(typeof G==="number")this.computeNextBackoffDelay=()=>G;else this.computeNextBackoffDelay=G}async refreshRetryTokenForRetry(U,G){let W=await super.refreshRetryTokenForRetry(U,G);return W.getRetryDelay=()=>this.computeNextBackoffDelay(W.getRetryCount()),W}};s(V6,"ConfiguredRetryStrategy");var xY=V6});var q6=M((JR,C6)=>{var{defineProperty:R0,getOwnPropertyDescriptor:vY,getOwnPropertyNames:cY}=Object,yY=Object.prototype.hasOwnProperty,_=($,U)=>R0($,"name",{value:U,configurable:!0}),_Y=($,U)=>{for(var G in U)R0($,G,{get:U[G],enumerable:!0})},uY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of cY(U))if(!yY.call($,Z)&&Z!==G)R0($,Z,{get:()=>U[Z],enumerable:!(W=vY(U,Z))||W.enumerable})}return $},gY=($)=>uY(R0({},"__esModule",{value:!0}),$),O6={};_Y(O6,{constructStack:()=>C$});C6.exports=gY(O6);var Q1=_(($,U)=>{let G=[];if($)G.push($);if(U)for(let W of U)G.push(W);return G},"getAllAliases"),a=_(($,U)=>{return`${$||"anonymous"}${U&&U.length>0?` (a.k.a. ${U.join(",")})`:""}`},"getMiddlewareNameWithAliases"),C$=_(()=>{let $=[],U=[],G=!1,W=new Set,Z=_((z)=>z.sort((R,J)=>H6[J.step]-H6[R.step]||A6[J.priority||"normal"]-A6[R.priority||"normal"]),"sort"),X=_((z)=>{let R=!1,J=_((I)=>{let V=Q1(I.name,I.aliases);if(V.includes(z)){R=!0;for(let B of V)W.delete(B);return!1}return!0},"filterCb");return $=$.filter(J),U=U.filter(J),R},"removeByName"),L=_((z)=>{let R=!1,J=_((I)=>{if(I.middleware===z){R=!0;for(let V of Q1(I.name,I.aliases))W.delete(V);return!1}return!0},"filterCb");return $=$.filter(J),U=U.filter(J),R},"removeByReference"),Y=_((z)=>{var R;return $.forEach((J)=>{z.add(J.middleware,{...J})}),U.forEach((J)=>{z.addRelativeTo(J.middleware,{...J})}),(R=z.identifyOnResolve)==null||R.call(z,w.identifyOnResolve()),z},"cloneTo"),Q=_((z)=>{let R=[];return z.before.forEach((J)=>{if(J.before.length===0&&J.after.length===0)R.push(J);else R.push(...Q(J))}),R.push(z),z.after.reverse().forEach((J)=>{if(J.before.length===0&&J.after.length===0)R.push(J);else R.push(...Q(J))}),R},"expandRelativeMiddlewareList"),F=_((z=!1)=>{let R=[],J=[],I={};return $.forEach((B)=>{let T={...B,before:[],after:[]};for(let E of Q1(T.name,T.aliases))I[E]=T;R.push(T)}),U.forEach((B)=>{let T={...B,before:[],after:[]};for(let E of Q1(T.name,T.aliases))I[E]=T;J.push(T)}),J.forEach((B)=>{if(B.toMiddleware){let T=I[B.toMiddleware];if(T===void 0){if(z)return;throw new Error(`${B.toMiddleware} is not found when adding ${a(B.name,B.aliases)} middleware ${B.relation} ${B.toMiddleware}`)}if(B.relation==="after")T.after.push(B);if(B.relation==="before")T.before.push(B)}}),Z(R).map(Q).reduce((B,T)=>{return B.push(...T),B},[])},"getMiddlewareList"),w={add:(z,R={})=>{let{name:J,override:I,aliases:V}=R,B={step:"initialize",priority:"normal",middleware:z,...R},T=Q1(J,V);if(T.length>0){if(T.some((E)=>W.has(E))){if(!I)throw new Error(`Duplicate middleware name '${a(J,V)}'`);for(let E of T){let H=$.findIndex((P)=>{var D;return P.name===E||((D=P.aliases)==null?void 0:D.some((X1)=>X1===E))});if(H===-1)continue;let A=$[H];if(A.step!==B.step||B.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(J,V)}" middleware with ${B.priority} priority in ${B.step} step.`);$.splice(H,1)}}for(let E of T)W.add(E)}$.push(B)},addRelativeTo:(z,R)=>{let{name:J,override:I,aliases:V}=R,B={middleware:z,...R},T=Q1(J,V);if(T.length>0){if(T.some((E)=>W.has(E))){if(!I)throw new Error(`Duplicate middleware name '${a(J,V)}'`);for(let E of T){let H=U.findIndex((P)=>{var D;return P.name===E||((D=P.aliases)==null?void 0:D.some((X1)=>X1===E))});if(H===-1)continue;let A=U[H];if(A.toMiddleware!==B.toMiddleware||A.relation!==B.relation)throw new Error(`"${a(A.name,A.aliases)}" middleware ${A.relation} "${A.toMiddleware}" middleware cannot be overridden by "${a(J,V)}" middleware ${B.relation} "${B.toMiddleware}" middleware.`);U.splice(H,1)}}for(let E of T)W.add(E)}U.push(B)},clone:()=>Y(C$()),use:(z)=>{z.applyToStack(w)},remove:(z)=>{if(typeof z==="string")return X(z);else return L(z)},removeByTag:(z)=>{let R=!1,J=_((I)=>{let{tags:V,name:B,aliases:T}=I;if(V&&V.includes(z)){let E=Q1(B,T);for(let H of E)W.delete(H);return R=!0,!1}return!0},"filterCb");return $=$.filter(J),U=U.filter(J),R},concat:(z)=>{var R;let J=Y(C$());return J.use(z),J.identifyOnResolve(G||J.identifyOnResolve()||(((R=z.identifyOnResolve)==null?void 0:R.call(z))??!1)),J},applyToStack:Y,identify:()=>{return F(!0).map((z)=>{let R=z.step??z.relation+" "+z.toMiddleware;return a(z.name,z.aliases)+" - "+R})},identifyOnResolve(z){if(typeof z==="boolean")G=z;return G},resolve:(z,R)=>{for(let J of F().map((I)=>I.middleware).reverse())z=J(z,R);if(G)console.log(w.identify());return z}};return w},"constructStack"),H6={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},A6={high:3,normal:2,low:1}});var q$=M((RR,j6)=>{var{defineProperty:I0,getOwnPropertyDescriptor:pY,getOwnPropertyNames:dY}=Object,sY=Object.prototype.hasOwnProperty,lY=($,U)=>I0($,"name",{value:U,configurable:!0}),mY=($,U)=>{for(var G in U)I0($,G,{get:U[G],enumerable:!0})},nY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of dY(U))if(!sY.call($,Z)&&Z!==G)I0($,Z,{get:()=>U[Z],enumerable:!(W=pY(U,Z))||W.enumerable})}return $},iY=($)=>nY(I0({},"__esModule",{value:!0}),$),N6={};mY(N6,{isArrayBuffer:()=>oY});j6.exports=iY(N6);var oY=lY(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var h1=M((IR,P6)=>{var{defineProperty:K0,getOwnPropertyDescriptor:rY,getOwnPropertyNames:aY}=Object,tY=Object.prototype.hasOwnProperty,f6=($,U)=>K0($,"name",{value:U,configurable:!0}),eY=($,U)=>{for(var G in U)K0($,G,{get:U[G],enumerable:!0})},$9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of aY(U))if(!tY.call($,Z)&&Z!==G)K0($,Z,{get:()=>U[Z],enumerable:!(W=rY(U,Z))||W.enumerable})}return $},U9=($)=>$9(K0({},"__esModule",{value:!0}),$),b6={};eY(b6,{fromArrayBuffer:()=>W9,fromString:()=>Z9});P6.exports=U9(b6);var G9=q$(),N$=import.meta.require("buffer"),W9=f6(($,U=0,G=$.byteLength-U)=>{if(!G9.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return N$.Buffer.from($,U,G)},"fromArrayBuffer"),Z9=f6(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?N$.Buffer.from($,U):N$.Buffer.from($)},"fromString")});var D6=M((S6)=>{Object.defineProperty(S6,"__esModule",{value:!0});S6.fromBase64=void 0;var X9=h1(),L9=/^[A-Za-z0-9+/]*={0,2}$/,Y9=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!L9.exec($))throw new TypeError("Invalid base64 string.");let U=X9.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};S6.fromBase64=Y9});var t=M((BR,c6)=>{var{defineProperty:B0,getOwnPropertyDescriptor:Q9,getOwnPropertyNames:F9}=Object,w9=Object.prototype.hasOwnProperty,j$=($,U)=>B0($,"name",{value:U,configurable:!0}),z9=($,U)=>{for(var G in U)B0($,G,{get:U[G],enumerable:!0})},J9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of F9(U))if(!w9.call($,Z)&&Z!==G)B0($,Z,{get:()=>U[Z],enumerable:!(W=Q9(U,Z))||W.enumerable})}return $},R9=($)=>J9(B0({},"__esModule",{value:!0}),$),h6={};z9(h6,{fromUtf8:()=>v6,toUint8Array:()=>I9,toUtf8:()=>K9});c6.exports=R9(h6);var x6=h1(),v6=j$(($)=>{let U=x6.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),I9=j$(($)=>{if(typeof $==="string")return v6($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),K9=j$(($)=>{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 x6.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var u6=M((y6)=>{Object.defineProperty(y6,"__esModule",{value:!0});y6.toBase64=void 0;var B9=h1(),M9=t(),V9=($)=>{let U;if(typeof $==="string")U=M9.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 B9.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};y6.toBase64=V9});var V0=M((VR,M0)=>{var{defineProperty:g6,getOwnPropertyDescriptor:T9,getOwnPropertyNames:E9}=Object,H9=Object.prototype.hasOwnProperty,f$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of E9(U))if(!H9.call($,Z)&&Z!==G)g6($,Z,{get:()=>U[Z],enumerable:!(W=T9(U,Z))||W.enumerable})}return $},p6=($,U,G)=>(f$($,U,"default"),G&&f$(G,U,"default")),A9=($)=>f$(g6({},"__esModule",{value:!0}),$),b$={};M0.exports=A9(b$);p6(b$,D6(),M0.exports);p6(b$,u6(),M0.exports)});var l6=M((d6)=>{Object.defineProperty(d6,"__esModule",{value:!0});d6.getAwsChunkedEncodingStream=void 0;var O9=import.meta.require("stream"),C9=($,U)=>{let{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:Z,checksumLocationName:X,streamHasher:L}=U,Y=G!==void 0&&Z!==void 0&&X!==void 0&&L!==void 0,Q=Y?L(Z,$):void 0,F=new O9.Readable({read:()=>{}});return $.on("data",(w)=>{let z=W(w)||0;F.push(`${z.toString(16)}\r\n`),F.push(w),F.push("\r\n")}),$.on("end",async()=>{if(F.push("0\r\n"),Y){let w=G(await Q);F.push(`${X}:${w}\r\n`),F.push("\r\n")}F.push(null)}),F};d6.getAwsChunkedEncodingStream=C9});var S$=M((ER,i6)=>{var{defineProperty:T0,getOwnPropertyDescriptor:q9,getOwnPropertyNames:N9}=Object,j9=Object.prototype.hasOwnProperty,P$=($,U)=>T0($,"name",{value:U,configurable:!0}),f9=($,U)=>{for(var G in U)T0($,G,{get:U[G],enumerable:!0})},b9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of N9(U))if(!j9.call($,Z)&&Z!==G)T0($,Z,{get:()=>U[Z],enumerable:!(W=q9(U,Z))||W.enumerable})}return $},P9=($)=>b9(T0({},"__esModule",{value:!0}),$),m6={};f9(m6,{escapeUri:()=>n6,escapeUriPath:()=>k9});i6.exports=P9(m6);var n6=P$(($)=>encodeURIComponent($).replace(/[!'()*]/g,S9),"escapeUri"),S9=P$(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),k9=P$(($)=>$.split("/").map(n6).join("/"),"escapeUriPath")});var D$=M((HR,a6)=>{var{defineProperty:E0,getOwnPropertyDescriptor:D9,getOwnPropertyNames:h9}=Object,x9=Object.prototype.hasOwnProperty,v9=($,U)=>E0($,"name",{value:U,configurable:!0}),c9=($,U)=>{for(var G in U)E0($,G,{get:U[G],enumerable:!0})},y9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of h9(U))if(!x9.call($,Z)&&Z!==G)E0($,Z,{get:()=>U[Z],enumerable:!(W=D9(U,Z))||W.enumerable})}return $},_9=($)=>y9(E0({},"__esModule",{value:!0}),$),o6={};c9(o6,{buildQueryString:()=>r6});a6.exports=_9(o6);var k$=S$();function r6($){let U=[];for(let G of Object.keys($).sort()){let W=$[G];if(G=k$.escapeUri(G),Array.isArray(W))for(let Z=0,X=W.length;Z<X;Z++)U.push(`${G}=${k$.escapeUri(W[Z])}`);else{let Z=G;if(W||typeof W==="string")Z+=`=${k$.escapeUri(W)}`;U.push(Z)}}return U.join("&")}v9(r6,"buildQueryString")});var B8=M((AR,K8)=>{var{create:u9,defineProperty:x1,getOwnPropertyDescriptor:g9,getOwnPropertyNames:p9,getPrototypeOf:d9}=Object,s9=Object.prototype.hasOwnProperty,O=($,U)=>x1($,"name",{value:U,configurable:!0}),l9=($,U)=>{for(var G in U)x1($,G,{get:U[G],enumerable:!0})},G8=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of p9(U))if(!s9.call($,Z)&&Z!==G)x1($,Z,{get:()=>U[Z],enumerable:!(W=g9(U,Z))||W.enumerable})}return $},m9=($,U,G)=>(G=$!=null?u9(d9($)):{},G8(U||!$||!$.__esModule?x1(G,"default",{value:$,enumerable:!0}):G,$)),n9=($)=>G8(x1({},"__esModule",{value:!0}),$),W8={};l9(W8,{DEFAULT_REQUEST_TIMEOUT:()=>e9,NodeHttp2Handler:()=>ZQ,NodeHttpHandler:()=>$Q,streamCollector:()=>LQ});K8.exports=n9(W8);var Z8=n(),X8=D$(),h$=import.meta.require("http"),x$=import.meta.require("https"),i9=["ECONNRESET","EPIPE","ETIMEDOUT"],L8=O(($)=>{let U={};for(let G of Object.keys($)){let W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),t6=1000,o9=O(($,U,G=0)=>{if(!G)return-1;let W=O((Z)=>{let X=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G-Z),L=O((Y)=>{if(Y==null?void 0:Y.connecting)Y.on("connect",()=>{clearTimeout(X)});else clearTimeout(X)},"doWithSocket");if($.socket)L($.socket);else $.on("socket",L)},"registerTimeout");if(G<2000)return W(0),0;return setTimeout(W.bind(null,t6),t6)},"setConnectionTimeout"),r9=3000,a9=O(($,{keepAlive:U,keepAliveMsecs:G},W=r9)=>{if(U!==!0)return-1;let Z=O(()=>{if($.socket)$.socket.setKeepAlive(U,G||0);else $.on("socket",(X)=>{X.setKeepAlive(U,G||0)})},"registerListener");if(W===0)return Z(),0;return setTimeout(Z,W)},"setSocketKeepAlive"),e6=3000,t9=O(($,U,G=0)=>{let W=O((Z)=>{$.setTimeout(G-Z,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${G} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<G&&G<6000)return W(0),0;return setTimeout(W.bind(null,G===0?0:e6),e6)},"setSocketTimeout"),Y8=import.meta.require("stream"),$8=1000;async function v$($,U,G=$8){let W=U.headers??{},Z=W.Expect||W.expect,X=-1,L=!1;if(Z==="100-continue")await Promise.race([new Promise((Y)=>{X=Number(setTimeout(Y,Math.max($8,G)))}),new Promise((Y)=>{$.on("continue",()=>{clearTimeout(X),Y()}),$.on("error",()=>{L=!0,clearTimeout(X),Y()})})]);if(!L)Q8($,U.body)}O(v$,"writeRequestBody");function Q8($,U){if(U instanceof Y8.Readable){U.pipe($);return}if(U){if(Buffer.isBuffer(U)||typeof U==="string"){$.end(U);return}let 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()}O(Q8,"writeBody");var e9=0,F8=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((Z)=>{G(this.resolveDefaultConfig(Z))}).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 Z,X,L;let{sockets:Y,requests:Q,maxSockets:F}=U;if(typeof F!=="number"||F===1/0)return G;let w=15000;if(Date.now()-w<G)return G;if(Y&&Q)for(let z in Y){let R=((Z=Y[z])==null?void 0:Z.length)??0,J=((X=Q[z])==null?void 0:X.length)??0;if(R>=F&&J>=2*F)return(L=W==null?void 0:W.warn)==null||L.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${R} and ${J} 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){let{requestTimeout:G,connectionTimeout:W,socketTimeout:Z,httpAgent:X,httpsAgent:L}=U||{},Y=!0,Q=50;return{connectionTimeout:W,requestTimeout:G??Z,httpAgent:(()=>{if(X instanceof h$.Agent||typeof(X==null?void 0:X.destroy)==="function")return X;return new h$.Agent({keepAlive:!0,maxSockets:50,...X})})(),httpsAgent:(()=>{if(L instanceof x$.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new x$.Agent({keepAlive:!0,maxSockets:50,...L})})(),logger:console}}destroy(){var U,G,W,Z;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(Z=(W=this.config)==null?void 0:W.httpsAgent)==null||Z.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;return new Promise((W,Z)=>{let X=void 0,L=[],Y=O(async(H)=>{await X,L.forEach(clearTimeout),W(H)},"resolve"),Q=O(async(H)=>{await X,L.forEach(clearTimeout),Z(H)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){let H=new Error("Request aborted");H.name="AbortError",Q(H);return}let F=U.protocol==="https:",w=F?this.config.httpsAgent:this.config.httpAgent;L.push(setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(w,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let z=X8.buildQueryString(U.query||{}),R=void 0;if(U.username!=null||U.password!=null){let H=U.username??"",A=U.password??"";R=`${H}:${A}`}let J=U.path;if(z)J+=`?${z}`;if(U.fragment)J+=`#${U.fragment}`;let I=U.hostname??"";if(I[0]==="["&&I.endsWith("]"))I=U.hostname.slice(1,-1);else I=U.hostname;let V={headers:U.headers,host:I,method:U.method,path:J,port:U.port,agent:w,auth:R},T=(F?x$.request:h$.request)(V,(H)=>{let A=new Z8.HttpResponse({statusCode:H.statusCode||-1,reason:H.statusMessage,headers:L8(H.headers),body:H});Y({response:A})});if(T.on("error",(H)=>{if(i9.includes(H.code))Q(Object.assign(H,{name:"TimeoutError"}));else Q(H)}),G){let H=O(()=>{T.destroy();let A=new Error("Request aborted");A.name="AbortError",Q(A)},"onAbort");if(typeof G.addEventListener==="function"){let A=G;A.addEventListener("abort",H,{once:!0}),T.once("close",()=>A.removeEventListener("abort",H))}else G.onabort=H}L.push(o9(T,Q,this.config.connectionTimeout)),L.push(t9(T,Q,this.config.requestTimeout));let E=V.agent;if(typeof E==="object"&&"keepAlive"in E)L.push(a9(T,{keepAlive:E.keepAlive,keepAliveMsecs:E.keepAliveMsecs}));X=v$(T,U,this.config.requestTimeout).catch((H)=>{return L.forEach(clearTimeout),Z(H)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};O(F8,"NodeHttpHandler");var $Q=F8,U8=import.meta.require("http2"),UQ=m9(import.meta.require("http2")),w8=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()}}};O(w8,"NodeHttp2ConnectionPool");var GQ=w8,z8=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){let W=this.getUrlString(U),Z=this.sessionCache.get(W);if(Z){let Q=Z.poll();if(Q&&!this.config.disableConcurrency)return Q}let X=UQ.default.connect(W);if(this.config.maxConcurrency)X.settings({maxConcurrentStreams:this.config.maxConcurrency},(Q)=>{if(Q)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});X.unref();let L=O(()=>{X.destroy(),this.deleteSession(W,X)},"destroySessionCb");if(X.on("goaway",L),X.on("error",L),X.on("frameError",L),X.on("close",()=>this.deleteSession(W,X)),G.requestTimeout)X.setTimeout(G.requestTimeout,L);let Y=this.sessionCache.get(W)||new GQ;return Y.offerLast(X),this.sessionCache.set(W,Y),X}deleteSession(U,G){let 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;let Z=this.getUrlString(U);(W=this.sessionCache.get(Z))==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()}};O(z8,"NodeHttp2ConnectionManager");var WQ=z8,J8=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new WQ({}),this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((Z)=>{G(Z||{})}).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)}let{requestTimeout:W,disableConcurrentStreams:Z}=this.config;return new Promise((X,L)=>{var Y;let Q=!1,F=void 0,w=O(async(j)=>{await F,X(j)},"resolve"),z=O(async(j)=>{await F,L(j)},"reject");if(G==null?void 0:G.aborted){Q=!0;let j=new Error("Request aborted");j.name="AbortError",z(j);return}let{hostname:R,method:J,port:I,protocol:V,query:B}=U,T="";if(U.username!=null||U.password!=null){let j=U.username??"",p=U.password??"";T=`${j}:${p}@`}let E=`${V}//${T}${R}${I?`:${I}`:""}`,H={destination:new URL(E)},A=this.connectionManager.lease(H,{requestTimeout:(Y=this.config)==null?void 0:Y.sessionTimeout,disableConcurrentStreams:Z||!1}),P=O((j)=>{if(Z)this.destroySession(A);Q=!0,z(j)},"rejectWithDestroy"),D=X8.buildQueryString(B||{}),X1=U.path;if(D)X1+=`?${D}`;if(U.fragment)X1+=`#${U.fragment}`;let v=A.request({...U.headers,[U8.constants.HTTP2_HEADER_PATH]:X1,[U8.constants.HTTP2_HEADER_METHOD]:J});if(A.ref(),v.on("response",(j)=>{let p=new Z8.HttpResponse({statusCode:j[":status"]||-1,headers:L8(j),body:v});if(Q=!0,w({response:p}),Z)A.close(),this.connectionManager.deleteSession(E,A)}),W)v.setTimeout(W,()=>{v.close();let j=new Error(`Stream timed out because of no activity for ${W} ms`);j.name="TimeoutError",P(j)});if(G){let j=O(()=>{v.close();let p=new Error("Request aborted");p.name="AbortError",P(p)},"onAbort");if(typeof G.addEventListener==="function"){let p=G;p.addEventListener("abort",j,{once:!0}),v.once("close",()=>p.removeEventListener("abort",j))}else G.onabort=j}v.on("frameError",(j,p,uX)=>{P(new Error(`Frame type id ${j} in stream id ${uX} has failed with code ${p}.`))}),v.on("error",P),v.on("aborted",()=>{P(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${v.rstCode}.`))}),v.on("close",()=>{if(A.unref(),Z)A.destroy();if(!Q)P(new Error("Unexpected error: http2 request did not get a response"))}),F=v$(v,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()}};O(J8,"NodeHttp2Handler");var ZQ=J8,R8=class $ extends Y8.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};O(R8,"Collector");var XQ=R8,LQ=O(($)=>{if(YQ($))return I8($);return new Promise((U,G)=>{let W=new XQ;$.pipe(W),$.on("error",(Z)=>{W.end(),G(Z)}),W.on("error",G),W.on("finish",function(){let Z=new Uint8Array(Buffer.concat(this.bufferedBytes));U(Z)})})},"streamCollector"),YQ=O(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");async function I8($){let U=[],G=$.getReader(),W=!1,Z=0;while(!W){let{done:Y,value:Q}=await G.read();if(Q)U.push(Q),Z+=Q.length;W=Y}let X=new Uint8Array(Z),L=0;for(let Y of U)X.set(Y,L),L+=Y.length;return X}O(I8,"collectReadableStream")});var q8=M((OR,C8)=>{var{defineProperty:A0,getOwnPropertyDescriptor:QQ,getOwnPropertyNames:FQ}=Object,wQ=Object.prototype.hasOwnProperty,i=($,U)=>A0($,"name",{value:U,configurable:!0}),zQ=($,U)=>{for(var G in U)A0($,G,{get:U[G],enumerable:!0})},JQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of FQ(U))if(!wQ.call($,Z)&&Z!==G)A0($,Z,{get:()=>U[Z],enumerable:!(W=QQ(U,Z))||W.enumerable})}return $},RQ=($)=>JQ(A0({},"__esModule",{value:!0}),$),V8={};zQ(V8,{FetchHttpHandler:()=>KQ,keepAliveSupport:()=>H0,streamCollector:()=>MQ});C8.exports=RQ(V8);var M8=n(),IQ=D$();function T8($=0){return new Promise((U,G)=>{if($)setTimeout(()=>{let W=new Error(`Request did not complete within ${$} ms`);W.name="TimeoutError",G(W)},$)})}i(T8,"requestTimeout");var H0={supported:void 0},E8=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(H0.supported===void 0)H0.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(U,{abortSignal:G}={}){var W;if(!this.config)this.config=await this.configProvider;let Z=this.config.requestTimeout,X=this.config.keepAlive===!0,L=this.config.credentials;if(G==null?void 0:G.aborted){let E=new Error("Request aborted");return E.name="AbortError",Promise.reject(E)}let Y=U.path,Q=IQ.buildQueryString(U.query||{});if(Q)Y+=`?${Q}`;if(U.fragment)Y+=`#${U.fragment}`;let F="";if(U.username!=null||U.password!=null){let E=U.username??"",H=U.password??"";F=`${E}:${H}@`}let{port:w,method:z}=U,R=`${U.protocol}//${F}${U.hostname}${w?`:${w}`:""}${Y}`,J=z==="GET"||z==="HEAD"?void 0:U.body,I={body:J,headers:new Headers(U.headers),method:z,credentials:L};if((W=this.config)==null?void 0:W.cache)I.cache=this.config.cache;if(J)I.duplex="half";if(typeof AbortController!=="undefined")I.signal=G;if(H0.supported)I.keepalive=X;if(typeof this.config.requestInit==="function")Object.assign(I,this.config.requestInit(U));let V=i(()=>{},"removeSignalEventListener"),B=new Request(R,I),T=[fetch(B).then((E)=>{let H=E.headers,A={};for(let D of H.entries())A[D[0]]=D[1];if(E.body==null)return E.blob().then((D)=>({response:new M8.HttpResponse({headers:A,reason:E.statusText,statusCode:E.status,body:D})}));return{response:new M8.HttpResponse({headers:A,reason:E.statusText,statusCode:E.status,body:E.body})}}),T8(Z)];if(G)T.push(new Promise((E,H)=>{let A=i(()=>{let P=new Error("Request aborted");P.name="AbortError",H(P)},"onAbort");if(typeof G.addEventListener==="function"){let P=G;P.addEventListener("abort",A,{once:!0}),V=i(()=>P.removeEventListener("abort",A),"removeSignalEventListener")}else G.onabort=A}));return Promise.race(T).finally(V)}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return W[U]=G,W})}httpHandlerConfigs(){return this.config??{}}};i(E8,"FetchHttpHandler");var KQ=E8,BQ=V0(),MQ=i(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return H8($);return A8($)},"streamCollector");async function H8($){let U=await O8($),G=BQ.fromBase64(U);return new Uint8Array(G)}i(H8,"collectBlob");async function A8($){let U=[],G=$.getReader(),W=!1,Z=0;while(!W){let{done:Y,value:Q}=await G.read();if(Q)U.push(Q),Z+=Q.length;W=Y}let X=new Uint8Array(Z),L=0;for(let Y of U)X.set(Y,L),L+=Y.length;return X}i(A8,"collectStream");function O8($){return new Promise((U,G)=>{let W=new FileReader;W.onloadend=()=>{if(W.readyState!==2)return G(new Error("Reader aborted too early"));let Z=W.result??"",X=Z.indexOf(","),L=X>-1?X+1:Z.length;U(Z.substring(L))},W.onabort=()=>G(new Error("Read aborted")),W.onerror=()=>G(W.error),W.readAsDataURL($)})}i(O8,"readToBase64")});var y$=M((CR,S8)=>{var{defineProperty:O0,getOwnPropertyDescriptor:VQ,getOwnPropertyNames:TQ}=Object,EQ=Object.prototype.hasOwnProperty,N8=($,U)=>O0($,"name",{value:U,configurable:!0}),HQ=($,U)=>{for(var G in U)O0($,G,{get:U[G],enumerable:!0})},AQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of TQ(U))if(!EQ.call($,Z)&&Z!==G)O0($,Z,{get:()=>U[Z],enumerable:!(W=VQ(U,Z))||W.enumerable})}return $},OQ=($)=>AQ(O0({},"__esModule",{value:!0}),$),j8={};HQ(j8,{fromHex:()=>b8,toHex:()=>P8});S8.exports=OQ(j8);var f8={},c$={};for(let $=0;$<256;$++){let U=$.toString(16).toLowerCase();if(U.length===1)U=`0${U}`;f8[$]=U,c$[U]=$}function b8($){if($.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let U=new Uint8Array($.length/2);for(let G=0;G<$.length;G+=2){let W=$.slice(G,G+2).toLowerCase();if(W in c$)U[G/2]=c$[W];else throw new Error(`Cannot decode unrecognized sequence ${W} as hexadecimal`)}return U}N8(b8,"fromHex");function P8($){let U="";for(let G=0;G<$.byteLength;G++)U+=f8[$[G]];return U}N8(P8,"toHex")});var v1=M((k8)=>{Object.defineProperty(k8,"__esModule",{value:!0});k8.isReadableStream=void 0;var CQ=($)=>{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)};k8.isReadableStream=CQ});var _8=M((c8)=>{Object.defineProperty(c8,"__esModule",{value:!0});c8.sdkStreamMixin=void 0;var qQ=q8(),NQ=V0(),jQ=y$(),fQ=t(),h8=v1(),x8="The stream has already been transformed.",bQ=($)=>{var U,G;if(!v8($)&&!h8.isReadableStream($)){let 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,Z=async()=>{if(W)throw new Error(x8);return W=!0,await qQ.streamCollector($)},X=(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:Z,transformToString:async(L)=>{let Y=await Z();if(L==="base64")return NQ.toBase64(Y);else if(L==="hex")return jQ.toHex(Y);else if(L===void 0||L==="utf8"||L==="utf-8")return fQ.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(x8);if(W=!0,v8($))return X($);else if(h8.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};c8.sdkStreamMixin=bQ;var v8=($)=>typeof Blob==="function"&&$ instanceof Blob});var d8=M((g8)=>{Object.defineProperty(g8,"__esModule",{value:!0});g8.sdkStreamMixin=void 0;var PQ=B8(),SQ=h1(),_$=import.meta.require("stream"),kQ=import.meta.require("util"),DQ=_8(),u8="The stream has already been transformed.",hQ=($)=>{var U,G;if(!($ instanceof _$.Readable))try{return DQ.sdkStreamMixin($)}catch(X){let 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,Z=async()=>{if(W)throw new Error(u8);return W=!0,await PQ.streamCollector($)};return Object.assign($,{transformToByteArray:Z,transformToString:async(X)=>{let L=await Z();if(X===void 0||Buffer.isEncoding(X))return SQ.fromArrayBuffer(L.buffer,L.byteOffset,L.byteLength).toString(X);else return new kQ.TextDecoder(X).decode(L)},transformToWebStream:()=>{if(W)throw new Error(u8);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof _$.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,_$.Readable.toWeb($)}})};g8.sdkStreamMixin=hQ});var m8=M((s8)=>{Object.defineProperty(s8,"__esModule",{value:!0});s8.splitStream=void 0;async function xQ($){if(typeof $.stream==="function")$=$.stream();return $.tee()}s8.splitStream=xQ});var r8=M((i8)=>{Object.defineProperty(i8,"__esModule",{value:!0});i8.splitStream=void 0;var n8=import.meta.require("stream"),vQ=m8(),cQ=v1();async function yQ($){if(cQ.isReadableStream($))return vQ.splitStream($);let U=new n8.PassThrough,G=new n8.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}i8.splitStream=yQ});var e8=M((a8)=>{Object.defineProperty(a8,"__esModule",{value:!0});a8.headStream=void 0;async function _Q($,U){var G;let W=0,Z=[],X=$.getReader(),L=!1;while(!L){let{done:F,value:w}=await X.read();if(w)Z.push(w),W+=(G=w===null||w===void 0?void 0:w.byteLength)!==null&&G!==void 0?G:0;if(W>=U)break;L=F}X.releaseLock();let Y=new Uint8Array(Math.min(U,W)),Q=0;for(let F of Z){if(F.byteLength>Y.byteLength-Q){Y.set(F.subarray(0,Y.byteLength-Q),Q);break}else Y.set(F,Q);Q+=F.length}return Y}a8.headStream=_Q});var W4=M((U4)=>{Object.defineProperty(U4,"__esModule",{value:!0});U4.headStream=void 0;var uQ=import.meta.require("stream"),gQ=e8(),pQ=v1(),dQ=($,U)=>{if(pQ.isReadableStream($))return gQ.headStream($,U);return new Promise((G,W)=>{let Z=new $4;Z.limit=U,$.pipe(Z),$.on("error",(X)=>{Z.end(),W(X)}),Z.on("error",W),Z.on("finish",function(){let X=new Uint8Array(Buffer.concat(this.buffers));G(X)})})};U4.headStream=dQ;class $4 extends uQ.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,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){let Z=this.bytesBuffered-this.limit,X=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=X.subarray(0,X.byteLength-Z),this.emit("finish")}G()}}});var F4=M((kR,w1)=>{var{defineProperty:C0,getOwnPropertyDescriptor:sQ,getOwnPropertyNames:lQ}=Object,mQ=Object.prototype.hasOwnProperty,p$=($,U)=>C0($,"name",{value:U,configurable:!0}),nQ=($,U)=>{for(var G in U)C0($,G,{get:U[G],enumerable:!0})},u$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of lQ(U))if(!mQ.call($,Z)&&Z!==G)C0($,Z,{get:()=>U[Z],enumerable:!(W=sQ(U,Z))||W.enumerable})}return $},c1=($,U,G)=>(u$($,U,"default"),G&&u$(G,U,"default")),iQ=($)=>u$(C0({},"__esModule",{value:!0}),$),F1={};nQ(F1,{Uint8ArrayBlobAdapter:()=>g$});w1.exports=iQ(F1);var Z4=V0(),X4=t();function L4($,U="utf-8"){if(U==="base64")return Z4.toBase64($);return X4.toUtf8($)}p$(L4,"transformToString");function Y4($,U){if(U==="base64")return g$.mutate(Z4.fromBase64($));return g$.mutate(X4.fromUtf8($))}p$(Y4,"transformFromString");var Q4=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 L4(this,U)}};p$(Q4,"Uint8ArrayBlobAdapter");var g$=Q4;c1(F1,l6(),w1.exports);c1(F1,d8(),w1.exports);c1(F1,r8(),w1.exports);c1(F1,W4(),w1.exports);c1(F1,v1(),w1.exports)});var O1=M((DR,k4)=>{var{defineProperty:f0,getOwnPropertyDescriptor:oQ,getOwnPropertyNames:rQ}=Object,aQ=Object.prototype.hasOwnProperty,K=($,U)=>f0($,"name",{value:U,configurable:!0}),tQ=($,U)=>{for(var G in U)f0($,G,{get:U[G],enumerable:!0})},eQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of rQ(U))if(!aQ.call($,Z)&&Z!==G)f0($,Z,{get:()=>U[Z],enumerable:!(W=oQ(U,Z))||W.enumerable})}return $},$5=($)=>eQ(f0({},"__esModule",{value:!0}),$),z4={};tQ(z4,{Client:()=>G5,Command:()=>B4,LazyJsonString:()=>t5,NoOpLogger:()=>U5,SENSITIVE_STRING:()=>X5,ServiceException:()=>u5,StringWrapper:()=>p1,_json:()=>o$,collectBody:()=>W5,convertMap:()=>e5,createAggregatedClient:()=>L5,dateToUtcString:()=>O4,decorateServiceException:()=>q4,emitWarningIfUnsupportedVersion:()=>s5,expectBoolean:()=>Q5,expectByte:()=>i$,expectFloat32:()=>q0,expectInt:()=>w5,expectInt32:()=>m$,expectLong:()=>u1,expectNonNull:()=>J5,expectNumber:()=>_1,expectObject:()=>V4,expectShort:()=>n$,expectString:()=>R5,expectUnion:()=>I5,extendedEncodeURIComponent:()=>j0,getArrayIfSingleItem:()=>a5,getDefaultClientConfiguration:()=>o5,getDefaultExtensionConfiguration:()=>j4,getValueFromTextNode:()=>f4,handleFloat:()=>M5,limitedParseDouble:()=>t$,limitedParseFloat:()=>V5,limitedParseFloat32:()=>T5,loadConfigsForDefaultMode:()=>d5,logger:()=>g1,map:()=>$U,parseBoolean:()=>Y5,parseEpochTimestamp:()=>S5,parseRfc3339DateTime:()=>C5,parseRfc3339DateTimeWithOffset:()=>N5,parseRfc7231DateTime:()=>P5,resolveDefaultRuntimeConfig:()=>r5,resolvedPath:()=>Z7,serializeDateTime:()=>L7,serializeFloat:()=>X7,splitEvery:()=>S4,strictParseByte:()=>A4,strictParseDouble:()=>a$,strictParseFloat:()=>K5,strictParseFloat32:()=>T4,strictParseInt:()=>E5,strictParseInt32:()=>H5,strictParseLong:()=>H4,strictParseShort:()=>E1,take:()=>$7,throwDefaultError:()=>N4,withBaseException:()=>g5});k4.exports=$5(z4);var J4=class ${trace(){}debug(){}info(){}warn(){}error(){}};K(J4,"NoOpLogger");var U5=J4,R4=q6(),I4=class ${constructor(U){this.config=U,this.middlewareStack=R4.constructStack()}send(U,G,W){let Z=typeof G!=="function"?G:void 0,X=typeof G==="function"?G:W,L=Z===void 0&&this.config.cacheMiddleware===!0,Y;if(L){if(!this.handlers)this.handlers=new WeakMap;let Q=this.handlers;if(Q.has(U.constructor))Y=Q.get(U.constructor);else Y=U.resolveMiddleware(this.middlewareStack,this.config,Z),Q.set(U.constructor,Y)}else delete this.handlers,Y=U.resolveMiddleware(this.middlewareStack,this.config,Z);if(X)Y(U).then((Q)=>X(null,Q.output),(Q)=>X(Q)).catch(()=>{});else return Y(U).then((Q)=>Q.output)}destroy(){var U,G,W;(W=(G=(U=this.config)==null?void 0:U.requestHandler)==null?void 0:G.destroy)==null||W.call(G),delete this.handlers}};K(I4,"Client");var G5=I4,d$=F4(),W5=K(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return d$.Uint8ArrayBlobAdapter.mutate($);if(!$)return d$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let G=U.streamCollector($);return d$.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),l$=B1(),K4=class ${constructor(){this.middlewareStack=R4.constructStack()}static classBuilder(){return new Z5}resolveMiddlewareWithContext(U,G,W,{middlewareFn:Z,clientName:X,commandName:L,inputFilterSensitiveLog:Y,outputFilterSensitiveLog:Q,smithyContext:F,additionalContext:w,CommandCtor:z}){for(let B of Z.bind(this)(z,U,G,W))this.middlewareStack.use(B);let R=U.concat(this.middlewareStack),{logger:J}=G,I={logger:J,clientName:X,commandName:L,inputFilterSensitiveLog:Y,outputFilterSensitiveLog:Q,[l$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...w},{requestHandler:V}=G;return R.resolve((B)=>V.handle(B.request,W||{}),I)}};K(K4,"Command");var B4=K4,M4=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;let G=this,W;return W=(U=class extends B4{constructor(...[Z]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=Z??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(Z,X,L){return this.resolveMiddlewareWithContext(Z,X,L,{CommandCtor:W,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},K(U,"CommandRef"),U)}};K(M4,"ClassBuilder");var Z5=M4,X5="***SensitiveInformation***",L5=K(($,U)=>{for(let G of Object.keys($)){let W=$[G],Z=K(async function(L,Y,Q){let F=new W(L);if(typeof Y==="function")this.send(F,Y);else if(typeof Q==="function"){if(typeof Y!=="object")throw new Error(`Expected http options but got ${typeof Y}`);this.send(F,Y||{},Q)}else return this.send(F,Y)},"methodImpl"),X=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[X]=Z}},"createAggregatedClient"),Y5=K(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),Q5=K(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)g1.warn(N0(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){let U=$.toLowerCase();if(U==="false"||U==="true")g1.warn(N0(`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"),_1=K(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){let U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))g1.warn(N0(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),F5=Math.ceil(340282346638528860000000000000000000000),q0=K(($)=>{let U=_1($);if(U!==void 0&&!Number.isNaN(U)&&U!==1/0&&U!==-1/0){if(Math.abs(U)>F5)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),u1=K(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),w5=u1,m$=K(($)=>r$($,32),"expectInt32"),n$=K(($)=>r$($,16),"expectShort"),i$=K(($)=>r$($,8),"expectByte"),r$=K(($,U)=>{let G=u1($);if(G!==void 0&&z5(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),z5=K(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),J5=K(($,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"),V4=K(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;let U=Array.isArray($)?"array":typeof $;throw new TypeError(`Expected object, got ${U}: ${$}`)},"expectObject"),R5=K(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return g1.warn(N0(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),I5=K(($)=>{if($===null||$===void 0)return;let U=V4($),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"),a$=K(($)=>{if(typeof $=="string")return _1(A1($));return _1($)},"strictParseDouble"),K5=a$,T4=K(($)=>{if(typeof $=="string")return q0(A1($));return q0($)},"strictParseFloat32"),B5=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,A1=K(($)=>{let U=$.match(B5);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),t$=K(($)=>{if(typeof $=="string")return E4($);return _1($)},"limitedParseDouble"),M5=t$,V5=t$,T5=K(($)=>{if(typeof $=="string")return E4($);return q0($)},"limitedParseFloat32"),E4=K(($)=>{switch($){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),H4=K(($)=>{if(typeof $==="string")return u1(A1($));return u1($)},"strictParseLong"),E5=H4,H5=K(($)=>{if(typeof $==="string")return m$(A1($));return m$($)},"strictParseInt32"),E1=K(($)=>{if(typeof $==="string")return n$(A1($));return n$($)},"strictParseShort"),A4=K(($)=>{if(typeof $==="string")return i$(A1($));return i$($)},"strictParseByte"),N0=K(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),g1={warn:console.warn},A5=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],e$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O4($){let U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),Z=$.getUTCDate(),X=$.getUTCHours(),L=$.getUTCMinutes(),Y=$.getUTCSeconds(),Q=Z<10?`0${Z}`:`${Z}`,F=X<10?`0${X}`:`${X}`,w=L<10?`0${L}`:`${L}`,z=Y<10?`0${Y}`:`${Y}`;return`${A5[W]}, ${Q} ${e$[G]} ${U} ${F}:${w}:${z} GMT`}K(O4,"dateToUtcString");var O5=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),C5=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let U=O5.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");let[G,W,Z,X,L,Y,Q,F]=U,w=E1(H1(W)),z=m(Z,"month",1,12),R=m(X,"day",1,31);return y1(w,z,R,{hours:L,minutes:Y,seconds:Q,fractionalMilliseconds:F})},"parseRfc3339DateTime"),q5=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),N5=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let U=q5.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");let[G,W,Z,X,L,Y,Q,F,w]=U,z=E1(H1(W)),R=m(Z,"month",1,12),J=m(X,"day",1,31),I=y1(z,R,J,{hours:L,minutes:Y,seconds:Q,fractionalMilliseconds:F});if(w.toUpperCase()!="Z")I.setTime(I.getTime()-_5(w));return I},"parseRfc3339DateTimeWithOffset"),j5=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$/),f5=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$/),b5=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})$/),P5=K(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=j5.exec($);if(U){let[G,W,Z,X,L,Y,Q,F]=U;return y1(E1(H1(X)),s$(Z),m(W,"day",1,31),{hours:L,minutes:Y,seconds:Q,fractionalMilliseconds:F})}if(U=f5.exec($),U){let[G,W,Z,X,L,Y,Q,F]=U;return h5(y1(k5(X),s$(Z),m(W,"day",1,31),{hours:L,minutes:Y,seconds:Q,fractionalMilliseconds:F}))}if(U=b5.exec($),U){let[G,W,Z,X,L,Y,Q,F]=U;return y1(E1(H1(F)),s$(W),m(Z.trimLeft(),"day",1,31),{hours:X,minutes:L,seconds:Y,fractionalMilliseconds:Q})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),S5=K(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=a$($);else if(typeof $==="object"&&$.tag===1)U=$.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(U)||U===1/0||U===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(U*1000))},"parseEpochTimestamp"),y1=K(($,U,G,W)=>{let Z=U-1;return v5($,Z,G),new Date(Date.UTC($,Z,G,m(W.hours,"hour",0,23),m(W.minutes,"minute",0,59),m(W.seconds,"seconds",0,60),y5(W.fractionalMilliseconds)))},"buildDate"),k5=K(($)=>{let U=new Date().getUTCFullYear(),G=Math.floor(U/100)*100+E1(H1($));if(G<U)return G+100;return G},"parseTwoDigitYear"),D5=1576800000000,h5=K(($)=>{if($.getTime()-new Date().getTime()>D5)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),s$=K(($)=>{let U=e$.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),x5=[31,28,31,30,31,30,31,31,30,31,30,31],v5=K(($,U,G)=>{let W=x5[U];if(U===1&&c5($))W=29;if(G>W)throw new TypeError(`Invalid day for ${e$[U]} in ${$}: ${G}`)},"validateDayOfMonth"),c5=K(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),m=K(($,U,G,W)=>{let Z=A4(H1($));if(Z<G||Z>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return Z},"parseDateValue"),y5=K(($)=>{if($===null||$===void 0)return 0;return T4("0."+$)*1000},"parseMilliseconds"),_5=K(($)=>{let U=$[0],G=1;if(U=="+")G=1;else if(U=="-")G=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);let W=Number($.substring(1,3)),Z=Number($.substring(4,6));return G*(W*60+Z)*60*1000},"parseOffsetToMilliseconds"),H1=K(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),C4=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};K(C4,"ServiceException");var u5=C4,q4=K(($,U={})=>{Object.entries(U).filter(([,W])=>W!==void 0).forEach(([W,Z])=>{if($[W]==null||$[W]==="")$[W]=Z});let G=$.message||$.Message||"UnknownError";return $.message=G,delete $.Message,$},"decorateServiceException"),N4=K(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{let Z=p5($),X=Z.httpStatusCode?Z.httpStatusCode+"":void 0,L=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||X||"UnknownError",$fault:"client",$metadata:Z});throw q4(L,U)},"throwDefaultError"),g5=K(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{N4({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),p5=K(($)=>({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"),d5=K(($)=>{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"),w4=!1,s5=K(($)=>{if($&&!w4&&parseInt($.substring(1,$.indexOf(".")))<16)w4=!0},"emitWarningIfUnsupportedVersion"),l5=K(($)=>{let U=[];for(let G in l$.AlgorithmId){let W=l$.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"),m5=K(($)=>{let U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),n5=K(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),i5=K(($)=>{let U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),j4=K(($)=>{return{...l5($),...n5($)}},"getDefaultExtensionConfiguration"),o5=j4,r5=K(($)=>{return{...m5($),...i5($)}},"resolveDefaultRuntimeConfig");function j0($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})}K(j0,"extendedEncodeURIComponent");var a5=K(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),f4=K(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=f4($[G]);return $},"getValueFromTextNode"),p1=K(function(){let $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");p1.prototype=Object.create(String.prototype,{constructor:{value:p1,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(p1,String);var b4=class $ extends p1{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))}};K(b4,"LazyJsonString");var t5=b4;function $U($,U,G){let W,Z,X;if(typeof U==="undefined"&&typeof G==="undefined")W={},X=$;else if(W=$,typeof U==="function")return Z=U,X=G,U7(W,Z,X);else X=U;for(let L of Object.keys(X)){if(!Array.isArray(X[L])){W[L]=X[L];continue}P4(W,null,X,L)}return W}K($U,"map");var e5=K(($)=>{let U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),$7=K(($,U)=>{let G={};for(let W in U)P4(G,$,U,W);return G},"take"),U7=K(($,U,G)=>{return $U($,Object.entries(G).reduce((W,[Z,X])=>{if(Array.isArray(X))W[Z]=X;else if(typeof X==="function")W[Z]=[U,X()];else W[Z]=[U,X];return W},{}))},"mapWithFilter"),P4=K(($,U,G,W)=>{if(U!==null){let L=G[W];if(typeof L==="function")L=[,L];let[Y=G7,Q=W7,F=W]=L;if(typeof Y==="function"&&Y(U[F])||typeof Y!=="function"&&!!Y)$[W]=Q(U[F]);return}let[Z,X]=G[W];if(typeof X==="function"){let L,Y=Z===void 0&&(L=X())!=null,Q=typeof Z==="function"&&!!Z(void 0)||typeof Z!=="function"&&!!Z;if(Y)$[W]=L;else if(Q)$[W]=X()}else{let L=Z===void 0&&X!=null,Y=typeof Z==="function"&&!!Z(X)||typeof Z!=="function"&&!!Z;if(L||Y)$[W]=X}},"applyInstruction"),G7=K(($)=>$!=null,"nonNullish"),W7=K(($)=>$,"pass"),Z7=K(($,U,G,W,Z,X)=>{if(U!=null&&U[G]!==void 0){let L=W();if(L.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(Z,X?L.split("/").map((Y)=>j0(Y)).join("/"):j0(L))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),X7=K(($)=>{if($!==$)return"NaN";switch($){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return $}},"serializeFloat"),L7=K(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),o$=K(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(o$);if(typeof $==="object"){let U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=o$($[G])}return U}return $},"_json");function S4($,U,G){if(G<=0||!Number.isInteger(G))throw new Error("Invalid number of delimiters ("+G+") for splitEvery.");let W=$.split(U);if(G===1)return W;let Z=[],X="";for(let L=0;L<W.length;L++){if(X==="")X=W[L];else X+=U+W[L];if((L+1)%G===0)Z.push(X),X=""}if(X!=="")Z.push(X);return Z}K(S4,"splitEvery")});var x4=M((D4)=>{Object.defineProperty(D4,"__esModule",{value:!0});D4.isStreamingPayload=void 0;var Y7=import.meta.require("stream"),Q7=($)=>($===null||$===void 0?void 0:$.body)instanceof Y7.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;D4.isStreamingPayload=Q7});var e4=M((vR,t4)=>{var{defineProperty:b0,getOwnPropertyDescriptor:w7,getOwnPropertyNames:z7}=Object,J7=Object.prototype.hasOwnProperty,b=($,U)=>b0($,"name",{value:U,configurable:!0}),R7=($,U)=>{for(var G in U)b0($,G,{get:U[G],enumerable:!0})},I7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of z7(U))if(!J7.call($,Z)&&Z!==G)b0($,Z,{get:()=>U[Z],enumerable:!(W=w7(U,Z))||W.enumerable})}return $},K7=($)=>I7(b0({},"__esModule",{value:!0}),$),c4={};R7(c4,{AdaptiveRetryStrategy:()=>V7,CONFIG_MAX_ATTEMPTS:()=>GU,CONFIG_RETRY_MODE:()=>m4,ENV_MAX_ATTEMPTS:()=>UU,ENV_RETRY_MODE:()=>l4,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>T7,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>H7,StandardRetryStrategy:()=>d4,defaultDelayDecider:()=>_4,defaultRetryDecider:()=>u4,getOmitRetryHeadersPlugin:()=>A7,getRetryAfterHint:()=>a4,getRetryPlugin:()=>f7,omitRetryHeadersMiddleware:()=>n4,omitRetryHeadersMiddlewareOptions:()=>i4,resolveRetryConfig:()=>E7,retryMiddleware:()=>o4,retryMiddlewareOptions:()=>r4});t4.exports=K7(c4);var C1=n(),y4=F7(),N=E6(),B7=b(($,U)=>{let G=$,W=(U==null?void 0:U.noRetryIncrement)??N.NO_RETRY_INCREMENT,Z=(U==null?void 0:U.retryCost)??N.RETRY_COST,X=(U==null?void 0:U.timeoutRetryCost)??N.TIMEOUT_RETRY_COST,L=$,Y=b((z)=>z.name==="TimeoutError"?X:Z,"getCapacityAmount"),Q=b((z)=>Y(z)<=L,"hasRetryTokens");return Object.freeze({hasRetryTokens:Q,retrieveRetryTokens:b((z)=>{if(!Q(z))throw new Error("No retry token available");let R=Y(z);return L-=R,R},"retrieveRetryTokens"),releaseRetryTokens:b((z)=>{L+=z??W,L=Math.min(L,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),_4=b(($,U)=>Math.floor(Math.min(N.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),e=T$(),u4=b(($)=>{if(!$)return!1;return e.isRetryableByTrait($)||e.isClockSkewError($)||e.isThrottlingError($)||e.isTransientError($)},"defaultRetryDecider"),g4=b(($)=>{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"),p4=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=N.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??u4,this.delayDecider=(G==null?void 0:G.delayDecider)??_4,this.retryQuota=(G==null?void 0:G.retryQuota)??B7(N.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=N.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,W){let Z,X=0,L=0,Y=await this.getMaxAttempts(),{request:Q}=G;if(C1.HttpRequest.isInstance(Q))Q.headers[N.INVOCATION_ID_HEADER]=y4.v4();while(!0)try{if(C1.HttpRequest.isInstance(Q))Q.headers[N.REQUEST_HEADER]=`attempt=${X+1}; max=${Y}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();let{response:F,output:w}=await U(G);if(W==null?void 0:W.afterRequest)W.afterRequest(F);return this.retryQuota.releaseRetryTokens(Z),w.$metadata.attempts=X+1,w.$metadata.totalRetryDelay=L,{response:F,output:w}}catch(F){let w=g4(F);if(X++,this.shouldRetry(w,X,Y)){Z=this.retryQuota.retrieveRetryTokens(w);let z=this.delayDecider(e.isThrottlingError(w)?N.THROTTLING_RETRY_DELAY_BASE:N.DEFAULT_RETRY_DELAY_BASE,X),R=M7(w.$response),J=Math.max(R||0,z);L+=J,await new Promise((I)=>setTimeout(I,J));continue}if(!w.$metadata)w.$metadata={};throw w.$metadata.attempts=X,w.$metadata.totalRetryDelay=L,w}}};b(p4,"StandardRetryStrategy");var d4=p4,M7=b(($)=>{if(!C1.HttpResponse.isInstance($))return;let U=Object.keys($.headers).find((X)=>X.toLowerCase()==="retry-after");if(!U)return;let G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return W*1000;return new Date(G).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),s4=class $ extends d4{constructor(U,G){let{rateLimiter:W,...Z}=G??{};super(U,Z);this.rateLimiter=W??new N.DefaultRateLimiter,this.mode=N.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};b(s4,"AdaptiveRetryStrategy");var V7=s4,v4=l(),UU="AWS_MAX_ATTEMPTS",GU="max_attempts",T7={environmentVariableSelector:($)=>{let U=$[UU];if(!U)return;let G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${UU} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{let U=$[GU];if(!U)return;let G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${GU} mast be a number, got "${U}"`);return G},default:N.DEFAULT_MAX_ATTEMPTS},E7=b(($)=>{let{retryStrategy:U}=$,G=v4.normalizeProvider($.maxAttempts??N.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await v4.normalizeProvider($.retryMode)()===N.RETRY_MODES.ADAPTIVE)return new N.AdaptiveRetryStrategy(G);return new N.StandardRetryStrategy(G)}}},"resolveRetryConfig"),l4="AWS_RETRY_MODE",m4="retry_mode",H7={environmentVariableSelector:($)=>$[l4],configFileSelector:($)=>$[m4],default:N.DEFAULT_RETRY_MODE},n4=b(()=>($)=>async(U)=>{let{request:G}=U;if(C1.HttpRequest.isInstance(G))delete G.headers[N.INVOCATION_ID_HEADER],delete G.headers[N.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),i4={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},A7=b(($)=>({applyToStack:(U)=>{U.addRelativeTo(n4(),i4)}}),"getOmitRetryHeadersPlugin"),O7=O1(),C7=x4(),o4=b(($)=>(U,G)=>async(W)=>{var Z;let X=await $.retryStrategy(),L=await $.maxAttempts();if(q7(X)){X=X;let Y=await X.acquireInitialRetryToken(G.partition_id),Q=new Error,F=0,w=0,{request:z}=W,R=C1.HttpRequest.isInstance(z);if(R)z.headers[N.INVOCATION_ID_HEADER]=y4.v4();while(!0)try{if(R)z.headers[N.REQUEST_HEADER]=`attempt=${F+1}; max=${L}`;let{response:J,output:I}=await U(W);return X.recordSuccess(Y),I.$metadata.attempts=F+1,I.$metadata.totalRetryDelay=w,{response:J,output:I}}catch(J){let I=N7(J);if(Q=g4(J),R&&C7.isStreamingPayload(z))throw(Z=G.logger instanceof O7.NoOpLogger?console:G.logger)==null||Z.warn("An error was encountered in a non-retryable streaming request."),Q;try{Y=await X.refreshRetryTokenForRetry(Y,I)}catch(B){if(!Q.$metadata)Q.$metadata={};throw Q.$metadata.attempts=F+1,Q.$metadata.totalRetryDelay=w,Q}F=Y.getRetryCount();let V=Y.getRetryDelay();w+=V,await new Promise((B)=>setTimeout(B,V))}}else{if(X=X,X==null?void 0:X.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(U,W)}},"retryMiddleware"),q7=b(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),N7=b(($)=>{let U={error:$,errorType:j7($)},G=a4($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),j7=b(($)=>{if(e.isThrottlingError($))return"THROTTLING";if(e.isTransientError($))return"TRANSIENT";if(e.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),r4={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},f7=b(($)=>({applyToStack:(U)=>{U.add(o4($),r4)}}),"getRetryPlugin"),a4=b(($)=>{if(!C1.HttpResponse.isInstance($))return;let U=Object.keys($.headers).find((X)=>X.toLowerCase()==="retry-after");if(!U)return;let G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)},"getRetryAfterHint")});var ZU=M((cR,VW)=>{var{defineProperty:S0,getOwnPropertyDescriptor:b7,getOwnPropertyNames:P7}=Object,S7=Object.prototype.hasOwnProperty,q=($,U)=>S0($,"name",{value:U,configurable:!0}),k7=($,U)=>{for(var G in U)S0($,G,{get:U[G],enumerable:!0})},D7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of P7(U))if(!S7.call($,Z)&&Z!==G)S0($,Z,{get:()=>U[Z],enumerable:!(W=b7(U,Z))||W.enumerable})}return $},h7=($)=>D7(S0({},"__esModule",{value:!0}),$),$W={};k7($W,{DefaultIdentityProviderConfig:()=>d7,EXPIRATION_MS:()=>JW,HttpApiKeyAuthSigner:()=>s7,HttpBearerAuthSigner:()=>l7,NoAuthSigner:()=>m7,RequestBuilder:()=>BW,createIsIdentityExpiredFunction:()=>zW,createPaginator:()=>MW,doesIdentityRequireRefresh:()=>RW,getHttpAuthSchemeEndpointRuleSetPlugin:()=>v7,getHttpAuthSchemePlugin:()=>y7,getHttpSigningPlugin:()=>p7,getSmithyContext:()=>o7,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>WW,httpAuthSchemeMiddleware:()=>WU,httpAuthSchemeMiddlewareOptions:()=>ZW,httpSigningMiddleware:()=>XW,httpSigningMiddlewareOptions:()=>LW,isIdentityExpired:()=>n7,memoizeIdentityProvider:()=>i7,normalizeProvider:()=>r7,requestBuilder:()=>IW});VW.exports=h7($W);var UW=l();function GW($){let U=new Map;for(let G of $)U.set(G.schemeId,G);return U}q(GW,"convertHttpAuthSchemesToMap");var WU=q(($,U)=>(G,W)=>async(Z)=>{var X;let L=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,Z.input)),Y=GW($.httpAuthSchemes),Q=UW.getSmithyContext(W),F=[];for(let w of L){let z=Y.get(w.schemeId);if(!z){F.push(`HttpAuthScheme \`${w.schemeId}\` was not enabled for this service.`);continue}let R=z.identityProvider(await U.identityProviderConfigProvider($));if(!R){F.push(`HttpAuthScheme \`${w.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:J={},signingProperties:I={}}=((X=w.propertiesExtractor)==null?void 0:X.call(w,$,W))||{};w.identityProperties=Object.assign(w.identityProperties||{},J),w.signingProperties=Object.assign(w.signingProperties||{},I),Q.selectedHttpAuthScheme={httpAuthOption:w,identity:await R(w.identityProperties),signer:z.signer};break}if(!Q.selectedHttpAuthScheme)throw new Error(F.join("\n"));return G(Z)},"httpAuthSchemeMiddleware"),x7=nG(),WW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:x7.endpointMiddlewareOptions.name},v7=q(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(WU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),WW)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),c7=t1(),ZW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:c7.serializerMiddlewareOption.name},y7=q(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(WU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),ZW)}}),"getHttpAuthSchemePlugin"),k0=n(),_7=q(($)=>(U)=>{throw U},"defaultErrorHandler"),u7=q(($,U)=>{},"defaultSuccessHandler"),XW=q(($)=>(U,G)=>async(W)=>{if(!k0.HttpRequest.isInstance(W.request))return U(W);let X=UW.getSmithyContext(G).selectedHttpAuthScheme;if(!X)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:L={}},identity:Y,signer:Q}=X,F=await U({...W,request:await Q.sign(W.request,Y,L)}).catch((Q.errorHandler||_7)(L));return(Q.successHandler||u7)(F.response,L),F},"httpSigningMiddleware"),g7=e4(),LW={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:g7.retryMiddlewareOptions.name},p7=q(($)=>({applyToStack:(U)=>{U.addRelativeTo(XW($),LW)}}),"getHttpSigningPlugin"),YW=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)}};q(YW,"DefaultIdentityProviderConfig");var d7=YW,P0=B1(),QW=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");let Z=k0.HttpRequest.clone(U);if(W.in===P0.HttpApiKeyAuthLocation.QUERY)Z.query[W.name]=G.apiKey;else if(W.in===P0.HttpApiKeyAuthLocation.HEADER)Z.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 Z}};q(QW,"HttpApiKeyAuthSigner");var s7=QW,FW=class ${async sign(U,G,W){let Z=k0.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return Z.headers.Authorization=`Bearer ${G.token}`,Z}};q(FW,"HttpBearerAuthSigner");var l7=FW,wW=class ${async sign(U,G,W){return U}};q(wW,"NoAuthSigner");var m7=wW,zW=q(($)=>(U)=>RW(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),JW=300000,n7=zW(JW),RW=q(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),i7=q(($,U,G)=>{if($===void 0)return;let W=typeof $!=="function"?async()=>Promise.resolve($):$,Z,X,L,Y=!1,Q=q(async(F)=>{if(!X)X=W(F);try{Z=await X,L=!0,Y=!1}finally{X=void 0}return Z},"coalesceProvider");if(U===void 0)return async(F)=>{if(!L||(F==null?void 0:F.forceRefresh))Z=await Q(F);return Z};return async(F)=>{if(!L||(F==null?void 0:F.forceRefresh))Z=await Q(F);if(Y)return Z;if(!G(Z))return Y=!0,Z;if(U(Z))return await Q(F),Z;return Z}},"memoizeIdentityProvider"),o7=q(($)=>$[P0.SMITHY_CONTEXT_KEY]||($[P0.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),r7=q(($)=>{if(typeof $==="function")return $;let U=Promise.resolve($);return()=>U},"normalizeProvider"),a7=O1();function IW($,U){return new BW($,U)}q(IW,"requestBuilder");var KW=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(){let{hostname:U,protocol:G="https",port:W,path:Z}=await this.context.endpoint();this.path=Z;for(let X of this.resolvePathStack)X(this.path);return new k0.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,Z){return this.resolvePathStack.push((X)=>{this.path=a7.resolvedPath(X,this.input,U,G,W,Z)}),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}};q(KW,"RequestBuilder");var BW=KW,t7=q(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");function MW($,U,G,W,Z){return q(async function*X(L,Y,...Q){let F=L.startingToken||void 0,w=!0,z;while(w){if(Y[G]=F,Z)Y[Z]=Y[Z]??L.pageSize;if(L.client instanceof $)z=await t7(U,L.client,Y,...Q);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield z;let R=F;F=e7(z,W),w=!!(F&&(!L.stopOnSameToken||F!==R))}return},"paginateOperation")}q(MW,"createPaginator");var e7=q(($,U)=>{let G=$,W=U.split(".");for(let Z of W){if(!G||typeof G!=="object")return;G=G[Z]}return G},"get")});var RZ=M((yV,JZ)=>{var{defineProperty:r0,getOwnPropertyDescriptor:xF,getOwnPropertyNames:vF}=Object,cF=Object.prototype.hasOwnProperty,yF=($,U)=>r0($,"name",{value:U,configurable:!0}),_F=($,U)=>{for(var G in U)r0($,G,{get:U[G],enumerable:!0})},uF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of vF(U))if(!cF.call($,Z)&&Z!==G)r0($,Z,{get:()=>U[Z],enumerable:!(W=xF(U,Z))||W.enumerable})}return $},gF=($)=>uF(r0({},"__esModule",{value:!0}),$),zZ={};_F(zZ,{emitWarningIfUnsupportedVersion:()=>pF});JZ.exports=gF(zZ);var wZ=!1,pF=yF(($)=>{if($&&!wZ&&parseInt($.substring(1,$.indexOf(".")))<18)wZ=!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 DZ=M((_V,kZ)=>{var{defineProperty:G$,getOwnPropertyDescriptor:dF,getOwnPropertyNames:sF}=Object,lF=Object.prototype.hasOwnProperty,S=($,U)=>G$($,"name",{value:U,configurable:!0}),mF=($,U)=>{for(var G in U)G$($,G,{get:U[G],enumerable:!0})},nF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of sF(U))if(!lF.call($,Z)&&Z!==G)G$($,Z,{get:()=>U[Z],enumerable:!(W=dF(U,Z))||W.enumerable})}return $},iF=($)=>nF(G$({},"__esModule",{value:!0}),$),VZ={};mF(VZ,{SignatureV4:()=>Ew,clearCredentialCache:()=>zw,createScope:()=>e0,getCanonicalHeaders:()=>jU,getCanonicalQuery:()=>NZ,getPayloadHash:()=>U$,getSigningKey:()=>qZ,moveHeadersToQuery:()=>PZ,prepareRequest:()=>bU});kZ.exports=iF(VZ);var IZ=l(),CU=t(),oF="X-Amz-Algorithm",rF="X-Amz-Credential",TZ="X-Amz-Date",aF="X-Amz-SignedHeaders",tF="X-Amz-Expires",EZ="X-Amz-Signature",HZ="X-Amz-Security-Token",AZ="authorization",OZ=TZ.toLowerCase(),eF="date",$w=[AZ,OZ,eF],Uw=EZ.toLowerCase(),NU="x-amz-content-sha256",Gw=HZ.toLowerCase(),Ww={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},Zw=/^proxy-/,Xw=/^sec-/,qU="AWS4-HMAC-SHA256",Lw="AWS4-HMAC-SHA256-PAYLOAD",Yw="UNSIGNED-PAYLOAD",Qw=50,CZ="aws4_request",Fw=604800,W1=y$(),ww=t(),b1={},t0=[],e0=S(($,U,G)=>`${$}/${U}/${G}/${CZ}`,"createScope"),qZ=S(async($,U,G,W,Z)=>{let X=await KZ($,U.secretAccessKey,U.accessKeyId),L=`${G}:${W}:${Z}:${W1.toHex(X)}:${U.sessionToken}`;if(L in b1)return b1[L];t0.push(L);while(t0.length>Qw)delete b1[t0.shift()];let Y=`AWS4${U.secretAccessKey}`;for(let Q of[G,W,Z,CZ])Y=await KZ($,Y,Q);return b1[L]=Y},"getSigningKey"),zw=S(()=>{t0.length=0,Object.keys(b1).forEach(($)=>{delete b1[$]})},"clearCredentialCache"),KZ=S(($,U,G)=>{let W=new $(U);return W.update(ww.toUint8Array(G)),W.digest()},"hmac"),jU=S(({headers:$},U,G)=>{let W={};for(let Z of Object.keys($).sort()){if($[Z]==null)continue;let X=Z.toLowerCase();if(X in Ww||(U==null?void 0:U.has(X))||Zw.test(X)||Xw.test(X)){if(!G||G&&!G.has(X))continue}W[X]=$[Z].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),$$=S$(),NZ=S(({query:$={}})=>{let U=[],G={};for(let W of Object.keys($)){if(W.toLowerCase()===Uw)continue;let Z=$$.escapeUri(W);U.push(Z);let X=$[W];if(typeof X==="string")G[Z]=`${Z}=${$$.escapeUri(X)}`;else if(Array.isArray(X))G[Z]=X.slice(0).reduce((L,Y)=>L.concat([`${Z}=${$$.escapeUri(Y)}`]),[]).sort().join("&")}return U.sort().map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),Jw=q$(),Rw=t(),U$=S(async({headers:$,body:U},G)=>{for(let W of Object.keys($))if(W.toLowerCase()===NU)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||Jw.isArrayBuffer(U)){let W=new G;return W.update(Rw.toUint8Array(U)),W1.toHex(await W.digest())}return Yw},"getPayloadHash"),BZ=t(),jZ=class ${format(U){let G=[];for(let X of Object.keys(U)){let L=BZ.fromUtf8(X);G.push(Uint8Array.from([L.byteLength]),L,this.formatHeaderValue(U[X]))}let W=new Uint8Array(G.reduce((X,L)=>X+L.byteLength,0)),Z=0;for(let X of G)W.set(X,Z),Z+=X.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":let G=new DataView(new ArrayBuffer(3));return G.setUint8(0,3),G.setInt16(1,U.value,!1),new Uint8Array(G.buffer);case"integer":let W=new DataView(new ArrayBuffer(5));return W.setUint8(0,4),W.setInt32(1,U.value,!1),new Uint8Array(W.buffer);case"long":let Z=new Uint8Array(9);return Z[0]=5,Z.set(U.value.bytes,1),Z;case"binary":let X=new DataView(new ArrayBuffer(3+U.value.byteLength));X.setUint8(0,6),X.setUint16(1,U.value.byteLength,!1);let L=new Uint8Array(X.buffer);return L.set(U.value,3),L;case"string":let Y=BZ.fromUtf8(U.value),Q=new DataView(new ArrayBuffer(3+Y.byteLength));Q.setUint8(0,7),Q.setUint16(1,Y.byteLength,!1);let F=new Uint8Array(Q.buffer);return F.set(Y,3),F;case"timestamp":let w=new Uint8Array(9);return w[0]=8,w.set(Bw.fromNumber(U.value.valueOf()).bytes,1),w;case"uuid":if(!Kw.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);let z=new Uint8Array(17);return z[0]=9,z.set(W1.fromHex(U.value.replace(/\-/g,"")),1),z}}};S(jZ,"HeaderFormatter");var Iw=jZ,Kw=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,fZ=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`);let G=new Uint8Array(8);for(let W=7,Z=Math.abs(Math.round(U));W>-1&&Z>0;W--,Z/=256)G[W]=Z;if(U<0)fU(G);return new $(G)}valueOf(){let U=this.bytes.slice(0),G=U[0]&128;if(G)fU(U);return parseInt(W1.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};S(fZ,"Int64");var Bw=fZ;function fU($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break}S(fU,"negate");var Mw=S(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),bZ=n(),PZ=S(($,U={})=>{var G;let{headers:W,query:Z={}}=bZ.HttpRequest.clone($);for(let X of Object.keys(W)){let L=X.toLowerCase();if(L.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(L)))Z[X]=W[X],delete W[X]}return{...$,headers:W,query:Z}},"moveHeadersToQuery"),bU=S(($)=>{$=bZ.HttpRequest.clone($);for(let U of Object.keys($.headers))if($w.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),Vw=S(($)=>Tw($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),Tw=S(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),SZ=class ${constructor({applyChecksum:U,credentials:G,region:W,service:Z,sha256:X,uriEscapePath:L=!0}){this.headerFormatter=new Iw,this.service=Z,this.sha256=X,this.uriEscapePath=L,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=IZ.normalizeProvider(W),this.credentialProvider=IZ.normalizeProvider(G)}async presign(U,G={}){let{signingDate:W=new Date,expiresIn:Z=3600,unsignableHeaders:X,unhoistableHeaders:L,signableHeaders:Y,signingRegion:Q,signingService:F}=G,w=await this.credentialProvider();this.validateResolvedCredentials(w);let z=Q??await this.regionProvider(),{longDate:R,shortDate:J}=a0(W);if(Z>Fw)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let I=e0(J,z,F??this.service),V=PZ(bU(U),{unhoistableHeaders:L});if(w.sessionToken)V.query[HZ]=w.sessionToken;V.query[oF]=qU,V.query[rF]=`${w.accessKeyId}/${I}`,V.query[TZ]=R,V.query[tF]=Z.toString(10);let B=jU(V,X,Y);return V.query[aF]=MZ(B),V.query[EZ]=await this.getSignature(R,I,this.getSigningKey(w,z,J,F),this.createCanonicalRequest(V,B,await U$(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:Z,signingRegion:X,signingService:L}){let Y=X??await this.regionProvider(),{shortDate:Q,longDate:F}=a0(W),w=e0(Q,Y,L??this.service),z=await U$({headers:{},body:G},this.sha256),R=new this.sha256;R.update(U);let J=W1.toHex(await R.digest()),I=[Lw,F,w,Z,J,z].join("\n");return this.signString(I,{signingDate:W,signingRegion:Y,signingService:L})}async signMessage(U,{signingDate:G=new Date,signingRegion:W,signingService:Z}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:W,signingService:Z,priorSignature:U.priorSignature}).then((L)=>{return{message:U.message,signature:L}})}async signString(U,{signingDate:G=new Date,signingRegion:W,signingService:Z}={}){let X=await this.credentialProvider();this.validateResolvedCredentials(X);let L=W??await this.regionProvider(),{shortDate:Y}=a0(G),Q=new this.sha256(await this.getSigningKey(X,L,Y,Z));return Q.update(CU.toUint8Array(U)),W1.toHex(await Q.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:Z,signingRegion:X,signingService:L}={}){let Y=await this.credentialProvider();this.validateResolvedCredentials(Y);let Q=X??await this.regionProvider(),F=bU(U),{longDate:w,shortDate:z}=a0(G),R=e0(z,Q,L??this.service);if(F.headers[OZ]=w,Y.sessionToken)F.headers[Gw]=Y.sessionToken;let J=await U$(F,this.sha256);if(!Mw(NU,F.headers)&&this.applyChecksum)F.headers[NU]=J;let I=jU(F,Z,W),V=await this.getSignature(w,R,this.getSigningKey(Y,Q,z,L),this.createCanonicalRequest(F,I,J));return F.headers[AZ]=`${qU} Credential=${Y.accessKeyId}/${R}, SignedHeaders=${MZ(I)}, Signature=${V}`,F}createCanonicalRequest(U,G,W){let Z=Object.keys(G).sort();return`${U.method}
10
- ${this.getCanonicalPath(U)}
11
- ${NZ(U)}
12
- ${Z.map((X)=>`${X}:${G[X]}`).join("\n")}
13
-
14
- ${Z.join(";")}
15
- ${W}`}async createStringToSign(U,G,W){let Z=new this.sha256;Z.update(CU.toUint8Array(W));let X=await Z.digest();return`${qU}
16
- ${U}
17
- ${G}
18
- ${W1.toHex(X)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){let G=[];for(let X of U.split("/")){if((X==null?void 0:X.length)===0)continue;if(X===".")continue;if(X==="..")G.pop();else G.push(X)}let W=`${(U==null?void 0:U.startsWith("/"))?"/":""}${G.join("/")}${G.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return $$.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,G,W,Z){let X=await this.createStringToSign(U,G,Z),L=new this.sha256(await W);return L.update(CU.toUint8Array(X)),W1.toHex(await L.digest())}getSigningKey(U,G,W,Z){return qZ(this.sha256,U,W,G,Z||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")}};S(SZ,"SignatureV4");var Ew=SZ,a0=S(($)=>{let U=Vw($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),MZ=S(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var dZ=M((uV,pZ)=>{var{defineProperty:W$,getOwnPropertyDescriptor:Hw,getOwnPropertyNames:Aw}=Object,Ow=Object.prototype.hasOwnProperty,h=($,U)=>W$($,"name",{value:U,configurable:!0}),Cw=($,U)=>{for(var G in U)W$($,G,{get:U[G],enumerable:!0})},qw=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of Aw(U))if(!Ow.call($,Z)&&Z!==G)W$($,Z,{get:()=>U[Z],enumerable:!(W=Hw(U,Z))||W.enumerable})}return $},Nw=($)=>qw(W$({},"__esModule",{value:!0}),$),yZ={};Cw(yZ,{AWSSDKSigV4Signer:()=>Pw,AwsSdkSigV4ASigner:()=>kw,AwsSdkSigV4Signer:()=>kU,NODE_SIGV4A_CONFIG_OPTIONS:()=>xw,resolveAWSSDKSigV4Config:()=>vw,resolveAwsSdkSigV4AConfig:()=>hw,resolveAwsSdkSigV4Config:()=>gZ,validateSigningProperties:()=>SU});pZ.exports=Nw(yZ);var jw=n(),fw=n(),hZ=h(($)=>{var U,G;return fw.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),PU=h(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),bw=h(($,U)=>Math.abs(PU(U).getTime()-$)>=300000,"isClockSkewed"),xZ=h(($,U)=>{let G=Date.parse($);if(bw(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),n1=h(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),SU=h(async($)=>{var U,G,W;let Z=n1("context",$.context),X=n1("config",$.config),L=(W=(G=(U=Z.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:W[0],Q=await n1("signer",X.signer)(L),F=$==null?void 0:$.signingRegion,w=$==null?void 0:$.signingRegionSet,z=$==null?void 0:$.signingName;return{config:X,signer:Q,signingRegion:F,signingRegionSet:w,signingName:z}},"validateSigningProperties"),_Z=class ${async sign(U,G,W){var Z;if(!jw.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let X=await SU(W),{config:L,signer:Y}=X,{signingRegion:Q,signingName:F}=X,w=W.context;if(((Z=w==null?void 0:w.authSchemes)==null?void 0:Z.length)??0>1){let[R,J]=w.authSchemes;if((R==null?void 0:R.name)==="sigv4a"&&(J==null?void 0:J.name)==="sigv4")Q=(J==null?void 0:J.signingRegion)??Q,F=(J==null?void 0:J.signingName)??F}return await Y.sign(U,{signingDate:PU(L.systemClockOffset),signingRegion:Q,signingService:F})}errorHandler(U){return(G)=>{let W=G.ServerTime??hZ(G.$response);if(W){let Z=n1("config",U.config),X=Z.systemClockOffset;if(Z.systemClockOffset=xZ(W,Z.systemClockOffset),Z.systemClockOffset!==X&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){let W=hZ(U);if(W){let Z=n1("config",G.config);Z.systemClockOffset=xZ(W,Z.systemClockOffset)}}};h(_Z,"AwsSdkSigV4Signer");var kU=_Z,Pw=kU,Sw=n(),uZ=class $ extends kU{async sign(U,G,W){var Z;if(!Sw.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:X,signer:L,signingRegion:Y,signingRegionSet:Q,signingName:F}=await SU(W),z=(await((Z=X.sigv4aSigningRegionSet)==null?void 0:Z.call(X))??Q??[Y]).join(",");return await L.sign(U,{signingDate:PU(X.systemClockOffset),signingRegion:z,signingService:F})}};h(uZ,"AwsSdkSigV4ASigner");var kw=uZ,Dw=ZU(),vZ=Y$(),hw=h(($)=>{return $.sigv4aSigningRegionSet=Dw.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),xw={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new vZ.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 vZ.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},I1=ZU(),cZ=DZ(),gZ=h(($)=>{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=h(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");let{signingEscapePath:G=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:Z}=$,X;if($.signer)X=I1.normalizeProvider($.signer);else if($.regionInfoProvider)X=h(()=>I1.normalizeProvider($.region)().then(async(L)=>[await $.regionInfoProvider(L,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},L]).then(([L,Y])=>{let{signingRegion:Q,signingService:F}=L;$.signingRegion=$.signingRegion||Q||Y,$.signingName=$.signingName||F||$.serviceId;let w={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:Z,uriEscapePath:G};return new($.signerConstructor||cZ.SignatureV4)(w)}),"signer");else X=h(async(L)=>{L=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await I1.normalizeProvider($.region)(),properties:{}},L);let{signingRegion:Y,signingName:Q}=L;$.signingRegion=$.signingRegion||Y,$.signingName=$.signingName||Q||$.serviceId;let F={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:Z,uriEscapePath:G};return new($.signerConstructor||cZ.SignatureV4)(F)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:X}},"resolveAwsSdkSigV4Config"),vw=gZ});var Z$=M((gw)=>{var cw=":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",sZ="[: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]["+cw+"]*",yw=new RegExp("^"+sZ+"$"),_w=function($,U){let G=[],W=U.exec($);while(W){let Z=[];Z.startIndex=U.lastIndex-W[0].length;let X=W.length;for(let L=0;L<X;L++)Z.push(W[L]);G.push(Z),W=U.exec($)}return G},uw=function($){let U=yw.exec($);return!(U===null||typeof U==="undefined")};gw.isExist=function($){return typeof $!=="undefined"};gw.isEmptyObject=function($){return Object.keys($).length===0};gw.merge=function($,U,G){if(U){let W=Object.keys(U),Z=W.length;for(let X=0;X<Z;X++)if(G==="strict")$[W[X]]=[U[W[X]]];else $[W[X]]=U[W[X]]}};gw.getValue=function($){if(gw.isExist($))return $;else return""};gw.isName=uw;gw.getAllMatches=_w;gw.nameRegexp=sZ});var hU=M((Wz)=>{var DU=Z$(),iw={allowBooleanAttributes:!1,unpairedTags:[]};Wz.validate=function($,U){U=Object.assign({},iw,U);let G=[],W=!1,Z=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let X=0;X<$.length;X++)if($[X]==="<"&&$[X+1]==="?"){if(X+=2,X=nZ($,X),X.err)return X}else if($[X]==="<"){let L=X;if(X++,$[X]==="!"){X=iZ($,X);continue}else{let Y=!1;if($[X]==="/")Y=!0,X++;let Q="";for(;X<$.length&&$[X]!==">"&&$[X]!==" "&&$[X]!=="\t"&&$[X]!=="\n"&&$[X]!=="\r";X++)Q+=$[X];if(Q=Q.trim(),Q[Q.length-1]==="/")Q=Q.substring(0,Q.length-1),X--;if(!Gz(Q)){let z;if(Q.trim().length===0)z="Invalid space after '<'.";else z="Tag '"+Q+"' is an invalid name.";return f("InvalidTag",z,k($,X))}let F=aw($,X);if(F===!1)return f("InvalidAttr","Attributes for '"+Q+"' have open quote.",k($,X));let w=F.value;if(X=F.index,w[w.length-1]==="/"){let z=X-w.length;w=w.substring(0,w.length-1);let R=oZ(w,U);if(R===!0)W=!0;else return f(R.err.code,R.err.msg,k($,z+R.err.line))}else if(Y)if(!F.tagClosed)return f("InvalidTag","Closing tag '"+Q+"' doesn't have proper closing.",k($,X));else if(w.trim().length>0)return f("InvalidTag","Closing tag '"+Q+"' can't have attributes or invalid starting.",k($,L));else if(G.length===0)return f("InvalidTag","Closing tag '"+Q+"' has not been opened.",k($,L));else{let z=G.pop();if(Q!==z.tagName){let R=k($,z.tagStartPos);return f("InvalidTag","Expected closing tag '"+z.tagName+"' (opened in line "+R.line+", col "+R.col+") instead of closing tag '"+Q+"'.",k($,L))}if(G.length==0)Z=!0}else{let z=oZ(w,U);if(z!==!0)return f(z.err.code,z.err.msg,k($,X-w.length+z.err.line));if(Z===!0)return f("InvalidXml","Multiple possible root nodes found.",k($,X));else if(U.unpairedTags.indexOf(Q)!==-1);else G.push({tagName:Q,tagStartPos:L});W=!0}for(X++;X<$.length;X++)if($[X]==="<")if($[X+1]==="!"){X++,X=iZ($,X);continue}else if($[X+1]==="?"){if(X=nZ($,++X),X.err)return X}else break;else if($[X]==="&"){let z=$z($,X);if(z==-1)return f("InvalidChar","char '&' is not expected.",k($,X));X=z}else if(Z===!0&&!mZ($[X]))return f("InvalidXml","Extra text at the end",k($,X));if($[X]==="<")X--}}else{if(mZ($[X]))continue;return f("InvalidChar","char '"+$[X]+"' is not expected.",k($,X))}if(!W)return f("InvalidXml","Start tag expected.",1);else if(G.length==1)return f("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",k($,G[0].tagStartPos));else if(G.length>0)return f("InvalidXml","Invalid '"+JSON.stringify(G.map((X)=>X.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};function mZ($){return $===" "||$==="\t"||$==="\n"||$==="\r"}function nZ($,U){let G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){let W=$.substr(G,U-G);if(U>5&&W==="xml")return f("InvalidXml","XML declaration allowed only at the start of the document.",k($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U}function iZ($,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}var ow='"',rw="'";function aw($,U){let G="",W="",Z=!1;for(;U<$.length;U++){if($[U]===ow||$[U]===rw)if(W==="")W=$[U];else if(W!==$[U]);else W="";else if($[U]===">"){if(W===""){Z=!0;break}}G+=$[U]}if(W!=="")return!1;return{value:G,index:U,tagClosed:Z}}var tw=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g");function oZ($,U){let G=DU.getAllMatches($,tw),W={};for(let Z=0;Z<G.length;Z++){if(G[Z][1].length===0)return f("InvalidAttr","Attribute '"+G[Z][2]+"' has no space in starting.",i1(G[Z]));else if(G[Z][3]!==void 0&&G[Z][4]===void 0)return f("InvalidAttr","Attribute '"+G[Z][2]+"' is without value.",i1(G[Z]));else if(G[Z][3]===void 0&&!U.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+G[Z][2]+"' is not allowed.",i1(G[Z]));let X=G[Z][2];if(!Uz(X))return f("InvalidAttr","Attribute '"+X+"' is an invalid name.",i1(G[Z]));if(!W.hasOwnProperty(X))W[X]=1;else return f("InvalidAttr","Attribute '"+X+"' is repeated.",i1(G[Z]))}return!0}function ew($,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}function $z($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,ew($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U}function f($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}}function Uz($){return DU.isName($)}function Gz($){return DU.isName($)}function k($,U){let G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}}function i1($){return $.startIndex+$[1].length}});var aZ=M((Lz)=>{var rZ={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 $}},Xz=function($){return Object.assign({},rZ,$)};Lz.buildOptions=Xz;Lz.defaultOptions=rZ});var $X=M((sV,eZ)=>{class tZ{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})}}eZ.exports=tZ});var GX=M((lV,UX)=>{var Fz=Z$();function wz($,U){let 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,Z=!1,X=!1,L="";for(;U<$.length;U++)if($[U]==="<"&&!X){if(Z&&Rz($,U)){if(U+=7,[entityName,val,U]=zz($,U+1),val.indexOf("&")===-1)G[Mz(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(Z&&Iz($,U))U+=8;else if(Z&&Kz($,U))U+=8;else if(Z&&Bz($,U))U+=9;else if(Jz)X=!0;else throw new Error("Invalid DOCTYPE");W++,L=""}else if($[U]===">"){if(X){if($[U-1]==="-"&&$[U-2]==="-")X=!1,W--}else W--;if(W===0)break}else if($[U]==="[")Z=!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}}function zz($,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");let W=$[U++],Z="";for(;U<$.length&&$[U]!==W;U++)Z+=$[U];return[G,Z,U]}function Jz($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1}function Rz($,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}function Iz($,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}function Kz($,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}function Bz($,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}function Mz($){if(Fz.isName($))return $;else throw new Error(`Invalid entity name ${$}`)}UX.exports=wz});var ZX=M((mV,WX)=>{var Vz=/^[-+]?0x[a-fA-F0-9]+$/,Tz=/^([\-\+])?(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 Ez={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function Hz($,U={}){if(U=Object.assign({},Ez,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&Vz.test(G))return Number.parseInt(G,16);else{let W=Tz.exec(G);if(W){let Z=W[1],X=W[2],L=Az(W[3]),Y=W[4]||W[6];if(!U.leadingZeros&&X.length>0&&Z&&G[2]!==".")return $;else if(!U.leadingZeros&&X.length>0&&!Z&&G[1]!==".")return $;else{let Q=Number(G),F=""+Q;if(F.search(/[eE]/)!==-1)if(U.eNotation)return Q;else return $;else if(Y)if(U.eNotation)return Q;else return $;else if(G.indexOf(".")!==-1)if(F==="0"&&L==="")return Q;else if(F===L)return Q;else if(Z&&F==="-"+L)return Q;else return $;if(X)if(L===F)return Q;else if(Z+L===F)return Q;else return $;if(G===F)return Q;else if(G===Z+F)return Q;return $}}else return $}}function Az($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $}WX.exports=Hz});var QX=M((nV,YX)=>{var XX=Z$(),o1=$X(),Oz=GX(),Cz=ZX();class LX{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=qz,this.parseXml=Pz,this.parseTextData=Nz,this.resolveNameSpace=jz,this.buildAttributesMap=bz,this.isItStopNode=hz,this.replaceEntitiesValue=kz,this.readStopNodeData=vz,this.saveTextToParentTag=Dz,this.addChild=Sz}}function qz($){let U=Object.keys($);for(let G=0;G<U.length;G++){let W=U[G];this.lastEntities[W]={regex:new RegExp("&"+W+";","g"),val:$[W]}}}function Nz($,U,G,W,Z,X,L){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!L)$=this.replaceEntitiesValue($);let Y=this.options.tagValueProcessor(U,$,G,Z,X);if(Y===null||Y===void 0)return $;else if(typeof Y!==typeof $||Y!==$)return Y;else if(this.options.trimValues)return vU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return vU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}}function jz($){if(this.options.removeNSPrefix){let U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $}var fz=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm");function bz($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){let W=XX.getAllMatches($,fz),Z=W.length,X={};for(let L=0;L<Z;L++){let Y=this.resolveNameSpace(W[L][1]),Q=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(Q!==void 0){if(this.options.trimValues)Q=Q.trim();Q=this.replaceEntitiesValue(Q);let w=this.options.attributeValueProcessor(Y,Q,U);if(w===null||w===void 0)X[F]=Q;else if(typeof w!==typeof Q||w!==Q)X[F]=w;else X[F]=vU(Q,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)X[F]=!0}}if(!Object.keys(X).length)return;if(this.options.attributesGroupName){let L={};return L[this.options.attributesGroupName]=X,L}return X}}var Pz=function($){$=$.replace(/\r\n?/g,"\n");let U=new o1("!xml"),G=U,W="",Z="";for(let X=0;X<$.length;X++)if($[X]==="<")if($[X+1]==="/"){let Y=K1($,">",X,"Closing Tag is not closed."),Q=$.substring(X+2,Y).trim();if(this.options.removeNSPrefix){let z=Q.indexOf(":");if(z!==-1)Q=Q.substr(z+1)}if(this.options.transformTagName)Q=this.options.transformTagName(Q);if(G)W=this.saveTextToParentTag(W,G,Z);let F=Z.substring(Z.lastIndexOf(".")+1);if(Q&&this.options.unpairedTags.indexOf(Q)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${Q}>`);let w=0;if(F&&this.options.unpairedTags.indexOf(F)!==-1)w=Z.lastIndexOf(".",Z.lastIndexOf(".")-1),this.tagsNodeStack.pop();else w=Z.lastIndexOf(".");Z=Z.substring(0,w),G=this.tagsNodeStack.pop(),W="",X=Y}else if($[X+1]==="?"){let Y=xU($,X,!1,"?>");if(!Y)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,Z),this.options.ignoreDeclaration&&Y.tagName==="?xml"||this.options.ignorePiTags);else{let Q=new o1(Y.tagName);if(Q.add(this.options.textNodeName,""),Y.tagName!==Y.tagExp&&Y.attrExpPresent)Q[":@"]=this.buildAttributesMap(Y.tagExp,Z,Y.tagName);this.addChild(G,Q,Z)}X=Y.closeIndex+1}else if($.substr(X+1,3)==="!--"){let Y=K1($,"-->",X+4,"Comment is not closed.");if(this.options.commentPropName){let Q=$.substring(X+4,Y-2);W=this.saveTextToParentTag(W,G,Z),G.add(this.options.commentPropName,[{[this.options.textNodeName]:Q}])}X=Y}else if($.substr(X+1,2)==="!D"){let Y=Oz($,X);this.docTypeEntities=Y.entities,X=Y.i}else if($.substr(X+1,2)==="!["){let Y=K1($,"]]>",X,"CDATA is not closed.")-2,Q=$.substring(X+9,Y);W=this.saveTextToParentTag(W,G,Z);let F=this.parseTextData(Q,G.tagname,Z,!0,!1,!0,!0);if(F==null)F="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:Q}]);else G.add(this.options.textNodeName,F);X=Y+2}else{let Y=xU($,X,this.options.removeNSPrefix),Q=Y.tagName,F=Y.rawTagName,w=Y.tagExp,z=Y.attrExpPresent,R=Y.closeIndex;if(this.options.transformTagName)Q=this.options.transformTagName(Q);if(G&&W){if(G.tagname!=="!xml")W=this.saveTextToParentTag(W,G,Z,!1)}let J=G;if(J&&this.options.unpairedTags.indexOf(J.tagname)!==-1)G=this.tagsNodeStack.pop(),Z=Z.substring(0,Z.lastIndexOf("."));if(Q!==U.tagname)Z+=Z?"."+Q:Q;if(this.isItStopNode(this.options.stopNodes,Z,Q)){let I="";if(w.length>0&&w.lastIndexOf("/")===w.length-1){if(Q[Q.length-1]==="/")Q=Q.substr(0,Q.length-1),Z=Z.substr(0,Z.length-1),w=Q;else w=w.substr(0,w.length-1);X=Y.closeIndex}else if(this.options.unpairedTags.indexOf(Q)!==-1)X=Y.closeIndex;else{let B=this.readStopNodeData($,F,R+1);if(!B)throw new Error(`Unexpected end of ${F}`);X=B.i,I=B.tagContent}let V=new o1(Q);if(Q!==w&&z)V[":@"]=this.buildAttributesMap(w,Z,Q);if(I)I=this.parseTextData(I,Q,Z,!0,z,!0,!0);Z=Z.substr(0,Z.lastIndexOf(".")),V.add(this.options.textNodeName,I),this.addChild(G,V,Z)}else{if(w.length>0&&w.lastIndexOf("/")===w.length-1){if(Q[Q.length-1]==="/")Q=Q.substr(0,Q.length-1),Z=Z.substr(0,Z.length-1),w=Q;else w=w.substr(0,w.length-1);if(this.options.transformTagName)Q=this.options.transformTagName(Q);let I=new o1(Q);if(Q!==w&&z)I[":@"]=this.buildAttributesMap(w,Z,Q);this.addChild(G,I,Z),Z=Z.substr(0,Z.lastIndexOf("."))}else{let I=new o1(Q);if(this.tagsNodeStack.push(G),Q!==w&&z)I[":@"]=this.buildAttributesMap(w,Z,Q);this.addChild(G,I,Z),G=I}W="",X=R}}else W+=$[X];return U.child};function Sz($,U,G){let W=this.options.updateTag(U.tagname,G,U[":@"]);if(W===!1);else if(typeof W==="string")U.tagname=W,$.addChild(U);else $.addChild(U)}var kz=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){let G=this.docTypeEntities[U];$=$.replace(G.regx,G.val)}for(let U in this.lastEntities){let G=this.lastEntities[U];$=$.replace(G.regex,G.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){let G=this.htmlEntities[U];$=$.replace(G.regex,G.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};function Dz($,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 $}function hz($,U,G){let W="*."+G;for(let Z in $){let X=$[Z];if(W===X||U===X)return!0}return!1}function xz($,U,G=">"){let W,Z="";for(let X=U;X<$.length;X++){let L=$[X];if(W){if(L===W)W=""}else if(L==='"'||L==="'")W=L;else if(L===G[0])if(G[1]){if($[X+1]===G[1])return{data:Z,index:X}}else return{data:Z,index:X};else if(L==="\t")L=" ";Z+=L}}function K1($,U,G,W){let Z=$.indexOf(U,G);if(Z===-1)throw new Error(W);else return Z+U.length-1}function xU($,U,G,W=">"){let Z=xz($,U+1,W);if(!Z)return;let{data:X,index:L}=Z,Y=X.search(/\s/),Q=X,F=!0;if(Y!==-1)Q=X.substring(0,Y),X=X.substring(Y+1).trimStart();let w=Q;if(G){let z=Q.indexOf(":");if(z!==-1)Q=Q.substr(z+1),F=Q!==Z.data.substr(z+1)}return{tagName:Q,tagExp:X,closeIndex:L,attrExpPresent:F,rawTagName:w}}function vz($,U,G){let W=G,Z=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){let X=K1($,">",G,`${U} is not closed`);if($.substring(G+2,X).trim()===U){if(Z--,Z===0)return{tagContent:$.substring(W,G),i:X}}G=X}else if($[G+1]==="?")G=K1($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=K1($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=K1($,"]]>",G,"StopNode is not closed.")-2;else{let X=xU($,G,">");if(X){if((X&&X.tagName)===U&&X.tagExp[X.tagExp.length-1]!=="/")Z++;G=X.closeIndex}}}function vU($,U,G){if(U&&typeof $==="string"){let W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return Cz($,G)}else if(XX.isExist($))return $;else return""}YX.exports=LX});var wX=M((gz)=>{function cz($,U){return FX($,U)}function FX($,U,G){let W,Z={};for(let X=0;X<$.length;X++){let L=$[X],Y=yz(L),Q="";if(G===void 0)Q=Y;else Q=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=FX(L[Y],U,Q),w=uz(F,U);if(L[":@"])_z(F,L[":@"],Q,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(Z[Y]!==void 0&&Z.hasOwnProperty(Y)){if(!Array.isArray(Z[Y]))Z[Y]=[Z[Y]];Z[Y].push(F)}else if(U.isArray(Y,Q,w))Z[Y]=[F];else Z[Y]=F}}if(typeof W==="string"){if(W.length>0)Z[U.textNodeName]=W}else if(W!==void 0)Z[U.textNodeName]=W;return Z}function yz($){let U=Object.keys($);for(let G=0;G<U.length;G++){let W=U[G];if(W!==":@")return W}}function _z($,U,G,W){if(U){let Z=Object.keys(U),X=Z.length;for(let L=0;L<X;L++){let Y=Z[L];if(W.isArray(Y,G+"."+Y,!0,!0))$[Y]=[U[Y]];else $[Y]=U[Y]}}}function uz($,U){let{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}gz.prettify=cz});var RX=M((oV,JX)=>{var{buildOptions:dz}=aZ(),sz=QX(),{prettify:lz}=wX(),mz=hU();class zX{constructor($){this.externalEntities={},this.options=dz($)}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={};let Z=mz.validate($,U);if(Z!==!0)throw Error(`${Z.err.msg}:${Z.err.line}:${Z.err.col}`)}let G=new sz(this.options);G.addExternalEntities(this.externalEntities);let W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return lz(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 '&#xD;'");else if(U==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[$]=U}}JX.exports=zX});var VX=M((rV,MX)=>{function nz($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return KX($,U,"",G)}function KX($,U,G,W){let Z="",X=!1;for(let L=0;L<$.length;L++){let Y=$[L],Q=iz(Y);if(Q===void 0)continue;let F="";if(G.length===0)F=Q;else F=`${G}.${Q}`;if(Q===U.textNodeName){let I=Y[Q];if(!oz(F,U))I=U.tagValueProcessor(Q,I),I=BX(I,U);if(X)Z+=W;Z+=I,X=!1;continue}else if(Q===U.cdataPropName){if(X)Z+=W;Z+=`<![CDATA[${Y[Q][0][U.textNodeName]}]]>`,X=!1;continue}else if(Q===U.commentPropName){Z+=W+`<!--${Y[Q][0][U.textNodeName]}-->`,X=!0;continue}else if(Q[0]==="?"){let I=IX(Y[":@"],U),V=Q==="?xml"?"":W,B=Y[Q][0][U.textNodeName];B=B.length!==0?" "+B:"",Z+=V+`<${Q}${B}${I}?>`,X=!0;continue}let w=W;if(w!=="")w+=U.indentBy;let z=IX(Y[":@"],U),R=W+`<${Q}${z}`,J=KX(Y[Q],U,F,w);if(U.unpairedTags.indexOf(Q)!==-1)if(U.suppressUnpairedNode)Z+=R+">";else Z+=R+"/>";else if((!J||J.length===0)&&U.suppressEmptyNode)Z+=R+"/>";else if(J&&J.endsWith(">"))Z+=R+`>${J}${W}</${Q}>`;else{if(Z+=R+">",J&&W!==""&&(J.includes("/>")||J.includes("</")))Z+=W+U.indentBy+J+W;else Z+=J;Z+=`</${Q}>`}X=!0}return Z}function iz($){let U=Object.keys($);for(let G=0;G<U.length;G++){let W=U[G];if(!$.hasOwnProperty(W))continue;if(W!==":@")return W}}function IX($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let Z=U.attributeValueProcessor(W,$[W]);if(Z=BX(Z,U),Z===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${Z}"`}return G}function oz($,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}function BX($,U){if($&&$.length>0&&U.processEntities)for(let G=0;G<U.entities.length;G++){let W=U.entities[G];$=$.replace(W.regex,W.val)}return $}MX.exports=nz});var EX=M((aV,TX)=>{var rz=VX(),az={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:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Z1($){if(this.options=Object.assign({},az,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=$J;if(this.processTextOrObjNode=tz,this.options.format)this.indentate=ez,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}Z1.prototype.build=function($){if(this.options.preserveOrder)return rz($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};Z1.prototype.j2x=function($,U){let G="",W="";for(let Z in $){if(!Object.prototype.hasOwnProperty.call($,Z))continue;if(typeof $[Z]==="undefined"){if(this.isAttribute(Z))W+=""}else if($[Z]===null)if(this.isAttribute(Z))W+="";else if(Z[0]==="?")W+=this.indentate(U)+"<"+Z+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+Z+"/"+this.tagEndChar;else if($[Z]instanceof Date)W+=this.buildTextValNode($[Z],Z,"",U);else if(typeof $[Z]!=="object"){let X=this.isAttribute(Z);if(X)G+=this.buildAttrPairStr(X,""+$[Z]);else if(Z===this.options.textNodeName){let L=this.options.tagValueProcessor(Z,""+$[Z]);W+=this.replaceEntitiesValue(L)}else W+=this.buildTextValNode($[Z],Z,"",U)}else if(Array.isArray($[Z])){let X=$[Z].length,L="",Y="";for(let Q=0;Q<X;Q++){let F=$[Z][Q];if(typeof F==="undefined");else if(F===null)if(Z[0]==="?")W+=this.indentate(U)+"<"+Z+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+Z+"/"+this.tagEndChar;else if(typeof F==="object")if(this.options.oneListGroup){let w=this.j2x(F,U+1);if(L+=w.val,this.options.attributesGroupName&&F.hasOwnProperty(this.options.attributesGroupName))Y+=w.attrStr}else L+=this.processTextOrObjNode(F,Z,U);else if(this.options.oneListGroup){let w=this.options.tagValueProcessor(Z,F);w=this.replaceEntitiesValue(w),L+=w}else L+=this.buildTextValNode(F,Z,"",U)}if(this.options.oneListGroup)L=this.buildObjectNode(L,Z,Y,U);W+=L}else if(this.options.attributesGroupName&&Z===this.options.attributesGroupName){let X=Object.keys($[Z]),L=X.length;for(let Y=0;Y<L;Y++)G+=this.buildAttrPairStr(X[Y],""+$[Z][X[Y]])}else W+=this.processTextOrObjNode($[Z],Z,U)}return{attrStr:G,val:W}};Z1.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};function tz($,U,G){let 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)}Z1.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 Z="</"+U+this.tagEndChar,X="";if(U[0]==="?")X="?",Z="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(W)+"<"+U+G+X+">"+$+Z;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&X.length===0)return this.indentate(W)+`<!--${$}-->`+this.newLine;else return this.indentate(W)+"<"+U+G+X+this.tagEndChar+$+this.indentate(W)+Z}};Z1.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};Z1.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 Z=this.options.tagValueProcessor(U,$);if(Z=this.replaceEntitiesValue(Z),Z==="")return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(W)+"<"+U+G+">"+Z+"</"+U+this.tagEndChar}};Z1.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){let G=this.options.entities[U];$=$.replace(G.regex,G.val)}return $};function ez($){return this.options.indentBy.repeat($)}function $J($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1}TX.exports=Z1});var AX=M((tV,HX)=>{var UJ=hU(),GJ=RX(),WJ=EX();HX.exports={XMLParser:GJ,XMLValidator:UJ,XMLBuilder:WJ}});var fX=M((eV,jX)=>{var{defineProperty:X$,getOwnPropertyDescriptor:ZJ,getOwnPropertyNames:XJ}=Object,LJ=Object.prototype.hasOwnProperty,x=($,U)=>X$($,"name",{value:U,configurable:!0}),YJ=($,U)=>{for(var G in U)X$($,G,{get:U[G],enumerable:!0})},QJ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let Z of XJ(U))if(!LJ.call($,Z)&&Z!==G)X$($,Z,{get:()=>U[Z],enumerable:!(W=ZJ(U,Z))||W.enumerable})}return $},FJ=($)=>QJ(X$({},"__esModule",{value:!0}),$),OX={};YJ(OX,{_toBool:()=>zJ,_toNum:()=>JJ,_toStr:()=>wJ,awsExpectUnion:()=>IJ,loadRestJsonErrorCode:()=>MJ,loadRestXmlErrorCode:()=>HJ,parseJsonBody:()=>qX,parseJsonErrorBody:()=>BJ,parseXmlBody:()=>NX,parseXmlErrorBody:()=>EJ});jX.exports=FJ(OX);var wJ=x(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){let U=new Error(`Received number ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}if(typeof $==="boolean"){let U=new Error(`Received boolean ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}return $},"_toStr"),zJ=x(($)=>{if($==null)return $;if(typeof $==="string"){let U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){let G=new Error(`Received string "${$}" where a boolean was expected.`);G.name="Warning",console.warn(G)}return $!==""&&U!=="false"}return $},"_toBool"),JJ=x(($)=>{if($==null)return $;if(typeof $==="string"){let U=Number($);if(U.toString()!==$){let G=new Error(`Received string "${$}" where a number was expected.`);return G.name="Warning",console.warn(G),$}return U}return $},"_toNum"),RJ=O1(),IJ=x(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return RJ.expectUnion($)},"awsExpectUnion"),KJ=O1(),CX=x(($,U)=>KJ.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),qX=x(($,U)=>CX($,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"),BJ=x(async($,U)=>{let G=await qX($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),MJ=x(($,U)=>{let G=x((X,L)=>Object.keys(X).find((Y)=>Y.toLowerCase()===L.toLowerCase()),"findKey"),W=x((X)=>{let L=X;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"),Z=G($.headers,"x-amzn-errortype");if(Z!==void 0)return W($.headers[Z]);if(U.code!==void 0)return W(U.code);if(U.__type!==void 0)return W(U.__type)},"loadRestJsonErrorCode"),VJ=O1(),TJ=AX(),NX=x(($,U)=>CX($,U).then((G)=>{if(G.length){let W=new TJ.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(Q,F)=>F.trim()===""&&F.includes("\n")?"":void 0});W.addEntity("#xD","\r"),W.addEntity("#10","\n");let Z;try{Z=W.parse(G,!0)}catch(Q){if(Q&&typeof Q==="object")Object.defineProperty(Q,"$responseBodyText",{value:G});throw Q}let X="#text",L=Object.keys(Z)[0],Y=Z[L];if(Y[X])Y[L]=Y[X],delete Y[X];return VJ.getValueFromTextNode(Y)}return{}}),"parseXmlBody"),EJ=x(async($,U)=>{let G=await NX($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),HJ=x(($,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 OJ=M((r1)=>{Object.defineProperty(r1,"__esModule",{value:!0});var cU=AJ();cU.__exportStar(RZ(),r1);cU.__exportStar(dZ(),r1);cU.__exportStar(fX(),r1)});function _J($){return $}var gX=($)=>(U)=>async(G)=>{if(!c.isInstance(G.request))return U(G);let{request:W}=G,{handlerProtocol:Z=""}=$.requestHandler.metadata||{};if(Z.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 X=W.hostname;if(W.port!=null)X+=`:${W.port}`;W.headers.host=X}return U(G)},pX={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},uJ=($)=>({applyToStack:(U)=>{U.add(gX($),pX)}});var dX=()=>($,U)=>async(G)=>{try{let W=await $(G),{clientName:Z,commandName:X,logger:L,dynamoDbDocumentClientOptions:Y={}}=U,{overrideInputFilterSensitiveLog:Q,overrideOutputFilterSensitiveLog:F}=Y,w=Q??U.inputFilterSensitiveLog,z=F??U.outputFilterSensitiveLog,{$metadata:R,...J}=W.output;return L?.info?.({clientName:Z,commandName:X,input:w(G.input),output:z(J),metadata:R}),W}catch(W){let{clientName:Z,commandName:X,logger:L,dynamoDbDocumentClientOptions:Y={}}=U,{overrideInputFilterSensitiveLog:Q}=Y,F=Q??U.inputFilterSensitiveLog;throw L?.error?.({clientName:Z,commandName:X,input:F(G.input),error:W,metadata:W.$metadata}),W}},sX={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},pJ=($)=>({applyToStack:(U)=>{U.add(dX(),sX)}});var pU="X-Amzn-Trace-Id",lX="AWS_LAMBDA_FUNCTION_NAME",mX="_X_AMZN_TRACE_ID",nX=($)=>(U)=>async(G)=>{let{request:W}=G;if(!c.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(pU))return U(G);let Z=process.env[lX],X=process.env[mX],L=(Y)=>typeof Y==="string"&&Y.length>0;if(L(Z)&&L(X))W.headers[pU]=X;return U({...G,request:W})},iX={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},nJ=($)=>({applyToStack:(U)=>{U.add(nX($),iX)}});function yR($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}class $F{constructor({size:$,params:U}){if(this.data=new Map,this.parameters=[],this.capacity=$??50,U)this.parameters=U}get($,U){let G=this.hash($);if(G===!1)return U();if(!this.data.has(G)){if(this.data.size>this.capacity+10){let W=this.data.keys(),Z=0;while(!0){let{value:X,done:L}=W.next();if(this.data.delete(X),L||++Z>10)break}}this.data.set(G,U())}return this.data.get(G)}size(){return this.data.size}hash($){let U="",{parameters:G}=this;if(G.length===0)return!1;for(let W of G){let Z=String($[W]??"");if(Z.includes("|;"))return!1;U+=Z+"|;"}return U}}var UF=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}$"),d1=($)=>UF.test($)||$.startsWith("[")&&$.endsWith("]");var GF=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),s1=($,U=!1)=>{if(!U)return GF.test($);let G=$.split(".");for(let W of G)if(!s1(W))return!1;return!0};var l1={};var o="endpoints";function u($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${u($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(u).join(", ")})`;return JSON.stringify($,null,2)}class C extends Error{constructor($){super($);this.name="EndpointError"}}var TW=($,U)=>$===U;var EW=($)=>{let U=$.split("."),G=[];for(let W of U){let Z=W.indexOf("[");if(Z!==-1){if(W.indexOf("]")!==W.length-1)throw new C(`Path: '${$}' does not end with ']'`);let X=W.slice(Z+1,-1);if(Number.isNaN(parseInt(X)))throw new C(`Invalid array index: '${X}' in path: '${$}'`);if(Z!==0)G.push(W.slice(0,Z));G.push(X)}else G.push(W)}return G};var D0=($,U)=>EW(U).reduce((G,W)=>{if(typeof G!=="object")throw new C(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(W)];return G[W]},$);var HW=($)=>$!=null;var AW=($)=>!$;var h0=$1(B1(),1);var XU={[h0.EndpointURLScheme.HTTP]:80,[h0.EndpointURLScheme.HTTPS]:443},OW=($)=>{let U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){let{hostname:R,port:J,protocol:I="",path:V="",query:B={}}=$,T=new URL(`${I}//${R}${J?`:${J}`:""}${V}`);return T.search=Object.entries(B).map(([E,H])=>`${E}=${H}`).join("&"),T}return new URL($)}catch(R){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;let G=U.href,{host:W,hostname:Z,pathname:X,protocol:L,search:Y}=U;if(Y)return null;let Q=L.slice(0,-1);if(!Object.values(h0.EndpointURLScheme).includes(Q))return null;let F=d1(Z),w=G.includes(`${W}:${XU[Q]}`)||typeof $==="string"&&$.includes(`${W}:${XU[Q]}`),z=`${W}${w?`:${XU[Q]}`:""}`;return{scheme:Q,authority:z,path:X,normalizedPath:X.endsWith("/")?X:`${X}/`,isIp:F}};var CW=($,U)=>$===U;var qW=($,U,G,W)=>{if(U>=G||$.length<G)return null;if(!W)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var NW=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var jW={booleanEquals:TW,getAttr:D0,isSet:HW,isValidHostLabel:s1,not:AW,parseURL:OW,stringEquals:CW,substring:qW,uriEncode:NW};var x0=($,U)=>{let G=[],W={...U.endpointParams,...U.referenceRecord},Z=0;while(Z<$.length){let X=$.indexOf("{",Z);if(X===-1){G.push($.slice(Z));break}G.push($.slice(Z,X));let L=$.indexOf("}",X);if(L===-1){G.push($.slice(X));break}if($[X+1]==="{"&&$[L+1]==="}")G.push($.slice(X+1,L)),Z=L+2;let Y=$.substring(X+1,L);if(Y.includes("#")){let[Q,F]=Y.split("#");G.push(D0(W[Q],F))}else G.push(W[Y]);Z=L+1}return G.join("")};var fW=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var U1=($,U,G)=>{if(typeof $==="string")return x0($,G);else if($.fn)return v0($,G);else if($.ref)return fW($,G);throw new C(`'${U}': ${String($)} is not a string, function or reference.`)};var v0=({fn:$,argv:U},G)=>{let W=U.map((X)=>["boolean","number"].includes(typeof X)?X:U1(X,"arg",G)),Z=$.split(".");if(Z[0]in l1&&Z[1]!=null)return l1[Z[0]][Z[1]](...W);return jW[$](...W)};var bW=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new C(`'${$}' is already defined in Reference Record.`);let W=v0(U,G);return G.logger?.debug?.(`${o} evaluateCondition: ${u(U)} = ${u(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var q1=($=[],U)=>{let G={};for(let W of $){let{result:Z,toAssign:X}=bW(W,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!Z)return{result:Z};if(X)G[X.name]=X.value,U.logger?.debug?.(`${o} assign: ${X.name} := ${u(X.value)}`)}return{result:!0,referenceRecord:G}};var PW=($,U)=>Object.entries($).reduce((G,[W,Z])=>({...G,[W]:Z.map((X)=>{let L=U1(X,"Header value entry",U);if(typeof L!=="string")throw new C(`Header '${W}' value '${L}' is not a string`);return L})}),{});var LU=($,U)=>{if(Array.isArray($))return $.map((G)=>LU(G,U));switch(typeof $){case"string":return x0($,U);case"object":if($===null)throw new C(`Unexpected endpoint property: ${$}`);return c0($,U);case"boolean":return $;default:throw new C(`Unexpected endpoint property type: ${typeof $}`)}};var c0=($,U)=>Object.entries($).reduce((G,[W,Z])=>({...G,[W]:LU(Z,U)}),{});var SW=($,U)=>{let G=U1($,"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 C(`Endpoint URL must be a string, got ${typeof G}`)};var kW=($,U)=>{let{conditions:G,endpoint:W}=$,{result:Z,referenceRecord:X}=q1(G,U);if(!Z)return;let L={...U,referenceRecord:{...U.referenceRecord,...X}},{url:Y,properties:Q,headers:F}=W;return U.logger?.debug?.(`${o} Resolving endpoint from template: ${u(W)}`),{...F!=null&&{headers:PW(F,L)},...Q!=null&&{properties:c0(Q,L)},url:SW(Y,L)}};var DW=($,U)=>{let{conditions:G,error:W}=$,{result:Z,referenceRecord:X}=q1(G,U);if(!Z)return;throw new C(U1(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...X}}))};var hW=($,U)=>{let{conditions:G,rules:W}=$,{result:Z,referenceRecord:X}=q1(G,U);if(!Z)return;return y0(W,{...U,referenceRecord:{...U.referenceRecord,...X}})};var y0=($,U)=>{for(let G of $)if(G.type==="endpoint"){let W=kW(G,U);if(W)return W}else if(G.type==="error")DW(G,U);else if(G.type==="tree"){let W=hW(G,U);if(W)return W}else throw new C(`Unknown endpoint rule: ${G}`);throw new C("Rules evaluation failed")};var WF=($,U)=>{let{endpointParams:G,logger:W}=U,{parameters:Z,rules:X}=$;U.logger?.debug?.(`${o} Initial EndpointParams: ${u(G)}`);let L=Object.entries(Z).filter(([,F])=>F.default!=null).map(([F,w])=>[F,w.default]);if(L.length>0)for(let[F,w]of L)G[F]=G[F]??w;let Y=Object.entries(Z).filter(([,F])=>F.required).map(([F])=>F);for(let F of Y)if(G[F]==null)throw new C(`Missing required parameter: '${F}'`);let Q=y0(X,{endpointParams:G,logger:W,referenceRecord:{}});return U.logger?.debug?.(`${o} Resolved endpoint: ${u(Q)}`),Q};var YU=($,U=!1)=>{if(U){for(let G of $.split("."))if(!YU(G))return!1;return!0}if(!s1($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(d1($))return!1;return!0};var xW=($)=>{let U=$.split(":");if(U.length<6)return null;let[G,W,Z,X,L,...Y]=U;if(G!=="arn"||W===""||Z===""||Y.join(":")==="")return null;let Q=Y.map((F)=>F.split("/")).flat();return{partition:W,service:Z,region:X,accountId:L,resourceId:Q}};var vW={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"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 XF=vW,LF="",cW=($)=>{let{partitions:U}=XF;for(let W of U){let{regions:Z,outputs:X}=W;for(let[L,Y]of Object.entries(Z))if(L===$)return{...X,...Y}}for(let W of U){let{regionRegex:Z,outputs:X}=W;if(new RegExp(Z).test($))return{...X}}let 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 yW=()=>LF;var YF={isVirtualHostableS3Bucket:YU,parseArn:xW,partition:cW};l1.aws=YF;var QU="user-agent",_0="x-amz-user-agent",FU=" ",u0="/",_W=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,uW=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,wU="-";var QF=($)=>(U,G)=>async(W)=>{let{request:Z}=W;if(!c.isInstance(Z))return U(W);let{headers:X}=Z,L=G?.userAgent?.map(zU)||[],Y=(await $.defaultUserAgentProvider()).map(zU),Q=$?.customUserAgent?.map(zU)||[],F=yW(),w=(F?[F]:[]).concat([...Y,...L,...Q]).join(FU),z=[...Y.filter((R)=>R.startsWith("aws-sdk-")),...Q].join(FU);if($.runtime!=="browser"){if(z)X[_0]=X[_0]?`${X[QU]} ${z}`:z;X[QU]=w}else X[_0]=w;return U({...W,request:Z})},zU=($)=>{let U=$[0].split(u0).map((L)=>L.replace(_W,wU)).join(u0),G=$[1]?.replace(uW,wU),W=U.indexOf(u0),Z=U.substring(0,W),X=U.substring(W+1);if(Z==="api")X=X.toLowerCase();return[Z,X,G].filter((L)=>L&&L.length>0).reduce((L,Y,Q)=>{switch(Q){case 0:return Y;case 1:return`${L}/${Y}`;default:return`${L}#${Y}`}},"")},FF={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},T3=($)=>({applyToStack:(U)=>{U.add(QF($),FF)}});var g0=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var JU=($)=>g0($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var b3=($)=>{let{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return JU(U);let W=await U();return JU(W)},useFipsEndpoint:async()=>{let W=typeof U==="string"?U:await U();if(g0(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var N1=($,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 G1;(function($){$.ENV="env",$.CONFIG="shared config entry"})(G1||(G1={}));var wF="AWS_USE_DUALSTACK_ENDPOINT",zF="use_dualstack_endpoint";var _3={environmentVariableSelector:($)=>N1($,wF,G1.ENV),configFileSelector:($)=>N1($,zF,G1.CONFIG),default:!1};var JF="AWS_USE_FIPS_ENDPOINT",RF="use_fips_endpoint";var p3={environmentVariableSelector:($)=>N1($,JF,G1.ENV),configFileSelector:($)=>N1($,RF,G1.CONFIG),default:!1};var IF=$1(l(),1);var KF=$1(l(),1);var gW={environmentVariableSelector:($)=>$.AWS_REGION,configFileSelector:($)=>$.region,default:()=>{throw new Error("Region is missing")}},$B={preferredFile:"credentials"};var pW="content-length";function BF($){return(U)=>async(G)=>{let W=G.request;if(c.isInstance(W)){let{body:Z,headers:X}=W;if(Z&&Object.keys(X).map((L)=>L.toLowerCase()).indexOf(pW)===-1)try{let L=$(Z);W.headers={...W.headers,[pW]:String(L)}}catch(L){}}return U({...G,request:W})}}var MF={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},jB=($)=>({applyToStack:(U)=>{U.add(BF($.bodyLengthChecker),MF)}});var aW=$1(t1(),1);var oW=$1(l(),1);var dW=async($)=>{let U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(AF(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!HF(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},VF=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,TF=/(\d+\.){3}\d+/,EF=/\.\./;var HF=($)=>VF.test($)&&!TF.test($)&&!EF.test($),AF=($)=>{let[U,G,W,,,Z]=$.split(":"),X=U==="arn"&&$.split(":").length>=6,L=Boolean(X&&G&&W&&Z);if(X&&!L)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return L};var sW=($,U,G)=>{let W=async()=>{let Z=G[$]??G[U];if(typeof Z==="function")return Z();return Z};if($==="credentialScope"||U==="CredentialScope")return async()=>{let Z=typeof G.credentials==="function"?await G.credentials():G.credentials;return Z?.credentialScope??Z?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{let Z=typeof G.credentials==="function"?await G.credentials():G.credentials;return Z?.accountId??Z?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{let Z=await W();if(Z&&typeof Z==="object"){if("url"in Z)return Z.url.href;if("hostname"in Z){let{protocol:X,hostname:L,port:Y,path:Q}=Z;return`${X}//${L}${Y?":"+Y:""}${Q}`}}return Z};return W};var lW="AWS_ENDPOINT_URL",mW="endpoint_url",nW=($)=>({environmentVariableSelector:(U)=>{let G=$.split(" ").map((X)=>X.toUpperCase()),W=U[[lW,...G].join("_")];if(W)return W;let Z=U[lW];if(Z)return Z;return},configFileSelector:(U,G)=>{if(G&&U.services){let Z=G[["services",U.services].join(RU)];if(Z){let X=$.split(" ").map((Y)=>Y.toLowerCase()),L=Z[[X.join("_"),mW].join(RU)];if(L)return L}}let W=U[mW];if(W)return W;return},default:void 0});var p0=async($)=>z1(nW($??""))();var d0=($)=>{if(typeof $==="object"){if("url"in $)return IU($.url);return $}return IU($)};var iW=async($,U,G,W)=>{if(!G.endpoint){let L;if(G.serviceConfiguredEndpoint)L=await G.serviceConfiguredEndpoint();else L=await p0(G.serviceId);if(L)G.endpoint=()=>Promise.resolve(d0(L))}let Z=await OF($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(Z,W)},OF=async($,U,G)=>{let W={},Z=U?.getEndpointParameterInstructions?.()||{};for(let[X,L]of Object.entries(Z))switch(L.type){case"staticContextParams":W[X]=L.value;break;case"contextParams":W[X]=$[L.name];break;case"clientContextParams":case"builtInParams":W[X]=await sW(L.name,X,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(Z).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await dW(W);return W};var rW=({config:$,instructions:U})=>{return(G,W)=>async(Z)=>{let X=await iW(Z.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=X,W.authSchemes=X.properties?.authSchemes;let L=W.authSchemes?.[0];if(L){W.signing_region=L.signingRegion,W.signing_service=L.signingName;let Q=oW.getSmithyContext(W)?.selectedHttpAuthScheme?.httpAuthOption;if(Q)Q.signingProperties=Object.assign(Q.signingProperties||{},{signing_region:L.signingRegion,signingRegion:L.signingRegion,signing_service:L.signingName,signingName:L.signingName,signingRegionSet:L.signingRegionSet},L.properties)}return G({...Z})}};var CF={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:aW.serializerMiddlewareOption.name},iB=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(rW({config:$,instructions:U}),CF)}});var s0=$1(l(),1);var tB=($)=>{let U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>d0(await s0.normalizeProvider(G)()):void 0,X={...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:s0.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:s0.normalizeProvider($.useFipsEndpoint??!1)},L=void 0;return X.serviceConfiguredEndpoint=async()=>{if($.serviceId&&!L)L=p0($.serviceId);return L},X};var HU=$1(l(),1);var g;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(g||(g={}));var J1=3,tW=g.STANDARD;var eW=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],$Z=["TimeoutError","RequestTimeout","RequestTimeoutException"],UZ=[500,502,503,504],GZ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var qF=($)=>$.$metadata?.clockSkewCorrected,j1=($)=>$.$metadata?.httpStatusCode===429||eW.includes($.name)||$.$retryable?.throttling==!0,l0=($)=>qF($)||$Z.includes($.name)||GZ.includes($?.code||"")||UZ.includes($.$metadata?.httpStatusCode||0),WZ=($)=>{if($.$metadata?.httpStatusCode!==void 0){let U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!l0($))return!0;return!1}return!1};class m0{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;let 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){let U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){let $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}let U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),j1($)){let 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());let 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(){let $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){let 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,m1=20000,KU=500,n0=500,BU=5,MU=10,VU=1,i0="amz-sdk-invocation-id",o0="amz-sdk-request";var ZZ=()=>{let $=R1;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min(m1,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var TU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(m1,$),getRetryCost:()=>G}};class f1{constructor($){this.maxAttempts=$,this.mode=g.STANDARD,this.capacity=n0,this.retryBackoffStrategy=ZZ(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return TU({retryDelay:R1,retryCount:0})}async refreshRetryTokenForRetry($,U){let G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){let W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?KU:R1);let Z=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),X=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,Z):Z,L=this.getCapacityCost(W);return this.capacity-=L,TU({retryDelay:X,retryCount:$.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(n0,this.capacity+($.getRetryCost()??VU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${J1}`),J1}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?MU:BU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class EU{constructor($,U){this.maxAttemptsProvider=$,this.mode=g.ADAPTIVE;let{rateLimiter:G}=U??{};this.rateLimiter=G??new m0,this.standardRetryStrategy=new f1($)}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 XZ="AWS_MAX_ATTEMPTS",LZ="max_attempts",pM={environmentVariableSelector:($)=>{let U=$[XZ];if(!U)return;let G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${XZ} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{let U=$[LZ];if(!U)return;let G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${LZ} mast be a number, got "${U}"`);return G},default:J1},dM=($)=>{let{retryStrategy:U}=$,G=HU.normalizeProvider($.maxAttempts??J1);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await HU.normalizeProvider($.retryMode)()===g.ADAPTIVE)return new EU(G);return new f1(G)}}},NF="AWS_RETRY_MODE",jF="retry_mode",sM={environmentVariableSelector:($)=>$[NF],configFileSelector:($)=>$[jF],default:tW};import{Readable as fF}from"stream";var YZ=($)=>$?.body instanceof fF||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var AU=($)=>{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 bF=($)=>(U,G)=>async(W)=>{let Z=await $.retryStrategy(),X=await $.maxAttempts();if(PF(Z)){Z=Z;let L=await Z.acquireInitialRetryToken(G.partition_id),Y=new Error,Q=0,F=0,{request:w}=W,z=c.isInstance(w);if(z)w.headers[i0]=QZ();while(!0)try{if(z)w.headers[o0]=`attempt=${Q+1}; max=${X}`;let{response:R,output:J}=await U(W);return Z.recordSuccess(L),J.$metadata.attempts=Q+1,J.$metadata.totalRetryDelay=F,{response:R,output:J}}catch(R){let J=SF(R);if(Y=AU(R),z&&YZ(w))throw(G.logger instanceof FZ?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),Y;try{L=await Z.refreshRetryTokenForRetry(L,J)}catch(V){if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=Q+1,Y.$metadata.totalRetryDelay=F,Y}Q=L.getRetryCount();let I=L.getRetryDelay();F+=I,await new Promise((V)=>setTimeout(V,I))}}else{if(Z=Z,Z?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",Z.mode]];return Z.retry(U,W)}},PF=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",SF=($)=>{let U={error:$,errorType:kF($)},G=hF($.$response);if(G)U.retryAfterHint=G;return U},kF=($)=>{if(j1($))return"THROTTLING";if(l0($))return"TRANSIENT";if(WZ($))return"SERVER_ERROR";return"CLIENT_ERROR"},DF={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},GV=($)=>({applyToStack:(U)=>{U.add(bF($),DF)}}),hF=($)=>{if(!OU.isInstance($))return;let U=Object.keys($.headers).find((X)=>X.toLowerCase()==="retry-after");if(!U)return;let G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)};import{platform as CJ,release as qJ}from"os";import{env as PX,versions as NJ}from"process";var yU={isCrtAvailable:!1};var bX=()=>{if(yU.isCrtAvailable)return["md/crt-avail"];return null};var jJ="AWS_SDK_UA_APP_ID",fJ="sdk-ua-app-id",QT=({serviceId:$,clientVersion:U})=>{let G=[["aws-sdk-js",U],["ua","2.0"],[`os/${CJ()}`,qJ()],["lang/js"],["md/nodejs",`${NJ.node}`]],W=bX();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(PX.AWS_EXECUTION_ENV)G.push([`exec-env/${PX.AWS_EXECUTION_ENV}`]);let Z=z1({environmentVariableSelector:(L)=>L[jJ],configFileSelector:(L)=>L[fJ],default:void 0})(),X=void 0;return async()=>{if(!X){let L=await Z;X=L?[...G,[`app/${L}`]]:[...G]}return X}};import{Buffer as bJ}from"buffer";import{createHash as PJ,createHmac as SJ}from"crypto";class kJ{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(DX(SX($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?SJ(this.algorithmIdentifier,SX(this.secret)):PJ(this.algorithmIdentifier)}}function SX($,U){if(bJ.isBuffer($))return $;if(typeof $==="string")return kX($,U);if(ArrayBuffer.isView($))return _U($.buffer,$.byteOffset,$.byteLength);return _U($)}import{fstatSync as DJ,lstatSync as hJ}from"fs";var MT=($)=>{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 hJ($.path).size;else if(typeof $.fd==="number")return DJ($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var hX="AWS_EXECUTION_ENV",uU="AWS_REGION",gU="AWS_DEFAULT_REGION",xX="AWS_EC2_METADATA_DISABLED",vX=["in-region","cross-region","mobile","standard","legacy"],cX="/latest/meta-data/placement/region";var yX={environmentVariableSelector:($)=>{return $.AWS_DEFAULTS_MODE},configFileSelector:($)=>{return $.defaults_mode},default:"legacy"};var fT=({region:$=z1(gW),defaultsMode:U=z1(yX)}={})=>_X(async()=>{let G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return xJ($);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 ${vX.join(", ")}, got ${G}`)}}),xJ=async($)=>{if($){let U=typeof $==="function"?await $():$,G=await vJ();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},vJ=async()=>{if(process.env[hX]&&(process.env[uU]||process.env[gU]))return process.env[uU]??process.env[gU];if(!process.env[xX])try{let{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-j1cwwmg0.js"),G=await $();return(await U({...G,path:cX})).toString()}catch($){}};var kT=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");let G=$.region;if(typeof G==="string")return G;return G()};return{setRegion(G){U=G},region(){return U}}},DT=($)=>{return{region:$.region()}};export{l as r,_J as s,uJ as t,pJ as u,nJ as v,N1 as w,G1 as x,t1 as y,ZU as z,yR as A,$F as B,l1 as C,WF as D,YF as E,T3 as F,_3 as G,p3 as H,gW as I,$B as J,b3 as K,jB as L,OF as M,iB as N,tB as O,tW as P,pM as Q,dM as R,sM as S,GV as T,OJ as U,QT as V,kJ as W,MT as X,fT as Y,kT as Z,DT as _};
19
-
20
- //# debugId=5714C5074629605264756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{$ as z,aa as B}from"./chunk-9aaqjzzf.js";import"./chunk-cfsd9356.js";import"./chunk-t098k1va.js";import{lb as K,mb as y}from"./chunk-8h7xg91g.js";import"./chunk-yp5mh81v.js";import{parse as p}from"url";import{Buffer as M}from"buffer";import{request as k}from"http";function E(c){return new Promise((I,x)=>{let T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let $=[];N.on("data",(w)=>{$.push(w)}),N.on("end",()=>{I(M.concat($)),T.destroy()})}),T.end()})}var _=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",D=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var hc=1000,Yc=0,G=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var X="AWS_CONTAINER_CREDENTIALS_FULL_URI",Z="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",mc=(c={})=>{let{timeout:I,maxRetries:x}=G(c);return()=>m(async()=>{let T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!_(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return D(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await E({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[Z])return{hostname:a,path:process.env[Z]};if(process.env[X]){let I=p(process.env[X]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new y(`The container metadata credential provider cannot be used unless the ${Z} or ${X} environment variable is set`,{tryNextLink:!1,logger:c})};class Q extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Q.prototype)}}var J;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(J||(J={}));var H={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var u;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(u||(u={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:u.IPv4};var v=async()=>B(await r()||await d()),r=async()=>z(H)(),d=async()=>{let c=await z(q)();switch(c){case u.IPv4:return J.IPv4;case u.IPv6:return J.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(u)}`)}};var L=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var U=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",e="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",oc=(c={})=>U(i(c),{logger:c.logger}),i=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=G(c),$=async(w,j)=>{if(I||j.headers?.[F]==null){let h=!1,Y=!1,R=await z({environmentVariableSelector:(S)=>{let A=S[W];if(Y=!!A&&A!=="false",A===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{let A=S[t];return h=!!A&&A!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){let S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new Q(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}let V=(await m(async()=>{let h;try{h=await Ic(j)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await Tc(V,j,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{let w=await v();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(O,{...w,timeout:N});else{let j;try{j=(await cc({...w,timeout:N})).toString()}catch(f){if(f?.statusCode===400)throw Object.assign(f,{message:"EC2 Metadata token request returned error"});else if(f.message==="TimeoutError"||[403,404,405].includes(f.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(O,{...w,timeout:N})}return $(O,{...w,headers:{[F]:j},timeout:N})}}},cc=async(c)=>E({...c,path:e,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ic=async(c)=>(await E({...c,path:P})).toString(),Tc=async(c,I,x)=>{let T=JSON.parse((await E({...I,path:P+c})).toString());if(!_(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return D(T)};export{G as providerConfigFromInit,E as httpRequest,v as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,mc as fromContainerMetadata,J as Endpoint,Z as ENV_CMDS_RELATIVE_URI,X as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,hc as DEFAULT_TIMEOUT,Yc as DEFAULT_MAX_RETRIES};
3
-
4
- //# debugId=0F70ACBBD34CA7C164756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{A as Ke,B as G,C as V,D as N,E as f,F as Qe,G as me,H as he,I as ue,J as we,K as Xe,L as Ye,N as as,O as Ze,P as be,Q as xe,R as je,S as ve,T as Te,U as x,V as ke,W as Re,X as Ee,Y as qe,Z as Pe,_ as Je,r as ls,s as Ce,t as Le,u as Me,v as We,y as Us,z as F}from"./chunk-bs1xyw0h.js";import{$ as l,aa as ne}from"./chunk-9aaqjzzf.js";import{Aa as R,Fa as D,Ga as Ne,Ha as h,Oa as Oe,Pa as u,Qa as fe,Ra as pe,Sa as ye,Ta as _e,Ua as $e,Xa as i,Ya as y,_a as ge,ba as Fe,ca as Ue,ia as ee,ka as se,la as te,ma as Ae,na as re,oa as ae,ra as ie,sa as le,za as rs}from"./chunk-vq90tfsz.js";import"./chunk-cfsd9356.js";import"./chunk-t098k1va.js";import"./chunk-8h7xg91g.js";import"./chunk-04mpmtfe.js";import"./chunk-a8bwm1yn.js";import{_b as o}from"./chunk-yp5mh81v.js";var p=o(F(),1);var _=o(x(),1),v=o(ls(),1),$=async(e,s,t)=>{return{operation:v.getSmithyContext(s).operation,region:await v.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function ps(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}}function b(e){return{schemeId:"smithy.api#noAuth"}}var P=(e)=>{let s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(ps(e))}return s},J=(e)=>{return{..._.resolveAwsSdkSigV4Config(e)}};var I=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},C={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var L={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.654.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var Se=o(x(),1);var de=o(x(),1),oe=o(F(),1);var M={["required"]:!1,type:"String"},W={["required"]:!0,default:!1,type:"Boolean"},A={["ref"]:"Endpoint"},j={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},K={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},H={["ref"]:"PartitionResult"},Q={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[H,"supportsDualStack"]}]},X=[j],Y=[T],Z=[{["ref"]:"Region"}],ms={version:"1.0",parameters:{Region:M,UseDualStack:W,UseFIPS:W,Endpoint:M},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[A]}],rules:[{conditions:X,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Y,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:A,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:Z}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:Z,assign:"PartitionResult"}],rules:[{conditions:[j,T],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,K]},Q],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:X,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[K,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[H,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[Q],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},O=ms;var hs=new G({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),g=(e,s={})=>{return hs.get(e,()=>N(O,{endpointParams:e,logger:s.logger}))};V.aws=f;var ce=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??re,base64Encoder:e?.base64Encoder??ae,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??g,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??P,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new de.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new oe.NoAuthSigner}],logger:e?.logger??new te,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ne,utf8Decoder:e?.utf8Decoder??ee,utf8Encoder:e?.utf8Encoder??se}};var ze=(e)=>{ye(process.version);let s=qe(e),t=()=>s().then(pe),r=ce(e);return Se.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ee,defaultUserAgentProvider:e?.defaultUserAgentProvider??ke({serviceId:r.serviceId,clientVersion:L.version}),maxAttempts:e?.maxAttempts??l(xe),region:e?.region??l(ue,we),requestHandler:ie.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ve,default:async()=>(await t()).retryMode||be}),sha256:e?.sha256??Re.bind(null,"sha256"),streamCollector:e?.streamCollector??le,useDualstackEndpoint:e?.useDualstackEndpoint??l(me),useFipsEndpoint:e?.useFipsEndpoint??l(he)}};var De=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){let n=s.findIndex((B)=>B.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Be=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var k=(e)=>e,Ie=(e,s)=>{let t={...k(Pe(e)),...k(_e(e)),...k(Fe(e)),...k(De(e))};return s.forEach((r)=>r.configure(t)),{...e,...Je(t),...$e(t),...Ue(t),...Be(t)}};class He extends Ae{constructor(...[e]){let s=ze(e||{}),t=I(s),r=Ke(t),a=je(r),n=Xe(a),B=Ce(n),os=Ze(B),cs=J(os),U=Ie(cs,e?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(Ye(this.config)),this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:$,identityProviderConfigProvider:async(is)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":is.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var ns=o(Us(),1);class c extends Oe{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class E extends c{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class q extends c{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class S extends c{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}class z extends c{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,z.prototype)}}var Ge=(e)=>({...e,...e.accessToken&&{accessToken:R}}),us=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:R},...e.sessionToken&&{sessionToken:R}}),Ve=(e)=>({...e,...e.roleCredentials&&{roleCredentials:us(e.roleCredentials)}});var m=o(x(),1),es=o(F(),1);var ss=async(e,s)=>{let t=es.requestBuilder(e,s),r=i({},Es,{[Fs]:e[Ss]});t.bp("/federation/credentials");let a=i({[Bs]:[,D(e[Ds],"roleName")],[zs]:[,D(e[qs],"accountId")]}),n;return t.m("GET").h(r).q(a).b(n),t.build()};var ts=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return ws(e,s);let t=i({$metadata:w(e)}),r=D(Ne(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:ge});return Object.assign(t,a),t};var ws=async(e,s)=>{let t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await xs(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await vs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await ks(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Rs(t,s);default:let a=t.body;return bs({output:e,parsedBody:a,errorCode:r})}},bs=fe(c),xs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let n=new E({$metadata:w(e),...t});return u(n,e.body)},vs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let n=new q({$metadata:w(e),...t});return u(n,e.body)},ks=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let n=new S({$metadata:w(e),...t});return u(n,e.body)},Rs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let n=new z({$metadata:w(e),...t});return u(n,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var Es=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),qs="accountId",Ss="accessToken",zs="account_id";var Ds="roleName",Bs="role_name",Fs="x-amz-sso_bearer_token";class ds extends rs.classBuilder().ep(C).m(function(e,s,t,r){return[ns.getSerdePlugin(t,this.serialize,this.deserialize),as(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Ge,Ve).ser(ss).de(ts).build(){}export{He as SSOClient,ds as GetRoleCredentialsCommand};
3
-
4
- //# debugId=30EACA15ECB8EEC964756E2164756E21