gemi 0.4.41 → 0.4.43

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 (146) hide show
  1. package/dist/app/App.d.ts +1 -0
  2. package/dist/app/App.d.ts.map +1 -1
  3. package/dist/app/createFlatApiRoutes.d.ts +6 -4
  4. package/dist/app/createFlatApiRoutes.d.ts.map +1 -1
  5. package/dist/app/createFlatViewRoutes.d.ts +6 -4
  6. package/dist/app/createFlatViewRoutes.d.ts.map +1 -1
  7. package/dist/app/index.js +65 -65
  8. package/dist/chunk-00935722c776a294.js +2 -0
  9. package/dist/chunk-00e9dad0734d9761.js +2 -0
  10. package/dist/chunk-01052ff9d1c07ef8.js +1 -1
  11. package/dist/chunk-030b4fb955329860.js +16 -0
  12. package/dist/chunk-03c8e645c994d40a.js +1 -1
  13. package/dist/chunk-08539d08fa7362f7.js +2 -0
  14. package/dist/chunk-09dd89e1046786a5.js +2 -0
  15. package/dist/chunk-1900e90c372bb1d6.js +1 -1
  16. package/dist/chunk-29c46abebbc0f09b.js +2 -0
  17. package/dist/chunk-2b3eabd01b2ae3f8.js +2 -0
  18. package/dist/chunk-2ecc077efab285b4.js +2 -0
  19. package/dist/chunk-2f6867d08b95f2d2.js +2 -0
  20. package/dist/chunk-3567e8e424a60c99.js +18 -0
  21. package/dist/chunk-3a3092db69408490.js +2 -0
  22. package/dist/chunk-3aecba8553e036bf.js +6 -0
  23. package/dist/chunk-40c21fe243675250.js +2 -0
  24. package/dist/chunk-487b7c0cb388d533.js +6 -0
  25. package/dist/chunk-488b4db0c522d44a.js +1 -0
  26. package/dist/chunk-4960e27e19bbe42a.js +2 -0
  27. package/dist/chunk-4cb19a9e82653084.js +1 -1
  28. package/dist/chunk-51bad63147c3be4e.js +6 -0
  29. package/dist/chunk-584e33c96b1a78e4.js +2 -0
  30. package/dist/chunk-5fd67245740e3908.js +9 -0
  31. package/dist/chunk-61abf77c3eee8698.js +2 -0
  32. package/dist/chunk-68af0a6f6be163ce.js +2 -0
  33. package/dist/chunk-6a28d299b5726bba.js +2 -0
  34. package/dist/chunk-6e415d0e12fc9539.js +1 -0
  35. package/dist/chunk-76a525af0575486d.js +5 -0
  36. package/dist/chunk-798f550643937b6d.js +2 -0
  37. package/dist/chunk-7ce930fe69575c87.js +2 -0
  38. package/dist/chunk-7e9d5eea3aa359ad.js +2 -0
  39. package/dist/chunk-7ffe2ce59a054e35.js +2 -0
  40. package/dist/chunk-8133ed564834cff3.js +2 -0
  41. package/dist/chunk-81ce9b491b290639.js +1 -0
  42. package/dist/chunk-8a993922ea970923.js +2 -0
  43. package/dist/chunk-901e700a2c2d43f3.js +18 -0
  44. package/dist/chunk-9113f22a5215c639.js +3 -0
  45. package/dist/chunk-9326224d1e4c1a64.js +2 -0
  46. package/dist/chunk-9501e589e3e86a96.js +2 -0
  47. package/dist/chunk-a0003b7feea6fae6.js +2 -0
  48. package/dist/chunk-a2fcc46e344ae7ae.js +2 -0
  49. package/dist/chunk-a3f85d0d3261ae44.js +9 -0
  50. package/dist/chunk-a693f8ec2e8af8ca.js +2 -0
  51. package/dist/chunk-ae373c8ae2d526ae.js +18 -0
  52. package/dist/chunk-b05e4833f4bb2f8f.js +9 -0
  53. package/dist/chunk-b0cc82fa84d5362d.js +2 -0
  54. package/dist/chunk-b3bfe533d66f6a17.js +2 -0
  55. package/dist/chunk-b5d6eb761760b2a7.js +6 -0
  56. package/dist/chunk-b7b365f7e6038104.js +2 -0
  57. package/dist/chunk-be095501304df604.js +9 -0
  58. package/dist/chunk-bf92f3127474b56a.js +3 -0
  59. package/dist/chunk-bfccfb070c1630e9.js +2 -0
  60. package/dist/chunk-c041f058dc3d571b.js +1 -0
  61. package/dist/chunk-c0bd8e19395d722b.js +2 -0
  62. package/dist/chunk-c124bf801cec12d9.js +2 -0
  63. package/dist/chunk-c153b192112b0d44.js +2 -0
  64. package/dist/chunk-c1813278ccdc04b8.js +2 -0
  65. package/dist/chunk-c3eaa877d3aab9db.js +18 -0
  66. package/dist/chunk-c609d06153ed09ce.js +1 -1
  67. package/dist/chunk-c72bfaa252a03f6f.js +2 -0
  68. package/dist/chunk-c85fc7168a708cb6.js +3 -0
  69. package/dist/chunk-d0806df6defd9dce.js +2 -0
  70. package/dist/chunk-d26ffb7722e6df54.js +1 -0
  71. package/dist/chunk-d2e057b6f3f9d500.js +2 -0
  72. package/dist/chunk-d33a0e61ccf1bab5.js +2 -0
  73. package/dist/chunk-d5ddfacbfc84a47d.js +6 -0
  74. package/dist/chunk-da1c673d9685624e.js +2 -0
  75. package/dist/chunk-dc7b0cf226ba3afa.js +1 -1
  76. package/dist/chunk-dcc432bd72fb7e46.js +3 -0
  77. package/dist/chunk-dfc390f0bbdf5a81.js +1 -0
  78. package/dist/chunk-e1a08bb52ee7ea09.js +2 -0
  79. package/dist/chunk-e53fdd0a1888c5e8.js +2 -0
  80. package/dist/chunk-e9695f3cdafee20b.js +2 -0
  81. package/dist/chunk-edeefd833c30a5ed.js +2 -0
  82. package/dist/chunk-f08ca4bd263b132b.js +2 -0
  83. package/dist/chunk-f5a4295176f9b1c1.js +2 -0
  84. package/dist/chunk-f5e313cc7d724fbe.js +2 -0
  85. package/dist/chunk-f9e6a0a946ebb032.js +2 -0
  86. package/dist/chunk-ffe161a589b4c44b.js +1 -0
  87. package/dist/client/ClientRouter.d.ts.map +1 -1
  88. package/dist/client/ClientRouterContext.d.ts +1 -0
  89. package/dist/client/ClientRouterContext.d.ts.map +1 -1
  90. package/dist/client/Mutation.d.ts +9 -13
  91. package/dist/client/Mutation.d.ts.map +1 -1
  92. package/dist/client/ServerDataProvider.d.ts +2 -0
  93. package/dist/client/ServerDataProvider.d.ts.map +1 -1
  94. package/dist/client/auth/useForgotPassword.d.ts.map +1 -1
  95. package/dist/client/auth/useResetPassword.d.ts.map +1 -1
  96. package/dist/client/auth/useSignIn.d.ts.map +1 -1
  97. package/dist/client/auth/useSignOut.d.ts.map +1 -1
  98. package/dist/client/auth/useUser.d.ts.map +1 -1
  99. package/dist/client/i18n/I18nContext.d.ts +18 -0
  100. package/dist/client/i18n/I18nContext.d.ts.map +1 -0
  101. package/dist/client/i18n/useLocale.d.ts +2 -0
  102. package/dist/client/i18n/useLocale.d.ts.map +1 -0
  103. package/dist/client/i18n/useScopedTranslator.d.ts +8 -0
  104. package/dist/client/i18n/useScopedTranslator.d.ts.map +1 -0
  105. package/dist/client/i18n/useTranslator.d.ts +2 -0
  106. package/dist/client/i18n/useTranslator.d.ts.map +1 -0
  107. package/dist/client/index.d.ts +3 -1
  108. package/dist/client/index.d.ts.map +1 -1
  109. package/dist/client/index.js +221 -68
  110. package/dist/client/rpc.d.ts +6 -5
  111. package/dist/client/rpc.d.ts.map +1 -1
  112. package/dist/client/types.d.ts +1 -0
  113. package/dist/client/types.d.ts.map +1 -1
  114. package/dist/client/useRouter.d.ts.map +1 -1
  115. package/dist/client/useSearchParams.d.ts +20 -1
  116. package/dist/client/useSearchParams.d.ts.map +1 -1
  117. package/dist/email/index.js +1 -1
  118. package/dist/facades/I18n.d.ts +5 -0
  119. package/dist/facades/I18n.d.ts.map +1 -0
  120. package/dist/facades/index.d.ts +1 -0
  121. package/dist/facades/index.d.ts.map +1 -1
  122. package/dist/facades/index.js +1 -1
  123. package/dist/http/ApiRouter.d.ts +4 -5
  124. package/dist/http/ApiRouter.d.ts.map +1 -1
  125. package/dist/http/HttpRequest.d.ts +2 -0
  126. package/dist/http/HttpRequest.d.ts.map +1 -1
  127. package/dist/http/I18nServiceContainer.d.ts +31 -0
  128. package/dist/http/I18nServiceContainer.d.ts.map +1 -0
  129. package/dist/http/I18nServiceProvider.d.ts +10 -0
  130. package/dist/http/I18nServiceProvider.d.ts.map +1 -0
  131. package/dist/http/index.d.ts +1 -0
  132. package/dist/http/index.d.ts.map +1 -1
  133. package/dist/http/index.js +1 -1
  134. package/dist/http/requestContext.d.ts +2 -0
  135. package/dist/http/requestContext.d.ts.map +1 -1
  136. package/dist/kernel/Kernel.d.ts +5 -0
  137. package/dist/kernel/Kernel.d.ts.map +1 -1
  138. package/dist/kernel/context.d.ts +6 -2
  139. package/dist/kernel/context.d.ts.map +1 -1
  140. package/dist/kernel/index.js +2 -2
  141. package/dist/server/index.js +1 -1
  142. package/dist/storage/index.js +1 -10
  143. package/dist/utils/type.d.ts +1 -0
  144. package/dist/utils/type.d.ts.map +1 -1
  145. package/dist/vite/index.js +1 -1
  146. package/package.json +1 -1
