gemi 0.4.64 → 0.4.66

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 (114) hide show
  1. package/dist/app/App.d.ts.map +1 -1
  2. package/dist/app/index.js +64 -64
  3. package/dist/auth/AuthenticationServiceProvider.d.ts.map +1 -1
  4. package/dist/bin/index.js +7 -6
  5. package/dist/chunk-02118fc60206588d.js +2 -0
  6. package/dist/chunk-03c8e645c994d40a.js +1 -1
  7. package/dist/chunk-0de36a7e51fbd11b.js +9 -0
  8. package/dist/chunk-0e125593337a68aa.js +18 -0
  9. package/dist/chunk-136896e8038083a1.js +2 -0
  10. package/dist/chunk-14e60554a2e78f4a.js +2 -0
  11. package/dist/chunk-1900e90c372bb1d6.js +1 -1
  12. package/dist/chunk-1b3b7c2c9ae041ca.js +2 -0
  13. package/dist/chunk-1d6e287ca9c14fef.js +1 -1
  14. package/dist/chunk-21b1f7ac5f75cd26.js +2 -0
  15. package/dist/chunk-25dd80c6d9144f89.js +1 -1
  16. package/dist/chunk-285299d784985340.js +3 -0
  17. package/dist/chunk-2a0e8565f874d787.js +18 -0
  18. package/dist/chunk-2a5b4dfab2e26e21.js +1 -0
  19. package/dist/chunk-30f854fb2ba73268.js +2 -0
  20. package/dist/chunk-361f806684fe532e.js +6 -0
  21. package/dist/chunk-3f1eaa4b49aa9a15.js +3 -0
  22. package/dist/chunk-42aa6e3d42149620.js +1 -1
  23. package/dist/chunk-432bbd1d38ff3b52.js +2 -0
  24. package/dist/chunk-543013123141745c.js +1 -1
  25. package/dist/chunk-5fd67245740e3908.js +1 -1
  26. package/dist/chunk-65cd4d128b79bd93.js +2 -0
  27. package/dist/chunk-699957e6eb705a81.js +2 -0
  28. package/dist/chunk-6c345dba15e1c3f2.js +2 -0
  29. package/dist/chunk-6f78f2a54491595d.js +2 -0
  30. package/dist/chunk-733688c7851fffd1.js +2 -0
  31. package/dist/chunk-7898dd7609f163e8.js +2 -0
  32. package/dist/chunk-78ab7bcbe6104c5f.js +2 -0
  33. package/dist/chunk-7dfb17814922ade0.js +2 -0
  34. package/dist/chunk-82f72dfc6e27be04.js +1 -0
  35. package/dist/chunk-8884e59809021f5f.js +2 -0
  36. package/dist/chunk-8b40d6a498f8bf81.js +2 -0
  37. package/dist/chunk-8c8c8fd3646b76a1.js +2 -0
  38. package/dist/chunk-a004fce37a0f5a65.js +2 -0
  39. package/dist/chunk-a14516ac5e6f78aa.js +1 -0
  40. package/dist/chunk-a1efc60864e65ef2.js +1 -0
  41. package/dist/chunk-a35eb04f0c7c9944.js +2 -0
  42. package/dist/chunk-a4b231bf6d911e01.js +2 -0
  43. package/dist/chunk-a885dc5561caa8e0.js +3 -0
  44. package/dist/chunk-b13cfa16a8a18324.js +3 -0
  45. package/dist/chunk-b3e27ec4b56a20ac.js +2 -0
  46. package/dist/chunk-b7c4dc1136fcaeb7.js +2 -0
  47. package/dist/chunk-bdc34785363e3f34.js +2 -0
  48. package/dist/chunk-bffb8d677e1424a9.js +6 -0
  49. package/dist/chunk-c609d06153ed09ce.js +1 -1
  50. package/dist/chunk-c6d988f5928a4df1.js +1 -1
  51. package/dist/chunk-c7e2acfd5087fb30.js +2 -0
  52. package/dist/chunk-cf7dde2ab1be3a3c.js +1 -0
  53. package/dist/chunk-cf8b1c7a4e9fc32d.js +18 -0
  54. package/dist/chunk-d03b02d5f8128f13.js +2 -0
  55. package/dist/chunk-d27588325ae2c0f3.js +2 -0
  56. package/dist/chunk-d37757ffee07b05f.js +6 -0
  57. package/dist/chunk-d3b4a3c778c23705.js +2 -0
  58. package/dist/chunk-d3e039d010842a3f.js +2 -0
  59. package/dist/chunk-d7c78cd1ab7dc7ed.js +2 -0
  60. package/dist/chunk-d850d83873a89e2b.js +18 -0
  61. package/dist/chunk-d93a6531661d56b5.js +9 -0
  62. package/dist/chunk-d950bbcb684a11ef.js +2 -0
  63. package/dist/chunk-dac0e2ef13060d02.js +1 -0
  64. package/dist/chunk-dac9276e506d125d.js +2 -0
  65. package/dist/chunk-db2270bbca7854fe.js +2 -0
  66. package/dist/chunk-e06fbc8e70a88f07.js +2 -0
  67. package/dist/chunk-e8159722d49ad044.js +1 -1
  68. package/dist/chunk-ed589d4e4c575de7.js +1 -1
  69. package/dist/chunk-eea1d6f60a6875d5.js +2 -0
  70. package/dist/chunk-eeb3b193701aec43.js +1 -0
  71. package/dist/chunk-f1dfc76a05462dde.js +2 -0
  72. package/dist/chunk-f25e3644c98f64a7.js +2 -0
  73. package/dist/chunk-f404a785b581d029.js +2 -0
  74. package/dist/chunk-f5a531a49e7591bd.js +2 -0
  75. package/dist/chunk-f69bcbd7998553cb.js +2 -0
  76. package/dist/chunk-f8ad65b3a07ce3c4.js +6 -0
  77. package/dist/chunk-ff1bbce70d726bc6.js +9 -0
  78. package/dist/client/ClientRouterContext.d.ts +0 -1
  79. package/dist/client/ClientRouterContext.d.ts.map +1 -1
  80. package/dist/client/HttpReload.d.ts +2 -0
  81. package/dist/client/HttpReload.d.ts.map +1 -0
  82. package/dist/client/Mutation.d.ts +5 -5
  83. package/dist/client/Mutation.d.ts.map +1 -1
  84. package/dist/client/ProgressManager.d.ts +1 -1
  85. package/dist/client/index.d.ts +2 -1
  86. package/dist/client/index.d.ts.map +1 -1
  87. package/dist/client/index.js +186 -158
  88. package/dist/client/types.d.ts +7 -6
  89. package/dist/client/types.d.ts.map +1 -1
  90. package/dist/client/useMutation.d.ts +11 -2
  91. package/dist/client/useMutation.d.ts.map +1 -1
  92. package/dist/client/useNavigate.d.ts.map +1 -1
  93. package/dist/client/useParams.d.ts +2 -0
  94. package/dist/client/useParams.d.ts.map +1 -0
  95. package/dist/facades/Redirect.d.ts +2 -1
  96. package/dist/facades/Redirect.d.ts.map +1 -1
  97. package/dist/facades/index.js +1 -1
  98. package/dist/http/ApiRouter.d.ts.map +1 -1
  99. package/dist/http/HttpRequest.d.ts +1 -1
  100. package/dist/http/HttpRequest.d.ts.map +1 -1
  101. package/dist/http/I18nServiceContainer.d.ts +2 -5
  102. package/dist/http/I18nServiceContainer.d.ts.map +1 -1
  103. package/dist/http/ViewRouter.d.ts.map +1 -1
  104. package/dist/http/index.js +1 -1
  105. package/dist/kernel/index.js +2 -2
  106. package/dist/server/index.js +3 -3
  107. package/dist/storage/index.js +1 -10
  108. package/dist/utils/type.d.ts +1 -1
  109. package/dist/utils/type.d.ts.map +1 -1
  110. package/dist/vite/index-M61-SALR.mjs +20030 -0
  111. package/dist/vite/index.mjs +4 -0
  112. package/dist/vite/typescript-puyfmcra.mjs +14089 -0
  113. package/package.json +7 -10
  114. package/dist/vite/index.js +0 -2
