@agentlang/lstudio 0.5.5 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/AwsJson1_1Protocol-BPKAibNb.js +1 -0
- package/assets/AwsQueryProtocol-gcsdfhfo.js +1 -0
- package/assets/XmlShapeDeserializer-yfMUWnPw.js +1 -0
- package/assets/_commonjs-dynamic-modules-B90KZyeo-MqqgM5Sj.js +1 -0
- package/assets/_commonjs-dynamic-modules-D244begT.js +1 -0
- package/assets/aws-BDH7ihg3.js +1 -0
- package/assets/documentFetcher-DXduTBqD-jqdP0czN.js +67 -0
- package/assets/documentFetcher-Ds-FwFaK.js +8 -0
- package/assets/index-BTpRe6xv-w-5JgxLH.js +1 -0
- package/assets/index-BWkXARMt.js +1 -0
- package/assets/index-BhYX3qBc.js +1 -0
- package/assets/{index-BFv-M3PX.js → index-BvJIpPZM.js} +14 -14
- package/assets/{index-CnJg8gWa.js → index-Bxvbin5N.js} +1838 -10340
- package/assets/index-CDKpgEyj-tyrSWl01.js +8753 -0
- package/assets/index-CZHYN75I.css +1 -0
- package/assets/index-Cv6PsiG7.js +1 -0
- package/assets/{index-KGBiLwKE-Doz2tX9S.js → index-D9hvpHrT-D460pOJZ.js} +7 -7
- package/assets/index-DGSGqHDe.js +1 -0
- package/assets/index-DRgW1--O-Be3NpfgF.js +17 -0
- package/assets/index-Dk98TczE-BtSqF03o.js +1 -0
- package/assets/{index-DYmn2gQ6-CnjFa625.js → index-DuUQBJXO-gNsOEp1C.js} +1 -1
- package/assets/{index-BitrXVkV.js → index-DzXvkWz5.js} +1 -1
- package/assets/{index-Dv4fZm7h.js → index-QhSmQuQt.js} +9 -9
- package/assets/index-_duzuPdC.js +15 -0
- package/assets/{index-D4z_hbl0-Bi21Cj4J.js → index-ruSRuF6L-BjzIBLlQ.js} +9 -9
- package/assets/index.browser-DC-BI9vG.js +5 -0
- package/assets/index.browser-yI_W1hK0-C1Oinehc.js +1 -0
- package/assets/loadCognitoIdentity-C6X581JO.js +1 -0
- package/assets/loadSts-BLVzhgX4.js +1 -0
- package/assets/noAuth-Cp7LDRaC.js +1 -0
- package/assets/{normalizeProvider-CtDY37Q6.js → normalizeProvider-Cd9_AiS_.js} +1 -1
- package/assets/pdf-parse.es-Bg6uvNNe-3L3fe-Mc.js +26 -0
- package/assets/pdf-parse.es-CO6QlkPs.js +26 -0
- package/assets/replService-CPKXCVUs.js +1 -0
- package/assets/sdk-stream-mixin.browser-Dycc9CbH.js +2 -0
- package/assets/{winston-C8DIYdyC.js → winston-BWsrMlta.js} +27 -27
- package/assets/{winston-BqN1-LuO.js → winston-BvOMKj10.js} +1 -1
- package/assets/winston-CnOlwptw-BXt6VwZK.js +1 -0
- package/assets/{winston-1qzyIKCb-CuWVDLx4.js → winston-Dk1WXlDf--OwDrr6q.js} +27 -27
- package/index.html +6 -12
- package/package.json +1 -1
- package/assets/__vite-browser-external-BDMct_Gn-FmFgRqLi.js +0 -1
- package/assets/__vite-browser-external-DLjrMatA.js +0 -1
- package/assets/_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js +0 -1
- package/assets/_commonjs-dynamic-modules-DkOKMH7F.js +0 -1
- package/assets/index-69shuAsh-DF18H7zf.js +0 -1
- package/assets/index-6Q7eJvK1.js +0 -1
- package/assets/index-BJBOx-Z---hbiLl7B.js +0 -5
- package/assets/index-BVavKB4C.js +0 -1
- package/assets/index-BXMy9UIl.js +0 -1
- package/assets/index-BaNNpqQb.css +0 -1
- package/assets/index-Bto-kj6R-C0A_3Pwb.js +0 -1
- package/assets/index-CLtYN2zU.js +0 -1
- package/assets/index-ChvoNxcO.js +0 -5
- package/assets/index-DSosZ5sh-Ceejs_jv.js +0 -1
- package/assets/index-DTNuphFO-Bf5Ad1xs.js +0 -17
- package/assets/index-DsIu-45t-Bejjlpz4.js +0 -6
- package/assets/index.browser-BHPvGrwi-6Mh8eUw-.js +0 -1
- package/assets/index.browser-q8hb7jya.js +0 -6
- package/assets/inherits_browser-nmOknR35-Bp0mvRSL.js +0 -1
- package/assets/loadCognitoIdentity-j03dZ-sH.js +0 -1
- package/assets/loadSts-CjD8RYaH.js +0 -1
- package/assets/replService-DI2pw8YC.js +0 -1
- package/assets/resolveDefaultsModeConfig-D8w9mPn_.js +0 -15
- package/assets/util-BzZpaz2f.js +0 -10
- package/assets/util-CNqBjtt6-GUXK7Yxz.js +0 -10
- package/assets/util-DZRIOW0Z-CproX86h.js +0 -1
- package/assets/winston-CtxF18qc-Bm9o0b6l.js +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DuUQBJXO-gNsOEp1C.js","assets/preload-helper-BlTxHScW.js","assets/index-6mKfgpcs-DsgiI2lM.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as Kt}from"./preload-helper-BlTxHScW.js";import{Y as pe}from"./index-6mKfgpcs-DsgiI2lM.js";const Yt=(t,e,r)=>{let s,n,i,o=!1;const a=async()=>{n||(n=t());try{s=await n,i=!0,o=!1}finally{n=void 0}return s};return async u=>((!i||u?.forceRefresh)&&(s=await a()),s)},qi=t=>({setHttpHandler(e){t.httpHandler=e},httpHandler(){return t.httpHandler},updateHttpClientConfig(e,r){t.httpHandler?.updateHttpClientConfig(e,r)},httpHandlerConfigs(){return t.httpHandler.httpHandlerConfigs()}}),zi=t=>({httpHandler:t.httpHandler()});var G;(function(t){t.HTTP="http",t.HTTPS="https"})(G||(G={}));var oe;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(oe||(oe={}));const xe="__smithy_context";class R{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;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 r=new R({...e,headers:{...e.headers}});return r.query&&(r.query=Zt(r.query)),r}static isInstance(e){if(!e)return!1;const r=e;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return R.clone(this)}}function Zt(t){return Object.keys(t).reduce((e,r)=>{const s=t[r];return{...e,[r]:Array.isArray(s)?[...s]:s}},{})}class _{statusCode;reason;headers;body;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 r=e;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}const M=t=>encodeURIComponent(t).replace(/[!'()*]/g,Qt),Qt=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function Xt(t){const e=[];for(let r of Object.keys(t).sort()){const s=t[r];if(r=M(r),Array.isArray(s))for(let n=0,i=s.length;n<i;n++)e.push(`${r}=${M(s[n])}`);else{let n=r;(s||typeof s=="string")&&(n+=`=${M(s)}`),e.push(n)}}return e.join("&")}function qe(t,e){return new Request(t,e)}function er(t=0){return new Promise((e,r)=>{t&&setTimeout(()=>{const s=new Error(`Request did not complete within ${t} ms`);s.name="TimeoutError",r(s)},t)})}const fe={supported:void 0};class gt{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new gt(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(r=>r||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),fe.supported===void 0&&(fe.supported=typeof Request<"u"&&"keepalive"in qe("https://[::1]"))}destroy(){}async handle(e,{abortSignal:r,requestTimeout:s}={}){this.config||(this.config=await this.configProvider);const n=s??this.config.requestTimeout,i=this.config.keepAlive===!0,o=this.config.credentials;if(r?.aborted){const y=new Error("Request aborted");return y.name="AbortError",Promise.reject(y)}let a=e.path;const u=Xt(e.query||{});u&&(a+=`?${u}`),e.fragment&&(a+=`#${e.fragment}`);let c="";if(e.username!=null||e.password!=null){const y=e.username??"",S=e.password??"";c=`${y}:${S}@`}const{port:h,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${h?`:${h}`:""}${a}`,p=d==="GET"||d==="HEAD"?void 0:e.body,g={body:p,headers:new Headers(e.headers),method:d,credentials:o};this.config?.cache&&(g.cache=this.config.cache),p&&(g.duplex="half"),typeof AbortController<"u"&&(g.signal=r),fe.supported&&(g.keepalive=i),typeof this.config.requestInit=="function"&&Object.assign(g,this.config.requestInit(e));let m=()=>{};const f=qe(l,g),w=[fetch(f).then(y=>{const S=y.headers,b={};for(const v of S.entries())b[v[0]]=v[1];return y.body!=null?{response:new _({headers:b,reason:y.statusText,statusCode:y.status,body:y.body})}:y.blob().then(v=>({response:new _({headers:b,reason:y.statusText,statusCode:y.status,body:v})}))}),er(n)];return r&&w.push(new Promise((y,S)=>{const b=()=>{const v=new Error("Request aborted");v.name="AbortError",S(v)};if(typeof r.addEventListener=="function"){const v=r;v.addEventListener("abort",b,{once:!0}),m=()=>v.removeEventListener("abort",b)}else r.onabort=b})),Promise.race(w).finally(m)}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(s=>(s[e]=r,s))}httpHandlerConfigs(){return this.config??{}}}const mt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ze=Object.entries(mt).reduce((t,[e,r])=>(t[r]=Number(e),t),{}),tr=mt.split(""),j=6,B=8,rr=63,yt=t=>{let e=t.length/4*3;t.slice(-2)==="=="?e-=2:t.slice(-1)==="="&&e--;const r=new ArrayBuffer(e),s=new DataView(r);for(let n=0;n<t.length;n+=4){let i=0,o=0;for(let c=n,h=n+3;c<=h;c++)if(t[c]!=="="){if(!(t[c]in ze))throw new TypeError(`Invalid character ${t[c]} in base64 string.`);i|=ze[t[c]]<<(h-c)*j,o+=j}else i>>=j;const a=n/4*3;i>>=o%B;const u=Math.floor(o/B);for(let c=0;c<u;c++){const h=(u-c-1)*B;s.setUint8(a+c,(i&255<<h)>>h)}}return new Uint8Array(r)},J=t=>new TextEncoder().encode(t),K=t=>typeof t=="string"?J(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),sr=t=>{if(typeof t=="string")return t;if(typeof t!="object"||typeof t.byteOffset!="number"||typeof t.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(t)};function nr(t){let e;typeof t=="string"?e=J(t):e=t;const r=typeof e=="object"&&typeof e.length=="number",s=typeof e=="object"&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number";if(!r&&!s)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let n="";for(let i=0;i<e.length;i+=3){let o=0,a=0;for(let c=i,h=Math.min(i+3,e.length);c<h;c++)o|=e[c]<<(h-c-1)*B,a+=B;const u=Math.ceil(a/j);o<<=u*j-a;for(let c=1;c<=u;c++){const h=(u-c)*j;n+=tr[(o&rr<<h)>>h]}n+="==".slice(0,4-u)}return n}const Fi=async t=>typeof Blob=="function"&&t instanceof Blob||t.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await t.arrayBuffer()):ir(t):or(t);async function ir(t){const e=await ar(t),r=yt(e);return new Uint8Array(r)}async function or(t){const e=[],r=t.getReader();let s=!1,n=0;for(;!s;){const{done:a,value:u}=await r.read();u&&(e.push(u),n+=u.length),s=a}const i=new Uint8Array(n);let o=0;for(const a of e)i.set(a,o),o+=a.length;return i}function ar(t){return new Promise((e,r)=>{const s=new FileReader;s.onloadend=()=>{if(s.readyState!==2)return r(new Error("Reader aborted too early"));const n=s.result??"",i=n.indexOf(","),o=i>-1?i+1:n.length;e(n.substring(o))},s.onabort=()=>r(new Error("Read aborted")),s.onerror=()=>r(s.error),s.readAsDataURL(t)})}const I=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const s of e)r.push(s);return r},P=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,ae=()=>{let t=[],e=[],r=!1;const s=new Set,n=d=>d.sort((l,p)=>Fe[p.step]-Fe[l.step]||Be[p.priority||"normal"]-Be[l.priority||"normal"]),i=d=>{let l=!1;const p=g=>{const m=I(g.name,g.aliases);if(m.includes(d)){l=!0;for(const f of m)s.delete(f);return!1}return!0};return t=t.filter(p),e=e.filter(p),l},o=d=>{let l=!1;const p=g=>{if(g.middleware===d){l=!0;for(const m of I(g.name,g.aliases))s.delete(m);return!1}return!0};return t=t.filter(p),e=e.filter(p),l},a=d=>(t.forEach(l=>{d.add(l.middleware,{...l})}),e.forEach(l=>{d.addRelativeTo(l.middleware,{...l})}),d.identifyOnResolve?.(h.identifyOnResolve()),d),u=d=>{const l=[];return d.before.forEach(p=>{p.before.length===0&&p.after.length===0?l.push(p):l.push(...u(p))}),l.push(d),d.after.reverse().forEach(p=>{p.before.length===0&&p.after.length===0?l.push(p):l.push(...u(p))}),l},c=(d=!1)=>{const l=[],p=[],g={};return t.forEach(m=>{const f={...m,before:[],after:[]};for(const w of I(f.name,f.aliases))g[w]=f;l.push(f)}),e.forEach(m=>{const f={...m,before:[],after:[]};for(const w of I(f.name,f.aliases))g[w]=f;p.push(f)}),p.forEach(m=>{if(m.toMiddleware){const f=g[m.toMiddleware];if(f===void 0){if(d)return;throw new Error(`${m.toMiddleware} is not found when adding ${P(m.name,m.aliases)} middleware ${m.relation} ${m.toMiddleware}`)}m.relation==="after"&&f.after.push(m),m.relation==="before"&&f.before.push(m)}}),n(l).map(u).reduce((m,f)=>(m.push(...f),m),[])},h={add:(d,l={})=>{const{name:p,override:g,aliases:m}=l,f={step:"initialize",priority:"normal",middleware:d,...l},w=I(p,m);if(w.length>0){if(w.some(y=>s.has(y))){if(!g)throw new Error(`Duplicate middleware name '${P(p,m)}'`);for(const y of w){const S=t.findIndex(v=>v.name===y||v.aliases?.some(he=>he===y));if(S===-1)continue;const b=t[S];if(b.step!==f.step||f.priority!==b.priority)throw new Error(`"${P(b.name,b.aliases)}" middleware with ${b.priority} priority in ${b.step} step cannot be overridden by "${P(p,m)}" middleware with ${f.priority} priority in ${f.step} step.`);t.splice(S,1)}}for(const y of w)s.add(y)}t.push(f)},addRelativeTo:(d,l)=>{const{name:p,override:g,aliases:m}=l,f={middleware:d,...l},w=I(p,m);if(w.length>0){if(w.some(y=>s.has(y))){if(!g)throw new Error(`Duplicate middleware name '${P(p,m)}'`);for(const y of w){const S=e.findIndex(v=>v.name===y||v.aliases?.some(he=>he===y));if(S===-1)continue;const b=e[S];if(b.toMiddleware!==f.toMiddleware||b.relation!==f.relation)throw new Error(`"${P(b.name,b.aliases)}" middleware ${b.relation} "${b.toMiddleware}" middleware cannot be overridden by "${P(p,m)}" middleware ${f.relation} "${f.toMiddleware}" middleware.`);e.splice(S,1)}}for(const y of w)s.add(y)}e.push(f)},clone:()=>a(ae()),use:d=>{d.applyToStack(h)},remove:d=>typeof d=="string"?i(d):o(d),removeByTag:d=>{let l=!1;const p=g=>{const{tags:m,name:f,aliases:w}=g;if(m&&m.includes(d)){const y=I(f,w);for(const S of y)s.delete(S);return l=!0,!1}return!0};return t=t.filter(p),e=e.filter(p),l},concat:d=>{const l=a(ae());return l.use(d),l.identifyOnResolve(r||l.identifyOnResolve()||(d.identifyOnResolve?.()??!1)),l},applyToStack:a,identify:()=>c(!0).map(d=>{const l=d.step??d.relation+" "+d.toMiddleware;return P(d.name,d.aliases)+" - "+l}),identifyOnResolve(d){return typeof d=="boolean"&&(r=d),r},resolve:(d,l)=>{for(const p of c().map(g=>g.middleware).reverse())d=p(d,l);return r&&console.log(h.identify()),d}};return h},Fe={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Be={high:3,normal:2,low:1};class Bi{config;middlewareStack=ae();initConfig;handlers;constructor(e){this.config=e;const{protocol:r,protocolSettings:s}=e;s&&typeof r=="function"&&(e.protocol=new r(s))}send(e,r,s){const n=typeof r!="function"?r:void 0,i=typeof r=="function"?r:s,o=n===void 0&&this.config.cacheMiddleware===!0;let a;if(o){this.handlers||(this.handlers=new WeakMap);const u=this.handlers;u.has(e.constructor)?a=u.get(e.constructor):(a=e.resolveMiddleware(this.middlewareStack,this.config,n),u.set(e.constructor,a))}else delete this.handlers,a=e.resolveMiddleware(this.middlewareStack,this.config,n);if(i)a(e).then(u=>i(null,u.output),u=>i(u)).catch(()=>{});else return a(e).then(u=>u.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class D extends Uint8Array{static fromString(e,r="utf-8"){if(typeof e=="string")return r==="base64"?D.mutate(yt(e)):D.mutate(J(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,D.prototype),e}transformToString(e="utf-8"){return e==="base64"?nr(this):sr(this)}}const wt={},$e={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),wt[t]=e,$e[e]=t}function cr(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2){const s=t.slice(r,r+2).toLowerCase();if(s in $e)e[r/2]=$e[s];else throw new Error(`Cannot decode unrecognized sequence ${s} as hexadecimal`)}return e}function N(t){let e="";for(let r=0;r<t.byteLength;r++)e+=wt[t[r]];return e}const Wi=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return D.mutate(t);if(!t)return D.mutate(new Uint8Array);const r=e.streamCollector(t);return D.mutate(await r)},ge=t=>typeof t=="function"?t():t,X=t=>t[xe]||(t[xe]={}),U=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},bt=(t,e,r,s,n)=>({name:e,namespace:t,traits:r,input:s,output:n}),ur=t=>(e,r)=>async s=>{const{response:n}=await e(s),{operationSchema:i}=X(r),[,o,a,u,c,h]=i??[];try{const d=await t.protocol.deserializeResponse(bt(o,a,u,c,h),{...t,...r},n);return{response:n,output:d}}catch(d){if(Object.defineProperty(d,"$response",{value:n,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in d)){const l="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{d.message+=`
|
|
3
|
+
`+l}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(l):r.logger?.warn?.(l)}typeof d.$responseBodyText<"u"&&d.$response&&(d.$response.body=d.$responseBodyText);try{if(_.isInstance(n)){const{headers:p={}}=n,g=Object.entries(p);d.$metadata={httpStatusCode:n.statusCode,requestId:me(/^x-[\w-]+-request-?id$/,g),extendedRequestId:me(/^x-[\w-]+-id-2$/,g),cfId:me(/^x-[\w-]+-cf-id$/,g)}}}catch{}}throw d}},me=(t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],dr=t=>(e,r)=>async s=>{const{operationSchema:n}=X(r),[,i,o,a,u,c]=n??[],h=r.endpointV2?.url&&t.urlParser?async()=>t.urlParser(r.endpointV2.url):t.endpoint,d=await t.protocol.serializeRequest(bt(i,o,a,u,c),s.input,{...t,...r,endpoint:h});return e({...s,request:d})},lr={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},hr={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Vi(t){return{applyToStack:e=>{e.add(dr(t),hr),e.add(ur(t),lr),t.protocol.setSerdeContext(t)}}}function z(t){if(typeof t=="object")return t;t=t|0;const e={};let r=0;for(const s of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(t>>r++&1)===1&&(e[s]=1);return e}const We={it:Symbol.for("@smithy/nor-struct-it")};class A{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=A.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,r){this.ref=e,this.memberName=r;const s=[];let n=e,i=e;for(this._isMemberSchema=!1;ye(n);)s.push(n[1]),n=n[0],i=ge(n),this._isMemberSchema=!0;if(s.length>0){this.memberTraits={};for(let o=s.length-1;o>=0;--o){const a=s[o];Object.assign(this.memberTraits,z(a))}}else this.memberTraits=0;if(i instanceof A){const o=this.memberTraits;Object.assign(this,i),this.memberTraits=Object.assign({},o,i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??i.memberName;return}if(this.schema=ge(i),pr(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(i),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const r=this.prototype.isPrototypeOf(e);return!r&&typeof e=="object"&&e!==null?e.symbol===this.symbol:r}static of(e){const r=ge(e);if(r instanceof A)return r;if(ye(r)){const[s,n]=r;if(s instanceof A)return Object.assign(s.getMergedTraits(),z(n)),s;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new A(r)}getSchema(){const e=this.schema;return Array.isArray(e)&&e[0]===0?e[4]:e}getName(e=!1){const{name:r}=this;return!e&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return typeof e=="number"?e>=64&&e<128:e[0]===1}isMapSchema(){const e=this.getSchema();return typeof e=="number"?e>=128&&e<=255:e[0]===2}isStructSchema(){const e=this.getSchema();if(typeof e!="object")return!1;const r=e[0];return r===3||r===-3||r===4}isUnionSchema(){const e=this.getSchema();return typeof e!="object"?!1:e[0]===4}isBlobSchema(){const e=this.getSchema();return e===21||e===42}isTimestampSchema(){const e=this.getSchema();return typeof e=="number"&&e>=4&&e<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return z(this.memberTraits)}getOwnTraits(){return z(this.traits)}getKeySchema(){const[e,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const s=this.getSchema(),n=e?15:s[4]??0;return q([n,0],"key")}getValueSchema(){const e=this.getSchema(),[r,s,n]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i=typeof e=="number"?63&e:e&&typeof e=="object"&&(s||n)?e[3+e[0]]:r?15:void 0;if(i!=null)return q([i,0],s?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const r=this.getSchema();if(this.isStructSchema()&&r[4].includes(e)){const s=r[4].indexOf(e),n=r[5][s];return q(ye(n)?n:[n,0],e)}if(this.isDocumentSchema())return q([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[r,s]of this.structIterator())e[r]=s}catch{}return e}getEventStreamMember(){if(this.isStructSchema()){for(const[e,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return e}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const e=this.getSchema(),r=e[4].length;let s=e[We.it];if(s&&r===s.length){yield*s;return}s=Array(r);for(let n=0;n<r;++n){const i=e[4][n],o=q([e[5][n],0],i);yield s[n]=[i,o]}e[We.it]=s}}function q(t,e){if(t instanceof A)return Object.assign(t,{memberName:e,_isMemberSchema:!0});const r=A;return new r(t,e)}const ye=t=>Array.isArray(t)&&t.length===2,pr=t=>Array.isArray(t)&&t.length>=5;class ${namespace;schemas;exceptions;static registries=new Map;constructor(e,r=new Map,s=new Map){this.namespace=e,this.schemas=r,this.exceptions=s}static for(e){return $.registries.has(e)||$.registries.set(e,new $(e)),$.registries.get(e)}register(e,r){const s=this.normalizeShapeId(e);$.for(s.split("#")[0]).schemas.set(s,r)}getSchema(e){const r=this.normalizeShapeId(e);if(!this.schemas.has(r))throw new Error(`@smithy/core/schema - schema not found for ${r}`);return this.schemas.get(r)}registerError(e,r){const s=e,n=$.for(s[1]);n.schemas.set(s[1]+"#"+s[2],s),n.exceptions.set(s,r)}getErrorCtor(e){const r=e;return $.for(r[1]).exceptions.get(r)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,r,s]=e,n=r+"#"+s;if(n.startsWith("smithy.ts.sdk.synthetic.")&&n.endsWith("ServiceException"))return e}}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}}const St=t=>{if(t!=null){if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return String(e)!==String(t)&&Rr.warn(Cr(`Expected number but observed string: ${t}`)),e}if(typeof t=="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)}},fr=Math.ceil(2**127*(2-2**-23)),gr=t=>{const e=St(t);if(e!==void 0&&!Number.isNaN(e)&&e!==1/0&&e!==-1/0&&Math.abs(e)>fr)throw new TypeError(`Expected 32-bit float, got ${t}`);return e},mr=t=>{if(t!=null){if(Number.isInteger(t)&&!Number.isNaN(t))return t;throw new TypeError(`Expected integer, got ${typeof t}: ${t}`)}},yr=t=>vt(t,16),wr=t=>vt(t,8),vt=(t,e)=>{const r=mr(t);if(r!==void 0&&br(r,e)!==r)throw new TypeError(`Expected ${e}-bit integer, got ${t}`);return r},br=(t,e)=>{switch(e){case 32:return Int32Array.of(t)[0];case 16:return Int16Array.of(t)[0];case 8:return Int8Array.of(t)[0]}},Sr=t=>St(typeof t=="string"?de(t):t),vr=t=>gr(typeof t=="string"?de(t):t),Er=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,de=t=>{const e=t.match(Er);if(e===null||e[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)},ce=t=>yr(typeof t=="string"?de(t):t),Tr=t=>wr(typeof t=="string"?de(t):t),Cr=t=>String(new TypeError(t).stack||t).split(`
|
|
4
|
+
`).slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join(`
|
|
5
|
+
`),Rr={warn:console.warn},Ar=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ne=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Gi(t){const e=t.getUTCFullYear(),r=t.getUTCMonth(),s=t.getUTCDay(),n=t.getUTCDate(),i=t.getUTCHours(),o=t.getUTCMinutes(),a=t.getUTCSeconds(),u=n<10?`0${n}`:`${n}`,c=i<10?`0${i}`:`${i}`,h=o<10?`0${o}`:`${o}`,d=a<10?`0${a}`:`${a}`;return`${Ar[s]}, ${u} ${Ne[r]} ${e} ${c}:${h}:${d} GMT`}const xr=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Ji=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=xr.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");const[r,s,n,i,o,a,u,c,h]=e,d=ce(Y(s)),l=k(n,"month",1,12),p=k(i,"day",1,31),g=se(d,l,p,{hours:o,minutes:a,seconds:u,fractionalMilliseconds:c});return h.toUpperCase()!="Z"&&g.setTime(g.getTime()-jr(h)),g},$r=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$/),Pr=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$/),kr=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})$/),Ki=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=$r.exec(t);if(e){const[r,s,n,i,o,a,u,c]=e;return se(ce(Y(i)),we(n),k(s,"day",1,31),{hours:o,minutes:a,seconds:u,fractionalMilliseconds:c})}if(e=Pr.exec(t),e){const[r,s,n,i,o,a,u,c]=e;return Mr(se(Or(i),we(n),k(s,"day",1,31),{hours:o,minutes:a,seconds:u,fractionalMilliseconds:c}))}if(e=kr.exec(t),e){const[r,s,n,i,o,a,u,c]=e;return se(ce(Y(c)),we(s),k(n.trimLeft(),"day",1,31),{hours:i,minutes:o,seconds:a,fractionalMilliseconds:u})}throw new TypeError("Invalid RFC-7231 date-time value")},Yi=t=>{if(t==null)return;let e;if(typeof t=="number")e=t;else if(typeof t=="string")e=Sr(t);else if(typeof t=="object"&&t.tag===1)e=t.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(e)||e===1/0||e===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(e*1e3))},se=(t,e,r,s)=>{const n=e-1;return Nr(t,n,r),new Date(Date.UTC(t,n,r,k(s.hours,"hour",0,23),k(s.minutes,"minute",0,59),k(s.seconds,"seconds",0,60),Lr(s.fractionalMilliseconds)))},Or=t=>{const e=new Date().getUTCFullYear(),r=Math.floor(e/100)*100+ce(Y(t));return r<e?r+100:r},Ir=50*365*24*60*60*1e3,Mr=t=>t.getTime()-new Date().getTime()>Ir?new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())):t,we=t=>{const e=Ne.indexOf(t);if(e<0)throw new TypeError(`Invalid month: ${t}`);return e+1},Dr=[31,28,31,30,31,30,31,31,30,31,30,31],Nr=(t,e,r)=>{let s=Dr[e];if(e===1&&Ur(t)&&(s=29),r>s)throw new TypeError(`Invalid day for ${Ne[e]} in ${t}: ${r}`)},Ur=t=>t%4===0&&(t%100!==0||t%400===0),k=(t,e,r,s)=>{const n=Tr(Y(t));if(n<r||n>s)throw new TypeError(`${e} must be between ${r} and ${s}, inclusive`);return n},Lr=t=>t==null?0:vr("0."+t)*1e3,jr=t=>{const e=t[0];let r=1;if(e=="+")r=1;else if(e=="-")r=-1;else throw new TypeError(`Offset direction, ${e}, must be "+" or "-"`);const s=Number(t.substring(1,3)),n=Number(t.substring(4,6));return r*(s*60+n)*60*1e3},Y=t=>{let e=0;for(;e<t.length-1&&t.charAt(e)==="0";)e++;return e===0?t:t.slice(e)},Ve=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),E=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0")),_r=()=>{if(Ve)return Ve();const t=new Uint8Array(16);return crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128,E[t[0]]+E[t[1]]+E[t[2]]+E[t[3]]+"-"+E[t[4]]+E[t[5]]+"-"+E[t[6]]+E[t[7]]+"-"+E[t[8]]+E[t[9]]+"-"+E[t[10]]+E[t[11]]+E[t[12]]+E[t[13]]+E[t[14]]+E[t[15]]},L=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};L.from=t=>t&&typeof t=="object"&&(t instanceof L||"deserializeJSON"in t)?t:typeof t=="string"||Object.getPrototypeOf(t)===String.prototype?L(String(t)):L(JSON.stringify(t));L.fromObject=L.from;const Ge=/^-?\d*(\.\d+)?$/;class Et{string;type;constructor(e,r){if(this.string=e,this.type=r,!Ge.test(e))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||typeof e!="object")return!1;const r=e;return Et.prototype.isPrototypeOf(e)||r.type==="bigDecimal"&&Ge.test(r.string)}}class Hr{serdeContext;setSerdeContext(e){this.serdeContext=e}}class Zi extends Hr{options;constructor(e){super(),this.options=e}getRequestType(){return R}getResponseType(){return _}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,r){if("url"in r){e.protocol=r.url.protocol,e.hostname=r.url.hostname,e.port=r.url.port?Number(r.url.port):void 0,e.path=r.url.pathname,e.fragment=r.url.hash||void 0,e.username=r.url.username||void 0,e.password=r.url.password||void 0,e.query||(e.query={});for(const[s,n]of r.url.searchParams.entries())e.query[s]=n;return e}else return e.protocol=r.protocol,e.hostname=r.hostname,e.port=r.port?Number(r.port):void 0,e.path=r.path,e.query={...r.query},e}setHostPrefix(e,r,s){if(this.serdeContext?.disableHostPrefix)return;const n=A.of(r.input),i=z(r.traits??{});if(i.endpoint){let o=i.endpoint?.[0];if(typeof o=="string"){const a=[...n.structIterator()].filter(([,u])=>u.getMergedTraits().hostLabel);for(const[u]of a){const c=s[u];if(typeof c!="string")throw new Error(`@smithy/core/schema - ${u} in input must be a string as hostLabel.`);o=o.replace(`{${u}}`,c)}e.hostname=o+e.hostname}}}deserializeMetadata(e){return{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"]}}async serializeEventStream({eventStream:e,requestSchema:r,initialRequest:s}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:r,initialRequest:s})}async deserializeEventStream({response:e,responseSchema:r,initialResponseContainer:s}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:r,initialResponseContainer:s})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await Kt(async()=>{const{EventStreamSerde:r}=await import("./index-DuUQBJXO-gNsOEp1C.js");return{EventStreamSerde:r}},__vite__mapDeps([0,1,2]));return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,r,s,n,i){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}function Qi(t,e){if(e.timestampFormat.useTrait&&t.isTimestampSchema()&&(t.getSchema()===5||t.getSchema()===6||t.getSchema()===7))return t.getSchema();const{httpLabel:r,httpPrefixHeaders:s,httpHeader:n,httpQuery:i}=t.getMergedTraits();return(e.httpBindings?typeof s=="string"||n?6:i||r?5:void 0:void 0)??e.timestampFormat.default}const be="***SensitiveInformation***";function Pe(t,e){if(e==null)return e;const r=A.of(t);if(r.getMergedTraits().sensitive)return be;if(r.isListSchema()){if(r.getValueSchema().getMergedTraits().sensitive)return be}else if(r.isMapSchema()){if(r.getKeySchema().getMergedTraits().sensitive||r.getValueSchema().getMergedTraits().sensitive)return be}else if(r.isStructSchema()&&typeof e=="object"){const s=e,n={};for(const[i,o]of r.structIterator())s[i]!=null&&(n[i]=Pe(o,s[i]));return n}return e}class qr{middlewareStack=ae();schema;static classBuilder(){return new zr}resolveMiddlewareWithContext(e,r,s,{middlewareFn:n,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:u,smithyContext:c,additionalContext:h,CommandCtor:d}){for(const f of n.bind(this)(d,e,r,s))this.middlewareStack.use(f);const l=e.concat(this.middlewareStack),{logger:p}=r,g={logger:p,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:u,[xe]:{commandInstance:this,...c},...h},{requestHandler:m}=r;return l.resolve(f=>m.handle(f.request,s||{}),g)}}class zr{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,r,s={}){return this._smithyContext={service:e,operation:r,...s},this}c(e={}){return this._additionalContext=e,this}n(e,r){return this._clientName=e,this._commandName=r,this}f(e=s=>s,r=s=>s){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=r,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let r;return r=class extends qr{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[s]){super(),this.input=s??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(s,n,i){const o=e._operationSchema,a=o?.[4]??o?.input,u=o?.[5]??o?.output;return this.resolveMiddlewareWithContext(s,n,i,{CommandCtor:r,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(o?Pe.bind(null,a):c=>c),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(o?Pe.bind(null,u):c=>c),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}class F extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const r=e;return F.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;const r=e;return this===F?F.isInstance(e):F.isInstance(e)?r.name&&this.name?this.prototype.isPrototypeOf(e)||r.name===this.name:this.prototype.isPrototypeOf(e):!1}}const Je=(t,e={})=>{Object.entries(e).filter(([,s])=>s!==void 0).forEach(([s,n])=>{(t[s]==null||t[s]==="")&&(t[s]=n)});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t},Xi=t=>{switch(t){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:3e4};default:return{}}},Fr=t=>{const e=[];for(const r in oe){const s=oe[r];t[s]!==void 0&&e.push({algorithmId:()=>s,checksumConstructor:()=>t[s]})}return{addChecksumAlgorithm(r){e.push(r)},checksumAlgorithms(){return e}}},Br=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},Wr=t=>({setRetryStrategy(e){t.retryStrategy=e},retryStrategy(){return t.retryStrategy}}),Vr=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},eo=t=>Object.assign(Fr(t),Wr(t)),to=t=>Object.assign(Br(t),Vr(t));class Gr{trace(){}debug(){}info(){}warn(){}error(){}}const Jr=(t,e)=>{if(!e||e.length===0)return t;const r=[];for(const s of e)for(const n of t)n.schemeId.split("#")[1]===s&&r.push(n);for(const s of t)r.find(({schemeId:n})=>n===s.schemeId)||r.push(s);return r};function Kr(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const Yr=(t,e)=>(r,s)=>async n=>{const i=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,s,n.input)),o=t.authSchemePreference?await t.authSchemePreference():[],a=Jr(i,o),u=Kr(t.httpAuthSchemes),c=X(s),h=[];for(const d of a){const l=u.get(d.schemeId);if(!l){h.push(`HttpAuthScheme \`${d.schemeId}\` was not enabled for this service.`);continue}const p=l.identityProvider(await e.identityProviderConfigProvider(t));if(!p){h.push(`HttpAuthScheme \`${d.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:g={},signingProperties:m={}}=d.propertiesExtractor?.(t,s)||{};d.identityProperties=Object.assign(d.identityProperties||{},g),d.signingProperties=Object.assign(d.signingProperties||{},m),c.selectedHttpAuthScheme={httpAuthOption:d,identity:await p(d.identityProperties),signer:l.signer};break}if(!c.selectedHttpAuthScheme)throw new Error(h.join(`
|
|
6
|
+
`));return r(n)},Zr={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},ro=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:s=>{s.addRelativeTo(Yr(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),Zr)}}),Qr={name:"serializerMiddleware"},Xr=t=>e=>{throw e},es=(t,e)=>{},ts=t=>(e,r)=>async s=>{if(!R.isInstance(s.request))return e(s);const n=X(r).selectedHttpAuthScheme;if(!n)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:o,signer:a}=n,u=await e({...s,request:await a.sign(s.request,o,i)}).catch((a.errorHandler||Xr)(i));return(a.successHandler||es)(u.response,i),u},rs={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},so=t=>({applyToStack:e=>{e.addRelativeTo(ts(),rs)}}),W=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e};function ss(t,e,r){t.__smithy_context?t.__smithy_context.features||(t.__smithy_context.features={}):t.__smithy_context={features:{}},t.__smithy_context.features[e]=r}class no{authSchemes=new Map;constructor(e){for(const[r,s]of Object.entries(e))s!==void 0&&this.authSchemes.set(r,s)}getIdentityProvider(e){return this.authSchemes.get(e)}}const ns=t=>function(e){return Tt(e)&&e.expiration.getTime()-Date.now()<t},is=3e5,os=ns(is),Tt=t=>t.expiration!==void 0,as=(t,e,r)=>{if(t===void 0)return;const s=typeof t!="function"?async()=>Promise.resolve(t):t;let n,i,o,a=!1;const u=async c=>{i||(i=s(c));try{n=await i,o=!0,a=!1}finally{i=void 0}return n};return e===void 0?async c=>((!o||c?.forceRefresh)&&(n=await u(c)),n):async c=>((!o||c?.forceRefresh)&&(n=await u(c)),a?n:r(n)?(e(n)&&await u(c),n):(a=!0,n))};function io(t){return t}const cs=t=>e=>async r=>{if(!R.isInstance(r.request))return e(r);const{request:s}=r,{handlerProtocol:n=""}=t.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let i=s.hostname;s.port!=null&&(i+=`:${s.port}`),s.headers.host=i}return e(r)},us={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},oo=t=>({applyToStack:e=>{e.add(cs(t),us)}}),ds=()=>(t,e)=>async r=>{try{const s=await t(r),{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:c}=a,h=u??e.inputFilterSensitiveLog,d=c??e.outputFilterSensitiveLog,{$metadata:l,...p}=s.output;return o?.info?.({clientName:n,commandName:i,input:h(r.input),output:d(p),metadata:l}),s}catch(s){const{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u}=a,c=u??e.inputFilterSensitiveLog;throw o?.error?.({clientName:n,commandName:i,input:c(r.input),error:s,metadata:s.$metadata}),s}},ls={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},ao=t=>({applyToStack:e=>{e.add(ds(),ls)}}),hs={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ps=()=>t=>async e=>t(e),co=t=>({applyToStack:e=>{e.add(ps(),hs)}}),fs=void 0;function gs(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function uo(t){const e=W(t.userAgentAppId??fs),{customUserAgent:r}=t;return Object.assign(t,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const s=await e();if(!gs(s)){const n=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof s!="string"?n?.warn("userAgentAppId must be a string or undefined."):s.length>50&&n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s}})}class lo{capacity;data=new Map;parameters=[];constructor({size:e,params:r}){this.capacity=e??50,r&&(this.parameters=r)}get(e,r){const s=this.hash(e);if(s===!1)return r();if(!this.data.has(s)){if(this.data.size>this.capacity+10){const n=this.data.keys();let i=0;for(;;){const{value:o,done:a}=n.next();if(this.data.delete(o),a||++i>10)break}}this.data.set(s,r())}return this.data.get(s)}size(){return this.data.size}hash(e){let r="";const{parameters:s}=this;if(s.length===0)return!1;for(const n of s){const i=String(e[n]??"");if(i.includes("|;"))return!1;r+=i+"|;"}return r}}const ms=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}$"),Ue=t=>ms.test(t)||t.startsWith("[")&&t.endsWith("]"),ys=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),ee=(t,e=!1)=>{if(!e)return ys.test(t);const r=t.split(".");for(const s of r)if(!ee(s))return!1;return!0},ue={},Z="endpoints";function O(t){return typeof t!="object"||t==null?t:"ref"in t?`$${O(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(O).join(", ")})`:JSON.stringify(t,null,2)}class T extends Error{constructor(e){super(e),this.name="EndpointError"}}const ws=(t,e)=>t===e,bs=t=>{const e=t.split("."),r=[];for(const s of e){const n=s.indexOf("[");if(n!==-1){if(s.indexOf("]")!==s.length-1)throw new T(`Path: '${t}' does not end with ']'`);const i=s.slice(n+1,-1);if(Number.isNaN(parseInt(i)))throw new T(`Invalid array index: '${i}' in path: '${t}'`);n!==0&&r.push(s.slice(0,n)),r.push(i)}else r.push(s)}return r},Ct=(t,e)=>bs(e).reduce((r,s)=>{if(typeof r!="object")throw new T(`Index '${s}' in '${e}' not found in '${JSON.stringify(t)}'`);return Array.isArray(r)?r[parseInt(s)]:r[s]},t),Ss=t=>t!=null,vs=t=>!t,Se={[G.HTTP]:80,[G.HTTPS]:443},Es=t=>{const e=(()=>{try{if(t instanceof URL)return t;if(typeof t=="object"&&"hostname"in t){const{hostname:l,port:p,protocol:g="",path:m="",query:f={}}=t,w=new URL(`${g}//${l}${p?`:${p}`:""}${m}`);return w.search=Object.entries(f).map(([y,S])=>`${y}=${S}`).join("&"),w}return new URL(t)}catch{return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(t)} as a whatwg URL.`),null;const r=e.href,{host:s,hostname:n,pathname:i,protocol:o,search:a}=e;if(a)return null;const u=o.slice(0,-1);if(!Object.values(G).includes(u))return null;const c=Ue(n),h=r.includes(`${s}:${Se[u]}`)||typeof t=="string"&&t.includes(`${s}:${Se[u]}`),d=`${s}${h?`:${Se[u]}`:""}`;return{scheme:u,authority:d,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:c}},Ts=(t,e)=>t===e,Cs=(t,e,r,s)=>e>=r||t.length<r?null:s?t.substring(t.length-r,t.length-e):t.substring(e,r),Rs=t=>encodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),As={booleanEquals:ws,getAttr:Ct,isSet:Ss,isValidHostLabel:ee,not:vs,parseURL:Es,stringEquals:Ts,substring:Cs,uriEncode:Rs},Rt=(t,e)=>{const r=[],s={...e.endpointParams,...e.referenceRecord};let n=0;for(;n<t.length;){const i=t.indexOf("{",n);if(i===-1){r.push(t.slice(n));break}r.push(t.slice(n,i));const o=t.indexOf("}",i);if(o===-1){r.push(t.slice(i));break}t[i+1]==="{"&&t[o+1]==="}"&&(r.push(t.slice(i+1,o)),n=o+2);const a=t.substring(i+1,o);if(a.includes("#")){const[u,c]=a.split("#");r.push(Ct(s[u],c))}else r.push(s[a]);n=o+1}return r.join("")},xs=({ref:t},e)=>({...e.endpointParams,...e.referenceRecord})[t],le=(t,e,r)=>{if(typeof t=="string")return Rt(t,r);if(t.fn)return xt.callFunction(t,r);if(t.ref)return xs(t,r);throw new T(`'${e}': ${String(t)} is not a string, function or reference.`)},At=({fn:t,argv:e},r)=>{const s=e.map(i=>["boolean","number"].includes(typeof i)?i:xt.evaluateExpression(i,"arg",r)),n=t.split(".");return n[0]in ue&&n[1]!=null?ue[n[0]][n[1]](...s):As[t](...s)},xt={evaluateExpression:le,callFunction:At},$s=({assign:t,...e},r)=>{if(t&&t in r.referenceRecord)throw new T(`'${t}' is already defined in Reference Record.`);const s=At(e,r);return r.logger?.debug?.(`${Z} evaluateCondition: ${O(e)} = ${O(s)}`),{result:s===""?!0:!!s,...t!=null&&{toAssign:{name:t,value:s}}}},Le=(t=[],e)=>{const r={};for(const s of t){const{result:n,toAssign:i}=$s(s,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!n)return{result:n};i&&(r[i.name]=i.value,e.logger?.debug?.(`${Z} assign: ${i.name} := ${O(i.value)}`))}return{result:!0,referenceRecord:r}},Ps=(t,e)=>Object.entries(t).reduce((r,[s,n])=>({...r,[s]:n.map(i=>{const o=le(i,"Header value entry",e);if(typeof o!="string")throw new T(`Header '${s}' value '${o}' is not a string`);return o})}),{}),$t=(t,e)=>Object.entries(t).reduce((r,[s,n])=>({...r,[s]:kt.getEndpointProperty(n,e)}),{}),Pt=(t,e)=>{if(Array.isArray(t))return t.map(r=>Pt(r,e));switch(typeof t){case"string":return Rt(t,e);case"object":if(t===null)throw new T(`Unexpected endpoint property: ${t}`);return kt.getEndpointProperties(t,e);case"boolean":return t;default:throw new T(`Unexpected endpoint property type: ${typeof t}`)}},kt={getEndpointProperty:Pt,getEndpointProperties:$t},ks=(t,e)=>{const r=le(t,"Endpoint URL",e);if(typeof r=="string")try{return new URL(r)}catch(s){throw console.error(`Failed to construct URL with ${r}`,s),s}throw new T(`Endpoint URL must be a string, got ${typeof r}`)},Os=(t,e)=>{const{conditions:r,endpoint:s}=t,{result:n,referenceRecord:i}=Le(r,e);if(!n)return;const o={...e,referenceRecord:{...e.referenceRecord,...i}},{url:a,properties:u,headers:c}=s;return e.logger?.debug?.(`${Z} Resolving endpoint from template: ${O(s)}`),{...c!=null&&{headers:Ps(c,o)},...u!=null&&{properties:$t(u,o)},url:ks(a,o)}},Is=(t,e)=>{const{conditions:r,error:s}=t,{result:n,referenceRecord:i}=Le(r,e);if(n)throw new T(le(s,"Error",{...e,referenceRecord:{...e.referenceRecord,...i}}))},Ot=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const s=Os(r,e);if(s)return s}else if(r.type==="error")Is(r,e);else if(r.type==="tree"){const s=It.evaluateTreeRule(r,e);if(s)return s}else throw new T(`Unknown endpoint rule: ${r}`);throw new T("Rules evaluation failed")},Ms=(t,e)=>{const{conditions:r,rules:s}=t,{result:n,referenceRecord:i}=Le(r,e);if(n)return It.evaluateRules(s,{...e,referenceRecord:{...e.referenceRecord,...i}})},It={evaluateRules:Ot,evaluateTreeRule:Ms},ho=(t,e)=>{const{endpointParams:r,logger:s}=e,{parameters:n,rules:i}=t;e.logger?.debug?.(`${Z} Initial EndpointParams: ${O(r)}`);const o=Object.entries(n).filter(([,c])=>c.default!=null).map(([c,h])=>[c,h.default]);if(o.length>0)for(const[c,h]of o)r[c]=r[c]??h;const a=Object.entries(n).filter(([,c])=>c.required).map(([c])=>c);for(const c of a)if(r[c]==null)throw new T(`Missing required parameter: '${c}'`);const u=Ot(i,{endpointParams:r,logger:s,referenceRecord:{}});return e.logger?.debug?.(`${Z} Resolved endpoint: ${O(u)}`),u},Mt=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!Mt(r))return!1;return!0}return!(!ee(t)||t.length<3||t.length>63||t!==t.toLowerCase()||Ue(t))},Ke=":",Ds="/",Ns=t=>{const e=t.split(Ke);if(e.length<6)return null;const[r,s,n,i,o,...a]=e;if(r!=="arn"||s===""||n===""||a.join(Ke)==="")return null;const u=a.map(c=>c.split(Ds)).flat();return{partition:s,service:n,region:i,accountId:o,resourceId:u}},Us=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{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-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],Ls={partitions:Us};let js=Ls;const _s=t=>{const{partitions:e}=js;for(const s of e){const{regions:n,outputs:i}=s;for(const[o,a]of Object.entries(n))if(o===t)return{...i,...a}}for(const s of e){const{regionRegex:n,outputs:i}=s;if(new RegExp(n).test(t))return{...i}}const r=e.find(s=>s.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},Hs={isVirtualHostableS3Bucket:Mt,parseArn:Ns,partition:_s};ue.aws=Hs;function qs(t){const e={};if(t=t.replace(/^\?/,""),t)for(const r of t.split("&")){let[s,n=null]=r.split("=");s=decodeURIComponent(s),n&&(n=decodeURIComponent(n)),s in e?Array.isArray(e[s])?e[s].push(n):e[s]=[e[s],n]:e[s]=n}return e}const ke=t=>{if(typeof t=="string")return ke(new URL(t));const{hostname:e,pathname:r,port:s,protocol:n,search:i}=t;let o;return i&&(o=qs(i)),{hostname:e,port:s?parseInt(s):void 0,protocol:n,path:r,query:o}};function zs(t,e,r){return t.$source||(t.$source={}),t.$source[e]=r,t}function x(t,e,r){t.__aws_sdk_context?t.__aws_sdk_context.features||(t.__aws_sdk_context.features={}):t.__aws_sdk_context={features:{}},t.__aws_sdk_context.features[e]=r}const Ye=t=>_.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Dt=t=>new Date(Date.now()+t),Fs=(t,e)=>Math.abs(Dt(e).getTime()-t)>=3e5,Ze=(t,e)=>{const r=Date.parse(t);return Fs(r,e)?r-Date.now():e},V=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},Bs=async t=>{const e=V("context",t.context),r=V("config",t.config),s=e.endpointV2?.properties?.authSchemes?.[0],n=await V("signer",r.signer)(s),i=t?.signingRegion,o=t?.signingRegionSet,a=t?.signingName;return{config:r,signer:n,signingRegion:i,signingRegionSet:o,signingName:a}};class po{async sign(e,r,s){if(!R.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await Bs(s),{config:i,signer:o}=n;let{signingRegion:a,signingName:u}=n;const c=s.context;if(c?.authSchemes?.length??!1){const[h,d]=c.authSchemes;h?.name==="sigv4a"&&d?.name==="sigv4"&&(a=d?.signingRegion??a,u=d?.signingName??u)}return await o.sign(e,{signingDate:Dt(i.systemClockOffset),signingRegion:a,signingService:u})}errorHandler(e){return r=>{const s=r.ServerTime??Ye(r.$response);if(s){const n=V("config",e.config),i=n.systemClockOffset;n.systemClockOffset=Ze(s,n.systemClockOffset),n.systemClockOffset!==i&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(e,r){const s=Ye(e);if(s){const n=V("config",r.config);n.systemClockOffset=Ze(s,n.systemClockOffset)}}}const Ws="X-Amz-Algorithm",Vs="X-Amz-Credential",Nt="X-Amz-Date",Gs="X-Amz-SignedHeaders",Js="X-Amz-Expires",Ut="X-Amz-Signature",Lt="X-Amz-Security-Token",jt="authorization",_t=Nt.toLowerCase(),Ks="date",Ys=[jt,_t,Ks],Zs=Ut.toLowerCase(),Oe="x-amz-content-sha256",Qs=Lt.toLowerCase(),Xs={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},en=/^proxy-/,tn=/^sec-/,ve="AWS4-HMAC-SHA256",rn="AWS4-HMAC-SHA256-PAYLOAD",sn="UNSIGNED-PAYLOAD",nn=50,Ht="aws4_request",on=3600*24*7,te={},Ee=[],Te=(t,e,r)=>`${t}/${e}/${r}/${Ht}`,an=async(t,e,r,s,n)=>{const i=await Qe(t,e.secretAccessKey,e.accessKeyId),o=`${r}:${s}:${n}:${N(i)}:${e.sessionToken}`;if(o in te)return te[o];for(Ee.push(o);Ee.length>nn;)delete te[Ee.shift()];let a=`AWS4${e.secretAccessKey}`;for(const u of[r,s,n,Ht])a=await Qe(t,a,u);return te[o]=a},Qe=(t,e,r)=>{const s=new t(e);return s.update(K(r)),s.digest()},Xe=({headers:t},e,r)=>{const s={};for(const n of Object.keys(t).sort()){if(t[n]==null)continue;const i=n.toLowerCase();(i in Xs||e?.has(i)||en.test(i)||tn.test(i))&&(!r||r&&!r.has(i))||(s[i]=t[n].trim().replace(/\s+/g," "))}return s},cn=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",Ce=async({headers:t,body:e},r)=>{for(const s of Object.keys(t))if(s.toLowerCase()===Oe)return t[s];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||cn(e)){const s=new r;return s.update(K(e)),N(await s.digest())}return sn};class un{format(e){const r=[];for(const i of Object.keys(e)){const o=J(i);r.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[i]))}const s=new Uint8Array(r.reduce((i,o)=>i+o.byteLength,0));let n=0;for(const i of r)s.set(i,n),n+=i.byteLength;return s}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,e.value,!1),new Uint8Array(r.buffer);case"integer":const s=new DataView(new ArrayBuffer(5));return s.setUint8(0,4),s.setInt32(1,e.value,!1),new Uint8Array(s.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const a=J(e.value),u=new DataView(new ArrayBuffer(3+a.byteLength));u.setUint8(0,7),u.setUint16(1,a.byteLength,!1);const c=new Uint8Array(u.buffer);return c.set(a,3),c;case"timestamp":const h=new Uint8Array(9);return h[0]=8,h.set(je.fromNumber(e.value.valueOf()).bytes,1),h;case"uuid":if(!dn.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(cr(e.value.replace(/\-/g,"")),1),d}}}var et;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(et||(et={}));const dn=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class je{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let s=7,n=Math.abs(Math.round(e));s>-1&&n>0;s--,n/=256)r[s]=n;return e<0&&tt(r),new je(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&tt(e),parseInt(N(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function tt(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const ln=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},hn=(t,e={})=>{const{headers:r,query:s={}}=R.clone(t);for(const n of Object.keys(r)){const i=n.toLowerCase();(i.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(i)||e.hoistableHeaders?.has(i))&&(s[n]=r[n],delete r[n])}return{...t,headers:r,query:s}},rt=t=>{t=R.clone(t);for(const e of Object.keys(t.headers))Ys.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},pn=({query:t={}})=>{const e=[],r={};for(const s of Object.keys(t)){if(s.toLowerCase()===Zs)continue;const n=M(s);e.push(n);const i=t[s];typeof i=="string"?r[n]=`${n}=${M(i)}`:Array.isArray(i)&&(r[n]=i.slice(0).reduce((o,a)=>o.concat([`${n}=${M(a)}`]),[]).sort().join("&"))}return e.sort().map(s=>r[s]).filter(s=>s).join("&")},fn=t=>gn(t).toISOString().replace(/\.\d{3}Z$/,"Z"),gn=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class mn{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:r,region:s,service:n,sha256:i,uriEscapePath:o=!0}){this.service=n,this.sha256=i,this.uriEscapePath=o,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=U(s),this.credentialProvider=U(r)}createCanonicalRequest(e,r,s){const n=Object.keys(r).sort();return`${e.method}
|
|
7
|
+
${this.getCanonicalPath(e)}
|
|
8
|
+
${pn(e)}
|
|
9
|
+
${n.map(i=>`${i}:${r[i]}`).join(`
|
|
10
|
+
`)}
|
|
11
|
+
|
|
12
|
+
${n.join(";")}
|
|
13
|
+
${s}`}async createStringToSign(e,r,s,n){const i=new this.sha256;i.update(K(s));const o=await i.digest();return`${n}
|
|
14
|
+
${e}
|
|
15
|
+
${r}
|
|
16
|
+
${N(o)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const r=[];for(const n of e.split("/"))n?.length!==0&&n!=="."&&(n===".."?r.pop():r.push(n));const s=`${e?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&e?.endsWith("/")?"/":""}`;return M(s).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){const r=fn(e).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class st extends mn{headerFormatter=new un;constructor({applyChecksum:e,credentials:r,region:s,service:n,sha256:i,uriEscapePath:o=!0}){super({applyChecksum:e,credentials:r,region:s,service:n,sha256:i,uriEscapePath:o})}async presign(e,r={}){const{signingDate:s=new Date,expiresIn:n=3600,unsignableHeaders:i,unhoistableHeaders:o,signableHeaders:a,hoistableHeaders:u,signingRegion:c,signingService:h}=r,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:p,shortDate:g}=this.formatDate(s);if(n>on)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const m=Te(g,l,h??this.service),f=hn(rt(e),{unhoistableHeaders:o,hoistableHeaders:u});d.sessionToken&&(f.query[Lt]=d.sessionToken),f.query[Ws]=ve,f.query[Vs]=`${d.accessKeyId}/${m}`,f.query[Nt]=p,f.query[Js]=n.toString(10);const w=Xe(f,i,a);return f.query[Gs]=this.getCanonicalHeaderList(w),f.query[Ut]=await this.getSignature(p,m,this.getSigningKey(d,l,g,h),this.createCanonicalRequest(f,w,await Ce(e,this.sha256))),f}async sign(e,r){return typeof e=="string"?this.signString(e,r):e.headers&&e.payload?this.signEvent(e,r):e.message?this.signMessage(e,r):this.signRequest(e,r)}async signEvent({headers:e,payload:r},{signingDate:s=new Date,priorSignature:n,signingRegion:i,signingService:o}){const a=i??await this.regionProvider(),{shortDate:u,longDate:c}=this.formatDate(s),h=Te(u,a,o??this.service),d=await Ce({headers:{},body:r},this.sha256),l=new this.sha256;l.update(e);const p=N(await l.digest()),g=[rn,c,h,n,p,d].join(`
|
|
17
|
+
`);return this.signString(g,{signingDate:s,signingRegion:a,signingService:o})}async signMessage(e,{signingDate:r=new Date,signingRegion:s,signingService:n}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:r,signingRegion:s,signingService:n,priorSignature:e.priorSignature}).then(i=>({message:e.message,signature:i}))}async signString(e,{signingDate:r=new Date,signingRegion:s,signingService:n}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=s??await this.regionProvider(),{shortDate:a}=this.formatDate(r),u=new this.sha256(await this.getSigningKey(i,o,a,n));return u.update(K(e)),N(await u.digest())}async signRequest(e,{signingDate:r=new Date,signableHeaders:s,unsignableHeaders:n,signingRegion:i,signingService:o}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const u=i??await this.regionProvider(),c=rt(e),{longDate:h,shortDate:d}=this.formatDate(r),l=Te(d,u,o??this.service);c.headers[_t]=h,a.sessionToken&&(c.headers[Qs]=a.sessionToken);const p=await Ce(c,this.sha256);!ln(Oe,c.headers)&&this.applyChecksum&&(c.headers[Oe]=p);const g=Xe(c,n,s),m=await this.getSignature(h,l,this.getSigningKey(a,u,d,o),this.createCanonicalRequest(c,g,p));return c.headers[jt]=`${ve} Credential=${a.accessKeyId}/${l}, SignedHeaders=${this.getCanonicalHeaderList(g)}, Signature=${m}`,c}async getSignature(e,r,s,n){const i=await this.createStringToSign(e,r,n,ve),o=new this.sha256(await s);return o.update(K(i)),N(await o.digest())}getSigningKey(e,r,s,n){return an(this.sha256,e,s,r,n||this.service)}}const fo=t=>{let e=t.credentials,r=!!t.credentials,s;Object.defineProperty(t,"credentials",{set(u){u&&u!==e&&u!==s&&(r=!0),e=u;const c=yn(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),h=wn(t,c);if(r&&!h.attributed){const d=typeof e=="object"&&e!==null;s=async l=>{const p=await h(l);return d&&(!p.$source||Object.keys(p.$source).length===0)?zs(p,"CREDENTIALS_CODE","e"):p},s.memoized=h.memoized,s.configBound=h.configBound,s.attributed=!0}else s=h},get(){return s},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:n=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=W(t.signer):t.regionInfoProvider?a=()=>W(t.region)().then(async u=>[await t.regionInfoProvider(u,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},u]).then(([u,c])=>{const{signingRegion:h,signingService:d}=u;t.signingRegion=t.signingRegion||h||c,t.signingName=t.signingName||d||t.serviceId;const l={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:n},p=t.signerConstructor||st;return new p(l)}):a=async u=>{u=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await W(t.region)(),properties:{}},u);const c=u.signingRegion,h=u.signingName;t.signingRegion=t.signingRegion||c,t.signingName=t.signingName||h||t.serviceId;const d={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:n},l=t.signerConstructor||st;return new l(d)},Object.assign(t,{systemClockOffset:i,signingEscapePath:n,signer:a})};function yn(t,{credentials:e,credentialDefaultProvider:r}){let s;return e?e?.memoized?s=e:s=as(e,os,Tt):r?s=W(r(Object.assign({},t,{parentClientConfig:t}))):s=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},s.memoized=!0,s}function wn(t,e){if(e.configBound)return e;const r=async s=>e({...s,callerClientConfig:t});return r.memoized=e.memoized,r.configBound=!0,r}const nt=typeof TextEncoder=="function"?new TextEncoder:null,go=t=>{if(typeof t=="string"){if(nt)return nt.encode(t).byteLength;let e=t.length;for(let r=e-1;r>=0;r--){const s=t.charCodeAt(r);s>127&&s<=2047?e++:s>2047&&s<=65535&&(e+=2),s>=56320&&s<=57343&&r--}return e}else{if(typeof t.byteLength=="number")return t.byteLength;if(typeof t.size=="number")return t.size}throw new Error(`Body Length computation failed for ${t}`)};class mo{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,r){const s=r.getMemberSchemas(),n=Object.values(s).find(i=>!!i.getMergedTraits().httpPayload);if(n)return n.getMergedTraits().mediaType||(n.isStringSchema()?"text/plain":n.isBlobSchema()?"application/octet-stream":e);if(!r.isUnitSchema()&&Object.values(s).find(i=>{const{httpQuery:o,httpQueryParams:a,httpHeader:u,httpLabel:c,httpPrefixHeaders:h}=i.getMergedTraits();return!o&&!a&&!u&&!c&&h===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,r,s,n,i,o){let a=r,u=e;e.includes("#")&&([a,u]=e.split("#"));const c={$metadata:i,$fault:s.statusCode<500?"client":"server"},h=$.for(a);try{return{errorSchema:o?.(h,u)??h.getSchema(e),errorMetadata:c}}catch{n.message=n.message??n.Message??"UnknownError";const d=$.for("smithy.ts.sdk.synthetic."+a),l=d.getBaseException();if(l){const p=d.getErrorCtor(l)??Error;throw this.decorateServiceException(Object.assign(new p({name:u}),c),n)}throw this.decorateServiceException(Object.assign(new Error(u),c),n)}}decorateServiceException(e,r={}){if(this.queryCompat){const s=e.Message??r.Message,n=Je(e,r);s&&(n.message=s),n.Error={...n.Error,Type:n.Error.Type,Code:n.Error.Code,Message:n.Error.message??n.Error.Message??s};const i=n.$metadata.requestId;return i&&(n.RequestId=i),n}return Je(e,r)}setQueryCompatError(e,r){const s=r.headers?.["x-amzn-query-error"];if(e!==void 0&&s!=null){const[n,i]=s.split(";"),o=Object.entries(e),a={Code:n,Type:i};Object.assign(e,a);for(const[u,c]of o)a[u==="message"?"Message":u]=c;delete a.__type,e.Error=a}}queryCompatOutput(e,r){e.Error&&(r.Error=e.Error),e.Type&&(r.Type=e.Type),e.Code&&(r.Code=e.Code)}findQueryCompatibleError(e,r){try{return e.getSchema(r)}catch{return e.find(s=>A.of(s).getMergedTraits().awsQueryError?.[0]===r)}}}class yo{serdeContext;setSerdeContext(e){this.serdeContext=e}}class wo{from;to;keys;constructor(e,r){this.from=e,this.to=r,this.keys=new Set(Object.keys(this.from).filter(s=>s!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,r=this.from[e];this.to.$unknown=[e,r]}}}const bn=/\d{12}\.ddb/;async function Sn(t,e,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&x(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const n=await e.retryStrategy();typeof n.acquireInitialRetryToken=="function"?n.constructor?.name?.includes("Adaptive")?x(t,"RETRY_MODE_ADAPTIVE","F"):x(t,"RETRY_MODE_STANDARD","E"):x(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const n=t.endpointV2;switch(String(n?.url?.hostname).match(bn)&&x(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":x(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":x(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":x(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const s=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(s?.$source){const n=s;n.accountId&&x(t,"RESOLVED_ACCOUNT_ID","T");for(const[i,o]of Object.entries(n.$source??{}))x(t,i,o)}}const it="user-agent",Re="x-amz-user-agent",ot=" ",Ae="/",vn=/[^!$%&'*+\-.^_`|~\w]/g,En=/[^!$%&'*+\-.^_`|~\w#]/g,at="-",Tn=1024;function Cn(t){let e="";for(const r in t){const s=t[r];if(e.length+s.length+1<=Tn){e.length?e+=","+s:e+=s;continue}break}return e}const Rn=t=>(e,r)=>async s=>{const{request:n}=s;if(!R.isInstance(n))return e(s);const{headers:i}=n,o=r?.userAgent?.map(re)||[],a=(await t.defaultUserAgentProvider()).map(re);await Sn(r,t,s);const u=r;a.push(`m/${Cn(Object.assign({},r.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const c=t?.customUserAgent?.map(re)||[],h=await t.userAgentAppId();h&&a.push(re(["app",`${h}`]));const d=[].concat([...a,...o,...c]).join(ot),l=[...a.filter(p=>p.startsWith("aws-sdk-")),...c].join(ot);return t.runtime!=="browser"?(l&&(i[Re]=i[Re]?`${i[it]} ${l}`:l),i[it]=d):i[Re]=d,e({...s,request:n})},re=t=>{const e=t[0].split(Ae).map(o=>o.replace(vn,at)).join(Ae),r=t[1]?.replace(En,at),s=e.indexOf(Ae),n=e.substring(0,s);let i=e.substring(s+1);return n==="api"&&(i=i.toLowerCase()),[n,i,r].filter(o=>o&&o.length>0).reduce((o,a,u)=>{switch(u){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},An={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},bo=t=>({applyToStack:e=>{e.add(Rn(t),An)}}),So=!1,vo=!1,ct=new Set,xn=(t,e=ee)=>{if(!ct.has(t)&&!e(t))if(t==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${t}" is not a valid hostname component.`);else ct.add(t)},qt=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),$n=t=>qt(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,Eo=t=>{const{region:e,useFipsEndpoint:r}=t;if(!e)throw new Error("Region is missing");return Object.assign(t,{region:async()=>{const s=typeof e=="function"?await e():e,n=$n(s);return xn(n),n},useFipsEndpoint:async()=>{const s=typeof e=="string"?e:await e();return qt(s)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},ut="content-length";function Pn(t){return e=>async r=>{const s=r.request;if(R.isInstance(s)){const{body:n,headers:i}=s;if(n&&Object.keys(i).map(o=>o.toLowerCase()).indexOf(ut)===-1)try{const o=t(n);s.headers={...s.headers,[ut]:String(o)}}catch{}}return e({...r,request:s})}}const kn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},To=t=>({applyToStack:e=>{e.add(Pn(t.bodyLengthChecker),kn)}}),On=async t=>{const e=t?.Bucket||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Un(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Nn(e)||e.indexOf(".")!==-1&&!String(t.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(t.ForcePathStyle=!0);return t.DisableMultiRegionAccessPoints&&(t.disableMultiRegionAccessPoints=!0,t.DisableMRAP=!0),t},In=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Mn=/(\d+\.){3}\d+/,Dn=/\.\./,Nn=t=>In.test(t)&&!Mn.test(t)&&!Dn.test(t),Un=t=>{const[e,r,s,,,n]=t.split(":"),i=e==="arn"&&t.split(":").length>=6,o=!!(i&&r&&s&&n);if(i&&!o)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return o},Ln=(t,e,r,s=!1)=>{const n=async()=>{let i;return s?i=r.clientContextParams?.[t]??r[t]??r[e]:i=r[t]??r[e],typeof i=="function"?i():i};return t==="credentialScope"||e==="CredentialScope"?async()=>{const i=typeof r.credentials=="function"?await r.credentials():r.credentials;return i?.credentialScope??i?.CredentialScope}:t==="accountId"||e==="AccountId"?async()=>{const i=typeof r.credentials=="function"?await r.credentials():r.credentials;return i?.accountId??i?.AccountId}:t==="endpoint"||e==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const i=await n();if(i&&typeof i=="object"){if("url"in i)return i.url.href;if("hostname"in i){const{protocol:o,hostname:a,port:u,path:c}=i;return`${o}//${a}${u?":"+u:""}${c}`}}return i}:n},zt=async t=>{},Ft=t=>typeof t=="object"?"url"in t?ke(t.url):t:ke(t),jn=async(t,e,r,s)=>{if(!r.isCustomEndpoint){let i;r.serviceConfiguredEndpoint?i=await r.serviceConfiguredEndpoint():i=await zt(r.serviceId),i&&(r.endpoint=()=>Promise.resolve(Ft(i)),r.isCustomEndpoint=!0)}const n=await _n(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(n,s)},_n=async(t,e,r)=>{const s={},n=e?.getEndpointParameterInstructions?.()||{};for(const[i,o]of Object.entries(n))switch(o.type){case"staticContextParams":s[i]=o.value;break;case"contextParams":s[i]=t[o.name];break;case"clientContextParams":case"builtInParams":s[i]=await Ln(o.name,i,r,o.type!=="builtInParams")();break;case"operationContextParams":s[i]=o.get(t);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return Object.keys(n).length===0&&Object.assign(s,r),String(r.serviceId).toLowerCase()==="s3"&&await On(s),s},Hn=({config:t,instructions:e})=>(r,s)=>async n=>{t.isCustomEndpoint&&ss(s,"ENDPOINT_OVERRIDE","N");const i=await jn(n.input,{getEndpointParameterInstructions(){return e}},{...t},s);s.endpointV2=i,s.authSchemes=i.properties?.authSchemes;const o=s.authSchemes?.[0];if(o){s.signing_region=o.signingRegion,s.signing_service=o.signingName;const a=X(s)?.selectedHttpAuthScheme?.httpAuthOption;a&&(a.signingProperties=Object.assign(a.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return r({...n})},qn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Qr.name},Co=(t,e)=>({applyToStack:r=>{r.addRelativeTo(Hn({config:t,instructions:e}),qn)}}),Ro=t=>{const e=t.tls??!0,{endpoint:r,useDualstackEndpoint:s,useFipsEndpoint:n}=t,i=r!=null?async()=>Ft(await U(r)()):void 0,o=Object.assign(t,{endpoint:i,tls:e,isCustomEndpoint:!!r,useDualstackEndpoint:U(s??!1),useFipsEndpoint:U(n??!1)});let a;return o.serviceConfiguredEndpoint=async()=>(t.serviceId&&!a&&(a=zt(t.serviceId)),a),o};var H;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(H||(H={}));const Ie=3,Ao=H.STANDARD,zn=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Fn=["TimeoutError","RequestTimeout","RequestTimeoutException"],Bn=[500,502,503,504],Wn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Vn=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Gn=t=>t?.$retryable!==void 0,Jn=t=>t.$metadata?.clockSkewCorrected,Kn=t=>{const e=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return t&&t instanceof TypeError?e.has(t.message):!1},Bt=t=>t.$metadata?.httpStatusCode===429||zn.includes(t.name)||t.$retryable?.throttling==!0,_e=(t,e=0)=>Gn(t)||Jn(t)||Fn.includes(t.name)||Wn.includes(t?.code||"")||Vn.includes(t?.code||"")||Bn.includes(t.$metadata?.httpStatusCode||0)||Kn(t)||t.cause!==void 0&&e<=10&&_e(t.cause,e+1),Yn=t=>{if(t.$metadata?.httpStatusCode!==void 0){const e=t.$metadata.httpStatusCode;return 500<=e&&e<=599&&!_e(t)}return!1};class He{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const r=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(s=>He.setTimeoutFn(s,r))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}const r=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+r),this.lastTimestamp=e}updateClientSendingRate(e){let r;if(this.updateMeasuredRate(),Bt(e)){const n=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=n,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(n),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const s=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(s)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),r=Math.floor(e*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const s=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(s*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(e){return parseFloat(e.toFixed(8))}}const Me=100,Wt=20*1e3,Zn=500,dt=500,Qn=5,Xn=10,ei=1,ti="amz-sdk-invocation-id",ri="amz-sdk-request",si=()=>{let t=Me;return{computeNextBackoffDelay:e=>Math.floor(Math.min(Wt,Math.random()*2**e*t)),setDelayBase:e=>{t=e}}},lt=({retryDelay:t,retryCount:e,retryCost:r})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(Wt,t),getRetryCost:()=>r});class Vt{maxAttempts;mode=H.STANDARD;capacity=dt;retryBackoffStrategy=si();maxAttemptsProvider;constructor(e){this.maxAttempts=e,this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return lt({retryDelay:Me,retryCount:0})}async refreshRetryTokenForRetry(e,r){const s=await this.getMaxAttempts();if(this.shouldRetry(e,r,s)){const n=r.errorType;this.retryBackoffStrategy.setDelayBase(n==="THROTTLING"?Zn:Me);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),o=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,i):i,a=this.getCapacityCost(n);return this.capacity-=a,lt({retryDelay:o,retryCount:e.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(dt,this.capacity+(e.getRetryCost()??ei))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Ie}`),Ie}}shouldRetry(e,r,s){return e.getRetryCount()+1<s&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(e){return e==="TRANSIENT"?Xn:Qn}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class ni{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=H.ADAPTIVE;constructor(e,r){this.maxAttemptsProvider=e;const{rateLimiter:s}=r??{};this.rateLimiter=s??new He,this.standardRetryStrategy=new Vt(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(e,r)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const ii=t=>t instanceof Error?t:t instanceof Object?Object.assign(new Error,t):typeof t=="string"?new Error(t):new Error(`AWS SDK error wrapper for ${t}`),xo=t=>{const{retryStrategy:e,retryMode:r,maxAttempts:s}=t,n=U(s??Ie);return Object.assign(t,{maxAttempts:n,retryStrategy:async()=>e||(await U(r)()===H.ADAPTIVE?new ni(n):new Vt(n))})},oi=t=>t?.body instanceof ReadableStream,ai=t=>(e,r)=>async s=>{let n=await t.retryStrategy();const i=await t.maxAttempts();if(ci(n)){n=n;let o=await n.acquireInitialRetryToken(r.partition_id),a=new Error,u=0,c=0;const{request:h}=s,d=R.isInstance(h);for(d&&(h.headers[ti]=_r());;)try{d&&(h.headers[ri]=`attempt=${u+1}; max=${i}`);const{response:l,output:p}=await e(s);return n.recordSuccess(o),p.$metadata.attempts=u+1,p.$metadata.totalRetryDelay=c,{response:l,output:p}}catch(l){const p=ui(l);if(a=ii(l),d&&oi(h))throw(r.logger instanceof Gr?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{o=await n.refreshRetryTokenForRetry(o,p)}catch{throw a.$metadata||(a.$metadata={}),a.$metadata.attempts=u+1,a.$metadata.totalRetryDelay=c,a}u=o.getRetryCount();const g=o.getRetryDelay();c+=g,await new Promise(m=>setTimeout(m,g))}}else return n=n,n?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",n.mode]]),n.retry(e,s)},ci=t=>typeof t.acquireInitialRetryToken<"u"&&typeof t.refreshRetryTokenForRetry<"u"&&typeof t.recordSuccess<"u",ui=t=>{const e={error:t,errorType:di(t)},r=hi(t.$response);return r&&(e.retryAfterHint=r),e},di=t=>Bt(t)?"THROTTLING":_e(t)?"TRANSIENT":Yn(t)?"SERVER_ERROR":"CLIENT_ERROR",li={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},$o=t=>({applyToStack:e=>{e.add(ai(t),li)}}),hi=t=>{if(!_.isInstance(t))return;const e=Object.keys(t.headers).find(n=>n.toLowerCase()==="retry-after");if(!e)return;const r=t.headers[e],s=Number(r);return Number.isNaN(s)?new Date(r):new Date(s*1e3)},pi=t=>new TextEncoder().encode(t);var fi=typeof pe<"u"&&pe.from?function(t){return pe.from(t,"utf8")}:pi;function Q(t){return t instanceof Uint8Array?t:typeof t=="string"?fi(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function De(t){return typeof t=="string"?t.length===0:t.byteLength===0}var Gt={name:"SHA-256"},ht={name:"HMAC",hash:Gt},gi=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const mi={};function ne(){return typeof window<"u"?window:typeof self<"u"?self:mi}var yi=(function(){function t(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return t.prototype.update=function(e){if(!De(e)){var r=Q(e),s=new Uint8Array(this.toHash.byteLength+r.byteLength);s.set(this.toHash,0),s.set(r,this.toHash.byteLength),this.toHash=s}},t.prototype.digest=function(){var e=this;return this.key?this.key.then(function(r){return ne().crypto.subtle.sign(ht,r,e.toHash).then(function(s){return new Uint8Array(s)})}):De(this.toHash)?Promise.resolve(gi):Promise.resolve().then(function(){return ne().crypto.subtle.digest(Gt,e.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},t.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,s){ne().crypto.subtle.importKey("raw",Q(e.secret),ht,!1,["sign"]).then(r,s)}),this.key.catch(function(){}))},t})();function wi(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(h){try{c(s.next(h))}catch(d){o(d)}}function u(h){try{c(s.throw(h))}catch(d){o(d)}}function c(h){h.done?i(h.value):n(h.value).then(a,u)}c((s=s.apply(t,[])).next())})}function bi(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,n,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(h){return u([c,h])}}function u(c){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(s=1,n&&(i=c[0]&2?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1],i=c;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(c);break}i[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(h){c=[6,h],n=0}finally{s=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Po(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],s=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var C=64,Si=32,vi=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ei=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Ti=Math.pow(2,53)-1,ie=(function(){function t(){this.state=Int32Array.from(Ei),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return t.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,s=e.byteLength;if(this.bytesHashed+=s,this.bytesHashed*8>Ti)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;s>0;)this.buffer[this.bufferLength++]=e[r++],s--,this.bufferLength===C&&(this.hashBuffer(),this.bufferLength=0)},t.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),s=this.bufferLength;if(r.setUint8(this.bufferLength++,128),s%C>=C-8){for(var n=this.bufferLength;n<C;n++)r.setUint8(n,0);this.hashBuffer(),this.bufferLength=0}for(var n=this.bufferLength;n<C-8;n++)r.setUint8(n,0);r.setUint32(C-8,Math.floor(e/4294967296),!0),r.setUint32(C-4,e),this.hashBuffer(),this.finished=!0}for(var i=new Uint8Array(Si),n=0;n<8;n++)i[n*4]=this.state[n]>>>24&255,i[n*4+1]=this.state[n]>>>16&255,i[n*4+2]=this.state[n]>>>8&255,i[n*4+3]=this.state[n]>>>0&255;return i},t.prototype.hashBuffer=function(){for(var e=this,r=e.buffer,s=e.state,n=s[0],i=s[1],o=s[2],a=s[3],u=s[4],c=s[5],h=s[6],d=s[7],l=0;l<C;l++){if(l<16)this.temp[l]=(r[l*4]&255)<<24|(r[l*4+1]&255)<<16|(r[l*4+2]&255)<<8|r[l*4+3]&255;else{var p=this.temp[l-2],g=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10;p=this.temp[l-15];var m=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[l]=(g+this.temp[l-7]|0)+(m+this.temp[l-16]|0)}var f=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&c^~u&h)|0)+(d+(vi[l]+this.temp[l]|0)|0)|0,w=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&o^i&o)|0;d=h,h=c,c=u,u=a+f|0,a=o,o=i,i=n,n=f+w|0}s[0]+=n,s[1]+=i,s[2]+=o,s[3]+=a,s[4]+=u,s[5]+=c,s[6]+=h,s[7]+=d},t})(),Ci=(function(){function t(e){this.secret=e,this.hash=new ie,this.reset()}return t.prototype.update=function(e){if(!(De(e)||this.error))try{this.hash.update(Q(e))}catch(r){this.error=r}},t.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},t.prototype.digest=function(){return wi(this,void 0,void 0,function(){return bi(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new ie,this.secret){this.outer=new ie;var e=Ri(this.secret),r=new Uint8Array(C);r.set(e);for(var s=0;s<C;s++)e[s]^=54,r[s]^=92;this.hash.update(e),this.outer.update(r);for(var s=0;s<e.byteLength;s++)e[s]=0}},t})();function Ri(t){var e=Q(t);if(e.byteLength>C){var r=new ie;r.update(e),e=r.digest()}var s=new Uint8Array(C);return s.set(e),s}var Ai=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function xi(t){if($i(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return Pi(e)}return!1}function $i(t){if(typeof t=="object"&&typeof t.crypto=="object"){var e=t.crypto.getRandomValues;return typeof e=="function"}return!1}function Pi(t){return t&&Ai.every(function(e){return typeof t[e]=="function"})}var ko=(function(){function t(e){xi(ne())?this.hash=new yi(e):this.hash=new Ci(e)}return t.prototype.update=function(e,r){this.hash.update(Q(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t})();const Oo=({serviceId:t,clientVersion:e})=>async r=>{const s=typeof window<"u"?window.navigator:void 0,n=s?.userAgent??"",i=s?.userAgentData?.platform??pt.os(n)??"other",o=void 0,a=s?.userAgentData?.brands??[],u=a[a.length-1],c=u?.brand??pt.browser(n)??"unknown",h=u?.version??"unknown",d=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${c}_${h}`]];t&&d.push([`api/${t}`,e]);const l=await r?.userAgentAppId?.();return l&&d.push([`app/${l}`]),d},pt={os(t){if(/iPhone|iPad|iPod/.test(t))return"iOS";if(/Macintosh|Mac OS X/.test(t))return"macOS";if(/Windows NT/.test(t))return"Windows";if(/Android/.test(t))return"Android";if(/Linux/.test(t))return"Linux"},browser(t){if(/EdgiOS|EdgA|Edg\//.test(t))return"Microsoft Edge";if(/Firefox\//.test(t))return"Firefox";if(/Chrome\//.test(t))return"Chrome";if(/Safari\//.test(t))return"Safari"}},Io=t=>()=>Promise.reject(t),ki=["in-region","cross-region","mobile","standard","legacy"],Mo=({defaultsMode:t}={})=>Yt(async()=>{const e=typeof t=="function"?await t():t;switch(e?.toLowerCase()){case"auto":return Promise.resolve(Oi()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(e?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${ki.join(", ")}, got ${e}`)}}),Oi=()=>{const t=window?.navigator;if(t?.connection){const{effectiveType:e,rtt:r,downlink:s}=t?.connection;if(typeof e=="string"&&e!=="4g"||Number(r)>100||Number(s)<10)return!0}return t?.userAgentData?.mobile||typeof t?.maxTouchPoints=="number"&&t?.maxTouchPoints>1},Jt=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!Jt(r))return!1;return!0}return!(!ee(t)||t.length<3||t.length>63||t!==t.toLowerCase()||Ue(t))},ft=":",Ii="/",Mi=t=>{const e=t.split(ft);if(e.length<6)return null;const[r,s,n,i,o,...a]=e;if(r!=="arn"||s===""||n===""||a.join(ft)==="")return null;const u=a.map(c=>c.split(Ii)).flat();return{partition:s,service:n,region:i,accountId:o,resourceId:u}},Di=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{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-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],Ni={partitions:Di};let Ui=Ni;const Li=t=>{const{partitions:e}=Ui;for(const s of e){const{regions:n,outputs:i}=s;for(const[o,a]of Object.entries(n))if(o===t)return{...i,...a}}for(const s of e){const{regionRegex:n,outputs:i}=s;if(new RegExp(n).test(t))return{...i}}const r=e.find(s=>s.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},ji={isVirtualHostableS3Bucket:Jt,parseArn:Mi,partition:Li};ue.aws=ji;const Do=t=>({setRegion(e){t.region=e},region(){return t.region}}),No=t=>({region:t.region()});export{Oo as $,Ao as A,Fi as B,xo as C,rs as D,To as E,qr as F,R as G,qi as H,ko as I,x as J,_ as K,mo as L,Mo as M,N,Io as O,Ie as P,eo as Q,Ro as R,gt as S,Co as T,U,Ki as V,Gr as W,J as X,A as Y,to as Z,$ as _,uo as a,Bs as a0,Dt as a1,ho as a2,Q as a3,Xi as a4,W as a5,X as a6,_n as a7,cn as a8,K as a9,st as aa,Zi as ab,z as ac,Wi as ad,yo as ae,Hr as af,xi as ag,ne as ah,De as ai,wi as aj,bi as ak,Qi as al,Gi as am,Et as an,_r as ao,wo as ap,L as aq,Po as ar,cr as as,ji as at,ue as au,F as av,ge as aw,Yi as ax,Ji as ay,Eo as b,sr as c,ke as d,ro as e,lo as f,nr as g,yt as h,ao as i,go as j,vo as k,po as l,fo as m,oo as n,co as o,Do as p,Vi as q,no as r,io as s,so as t,No as u,$o as v,So as w,zi as x,bo as y,Bi as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as S,T as w,z as Kt,a as Xt,C as Zt,b as Yt,R as _t,q as es,y as ts,v as ss,E as rs,n as os,i as ns,o as is,e as as,t as cs,av as ps,M as ds,c as Ct,X as us,d as ls,W as ms,l as fs,f as hs,g as te,h as $t,B as Es,I as xs,A as gs,S as ys,O as bs,P as Ps,$ as vs,j as Cs,k as $s,w as As,m as Ss,U as At,p as ws,Q as Us,H as Rs,u as Is,Z as Os,x as Ts,a2 as Fs,a4 as Ms,s as Ns,L as ks,aw as Ds,Y as N,_ as c,ab as js,G as Ws,ad as se,ae as re,al as St,am as qs,an as F,ao as zs,aq as wt,ap as Ls,ax as Bs,V as Vs,ay as Gs,at as Hs,au as Js,a6 as Qs,r as Ks}from"./index-DRgW1--O-Be3NpfgF.js";import"./preload-helper-BlTxHScW.js";import"./index-6mKfgpcs-DsgiI2lM.js";class Xs extends js{async serializeRequest(e,s,o){const n=this.serializer,m={},i={},h=await o.endpoint(),f=N.of(e?.input),g=f.getSchema();let x;const b=new Ws({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:m,headers:i,body:void 0});h&&(this.updateServiceEndpoint(b,h),this.setHostPrefix(b,e,s));const y={...s};if(s){const v=f.getEventStreamMember();if(v){if(y[v]){const C={};for(const[V,Qt]of f.structIterator())V!==v&&y[V]&&(n.write(Qt,y[V]),C[V]=n.flush());x=await this.serializeEventStream({eventStream:y[v],requestSchema:f,initialRequest:C})}}else n.write(g,y),x=n.flush()}return b.headers=i,b.query=m,b.body=x,b.method="POST",b}async deserializeResponse(e,s,o){const n=this.deserializer,m=N.of(e.output),i={};if(o.statusCode>=300){const f=await se(o.body,s);throw f.byteLength>0&&Object.assign(i,await n.read(15,f)),await this.handleError(e,s,o,i,this.deserializeMetadata(o)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const f in o.headers){const g=o.headers[f];delete o.headers[f],o.headers[f.toLowerCase()]=g}const h=m.getEventStreamMember();if(h)i[h]=await this.deserializeEventStream({response:o,responseSchema:m,initialResponseContainer:i});else{const f=await se(o.body,s);f.byteLength>0&&Object.assign(i,await n.read(m,f))}return i.$metadata=this.deserializeMetadata(o),i}}class Zs{async sign(e,s,o){return e}}function Ys(r,e,s){if(s?.source){const o=s.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||o!==String(e)))return o.includes(".")?new F(o,"bigDecimal"):BigInt(o)}return e}const _s=(r,e)=>se(r,e).then(s=>(e?.utf8Encoder??Ct)(s)),er=(r,e)=>_s(r,e).then(s=>{if(s.length)try{return JSON.parse(s)}catch(o){throw o?.name==="SyntaxError"&&Object.defineProperty(o,"$responseBodyText",{value:s}),o}return{}}),tr=(r,e)=>{const s=(m,i)=>Object.keys(m).find(h=>h.toLowerCase()===i.toLowerCase()),o=m=>{let i=m;return typeof i=="number"&&(i=i.toString()),i.indexOf(",")>=0&&(i=i.split(",")[0]),i.indexOf(":")>=0&&(i=i.split(":")[0]),i.indexOf("#")>=0&&(i=i.split("#")[1]),i},n=s(r.headers,"x-amzn-errortype");if(n!==void 0)return o(r.headers[n]);if(e&&typeof e=="object"){const m=s(e,"code");if(m&&e[m]!==void 0)return o(e[m]);if(e.__type!==void 0)return o(e.__type)}};class sr extends re{settings;constructor(e){super(),this.settings=e}async read(e,s){return this._read(e,typeof s=="string"?JSON.parse(s,Ys):await er(s,this.serdeContext))}readObject(e,s){return this._read(e,s)}_read(e,s){const o=s!==null&&typeof s=="object",n=N.of(e);if(o){if(n.isStructSchema()){const i=s,h=n.isUnionSchema(),f={};let g;const{jsonName:x}=this.settings;x&&(g={});let b;h&&(b=new Ls(i,f));for(const[y,v]of n.structIterator()){let C=y;x&&(C=v.getMergedTraits().jsonName??C,g[C]=y),h&&b.mark(C),i[C]!=null&&(f[y]=this._read(v,i[C]))}if(h)b.writeUnknown();else if(typeof i.__type=="string")for(const[y,v]of Object.entries(i)){const C=x?g[y]??y:y;C in f||(f[C]=v)}return f}if(Array.isArray(s)&&n.isListSchema()){const i=n.getValueSchema(),h=[],f=!!n.getMergedTraits().sparse;for(const g of s)(f||g!=null)&&h.push(this._read(i,g));return h}if(n.isMapSchema()){const i=n.getValueSchema(),h={},f=!!n.getMergedTraits().sparse;for(const[g,x]of Object.entries(s))(f||x!=null)&&(h[g]=this._read(i,x));return h}}if(n.isBlobSchema()&&typeof s=="string")return $t(s);const m=n.getMergedTraits().mediaType;if(n.isStringSchema()&&typeof s=="string"&&m)return m==="application/json"||m.endsWith("+json")?wt.from(s):s;if(n.isTimestampSchema()&&s!=null)switch(St(n,this.settings)){case 5:return Gs(s);case 6:return Vs(s);case 7:return Bs(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(n.isBigIntegerSchema()&&(typeof s=="number"||typeof s=="string"))return BigInt(s);if(n.isBigDecimalSchema()&&s!=null){if(s instanceof F)return s;const i=s;return i.type==="bigDecimal"&&"string"in i?new F(i.string,i.type):new F(String(s),"bigDecimal")}if(n.isNumericSchema()&&typeof s=="string"){switch(s){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return s}if(n.isDocumentSchema())if(o){const i=Array.isArray(s)?[]:{};for(const[h,f]of Object.entries(s))f instanceof F?i[h]=f:i[h]=this._read(n,f);return i}else return structuredClone(s);return s}}const lt="Ν";class rr{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,s)=>{if(s instanceof F){const o=`${lt+"nv"+this.counter++}_`+s.string;return this.values.set(`"${o}"`,s.string),o}if(typeof s=="bigint"){const o=s.toString(),n=`${lt+"b"+this.counter++}_`+o;return this.values.set(`"${n}"`,o),n}return s}}replaceInJson(e){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return e;for(const[s,o]of this.values)e=e.replace(s,o);return e}}class or extends re{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,s){this.rootSchema=N.of(e),this.buffer=this._write(this.rootSchema,s)}writeDiscriminatedDocument(e,s){this.write(e,s),typeof this.buffer=="object"&&(this.buffer.__type=N.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:s}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!s)return JSON.stringify(this.buffer);const o=new rr;return o.replaceInJson(JSON.stringify(this.buffer,o.createReplacer(),0))}return this.buffer}_write(e,s,o){const n=s!==null&&typeof s=="object",m=N.of(e);if(n){if(m.isStructSchema()){const i=s,h={},{jsonName:f}=this.settings;let g;f&&(g={});for(const[x,b]of m.structIterator()){const y=this._write(b,i[x],m);if(y!==void 0){let v=x;f&&(v=b.getMergedTraits().jsonName??x,g[x]=v),h[v]=y}}if(m.isUnionSchema()&&Object.keys(h).length===0){const{$unknown:x}=i;if(Array.isArray(x)){const[b,y]=x;h[b]=this._write(15,y)}}else if(typeof i.__type=="string")for(const[x,b]of Object.entries(i)){const y=f?g[x]??x:x;y in h||(h[y]=this._write(15,b))}return h}if(Array.isArray(s)&&m.isListSchema()){const i=m.getValueSchema(),h=[],f=!!m.getMergedTraits().sparse;for(const g of s)(f||g!=null)&&h.push(this._write(i,g));return h}if(m.isMapSchema()){const i=m.getValueSchema(),h={},f=!!m.getMergedTraits().sparse;for(const[g,x]of Object.entries(s))(f||x!=null)&&(h[g]=this._write(i,x));return h}if(s instanceof Uint8Array&&(m.isBlobSchema()||m.isDocumentSchema()))return m===this.rootSchema?s:(this.serdeContext?.base64Encoder??te)(s);if(s instanceof Date&&(m.isTimestampSchema()||m.isDocumentSchema()))switch(St(m,this.settings)){case 5:return s.toISOString().replace(".000Z","Z");case 6:return qs(s);case 7:return s.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",s),s.getTime()/1e3}s instanceof F&&(this.useReplacer=!0)}if(!(s===null&&o?.isStructSchema())){if(m.isStringSchema()){if(typeof s>"u"&&m.isIdempotencyToken())return zs();const i=m.getMergedTraits().mediaType;return s!=null&&i&&(i==="application/json"||i.endsWith("+json"))?wt.from(s):s}if(typeof s=="number"&&m.isNumericSchema())return Math.abs(s)===1/0||isNaN(s)?String(s):s;if(typeof s=="string"&&m.isBlobSchema())return m===this.rootSchema?s:(this.serdeContext?.base64Encoder??te)(s);if(typeof s=="bigint"&&(this.useReplacer=!0),m.isDocumentSchema())if(n){const i=Array.isArray(s)?[]:{};for(const[h,f]of Object.entries(s))f instanceof F?(this.useReplacer=!0,i[h]=f):i[h]=this._write(m,f);return i}else return structuredClone(s);return s}}}class nr extends re{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new or(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new sr(this.settings);return e.setSerdeContext(this.serdeContext),e}}class ir extends Xs{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:o,jsonCodec:n}){super({defaultNamespace:e}),this.serviceTarget=s,this.codec=n??new nr({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!o,this.mixin=new ks(this.awsQueryCompatible)}async serializeRequest(e,s,o){const n=await super.serializeRequest(e,s,o);return n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(n.headers["x-amzn-query-mode"]="true"),(Ds(e.input)==="unit"||!n.body)&&(n.body="{}"),n}getPayloadCodec(){return this.codec}async handleError(e,s,o,n,m){this.awsQueryCompatible&&this.mixin.setQueryCompatError(n,o);const i=tr(o,n)??"Unknown",{errorSchema:h,errorMetadata:f}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,o,n,m,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),g=N.of(h),x=n.message??n.Message??"Unknown",b=c.for(h[1]).getErrorCtor(h)??Error,y=new b(x),v={};for(const[C,V]of g.structIterator())n[C]!=null&&(v[C]=this.codec.createDeserializer().readObject(V,n[C]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(n,v),this.mixin.decorateServiceException(Object.assign(y,f,{$fault:g.getMergedTraits().error,message:x},v),n)}}class ar extends ir{constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:o,jsonCodec:n}){super({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:o,jsonCodec:n})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const cr=async(r,e,s)=>({operation:Qs(e).operation,region:await At(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function pr(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:r.region},propertiesExtractor:(e,s)=>({signingProperties:{config:e,context:s}})}}function E(r){return{schemeId:"smithy.api#noAuth"}}const dr=r=>{const e=[];switch(r.operation){case"AssociateSoftwareToken":{e.push(E());break}case"ChangePassword":{e.push(E());break}case"CompleteWebAuthnRegistration":{e.push(E());break}case"ConfirmDevice":{e.push(E());break}case"ConfirmForgotPassword":{e.push(E());break}case"ConfirmSignUp":{e.push(E());break}case"DeleteUser":{e.push(E());break}case"DeleteUserAttributes":{e.push(E());break}case"DeleteWebAuthnCredential":{e.push(E());break}case"ForgetDevice":{e.push(E());break}case"ForgotPassword":{e.push(E());break}case"GetDevice":{e.push(E());break}case"GetTokensFromRefreshToken":{e.push(E());break}case"GetUser":{e.push(E());break}case"GetUserAttributeVerificationCode":{e.push(E());break}case"GetUserAuthFactors":{e.push(E());break}case"GlobalSignOut":{e.push(E());break}case"InitiateAuth":{e.push(E());break}case"ListDevices":{e.push(E());break}case"ListWebAuthnCredentials":{e.push(E());break}case"ResendConfirmationCode":{e.push(E());break}case"RespondToAuthChallenge":{e.push(E());break}case"RevokeToken":{e.push(E());break}case"SetUserMFAPreference":{e.push(E());break}case"SetUserSettings":{e.push(E());break}case"SignUp":{e.push(E());break}case"StartWebAuthnRegistration":{e.push(E());break}case"UpdateAuthEventFeedback":{e.push(E());break}case"UpdateDeviceStatus":{e.push(E());break}case"UpdateUserAttributes":{e.push(E());break}case"VerifySoftwareToken":{e.push(E());break}case"VerifyUserAttribute":{e.push(E());break}default:e.push(pr(r))}return e},ur=r=>{const e=Ss(r);return Object.assign(e,{authSchemePreference:At(r.authSchemePreference??[])})},lr=r=>Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),U={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},mr="3.986.0",fr={version:mr},Ut="required",$="fn",A="argv",J="ref",mt=!0,ft="isSet",X="booleanEquals",G="error",O="endpoint",T="tree",oe="PartitionResult",ne="getAttr",Q="stringEquals",ht={[Ut]:!1,type:"string"},Et={[Ut]:!0,default:!1,type:"boolean"},xt={[J]:"Endpoint"},Rt={[$]:X,[A]:[{[J]:"UseFIPS"},!0]},It={[$]:X,[A]:[{[J]:"UseDualStack"},!0]},P={},K={[J]:"Region"},gt={[$]:ne,[A]:[{[J]:oe},"supportsFIPS"]},Ot={[J]:oe},yt={[$]:X,[A]:[!0,{[$]:ne,[A]:[Ot,"supportsDualStack"]}]},bt=[Rt],Pt=[It],vt=[K],hr={parameters:{Region:ht,UseDualStack:Et,UseFIPS:Et,Endpoint:ht},rules:[{conditions:[{[$]:ft,[A]:[xt]}],rules:[{conditions:bt,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:G},{conditions:Pt,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:G},{endpoint:{url:xt,properties:P,headers:P},type:O}],type:T},{conditions:[{[$]:ft,[A]:vt}],rules:[{conditions:[{[$]:"aws.partition",[A]:vt,assign:oe}],rules:[{conditions:[Rt,It],rules:[{conditions:[{[$]:X,[A]:[mt,gt]},yt],rules:[{conditions:[{[$]:Q,[A]:[K,"us-east-1"]}],endpoint:{url:"https://cognito-idp-fips.us-east-1.amazonaws.com",properties:P,headers:P},type:O},{conditions:[{[$]:Q,[A]:[K,"us-east-2"]}],endpoint:{url:"https://cognito-idp-fips.us-east-2.amazonaws.com",properties:P,headers:P},type:O},{conditions:[{[$]:Q,[A]:[K,"us-west-1"]}],endpoint:{url:"https://cognito-idp-fips.us-west-1.amazonaws.com",properties:P,headers:P},type:O},{conditions:[{[$]:Q,[A]:[K,"us-west-2"]}],endpoint:{url:"https://cognito-idp-fips.us-west-2.amazonaws.com",properties:P,headers:P},type:O},{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},type:O}],type:T},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:G}],type:T},{conditions:bt,rules:[{conditions:[{[$]:X,[A]:[gt,mt]}],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:P,headers:P},type:O}],type:T},{error:"FIPS is enabled but this partition does not support FIPS",type:G}],type:T},{conditions:Pt,rules:[{conditions:[yt],rules:[{conditions:[{[$]:Q,[A]:["aws",{[$]:ne,[A]:[Ot,"name"]}]}],endpoint:{url:"https://cognito-idp.{Region}.amazonaws.com",properties:P,headers:P},type:O},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:P,headers:P},type:O}],type:T},{error:"DualStack is enabled but this partition does not support DualStack",type:G}],type:T},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:P,headers:P},type:O}],type:T}],type:T},{error:"Invalid Configuration: Missing Region",type:G}]},Er=hr,xr=new hs({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),gr=(r,e={})=>xr.get(r,()=>Fs(Er,{endpointParams:r,logger:e.logger}));Js.aws=Hs;const yr=r=>({apiVersion:"2016-04-18",base64Decoder:r?.base64Decoder??$t,base64Encoder:r?.base64Encoder??te,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??gr,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??dr,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new fs},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Zs}],logger:r?.logger??new ms,protocol:r?.protocol??ar,protocolSettings:r?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",xmlNamespace:"http://cognito-idp.amazonaws.com/doc/2016-04-18/",version:"2016-04-18",serviceTarget:"AWSCognitoIdentityProviderService"},serviceId:r?.serviceId??"Cognito Identity Provider",urlParser:r?.urlParser??ls,utf8Decoder:r?.utf8Decoder??us,utf8Encoder:r?.utf8Encoder??Ct}),br=r=>{const e=ds(r),s=()=>e().then(Ms),o=yr(r);return{...o,...r,runtime:"browser",defaultsMode:e,bodyLengthChecker:r?.bodyLengthChecker??Cs,credentialDefaultProvider:r?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:r?.defaultUserAgentProvider??vs({serviceId:o.serviceId,clientVersion:fr.version}),maxAttempts:r?.maxAttempts??Ps,region:r?.region??bs("Region is missing"),requestHandler:ys.create(r?.requestHandler??s),retryMode:r?.retryMode??(async()=>(await s()).retryMode||gs),sha256:r?.sha256??xs,streamCollector:r?.streamCollector??Es,useDualstackEndpoint:r?.useDualstackEndpoint??(()=>Promise.resolve(As)),useFipsEndpoint:r?.useFipsEndpoint??(()=>Promise.resolve($s))}},Pr=r=>{const e=r.httpAuthSchemes;let s=r.httpAuthSchemeProvider,o=r.credentials;return{setHttpAuthScheme(n){const m=e.findIndex(i=>i.schemeId===n.schemeId);m===-1?e.push(n):e.splice(m,1,n)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){o=n},credentials(){return o}}},vr=r=>({httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}),Cr=(r,e)=>{const s=Object.assign(ws(r),Us(r),Rs(r),Pr(r));return e.forEach(o=>o.configure(s)),Object.assign(r,Is(s),Os(s),Ts(s),vr(s))};class Xa extends Kt{config;constructor(...[e]){const s=br(e||{});super(s),this.initConfig=s;const o=lr(s),n=Xt(o),m=Zt(n),i=Yt(m),h=Ns(i),f=_t(h),g=ur(f),x=Cr(g,e?.extensions||[]);this.config=x,this.middlewareStack.use(es(this.config)),this.middlewareStack.use(ts(this.config)),this.middlewareStack.use(ss(this.config)),this.middlewareStack.use(rs(this.config)),this.middlewareStack.use(os(this.config)),this.middlewareStack.use(ns(this.config)),this.middlewareStack.use(is(this.config)),this.middlewareStack.use(as(this.config,{httpAuthSchemeParametersProvider:cr,identityProviderConfigProvider:async b=>new Ks({"aws.auth#sigv4":b.credentials})})),this.middlewareStack.use(cs(this.config))}destroy(){super.destroy()}}class a extends ps{constructor(e){super(e),Object.setPrototypeOf(this,a.prototype)}}class ie extends a{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,ie.prototype)}}class ae extends a{name="InvalidParameterException";$fault="client";reasonCode;constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,ae.prototype),this.reasonCode=e.reasonCode}}class ce extends a{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,ce.prototype)}}class pe extends a{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,pe.prototype)}}class de extends a{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,de.prototype)}}class ue extends a{name="UserImportInProgressException";$fault="client";constructor(e){super({name:"UserImportInProgressException",$fault:"client",...e}),Object.setPrototypeOf(this,ue.prototype)}}class le extends a{name="UserNotFoundException";$fault="client";constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,le.prototype)}}class me extends a{name="InvalidLambdaResponseException";$fault="client";constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),Object.setPrototypeOf(this,me.prototype)}}class fe extends a{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,fe.prototype)}}class he extends a{name="TooManyFailedAttemptsException";$fault="client";constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),Object.setPrototypeOf(this,he.prototype)}}class Ee extends a{name="UnexpectedLambdaException";$fault="client";constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),Object.setPrototypeOf(this,Ee.prototype)}}class xe extends a{name="UserLambdaValidationException";$fault="client";constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,xe.prototype)}}class ge extends a{name="CodeDeliveryFailureException";$fault="client";constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),Object.setPrototypeOf(this,ge.prototype)}}class ye extends a{name="InvalidPasswordException";$fault="client";constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),Object.setPrototypeOf(this,ye.prototype)}}class be extends a{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,be.prototype)}}class Pe extends a{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),Object.setPrototypeOf(this,Pe.prototype)}}class ve extends a{name="PreconditionNotMetException";$fault="client";constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),Object.setPrototypeOf(this,ve.prototype)}}class Ce extends a{name="UnsupportedUserStateException";$fault="client";constructor(e){super({name:"UnsupportedUserStateException",$fault:"client",...e}),Object.setPrototypeOf(this,Ce.prototype)}}class $e extends a{name="UsernameExistsException";$fault="client";constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,$e.prototype)}}class Ae extends a{name="AliasExistsException";$fault="client";constructor(e){super({name:"AliasExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Ae.prototype)}}class Se extends a{name="InvalidUserPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,Se.prototype)}}class we extends a{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,we.prototype)}}class Ue extends a{name="MFAMethodNotFoundException";$fault="client";constructor(e){super({name:"MFAMethodNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Ue.prototype)}}class Re extends a{name="PasswordResetRequiredException";$fault="client";constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),Object.setPrototypeOf(this,Re.prototype)}}class Ie extends a{name="UnsupportedOperationException";$fault="client";constructor(e){super({name:"UnsupportedOperationException",$fault:"client",...e}),Object.setPrototypeOf(this,Ie.prototype)}}class Oe extends a{name="UserNotConfirmedException";$fault="client";constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),Object.setPrototypeOf(this,Oe.prototype)}}class Te extends a{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(e){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...e}),Object.setPrototypeOf(this,Te.prototype)}}class Fe extends a{name="CodeMismatchException";$fault="client";constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,Fe.prototype)}}class Me extends a{name="ExpiredCodeException";$fault="client";constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),Object.setPrototypeOf(this,Me.prototype)}}class Ne extends a{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(e){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...e}),Object.setPrototypeOf(this,Ne.prototype)}}class ke extends a{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(e){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,ke.prototype)}}class De extends a{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,De.prototype)}}class je extends a{name="ForbiddenException";$fault="client";constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),Object.setPrototypeOf(this,je.prototype)}}class We extends a{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(e){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,We.prototype)}}class qe extends a{name="WebAuthnClientMismatchException";$fault="client";constructor(e){super({name:"WebAuthnClientMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,qe.prototype)}}class ze extends a{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(e){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...e}),Object.setPrototypeOf(this,ze.prototype)}}class Le extends a{name="WebAuthnNotEnabledException";$fault="client";constructor(e){super({name:"WebAuthnNotEnabledException",$fault:"client",...e}),Object.setPrototypeOf(this,Le.prototype)}}class Be extends a{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(e){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...e}),Object.setPrototypeOf(this,Be.prototype)}}class Ve extends a{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(e){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,Ve.prototype)}}class Ge extends a{name="DeviceKeyExistsException";$fault="client";constructor(e){super({name:"DeviceKeyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Ge.prototype)}}class He extends a{name="GroupExistsException";$fault="client";constructor(e){super({name:"GroupExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,He.prototype)}}class Je extends a{name="DuplicateProviderException";$fault="client";constructor(e){super({name:"DuplicateProviderException",$fault:"client",...e}),Object.setPrototypeOf(this,Je.prototype)}}class Qe extends a{name="ManagedLoginBrandingExistsException";$fault="client";constructor(e){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Qe.prototype)}}class Ke extends a{name="TermsExistsException";$fault="client";constructor(e){super({name:"TermsExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Ke.prototype)}}class Xe extends a{name="FeatureUnavailableInTierException";$fault="client";constructor(e){super({name:"FeatureUnavailableInTierException",$fault:"client",...e}),Object.setPrototypeOf(this,Xe.prototype)}}class Ze extends a{name="TierChangeNotAllowedException";$fault="client";constructor(e){super({name:"TierChangeNotAllowedException",$fault:"client",...e}),Object.setPrototypeOf(this,Ze.prototype)}}class Ye extends a{name="UserPoolTaggingException";$fault="client";constructor(e){super({name:"UserPoolTaggingException",$fault:"client",...e}),Object.setPrototypeOf(this,Ye.prototype)}}class _e extends a{name="InvalidOAuthFlowException";$fault="client";constructor(e){super({name:"InvalidOAuthFlowException",$fault:"client",...e}),Object.setPrototypeOf(this,_e.prototype)}}class et extends a{name="ScopeDoesNotExistException";$fault="client";constructor(e){super({name:"ScopeDoesNotExistException",$fault:"client",...e}),Object.setPrototypeOf(this,et.prototype)}}class tt extends a{name="UnsupportedIdentityProviderException";$fault="client";constructor(e){super({name:"UnsupportedIdentityProviderException",$fault:"client",...e}),Object.setPrototypeOf(this,tt.prototype)}}class st extends a{name="RefreshTokenReuseException";$fault="client";constructor(e){super({name:"RefreshTokenReuseException",$fault:"client",...e}),Object.setPrototypeOf(this,st.prototype)}}class rt extends a{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,rt.prototype)}}class ot extends a{name="UnsupportedTokenTypeException";$fault="client";constructor(e){super({name:"UnsupportedTokenTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,ot.prototype)}}class nt extends a{name="WebAuthnConfigurationMissingException";$fault="client";constructor(e){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...e}),Object.setPrototypeOf(this,nt.prototype)}}class it extends a{name="EnableSoftwareTokenMFAException";$fault="client";constructor(e){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...e}),Object.setPrototypeOf(this,it.prototype)}}const $r="AvailableChallenges",Ar="AdminCreateUser",Sr="AdminCreateUserRequest",wr="AdminCreateUserResponse",Ur="AdminDeleteUser",Rr="AdminDeleteUserRequest",Ir="AdminDisableUserRequest",Or="AdminDisableUserResponse",Tr="AdminDisableUser",Fr="AliasExistsException",Mr="AnalyticsEndpointId",Nr="AdminEnableUser",kr="AdminEnableUserRequest",Dr="AdminEnableUserResponse",jr="AuthFlow",Wr="AdminGetUser",qr="AdminGetUserRequest",zr="AdminGetUserResponse",Lr="AttributeListType",k="AnalyticsMetadata",Br="AnalyticsMetadataType",Tt="AttributeName",Vr="AuthParameters",Gr="AuthParametersType",Ft="AuthenticationResult",Hr="AuthenticationResultType",Jr="AccessToken",Qr="AttributeType",Kr="AttributeValueType",Xr="Attributes",Mt="ConfirmationCode",at="CodeDeliveryDetails",Zr="CodeDeliveryDetailsType",Yr="CodeDeliveryFailureException",_r="ConfirmForgotPassword",eo="ConfirmForgotPasswordRequest",to="ConfirmForgotPasswordResponse",D="ClientId",so="ClientIdType",M="ClientMetadata",ro="CodeMismatchException",oo="ConcurrentModificationException",ct="ChallengeName",Nt="ChallengeParameters",no="ChallengeResponses",io="ChallengeResponsesType",ao="ConfirmSignUp",co="ConfirmSignUpRequest",po="ConfirmSignUpResponse",uo="DesiredDeliveryMediums",lo="DeviceGroupKey",mo="DeviceKey",fo="DeviceKeyExistsException",kt="DeliveryMedium",ho="DuplicateProviderException",Eo="Destination",Dt="Enabled",xo="ExpiredCodeException",go="EncodedData",yo="ExpiresIn",bo="EnableSoftwareTokenMFAException",jt="ForceAliasCreation",Po="ForbiddenException",vo="ForgotPassword",Co="ForgotPasswordRequest",$o="ForgotPasswordResponse",Ao="FeatureUnavailableInTierException",So="GroupExistsException",wo="IpAddress",Uo="InitiateAuthRequest",Ro="InitiateAuthResponse",Io="InitiateAuth",Oo="InternalErrorException",To="InvalidEmailRoleAccessPolicyException",Fo="InvalidLambdaResponseException",Mo="InvalidOAuthFlowException",No="InvalidParameterException",ko="InvalidPasswordException",Do="InvalidSmsRoleAccessPolicyException",jo="InvalidSmsRoleTrustRelationshipException",Wo="IdToken",qo="InvalidUserPoolConfigurationException",zo="LimitExceededException",Lo="MessageAction",Bo="MFAMethodNotFoundException",Wt="MFAOptions",Vo="MFAOptionListType",Go="MFAOptionType",Ho="ManagedLoginBrandingExistsException",Jo="NotAuthorizedException",Qo="NewDeviceMetadata",Ko="NewDeviceMetadataType",Xo="Name",qt="Password",Zo="PasswordHistoryPolicyViolationException",Yo="PreferredMfaSetting",_o="PreconditionNotMetException",en="PasswordResetRequiredException",tn="PasswordType",sn="ResendConfirmationCode",rn="ResendConfirmationCodeRequest",on="ResendConfirmationCodeResponse",nn="ResourceNotFoundException",an="RefreshToken",cn="RespondToAuthChallenge",pn="RespondToAuthChallengeRequest",dn="RespondToAuthChallengeResponse",un="RefreshTokenReuseException",j="Session",ln="ScopeDoesNotExistException",Z="SecretHash",mn="SecretHashType",fn="SessionType",hn="SoftwareTokenMFANotFoundException",En="SignUpRequest",xn="SignUpResponse",gn="SignUp",yn="TierChangeNotAllowedException",bn="TermsExistsException",Pn="TooManyFailedAttemptsException",vn="TooManyRequestsException",Cn="TokenModelType",$n="TemporaryPassword",An="TokenType",R="Username",pt="UserAttributes",zt="UserCreateDate",Sn="UserContextDataType",W="UserContextData",wn="UserConfirmed",Un="UnauthorizedException",Rn="UsernameExistsException",In="UserImportInProgressException",On="UnsupportedIdentityProviderException",Tn="UnexpectedLambdaException",Lt="UserLastModifiedDate",Fn="UserLambdaValidationException",Mn="UserMFASettingList",Nn="UserNotConfirmedException",kn="UserNotFoundException",Dn="UnsupportedOperationException",jn="UserPoolAddOnNotEnabledException",Y="UserPoolId",Wn="UserPoolTaggingException",Bt="UserStatus",qn="UserSub",zn="UsernameType",Ln="UnsupportedTokenTypeException",Bn="UserType",Vn="UnsupportedUserStateException",Gn="User",Hn="Value",Vt="ValidationData",Jn="WebAuthnClientMismatchException",Qn="WebAuthnConfigurationMissingException",Kn="WebAuthnChallengeNotFoundException",Xn="WebAuthnCredentialNotSupportedException",Zn="WebAuthnNotEnabledException",Yn="WebAuthnOriginNotAllowedException",_n="WebAuthnRelyingPartyMismatchException",u="client",p="error",l="httpError",d="message",ei="reasonCode",ti="server",Gt="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",t="com.amazonaws.cognitoidentityprovider";var si=[0,t,Kr,8,0],q=[0,t,so,8,0],dt=[0,t,tn,8,0],_=[0,t,mn,8,0],z=[0,t,fn,8,0],ee=[0,t,Cn,8,0],I=[0,t,zn,8,0],ri=[3,t,Sr,0,[Y,R,pt,Vt,$n,jt,Lo,uo,M],[0,[()=>I,0],[()=>H,0],[()=>H,0],[()=>dt,0],2,0,64,128],2],oi=[3,t,wr,0,[Gn],[[()=>Ca,0]]],ni=[3,t,Rr,0,[Y,R],[0,[()=>I,0]],2],ii=[3,t,Ir,0,[Y,R],[0,[()=>I,0]],2],ai=[3,t,Or,0,[],[]],ci=[3,t,kr,0,[Y,R],[0,[()=>I,0]],2],pi=[3,t,Dr,0,[],[]],di=[3,t,qr,0,[Y,R],[0,[()=>I,0]],2],ui=[3,t,zr,0,[R,pt,zt,Lt,Dt,Bt,Wt,Yo,Mn],[[()=>I,0],[()=>H,0],4,4,2,0,()=>Jt,0,64],1],li=[-3,t,Fr,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(li,Ae);var L=[3,t,Br,0,[Mr],[0]],mi=[3,t,Qr,0,[Xo,Hn],[0,[()=>si,0]],1],Ht=[3,t,Hr,0,[Jr,yo,An,an,Wo,Qo],[[()=>ee,0],1,0,[()=>ee,0],[()=>ee,0],()=>Gi]],ut=[3,t,Zr,0,[Eo,kt,Tt],[0,0,0]],fi=[-3,t,Yr,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(fi,ge);var hi=[-3,t,ro,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(hi,Fe);var Ei=[-3,t,oo,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Ei,De);var xi=[3,t,eo,0,[D,R,Mt,qt,Z,k,W,M],[[()=>q,0],[()=>I,0],0,[()=>dt,0],[()=>_,0],()=>L,[()=>B,0],128],4],gi=[3,t,to,0,[],[]],yi=[3,t,co,0,[D,R,Mt,Z,jt,k,W,M,j],[[()=>q,0],[()=>I,0],0,[()=>_,0],2,()=>L,[()=>B,0],128,[()=>z,0]],3],bi=[3,t,po,0,[j],[[()=>z,0]]],Pi=[-3,t,fo,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Pi,Ge);var vi=[-3,t,ho,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(vi,Je);var Ci=[-3,t,bo,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Ci,it);var $i=[-3,t,xo,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError($i,Me);var Ai=[-3,t,Ao,{[p]:u,[l]:403},[d],[0]];c.for(t).registerError(Ai,Xe);var Si=[-3,t,Po,{[p]:u,[l]:403},[d],[0]];c.for(t).registerError(Si,je);var wi=[3,t,Co,0,[D,R,Z,W,k,M],[[()=>q,0],[()=>I,0],[()=>_,0],[()=>B,0],()=>L,128],2],Ui=[3,t,$o,0,[at],[()=>ut]],Ri=[-3,t,So,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Ri,He);var Ii=[3,t,Uo,0,[jr,D,Vr,M,k,W,j],[0,[()=>q,0],[()=>Fa,0],128,()=>L,[()=>B,0],[()=>z,0]],2],Oi=[3,t,Ro,0,[ct,j,Nt,Ft,$r],[0,[()=>z,0],128,[()=>Ht,0],64]],Ti=[-3,t,Oo,{[p]:ti},[d],[0]];c.for(t).registerError(Ti,ie);var Fi=[-3,t,To,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Fi,we);var Mi=[-3,t,Fo,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Mi,me);var Ni=[-3,t,Mo,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Ni,_e);var ki=[-3,t,No,{[p]:u,[l]:400},[d,ei],[0,0]];c.for(t).registerError(ki,ae);var Di=[-3,t,ko,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Di,ye);var ji=[-3,t,Do,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(ji,be);var Wi=[-3,t,jo,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Wi,Pe);var qi=[-3,t,qo,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(qi,Se);var zi=[-3,t,zo,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(zi,fe);var Li=[-3,t,Ho,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Li,Qe);var Bi=[-3,t,Bo,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Bi,Ue);var Vi=[3,t,Go,0,[kt,Tt],[0,0]],Gi=[3,t,Ko,0,[mo,lo],[0,0]],Hi=[-3,t,Jo,{[p]:u,[l]:403},[d],[0]];c.for(t).registerError(Hi,ce);var Ji=[-3,t,Zo,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Ji,Ne);var Qi=[-3,t,en,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Qi,Re);var Ki=[-3,t,_o,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Ki,ve);var Xi=[-3,t,un,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Xi,st);var Zi=[3,t,rn,0,[D,R,Z,W,k,M],[[()=>q,0],[()=>I,0],[()=>_,0],[()=>B,0],()=>L,128],2],Yi=[3,t,on,0,[at],[()=>ut]],_i=[-3,t,nn,{[p]:u,[l]:404},[d],[0]];c.for(t).registerError(_i,pe);var ea=[3,t,pn,0,[D,ct,j,no,k,W,M],[[()=>q,0],0,[()=>z,0],[()=>Ma,0],()=>L,[()=>B,0],128],2],ta=[3,t,dn,0,[ct,j,Nt,Ft],[0,[()=>z,0],128,[()=>Ht,0]]],sa=[-3,t,ln,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(sa,et);var ra=[3,t,En,0,[D,R,Z,qt,pt,Vt,k,W,M],[[()=>q,0],[()=>I,0],[()=>_,0],[()=>dt,0],[()=>H,0],[()=>H,0],()=>L,[()=>B,0],128],2],oa=[3,t,xn,0,[wn,qn,at,j],[2,0,()=>ut,[()=>z,0]],2],na=[-3,t,hn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(na,ke);var ia=[-3,t,bn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(ia,Ke);var aa=[-3,t,yn,{[p]:u,[l]:403},[d],[0]];c.for(t).registerError(aa,Ze);var ca=[-3,t,Pn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(ca,he);var pa=[-3,t,vn,{[p]:u,[l]:429},[d],[0]];c.for(t).registerError(pa,de);var da=[-3,t,Un,{[p]:u,[l]:401},[d],[0]];c.for(t).registerError(da,rt);var ua=[-3,t,Tn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(ua,Ee);var la=[-3,t,On,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(la,tt);var ma=[-3,t,Dn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(ma,Ie);var fa=[-3,t,Ln,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(fa,ot);var ha=[-3,t,Vn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(ha,Ce);var B=[3,t,Sn,8,[wo,go],[0,0]],Ea=[-3,t,In,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Ea,ue);var xa=[-3,t,Fn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(xa,xe);var ga=[-3,t,Rn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(ga,$e);var ya=[-3,t,Nn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(ya,Oe);var ba=[-3,t,kn,{[p]:u,[l]:404},[d],[0]];c.for(t).registerError(ba,le);var Pa=[-3,t,jn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Pa,Te);var va=[-3,t,Wn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(va,Ye);var Ca=[3,t,Bn,0,[R,Xr,zt,Lt,Dt,Bt,Wt],[[()=>I,0],[()=>H,0],4,4,2,0,()=>Jt]],$a=[-3,t,Kn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError($a,We);var Aa=[-3,t,Jn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Aa,qe);var Sa=[-3,t,Qn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Sa,nt);var wa=[-3,t,Xn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(wa,ze);var Ua=[-3,t,Zn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Ua,Le);var Ra=[-3,t,Yn,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Ra,Be);var Ia=[-3,t,_n,{[p]:u,[l]:400},[d],[0]];c.for(t).registerError(Ia,Ve);var Oa="unit",Ta=[-3,Gt,"CognitoIdentityProviderServiceException",0,[],[]];c.for(Gt).registerError(Ta,a);var H=[1,t,Lr,0,[()=>mi,0]],Jt=[1,t,Vo,0,()=>Vi],Fa=[2,t,Gr,8,0,0],Ma=[2,t,io,8,0,0],Na=[9,t,Ar,0,()=>ri,()=>oi],ka=[9,t,Ur,0,()=>ni,()=>Oa],Da=[9,t,Tr,0,()=>ii,()=>ai],ja=[9,t,Nr,0,()=>ci,()=>pi],Wa=[9,t,Wr,0,()=>di,()=>ui],qa=[9,t,_r,0,()=>xi,()=>gi],za=[9,t,ao,0,()=>yi,()=>bi],La=[9,t,vo,0,()=>wi,()=>Ui],Ba=[9,t,Io,0,()=>Ii,()=>Oi],Va=[9,t,sn,0,()=>Zi,()=>Yi],Ga=[9,t,cn,0,()=>ea,()=>ta],Ha=[9,t,gn,0,()=>ra,()=>oa];class Za extends S.classBuilder().ep(U).m(function(e,s,o,n){return[w(o,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminCreateUser",{}).n("CognitoIdentityProviderClient","AdminCreateUserCommand").sc(Na).build(){}class Ya extends S.classBuilder().ep(U).m(function(e,s,o,n){return[w(o,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminDeleteUser",{}).n("CognitoIdentityProviderClient","AdminDeleteUserCommand").sc(ka).build(){}class _a extends S.classBuilder().ep(U).m(function(e,s,o,n){return[w(o,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminDisableUser",{}).n("CognitoIdentityProviderClient","AdminDisableUserCommand").sc(Da).build(){}class ec extends S.classBuilder().ep(U).m(function(e,s,o,n){return[w(o,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminEnableUser",{}).n("CognitoIdentityProviderClient","AdminEnableUserCommand").sc(ja).build(){}class tc extends S.classBuilder().ep(U).m(function(e,s,o,n){return[w(o,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminGetUser",{}).n("CognitoIdentityProviderClient","AdminGetUserCommand").sc(Wa).build(){}class sc extends S.classBuilder().ep(U).m(function(e,s,o,n){return[w(o,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ConfirmForgotPassword",{}).n("CognitoIdentityProviderClient","ConfirmForgotPasswordCommand").sc(qa).build(){}class rc extends S.classBuilder().ep(U).m(function(e,s,o,n){return[w(o,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ConfirmSignUp",{}).n("CognitoIdentityProviderClient","ConfirmSignUpCommand").sc(za).build(){}class oc extends S.classBuilder().ep(U).m(function(e,s,o,n){return[w(o,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ForgotPassword",{}).n("CognitoIdentityProviderClient","ForgotPasswordCommand").sc(La).build(){}class nc extends S.classBuilder().ep(U).m(function(e,s,o,n){return[w(o,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(Ba).build(){}class ic extends S.classBuilder().ep(U).m(function(e,s,o,n){return[w(o,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ResendConfirmationCode",{}).n("CognitoIdentityProviderClient","ResendConfirmationCodeCommand").sc(Va).build(){}class ac extends S.classBuilder().ep(U).m(function(e,s,o,n){return[w(o,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","RespondToAuthChallenge",{}).n("CognitoIdentityProviderClient","RespondToAuthChallengeCommand").sc(Ga).build(){}class cc extends S.classBuilder().ep(U).m(function(e,s,o,n){return[w(o,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","SignUp",{}).n("CognitoIdentityProviderClient","SignUpCommand").sc(Ha).build(){}export{S as $Command,Na as AdminCreateUser$,Za as AdminCreateUserCommand,ri as AdminCreateUserRequest$,oi as AdminCreateUserResponse$,ka as AdminDeleteUser$,Ya as AdminDeleteUserCommand,ni as AdminDeleteUserRequest$,Da as AdminDisableUser$,_a as AdminDisableUserCommand,ii as AdminDisableUserRequest$,ai as AdminDisableUserResponse$,ja as AdminEnableUser$,ec as AdminEnableUserCommand,ci as AdminEnableUserRequest$,pi as AdminEnableUserResponse$,Wa as AdminGetUser$,tc as AdminGetUserCommand,di as AdminGetUserRequest$,ui as AdminGetUserResponse$,Ae as AliasExistsException,li as AliasExistsException$,L as AnalyticsMetadataType$,mi as AttributeType$,Ht as AuthenticationResultType$,ut as CodeDeliveryDetailsType$,ge as CodeDeliveryFailureException,fi as CodeDeliveryFailureException$,Fe as CodeMismatchException,hi as CodeMismatchException$,Xa as CognitoIdentityProviderClient,a as CognitoIdentityProviderServiceException,Ta as CognitoIdentityProviderServiceException$,De as ConcurrentModificationException,Ei as ConcurrentModificationException$,qa as ConfirmForgotPassword$,sc as ConfirmForgotPasswordCommand,xi as ConfirmForgotPasswordRequest$,gi as ConfirmForgotPasswordResponse$,za as ConfirmSignUp$,rc as ConfirmSignUpCommand,yi as ConfirmSignUpRequest$,bi as ConfirmSignUpResponse$,Ge as DeviceKeyExistsException,Pi as DeviceKeyExistsException$,Je as DuplicateProviderException,vi as DuplicateProviderException$,it as EnableSoftwareTokenMFAException,Ci as EnableSoftwareTokenMFAException$,Me as ExpiredCodeException,$i as ExpiredCodeException$,Xe as FeatureUnavailableInTierException,Ai as FeatureUnavailableInTierException$,je as ForbiddenException,Si as ForbiddenException$,La as ForgotPassword$,oc as ForgotPasswordCommand,wi as ForgotPasswordRequest$,Ui as ForgotPasswordResponse$,He as GroupExistsException,Ri as GroupExistsException$,Ba as InitiateAuth$,nc as InitiateAuthCommand,Ii as InitiateAuthRequest$,Oi as InitiateAuthResponse$,ie as InternalErrorException,Ti as InternalErrorException$,we as InvalidEmailRoleAccessPolicyException,Fi as InvalidEmailRoleAccessPolicyException$,me as InvalidLambdaResponseException,Mi as InvalidLambdaResponseException$,_e as InvalidOAuthFlowException,Ni as InvalidOAuthFlowException$,ae as InvalidParameterException,ki as InvalidParameterException$,ye as InvalidPasswordException,Di as InvalidPasswordException$,be as InvalidSmsRoleAccessPolicyException,ji as InvalidSmsRoleAccessPolicyException$,Pe as InvalidSmsRoleTrustRelationshipException,Wi as InvalidSmsRoleTrustRelationshipException$,Se as InvalidUserPoolConfigurationException,qi as InvalidUserPoolConfigurationException$,fe as LimitExceededException,zi as LimitExceededException$,Ue as MFAMethodNotFoundException,Bi as MFAMethodNotFoundException$,Vi as MFAOptionType$,Qe as ManagedLoginBrandingExistsException,Li as ManagedLoginBrandingExistsException$,Gi as NewDeviceMetadataType$,ce as NotAuthorizedException,Hi as NotAuthorizedException$,Ne as PasswordHistoryPolicyViolationException,Ji as PasswordHistoryPolicyViolationException$,Re as PasswordResetRequiredException,Qi as PasswordResetRequiredException$,ve as PreconditionNotMetException,Ki as PreconditionNotMetException$,st as RefreshTokenReuseException,Xi as RefreshTokenReuseException$,Va as ResendConfirmationCode$,ic as ResendConfirmationCodeCommand,Zi as ResendConfirmationCodeRequest$,Yi as ResendConfirmationCodeResponse$,pe as ResourceNotFoundException,_i as ResourceNotFoundException$,Ga as RespondToAuthChallenge$,ac as RespondToAuthChallengeCommand,ea as RespondToAuthChallengeRequest$,ta as RespondToAuthChallengeResponse$,et as ScopeDoesNotExistException,sa as ScopeDoesNotExistException$,Ha as SignUp$,cc as SignUpCommand,ra as SignUpRequest$,oa as SignUpResponse$,ke as SoftwareTokenMFANotFoundException,na as SoftwareTokenMFANotFoundException$,Ke as TermsExistsException,ia as TermsExistsException$,Ze as TierChangeNotAllowedException,aa as TierChangeNotAllowedException$,he as TooManyFailedAttemptsException,ca as TooManyFailedAttemptsException$,de as TooManyRequestsException,pa as TooManyRequestsException$,rt as UnauthorizedException,da as UnauthorizedException$,Ee as UnexpectedLambdaException,ua as UnexpectedLambdaException$,tt as UnsupportedIdentityProviderException,la as UnsupportedIdentityProviderException$,Ie as UnsupportedOperationException,ma as UnsupportedOperationException$,ot as UnsupportedTokenTypeException,fa as UnsupportedTokenTypeException$,Ce as UnsupportedUserStateException,ha as UnsupportedUserStateException$,B as UserContextDataType$,ue as UserImportInProgressException,Ea as UserImportInProgressException$,xe as UserLambdaValidationException,xa as UserLambdaValidationException$,Oe as UserNotConfirmedException,ya as UserNotConfirmedException$,le as UserNotFoundException,ba as UserNotFoundException$,Te as UserPoolAddOnNotEnabledException,Pa as UserPoolAddOnNotEnabledException$,Ye as UserPoolTaggingException,va as UserPoolTaggingException$,Ca as UserType$,$e as UsernameExistsException,ga as UsernameExistsException$,We as WebAuthnChallengeNotFoundException,$a as WebAuthnChallengeNotFoundException$,qe as WebAuthnClientMismatchException,Aa as WebAuthnClientMismatchException$,nt as WebAuthnConfigurationMissingException,Sa as WebAuthnConfigurationMissingException$,ze as WebAuthnCredentialNotSupportedException,wa as WebAuthnCredentialNotSupportedException$,Le as WebAuthnNotEnabledException,Ua as WebAuthnNotEnabledException$,Be as WebAuthnOriginNotAllowedException,Ra as WebAuthnOriginNotAllowedException$,Ve as WebAuthnRelyingPartyMismatchException,Ia as WebAuthnRelyingPartyMismatchException$,Kt as __Client};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as w,X as z}from"./index-DRgW1--O-Be3NpfgF.js";import"./preload-helper-BlTxHScW.js";import"./index-6mKfgpcs-DsgiI2lM.js";class E{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:i,serializer:n,deserializer:a,serdeContext:d,defaultContentType:u}){this.marshaller=i,this.serializer=n,this.deserializer=a,this.serdeContext=d,this.defaultContentType=u}async serializeEventStream({eventStream:i,requestSchema:n,initialRequest:a}){const d=this.marshaller,u=n.getEventStreamMember(),h=n.getMemberSchema(u),m=this.serializer,f=this.defaultContentType,p=Symbol("initialRequestMarker"),l={async*[Symbol.asyncIterator](){if(a){const t={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};m.write(n,a);const e=m.flush();yield{[p]:!0,headers:t,body:e}}for await(const t of i)yield t}};return d.serialize(l,t=>{if(t[p])return{headers:t.headers,body:t.body};const e=Object.keys(t).find(r=>r!=="__type")??"",{additionalHeaders:s,body:o,eventType:c,explicitPayloadContentType:y}=this.writeEventBody(e,h,t);return{headers:{":event-type":{type:"string",value:c},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:y??f},...s},body:o}})}async deserializeEventStream({response:i,responseSchema:n,initialResponseContainer:a}){const d=this.marshaller,u=n.getEventStreamMember(),h=n.getMemberSchema(u).getMemberSchemas(),m=Symbol("initialResponseMarker"),f=d.deserialize(i.body,async t=>{const e=Object.keys(t).find(o=>o!=="__type")??"",s=t[e].body;if(e==="initial-response"){const o=await this.deserializer.read(n,s);return delete o[u],{[m]:!0,...o}}else if(e in h){const o=h[e];if(o.isStructSchema()){const c={};let y=!1;for(const[r,v]of o.structIterator()){const{eventHeader:b,eventPayload:g}=v.getMergedTraits();if(y=y||!!(b||g),g)v.isBlobSchema()?c[r]=s:v.isStringSchema()?c[r]=(this.serdeContext?.utf8Encoder??w)(s):v.isStructSchema()&&(c[r]=await this.deserializer.read(v,s));else if(b){const S=t[e].headers[r]?.value;S!=null&&(v.isNumericSchema()?S&&typeof S=="object"&&"bytes"in S?c[r]=BigInt(S.toString()):c[r]=Number(S):c[r]=S)}}if(y)return{[e]:c};if(s.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(o,s)}}else return{$unknown:t}}),p=f[Symbol.asyncIterator](),l=await p.next();if(l.done)return f;if(l.value?.[m]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(l.value))a[t]=e}return{async*[Symbol.asyncIterator](){for(l?.value?.[m]||(yield l.value);;){const{done:t,value:e}=await p.next();if(t)break;yield e}}}}writeEventBody(i,n,a){const d=this.serializer;let u=i,h=null,m;const f=n.getSchema()[4].includes(i),p={};if(f){const t=n.getMemberSchema(i);if(t.isStructSchema()){for(const[e,s]of t.structIterator()){const{eventHeader:o,eventPayload:c}=s.getMergedTraits();if(c)h=e;else if(o){const y=a[i][e];let r="binary";s.isNumericSchema()?(-2)**31<=y&&y<=2**31-1?r="integer":r="long":s.isTimestampSchema()?r="timestamp":s.isStringSchema()?r="string":s.isBooleanSchema()&&(r="boolean"),y!=null&&(p[e]={type:r,value:y},delete a[i][e])}}if(h!==null){const e=t.getMemberSchema(h);e.isBlobSchema()?m="application/octet-stream":e.isStringSchema()&&(m="text/plain"),d.write(e,a[i][h])}else d.write(t,a[i])}else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=a[i];u=t,d.write(15,e)}const l=d.flush();return{body:typeof l=="string"?(this.serdeContext?.utf8Decoder??z)(l):l,eventType:u,explicitPayloadContentType:m,additionalHeaders:p}}}export{E as EventStreamSerde};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as z,f as x}from"./normalizeProvider-Cd9_AiS_.js";class T{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:a,serializer:n,deserializer:o,serdeContext:m,defaultContentType:y}){this.marshaller=a,this.serializer=n,this.deserializer=o,this.serdeContext=m,this.defaultContentType=y}async serializeEventStream({eventStream:a,requestSchema:n,initialRequest:o}){const m=this.marshaller,y=n.getEventStreamMember(),p=n.getMemberSchema(y),d=this.serializer,f=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};d.write(n,o);const t=d.flush();yield{[h]:!0,headers:r,body:t}}for await(const r of a)yield r}};return m.serialize(S,r=>{if(r[h])return{headers:r.headers,body:r.body};const t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:i,eventType:l,explicitPayloadContentType:c}=this.writeEventBody(t,p,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:c??f},...e},body:i}})}async deserializeEventStream({response:a,responseSchema:n,initialResponseContainer:o}){const m=this.marshaller,y=n.getEventStreamMember(),d=n.getMemberSchema(y).getMemberSchemas(),f=Symbol("initialResponseMarker"),h=m.deserialize(a.body,async t=>{const e=Object.keys(t).find(l=>l!=="__type")??"",i=t[e].body;if(e==="initial-response"){const l=await this.deserializer.read(n,i);return delete l[y],{[f]:!0,...l}}else if(e in d){const l=d[e];if(l.isStructSchema()){const c={};let u=!1;for(const[s,g]of l.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(u=u||!!(v||w),w)g.isBlobSchema()?c[s]=i:g.isStringSchema()?c[s]=(this.serdeContext?.utf8Encoder??z)(i):g.isStructSchema()&&(c[s]=await this.deserializer.read(g,i));else if(v){const b=t[e].headers[s]?.value;b!=null&&(g.isNumericSchema()?b&&typeof b=="object"&&"bytes"in b?c[s]=BigInt(b.toString()):c[s]=Number(b):c[s]=b)}}if(u)return{[e]:c};if(i.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,i)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[f]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){for(r?.value?.[f]||(yield r.value);;){const{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(a,n,o){const m=this.serializer;let y=a,p=null,d;const f=n.getSchema()[4].includes(a),h={};if(f){const t=n.getMemberSchema(a);if(t.isStructSchema()){for(const[e,i]of t.structIterator()){const{eventHeader:l,eventPayload:c}=i.getMergedTraits();if(c)p=e;else if(l){const u=o[a][e];let s="binary";i.isNumericSchema()?(-2)**31<=u&&u<=2**31-1?s="integer":s="long":i.isTimestampSchema()?s="timestamp":i.isStringSchema()?s="string":i.isBooleanSchema()&&(s="boolean"),u!=null&&(h[e]={type:s,value:u},delete o[a][e])}}if(p!==null){const e=t.getMemberSchema(p);e.isBlobSchema()?d="application/octet-stream":e.isStringSchema()&&(d="text/plain"),m.write(e,o[a][p])}else m.write(t,o[a])}else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=o[a];y=t,m.write(15,e)}const S=m.flush();return{body:typeof S=="string"?(this.serdeContext?.utf8Decoder??x)(S):S,eventType:y,explicitPayloadContentType:d,additionalHeaders:h}}}export{T as EventStreamSerde};
|