@@ -0,0 +1,18 @@
1
+ import{y as t,z as M} from"./chunk-7ce930fe69575c87.js";import{$ as MG,C as v,D as F$,E as nW,F as uX,I as q$,J as dR,M as pR,T as G0,U as SZ,V as dI,W as jZ,X as MX,Y as O0,Z as OG,_ as IX} from"./chunk-dcc432bd72fb7e46.js";import{pb as N0} from"./chunk-9501e589e3e86a96.js";import{qb as qF,rb as L0,sb as f$} from"./chunk-08539d08fa7362f7.js";import{yb as e1} from"./chunk-c041f058dc3d571b.js";import{Hb as iR} from"./chunk-488b4db0c522d44a.js";var a0=M((u9,v$)=>{var u$=function(f,$,w){return{applyToStack:(G)=>{G.add(h$(f,w),c$),G.add(k$(f,$),D$)}}},t0=Object.defineProperty,G8=Object.getOwnPropertyDescriptor,E8=Object.getOwnPropertyNames,W8=Object.prototype.hasOwnProperty,af=(f,$)=>t0(f,"name",{value:$,configurable:!0}),L8=(f,$)=>{for(var w in $)t0(f,w,{get:$[w],enumerable:!0})},R8=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of E8($))if(!W8.call(f,U)&&U!==w)t0(f,U,{get:()=>$[U],enumerable:!(G=G8($,U))||G.enumerable})}return f},F8=(f)=>R8(t0({},"__esModule",{value:!0}),f),b$={};L8(b$,{deserializerMiddleware:()=>h$,deserializerMiddlewareOption:()=>c$,getSerdePlugin:()=>u$,serializerMiddleware:()=>k$,serializerMiddlewareOption:()=>D$});v$.exports=F8(b$);var h$=af((f,$)=>(w)=>async(G)=>{const{response:U}=await w(G);try{const E=await $(U,f);return{response:U,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:U}),!("$metadata"in E)){if(E.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}},"deserializerMiddleware"),k$=af((f,$)=>(w,G)=>async(U)=>{var E;const W=((E=G.endpointV2)==null?void 0:E.url)&&f.urlParser?async()=>f.urlParser(G.endpointV2.url):f.endpoint;if(!W)throw new Error("No valid endpoint provider available.");const L=await $(U.input,{...f,endpoint:W});return w({...U,request:L})},"serializerMiddleware"),c$={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},D$={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};af(u$,"getSerdePlugin")});var s=M((v9,d$)=>{var{defineProperty:e0,getOwnPropertyDescriptor:I8,getOwnPropertyNames:X8}=Object,Z8=Object.prototype.hasOwnProperty,x$=(f,$)=>e0(f,"name",{value:$,configurable:!0}),Y8=(f,$)=>{for(var w in $)e0(f,w,{get:$[w],enumerable:!0})},Q8=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of X8($))if(!Z8.call(f,U)&&U!==w)e0(f,U,{get:()=>$[U],enumerable:!(G=I8($,U))||G.enumerable})}return f},O8=(f)=>Q8(e0({},"__esModule",{value:!0}),f),_$={};Y8(_$,{getSmithyContext:()=>M8,normalizeProvider:()=>z8});d$.exports=O8(_$);var y$=N0(),M8=x$((f)=>f[y$.SMITHY_CONTEXT_KEY]||(f[y$.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),z8=x$((f)=>{if(typeof f==="function")return f;const $=Promise.resolve(f);return()=>$},"normalizeProvider")});var ef=M((y9,l$)=>{var{defineProperty:ff,getOwnPropertyDescriptor:J8,getOwnPropertyNames:T8}=Object,K8=Object.prototype.hasOwnProperty,w0=(f,$)=>ff(f,"name",{value:$,configurable:!0}),A8=(f,$)=>{for(var w in $)ff(f,w,{get:$[w],enumerable:!0})},B8=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of T8($))if(!K8.call(f,U)&&U!==w)ff(f,U,{get:()=>$[U],enumerable:!(G=J8($,U))||G.enumerable})}return f},V8=(f)=>B8(ff({},"__esModule",{value:!0}),f),p$={};A8(p$,{CredentialsProviderError:()=>H8,ProviderError:()=>$f,TokenProviderError:()=>C8,chain:()=>q8,fromStatic:()=>N8,memoize:()=>P8});l$.exports=V8(p$);var g$=class f extends Error{constructor($,w=!0){var G;let U,E=!0;if(typeof w==="boolean")U=void 0,E=w;else if(w!=null&&typeof w==="object")U=w.logger,E=w.tryNextLink??!0;super($);this.name="ProviderError",this.tryNextLink=E,Object.setPrototypeOf(this,f.prototype),(G=U==null?void 0:U.debug)==null||G.call(U,`@smithy/property-provider ${E?"->":"(!)"} ${$}`)}static from($,w=!0){return Object.assign(new this($.message,w),$)}};w0(g$,"ProviderError");var $f=g$,n$=class f extends $f{constructor($,w=!0){super($,w);this.name="CredentialsProviderError",Object.setPrototypeOf(this,f.prototype)}};w0(n$,"CredentialsProviderError");var H8=n$,s$=class f extends $f{constructor($,w=!0){super($,w);this.name="TokenProviderError",Object.setPrototypeOf(this,f.prototype)}};w0(s$,"TokenProviderError");var C8=s$,q8=w0((...f)=>async()=>{if(f.length===0)throw new $f("No providers in chain");let $;for(let w of f)try{return await w()}catch(G){if($=G,G==null?void 0:G.tryNextLink)continue;throw G}throw $},"chain"),N8=w0((f)=>()=>Promise.resolve(f),"fromStatic"),P8=w0((f,$,w)=>{let G,U,E,W=!1;const L=w0(async()=>{if(!U)U=f();try{G=await U,E=!0,W=!1}finally{U=void 0}return G},"coalesceProvider");if($===void 0)return async(R)=>{if(!E||(R==null?void 0:R.forceRefresh))G=await L();return G};return async(R)=>{if(!E||(R==null?void 0:R.forceRefresh))G=await L();if(W)return G;if(w&&!w(G))return W=!0,G;if($(G))return await L(),G;return G}},"memoize")});var Z0=M((m$)=>{Object.defineProperty(m$,"__esModule",{value:!0});m$.getHomeDir=void 0;var S8=import.meta.require("os"),j8=import.meta.require("path"),f1={},b8=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},h8=()=>{const{HOME:f,USERPROFILE:$,HOMEPATH:w,HOMEDRIVE:G=`C:${j8.sep}`}=process.env;if(f)return f;if($)return $;if(w)return`${G}${w}`;const U=b8();if(!f1[U])f1[U]=S8.homedir();return f1[U]};m$.getHomeDir=h8});var $1=M((r$)=>{Object.defineProperty(r$,"__esModule",{value:!0});r$.getSSOTokenFilepath=void 0;var k8=import.meta.require("crypto"),c8=import.meta.require("path"),D8=Z0(),u8=(f)=>{const w=k8.createHash("sha1").update(f).digest("hex");return c8.join(D8.getHomeDir(),".aws","sso","cache",`${w}.json`)};r$.getSSOTokenFilepath=u8});var e$=M((t$)=>{Object.defineProperty(t$,"__esModule",{value:!0});t$.getSSOTokenFromFile=void 0;var v8=import.meta.require("fs"),y8=$1(),{readFile:x8}=v8.promises,_8=async(f)=>{const $=y8.getSSOTokenFilepath(f),w=await x8($,"utf8");return JSON.parse(w)};t$.getSSOTokenFromFile=_8});var U1=M((fw)=>{Object.defineProperty(fw,"__esModule",{value:!0});fw.slurpFile=void 0;var d8=import.meta.require("fs"),{readFile:p8}=d8.promises,w1={},g8=(f,$)=>{if(!w1[f]||($===null||$===void 0?void 0:$.ignoreCache))w1[f]=p8(f,"utf8");return w1[f]};fw.slurpFile=g8});var L1=M((g9,S0)=>{var{defineProperty:Gf,getOwnPropertyDescriptor:n8,getOwnPropertyNames:s8}=Object,l8=Object.prototype.hasOwnProperty,y=(f,$)=>Gf(f,"name",{value:$,configurable:!0}),m8=(f,$)=>{for(var w in $)Gf(f,w,{get:$[w],enumerable:!0})},G1=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of s8($))if(!l8.call(f,U)&&U!==w)Gf(f,U,{get:()=>$[U],enumerable:!(G=n8($,U))||G.enumerable})}return f},W1=(f,$,w)=>(G1(f,$,"default"),w&&G1(w,$,"default")),i8=(f)=>G1(Gf({},"__esModule",{value:!0}),f),P0={};m8(P0,{CONFIG_PREFIX_SEPARATOR:()=>U0,DEFAULT_PROFILE:()=>Ew,ENV_PROFILE:()=>Gw,getProfileName:()=>r8,loadSharedConfigFiles:()=>Lw,loadSsoSessionData:()=>RF,parseKnownFiles:()=>IF});S0.exports=i8(P0);W1(P0,Z0(),S0.exports);var Gw="AWS_PROFILE",Ew="default",r8=y((f)=>f.profile||process.env[Gw]||Ew,"getProfileName");W1(P0,$1(),S0.exports);W1(P0,e$(),S0.exports);var wf=N0(),o8=y((f)=>Object.entries(f).filter(([$])=>{const w=$.indexOf(U0);if(w===-1)return!1;return Object.values(wf.IniSectionType).includes($.substring(0,w))}).reduce(($,[w,G])=>{const U=w.indexOf(U0),E=w.substring(0,U)===wf.IniSectionType.PROFILE?w.substring(U+1):w;return $[E]=G,$},{...f.default&&{default:f.default}}),"getConfigData"),Uf=import.meta.require("path"),t8=Z0(),a8="AWS_CONFIG_FILE",Ww=y(()=>process.env[a8]||Uf.join(t8.getHomeDir(),".aws","config"),"getConfigFilepath"),e8=Z0(),fF="AWS_SHARED_CREDENTIALS_FILE",$F=y(()=>process.env[fF]||Uf.join(e8.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),wF=Z0(),UF=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,GF=["__proto__","profile __proto__"],E1=y((f)=>{const $={};let w,G;for(let U of f.split(/\r?\n/)){const E=U.split(/(^|\s)[;#]/)[0].trim();if(E[0]==="["&&E[E.length-1]==="]"){w=void 0,G=void 0;const L=E.substring(1,E.length-1),R=UF.exec(L);if(R){const[,F,,I]=R;if(Object.values(wf.IniSectionType).includes(F))w=[F,I].join(U0)}else w=L;if(GF.includes(L))throw new Error(`Found invalid profile name "${L}"`)}else if(w){const L=E.indexOf("=");if(![0,-1].includes(L)){const[R,F]=[E.substring(0,L).trim(),E.substring(L+1).trim()];if(F==="")G=R;else{if(G&&U.trimStart()===U)G=void 0;$[w]=$[w]||{};const I=G?[G,R].join(U0):R;$[w][I]=F}}}}return $},"parseIni"),ww=U1(),Uw=y(()=>({}),"swallowError"),U0=".",Lw=y(async(f={})=>{const{filepath:$=$F(),configFilepath:w=Ww()}=f,G=wF.getHomeDir();let E=$;if($.startsWith("~/"))E=Uf.join(G,$.slice(2));let W=w;if(w.startsWith("~/"))W=Uf.join(G,w.slice(2));const L=await Promise.all([ww.slurpFile(W,{ignoreCache:f.ignoreCache}).then(E1).then(o8).catch(Uw),ww.slurpFile(E,{ignoreCache:f.ignoreCache}).then(E1).catch(Uw)]);return{configFile:L[0],credentialsFile:L[1]}},"loadSharedConfigFiles"),EF=y((f)=>Object.entries(f).filter(([$])=>$.startsWith(wf.IniSectionType.SSO_SESSION+U0)).reduce(($,[w,G])=>({...$,[w.substring(w.indexOf(U0)+1)]:G}),{}),"getSsoSessionData"),WF=U1(),LF=y(()=>({}),"swallowError"),RF=y(async(f={})=>WF.slurpFile(f.configFilepath??Ww()).then(E1).then(EF).catch(LF),"loadSsoSessionData"),FF=y((...f)=>{const $={};for(let w of f)for(let[G,U]of Object.entries(w))if($[G]!==void 0)Object.assign($[G],U);else $[G]=U;return $},"mergeConfigFiles"),IF=y(async(f)=>{const $=await Lw(f);return FF($.configFile,$.credentialsFile)},"parseKnownFiles")});var Xw=M((n9,Iw)=>{var R1=function(f){try{const $=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return $.delete("CONFIG"),$.delete("CONFIG_PREFIX_SEPARATOR"),$.delete("ENV"),[...$].join(", ")}catch($){return f}},Ef=Object.defineProperty,XF=Object.getOwnPropertyDescriptor,ZF=Object.getOwnPropertyNames,YF=Object.prototype.hasOwnProperty,Y0=(f,$)=>Ef(f,"name",{value:$,configurable:!0}),QF=(f,$)=>{for(var w in $)Ef(f,w,{get:$[w],enumerable:!0})},OF=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of ZF($))if(!YF.call(f,U)&&U!==w)Ef(f,U,{get:()=>$[U],enumerable:!(G=XF($,U))||G.enumerable})}return f},MF=(f)=>OF(Ef({},"__esModule",{value:!0}),f),Fw={};QF(Fw,{loadConfig:()=>AF});Iw.exports=MF(Fw);var j0=ef();Y0(R1,"getSelectorName");var zF=Y0((f,$)=>async()=>{try{const w=f(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new j0.CredentialsProviderError(w.message||`Not found in ENV: ${R1(f.toString())}`,{logger:$})}},"fromEnv"),Rw=L1(),JF=Y0((f,{preferredFile:$="config",...w}={})=>async()=>{const G=Rw.getProfileName(w),{configFile:U,credentialsFile:E}=await Rw.loadSharedConfigFiles(w),W=E[G]||{},L=U[G]||{},R=$==="config"?{...W,...L}:{...L,...W};try{const I=f(R,$==="config"?U:E);if(I===void 0)throw new Error;return I}catch(F){throw new j0.CredentialsProviderError(F.message||`Not found in config files w/ profile [${G}]: ${R1(f.toString())}`,{logger:w.logger})}},"fromSharedConfigFiles"),TF=Y0((f)=>typeof f==="function","isFunction"),KF=Y0((f)=>TF(f)?async()=>await f():j0.fromStatic(f),"fromStatic"),AF=Y0(({environmentVariableSelector:f,configFileSelector:$,default:w},G={})=>j0.memoize(j0.chain(zF(f),JF($,G),KF(w))),"loadConfig")});var zw=M((Ow)=>{Object.defineProperty(Ow,"__esModule",{value:!0});Ow.getEndpointUrlConfig=void 0;var Zw=L1(),Yw="AWS_ENDPOINT_URL",Qw="endpoint_url",BF=(f)=>({environmentVariableSelector:($)=>{const w=f.split(" ").map((E)=>E.toUpperCase()),G=$[[Yw,...w].join("_")];if(G)return G;const U=$[Yw];if(U)return U;return},configFileSelector:($,w)=>{if(w&&$.services){const U=w[["services",$.services].join(Zw.CONFIG_PREFIX_SEPARATOR)];if(U){const E=f.split(" ").map((L)=>L.toLowerCase()),W=U[[E.join("_"),Qw].join(Zw.CONFIG_PREFIX_SEPARATOR)];if(W)return W}}const G=$[Qw];if(G)return G;return},default:void 0});Ow.getEndpointUrlConfig=BF});var Kw=M((Jw)=>{Object.defineProperty(Jw,"__esModule",{value:!0});Jw.getEndpointFromConfig=void 0;var VF=Xw(),HF=zw(),CF=async(f)=>VF.loadConfig(HF.getEndpointUrlConfig(f))();Jw.getEndpointFromConfig=CF});var Hw=M((m9,Vw)=>{var{defineProperty:Wf,getOwnPropertyDescriptor:NF,getOwnPropertyNames:PF}=Object,SF=Object.prototype.hasOwnProperty,jF=(f,$)=>Wf(f,"name",{value:$,configurable:!0}),bF=(f,$)=>{for(var w in $)Wf(f,w,{get:$[w],enumerable:!0})},hF=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of PF($))if(!SF.call(f,U)&&U!==w)Wf(f,U,{get:()=>$[U],enumerable:!(G=NF($,U))||G.enumerable})}return f},kF=(f)=>hF(Wf({},"__esModule",{value:!0}),f),Aw={};bF(Aw,{parseUrl:()=>Bw});Vw.exports=kF(Aw);var cF=qF(),Bw=jF((f)=>{if(typeof f==="string")return Bw(new URL(f));const{hostname:$,pathname:w,port:G,protocol:U,search:E}=f;let W;if(E)W=cF.parseQueryString(E);return{hostname:$,port:G?parseInt(G):void 0,protocol:U,path:w,query:W}},"parseUrl")});var hw=M((i9,bw)=>{var{defineProperty:Rf,getOwnPropertyDescriptor:DF,getOwnPropertyNames:uF}=Object,vF=Object.prototype.hasOwnProperty,d=(f,$)=>Rf(f,"name",{value:$,configurable:!0}),yF=(f,$)=>{for(var w in $)Rf(f,w,{get:$[w],enumerable:!0})},xF=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of uF($))if(!vF.call(f,U)&&U!==w)Rf(f,U,{get:()=>$[U],enumerable:!(G=DF($,U))||G.enumerable})}return f},_F=(f)=>xF(Rf({},"__esModule",{value:!0}),f),qw={};yF(qw,{endpointMiddleware:()=>Sw,endpointMiddlewareOptions:()=>jw,getEndpointFromInstructions:()=>Nw,getEndpointPlugin:()=>oF,resolveEndpointConfig:()=>tF,resolveParams:()=>Pw,toEndpointV1:()=>F1});bw.exports=_F(qw);var dF=d(async(f)=>{const $=(f==null?void 0:f.Bucket)||"";if(typeof f.Bucket==="string")f.Bucket=$.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(lF($)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!sF($)||$.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||$.toLowerCase()!==$||$.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},"resolveParamsForS3"),pF=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,gF=/(\d+\.){3}\d+/,nF=/\.\./,sF=d((f)=>pF.test(f)&&!gF.test(f)&&!nF.test(f),"isDnsCompatibleBucketName"),lF=d((f)=>{const[$,w,G,,,U]=f.split(":"),E=$==="arn"&&f.split(":").length>=6,W=Boolean(E&&w&&G&&U);if(E&&!W)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return W},"isArnBucketName"),mF=d((f,$,w)=>{const G=d(async()=>{const U=w[f]??w[$];if(typeof U==="function")return U();return U},"configProvider");if(f==="credentialScope"||$==="CredentialScope")return async()=>{const U=typeof w.credentials==="function"?await w.credentials():w.credentials;return(U==null?void 0:U.credentialScope)??(U==null?void 0:U.CredentialScope)};if(f==="accountId"||$==="AccountId")return async()=>{const U=typeof w.credentials==="function"?await w.credentials():w.credentials;return(U==null?void 0:U.accountId)??(U==null?void 0:U.AccountId)};if(f==="endpoint"||$==="endpoint")return async()=>{const U=await G();if(U&&typeof U==="object"){if("url"in U)return U.url.href;if("hostname"in U){const{protocol:E,hostname:W,port:L,path:R}=U;return`${E}//${W}${L?":"+L:""}${R}`}}return U};return G},"createConfigValueProvider"),iF=Kw(),Cw=Hw(),F1=d((f)=>{if(typeof f==="object"){if("url"in f)return Cw.parseUrl(f.url);return f}return Cw.parseUrl(f)},"toEndpointV1"),Nw=d(async(f,$,w,G)=>{if(!w.endpoint){const W=await iF.getEndpointFromConfig(w.serviceId||"");if(W)w.endpoint=()=>Promise.resolve(F1(W))}const U=await Pw(f,$,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider(U,G)},"getEndpointFromInstructions"),Pw=d(async(f,$,w)=>{var G;const U={},E=((G=$==null?void 0:$.getEndpointParameterInstructions)==null?void 0:G.call($))||{};for(let[W,L]of Object.entries(E))switch(L.type){case"staticContextParams":U[W]=L.value;break;case"contextParams":U[W]=f[L.name];break;case"clientContextParams":case"builtInParams":U[W]=await mF(L.name,W,w)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}if(Object.keys(E).length===0)Object.assign(U,w);if(String(w.serviceId).toLowerCase()==="s3")await dF(U);return U},"resolveParams"),Lf=s(),Sw=d(({config:f,instructions:$})=>{return(w,G)=>async(U)=>{var E,W,L;const R=await Nw(U.input,{getEndpointParameterInstructions(){return $}},{...f},G);G.endpointV2=R,G.authSchemes=(E=R.properties)==null?void 0:E.authSchemes;const F=(W=G.authSchemes)==null?void 0:W[0];if(F){G.signing_region=F.signingRegion,G.signing_service=F.signingName;const I=Lf.getSmithyContext(G),X=(L=I==null?void 0:I.selectedHttpAuthScheme)==null?void 0:L.httpAuthOption;if(X)X.signingProperties=Object.assign(X.signingProperties||{},{signing_region:F.signingRegion,signingRegion:F.signingRegion,signing_service:F.signingName,signingName:F.signingName,signingRegionSet:F.signingRegionSet},F.properties)}return w({...U})}},"endpointMiddleware"),rF=a0(),jw={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:rF.serializerMiddlewareOption.name},oF=d((f,$)=>({applyToStack:(w)=>{w.addRelativeTo(Sw({config:f,instructions:$}),jw)}}),"getEndpointPlugin"),tF=d((f)=>{const $=f.tls??!0,{endpoint:w}=f,G=w!=null?async()=>F1(await Lf.normalizeProvider(w)()):void 0;return{...f,endpoint:G,tls:$,isCustomEndpoint:!!w,useDualstackEndpoint:Lf.normalizeProvider(f.useDualstackEndpoint??!1),useFipsEndpoint:Lf.normalizeProvider(f.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var I1=M((kw)=>{var eF=function(f){return f&&f.__esModule?f:{default:f}},f4=function(){if(Ff>If.length-16)aF.default.randomFillSync(If),Ff=0;return If.slice(Ff,Ff+=16)};Object.defineProperty(kw,"__esModule",{value:!0});kw.default=f4;var aF=eF(import.meta.require("crypto")),If=new Uint8Array(256),Ff=If.length});var uw=M((cw)=>{Object.defineProperty(cw,"__esModule",{value:!0});cw.default=void 0;var w4=/^(?:[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;cw.default=w4});var b0=M((vw)=>{var G4=function(f){return f&&f.__esModule?f:{default:f}},E4=function(f){return typeof f==="string"&&U4.default.test(f)};Object.defineProperty(vw,"__esModule",{value:!0});vw.default=void 0;var U4=G4(uw()),W4=E4;vw.default=W4});var h0=M((_w)=>{var R4=function(f){return f&&f.__esModule?f:{default:f}},xw=function(f,$=0){return b[f[$+0]]+b[f[$+1]]+b[f[$+2]]+b[f[$+3]]+"-"+b[f[$+4]]+b[f[$+5]]+"-"+b[f[$+6]]+b[f[$+7]]+"-"+b[f[$+8]]+b[f[$+9]]+"-"+b[f[$+10]]+b[f[$+11]]+b[f[$+12]]+b[f[$+13]]+b[f[$+14]]+b[f[$+15]]},F4=function(f,$=0){const w=xw(f,$);if(!L4.default(w))throw TypeError("Stringified UUID is invalid");return w};Object.defineProperty(_w,"__esModule",{value:!0});_w.default=void 0;_w.unsafeStringify=xw;var L4=R4(b0()),b=[];for(let f=0;f<256;++f)b.push((f+256).toString(16).slice(1));var I4=F4;_w.default=I4});var sw=M((gw)=>{var Q4=function(f){return f&&f.__esModule?f:{default:f}},O4=function(f,$,w){let G=$&&w||0;const U=$||new Array(16);f=f||{};let E=f.node||pw,W=f.clockseq!==void 0?f.clockseq:X1;if(E==null||W==null){const Y=f.random||(f.rng||Z4.default)();if(E==null)E=pw=[Y[0]|1,Y[1],Y[2],Y[3],Y[4],Y[5]];if(W==null)W=X1=(Y[6]<<8|Y[7])&16383}let L=f.msecs!==void 0?f.msecs:Date.now(),R=f.nsecs!==void 0?f.nsecs:Y1+1;const F=L-Z1+(R-Y1)/1e4;if(F<0&&f.clockseq===void 0)W=W+1&16383;if((F<0||L>Z1)&&f.nsecs===void 0)R=0;if(R>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Z1=L,Y1=R,X1=W,L+=12219292800000;const I=((L&268435455)*1e4+R)%4294967296;U[G++]=I>>>24&255,U[G++]=I>>>16&255,U[G++]=I>>>8&255,U[G++]=I&255;const X=L/4294967296*1e4&268435455;U[G++]=X>>>8&255,U[G++]=X&255,U[G++]=X>>>24&15|16,U[G++]=X>>>16&255,U[G++]=W>>>8|128,U[G++]=W&255;for(let Y=0;Y<6;++Y)U[G+Y]=E[Y];return $||Y4.unsafeStringify(U)};Object.defineProperty(gw,"__esModule",{value:!0});gw.default=void 0;var Z4=Q4(I1()),Y4=h0(),pw,X1,Z1=0,Y1=0,M4=O4;gw.default=M4});var Q1=M((lw)=>{var J4=function(f){return f&&f.__esModule?f:{default:f}},T4=function(f){if(!z4.default(f))throw TypeError("Invalid UUID");let $;const w=new Uint8Array(16);return w[0]=($=parseInt(f.slice(0,8),16))>>>24,w[1]=$>>>16&255,w[2]=$>>>8&255,w[3]=$&255,w[4]=($=parseInt(f.slice(9,13),16))>>>8,w[5]=$&255,w[6]=($=parseInt(f.slice(14,18),16))>>>8,w[7]=$&255,w[8]=($=parseInt(f.slice(19,23),16))>>>8,w[9]=$&255,w[10]=($=parseInt(f.slice(24,36),16))/1099511627776&255,w[11]=$/4294967296&255,w[12]=$>>>24&255,w[13]=$>>>16&255,w[14]=$>>>8&255,w[15]=$&255,w};Object.defineProperty(lw,"__esModule",{value:!0});lw.default=void 0;var z4=J4(b0()),K4=T4;lw.default=K4});var O1=M((ow)=>{var V4=function(f){return f&&f.__esModule?f:{default:f}},H4=function(f){f=unescape(encodeURIComponent(f));const $=[];for(let w=0;w<f.length;++w)$.push(f.charCodeAt(w));return $},C4=function(f,$,w){function G(U,E,W,L){var R;if(typeof U==="string")U=H4(U);if(typeof E==="string")E=B4.default(E);if(((R=E)===null||R===void 0?void 0:R.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let F=new Uint8Array(16+U.length);if(F.set(E),F.set(U,E.length),F=w(F),F[6]=F[6]&15|$,F[8]=F[8]&63|128,W){L=L||0;for(let I=0;I<16;++I)W[L+I]=F[I];return W}return A4.unsafeStringify(F)}try{G.name=f}catch(U){}return G.DNS=iw,G.URL=rw,G};Object.defineProperty(ow,"__esModule",{value:!0});ow.URL=ow.DNS=void 0;ow.default=C4;var A4=h0(),B4=V4(Q1()),iw="6ba7b810-9dad-11d1-80b4-00c04fd430c8";ow.DNS=iw;var rw="6ba7b811-9dad-11d1-80b4-00c04fd430c8";ow.URL=rw});var fU=M((aw)=>{var S4=function(f){return f&&f.__esModule?f:{default:f}},j4=function(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return P4.default.createHash("md5").update(f).digest()};Object.defineProperty(aw,"__esModule",{value:!0});aw.default=void 0;var P4=S4(import.meta.require("crypto")),b4=j4;aw.default=b4});var GU=M((wU)=>{var $U=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(wU,"__esModule",{value:!0});wU.default=void 0;var h4=$U(O1()),k4=$U(fU()),c4=h4.default("v3",48,k4.default),D4=c4;wU.default=D4});var LU=M((EU)=>{var v4=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(EU,"__esModule",{value:!0});EU.default=void 0;var u4=v4(import.meta.require("crypto")),y4={randomUUID:u4.default.randomUUID};EU.default=y4});var ZU=M((IU)=>{var FU=function(f){return f&&f.__esModule?f:{default:f}},d4=function(f,$,w){if(RU.default.randomUUID&&!$&&!f)return RU.default.randomUUID();f=f||{};const G=f.random||(f.rng||x4.default)();if(G[6]=G[6]&15|64,G[8]=G[8]&63|128,$){w=w||0;for(let U=0;U<16;++U)$[w+U]=G[U];return $}return _4.unsafeStringify(G)};Object.defineProperty(IU,"__esModule",{value:!0});IU.default=void 0;var RU=FU(LU()),x4=FU(I1()),_4=h0(),p4=d4;IU.default=p4});var OU=M((YU)=>{var n4=function(f){return f&&f.__esModule?f:{default:f}},s4=function(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return g4.default.createHash("sha1").update(f).digest()};Object.defineProperty(YU,"__esModule",{value:!0});YU.default=void 0;var g4=n4(import.meta.require("crypto")),l4=s4;YU.default=l4});var TU=M((zU)=>{var MU=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(zU,"__esModule",{value:!0});zU.default=void 0;var m4=MU(O1()),i4=MU(OU()),r4=m4.default("v5",80,i4.default),o4=r4;zU.default=o4});var BU=M((KU)=>{Object.defineProperty(KU,"__esModule",{value:!0});KU.default=void 0;var t4="00000000-0000-0000-0000-000000000000";KU.default=t4});var CU=M((VU)=>{var e4=function(f){return f&&f.__esModule?f:{default:f}},fI=function(f){if(!a4.default(f))throw TypeError("Invalid UUID");return parseInt(f.slice(14,15),16)};Object.defineProperty(VU,"__esModule",{value:!0});VU.default=void 0;var a4=e4(b0()),$I=fI;VU.default=$I});var M1=M((p)=>{var i=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(p,"__esModule",{value:!0});Object.defineProperty(p,"NIL",{enumerable:!0,get:function(){return WI.default}});Object.defineProperty(p,"parse",{enumerable:!0,get:function(){return II.default}});Object.defineProperty(p,"stringify",{enumerable:!0,get:function(){return FI.default}});Object.defineProperty(p,"v1",{enumerable:!0,get:function(){return wI.default}});Object.defineProperty(p,"v3",{enumerable:!0,get:function(){return UI.default}});Object.defineProperty(p,"v4",{enumerable:!0,get:function(){return GI.default}});Object.defineProperty(p,"v5",{enumerable:!0,get:function(){return EI.default}});Object.defineProperty(p,"validate",{enumerable:!0,get:function(){return RI.default}});Object.defineProperty(p,"version",{enumerable:!0,get:function(){return LI.default}});var wI=i(sw()),UI=i(GU()),GI=i(ZU()),EI=i(TU()),WI=i(BU()),LI=i(CU()),RI=i(b0()),FI=i(h0()),II=i(Q1())});var z1=M((X7,SU)=>{var{defineProperty:Xf,getOwnPropertyDescriptor:XI,getOwnPropertyNames:ZI}=Object,YI=Object.prototype.hasOwnProperty,Q0=(f,$)=>Xf(f,"name",{value:$,configurable:!0}),QI=(f,$)=>{for(var w in $)Xf(f,w,{get:$[w],enumerable:!0})},OI=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of ZI($))if(!YI.call(f,U)&&U!==w)Xf(f,U,{get:()=>$[U],enumerable:!(G=XI($,U))||G.enumerable})}return f},MI=(f)=>OI(Xf({},"__esModule",{value:!0}),f),qU={};QI(qU,{isClockSkewCorrectedError:()=>NU,isClockSkewError:()=>VI,isRetryableByTrait:()=>BI,isServerError:()=>CI,isThrottlingError:()=>HI,isTransientError:()=>PU});SU.exports=MI(qU);var zI=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],JI=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],TI=["TimeoutError","RequestTimeout","RequestTimeoutException"],KI=[500,502,503,504],AI=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],BI=Q0((f)=>f.$retryable!==void 0,"isRetryableByTrait"),VI=Q0((f)=>zI.includes(f.name),"isClockSkewError"),NU=Q0((f)=>{var $;return($=f.$metadata)==null?void 0:$.clockSkewCorrected},"isClockSkewCorrectedError"),HI=Q0((f)=>{var $,w;return(($=f.$metadata)==null?void 0:$.httpStatusCode)===429||JI.includes(f.name)||((w=f.$retryable)==null?void 0:w.throttling)==!0},"isThrottlingError"),PU=Q0((f)=>{var $;return NU(f)||TI.includes(f.name)||AI.includes((f==null?void 0:f.code)||"")||KI.includes((($=f.$metadata)==null?void 0:$.httpStatusCode)||0)},"isTransientError"),CI=Q0((f)=>{var $;if((($=f.$metadata)==null?void 0:$.httpStatusCode)!==void 0){const w=f.$metadata.httpStatusCode;if(500<=w&&w<=599&&!PU(f))return!0;return!1}return!1},"isServerError")});var gU=M((Z7,pU)=>{var{defineProperty:Zf,getOwnPropertyDescriptor:qI,getOwnPropertyNames:NI}=Object,PI=Object.prototype.hasOwnProperty,g=(f,$)=>Zf(f,"name",{value:$,configurable:!0}),SI=(f,$)=>{for(var w in $)Zf(f,w,{get:$[w],enumerable:!0})},jI=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of NI($))if(!PI.call(f,U)&&U!==w)Zf(f,U,{get:()=>$[U],enumerable:!(G=qI($,U))||G.enumerable})}return f},bI=(f)=>jI(Zf({},"__esModule",{value:!0}),f),bU={};SI(bU,{AdaptiveRetryStrategy:()=>vI,ConfiguredRetryStrategy:()=>yI,DEFAULT_MAX_ATTEMPTS:()=>J1,DEFAULT_RETRY_DELAY_BASE:()=>k0,DEFAULT_RETRY_MODE:()=>hI,DefaultRateLimiter:()=>cU,INITIAL_RETRY_TOKENS:()=>T1,INVOCATION_ID_HEADER:()=>cI,MAXIMUM_RETRY_DELAY:()=>K1,NO_RETRY_INCREMENT:()=>yU,REQUEST_HEADER:()=>DI,RETRY_COST:()=>uU,RETRY_MODES:()=>hU,StandardRetryStrategy:()=>A1,THROTTLING_RETRY_DELAY_BASE:()=>DU,TIMEOUT_RETRY_COST:()=>vU});pU.exports=bI(bU);var hU=((f)=>{return f.STANDARD="standard",f.ADAPTIVE="adaptive",f})(hU||{}),J1=3,hI="standard",kI=z1(),kU=class f{constructor($){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=($==null?void 0:$.beta)??0.7,this.minCapacity=($==null?void 0:$.minCapacity)??1,this.minFillRate=($==null?void 0:$.minFillRate)??0.5,this.scaleConstant=($==null?void 0:$.scaleConstant)??0.4,this.smooth=($==null?void 0:$.smooth)??0.8;const w=this.getCurrentTimeInSeconds();this.lastThrottleTime=w,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 w=($-this.currentCapacity)/this.fillRate*1000;await new Promise((G)=>setTimeout(G,w))}this.currentCapacity=this.currentCapacity-$}refillTokenBucket(){const $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}const w=($-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+w),this.lastTimestamp=$}updateClientSendingRate($){let w;if(this.updateMeasuredRate(),kI.isThrottlingError($)){const U=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=U,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle(U),this.enableTokenBucket()}else this.calculateTimeWindow(),w=this.cubicSuccess(this.getCurrentTimeInSeconds());const G=Math.min(w,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(),w=Math.floor($*2)/2;if(this.requestCount++,w>this.lastTxRateBucket){const G=this.requestCount/(w-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=w}}getPrecise($){return parseFloat($.toFixed(8))}};g(kU,"DefaultRateLimiter");var cU=kU,k0=100,K1=20000,DU=500,T1=500,uU=5,vU=10,yU=1,cI="amz-sdk-invocation-id",DI="amz-sdk-request",uI=g(()=>{let f=k0;return{computeNextBackoffDelay:g((G)=>{return Math.floor(Math.min(K1,Math.random()*2**G*f))},"computeNextBackoffDelay"),setDelayBase:g((G)=>{f=G},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),jU=g(({retryDelay:f,retryCount:$,retryCost:w})=>{return{getRetryCount:g(()=>$,"getRetryCount"),getRetryDelay:g(()=>Math.min(K1,f),"getRetryDelay"),getRetryCost:g(()=>w,"getRetryCost")}},"createDefaultRetryToken"),xU=class f{constructor($){this.maxAttempts=$,this.mode="standard",this.capacity=T1,this.retryBackoffStrategy=uI(),this.maxAttemptsProvider=typeof $==="function"?$:async()=>$}async acquireInitialRetryToken($){return jU({retryDelay:k0,retryCount:0})}async refreshRetryTokenForRetry($,w){const G=await this.getMaxAttempts();if(this.shouldRetry($,w,G)){const U=w.errorType;this.retryBackoffStrategy.setDelayBase(U==="THROTTLING"?DU:k0);const E=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),W=w.retryAfterHint?Math.max(w.retryAfterHint.getTime()-Date.now()||0,E):E,L=this.getCapacityCost(U);return this.capacity-=L,jU({retryDelay:W,retryCount:$.getRetryCount()+1,retryCost:L})}throw new Error("No retry token available")}recordSuccess($){this.capacity=Math.max(T1,this.capacity+($.getRetryCost()??yU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${J1}`),J1}}shouldRetry($,w,G){return $.getRetryCount()+1<G&&this.capacity>=this.getCapacityCost(w.errorType)&&this.isRetryableError(w.errorType)}getCapacityCost($){return $==="TRANSIENT"?vU:uU}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}};g(xU,"StandardRetryStrategy");var A1=xU,_U=class f{constructor($,w){this.maxAttemptsProvider=$,this.mode="adaptive";const{rateLimiter:G}=w??{};this.rateLimiter=G??new cU,this.standardRetryStrategy=new A1($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,w){return this.rateLimiter.updateClientSendingRate(w),this.standardRetryStrategy.refreshRetryTokenForRetry($,w)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}};g(_U,"AdaptiveRetryStrategy");var vI=_U,dU=class f extends A1{constructor($,w=k0){super(typeof $==="function"?$:async()=>$);if(typeof w==="number")this.computeNextBackoffDelay=()=>w;else this.computeNextBackoffDelay=w}async refreshRetryTokenForRetry($,w){const G=await super.refreshRetryTokenForRetry($,w);return G.getRetryDelay=()=>this.computeNextBackoffDelay(G.getRetryCount()),G}};g(dU,"ConfiguredRetryStrategy");var yI=dU});var lU=M((nU)=>{Object.defineProperty(nU,"__esModule",{value:!0});nU.getAwsChunkedEncodingStream=void 0;var xI=import.meta.require("stream"),_I=(f,$)=>{const{base64Encoder:w,bodyLengthChecker:G,checksumAlgorithmFn:U,checksumLocationName:E,streamHasher:W}=$,L=w!==void 0&&U!==void 0&&E!==void 0&&W!==void 0,R=L?W(U,f):void 0,F=new xI.Readable({read:()=>{}});return f.on("data",(I)=>{const X=G(I)||0;F.push(`${X.toString(16)}\r\n`),F.push(I),F.push("\r\n")}),f.on("end",async()=>{if(F.push("0\r\n"),L){const I=w(await R);F.push(`${E}:${I}\r\n`),F.push("\r\n")}F.push(null)}),F};nU.getAwsChunkedEncodingStream=_I});var FG=M((Q7,RG)=>{async function H1(f,$,w=mU){const G=$.headers??{},U=G.Expect||G.expect;let E=-1,W=!1;if(U==="100-continue")await Promise.race([new Promise((L)=>{E=Number(setTimeout(L,Math.max(mU,w)))}),new Promise((L)=>{f.on("continue",()=>{clearTimeout(E),L()}),f.on("error",()=>{W=!0,clearTimeout(E),L()})})]);if(!W)$G(f,$.body)}var $G=function(f,$){if($ instanceof fG.Readable){$.pipe(f);return}if($){if(Buffer.isBuffer($)||typeof $==="string"){f.end($);return}const w=$;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){f.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}f.end(Buffer.from($));return}f.end()};async function LG(f){const $=[],w=f.getReader();let G=!1,U=0;while(!G){const{done:L,value:R}=await w.read();if(R)$.push(R),U+=R.length;G=L}const E=new Uint8Array(U);let W=0;for(let L of $)E.set(L,W),W+=L.length;return E}var{create:pI,defineProperty:c0,getOwnPropertyDescriptor:gI,getOwnPropertyNames:nI,getPrototypeOf:sI}=Object,lI=Object.prototype.hasOwnProperty,q=(f,$)=>c0(f,"name",{value:$,configurable:!0}),mI=(f,$)=>{for(var w in $)c0(f,w,{get:$[w],enumerable:!0})},rU=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of nI($))if(!lI.call(f,U)&&U!==w)c0(f,U,{get:()=>$[U],enumerable:!(G=gI($,U))||G.enumerable})}return f},iI=(f,$,w)=>(w=f!=null?pI(sI(f)):{},rU($||!f||!f.__esModule?c0(w,"default",{value:f,enumerable:!0}):w,f)),rI=(f)=>rU(c0({},"__esModule",{value:!0}),f),oU={};mI(oU,{DEFAULT_REQUEST_TIMEOUT:()=>fX,NodeHttp2Handler:()=>EX,NodeHttpHandler:()=>$X,streamCollector:()=>LX});RG.exports=rI(oU);var tU=G0(),aU=dI(),B1=import.meta.require("http"),V1=import.meta.require("https"),oI=["ECONNRESET","EPIPE","ETIMEDOUT"],eU=q((f)=>{const $={};for(let w of Object.keys(f)){const G=f[w];$[w]=Array.isArray(G)?G.join(","):G}return $},"getTransformedHeaders"),tI=q((f,$,w=0)=>{if(!w)return;const G=setTimeout(()=>{f.destroy(),$(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w);f.on("socket",(U)=>{if(U.connecting)U.on("connect",()=>{clearTimeout(G)});else clearTimeout(G)})},"setConnectionTimeout"),aI=q((f,{keepAlive:$,keepAliveMsecs:w})=>{if($!==!0)return;f.on("socket",(G)=>{G.setKeepAlive($,w||0)})},"setSocketKeepAlive"),eI=q((f,$,w=0)=>{f.setTimeout(w,()=>{f.destroy(),$(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),fG=import.meta.require("stream"),mU=1000;q(H1,"writeRequestBody");q($G,"writeBody");var fX=0,wG=class f{constructor($){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((w,G)=>{if(typeof $==="function")$().then((U)=>{w(this.resolveDefaultConfig(U))}).catch(G);else w(this.resolveDefaultConfig($))})}static create($){if(typeof($==null?void 0:$.handle)==="function")return $;return new f($)}static checkSocketUsage($,w,G=console){var U,E,W;const{sockets:L,requests:R,maxSockets:F}=$;if(typeof F!=="number"||F===Infinity)return w;const I=15000;if(Date.now()-I<w)return w;if(L&&R)for(let X in L){const Y=((U=L[X])==null?void 0:U.length)??0,Z=((E=R[X])==null?void 0:E.length)??0;if(Y>=F&&Z>=2*F)return(W=G==null?void 0:G.warn)==null||W.call(G,`@smithy/node-http-handler:WARN - socket usage at capacity=${Y} and ${Z} 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 w}resolveDefaultConfig($){const{requestTimeout:w,connectionTimeout:G,socketTimeout:U,httpAgent:E,httpsAgent:W}=$||{};return{connectionTimeout:G,requestTimeout:w??U,httpAgent:(()=>{if(E instanceof B1.Agent||typeof(E==null?void 0:E.destroy)==="function")return E;return new B1.Agent({keepAlive:!0,maxSockets:50,...E})})(),httpsAgent:(()=>{if(W instanceof V1.Agent||typeof(W==null?void 0:W.destroy)==="function")return W;return new V1.Agent({keepAlive:!0,maxSockets:50,...W})})(),logger:console}}destroy(){var $,w,G,U;(w=($=this.config)==null?void 0:$.httpAgent)==null||w.destroy(),(U=(G=this.config)==null?void 0:G.httpsAgent)==null||U.destroy()}async handle($,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;let G;return new Promise((U,E)=>{let W=void 0;const L=q(async(J)=>{await W,clearTimeout(G),U(J)},"resolve"),R=q(async(J)=>{await W,clearTimeout(G),E(J)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(w==null?void 0:w.aborted){const J=new Error("Request aborted");J.name="AbortError",R(J);return}const F=$.protocol==="https:",I=F?this.config.httpsAgent:this.config.httpAgent;G=setTimeout(()=>{this.socketWarningTimestamp=f.checkSocketUsage(I,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const X=aU.buildQueryString($.query||{});let Y=void 0;if($.username!=null||$.password!=null){const J=$.username??"",A=$.password??"";Y=`${J}:${A}`}let Z=$.path;if(X)Z+=`?${X}`;if($.fragment)Z+=`#${$.fragment}`;const O={headers:$.headers,host:$.hostname,method:$.method,path:Z,port:$.port,agent:I,auth:Y},T=(F?V1.request:B1.request)(O,(J)=>{const A=new tU.HttpResponse({statusCode:J.statusCode||-1,reason:J.statusMessage,headers:eU(J.headers),body:J});L({response:A})});if(T.on("error",(J)=>{if(oI.includes(J.code))R(Object.assign(J,{name:"TimeoutError"}));else R(J)}),tI(T,R,this.config.connectionTimeout),eI(T,R,this.config.requestTimeout),w){const J=q(()=>{T.destroy();const A=new Error("Request aborted");A.name="AbortError",R(A)},"onAbort");if(typeof w.addEventListener==="function"){const A=w;A.addEventListener("abort",J,{once:!0}),T.once("close",()=>A.removeEventListener("abort",J))}else w.onabort=J}const K=O.agent;if(typeof K==="object"&&"keepAlive"in K)aI(T,{keepAlive:K.keepAlive,keepAliveMsecs:K.keepAliveMsecs});W=H1(T,$,this.config.requestTimeout).catch((J)=>{return clearTimeout(G),E(J)})})}updateHttpClientConfig($,w){this.config=void 0,this.configProvider=this.configProvider.then((G)=>{return{...G,[$]:w}})}httpHandlerConfigs(){return this.config??{}}};q(wG,"NodeHttpHandler");var $X=wG,iU=import.meta.require("http2"),wX=iI(import.meta.require("http2")),UG=class f{constructor($){this.sessions=[],this.sessions=$??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast($){this.sessions.push($)}contains($){return this.sessions.includes($)}remove($){this.sessions=this.sessions.filter((w)=>w!==$)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy($){for(let w of this.sessions)if(w===$){if(!w.destroyed)w.destroy()}}};q(UG,"NodeHttp2ConnectionPool");var UX=UG,GG=class f{constructor($){if(this.sessionCache=new Map,this.config=$,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease($,w){const G=this.getUrlString($),U=this.sessionCache.get(G);if(U){const R=U.poll();if(R&&!this.config.disableConcurrency)return R}const E=wX.default.connect(G);if(this.config.maxConcurrency)E.settings({maxConcurrentStreams:this.config.maxConcurrency},(R)=>{if(R)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+$.destination.toString())});E.unref();const W=q(()=>{E.destroy(),this.deleteSession(G,E)},"destroySessionCb");if(E.on("goaway",W),E.on("error",W),E.on("frameError",W),E.on("close",()=>this.deleteSession(G,E)),w.requestTimeout)E.setTimeout(w.requestTimeout,W);const L=this.sessionCache.get(G)||new UX;return L.offerLast(E),this.sessionCache.set(G,L),E}deleteSession($,w){const G=this.sessionCache.get($);if(!G)return;if(!G.contains(w))return;G.remove(w),this.sessionCache.set($,G)}release($,w){var G;const U=this.getUrlString($);(G=this.sessionCache.get(U))==null||G.offerLast(w)}destroy(){for(let[$,w]of this.sessionCache){for(let G of w){if(!G.destroyed)G.destroy();w.remove(G)}this.sessionCache.delete($)}}setMaxConcurrentStreams($){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=$}setDisableConcurrentStreams($){this.config.disableConcurrency=$}getUrlString($){return $.destination.toString()}};q(GG,"NodeHttp2ConnectionManager");var GX=GG,EG=class f{constructor($){this.metadata={handlerProtocol:"h2"},this.connectionManager=new GX({}),this.configProvider=new Promise((w,G)=>{if(typeof $==="function")$().then((U)=>{w(U||{})}).catch(G);else w($||{})})}static create($){if(typeof($==null?void 0:$.handle)==="function")return $;return new f($)}destroy(){this.connectionManager.destroy()}async handle($,{abortSignal:w}={}){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:G,disableConcurrentStreams:U}=this.config;return new Promise((E,W)=>{var L;let R=!1,F=void 0;const I=q(async(C)=>{await F,E(C)},"resolve"),X=q(async(C)=>{await F,W(C)},"reject");if(w==null?void 0:w.aborted){R=!0;const C=new Error("Request aborted");C.name="AbortError",X(C);return}const{hostname:Y,method:Z,port:O,protocol:z,query:T}=$;let K="";if($.username!=null||$.password!=null){const C=$.username??"",_=$.password??"";K=`${C}:${_}@`}const J=`${z}//${K}${Y}${O?`:${O}`:""}`,A={destination:new URL(J)},j=this.connectionManager.lease(A,{requestTimeout:(L=this.config)==null?void 0:L.sessionTimeout,disableConcurrentStreams:U||!1}),k=q((C)=>{if(U)this.destroySession(j);R=!0,X(C)},"rejectWithDestroy"),S$=aU.buildQueryString(T||{});let tf=$.path;if(S$)tf+=`?${S$}`;if($.fragment)tf+=`#${$.fragment}`;const u=j.request({...$.headers,[iU.constants.HTTP2_HEADER_PATH]:tf,[iU.constants.HTTP2_HEADER_METHOD]:Z});if(j.ref(),u.on("response",(C)=>{const _=new tU.HttpResponse({statusCode:C[":status"]||-1,headers:eU(C),body:u});if(R=!0,I({response:_}),U)j.close(),this.connectionManager.deleteSession(J,j)}),G)u.setTimeout(G,()=>{u.close();const C=new Error(`Stream timed out because of no activity for ${G} ms`);C.name="TimeoutError",k(C)});if(w){const C=q(()=>{u.close();const _=new Error("Request aborted");_.name="AbortError",k(_)},"onAbort");if(typeof w.addEventListener==="function"){const _=w;_.addEventListener("abort",C,{once:!0}),u.once("close",()=>_.removeEventListener("abort",C))}else w.onabort=C}u.on("frameError",(C,_,rR)=>{k(new Error(`Frame type id ${C} in stream id ${rR} has failed with code ${_}.`))}),u.on("error",k),u.on("aborted",()=>{k(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${u.rstCode}.`))}),u.on("close",()=>{if(j.unref(),U)j.destroy();if(!R)k(new Error("Unexpected error: http2 request did not get a response"))}),F=H1(u,$,G)})}updateHttpClientConfig($,w){this.config=void 0,this.configProvider=this.configProvider.then((G)=>{return{...G,[$]:w}})}httpHandlerConfigs(){return this.config??{}}destroySession($){if(!$.destroyed)$.destroy()}};q(EG,"NodeHttp2Handler");var EX=EG,WG=class f extends fG.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write($,w,G){this.bufferedBytes.push($),G()}};q(WG,"Collector");var WX=WG,LX=q((f)=>{if(RX(f))return LG(f);return new Promise(($,w)=>{const G=new WX;f.pipe(G),f.on("error",(U)=>{G.end(),w(U)}),G.on("error",w),G.on("finish",function(){const U=new Uint8Array(Buffer.concat(this.bufferedBytes));$(U)})})},"streamCollector"),RX=q((f)=>typeof ReadableStream==="function"&&f instanceof ReadableStream,"isReadableStreamInstance");q(LG,"collectReadableStream")});var D0=M((IG)=>{Object.defineProperty(IG,"__esModule",{value:!0});IG.isReadableStream=void 0;var FX=(f)=>{var $;return typeof ReadableStream==="function"&&((($=f===null||f===void 0?void 0:f.constructor)===null||$===void 0?void 0:$.name)===ReadableStream.name||f instanceof ReadableStream)};IG.isReadableStream=FX});var TG=M((zG)=>{Object.defineProperty(zG,"__esModule",{value:!0});zG.sdkStreamMixin=void 0;var XX=IX(),ZX=OG(),YX=MG(),QX=O0(),ZG=D0(),YG="The stream has already been transformed.",OX=(f)=>{var $,w;if(!QG(f)&&!ZG.isReadableStream(f)){const W=((w=($=f===null||f===void 0?void 0:f.__proto__)===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)||f;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${W}`)}let G=!1;const U=async()=>{if(G)throw new Error(YG);return G=!0,await XX.streamCollector(f)},E=(W)=>{if(typeof W.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 W.stream()};return Object.assign(f,{transformToByteArray:U,transformToString:async(W)=>{const L=await U();if(W==="base64")return ZX.toBase64(L);else if(W==="hex")return YX.toHex(L);else if(W===void 0||W==="utf8"||W==="utf-8")return QX.toUtf8(L);else if(typeof TextDecoder==="function")return new TextDecoder(W).decode(L);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(G)throw new Error(YG);if(G=!0,QG(f))return E(f);else if(ZG.isReadableStream(f))return f;else throw new Error(`Cannot transform payload to web stream, got ${f}`)}})};zG.sdkStreamMixin=OX;var QG=(f)=>typeof Blob==="function"&&f instanceof Blob});var VG=M((AG)=>{Object.defineProperty(AG,"__esModule",{value:!0});AG.sdkStreamMixin=void 0;var zX=FG(),JX=MX(),C1=import.meta.require("stream"),TX=import.meta.require("util"),KX=TG(),KG="The stream has already been transformed.",AX=(f)=>{var $,w;if(!(f instanceof C1.Readable))try{return KX.sdkStreamMixin(f)}catch(E){const W=((w=($=f===null||f===void 0?void 0:f.__proto__)===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)||f;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${W}`)}let G=!1;const U=async()=>{if(G)throw new Error(KG);return G=!0,await zX.streamCollector(f)};return Object.assign(f,{transformToByteArray:U,transformToString:async(E)=>{const W=await U();if(E===void 0||Buffer.isEncoding(E))return JX.fromArrayBuffer(W.buffer,W.byteOffset,W.byteLength).toString(E);else return new TX.TextDecoder(E).decode(W)},transformToWebStream:()=>{if(G)throw new Error(KG);if(f.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof C1.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 G=!0,C1.Readable.toWeb(f)}})};AG.sdkStreamMixin=AX});var qG=M((HG)=>{async function BX(f){if(typeof f.stream==="function")f=f.stream();return f.tee()}Object.defineProperty(HG,"__esModule",{value:!0});HG.splitStream=void 0;HG.splitStream=BX});var jG=M((PG)=>{async function CX(f){if(HX.isReadableStream(f))return VX.splitStream(f);const $=new NG.PassThrough,w=new NG.PassThrough;return f.pipe($),f.pipe(w),[$,w]}Object.defineProperty(PG,"__esModule",{value:!0});PG.splitStream=void 0;var NG=import.meta.require("stream"),VX=qG(),HX=D0();PG.splitStream=CX});var kG=M((bG)=>{async function qX(f,$){var w;let G=0;const U=[],E=f.getReader();let W=!1;while(!W){const{done:F,value:I}=await E.read();if(I)U.push(I),G+=(w=I===null||I===void 0?void 0:I.byteLength)!==null&&w!==void 0?w:0;if(G>=$)break;W=F}E.releaseLock();const L=new Uint8Array(Math.min($,G));let R=0;for(let F of U){if(F.byteLength>L.byteLength-R){L.set(F.subarray(0,L.byteLength-R),R);break}else L.set(F,R);R+=F.length}return L}Object.defineProperty(bG,"__esModule",{value:!0});bG.headStream=void 0;bG.headStream=qX});var vG=M((DG)=>{Object.defineProperty(DG,"__esModule",{value:!0});DG.headStream=void 0;var NX=import.meta.require("stream"),PX=kG(),SX=D0(),jX=(f,$)=>{if(SX.isReadableStream(f))return PX.headStream(f,$);return new Promise((w,G)=>{const U=new cG;U.limit=$,f.pipe(U),f.on("error",(E)=>{U.end(),G(E)}),U.on("error",G),U.on("finish",function(){const E=new Uint8Array(Buffer.concat(this.buffers));w(E)})})};DG.headStream=jX;class cG extends NX.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(f,$,w){var G;if(this.buffers.push(f),this.bytesBuffered+=(G=f.byteLength)!==null&&G!==void 0?G:0,this.bytesBuffered>=this.limit){const U=this.bytesBuffered-this.limit,E=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=E.subarray(0,E.byteLength-U),this.emit("finish")}w()}}});var gG=M((B7,W0)=>{var _G=function(f,$="utf-8"){if($==="base64")return yG.toBase64(f);return xG.toUtf8(f)},dG=function(f,$){if($==="base64")return N1.mutate(yG.fromBase64(f));return N1.mutate(xG.fromUtf8(f))},Yf=Object.defineProperty,bX=Object.getOwnPropertyDescriptor,hX=Object.getOwnPropertyNames,kX=Object.prototype.hasOwnProperty,P1=(f,$)=>Yf(f,"name",{value:$,configurable:!0}),cX=(f,$)=>{for(var w in $)Yf(f,w,{get:$[w],enumerable:!0})},q1=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of hX($))if(!kX.call(f,U)&&U!==w)Yf(f,U,{get:()=>$[U],enumerable:!(G=bX($,U))||G.enumerable})}return f},u0=(f,$,w)=>(q1(f,$,"default"),w&&q1(w,$,"default")),DX=(f)=>q1(Yf({},"__esModule",{value:!0}),f),E0={};cX(E0,{Uint8ArrayBlobAdapter:()=>N1});W0.exports=DX(E0);var yG=OG(),xG=O0();P1(_G,"transformToString");P1(dG,"transformFromString");var pG=class f extends Uint8Array{static fromString($,w="utf-8"){switch(typeof $){case"string":return dG($,w);default:throw new Error(`Unsupported conversion from ${typeof $} to Uint8ArrayBlobAdapter.`)}}static mutate($){return Object.setPrototypeOf($,f.prototype),$}transformToString($="utf-8"){return _G(this,$)}};P1(pG,"Uint8ArrayBlobAdapter");var N1=pG;u0(E0,lU(),W0.exports);u0(E0,VG(),W0.exports);u0(E0,jG(),W0.exports);u0(E0,vG(),W0.exports);u0(E0,D0(),W0.exports)});var T0=M((V7,ZE)=>{var UE=function(f){const $=f.getUTCFullYear(),w=f.getUTCMonth(),G=f.getUTCDay(),U=f.getUTCDate(),E=f.getUTCHours(),W=f.getUTCMinutes(),L=f.getUTCSeconds(),R=U<10?`0${U}`:`${U}`,F=E<10?`0${E}`:`${E}`,I=W<10?`0${W}`:`${W}`,X=L<10?`0${L}`:`${L}`;return`${I2[G]}, ${R} ${x1[w]} ${$} ${F}:${I}:${X} GMT`},Mf=function(f){return encodeURIComponent(f).replace(/[!'()*]/g,function($){return"%"+$.charCodeAt(0).toString(16).toUpperCase()})},_1=function(f,$,w){let G,U,E;if(typeof $==="undefined"&&typeof w==="undefined")G={},E=f;else if(G=f,typeof $==="function")return U=$,E=w,g2(G,U,E);else E=$;for(let W of Object.keys(E)){if(!Array.isArray(E[W])){G[W]=E[W];continue}IE(G,null,E,W)}return G},XE=function(f,$,w){if(w<=0||!Number.isInteger(w))throw new Error("Invalid number of delimiters ("+w+") for splitEvery.");const G=f.split($);if(w===1)return G;const U=[];let E="";for(let W=0;W<G.length;W++){if(E==="")E=G[W];else E+=$+G[W];if((W+1)%w===0)U.push(E),E=""}if(E!=="")U.push(E);return U},zf=Object.defineProperty,vX=Object.getOwnPropertyDescriptor,yX=Object.getOwnPropertyNames,xX=Object.prototype.hasOwnProperty,Q=(f,$)=>zf(f,"name",{value:$,configurable:!0}),_X=(f,$)=>{for(var w in $)zf(f,w,{get:$[w],enumerable:!0})},dX=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of yX($))if(!xX.call(f,U)&&U!==w)zf(f,U,{get:()=>$[U],enumerable:!(G=vX($,U))||G.enumerable})}return f},pX=(f)=>dX(zf({},"__esModule",{value:!0}),f),sG={};_X(sG,{Client:()=>nX,Command:()=>oG,LazyJsonString:()=>_2,NoOpLogger:()=>gX,SENSITIVE_STRING:()=>mX,ServiceException:()=>P2,StringWrapper:()=>d0,_json:()=>D1,collectBody:()=>sX,convertMap:()=>d2,createAggregatedClient:()=>iX,dateToUtcString:()=>UE,decorateServiceException:()=>EE,emitWarningIfUnsupportedVersion:()=>h2,expectBoolean:()=>oX,expectByte:()=>c1,expectFloat32:()=>Qf,expectInt:()=>aX,expectInt32:()=>h1,expectLong:()=>x0,expectNonNull:()=>f2,expectNumber:()=>y0,expectObject:()=>aG,expectShort:()=>k1,expectString:()=>$2,expectUnion:()=>w2,extendedEncodeURIComponent:()=>Mf,getArrayIfSingleItem:()=>x2,getDefaultClientConfiguration:()=>v2,getDefaultExtensionConfiguration:()=>LE,getValueFromTextNode:()=>RE,handleFloat:()=>E2,limitedParseDouble:()=>y1,limitedParseFloat:()=>W2,limitedParseFloat32:()=>L2,loadConfigsForDefaultMode:()=>b2,logger:()=>_0,map:()=>_1,parseBoolean:()=>rX,parseEpochTimestamp:()=>T2,parseRfc3339DateTime:()=>Z2,parseRfc3339DateTimeWithOffset:()=>Q2,parseRfc7231DateTime:()=>J2,resolveDefaultRuntimeConfig:()=>y2,resolvedPath:()=>l2,serializeDateTime:()=>i2,serializeFloat:()=>m2,splitEvery:()=>XE,strictParseByte:()=>wE,strictParseDouble:()=>v1,strictParseFloat:()=>U2,strictParseFloat32:()=>eG,strictParseInt:()=>R2,strictParseInt32:()=>F2,strictParseLong:()=>$E,strictParseShort:()=>M0,take:()=>p2,throwDefaultError:()=>WE,withBaseException:()=>S2});ZE.exports=pX(sG);var lG=class f{trace(){}debug(){}info(){}warn(){}error(){}};Q(lG,"NoOpLogger");var gX=lG,mG=uX(),iG=class f{constructor($){this.middlewareStack=mG.constructStack(),this.config=$}send($,w,G){const U=typeof w!=="function"?w:void 0,E=typeof w==="function"?w:G,W=$.resolveMiddleware(this.middlewareStack,this.config,U);if(E)W($).then((L)=>E(null,L.output),(L)=>E(L)).catch(()=>{});else return W($).then((L)=>L.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};Q(iG,"Client");var nX=iG,S1=gG(),sX=Q(async(f=new Uint8Array,$)=>{if(f instanceof Uint8Array)return S1.Uint8ArrayBlobAdapter.mutate(f);if(!f)return S1.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const w=$.streamCollector(f);return S1.Uint8ArrayBlobAdapter.mutate(await w)},"collectBody"),b1=N0(),rG=class f{constructor(){this.middlewareStack=mG.constructStack()}static classBuilder(){return new lX}resolveMiddlewareWithContext($,w,G,{middlewareFn:U,clientName:E,commandName:W,inputFilterSensitiveLog:L,outputFilterSensitiveLog:R,smithyContext:F,additionalContext:I,CommandCtor:X}){for(let T of U.bind(this)(X,$,w,G))this.middlewareStack.use(T);const Y=$.concat(this.middlewareStack),{logger:Z}=w,O={logger:Z,clientName:E,commandName:W,inputFilterSensitiveLog:L,outputFilterSensitiveLog:R,[b1.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...I},{requestHandler:z}=w;return Y.resolve((T)=>z.handle(T.request,G||{}),O)}};Q(rG,"Command");var oG=rG,tG=class f{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=($)=>$,this._outputFilterSensitiveLog=($)=>$,this._serializer=null,this._deserializer=null}init($){this._init=$}ep($){return this._ep=$,this}m($){return this._middlewareFn=$,this}s($,w,G={}){return this._smithyContext={service:$,operation:w,...G},this}c($={}){return this._additionalContext=$,this}n($,w){return this._clientName=$,this._commandName=w,this}f($=(G)=>G,w=(G)=>G){return this._inputFilterSensitiveLog=$,this._outputFilterSensitiveLog=w,this}ser($){return this._serializer=$,this}de($){return this._deserializer=$,this}build(){var $;const w=this;let G;return G=($=class extends oG{constructor(...[U]){super();this.serialize=w._serializer,this.deserialize=w._deserializer,this.input=U??{},w._init(this)}static getEndpointParameterInstructions(){return w._ep}resolveMiddleware(U,E,W){return this.resolveMiddlewareWithContext(U,E,W,{CommandCtor:G,middlewareFn:w._middlewareFn,clientName:w._clientName,commandName:w._commandName,inputFilterSensitiveLog:w._inputFilterSensitiveLog,outputFilterSensitiveLog:w._outputFilterSensitiveLog,smithyContext:w._smithyContext,additionalContext:w._additionalContext})}},Q($,"CommandRef"),$)}};Q(tG,"ClassBuilder");var lX=tG,mX="***SensitiveInformation***",iX=Q((f,$)=>{for(let w of Object.keys(f)){const G=f[w],U=Q(async function(W,L,R){const F=new G(W);if(typeof L==="function")this.send(F,L);else if(typeof R==="function"){if(typeof L!=="object")throw new Error(`Expected http options but got ${typeof L}`);this.send(F,L||{},R)}else return this.send(F,L)},"methodImpl"),E=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");$.prototype[E]=U}},"createAggregatedClient"),rX=Q((f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},"parseBoolean"),oX=Q((f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)_0.warn(Of(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){const $=f.toLowerCase();if($==="false"||$==="true")_0.warn(Of(`Expected boolean, got ${typeof f}: ${f}`));if($==="false")return!1;if($==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},"expectBoolean"),y0=Q((f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){const $=parseFloat(f);if(!Number.isNaN($)){if(String($)!==String(f))_0.warn(Of(`Expected number but observed string: ${f}`));return $}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},"expectNumber"),tX=Math.ceil(340282346638528860000000000000000000000),Qf=Q((f)=>{const $=y0(f);if($!==void 0&&!Number.isNaN($)&&$!==Infinity&&$!==(-Infinity)){if(Math.abs($)>tX)throw new TypeError(`Expected 32-bit float, got ${f}`)}return $},"expectFloat32"),x0=Q((f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},"expectLong"),aX=x0,h1=Q((f)=>u1(f,32),"expectInt32"),k1=Q((f)=>u1(f,16),"expectShort"),c1=Q((f)=>u1(f,8),"expectByte"),u1=Q((f,$)=>{const w=x0(f);if(w!==void 0&&eX(w,$)!==w)throw new TypeError(`Expected ${$}-bit integer, got ${f}`);return w},"expectSizedInt"),eX=Q((f,$)=>{switch($){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},"castInt"),f2=Q((f,$)=>{if(f===null||f===void 0){if($)throw new TypeError(`Expected a non-null value for ${$}`);throw new TypeError("Expected a non-null value")}return f},"expectNonNull"),aG=Q((f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;const $=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${$}: ${f}`)},"expectObject"),$2=Q((f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return _0.warn(Of(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},"expectString"),w2=Q((f)=>{if(f===null||f===void 0)return;const $=aG(f),w=Object.entries($).filter(([,G])=>G!=null).map(([G])=>G);if(w.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(w.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${w} were not null.`);return $},"expectUnion"),v1=Q((f)=>{if(typeof f=="string")return y0(J0(f));return y0(f)},"strictParseDouble"),U2=v1,eG=Q((f)=>{if(typeof f=="string")return Qf(J0(f));return Qf(f)},"strictParseFloat32"),G2=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,J0=Q((f)=>{const $=f.match(G2);if($===null||$[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},"parseNumber"),y1=Q((f)=>{if(typeof f=="string")return fE(f);return y0(f)},"limitedParseDouble"),E2=y1,W2=y1,L2=Q((f)=>{if(typeof f=="string")return fE(f);return Qf(f)},"limitedParseFloat32"),fE=Q((f)=>{switch(f){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return (-Infinity);default:throw new Error(`Unable to parse float value: ${f}`)}},"parseFloatString"),$E=Q((f)=>{if(typeof f==="string")return x0(J0(f));return x0(f)},"strictParseLong"),R2=$E,F2=Q((f)=>{if(typeof f==="string")return h1(J0(f));return h1(f)},"strictParseInt32"),M0=Q((f)=>{if(typeof f==="string")return k1(J0(f));return k1(f)},"strictParseShort"),wE=Q((f)=>{if(typeof f==="string")return c1(J0(f));return c1(f)},"strictParseByte"),Of=Q((f)=>{return String(new TypeError(f).stack||f).split("\n").slice(0,5).filter(($)=>!$.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),_0={warn:console.warn},I2=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],x1=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Q(UE,"dateToUtcString");var X2=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Z2=Q((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const $=X2.exec(f);if(!$)throw new TypeError("Invalid RFC-3339 date-time value");const[w,G,U,E,W,L,R,F]=$,I=M0(z0(G)),X=l(U,"month",1,12),Y=l(E,"day",1,31);return v0(I,X,Y,{hours:W,minutes:L,seconds:R,fractionalMilliseconds:F})},"parseRfc3339DateTime"),Y2=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Q2=Q((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const $=Y2.exec(f);if(!$)throw new TypeError("Invalid RFC-3339 date-time value");const[w,G,U,E,W,L,R,F,I]=$,X=M0(z0(G)),Y=l(U,"month",1,12),Z=l(E,"day",1,31),O=v0(X,Y,Z,{hours:W,minutes:L,seconds:R,fractionalMilliseconds:F});if(I.toUpperCase()!="Z")O.setTime(O.getTime()-N2(I));return O},"parseRfc3339DateTimeWithOffset"),O2=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$/),M2=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$/),z2=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})$/),J2=Q((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let $=O2.exec(f);if($){const[w,G,U,E,W,L,R,F]=$;return v0(M0(z0(E)),j1(U),l(G,"day",1,31),{hours:W,minutes:L,seconds:R,fractionalMilliseconds:F})}if($=M2.exec(f),$){const[w,G,U,E,W,L,R,F]=$;return B2(v0(K2(E),j1(U),l(G,"day",1,31),{hours:W,minutes:L,seconds:R,fractionalMilliseconds:F}))}if($=z2.exec(f),$){const[w,G,U,E,W,L,R,F]=$;return v0(M0(z0(F)),j1(G),l(U.trimLeft(),"day",1,31),{hours:E,minutes:W,seconds:L,fractionalMilliseconds:R})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),T2=Q((f)=>{if(f===null||f===void 0)return;let $;if(typeof f==="number")$=f;else if(typeof f==="string")$=v1(f);else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN($)||$===Infinity||$===(-Infinity))throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round($*1000))},"parseEpochTimestamp"),v0=Q((f,$,w,G)=>{const U=$-1;return H2(f,U,w),new Date(Date.UTC(f,U,w,l(G.hours,"hour",0,23),l(G.minutes,"minute",0,59),l(G.seconds,"seconds",0,60),q2(G.fractionalMilliseconds)))},"buildDate"),K2=Q((f)=>{const $=(new Date()).getUTCFullYear(),w=Math.floor($/100)*100+M0(z0(f));if(w<$)return w+100;return w},"parseTwoDigitYear"),A2=1576800000000,B2=Q((f)=>{if(f.getTime()-(new Date()).getTime()>A2)return new Date(Date.UTC(f.getUTCFullYear()-100,f.getUTCMonth(),f.getUTCDate(),f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()));return f},"adjustRfc850Year"),j1=Q((f)=>{const $=x1.indexOf(f);if($<0)throw new TypeError(`Invalid month: ${f}`);return $+1},"parseMonthByShortName"),V2=[31,28,31,30,31,30,31,31,30,31,30,31],H2=Q((f,$,w)=>{let G=V2[$];if($===1&&C2(f))G=29;if(w>G)throw new TypeError(`Invalid day for ${x1[$]} in ${f}: ${w}`)},"validateDayOfMonth"),C2=Q((f)=>{return f%4===0&&(f%100!==0||f%400===0)},"isLeapYear"),l=Q((f,$,w,G)=>{const U=wE(z0(f));if(U<w||U>G)throw new TypeError(`${$} must be between ${w} and ${G}, inclusive`);return U},"parseDateValue"),q2=Q((f)=>{if(f===null||f===void 0)return 0;return eG("0."+f)*1000},"parseMilliseconds"),N2=Q((f)=>{const $=f[0];let w=1;if($=="+")w=1;else if($=="-")w=-1;else throw new TypeError(`Offset direction, ${$}, must be "+" or "-"`);const G=Number(f.substring(1,3)),U=Number(f.substring(4,6));return w*(G*60+U)*60*1000},"parseOffsetToMilliseconds"),z0=Q((f)=>{let $=0;while($<f.length-1&&f.charAt($)==="0")$++;if($===0)return f;return f.slice($)},"stripLeadingZeroes"),GE=class f extends Error{constructor($){super($.message);Object.setPrototypeOf(this,f.prototype),this.name=$.name,this.$fault=$.$fault,this.$metadata=$.$metadata}};Q(GE,"ServiceException");var P2=GE,EE=Q((f,$={})=>{Object.entries($).filter(([,G])=>G!==void 0).forEach(([G,U])=>{if(f[G]==null||f[G]==="")f[G]=U});const w=f.message||f.Message||"UnknownError";return f.message=w,delete f.Message,f},"decorateServiceException"),WE=Q(({output:f,parsedBody:$,exceptionCtor:w,errorCode:G})=>{const U=j2(f),E=U.httpStatusCode?U.httpStatusCode+"":void 0,W=new w({name:($==null?void 0:$.code)||($==null?void 0:$.Code)||G||E||"UnknownError",$fault:"client",$metadata:U});throw EE(W,$)},"throwDefaultError"),S2=Q((f)=>{return({output:$,parsedBody:w,errorCode:G})=>{WE({output:$,parsedBody:w,exceptionCtor:f,errorCode:G})}},"withBaseException"),j2=Q((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),b2=Q((f)=>{switch(f){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"),nG=!1,h2=Q((f)=>{if(f&&!nG&&parseInt(f.substring(1,f.indexOf(".")))<16)nG=!0},"emitWarningIfUnsupportedVersion"),k2=Q((f)=>{const $=[];for(let w in b1.AlgorithmId){const G=b1.AlgorithmId[w];if(f[G]===void 0)continue;$.push({algorithmId:()=>G,checksumConstructor:()=>f[G]})}return{_checksumAlgorithms:$,addChecksumAlgorithm(w){this._checksumAlgorithms.push(w)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),c2=Q((f)=>{const $={};return f.checksumAlgorithms().forEach((w)=>{$[w.algorithmId()]=w.checksumConstructor()}),$},"resolveChecksumRuntimeConfig"),D2=Q((f)=>{let $=f.retryStrategy;return{setRetryStrategy(w){$=w},retryStrategy(){return $}}},"getRetryConfiguration"),u2=Q((f)=>{const $={};return $.retryStrategy=f.retryStrategy(),$},"resolveRetryRuntimeConfig"),LE=Q((f)=>{return{...k2(f),...D2(f)}},"getDefaultExtensionConfiguration"),v2=LE,y2=Q((f)=>{return{...c2(f),...u2(f)}},"resolveDefaultRuntimeConfig");Q(Mf,"extendedEncodeURIComponent");var x2=Q((f)=>Array.isArray(f)?f:[f],"getArrayIfSingleItem"),RE=Q((f)=>{for(let w in f)if(f.hasOwnProperty(w)&&f[w]["#text"]!==void 0)f[w]=f[w]["#text"];else if(typeof f[w]==="object"&&f[w]!==null)f[w]=RE(f[w]);return f},"getValueFromTextNode"),d0=Q(function(){const f=Object.getPrototypeOf(this).constructor,w=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(w,f.prototype),w},"StringWrapper");d0.prototype=Object.create(String.prototype,{constructor:{value:d0,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(d0,String);var FE=class f extends d0{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject($){if($ instanceof f)return $;else if($ instanceof String||typeof $==="string")return new f($);return new f(JSON.stringify($))}};Q(FE,"LazyJsonString");var _2=FE;Q(_1,"map");var d2=Q((f)=>{const $={};for(let[w,G]of Object.entries(f||{}))$[w]=[,G];return $},"convertMap"),p2=Q((f,$)=>{const w={};for(let G in $)IE(w,f,$,G);return w},"take"),g2=Q((f,$,w)=>{return _1(f,Object.entries(w).reduce((G,[U,E])=>{if(Array.isArray(E))G[U]=E;else if(typeof E==="function")G[U]=[$,E()];else G[U]=[$,E];return G},{}))},"mapWithFilter"),IE=Q((f,$,w,G)=>{if($!==null){let W=w[G];if(typeof W==="function")W=[,W];const[L=n2,R=s2,F=G]=W;if(typeof L==="function"&&L($[F])||typeof L!=="function"&&!!L)f[G]=R($[F]);return}let[U,E]=w[G];if(typeof E==="function"){let W;const L=U===void 0&&(W=E())!=null,R=typeof U==="function"&&!!U(void 0)||typeof U!=="function"&&!!U;if(L)f[G]=W;else if(R)f[G]=E()}else{const W=U===void 0&&E!=null,L=typeof U==="function"&&!!U(E)||typeof U!=="function"&&!!U;if(W||L)f[G]=E}},"applyInstruction"),n2=Q((f)=>f!=null,"nonNullish"),s2=Q((f)=>f,"pass"),l2=Q((f,$,w,G,U,E)=>{if($!=null&&$[w]!==void 0){const W=G();if(W.length<=0)throw new Error("Empty value provided for input HTTP label: "+w+".");f=f.replace(U,E?W.split("/").map((L)=>Mf(L)).join("/"):Mf(W))}else throw new Error("No value provided for input HTTP label: "+w+".");return f},"resolvedPath"),m2=Q((f)=>{if(f!==f)return"NaN";switch(f){case Infinity:return"Infinity";case (-Infinity):return"-Infinity";default:return f}},"serializeFloat"),i2=Q((f)=>f.toISOString().replace(".000Z","Z"),"serializeDateTime"),D1=Q((f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter(($)=>$!=null).map(D1);if(typeof f==="object"){const $={};for(let w of Object.keys(f)){if(f[w]==null)continue;$[w]=D1(f[w])}return $}return f},"_json");Q(XE,"splitEvery")});var OE=M((YE)=>{Object.defineProperty(YE,"__esModule",{value:!0});YE.isStreamingPayload=void 0;var r2=import.meta.require("stream"),o2=(f)=>(f===null||f===void 0?void 0:f.body)instanceof r2.Readable||typeof ReadableStream!=="undefined"&&(f===null||f===void 0?void 0:f.body)instanceof ReadableStream;YE.isStreamingPayload=o2});var kE=M((q7,hE)=>{var{defineProperty:Jf,getOwnPropertyDescriptor:t2,getOwnPropertyNames:a2}=Object,e2=Object.prototype.hasOwnProperty,P=(f,$)=>Jf(f,"name",{value:$,configurable:!0}),f6=(f,$)=>{for(var w in $)Jf(f,w,{get:$[w],enumerable:!0})},$6=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of a2($))if(!e2.call(f,U)&&U!==w)Jf(f,U,{get:()=>$[U],enumerable:!(G=t2($,U))||G.enumerable})}return f},w6=(f)=>$6(Jf({},"__esModule",{value:!0}),f),zE={};f6(zE,{AdaptiveRetryStrategy:()=>E6,CONFIG_MAX_ATTEMPTS:()=>p1,CONFIG_RETRY_MODE:()=>qE,ENV_MAX_ATTEMPTS:()=>d1,ENV_RETRY_MODE:()=>CE,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>W6,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>R6,StandardRetryStrategy:()=>VE,defaultDelayDecider:()=>TE,defaultRetryDecider:()=>KE,getOmitRetryHeadersPlugin:()=>F6,getRetryAfterHint:()=>bE,getRetryPlugin:()=>O6,omitRetryHeadersMiddleware:()=>NE,omitRetryHeadersMiddlewareOptions:()=>PE,resolveRetryConfig:()=>L6,retryMiddleware:()=>SE,retryMiddlewareOptions:()=>jE});hE.exports=w6(zE);var K0=G0(),JE=M1(),H=gU(),U6=P((f,$)=>{const w=f,G=($==null?void 0:$.noRetryIncrement)??H.NO_RETRY_INCREMENT,U=($==null?void 0:$.retryCost)??H.RETRY_COST,E=($==null?void 0:$.timeoutRetryCost)??H.TIMEOUT_RETRY_COST;let W=f;const L=P((X)=>X.name==="TimeoutError"?E:U,"getCapacityAmount"),R=P((X)=>L(X)<=W,"hasRetryTokens");return Object.freeze({hasRetryTokens:R,retrieveRetryTokens:P((X)=>{if(!R(X))throw new Error("No retry token available");const Y=L(X);return W-=Y,Y},"retrieveRetryTokens"),releaseRetryTokens:P((X)=>{W+=X??G,W=Math.min(W,w)},"releaseRetryTokens")})},"getDefaultRetryQuota"),TE=P((f,$)=>Math.floor(Math.min(H.MAXIMUM_RETRY_DELAY,Math.random()*2**$*f)),"defaultDelayDecider"),o=z1(),KE=P((f)=>{if(!f)return!1;return o.isRetryableByTrait(f)||o.isClockSkewError(f)||o.isThrottlingError(f)||o.isTransientError(f)},"defaultRetryDecider"),AE=P((f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)},"asSdkError"),BE=class f{constructor($,w){this.maxAttemptsProvider=$,this.mode=H.RETRY_MODES.STANDARD,this.retryDecider=(w==null?void 0:w.retryDecider)??KE,this.delayDecider=(w==null?void 0:w.delayDecider)??TE,this.retryQuota=(w==null?void 0:w.retryQuota)??U6(H.INITIAL_RETRY_TOKENS)}shouldRetry($,w,G){return w<G&&this.retryDecider($)&&this.retryQuota.hasRetryTokens($)}async getMaxAttempts(){let $;try{$=await this.maxAttemptsProvider()}catch(w){$=H.DEFAULT_MAX_ATTEMPTS}return $}async retry($,w,G){let U,E=0,W=0;const L=await this.getMaxAttempts(),{request:R}=w;if(K0.HttpRequest.isInstance(R))R.headers[H.INVOCATION_ID_HEADER]=JE.v4();while(!0)try{if(K0.HttpRequest.isInstance(R))R.headers[H.REQUEST_HEADER]=`attempt=${E+1}; max=${L}`;if(G==null?void 0:G.beforeRequest)await G.beforeRequest();const{response:F,output:I}=await $(w);if(G==null?void 0:G.afterRequest)G.afterRequest(F);return this.retryQuota.releaseRetryTokens(U),I.$metadata.attempts=E+1,I.$metadata.totalRetryDelay=W,{response:F,output:I}}catch(F){const I=AE(F);if(E++,this.shouldRetry(I,E,L)){U=this.retryQuota.retrieveRetryTokens(I);const X=this.delayDecider(o.isThrottlingError(I)?H.THROTTLING_RETRY_DELAY_BASE:H.DEFAULT_RETRY_DELAY_BASE,E),Y=G6(I.$response),Z=Math.max(Y||0,X);W+=Z,await new Promise((O)=>setTimeout(O,Z));continue}if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=E,I.$metadata.totalRetryDelay=W,I}}};P(BE,"StandardRetryStrategy");var VE=BE,G6=P((f)=>{if(!K0.HttpResponse.isInstance(f))return;const $=Object.keys(f.headers).find((E)=>E.toLowerCase()==="retry-after");if(!$)return;const w=f.headers[$],G=Number(w);if(!Number.isNaN(G))return G*1000;return new Date(w).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),HE=class f extends VE{constructor($,w){const{rateLimiter:G,...U}=w??{};super($,U);this.rateLimiter=G??new H.DefaultRateLimiter,this.mode=H.RETRY_MODES.ADAPTIVE}async retry($,w){return super.retry($,w,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(G)=>{this.rateLimiter.updateClientSendingRate(G)}})}};P(HE,"AdaptiveRetryStrategy");var E6=HE,ME=s(),d1="AWS_MAX_ATTEMPTS",p1="max_attempts",W6={environmentVariableSelector:(f)=>{const $=f[d1];if(!$)return;const w=parseInt($);if(Number.isNaN(w))throw new Error(`Environment variable ${d1} mast be a number, got "${$}"`);return w},configFileSelector:(f)=>{const $=f[p1];if(!$)return;const w=parseInt($);if(Number.isNaN(w))throw new Error(`Shared config file entry ${p1} mast be a number, got "${$}"`);return w},default:H.DEFAULT_MAX_ATTEMPTS},L6=P((f)=>{const{retryStrategy:$}=f,w=ME.normalizeProvider(f.maxAttempts??H.DEFAULT_MAX_ATTEMPTS);return{...f,maxAttempts:w,retryStrategy:async()=>{if($)return $;if(await ME.normalizeProvider(f.retryMode)()===H.RETRY_MODES.ADAPTIVE)return new H.AdaptiveRetryStrategy(w);return new H.StandardRetryStrategy(w)}}},"resolveRetryConfig"),CE="AWS_RETRY_MODE",qE="retry_mode",R6={environmentVariableSelector:(f)=>f[CE],configFileSelector:(f)=>f[qE],default:H.DEFAULT_RETRY_MODE},NE=P(()=>(f)=>async($)=>{const{request:w}=$;if(K0.HttpRequest.isInstance(w))delete w.headers[H.INVOCATION_ID_HEADER],delete w.headers[H.REQUEST_HEADER];return f($)},"omitRetryHeadersMiddleware"),PE={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},F6=P((f)=>({applyToStack:($)=>{$.addRelativeTo(NE(),PE)}}),"getOmitRetryHeadersPlugin"),I6=T0(),X6=OE(),SE=P((f)=>($,w)=>async(G)=>{var U;let E=await f.retryStrategy();const W=await f.maxAttempts();if(Z6(E)){E=E;let L=await E.acquireInitialRetryToken(w.partition_id),R=new Error,F=0,I=0;const{request:X}=G,Y=K0.HttpRequest.isInstance(X);if(Y)X.headers[H.INVOCATION_ID_HEADER]=JE.v4();while(!0)try{if(Y)X.headers[H.REQUEST_HEADER]=`attempt=${F+1}; max=${W}`;const{response:Z,output:O}=await $(G);return E.recordSuccess(L),O.$metadata.attempts=F+1,O.$metadata.totalRetryDelay=I,{response:Z,output:O}}catch(Z){const O=Y6(Z);if(R=AE(Z),Y&&X6.isStreamingPayload(X))throw(U=w.logger instanceof I6.NoOpLogger?console:w.logger)==null||U.warn("An error was encountered in a non-retryable streaming request."),R;try{L=await E.refreshRetryTokenForRetry(L,O)}catch(T){if(!R.$metadata)R.$metadata={};throw R.$metadata.attempts=F+1,R.$metadata.totalRetryDelay=I,R}F=L.getRetryCount();const z=L.getRetryDelay();I+=z,await new Promise((T)=>setTimeout(T,z))}}else{if(E=E,E==null?void 0:E.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",E.mode]];return E.retry($,G)}},"retryMiddleware"),Z6=P((f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined","isRetryStrategyV2"),Y6=P((f)=>{const $={error:f,errorType:Q6(f)},w=bE(f.$response);if(w)$.retryAfterHint=w;return $},"getRetryErrorInfo"),Q6=P((f)=>{if(o.isThrottlingError(f))return"THROTTLING";if(o.isTransientError(f))return"TRANSIENT";if(o.isServerError(f))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),jE={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},O6=P((f)=>({applyToStack:($)=>{$.add(SE(f),jE)}}),"getRetryPlugin"),bE=P((f)=>{if(!K0.HttpResponse.isInstance(f))return;const $=Object.keys(f.headers).find((E)=>E.toLowerCase()==="retry-after");if(!$)return;const w=f.headers[$],G=Number(w);if(!Number.isNaN(G))return new Date(G*1000);return new Date(w)},"getRetryAfterHint")});var n1=M((N7,aE)=>{var uE=function(f){const $=new Map;for(let w of f)$.set(w.schemeId,w);return $},iE=function(f,$){return new oE(f,$)},tE=function(f,$,w,G,U){return V(async function*E(W,L,...R){let F=W.startingToken||void 0,I=!0,X;while(I){if(L[w]=F,U)L[U]=L[U]??W.pageSize;if(W.client instanceof f)X=await x6($,W.client,L,...R);else throw new Error(`Invalid client, expected instance of ${f.name}`);yield X;const Y=F;F=_6(X,G),I=!!(F&&(!W.stopOnSameToken||F!==Y))}return},"paginateOperation")},Kf=Object.defineProperty,M6=Object.getOwnPropertyDescriptor,z6=Object.getOwnPropertyNames,J6=Object.prototype.hasOwnProperty,V=(f,$)=>Kf(f,"name",{value:$,configurable:!0}),T6=(f,$)=>{for(var w in $)Kf(f,w,{get:$[w],enumerable:!0})},K6=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of z6($))if(!J6.call(f,U)&&U!==w)Kf(f,U,{get:()=>$[U],enumerable:!(G=M6($,U))||G.enumerable})}return f},A6=(f)=>K6(Kf({},"__esModule",{value:!0}),f),cE={};T6(cE,{DefaultIdentityProviderConfig:()=>j6,EXPIRATION_MS:()=>lE,HttpApiKeyAuthSigner:()=>b6,HttpBearerAuthSigner:()=>h6,NoAuthSigner:()=>k6,RequestBuilder:()=>oE,createIsIdentityExpiredFunction:()=>sE,createPaginator:()=>tE,doesIdentityRequireRefresh:()=>mE,getHttpAuthSchemeEndpointRuleSetPlugin:()=>V6,getHttpAuthSchemePlugin:()=>C6,getHttpSigningPlugin:()=>S6,getSmithyContext:()=>u6,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>vE,httpAuthSchemeMiddleware:()=>g1,httpAuthSchemeMiddlewareOptions:()=>yE,httpSigningMiddleware:()=>xE,httpSigningMiddlewareOptions:()=>_E,isIdentityExpired:()=>c6,memoizeIdentityProvider:()=>D6,normalizeProvider:()=>v6,requestBuilder:()=>iE});aE.exports=A6(cE);var DE=s();V(uE,"convertHttpAuthSchemesToMap");var g1=V((f,$)=>(w,G)=>async(U)=>{var E;const W=f.httpAuthSchemeProvider(await $.httpAuthSchemeParametersProvider(f,G,U.input)),L=uE(f.httpAuthSchemes),R=DE.getSmithyContext(G),F=[];for(let I of W){const X=L.get(I.schemeId);if(!X){F.push(`HttpAuthScheme \`${I.schemeId}\` was not enabled for this service.`);continue}const Y=X.identityProvider(await $.identityProviderConfigProvider(f));if(!Y){F.push(`HttpAuthScheme \`${I.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:Z={},signingProperties:O={}}=((E=I.propertiesExtractor)==null?void 0:E.call(I,f,G))||{};I.identityProperties=Object.assign(I.identityProperties||{},Z),I.signingProperties=Object.assign(I.signingProperties||{},O),R.selectedHttpAuthScheme={httpAuthOption:I,identity:await Y(I.identityProperties),signer:X.signer};break}if(!R.selectedHttpAuthScheme)throw new Error(F.join("\n"));return w(U)},"httpAuthSchemeMiddleware"),B6=hw(),vE={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:B6.endpointMiddlewareOptions.name},V6=V((f,{httpAuthSchemeParametersProvider:$,identityProviderConfigProvider:w})=>({applyToStack:(G)=>{G.addRelativeTo(g1(f,{httpAuthSchemeParametersProvider:$,identityProviderConfigProvider:w}),vE)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),H6=a0(),yE={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:H6.serializerMiddlewareOption.name},C6=V((f,{httpAuthSchemeParametersProvider:$,identityProviderConfigProvider:w})=>({applyToStack:(G)=>{G.addRelativeTo(g1(f,{httpAuthSchemeParametersProvider:$,identityProviderConfigProvider:w}),yE)}}),"getHttpAuthSchemePlugin"),Af=G0(),q6=V((f)=>($)=>{throw $},"defaultErrorHandler"),N6=V((f,$)=>{},"defaultSuccessHandler"),xE=V((f)=>($,w)=>async(G)=>{if(!Af.HttpRequest.isInstance(G.request))return $(G);const E=DE.getSmithyContext(w).selectedHttpAuthScheme;if(!E)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:W={}},identity:L,signer:R}=E,F=await $({...G,request:await R.sign(G.request,L,W)}).catch((R.errorHandler||q6)(W));return(R.successHandler||N6)(F.response,W),F},"httpSigningMiddleware"),P6=kE(),_E={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:P6.retryMiddlewareOptions.name},S6=V((f)=>({applyToStack:($)=>{$.addRelativeTo(xE(f),_E)}}),"getHttpSigningPlugin"),dE=class f{constructor($){this.authSchemes=new Map;for(let[w,G]of Object.entries($))if(G!==void 0)this.authSchemes.set(w,G)}getIdentityProvider($){return this.authSchemes.get($)}};V(dE,"DefaultIdentityProviderConfig");var j6=dE,Tf=N0(),pE=class f{async sign($,w,G){if(!G)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!G.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!G.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!w.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const U=Af.HttpRequest.clone($);if(G.in===Tf.HttpApiKeyAuthLocation.QUERY)U.query[G.name]=w.apiKey;else if(G.in===Tf.HttpApiKeyAuthLocation.HEADER)U.headers[G.name]=G.scheme?`${G.scheme} ${w.apiKey}`:w.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+G.in+"`");return U}};V(pE,"HttpApiKeyAuthSigner");var b6=pE,gE=class f{async sign($,w,G){const U=Af.HttpRequest.clone($);if(!w.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return U.headers.Authorization=`Bearer ${w.token}`,U}};V(gE,"HttpBearerAuthSigner");var h6=gE,nE=class f{async sign($,w,G){return $}};V(nE,"NoAuthSigner");var k6=nE,sE=V((f)=>($)=>mE($)&&$.expiration.getTime()-Date.now()<f,"createIsIdentityExpiredFunction"),lE=300000,c6=sE(lE),mE=V((f)=>f.expiration!==void 0,"doesIdentityRequireRefresh"),D6=V((f,$,w)=>{if(f===void 0)return;const G=typeof f!=="function"?async()=>Promise.resolve(f):f;let U,E,W,L=!1;const R=V(async(F)=>{if(!E)E=G(F);try{U=await E,W=!0,L=!1}finally{E=void 0}return U},"coalesceProvider");if($===void 0)return async(F)=>{if(!W||(F==null?void 0:F.forceRefresh))U=await R(F);return U};return async(F)=>{if(!W||(F==null?void 0:F.forceRefresh))U=await R(F);if(L)return U;if(!w(U))return L=!0,U;if($(U))return await R(F),U;return U}},"memoizeIdentityProvider"),u6=V((f)=>f[Tf.SMITHY_CONTEXT_KEY]||(f[Tf.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),v6=V((f)=>{if(typeof f==="function")return f;const $=Promise.resolve(f);return()=>$},"normalizeProvider"),y6=T0();V(iE,"requestBuilder");var rE=class f{constructor($,w){this.input=$,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:$,protocol:w="https",port:G,path:U}=await this.context.endpoint();this.path=U;for(let E of this.resolvePathStack)E(this.path);return new Af.HttpRequest({protocol:w,hostname:this.hostname||$,port:G,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn($){return this.hostname=$,this}bp($){return this.resolvePathStack.push((w)=>{this.path=`${(w==null?void 0:w.endsWith("/"))?w.slice(0,-1):w||""}`+$}),this}p($,w,G,U){return this.resolvePathStack.push((E)=>{this.path=y6.resolvedPath(E,this.input,$,w,G,U)}),this}h($){return this.headers=$,this}q($){return this.query=$,this}b($){return this.body=$,this}m($){return this.method=$,this}};V(rE,"RequestBuilder");var oE=rE,x6=V(async(f,$,w,...G)=>{return await $.send(new f(w),...G)},"makePagedClientRequest");V(tE,"createPaginator");var _6=V((f,$)=>{let w=f;const G=$.split(".");for(let U of G){if(!w||typeof w!=="object")return;w=w[U]}return w},"get")});var JL=M((cT,_f)=>{var sW,lW,mW,iW,rW,oW,tW,aW,eW,fL,$L,wL,UL,yf,I$,GL,EL,WL,C0,LL,RL,FL,IL,XL,ZL,YL,QL,OL,xf,ML,zL;(function(f){var $=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(G){f(w($,w(G)))});else if(typeof _f==="object"&&typeof cT==="object")f(w($,w(cT)));else f(w($));function w(G,U){if(G!==$)if(typeof Object.create==="function")Object.defineProperty(G,"__esModule",{value:!0});else G.__esModule=!0;return function(E,W){return G[E]=U?U(E,W):W}}})(function(f){var $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(U,E){U.__proto__=E}||function(U,E){for(var W in E)if(Object.prototype.hasOwnProperty.call(E,W))U[W]=E[W]};sW=function(U,E){if(typeof E!=="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");$(U,E);function W(){this.constructor=U}U.prototype=E===null?Object.create(E):(W.prototype=E.prototype,new W)},lW=Object.assign||function(U){for(var E,W=1,L=arguments.length;W<L;W++){E=arguments[W];for(var R in E)if(Object.prototype.hasOwnProperty.call(E,R))U[R]=E[R]}return U},mW=function(U,E){var W={};for(var L in U)if(Object.prototype.hasOwnProperty.call(U,L)&&E.indexOf(L)<0)W[L]=U[L];if(U!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var R=0,L=Object.getOwnPropertySymbols(U);R<L.length;R++)if(E.indexOf(L[R])<0&&Object.prototype.propertyIsEnumerable.call(U,L[R]))W[L[R]]=U[L[R]]}return W},iW=function(U,E,W,L){var R=arguments.length,F=R<3?E:L===null?L=Object.getOwnPropertyDescriptor(E,W):L,I;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")F=Reflect.decorate(U,E,W,L);else for(var X=U.length-1;X>=0;X--)if(I=U[X])F=(R<3?I(F):R>3?I(E,W,F):I(E,W))||F;return R>3&&F&&Object.defineProperty(E,W,F),F},rW=function(U,E){return function(W,L){E(W,L,U)}},oW=function(U,E,W,L,R,F){function I(k){if(k!==void 0&&typeof k!=="function")throw new TypeError("Function expected");return k}var X=L.kind,Y=X==="getter"?"get":X==="setter"?"set":"value",Z=!E&&U?L.static?U:U.prototype:null,O=E||(Z?Object.getOwnPropertyDescriptor(Z,L.name):{}),z,T=!1;for(var K=W.length-1;K>=0;K--){var J={};for(var A in L)J[A]=A==="access"?{}:L[A];for(var A in L.access)J.access[A]=L.access[A];J.addInitializer=function(k){if(T)throw new TypeError("Cannot add initializers after decoration has completed");F.push(I(k||null))};var j=W[K](X==="accessor"?{get:O.get,set:O.set}:O[Y],J);if(X==="accessor"){if(j===void 0)continue;if(j===null||typeof j!=="object")throw new TypeError("Object expected");if(z=I(j.get))O.get=z;if(z=I(j.set))O.set=z;if(z=I(j.init))R.unshift(z)}else if(z=I(j))if(X==="field")R.unshift(z);else O[Y]=z}if(Z)Object.defineProperty(Z,L.name,O);T=!0},tW=function(U,E,W){var L=arguments.length>2;for(var R=0;R<E.length;R++)W=L?E[R].call(U,W):E[R].call(U);return L?W:void 0},aW=function(U){return typeof U==="symbol"?U:"".concat(U)},eW=function(U,E,W){if(typeof E==="symbol")E=E.description?"[".concat(E.description,"]"):"";return Object.defineProperty(U,"name",{configurable:!0,value:W?"".concat(W," ",E):E})},fL=function(U,E){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(U,E)},$L=function(U,E,W,L){function R(F){return F instanceof W?F:new W(function(I){I(F)})}return new(W||(W=Promise))(function(F,I){function X(O){try{Z(L.next(O))}catch(z){I(z)}}function Y(O){try{Z(L.throw(O))}catch(z){I(z)}}function Z(O){O.done?F(O.value):R(O.value).then(X,Y)}Z((L=L.apply(U,E||[])).next())})},wL=function(U,E){var W={label:0,sent:function(){if(F[0]&1)throw F[1];return F[1]},trys:[],ops:[]},L,R,F,I;return I={next:X(0),throw:X(1),return:X(2)},typeof Symbol==="function"&&(I[Symbol.iterator]=function(){return this}),I;function X(Z){return function(O){return Y([Z,O])}}function Y(Z){if(L)throw new TypeError("Generator is already executing.");while(I&&(I=0,Z[0]&&(W=0)),W)try{if(L=1,R&&(F=Z[0]&2?R.return:Z[0]?R.throw||((F=R.return)&&F.call(R),0):R.next)&&!(F=F.call(R,Z[1])).done)return F;if(R=0,F)Z=[Z[0]&2,F.value];switch(Z[0]){case 0:case 1:F=Z;break;case 4:return W.label++,{value:Z[1],done:!1};case 5:W.label++,R=Z[1],Z=[0];continue;case 7:Z=W.ops.pop(),W.trys.pop();continue;default:if((F=W.trys,!(F=F.length>0&&F[F.length-1]))&&(Z[0]===6||Z[0]===2)){W=0;continue}if(Z[0]===3&&(!F||Z[1]>F[0]&&Z[1]<F[3])){W.label=Z[1];break}if(Z[0]===6&&W.label<F[1]){W.label=F[1],F=Z;break}if(F&&W.label<F[2]){W.label=F[2],W.ops.push(Z);break}if(F[2])W.ops.pop();W.trys.pop();continue}Z=E.call(U,W)}catch(O){Z=[6,O],R=0}finally{L=F=0}if(Z[0]&5)throw Z[1];return{value:Z[0]?Z[1]:void 0,done:!0}}},UL=function(U,E){for(var W in U)if(W!=="default"&&!Object.prototype.hasOwnProperty.call(E,W))xf(E,U,W)},xf=Object.create?function(U,E,W,L){if(L===void 0)L=W;var R=Object.getOwnPropertyDescriptor(E,W);if(!R||("get"in R?!E.__esModule:R.writable||R.configurable))R={enumerable:!0,get:function(){return E[W]}};Object.defineProperty(U,L,R)}:function(U,E,W,L){if(L===void 0)L=W;U[L]=E[W]},yf=function(U){var E=typeof Symbol==="function"&&Symbol.iterator,W=E&&U[E],L=0;if(W)return W.call(U);if(U&&typeof U.length==="number")return{next:function(){if(U&&L>=U.length)U=void 0;return{value:U&&U[L++],done:!U}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},I$=function(U,E){var W=typeof Symbol==="function"&&U[Symbol.iterator];if(!W)return U;var L=W.call(U),R,F=[],I;try{while((E===void 0||E-- >0)&&!(R=L.next()).done)F.push(R.value)}catch(X){I={error:X}}finally{try{if(R&&!R.done&&(W=L.return))W.call(L)}finally{if(I)throw I.error}}return F},GL=function(){for(var U=[],E=0;E<arguments.length;E++)U=U.concat(I$(arguments[E]));return U},EL=function(){for(var U=0,E=0,W=arguments.length;E<W;E++)U+=arguments[E].length;for(var L=Array(U),R=0,E=0;E<W;E++)for(var F=arguments[E],I=0,X=F.length;I<X;I++,R++)L[R]=F[I];return L},WL=function(U,E,W){if(W||arguments.length===2){for(var L=0,R=E.length,F;L<R;L++)if(F||!(L in E)){if(!F)F=Array.prototype.slice.call(E,0,L);F[L]=E[L]}}return U.concat(F||Array.prototype.slice.call(E))},C0=function(U){return this instanceof C0?(this.v=U,this):new C0(U)},LL=function(U,E,W){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var L=W.apply(U,E||[]),R,F=[];return R={},X("next"),X("throw"),X("return",I),R[Symbol.asyncIterator]=function(){return this},R;function I(K){return function(J){return Promise.resolve(J).then(K,z)}}function X(K,J){if(L[K]){if(R[K]=function(A){return new Promise(function(j,k){F.push([K,A,j,k])>1||Y(K,A)})},J)R[K]=J(R[K])}}function Y(K,J){try{Z(L[K](J))}catch(A){T(F[0][3],A)}}function Z(K){K.value instanceof C0?Promise.resolve(K.value.v).then(O,z):T(F[0][2],K)}function O(K){Y("next",K)}function z(K){Y("throw",K)}function T(K,J){if(K(J),F.shift(),F.length)Y(F[0][0],F[0][1])}},RL=function(U){var E,W;return E={},L("next"),L("throw",function(R){throw R}),L("return"),E[Symbol.iterator]=function(){return this},E;function L(R,F){E[R]=U[R]?function(I){return(W=!W)?{value:C0(U[R](I)),done:!1}:F?F(I):I}:F}},FL=function(U){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var E=U[Symbol.asyncIterator],W;return E?E.call(U):(U=typeof yf==="function"?yf(U):U[Symbol.iterator](),W={},L("next"),L("throw"),L("return"),W[Symbol.asyncIterator]=function(){return this},W);function L(F){W[F]=U[F]&&function(I){return new Promise(function(X,Y){I=U[F](I),R(X,Y,I.done,I.value)})}}function R(F,I,X,Y){Promise.resolve(Y).then(function(Z){F({value:Z,done:X})},I)}},IL=function(U,E){if(Object.defineProperty)Object.defineProperty(U,"raw",{value:E});else U.raw=E;return U};var w=Object.create?function(U,E){Object.defineProperty(U,"default",{enumerable:!0,value:E})}:function(U,E){U.default=E};XL=function(U){if(U&&U.__esModule)return U;var E={};if(U!=null){for(var W in U)if(W!=="default"&&Object.prototype.hasOwnProperty.call(U,W))xf(E,U,W)}return w(E,U),E},ZL=function(U){return U&&U.__esModule?U:{default:U}},YL=function(U,E,W,L){if(W==="a"&&!L)throw new TypeError("Private accessor was defined without a getter");if(typeof E==="function"?U!==E||!L:!E.has(U))throw new TypeError("Cannot read private member from an object whose class did not declare it");return W==="m"?L:W==="a"?L.call(U):L?L.value:E.get(U)},QL=function(U,E,W,L,R){if(L==="m")throw new TypeError("Private method is not writable");if(L==="a"&&!R)throw new TypeError("Private accessor was defined without a setter");if(typeof E==="function"?U!==E||!R:!E.has(U))throw new TypeError("Cannot write private member to an object whose class did not declare it");return L==="a"?R.call(U,W):R?R.value=W:E.set(U,W),W},OL=function(U,E){if(E===null||typeof E!=="object"&&typeof E!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof U==="function"?E===U:U.has(E)},ML=function(U,E,W){if(E!==null&&E!==void 0){if(typeof E!=="object"&&typeof E!=="function")throw new TypeError("Object expected.");var L,R;if(W){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");L=E[Symbol.asyncDispose]}if(L===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(L=E[Symbol.dispose],W)R=L}if(typeof L!=="function")throw new TypeError("Object not disposable.");if(R)L=function(){try{R.call(this)}catch(F){return Promise.reject(F)}};U.stack.push({value:E,dispose:L,async:W})}else if(W)U.stack.push({async:!0});return E};var G=typeof SuppressedError==="function"?SuppressedError:function(U,E,W){var L=new Error(W);return L.name="SuppressedError",L.error=U,L.suppressed=E,L};zL=function(U){function E(L){U.error=U.hasError?new G(L,U.error,"An error was suppressed during disposal."):L,U.hasError=!0}function W(){while(U.stack.length){var L=U.stack.pop();try{var R=L.dispose&&L.dispose.call(L.value);if(L.async)return Promise.resolve(R).then(W,function(F){return E(F),W()})}catch(F){E(F)}}if(U.hasError)throw U.error}return W()},f("__extends",sW),f("__assign",lW),f("__rest",mW),f("__decorate",iW),f("__param",rW),f("__esDecorate",oW),f("__runInitializers",tW),f("__propKey",aW),f("__setFunctionName",eW),f("__metadata",fL),f("__awaiter",$L),f("__generator",wL),f("__exportStar",UL),f("__createBinding",xf),f("__values",yf),f("__read",I$),f("__spread",GL),f("__spreadArrays",EL),f("__spreadArray",WL),f("__await",C0),f("__asyncGenerator",LL),f("__asyncDelegator",RL),f("__asyncValues",FL),f("__makeTemplateObject",IL),f("__importStar",XL),f("__importDefault",ZL),f("__classPrivateFieldGet",YL),f("__classPrivateFieldSet",QL),f("__classPrivateFieldIn",OL),f("__addDisposableResource",ML),f("__disposeResources",zL)})});var BL=M((DT,AL)=>{var{defineProperty:df,getOwnPropertyDescriptor:AZ,getOwnPropertyNames:BZ}=Object,VZ=Object.prototype.hasOwnProperty,HZ=(f,$)=>df(f,"name",{value:$,configurable:!0}),CZ=(f,$)=>{for(var w in $)df(f,w,{get:$[w],enumerable:!0})},qZ=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of BZ($))if(!VZ.call(f,U)&&U!==w)df(f,U,{get:()=>$[U],enumerable:!(G=AZ($,U))||G.enumerable})}return f},NZ=(f)=>qZ(df({},"__esModule",{value:!0}),f),KL={};CZ(KL,{emitWarningIfUnsupportedVersion:()=>PZ});AL.exports=NZ(KL);var TL=!1,PZ=HZ((f)=>{if(f&&!TL&&parseInt(f.substring(1,f.indexOf(".")))<18)TL=!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 pL=M((uT,dL)=>{var O$=function(f){for(let $=0;$<8;$++)f[$]^=255;for(let $=7;$>-1;$--)if(f[$]++,f[$]!==0)break},lf=Object.defineProperty,bZ=Object.getOwnPropertyDescriptor,hZ=Object.getOwnPropertyNames,kZ=Object.prototype.hasOwnProperty,S=(f,$)=>lf(f,"name",{value:$,configurable:!0}),cZ=(f,$)=>{for(var w in $)lf(f,w,{get:$[w],enumerable:!0})},DZ=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of hZ($))if(!kZ.call(f,U)&&U!==w)lf(f,U,{get:()=>$[U],enumerable:!(G=bZ($,U))||G.enumerable})}return f},uZ=(f)=>DZ(lf({},"__esModule",{value:!0}),f),NL={};cZ(NL,{SignatureV4:()=>R5,clearCredentialCache:()=>eZ,createScope:()=>nf,getCanonicalHeaders:()=>Q$,getCanonicalQuery:()=>DL,getPayloadHash:()=>sf,getSigningKey:()=>cL,moveHeadersToQuery:()=>xL,prepareRequest:()=>M$});dL.exports=uZ(NL);var VL=s(),X$=O0(),vZ="X-Amz-Algorithm",yZ="X-Amz-Credential",PL="X-Amz-Date",xZ="X-Amz-SignedHeaders",_Z="X-Amz-Expires",SL="X-Amz-Signature",jL="X-Amz-Security-Token",bL="authorization",hL=PL.toLowerCase(),dZ="date",pZ=[bL,hL,dZ],gZ=SL.toLowerCase(),Y$="x-amz-content-sha256",nZ=jL.toLowerCase(),sZ={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},lZ=/^proxy-/,mZ=/^sec-/,Z$="AWS4-HMAC-SHA256",iZ="AWS4-HMAC-SHA256-PAYLOAD",rZ="UNSIGNED-PAYLOAD",oZ=50,kL="aws4_request",tZ=604800,f0=MG(),aZ=O0(),q0={},gf=[],nf=S((f,$,w)=>`${f}/${$}/${w}/${kL}`,"createScope"),cL=S(async(f,$,w,G,U)=>{const E=await HL(f,$.secretAccessKey,$.accessKeyId),W=`${w}:${G}:${U}:${f0.toHex(E)}:${$.sessionToken}`;if(W in q0)return q0[W];gf.push(W);while(gf.length>oZ)delete q0[gf.shift()];let L=`AWS4${$.secretAccessKey}`;for(let R of[w,G,U,kL])L=await HL(f,L,R);return q0[W]=L},"getSigningKey"),eZ=S(()=>{gf.length=0,Object.keys(q0).forEach((f)=>{delete q0[f]})},"clearCredentialCache"),HL=S((f,$,w)=>{const G=new f($);return G.update(aZ.toUint8Array(w)),G.digest()},"hmac"),Q$=S(({headers:f},$,w)=>{const G={};for(let U of Object.keys(f).sort()){if(f[U]==null)continue;const E=U.toLowerCase();if(E in sZ||($==null?void 0:$.has(E))||lZ.test(E)||mZ.test(E)){if(!w||w&&!w.has(E))continue}G[E]=f[U].trim().replace(/\s+/g," ")}return G},"getCanonicalHeaders"),l0=SZ(),DL=S(({query:f={}})=>{const $=[],w={};for(let G of Object.keys(f).sort()){if(G.toLowerCase()===gZ)continue;$.push(G);const U=f[G];if(typeof U==="string")w[G]=`${l0.escapeUri(G)}=${l0.escapeUri(U)}`;else if(Array.isArray(U))w[G]=U.slice(0).reduce((E,W)=>E.concat([`${l0.escapeUri(G)}=${l0.escapeUri(W)}`]),[]).sort().join("&")}return $.map((G)=>w[G]).filter((G)=>G).join("&")},"getCanonicalQuery"),f5=jZ(),$5=O0(),sf=S(async({headers:f,body:$},w)=>{for(let G of Object.keys(f))if(G.toLowerCase()===Y$)return f[G];if($==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof $==="string"||ArrayBuffer.isView($)||f5.isArrayBuffer($)){const G=new w;return G.update($5.toUint8Array($)),f0.toHex(await G.digest())}return rZ},"getPayloadHash"),CL=O0(),uL=class f{format($){const w=[];for(let E of Object.keys($)){const W=CL.fromUtf8(E);w.push(Uint8Array.from([W.byteLength]),W,this.formatHeaderValue($[E]))}const G=new Uint8Array(w.reduce((E,W)=>E+W.byteLength,0));let U=0;for(let E of w)G.set(E,U),U+=E.byteLength;return G}formatHeaderValue($){switch($.type){case"boolean":return Uint8Array.from([$.value?0:1]);case"byte":return Uint8Array.from([2,$.value]);case"short":const w=new DataView(new ArrayBuffer(3));return w.setUint8(0,3),w.setInt16(1,$.value,!1),new Uint8Array(w.buffer);case"integer":const G=new DataView(new ArrayBuffer(5));return G.setUint8(0,4),G.setInt32(1,$.value,!1),new Uint8Array(G.buffer);case"long":const U=new Uint8Array(9);return U[0]=5,U.set($.value.bytes,1),U;case"binary":const E=new DataView(new ArrayBuffer(3+$.value.byteLength));E.setUint8(0,6),E.setUint16(1,$.value.byteLength,!1);const W=new Uint8Array(E.buffer);return W.set($.value,3),W;case"string":const L=CL.fromUtf8($.value),R=new DataView(new ArrayBuffer(3+L.byteLength));R.setUint8(0,7),R.setUint16(1,L.byteLength,!1);const F=new Uint8Array(R.buffer);return F.set(L,3),F;case"timestamp":const I=new Uint8Array(9);return I[0]=8,I.set(G5.fromNumber($.value.valueOf()).bytes,1),I;case"uuid":if(!U5.test($.value))throw new Error(`Invalid UUID received: ${$.value}`);const X=new Uint8Array(17);return X[0]=9,X.set(f0.fromHex($.value.replace(/\-/g,"")),1),X}}};S(uL,"HeaderFormatter");var w5=uL,U5=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,vL=class f{constructor($){if(this.bytes=$,$.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber($){if($>9223372036854776000||$<-9223372036854776000)throw new Error(`${$} is too large (or, if negative, too small) to represent as an Int64`);const w=new Uint8Array(8);for(let G=7,U=Math.abs(Math.round($));G>-1&&U>0;G--,U/=256)w[G]=U;if($<0)O$(w);return new f(w)}valueOf(){const $=this.bytes.slice(0),w=$[0]&128;if(w)O$($);return parseInt(f0.toHex($),16)*(w?-1:1)}toString(){return String(this.valueOf())}};S(vL,"Int64");var G5=vL;S(O$,"negate");var E5=S((f,$)=>{f=f.toLowerCase();for(let w of Object.keys($))if(f===w.toLowerCase())return!0;return!1},"hasHeader"),yL=G0(),xL=S((f,$={})=>{var w;const{headers:G,query:U={}}=yL.HttpRequest.clone(f);for(let E of Object.keys(G)){const W=E.toLowerCase();if(W.slice(0,6)==="x-amz-"&&!((w=$.unhoistableHeaders)==null?void 0:w.has(W)))U[E]=G[E],delete G[E]}return{...f,headers:G,query:U}},"moveHeadersToQuery"),M$=S((f)=>{f=yL.HttpRequest.clone(f);for(let $ of Object.keys(f.headers))if(pZ.indexOf($.toLowerCase())>-1)delete f.headers[$];return f},"prepareRequest"),W5=S((f)=>L5(f).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),L5=S((f)=>{if(typeof f==="number")return new Date(f*1000);if(typeof f==="string"){if(Number(f))return new Date(Number(f)*1000);return new Date(f)}return f},"toDate"),_L=class f{constructor({applyChecksum:$,credentials:w,region:G,service:U,sha256:E,uriEscapePath:W=!0}){this.headerFormatter=new w5,this.service=U,this.sha256=E,this.uriEscapePath=W,this.applyChecksum=typeof $==="boolean"?$:!0,this.regionProvider=VL.normalizeProvider(G),this.credentialProvider=VL.normalizeProvider(w)}async presign($,w={}){const{signingDate:G=new Date,expiresIn:U=3600,unsignableHeaders:E,unhoistableHeaders:W,signableHeaders:L,signingRegion:R,signingService:F}=w,I=await this.credentialProvider();this.validateResolvedCredentials(I);const X=R??await this.regionProvider(),{longDate:Y,shortDate:Z}=pf(G);if(U>tZ)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const O=nf(Z,X,F??this.service),z=xL(M$($),{unhoistableHeaders:W});if(I.sessionToken)z.query[jL]=I.sessionToken;z.query[vZ]=Z$,z.query[yZ]=`${I.accessKeyId}/${O}`,z.query[PL]=Y,z.query[_Z]=U.toString(10);const T=Q$(z,E,L);return z.query[xZ]=qL(T),z.query[SL]=await this.getSignature(Y,O,this.getSigningKey(I,X,Z,F),this.createCanonicalRequest(z,T,await sf($,this.sha256))),z}async sign($,w){if(typeof $==="string")return this.signString($,w);else if($.headers&&$.payload)return this.signEvent($,w);else if($.message)return this.signMessage($,w);else return this.signRequest($,w)}async signEvent({headers:$,payload:w},{signingDate:G=new Date,priorSignature:U,signingRegion:E,signingService:W}){const L=E??await this.regionProvider(),{shortDate:R,longDate:F}=pf(G),I=nf(R,L,W??this.service),X=await sf({headers:{},body:w},this.sha256),Y=new this.sha256;Y.update($);const Z=f0.toHex(await Y.digest()),O=[iZ,F,I,U,Z,X].join("\n");return this.signString(O,{signingDate:G,signingRegion:L,signingService:W})}async signMessage($,{signingDate:w=new Date,signingRegion:G,signingService:U}){return this.signEvent({headers:this.headerFormatter.format($.message.headers),payload:$.message.body},{signingDate:w,signingRegion:G,signingService:U,priorSignature:$.priorSignature}).then((W)=>{return{message:$.message,signature:W}})}async signString($,{signingDate:w=new Date,signingRegion:G,signingService:U}={}){const E=await this.credentialProvider();this.validateResolvedCredentials(E);const W=G??await this.regionProvider(),{shortDate:L}=pf(w),R=new this.sha256(await this.getSigningKey(E,W,L,U));return R.update(X$.toUint8Array($)),f0.toHex(await R.digest())}async signRequest($,{signingDate:w=new Date,signableHeaders:G,unsignableHeaders:U,signingRegion:E,signingService:W}={}){const L=await this.credentialProvider();this.validateResolvedCredentials(L);const R=E??await this.regionProvider(),F=M$($),{longDate:I,shortDate:X}=pf(w),Y=nf(X,R,W??this.service);if(F.headers[hL]=I,L.sessionToken)F.headers[nZ]=L.sessionToken;const Z=await sf(F,this.sha256);if(!E5(Y$,F.headers)&&this.applyChecksum)F.headers[Y$]=Z;const O=Q$(F,U,G),z=await this.getSignature(I,Y,this.getSigningKey(L,R,X,W),this.createCanonicalRequest(F,O,Z));return F.headers[bL]=`${Z$} Credential=${L.accessKeyId}/${Y}, SignedHeaders=${qL(O)}, Signature=${z}`,F}createCanonicalRequest($,w,G){const U=Object.keys(w).sort();return`${$.method}
10
+ ${this.getCanonicalPath($)}
11
+ ${DL($)}
12
+ ${U.map((E)=>`${E}:${w[E]}`).join("\n")}
13
+
14
+ ${U.join(";")}
15
+ ${G}`}async createStringToSign($,w,G){const U=new this.sha256;U.update(X$.toUint8Array(G));const E=await U.digest();return`${Z$}
16
+ ${$}
17
+ ${w}
18
+ ${f0.toHex(E)}`}getCanonicalPath({path:$}){if(this.uriEscapePath){const w=[];for(let E of $.split("/")){if((E==null?void 0:E.length)===0)continue;if(E===".")continue;if(E==="..")w.pop();else w.push(E)}const G=`${($==null?void 0:$.startsWith("/"))?"/":""}${w.join("/")}${w.length>0&&($==null?void 0:$.endsWith("/"))?"/":""}`;return l0.escapeUri(G).replace(/%2F/g,"/")}return $}async getSignature($,w,G,U){const E=await this.createStringToSign($,w,U),W=new this.sha256(await G);return W.update(X$.toUint8Array(E)),f0.toHex(await W.digest())}getSigningKey($,w,G,U){return cL(this.sha256,$,G,w,U||this.service)}validateResolvedCredentials($){if(typeof $!=="object"||typeof $.accessKeyId!=="string"||typeof $.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};S(_L,"SignatureV4");var R5=_L,pf=S((f)=>{const $=W5(f).replace(/[\-:]/g,"");return{longDate:$,shortDate:$.slice(0,8)}},"formatDate"),qL=S((f)=>Object.keys(f).sort().join(";"),"getCanonicalHeaderList")});var aL=M((vT,tL)=>{var{defineProperty:mf,getOwnPropertyDescriptor:F5,getOwnPropertyNames:I5}=Object,X5=Object.prototype.hasOwnProperty,c=(f,$)=>mf(f,"name",{value:$,configurable:!0}),Z5=(f,$)=>{for(var w in $)mf(f,w,{get:$[w],enumerable:!0})},Y5=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of I5($))if(!X5.call(f,U)&&U!==w)mf(f,U,{get:()=>$[U],enumerable:!(G=F5($,U))||G.enumerable})}return f},Q5=(f)=>Y5(mf({},"__esModule",{value:!0}),f),mL={};Z5(mL,{AWSSDKSigV4Signer:()=>J5,AwsSdkSigV4ASigner:()=>K5,AwsSdkSigV4Signer:()=>T$,NODE_SIGV4A_CONFIG_OPTIONS:()=>V5,resolveAWSSDKSigV4Config:()=>H5,resolveAwsSdkSigV4AConfig:()=>B5,resolveAwsSdkSigV4Config:()=>oL,validateSigningProperties:()=>J$});tL.exports=Q5(mL);var O5=G0(),M5=G0(),gL=c((f)=>{var $,w;return M5.HttpResponse.isInstance(f)?(($=f.headers)==null?void 0:$.date)??((w=f.headers)==null?void 0:w.Date):void 0},"getDateHeader"),z$=c((f)=>new Date(Date.now()+f),"getSkewCorrectedDate"),z5=c((f,$)=>Math.abs(z$($).getTime()-f)>=300000,"isClockSkewed"),nL=c((f,$)=>{const w=Date.parse(f);if(z5(w,$))return w-Date.now();return $},"getUpdatedSystemClockOffset"),m0=c((f,$)=>{if(!$)throw new Error(`Property \`${f}\` is not resolved for AWS SDK SigV4Auth`);return $},"throwSigningPropertyError"),J$=c(async(f)=>{var $,w,G;const U=m0("context",f.context),E=m0("config",f.config),W=(G=(w=($=U.endpointV2)==null?void 0:$.properties)==null?void 0:w.authSchemes)==null?void 0:G[0],R=await m0("signer",E.signer)(W),F=f==null?void 0:f.signingRegion,I=f==null?void 0:f.signingRegionSet,X=f==null?void 0:f.signingName;return{config:E,signer:R,signingRegion:F,signingRegionSet:I,signingName:X}},"validateSigningProperties"),iL=class f{async sign($,w,G){var U;if(!O5.HttpRequest.isInstance($))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const E=await J$(G),{config:W,signer:L}=E;let{signingRegion:R,signingName:F}=E;const I=G.context;if(((U=I==null?void 0:I.authSchemes)==null?void 0:U.length)??0>1){const[Y,Z]=I.authSchemes;if((Y==null?void 0:Y.name)==="sigv4a"&&(Z==null?void 0:Z.name)==="sigv4")R=(Z==null?void 0:Z.signingRegion)??R,F=(Z==null?void 0:Z.signingName)??F}return await L.sign($,{signingDate:z$(W.systemClockOffset),signingRegion:R,signingService:F})}errorHandler($){return(w)=>{const G=w.ServerTime??gL(w.$response);if(G){const U=m0("config",$.config),E=U.systemClockOffset;if(U.systemClockOffset=nL(G,U.systemClockOffset),U.systemClockOffset!==E&&w.$metadata)w.$metadata.clockSkewCorrected=!0}throw w}}successHandler($,w){const G=gL($);if(G){const U=m0("config",w.config);U.systemClockOffset=nL(G,U.systemClockOffset)}}};c(iL,"AwsSdkSigV4Signer");var T$=iL,J5=T$,T5=G0(),rL=class f extends T${async sign($,w,G){var U;if(!T5.HttpRequest.isInstance($))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:E,signer:W,signingRegion:L,signingRegionSet:R,signingName:F}=await J$(G),X=(await((U=E.sigv4aSigningRegionSet)==null?void 0:U.call(E))??R??[L]).join(",");return await W.sign($,{signingDate:z$(E.systemClockOffset),signingRegion:X,signingService:F})}};c(rL,"AwsSdkSigV4ASigner");var K5=rL,A5=n1(),sL=ef(),B5=c((f)=>{return f.sigv4aSigningRegionSet=A5.normalizeProvider(f.sigv4aSigningRegionSet),f},"resolveAwsSdkSigV4AConfig"),V5={environmentVariableSelector(f){if(f.AWS_SIGV4A_SIGNING_REGION_SET)return f.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map(($)=>$.trim());throw new sL.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(f){if(f.sigv4a_signing_region_set)return(f.sigv4a_signing_region_set??"").split(",").map(($)=>$.trim());throw new sL.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},I0=n1(),lL=pL(),oL=c((f)=>{let $;if(f.credentials)$=I0.memoizeIdentityProvider(f.credentials,I0.isIdentityExpired,I0.doesIdentityRequireRefresh);if(!$)if(f.credentialDefaultProvider)$=I0.normalizeProvider(f.credentialDefaultProvider(Object.assign({},f,{parentClientConfig:f})));else $=c(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:w=!0,systemClockOffset:G=f.systemClockOffset||0,sha256:U}=f;let E;if(f.signer)E=I0.normalizeProvider(f.signer);else if(f.regionInfoProvider)E=c(()=>I0.normalizeProvider(f.region)().then(async(W)=>[await f.regionInfoProvider(W,{useFipsEndpoint:await f.useFipsEndpoint(),useDualstackEndpoint:await f.useDualstackEndpoint()})||{},W]).then(([W,L])=>{const{signingRegion:R,signingService:F}=W;f.signingRegion=f.signingRegion||R||L,f.signingName=f.signingName||F||f.serviceId;const I={...f,credentials:$,region:f.signingRegion,service:f.signingName,sha256:U,uriEscapePath:w};return new(f.signerConstructor||lL.SignatureV4)(I)}),"signer");else E=c(async(W)=>{W=Object.assign({},{name:"sigv4",signingName:f.signingName||f.defaultSigningName,signingRegion:await I0.normalizeProvider(f.region)(),properties:{}},W);const{signingRegion:L,signingName:R}=W;f.signingRegion=f.signingRegion||L,f.signingName=f.signingName||R||f.serviceId;const F={...f,credentials:$,region:f.signingRegion,service:f.signingName,sha256:U,uriEscapePath:w};return new(f.signerConstructor||lL.SignatureV4)(F)},"signer");return{...f,systemClockOffset:G,signingEscapePath:w,credentials:$,signer:E}},"resolveAwsSdkSigV4Config"),H5=oL});var rf=M((S5)=>{var C5=":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",eL="[: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]["+C5+"]*",q5=new RegExp("^"+eL+"$"),N5=function(f,$){const w=[];let G=$.exec(f);while(G){const U=[];U.startIndex=$.lastIndex-G[0].length;const E=G.length;for(let W=0;W<E;W++)U.push(G[W]);w.push(U),G=$.exec(f)}return w},P5=function(f){const $=q5.exec(f);return!($===null||typeof $==="undefined")};S5.isExist=function(f){return typeof f!=="undefined"};S5.isEmptyObject=function(f){return Object.keys(f).length===0};S5.merge=function(f,$,w){if($){const G=Object.keys($),U=G.length;for(let E=0;E<U;E++)if(w==="strict")f[G[E]]=[$[G[E]]];else f[G[E]]=$[G[E]]}};S5.getValue=function(f){if(S5.isExist(f))return f;else return""};S5.isName=P5;S5.getAllMatches=N5;S5.nameRegexp=eL});var A$=M((s5)=>{var $R=function(f){return f===" "||f==="\t"||f==="\n"||f==="\r"},wR=function(f,$){const w=$;for(;$<f.length;$++)if(f[$]=="?"||f[$]==" "){const G=f.substr(w,$-w);if($>5&&G==="xml")return N("InvalidXml","XML declaration allowed only at the start of the document.",h(f,$));else if(f[$]=="?"&&f[$+1]==">"){$++;break}else continue}return $},UR=function(f,$){if(f.length>$+5&&f[$+1]==="-"&&f[$+2]==="-"){for($+=3;$<f.length;$++)if(f[$]==="-"&&f[$+1]==="-"&&f[$+2]===">"){$+=2;break}}else if(f.length>$+8&&f[$+1]==="D"&&f[$+2]==="O"&&f[$+3]==="C"&&f[$+4]==="T"&&f[$+5]==="Y"&&f[$+6]==="P"&&f[$+7]==="E"){let w=1;for($+=8;$<f.length;$++)if(f[$]==="<")w++;else if(f[$]===">"){if(w--,w===0)break}}else if(f.length>$+9&&f[$+1]==="["&&f[$+2]==="C"&&f[$+3]==="D"&&f[$+4]==="A"&&f[$+5]==="T"&&f[$+6]==="A"&&f[$+7]==="["){for($+=8;$<f.length;$++)if(f[$]==="]"&&f[$+1]==="]"&&f[$+2]===">"){$+=2;break}}return $},x5=function(f,$){let w="",G="",U=!1;for(;$<f.length;$++){if(f[$]===v5||f[$]===y5)if(G==="")G=f[$];else if(G!==f[$]);else G="";else if(f[$]===">"){if(G===""){U=!0;break}}w+=f[$]}if(G!=="")return!1;return{value:w,index:$,tagClosed:U}},GR=function(f,$){const w=K$.getAllMatches(f,_5),G={};for(let U=0;U<w.length;U++){if(w[U][1].length===0)return N("InvalidAttr","Attribute '"+w[U][2]+"' has no space in starting.",i0(w[U]));else if(w[U][3]!==void 0&&w[U][4]===void 0)return N("InvalidAttr","Attribute '"+w[U][2]+"' is without value.",i0(w[U]));else if(w[U][3]===void 0&&!$.allowBooleanAttributes)return N("InvalidAttr","boolean attribute '"+w[U][2]+"' is not allowed.",i0(w[U]));const E=w[U][2];if(!g5(E))return N("InvalidAttr","Attribute '"+E+"' is an invalid name.",i0(w[U]));if(!G.hasOwnProperty(E))G[E]=1;else return N("InvalidAttr","Attribute '"+E+"' is repeated.",i0(w[U]))}return!0},d5=function(f,$){let w=/\d/;if(f[$]==="x")$++,w=/[\da-fA-F]/;for(;$<f.length;$++){if(f[$]===";")return $;if(!f[$].match(w))break}return-1},p5=function(f,$){if($++,f[$]===";")return-1;if(f[$]==="#")return $++,d5(f,$);let w=0;for(;$<f.length;$++,w++){if(f[$].match(/\w/)&&w<20)continue;if(f[$]===";")break;return-1}return $},N=function(f,$,w){return{err:{code:f,msg:$,line:w.line||w,col:w.col}}},g5=function(f){return K$.isName(f)},n5=function(f){return K$.isName(f)},h=function(f,$){const w=f.substring(0,$).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}},i0=function(f){return f.startIndex+f[1].length},K$=rf(),u5={allowBooleanAttributes:!1,unpairedTags:[]};s5.validate=function(f,$){$=Object.assign({},u5,$);const w=[];let G=!1,U=!1;if(f[0]==="\uFEFF")f=f.substr(1);for(let E=0;E<f.length;E++)if(f[E]==="<"&&f[E+1]==="?"){if(E+=2,E=wR(f,E),E.err)return E}else if(f[E]==="<"){let W=E;if(E++,f[E]==="!"){E=UR(f,E);continue}else{let L=!1;if(f[E]==="/")L=!0,E++;let R="";for(;E<f.length&&f[E]!==">"&&f[E]!==" "&&f[E]!=="\t"&&f[E]!=="\n"&&f[E]!=="\r";E++)R+=f[E];if(R=R.trim(),R[R.length-1]==="/")R=R.substring(0,R.length-1),E--;if(!n5(R)){let X;if(R.trim().length===0)X="Invalid space after '<'.";else X="Tag '"+R+"' is an invalid name.";return N("InvalidTag",X,h(f,E))}const F=x5(f,E);if(F===!1)return N("InvalidAttr","Attributes for '"+R+"' have open quote.",h(f,E));let I=F.value;if(E=F.index,I[I.length-1]==="/"){const X=E-I.length;I=I.substring(0,I.length-1);const Y=GR(I,$);if(Y===!0)G=!0;else return N(Y.err.code,Y.err.msg,h(f,X+Y.err.line))}else if(L)if(!F.tagClosed)return N("InvalidTag","Closing tag '"+R+"' doesn't have proper closing.",h(f,E));else if(I.trim().length>0)return N("InvalidTag","Closing tag '"+R+"' can't have attributes or invalid starting.",h(f,W));else if(w.length===0)return N("InvalidTag","Closing tag '"+R+"' has not been opened.",h(f,W));else{const X=w.pop();if(R!==X.tagName){let Y=h(f,X.tagStartPos);return N("InvalidTag","Expected closing tag '"+X.tagName+"' (opened in line "+Y.line+", col "+Y.col+") instead of closing tag '"+R+"'.",h(f,W))}if(w.length==0)U=!0}else{const X=GR(I,$);if(X!==!0)return N(X.err.code,X.err.msg,h(f,E-I.length+X.err.line));if(U===!0)return N("InvalidXml","Multiple possible root nodes found.",h(f,E));else if($.unpairedTags.indexOf(R)!==-1);else w.push({tagName:R,tagStartPos:W});G=!0}for(E++;E<f.length;E++)if(f[E]==="<")if(f[E+1]==="!"){E++,E=UR(f,E);continue}else if(f[E+1]==="?"){if(E=wR(f,++E),E.err)return E}else break;else if(f[E]==="&"){const X=p5(f,E);if(X==-1)return N("InvalidChar","char '&' is not expected.",h(f,E));E=X}else if(U===!0&&!$R(f[E]))return N("InvalidXml","Extra text at the end",h(f,E));if(f[E]==="<")E--}}else{if($R(f[E]))continue;return N("InvalidChar","char '"+f[E]+"' is not expected.",h(f,E))}if(!G)return N("InvalidXml","Start tag expected.",1);else if(w.length==1)return N("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",h(f,w[0].tagStartPos));else if(w.length>0)return N("InvalidXml","Invalid '"+JSON.stringify(w.map((E)=>E.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var v5='"',y5="'",_5=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var WR=M((i5)=>{var ER={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(f,$){return $},attributeValueProcessor:function(f,$){return $},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(f,$,w){return f}},m5=function(f){return Object.assign({},ER,f)};i5.buildOptions=m5;i5.defaultOptions=ER});var FR=M((dT,RR)=>{class LR{constructor(f){this.tagname=f,this.child=[],this[":@"]={}}add(f,$){if(f==="__proto__")f="#__proto__";this.child.push({[f]:$})}addChild(f){if(f.tagname==="__proto__")f.tagname="#__proto__";if(f[":@"]&&Object.keys(f[":@"]).length>0)this.child.push({[f.tagname]:f.child,[":@"]:f[":@"]});else this.child.push({[f.tagname]:f.child})}}RR.exports=LR});var XR=M((pT,IR)=>{var a5=function(f,$){const w={};if(f[$+3]==="O"&&f[$+4]==="C"&&f[$+5]==="T"&&f[$+6]==="Y"&&f[$+7]==="P"&&f[$+8]==="E"){$=$+9;let G=1,U=!1,E=!1,W="";for(;$<f.length;$++)if(f[$]==="<"&&!E){if(U&&$Y(f,$)){if($+=7,[entityName,val,$]=e5(f,$+1),val.indexOf("&")===-1)w[EY(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(U&&wY(f,$))$+=8;else if(U&&UY(f,$))$+=8;else if(U&&GY(f,$))$+=9;else if(fY)E=!0;else throw new Error("Invalid DOCTYPE");G++,W=""}else if(f[$]===">"){if(E){if(f[$-1]==="-"&&f[$-2]==="-")E=!1,G--}else G--;if(G===0)break}else if(f[$]==="[")U=!0;else W+=f[$];if(G!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:w,i:$}},e5=function(f,$){let w="";for(;$<f.length&&(f[$]!=="'"&&f[$]!=='"');$++)w+=f[$];if(w=w.trim(),w.indexOf(" ")!==-1)throw new Error("External entites are not supported");const G=f[$++];let U="";for(;$<f.length&&f[$]!==G;$++)U+=f[$];return[w,U,$]},fY=function(f,$){if(f[$+1]==="!"&&f[$+2]==="-"&&f[$+3]==="-")return!0;return!1},$Y=function(f,$){if(f[$+1]==="!"&&f[$+2]==="E"&&f[$+3]==="N"&&f[$+4]==="T"&&f[$+5]==="I"&&f[$+6]==="T"&&f[$+7]==="Y")return!0;return!1},wY=function(f,$){if(f[$+1]==="!"&&f[$+2]==="E"&&f[$+3]==="L"&&f[$+4]==="E"&&f[$+5]==="M"&&f[$+6]==="E"&&f[$+7]==="N"&&f[$+8]==="T")return!0;return!1},UY=function(f,$){if(f[$+1]==="!"&&f[$+2]==="A"&&f[$+3]==="T"&&f[$+4]==="T"&&f[$+5]==="L"&&f[$+6]==="I"&&f[$+7]==="S"&&f[$+8]==="T")return!0;return!1},GY=function(f,$){if(f[$+1]==="!"&&f[$+2]==="N"&&f[$+3]==="O"&&f[$+4]==="T"&&f[$+5]==="A"&&f[$+6]==="T"&&f[$+7]==="I"&&f[$+8]==="O"&&f[$+9]==="N")return!0;return!1},EY=function(f){if(t5.isName(f))return f;else throw new Error(`Invalid entity name ${f}`)},t5=rf();IR.exports=a5});var YR=M((gT,ZR)=>{var FY=function(f,$={}){if($=Object.assign({},RY,$),!f||typeof f!=="string")return f;let w=f.trim();if($.skipLike!==void 0&&$.skipLike.test(w))return f;else if($.hex&&WY.test(w))return Number.parseInt(w,16);else{const G=LY.exec(w);if(G){const U=G[1],E=G[2];let W=IY(G[3]);const L=G[4]||G[6];if(!$.leadingZeros&&E.length>0&&U&&w[2]!==".")return f;else if(!$.leadingZeros&&E.length>0&&!U&&w[1]!==".")return f;else{const R=Number(w),F=""+R;if(F.search(/[eE]/)!==-1)if($.eNotation)return R;else return f;else if(L)if($.eNotation)return R;else return f;else if(w.indexOf(".")!==-1)if(F==="0"&&W==="")return R;else if(F===W)return R;else if(U&&F==="-"+W)return R;else return f;if(E)if(W===F)return R;else if(U+W===F)return R;else return f;if(w===F)return R;else if(w===U+F)return R;return f}}else return f}},IY=function(f){if(f&&f.indexOf(".")!==-1){if(f=f.replace(/0+$/,""),f===".")f="0";else if(f[0]===".")f="0"+f;else if(f[f.length-1]===".")f=f.substr(0,f.length-1);return f}return f},WY=/^[-+]?0x[a-fA-F0-9]+$/,LY=/^([\-\+])?(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 RY={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};ZR.exports=FY});var zR=M((nT,MR)=>{var YY=function(f){const $=Object.keys(f);for(let w=0;w<$.length;w++){const G=$[w];this.lastEntities[G]={regex:new RegExp("&"+G+";","g"),val:f[G]}}},QY=function(f,$,w,G,U,E,W){if(f!==void 0){if(this.options.trimValues&&!G)f=f.trim();if(f.length>0){if(!W)f=this.replaceEntitiesValue(f);const L=this.options.tagValueProcessor($,f,w,U,E);if(L===null||L===void 0)return f;else if(typeof L!==typeof f||L!==f)return L;else if(this.options.trimValues)return V$(f,this.options.parseTagValue,this.options.numberParseOptions);else if(f.trim()===f)return V$(f,this.options.parseTagValue,this.options.numberParseOptions);else return f}}},OY=function(f){if(this.options.removeNSPrefix){const $=f.split(":"),w=f.charAt(0)==="/"?"/":"";if($[0]==="xmlns")return"";if($.length===2)f=w+$[1]}return f},zY=function(f,$,w){if(!this.options.ignoreAttributes&&typeof f==="string"){const G=QR.getAllMatches(f,MY),U=G.length,E={};for(let W=0;W<U;W++){const L=this.resolveNameSpace(G[W][1]);let R=G[W][4],F=this.options.attributeNamePrefix+L;if(L.length){if(this.options.transformAttributeName)F=this.options.transformAttributeName(F);if(F==="__proto__")F="#__proto__";if(R!==void 0){if(this.options.trimValues)R=R.trim();R=this.replaceEntitiesValue(R);const I=this.options.attributeValueProcessor(L,R,$);if(I===null||I===void 0)E[F]=R;else if(typeof I!==typeof R||I!==R)E[F]=I;else E[F]=V$(R,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)E[F]=!0}}if(!Object.keys(E).length)return;if(this.options.attributesGroupName){const W={};return W[this.options.attributesGroupName]=E,W}return E}},TY=function(f,$,w){const G=this.options.updateTag($.tagname,w,$[":@"]);if(G===!1);else if(typeof G==="string")$.tagname=G,f.addChild($);else f.addChild($)},AY=function(f,$,w,G){if(f){if(G===void 0)G=Object.keys($.child).length===0;if(f=this.parseTextData(f,$.tagname,w,!1,$[":@"]?Object.keys($[":@"]).length!==0:!1,G),f!==void 0&&f!=="")$.add(this.options.textNodeName,f);f=""}return f},BY=function(f,$,w){const G="*."+w;for(let U in f){const E=f[U];if(G===E||$===E)return!0}return!1},VY=function(f,$,w=">"){let G,U="";for(let E=$;E<f.length;E++){let W=f[E];if(G){if(W===G)G=""}else if(W==='"'||W==="'")G=W;else if(W===w[0])if(w[1]){if(f[E+1]===w[1])return{data:U,index:E}}else return{data:U,index:E};else if(W==="\t")W=" ";U+=W}},X0=function(f,$,w,G){const U=f.indexOf($,w);if(U===-1)throw new Error(G);else return U+$.length-1},B$=function(f,$,w,G=">"){const U=VY(f,$+1,G);if(!U)return;let E=U.data;const W=U.index,L=E.search(/\s/);let R=E,F=!0;if(L!==-1)R=E.substring(0,L),E=E.substring(L+1).trimStart();const I=R;if(w){const X=R.indexOf(":");if(X!==-1)R=R.substr(X+1),F=R!==U.data.substr(X+1)}return{tagName:R,tagExp:E,closeIndex:W,attrExpPresent:F,rawTagName:I}},HY=function(f,$,w){const G=w;let U=1;for(;w<f.length;w++)if(f[w]==="<")if(f[w+1]==="/"){const E=X0(f,">",w,`${$} is not closed`);if(f.substring(w+2,E).trim()===$){if(U--,U===0)return{tagContent:f.substring(G,w),i:E}}w=E}else if(f[w+1]==="?")w=X0(f,"?>",w+1,"StopNode is not closed.");else if(f.substr(w+1,3)==="!--")w=X0(f,"-->",w+3,"StopNode is not closed.");else if(f.substr(w+1,2)==="![")w=X0(f,"]]>",w,"StopNode is not closed.")-2;else{const E=B$(f,w,">");if(E){if((E&&E.tagName)===$&&E.tagExp[E.tagExp.length-1]!=="/")U++;w=E.closeIndex}}},V$=function(f,$,w){if($&&typeof f==="string"){const G=f.trim();if(G==="true")return!0;else if(G==="false")return!1;else return ZY(f,w)}else if(QR.isExist(f))return f;else return""},QR=rf(),r0=FR(),XY=XR(),ZY=YR();class OR{constructor(f){this.options=f,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:($,w)=>String.fromCharCode(Number.parseInt(w,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:($,w)=>String.fromCharCode(Number.parseInt(w,16))}},this.addExternalEntities=YY,this.parseXml=JY,this.parseTextData=QY,this.resolveNameSpace=OY,this.buildAttributesMap=zY,this.isItStopNode=BY,this.replaceEntitiesValue=KY,this.readStopNodeData=HY,this.saveTextToParentTag=AY,this.addChild=TY}}var MY=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),JY=function(f){f=f.replace(/\r\n?/g,"\n");const $=new r0("!xml");let w=$,G="",U="";for(let E=0;E<f.length;E++)if(f[E]==="<")if(f[E+1]==="/"){const L=X0(f,">",E,"Closing Tag is not closed.");let R=f.substring(E+2,L).trim();if(this.options.removeNSPrefix){const X=R.indexOf(":");if(X!==-1)R=R.substr(X+1)}if(this.options.transformTagName)R=this.options.transformTagName(R);if(w)G=this.saveTextToParentTag(G,w,U);const F=U.substring(U.lastIndexOf(".")+1);if(R&&this.options.unpairedTags.indexOf(R)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${R}>`);let I=0;if(F&&this.options.unpairedTags.indexOf(F)!==-1)I=U.lastIndexOf(".",U.lastIndexOf(".")-1),this.tagsNodeStack.pop();else I=U.lastIndexOf(".");U=U.substring(0,I),w=this.tagsNodeStack.pop(),G="",E=L}else if(f[E+1]==="?"){let L=B$(f,E,!1,"?>");if(!L)throw new Error("Pi Tag is not closed.");if(G=this.saveTextToParentTag(G,w,U),this.options.ignoreDeclaration&&L.tagName==="?xml"||this.options.ignorePiTags);else{const R=new r0(L.tagName);if(R.add(this.options.textNodeName,""),L.tagName!==L.tagExp&&L.attrExpPresent)R[":@"]=this.buildAttributesMap(L.tagExp,U,L.tagName);this.addChild(w,R,U)}E=L.closeIndex+1}else if(f.substr(E+1,3)==="!--"){const L=X0(f,"-->",E+4,"Comment is not closed.");if(this.options.commentPropName){const R=f.substring(E+4,L-2);G=this.saveTextToParentTag(G,w,U),w.add(this.options.commentPropName,[{[this.options.textNodeName]:R}])}E=L}else if(f.substr(E+1,2)==="!D"){const L=XY(f,E);this.docTypeEntities=L.entities,E=L.i}else if(f.substr(E+1,2)==="!["){const L=X0(f,"]]>",E,"CDATA is not closed.")-2,R=f.substring(E+9,L);G=this.saveTextToParentTag(G,w,U);let F=this.parseTextData(R,w.tagname,U,!0,!1,!0,!0);if(F==null)F="";if(this.options.cdataPropName)w.add(this.options.cdataPropName,[{[this.options.textNodeName]:R}]);else w.add(this.options.textNodeName,F);E=L+2}else{let L=B$(f,E,this.options.removeNSPrefix),R=L.tagName;const F=L.rawTagName;let{tagExp:I,attrExpPresent:X,closeIndex:Y}=L;if(this.options.transformTagName)R=this.options.transformTagName(R);if(w&&G){if(w.tagname!=="!xml")G=this.saveTextToParentTag(G,w,U,!1)}const Z=w;if(Z&&this.options.unpairedTags.indexOf(Z.tagname)!==-1)w=this.tagsNodeStack.pop(),U=U.substring(0,U.lastIndexOf("."));if(R!==$.tagname)U+=U?"."+R:R;if(this.isItStopNode(this.options.stopNodes,U,R)){let O="";if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(R[R.length-1]==="/")R=R.substr(0,R.length-1),U=U.substr(0,U.length-1),I=R;else I=I.substr(0,I.length-1);E=L.closeIndex}else if(this.options.unpairedTags.indexOf(R)!==-1)E=L.closeIndex;else{const T=this.readStopNodeData(f,F,Y+1);if(!T)throw new Error(`Unexpected end of ${F}`);E=T.i,O=T.tagContent}const z=new r0(R);if(R!==I&&X)z[":@"]=this.buildAttributesMap(I,U,R);if(O)O=this.parseTextData(O,R,U,!0,X,!0,!0);U=U.substr(0,U.lastIndexOf(".")),z.add(this.options.textNodeName,O),this.addChild(w,z,U)}else{if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(R[R.length-1]==="/")R=R.substr(0,R.length-1),U=U.substr(0,U.length-1),I=R;else I=I.substr(0,I.length-1);if(this.options.transformTagName)R=this.options.transformTagName(R);const O=new r0(R);if(R!==I&&X)O[":@"]=this.buildAttributesMap(I,U,R);this.addChild(w,O,U),U=U.substr(0,U.lastIndexOf("."))}else{const O=new r0(R);if(this.tagsNodeStack.push(w),R!==I&&X)O[":@"]=this.buildAttributesMap(I,U,R);this.addChild(w,O,U),w=O}G="",E=Y}}else G+=f[E];return $.child},KY=function(f){if(this.options.processEntities){for(let $ in this.docTypeEntities){const w=this.docTypeEntities[$];f=f.replace(w.regx,w.val)}for(let $ in this.lastEntities){const w=this.lastEntities[$];f=f.replace(w.regex,w.val)}if(this.options.htmlEntities)for(let $ in this.htmlEntities){const w=this.htmlEntities[$];f=f.replace(w.regex,w.val)}f=f.replace(this.ampEntity.regex,this.ampEntity.val)}return f};MR.exports=OR});var TR=M((SY)=>{var CY=function(f,$){return JR(f,$)},JR=function(f,$,w){let G;const U={};for(let E=0;E<f.length;E++){const W=f[E],L=qY(W);let R="";if(w===void 0)R=L;else R=w+"."+L;if(L===$.textNodeName)if(G===void 0)G=W[L];else G+=""+W[L];else if(L===void 0)continue;else if(W[L]){let F=JR(W[L],$,R);const I=PY(F,$);if(W[":@"])NY(F,W[":@"],R,$);else if(Object.keys(F).length===1&&F[$.textNodeName]!==void 0&&!$.alwaysCreateTextNode)F=F[$.textNodeName];else if(Object.keys(F).length===0)if($.alwaysCreateTextNode)F[$.textNodeName]="";else F="";if(U[L]!==void 0&&U.hasOwnProperty(L)){if(!Array.isArray(U[L]))U[L]=[U[L]];U[L].push(F)}else if($.isArray(L,R,I))U[L]=[F];else U[L]=F}}if(typeof G==="string"){if(G.length>0)U[$.textNodeName]=G}else if(G!==void 0)U[$.textNodeName]=G;return U},qY=function(f){const $=Object.keys(f);for(let w=0;w<$.length;w++){const G=$[w];if(G!==":@")return G}},NY=function(f,$,w,G){if($){const U=Object.keys($),E=U.length;for(let W=0;W<E;W++){const L=U[W];if(G.isArray(L,w+"."+L,!0,!0))f[L]=[$[L]];else f[L]=$[L]}}},PY=function(f,$){const{textNodeName:w}=$,G=Object.keys(f).length;if(G===0)return!0;if(G===1&&(f[w]||typeof f[w]==="boolean"||f[w]===0))return!0;return!1};SY.prettify=CY});var BR=M((lT,AR)=>{var{buildOptions:bY}=WR(),hY=zR(),{prettify:kY}=TR(),cY=A$();class KR{constructor(f){this.externalEntities={},this.options=bY(f)}parse(f,$){if(typeof f==="string");else if(f.toString)f=f.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if($){if($===!0)$={};const U=cY.validate(f,$);if(U!==!0)throw Error(`${U.err.msg}:${U.err.line}:${U.err.col}`)}const w=new hY(this.options);w.addExternalEntities(this.externalEntities);const G=w.parseXml(f);if(this.options.preserveOrder||G===void 0)return G;else return kY(G,this.options)}addEntity(f,$){if($.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(f.indexOf("&")!==-1||f.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if($==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[f]=$}}AR.exports=KR});var NR=M((mT,qR)=>{var DY=function(f,$){let w="";if($.format&&$.indentBy.length>0)w="\n";return HR(f,$,"",w)},HR=function(f,$,w,G){let U="",E=!1;for(let W=0;W<f.length;W++){const L=f[W],R=uY(L);if(R===void 0)continue;let F="";if(w.length===0)F=R;else F=`${w}.${R}`;if(R===$.textNodeName){let O=L[R];if(!vY(F,$))O=$.tagValueProcessor(R,O),O=CR(O,$);if(E)U+=G;U+=O,E=!1;continue}else if(R===$.cdataPropName){if(E)U+=G;U+=`<![CDATA[${L[R][0][$.textNodeName]}]]>`,E=!1;continue}else if(R===$.commentPropName){U+=G+`<!--${L[R][0][$.textNodeName]}-->`,E=!0;continue}else if(R[0]==="?"){const O=VR(L[":@"],$),z=R==="?xml"?"":G;let T=L[R][0][$.textNodeName];T=T.length!==0?" "+T:"",U+=z+`<${R}${T}${O}?>`,E=!0;continue}let I=G;if(I!=="")I+=$.indentBy;const X=VR(L[":@"],$),Y=G+`<${R}${X}`,Z=HR(L[R],$,F,I);if($.unpairedTags.indexOf(R)!==-1)if($.suppressUnpairedNode)U+=Y+">";else U+=Y+"/>";else if((!Z||Z.length===0)&&$.suppressEmptyNode)U+=Y+"/>";else if(Z&&Z.endsWith(">"))U+=Y+`>${Z}${G}</${R}>`;else{if(U+=Y+">",Z&&G!==""&&(Z.includes("/>")||Z.includes("</")))U+=G+$.indentBy+Z+G;else U+=Z;U+=`</${R}>`}E=!0}return U},uY=function(f){const $=Object.keys(f);for(let w=0;w<$.length;w++){const G=$[w];if(!f.hasOwnProperty(G))continue;if(G!==":@")return G}},VR=function(f,$){let w="";if(f&&!$.ignoreAttributes)for(let G in f){if(!f.hasOwnProperty(G))continue;let U=$.attributeValueProcessor(G,f[G]);if(U=CR(U,$),U===!0&&$.suppressBooleanAttributes)w+=` ${G.substr($.attributeNamePrefix.length)}`;else w+=` ${G.substr($.attributeNamePrefix.length)}="${U}"`}return w},vY=function(f,$){f=f.substr(0,f.length-$.textNodeName.length-1);let w=f.substr(f.lastIndexOf(".")+1);for(let G in $.stopNodes)if($.stopNodes[G]===f||$.stopNodes[G]==="*."+w)return!0;return!1},CR=function(f,$){if(f&&f.length>0&&$.processEntities)for(let w=0;w<$.entities.length;w++){const G=$.entities[w];f=f.replace(G.regex,G.val)}return f};qR.exports=DY});var SR=M((iT,PR)=>{var $0=function(f){if(this.options=Object.assign({},xY,f),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=pY;if(this.processTextOrObjNode=_Y,this.options.format)this.indentate=dY,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""},_Y=function(f,$,w){const G=this.j2x(f,w+1);if(f[this.options.textNodeName]!==void 0&&Object.keys(f).length===1)return this.buildTextValNode(f[this.options.textNodeName],$,G.attrStr,w);else return this.buildObjectNode(G.val,$,G.attrStr,w)},dY=function(f){return this.options.indentBy.repeat(f)},pY=function(f){if(f.startsWith(this.options.attributeNamePrefix)&&f!==this.options.textNodeName)return f.substr(this.attrPrefixLen);else return!1},yY=NR(),xY={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(f,$){return $},attributeValueProcessor:function(f,$){return $},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};$0.prototype.build=function(f){if(this.options.preserveOrder)return yY(f,this.options);else{if(Array.isArray(f)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)f={[this.options.arrayNodeName]:f};return this.j2x(f,0).val}};$0.prototype.j2x=function(f,$){let w="",G="";for(let U in f){if(!Object.prototype.hasOwnProperty.call(f,U))continue;if(typeof f[U]==="undefined"){if(this.isAttribute(U))G+=""}else if(f[U]===null)if(this.isAttribute(U))G+="";else if(U[0]==="?")G+=this.indentate($)+"<"+U+"?"+this.tagEndChar;else G+=this.indentate($)+"<"+U+"/"+this.tagEndChar;else if(f[U]instanceof Date)G+=this.buildTextValNode(f[U],U,"",$);else if(typeof f[U]!=="object"){const E=this.isAttribute(U);if(E)w+=this.buildAttrPairStr(E,""+f[U]);else if(U===this.options.textNodeName){let W=this.options.tagValueProcessor(U,""+f[U]);G+=this.replaceEntitiesValue(W)}else G+=this.buildTextValNode(f[U],U,"",$)}else if(Array.isArray(f[U])){const E=f[U].length;let W="",L="";for(let R=0;R<E;R++){const F=f[U][R];if(typeof F==="undefined");else if(F===null)if(U[0]==="?")G+=this.indentate($)+"<"+U+"?"+this.tagEndChar;else G+=this.indentate($)+"<"+U+"/"+this.tagEndChar;else if(typeof F==="object")if(this.options.oneListGroup){const I=this.j2x(F,$+1);if(W+=I.val,this.options.attributesGroupName&&F.hasOwnProperty(this.options.attributesGroupName))L+=I.attrStr}else W+=this.processTextOrObjNode(F,U,$);else if(this.options.oneListGroup){let I=this.options.tagValueProcessor(U,F);I=this.replaceEntitiesValue(I),W+=I}else W+=this.buildTextValNode(F,U,"",$)}if(this.options.oneListGroup)W=this.buildObjectNode(W,U,L,$);G+=W}else if(this.options.attributesGroupName&&U===this.options.attributesGroupName){const E=Object.keys(f[U]),W=E.length;for(let L=0;L<W;L++)w+=this.buildAttrPairStr(E[L],""+f[U][E[L]])}else G+=this.processTextOrObjNode(f[U],U,$)}return{attrStr:w,val:G}};$0.prototype.buildAttrPairStr=function(f,$){if($=this.options.attributeValueProcessor(f,""+$),$=this.replaceEntitiesValue($),this.options.suppressBooleanAttributes&&$==="true")return" "+f;else return" "+f+'="'+$+'"'};$0.prototype.buildObjectNode=function(f,$,w,G){if(f==="")if($[0]==="?")return this.indentate(G)+"<"+$+w+"?"+this.tagEndChar;else return this.indentate(G)+"<"+$+w+this.closeTag($)+this.tagEndChar;else{let U="</"+$+this.tagEndChar,E="";if($[0]==="?")E="?",U="";if((w||w==="")&&f.indexOf("<")===-1)return this.indentate(G)+"<"+$+w+E+">"+f+U;else if(this.options.commentPropName!==!1&&$===this.options.commentPropName&&E.length===0)return this.indentate(G)+`<!--${f}-->`+this.newLine;else return this.indentate(G)+"<"+$+w+E+this.tagEndChar+f+this.indentate(G)+U}};$0.prototype.closeTag=function(f){let $="";if(this.options.unpairedTags.indexOf(f)!==-1){if(!this.options.suppressUnpairedNode)$="/"}else if(this.options.suppressEmptyNode)$="/";else $=`></${f}`;return $};$0.prototype.buildTextValNode=function(f,$,w,G){if(this.options.cdataPropName!==!1&&$===this.options.cdataPropName)return this.indentate(G)+`<![CDATA[${f}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&$===this.options.commentPropName)return this.indentate(G)+`<!--${f}-->`+this.newLine;else if($[0]==="?")return this.indentate(G)+"<"+$+w+"?"+this.tagEndChar;else{let U=this.options.tagValueProcessor($,f);if(U=this.replaceEntitiesValue(U),U==="")return this.indentate(G)+"<"+$+w+this.closeTag($)+this.tagEndChar;else return this.indentate(G)+"<"+$+w+">"+U+"</"+$+this.tagEndChar}};$0.prototype.replaceEntitiesValue=function(f){if(f&&f.length>0&&this.options.processEntities)for(let $=0;$<this.options.entities.length;$++){const w=this.options.entities[$];f=f.replace(w.regex,w.val)}return f};PR.exports=$0});var bR=M((rT,jR)=>{var gY=A$(),nY=BR(),sY=SR();jR.exports={XMLParser:nY,XMLValidator:gY,XMLBuilder:sY}});var vR=M((oT,uR)=>{var{defineProperty:of,getOwnPropertyDescriptor:lY,getOwnPropertyNames:mY}=Object,iY=Object.prototype.hasOwnProperty,D=(f,$)=>of(f,"name",{value:$,configurable:!0}),rY=(f,$)=>{for(var w in $)of(f,w,{get:$[w],enumerable:!0})},oY=(f,$,w,G)=>{if($&&typeof $==="object"||typeof $==="function"){for(let U of mY($))if(!iY.call(f,U)&&U!==w)of(f,U,{get:()=>$[U],enumerable:!(G=lY($,U))||G.enumerable})}return f},tY=(f)=>oY(of({},"__esModule",{value:!0}),f),hR={};rY(hR,{_toBool:()=>eY,_toNum:()=>f9,_toStr:()=>aY,awsExpectUnion:()=>w9,loadRestJsonErrorCode:()=>E9,loadRestXmlErrorCode:()=>F9,parseJsonBody:()=>cR,parseJsonErrorBody:()=>G9,parseXmlBody:()=>DR,parseXmlErrorBody:()=>R9});uR.exports=tY(hR);var aY=D((f)=>{if(f==null)return f;if(typeof f==="number"||typeof f==="bigint"){const $=new Error(`Received number ${f} where a string was expected.`);return $.name="Warning",console.warn($),String(f)}if(typeof f==="boolean"){const $=new Error(`Received boolean ${f} where a string was expected.`);return $.name="Warning",console.warn($),String(f)}return f},"_toStr"),eY=D((f)=>{if(f==null)return f;if(typeof f==="string"){const $=f.toLowerCase();if(f!==""&&$!=="false"&&$!=="true"){const w=new Error(`Received string "${f}" where a boolean was expected.`);w.name="Warning",console.warn(w)}return f!==""&&$!=="false"}return f},"_toBool"),f9=D((f)=>{if(f==null)return f;if(typeof f==="string"){const $=Number(f);if($.toString()!==f){const w=new Error(`Received string "${f}" where a number was expected.`);return w.name="Warning",console.warn(w),f}return $}return f},"_toNum"),$9=T0(),w9=D((f)=>{if(f==null)return;if(typeof f==="object"&&"__type"in f)delete f.__type;return $9.expectUnion(f)},"awsExpectUnion"),U9=T0(),kR=D((f,$)=>U9.collectBody(f,$).then((w)=>$.utf8Encoder(w)),"collectBodyString"),cR=D((f,$)=>kR(f,$).then((w)=>{if(w.length)try{return JSON.parse(w)}catch(G){if((G==null?void 0:G.name)==="SyntaxError")Object.defineProperty(G,"$responseBodyText",{value:w});throw G}return{}}),"parseJsonBody"),G9=D(async(f,$)=>{const w=await cR(f,$);return w.message=w.message??w.Message,w},"parseJsonErrorBody"),E9=D((f,$)=>{const w=D((E,W)=>Object.keys(E).find((L)=>L.toLowerCase()===W.toLowerCase()),"findKey"),G=D((E)=>{let W=E;if(typeof W==="number")W=W.toString();if(W.indexOf(",")>=0)W=W.split(",")[0];if(W.indexOf(":")>=0)W=W.split(":")[0];if(W.indexOf("#")>=0)W=W.split("#")[1];return W},"sanitizeErrorCode"),U=w(f.headers,"x-amzn-errortype");if(U!==void 0)return G(f.headers[U]);if($.code!==void 0)return G($.code);if($.__type!==void 0)return G($.__type)},"loadRestJsonErrorCode"),W9=T0(),L9=bR(),DR=D((f,$)=>kR(f,$).then((w)=>{if(w.length){const G=new L9.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(R,F)=>F.trim()===""&&F.includes("\n")?"":void 0});G.addEntity("#xD","\r"),G.addEntity("#10","\n");let U;try{U=G.parse(w,!0)}catch(R){if(R&&typeof R==="object")Object.defineProperty(R,"$responseBodyText",{value:w});throw R}const E="#text",W=Object.keys(U)[0],L=U[W];if(L[E])L[W]=L[E],delete L[E];return W9.getValueFromTextNode(L)}return{}}),"parseXmlBody"),R9=D(async(f,$)=>{const w=await DR(f,$);if(w.Error)w.Error.message=w.Error.message??w.Error.Message;return w},"parseXmlErrorBody"),F9=D((f,$)=>{var w;if(((w=$==null?void 0:$.Error)==null?void 0:w.Code)!==void 0)return $.Error.Code;if(($==null?void 0:$.Code)!==void 0)return $.Code;if(f.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var I9=M((o0)=>{Object.defineProperty(o0,"__esModule",{value:!0});var H$=JL();H$.__exportStar(BL(),o0);H$.__exportStar(aL(),o0);H$.__exportStar(vR(),o0)});function q9(f){return f}var oR=(f)=>($)=>async(w)=>{if(!v.isInstance(w.request))return $(w);const{request:G}=w,{handlerProtocol:U=""}=f.requestHandler.metadata||{};if(U.indexOf("h2")>=0&&!G.headers[":authority"])delete G.headers.host,G.headers[":authority"]=G.hostname+(G.port?":"+G.port:"");else if(!G.headers.host){let E=G.hostname;if(G.port!=null)E+=`:${G.port}`;G.headers.host=E}return $(w)},tR={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},N9=(f)=>({applyToStack:($)=>{$.add(oR(f),tR)}});var aR=()=>(f,$)=>async(w)=>{try{const G=await f(w),{clientName:U,commandName:E,logger:W,dynamoDbDocumentClientOptions:L={}}=$,{overrideInputFilterSensitiveLog:R,overrideOutputFilterSensitiveLog:F}=L,I=R??$.inputFilterSensitiveLog,X=F??$.outputFilterSensitiveLog,{$metadata:Y,...Z}=G.output;return W?.info?.({clientName:U,commandName:E,input:I(w.input),output:X(Z),metadata:Y}),G}catch(G){const{clientName:U,commandName:E,logger:W,dynamoDbDocumentClientOptions:L={}}=$,{overrideInputFilterSensitiveLog:R}=L,F=R??$.inputFilterSensitiveLog;throw W?.error?.({clientName:U,commandName:E,input:F(w.input),error:G,metadata:G.$metadata}),G}},eR={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},S9=(f)=>({applyToStack:($)=>{$.add(aR(),eR)}});var j$="X-Amzn-Trace-Id",f8="AWS_LAMBDA_FUNCTION_NAME",$8="_X_AMZN_TRACE_ID",w8=(f)=>($)=>async(w)=>{const{request:G}=w;if(!v.isInstance(G)||f.runtime!=="node"||G.headers.hasOwnProperty(j$))return $(w);const U=process.env[f8],E=process.env[$8],W=(L)=>typeof L==="string"&&L.length>0;if(W(U)&&W(E))G.headers[j$]=E;return $({...w,request:G})},U8={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},c9=(f)=>({applyToStack:($)=>{$.add(w8(f),U8)}});function P7(f){return{...f,customUserAgent:typeof f.customUserAgent==="string"?[[f.customUserAgent]]:f.customUserAgent}}var d6=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}$"),p0=(f)=>d6.test(f)||f.startsWith("[")&&f.endsWith("]");var p6=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),g0=(f,$=!1)=>{if(!$)return p6.test(f);const w=f.split(".");for(let G of w)if(!g0(G))return!1;return!0};var n0={};var r="endpoints";function x(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`\$${x(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(x).join(", ")})`;return JSON.stringify(f,null,2)}class B extends Error{constructor(f){super(f);this.name="EndpointError"}}var eE=(f,$)=>f===$;var fW=(f)=>{const $=f.split("."),w=[];for(let G of $){const U=G.indexOf("[");if(U!==-1){if(G.indexOf("]")!==G.length-1)throw new B(`Path: '${f}' does not end with ']'`);const E=G.slice(U+1,-1);if(Number.isNaN(parseInt(E)))throw new B(`Invalid array index: '${E}' in path: '${f}'`);if(U!==0)w.push(G.slice(0,U));w.push(E)}else w.push(G)}return w};var Bf=(f,$)=>fW($).reduce((w,G)=>{if(typeof w!=="object")throw new B(`Index '${G}' in '${$}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(w))return w[parseInt(G)];return w[G]},f);var $W=(f)=>f!=null;var wW=(f)=>!f;var Vf=t(N0(),1);var s1={[Vf.EndpointURLScheme.HTTP]:80,[Vf.EndpointURLScheme.HTTPS]:443},UW=(f)=>{const $=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){const{hostname:Y,port:Z,protocol:O="",path:z="",query:T={}}=f,K=new URL(`${O}//${Y}${Z?`:${Z}`:""}${z}`);return K.search=Object.entries(T).map(([J,A])=>`${J}=${A}`).join("&"),K}return new URL(f)}catch(Y){return null}})();if(!$)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;const w=$.href,{host:G,hostname:U,pathname:E,protocol:W,search:L}=$;if(L)return null;const R=W.slice(0,-1);if(!Object.values(Vf.EndpointURLScheme).includes(R))return null;const F=p0(U),I=w.includes(`${G}:${s1[R]}`)||typeof f==="string"&&f.includes(`${G}:${s1[R]}`),X=`${G}${I?`:${s1[R]}`:""}`;return{scheme:R,authority:X,path:E,normalizedPath:E.endsWith("/")?E:`${E}/`,isIp:F}};var GW=(f,$)=>f===$;var EW=(f,$,w,G)=>{if($>=w||f.length<w)return null;if(!G)return f.substring($,w);return f.substring(f.length-w,f.length-$)};var WW=(f)=>encodeURIComponent(f).replace(/[!*'()]/g,($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`);var LW={booleanEquals:eE,getAttr:Bf,isSet:$W,isValidHostLabel:g0,not:wW,parseURL:UW,stringEquals:GW,substring:EW,uriEncode:WW};var Hf=(f,$)=>{const w=[],G={...$.endpointParams,...$.referenceRecord};let U=0;while(U<f.length){const E=f.indexOf("{",U);if(E===-1){w.push(f.slice(U));break}w.push(f.slice(U,E));const W=f.indexOf("}",E);if(W===-1){w.push(f.slice(E));break}if(f[E+1]==="{"&&f[W+1]==="}")w.push(f.slice(E+1,W)),U=W+2;const L=f.substring(E+1,W);if(L.includes("#")){const[R,F]=L.split("#");w.push(Bf(G[R],F))}else w.push(G[L]);U=W+1}return w.join("")};var RW=({ref:f},$)=>{return{...$.endpointParams,...$.referenceRecord}[f]};var a=(f,$,w)=>{if(typeof f==="string")return Hf(f,w);else if(f.fn)return Cf(f,w);else if(f.ref)return RW(f,w);throw new B(`'${$}': ${String(f)} is not a string, function or reference.`)};var Cf=({fn:f,argv:$},w)=>{const G=$.map((E)=>["boolean","number"].includes(typeof E)?E:a(E,"arg",w)),U=f.split(".");if(U[0]in n0&&U[1]!=null)return n0[U[0]][U[1]](...G);return LW[f](...G)};var FW=({assign:f,...$},w)=>{if(f&&f in w.referenceRecord)throw new B(`'${f}' is already defined in Reference Record.`);const G=Cf($,w);return w.logger?.debug?.(`${r} evaluateCondition: ${x($)} = ${x(G)}`),{result:G===""?!0:!!G,...f!=null&&{toAssign:{name:f,value:G}}}};var A0=(f=[],$)=>{const w={};for(let G of f){const{result:U,toAssign:E}=FW(G,{...$,referenceRecord:{...$.referenceRecord,...w}});if(!U)return{result:U};if(E)w[E.name]=E.value,$.logger?.debug?.(`${r} assign: ${E.name} := ${x(E.value)}`)}return{result:!0,referenceRecord:w}};var IW=(f,$)=>Object.entries(f).reduce((w,[G,U])=>({...w,[G]:U.map((E)=>{const W=a(E,"Header value entry",$);if(typeof W!=="string")throw new B(`Header '${G}' value '${W}' is not a string`);return W})}),{});var l1=(f,$)=>{if(Array.isArray(f))return f.map((w)=>l1(w,$));switch(typeof f){case"string":return Hf(f,$);case"object":if(f===null)throw new B(`Unexpected endpoint property: ${f}`);return qf(f,$);case"boolean":return f;default:throw new B(`Unexpected endpoint property type: ${typeof f}`)}};var qf=(f,$)=>Object.entries(f).reduce((w,[G,U])=>({...w,[G]:l1(U,$)}),{});var XW=(f,$)=>{const w=a(f,"Endpoint URL",$);if(typeof w==="string")try{return new URL(w)}catch(G){throw console.error(`Failed to construct URL with ${w}`,G),G}throw new B(`Endpoint URL must be a string, got ${typeof w}`)};var ZW=(f,$)=>{const{conditions:w,endpoint:G}=f,{result:U,referenceRecord:E}=A0(w,$);if(!U)return;const W={...$,referenceRecord:{...$.referenceRecord,...E}},{url:L,properties:R,headers:F}=G;return $.logger?.debug?.(`${r} Resolving endpoint from template: ${x(G)}`),{...F!=null&&{headers:IW(F,W)},...R!=null&&{properties:qf(R,W)},url:XW(L,W)}};var YW=(f,$)=>{const{conditions:w,error:G}=f,{result:U,referenceRecord:E}=A0(w,$);if(!U)return;throw new B(a(G,"Error",{...$,referenceRecord:{...$.referenceRecord,...E}}))};var QW=(f,$)=>{const{conditions:w,rules:G}=f,{result:U,referenceRecord:E}=A0(w,$);if(!U)return;return Nf(G,{...$,referenceRecord:{...$.referenceRecord,...E}})};var Nf=(f,$)=>{for(let w of f)if(w.type==="endpoint"){const G=ZW(w,$);if(G)return G}else if(w.type==="error")YW(w,$);else if(w.type==="tree"){const G=QW(w,$);if(G)return G}else throw new B(`Unknown endpoint rule: ${w}`);throw new B("Rules evaluation failed")};var g6=(f,$)=>{const{endpointParams:w,logger:G}=$,{parameters:U,rules:E}=f;$.logger?.debug?.(`${r} Initial EndpointParams: ${x(w)}`);const W=Object.entries(U).filter(([,F])=>F.default!=null).map(([F,I])=>[F,I.default]);if(W.length>0)for(let[F,I]of W)w[F]=w[F]??I;const L=Object.entries(U).filter(([,F])=>F.required).map(([F])=>F);for(let F of L)if(w[F]==null)throw new B(`Missing required parameter: '${F}'`);const R=Nf(E,{endpointParams:w,logger:G,referenceRecord:{}});if($.endpointParams?.Endpoint)try{const F=new URL($.endpointParams.Endpoint),{protocol:I,port:X}=F;R.url.protocol=I,R.url.port=X}catch(F){}return $.logger?.debug?.(`${r} Resolved endpoint: ${x(R)}`),R};var m1=(f,$=!1)=>{if($){for(let w of f.split("."))if(!m1(w))return!1;return!0}if(!g0(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(p0(f))return!1;return!0};var OW=(f)=>{const $=f.split(":");if($.length<6)return null;const[w,G,U,E,W,...L]=$;if(w!=="arn"||G===""||U===""||L[0]==="")return null;return{partition:G,service:U,region:E,accountId:W,resourceId:L[0].includes("/")?L[0].split("/"):L}};var MW={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 s6=MW,l6="",zW=(f)=>{const{partitions:$}=s6;for(let G of $){const{regions:U,outputs:E}=G;for(let[W,L]of Object.entries(U))if(W===f)return{...E,...L}}for(let G of $){const{regionRegex:U,outputs:E}=G;if(new RegExp(U).test(f))return{...E}}const w=$.find((G)=>G.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}};var JW=()=>l6;var m6={isVirtualHostableS3Bucket:m1,parseArn:OW,partition:zW};n0.aws=m6;var i1="user-agent",Pf="x-amz-user-agent",r1=" ",Sf="/",TW=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,KW=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,o1="-";var i6=(f)=>($,w)=>async(G)=>{const{request:U}=G;if(!v.isInstance(U))return $(G);const{headers:E}=U,W=w?.userAgent?.map(t1)||[],L=(await f.defaultUserAgentProvider()).map(t1),R=f?.customUserAgent?.map(t1)||[],F=JW(),I=(F?[F]:[]).concat([...L,...W,...R]).join(r1),X=[...L.filter((Y)=>Y.startsWith("aws-sdk-")),...R].join(r1);if(f.runtime!=="browser"){if(X)E[Pf]=E[Pf]?`${E[i1]} ${X}`:X;E[i1]=I}else E[Pf]=I;return $({...G,request:U})},t1=(f)=>{const $=f[0].split(Sf).map((W)=>W.replace(TW,o1)).join(Sf),w=f[1]?.replace(KW,o1),G=$.indexOf(Sf),U=$.substring(0,G);let E=$.substring(G+1);if(U==="api")E=E.toLowerCase();return[U,E,w].filter((W)=>W&&W.length>0).reduce((W,L,R)=>{switch(R){case 0:return L;case 1:return`${W}/${L}`;default:return`${W}#${L}`}},"")},r6={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},LM=(f)=>({applyToStack:($)=>{$.add(i6(f),r6)}});var jf=(f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips"));var a1=(f)=>jf(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f;var zM=(f)=>{const{region:$,useFipsEndpoint:w}=f;if(!$)throw new Error("Region is missing");return{...f,region:async()=>{if(typeof $==="string")return a1($);const G=await $();return a1(G)},useFipsEndpoint:async()=>{const G=typeof $==="string"?$:await $();if(jf(G))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}}};var B0=(f,$,w)=>{if(!($ in f))return;if(f[$]==="true")return!0;if(f[$]==="false")return!1;throw new Error(`Cannot load ${w} "${$}". Expected "true" or "false", got ${f[$]}.`)};var e;(function(f){f.ENV="env",f.CONFIG="shared config entry"})(e||(e={}));var o6="AWS_USE_DUALSTACK_ENDPOINT",t6="use_dualstack_endpoint";var NM={environmentVariableSelector:(f)=>B0(f,o6,e.ENV),configFileSelector:(f)=>B0(f,t6,e.CONFIG),default:!1};var a6="AWS_USE_FIPS_ENDPOINT",e6="use_fips_endpoint";var jM={environmentVariableSelector:(f)=>B0(f,a6,e.ENV),configFileSelector:(f)=>B0(f,e6,e.CONFIG),default:!1};var fZ=t(s(),1);var $Z=t(s(),1);var AW={environmentVariableSelector:(f)=>f["AWS_REGION"],configFileSelector:(f)=>f["region"],default:()=>{throw new Error("Region is missing")}},pM={preferredFile:"credentials"};function wZ(f){return($)=>async(w)=>{const G=w.request;if(v.isInstance(G)){const{body:U,headers:E}=G;if(U&&Object.keys(E).map((W)=>W.toLowerCase()).indexOf(BW)===-1)try{const W=f(U);G.headers={...G.headers,[BW]:String(W)}}catch(W){}}return $({...w,request:G})}}var BW="content-length",UZ={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Oz=(f)=>({applyToStack:($)=>{$.add(wZ(f.bodyLengthChecker),UZ)}});var hW=t(a0(),1);var jW=t(s(),1);var VW=async(f)=>{const $=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=$.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(RZ($)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!LZ($)||$.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||$.toLowerCase()!==$||$.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},GZ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,EZ=/(\d+\.){3}\d+/,WZ=/\.\./;var LZ=(f)=>GZ.test(f)&&!EZ.test(f)&&!WZ.test(f),RZ=(f)=>{const[$,w,G,,,U]=f.split(":"),E=$==="arn"&&f.split(":").length>=6,W=Boolean(E&&w&&G&&U);if(E&&!W)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return W};var HW=(f,$,w)=>{const G=async()=>{const U=w[f]??w[$];if(typeof U==="function")return U();return U};if(f==="credentialScope"||$==="CredentialScope")return async()=>{const U=typeof w.credentials==="function"?await w.credentials():w.credentials;return U?.credentialScope??U?.CredentialScope};if(f==="accountId"||$==="AccountId")return async()=>{const U=typeof w.credentials==="function"?await w.credentials():w.credentials;return U?.accountId??U?.AccountId};if(f==="endpoint"||$==="endpoint")return async()=>{const U=await G();if(U&&typeof U==="object"){if("url"in U)return U.url.href;if("hostname"in U){const{protocol:E,hostname:W,port:L,path:R}=U;return`${E}//${W}${L?":"+L:""}${R}`}}return U};return G};var CW="AWS_ENDPOINT_URL",qW="endpoint_url",NW=(f)=>({environmentVariableSelector:($)=>{const w=f.split(" ").map((E)=>E.toUpperCase()),G=$[[CW,...w].join("_")];if(G)return G;const U=$[CW];if(U)return U;return},configFileSelector:($,w)=>{if(w&&$.services){const U=w[["services",$.services].join(e1)];if(U){const E=f.split(" ").map((L)=>L.toLowerCase()),W=U[[E.join("_"),qW].join(e1)];if(W)return W}}const G=$[qW];if(G)return G;return},default:void 0});var PW=async(f)=>L0(NW(f))();var bf=(f)=>{if(typeof f==="object"){if("url"in f)return f$(f.url);return f}return f$(f)};var SW=async(f,$,w,G)=>{if(!w.endpoint){const W=await PW(w.serviceId||"");if(W)w.endpoint=()=>Promise.resolve(bf(W))}const U=await FZ(f,$,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider(U,G)},FZ=async(f,$,w)=>{const G={},U=$?.getEndpointParameterInstructions?.()||{};for(let[E,W]of Object.entries(U))switch(W.type){case"staticContextParams":G[E]=W.value;break;case"contextParams":G[E]=f[W.name];break;case"clientContextParams":case"builtInParams":G[E]=await HW(W.name,E,w)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(W))}if(Object.keys(U).length===0)Object.assign(G,w);if(String(w.serviceId).toLowerCase()==="s3")await VW(G);return G};var bW=({config:f,instructions:$})=>{return(w,G)=>async(U)=>{const E=await SW(U.input,{getEndpointParameterInstructions(){return $}},{...f},G);G.endpointV2=E,G.authSchemes=E.properties?.authSchemes;const W=G.authSchemes?.[0];if(W){G.signing_region=W.signingRegion,G.signing_service=W.signingName;const R=jW.getSmithyContext(G)?.selectedHttpAuthScheme?.httpAuthOption;if(R)R.signingProperties=Object.assign(R.signingProperties||{},{signing_region:W.signingRegion,signingRegion:W.signingRegion,signing_service:W.signingName,signingName:W.signingName,signingRegionSet:W.signingRegionSet},W.properties)}return w({...U})}};var IZ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:hW.serializerMiddlewareOption.name},uz=(f,$)=>({applyToStack:(w)=>{w.addRelativeTo(bW({config:f,instructions:$}),IZ)}});var hf=t(s(),1);var xz=(f)=>{const $=f.tls??!0,{endpoint:w}=f,G=w!=null?async()=>bf(await hf.normalizeProvider(w)()):void 0;return{...f,endpoint:G,tls:$,isCustomEndpoint:!!w,useDualstackEndpoint:hf.normalizeProvider(f.useDualstackEndpoint??!1),useFipsEndpoint:hf.normalizeProvider(f.useFipsEndpoint??!1)}};var m=t(M1(),1),oz=m.default.v1,tz=m.default.v3,kW=m.default.v4,az=m.default.v5,ez=m.default.NIL,fJ=m.default.version,$J=m.default.validate,wJ=m.default.stringify,UJ=m.default.parse;var L$=t(s(),1);var n;(function(f){f.STANDARD="standard",f.ADAPTIVE="adaptive"})(n||(n={}));var R0=3,cW=n.STANDARD;var DW=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],uW=["TimeoutError","RequestTimeout","RequestTimeoutException"],vW=[500,502,503,504],yW=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var XZ=(f)=>f.$metadata?.clockSkewCorrected,V0=(f)=>f.$metadata?.httpStatusCode===429||DW.includes(f.name)||f.$retryable?.throttling==!0,kf=(f)=>XZ(f)||uW.includes(f.name)||yW.includes(f?.code||"")||vW.includes(f.$metadata?.httpStatusCode||0),xW=(f)=>{if(f.$metadata?.httpStatusCode!==void 0){const $=f.$metadata.httpStatusCode;if(500<=$&&$<=599&&!kf(f))return!0;return!1}return!1};class cf{constructor(f){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=f?.beta??0.7,this.minCapacity=f?.minCapacity??1,this.minFillRate=f?.minFillRate??0.5,this.scaleConstant=f?.scaleConstant??0.4,this.smooth=f?.smooth??0.8;const $=this.getCurrentTimeInSeconds();this.lastThrottleTime=$,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(f){if(!this.enabled)return;if(this.refillTokenBucket(),f>this.currentCapacity){const $=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,$))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){const f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}const $=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+$),this.lastTimestamp=f}updateClientSendingRate(f){let $;if(this.updateMeasuredRate(),V0(f)){const G=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=G,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),$=this.cubicThrottle(G),this.enableTokenBucket()}else this.calculateTimeWindow(),$=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min($,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(f){return this.getPrecise(f*this.beta)}cubicSuccess(f){return this.getPrecise(this.scaleConstant*Math.pow(f-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(f){this.refillTokenBucket(),this.fillRate=Math.max(f,this.minFillRate),this.maxCapacity=Math.max(f,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const f=this.getCurrentTimeInSeconds(),$=Math.floor(f*2)/2;if(this.requestCount++,$>this.lastTxRateBucket){const w=this.requestCount/($-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=$}}getPrecise(f){return parseFloat(f.toFixed(8))}}var F0=100,s0=20000,$$=500,Df=500,w$=5,U$=10,G$=1,uf="amz-sdk-invocation-id",vf="amz-sdk-request";var _W=()=>{let f=F0;return{computeNextBackoffDelay:(G)=>{return Math.floor(Math.min(s0,Math.random()*2**G*f))},setDelayBase:(G)=>{f=G}}};var E$=({retryDelay:f,retryCount:$,retryCost:w})=>{return{getRetryCount:()=>$,getRetryDelay:()=>Math.min(s0,f),getRetryCost:()=>w}};class H0{constructor(f){this.maxAttempts=f,this.mode=n.STANDARD,this.capacity=Df,this.retryBackoffStrategy=_W(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return E$({retryDelay:F0,retryCount:0})}async refreshRetryTokenForRetry(f,$){const w=await this.getMaxAttempts();if(this.shouldRetry(f,$,w)){const G=$.errorType;this.retryBackoffStrategy.setDelayBase(G==="THROTTLING"?$$:F0);const U=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),E=$.retryAfterHint?Math.max($.retryAfterHint.getTime()-Date.now()||0,U):U,W=this.getCapacityCost(G);return this.capacity-=W,E$({retryDelay:E,retryCount:f.getRetryCount()+1,retryCost:W})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(Df,this.capacity+(f.getRetryCost()??G$))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(f){return console.warn(`Max attempts provider could not resolve. Using default of ${R0}`),R0}}shouldRetry(f,$,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost($.errorType)&&this.isRetryableError($.errorType)}getCapacityCost(f){return f==="TRANSIENT"?U$:w$}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}}class W${constructor(f,$){this.maxAttemptsProvider=f,this.mode=n.ADAPTIVE;const{rateLimiter:w}=$??{};this.rateLimiter=w??new cf,this.standardRetryStrategy=new H0(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,$){return this.rateLimiter.updateClientSendingRate($),this.standardRetryStrategy.refreshRetryTokenForRetry(f,$)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}}var dW="AWS_MAX_ATTEMPTS",pW="max_attempts",yJ={environmentVariableSelector:(f)=>{const $=f[dW];if(!$)return;const w=parseInt($);if(Number.isNaN(w))throw new Error(`Environment variable ${dW} mast be a number, got "${$}"`);return w},configFileSelector:(f)=>{const $=f[pW];if(!$)return;const w=parseInt($);if(Number.isNaN(w))throw new Error(`Shared config file entry ${pW} mast be a number, got "${$}"`);return w},default:R0},xJ=(f)=>{const{retryStrategy:$}=f,w=L$.normalizeProvider(f.maxAttempts??R0);return{...f,maxAttempts:w,retryStrategy:async()=>{if($)return $;if(await L$.normalizeProvider(f.retryMode)()===n.ADAPTIVE)return new W$(w);return new H0(w)}}},ZZ="AWS_RETRY_MODE",YZ="retry_mode",_J={environmentVariableSelector:(f)=>f[ZZ],configFileSelector:(f)=>f[YZ],default:cW};import{Readable as QZ} from"stream";var gW=(f)=>f?.body instanceof QZ||typeof ReadableStream!=="undefined"&&f?.body instanceof ReadableStream;var R$=(f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)};var OZ=(f)=>($,w)=>async(G)=>{let U=await f.retryStrategy();const E=await f.maxAttempts();if(MZ(U)){U=U;let W=await U.acquireInitialRetryToken(w.partition_id),L=new Error,R=0,F=0;const{request:I}=G,X=v.isInstance(I);if(X)I.headers[uf]=kW();while(!0)try{if(X)I.headers[vf]=`attempt=${R+1}; max=${E}`;const{response:Y,output:Z}=await $(G);return U.recordSuccess(W),Z.$metadata.attempts=R+1,Z.$metadata.totalRetryDelay=F,{response:Y,output:Z}}catch(Y){const Z=zZ(Y);if(L=R$(Y),X&&gW(I))throw(w.logger instanceof nW?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),L;try{W=await U.refreshRetryTokenForRetry(W,Z)}catch(z){if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=R+1,L.$metadata.totalRetryDelay=F,L}R=W.getRetryCount();const O=W.getRetryDelay();F+=O,await new Promise((z)=>setTimeout(z,O))}}else{if(U=U,U?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",U.mode]];return U.retry($,G)}},MZ=(f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined",zZ=(f)=>{const $={error:f,errorType:JZ(f)},w=KZ(f.$response);if(w)$.retryAfterHint=w;return $},JZ=(f)=>{if(V0(f))return"THROTTLING";if(kf(f))return"TRANSIENT";if(xW(f))return"SERVER_ERROR";return"CLIENT_ERROR"},TZ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},aJ=(f)=>({applyToStack:($)=>{$.add(OZ(f),TZ)}}),KZ=(f)=>{if(!F$.isInstance(f))return;const $=Object.keys(f.headers).find((E)=>E.toLowerCase()==="retry-after");if(!$)return;const w=f.headers[$],G=Number(w);if(!Number.isNaN(G))return new Date(G*1000);return new Date(w)};import{platform as X9,release as Z9} from"os";import{env as xR,versions as Y9} from"process";var C$={isCrtAvailable:!1};var yR=()=>{if(C$.isCrtAvailable)return["md/crt-avail"];return null};var Q9="AWS_SDK_UA_APP_ID",O9="sdk-ua-app-id",E3=({serviceId:f,clientVersion:$})=>{const w=[["aws-sdk-js",$],["ua","2.0"],[`os/${X9()}`,Z9()],["lang/js"],["md/nodejs",`${Y9.node}`]],G=yR();if(G)w.push(G);if(f)w.push([`api/${f}`,$]);if(xR.AWS_EXECUTION_ENV)w.push([`exec-env/${xR.AWS_EXECUTION_ENV}`]);const U=L0({environmentVariableSelector:(W)=>W[Q9],configFileSelector:(W)=>W[O9],default:void 0})();let E=void 0;return async()=>{if(!E){const W=await U;E=W?[...w,[`app/${W}`]]:[...w]}return E}};import{Buffer as M9} from"buffer";import{createHash as z9,createHmac as J9} from"crypto";var _R=function(f,$){if(M9.isBuffer(f))return f;if(typeof f==="string")return dR(f,$);if(ArrayBuffer.isView(f))return q$(f.buffer,f.byteOffset,f.byteLength);return q$(f)};class T9{constructor(f,$){this.algorithmIdentifier=f,this.secret=$,this.reset()}update(f,$){this.hash.update(pR(_R(f,$)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?J9(this.algorithmIdentifier,_R(this.secret)):z9(this.algorithmIdentifier)}}import{fstatSync as K9,lstatSync as A9} from"fs";var Q3=(f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return A9(f.path).size;else if(typeof f.fd==="number")return K9(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)};var gR="AWS_EXECUTION_ENV",N$="AWS_REGION",P$="AWS_DEFAULT_REGION",nR="AWS_EC2_METADATA_DISABLED",sR=["in-region","cross-region","mobile","standard","legacy"],lR="/latest/meta-data/placement/region";var mR={environmentVariableSelector:(f)=>{return f["AWS_DEFAULTS_MODE"]},configFileSelector:(f)=>{return f["defaults_mode"]},default:"legacy"};var C3=({region:f=L0(AW),defaultsMode:$=L0(mR)}={})=>iR(async()=>{const w=typeof $==="function"?await $():$;switch(w?.toLowerCase()){case"auto":return B9(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${sR.join(", ")}, got ${w}`)}}),B9=async(f)=>{if(f){const $=typeof f==="function"?await f():f,w=await V9();if(!w)return"standard";if($===w)return"in-region";else return"cross-region"}return"standard"},V9=async()=>{if(process.env[gR]&&(process.env[N$]||process.env[P$]))return process.env[N$]??process.env[P$];if(!process.env[nR])try{const{getInstanceMetadataEndpoint:f,httpRequest:$}=await import("./chunk-c153b192112b0d44.js"),w=await f();return(await $({...w,path:lR})).toString()}catch(f){}};var S3=(f)=>{let $=async()=>{if(f.region===void 0)throw new Error("Region is missing from runtimeConfig");const w=f.region;if(typeof w==="string")return w;return w()};return{setRegion(w){$=w},region(){return $}}},j3=(f)=>{return{region:f.region()}};export{q9 as Ga,N9 as Ha,S9 as Ia,c9 as Ja,s as Ka,B0 as La,e as Ma,a0 as Na,n1 as Oa,P7 as Pa,n0 as Qa,g6 as Ra,m6 as Sa,LM as Ta,NM as Ua,jM as Va,AW as Wa,pM as Xa,zM as Ya,Oz as Za,FZ as _a,uz as $a,xz as ab,cW as bb,kW as cb,yJ as db,xJ as eb,_J as fb,aJ as gb,JL as hb,I9 as ib,E3 as jb,T9 as kb,Q3 as lb,C3 as mb,S3 as nb,j3 as ob};
@@ -0,0 +1,3 @@
1
+ import{y as O,z as wt} from"./chunk-7ce930fe69575c87.js";import{hb as j} from"./chunk-a0003b7feea6fae6.js";var Me=wt((ho,Ue)=>{var Ie=function(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=e.slice(r,r+2).toLowerCase();if(n in G)t[r/2]=G[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t},ke=function(e){let t="";for(let r=0;r<e.byteLength;r++)t+=Ae[e[r]];return t},H=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,bt=Object.getOwnPropertyNames,Et=Object.prototype.hasOwnProperty,Ce=(e,t)=>H(e,"name",{value:t,configurable:!0}),Tt=(e,t)=>{for(var r in t)H(e,r,{get:t[r],enumerable:!0})},St=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of bt(t))if(!Et.call(e,o)&&o!==r)H(e,o,{get:()=>t[o],enumerable:!(n=xt(t,o))||n.enumerable})}return e},Ct=(e)=>St(H({},"__esModule",{value:!0}),e),$e={};Tt($e,{fromHex:()=>Ie,toHex:()=>ke});Ue.exports=Ct($e);var Ae={},G={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();if(t.length===1)t=`0${t}`;Ae[e]=t,G[t]=e}Ce(Ie,"fromHex");Ce(ke,"toHex")});var C=(e,t)=>{const r=[];if(e)r.push(e);if(t)for(let n of t)r.push(n);return r},S=(e,t)=>{return`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`},A=()=>{let e=[],t=[],r=!1;const n=new Set,o=(a)=>a.sort((f,h)=>se[h.step]-se[f.step]||ie[h.priority||"normal"]-ie[f.priority||"normal"]),s=(a)=>{let f=!1;const h=(g)=>{const y=C(g.name,g.aliases);if(y.includes(a)){f=!0;for(let p of y)n.delete(p);return!1}return!0};return e=e.filter(h),t=t.filter(h),f},c=(a)=>{let f=!1;const h=(g)=>{if(g.middleware===a){f=!0;for(let y of C(g.name,g.aliases))n.delete(y);return!1}return!0};return e=e.filter(h),t=t.filter(h),f},i=(a)=>{return e.forEach((f)=>{a.add(f.middleware,{...f})}),t.forEach((f)=>{a.addRelativeTo(f.middleware,{...f})}),a.identifyOnResolve?.(w.identifyOnResolve()),a},d=(a)=>{const f=[];return a.before.forEach((h)=>{if(h.before.length===0&&h.after.length===0)f.push(h);else f.push(...d(h))}),f.push(a),a.after.reverse().forEach((h)=>{if(h.before.length===0&&h.after.length===0)f.push(h);else f.push(...d(h))}),f},l=(a=!1)=>{const f=[],h=[],g={};return e.forEach((p)=>{const u={...p,before:[],after:[]};for(let m of C(u.name,u.aliases))g[m]=u;f.push(u)}),t.forEach((p)=>{const u={...p,before:[],after:[]};for(let m of C(u.name,u.aliases))g[m]=u;h.push(u)}),h.forEach((p)=>{if(p.toMiddleware){const u=g[p.toMiddleware];if(u===void 0){if(a)return;throw new Error(`${p.toMiddleware} is not found when adding `+`${S(p.name,p.aliases)} `+`middleware ${p.relation} ${p.toMiddleware}`)}if(p.relation==="after")u.after.push(p);if(p.relation==="before")u.before.push(p)}}),o(f).map(d).reduce((p,u)=>{return p.push(...u),p},[])},w={add:(a,f={})=>{const{name:h,override:g,aliases:y}=f,p={step:"initialize",priority:"normal",middleware:a,...f},u=C(h,y);if(u.length>0){if(u.some((m)=>n.has(m))){if(!g)throw new Error(`Duplicate middleware name '${S(h,y)}'`);for(let m of u){const E=e.findIndex((N)=>N.name===m||N.aliases?.some((W)=>W===m));if(E===-1)continue;const x=e[E];if(x.step!==p.step||p.priority!==x.priority)throw new Error(`"${S(x.name,x.aliases)}" middleware with `+`${x.priority} priority in ${x.step} step cannot `+`be overridden by "${S(h,y)}" middleware with `+`${p.priority} priority in ${p.step} step.`);e.splice(E,1)}}for(let m of u)n.add(m)}e.push(p)},addRelativeTo:(a,f)=>{const{name:h,override:g,aliases:y}=f,p={middleware:a,...f},u=C(h,y);if(u.length>0){if(u.some((m)=>n.has(m))){if(!g)throw new Error(`Duplicate middleware name '${S(h,y)}'`);for(let m of u){const E=t.findIndex((N)=>N.name===m||N.aliases?.some((W)=>W===m));if(E===-1)continue;const x=t[E];if(x.toMiddleware!==p.toMiddleware||x.relation!==p.relation)throw new Error(`"${S(x.name,x.aliases)}" middleware `+`${x.relation} "${x.toMiddleware}" middleware cannot be overridden `+`by "${S(h,y)}" middleware ${p.relation} `+`"${p.toMiddleware}" middleware.`);t.splice(E,1)}}for(let m of u)n.add(m)}t.push(p)},clone:()=>i(A()),use:(a)=>{a.applyToStack(w)},remove:(a)=>{if(typeof a==="string")return s(a);else return c(a)},removeByTag:(a)=>{let f=!1;const h=(g)=>{const{tags:y,name:p,aliases:u}=g;if(y&&y.includes(a)){const m=C(p,u);for(let E of m)n.delete(E);return f=!0,!1}return!0};return e=e.filter(h),t=t.filter(h),f},concat:(a)=>{const f=i(A());return f.use(a),f.identifyOnResolve(r||f.identifyOnResolve()||(a.identifyOnResolve?.()??!1)),f},applyToStack:i,identify:()=>{return l(!0).map((a)=>{const f=a.step??a.relation+" "+a.toMiddleware;return S(a.name,a.aliases)+" - "+f})},identifyOnResolve(a){if(typeof a==="boolean")r=a;return r},resolve:(a,f)=>{for(let h of l().map((g)=>g.middleware).reverse())a=h(a,f);if(r)console.log(w.identify());return a}};return w},se={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},ie={high:3,normal:2,low:1};class tt{constructor(e){this.middlewareStack=A(),this.config=e}send(e,t,r){const n=typeof t!=="function"?t:void 0,o=typeof t==="function"?t:r,s=e.resolveMiddleware(this.middlewareStack,this.config,n);if(o)s(e).then((c)=>o(null,c.output),(c)=>o(c)).catch(()=>{});else return s(e).then((c)=>c.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var ce=O(j(),1);class ae{constructor(){this.middlewareStack=A()}static classBuilder(){return new fe}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,smithyContext:d,additionalContext:l,CommandCtor:w}){for(let y of n.bind(this)(w,e,t,r))this.middlewareStack.use(y);const a=e.concat(this.middlewareStack),{logger:f}=t,h={logger:f,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,[ce.SMITHY_CONTEXT_KEY]:{commandInstance:this,...d},...l},{requestHandler:g}=t;return a.resolve((y)=>g.handle(y.request,r||{}),h)}}class fe{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(e)=>e,this._outputFilterSensitiveLog=(e)=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=(r)=>r,t=(r)=>r){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends ae{static getEndpointParameterInstructions(){return e._ep}constructor(...[r]){super();this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=r??{},e._init(this)}resolveMiddleware(r,n,o){return this.resolveMiddlewareWithContext(r,n,o,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}var ir=(e)=>{let t=e.httpHandler;return{setHttpHandler(r){t=r},httpHandler(){return t},updateHttpClientConfig(r,n){t.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},cr=(e)=>{return{httpHandler:e.httpHandler()}};var rt=O(j(),1);var nt=function(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})};class _{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new _({...e,headers:{...e.headers}});if(t.query)t.query=nt(t.query);return t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return _.clone(this)}}class R{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}var P=(e)=>encodeURIComponent(e).replace(/[!'()*]/g,ot),ot=(e)=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function D(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=P(r),Array.isArray(n))for(let o=0,s=n.length;o<s;o++)t.push(`${r}=${P(n[o])}`);else{let o=r;if(n||typeof n==="string")o+=`=${P(n)}`;t.push(o)}}return t.join("&")}import{Agent as me,request as ct} from"http";import{Agent as ye,request as at} from"https";var ue=["ECONNRESET","EPIPE","ETIMEDOUT"];var Y=(e)=>{const t={};for(let r of Object.keys(e)){const n=e[r];t[r]=Array.isArray(n)?n.join(","):n}return t};var de=(e,t,r=0)=>{if(!r)return;const n=setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r);e.on("socket",(o)=>{if(o.connecting)o.on("connect",()=>{clearTimeout(n)});else clearTimeout(n)})};var le=(e,{keepAlive:t,keepAliveMsecs:r})=>{if(t!==!0)return;e.on("socket",(n)=>{n.setKeepAlive(t,r||0)})};var he=(e,t,r=0)=>{e.setTimeout(r,()=>{e.destroy(),t(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})};import{Readable as st} from"stream";async function J(e,t,r=pe){const n=t.headers??{},o=n.Expect||n.expect;let s=-1,c=!1;if(o==="100-continue")await Promise.race([new Promise((i)=>{s=Number(setTimeout(i,Math.max(pe,r)))}),new Promise((i)=>{e.on("continue",()=>{clearTimeout(s),i()}),e.on("error",()=>{c=!0,clearTimeout(s),i()})})]);if(!c)it(e,t.body)}var it=function(e,t){if(t instanceof st){t.pipe(e);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){e.end(t);return}const r=t;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){e.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}e.end(Buffer.from(t));return}e.end()},pe=1000;class V{static create(e){if(typeof e?.handle==="function")return e;return new V(e)}static checkSocketUsage(e,t,r=console){const{sockets:n,requests:o,maxSockets:s}=e;if(typeof s!=="number"||s===Infinity)return t;const c=15000;if(Date.now()-c<t)return t;if(n&&o)for(let i in n){const d=n[i]?.length??0,l=o[i]?.length??0;if(d>=s&&l>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${d} and ${l} 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 t}constructor(e){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,r)=>{if(typeof e==="function")e().then((n)=>{t(this.resolveDefaultConfig(n))}).catch(r);else t(this.resolveDefaultConfig(e))})}resolveDefaultConfig(e){const{requestTimeout:t,connectionTimeout:r,socketTimeout:n,httpAgent:o,httpsAgent:s}=e||{};return{connectionTimeout:r,requestTimeout:t??n,httpAgent:(()=>{if(o instanceof me||typeof o?.destroy==="function")return o;return new me({keepAlive:!0,maxSockets:50,...o})})(),httpsAgent:(()=>{if(s instanceof ye||typeof s?.destroy==="function")return s;return new ye({keepAlive:!0,maxSockets:50,...s})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;let r;return new Promise((n,o)=>{let s=void 0;const c=async(u)=>{await s,clearTimeout(r),n(u)},i=async(u)=>{await s,clearTimeout(r),o(u)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){const u=new Error("Request aborted");u.name="AbortError",i(u);return}const d=e.protocol==="https:",l=d?this.config.httpsAgent:this.config.httpAgent;r=setTimeout(()=>{this.socketWarningTimestamp=V.checkSocketUsage(l,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const w=D(e.query||{});let a=void 0;if(e.username!=null||e.password!=null){const u=e.username??"",m=e.password??"";a=`${u}:${m}`}let f=e.path;if(w)f+=`?${w}`;if(e.fragment)f+=`#${e.fragment}`;const h={headers:e.headers,host:e.hostname,method:e.method,path:f,port:e.port,agent:l,auth:a},y=(d?at:ct)(h,(u)=>{const m=new R({statusCode:u.statusCode||-1,reason:u.statusMessage,headers:Y(u.headers),body:u});c({response:m})});if(y.on("error",(u)=>{if(ue.includes(u.code))i(Object.assign(u,{name:"TimeoutError"}));else i(u)}),de(y,i,this.config.connectionTimeout),he(y,i,this.config.requestTimeout),t){const u=()=>{y.destroy();const m=new Error("Request aborted");m.name="AbortError",i(m)};if(typeof t.addEventListener==="function"){const m=t;m.addEventListener("abort",u,{once:!0}),y.once("close",()=>m.removeEventListener("abort",u))}else t.onabort=u}const p=h.agent;if(typeof p==="object"&&"keepAlive"in p)le(y,{keepAlive:p.keepAlive,keepAliveMsecs:p.keepAliveMsecs});s=J(y,e,this.config.requestTimeout).catch((u)=>{return clearTimeout(r),o(u)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[e]:t}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as ft} from"stream";class Z extends ft{constructor(){super(...arguments);this.bufferedBytes=[]}_write(e,t,r){this.bufferedBytes.push(e),r()}}async function dt(e){const t=[],r=e.getReader();let n=!1,o=0;while(!n){const{done:i,value:d}=await r.read();if(d)t.push(d),o+=d.length;n=i}const s=new Uint8Array(o);let c=0;for(let i of t)s.set(i,c),c+=i.length;return s}var ge=(e)=>{if(ut(e))return dt(e);return new Promise((t,r)=>{const n=new Z;e.pipe(n),e.on("error",(o)=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){const o=new Uint8Array(Buffer.concat(this.bufferedBytes));t(o)})})},ut=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;var gn="***SensitiveInformation***";var xn=(e,t)=>{for(let r of Object.keys(e)){const n=e[r],o=async function(c,i,d){const l=new n(c);if(typeof i==="function")this.send(l,i);else if(typeof d==="function"){if(typeof i!=="object")throw new Error(`Expected http options but got ${typeof i}`);this.send(l,i||{},d)}else return this.send(l,i)},s=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");t.prototype[s]=o}};class we extends Error{constructor(e){super(e.message);Object.setPrototypeOf(this,we.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}var xe=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,o])=>{if(e[n]==null||e[n]==="")e[n]=o});const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e};class lt{trace(){}debug(){}info(){}warn(){}error(){}}var be=(e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";import{Buffer as Q} from"buffer";var I=(e,t=0,r=e.byteLength-t)=>{if(!be(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Q.from(e,t,r)},v=(e,t)=>{if(typeof e!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?Q.from(e,t):Q.from(e)};var ht=/^[A-Za-z0-9+/]*={0,2}$/,B=(e)=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!ht.exec(e))throw new TypeError("Invalid base64 string.");const t=v(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};var k=(e)=>{const t=v(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var Rn=(e)=>{if(typeof e==="string")return k(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)};var z=(e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return I(e.buffer,e.byteOffset,e.byteLength).toString("utf8")};var q=(e)=>{let t;if(typeof e==="string")t=k(e);else t=e;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return I(t.buffer,t.byteOffset,t.byteLength).toString("base64")};function Ee(e,t="utf-8"){if(t==="base64")return q(e);return z(e)}function Te(e,t){if(t==="base64")return T.mutate(B(e));return T.mutate(k(e))}class T extends Uint8Array{static fromString(e,t="utf-8"){switch(typeof e){case"string":return Te(e,t);default:throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}}static mutate(e){return Object.setPrototypeOf(e,T.prototype),e}transformToString(e="utf-8"){return Ee(this,e)}}import{Readable as pt} from"stream";var Xn=(e,t)=>{const{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:o,checksumLocationName:s,streamHasher:c}=t,i=r!==void 0&&o!==void 0&&s!==void 0&&c!==void 0,d=i?c(o,e):void 0,l=new pt({read:()=>{}});return e.on("data",(w)=>{const a=n(w)||0;l.push(`${a.toString(16)}\r\n`),l.push(w),l.push("\r\n")}),e.on("end",async()=>{if(l.push("0\r\n"),i){const w=r(await d);l.push(`${s}:${w}\r\n`),l.push("\r\n")}l.push(null)}),l};import{Readable as K} from"stream";import{TextDecoder as $t} from"util";async function mt(e){const t=await gt(e),r=B(t);return new Uint8Array(r)}async function yt(e){const t=[],r=e.getReader();let n=!1,o=0;while(!n){const{done:i,value:d}=await r.read();if(d)t.push(d),o+=d.length;n=i}const s=new Uint8Array(o);let c=0;for(let i of t)s.set(i,c),c+=i.length;return s}var gt=function(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const o=n.result??"",s=o.indexOf(","),c=s>-1?s+1:o.length;t(o.substring(c))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})},Se=(e)=>{if(typeof Blob==="function"&&e instanceof Blob)return mt(e);return yt(e)};var Pe=O(Me(),1);var $=(e)=>typeof ReadableStream==="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream);var Ne="The stream has already been transformed.",Fe=(e)=>{if(!Re(e)&&!$(e)){const o=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${o}`)}let t=!1;const r=async()=>{if(t)throw new Error(Ne);return t=!0,await Se(e)},n=(o)=>{if(typeof o.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 o.stream()};return Object.assign(e,{transformToByteArray:r,transformToString:async(o)=>{const s=await r();if(o==="base64")return q(s);else if(o==="hex")return Pe.toHex(s);else if(o===void 0||o==="utf8"||o==="utf-8")return z(s);else if(typeof TextDecoder==="function")return new TextDecoder(o).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(Ne);if(t=!0,Re(e))return n(e);else if($(e))return e;else throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},Re=(e)=>typeof Blob==="function"&&e instanceof Blob;var Le="The stream has already been transformed.",$o=(e)=>{if(!(e instanceof K))try{return Fe(e)}catch(n){const o=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${o}`)}let t=!1;const r=async()=>{if(t)throw new Error(Le);return t=!0,await ge(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async(n)=>{const o=await r();if(n===void 0||Buffer.isEncoding(n))return I(o.buffer,o.byteOffset,o.byteLength).toString(n);else return new $t(n).decode(o)},transformToWebStream:()=>{if(t)throw new Error(Le);if(e.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof K.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return t=!0,K.toWeb(e)}})};import{PassThrough as De} from"stream";async function Oe(e){if(typeof e.stream==="function")e=e.stream();return e.tee()}async function No(e){if($(e))return Oe(e);const t=new De,r=new De;return e.pipe(t),e.pipe(r),[t,r]}import{Writable as At} from"stream";async function ve(e,t){let r=0;const n=[],o=e.getReader();let s=!1;while(!s){const{done:d,value:l}=await o.read();if(l)n.push(l),r+=l?.byteLength??0;if(r>=t)break;s=d}o.releaseLock();const c=new Uint8Array(Math.min(t,r));let i=0;for(let d of n){if(d.byteLength>c.byteLength-i){c.set(d.subarray(0,c.byteLength-i),i);break}else c.set(d,i);i+=d.length}return c}var Do=(e,t)=>{if($(e))return ve(e,t);return new Promise((r,n)=>{const o=new Be;o.limit=t,e.pipe(o),e.on("error",(s)=>{o.end(),n(s)}),o.on("error",n),o.on("finish",function(){const s=new Uint8Array(Buffer.concat(this.buffers));r(s)})})};class Be extends At{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(e,t,r){if(this.buffers.push(e),this.bytesBuffered+=e.byteLength??0,this.bytesBuffered>=this.limit){const n=this.bytesBuffered-this.limit,o=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=o.subarray(0,o.byteLength-n),this.emit("finish")}r()}}var Jo=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return T.mutate(e);if(!e)return T.mutate(new Uint8Array);const r=t.streamCollector(e);return T.mutate(await r)};var Zo=(e)=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}};var It=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string"){const t=parseFloat(e);if(!Number.isNaN(t)){if(String(t)!==String(e))Je.warn(Ye(`Expected number but observed string: ${e}`));return t}}if(typeof e==="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)},kt=Math.ceil(340282346638528860000000000000000000000),ze=(e)=>{const t=It(e);if(t!==void 0&&!Number.isNaN(t)&&t!==Infinity&&t!==(-Infinity)){if(Math.abs(t)>kt)throw new TypeError(`Expected 32-bit float, got ${e}`)}return t},X=(e)=>{if(e===null||e===void 0)return;if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)};var qe=(e)=>ee(e,32),He=(e)=>ee(e,16),We=(e)=>ee(e,8),ee=(e,t)=>{const r=X(e);if(r!==void 0&&Ut(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Ut=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Qo=(e,t)=>{if(e===null||e===void 0){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e},Go=(e)=>{if(e===null||e===void 0)return;if(typeof e==="object"&&!Array.isArray(e))return e;const t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},Ko=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string")return e;if(["boolean","number","bigint"].includes(typeof e))return Je.warn(Ye(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)};var je=(e)=>{if(typeof e=="string")return ze(F(e));return ze(e)},Mt=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,F=(e)=>{const t=e.match(Mt);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)};var Xo=(e)=>{if(typeof e==="string")return X(F(e));return X(e)};var es=(e)=>{if(typeof e==="string")return qe(F(e));return qe(e)},U=(e)=>{if(typeof e==="string")return He(F(e));return He(e)},_e=(e)=>{if(typeof e==="string")return We(F(e));return We(e)},Ye=(e)=>{return String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join("\n")},Je={warn:console.warn};function os(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),o=e.getUTCDate(),s=e.getUTCHours(),c=e.getUTCMinutes(),i=e.getUTCSeconds(),d=o<10?`0${o}`:`${o}`,l=s<10?`0${s}`:`${s}`,w=c<10?`0${c}`:`${c}`,a=i<10?`0${i}`:`${i}`;return`${Nt[n]}, ${d} ${re[r]} ${t} ${l}:${w}:${a} GMT`}var Nt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],re=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Rt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),ss=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Rt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,d,l]=t,w=U(M(n)),a=b(o,"month",1,12),f=b(s,"day",1,31);return L(w,a,f,{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l})},Pt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),is=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Pt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,d,l,w]=t,a=U(M(n)),f=b(o,"month",1,12),h=b(s,"day",1,31),g=L(a,f,h,{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l});if(w.toUpperCase()!="Z")g.setTime(g.getTime()-jt(w));return g},Ft=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$/),Lt=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$/),Ot=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})$/),cs=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=Ft.exec(e);if(t){const[r,n,o,s,c,i,d,l]=t;return L(U(M(s)),te(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l})}if(t=Lt.exec(e),t){const[r,n,o,s,c,i,d,l]=t;return Bt(L(Dt(s),te(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l}))}if(t=Ot.exec(e),t){const[r,n,o,s,c,i,d,l]=t;return L(U(M(l)),te(n),b(o.trimLeft(),"day",1,31),{hours:s,minutes:c,seconds:i,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")};var L=(e,t,r,n)=>{const o=t-1;return qt(e,o,r),new Date(Date.UTC(e,o,r,b(n.hours,"hour",0,23),b(n.minutes,"minute",0,59),b(n.seconds,"seconds",0,60),Wt(n.fractionalMilliseconds)))},Dt=(e)=>{const t=(new Date()).getUTCFullYear(),r=Math.floor(t/100)*100+U(M(e));if(r<t)return r+100;return r},vt=1576800000000,Bt=(e)=>{if(e.getTime()-(new Date()).getTime()>vt)return new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()));return e},te=(e)=>{const t=re.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},zt=[31,28,31,30,31,30,31,31,30,31,30,31],qt=(e,t,r)=>{let n=zt[t];if(t===1&&Ht(e))n=29;if(r>n)throw new TypeError(`Invalid day for ${re[t]} in ${e}: ${r}`)},Ht=(e)=>{return e%4===0&&(e%100!==0||e%400===0)},b=(e,t,r,n)=>{const o=_e(M(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},Wt=(e)=>{if(e===null||e===void 0)return 0;return je("0."+e)*1000},jt=(e)=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1000},M=(e)=>{let t=0;while(t<e.length-1&&e.charAt(t)==="0")t++;if(t===0)return e;return e.slice(t)};var _t=({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{const o=Yt(e),s=o.httpStatusCode?o.httpStatusCode+"":void 0,c=new r({name:t?.code||t?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw xe(c,t)},us=(e)=>{return({output:t,parsedBody:r,errorCode:n})=>{_t({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})}},Yt=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var ls=(e)=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var Ve=!1,ps=(e)=>{if(e&&!Ve&&parseInt(e.substring(1,e.indexOf(".")))<16)Ve=!0};var ne=O(j(),1);var Ze=(e)=>{const t=[];for(let r in ne.AlgorithmId){const n=ne.AlgorithmId[r];if(e[n]===void 0)continue;t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},Qe=(e)=>{const t={};return e.checksumAlgorithms().forEach((r)=>{t[r.algorithmId()]=r.checksumConstructor()}),t};var Ge=(e)=>{let t=e.retryStrategy;return{setRetryStrategy(r){t=r},retryStrategy(){return t}}},Ke=(e)=>{const t={};return t.retryStrategy=e.retryStrategy(),t};var bs=(e)=>{return{...Ze(e),...Ge(e)}};var Es=(e)=>{return{...Qe(e),...Ke(e)}};function Jt(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}var oe=function(){const e=Object.getPrototypeOf(this).constructor,r=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(r,e.prototype),r};oe.prototype=Object.create(String.prototype,{constructor:{value:oe,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(oe,String);function Vt(e,t,r){let n,o,s;if(typeof t==="undefined"&&typeof r==="undefined")n={},s=e;else if(n=e,typeof t==="function")return o=t,s=r,Zt(n,o,s);else s=t;for(let c of Object.keys(s)){if(!Array.isArray(s[c])){n[c]=s[c];continue}Xe(n,null,s,c)}return n}var Us=(e,t)=>{const r={};for(let n in t)Xe(r,e,t,n);return r},Zt=(e,t,r)=>{return Vt(e,Object.entries(r).reduce((n,[o,s])=>{if(Array.isArray(s))n[o]=s;else if(typeof s==="function")n[o]=[t,s()];else n[o]=[t,s];return n},{}))},Xe=(e,t,r,n)=>{if(t!==null){let c=r[n];if(typeof c==="function")c=[,c];const[i=Qt,d=Gt,l=n]=c;if(typeof i==="function"&&i(t[l])||typeof i!=="function"&&!!i)e[n]=d(t[l]);return}let[o,s]=r[n];if(typeof s==="function"){let c;const i=o===void 0&&(c=s())!=null,d=typeof o==="function"&&!!o(void 0)||typeof o!=="function"&&!!o;if(i)e[n]=c;else if(d)e[n]=s()}else{const c=o===void 0&&s!=null,i=typeof o==="function"&&!!o(s)||typeof o!=="function"&&!!o;if(c||i)e[n]=s}},Qt=(e)=>e!=null,Gt=(e)=>e;var Ps=(e)=>e.toISOString().replace(".000Z","Z");var et=(e)=>{if(e==null)return{};if(Array.isArray(e))return e.filter((t)=>t!=null).map(et);if(typeof e==="object"){const t={};for(let r of Object.keys(e)){if(e[r]==null)continue;t[r]=et(e[r])}return t}return e};export{ir as A,cr as B,_ as C,R as D,lt as E,tt as F,be as G,I as H,v as I,B as J,k as K,Rn as L,z as M,q as N,Xn as O,V as P,ge as Q,Me as R,$o as S,No as T,Do as U,Jo as V,ae as W,gn as X,xn as Y,Zo as Z,X as _,qe as $,Qo as aa,Go as ba,Ko as ca,Xo as da,es as ea,os as fa,ss as ga,is as ha,cs as ia,we as ja,xe as ka,us as la,ls as ma,ps as na,bs as oa,Es as pa,Jt as qa,Vt as ra,Us as sa,Ps as ta,et as ua};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-7ce930fe69575c87.js";import{Db as E} from"./chunk-488b4db0c522d44a.js";var _="AWS_ACCESS_KEY_ID",S="AWS_SECRET_ACCESS_KEY",p="AWS_SESSION_TOKEN",A="AWS_CREDENTIAL_EXPIRATION",C="AWS_CREDENTIAL_SCOPE",N="AWS_ACCOUNT_ID",a=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const o=process.env[_],r=process.env[S],n=process.env[p],s=process.env[A],t=process.env[C],c=process.env[N];if(o&&r)return{accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...c&&{accountId:c}};throw new E("Unable to find environment variable credentials.",{logger:e?.logger})};export{a as fromEnv,p as ENV_SESSION,S as ENV_SECRET,_ as ENV_KEY,A as ENV_EXPIRATION,C as ENV_CREDENTIAL_SCOPE,N as ENV_ACCOUNT_ID};export{_ as t,S as u,a as v};
@@ -0,0 +1,2 @@
1
+ import{z as D} from"./chunk-7ce930fe69575c87.js";var S=D((y,w)=>{var{defineProperty:G,getOwnPropertyDescriptor:v,getOwnPropertyNames:O}=Object,x=Object.prototype.hasOwnProperty,Q=(b,j)=>G(b,"name",{value:j,configurable:!0}),U=(b,j)=>{for(var z in j)G(b,z,{get:j[z],enumerable:!0})},K=(b,j,z,V)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of O(j))if(!x.call(b,B)&&B!==z)G(b,B,{get:()=>j[B],enumerable:!(V=v(j,B))||V.enumerable})}return b},q=(b)=>K(G({},"__esModule",{value:!0}),b),W={};U(W,{AlgorithmId:()=>J,EndpointURLScheme:()=>X,FieldPosition:()=>M,HttpApiKeyAuthLocation:()=>$,HttpAuthLocation:()=>Z,IniSectionType:()=>N,RequestHandlerProtocol:()=>Y,SMITHY_CONTEXT_KEY:()=>R,getDefaultClientConfiguration:()=>T,resolveDefaultRuntimeConfig:()=>k});w.exports=q(W);var Z=((b)=>{return b.HEADER="header",b.QUERY="query",b})(Z||{}),$=((b)=>{return b.HEADER="header",b.QUERY="query",b})($||{}),X=((b)=>{return b.HTTP="http",b.HTTPS="https",b})(X||{}),J=((b)=>{return b.MD5="md5",b.CRC32="crc32",b.CRC32C="crc32c",b.SHA1="sha1",b.SHA256="sha256",b})(J||{}),E=Q((b)=>{const j=[];if(b.sha256!==void 0)j.push({algorithmId:()=>"sha256",checksumConstructor:()=>b.sha256});if(b.md5!=null)j.push({algorithmId:()=>"md5",checksumConstructor:()=>b.md5});return{_checksumAlgorithms:j,addChecksumAlgorithm(z){this._checksumAlgorithms.push(z)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),F=Q((b)=>{const j={};return b.checksumAlgorithms().forEach((z)=>{j[z.algorithmId()]=z.checksumConstructor()}),j},"resolveChecksumRuntimeConfig"),T=Q((b)=>{return{...E(b)}},"getDefaultClientConfiguration"),k=Q((b)=>{return{...F(b)}},"resolveDefaultRuntimeConfig"),M=((b)=>{return b[b.HEADER=0]="HEADER",b[b.TRAILER=1]="TRAILER",b})(M||{}),R="__smithy_context",N=((b)=>{return b.PROFILE="profile",b.SSO_SESSION="sso-session",b.SERVICES="services",b})(N||{}),Y=((b)=>{return b.HTTP_0_9="http/0.9",b.HTTP_1_0="http/1.0",b.TDS_8_0="tds/8.0",b})(Y||{})});
2
+ export{S as pb};