@@ -0,0 +1,18 @@
1
+ import{y as RU,z as I} from"./chunk-7ce930fe69575c87.js";import{E as OI} from"./chunk-d7c78cd1ab7dc7ed.js";import{H as v,I as bU,J as XL,K as t9,N as nU,O as SZ,R as bZ} from"./chunk-3f1eaa4b49aa9a15.js";import{nb as L0} from"./chunk-14e60554a2e78f4a.js";import{ob as F0,pb as OU} from"./chunk-d950bbcb684a11ef.js";import{vb as cZ} from"./chunk-2a5b4dfab2e26e21.js";import{Bb as HU} from"./chunk-eeb3b193701aec43.js";var j0=I((oI,UG)=>{var{defineProperty:e0,getOwnPropertyDescriptor:nZ,getOwnPropertyNames:iZ}=Object,rZ=Object.prototype.hasOwnProperty,eU=($,U)=>e0($,"name",{value:U,configurable:!0}),oZ=($,U)=>{for(var G in U)e0($,G,{get:U[G],enumerable:!0})},aZ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of iZ(U))if(!rZ.call($,w)&&w!==G)e0($,w,{get:()=>U[w],enumerable:!(W=nZ(U,w))||W.enumerable})}return $},tZ=($)=>aZ(e0({},"__esModule",{value:!0}),$),$G={};oZ($G,{getSmithyContext:()=>eZ,normalizeProvider:()=>$X});UG.exports=tZ($G);var tU=L0(),eZ=eU(($)=>$[tU.SMITHY_CONTEXT_KEY]||($[tU.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),$X=eU(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider")});var Z$=I((aI,ZG)=>{var{defineProperty:$1,getOwnPropertyDescriptor:UX,getOwnPropertyNames:GX}=Object,WX=Object.prototype.hasOwnProperty,Z0=($,U)=>$1($,"name",{value:U,configurable:!0}),wX=($,U)=>{for(var G in U)$1($,G,{get:U[G],enumerable:!0})},LX=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of GX(U))if(!WX.call($,w)&&w!==G)$1($,w,{get:()=>U[w],enumerable:!(W=UX(U,w))||W.enumerable})}return $},ZX=($)=>LX($1({},"__esModule",{value:!0}),$),GG={};wX(GG,{CredentialsProviderError:()=>XX,ProviderError:()=>U1,TokenProviderError:()=>YX,chain:()=>zX,fromStatic:()=>FX,memoize:()=>QX});ZG.exports=ZX(GG);var WG=class $ extends Error{constructor(U,G=!0){var W;let w,L=!0;if(typeof G==="boolean")w=void 0,L=G;else if(G!=null&&typeof G==="object")w=G.logger,L=G.tryNextLink??!0;super(U);this.name="ProviderError",this.tryNextLink=L,Object.setPrototypeOf(this,$.prototype),(W=w==null?void 0:w.debug)==null||W.call(w,`@smithy/property-provider ${L?"->":"(!)"} ${U}`)}static from(U,G=!0){return Object.assign(new this(U.message,G),U)}};Z0(WG,"ProviderError");var U1=WG,wG=class $ extends U1{constructor(U,G=!0){super(U,G);this.name="CredentialsProviderError",Object.setPrototypeOf(this,$.prototype)}};Z0(wG,"CredentialsProviderError");var XX=wG,LG=class $ extends U1{constructor(U,G=!0){super(U,G);this.name="TokenProviderError",Object.setPrototypeOf(this,$.prototype)}};Z0(LG,"TokenProviderError");var YX=LG,zX=Z0((...$)=>async()=>{if($.length===0)throw new U1("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"),FX=Z0(($)=>()=>Promise.resolve($),"fromStatic"),QX=Z0(($,U,G)=>{let W,w,L,Z=!1;const X=Z0(async()=>{if(!w)w=$();try{W=await w,L=!0,Z=!1}finally{w=void 0}return W},"coalesceProvider");if(U===void 0)return async(Y)=>{if(!L||(Y==null?void 0:Y.forceRefresh))W=await X();return W};return async(Y)=>{if(!L||(Y==null?void 0:Y.forceRefresh))W=await X();if(Z)return W;if(G&&!G(W))return Z=!0,W;if(U(W))return await X(),W;return W}},"memoize")});var M0=I((XG)=>{Object.defineProperty(XG,"__esModule",{value:!0});XG.getHomeDir=void 0;var RX=import.meta.require("os"),EX=import.meta.require("path"),X$={},IX=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},MX=()=>{const{HOME:$,USERPROFILE:U,HOMEPATH:G,HOMEDRIVE:W=`C:${EX.sep}`}=process.env;if($)return $;if(U)return U;if(G)return`${W}${G}`;const w=IX();if(!X$[w])X$[w]=RX.homedir();return X$[w]};XG.getHomeDir=MX});var Y$=I((zG)=>{Object.defineProperty(zG,"__esModule",{value:!0});zG.getSSOTokenFilepath=void 0;var JX=import.meta.require("crypto"),KX=import.meta.require("path"),VX=M0(),BX=($)=>{const G=JX.createHash("sha1").update($).digest("hex");return KX.join(VX.getHomeDir(),".aws","sso","cache",`${G}.json`)};zG.getSSOTokenFilepath=BX});var EG=I((QG)=>{Object.defineProperty(QG,"__esModule",{value:!0});QG.getSSOTokenFromFile=void 0;var AX=import.meta.require("fs"),TX=Y$(),{readFile:HX}=AX.promises,OX=async($)=>{const U=TX.getSSOTokenFilepath($),G=await HX(U,"utf8");return JSON.parse(G)};QG.getSSOTokenFromFile=OX});var F$=I((IG)=>{Object.defineProperty(IG,"__esModule",{value:!0});IG.slurpFile=void 0;var CX=import.meta.require("fs"),{readFile:fX}=CX.promises,z$={},qX=($,U)=>{if(!z$[$]||(U===null||U===void 0?void 0:U.ignoreCache))z$[$]=fX($,"utf8");return z$[$]};IG.slurpFile=qX});var I$=I((GM,S0)=>{var{defineProperty:w1,getOwnPropertyDescriptor:NX,getOwnPropertyNames:jX}=Object,PX=Object.prototype.hasOwnProperty,c=($,U)=>w1($,"name",{value:U,configurable:!0}),SX=($,U)=>{for(var G in U)w1($,G,{get:U[G],enumerable:!0})},Q$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of jX(U))if(!PX.call($,w)&&w!==G)w1($,w,{get:()=>U[w],enumerable:!(W=NX(U,w))||W.enumerable})}return $},E$=($,U,G)=>(Q$($,U,"default"),G&&Q$(G,U,"default")),bX=($)=>Q$(w1({},"__esModule",{value:!0}),$),P0={};SX(P0,{CONFIG_PREFIX_SEPARATOR:()=>X0,DEFAULT_PROFILE:()=>BG,ENV_PROFILE:()=>VG,getProfileName:()=>kX,loadSharedConfigFiles:()=>TG,loadSsoSessionData:()=>sX,parseKnownFiles:()=>nX});S0.exports=bX(P0);E$(P0,M0(),S0.exports);var VG="AWS_PROFILE",BG="default",kX=c(($)=>$.profile||process.env[VG]||BG,"getProfileName");E$(P0,Y$(),S0.exports);E$(P0,EG(),S0.exports);var G1=L0(),DX=c(($)=>Object.entries($).filter(([U])=>{const G=U.indexOf(X0);if(G===-1)return!1;return Object.values(G1.IniSectionType).includes(U.substring(0,G))}).reduce((U,[G,W])=>{const w=G.indexOf(X0),L=G.substring(0,w)===G1.IniSectionType.PROFILE?G.substring(w+1):G;return U[L]=W,U},{...$.default&&{default:$.default}}),"getConfigData"),W1=import.meta.require("path"),hX=M0(),xX="AWS_CONFIG_FILE",AG=c(()=>process.env[xX]||W1.join(hX.getHomeDir(),".aws","config"),"getConfigFilepath"),vX=M0(),cX="AWS_SHARED_CREDENTIALS_FILE",yX=c(()=>process.env[cX]||W1.join(vX.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),uX=M0(),_X=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,dX=["__proto__","profile __proto__"],R$=c(($)=>{const U={};let G,W;for(let w of $.split(/\r?\n/)){const L=w.split(/(^|\s)[;#]/)[0].trim();if(L[0]==="["&&L[L.length-1]==="]"){G=void 0,W=void 0;const X=L.substring(1,L.length-1),Y=_X.exec(X);if(Y){const[,z,,F]=Y;if(Object.values(G1.IniSectionType).includes(z))G=[z,F].join(X0)}else G=X;if(dX.includes(X))throw new Error(`Found invalid profile name "${X}"`)}else if(G){const X=L.indexOf("=");if(![0,-1].includes(X)){const[Y,z]=[L.substring(0,X).trim(),L.substring(X+1).trim()];if(z==="")W=Y;else{if(W&&w.trimStart()===w)W=void 0;U[G]=U[G]||{};const F=W?[W,Y].join(X0):Y;U[G][F]=z}}}}return U},"parseIni"),JG=F$(),KG=c(()=>({}),"swallowError"),X0=".",TG=c(async($={})=>{const{filepath:U=yX(),configFilepath:G=AG()}=$,W=uX.getHomeDir();let L=U;if(U.startsWith("~/"))L=W1.join(W,U.slice(2));let Z=G;if(G.startsWith("~/"))Z=W1.join(W,G.slice(2));const X=await Promise.all([JG.slurpFile(Z,{ignoreCache:$.ignoreCache}).then(R$).then(DX).catch(KG),JG.slurpFile(L,{ignoreCache:$.ignoreCache}).then(R$).catch(KG)]);return{configFile:X[0],credentialsFile:X[1]}},"loadSharedConfigFiles"),gX=c(($)=>Object.entries($).filter(([U])=>U.startsWith(G1.IniSectionType.SSO_SESSION+X0)).reduce((U,[G,W])=>({...U,[G.substring(G.indexOf(X0)+1)]:W}),{}),"getSsoSessionData"),pX=F$(),lX=c(()=>({}),"swallowError"),sX=c(async($={})=>pX.slurpFile($.configFilepath??AG()).then(R$).then(gX).catch(lX),"loadSsoSessionData"),mX=c((...$)=>{const U={};for(let G of $)for(let[W,w]of Object.entries(G))if(U[W]!==void 0)Object.assign(U[W],w);else U[W]=w;return U},"mergeConfigFiles"),nX=c(async($)=>{const U=await TG($);return mX(U.configFile,U.credentialsFile)},"parseKnownFiles")});var fG=I((WM,CG)=>{var M$=function($){try{const U=new Set(Array.from($.match(/([A-Z_]){3,}/g)??[]));return U.delete("CONFIG"),U.delete("CONFIG_PREFIX_SEPARATOR"),U.delete("ENV"),[...U].join(", ")}catch(U){return $}},L1=Object.defineProperty,iX=Object.getOwnPropertyDescriptor,rX=Object.getOwnPropertyNames,oX=Object.prototype.hasOwnProperty,J0=($,U)=>L1($,"name",{value:U,configurable:!0}),aX=($,U)=>{for(var G in U)L1($,G,{get:U[G],enumerable:!0})},tX=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of rX(U))if(!oX.call($,w)&&w!==G)L1($,w,{get:()=>U[w],enumerable:!(W=iX(U,w))||W.enumerable})}return $},eX=($)=>tX(L1({},"__esModule",{value:!0}),$),OG={};aX(OG,{loadConfig:()=>wY});CG.exports=eX(OG);var b0=Z$();J0(M$,"getSelectorName");var $Y=J0(($,U)=>async()=>{try{const G=$(process.env);if(G===void 0)throw new Error;return G}catch(G){throw new b0.CredentialsProviderError(G.message||`Not found in ENV: ${M$($.toString())}`,{logger:U})}},"fromEnv"),HG=I$(),UY=J0(($,{preferredFile:U="config",...G}={})=>async()=>{const W=HG.getProfileName(G),{configFile:w,credentialsFile:L}=await HG.loadSharedConfigFiles(G),Z=L[W]||{},X=w[W]||{},Y=U==="config"?{...Z,...X}:{...X,...Z};try{const F=$(Y,U==="config"?w:L);if(F===void 0)throw new Error;return F}catch(z){throw new b0.CredentialsProviderError(z.message||`Not found in config files w/ profile [${W}]: ${M$($.toString())}`,{logger:G.logger})}},"fromSharedConfigFiles"),GY=J0(($)=>typeof $==="function","isFunction"),WY=J0(($)=>GY($)?async()=>await $():b0.fromStatic($),"fromStatic"),wY=J0(({environmentVariableSelector:$,configFileSelector:U,default:G},W={})=>b0.memoize(b0.chain($Y($),UY(U,W),WY(G))),"loadConfig")});var bG=I((PG)=>{Object.defineProperty(PG,"__esModule",{value:!0});PG.getEndpointUrlConfig=void 0;var qG=I$(),NG="AWS_ENDPOINT_URL",jG="endpoint_url",LY=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((L)=>L.toUpperCase()),W=U[[NG,...G].join("_")];if(W)return W;const w=U[NG];if(w)return w;return},configFileSelector:(U,G)=>{if(G&&U.services){const w=G[["services",U.services].join(qG.CONFIG_PREFIX_SEPARATOR)];if(w){const L=$.split(" ").map((X)=>X.toLowerCase()),Z=w[[L.join("_"),jG].join(qG.CONFIG_PREFIX_SEPARATOR)];if(Z)return Z}}const W=U[jG];if(W)return W;return},default:void 0});PG.getEndpointUrlConfig=LY});var hG=I((kG)=>{Object.defineProperty(kG,"__esModule",{value:!0});kG.getEndpointFromConfig=void 0;var ZY=fG(),XY=bG(),YY=async($)=>ZY.loadConfig(XY.getEndpointUrlConfig($))();kG.getEndpointFromConfig=YY});var yG=I((ZM,cG)=>{var vG=function($){const U={};if($=$.replace(/^\?/,""),$)for(let G of $.split("&")){let[W,w=null]=G.split("=");if(W=decodeURIComponent(W),w)w=decodeURIComponent(w);if(!(W in U))U[W]=w;else if(Array.isArray(U[W]))U[W].push(w);else U[W]=[U[W],w]}return U},Z1=Object.defineProperty,zY=Object.getOwnPropertyDescriptor,FY=Object.getOwnPropertyNames,QY=Object.prototype.hasOwnProperty,RY=($,U)=>Z1($,"name",{value:U,configurable:!0}),EY=($,U)=>{for(var G in U)Z1($,G,{get:U[G],enumerable:!0})},IY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of FY(U))if(!QY.call($,w)&&w!==G)Z1($,w,{get:()=>U[w],enumerable:!(W=zY(U,w))||W.enumerable})}return $},MY=($)=>IY(Z1({},"__esModule",{value:!0}),$),xG={};EY(xG,{parseQueryString:()=>vG});cG.exports=MY(xG);RY(vG,"parseQueryString")});var gG=I((XM,dG)=>{var{defineProperty:X1,getOwnPropertyDescriptor:JY,getOwnPropertyNames:KY}=Object,VY=Object.prototype.hasOwnProperty,BY=($,U)=>X1($,"name",{value:U,configurable:!0}),AY=($,U)=>{for(var G in U)X1($,G,{get:U[G],enumerable:!0})},TY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of KY(U))if(!VY.call($,w)&&w!==G)X1($,w,{get:()=>U[w],enumerable:!(W=JY(U,w))||W.enumerable})}return $},HY=($)=>TY(X1({},"__esModule",{value:!0}),$),uG={};AY(uG,{parseUrl:()=>_G});dG.exports=HY(uG);var OY=yG(),_G=BY(($)=>{if(typeof $==="string")return _G(new URL($));const{hostname:U,pathname:G,port:W,protocol:w,search:L}=$;let Z;if(L)Z=OY.parseQueryString(L);return{hostname:U,port:W?parseInt(W):void 0,protocol:w,path:G,query:Z}},"parseUrl")});var K$=I((YM,rG)=>{var iG=function($,U,G){return{applyToStack:(W)=>{W.add(lG($,G),mG),W.add(sG($,U),nG)}}},Y1=Object.defineProperty,CY=Object.getOwnPropertyDescriptor,fY=Object.getOwnPropertyNames,qY=Object.prototype.hasOwnProperty,J$=($,U)=>Y1($,"name",{value:U,configurable:!0}),NY=($,U)=>{for(var G in U)Y1($,G,{get:U[G],enumerable:!0})},jY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of fY(U))if(!qY.call($,w)&&w!==G)Y1($,w,{get:()=>U[w],enumerable:!(W=CY(U,w))||W.enumerable})}return $},PY=($)=>jY(Y1({},"__esModule",{value:!0}),$),pG={};NY(pG,{deserializerMiddleware:()=>lG,deserializerMiddlewareOption:()=>mG,getSerdePlugin:()=>iG,serializerMiddleware:()=>sG,serializerMiddlewareOption:()=>nG});rG.exports=PY(pG);var lG=J$(($,U)=>(G)=>async(W)=>{const{response:w}=await G(W);try{const L=await U(w,$);return{response:w,output:L}}catch(L){if(Object.defineProperty(L,"$response",{value:w}),!("$metadata"in L)){if(L.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof L.$responseBodyText!=="undefined"){if(L.$response)L.$response.body=L.$responseBodyText}}throw L}},"deserializerMiddleware"),sG=J$(($,U)=>(G,W)=>async(w)=>{var L;const Z=((L=W.endpointV2)==null?void 0:L.url)&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!Z)throw new Error("No valid endpoint provider available.");const X=await U(w.input,{...$,endpoint:Z});return G({...w,request:X})},"serializerMiddleware"),mG={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},nG={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};J$(iG,"getSerdePlugin")});var WW=I((zM,GW)=>{var{defineProperty:F1,getOwnPropertyDescriptor:SY,getOwnPropertyNames:bY}=Object,kY=Object.prototype.hasOwnProperty,d=($,U)=>F1($,"name",{value:U,configurable:!0}),DY=($,U)=>{for(var G in U)F1($,G,{get:U[G],enumerable:!0})},hY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of bY(U))if(!kY.call($,w)&&w!==G)F1($,w,{get:()=>U[w],enumerable:!(W=SY(U,w))||W.enumerable})}return $},xY=($)=>hY(F1({},"__esModule",{value:!0}),$),aG={};DY(aG,{endpointMiddleware:()=>$W,endpointMiddlewareOptions:()=>UW,getEndpointFromInstructions:()=>tG,getEndpointPlugin:()=>sY,resolveEndpointConfig:()=>mY,resolveParams:()=>eG,toEndpointV1:()=>V$});GW.exports=xY(aG);var vY=d(async($)=>{const U=($==null?void 0:$.Bucket)||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(dY(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!_Y(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},"resolveParamsForS3"),cY=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,yY=/(\d+\.){3}\d+/,uY=/\.\./,_Y=d(($)=>cY.test($)&&!yY.test($)&&!uY.test($),"isDnsCompatibleBucketName"),dY=d(($)=>{const[U,G,W,,,w]=$.split(":"),L=U==="arn"&&$.split(":").length>=6,Z=Boolean(L&&G&&W&&w);if(L&&!Z)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return Z},"isArnBucketName"),gY=d(($,U,G)=>{const W=d(async()=>{const w=G[$]??G[U];if(typeof w==="function")return w();return w},"configProvider");if($==="credentialScope"||U==="CredentialScope")return async()=>{const w=typeof G.credentials==="function"?await G.credentials():G.credentials;return(w==null?void 0:w.credentialScope)??(w==null?void 0:w.CredentialScope)};if($==="accountId"||U==="AccountId")return async()=>{const w=typeof G.credentials==="function"?await G.credentials():G.credentials;return(w==null?void 0:w.accountId)??(w==null?void 0:w.AccountId)};if($==="endpoint"||U==="endpoint")return async()=>{const w=await W();if(w&&typeof w==="object"){if("url"in w)return w.url.href;if("hostname"in w){const{protocol:L,hostname:Z,port:X,path:Y}=w;return`${L}//${Z}${X?":"+X:""}${Y}`}}return w};return W},"createConfigValueProvider"),pY=hG(),oG=gG(),V$=d(($)=>{if(typeof $==="object"){if("url"in $)return oG.parseUrl($.url);return $}return oG.parseUrl($)},"toEndpointV1"),tG=d(async($,U,G,W)=>{if(!G.endpoint){const Z=await pY.getEndpointFromConfig(G.serviceId||"");if(Z)G.endpoint=()=>Promise.resolve(V$(Z))}const w=await eG($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(w,W)},"getEndpointFromInstructions"),eG=d(async($,U,G)=>{var W;const w={},L=((W=U==null?void 0:U.getEndpointParameterInstructions)==null?void 0:W.call(U))||{};for(let[Z,X]of Object.entries(L))switch(X.type){case"staticContextParams":w[Z]=X.value;break;case"contextParams":w[Z]=$[X.name];break;case"clientContextParams":case"builtInParams":w[Z]=await gY(X.name,Z,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(X))}if(Object.keys(L).length===0)Object.assign(w,G);if(String(G.serviceId).toLowerCase()==="s3")await vY(w);return w},"resolveParams"),z1=j0(),$W=d(({config:$,instructions:U})=>{return(G,W)=>async(w)=>{var L,Z,X;const Y=await tG(w.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=Y,W.authSchemes=(L=Y.properties)==null?void 0:L.authSchemes;const z=(Z=W.authSchemes)==null?void 0:Z[0];if(z){W.signing_region=z.signingRegion,W.signing_service=z.signingName;const F=z1.getSmithyContext(W),Q=(X=F==null?void 0:F.selectedHttpAuthScheme)==null?void 0:X.httpAuthOption;if(Q)Q.signingProperties=Object.assign(Q.signingProperties||{},{signing_region:z.signingRegion,signingRegion:z.signingRegion,signing_service:z.signingName,signingName:z.signingName,signingRegionSet:z.signingRegionSet},z.properties)}return G({...w})}},"endpointMiddleware"),lY=K$(),UW={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:lY.serializerMiddlewareOption.name},sY=d(($,U)=>({applyToStack:(G)=>{G.addRelativeTo($W({config:$,instructions:U}),UW)}}),"getEndpointPlugin"),mY=d(($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>V$(await z1.normalizeProvider(G)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:z1.normalizeProvider($.useDualstackEndpoint??!1),useFipsEndpoint:z1.normalizeProvider($.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var n=I((FM,RW)=>{var zW=function($){return Object.keys($).reduce((U,G)=>{const W=$[G];return{...U,[G]:Array.isArray(W)?[...W]:W}},{})},QW=function($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)},Q1=Object.defineProperty,nY=Object.getOwnPropertyDescriptor,iY=Object.getOwnPropertyNames,rY=Object.prototype.hasOwnProperty,t=($,U)=>Q1($,"name",{value:U,configurable:!0}),oY=($,U)=>{for(var G in U)Q1($,G,{get:U[G],enumerable:!0})},aY=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of iY(U))if(!rY.call($,w)&&w!==G)Q1($,w,{get:()=>U[w],enumerable:!(W=nY(U,w))||W.enumerable})}return $},tY=($)=>aY(Q1({},"__esModule",{value:!0}),$),wW={};oY(wW,{Field:()=>U5,Fields:()=>G5,HttpRequest:()=>W5,HttpResponse:()=>w5,IHttpRequest:()=>LW.HttpRequest,getHttpHandlerExtensionConfiguration:()=>eY,isValidHostname:()=>QW,resolveHttpHandlerRuntimeConfig:()=>$5});RW.exports=tY(wW);var eY=t(($)=>{let U=$.httpHandler;return{setHttpHandler(G){U=G},httpHandler(){return U},updateHttpClientConfig(G,W){U.updateHttpClientConfig(G,W)},httpHandlerConfigs(){return U.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),$5=t(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),LW=L0(),ZW=class ${constructor({name:U,kind:G=LW.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}};t(ZW,"Field");var U5=ZW,XW=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)}};t(XW,"Fields");var G5=XW,YW=class ${constructor(U){this.method=U.method||"GET",this.hostname=U.hostname||"localhost",this.port=U.port,this.query=U.query||{},this.headers=U.headers||{},this.body=U.body,this.protocol=U.protocol?U.protocol.slice(-1)!==":"?`${U.protocol}:`:U.protocol:"https:",this.path=U.path?U.path.charAt(0)!=="/"?`/${U.path}`:U.path:"/",this.username=U.username,this.password=U.password,this.fragment=U.fragment}static clone(U){const G=new $({...U,headers:{...U.headers}});if(G.query)G.query=zW(G.query);return G}static isInstance(U){if(!U)return!1;const G=U;return"method"in G&&"protocol"in G&&"hostname"in G&&"path"in G&&typeof G.query==="object"&&typeof G.headers==="object"}clone(){return $.clone(this)}};t(YW,"HttpRequest");var W5=YW;t(zW,"cloneQuery");var FW=class ${constructor(U){this.statusCode=U.statusCode,this.reason=U.reason,this.headers=U.headers||{},this.body=U.body}static isInstance(U){if(!U)return!1;const G=U;return typeof G.statusCode==="number"&&typeof G.headers==="object"}};t(FW,"HttpResponse");var w5=FW;t(QW,"isValidHostname")});var B$=I((EW)=>{var Z5=function($){return $&&$.__esModule?$:{default:$}},X5=function(){if(R1>E1.length-16)L5.default.randomFillSync(E1),R1=0;return E1.slice(R1,R1+=16)};Object.defineProperty(EW,"__esModule",{value:!0});EW.default=X5;var L5=Z5(import.meta.require("crypto")),E1=new Uint8Array(256),R1=E1.length});var JW=I((IW)=>{Object.defineProperty(IW,"__esModule",{value:!0});IW.default=void 0;var z5=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;IW.default=z5});var k0=I((KW)=>{var Q5=function($){return $&&$.__esModule?$:{default:$}},R5=function($){return typeof $==="string"&&F5.default.test($)};Object.defineProperty(KW,"__esModule",{value:!0});KW.default=void 0;var F5=Q5(JW()),E5=R5;KW.default=E5});var D0=I((AW)=>{var M5=function($){return $&&$.__esModule?$:{default:$}},BW=function($,U=0){return S[$[U+0]]+S[$[U+1]]+S[$[U+2]]+S[$[U+3]]+"-"+S[$[U+4]]+S[$[U+5]]+"-"+S[$[U+6]]+S[$[U+7]]+"-"+S[$[U+8]]+S[$[U+9]]+"-"+S[$[U+10]]+S[$[U+11]]+S[$[U+12]]+S[$[U+13]]+S[$[U+14]]+S[$[U+15]]},J5=function($,U=0){const G=BW($,U);if(!I5.default(G))throw TypeError("Stringified UUID is invalid");return G};Object.defineProperty(AW,"__esModule",{value:!0});AW.default=void 0;AW.unsafeStringify=BW;var I5=M5(k0()),S=[];for(let $=0;$<256;++$)S.push(($+256).toString(16).slice(1));var K5=J5;AW.default=K5});var fW=I((OW)=>{var T5=function($){return $&&$.__esModule?$:{default:$}},H5=function($,U,G){let W=U&&G||0;const w=U||new Array(16);$=$||{};let L=$.node||HW,Z=$.clockseq!==void 0?$.clockseq:A$;if(L==null||Z==null){const R=$.random||($.rng||B5.default)();if(L==null)L=HW=[R[0]|1,R[1],R[2],R[3],R[4],R[5]];if(Z==null)Z=A$=(R[6]<<8|R[7])&16383}let X=$.msecs!==void 0?$.msecs:Date.now(),Y=$.nsecs!==void 0?$.nsecs:H$+1;const z=X-T$+(Y-H$)/1e4;if(z<0&&$.clockseq===void 0)Z=Z+1&16383;if((z<0||X>T$)&&$.nsecs===void 0)Y=0;if(Y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");T$=X,H$=Y,A$=Z,X+=12219292800000;const F=((X&268435455)*1e4+Y)%4294967296;w[W++]=F>>>24&255,w[W++]=F>>>16&255,w[W++]=F>>>8&255,w[W++]=F&255;const Q=X/4294967296*1e4&268435455;w[W++]=Q>>>8&255,w[W++]=Q&255,w[W++]=Q>>>24&15|16,w[W++]=Q>>>16&255,w[W++]=Z>>>8|128,w[W++]=Z&255;for(let R=0;R<6;++R)w[W+R]=L[R];return U||A5.unsafeStringify(w)};Object.defineProperty(OW,"__esModule",{value:!0});OW.default=void 0;var B5=T5(B$()),A5=D0(),HW,A$,T$=0,H$=0,O5=H5;OW.default=O5});var O$=I((qW)=>{var f5=function($){return $&&$.__esModule?$:{default:$}},q5=function($){if(!C5.default($))throw TypeError("Invalid UUID");let U;const G=new Uint8Array(16);return G[0]=(U=parseInt($.slice(0,8),16))>>>24,G[1]=U>>>16&255,G[2]=U>>>8&255,G[3]=U&255,G[4]=(U=parseInt($.slice(9,13),16))>>>8,G[5]=U&255,G[6]=(U=parseInt($.slice(14,18),16))>>>8,G[7]=U&255,G[8]=(U=parseInt($.slice(19,23),16))>>>8,G[9]=U&255,G[10]=(U=parseInt($.slice(24,36),16))/1099511627776&255,G[11]=U/4294967296&255,G[12]=U>>>24&255,G[13]=U>>>16&255,G[14]=U>>>8&255,G[15]=U&255,G};Object.defineProperty(qW,"__esModule",{value:!0});qW.default=void 0;var C5=f5(k0()),N5=q5;qW.default=N5});var C$=I((SW)=>{var S5=function($){return $&&$.__esModule?$:{default:$}},b5=function($){$=unescape(encodeURIComponent($));const U=[];for(let G=0;G<$.length;++G)U.push($.charCodeAt(G));return U},k5=function($,U,G){function W(w,L,Z,X){var Y;if(typeof w==="string")w=b5(w);if(typeof L==="string")L=P5.default(L);if(((Y=L)===null||Y===void 0?void 0:Y.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let z=new Uint8Array(16+w.length);if(z.set(L),z.set(w,L.length),z=G(z),z[6]=z[6]&15|U,z[8]=z[8]&63|128,Z){X=X||0;for(let F=0;F<16;++F)Z[X+F]=z[F];return Z}return j5.unsafeStringify(z)}try{W.name=$}catch(w){}return W.DNS=jW,W.URL=PW,W};Object.defineProperty(SW,"__esModule",{value:!0});SW.URL=SW.DNS=void 0;SW.default=k5;var j5=D0(),P5=S5(O$()),jW="6ba7b810-9dad-11d1-80b4-00c04fd430c8";SW.DNS=jW;var PW="6ba7b811-9dad-11d1-80b4-00c04fd430c8";SW.URL=PW});var hW=I((kW)=>{var v5=function($){return $&&$.__esModule?$:{default:$}},c5=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return x5.default.createHash("md5").update($).digest()};Object.defineProperty(kW,"__esModule",{value:!0});kW.default=void 0;var x5=v5(import.meta.require("crypto")),y5=c5;kW.default=y5});var yW=I((vW)=>{var xW=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(vW,"__esModule",{value:!0});vW.default=void 0;var u5=xW(C$()),_5=xW(hW()),d5=u5.default("v3",48,_5.default),g5=d5;vW.default=g5});var dW=I((uW)=>{var l5=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(uW,"__esModule",{value:!0});uW.default=void 0;var p5=l5(import.meta.require("crypto")),s5={randomUUID:p5.default.randomUUID};uW.default=s5});var mW=I((lW)=>{var pW=function($){return $&&$.__esModule?$:{default:$}},i5=function($,U,G){if(gW.default.randomUUID&&!U&&!$)return gW.default.randomUUID();$=$||{};const W=$.random||($.rng||m5.default)();if(W[6]=W[6]&15|64,W[8]=W[8]&63|128,U){G=G||0;for(let w=0;w<16;++w)U[G+w]=W[w];return U}return n5.unsafeStringify(W)};Object.defineProperty(lW,"__esModule",{value:!0});lW.default=void 0;var gW=pW(dW()),m5=pW(B$()),n5=D0(),r5=i5;lW.default=r5});var rW=I((nW)=>{var a5=function($){return $&&$.__esModule?$:{default:$}},t5=function($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return o5.default.createHash("sha1").update($).digest()};Object.defineProperty(nW,"__esModule",{value:!0});nW.default=void 0;var o5=a5(import.meta.require("crypto")),e5=t5;nW.default=e5});var eW=I((aW)=>{var oW=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(aW,"__esModule",{value:!0});aW.default=void 0;var $2=oW(C$()),U2=oW(rW()),G2=$2.default("v5",80,U2.default),W2=G2;aW.default=W2});var G8=I(($8)=>{Object.defineProperty($8,"__esModule",{value:!0});$8.default=void 0;var w2="00000000-0000-0000-0000-000000000000";$8.default=w2});var L8=I((W8)=>{var Z2=function($){return $&&$.__esModule?$:{default:$}},X2=function($){if(!L2.default($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)};Object.defineProperty(W8,"__esModule",{value:!0});W8.default=void 0;var L2=Z2(k0()),Y2=X2;W8.default=Y2});var f$=I((g)=>{var i=function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(g,"__esModule",{value:!0});Object.defineProperty(g,"NIL",{enumerable:!0,get:function(){return E2.default}});Object.defineProperty(g,"parse",{enumerable:!0,get:function(){return K2.default}});Object.defineProperty(g,"stringify",{enumerable:!0,get:function(){return J2.default}});Object.defineProperty(g,"v1",{enumerable:!0,get:function(){return z2.default}});Object.defineProperty(g,"v3",{enumerable:!0,get:function(){return F2.default}});Object.defineProperty(g,"v4",{enumerable:!0,get:function(){return Q2.default}});Object.defineProperty(g,"v5",{enumerable:!0,get:function(){return R2.default}});Object.defineProperty(g,"validate",{enumerable:!0,get:function(){return M2.default}});Object.defineProperty(g,"version",{enumerable:!0,get:function(){return I2.default}});var z2=i(fW()),F2=i(yW()),Q2=i(mW()),R2=i(eW()),E2=i(G8()),I2=i(L8()),M2=i(k0()),J2=i(D0()),K2=i(O$())});var q$=I((NM,z8)=>{var{defineProperty:I1,getOwnPropertyDescriptor:V2,getOwnPropertyNames:B2}=Object,A2=Object.prototype.hasOwnProperty,K0=($,U)=>I1($,"name",{value:U,configurable:!0}),T2=($,U)=>{for(var G in U)I1($,G,{get:U[G],enumerable:!0})},H2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of B2(U))if(!A2.call($,w)&&w!==G)I1($,w,{get:()=>U[w],enumerable:!(W=V2(U,w))||W.enumerable})}return $},O2=($)=>H2(I1({},"__esModule",{value:!0}),$),Z8={};T2(Z8,{isClockSkewCorrectedError:()=>X8,isClockSkewError:()=>S2,isRetryableByTrait:()=>P2,isServerError:()=>k2,isThrottlingError:()=>b2,isTransientError:()=>Y8});z8.exports=O2(Z8);var C2=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],f2=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],q2=["TimeoutError","RequestTimeout","RequestTimeoutException"],N2=[500,502,503,504],j2=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],P2=K0(($)=>$.$retryable!==void 0,"isRetryableByTrait"),S2=K0(($)=>C2.includes($.name),"isClockSkewError"),X8=K0(($)=>{var U;return(U=$.$metadata)==null?void 0:U.clockSkewCorrected},"isClockSkewCorrectedError"),b2=K0(($)=>{var U,G;return((U=$.$metadata)==null?void 0:U.httpStatusCode)===429||f2.includes($.name)||((G=$.$retryable)==null?void 0:G.throttling)==!0},"isThrottlingError"),Y8=K0(($)=>{var U;return X8($)||q2.includes($.name)||j2.includes(($==null?void 0:$.code)||"")||N2.includes(((U=$.$metadata)==null?void 0:U.httpStatusCode)||0)},"isTransientError"),k2=K0(($)=>{var U;if(((U=$.$metadata)==null?void 0:U.httpStatusCode)!==void 0){const G=$.$metadata.httpStatusCode;if(500<=G&&G<=599&&!Y8($))return!0;return!1}return!1},"isServerError")});var O8=I((jM,H8)=>{var{defineProperty:M1,getOwnPropertyDescriptor:D2,getOwnPropertyNames:h2}=Object,x2=Object.prototype.hasOwnProperty,p=($,U)=>M1($,"name",{value:U,configurable:!0}),v2=($,U)=>{for(var G in U)M1($,G,{get:U[G],enumerable:!0})},c2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of h2(U))if(!x2.call($,w)&&w!==G)M1($,w,{get:()=>U[w],enumerable:!(W=D2(U,w))||W.enumerable})}return $},y2=($)=>c2(M1({},"__esModule",{value:!0}),$),Q8={};v2(Q8,{AdaptiveRetryStrategy:()=>l2,ConfiguredRetryStrategy:()=>s2,DEFAULT_MAX_ATTEMPTS:()=>N$,DEFAULT_RETRY_DELAY_BASE:()=>h0,DEFAULT_RETRY_MODE:()=>u2,DefaultRateLimiter:()=>I8,INITIAL_RETRY_TOKENS:()=>j$,INVOCATION_ID_HEADER:()=>d2,MAXIMUM_RETRY_DELAY:()=>P$,NO_RETRY_INCREMENT:()=>V8,REQUEST_HEADER:()=>g2,RETRY_COST:()=>J8,RETRY_MODES:()=>R8,StandardRetryStrategy:()=>S$,THROTTLING_RETRY_DELAY_BASE:()=>M8,TIMEOUT_RETRY_COST:()=>K8});H8.exports=y2(Q8);var R8=(($)=>{return $.STANDARD="standard",$.ADAPTIVE="adaptive",$})(R8||{}),N$=3,u2="standard",_2=q$(),E8=class ${constructor(U){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(U==null?void 0:U.beta)??0.7,this.minCapacity=(U==null?void 0:U.minCapacity)??1,this.minFillRate=(U==null?void 0:U.minFillRate)??0.5,this.scaleConstant=(U==null?void 0:U.scaleConstant)??0.4,this.smooth=(U==null?void 0:U.smooth)??0.8;const G=this.getCurrentTimeInSeconds();this.lastThrottleTime=G,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(U){if(!this.enabled)return;if(this.refillTokenBucket(),U>this.currentCapacity){const G=(U-this.currentCapacity)/this.fillRate*1000;await new Promise((W)=>setTimeout(W,G))}this.currentCapacity=this.currentCapacity-U}refillTokenBucket(){const U=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=U;return}const G=(U-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+G),this.lastTimestamp=U}updateClientSendingRate(U){let G;if(this.updateMeasuredRate(),_2.isThrottlingError(U)){const w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),G=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),G=this.cubicSuccess(this.getCurrentTimeInSeconds());const W=Math.min(G,2*this.measuredTxRate);this.updateTokenBucketRate(W)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(U){return this.getPrecise(U*this.beta)}cubicSuccess(U){return this.getPrecise(this.scaleConstant*Math.pow(U-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(U){this.refillTokenBucket(),this.fillRate=Math.max(U,this.minFillRate),this.maxCapacity=Math.max(U,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const U=this.getCurrentTimeInSeconds(),G=Math.floor(U*2)/2;if(this.requestCount++,G>this.lastTxRateBucket){const W=this.requestCount/(G-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(W*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=G}}getPrecise(U){return parseFloat(U.toFixed(8))}};p(E8,"DefaultRateLimiter");var I8=E8,h0=100,P$=20000,M8=500,j$=500,J8=5,K8=10,V8=1,d2="amz-sdk-invocation-id",g2="amz-sdk-request",p2=p(()=>{let $=h0;return{computeNextBackoffDelay:p((W)=>{return Math.floor(Math.min(P$,Math.random()*2**W*$))},"computeNextBackoffDelay"),setDelayBase:p((W)=>{$=W},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),F8=p(({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:p(()=>U,"getRetryCount"),getRetryDelay:p(()=>Math.min(P$,$),"getRetryDelay"),getRetryCost:p(()=>G,"getRetryCost")}},"createDefaultRetryToken"),B8=class ${constructor(U){this.maxAttempts=U,this.mode="standard",this.capacity=j$,this.retryBackoffStrategy=p2(),this.maxAttemptsProvider=typeof U==="function"?U:async()=>U}async acquireInitialRetryToken(U){return F8({retryDelay:h0,retryCount:0})}async refreshRetryTokenForRetry(U,G){const W=await this.getMaxAttempts();if(this.shouldRetry(U,G,W)){const w=G.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?M8:h0);const L=this.retryBackoffStrategy.computeNextBackoffDelay(U.getRetryCount()),Z=G.retryAfterHint?Math.max(G.retryAfterHint.getTime()-Date.now()||0,L):L,X=this.getCapacityCost(w);return this.capacity-=X,F8({retryDelay:Z,retryCount:U.getRetryCount()+1,retryCost:X})}throw new Error("No retry token available")}recordSuccess(U){this.capacity=Math.max(j$,this.capacity+(U.getRetryCost()??V8))}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 ${N$}`),N$}}shouldRetry(U,G,W){return U.getRetryCount()+1<W&&this.capacity>=this.getCapacityCost(G.errorType)&&this.isRetryableError(G.errorType)}getCapacityCost(U){return U==="TRANSIENT"?K8:J8}isRetryableError(U){return U==="THROTTLING"||U==="TRANSIENT"}};p(B8,"StandardRetryStrategy");var S$=B8,A8=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode="adaptive";const{rateLimiter:W}=G??{};this.rateLimiter=W??new I8,this.standardRetryStrategy=new S$(U)}async acquireInitialRetryToken(U){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(U)}async refreshRetryTokenForRetry(U,G){return this.rateLimiter.updateClientSendingRate(G),this.standardRetryStrategy.refreshRetryTokenForRetry(U,G)}recordSuccess(U){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(U)}};p(A8,"AdaptiveRetryStrategy");var l2=A8,T8=class $ extends S${constructor(U,G=h0){super(typeof U==="function"?U:async()=>U);if(typeof G==="number")this.computeNextBackoffDelay=()=>G;else this.computeNextBackoffDelay=G}async refreshRetryTokenForRetry(U,G){const W=await super.refreshRetryTokenForRetry(U,G);return W.getRetryDelay=()=>this.computeNextBackoffDelay(W.getRetryCount()),W}};p(T8,"ConfiguredRetryStrategy");var s2=T8});var b$=I((PM,f8)=>{var{defineProperty:J1,getOwnPropertyDescriptor:m2,getOwnPropertyNames:n2}=Object,i2=Object.prototype.hasOwnProperty,r2=($,U)=>J1($,"name",{value:U,configurable:!0}),o2=($,U)=>{for(var G in U)J1($,G,{get:U[G],enumerable:!0})},a2=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of n2(U))if(!i2.call($,w)&&w!==G)J1($,w,{get:()=>U[w],enumerable:!(W=m2(U,w))||W.enumerable})}return $},t2=($)=>a2(J1({},"__esModule",{value:!0}),$),C8={};o2(C8,{isArrayBuffer:()=>e2});f8.exports=t2(C8);var e2=r2(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var x0=I((SM,j8)=>{var{defineProperty:K1,getOwnPropertyDescriptor:$z,getOwnPropertyNames:Uz}=Object,Gz=Object.prototype.hasOwnProperty,q8=($,U)=>K1($,"name",{value:U,configurable:!0}),Wz=($,U)=>{for(var G in U)K1($,G,{get:U[G],enumerable:!0})},wz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of Uz(U))if(!Gz.call($,w)&&w!==G)K1($,w,{get:()=>U[w],enumerable:!(W=$z(U,w))||W.enumerable})}return $},Lz=($)=>wz(K1({},"__esModule",{value:!0}),$),N8={};Wz(N8,{fromArrayBuffer:()=>Xz,fromString:()=>Yz});j8.exports=Lz(N8);var Zz=b$(),k$=import.meta.require("buffer"),Xz=q8(($,U=0,G=$.byteLength-U)=>{if(!Zz.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return k$.Buffer.from($,U,G)},"fromArrayBuffer"),Yz=q8(($,U)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return U?k$.Buffer.from($,U):k$.Buffer.from($)},"fromString")});var b8=I((P8)=>{Object.defineProperty(P8,"__esModule",{value:!0});P8.fromBase64=void 0;var zz=x0(),Fz=/^[A-Za-z0-9+/]*={0,2}$/,Qz=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Fz.exec($))throw new TypeError("Invalid base64 string.");const U=zz.fromString($,"base64");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength)};P8.fromBase64=Qz});var e=I((kM,x8)=>{var{defineProperty:V1,getOwnPropertyDescriptor:Rz,getOwnPropertyNames:Ez}=Object,Iz=Object.prototype.hasOwnProperty,D$=($,U)=>V1($,"name",{value:U,configurable:!0}),Mz=($,U)=>{for(var G in U)V1($,G,{get:U[G],enumerable:!0})},Jz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of Ez(U))if(!Iz.call($,w)&&w!==G)V1($,w,{get:()=>U[w],enumerable:!(W=Rz(U,w))||W.enumerable})}return $},Kz=($)=>Jz(V1({},"__esModule",{value:!0}),$),k8={};Mz(k8,{fromUtf8:()=>h8,toUint8Array:()=>Vz,toUtf8:()=>Bz});x8.exports=Kz(k8);var D8=x0(),h8=D$(($)=>{const U=D8.fromString($,"utf8");return new Uint8Array(U.buffer,U.byteOffset,U.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Vz=D$(($)=>{if(typeof $==="string")return h8($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),Bz=D$(($)=>{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 D8.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var y8=I((v8)=>{Object.defineProperty(v8,"__esModule",{value:!0});v8.toBase64=void 0;var Az=x0(),Tz=e(),Hz=($)=>{let U;if(typeof $==="string")U=Tz.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 Az.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString("base64")};v8.toBase64=Hz});var A1=I((hM,B1)=>{var{defineProperty:u8,getOwnPropertyDescriptor:Oz,getOwnPropertyNames:Cz}=Object,fz=Object.prototype.hasOwnProperty,h$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of Cz(U))if(!fz.call($,w)&&w!==G)u8($,w,{get:()=>U[w],enumerable:!(W=Oz(U,w))||W.enumerable})}return $},_8=($,U,G)=>(h$($,U,"default"),G&&h$(G,U,"default")),qz=($)=>h$(u8({},"__esModule",{value:!0}),$),x$={};B1.exports=qz(x$);_8(x$,b8(),B1.exports);_8(x$,y8(),B1.exports)});var p8=I((d8)=>{Object.defineProperty(d8,"__esModule",{value:!0});d8.getAwsChunkedEncodingStream=void 0;var Nz=import.meta.require("stream"),jz=($,U)=>{const{base64Encoder:G,bodyLengthChecker:W,checksumAlgorithmFn:w,checksumLocationName:L,streamHasher:Z}=U,X=G!==void 0&&w!==void 0&&L!==void 0&&Z!==void 0,Y=X?Z(w,$):void 0,z=new Nz.Readable({read:()=>{}});return $.on("data",(F)=>{const Q=W(F)||0;z.push(`${Q.toString(16)}\r\n`),z.push(F),z.push("\r\n")}),$.on("end",async()=>{if(z.push("0\r\n"),X){const F=G(await Y);z.push(`${L}:${F}\r\n`),z.push("\r\n")}z.push(null)}),z};d8.getAwsChunkedEncodingStream=jz});var c$=I((vM,m8)=>{var{defineProperty:T1,getOwnPropertyDescriptor:Pz,getOwnPropertyNames:Sz}=Object,bz=Object.prototype.hasOwnProperty,v$=($,U)=>T1($,"name",{value:U,configurable:!0}),kz=($,U)=>{for(var G in U)T1($,G,{get:U[G],enumerable:!0})},Dz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of Sz(U))if(!bz.call($,w)&&w!==G)T1($,w,{get:()=>U[w],enumerable:!(W=Pz(U,w))||W.enumerable})}return $},hz=($)=>Dz(T1({},"__esModule",{value:!0}),$),l8={};kz(l8,{escapeUri:()=>s8,escapeUriPath:()=>vz});m8.exports=hz(l8);var s8=v$(($)=>encodeURIComponent($).replace(/[!'()*]/g,xz),"escapeUri"),xz=v$(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),vz=v$(($)=>$.split("/").map(s8).join("/"),"escapeUriPath")});var u$=I((cM,r8)=>{var i8=function($){const U=[];for(let G of Object.keys($).sort()){const W=$[G];if(G=y$.escapeUri(G),Array.isArray(W))for(let w=0,L=W.length;w<L;w++)U.push(`${G}=${y$.escapeUri(W[w])}`);else{let w=G;if(W||typeof W==="string")w+=`=${y$.escapeUri(W)}`;U.push(w)}}return U.join("&")},H1=Object.defineProperty,cz=Object.getOwnPropertyDescriptor,yz=Object.getOwnPropertyNames,uz=Object.prototype.hasOwnProperty,_z=($,U)=>H1($,"name",{value:U,configurable:!0}),dz=($,U)=>{for(var G in U)H1($,G,{get:U[G],enumerable:!0})},gz=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of yz(U))if(!uz.call($,w)&&w!==G)H1($,w,{get:()=>U[w],enumerable:!(W=cz(U,w))||W.enumerable})}return $},pz=($)=>gz(H1({},"__esModule",{value:!0}),$),n8={};dz(n8,{buildQueryString:()=>i8});r8.exports=pz(n8);var y$=c$();_z(i8,"buildQueryString")});var R4=I((yM,Q4)=>{async function g$($,U,G=o8){const W=U.headers??{},w=W.Expect||W.expect;let L=-1,Z=!1;if(w==="100-continue")await Promise.race([new Promise((X)=>{L=Number(setTimeout(X,Math.max(o8,G)))}),new Promise((X)=>{$.on("continue",()=>{clearTimeout(L),X()}),$.on("error",()=>{Z=!0,clearTimeout(L),X()})})]);if(!Z)w4($,U.body)}var w4=function($,U){if(U instanceof W4.Readable){U.pipe($);return}if(U){if(Buffer.isBuffer(U)||typeof U==="string"){$.end(U);return}const G=U;if(typeof G==="object"&&G.buffer&&typeof G.byteOffset==="number"&&typeof G.byteLength==="number"){$.end(Buffer.from(G.buffer,G.byteOffset,G.byteLength));return}$.end(Buffer.from(U));return}$.end()};async function F4($){const U=[],G=$.getReader();let W=!1,w=0;while(!W){const{done:X,value:Y}=await G.read();if(Y)U.push(Y),w+=Y.length;W=X}const L=new Uint8Array(w);let Z=0;for(let X of U)L.set(X,Z),Z+=X.length;return L}var{create:lz,defineProperty:v0,getOwnPropertyDescriptor:sz,getOwnPropertyNames:mz,getPrototypeOf:nz}=Object,iz=Object.prototype.hasOwnProperty,f=($,U)=>v0($,"name",{value:U,configurable:!0}),rz=($,U)=>{for(var G in U)v0($,G,{get:U[G],enumerable:!0})},t8=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of mz(U))if(!iz.call($,w)&&w!==G)v0($,w,{get:()=>U[w],enumerable:!(W=sz(U,w))||W.enumerable})}return $},oz=($,U,G)=>(G=$!=null?lz(nz($)):{},t8(U||!$||!$.__esModule?v0(G,"default",{value:$,enumerable:!0}):G,$)),az=($)=>t8(v0({},"__esModule",{value:!0}),$),e8={};rz(e8,{DEFAULT_REQUEST_TIMEOUT:()=>G9,NodeHttp2Handler:()=>X9,NodeHttpHandler:()=>W9,streamCollector:()=>z9});Q4.exports=az(e8);var $4=n(),U4=u$(),_$=import.meta.require("http"),d$=import.meta.require("https"),tz=["ECONNRESET","EPIPE","ETIMEDOUT"],G4=f(($)=>{const U={};for(let G of Object.keys($)){const W=$[G];U[G]=Array.isArray(W)?W.join(","):W}return U},"getTransformedHeaders"),ez=f(($,U,G=0)=>{if(!G)return;const W=setTimeout(()=>{$.destroy(),U(Object.assign(new Error(`Socket timed out without establishing a connection within ${G} ms`),{name:"TimeoutError"}))},G);$.on("socket",(w)=>{if(w.connecting)w.on("connect",()=>{clearTimeout(W)});else clearTimeout(W)})},"setConnectionTimeout"),$9=f(($,{keepAlive:U,keepAliveMsecs:G})=>{if(U!==!0)return;$.on("socket",(W)=>{W.setKeepAlive(U,G||0)})},"setSocketKeepAlive"),U9=f(($,U,G=0)=>{$.setTimeout(G,()=>{$.destroy(),U(Object.assign(new Error(`Connection timed out after ${G} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),W4=import.meta.require("stream"),o8=1000;f(g$,"writeRequestBody");f(w4,"writeBody");var G9=0,L4=class ${constructor(U){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((w)=>{G(this.resolveDefaultConfig(w))}).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 w,L,Z;const{sockets:X,requests:Y,maxSockets:z}=U;if(typeof z!=="number"||z===Infinity)return G;const F=15000;if(Date.now()-F<G)return G;if(X&&Y)for(let Q in X){const R=((w=X[Q])==null?void 0:w.length)??0,M=((L=Y[Q])==null?void 0:L.length)??0;if(R>=z&&M>=2*z)return(Z=W==null?void 0:W.warn)==null||Z.call(W,`@smithy/node-http-handler:WARN - socket usage at capacity=${R} and ${M} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return G}resolveDefaultConfig(U){const{requestTimeout:G,connectionTimeout:W,socketTimeout:w,httpAgent:L,httpsAgent:Z}=U||{};return{connectionTimeout:W,requestTimeout:G??w,httpAgent:(()=>{if(L instanceof _$.Agent||typeof(L==null?void 0:L.destroy)==="function")return L;return new _$.Agent({keepAlive:!0,maxSockets:50,...L})})(),httpsAgent:(()=>{if(Z instanceof d$.Agent||typeof(Z==null?void 0:Z.destroy)==="function")return Z;return new d$.Agent({keepAlive:!0,maxSockets:50,...Z})})(),logger:console}}destroy(){var U,G,W,w;(G=(U=this.config)==null?void 0:U.httpAgent)==null||G.destroy(),(w=(W=this.config)==null?void 0:W.httpsAgent)==null||w.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;let W;return new Promise((w,L)=>{let Z=void 0;const X=f(async(K)=>{await Z,clearTimeout(W),w(K)},"resolve"),Y=f(async(K)=>{await Z,clearTimeout(W),L(K)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(G==null?void 0:G.aborted){const K=new Error("Request aborted");K.name="AbortError",Y(K);return}const z=U.protocol==="https:",F=z?this.config.httpsAgent:this.config.httpAgent;W=setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const Q=U4.buildQueryString(U.query||{});let R=void 0;if(U.username!=null||U.password!=null){const K=U.username??"",q=U.password??"";R=`${K}:${q}`}let M=U.path;if(Q)M+=`?${Q}`;if(U.fragment)M+=`#${U.fragment}`;const J={headers:U.headers,host:U.hostname,method:U.method,path:M,port:U.port,agent:F,auth:R},B=(z?d$.request:_$.request)(J,(K)=>{const q=new $4.HttpResponse({statusCode:K.statusCode||-1,reason:K.statusMessage,headers:G4(K.headers),body:K});X({response:q})});if(B.on("error",(K)=>{if(tz.includes(K.code))Y(Object.assign(K,{name:"TimeoutError"}));else Y(K)}),ez(B,Y,this.config.connectionTimeout),U9(B,Y,this.config.requestTimeout),G){const K=f(()=>{B.destroy();const q=new Error("Request aborted");q.name="AbortError",Y(q)},"onAbort");if(typeof G.addEventListener==="function"){const q=G;q.addEventListener("abort",K,{once:!0}),B.once("close",()=>q.removeEventListener("abort",K))}else G.onabort=K}const A=J.agent;if(typeof A==="object"&&"keepAlive"in A)$9(B,{keepAlive:A.keepAlive,keepAliveMsecs:A.keepAliveMsecs});Z=g$(B,U,this.config.requestTimeout).catch((K)=>{return clearTimeout(W),L(K)})})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}};f(L4,"NodeHttpHandler");var W9=L4,a8=import.meta.require("http2"),w9=oz(import.meta.require("http2")),Z4=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()}}};f(Z4,"NodeHttp2ConnectionPool");var L9=Z4,X4=class ${constructor(U){if(this.sessionCache=new Map,this.config=U,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(U,G){const W=this.getUrlString(U),w=this.sessionCache.get(W);if(w){const Y=w.poll();if(Y&&!this.config.disableConcurrency)return Y}const L=w9.default.connect(W);if(this.config.maxConcurrency)L.settings({maxConcurrentStreams:this.config.maxConcurrency},(Y)=>{if(Y)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+U.destination.toString())});L.unref();const Z=f(()=>{L.destroy(),this.deleteSession(W,L)},"destroySessionCb");if(L.on("goaway",Z),L.on("error",Z),L.on("frameError",Z),L.on("close",()=>this.deleteSession(W,L)),G.requestTimeout)L.setTimeout(G.requestTimeout,Z);const X=this.sessionCache.get(W)||new L9;return X.offerLast(L),this.sessionCache.set(W,X),L}deleteSession(U,G){const W=this.sessionCache.get(U);if(!W)return;if(!W.contains(G))return;W.remove(G),this.sessionCache.set(U,W)}release(U,G){var W;const w=this.getUrlString(U);(W=this.sessionCache.get(w))==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()}};f(X4,"NodeHttp2ConnectionManager");var Z9=X4,Y4=class ${constructor(U){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Z9({}),this.configProvider=new Promise((G,W)=>{if(typeof U==="function")U().then((w)=>{G(w||{})}).catch(W);else G(U||{})})}static create(U){if(typeof(U==null?void 0:U.handle)==="function")return U;return new $(U)}destroy(){this.connectionManager.destroy()}async handle(U,{abortSignal:G}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:W,disableConcurrentStreams:w}=this.config;return new Promise((L,Z)=>{var X;let Y=!1,z=void 0;const F=f(async(C)=>{await z,L(C)},"resolve"),Q=f(async(C)=>{await z,Z(C)},"reject");if(G==null?void 0:G.aborted){Y=!0;const C=new Error("Request aborted");C.name="AbortError",Q(C);return}const{hostname:R,method:M,port:J,protocol:V,query:B}=U;let A="";if(U.username!=null||U.password!=null){const C=U.username??"",_=U.password??"";A=`${C}:${_}@`}const K=`${V}//${A}${R}${J?`:${J}`:""}`,q={destination:new URL(K)},k=this.connectionManager.lease(q,{requestTimeout:(X=this.config)==null?void 0:X.sessionTimeout,disableConcurrentStreams:w||!1}),u=f((C)=>{if(w)this.destroySession(k);Y=!0,Q(C)},"rejectWithDestroy"),oU=U4.buildQueryString(B||{});let L$=U.path;if(oU)L$+=`?${oU}`;if(U.fragment)L$+=`#${U.fragment}`;const x=k.request({...U.headers,[a8.constants.HTTP2_HEADER_PATH]:L$,[a8.constants.HTTP2_HEADER_METHOD]:M});if(k.ref(),x.on("response",(C)=>{const _=new $4.HttpResponse({statusCode:C[":status"]||-1,headers:G4(C),body:x});if(Y=!0,F({response:_}),w)k.close(),this.connectionManager.deleteSession(K,k)}),W)x.setTimeout(W,()=>{x.close();const C=new Error(`Stream timed out because of no activity for ${W} ms`);C.name="TimeoutError",u(C)});if(G){const C=f(()=>{x.close();const _=new Error("Request aborted");_.name="AbortError",u(_)},"onAbort");if(typeof G.addEventListener==="function"){const _=G;_.addEventListener("abort",C,{once:!0}),x.once("close",()=>_.removeEventListener("abort",C))}else G.onabort=C}x.on("frameError",(C,_,yZ)=>{u(new Error(`Frame type id ${C} in stream id ${yZ} has failed with code ${_}.`))}),x.on("error",u),x.on("aborted",()=>{u(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${x.rstCode}.`))}),x.on("close",()=>{if(k.unref(),w)k.destroy();if(!Y)u(new Error("Unexpected error: http2 request did not get a response"))}),z=g$(x,U,W)})}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return{...W,[U]:G}})}httpHandlerConfigs(){return this.config??{}}destroySession(U){if(!U.destroyed)U.destroy()}};f(Y4,"NodeHttp2Handler");var X9=Y4,z4=class $ extends W4.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(U,G,W){this.bufferedBytes.push(U),W()}};f(z4,"Collector");var Y9=z4,z9=f(($)=>{if(F9($))return F4($);return new Promise((U,G)=>{const W=new Y9;$.pipe(W),$.on("error",(w)=>{W.end(),G(w)}),W.on("error",G),W.on("finish",function(){const w=new Uint8Array(Buffer.concat(this.bufferedBytes));U(w)})})},"streamCollector"),F9=f(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");f(F4,"collectReadableStream")});var T4=I((uM,A4)=>{var M4=function($=0){return new Promise((U,G)=>{if($)setTimeout(()=>{const W=new Error(`Request did not complete within ${$} ms`);W.name="TimeoutError",G(W)},$)})};async function K4($){const U=await B4($),G=B9.fromBase64(U);return new Uint8Array(G)}async function V4($){const U=[],G=$.getReader();let W=!1,w=0;while(!W){const{done:X,value:Y}=await G.read();if(Y)U.push(Y),w+=Y.length;W=X}const L=new Uint8Array(w);let Z=0;for(let X of U)L.set(X,Z),Z+=X.length;return L}var B4=function($){return new Promise((U,G)=>{const W=new FileReader;W.onloadend=()=>{if(W.readyState!==2)return G(new Error("Reader aborted too early"));const w=W.result??"",L=w.indexOf(","),Z=L>-1?L+1:w.length;U(w.substring(Z))},W.onabort=()=>G(new Error("Read aborted")),W.onerror=()=>G(W.error),W.readAsDataURL($)})},C1=Object.defineProperty,Q9=Object.getOwnPropertyDescriptor,R9=Object.getOwnPropertyNames,E9=Object.prototype.hasOwnProperty,r=($,U)=>C1($,"name",{value:U,configurable:!0}),I9=($,U)=>{for(var G in U)C1($,G,{get:U[G],enumerable:!0})},M9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of R9(U))if(!E9.call($,w)&&w!==G)C1($,w,{get:()=>U[w],enumerable:!(W=Q9(U,w))||W.enumerable})}return $},J9=($)=>M9(C1({},"__esModule",{value:!0}),$),I4={};I9(I4,{FetchHttpHandler:()=>V9,keepAliveSupport:()=>O1,streamCollector:()=>A9});A4.exports=J9(I4);var E4=n(),K9=u$();r(M4,"requestTimeout");var O1={supported:void 0},J4=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(O1.supported===void 0)O1.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(U,{abortSignal:G}={}){if(!this.config)this.config=await this.configProvider;const W=this.config.requestTimeout,w=this.config.keepAlive===!0,L=this.config.credentials;if(G==null?void 0:G.aborted){const A=new Error("Request aborted");return A.name="AbortError",Promise.reject(A)}let Z=U.path;const X=K9.buildQueryString(U.query||{});if(X)Z+=`?${X}`;if(U.fragment)Z+=`#${U.fragment}`;let Y="";if(U.username!=null||U.password!=null){const A=U.username??"",K=U.password??"";Y=`${A}:${K}@`}const{port:z,method:F}=U,Q=`${U.protocol}//${Y}${U.hostname}${z?`:${z}`:""}${Z}`,R=F==="GET"||F==="HEAD"?void 0:U.body,M={body:R,headers:new Headers(U.headers),method:F,credentials:L};if(R)M.duplex="half";if(typeof AbortController!=="undefined")M.signal=G;if(O1.supported)M.keepalive=w;let J=r(()=>{},"removeSignalEventListener");const V=new Request(Q,M),B=[fetch(V).then((A)=>{const K=A.headers,q={};for(let u of K.entries())q[u[0]]=u[1];if(A.body==null)return A.blob().then((u)=>({response:new E4.HttpResponse({headers:q,reason:A.statusText,statusCode:A.status,body:u})}));return{response:new E4.HttpResponse({headers:q,reason:A.statusText,statusCode:A.status,body:A.body})}}),M4(W)];if(G)B.push(new Promise((A,K)=>{const q=r(()=>{const k=new Error("Request aborted");k.name="AbortError",K(k)},"onAbort");if(typeof G.addEventListener==="function"){const k=G;k.addEventListener("abort",q,{once:!0}),J=r(()=>k.removeEventListener("abort",q),"removeSignalEventListener")}else G.onabort=q}));return Promise.race(B).finally(J)}updateHttpClientConfig(U,G){this.config=void 0,this.configProvider=this.configProvider.then((W)=>{return W[U]=G,W})}httpHandlerConfigs(){return this.config??{}}};r(J4,"FetchHttpHandler");var V9=J4,B9=A1(),A9=r(($)=>{if(typeof Blob==="function"&&$ instanceof Blob)return K4($);return V4($)},"streamCollector");r(K4,"collectBlob");r(V4,"collectStream");r(B4,"readToBase64")});var l$=I((_M,N4)=>{var f4=function($){if($.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const U=new Uint8Array($.length/2);for(let G=0;G<$.length;G+=2){const W=$.slice(G,G+2).toLowerCase();if(W in p$)U[G/2]=p$[W];else throw new Error(`Cannot decode unrecognized sequence ${W} as hexadecimal`)}return U},q4=function($){let U="";for(let G=0;G<$.byteLength;G++)U+=C4[$[G]];return U},f1=Object.defineProperty,T9=Object.getOwnPropertyDescriptor,H9=Object.getOwnPropertyNames,O9=Object.prototype.hasOwnProperty,H4=($,U)=>f1($,"name",{value:U,configurable:!0}),C9=($,U)=>{for(var G in U)f1($,G,{get:U[G],enumerable:!0})},f9=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of H9(U))if(!O9.call($,w)&&w!==G)f1($,w,{get:()=>U[w],enumerable:!(W=T9(U,w))||W.enumerable})}return $},q9=($)=>f9(f1({},"__esModule",{value:!0}),$),O4={};C9(O4,{fromHex:()=>f4,toHex:()=>q4});N4.exports=q9(O4);var C4={},p$={};for(let $=0;$<256;$++){let U=$.toString(16).toLowerCase();if(U.length===1)U=`0${U}`;C4[$]=U,p$[U]=$}H4(f4,"fromHex");H4(q4,"toHex")});var c0=I((j4)=>{Object.defineProperty(j4,"__esModule",{value:!0});j4.isReadableStream=void 0;var N9=($)=>{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)};j4.isReadableStream=N9});var x4=I((D4)=>{Object.defineProperty(D4,"__esModule",{value:!0});D4.sdkStreamMixin=void 0;var j9=T4(),P9=A1(),S9=l$(),b9=e(),S4=c0(),b4="The stream has already been transformed.",k9=($)=>{var U,G;if(!k4($)&&!S4.isReadableStream($)){const Z=((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 ${Z}`)}let W=!1;const w=async()=>{if(W)throw new Error(b4);return W=!0,await j9.streamCollector($)},L=(Z)=>{if(typeof Z.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 Z.stream()};return Object.assign($,{transformToByteArray:w,transformToString:async(Z)=>{const X=await w();if(Z==="base64")return P9.toBase64(X);else if(Z==="hex")return S9.toHex(X);else if(Z===void 0||Z==="utf8"||Z==="utf-8")return b9.toUtf8(X);else if(typeof TextDecoder==="function")return new TextDecoder(Z).decode(X);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(W)throw new Error(b4);if(W=!0,k4($))return L($);else if(S4.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};D4.sdkStreamMixin=k9;var k4=($)=>typeof Blob==="function"&&$ instanceof Blob});var u4=I((c4)=>{Object.defineProperty(c4,"__esModule",{value:!0});c4.sdkStreamMixin=void 0;var D9=R4(),h9=x0(),s$=import.meta.require("stream"),x9=import.meta.require("util"),v9=x4(),v4="The stream has already been transformed.",c9=($)=>{var U,G;if(!($ instanceof s$.Readable))try{return v9.sdkStreamMixin($)}catch(L){const Z=((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 ${Z}`)}let W=!1;const w=async()=>{if(W)throw new Error(v4);return W=!0,await D9.streamCollector($)};return Object.assign($,{transformToByteArray:w,transformToString:async(L)=>{const Z=await w();if(L===void 0||Buffer.isEncoding(L))return h9.fromArrayBuffer(Z.buffer,Z.byteOffset,Z.byteLength).toString(L);else return new x9.TextDecoder(L).decode(Z)},transformToWebStream:()=>{if(W)throw new Error(v4);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof s$.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,s$.Readable.toWeb($)}})};c4.sdkStreamMixin=c9});var g4=I((_4)=>{async function y9($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Object.defineProperty(_4,"__esModule",{value:!0});_4.splitStream=void 0;_4.splitStream=y9});var m4=I((l4)=>{async function d9($){if(_9.isReadableStream($))return u9.splitStream($);const U=new p4.PassThrough,G=new p4.PassThrough;return $.pipe(U),$.pipe(G),[U,G]}Object.defineProperty(l4,"__esModule",{value:!0});l4.splitStream=void 0;var p4=import.meta.require("stream"),u9=g4(),_9=c0();l4.splitStream=d9});var r4=I((n4)=>{async function g9($,U){var G;let W=0;const w=[],L=$.getReader();let Z=!1;while(!Z){const{done:z,value:F}=await L.read();if(F)w.push(F),W+=(G=F===null||F===void 0?void 0:F.byteLength)!==null&&G!==void 0?G:0;if(W>=U)break;Z=z}L.releaseLock();const X=new Uint8Array(Math.min(U,W));let Y=0;for(let z of w){if(z.byteLength>X.byteLength-Y){X.set(z.subarray(0,X.byteLength-Y),Y);break}else X.set(z,Y);Y+=z.length}return X}Object.defineProperty(n4,"__esModule",{value:!0});n4.headStream=void 0;n4.headStream=g9});var e4=I((a4)=>{Object.defineProperty(a4,"__esModule",{value:!0});a4.headStream=void 0;var p9=import.meta.require("stream"),l9=r4(),s9=c0(),m9=($,U)=>{if(s9.isReadableStream($))return l9.headStream($,U);return new Promise((G,W)=>{const w=new o4;w.limit=U,$.pipe(w),$.on("error",(L)=>{w.end(),W(L)}),w.on("error",W),w.on("finish",function(){const L=new Uint8Array(Buffer.concat(this.buffers));G(L)})})};a4.headStream=m9;class o4 extends p9.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write($,U,G){var W;if(this.buffers.push($),this.bytesBuffered+=(W=$.byteLength)!==null&&W!==void 0?W:0,this.bytesBuffered>=this.limit){const w=this.bytesBuffered-this.limit,L=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=L.subarray(0,L.byteLength-w),this.emit("finish")}G()}}});var Lw=I((iM,z0)=>{var Gw=function($,U="utf-8"){if(U==="base64")return $w.toBase64($);return Uw.toUtf8($)},Ww=function($,U){if(U==="base64")return n$.mutate($w.fromBase64($));return n$.mutate(Uw.fromUtf8($))},q1=Object.defineProperty,n9=Object.getOwnPropertyDescriptor,i9=Object.getOwnPropertyNames,r9=Object.prototype.hasOwnProperty,i$=($,U)=>q1($,"name",{value:U,configurable:!0}),o9=($,U)=>{for(var G in U)q1($,G,{get:U[G],enumerable:!0})},m$=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of i9(U))if(!r9.call($,w)&&w!==G)q1($,w,{get:()=>U[w],enumerable:!(W=n9(U,w))||W.enumerable})}return $},y0=($,U,G)=>(m$($,U,"default"),G&&m$(G,U,"default")),a9=($)=>m$(q1({},"__esModule",{value:!0}),$),Y0={};o9(Y0,{Uint8ArrayBlobAdapter:()=>n$});z0.exports=a9(Y0);var $w=A1(),Uw=e();i$(Gw,"transformToString");i$(Ww,"transformFromString");var ww=class $ extends Uint8Array{static fromString(U,G="utf-8"){switch(typeof U){case"string":return Ww(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 Gw(this,U)}};i$(ww,"Uint8ArrayBlobAdapter");var n$=ww;y0(Y0,p8(),z0.exports);y0(Y0,u4(),z0.exports);y0(Y0,m4(),z0.exports);y0(Y0,e4(),z0.exports);y0(Y0,c0(),z0.exports)});var T0=I((rM,jw)=>{var Bw=function($){const U=$.getUTCFullYear(),G=$.getUTCMonth(),W=$.getUTCDay(),w=$.getUTCDate(),L=$.getUTCHours(),Z=$.getUTCMinutes(),X=$.getUTCSeconds(),Y=w<10?`0${w}`:`${w}`,z=L<10?`0${L}`:`${L}`,F=Z<10?`0${Z}`:`${Z}`,Q=X<10?`0${X}`:`${X}`;return`${qF[W]}, ${Y} ${LU[G]} ${U} ${z}:${F}:${Q} GMT`},P1=function($){return encodeURIComponent($).replace(/[!'()*]/g,function(U){return"%"+U.charCodeAt(0).toString(16).toUpperCase()})},ZU=function($,U,G){let W,w,L;if(typeof U==="undefined"&&typeof G==="undefined")W={},L=$;else if(W=$,typeof U==="function")return w=U,L=G,LQ(W,w,L);else L=U;for(let Z of Object.keys(L)){if(!Array.isArray(L[Z])){W[Z]=L[Z];continue}qw(W,null,L,Z)}return W},Nw=function($,U,G){if(G<=0||!Number.isInteger(G))throw new Error("Invalid number of delimiters ("+G+") for splitEvery.");const W=$.split(U);if(G===1)return W;const w=[];let L="";for(let Z=0;Z<W.length;Z++){if(L==="")L=W[Z];else L+=U+W[Z];if((Z+1)%G===0)w.push(L),L=""}if(L!=="")w.push(L);return w},S1=Object.defineProperty,e9=Object.getOwnPropertyDescriptor,$F=Object.getOwnPropertyNames,UF=Object.prototype.hasOwnProperty,E=($,U)=>S1($,"name",{value:U,configurable:!0}),GF=($,U)=>{for(var G in U)S1($,G,{get:U[G],enumerable:!0})},WF=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of $F(U))if(!UF.call($,w)&&w!==G)S1($,w,{get:()=>U[w],enumerable:!(W=e9(U,w))||W.enumerable})}return $},wF=($)=>WF(S1({},"__esModule",{value:!0}),$),Xw={};GF(Xw,{Client:()=>ZF,Command:()=>Rw,LazyJsonString:()=>GQ,NoOpLogger:()=>LF,SENSITIVE_STRING:()=>zF,ServiceException:()=>lF,StringWrapper:()=>p0,_json:()=>UU,collectBody:()=>XF,convertMap:()=>WQ,createAggregatedClient:()=>FF,dateToUtcString:()=>Bw,decorateServiceException:()=>Tw,emitWarningIfUnsupportedVersion:()=>iF,expectBoolean:()=>RF,expectByte:()=>$U,expectFloat32:()=>N1,expectInt:()=>IF,expectInt32:()=>t$,expectLong:()=>d0,expectNonNull:()=>JF,expectNumber:()=>_0,expectObject:()=>Iw,expectShort:()=>e$,expectString:()=>KF,expectUnion:()=>VF,extendedEncodeURIComponent:()=>P1,getArrayIfSingleItem:()=>UQ,getDefaultClientConfiguration:()=>eF,getDefaultExtensionConfiguration:()=>Ow,getValueFromTextNode:()=>Cw,handleFloat:()=>TF,limitedParseDouble:()=>wU,limitedParseFloat:()=>HF,limitedParseFloat32:()=>OF,loadConfigsForDefaultMode:()=>nF,logger:()=>g0,map:()=>ZU,parseBoolean:()=>QF,parseEpochTimestamp:()=>xF,parseRfc3339DateTime:()=>jF,parseRfc3339DateTimeWithOffset:()=>SF,parseRfc7231DateTime:()=>hF,resolveDefaultRuntimeConfig:()=>$Q,resolvedPath:()=>YQ,serializeDateTime:()=>FQ,serializeFloat:()=>zQ,splitEvery:()=>Nw,strictParseByte:()=>Vw,strictParseDouble:()=>WU,strictParseFloat:()=>BF,strictParseFloat32:()=>Mw,strictParseInt:()=>CF,strictParseInt32:()=>fF,strictParseLong:()=>Kw,strictParseShort:()=>V0,take:()=>wQ,throwDefaultError:()=>Hw,withBaseException:()=>sF});jw.exports=wF(Xw);var Yw=class ${trace(){}debug(){}info(){}warn(){}error(){}};E(Yw,"NoOpLogger");var LF=Yw,zw=t9(),Fw=class ${constructor(U){this.middlewareStack=zw.constructStack(),this.config=U}send(U,G,W){const w=typeof G!=="function"?G:void 0,L=typeof G==="function"?G:W,Z=U.resolveMiddleware(this.middlewareStack,this.config,w);if(L)Z(U).then((X)=>L(null,X.output),(X)=>L(X)).catch(()=>{});else return Z(U).then((X)=>X.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};E(Fw,"Client");var ZF=Fw,r$=Lw(),XF=E(async($=new Uint8Array,U)=>{if($ instanceof Uint8Array)return r$.Uint8ArrayBlobAdapter.mutate($);if(!$)return r$.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const G=U.streamCollector($);return r$.Uint8ArrayBlobAdapter.mutate(await G)},"collectBody"),a$=L0(),Qw=class ${constructor(){this.middlewareStack=zw.constructStack()}static classBuilder(){return new YF}resolveMiddlewareWithContext(U,G,W,{middlewareFn:w,clientName:L,commandName:Z,inputFilterSensitiveLog:X,outputFilterSensitiveLog:Y,smithyContext:z,additionalContext:F,CommandCtor:Q}){for(let B of w.bind(this)(Q,U,G,W))this.middlewareStack.use(B);const R=U.concat(this.middlewareStack),{logger:M}=G,J={logger:M,clientName:L,commandName:Z,inputFilterSensitiveLog:X,outputFilterSensitiveLog:Y,[a$.SMITHY_CONTEXT_KEY]:{commandInstance:this,...z},...F},{requestHandler:V}=G;return R.resolve((B)=>V.handle(B.request,W||{}),J)}};E(Qw,"Command");var Rw=Qw,Ew=class ${constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(U)=>U,this._outputFilterSensitiveLog=(U)=>U,this._serializer=null,this._deserializer=null}init(U){this._init=U}ep(U){return this._ep=U,this}m(U){return this._middlewareFn=U,this}s(U,G,W={}){return this._smithyContext={service:U,operation:G,...W},this}c(U={}){return this._additionalContext=U,this}n(U,G){return this._clientName=U,this._commandName=G,this}f(U=(W)=>W,G=(W)=>W){return this._inputFilterSensitiveLog=U,this._outputFilterSensitiveLog=G,this}ser(U){return this._serializer=U,this}de(U){return this._deserializer=U,this}build(){var U;const G=this;let W;return W=(U=class extends Rw{constructor(...[w]){super();this.serialize=G._serializer,this.deserialize=G._deserializer,this.input=w??{},G._init(this)}static getEndpointParameterInstructions(){return G._ep}resolveMiddleware(w,L,Z){return this.resolveMiddlewareWithContext(w,L,Z,{CommandCtor:W,middlewareFn:G._middlewareFn,clientName:G._clientName,commandName:G._commandName,inputFilterSensitiveLog:G._inputFilterSensitiveLog,outputFilterSensitiveLog:G._outputFilterSensitiveLog,smithyContext:G._smithyContext,additionalContext:G._additionalContext})}},E(U,"CommandRef"),U)}};E(Ew,"ClassBuilder");var YF=Ew,zF="***SensitiveInformation***",FF=E(($,U)=>{for(let G of Object.keys($)){const W=$[G],w=E(async function(Z,X,Y){const z=new W(Z);if(typeof X==="function")this.send(z,X);else if(typeof Y==="function"){if(typeof X!=="object")throw new Error(`Expected http options but got ${typeof X}`);this.send(z,X||{},Y)}else return this.send(z,X)},"methodImpl"),L=(G[0].toLowerCase()+G.slice(1)).replace(/Command$/,"");U.prototype[L]=w}},"createAggregatedClient"),QF=E(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),RF=E(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)g0.warn(j1(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){const U=$.toLowerCase();if(U==="false"||U==="true")g0.warn(j1(`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"),_0=E(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){const U=parseFloat($);if(!Number.isNaN(U)){if(String(U)!==String($))g0.warn(j1(`Expected number but observed string: ${$}`));return U}}if(typeof $==="number")return $;throw new TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),EF=Math.ceil(340282346638528860000000000000000000000),N1=E(($)=>{const U=_0($);if(U!==void 0&&!Number.isNaN(U)&&U!==Infinity&&U!==(-Infinity)){if(Math.abs(U)>EF)throw new TypeError(`Expected 32-bit float, got ${$}`)}return U},"expectFloat32"),d0=E(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw new TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),IF=d0,t$=E(($)=>GU($,32),"expectInt32"),e$=E(($)=>GU($,16),"expectShort"),$U=E(($)=>GU($,8),"expectByte"),GU=E(($,U)=>{const G=d0($);if(G!==void 0&&MF(G,U)!==G)throw new TypeError(`Expected ${U}-bit integer, got ${$}`);return G},"expectSizedInt"),MF=E(($,U)=>{switch(U){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),JF=E(($,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"),Iw=E(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;const U=Array.isArray($)?"array":typeof $;throw new TypeError(`Expected object, got ${U}: ${$}`)},"expectObject"),KF=E(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return g0.warn(j1(`Expected string, got ${typeof $}: ${$}`)),String($);throw new TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),VF=E(($)=>{if($===null||$===void 0)return;const U=Iw($),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"),WU=E(($)=>{if(typeof $=="string")return _0(A0($));return _0($)},"strictParseDouble"),BF=WU,Mw=E(($)=>{if(typeof $=="string")return N1(A0($));return N1($)},"strictParseFloat32"),AF=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,A0=E(($)=>{const U=$.match(AF);if(U===null||U[0].length!==$.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),wU=E(($)=>{if(typeof $=="string")return Jw($);return _0($)},"limitedParseDouble"),TF=wU,HF=wU,OF=E(($)=>{if(typeof $=="string")return Jw($);return N1($)},"limitedParseFloat32"),Jw=E(($)=>{switch($){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),Kw=E(($)=>{if(typeof $==="string")return d0(A0($));return d0($)},"strictParseLong"),CF=Kw,fF=E(($)=>{if(typeof $==="string")return t$(A0($));return t$($)},"strictParseInt32"),V0=E(($)=>{if(typeof $==="string")return e$(A0($));return e$($)},"strictParseShort"),Vw=E(($)=>{if(typeof $==="string")return $U(A0($));return $U($)},"strictParseByte"),j1=E(($)=>{return String(new TypeError($).stack||$).split("\n").slice(0,5).filter((U)=>!U.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),g0={warn:console.warn},qF=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],LU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];E(Bw,"dateToUtcString");var NF=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),jF=E(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=NF.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,w,L,Z,X,Y,z]=U,F=V0(B0(W)),Q=s(w,"month",1,12),R=s(L,"day",1,31);return u0(F,Q,R,{hours:Z,minutes:X,seconds:Y,fractionalMilliseconds:z})},"parseRfc3339DateTime"),PF=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),SF=E(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const U=PF.exec($);if(!U)throw new TypeError("Invalid RFC-3339 date-time value");const[G,W,w,L,Z,X,Y,z,F]=U,Q=V0(B0(W)),R=s(w,"month",1,12),M=s(L,"day",1,31),J=u0(Q,R,M,{hours:Z,minutes:X,seconds:Y,fractionalMilliseconds:z});if(F.toUpperCase()!="Z")J.setTime(J.getTime()-pF(F));return J},"parseRfc3339DateTimeWithOffset"),bF=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$/),kF=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$/),DF=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})$/),hF=E(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let U=bF.exec($);if(U){const[G,W,w,L,Z,X,Y,z]=U;return u0(V0(B0(L)),o$(w),s(W,"day",1,31),{hours:Z,minutes:X,seconds:Y,fractionalMilliseconds:z})}if(U=kF.exec($),U){const[G,W,w,L,Z,X,Y,z]=U;return yF(u0(vF(L),o$(w),s(W,"day",1,31),{hours:Z,minutes:X,seconds:Y,fractionalMilliseconds:z}))}if(U=DF.exec($),U){const[G,W,w,L,Z,X,Y,z]=U;return u0(V0(B0(z)),o$(W),s(w.trimLeft(),"day",1,31),{hours:L,minutes:Z,seconds:X,fractionalMilliseconds:Y})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),xF=E(($)=>{if($===null||$===void 0)return;let U;if(typeof $==="number")U=$;else if(typeof $==="string")U=WU($);else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(U)||U===Infinity||U===(-Infinity))throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(U*1000))},"parseEpochTimestamp"),u0=E(($,U,G,W)=>{const w=U-1;return _F($,w,G),new Date(Date.UTC($,w,G,s(W.hours,"hour",0,23),s(W.minutes,"minute",0,59),s(W.seconds,"seconds",0,60),gF(W.fractionalMilliseconds)))},"buildDate"),vF=E(($)=>{const U=(new Date()).getUTCFullYear(),G=Math.floor(U/100)*100+V0(B0($));if(G<U)return G+100;return G},"parseTwoDigitYear"),cF=1576800000000,yF=E(($)=>{if($.getTime()-(new Date()).getTime()>cF)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),o$=E(($)=>{const U=LU.indexOf($);if(U<0)throw new TypeError(`Invalid month: ${$}`);return U+1},"parseMonthByShortName"),uF=[31,28,31,30,31,30,31,31,30,31,30,31],_F=E(($,U,G)=>{let W=uF[U];if(U===1&&dF($))W=29;if(G>W)throw new TypeError(`Invalid day for ${LU[U]} in ${$}: ${G}`)},"validateDayOfMonth"),dF=E(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),s=E(($,U,G,W)=>{const w=Vw(B0($));if(w<G||w>W)throw new TypeError(`${U} must be between ${G} and ${W}, inclusive`);return w},"parseDateValue"),gF=E(($)=>{if($===null||$===void 0)return 0;return Mw("0."+$)*1000},"parseMilliseconds"),pF=E(($)=>{const U=$[0];let G=1;if(U=="+")G=1;else if(U=="-")G=-1;else throw new TypeError(`Offset direction, ${U}, must be "+" or "-"`);const W=Number($.substring(1,3)),w=Number($.substring(4,6));return G*(W*60+w)*60*1000},"parseOffsetToMilliseconds"),B0=E(($)=>{let U=0;while(U<$.length-1&&$.charAt(U)==="0")U++;if(U===0)return $;return $.slice(U)},"stripLeadingZeroes"),Aw=class $ extends Error{constructor(U){super(U.message);Object.setPrototypeOf(this,$.prototype),this.name=U.name,this.$fault=U.$fault,this.$metadata=U.$metadata}};E(Aw,"ServiceException");var lF=Aw,Tw=E(($,U={})=>{Object.entries(U).filter(([,W])=>W!==void 0).forEach(([W,w])=>{if($[W]==null||$[W]==="")$[W]=w});const G=$.message||$.Message||"UnknownError";return $.message=G,delete $.Message,$},"decorateServiceException"),Hw=E(({output:$,parsedBody:U,exceptionCtor:G,errorCode:W})=>{const w=mF($),L=w.httpStatusCode?w.httpStatusCode+"":void 0,Z=new G({name:(U==null?void 0:U.code)||(U==null?void 0:U.Code)||W||L||"UnknownError",$fault:"client",$metadata:w});throw Tw(Z,U)},"throwDefaultError"),sF=E(($)=>{return({output:U,parsedBody:G,errorCode:W})=>{Hw({output:U,parsedBody:G,exceptionCtor:$,errorCode:W})}},"withBaseException"),mF=E(($)=>({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"),nF=E(($)=>{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"),Zw=!1,iF=E(($)=>{if($&&!Zw&&parseInt($.substring(1,$.indexOf(".")))<16)Zw=!0},"emitWarningIfUnsupportedVersion"),rF=E(($)=>{const U=[];for(let G in a$.AlgorithmId){const W=a$.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"),oF=E(($)=>{const U={};return $.checksumAlgorithms().forEach((G)=>{U[G.algorithmId()]=G.checksumConstructor()}),U},"resolveChecksumRuntimeConfig"),aF=E(($)=>{let U=$.retryStrategy;return{setRetryStrategy(G){U=G},retryStrategy(){return U}}},"getRetryConfiguration"),tF=E(($)=>{const U={};return U.retryStrategy=$.retryStrategy(),U},"resolveRetryRuntimeConfig"),Ow=E(($)=>{return{...rF($),...aF($)}},"getDefaultExtensionConfiguration"),eF=Ow,$Q=E(($)=>{return{...oF($),...tF($)}},"resolveDefaultRuntimeConfig");E(P1,"extendedEncodeURIComponent");var UQ=E(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),Cw=E(($)=>{for(let G in $)if($.hasOwnProperty(G)&&$[G]["#text"]!==void 0)$[G]=$[G]["#text"];else if(typeof $[G]==="object"&&$[G]!==null)$[G]=Cw($[G]);return $},"getValueFromTextNode"),p0=E(function(){const $=Object.getPrototypeOf(this).constructor,G=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(G,$.prototype),G},"StringWrapper");p0.prototype=Object.create(String.prototype,{constructor:{value:p0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(p0,String);var fw=class $ extends p0{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))}};E(fw,"LazyJsonString");var GQ=fw;E(ZU,"map");var WQ=E(($)=>{const U={};for(let[G,W]of Object.entries($||{}))U[G]=[,W];return U},"convertMap"),wQ=E(($,U)=>{const G={};for(let W in U)qw(G,$,U,W);return G},"take"),LQ=E(($,U,G)=>{return ZU($,Object.entries(G).reduce((W,[w,L])=>{if(Array.isArray(L))W[w]=L;else if(typeof L==="function")W[w]=[U,L()];else W[w]=[U,L];return W},{}))},"mapWithFilter"),qw=E(($,U,G,W)=>{if(U!==null){let Z=G[W];if(typeof Z==="function")Z=[,Z];const[X=ZQ,Y=XQ,z=W]=Z;if(typeof X==="function"&&X(U[z])||typeof X!=="function"&&!!X)$[W]=Y(U[z]);return}let[w,L]=G[W];if(typeof L==="function"){let Z;const X=w===void 0&&(Z=L())!=null,Y=typeof w==="function"&&!!w(void 0)||typeof w!=="function"&&!!w;if(X)$[W]=Z;else if(Y)$[W]=L()}else{const Z=w===void 0&&L!=null,X=typeof w==="function"&&!!w(L)||typeof w!=="function"&&!!w;if(Z||X)$[W]=L}},"applyInstruction"),ZQ=E(($)=>$!=null,"nonNullish"),XQ=E(($)=>$,"pass"),YQ=E(($,U,G,W,w,L)=>{if(U!=null&&U[G]!==void 0){const Z=W();if(Z.length<=0)throw new Error("Empty value provided for input HTTP label: "+G+".");$=$.replace(w,L?Z.split("/").map((X)=>P1(X)).join("/"):P1(Z))}else throw new Error("No value provided for input HTTP label: "+G+".");return $},"resolvedPath"),zQ=E(($)=>{if($!==$)return"NaN";switch($){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return $}},"serializeFloat"),FQ=E(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),UU=E(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((U)=>U!=null).map(UU);if(typeof $==="object"){const U={};for(let G of Object.keys($)){if($[G]==null)continue;U[G]=UU($[G])}return U}return $},"_json");E(Nw,"splitEvery")});var bw=I((Pw)=>{Object.defineProperty(Pw,"__esModule",{value:!0});Pw.isStreamingPayload=void 0;var QQ=import.meta.require("stream"),RQ=($)=>($===null||$===void 0?void 0:$.body)instanceof QQ.Readable||typeof ReadableStream!=="undefined"&&($===null||$===void 0?void 0:$.body)instanceof ReadableStream;Pw.isStreamingPayload=RQ});var rw=I((tM,iw)=>{var{defineProperty:b1,getOwnPropertyDescriptor:EQ,getOwnPropertyNames:IQ}=Object,MQ=Object.prototype.hasOwnProperty,j=($,U)=>b1($,"name",{value:U,configurable:!0}),JQ=($,U)=>{for(var G in U)b1($,G,{get:U[G],enumerable:!0})},KQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of IQ(U))if(!MQ.call($,w)&&w!==G)b1($,w,{get:()=>U[w],enumerable:!(W=EQ(U,w))||W.enumerable})}return $},VQ=($)=>KQ(b1({},"__esModule",{value:!0}),$),Dw={};JQ(Dw,{AdaptiveRetryStrategy:()=>TQ,CONFIG_MAX_ATTEMPTS:()=>YU,CONFIG_RETRY_MODE:()=>gw,ENV_MAX_ATTEMPTS:()=>XU,ENV_RETRY_MODE:()=>dw,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>HQ,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>CQ,StandardRetryStrategy:()=>uw,defaultDelayDecider:()=>xw,defaultRetryDecider:()=>vw,getOmitRetryHeadersPlugin:()=>fQ,getRetryAfterHint:()=>nw,getRetryPlugin:()=>bQ,omitRetryHeadersMiddleware:()=>pw,omitRetryHeadersMiddlewareOptions:()=>lw,resolveRetryConfig:()=>OQ,retryMiddleware:()=>sw,retryMiddlewareOptions:()=>mw});iw.exports=VQ(Dw);var H0=n(),hw=f$(),O=O8(),BQ=j(($,U)=>{const G=$,W=(U==null?void 0:U.noRetryIncrement)??O.NO_RETRY_INCREMENT,w=(U==null?void 0:U.retryCost)??O.RETRY_COST,L=(U==null?void 0:U.timeoutRetryCost)??O.TIMEOUT_RETRY_COST;let Z=$;const X=j((Q)=>Q.name==="TimeoutError"?L:w,"getCapacityAmount"),Y=j((Q)=>X(Q)<=Z,"hasRetryTokens");return Object.freeze({hasRetryTokens:Y,retrieveRetryTokens:j((Q)=>{if(!Y(Q))throw new Error("No retry token available");const R=X(Q);return Z-=R,R},"retrieveRetryTokens"),releaseRetryTokens:j((Q)=>{Z+=Q??W,Z=Math.min(Z,G)},"releaseRetryTokens")})},"getDefaultRetryQuota"),xw=j(($,U)=>Math.floor(Math.min(O.MAXIMUM_RETRY_DELAY,Math.random()*2**U*$)),"defaultDelayDecider"),$0=q$(),vw=j(($)=>{if(!$)return!1;return $0.isRetryableByTrait($)||$0.isClockSkewError($)||$0.isThrottlingError($)||$0.isTransientError($)},"defaultRetryDecider"),cw=j(($)=>{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"),yw=class ${constructor(U,G){this.maxAttemptsProvider=U,this.mode=O.RETRY_MODES.STANDARD,this.retryDecider=(G==null?void 0:G.retryDecider)??vw,this.delayDecider=(G==null?void 0:G.delayDecider)??xw,this.retryQuota=(G==null?void 0:G.retryQuota)??BQ(O.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=O.DEFAULT_MAX_ATTEMPTS}return U}async retry(U,G,W){let w,L=0,Z=0;const X=await this.getMaxAttempts(),{request:Y}=G;if(H0.HttpRequest.isInstance(Y))Y.headers[O.INVOCATION_ID_HEADER]=hw.v4();while(!0)try{if(H0.HttpRequest.isInstance(Y))Y.headers[O.REQUEST_HEADER]=`attempt=${L+1}; max=${X}`;if(W==null?void 0:W.beforeRequest)await W.beforeRequest();const{response:z,output:F}=await U(G);if(W==null?void 0:W.afterRequest)W.afterRequest(z);return this.retryQuota.releaseRetryTokens(w),F.$metadata.attempts=L+1,F.$metadata.totalRetryDelay=Z,{response:z,output:F}}catch(z){const F=cw(z);if(L++,this.shouldRetry(F,L,X)){w=this.retryQuota.retrieveRetryTokens(F);const Q=this.delayDecider($0.isThrottlingError(F)?O.THROTTLING_RETRY_DELAY_BASE:O.DEFAULT_RETRY_DELAY_BASE,L),R=AQ(F.$response),M=Math.max(R||0,Q);Z+=M,await new Promise((J)=>setTimeout(J,M));continue}if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=L,F.$metadata.totalRetryDelay=Z,F}}};j(yw,"StandardRetryStrategy");var uw=yw,AQ=j(($)=>{if(!H0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((L)=>L.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return W*1000;return new Date(G).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),_w=class $ extends uw{constructor(U,G){const{rateLimiter:W,...w}=G??{};super(U,w);this.rateLimiter=W??new O.DefaultRateLimiter,this.mode=O.RETRY_MODES.ADAPTIVE}async retry(U,G){return super.retry(U,G,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(W)=>{this.rateLimiter.updateClientSendingRate(W)}})}};j(_w,"AdaptiveRetryStrategy");var TQ=_w,kw=j0(),XU="AWS_MAX_ATTEMPTS",YU="max_attempts",HQ={environmentVariableSelector:($)=>{const U=$[XU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${XU} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[YU];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${YU} mast be a number, got "${U}"`);return G},default:O.DEFAULT_MAX_ATTEMPTS},OQ=j(($)=>{const{retryStrategy:U}=$,G=kw.normalizeProvider($.maxAttempts??O.DEFAULT_MAX_ATTEMPTS);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await kw.normalizeProvider($.retryMode)()===O.RETRY_MODES.ADAPTIVE)return new O.AdaptiveRetryStrategy(G);return new O.StandardRetryStrategy(G)}}},"resolveRetryConfig"),dw="AWS_RETRY_MODE",gw="retry_mode",CQ={environmentVariableSelector:($)=>$[dw],configFileSelector:($)=>$[gw],default:O.DEFAULT_RETRY_MODE},pw=j(()=>($)=>async(U)=>{const{request:G}=U;if(H0.HttpRequest.isInstance(G))delete G.headers[O.INVOCATION_ID_HEADER],delete G.headers[O.REQUEST_HEADER];return $(U)},"omitRetryHeadersMiddleware"),lw={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},fQ=j(($)=>({applyToStack:(U)=>{U.addRelativeTo(pw(),lw)}}),"getOmitRetryHeadersPlugin"),qQ=T0(),NQ=bw(),sw=j(($)=>(U,G)=>async(W)=>{var w;let L=await $.retryStrategy();const Z=await $.maxAttempts();if(jQ(L)){L=L;let X=await L.acquireInitialRetryToken(G.partition_id),Y=new Error,z=0,F=0;const{request:Q}=W,R=H0.HttpRequest.isInstance(Q);if(R)Q.headers[O.INVOCATION_ID_HEADER]=hw.v4();while(!0)try{if(R)Q.headers[O.REQUEST_HEADER]=`attempt=${z+1}; max=${Z}`;const{response:M,output:J}=await U(W);return L.recordSuccess(X),J.$metadata.attempts=z+1,J.$metadata.totalRetryDelay=F,{response:M,output:J}}catch(M){const J=PQ(M);if(Y=cw(M),R&&NQ.isStreamingPayload(Q))throw(w=G.logger instanceof qQ.NoOpLogger?console:G.logger)==null||w.warn("An error was encountered in a non-retryable streaming request."),Y;try{X=await L.refreshRetryTokenForRetry(X,J)}catch(B){if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=z+1,Y.$metadata.totalRetryDelay=F,Y}z=X.getRetryCount();const V=X.getRetryDelay();F+=V,await new Promise((B)=>setTimeout(B,V))}}else{if(L=L,L==null?void 0:L.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",L.mode]];return L.retry(U,W)}},"retryMiddleware"),jQ=j(($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined","isRetryStrategyV2"),PQ=j(($)=>{const U={error:$,errorType:SQ($)},G=nw($.$response);if(G)U.retryAfterHint=G;return U},"getRetryErrorInfo"),SQ=j(($)=>{if($0.isThrottlingError($))return"THROTTLING";if($0.isTransientError($))return"TRANSIENT";if($0.isServerError($))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),mw={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},bQ=j(($)=>({applyToStack:(U)=>{U.add(sw($),mw)}}),"getRetryPlugin"),nw=j(($)=>{if(!H0.HttpResponse.isInstance($))return;const U=Object.keys($.headers).find((L)=>L.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)},"getRetryAfterHint")});var FU=I((eM,I6)=>{var tw=function($){const U=new Map;for(let G of $)U.set(G.schemeId,G);return U},F6=function($,U){return new R6($,U)},E6=function($,U,G,W,w){return H(async function*L(Z,X,...Y){let z=Z.startingToken||void 0,F=!0,Q;while(F){if(X[G]=z,w)X[w]=X[w]??Z.pageSize;if(Z.client instanceof $)Q=await U7(U,Z.client,X,...Y);else throw new Error(`Invalid client, expected instance of ${$.name}`);yield Q;const R=z;z=G7(Q,W),F=!!(z&&(!Z.stopOnSameToken||z!==R))}return},"paginateOperation")},D1=Object.defineProperty,kQ=Object.getOwnPropertyDescriptor,DQ=Object.getOwnPropertyNames,hQ=Object.prototype.hasOwnProperty,H=($,U)=>D1($,"name",{value:U,configurable:!0}),xQ=($,U)=>{for(var G in U)D1($,G,{get:U[G],enumerable:!0})},vQ=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of DQ(U))if(!hQ.call($,w)&&w!==G)D1($,w,{get:()=>U[w],enumerable:!(W=kQ(U,w))||W.enumerable})}return $},cQ=($)=>vQ(D1({},"__esModule",{value:!0}),$),ow={};xQ(ow,{DefaultIdentityProviderConfig:()=>mQ,EXPIRATION_MS:()=>Y6,HttpApiKeyAuthSigner:()=>nQ,HttpBearerAuthSigner:()=>iQ,NoAuthSigner:()=>rQ,RequestBuilder:()=>R6,createIsIdentityExpiredFunction:()=>X6,createPaginator:()=>E6,doesIdentityRequireRefresh:()=>z6,getHttpAuthSchemeEndpointRuleSetPlugin:()=>uQ,getHttpAuthSchemePlugin:()=>dQ,getHttpSigningPlugin:()=>sQ,getSmithyContext:()=>tQ,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>ew,httpAuthSchemeMiddleware:()=>zU,httpAuthSchemeMiddlewareOptions:()=>$6,httpSigningMiddleware:()=>U6,httpSigningMiddlewareOptions:()=>G6,isIdentityExpired:()=>oQ,memoizeIdentityProvider:()=>aQ,normalizeProvider:()=>eQ,requestBuilder:()=>F6});I6.exports=cQ(ow);var aw=j0();H(tw,"convertHttpAuthSchemesToMap");var zU=H(($,U)=>(G,W)=>async(w)=>{var L;const Z=$.httpAuthSchemeProvider(await U.httpAuthSchemeParametersProvider($,W,w.input)),X=tw($.httpAuthSchemes),Y=aw.getSmithyContext(W),z=[];for(let F of Z){const Q=X.get(F.schemeId);if(!Q){z.push(`HttpAuthScheme \`${F.schemeId}\` was not enabled for this service.`);continue}const R=Q.identityProvider(await U.identityProviderConfigProvider($));if(!R){z.push(`HttpAuthScheme \`${F.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:M={},signingProperties:J={}}=((L=F.propertiesExtractor)==null?void 0:L.call(F,$,W))||{};F.identityProperties=Object.assign(F.identityProperties||{},M),F.signingProperties=Object.assign(F.signingProperties||{},J),Y.selectedHttpAuthScheme={httpAuthOption:F,identity:await R(F.identityProperties),signer:Q.signer};break}if(!Y.selectedHttpAuthScheme)throw new Error(z.join("\n"));return G(w)},"httpAuthSchemeMiddleware"),yQ=WW(),ew={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:yQ.endpointMiddlewareOptions.name},uQ=H(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(zU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),ew)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),_Q=K$(),$6={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:_Q.serializerMiddlewareOption.name},dQ=H(($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G})=>({applyToStack:(W)=>{W.addRelativeTo(zU($,{httpAuthSchemeParametersProvider:U,identityProviderConfigProvider:G}),$6)}}),"getHttpAuthSchemePlugin"),h1=n(),gQ=H(($)=>(U)=>{throw U},"defaultErrorHandler"),pQ=H(($,U)=>{},"defaultSuccessHandler"),U6=H(($)=>(U,G)=>async(W)=>{if(!h1.HttpRequest.isInstance(W.request))return U(W);const L=aw.getSmithyContext(G).selectedHttpAuthScheme;if(!L)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:Z={}},identity:X,signer:Y}=L,z=await U({...W,request:await Y.sign(W.request,X,Z)}).catch((Y.errorHandler||gQ)(Z));return(Y.successHandler||pQ)(z.response,Z),z},"httpSigningMiddleware"),lQ=rw(),G6={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:lQ.retryMiddlewareOptions.name},sQ=H(($)=>({applyToStack:(U)=>{U.addRelativeTo(U6($),G6)}}),"getHttpSigningPlugin"),W6=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)}};H(W6,"DefaultIdentityProviderConfig");var mQ=W6,k1=L0(),w6=class ${async sign(U,G,W){if(!W)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!W.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!W.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!G.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const w=h1.HttpRequest.clone(U);if(W.in===k1.HttpApiKeyAuthLocation.QUERY)w.query[W.name]=G.apiKey;else if(W.in===k1.HttpApiKeyAuthLocation.HEADER)w.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 w}};H(w6,"HttpApiKeyAuthSigner");var nQ=w6,L6=class ${async sign(U,G,W){const w=h1.HttpRequest.clone(U);if(!G.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return w.headers.Authorization=`Bearer ${G.token}`,w}};H(L6,"HttpBearerAuthSigner");var iQ=L6,Z6=class ${async sign(U,G,W){return U}};H(Z6,"NoAuthSigner");var rQ=Z6,X6=H(($)=>(U)=>z6(U)&&U.expiration.getTime()-Date.now()<$,"createIsIdentityExpiredFunction"),Y6=300000,oQ=X6(Y6),z6=H(($)=>$.expiration!==void 0,"doesIdentityRequireRefresh"),aQ=H(($,U,G)=>{if($===void 0)return;const W=typeof $!=="function"?async()=>Promise.resolve($):$;let w,L,Z,X=!1;const Y=H(async(z)=>{if(!L)L=W(z);try{w=await L,Z=!0,X=!1}finally{L=void 0}return w},"coalesceProvider");if(U===void 0)return async(z)=>{if(!Z||(z==null?void 0:z.forceRefresh))w=await Y(z);return w};return async(z)=>{if(!Z||(z==null?void 0:z.forceRefresh))w=await Y(z);if(X)return w;if(!G(w))return X=!0,w;if(U(w))return await Y(z),w;return w}},"memoizeIdentityProvider"),tQ=H(($)=>$[k1.SMITHY_CONTEXT_KEY]||($[k1.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),eQ=H(($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U},"normalizeProvider"),$7=T0();H(F6,"requestBuilder");var Q6=class ${constructor(U,G){this.input=U,this.context=G,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:U,protocol:G="https",port:W,path:w}=await this.context.endpoint();this.path=w;for(let L of this.resolvePathStack)L(this.path);return new h1.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,w){return this.resolvePathStack.push((L)=>{this.path=$7.resolvedPath(L,this.input,U,G,W,w)}),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}};H(Q6,"RequestBuilder");var R6=Q6,U7=H(async($,U,G,...W)=>{return await U.send(new $(G),...W)},"makePagedClientRequest");H(E6,"createPaginator");var G7=H(($,U)=>{let G=$;const W=U.split(".");for(let w of W){if(!G||typeof G!=="object")return;G=G[w]}return G},"get")});var QL=I((NT,FL)=>{var{defineProperty:o1,getOwnPropertyDescriptor:v7,getOwnPropertyNames:c7}=Object,y7=Object.prototype.hasOwnProperty,u7=($,U)=>o1($,"name",{value:U,configurable:!0}),_7=($,U)=>{for(var G in U)o1($,G,{get:U[G],enumerable:!0})},d7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of c7(U))if(!y7.call($,w)&&w!==G)o1($,w,{get:()=>U[w],enumerable:!(W=v7(U,w))||W.enumerable})}return $},g7=($)=>d7(o1({},"__esModule",{value:!0}),$),zL={};_7(zL,{emitWarningIfUnsupportedVersion:()=>p7});FL.exports=g7(zL);var YL=!1,p7=u7(($)=>{if($&&!YL&&parseInt($.substring(1,$.indexOf(".")))<18)YL=!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 bL=I((jT,SL)=>{var vU=function($){for(let U=0;U<8;U++)$[U]^=255;for(let U=7;U>-1;U--)if($[U]++,$[U]!==0)break},U$=Object.defineProperty,l7=Object.getOwnPropertyDescriptor,s7=Object.getOwnPropertyNames,m7=Object.prototype.hasOwnProperty,P=($,U)=>U$($,"name",{value:U,configurable:!0}),n7=($,U)=>{for(var G in U)U$($,G,{get:U[G],enumerable:!0})},i7=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of s7(U))if(!m7.call($,w)&&w!==G)U$($,w,{get:()=>U[w],enumerable:!(W=l7(U,w))||W.enumerable})}return $},r7=($)=>i7(U$({},"__esModule",{value:!0}),$),JL={};n7(JL,{SignatureV4:()=>TR,clearCredentialCache:()=>RR,createScope:()=>e1,getCanonicalHeaders:()=>xU,getCanonicalQuery:()=>CL,getPayloadHash:()=>$$,getSigningKey:()=>OL,moveHeadersToQuery:()=>jL,prepareRequest:()=>cU});SL.exports=r7(JL);var RL=j0(),kU=e(),o7="X-Amz-Algorithm",a7="X-Amz-Credential",KL="X-Amz-Date",t7="X-Amz-SignedHeaders",e7="X-Amz-Expires",VL="X-Amz-Signature",BL="X-Amz-Security-Token",AL="authorization",TL=KL.toLowerCase(),$R="date",UR=[AL,TL,$R],GR=VL.toLowerCase(),hU="x-amz-content-sha256",WR=BL.toLowerCase(),wR={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},LR=/^proxy-/,ZR=/^sec-/,DU="AWS4-HMAC-SHA256",XR="AWS4-HMAC-SHA256-PAYLOAD",YR="UNSIGNED-PAYLOAD",zR=50,HL="aws4_request",FR=604800,W0=l$(),QR=e(),N0={},t1=[],e1=P(($,U,G)=>`${$}/${U}/${G}/${HL}`,"createScope"),OL=P(async($,U,G,W,w)=>{const L=await EL($,U.secretAccessKey,U.accessKeyId),Z=`${G}:${W}:${w}:${W0.toHex(L)}:${U.sessionToken}`;if(Z in N0)return N0[Z];t1.push(Z);while(t1.length>zR)delete N0[t1.shift()];let X=`AWS4${U.secretAccessKey}`;for(let Y of[G,W,w,HL])X=await EL($,X,Y);return N0[Z]=X},"getSigningKey"),RR=P(()=>{t1.length=0,Object.keys(N0).forEach(($)=>{delete N0[$]})},"clearCredentialCache"),EL=P(($,U,G)=>{const W=new $(U);return W.update(QR.toUint8Array(G)),W.digest()},"hmac"),xU=P(({headers:$},U,G)=>{const W={};for(let w of Object.keys($).sort()){if($[w]==null)continue;const L=w.toLowerCase();if(L in wR||(U==null?void 0:U.has(L))||LR.test(L)||ZR.test(L)){if(!G||G&&!G.has(L))continue}W[L]=$[w].trim().replace(/\s+/g," ")}return W},"getCanonicalHeaders"),i0=c$(),CL=P(({query:$={}})=>{const U=[],G={};for(let W of Object.keys($).sort()){if(W.toLowerCase()===GR)continue;U.push(W);const w=$[W];if(typeof w==="string")G[W]=`${i0.escapeUri(W)}=${i0.escapeUri(w)}`;else if(Array.isArray(w))G[W]=w.slice(0).reduce((L,Z)=>L.concat([`${i0.escapeUri(W)}=${i0.escapeUri(Z)}`]),[]).sort().join("&")}return U.map((W)=>G[W]).filter((W)=>W).join("&")},"getCanonicalQuery"),ER=b$(),IR=e(),$$=P(async({headers:$,body:U},G)=>{for(let W of Object.keys($))if(W.toLowerCase()===hU)return $[W];if(U==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof U==="string"||ArrayBuffer.isView(U)||ER.isArrayBuffer(U)){const W=new G;return W.update(IR.toUint8Array(U)),W0.toHex(await W.digest())}return YR},"getPayloadHash"),IL=e(),fL=class ${format(U){const G=[];for(let L of Object.keys(U)){const Z=IL.fromUtf8(L);G.push(Uint8Array.from([Z.byteLength]),Z,this.formatHeaderValue(U[L]))}const W=new Uint8Array(G.reduce((L,Z)=>L+Z.byteLength,0));let w=0;for(let L of G)W.set(L,w),w+=L.byteLength;return W}formatHeaderValue(U){switch(U.type){case"boolean":return Uint8Array.from([U.value?0:1]);case"byte":return Uint8Array.from([2,U.value]);case"short":const G=new DataView(new ArrayBuffer(3));return G.setUint8(0,3),G.setInt16(1,U.value,!1),new Uint8Array(G.buffer);case"integer":const W=new DataView(new ArrayBuffer(5));return W.setUint8(0,4),W.setInt32(1,U.value,!1),new Uint8Array(W.buffer);case"long":const w=new Uint8Array(9);return w[0]=5,w.set(U.value.bytes,1),w;case"binary":const L=new DataView(new ArrayBuffer(3+U.value.byteLength));L.setUint8(0,6),L.setUint16(1,U.value.byteLength,!1);const Z=new Uint8Array(L.buffer);return Z.set(U.value,3),Z;case"string":const X=IL.fromUtf8(U.value),Y=new DataView(new ArrayBuffer(3+X.byteLength));Y.setUint8(0,7),Y.setUint16(1,X.byteLength,!1);const z=new Uint8Array(Y.buffer);return z.set(X,3),z;case"timestamp":const F=new Uint8Array(9);return F[0]=8,F.set(KR.fromNumber(U.value.valueOf()).bytes,1),F;case"uuid":if(!JR.test(U.value))throw new Error(`Invalid UUID received: ${U.value}`);const Q=new Uint8Array(17);return Q[0]=9,Q.set(W0.fromHex(U.value.replace(/\-/g,"")),1),Q}}};P(fL,"HeaderFormatter");var MR=fL,JR=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,qL=class ${constructor(U){if(this.bytes=U,U.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(U){if(U>9223372036854776000||U<-9223372036854776000)throw new Error(`${U} is too large (or, if negative, too small) to represent as an Int64`);const G=new Uint8Array(8);for(let W=7,w=Math.abs(Math.round(U));W>-1&&w>0;W--,w/=256)G[W]=w;if(U<0)vU(G);return new $(G)}valueOf(){const U=this.bytes.slice(0),G=U[0]&128;if(G)vU(U);return parseInt(W0.toHex(U),16)*(G?-1:1)}toString(){return String(this.valueOf())}};P(qL,"Int64");var KR=qL;P(vU,"negate");var VR=P(($,U)=>{$=$.toLowerCase();for(let G of Object.keys(U))if($===G.toLowerCase())return!0;return!1},"hasHeader"),NL=n(),jL=P(($,U={})=>{var G;const{headers:W,query:w={}}=NL.HttpRequest.clone($);for(let L of Object.keys(W)){const Z=L.toLowerCase();if(Z.slice(0,6)==="x-amz-"&&!((G=U.unhoistableHeaders)==null?void 0:G.has(Z)))w[L]=W[L],delete W[L]}return{...$,headers:W,query:w}},"moveHeadersToQuery"),cU=P(($)=>{$=NL.HttpRequest.clone($);for(let U of Object.keys($.headers))if(UR.indexOf(U.toLowerCase())>-1)delete $.headers[U];return $},"prepareRequest"),BR=P(($)=>AR($).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),AR=P(($)=>{if(typeof $==="number")return new Date($*1000);if(typeof $==="string"){if(Number($))return new Date(Number($)*1000);return new Date($)}return $},"toDate"),PL=class ${constructor({applyChecksum:U,credentials:G,region:W,service:w,sha256:L,uriEscapePath:Z=!0}){this.headerFormatter=new MR,this.service=w,this.sha256=L,this.uriEscapePath=Z,this.applyChecksum=typeof U==="boolean"?U:!0,this.regionProvider=RL.normalizeProvider(W),this.credentialProvider=RL.normalizeProvider(G)}async presign(U,G={}){const{signingDate:W=new Date,expiresIn:w=3600,unsignableHeaders:L,unhoistableHeaders:Z,signableHeaders:X,signingRegion:Y,signingService:z}=G,F=await this.credentialProvider();this.validateResolvedCredentials(F);const Q=Y??await this.regionProvider(),{longDate:R,shortDate:M}=a1(W);if(w>FR)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const J=e1(M,Q,z??this.service),V=jL(cU(U),{unhoistableHeaders:Z});if(F.sessionToken)V.query[BL]=F.sessionToken;V.query[o7]=DU,V.query[a7]=`${F.accessKeyId}/${J}`,V.query[KL]=R,V.query[e7]=w.toString(10);const B=xU(V,L,X);return V.query[t7]=ML(B),V.query[VL]=await this.getSignature(R,J,this.getSigningKey(F,Q,M,z),this.createCanonicalRequest(V,B,await $$(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:w,signingRegion:L,signingService:Z}){const X=L??await this.regionProvider(),{shortDate:Y,longDate:z}=a1(W),F=e1(Y,X,Z??this.service),Q=await $$({headers:{},body:G},this.sha256),R=new this.sha256;R.update(U);const M=W0.toHex(await R.digest()),J=[XR,z,F,w,M,Q].join("\n");return this.signString(J,{signingDate:W,signingRegion:X,signingService:Z})}async signMessage(U,{signingDate:G=new Date,signingRegion:W,signingService:w}){return this.signEvent({headers:this.headerFormatter.format(U.message.headers),payload:U.message.body},{signingDate:G,signingRegion:W,signingService:w,priorSignature:U.priorSignature}).then((Z)=>{return{message:U.message,signature:Z}})}async signString(U,{signingDate:G=new Date,signingRegion:W,signingService:w}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const Z=W??await this.regionProvider(),{shortDate:X}=a1(G),Y=new this.sha256(await this.getSigningKey(L,Z,X,w));return Y.update(kU.toUint8Array(U)),W0.toHex(await Y.digest())}async signRequest(U,{signingDate:G=new Date,signableHeaders:W,unsignableHeaders:w,signingRegion:L,signingService:Z}={}){const X=await this.credentialProvider();this.validateResolvedCredentials(X);const Y=L??await this.regionProvider(),z=cU(U),{longDate:F,shortDate:Q}=a1(G),R=e1(Q,Y,Z??this.service);if(z.headers[TL]=F,X.sessionToken)z.headers[WR]=X.sessionToken;const M=await $$(z,this.sha256);if(!VR(hU,z.headers)&&this.applyChecksum)z.headers[hU]=M;const J=xU(z,w,W),V=await this.getSignature(F,R,this.getSigningKey(X,Y,Q,Z),this.createCanonicalRequest(z,J,M));return z.headers[AL]=`${DU} Credential=${X.accessKeyId}/${R}, SignedHeaders=${ML(J)}, Signature=${V}`,z}createCanonicalRequest(U,G,W){const w=Object.keys(G).sort();return`${U.method}
10
+ ${this.getCanonicalPath(U)}
11
+ ${CL(U)}
12
+ ${w.map((L)=>`${L}:${G[L]}`).join("\n")}
13
+
14
+ ${w.join(";")}
15
+ ${W}`}async createStringToSign(U,G,W){const w=new this.sha256;w.update(kU.toUint8Array(W));const L=await w.digest();return`${DU}
16
+ ${U}
17
+ ${G}
18
+ ${W0.toHex(L)}`}getCanonicalPath({path:U}){if(this.uriEscapePath){const G=[];for(let L of U.split("/")){if((L==null?void 0:L.length)===0)continue;if(L===".")continue;if(L==="..")G.pop();else G.push(L)}const W=`${(U==null?void 0:U.startsWith("/"))?"/":""}${G.join("/")}${G.length>0&&(U==null?void 0:U.endsWith("/"))?"/":""}`;return i0.escapeUri(W).replace(/%2F/g,"/")}return U}async getSignature(U,G,W,w){const L=await this.createStringToSign(U,G,w),Z=new this.sha256(await W);return Z.update(kU.toUint8Array(L)),W0.toHex(await Z.digest())}getSigningKey(U,G,W,w){return OL(this.sha256,U,W,G,w||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")}};P(PL,"SignatureV4");var TR=PL,a1=P(($)=>{const U=BR($).replace(/[\-:]/g,"");return{longDate:U,shortDate:U.slice(0,8)}},"formatDate"),ML=P(($)=>Object.keys($).sort().join(";"),"getCanonicalHeaderList")});var dL=I((PT,_L)=>{var{defineProperty:G$,getOwnPropertyDescriptor:HR,getOwnPropertyNames:OR}=Object,CR=Object.prototype.hasOwnProperty,D=($,U)=>G$($,"name",{value:U,configurable:!0}),fR=($,U)=>{for(var G in U)G$($,G,{get:U[G],enumerable:!0})},qR=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of OR(U))if(!CR.call($,w)&&w!==G)G$($,w,{get:()=>U[w],enumerable:!(W=HR(U,w))||W.enumerable})}return $},NR=($)=>qR(G$({},"__esModule",{value:!0}),$),vL={};fR(vL,{AWSSDKSigV4Signer:()=>bR,AwsSdkSigV4ASigner:()=>DR,AwsSdkSigV4Signer:()=>_U,NODE_SIGV4A_CONFIG_OPTIONS:()=>vR,resolveAWSSDKSigV4Config:()=>cR,resolveAwsSdkSigV4AConfig:()=>xR,resolveAwsSdkSigV4Config:()=>uL,validateSigningProperties:()=>uU});_L.exports=NR(vL);var jR=n(),PR=n(),kL=D(($)=>{var U,G;return PR.HttpResponse.isInstance($)?((U=$.headers)==null?void 0:U.date)??((G=$.headers)==null?void 0:G.Date):void 0},"getDateHeader"),yU=D(($)=>new Date(Date.now()+$),"getSkewCorrectedDate"),SR=D(($,U)=>Math.abs(yU(U).getTime()-$)>=300000,"isClockSkewed"),DL=D(($,U)=>{const G=Date.parse($);if(SR(G,U))return G-Date.now();return U},"getUpdatedSystemClockOffset"),r0=D(($,U)=>{if(!U)throw new Error(`Property \`${$}\` is not resolved for AWS SDK SigV4Auth`);return U},"throwSigningPropertyError"),uU=D(async($)=>{var U,G,W;const w=r0("context",$.context),L=r0("config",$.config),Z=(W=(G=(U=w.endpointV2)==null?void 0:U.properties)==null?void 0:G.authSchemes)==null?void 0:W[0],Y=await r0("signer",L.signer)(Z),z=$==null?void 0:$.signingRegion,F=$==null?void 0:$.signingRegionSet,Q=$==null?void 0:$.signingName;return{config:L,signer:Y,signingRegion:z,signingRegionSet:F,signingName:Q}},"validateSigningProperties"),cL=class ${async sign(U,G,W){var w;if(!jR.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const L=await uU(W),{config:Z,signer:X}=L;let{signingRegion:Y,signingName:z}=L;const F=W.context;if(((w=F==null?void 0:F.authSchemes)==null?void 0:w.length)??0>1){const[R,M]=F.authSchemes;if((R==null?void 0:R.name)==="sigv4a"&&(M==null?void 0:M.name)==="sigv4")Y=(M==null?void 0:M.signingRegion)??Y,z=(M==null?void 0:M.signingName)??z}return await X.sign(U,{signingDate:yU(Z.systemClockOffset),signingRegion:Y,signingService:z})}errorHandler(U){return(G)=>{const W=G.ServerTime??kL(G.$response);if(W){const w=r0("config",U.config),L=w.systemClockOffset;if(w.systemClockOffset=DL(W,w.systemClockOffset),w.systemClockOffset!==L&&G.$metadata)G.$metadata.clockSkewCorrected=!0}throw G}}successHandler(U,G){const W=kL(U);if(W){const w=r0("config",G.config);w.systemClockOffset=DL(W,w.systemClockOffset)}}};D(cL,"AwsSdkSigV4Signer");var _U=cL,bR=_U,kR=n(),yL=class $ extends _U{async sign(U,G,W){var w;if(!kR.HttpRequest.isInstance(U))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:L,signer:Z,signingRegion:X,signingRegionSet:Y,signingName:z}=await uU(W),Q=(await((w=L.sigv4aSigningRegionSet)==null?void 0:w.call(L))??Y??[X]).join(",");return await Z.sign(U,{signingDate:yU(L.systemClockOffset),signingRegion:Q,signingService:z})}};D(yL,"AwsSdkSigV4ASigner");var DR=yL,hR=FU(),hL=Z$(),xR=D(($)=>{return $.sigv4aSigningRegionSet=hR.normalizeProvider($.sigv4aSigningRegionSet),$},"resolveAwsSdkSigV4AConfig"),vR={environmentVariableSelector($){if($.AWS_SIGV4A_SIGNING_REGION_SET)return $.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((U)=>U.trim());throw new hL.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 hL.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},E0=FU(),xL=bL(),uL=D(($)=>{let U;if($.credentials)U=E0.memoizeIdentityProvider($.credentials,E0.isIdentityExpired,E0.doesIdentityRequireRefresh);if(!U)if($.credentialDefaultProvider)U=E0.normalizeProvider($.credentialDefaultProvider(Object.assign({},$,{parentClientConfig:$})));else U=D(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:G=!0,systemClockOffset:W=$.systemClockOffset||0,sha256:w}=$;let L;if($.signer)L=E0.normalizeProvider($.signer);else if($.regionInfoProvider)L=D(()=>E0.normalizeProvider($.region)().then(async(Z)=>[await $.regionInfoProvider(Z,{useFipsEndpoint:await $.useFipsEndpoint(),useDualstackEndpoint:await $.useDualstackEndpoint()})||{},Z]).then(([Z,X])=>{const{signingRegion:Y,signingService:z}=Z;$.signingRegion=$.signingRegion||Y||X,$.signingName=$.signingName||z||$.serviceId;const F={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:w,uriEscapePath:G};return new($.signerConstructor||xL.SignatureV4)(F)}),"signer");else L=D(async(Z)=>{Z=Object.assign({},{name:"sigv4",signingName:$.signingName||$.defaultSigningName,signingRegion:await E0.normalizeProvider($.region)(),properties:{}},Z);const{signingRegion:X,signingName:Y}=Z;$.signingRegion=$.signingRegion||X,$.signingName=$.signingName||Y||$.serviceId;const z={...$,credentials:U,region:$.signingRegion,service:$.signingName,sha256:w,uriEscapePath:G};return new($.signerConstructor||xL.SignatureV4)(z)},"signer");return{...$,systemClockOffset:W,signingEscapePath:G,credentials:U,signer:L}},"resolveAwsSdkSigV4Config"),cR=uL});var W$=I((gR)=>{var yR=":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",gL="[: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]["+yR+"]*",uR=new RegExp("^"+gL+"$"),_R=function($,U){const G=[];let W=U.exec($);while(W){const w=[];w.startIndex=U.lastIndex-W[0].length;const L=W.length;for(let Z=0;Z<L;Z++)w.push(W[Z]);G.push(w),W=U.exec($)}return G},dR=function($){const U=uR.exec($);return!(U===null||typeof U==="undefined")};gR.isExist=function($){return typeof $!=="undefined"};gR.isEmptyObject=function($){return Object.keys($).length===0};gR.merge=function($,U,G){if(U){const W=Object.keys(U),w=W.length;for(let L=0;L<w;L++)if(G==="strict")$[W[L]]=[U[W[L]]];else $[W[L]]=U[W[L]]}};gR.getValue=function($){if(gR.isExist($))return $;else return""};gR.isName=dR;gR.getAllMatches=_R;gR.nameRegexp=gL});var gU=I((wE)=>{var lL=function($){return $===" "||$==="\t"||$==="\n"||$==="\r"},sL=function($,U){const G=U;for(;U<$.length;U++)if($[U]=="?"||$[U]==" "){const W=$.substr(G,U-G);if(U>5&&W==="xml")return N("InvalidXml","XML declaration allowed only at the start of the document.",b($,U));else if($[U]=="?"&&$[U+1]==">"){U++;break}else continue}return U},mL=function($,U){if($.length>U+5&&$[U+1]==="-"&&$[U+2]==="-"){for(U+=3;U<$.length;U++)if($[U]==="-"&&$[U+1]==="-"&&$[U+2]===">"){U+=2;break}}else if($.length>U+8&&$[U+1]==="D"&&$[U+2]==="O"&&$[U+3]==="C"&&$[U+4]==="T"&&$[U+5]==="Y"&&$[U+6]==="P"&&$[U+7]==="E"){let G=1;for(U+=8;U<$.length;U++)if($[U]==="<")G++;else if($[U]===">"){if(G--,G===0)break}}else if($.length>U+9&&$[U+1]==="["&&$[U+2]==="C"&&$[U+3]==="D"&&$[U+4]==="A"&&$[U+5]==="T"&&$[U+6]==="A"&&$[U+7]==="["){for(U+=8;U<$.length;U++)if($[U]==="]"&&$[U+1]==="]"&&$[U+2]===">"){U+=2;break}}return U},tR=function($,U){let G="",W="",w=!1;for(;U<$.length;U++){if($[U]===oR||$[U]===aR)if(W==="")W=$[U];else if(W!==$[U]);else W="";else if($[U]===">"){if(W===""){w=!0;break}}G+=$[U]}if(W!=="")return!1;return{value:G,index:U,tagClosed:w}},nL=function($,U){const G=dU.getAllMatches($,eR),W={};for(let w=0;w<G.length;w++){if(G[w][1].length===0)return N("InvalidAttr","Attribute '"+G[w][2]+"' has no space in starting.",o0(G[w]));else if(G[w][3]!==void 0&&G[w][4]===void 0)return N("InvalidAttr","Attribute '"+G[w][2]+"' is without value.",o0(G[w]));else if(G[w][3]===void 0&&!U.allowBooleanAttributes)return N("InvalidAttr","boolean attribute '"+G[w][2]+"' is not allowed.",o0(G[w]));const L=G[w][2];if(!GE(L))return N("InvalidAttr","Attribute '"+L+"' is an invalid name.",o0(G[w]));if(!W.hasOwnProperty(L))W[L]=1;else return N("InvalidAttr","Attribute '"+L+"' is repeated.",o0(G[w]))}return!0},$E=function($,U){let G=/\d/;if($[U]==="x")U++,G=/[\da-fA-F]/;for(;U<$.length;U++){if($[U]===";")return U;if(!$[U].match(G))break}return-1},UE=function($,U){if(U++,$[U]===";")return-1;if($[U]==="#")return U++,$E($,U);let G=0;for(;U<$.length;U++,G++){if($[U].match(/\w/)&&G<20)continue;if($[U]===";")break;return-1}return U},N=function($,U,G){return{err:{code:$,msg:U,line:G.line||G,col:G.col}}},GE=function($){return dU.isName($)},WE=function($){return dU.isName($)},b=function($,U){const G=$.substring(0,U).split(/\r?\n/);return{line:G.length,col:G[G.length-1].length+1}},o0=function($){return $.startIndex+$[1].length},dU=W$(),rR={allowBooleanAttributes:!1,unpairedTags:[]};wE.validate=function($,U){U=Object.assign({},rR,U);const G=[];let W=!1,w=!1;if($[0]==="\uFEFF")$=$.substr(1);for(let L=0;L<$.length;L++)if($[L]==="<"&&$[L+1]==="?"){if(L+=2,L=sL($,L),L.err)return L}else if($[L]==="<"){let Z=L;if(L++,$[L]==="!"){L=mL($,L);continue}else{let X=!1;if($[L]==="/")X=!0,L++;let Y="";for(;L<$.length&&$[L]!==">"&&$[L]!==" "&&$[L]!=="\t"&&$[L]!=="\n"&&$[L]!=="\r";L++)Y+=$[L];if(Y=Y.trim(),Y[Y.length-1]==="/")Y=Y.substring(0,Y.length-1),L--;if(!WE(Y)){let Q;if(Y.trim().length===0)Q="Invalid space after '<'.";else Q="Tag '"+Y+"' is an invalid name.";return N("InvalidTag",Q,b($,L))}const z=tR($,L);if(z===!1)return N("InvalidAttr","Attributes for '"+Y+"' have open quote.",b($,L));let F=z.value;if(L=z.index,F[F.length-1]==="/"){const Q=L-F.length;F=F.substring(0,F.length-1);const R=nL(F,U);if(R===!0)W=!0;else return N(R.err.code,R.err.msg,b($,Q+R.err.line))}else if(X)if(!z.tagClosed)return N("InvalidTag","Closing tag '"+Y+"' doesn't have proper closing.",b($,L));else if(F.trim().length>0)return N("InvalidTag","Closing tag '"+Y+"' can't have attributes or invalid starting.",b($,Z));else if(G.length===0)return N("InvalidTag","Closing tag '"+Y+"' has not been opened.",b($,Z));else{const Q=G.pop();if(Y!==Q.tagName){let R=b($,Q.tagStartPos);return N("InvalidTag","Expected closing tag '"+Q.tagName+"' (opened in line "+R.line+", col "+R.col+") instead of closing tag '"+Y+"'.",b($,Z))}if(G.length==0)w=!0}else{const Q=nL(F,U);if(Q!==!0)return N(Q.err.code,Q.err.msg,b($,L-F.length+Q.err.line));if(w===!0)return N("InvalidXml","Multiple possible root nodes found.",b($,L));else if(U.unpairedTags.indexOf(Y)!==-1);else G.push({tagName:Y,tagStartPos:Z});W=!0}for(L++;L<$.length;L++)if($[L]==="<")if($[L+1]==="!"){L++,L=mL($,L);continue}else if($[L+1]==="?"){if(L=sL($,++L),L.err)return L}else break;else if($[L]==="&"){const Q=UE($,L);if(Q==-1)return N("InvalidChar","char '&' is not expected.",b($,L));L=Q}else if(w===!0&&!lL($[L]))return N("InvalidXml","Extra text at the end",b($,L));if($[L]==="<")L--}}else{if(lL($[L]))continue;return N("InvalidChar","char '"+$[L]+"' is not expected.",b($,L))}if(!W)return N("InvalidXml","Start tag expected.",1);else if(G.length==1)return N("InvalidTag","Unclosed tag '"+G[0].tagName+"'.",b($,G[0].tagStartPos));else if(G.length>0)return N("InvalidXml","Invalid '"+JSON.stringify(G.map((L)=>L.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var oR='"',aR="'",eR=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var rL=I((XE)=>{var iL={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 $}},ZE=function($){return Object.assign({},iL,$)};XE.buildOptions=ZE;XE.defaultOptions=iL});var tL=I((DT,aL)=>{class oL{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})}}aL.exports=oL});var $Z=I((hT,eL)=>{var QE=function($,U){const G={};if($[U+3]==="O"&&$[U+4]==="C"&&$[U+5]==="T"&&$[U+6]==="Y"&&$[U+7]==="P"&&$[U+8]==="E"){U=U+9;let W=1,w=!1,L=!1,Z="";for(;U<$.length;U++)if($[U]==="<"&&!L){if(w&&IE($,U)){if(U+=7,[entityName,val,U]=RE($,U+1),val.indexOf("&")===-1)G[VE(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(w&&ME($,U))U+=8;else if(w&&JE($,U))U+=8;else if(w&&KE($,U))U+=9;else if(EE)L=!0;else throw new Error("Invalid DOCTYPE");W++,Z=""}else if($[U]===">"){if(L){if($[U-1]==="-"&&$[U-2]==="-")L=!1,W--}else W--;if(W===0)break}else if($[U]==="[")w=!0;else Z+=$[U];if(W!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:G,i:U}},RE=function($,U){let G="";for(;U<$.length&&($[U]!=="'"&&$[U]!=='"');U++)G+=$[U];if(G=G.trim(),G.indexOf(" ")!==-1)throw new Error("External entites are not supported");const W=$[U++];let w="";for(;U<$.length&&$[U]!==W;U++)w+=$[U];return[G,w,U]},EE=function($,U){if($[U+1]==="!"&&$[U+2]==="-"&&$[U+3]==="-")return!0;return!1},IE=function($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="N"&&$[U+4]==="T"&&$[U+5]==="I"&&$[U+6]==="T"&&$[U+7]==="Y")return!0;return!1},ME=function($,U){if($[U+1]==="!"&&$[U+2]==="E"&&$[U+3]==="L"&&$[U+4]==="E"&&$[U+5]==="M"&&$[U+6]==="E"&&$[U+7]==="N"&&$[U+8]==="T")return!0;return!1},JE=function($,U){if($[U+1]==="!"&&$[U+2]==="A"&&$[U+3]==="T"&&$[U+4]==="T"&&$[U+5]==="L"&&$[U+6]==="I"&&$[U+7]==="S"&&$[U+8]==="T")return!0;return!1},KE=function($,U){if($[U+1]==="!"&&$[U+2]==="N"&&$[U+3]==="O"&&$[U+4]==="T"&&$[U+5]==="A"&&$[U+6]==="T"&&$[U+7]==="I"&&$[U+8]==="O"&&$[U+9]==="N")return!0;return!1},VE=function($){if(FE.isName($))return $;else throw new Error(`Invalid entity name ${$}`)},FE=W$();eL.exports=QE});var GZ=I((xT,UZ)=>{var HE=function($,U={}){if(U=Object.assign({},TE,U),!$||typeof $!=="string")return $;let G=$.trim();if(U.skipLike!==void 0&&U.skipLike.test(G))return $;else if(U.hex&&BE.test(G))return Number.parseInt(G,16);else{const W=AE.exec(G);if(W){const w=W[1],L=W[2];let Z=OE(W[3]);const X=W[4]||W[6];if(!U.leadingZeros&&L.length>0&&w&&G[2]!==".")return $;else if(!U.leadingZeros&&L.length>0&&!w&&G[1]!==".")return $;else{const Y=Number(G),z=""+Y;if(z.search(/[eE]/)!==-1)if(U.eNotation)return Y;else return $;else if(X)if(U.eNotation)return Y;else return $;else if(G.indexOf(".")!==-1)if(z==="0"&&Z==="")return Y;else if(z===Z)return Y;else if(w&&z==="-"+Z)return Y;else return $;if(L)if(Z===z)return Y;else if(w+Z===z)return Y;else return $;if(G===z)return Y;else if(G===w+z)return Y;return $}}else return $}},OE=function($){if($&&$.indexOf(".")!==-1){if($=$.replace(/0+$/,""),$===".")$="0";else if($[0]===".")$="0"+$;else if($[$.length-1]===".")$=$.substr(0,$.length-1);return $}return $},BE=/^[-+]?0x[a-fA-F0-9]+$/,AE=/^([\-\+])?(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 TE={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};UZ.exports=HE});var ZZ=I((vT,LZ)=>{var qE=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];this.lastEntities[W]={regex:new RegExp("&"+W+";","g"),val:$[W]}}},NE=function($,U,G,W,w,L,Z){if($!==void 0){if(this.options.trimValues&&!W)$=$.trim();if($.length>0){if(!Z)$=this.replaceEntitiesValue($);const X=this.options.tagValueProcessor(U,$,G,w,L);if(X===null||X===void 0)return $;else if(typeof X!==typeof $||X!==$)return X;else if(this.options.trimValues)return lU($,this.options.parseTagValue,this.options.numberParseOptions);else if($.trim()===$)return lU($,this.options.parseTagValue,this.options.numberParseOptions);else return $}}},jE=function($){if(this.options.removeNSPrefix){const U=$.split(":"),G=$.charAt(0)==="/"?"/":"";if(U[0]==="xmlns")return"";if(U.length===2)$=G+U[1]}return $},SE=function($,U,G){if(!this.options.ignoreAttributes&&typeof $==="string"){const W=WZ.getAllMatches($,PE),w=W.length,L={};for(let Z=0;Z<w;Z++){const X=this.resolveNameSpace(W[Z][1]);let Y=W[Z][4],z=this.options.attributeNamePrefix+X;if(X.length){if(this.options.transformAttributeName)z=this.options.transformAttributeName(z);if(z==="__proto__")z="#__proto__";if(Y!==void 0){if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y);const F=this.options.attributeValueProcessor(X,Y,U);if(F===null||F===void 0)L[z]=Y;else if(typeof F!==typeof Y||F!==Y)L[z]=F;else L[z]=lU(Y,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)L[z]=!0}}if(!Object.keys(L).length)return;if(this.options.attributesGroupName){const Z={};return Z[this.options.attributesGroupName]=L,Z}return L}},kE=function($,U,G){const W=this.options.updateTag(U.tagname,G,U[":@"]);if(W===!1);else if(typeof W==="string")U.tagname=W,$.addChild(U);else $.addChild(U)},hE=function($,U,G,W){if($){if(W===void 0)W=Object.keys(U.child).length===0;if($=this.parseTextData($,U.tagname,G,!1,U[":@"]?Object.keys(U[":@"]).length!==0:!1,W),$!==void 0&&$!=="")U.add(this.options.textNodeName,$);$=""}return $},xE=function($,U,G){const W="*."+G;for(let w in $){const L=$[w];if(W===L||U===L)return!0}return!1},vE=function($,U,G=">"){let W,w="";for(let L=U;L<$.length;L++){let Z=$[L];if(W){if(Z===W)W=""}else if(Z==='"'||Z==="'")W=Z;else if(Z===G[0])if(G[1]){if($[L+1]===G[1])return{data:w,index:L}}else return{data:w,index:L};else if(Z==="\t")Z=" ";w+=Z}},I0=function($,U,G,W){const w=$.indexOf(U,G);if(w===-1)throw new Error(W);else return w+U.length-1},pU=function($,U,G,W=">"){const w=vE($,U+1,W);if(!w)return;let L=w.data;const Z=w.index,X=L.search(/\s/);let Y=L,z=!0;if(X!==-1)Y=L.substring(0,X),L=L.substring(X+1).trimStart();const F=Y;if(G){const Q=Y.indexOf(":");if(Q!==-1)Y=Y.substr(Q+1),z=Y!==w.data.substr(Q+1)}return{tagName:Y,tagExp:L,closeIndex:Z,attrExpPresent:z,rawTagName:F}},cE=function($,U,G){const W=G;let w=1;for(;G<$.length;G++)if($[G]==="<")if($[G+1]==="/"){const L=I0($,">",G,`${U} is not closed`);if($.substring(G+2,L).trim()===U){if(w--,w===0)return{tagContent:$.substring(W,G),i:L}}G=L}else if($[G+1]==="?")G=I0($,"?>",G+1,"StopNode is not closed.");else if($.substr(G+1,3)==="!--")G=I0($,"-->",G+3,"StopNode is not closed.");else if($.substr(G+1,2)==="![")G=I0($,"]]>",G,"StopNode is not closed.")-2;else{const L=pU($,G,">");if(L){if((L&&L.tagName)===U&&L.tagExp[L.tagExp.length-1]!=="/")w++;G=L.closeIndex}}},lU=function($,U,G){if(U&&typeof $==="string"){const W=$.trim();if(W==="true")return!0;else if(W==="false")return!1;else return fE($,G)}else if(WZ.isExist($))return $;else return""},WZ=W$(),a0=tL(),CE=$Z(),fE=GZ();class wZ{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=qE,this.parseXml=bE,this.parseTextData=NE,this.resolveNameSpace=jE,this.buildAttributesMap=SE,this.isItStopNode=xE,this.replaceEntitiesValue=DE,this.readStopNodeData=cE,this.saveTextToParentTag=hE,this.addChild=kE}}var PE=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),bE=function($){$=$.replace(/\r\n?/g,"\n");const U=new a0("!xml");let G=U,W="",w="";for(let L=0;L<$.length;L++)if($[L]==="<")if($[L+1]==="/"){const X=I0($,">",L,"Closing Tag is not closed.");let Y=$.substring(L+2,X).trim();if(this.options.removeNSPrefix){const Q=Y.indexOf(":");if(Q!==-1)Y=Y.substr(Q+1)}if(this.options.transformTagName)Y=this.options.transformTagName(Y);if(G)W=this.saveTextToParentTag(W,G,w);const z=w.substring(w.lastIndexOf(".")+1);if(Y&&this.options.unpairedTags.indexOf(Y)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${Y}>`);let F=0;if(z&&this.options.unpairedTags.indexOf(z)!==-1)F=w.lastIndexOf(".",w.lastIndexOf(".")-1),this.tagsNodeStack.pop();else F=w.lastIndexOf(".");w=w.substring(0,F),G=this.tagsNodeStack.pop(),W="",L=X}else if($[L+1]==="?"){let X=pU($,L,!1,"?>");if(!X)throw new Error("Pi Tag is not closed.");if(W=this.saveTextToParentTag(W,G,w),this.options.ignoreDeclaration&&X.tagName==="?xml"||this.options.ignorePiTags);else{const Y=new a0(X.tagName);if(Y.add(this.options.textNodeName,""),X.tagName!==X.tagExp&&X.attrExpPresent)Y[":@"]=this.buildAttributesMap(X.tagExp,w,X.tagName);this.addChild(G,Y,w)}L=X.closeIndex+1}else if($.substr(L+1,3)==="!--"){const X=I0($,"-->",L+4,"Comment is not closed.");if(this.options.commentPropName){const Y=$.substring(L+4,X-2);W=this.saveTextToParentTag(W,G,w),G.add(this.options.commentPropName,[{[this.options.textNodeName]:Y}])}L=X}else if($.substr(L+1,2)==="!D"){const X=CE($,L);this.docTypeEntities=X.entities,L=X.i}else if($.substr(L+1,2)==="!["){const X=I0($,"]]>",L,"CDATA is not closed.")-2,Y=$.substring(L+9,X);W=this.saveTextToParentTag(W,G,w);let z=this.parseTextData(Y,G.tagname,w,!0,!1,!0,!0);if(z==null)z="";if(this.options.cdataPropName)G.add(this.options.cdataPropName,[{[this.options.textNodeName]:Y}]);else G.add(this.options.textNodeName,z);L=X+2}else{let X=pU($,L,this.options.removeNSPrefix),Y=X.tagName;const z=X.rawTagName;let{tagExp:F,attrExpPresent:Q,closeIndex:R}=X;if(this.options.transformTagName)Y=this.options.transformTagName(Y);if(G&&W){if(G.tagname!=="!xml")W=this.saveTextToParentTag(W,G,w,!1)}const M=G;if(M&&this.options.unpairedTags.indexOf(M.tagname)!==-1)G=this.tagsNodeStack.pop(),w=w.substring(0,w.lastIndexOf("."));if(Y!==U.tagname)w+=w?"."+Y:Y;if(this.isItStopNode(this.options.stopNodes,w,Y)){let J="";if(F.length>0&&F.lastIndexOf("/")===F.length-1){if(Y[Y.length-1]==="/")Y=Y.substr(0,Y.length-1),w=w.substr(0,w.length-1),F=Y;else F=F.substr(0,F.length-1);L=X.closeIndex}else if(this.options.unpairedTags.indexOf(Y)!==-1)L=X.closeIndex;else{const B=this.readStopNodeData($,z,R+1);if(!B)throw new Error(`Unexpected end of ${z}`);L=B.i,J=B.tagContent}const V=new a0(Y);if(Y!==F&&Q)V[":@"]=this.buildAttributesMap(F,w,Y);if(J)J=this.parseTextData(J,Y,w,!0,Q,!0,!0);w=w.substr(0,w.lastIndexOf(".")),V.add(this.options.textNodeName,J),this.addChild(G,V,w)}else{if(F.length>0&&F.lastIndexOf("/")===F.length-1){if(Y[Y.length-1]==="/")Y=Y.substr(0,Y.length-1),w=w.substr(0,w.length-1),F=Y;else F=F.substr(0,F.length-1);if(this.options.transformTagName)Y=this.options.transformTagName(Y);const J=new a0(Y);if(Y!==F&&Q)J[":@"]=this.buildAttributesMap(F,w,Y);this.addChild(G,J,w),w=w.substr(0,w.lastIndexOf("."))}else{const J=new a0(Y);if(this.tagsNodeStack.push(G),Y!==F&&Q)J[":@"]=this.buildAttributesMap(F,w,Y);this.addChild(G,J,w),G=J}W="",L=R}}else W+=$[L];return U.child},DE=function($){if(this.options.processEntities){for(let U in this.docTypeEntities){const G=this.docTypeEntities[U];$=$.replace(G.regx,G.val)}for(let U in this.lastEntities){const G=this.lastEntities[U];$=$.replace(G.regex,G.val)}if(this.options.htmlEntities)for(let U in this.htmlEntities){const G=this.htmlEntities[U];$=$.replace(G.regex,G.val)}$=$.replace(this.ampEntity.regex,this.ampEntity.val)}return $};LZ.exports=wZ});var YZ=I((gE)=>{var yE=function($,U){return XZ($,U)},XZ=function($,U,G){let W;const w={};for(let L=0;L<$.length;L++){const Z=$[L],X=uE(Z);let Y="";if(G===void 0)Y=X;else Y=G+"."+X;if(X===U.textNodeName)if(W===void 0)W=Z[X];else W+=""+Z[X];else if(X===void 0)continue;else if(Z[X]){let z=XZ(Z[X],U,Y);const F=dE(z,U);if(Z[":@"])_E(z,Z[":@"],Y,U);else if(Object.keys(z).length===1&&z[U.textNodeName]!==void 0&&!U.alwaysCreateTextNode)z=z[U.textNodeName];else if(Object.keys(z).length===0)if(U.alwaysCreateTextNode)z[U.textNodeName]="";else z="";if(w[X]!==void 0&&w.hasOwnProperty(X)){if(!Array.isArray(w[X]))w[X]=[w[X]];w[X].push(z)}else if(U.isArray(X,Y,F))w[X]=[z];else w[X]=z}}if(typeof W==="string"){if(W.length>0)w[U.textNodeName]=W}else if(W!==void 0)w[U.textNodeName]=W;return w},uE=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(W!==":@")return W}},_E=function($,U,G,W){if(U){const w=Object.keys(U),L=w.length;for(let Z=0;Z<L;Z++){const X=w[Z];if(W.isArray(X,G+"."+X,!0,!0))$[X]=[U[X]];else $[X]=U[X]}}},dE=function($,U){const{textNodeName:G}=U,W=Object.keys($).length;if(W===0)return!0;if(W===1&&($[G]||typeof $[G]==="boolean"||$[G]===0))return!0;return!1};gE.prettify=yE});var QZ=I((yT,FZ)=>{var{buildOptions:lE}=rL(),sE=ZZ(),{prettify:mE}=YZ(),nE=gU();class zZ{constructor($){this.externalEntities={},this.options=lE($)}parse($,U){if(typeof $==="string");else if($.toString)$=$.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(U){if(U===!0)U={};const w=nE.validate($,U);if(w!==!0)throw Error(`${w.err.msg}:${w.err.line}:${w.err.col}`)}const G=new sE(this.options);G.addExternalEntities(this.externalEntities);const W=G.parseXml($);if(this.options.preserveOrder||W===void 0)return W;else return mE(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}}FZ.exports=zZ});var JZ=I((uT,MZ)=>{var iE=function($,U){let G="";if(U.format&&U.indentBy.length>0)G="\n";return EZ($,U,"",G)},EZ=function($,U,G,W){let w="",L=!1;for(let Z=0;Z<$.length;Z++){const X=$[Z],Y=rE(X);if(Y===void 0)continue;let z="";if(G.length===0)z=Y;else z=`${G}.${Y}`;if(Y===U.textNodeName){let J=X[Y];if(!oE(z,U))J=U.tagValueProcessor(Y,J),J=IZ(J,U);if(L)w+=W;w+=J,L=!1;continue}else if(Y===U.cdataPropName){if(L)w+=W;w+=`<![CDATA[${X[Y][0][U.textNodeName]}]]>`,L=!1;continue}else if(Y===U.commentPropName){w+=W+`<!--${X[Y][0][U.textNodeName]}-->`,L=!0;continue}else if(Y[0]==="?"){const J=RZ(X[":@"],U),V=Y==="?xml"?"":W;let B=X[Y][0][U.textNodeName];B=B.length!==0?" "+B:"",w+=V+`<${Y}${B}${J}?>`,L=!0;continue}let F=W;if(F!=="")F+=U.indentBy;const Q=RZ(X[":@"],U),R=W+`<${Y}${Q}`,M=EZ(X[Y],U,z,F);if(U.unpairedTags.indexOf(Y)!==-1)if(U.suppressUnpairedNode)w+=R+">";else w+=R+"/>";else if((!M||M.length===0)&&U.suppressEmptyNode)w+=R+"/>";else if(M&&M.endsWith(">"))w+=R+`>${M}${W}</${Y}>`;else{if(w+=R+">",M&&W!==""&&(M.includes("/>")||M.includes("</")))w+=W+U.indentBy+M+W;else w+=M;w+=`</${Y}>`}L=!0}return w},rE=function($){const U=Object.keys($);for(let G=0;G<U.length;G++){const W=U[G];if(!$.hasOwnProperty(W))continue;if(W!==":@")return W}},RZ=function($,U){let G="";if($&&!U.ignoreAttributes)for(let W in $){if(!$.hasOwnProperty(W))continue;let w=U.attributeValueProcessor(W,$[W]);if(w=IZ(w,U),w===!0&&U.suppressBooleanAttributes)G+=` ${W.substr(U.attributeNamePrefix.length)}`;else G+=` ${W.substr(U.attributeNamePrefix.length)}="${w}"`}return G},oE=function($,U){$=$.substr(0,$.length-U.textNodeName.length-1);let G=$.substr($.lastIndexOf(".")+1);for(let W in U.stopNodes)if(U.stopNodes[W]===$||U.stopNodes[W]==="*."+G)return!0;return!1},IZ=function($,U){if($&&$.length>0&&U.processEntities)for(let G=0;G<U.entities.length;G++){const W=U.entities[G];$=$.replace(W.regex,W.val)}return $};MZ.exports=iE});var VZ=I((_T,KZ)=>{var w0=function($){if(this.options=Object.assign({},tE,$),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=UI;if(this.processTextOrObjNode=eE,this.options.format)this.indentate=$I,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},eE=function($,U,G){const W=this.j2x($,G+1);if($[this.options.textNodeName]!==void 0&&Object.keys($).length===1)return this.buildTextValNode($[this.options.textNodeName],U,W.attrStr,G);else return this.buildObjectNode(W.val,U,W.attrStr,G)},$I=function($){return this.options.indentBy.repeat($)},UI=function($){if($.startsWith(this.options.attributeNamePrefix)&&$!==this.options.textNodeName)return $.substr(this.attrPrefixLen);else return!1},aE=JZ(),tE={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};w0.prototype.build=function($){if(this.options.preserveOrder)return aE($,this.options);else{if(Array.isArray($)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)$={[this.options.arrayNodeName]:$};return this.j2x($,0).val}};w0.prototype.j2x=function($,U){let G="",W="";for(let w in $){if(!Object.prototype.hasOwnProperty.call($,w))continue;if(typeof $[w]==="undefined"){if(this.isAttribute(w))W+=""}else if($[w]===null)if(this.isAttribute(w))W+="";else if(w[0]==="?")W+=this.indentate(U)+"<"+w+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+w+"/"+this.tagEndChar;else if($[w]instanceof Date)W+=this.buildTextValNode($[w],w,"",U);else if(typeof $[w]!=="object"){const L=this.isAttribute(w);if(L)G+=this.buildAttrPairStr(L,""+$[w]);else if(w===this.options.textNodeName){let Z=this.options.tagValueProcessor(w,""+$[w]);W+=this.replaceEntitiesValue(Z)}else W+=this.buildTextValNode($[w],w,"",U)}else if(Array.isArray($[w])){const L=$[w].length;let Z="",X="";for(let Y=0;Y<L;Y++){const z=$[w][Y];if(typeof z==="undefined");else if(z===null)if(w[0]==="?")W+=this.indentate(U)+"<"+w+"?"+this.tagEndChar;else W+=this.indentate(U)+"<"+w+"/"+this.tagEndChar;else if(typeof z==="object")if(this.options.oneListGroup){const F=this.j2x(z,U+1);if(Z+=F.val,this.options.attributesGroupName&&z.hasOwnProperty(this.options.attributesGroupName))X+=F.attrStr}else Z+=this.processTextOrObjNode(z,w,U);else if(this.options.oneListGroup){let F=this.options.tagValueProcessor(w,z);F=this.replaceEntitiesValue(F),Z+=F}else Z+=this.buildTextValNode(z,w,"",U)}if(this.options.oneListGroup)Z=this.buildObjectNode(Z,w,X,U);W+=Z}else if(this.options.attributesGroupName&&w===this.options.attributesGroupName){const L=Object.keys($[w]),Z=L.length;for(let X=0;X<Z;X++)G+=this.buildAttrPairStr(L[X],""+$[w][L[X]])}else W+=this.processTextOrObjNode($[w],w,U)}return{attrStr:G,val:W}};w0.prototype.buildAttrPairStr=function($,U){if(U=this.options.attributeValueProcessor($,""+U),U=this.replaceEntitiesValue(U),this.options.suppressBooleanAttributes&&U==="true")return" "+$;else return" "+$+'="'+U+'"'};w0.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 w="</"+U+this.tagEndChar,L="";if(U[0]==="?")L="?",w="";if((G||G==="")&&$.indexOf("<")===-1)return this.indentate(W)+"<"+U+G+L+">"+$+w;else if(this.options.commentPropName!==!1&&U===this.options.commentPropName&&L.length===0)return this.indentate(W)+`<!--${$}-->`+this.newLine;else return this.indentate(W)+"<"+U+G+L+this.tagEndChar+$+this.indentate(W)+w}};w0.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};w0.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 w=this.options.tagValueProcessor(U,$);if(w=this.replaceEntitiesValue(w),w==="")return this.indentate(W)+"<"+U+G+this.closeTag(U)+this.tagEndChar;else return this.indentate(W)+"<"+U+G+">"+w+"</"+U+this.tagEndChar}};w0.prototype.replaceEntitiesValue=function($){if($&&$.length>0&&this.options.processEntities)for(let U=0;U<this.options.entities.length;U++){const G=this.options.entities[U];$=$.replace(G.regex,G.val)}return $};KZ.exports=w0});var AZ=I((dT,BZ)=>{var GI=gU(),WI=QZ(),wI=VZ();BZ.exports={XMLParser:WI,XMLValidator:GI,XMLBuilder:wI}});var qZ=I((gT,fZ)=>{var{defineProperty:w$,getOwnPropertyDescriptor:LI,getOwnPropertyNames:ZI}=Object,XI=Object.prototype.hasOwnProperty,h=($,U)=>w$($,"name",{value:U,configurable:!0}),YI=($,U)=>{for(var G in U)w$($,G,{get:U[G],enumerable:!0})},zI=($,U,G,W)=>{if(U&&typeof U==="object"||typeof U==="function"){for(let w of ZI(U))if(!XI.call($,w)&&w!==G)w$($,w,{get:()=>U[w],enumerable:!(W=LI(U,w))||W.enumerable})}return $},FI=($)=>zI(w$({},"__esModule",{value:!0}),$),TZ={};YI(TZ,{_toBool:()=>RI,_toNum:()=>EI,_toStr:()=>QI,awsExpectUnion:()=>MI,loadRestJsonErrorCode:()=>VI,loadRestXmlErrorCode:()=>HI,parseJsonBody:()=>OZ,parseJsonErrorBody:()=>KI,parseXmlBody:()=>CZ,parseXmlErrorBody:()=>TI});fZ.exports=FI(TZ);var QI=h(($)=>{if($==null)return $;if(typeof $==="number"||typeof $==="bigint"){const U=new Error(`Received number ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}if(typeof $==="boolean"){const U=new Error(`Received boolean ${$} where a string was expected.`);return U.name="Warning",console.warn(U),String($)}return $},"_toStr"),RI=h(($)=>{if($==null)return $;if(typeof $==="string"){const U=$.toLowerCase();if($!==""&&U!=="false"&&U!=="true"){const G=new Error(`Received string "${$}" where a boolean was expected.`);G.name="Warning",console.warn(G)}return $!==""&&U!=="false"}return $},"_toBool"),EI=h(($)=>{if($==null)return $;if(typeof $==="string"){const U=Number($);if(U.toString()!==$){const G=new Error(`Received string "${$}" where a number was expected.`);return G.name="Warning",console.warn(G),$}return U}return $},"_toNum"),II=T0(),MI=h(($)=>{if($==null)return;if(typeof $==="object"&&"__type"in $)delete $.__type;return II.expectUnion($)},"awsExpectUnion"),JI=T0(),HZ=h(($,U)=>JI.collectBody($,U).then((G)=>U.utf8Encoder(G)),"collectBodyString"),OZ=h(($,U)=>HZ($,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"),KI=h(async($,U)=>{const G=await OZ($,U);return G.message=G.message??G.Message,G},"parseJsonErrorBody"),VI=h(($,U)=>{const G=h((L,Z)=>Object.keys(L).find((X)=>X.toLowerCase()===Z.toLowerCase()),"findKey"),W=h((L)=>{let Z=L;if(typeof Z==="number")Z=Z.toString();if(Z.indexOf(",")>=0)Z=Z.split(",")[0];if(Z.indexOf(":")>=0)Z=Z.split(":")[0];if(Z.indexOf("#")>=0)Z=Z.split("#")[1];return Z},"sanitizeErrorCode"),w=G($.headers,"x-amzn-errortype");if(w!==void 0)return W($.headers[w]);if(U.code!==void 0)return W(U.code);if(U.__type!==void 0)return W(U.__type)},"loadRestJsonErrorCode"),BI=T0(),AI=AZ(),CZ=h(($,U)=>HZ($,U).then((G)=>{if(G.length){const W=new AI.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(Y,z)=>z.trim()===""&&z.includes("\n")?"":void 0});W.addEntity("#xD","\r"),W.addEntity("#10","\n");let w;try{w=W.parse(G,!0)}catch(Y){if(Y&&typeof Y==="object")Object.defineProperty(Y,"$responseBodyText",{value:G});throw Y}const L="#text",Z=Object.keys(w)[0],X=w[Z];if(X[L])X[Z]=X[L],delete X[L];return BI.getValueFromTextNode(X)}return{}}),"parseXmlBody"),TI=h(async($,U)=>{const G=await CZ($,U);if(G.Error)G.Error.message=G.Error.message??G.Error.Message;return G},"parseXmlErrorBody"),HI=h(($,U)=>{var G;if(((G=U==null?void 0:U.Error)==null?void 0:G.Code)!==void 0)return U.Error.Code;if((U==null?void 0:U.Code)!==void 0)return U.Code;if($.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var CI=I((t0)=>{Object.defineProperty(t0,"__esModule",{value:!0});var sU=OI();sU.__exportStar(QL(),t0);sU.__exportStar(dL(),t0);sU.__exportStar(qZ(),t0)});function _I($){return $}var uZ=($)=>(U)=>async(G)=>{if(!v.isInstance(G.request))return U(G);const{request:W}=G,{handlerProtocol:w=""}=$.requestHandler.metadata||{};if(w.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 L=W.hostname;if(W.port!=null)L+=`:${W.port}`;W.headers.host=L}return U(G)},_Z={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},dI=($)=>({applyToStack:(U)=>{U.add(uZ($),_Z)}});var dZ=()=>($,U)=>async(G)=>{try{const W=await $(G),{clientName:w,commandName:L,logger:Z,dynamoDbDocumentClientOptions:X={}}=U,{overrideInputFilterSensitiveLog:Y,overrideOutputFilterSensitiveLog:z}=X,F=Y??U.inputFilterSensitiveLog,Q=z??U.outputFilterSensitiveLog,{$metadata:R,...M}=W.output;return Z?.info?.({clientName:w,commandName:L,input:F(G.input),output:Q(M),metadata:R}),W}catch(W){const{clientName:w,commandName:L,logger:Z,dynamoDbDocumentClientOptions:X={}}=U,{overrideInputFilterSensitiveLog:Y}=X,z=Y??U.inputFilterSensitiveLog;throw Z?.error?.({clientName:w,commandName:L,input:z(G.input),error:W,metadata:W.$metadata}),W}},gZ={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},pI=($)=>({applyToStack:(U)=>{U.add(dZ(),gZ)}});var aU="X-Amzn-Trace-Id",pZ="AWS_LAMBDA_FUNCTION_NAME",lZ="_X_AMZN_TRACE_ID",sZ=($)=>(U)=>async(G)=>{const{request:W}=G;if(!v.isInstance(W)||$.runtime!=="node"||W.headers.hasOwnProperty(aU))return U(G);const w=process.env[pZ],L=process.env[lZ],Z=(X)=>typeof X==="string"&&X.length>0;if(Z(w)&&Z(L))W.headers[aU]=L;return U({...G,request:W})},mZ={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},iI=($)=>({applyToStack:(U)=>{U.add(sZ($),mZ)}});function $3($){return{...$,customUserAgent:typeof $.customUserAgent==="string"?[[$.customUserAgent]]:$.customUserAgent}}var W7=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}$"),l0=($)=>W7.test($)||$.startsWith("[")&&$.endsWith("]");var w7=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),s0=($,U=!1)=>{if(!U)return w7.test($);const G=$.split(".");for(let W of G)if(!s0(W))return!1;return!0};var m0={};var o="endpoints";function y($){if(typeof $!=="object"||$==null)return $;if("ref"in $)return`\$${y($.ref)}`;if("fn"in $)return`${$.fn}(${($.argv||[]).map(y).join(", ")})`;return JSON.stringify($,null,2)}class T extends Error{constructor($){super($);this.name="EndpointError"}}var M6=($,U)=>$===U;var J6=($)=>{const U=$.split("."),G=[];for(let W of U){const w=W.indexOf("[");if(w!==-1){if(W.indexOf("]")!==W.length-1)throw new T(`Path: '${$}' does not end with ']'`);const L=W.slice(w+1,-1);if(Number.isNaN(parseInt(L)))throw new T(`Invalid array index: '${L}' in path: '${$}'`);if(w!==0)G.push(W.slice(0,w));G.push(L)}else G.push(W)}return G};var x1=($,U)=>J6(U).reduce((G,W)=>{if(typeof G!=="object")throw new T(`Index '${W}' in '${U}' not found in '${JSON.stringify($)}'`);else if(Array.isArray(G))return G[parseInt(W)];return G[W]},$);var K6=($)=>$!=null;var V6=($)=>!$;var v1=RU(L0(),1);var QU={[v1.EndpointURLScheme.HTTP]:80,[v1.EndpointURLScheme.HTTPS]:443},B6=($)=>{const U=(()=>{try{if($ instanceof URL)return $;if(typeof $==="object"&&"hostname"in $){const{hostname:R,port:M,protocol:J="",path:V="",query:B={}}=$,A=new URL(`${J}//${R}${M?`:${M}`:""}${V}`);return A.search=Object.entries(B).map(([K,q])=>`${K}=${q}`).join("&"),A}return new URL($)}catch(R){return null}})();if(!U)return console.error(`Unable to parse ${JSON.stringify($)} as a whatwg URL.`),null;const G=U.href,{host:W,hostname:w,pathname:L,protocol:Z,search:X}=U;if(X)return null;const Y=Z.slice(0,-1);if(!Object.values(v1.EndpointURLScheme).includes(Y))return null;const z=l0(w),F=G.includes(`${W}:${QU[Y]}`)||typeof $==="string"&&$.includes(`${W}:${QU[Y]}`),Q=`${W}${F?`:${QU[Y]}`:""}`;return{scheme:Y,authority:Q,path:L,normalizedPath:L.endsWith("/")?L:`${L}/`,isIp:z}};var A6=($,U)=>$===U;var T6=($,U,G,W)=>{if(U>=G||$.length<G)return null;if(!W)return $.substring(U,G);return $.substring($.length-G,$.length-U)};var H6=($)=>encodeURIComponent($).replace(/[!*'()]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`);var O6={booleanEquals:M6,getAttr:x1,isSet:K6,isValidHostLabel:s0,not:V6,parseURL:B6,stringEquals:A6,substring:T6,uriEncode:H6};var c1=($,U)=>{const G=[],W={...U.endpointParams,...U.referenceRecord};let w=0;while(w<$.length){const L=$.indexOf("{",w);if(L===-1){G.push($.slice(w));break}G.push($.slice(w,L));const Z=$.indexOf("}",L);if(Z===-1){G.push($.slice(L));break}if($[L+1]==="{"&&$[Z+1]==="}")G.push($.slice(L+1,Z)),w=Z+2;const X=$.substring(L+1,Z);if(X.includes("#")){const[Y,z]=X.split("#");G.push(x1(W[Y],z))}else G.push(W[X]);w=Z+1}return G.join("")};var C6=({ref:$},U)=>{return{...U.endpointParams,...U.referenceRecord}[$]};var U0=($,U,G)=>{if(typeof $==="string")return c1($,G);else if($.fn)return y1($,G);else if($.ref)return C6($,G);throw new T(`'${U}': ${String($)} is not a string, function or reference.`)};var y1=({fn:$,argv:U},G)=>{const W=U.map((L)=>["boolean","number"].includes(typeof L)?L:U0(L,"arg",G)),w=$.split(".");if(w[0]in m0&&w[1]!=null)return m0[w[0]][w[1]](...W);return O6[$](...W)};var f6=({assign:$,...U},G)=>{if($&&$ in G.referenceRecord)throw new T(`'${$}' is already defined in Reference Record.`);const W=y1(U,G);return G.logger?.debug?.(`${o} evaluateCondition: ${y(U)} = ${y(W)}`),{result:W===""?!0:!!W,...$!=null&&{toAssign:{name:$,value:W}}}};var O0=($=[],U)=>{const G={};for(let W of $){const{result:w,toAssign:L}=f6(W,{...U,referenceRecord:{...U.referenceRecord,...G}});if(!w)return{result:w};if(L)G[L.name]=L.value,U.logger?.debug?.(`${o} assign: ${L.name} := ${y(L.value)}`)}return{result:!0,referenceRecord:G}};var q6=($,U)=>Object.entries($).reduce((G,[W,w])=>({...G,[W]:w.map((L)=>{const Z=U0(L,"Header value entry",U);if(typeof Z!=="string")throw new T(`Header '${W}' value '${Z}' is not a string`);return Z})}),{});var EU=($,U)=>{if(Array.isArray($))return $.map((G)=>EU(G,U));switch(typeof $){case"string":return c1($,U);case"object":if($===null)throw new T(`Unexpected endpoint property: ${$}`);return u1($,U);case"boolean":return $;default:throw new T(`Unexpected endpoint property type: ${typeof $}`)}};var u1=($,U)=>Object.entries($).reduce((G,[W,w])=>({...G,[W]:EU(w,U)}),{});var N6=($,U)=>{const G=U0($,"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 T(`Endpoint URL must be a string, got ${typeof G}`)};var j6=($,U)=>{const{conditions:G,endpoint:W}=$,{result:w,referenceRecord:L}=O0(G,U);if(!w)return;const Z={...U,referenceRecord:{...U.referenceRecord,...L}},{url:X,properties:Y,headers:z}=W;return U.logger?.debug?.(`${o} Resolving endpoint from template: ${y(W)}`),{...z!=null&&{headers:q6(z,Z)},...Y!=null&&{properties:u1(Y,Z)},url:N6(X,Z)}};var P6=($,U)=>{const{conditions:G,error:W}=$,{result:w,referenceRecord:L}=O0(G,U);if(!w)return;throw new T(U0(W,"Error",{...U,referenceRecord:{...U.referenceRecord,...L}}))};var S6=($,U)=>{const{conditions:G,rules:W}=$,{result:w,referenceRecord:L}=O0(G,U);if(!w)return;return _1(W,{...U,referenceRecord:{...U.referenceRecord,...L}})};var _1=($,U)=>{for(let G of $)if(G.type==="endpoint"){const W=j6(G,U);if(W)return W}else if(G.type==="error")P6(G,U);else if(G.type==="tree"){const W=S6(G,U);if(W)return W}else throw new T(`Unknown endpoint rule: ${G}`);throw new T("Rules evaluation failed")};var L7=($,U)=>{const{endpointParams:G,logger:W}=U,{parameters:w,rules:L}=$;U.logger?.debug?.(`${o} Initial EndpointParams: ${y(G)}`);const Z=Object.entries(w).filter(([,z])=>z.default!=null).map(([z,F])=>[z,F.default]);if(Z.length>0)for(let[z,F]of Z)G[z]=G[z]??F;const X=Object.entries(w).filter(([,z])=>z.required).map(([z])=>z);for(let z of X)if(G[z]==null)throw new T(`Missing required parameter: '${z}'`);const Y=_1(L,{endpointParams:G,logger:W,referenceRecord:{}});if(U.endpointParams?.Endpoint)try{const z=new URL(U.endpointParams.Endpoint),{protocol:F,port:Q}=z;Y.url.protocol=F,Y.url.port=Q}catch(z){}return U.logger?.debug?.(`${o} Resolved endpoint: ${y(Y)}`),Y};var IU=($,U=!1)=>{if(U){for(let G of $.split("."))if(!IU(G))return!1;return!0}if(!s0($))return!1;if($.length<3||$.length>63)return!1;if($!==$.toLowerCase())return!1;if(l0($))return!1;return!0};var b6=($)=>{const U=$.split(":");if(U.length<6)return null;const[G,W,w,L,Z,...X]=U;if(G!=="arn"||W===""||w===""||X[0]==="")return null;return{partition:W,service:w,region:L,accountId:Z,resourceId:X[0].includes("/")?X[0].split("/"):X}};var k6={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};var X7=k6,Y7="",D6=($)=>{const{partitions:U}=X7;for(let W of U){const{regions:w,outputs:L}=W;for(let[Z,X]of Object.entries(w))if(Z===$)return{...L,...X}}for(let W of U){const{regionRegex:w,outputs:L}=W;if(new RegExp(w).test($))return{...L}}const G=U.find((W)=>W.id==="aws");if(!G)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...G.outputs}};var h6=()=>Y7;var z7={isVirtualHostableS3Bucket:IU,parseArn:b6,partition:D6};m0.aws=z7;var MU="user-agent",d1="x-amz-user-agent",JU=" ",g1="/",x6=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,v6=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,KU="-";var F7=($)=>(U,G)=>async(W)=>{const{request:w}=W;if(!v.isInstance(w))return U(W);const{headers:L}=w,Z=G?.userAgent?.map(VU)||[],X=(await $.defaultUserAgentProvider()).map(VU),Y=$?.customUserAgent?.map(VU)||[],z=h6(),F=(z?[z]:[]).concat([...X,...Z,...Y]).join(JU),Q=[...X.filter((R)=>R.startsWith("aws-sdk-")),...Y].join(JU);if($.runtime!=="browser"){if(Q)L[d1]=L[d1]?`${L[MU]} ${Q}`:Q;L[MU]=F}else L[d1]=F;return U({...W,request:w})},VU=($)=>{const U=$[0].split(g1).map((Z)=>Z.replace(x6,KU)).join(g1),G=$[1]?.replace(v6,KU),W=U.indexOf(g1),w=U.substring(0,W);let L=U.substring(W+1);if(w==="api")L=L.toLowerCase();return[w,L,G].filter((Z)=>Z&&Z.length>0).reduce((Z,X,Y)=>{switch(Y){case 0:return X;case 1:return`${Z}/${X}`;default:return`${Z}#${X}`}},"")},Q7={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},DK=($)=>({applyToStack:(U)=>{U.add(F7($),Q7)}});var p1=($)=>typeof $==="string"&&($.startsWith("fips-")||$.endsWith("-fips"));var BU=($)=>p1($)?["fips-aws-global","aws-fips"].includes($)?"us-east-1":$.replace(/fips-(dkr-|prod-)?|-fips/,""):$;var pK=($)=>{const{region:U,useFipsEndpoint:G}=$;if(!U)throw new Error("Region is missing");return{...$,region:async()=>{if(typeof U==="string")return BU(U);const W=await U();return BU(W)},useFipsEndpoint:async()=>{const W=typeof U==="string"?U:await U();if(p1(W))return!0;return typeof G!=="function"?Promise.resolve(!!G):G()}}};var C0=($,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 G0;(function($){$.ENV="env",$.CONFIG="shared config entry"})(G0||(G0={}));var R7="AWS_USE_DUALSTACK_ENDPOINT",E7="use_dualstack_endpoint";var eK={environmentVariableSelector:($)=>C0($,R7,G0.ENV),configFileSelector:($)=>C0($,E7,G0.CONFIG),default:!1};var I7="AWS_USE_FIPS_ENDPOINT",M7="use_fips_endpoint";var GV={environmentVariableSelector:($)=>C0($,I7,G0.ENV),configFileSelector:($)=>C0($,M7,G0.CONFIG),default:!1};var AU=RU(L0(),1),c6=($)=>$[AU.SMITHY_CONTEXT_KEY]||($[AU.SMITHY_CONTEXT_KEY]={});var a=($)=>{if(typeof $==="function")return $;const U=Promise.resolve($);return()=>U};var y6={environmentVariableSelector:($)=>$["AWS_REGION"],configFileSelector:($)=>$["region"],default:()=>{throw new Error("Region is missing")}},TV={preferredFile:"credentials"};function J7($){return(U)=>async(G)=>{const W=G.request;if(v.isInstance(W)){const{body:w,headers:L}=W;if(w&&Object.keys(L).map((Z)=>Z.toLowerCase()).indexOf(u6)===-1)try{const Z=$(w);W.headers={...W.headers,[u6]:String(Z)}}catch(Z){}}return U({...G,request:W})}}var u6="content-length",K7={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},iV=($)=>({applyToStack:(U)=>{U.add(J7($.bodyLengthChecker),K7)}});var _6=($,U)=>(G)=>async(W)=>{const{response:w}=await G(W);try{const L=await U(w,$);return{response:w,output:L}}catch(L){if(Object.defineProperty(L,"$response",{value:w}),!("$metadata"in L)){if(L.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof L.$responseBodyText!=="undefined"){if(L.$response)L.$response.body=L.$responseBodyText}}throw L}};var d6=($,U)=>(G,W)=>async(w)=>{const L=W.endpointV2?.url&&$.urlParser?async()=>$.urlParser(W.endpointV2.url):$.endpoint;if(!L)throw new Error("No valid endpoint provider available.");const Z=await U(w.input,{...$,endpoint:L});return G({...w,request:Z})};function $B($,U,G){return{applyToStack:(W)=>{W.add(_6($,G),V7),W.add(d6($,U),TU)}}}var V7={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},TU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};var g6=async($)=>{const U=$?.Bucket||"";if(typeof $.Bucket==="string")$.Bucket=U.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(O7(U)){if($.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!H7(U)||U.indexOf(".")!==-1&&!String($.Endpoint).startsWith("http:")||U.toLowerCase()!==U||U.length<3)$.ForcePathStyle=!0;if($.DisableMultiRegionAccessPoints)$.disableMultiRegionAccessPoints=!0,$.DisableMRAP=!0;return $},B7=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,A7=/(\d+\.){3}\d+/,T7=/\.\./;var H7=($)=>B7.test($)&&!A7.test($)&&!T7.test($),O7=($)=>{const[U,G,W,,,w]=$.split(":"),L=U==="arn"&&$.split(":").length>=6,Z=Boolean(L&&G&&W&&w);if(L&&!Z)throw new Error(`Invalid ARN: ${$} was an invalid ARN.`);return Z};var p6=($,U,G)=>{const W=async()=>{const w=G[$]??G[U];if(typeof w==="function")return w();return w};if($==="credentialScope"||U==="CredentialScope")return async()=>{const w=typeof G.credentials==="function"?await G.credentials():G.credentials;return w?.credentialScope??w?.CredentialScope};if($==="accountId"||U==="AccountId")return async()=>{const w=typeof G.credentials==="function"?await G.credentials():G.credentials;return w?.accountId??w?.AccountId};if($==="endpoint"||U==="endpoint")return async()=>{const w=await W();if(w&&typeof w==="object"){if("url"in w)return w.url.href;if("hostname"in w){const{protocol:L,hostname:Z,port:X,path:Y}=w;return`${L}//${Z}${X?":"+X:""}${Y}`}}return w};return W};var l6="AWS_ENDPOINT_URL",s6="endpoint_url",m6=($)=>({environmentVariableSelector:(U)=>{const G=$.split(" ").map((L)=>L.toUpperCase()),W=U[[l6,...G].join("_")];if(W)return W;const w=U[l6];if(w)return w;return},configFileSelector:(U,G)=>{if(G&&U.services){const w=G[["services",U.services].join(HU)];if(w){const L=$.split(" ").map((X)=>X.toLowerCase()),Z=w[[L.join("_"),s6].join(HU)];if(Z)return Z}}const W=U[s6];if(W)return W;return},default:void 0});var n6=async($)=>F0(m6($))();var l1=($)=>{if(typeof $==="object"){if("url"in $)return OU($.url);return $}return OU($)};var i6=async($,U,G,W)=>{if(!G.endpoint){const Z=await n6(G.serviceId||"");if(Z)G.endpoint=()=>Promise.resolve(l1(Z))}const w=await C7($,U,G);if(typeof G.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return G.endpointProvider(w,W)},C7=async($,U,G)=>{const W={},w=U?.getEndpointParameterInstructions?.()||{};for(let[L,Z]of Object.entries(w))switch(Z.type){case"staticContextParams":W[L]=Z.value;break;case"contextParams":W[L]=$[Z.name];break;case"clientContextParams":case"builtInParams":W[L]=await p6(Z.name,L,G)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(Z))}if(Object.keys(w).length===0)Object.assign(W,G);if(String(G.serviceId).toLowerCase()==="s3")await g6(W);return W};var r6=({config:$,instructions:U})=>{return(G,W)=>async(w)=>{const L=await i6(w.input,{getEndpointParameterInstructions(){return U}},{...$},W);W.endpointV2=L,W.authSchemes=L.properties?.authSchemes;const Z=W.authSchemes?.[0];if(Z){W.signing_region=Z.signingRegion,W.signing_service=Z.signingName;const Y=c6(W)?.selectedHttpAuthScheme?.httpAuthOption;if(Y)Y.signingProperties=Object.assign(Y.signingProperties||{},{signing_region:Z.signingRegion,signingRegion:Z.signingRegion,signing_service:Z.signingName,signingName:Z.signingName,signingRegionSet:Z.signingRegionSet},Z.properties)}return G({...w})}};var f7={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:TU.name},NB=($,U)=>({applyToStack:(G)=>{G.addRelativeTo(r6({config:$,instructions:U}),f7)}});var bB=($)=>{const U=$.tls??!0,{endpoint:G}=$,W=G!=null?async()=>l1(await a(G)()):void 0;return{...$,endpoint:W,tls:U,isCustomEndpoint:!!G,useDualstackEndpoint:a($.useDualstackEndpoint??!1),useFipsEndpoint:a($.useFipsEndpoint??!1)}};var m=RU(f$(),1),gB=m.default.v1,pB=m.default.v3,o6=m.default.v4,lB=m.default.v5,sB=m.default.NIL,mB=m.default.version,nB=m.default.validate,iB=m.default.stringify,rB=m.default.parse;var l;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(l||(l={}));var Q0=3,a6=l.STANDARD;var t6=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],e6=["TimeoutError","RequestTimeout","RequestTimeoutException"],$L=[500,502,503,504],UL=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var q7=($)=>$.$metadata?.clockSkewCorrected,f0=($)=>$.$metadata?.httpStatusCode===429||t6.includes($.name)||$.$retryable?.throttling==!0,s1=($)=>q7($)||e6.includes($.name)||UL.includes($?.code||"")||$L.includes($.$metadata?.httpStatusCode||0),GL=($)=>{if($.$metadata?.httpStatusCode!==void 0){const U=$.$metadata.httpStatusCode;if(500<=U&&U<=599&&!s1($))return!0;return!1}return!1};class m1{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8;const U=this.getCurrentTimeInSeconds();this.lastThrottleTime=U,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.currentCapacity){const U=($-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,U))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const U=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+U),this.lastTimestamp=$}updateClientSendingRate($){let U;if(this.updateMeasuredRate(),f0($)){const W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),U=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),U=this.cubicSuccess(this.getCurrentTimeInSeconds());const G=Math.min(U,2*this.measuredTxRate);this.updateTokenBucketRate(G)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const $=this.getCurrentTimeInSeconds(),U=Math.floor($*2)/2;if(this.requestCount++,U>this.lastTxRateBucket){const G=this.requestCount/(U-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=U}}getPrecise($){return parseFloat($.toFixed(8))}}var R0=100,n0=20000,CU=500,n1=500,fU=5,qU=10,NU=1,i1="amz-sdk-invocation-id",r1="amz-sdk-request";var WL=()=>{let $=R0;return{computeNextBackoffDelay:(W)=>{return Math.floor(Math.min(n0,Math.random()*2**W*$))},setDelayBase:(W)=>{$=W}}};var jU=({retryDelay:$,retryCount:U,retryCost:G})=>{return{getRetryCount:()=>U,getRetryDelay:()=>Math.min(n0,$),getRetryCost:()=>G}};class q0{constructor($){this.maxAttempts=$,this.mode=l.STANDARD,this.capacity=n1,this.retryBackoffStrategy=WL(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return jU({retryDelay:R0,retryCount:0})}async refreshRetryTokenForRetry($,U){const G=await this.getMaxAttempts();if(this.shouldRetry($,U,G)){const W=U.errorType;this.retryBackoffStrategy.setDelayBase(W==="THROTTLING"?CU:R0);const w=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),L=U.retryAfterHint?Math.max(U.retryAfterHint.getTime()-Date.now()||0,w):w,Z=this.getCapacityCost(W);return this.capacity-=Z,jU({retryDelay:L,retryCount:$.getRetryCount()+1,retryCost:Z})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(n1,this.capacity+($.getRetryCost()??NU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${Q0}`),Q0}}shouldRetry($,U,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(U.errorType)&&this.isRetryableError(U.errorType)}getCapacityCost($){return $==="TRANSIENT"?qU:fU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class PU{constructor($,U){this.maxAttemptsProvider=$,this.mode=l.ADAPTIVE;const{rateLimiter:G}=U??{};this.rateLimiter=G??new m1,this.standardRetryStrategy=new q0($)}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 wL="AWS_MAX_ATTEMPTS",LL="max_attempts",bA={environmentVariableSelector:($)=>{const U=$[wL];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Environment variable ${wL} mast be a number, got "${U}"`);return G},configFileSelector:($)=>{const U=$[LL];if(!U)return;const G=parseInt(U);if(Number.isNaN(G))throw new Error(`Shared config file entry ${LL} mast be a number, got "${U}"`);return G},default:Q0},kA=($)=>{const{retryStrategy:U}=$,G=a($.maxAttempts??Q0);return{...$,maxAttempts:G,retryStrategy:async()=>{if(U)return U;if(await a($.retryMode)()===l.ADAPTIVE)return new PU(G);return new q0(G)}}},N7="AWS_RETRY_MODE",j7="retry_mode",DA={environmentVariableSelector:($)=>$[N7],configFileSelector:($)=>$[j7],default:a6};import{Readable as P7} from"stream";var ZL=($)=>$?.body instanceof P7||typeof ReadableStream!=="undefined"&&$?.body instanceof ReadableStream;var SU=($)=>{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 S7=($)=>(U,G)=>async(W)=>{let w=await $.retryStrategy();const L=await $.maxAttempts();if(b7(w)){w=w;let Z=await w.acquireInitialRetryToken(G.partition_id),X=new Error,Y=0,z=0;const{request:F}=W,Q=v.isInstance(F);if(Q)F.headers[i1]=o6();while(!0)try{if(Q)F.headers[r1]=`attempt=${Y+1}; max=${L}`;const{response:R,output:M}=await U(W);return w.recordSuccess(Z),M.$metadata.attempts=Y+1,M.$metadata.totalRetryDelay=z,{response:R,output:M}}catch(R){const M=k7(R);if(X=SU(R),Q&&ZL(F))throw(G.logger instanceof XL?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),X;try{Z=await w.refreshRetryTokenForRetry(Z,M)}catch(V){if(!X.$metadata)X.$metadata={};throw X.$metadata.attempts=Y+1,X.$metadata.totalRetryDelay=z,X}Y=Z.getRetryCount();const J=Z.getRetryDelay();z+=J,await new Promise((V)=>setTimeout(V,J))}}else{if(w=w,w?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",w.mode]];return w.retry(U,W)}},b7=($)=>typeof $.acquireInitialRetryToken!=="undefined"&&typeof $.refreshRetryTokenForRetry!=="undefined"&&typeof $.recordSuccess!=="undefined",k7=($)=>{const U={error:$,errorType:D7($)},G=x7($.$response);if(G)U.retryAfterHint=G;return U},D7=($)=>{if(f0($))return"THROTTLING";if(s1($))return"TRANSIENT";if(GL($))return"SERVER_ERROR";return"CLIENT_ERROR"},h7={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},sA=($)=>({applyToStack:(U)=>{U.add(S7($),h7)}}),x7=($)=>{if(!bU.isInstance($))return;const U=Object.keys($.headers).find((L)=>L.toLowerCase()==="retry-after");if(!U)return;const G=$.headers[U],W=Number(G);if(!Number.isNaN(W))return new Date(W*1000);return new Date(G)};import{platform as fI,release as qI} from"os";import{env as jZ,versions as NI} from"process";var mU={isCrtAvailable:!1};var NZ=()=>{if(mU.isCrtAvailable)return["md/crt-avail"];return null};var jI="AWS_SDK_UA_APP_ID",PI="sdk-ua-app-id",aT=({serviceId:$,clientVersion:U})=>{const G=[["aws-sdk-js",U],["ua","2.0"],[`os/${fI()}`,qI()],["lang/js"],["md/nodejs",`${NI.node}`]],W=NZ();if(W)G.push(W);if($)G.push([`api/${$}`,U]);if(jZ.AWS_EXECUTION_ENV)G.push([`exec-env/${jZ.AWS_EXECUTION_ENV}`]);const w=F0({environmentVariableSelector:(Z)=>Z[jI],configFileSelector:(Z)=>Z[PI],default:void 0})();let L=void 0;return async()=>{if(!L){const Z=await w;L=Z?[...G,[`app/${Z}`]]:[...G]}return L}};import{Buffer as SI} from"buffer";import{createHash as bI,createHmac as kI} from"crypto";var PZ=function($,U){if(SI.isBuffer($))return $;if(typeof $==="string")return SZ($,U);if(ArrayBuffer.isView($))return nU($.buffer,$.byteOffset,$.byteLength);return nU($)};class DI{constructor($,U){this.algorithmIdentifier=$,this.secret=U,this.reset()}update($,U){this.hash.update(bZ(PZ($,U)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?kI(this.algorithmIdentifier,PZ(this.secret)):bI(this.algorithmIdentifier)}}import{fstatSync as hI,lstatSync as xI} from"fs";var ZH=($)=>{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 xI($.path).size;else if(typeof $.fd==="number")return hI($.fd).size;throw new Error(`Body Length computation failed for ${$}`)};var kZ="AWS_EXECUTION_ENV",iU="AWS_REGION",rU="AWS_DEFAULT_REGION",DZ="AWS_EC2_METADATA_DISABLED",hZ=["in-region","cross-region","mobile","standard","legacy"],xZ="/latest/meta-data/placement/region";var vZ={environmentVariableSelector:($)=>{return $["AWS_DEFAULTS_MODE"]},configFileSelector:($)=>{return $["defaults_mode"]},default:"legacy"};var KH=({region:$=F0(y6),defaultsMode:U=F0(vZ)}={})=>cZ(async()=>{const G=typeof U==="function"?await U():U;switch(G?.toLowerCase()){case"auto":return vI($);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 ${hZ.join(", ")}, got ${G}`)}}),vI=async($)=>{if($){const U=typeof $==="function"?await $():$,G=await cI();if(!G)return"standard";if(U===G)return"in-region";else return"cross-region"}return"standard"},cI=async()=>{if(process.env[kZ]&&(process.env[iU]||process.env[rU]))return process.env[iU]??process.env[rU];if(!process.env[DZ])try{const{getInstanceMetadataEndpoint:$,httpRequest:U}=await import("./chunk-f69bcbd7998553cb.js"),G=await $();return(await U({...G,path:xZ})).toString()}catch($){}};var TH=($)=>{let U=async()=>{if($.region===void 0)throw new Error("Region is missing from runtimeConfig");const G=$.region;if(typeof G==="string")return G;return G()};return{setRegion(G){U=G},region(){return U}}},HH=($)=>{return{region:$.region()}};export{_I as Ea,dI as Fa,pI as Ga,iI as Ha,c6 as Ia,a as Ja,C0 as Ka,G0 as La,FU as Ma,$3 as Na,m0 as Oa,L7 as Pa,z7 as Qa,DK as Ra,eK as Sa,GV as Ta,y6 as Ua,TV as Va,pK as Wa,iV as Xa,C7 as Ya,$B as Za,NB as _a,bB as $a,a6 as ab,o6 as bb,bA as cb,kA as db,DA as eb,sA as fb,CI as gb,aT as hb,DI as ib,ZH as jb,KH as kb,TH as lb,HH as mb};
@@ -0,0 +1 @@
1
+ class n extends Error{constructor(t,e=!0){let o,r=!0;if(typeof e==="boolean")o=void 0,r=e;else if(e!=null&&typeof e==="object")o=e.logger,r=e.tryNextLink??!0;super(t);this.name="ProviderError",this.tryNextLink=r,Object.setPrototypeOf(this,n.prototype),o?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,e=!0){return Object.assign(new this(t.message,e),t)}}class u extends n{constructor(t,e=!0){super(t,e);this.name="CredentialsProviderError",Object.setPrototypeOf(this,u.prototype)}}class l extends n{constructor(t,e=!0){super(t,e);this.name="TokenProviderError",Object.setPrototypeOf(this,l.prototype)}}var v=(...t)=>async()=>{if(t.length===0)throw new n("No providers in chain");let e;for(let o of t)try{return await o()}catch(r){if(e=r,r?.tryNextLink)continue;throw r}throw e};var w=(t)=>()=>Promise.resolve(t);var b=(t,e,o)=>{let r,i,s,f=!1;const a=async()=>{if(!i)i=t();try{r=await i,s=!0,f=!1}finally{i=void 0}return r};if(e===void 0)return async(c)=>{if(!s||c?.forceRefresh)r=await a();return r};return async(c)=>{if(!s||c?.forceRefresh)r=await a();if(f)return r;if(o&&!o(r))return f=!0,r;if(e(r))return await a(),r;return r}};export{n as qb,u as rb,l as sb,v as tb,w as ub,b as vb};
@@ -0,0 +1,2 @@
1
+ import{y as B,z as U} from"./chunk-7ce930fe69575c87.js";import{sb as a,wb as d} from"./chunk-a1efc60864e65ef2.js";import{Ab as e,Cb as C,Db as E,Eb as l} from"./chunk-a14516ac5e6f78aa.js";var A=U((io,R)=>{var I=function(o){const t={};if(o=o.replace(/^\?/,""),o)for(let n of o.split("&")){let[i,r=null]=n.split("=");if(i=decodeURIComponent(i),r)r=decodeURIComponent(r);if(!(i in t))t[i]=r;else if(Array.isArray(t[i]))t[i].push(r);else t[i]=[t[i],r]}return t},m=Object.defineProperty,j=Object.getOwnPropertyDescriptor,x=Object.getOwnPropertyNames,z=Object.prototype.hasOwnProperty,L=(o,t)=>m(o,"name",{value:t,configurable:!0}),X=(o,t)=>{for(var n in t)m(o,n,{get:t[n],enumerable:!0})},Z=(o,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let r of x(t))if(!z.call(o,r)&&r!==n)m(o,r,{get:()=>t[r],enumerable:!(i=j(t,r))||i.enumerable})}return o},b=(o)=>Z(m({},"__esModule",{value:!0}),o),S={};X(S,{parseQueryString:()=>I});R.exports=b(S);L(I,"parseQueryString")});function s(o){try{const t=new Set(Array.from(o.match(/([A-Z_]){3,}/g)??[]));return t.delete("CONFIG"),t.delete("CONFIG_PREFIX_SEPARATOR"),t.delete("ENV"),[...t].join(", ")}catch(t){return o}}var F=(o,t)=>async()=>{try{const n=o(process.env);if(n===void 0)throw new Error;return n}catch(n){throw new e(n.message||`Not found in ENV: ${s(o.toString())}`,{logger:t})}};var w=(o,{preferredFile:t="config",...n}={})=>async()=>{const i=a(n),{configFile:r,credentialsFile:c}=await d(n),f=c[i]||{},h=r[i]||{},G=t==="config"?{...f,...h}:{...h,...f};try{const g=o(G,t==="config"?r:c);if(g===void 0)throw new Error;return g}catch(p){throw new e(p.message||`Not found in config files w/ profile [${i}]: ${s(o.toString())}`,{logger:n.logger})}};var T=(o)=>typeof o==="function",N=(o)=>T(o)?async()=>await o():E(o);var y=({environmentVariableSelector:o,configFileSelector:t,default:n},i={})=>l(C(F(o),w(t,i),N(n)));var $=B(A(),1),H=(o)=>{if(typeof o==="string")return H(new URL(o));const{hostname:t,pathname:n,port:i,protocol:r,search:c}=o;let f;if(c)f=$.parseQueryString(c);return{hostname:t,port:i?parseInt(i):void 0,protocol:r,path:n,query:f}};
2
+ export{A as nb,y as ob,H as pb};
@@ -0,0 +1,6 @@
1
+ // @bun
2
+ import"./chunk-7ce930fe69575c87.js";import{H as i,W as I,_ as y,oa as C} from"./chunk-3f1eaa4b49aa9a15.js";import"./chunk-14e60554a2e78f4a.js";import{rb as n} from"./chunk-2a5b4dfab2e26e21.js";import u from"fs/promises";var T="169.254.170.2",x="169.254.170.23",P="[fd00:ec2::23]",d=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===T||e.hostname===x||e.hostname===P)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;const a=e.hostname.split("."),r=(t)=>{const s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new n(`URL not accepted. It must either be HTTPS or match one of the following:
3
+ - loopback CIDR 127.0.0.0/8 or [::1/128]
4
+ - ECS container host 169.254.170.2
5
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:c})};function S(e){return new i({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function g(e,c){const r=await y(e.body).transformToString();if(e.statusCode===200){const t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new n("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:C(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new n(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new n(`Server responded with status: ${e.statusCode}`,{logger:c})}var w=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var E="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",R="http://169.254.170.2",p="AWS_CONTAINER_CREDENTIALS_FULL_URI",A="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",O="AWS_CONTAINER_AUTHORIZATION_TOKEN",b=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c;const a=e.awsContainerCredentialsRelativeUri??process.env[E],r=e.awsContainerCredentialsFullUri??process.env[p],t=e.awsContainerAuthorizationToken??process.env[O],s=e.awsContainerAuthorizationTokenFile??process.env[A],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(a&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${R}${a}`;else throw new n(`No HTTP credential provider host provided.
6
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});const h=new URL(c);d(h,e.logger);const K=new I({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return w(async()=>{const o=S(h);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await u.readFile(s)).toString();try{const f=await K.handle(o);return g(f.response)}catch(f){throw new n(String(f),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{b as fromHttp};