@agentlang/lstudio 0.4.5 → 0.4.6
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/{_commonjs-dynamic-modules-B7n8ZNar.js → _commonjs-dynamic-modules-DkOKMH7F.js} +1 -1
- package/assets/{fs-DYaxY4Sz.js → fs-Dc1AXE1h.js} +1 -1
- package/assets/index-B5cYUcHg.js +1 -0
- package/assets/{index-BHDiPh0o.js → index-BFv-M3PX.js} +1 -1
- package/assets/index-BXMy9UIl.js +1 -0
- package/assets/index-BitrXVkV.js +1 -0
- package/assets/{index-uTG5pVBd.js → index-BsMGh1HZ.js} +1 -1
- package/assets/{index-D4z_hbl0-D1eATIsj.js → index-D4z_hbl0-Bi2lyYpC.js} +1 -1
- package/assets/index-D5i6vPoY.js +1 -0
- package/assets/{index-LKjSxjRA-C7aA0iuy.js → index-DTNuphFO-Bf5Ad1xs.js} +8 -8
- package/assets/index-DYeSZrx6.css +1 -0
- package/assets/index-DYmn2gQ6-CnjFa625.js +1 -0
- package/assets/{index-CbD4puMb.js → index-DbVrN0uV.js} +1 -1
- package/assets/{index-M-eK85m4.js → index-IWX-nwYi.js} +573 -271
- package/assets/index.browser-D5Xow_MQ.js +6 -0
- package/assets/{loadCognitoIdentity-BJ3ICUdg.js → loadCognitoIdentity-DytZoWyS.js} +1 -1
- package/assets/loadSts-C6zXLlvL.js +1 -0
- package/assets/{normalizeProvider-BrOPyH3l.js → normalizeProvider-CtDY37Q6.js} +1 -1
- package/assets/{replService-BVipLO-C.js → replService-jI2rdTkj.js} +1 -1
- package/assets/resolveDefaultsModeConfig-Bx7XDpng.js +15 -0
- package/assets/{util-Dh4hNn-t.js → util-BYzfkJTL.js} +2 -2
- package/assets/{winston-1qzyIKCb-ykc8NNA5.js → winston-1qzyIKCb-DGNx4OWn.js} +1 -1
- package/assets/{winston-B2bq7MC_.js → winston-BpiA2JJl.js} +1 -1
- package/assets/{winston-CtxF18qc-Cc2bHbg0.js → winston-CtxF18qc-itw4XSal.js} +1 -1
- package/assets/{winston-DnehID6b.js → winston-D4mJsFB6.js} +2 -2
- package/index.html +3 -3
- package/package.json +1 -1
- package/assets/index-3_2F9LQx.js +0 -1
- package/assets/index-B3OWE_qa.js +0 -1
- package/assets/index-BVSKv1jw-BvgeZRdK.js +0 -1
- package/assets/index-CuvfCO6A.js +0 -1
- package/assets/index-OdGGJiBD.css +0 -1
- package/assets/index.browser-TboFGWa2.js +0 -6
- package/assets/loadSts-C9RMC24n.js +0 -1
- package/assets/resolveDefaultsModeConfig-zrZwbAGx.js +0 -15
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{_ as lo}from"./preload-helper-BlTxHScW.js";import{Y as rr}from"./index-6mKfgpcs-DsgiI2lM.js";const po=(t,e,r)=>{let n,s,i,o=!1;const a=async()=>{s||(s=t());try{n=await s,i=!0,o=!1}finally{s=void 0}return n};return async c=>((!i||c?.forceRefresh)&&(n=await a()),n)},ho=t=>({setHttpHandler(e){t.httpHandler=e},httpHandler(){return t.httpHandler},updateHttpClientConfig(e,r){t.httpHandler?.updateHttpClientConfig(e,r)},httpHandlerConfigs(){return t.httpHandler.httpHandlerConfigs()}}),fo=t=>({httpHandler:t.httpHandler()});var Pe;(function(t){t.HTTP="http",t.HTTPS="https"})(Pe||(Pe={}));var He;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(He||(He={}));const gr="__smithy_context";class D{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 D({...e,headers:{...e.headers}});return r.query&&(r.query=mo(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 D.clone(this)}}function mo(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})}class fe{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 re=t=>encodeURIComponent(t).replace(/[!'()*]/g,go),go=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function yo(t){const e=[];for(let r of Object.keys(t).sort()){const n=t[r];if(r=re(r),Array.isArray(n))for(let s=0,i=n.length;s<i;s++)e.push(`${r}=${re(n[s])}`);else{let s=r;(n||typeof n=="string")&&(s+=`=${re(n)}`),e.push(s)}}return e.join("&")}function Fr(t,e){return new Request(t,e)}function wo(t=0){return new Promise((e,r)=>{t&&setTimeout(()=>{const n=new Error(`Request did not complete within ${t} ms`);n.name="TimeoutError",r(n)},t)})}const nr={supported:void 0};class vr{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new vr(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(r=>r||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),nr.supported===void 0&&(nr.supported=typeof Request<"u"&&"keepalive"in Fr("https://[::1]"))}destroy(){}async handle(e,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const s=n??this.config.requestTimeout,i=this.config.keepAlive===!0,o=this.config.credentials;if(r?.aborted){const C=new Error("Request aborted");return C.name="AbortError",Promise.reject(C)}let a=e.path;const c=yo(e.query||{});c&&(a+=`?${c}`),e.fragment&&(a+=`#${e.fragment}`);let u="";if(e.username!=null||e.password!=null){const C=e.username??"",I=e.password??"";u=`${C}:${I}@`}const{port:p,method:l}=e,h=`${e.protocol}//${u}${e.hostname}${p?`:${p}`:""}${a}`,f=l==="GET"||l==="HEAD"?void 0:e.body,g={body:f,headers:new Headers(e.headers),method:l,credentials:o};this.config?.cache&&(g.cache=this.config.cache),f&&(g.duplex="half"),typeof AbortController<"u"&&(g.signal=r),nr.supported&&(g.keepalive=i),typeof this.config.requestInit=="function"&&Object.assign(g,this.config.requestInit(e));let y=()=>{};const b=Fr(h,g),$=[fetch(b).then(C=>{const I=C.headers,P={};for(const O of I.entries())P[O[0]]=O[1];return C.body!=null?{response:new fe({headers:P,reason:C.statusText,statusCode:C.status,body:C.body})}:C.blob().then(O=>({response:new fe({headers:P,reason:C.statusText,statusCode:C.status,body:O})}))}),wo(s)];return r&&$.push(new Promise((C,I)=>{const P=()=>{const O=new Error("Request aborted");O.name="AbortError",I(O)};if(typeof r.addEventListener=="function"){const O=r;O.addEventListener("abort",P,{once:!0}),y=()=>O.removeEventListener("abort",P)}else r.onabort=P})),Promise.race($).finally(y)}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=r,n))}httpHandlerConfigs(){return this.config??{}}}const xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lr=Object.entries(xn).reduce((t,[e,r])=>(t[r]=Number(e),t),{}),bo=xn.split(""),he=6,Ce=8,Eo=63,Ke=t=>{let e=t.length/4*3;t.slice(-2)==="=="?e-=2:t.slice(-1)==="="&&e--;const r=new ArrayBuffer(e),n=new DataView(r);for(let s=0;s<t.length;s+=4){let i=0,o=0;for(let u=s,p=s+3;u<=p;u++)if(t[u]!=="="){if(!(t[u]in Lr))throw new TypeError(`Invalid character ${t[u]} in base64 string.`);i|=Lr[t[u]]<<(p-u)*he,o+=he}else i>>=he;const a=s/4*3;i>>=o%Ce;const c=Math.floor(o/Ce);for(let u=0;u<c;u++){const p=(c-u-1)*Ce;n.setUint8(a+u,(i&255<<p)>>p)}}return new Uint8Array(r)},me=t=>new TextEncoder().encode(t),Re=t=>typeof t=="string"?me(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),Cr=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 _e(t){let e;typeof t=="string"?e=me(t):e=t;const r=typeof e=="object"&&typeof e.length=="number",n=typeof e=="object"&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let s="";for(let i=0;i<e.length;i+=3){let o=0,a=0;for(let u=i,p=Math.min(i+3,e.length);u<p;u++)o|=e[u]<<(p-u-1)*Ce,a+=Ce;const c=Math.ceil(a/he);o<<=c*he-a;for(let u=1;u<=c;u++){const p=(c-u)*he;s+=bo[(o&Eo<<p)>>p]}s+="==".slice(0,4-c)}return s}const So=async t=>typeof Blob=="function"&&t instanceof Blob||t.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await t.arrayBuffer()):xo(t):vo(t);async function xo(t){const e=await Co(t),r=Ke(e);return new Uint8Array(r)}async function vo(t){const e=[],r=t.getReader();let n=!1,s=0;for(;!n;){const{done:a,value:c}=await r.read();c&&(e.push(c),s+=c.length),n=a}const i=new Uint8Array(s);let o=0;for(const a of e)i.set(a,o),o+=a.length;return i}function Co(t){return new Promise((e,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const s=n.result??"",i=s.indexOf(","),o=i>-1?i+1:s.length;e(s.substring(o))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(t)})}const te=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const n of e)r.push(n);return r},J=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,Be=()=>{let t=[],e=[],r=!1;const n=new Set,s=l=>l.sort((h,f)=>qr[f.step]-qr[h.step]||zr[f.priority||"normal"]-zr[h.priority||"normal"]),i=l=>{let h=!1;const f=g=>{const y=te(g.name,g.aliases);if(y.includes(l)){h=!0;for(const b of y)n.delete(b);return!1}return!0};return t=t.filter(f),e=e.filter(f),h},o=l=>{let h=!1;const f=g=>{if(g.middleware===l){h=!0;for(const y of te(g.name,g.aliases))n.delete(y);return!1}return!0};return t=t.filter(f),e=e.filter(f),h},a=l=>(t.forEach(h=>{l.add(h.middleware,{...h})}),e.forEach(h=>{l.addRelativeTo(h.middleware,{...h})}),l.identifyOnResolve?.(p.identifyOnResolve()),l),c=l=>{const h=[];return l.before.forEach(f=>{f.before.length===0&&f.after.length===0?h.push(f):h.push(...c(f))}),h.push(l),l.after.reverse().forEach(f=>{f.before.length===0&&f.after.length===0?h.push(f):h.push(...c(f))}),h},u=(l=!1)=>{const h=[],f=[],g={};return t.forEach(y=>{const b={...y,before:[],after:[]};for(const $ of te(b.name,b.aliases))g[$]=b;h.push(b)}),e.forEach(y=>{const b={...y,before:[],after:[]};for(const $ of te(b.name,b.aliases))g[$]=b;f.push(b)}),f.forEach(y=>{if(y.toMiddleware){const b=g[y.toMiddleware];if(b===void 0){if(l)return;throw new Error(`${y.toMiddleware} is not found when adding ${J(y.name,y.aliases)} middleware ${y.relation} ${y.toMiddleware}`)}y.relation==="after"&&b.after.push(y),y.relation==="before"&&b.before.push(y)}}),s(h).map(c).reduce((y,b)=>(y.push(...b),y),[])},p={add:(l,h={})=>{const{name:f,override:g,aliases:y}=h,b={step:"initialize",priority:"normal",middleware:l,...h},$=te(f,y);if($.length>0){if($.some(C=>n.has(C))){if(!g)throw new Error(`Duplicate middleware name '${J(f,y)}'`);for(const C of $){const I=t.findIndex(O=>O.name===C||O.aliases?.some(tr=>tr===C));if(I===-1)continue;const P=t[I];if(P.step!==b.step||b.priority!==P.priority)throw new Error(`"${J(P.name,P.aliases)}" middleware with ${P.priority} priority in ${P.step} step cannot be overridden by "${J(f,y)}" middleware with ${b.priority} priority in ${b.step} step.`);t.splice(I,1)}}for(const C of $)n.add(C)}t.push(b)},addRelativeTo:(l,h)=>{const{name:f,override:g,aliases:y}=h,b={middleware:l,...h},$=te(f,y);if($.length>0){if($.some(C=>n.has(C))){if(!g)throw new Error(`Duplicate middleware name '${J(f,y)}'`);for(const C of $){const I=e.findIndex(O=>O.name===C||O.aliases?.some(tr=>tr===C));if(I===-1)continue;const P=e[I];if(P.toMiddleware!==b.toMiddleware||P.relation!==b.relation)throw new Error(`"${J(P.name,P.aliases)}" middleware ${P.relation} "${P.toMiddleware}" middleware cannot be overridden by "${J(f,y)}" middleware ${b.relation} "${b.toMiddleware}" middleware.`);e.splice(I,1)}}for(const C of $)n.add(C)}e.push(b)},clone:()=>a(Be()),use:l=>{l.applyToStack(p)},remove:l=>typeof l=="string"?i(l):o(l),removeByTag:l=>{let h=!1;const f=g=>{const{tags:y,name:b,aliases:$}=g;if(y&&y.includes(l)){const C=te(b,$);for(const I of C)n.delete(I);return h=!0,!1}return!0};return t=t.filter(f),e=e.filter(f),h},concat:l=>{const h=a(Be());return h.use(l),h.identifyOnResolve(r||h.identifyOnResolve()||(l.identifyOnResolve?.()??!1)),h},applyToStack:a,identify:()=>u(!0).map(l=>{const h=l.step??l.relation+" "+l.toMiddleware;return J(l.name,l.aliases)+" - "+h}),identifyOnResolve(l){return typeof l=="boolean"&&(r=l),r},resolve:(l,h)=>{for(const f of u().map(g=>g.middleware).reverse())l=f(l,h);return r&&console.log(p.identify()),l}};return p},qr={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},zr={high:3,normal:2,low:1};class vn{config;middlewareStack=Be();initConfig;handlers;constructor(e){this.config=e;const{protocol:r,protocolSettings:n}=e;n&&typeof r=="function"&&(e.protocol=new r(n))}send(e,r,n){const s=typeof r!="function"?r:void 0,i=typeof r=="function"?r:n,o=s===void 0&&this.config.cacheMiddleware===!0;let a;if(o){this.handlers||(this.handlers=new WeakMap);const c=this.handlers;c.has(e.constructor)?a=c.get(e.constructor):(a=e.resolveMiddleware(this.middlewareStack,this.config,s),c.set(e.constructor,a))}else delete this.handlers,a=e.resolveMiddleware(this.middlewareStack,this.config,s);if(i)a(e).then(c=>i(null,c.output),c=>i(c)).catch(()=>{});else return a(e).then(c=>c.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class ne extends Uint8Array{static fromString(e,r="utf-8"){if(typeof e=="string")return r==="base64"?ne.mutate(Ke(e)):ne.mutate(me(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,ne.prototype),e}transformToString(e="utf-8"){return e==="base64"?_e(this):Cr(this)}}const Cn={},yr={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),Cn[t]=e,yr[e]=t}function Ao(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 n=t.slice(r,r+2).toLowerCase();if(n in yr)e[r/2]=yr[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return e}function se(t){let e="";for(let r=0;r<t.byteLength;r++)e+=Cn[t[r]];return e}const wr=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return ne.mutate(t);if(!t)return ne.mutate(new Uint8Array);const r=e.streamCollector(t);return ne.mutate(await r)},Fe=t=>typeof t=="function"?t():t,we=t=>t[gr]||(t[gr]={}),G=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},An=(t,e,r,n,s)=>({name:e,namespace:t,traits:r,input:n,output:s}),$o=t=>(e,r)=>async n=>{const{response:s}=await e(n),{operationSchema:i}=we(r),[,o,a,c,u,p]=i??[];try{const l=await t.protocol.deserializeResponse(An(o,a,c,u,p),{...t,...r},s);return{response:s,output:l}}catch(l){if(Object.defineProperty(l,"$response",{value:s,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in l)){const h="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{l.message+=`
|
|
3
|
-
`+h}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(h):r.logger?.warn?.(h)}typeof l.$responseBodyText<"u"&&l.$response&&(l.$response.body=l.$responseBodyText);try{if(fe.isInstance(s)){const{headers:f={}}=s,g=Object.entries(f);l.$metadata={httpStatusCode:s.statusCode,requestId:sr(/^x-[\w-]+-request-?id$/,g),extendedRequestId:sr(/^x-[\w-]+-id-2$/,g),cfId:sr(/^x-[\w-]+-cf-id$/,g)}}}catch{}}throw l}},sr=(t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DYmn2gQ6-CnjFa625.js","assets/preload-helper-BlTxHScW.js","assets/index-6mKfgpcs-DsgiI2lM.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as po}from"./preload-helper-BlTxHScW.js";import{Y as rr}from"./index-6mKfgpcs-DsgiI2lM.js";const ho=(t,e,r)=>{let n,s,i,o=!1;const a=async()=>{s||(s=t());try{n=await s,i=!0,o=!1}finally{s=void 0}return n};return async c=>((!i||c?.forceRefresh)&&(n=await a()),n)},fo=t=>({setHttpHandler(e){t.httpHandler=e},httpHandler(){return t.httpHandler},updateHttpClientConfig(e,r){t.httpHandler?.updateHttpClientConfig(e,r)},httpHandlerConfigs(){return t.httpHandler.httpHandlerConfigs()}}),mo=t=>({httpHandler:t.httpHandler()});var Pe;(function(t){t.HTTP="http",t.HTTPS="https"})(Pe||(Pe={}));var He;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(He||(He={}));const gr="__smithy_context";class D{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 D({...e,headers:{...e.headers}});return r.query&&(r.query=go(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 D.clone(this)}}function go(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})}class fe{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 re=t=>encodeURIComponent(t).replace(/[!'()*]/g,yo),yo=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function wo(t){const e=[];for(let r of Object.keys(t).sort()){const n=t[r];if(r=re(r),Array.isArray(n))for(let s=0,i=n.length;s<i;s++)e.push(`${r}=${re(n[s])}`);else{let s=r;(n||typeof n=="string")&&(s+=`=${re(n)}`),e.push(s)}}return e.join("&")}function Fr(t,e){return new Request(t,e)}function bo(t=0){return new Promise((e,r)=>{t&&setTimeout(()=>{const n=new Error(`Request did not complete within ${t} ms`);n.name="TimeoutError",r(n)},t)})}const nr={supported:void 0};class vr{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new vr(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(r=>r||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),nr.supported===void 0&&(nr.supported=typeof Request<"u"&&"keepalive"in Fr("https://[::1]"))}destroy(){}async handle(e,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const s=n??this.config.requestTimeout,i=this.config.keepAlive===!0,o=this.config.credentials;if(r?.aborted){const C=new Error("Request aborted");return C.name="AbortError",Promise.reject(C)}let a=e.path;const c=wo(e.query||{});c&&(a+=`?${c}`),e.fragment&&(a+=`#${e.fragment}`);let u="";if(e.username!=null||e.password!=null){const C=e.username??"",I=e.password??"";u=`${C}:${I}@`}const{port:p,method:l}=e,h=`${e.protocol}//${u}${e.hostname}${p?`:${p}`:""}${a}`,f=l==="GET"||l==="HEAD"?void 0:e.body,g={body:f,headers:new Headers(e.headers),method:l,credentials:o};this.config?.cache&&(g.cache=this.config.cache),f&&(g.duplex="half"),typeof AbortController<"u"&&(g.signal=r),nr.supported&&(g.keepalive=i),typeof this.config.requestInit=="function"&&Object.assign(g,this.config.requestInit(e));let y=()=>{};const b=Fr(h,g),$=[fetch(b).then(C=>{const I=C.headers,P={};for(const O of I.entries())P[O[0]]=O[1];return C.body!=null?{response:new fe({headers:P,reason:C.statusText,statusCode:C.status,body:C.body})}:C.blob().then(O=>({response:new fe({headers:P,reason:C.statusText,statusCode:C.status,body:O})}))}),bo(s)];return r&&$.push(new Promise((C,I)=>{const P=()=>{const O=new Error("Request aborted");O.name="AbortError",I(O)};if(typeof r.addEventListener=="function"){const O=r;O.addEventListener("abort",P,{once:!0}),y=()=>O.removeEventListener("abort",P)}else r.onabort=P})),Promise.race($).finally(y)}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=r,n))}httpHandlerConfigs(){return this.config??{}}}const vn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lr=Object.entries(vn).reduce((t,[e,r])=>(t[r]=Number(e),t),{}),Eo=vn.split(""),he=6,Ce=8,So=63,Ke=t=>{let e=t.length/4*3;t.slice(-2)==="=="?e-=2:t.slice(-1)==="="&&e--;const r=new ArrayBuffer(e),n=new DataView(r);for(let s=0;s<t.length;s+=4){let i=0,o=0;for(let u=s,p=s+3;u<=p;u++)if(t[u]!=="="){if(!(t[u]in Lr))throw new TypeError(`Invalid character ${t[u]} in base64 string.`);i|=Lr[t[u]]<<(p-u)*he,o+=he}else i>>=he;const a=s/4*3;i>>=o%Ce;const c=Math.floor(o/Ce);for(let u=0;u<c;u++){const p=(c-u-1)*Ce;n.setUint8(a+u,(i&255<<p)>>p)}}return new Uint8Array(r)},me=t=>new TextEncoder().encode(t),Re=t=>typeof t=="string"?me(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),Cr=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 _e(t){let e;typeof t=="string"?e=me(t):e=t;const r=typeof e=="object"&&typeof e.length=="number",n=typeof e=="object"&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let s="";for(let i=0;i<e.length;i+=3){let o=0,a=0;for(let u=i,p=Math.min(i+3,e.length);u<p;u++)o|=e[u]<<(p-u-1)*Ce,a+=Ce;const c=Math.ceil(a/he);o<<=c*he-a;for(let u=1;u<=c;u++){const p=(c-u)*he;s+=Eo[(o&So<<p)>>p]}s+="==".slice(0,4-c)}return s}const xo=async t=>typeof Blob=="function"&&t instanceof Blob||t.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await t.arrayBuffer()):vo(t):Co(t);async function vo(t){const e=await Ao(t),r=Ke(e);return new Uint8Array(r)}async function Co(t){const e=[],r=t.getReader();let n=!1,s=0;for(;!n;){const{done:a,value:c}=await r.read();c&&(e.push(c),s+=c.length),n=a}const i=new Uint8Array(s);let o=0;for(const a of e)i.set(a,o),o+=a.length;return i}function Ao(t){return new Promise((e,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const s=n.result??"",i=s.indexOf(","),o=i>-1?i+1:s.length;e(s.substring(o))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(t)})}const te=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const n of e)r.push(n);return r},J=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,Be=()=>{let t=[],e=[],r=!1;const n=new Set,s=l=>l.sort((h,f)=>qr[f.step]-qr[h.step]||zr[f.priority||"normal"]-zr[h.priority||"normal"]),i=l=>{let h=!1;const f=g=>{const y=te(g.name,g.aliases);if(y.includes(l)){h=!0;for(const b of y)n.delete(b);return!1}return!0};return t=t.filter(f),e=e.filter(f),h},o=l=>{let h=!1;const f=g=>{if(g.middleware===l){h=!0;for(const y of te(g.name,g.aliases))n.delete(y);return!1}return!0};return t=t.filter(f),e=e.filter(f),h},a=l=>(t.forEach(h=>{l.add(h.middleware,{...h})}),e.forEach(h=>{l.addRelativeTo(h.middleware,{...h})}),l.identifyOnResolve?.(p.identifyOnResolve()),l),c=l=>{const h=[];return l.before.forEach(f=>{f.before.length===0&&f.after.length===0?h.push(f):h.push(...c(f))}),h.push(l),l.after.reverse().forEach(f=>{f.before.length===0&&f.after.length===0?h.push(f):h.push(...c(f))}),h},u=(l=!1)=>{const h=[],f=[],g={};return t.forEach(y=>{const b={...y,before:[],after:[]};for(const $ of te(b.name,b.aliases))g[$]=b;h.push(b)}),e.forEach(y=>{const b={...y,before:[],after:[]};for(const $ of te(b.name,b.aliases))g[$]=b;f.push(b)}),f.forEach(y=>{if(y.toMiddleware){const b=g[y.toMiddleware];if(b===void 0){if(l)return;throw new Error(`${y.toMiddleware} is not found when adding ${J(y.name,y.aliases)} middleware ${y.relation} ${y.toMiddleware}`)}y.relation==="after"&&b.after.push(y),y.relation==="before"&&b.before.push(y)}}),s(h).map(c).reduce((y,b)=>(y.push(...b),y),[])},p={add:(l,h={})=>{const{name:f,override:g,aliases:y}=h,b={step:"initialize",priority:"normal",middleware:l,...h},$=te(f,y);if($.length>0){if($.some(C=>n.has(C))){if(!g)throw new Error(`Duplicate middleware name '${J(f,y)}'`);for(const C of $){const I=t.findIndex(O=>O.name===C||O.aliases?.some(tr=>tr===C));if(I===-1)continue;const P=t[I];if(P.step!==b.step||b.priority!==P.priority)throw new Error(`"${J(P.name,P.aliases)}" middleware with ${P.priority} priority in ${P.step} step cannot be overridden by "${J(f,y)}" middleware with ${b.priority} priority in ${b.step} step.`);t.splice(I,1)}}for(const C of $)n.add(C)}t.push(b)},addRelativeTo:(l,h)=>{const{name:f,override:g,aliases:y}=h,b={middleware:l,...h},$=te(f,y);if($.length>0){if($.some(C=>n.has(C))){if(!g)throw new Error(`Duplicate middleware name '${J(f,y)}'`);for(const C of $){const I=e.findIndex(O=>O.name===C||O.aliases?.some(tr=>tr===C));if(I===-1)continue;const P=e[I];if(P.toMiddleware!==b.toMiddleware||P.relation!==b.relation)throw new Error(`"${J(P.name,P.aliases)}" middleware ${P.relation} "${P.toMiddleware}" middleware cannot be overridden by "${J(f,y)}" middleware ${b.relation} "${b.toMiddleware}" middleware.`);e.splice(I,1)}}for(const C of $)n.add(C)}e.push(b)},clone:()=>a(Be()),use:l=>{l.applyToStack(p)},remove:l=>typeof l=="string"?i(l):o(l),removeByTag:l=>{let h=!1;const f=g=>{const{tags:y,name:b,aliases:$}=g;if(y&&y.includes(l)){const C=te(b,$);for(const I of C)n.delete(I);return h=!0,!1}return!0};return t=t.filter(f),e=e.filter(f),h},concat:l=>{const h=a(Be());return h.use(l),h.identifyOnResolve(r||h.identifyOnResolve()||(l.identifyOnResolve?.()??!1)),h},applyToStack:a,identify:()=>u(!0).map(l=>{const h=l.step??l.relation+" "+l.toMiddleware;return J(l.name,l.aliases)+" - "+h}),identifyOnResolve(l){return typeof l=="boolean"&&(r=l),r},resolve:(l,h)=>{for(const f of u().map(g=>g.middleware).reverse())l=f(l,h);return r&&console.log(p.identify()),l}};return p},qr={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},zr={high:3,normal:2,low:1};class Cn{config;middlewareStack=Be();initConfig;handlers;constructor(e){this.config=e;const{protocol:r,protocolSettings:n}=e;n&&typeof r=="function"&&(e.protocol=new r(n))}send(e,r,n){const s=typeof r!="function"?r:void 0,i=typeof r=="function"?r:n,o=s===void 0&&this.config.cacheMiddleware===!0;let a;if(o){this.handlers||(this.handlers=new WeakMap);const c=this.handlers;c.has(e.constructor)?a=c.get(e.constructor):(a=e.resolveMiddleware(this.middlewareStack,this.config,s),c.set(e.constructor,a))}else delete this.handlers,a=e.resolveMiddleware(this.middlewareStack,this.config,s);if(i)a(e).then(c=>i(null,c.output),c=>i(c)).catch(()=>{});else return a(e).then(c=>c.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class ne extends Uint8Array{static fromString(e,r="utf-8"){if(typeof e=="string")return r==="base64"?ne.mutate(Ke(e)):ne.mutate(me(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,ne.prototype),e}transformToString(e="utf-8"){return e==="base64"?_e(this):Cr(this)}}const An={},yr={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),An[t]=e,yr[e]=t}function $o(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 n=t.slice(r,r+2).toLowerCase();if(n in yr)e[r/2]=yr[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return e}function se(t){let e="";for(let r=0;r<t.byteLength;r++)e+=An[t[r]];return e}const wr=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return ne.mutate(t);if(!t)return ne.mutate(new Uint8Array);const r=e.streamCollector(t);return ne.mutate(await r)},Fe=t=>typeof t=="function"?t():t,we=t=>t[gr]||(t[gr]={}),G=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},$n=(t,e,r,n,s)=>({name:e,namespace:t,traits:r,input:n,output:s}),Po=t=>(e,r)=>async n=>{const{response:s}=await e(n),{operationSchema:i}=we(r),[,o,a,c,u,p]=i??[];try{const l=await t.protocol.deserializeResponse($n(o,a,c,u,p),{...t,...r},s);return{response:s,output:l}}catch(l){if(Object.defineProperty(l,"$response",{value:s,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in l)){const h="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{l.message+=`
|
|
3
|
+
`+h}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(h):r.logger?.warn?.(h)}typeof l.$responseBodyText<"u"&&l.$response&&(l.$response.body=l.$responseBodyText);try{if(fe.isInstance(s)){const{headers:f={}}=s,g=Object.entries(f);l.$metadata={httpStatusCode:s.statusCode,requestId:sr(/^x-[\w-]+-request-?id$/,g),extendedRequestId:sr(/^x-[\w-]+-id-2$/,g),cfId:sr(/^x-[\w-]+-cf-id$/,g)}}}catch{}}throw l}},sr=(t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],Ro=t=>(e,r)=>async n=>{const{operationSchema:s}=we(r),[,i,o,a,c,u]=s??[],p=r.endpointV2?.url&&t.urlParser?async()=>t.urlParser(r.endpointV2.url):t.endpoint,l=await t.protocol.serializeRequest($n(i,o,a,c,u),n.input,{...t,...r,endpoint:p});return e({...n,request:l})},To={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Io={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Oo(t){return{applyToStack:e=>{e.add(Ro(t),Io),e.add(Po(t),To),t.protocol.setSerdeContext(t)}}}function xe(t){if(typeof t=="object")return t;t=t|0;const e={};let r=0;for(const n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(t>>r++&1)===1&&(e[n]=1);return e}const Hr={it:Symbol.for("@smithy/nor-struct-it")};class T{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=T.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,r){this.ref=e,this.memberName=r;const n=[];let s=e,i=e;for(this._isMemberSchema=!1;ir(s);)n.push(s[1]),s=s[0],i=Fe(s),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let o=n.length-1;o>=0;--o){const a=n[o];Object.assign(this.memberTraits,xe(a))}}else this.memberTraits=0;if(i instanceof T){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=Fe(i),Uo(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=Fe(e);if(r instanceof T)return r;if(ir(r)){const[n,s]=r;if(n instanceof T)return Object.assign(n.getMergedTraits(),xe(s)),n;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new T(r)}getSchema(){const e=this.schema;return 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()[0];return e===3||e===-3||e===4}isUnionSchema(){return this.getSchema()[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 xe(this.memberTraits)}getOwnTraits(){return xe(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 n=this.getSchema(),s=e?15:n[4]??0;return Ee([s,0],"key")}getValueSchema(){const e=this.getSchema(),[r,n,s]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i=typeof e=="number"?63&e:e&&typeof e=="object"&&(n||s)?e[3+e[0]]:r?15:void 0;if(i!=null)return Ee([i,0],n?"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 n=r[4].indexOf(e),s=r[5][n];return Ee(ir(s)?s:[s,0],e)}if(this.isDocumentSchema())return Ee([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[r,n]of this.structIterator())e[r]=n}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 n=e[Hr.it];if(n&&r===n.length){yield*n;return}n=Array(r);for(let s=0;s<r;++s){const i=e[4][s],o=Ee([e[5][s],0],i);yield n[s]=[i,o]}e[Hr.it]=n}}function Ee(t,e){if(t instanceof T)return Object.assign(t,{memberName:e,_isMemberSchema:!0});const r=T;return new r(t,e)}const ir=t=>Array.isArray(t)&&t.length===2,Uo=t=>Array.isArray(t)&&t.length>=5;class m{namespace;schemas;exceptions;static registries=new Map;constructor(e,r=new Map,n=new Map){this.namespace=e,this.schemas=r,this.exceptions=n}static for(e){return m.registries.has(e)||m.registries.set(e,new m(e)),m.registries.get(e)}register(e,r){const n=this.normalizeShapeId(e);m.for(n.split("#")[0]).schemas.set(n,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 n=e,s=m.for(n[1]);s.schemas.set(n[1]+"#"+n[2],n),s.exceptions.set(n,r)}getErrorCtor(e){const r=e;return m.for(r[1]).exceptions.get(r)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,r,n]=e,s=r+"#"+n;if(s.startsWith("smithy.ts.sdk.synthetic.")&&s.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 Pn=t=>{if(t!=null){if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return String(e)!==String(t)&&Bo.warn(_o(`Expected number but observed string: ${t}`)),e}if(typeof t=="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)}},ko=Math.ceil(2**127*(2-2**-23)),Mo=t=>{const e=Pn(t);if(e!==void 0&&!Number.isNaN(e)&&e!==1/0&&e!==-1/0&&Math.abs(e)>ko)throw new TypeError(`Expected 32-bit float, got ${t}`);return e},No=t=>{if(t!=null){if(Number.isInteger(t)&&!Number.isNaN(t))return t;throw new TypeError(`Expected integer, got ${typeof t}: ${t}`)}},Do=t=>Rn(t,16),jo=t=>Rn(t,8),Rn=(t,e)=>{const r=No(t);if(r!==void 0&&Fo(r,e)!==r)throw new TypeError(`Expected ${e}-bit integer, got ${t}`);return r},Fo=(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]}},Lo=t=>Pn(typeof t=="string"?Qe(t):t),qo=t=>Mo(typeof t=="string"?Qe(t):t),zo=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Qe=t=>{const e=t.match(zo);if(e===null||e[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)},We=t=>Do(typeof t=="string"?Qe(t):t),Ho=t=>jo(typeof t=="string"?Qe(t):t),_o=t=>String(new TypeError(t).stack||t).split(`
|
|
4
4
|
`).slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join(`
|
|
5
|
-
`),_o={warn:console.warn},Bo=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ar=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Wo(t){const e=t.getUTCFullYear(),r=t.getUTCMonth(),n=t.getUTCDay(),s=t.getUTCDate(),i=t.getUTCHours(),o=t.getUTCMinutes(),a=t.getUTCSeconds(),c=s<10?`0${s}`:`${s}`,u=i<10?`0${i}`:`${i}`,p=o<10?`0${o}`:`${o}`,l=a<10?`0${a}`:`${a}`;return`${Bo[n]}, ${c} ${Ar[r]} ${e} ${u}:${p}:${l} GMT`}const Vo=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Go=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=Vo.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,s,i,o,a,c,u,p]=e,l=We(Te(n)),h=Q(s,"month",1,12),f=Q(i,"day",1,31),g=Le(l,h,f,{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u});return p.toUpperCase()!="Z"&&g.setTime(g.getTime()-oa(p)),g},Jo=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$/),Ko=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$/),Qo=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})$/),Yo=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=Jo.exec(t);if(e){const[r,n,s,i,o,a,c,u]=e;return Le(We(Te(i)),or(s),Q(n,"day",1,31),{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u})}if(e=Ko.exec(t),e){const[r,n,s,i,o,a,c,u]=e;return ta(Le(Xo(i),or(s),Q(n,"day",1,31),{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u}))}if(e=Qo.exec(t),e){const[r,n,s,i,o,a,c,u]=e;return Le(We(Te(u)),or(n),Q(s.trimLeft(),"day",1,31),{hours:i,minutes:o,seconds:a,fractionalMilliseconds:c})}throw new TypeError("Invalid RFC-7231 date-time value")},Zo=t=>{if(t==null)return;let e;if(typeof t=="number")e=t;else if(typeof t=="string")e=Fo(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))},Le=(t,e,r,n)=>{const s=e-1;return na(t,s,r),new Date(Date.UTC(t,s,r,Q(n.hours,"hour",0,23),Q(n.minutes,"minute",0,59),Q(n.seconds,"seconds",0,60),ia(n.fractionalMilliseconds)))},Xo=t=>{const e=new Date().getUTCFullYear(),r=Math.floor(e/100)*100+We(Te(t));return r<e?r+100:r},ea=50*365*24*60*60*1e3,ta=t=>t.getTime()-new Date().getTime()>ea?new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())):t,or=t=>{const e=Ar.indexOf(t);if(e<0)throw new TypeError(`Invalid month: ${t}`);return e+1},ra=[31,28,31,30,31,30,31,31,30,31,30,31],na=(t,e,r)=>{let n=ra[e];if(e===1&&sa(t)&&(n=29),r>n)throw new TypeError(`Invalid day for ${Ar[e]} in ${t}: ${r}`)},sa=t=>t%4===0&&(t%100!==0||t%400===0),Q=(t,e,r,n)=>{const s=zo(Te(t));if(s<r||s>n)throw new TypeError(`${e} must be between ${r} and ${n}, inclusive`);return s},ia=t=>t==null?0:Lo("0."+t)*1e3,oa=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 n=Number(t.substring(1,3)),s=Number(t.substring(4,6));return r*(n*60+s)*60*1e3},Te=t=>{let e=0;for(;e<t.length-1&&t.charAt(e)==="0";)e++;return e===0?t:t.slice(e)},Hr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),U=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0")),Rn=()=>{if(Hr)return Hr();const t=new Uint8Array(16);return crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128,U[t[0]]+U[t[1]]+U[t[2]]+U[t[3]]+"-"+U[t[4]]+U[t[5]]+"-"+U[t[6]]+U[t[7]]+"-"+U[t[8]]+U[t[9]]+"-"+U[t[10]]+U[t[11]]+U[t[12]]+U[t[13]]+U[t[14]]+U[t[15]]},K=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};K.from=t=>t&&typeof t=="object"&&(t instanceof K||"deserializeJSON"in t)?t:typeof t=="string"||Object.getPrototypeOf(t)===String.prototype?K(String(t)):K(JSON.stringify(t));K.fromObject=K.from;const _r=/^-?\d*(\.\d+)?$/;class W{string;type;constructor(e,r){if(this.string=e,this.type=r,!_r.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 W.prototype.isPrototypeOf(e)||r.type==="bigDecimal"&&_r.test(r.string)}}class aa{serdeContext;setSerdeContext(e){this.serdeContext=e}}class ca extends aa{options;constructor(e){super(),this.options=e}getRequestType(){return D}getResponseType(){return fe}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[n,s]of r.url.searchParams.entries())e.query[n]=s;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,n){if(this.serdeContext?.disableHostPrefix)return;const s=T.of(r.input),i=xe(r.traits??{});if(i.endpoint){let o=i.endpoint?.[0];if(typeof o=="string"){const a=[...s.structIterator()].filter(([,c])=>c.getMergedTraits().hostLabel);for(const[c]of a){const u=n[c];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${c} in input must be a string as hostLabel.`);o=o.replace(`{${c}}`,u)}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:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:r,initialRequest:n})}async deserializeEventStream({response:e,responseSchema:r,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:r,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await lo(async()=>{const{EventStreamSerde:r}=await import("./index-BVSKv1jw-BvgeZRdK.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,n,s,i){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class ua extends ca{async serializeRequest(e,r,n){const s=this.serializer,i={},o={},a=await n.endpoint(),c=T.of(e?.input),u=c.getSchema();let p;const l=new D({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:i,headers:o,body:void 0});a&&(this.updateServiceEndpoint(l,a),this.setHostPrefix(l,e,r));const h={...r};if(r){const f=c.getEventStreamMember();if(f){if(h[f]){const g={};for(const[y,b]of c.structIterator())y!==f&&h[y]&&(s.write(b,h[y]),g[y]=s.flush());p=await this.serializeEventStream({eventStream:h[f],requestSchema:c,initialRequest:g})}}else s.write(u,h),p=s.flush()}return l.headers=o,l.query=i,l.body=p,l.method="POST",l}async deserializeResponse(e,r,n){const s=this.deserializer,i=T.of(e.output),o={};if(n.statusCode>=300){const c=await wr(n.body,r);throw c.byteLength>0&&Object.assign(o,await s.read(15,c)),await this.handleError(e,r,n,o,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const c in n.headers){const u=n.headers[c];delete n.headers[c],n.headers[c.toLowerCase()]=u}const a=i.getEventStreamMember();if(a)o[a]=await this.deserializeEventStream({response:n,responseSchema:i,initialResponseContainer:o});else{const c=await wr(n.body,r);c.byteLength>0&&Object.assign(o,await s.read(i,c))}return o.$metadata=this.deserializeMetadata(n),o}}function Tn(t,e){if(e.timestampFormat.useTrait&&t.isTimestampSchema()&&(t.getSchema()===5||t.getSchema()===6||t.getSchema()===7))return t.getSchema();const{httpLabel:r,httpPrefixHeaders:n,httpHeader:s,httpQuery:i}=t.getMergedTraits();return(e.httpBindings?typeof n=="string"||s?6:i||r?5:void 0:void 0)??e.timestampFormat.default}const ar="***SensitiveInformation***";function br(t,e){if(e==null)return e;const r=T.of(t);if(r.getMergedTraits().sensitive)return ar;if(r.isListSchema()){if(r.getValueSchema().getMergedTraits().sensitive)return ar}else if(r.isMapSchema()){if(r.getKeySchema().getMergedTraits().sensitive||r.getValueSchema().getMergedTraits().sensitive)return ar}else if(r.isStructSchema()&&typeof e=="object"){const n=e,s={};for(const[i,o]of r.structIterator())n[i]!=null&&(s[i]=br(o,n[i]));return s}return e}class N{middlewareStack=Be();schema;static classBuilder(){return new da}resolveMiddlewareWithContext(e,r,n,{middlewareFn:s,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:u,additionalContext:p,CommandCtor:l}){for(const b of s.bind(this)(l,e,r,n))this.middlewareStack.use(b);const h=e.concat(this.middlewareStack),{logger:f}=r,g={logger:f,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[gr]:{commandInstance:this,...u},...p},{requestHandler:y}=r;return h.resolve(b=>y.handle(b.request,n||{}),g)}}class da{_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,n={}){return this._smithyContext={service:e,operation:r,...n},this}c(e={}){return this._additionalContext=e,this}n(e,r){return this._clientName=e,this._commandName=r,this}f(e=n=>n,r=n=>n){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 N{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[n]){super(),this.input=n??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,s,i){const o=e._operationSchema,a=o?.[4]??o?.input,c=o?.[5]??o?.output;return this.resolveMiddlewareWithContext(n,s,i,{CommandCtor:r,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(o?br.bind(null,a):u=>u),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(o?br.bind(null,c):u=>u),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}class pe 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 pe.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===pe?pe.isInstance(e):pe.isInstance(e)?r.name&&this.name?this.prototype.isPrototypeOf(e)||r.name===this.name:this.prototype.isPrototypeOf(e):!1}}const Br=(t,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,s])=>{(t[n]==null||t[n]==="")&&(t[n]=s)});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t},la=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{}}},pa=t=>{const e=[];for(const r in He){const n=He[r];t[n]!==void 0&&e.push({algorithmId:()=>n,checksumConstructor:()=>t[n]})}return{addChecksumAlgorithm(r){e.push(r)},checksumAlgorithms(){return e}}},ha=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},fa=t=>({setRetryStrategy(e){t.retryStrategy=e},retryStrategy(){return t.retryStrategy}}),ma=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},ga=t=>Object.assign(pa(t),fa(t)),ya=t=>Object.assign(ha(t),ma(t));class In{trace(){}debug(){}info(){}warn(){}error(){}}const wa=(t,e)=>{if(!e||e.length===0)return t;const r=[];for(const n of e)for(const s of t)s.schemeId.split("#")[1]===n&&r.push(s);for(const n of t)r.find(({schemeId:s})=>s===n.schemeId)||r.push(n);return r};function ba(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const Ea=(t,e)=>(r,n)=>async s=>{const i=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,n,s.input)),o=t.authSchemePreference?await t.authSchemePreference():[],a=wa(i,o),c=ba(t.httpAuthSchemes),u=we(n),p=[];for(const l of a){const h=c.get(l.schemeId);if(!h){p.push(`HttpAuthScheme \`${l.schemeId}\` was not enabled for this service.`);continue}const f=h.identityProvider(await e.identityProviderConfigProvider(t));if(!f){p.push(`HttpAuthScheme \`${l.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:g={},signingProperties:y={}}=l.propertiesExtractor?.(t,n)||{};l.identityProperties=Object.assign(l.identityProperties||{},g),l.signingProperties=Object.assign(l.signingProperties||{},y),u.selectedHttpAuthScheme={httpAuthOption:l,identity:await f(l.identityProperties),signer:h.signer};break}if(!u.selectedHttpAuthScheme)throw new Error(p.join(`
|
|
6
|
-
`));return r(s)},Sa={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},xa=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(Ea(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),Sa)}}),va={name:"serializerMiddleware"},Ca=t=>e=>{throw e},Aa=(t,e)=>{},$a=t=>(e,r)=>async n=>{if(!D.isInstance(n.request))return e(n);const s=we(r).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:o,signer:a}=s,c=await e({...n,request:await a.sign(n.request,o,i)}).catch((a.errorHandler||Ca)(i));return(a.successHandler||Aa)(c.response,i),c},Pa={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Ra=t=>({applyToStack:e=>{e.addRelativeTo($a(),Pa)}}),Ae=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e};function Ta(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 Ia{authSchemes=new Map;constructor(e){for(const[r,n]of Object.entries(e))n!==void 0&&this.authSchemes.set(r,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class Oa{async sign(e,r,n){return e}}const Ua=t=>function(e){return On(e)&&e.expiration.getTime()-Date.now()<t},ka=3e5,Ma=Ua(ka),On=t=>t.expiration!==void 0,Na=(t,e,r)=>{if(t===void 0)return;const n=typeof t!="function"?async()=>Promise.resolve(t):t;let s,i,o,a=!1;const c=async u=>{i||(i=n(u));try{s=await i,o=!0,a=!1}finally{i=void 0}return s};return e===void 0?async u=>((!o||u?.forceRefresh)&&(s=await c(u)),s):async u=>((!o||u?.forceRefresh)&&(s=await c(u)),a?s:r(s)?(e(s)&&await c(u),s):(a=!0,s))},Da=t=>e=>async r=>{if(!D.isInstance(r.request))return e(r);const{request:n}=r,{handlerProtocol:s=""}=t.requestHandler.metadata||{};if(s.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let i=n.hostname;n.port!=null&&(i+=`:${n.port}`),n.headers.host=i}return e(r)},ja={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Fa=t=>({applyToStack:e=>{e.add(Da(t),ja)}}),La=()=>(t,e)=>async r=>{try{const n=await t(r),{clientName:s,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,p=c??e.inputFilterSensitiveLog,l=u??e.outputFilterSensitiveLog,{$metadata:h,...f}=n.output;return o?.info?.({clientName:s,commandName:i,input:p(r.input),output:l(f),metadata:h}),n}catch(n){const{clientName:s,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c}=a,u=c??e.inputFilterSensitiveLog;throw o?.error?.({clientName:s,commandName:i,input:u(r.input),error:n,metadata:n.$metadata}),n}},qa={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},za=t=>({applyToStack:e=>{e.add(La(),qa)}}),Ha={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},_a=()=>t=>async e=>t(e),Ba=t=>({applyToStack:e=>{e.add(_a(),Ha)}}),Wa=void 0;function Va(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function Ga(t){const e=Ae(t.userAgentAppId??Wa),{customUserAgent:r}=t;return Object.assign(t,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const n=await e();if(!Va(n)){const s=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof n!="string"?s?.warn("userAgentAppId must be a string or undefined."):n.length>50&&s?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}class Ja{capacity;data=new Map;parameters=[];constructor({size:e,params:r}){this.capacity=e??50,r&&(this.parameters=r)}get(e,r){const n=this.hash(e);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const s=this.data.keys();let i=0;for(;;){const{value:o,done:a}=s.next();if(this.data.delete(o),a||++i>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(e){let r="";const{parameters:n}=this;if(n.length===0)return!1;for(const s of n){const i=String(e[s]??"");if(i.includes("|;"))return!1;r+=i+"|;"}return r}}const Ka=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}$"),Un=t=>Ka.test(t)||t.startsWith("[")&&t.endsWith("]"),Qa=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Ye=(t,e=!1)=>{if(!e)return Qa.test(t);const r=t.split(".");for(const n of r)if(!Ye(n))return!1;return!0},Ve={},Ie="endpoints";function Y(t){return typeof t!="object"||t==null?t:"ref"in t?`$${Y(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(Y).join(", ")})`:JSON.stringify(t,null,2)}class j extends Error{constructor(e){super(e),this.name="EndpointError"}}const Ya=(t,e)=>t===e,Za=t=>{const e=t.split("."),r=[];for(const n of e){const s=n.indexOf("[");if(s!==-1){if(n.indexOf("]")!==n.length-1)throw new j(`Path: '${t}' does not end with ']'`);const i=n.slice(s+1,-1);if(Number.isNaN(parseInt(i)))throw new j(`Invalid array index: '${i}' in path: '${t}'`);s!==0&&r.push(n.slice(0,s)),r.push(i)}else r.push(n)}return r},kn=(t,e)=>Za(e).reduce((r,n)=>{if(typeof r!="object")throw new j(`Index '${n}' in '${e}' not found in '${JSON.stringify(t)}'`);return Array.isArray(r)?r[parseInt(n)]:r[n]},t),Xa=t=>t!=null,ec=t=>!t,cr={[Pe.HTTP]:80,[Pe.HTTPS]:443},tc=t=>{const e=(()=>{try{if(t instanceof URL)return t;if(typeof t=="object"&&"hostname"in t){const{hostname:h,port:f,protocol:g="",path:y="",query:b={}}=t,$=new URL(`${g}//${h}${f?`:${f}`:""}${y}`);return $.search=Object.entries(b).map(([C,I])=>`${C}=${I}`).join("&"),$}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:n,hostname:s,pathname:i,protocol:o,search:a}=e;if(a)return null;const c=o.slice(0,-1);if(!Object.values(Pe).includes(c))return null;const u=Un(s),p=r.includes(`${n}:${cr[c]}`)||typeof t=="string"&&t.includes(`${n}:${cr[c]}`),l=`${n}${p?`:${cr[c]}`:""}`;return{scheme:c,authority:l,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:u}},rc=(t,e)=>t===e,nc=(t,e,r,n)=>e>=r||t.length<r?null:n?t.substring(t.length-r,t.length-e):t.substring(e,r),sc=t=>encodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),ic={booleanEquals:Ya,getAttr:kn,isSet:Xa,isValidHostLabel:Ye,not:ec,parseURL:tc,stringEquals:rc,substring:nc,uriEncode:sc},Mn=(t,e)=>{const r=[],n={...e.endpointParams,...e.referenceRecord};let s=0;for(;s<t.length;){const i=t.indexOf("{",s);if(i===-1){r.push(t.slice(s));break}r.push(t.slice(s,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)),s=o+2);const a=t.substring(i+1,o);if(a.includes("#")){const[c,u]=a.split("#");r.push(kn(n[c],u))}else r.push(n[a]);s=o+1}return r.join("")},oc=({ref:t},e)=>({...e.endpointParams,...e.referenceRecord})[t],Ze=(t,e,r)=>{if(typeof t=="string")return Mn(t,r);if(t.fn)return Dn.callFunction(t,r);if(t.ref)return oc(t,r);throw new j(`'${e}': ${String(t)} is not a string, function or reference.`)},Nn=({fn:t,argv:e},r)=>{const n=e.map(i=>["boolean","number"].includes(typeof i)?i:Dn.evaluateExpression(i,"arg",r)),s=t.split(".");return s[0]in Ve&&s[1]!=null?Ve[s[0]][s[1]](...n):ic[t](...n)},Dn={evaluateExpression:Ze,callFunction:Nn},ac=({assign:t,...e},r)=>{if(t&&t in r.referenceRecord)throw new j(`'${t}' is already defined in Reference Record.`);const n=Nn(e,r);return r.logger?.debug?.(`${Ie} evaluateCondition: ${Y(e)} = ${Y(n)}`),{result:n===""?!0:!!n,...t!=null&&{toAssign:{name:t,value:n}}}},$r=(t=[],e)=>{const r={};for(const n of t){const{result:s,toAssign:i}=ac(n,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!s)return{result:s};i&&(r[i.name]=i.value,e.logger?.debug?.(`${Ie} assign: ${i.name} := ${Y(i.value)}`))}return{result:!0,referenceRecord:r}},cc=(t,e)=>Object.entries(t).reduce((r,[n,s])=>({...r,[n]:s.map(i=>{const o=Ze(i,"Header value entry",e);if(typeof o!="string")throw new j(`Header '${n}' value '${o}' is not a string`);return o})}),{}),jn=(t,e)=>Object.entries(t).reduce((r,[n,s])=>({...r,[n]:Ln.getEndpointProperty(s,e)}),{}),Fn=(t,e)=>{if(Array.isArray(t))return t.map(r=>Fn(r,e));switch(typeof t){case"string":return Mn(t,e);case"object":if(t===null)throw new j(`Unexpected endpoint property: ${t}`);return Ln.getEndpointProperties(t,e);case"boolean":return t;default:throw new j(`Unexpected endpoint property type: ${typeof t}`)}},Ln={getEndpointProperty:Fn,getEndpointProperties:jn},uc=(t,e)=>{const r=Ze(t,"Endpoint URL",e);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new j(`Endpoint URL must be a string, got ${typeof r}`)},dc=(t,e)=>{const{conditions:r,endpoint:n}=t,{result:s,referenceRecord:i}=$r(r,e);if(!s)return;const o={...e,referenceRecord:{...e.referenceRecord,...i}},{url:a,properties:c,headers:u}=n;return e.logger?.debug?.(`${Ie} Resolving endpoint from template: ${Y(n)}`),{...u!=null&&{headers:cc(u,o)},...c!=null&&{properties:jn(c,o)},url:uc(a,o)}},lc=(t,e)=>{const{conditions:r,error:n}=t,{result:s,referenceRecord:i}=$r(r,e);if(s)throw new j(Ze(n,"Error",{...e,referenceRecord:{...e.referenceRecord,...i}}))},qn=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const n=dc(r,e);if(n)return n}else if(r.type==="error")lc(r,e);else if(r.type==="tree"){const n=zn.evaluateTreeRule(r,e);if(n)return n}else throw new j(`Unknown endpoint rule: ${r}`);throw new j("Rules evaluation failed")},pc=(t,e)=>{const{conditions:r,rules:n}=t,{result:s,referenceRecord:i}=$r(r,e);if(s)return zn.evaluateRules(n,{...e,referenceRecord:{...e.referenceRecord,...i}})},zn={evaluateRules:qn,evaluateTreeRule:pc},hc=(t,e)=>{const{endpointParams:r,logger:n}=e,{parameters:s,rules:i}=t;e.logger?.debug?.(`${Ie} Initial EndpointParams: ${Y(r)}`);const o=Object.entries(s).filter(([,u])=>u.default!=null).map(([u,p])=>[u,p.default]);if(o.length>0)for(const[u,p]of o)r[u]=r[u]??p;const a=Object.entries(s).filter(([,u])=>u.required).map(([u])=>u);for(const u of a)if(r[u]==null)throw new j(`Missing required parameter: '${u}'`);const c=qn(i,{endpointParams:r,logger:n,referenceRecord:{}});return e.logger?.debug?.(`${Ie} Resolved endpoint: ${Y(c)}`),c},Hn=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!Hn(r))return!1;return!0}return!(!Ye(t)||t.length<3||t.length>63||t!==t.toLowerCase()||Un(t))},Wr=":",fc="/",mc=t=>{const e=t.split(Wr);if(e.length<6)return null;const[r,n,s,i,o,...a]=e;if(r!=="arn"||n===""||s===""||a.join(Wr)==="")return null;const c=a.map(u=>u.split(fc)).flat();return{partition:n,service:s,region:i,accountId:o,resourceId:c}},gc=[{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:"EU (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)"}}}],yc={partitions:gc};let wc=yc;const bc=t=>{const{partitions:e}=wc;for(const n of e){const{regions:s,outputs:i}=n;for(const[o,a]of Object.entries(s))if(o===t)return{...i,...a}}for(const n of e){const{regionRegex:s,outputs:i}=n;if(new RegExp(s).test(t))return{...i}}const r=e.find(n=>n.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}},_n={isVirtualHostableS3Bucket:Hn,parseArn:mc,partition:bc};Ve.aws=_n;function Ec(t){const e={};if(t=t.replace(/^\?/,""),t)for(const r of t.split("&")){let[n,s=null]=r.split("=");n=decodeURIComponent(n),s&&(s=decodeURIComponent(s)),n in e?Array.isArray(e[n])?e[n].push(s):e[n]=[e[n],s]:e[n]=s}return e}const Ge=t=>{if(typeof t=="string")return Ge(new URL(t));const{hostname:e,pathname:r,port:n,protocol:s,search:i}=t;let o;return i&&(o=Ec(i)),{hostname:e,port:n?parseInt(n):void 0,protocol:s,path:r,query:o}};function Sc(t,e,r){return t.$source||(t.$source={}),t.$source[e]=r,t}function _(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 Vr=t=>fe.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Bn=t=>new Date(Date.now()+t),xc=(t,e)=>Math.abs(Bn(e).getTime()-t)>=3e5,Gr=(t,e)=>{const r=Date.parse(t);return xc(r,e)?r-Date.now():e},$e=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},vc=async t=>{const e=$e("context",t.context),r=$e("config",t.config),n=e.endpointV2?.properties?.authSchemes?.[0],s=await $e("signer",r.signer)(n),i=t?.signingRegion,o=t?.signingRegionSet,a=t?.signingName;return{config:r,signer:s,signingRegion:i,signingRegionSet:o,signingName:a}};class Cc{async sign(e,r,n){if(!D.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const s=await vc(n),{config:i,signer:o}=s;let{signingRegion:a,signingName:c}=s;const u=n.context;if(u?.authSchemes?.length??!1){const[p,l]=u.authSchemes;p?.name==="sigv4a"&&l?.name==="sigv4"&&(a=l?.signingRegion??a,c=l?.signingName??c)}return await o.sign(e,{signingDate:Bn(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return r=>{const n=r.ServerTime??Vr(r.$response);if(n){const s=$e("config",e.config),i=s.systemClockOffset;s.systemClockOffset=Gr(n,s.systemClockOffset),s.systemClockOffset!==i&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(e,r){const n=Vr(e);if(n){const s=$e("config",r.config);s.systemClockOffset=Gr(n,s.systemClockOffset)}}}const Ac="X-Amz-Algorithm",$c="X-Amz-Credential",Wn="X-Amz-Date",Pc="X-Amz-SignedHeaders",Rc="X-Amz-Expires",Vn="X-Amz-Signature",Gn="X-Amz-Security-Token",Jn="authorization",Kn=Wn.toLowerCase(),Tc="date",Ic=[Jn,Kn,Tc],Oc=Vn.toLowerCase(),Er="x-amz-content-sha256",Uc=Gn.toLowerCase(),kc={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},Mc=/^proxy-/,Nc=/^sec-/,ur="AWS4-HMAC-SHA256",Dc="AWS4-HMAC-SHA256-PAYLOAD",jc="UNSIGNED-PAYLOAD",Fc=50,Qn="aws4_request",Lc=3600*24*7,De={},dr=[],lr=(t,e,r)=>`${t}/${e}/${r}/${Qn}`,qc=async(t,e,r,n,s)=>{const i=await Jr(t,e.secretAccessKey,e.accessKeyId),o=`${r}:${n}:${s}:${se(i)}:${e.sessionToken}`;if(o in De)return De[o];for(dr.push(o);dr.length>Fc;)delete De[dr.shift()];let a=`AWS4${e.secretAccessKey}`;for(const c of[r,n,s,Qn])a=await Jr(t,a,c);return De[o]=a},Jr=(t,e,r)=>{const n=new t(e);return n.update(Re(r)),n.digest()},Kr=({headers:t},e,r)=>{const n={};for(const s of Object.keys(t).sort()){if(t[s]==null)continue;const i=s.toLowerCase();(i in kc||e?.has(i)||Mc.test(i)||Nc.test(i))&&(!r||r&&!r.has(i))||(n[i]=t[s].trim().replace(/\s+/g," "))}return n},zc=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",pr=async({headers:t,body:e},r)=>{for(const n of Object.keys(t))if(n.toLowerCase()===Er)return t[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||zc(e)){const n=new r;return n.update(Re(e)),se(await n.digest())}return jc};class Hc{format(e){const r=[];for(const i of Object.keys(e)){const o=me(i);r.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[i]))}const n=new Uint8Array(r.reduce((i,o)=>i+o.byteLength,0));let s=0;for(const i of r)n.set(i,s),s+=i.byteLength;return n}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 n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const s=new Uint8Array(9);return s[0]=5,s.set(e.value.bytes,1),s;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=me(e.value),c=new DataView(new ArrayBuffer(3+a.byteLength));c.setUint8(0,7),c.setUint16(1,a.byteLength,!1);const u=new Uint8Array(c.buffer);return u.set(a,3),u;case"timestamp":const p=new Uint8Array(9);return p[0]=8,p.set(Pr.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!_c.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const l=new Uint8Array(17);return l[0]=9,l.set(Ao(e.value.replace(/\-/g,"")),1),l}}}var Qr;(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"})(Qr||(Qr={}));const _c=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Pr{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 n=7,s=Math.abs(Math.round(e));n>-1&&s>0;n--,s/=256)r[n]=s;return e<0&&Yr(r),new Pr(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&Yr(e),parseInt(se(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function Yr(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Bc=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},Wc=(t,e={})=>{const{headers:r,query:n={}}=D.clone(t);for(const s of Object.keys(r)){const i=s.toLowerCase();(i.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(i)||e.hoistableHeaders?.has(i))&&(n[s]=r[s],delete r[s])}return{...t,headers:r,query:n}},Zr=t=>{t=D.clone(t);for(const e of Object.keys(t.headers))Ic.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},Vc=({query:t={}})=>{const e=[],r={};for(const n of Object.keys(t)){if(n.toLowerCase()===Oc)continue;const s=re(n);e.push(s);const i=t[n];typeof i=="string"?r[s]=`${s}=${re(i)}`:Array.isArray(i)&&(r[s]=i.slice(0).reduce((o,a)=>o.concat([`${s}=${re(a)}`]),[]).sort().join("&"))}return e.sort().map(n=>r[n]).filter(n=>n).join("&")},Gc=t=>Jc(t).toISOString().replace(/\.\d{3}Z$/,"Z"),Jc=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class Kc{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:r,region:n,service:s,sha256:i,uriEscapePath:o=!0}){this.service=s,this.sha256=i,this.uriEscapePath=o,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=G(n),this.credentialProvider=G(r)}createCanonicalRequest(e,r,n){const s=Object.keys(r).sort();return`${e.method}
|
|
5
|
+
`),Bo={warn:console.warn},Wo=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ar=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Vo(t){const e=t.getUTCFullYear(),r=t.getUTCMonth(),n=t.getUTCDay(),s=t.getUTCDate(),i=t.getUTCHours(),o=t.getUTCMinutes(),a=t.getUTCSeconds(),c=s<10?`0${s}`:`${s}`,u=i<10?`0${i}`:`${i}`,p=o<10?`0${o}`:`${o}`,l=a<10?`0${a}`:`${a}`;return`${Wo[n]}, ${c} ${Ar[r]} ${e} ${u}:${p}:${l} GMT`}const Go=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Jo=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=Go.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,s,i,o,a,c,u,p]=e,l=We(Te(n)),h=Q(s,"month",1,12),f=Q(i,"day",1,31),g=Le(l,h,f,{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u});return p.toUpperCase()!="Z"&&g.setTime(g.getTime()-aa(p)),g},Ko=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$/),Qo=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$/),Yo=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})$/),Zo=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=Ko.exec(t);if(e){const[r,n,s,i,o,a,c,u]=e;return Le(We(Te(i)),or(s),Q(n,"day",1,31),{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u})}if(e=Qo.exec(t),e){const[r,n,s,i,o,a,c,u]=e;return ra(Le(ea(i),or(s),Q(n,"day",1,31),{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u}))}if(e=Yo.exec(t),e){const[r,n,s,i,o,a,c,u]=e;return Le(We(Te(u)),or(n),Q(s.trimLeft(),"day",1,31),{hours:i,minutes:o,seconds:a,fractionalMilliseconds:c})}throw new TypeError("Invalid RFC-7231 date-time value")},Xo=t=>{if(t==null)return;let e;if(typeof t=="number")e=t;else if(typeof t=="string")e=Lo(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))},Le=(t,e,r,n)=>{const s=e-1;return sa(t,s,r),new Date(Date.UTC(t,s,r,Q(n.hours,"hour",0,23),Q(n.minutes,"minute",0,59),Q(n.seconds,"seconds",0,60),oa(n.fractionalMilliseconds)))},ea=t=>{const e=new Date().getUTCFullYear(),r=Math.floor(e/100)*100+We(Te(t));return r<e?r+100:r},ta=50*365*24*60*60*1e3,ra=t=>t.getTime()-new Date().getTime()>ta?new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())):t,or=t=>{const e=Ar.indexOf(t);if(e<0)throw new TypeError(`Invalid month: ${t}`);return e+1},na=[31,28,31,30,31,30,31,31,30,31,30,31],sa=(t,e,r)=>{let n=na[e];if(e===1&&ia(t)&&(n=29),r>n)throw new TypeError(`Invalid day for ${Ar[e]} in ${t}: ${r}`)},ia=t=>t%4===0&&(t%100!==0||t%400===0),Q=(t,e,r,n)=>{const s=Ho(Te(t));if(s<r||s>n)throw new TypeError(`${e} must be between ${r} and ${n}, inclusive`);return s},oa=t=>t==null?0:qo("0."+t)*1e3,aa=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 n=Number(t.substring(1,3)),s=Number(t.substring(4,6));return r*(n*60+s)*60*1e3},Te=t=>{let e=0;for(;e<t.length-1&&t.charAt(e)==="0";)e++;return e===0?t:t.slice(e)},_r=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),U=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0")),Tn=()=>{if(_r)return _r();const t=new Uint8Array(16);return crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128,U[t[0]]+U[t[1]]+U[t[2]]+U[t[3]]+"-"+U[t[4]]+U[t[5]]+"-"+U[t[6]]+U[t[7]]+"-"+U[t[8]]+U[t[9]]+"-"+U[t[10]]+U[t[11]]+U[t[12]]+U[t[13]]+U[t[14]]+U[t[15]]},K=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};K.from=t=>t&&typeof t=="object"&&(t instanceof K||"deserializeJSON"in t)?t:typeof t=="string"||Object.getPrototypeOf(t)===String.prototype?K(String(t)):K(JSON.stringify(t));K.fromObject=K.from;const Br=/^-?\d*(\.\d+)?$/;class W{string;type;constructor(e,r){if(this.string=e,this.type=r,!Br.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 W.prototype.isPrototypeOf(e)||r.type==="bigDecimal"&&Br.test(r.string)}}class ca{serdeContext;setSerdeContext(e){this.serdeContext=e}}class ua extends ca{options;constructor(e){super(),this.options=e}getRequestType(){return D}getResponseType(){return fe}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[n,s]of r.url.searchParams.entries())e.query[n]=s;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,n){if(this.serdeContext?.disableHostPrefix)return;const s=T.of(r.input),i=xe(r.traits??{});if(i.endpoint){let o=i.endpoint?.[0];if(typeof o=="string"){const a=[...s.structIterator()].filter(([,c])=>c.getMergedTraits().hostLabel);for(const[c]of a){const u=n[c];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${c} in input must be a string as hostLabel.`);o=o.replace(`{${c}}`,u)}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:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:r,initialRequest:n})}async deserializeEventStream({response:e,responseSchema:r,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:r,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await po(async()=>{const{EventStreamSerde:r}=await import("./index-DYmn2gQ6-CnjFa625.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,n,s,i){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class da extends ua{async serializeRequest(e,r,n){const s=this.serializer,i={},o={},a=await n.endpoint(),c=T.of(e?.input),u=c.getSchema();let p;const l=new D({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:i,headers:o,body:void 0});a&&(this.updateServiceEndpoint(l,a),this.setHostPrefix(l,e,r));const h={...r};if(r){const f=c.getEventStreamMember();if(f){if(h[f]){const g={};for(const[y,b]of c.structIterator())y!==f&&h[y]&&(s.write(b,h[y]),g[y]=s.flush());p=await this.serializeEventStream({eventStream:h[f],requestSchema:c,initialRequest:g})}}else s.write(u,h),p=s.flush()}return l.headers=o,l.query=i,l.body=p,l.method="POST",l}async deserializeResponse(e,r,n){const s=this.deserializer,i=T.of(e.output),o={};if(n.statusCode>=300){const c=await wr(n.body,r);throw c.byteLength>0&&Object.assign(o,await s.read(15,c)),await this.handleError(e,r,n,o,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const c in n.headers){const u=n.headers[c];delete n.headers[c],n.headers[c.toLowerCase()]=u}const a=i.getEventStreamMember();if(a)o[a]=await this.deserializeEventStream({response:n,responseSchema:i,initialResponseContainer:o});else{const c=await wr(n.body,r);c.byteLength>0&&Object.assign(o,await s.read(i,c))}return o.$metadata=this.deserializeMetadata(n),o}}function In(t,e){if(e.timestampFormat.useTrait&&t.isTimestampSchema()&&(t.getSchema()===5||t.getSchema()===6||t.getSchema()===7))return t.getSchema();const{httpLabel:r,httpPrefixHeaders:n,httpHeader:s,httpQuery:i}=t.getMergedTraits();return(e.httpBindings?typeof n=="string"||s?6:i||r?5:void 0:void 0)??e.timestampFormat.default}const ar="***SensitiveInformation***";function br(t,e){if(e==null)return e;const r=T.of(t);if(r.getMergedTraits().sensitive)return ar;if(r.isListSchema()){if(r.getValueSchema().getMergedTraits().sensitive)return ar}else if(r.isMapSchema()){if(r.getKeySchema().getMergedTraits().sensitive||r.getValueSchema().getMergedTraits().sensitive)return ar}else if(r.isStructSchema()&&typeof e=="object"){const n=e,s={};for(const[i,o]of r.structIterator())n[i]!=null&&(s[i]=br(o,n[i]));return s}return e}class N{middlewareStack=Be();schema;static classBuilder(){return new la}resolveMiddlewareWithContext(e,r,n,{middlewareFn:s,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:u,additionalContext:p,CommandCtor:l}){for(const b of s.bind(this)(l,e,r,n))this.middlewareStack.use(b);const h=e.concat(this.middlewareStack),{logger:f}=r,g={logger:f,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[gr]:{commandInstance:this,...u},...p},{requestHandler:y}=r;return h.resolve(b=>y.handle(b.request,n||{}),g)}}class la{_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,n={}){return this._smithyContext={service:e,operation:r,...n},this}c(e={}){return this._additionalContext=e,this}n(e,r){return this._clientName=e,this._commandName=r,this}f(e=n=>n,r=n=>n){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 N{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[n]){super(),this.input=n??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,s,i){const o=e._operationSchema,a=o?.[4]??o?.input,c=o?.[5]??o?.output;return this.resolveMiddlewareWithContext(n,s,i,{CommandCtor:r,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(o?br.bind(null,a):u=>u),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(o?br.bind(null,c):u=>u),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}class pe 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 pe.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===pe?pe.isInstance(e):pe.isInstance(e)?r.name&&this.name?this.prototype.isPrototypeOf(e)||r.name===this.name:this.prototype.isPrototypeOf(e):!1}}const Wr=(t,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,s])=>{(t[n]==null||t[n]==="")&&(t[n]=s)});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t},pa=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{}}},ha=t=>{const e=[];for(const r in He){const n=He[r];t[n]!==void 0&&e.push({algorithmId:()=>n,checksumConstructor:()=>t[n]})}return{addChecksumAlgorithm(r){e.push(r)},checksumAlgorithms(){return e}}},fa=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},ma=t=>({setRetryStrategy(e){t.retryStrategy=e},retryStrategy(){return t.retryStrategy}}),ga=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},ya=t=>Object.assign(ha(t),ma(t)),wa=t=>Object.assign(fa(t),ga(t));class On{trace(){}debug(){}info(){}warn(){}error(){}}const ba=(t,e)=>{if(!e||e.length===0)return t;const r=[];for(const n of e)for(const s of t)s.schemeId.split("#")[1]===n&&r.push(s);for(const n of t)r.find(({schemeId:s})=>s===n.schemeId)||r.push(n);return r};function Ea(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const Sa=(t,e)=>(r,n)=>async s=>{const i=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,n,s.input)),o=t.authSchemePreference?await t.authSchemePreference():[],a=ba(i,o),c=Ea(t.httpAuthSchemes),u=we(n),p=[];for(const l of a){const h=c.get(l.schemeId);if(!h){p.push(`HttpAuthScheme \`${l.schemeId}\` was not enabled for this service.`);continue}const f=h.identityProvider(await e.identityProviderConfigProvider(t));if(!f){p.push(`HttpAuthScheme \`${l.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:g={},signingProperties:y={}}=l.propertiesExtractor?.(t,n)||{};l.identityProperties=Object.assign(l.identityProperties||{},g),l.signingProperties=Object.assign(l.signingProperties||{},y),u.selectedHttpAuthScheme={httpAuthOption:l,identity:await f(l.identityProperties),signer:h.signer};break}if(!u.selectedHttpAuthScheme)throw new Error(p.join(`
|
|
6
|
+
`));return r(s)},xa={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},va=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(Sa(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),xa)}}),Ca={name:"serializerMiddleware"},Aa=t=>e=>{throw e},$a=(t,e)=>{},Pa=t=>(e,r)=>async n=>{if(!D.isInstance(n.request))return e(n);const s=we(r).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:o,signer:a}=s,c=await e({...n,request:await a.sign(n.request,o,i)}).catch((a.errorHandler||Aa)(i));return(a.successHandler||$a)(c.response,i),c},Ra={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Ta=t=>({applyToStack:e=>{e.addRelativeTo(Pa(),Ra)}}),Ae=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e};function Ia(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 Oa{authSchemes=new Map;constructor(e){for(const[r,n]of Object.entries(e))n!==void 0&&this.authSchemes.set(r,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class Ua{async sign(e,r,n){return e}}const ka=t=>function(e){return Un(e)&&e.expiration.getTime()-Date.now()<t},Ma=3e5,Na=ka(Ma),Un=t=>t.expiration!==void 0,Da=(t,e,r)=>{if(t===void 0)return;const n=typeof t!="function"?async()=>Promise.resolve(t):t;let s,i,o,a=!1;const c=async u=>{i||(i=n(u));try{s=await i,o=!0,a=!1}finally{i=void 0}return s};return e===void 0?async u=>((!o||u?.forceRefresh)&&(s=await c(u)),s):async u=>((!o||u?.forceRefresh)&&(s=await c(u)),a?s:r(s)?(e(s)&&await c(u),s):(a=!0,s))},ja=t=>e=>async r=>{if(!D.isInstance(r.request))return e(r);const{request:n}=r,{handlerProtocol:s=""}=t.requestHandler.metadata||{};if(s.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let i=n.hostname;n.port!=null&&(i+=`:${n.port}`),n.headers.host=i}return e(r)},Fa={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},La=t=>({applyToStack:e=>{e.add(ja(t),Fa)}}),qa=()=>(t,e)=>async r=>{try{const n=await t(r),{clientName:s,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,p=c??e.inputFilterSensitiveLog,l=u??e.outputFilterSensitiveLog,{$metadata:h,...f}=n.output;return o?.info?.({clientName:s,commandName:i,input:p(r.input),output:l(f),metadata:h}),n}catch(n){const{clientName:s,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c}=a,u=c??e.inputFilterSensitiveLog;throw o?.error?.({clientName:s,commandName:i,input:u(r.input),error:n,metadata:n.$metadata}),n}},za={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Ha=t=>({applyToStack:e=>{e.add(qa(),za)}}),_a={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Ba=()=>t=>async e=>t(e),Wa=t=>({applyToStack:e=>{e.add(Ba(),_a)}}),Va=void 0;function Ga(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function Ja(t){const e=Ae(t.userAgentAppId??Va),{customUserAgent:r}=t;return Object.assign(t,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const n=await e();if(!Ga(n)){const s=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof n!="string"?s?.warn("userAgentAppId must be a string or undefined."):n.length>50&&s?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}class Ka{capacity;data=new Map;parameters=[];constructor({size:e,params:r}){this.capacity=e??50,r&&(this.parameters=r)}get(e,r){const n=this.hash(e);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const s=this.data.keys();let i=0;for(;;){const{value:o,done:a}=s.next();if(this.data.delete(o),a||++i>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(e){let r="";const{parameters:n}=this;if(n.length===0)return!1;for(const s of n){const i=String(e[s]??"");if(i.includes("|;"))return!1;r+=i+"|;"}return r}}const Qa=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}$"),kn=t=>Qa.test(t)||t.startsWith("[")&&t.endsWith("]"),Ya=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Ye=(t,e=!1)=>{if(!e)return Ya.test(t);const r=t.split(".");for(const n of r)if(!Ye(n))return!1;return!0},Ve={},Ie="endpoints";function Y(t){return typeof t!="object"||t==null?t:"ref"in t?`$${Y(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(Y).join(", ")})`:JSON.stringify(t,null,2)}class j extends Error{constructor(e){super(e),this.name="EndpointError"}}const Za=(t,e)=>t===e,Xa=t=>{const e=t.split("."),r=[];for(const n of e){const s=n.indexOf("[");if(s!==-1){if(n.indexOf("]")!==n.length-1)throw new j(`Path: '${t}' does not end with ']'`);const i=n.slice(s+1,-1);if(Number.isNaN(parseInt(i)))throw new j(`Invalid array index: '${i}' in path: '${t}'`);s!==0&&r.push(n.slice(0,s)),r.push(i)}else r.push(n)}return r},Mn=(t,e)=>Xa(e).reduce((r,n)=>{if(typeof r!="object")throw new j(`Index '${n}' in '${e}' not found in '${JSON.stringify(t)}'`);return Array.isArray(r)?r[parseInt(n)]:r[n]},t),ec=t=>t!=null,tc=t=>!t,cr={[Pe.HTTP]:80,[Pe.HTTPS]:443},rc=t=>{const e=(()=>{try{if(t instanceof URL)return t;if(typeof t=="object"&&"hostname"in t){const{hostname:h,port:f,protocol:g="",path:y="",query:b={}}=t,$=new URL(`${g}//${h}${f?`:${f}`:""}${y}`);return $.search=Object.entries(b).map(([C,I])=>`${C}=${I}`).join("&"),$}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:n,hostname:s,pathname:i,protocol:o,search:a}=e;if(a)return null;const c=o.slice(0,-1);if(!Object.values(Pe).includes(c))return null;const u=kn(s),p=r.includes(`${n}:${cr[c]}`)||typeof t=="string"&&t.includes(`${n}:${cr[c]}`),l=`${n}${p?`:${cr[c]}`:""}`;return{scheme:c,authority:l,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:u}},nc=(t,e)=>t===e,sc=(t,e,r,n)=>e>=r||t.length<r?null:n?t.substring(t.length-r,t.length-e):t.substring(e,r),ic=t=>encodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),oc={booleanEquals:Za,getAttr:Mn,isSet:ec,isValidHostLabel:Ye,not:tc,parseURL:rc,stringEquals:nc,substring:sc,uriEncode:ic},Nn=(t,e)=>{const r=[],n={...e.endpointParams,...e.referenceRecord};let s=0;for(;s<t.length;){const i=t.indexOf("{",s);if(i===-1){r.push(t.slice(s));break}r.push(t.slice(s,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)),s=o+2);const a=t.substring(i+1,o);if(a.includes("#")){const[c,u]=a.split("#");r.push(Mn(n[c],u))}else r.push(n[a]);s=o+1}return r.join("")},ac=({ref:t},e)=>({...e.endpointParams,...e.referenceRecord})[t],Ze=(t,e,r)=>{if(typeof t=="string")return Nn(t,r);if(t.fn)return jn.callFunction(t,r);if(t.ref)return ac(t,r);throw new j(`'${e}': ${String(t)} is not a string, function or reference.`)},Dn=({fn:t,argv:e},r)=>{const n=e.map(i=>["boolean","number"].includes(typeof i)?i:jn.evaluateExpression(i,"arg",r)),s=t.split(".");return s[0]in Ve&&s[1]!=null?Ve[s[0]][s[1]](...n):oc[t](...n)},jn={evaluateExpression:Ze,callFunction:Dn},cc=({assign:t,...e},r)=>{if(t&&t in r.referenceRecord)throw new j(`'${t}' is already defined in Reference Record.`);const n=Dn(e,r);return r.logger?.debug?.(`${Ie} evaluateCondition: ${Y(e)} = ${Y(n)}`),{result:n===""?!0:!!n,...t!=null&&{toAssign:{name:t,value:n}}}},$r=(t=[],e)=>{const r={};for(const n of t){const{result:s,toAssign:i}=cc(n,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!s)return{result:s};i&&(r[i.name]=i.value,e.logger?.debug?.(`${Ie} assign: ${i.name} := ${Y(i.value)}`))}return{result:!0,referenceRecord:r}},uc=(t,e)=>Object.entries(t).reduce((r,[n,s])=>({...r,[n]:s.map(i=>{const o=Ze(i,"Header value entry",e);if(typeof o!="string")throw new j(`Header '${n}' value '${o}' is not a string`);return o})}),{}),Fn=(t,e)=>Object.entries(t).reduce((r,[n,s])=>({...r,[n]:qn.getEndpointProperty(s,e)}),{}),Ln=(t,e)=>{if(Array.isArray(t))return t.map(r=>Ln(r,e));switch(typeof t){case"string":return Nn(t,e);case"object":if(t===null)throw new j(`Unexpected endpoint property: ${t}`);return qn.getEndpointProperties(t,e);case"boolean":return t;default:throw new j(`Unexpected endpoint property type: ${typeof t}`)}},qn={getEndpointProperty:Ln,getEndpointProperties:Fn},dc=(t,e)=>{const r=Ze(t,"Endpoint URL",e);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new j(`Endpoint URL must be a string, got ${typeof r}`)},lc=(t,e)=>{const{conditions:r,endpoint:n}=t,{result:s,referenceRecord:i}=$r(r,e);if(!s)return;const o={...e,referenceRecord:{...e.referenceRecord,...i}},{url:a,properties:c,headers:u}=n;return e.logger?.debug?.(`${Ie} Resolving endpoint from template: ${Y(n)}`),{...u!=null&&{headers:uc(u,o)},...c!=null&&{properties:Fn(c,o)},url:dc(a,o)}},pc=(t,e)=>{const{conditions:r,error:n}=t,{result:s,referenceRecord:i}=$r(r,e);if(s)throw new j(Ze(n,"Error",{...e,referenceRecord:{...e.referenceRecord,...i}}))},zn=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const n=lc(r,e);if(n)return n}else if(r.type==="error")pc(r,e);else if(r.type==="tree"){const n=Hn.evaluateTreeRule(r,e);if(n)return n}else throw new j(`Unknown endpoint rule: ${r}`);throw new j("Rules evaluation failed")},hc=(t,e)=>{const{conditions:r,rules:n}=t,{result:s,referenceRecord:i}=$r(r,e);if(s)return Hn.evaluateRules(n,{...e,referenceRecord:{...e.referenceRecord,...i}})},Hn={evaluateRules:zn,evaluateTreeRule:hc},fc=(t,e)=>{const{endpointParams:r,logger:n}=e,{parameters:s,rules:i}=t;e.logger?.debug?.(`${Ie} Initial EndpointParams: ${Y(r)}`);const o=Object.entries(s).filter(([,u])=>u.default!=null).map(([u,p])=>[u,p.default]);if(o.length>0)for(const[u,p]of o)r[u]=r[u]??p;const a=Object.entries(s).filter(([,u])=>u.required).map(([u])=>u);for(const u of a)if(r[u]==null)throw new j(`Missing required parameter: '${u}'`);const c=zn(i,{endpointParams:r,logger:n,referenceRecord:{}});return e.logger?.debug?.(`${Ie} Resolved endpoint: ${Y(c)}`),c},_n=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!_n(r))return!1;return!0}return!(!Ye(t)||t.length<3||t.length>63||t!==t.toLowerCase()||kn(t))},Vr=":",mc="/",gc=t=>{const e=t.split(Vr);if(e.length<6)return null;const[r,n,s,i,o,...a]=e;if(r!=="arn"||n===""||s===""||a.join(Vr)==="")return null;const c=a.map(u=>u.split(mc)).flat();return{partition:n,service:s,region:i,accountId:o,resourceId:c}},yc=[{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:"EU (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)"}}}],wc={partitions:yc};let bc=wc;const Ec=t=>{const{partitions:e}=bc;for(const n of e){const{regions:s,outputs:i}=n;for(const[o,a]of Object.entries(s))if(o===t)return{...i,...a}}for(const n of e){const{regionRegex:s,outputs:i}=n;if(new RegExp(s).test(t))return{...i}}const r=e.find(n=>n.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}},Bn={isVirtualHostableS3Bucket:_n,parseArn:gc,partition:Ec};Ve.aws=Bn;function Sc(t){const e={};if(t=t.replace(/^\?/,""),t)for(const r of t.split("&")){let[n,s=null]=r.split("=");n=decodeURIComponent(n),s&&(s=decodeURIComponent(s)),n in e?Array.isArray(e[n])?e[n].push(s):e[n]=[e[n],s]:e[n]=s}return e}const Ge=t=>{if(typeof t=="string")return Ge(new URL(t));const{hostname:e,pathname:r,port:n,protocol:s,search:i}=t;let o;return i&&(o=Sc(i)),{hostname:e,port:n?parseInt(n):void 0,protocol:s,path:r,query:o}};function xc(t,e,r){return t.$source||(t.$source={}),t.$source[e]=r,t}function _(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 Gr=t=>fe.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Wn=t=>new Date(Date.now()+t),vc=(t,e)=>Math.abs(Wn(e).getTime()-t)>=3e5,Jr=(t,e)=>{const r=Date.parse(t);return vc(r,e)?r-Date.now():e},$e=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},Cc=async t=>{const e=$e("context",t.context),r=$e("config",t.config),n=e.endpointV2?.properties?.authSchemes?.[0],s=await $e("signer",r.signer)(n),i=t?.signingRegion,o=t?.signingRegionSet,a=t?.signingName;return{config:r,signer:s,signingRegion:i,signingRegionSet:o,signingName:a}};class Ac{async sign(e,r,n){if(!D.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const s=await Cc(n),{config:i,signer:o}=s;let{signingRegion:a,signingName:c}=s;const u=n.context;if(u?.authSchemes?.length??!1){const[p,l]=u.authSchemes;p?.name==="sigv4a"&&l?.name==="sigv4"&&(a=l?.signingRegion??a,c=l?.signingName??c)}return await o.sign(e,{signingDate:Wn(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return r=>{const n=r.ServerTime??Gr(r.$response);if(n){const s=$e("config",e.config),i=s.systemClockOffset;s.systemClockOffset=Jr(n,s.systemClockOffset),s.systemClockOffset!==i&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(e,r){const n=Gr(e);if(n){const s=$e("config",r.config);s.systemClockOffset=Jr(n,s.systemClockOffset)}}}const $c="X-Amz-Algorithm",Pc="X-Amz-Credential",Vn="X-Amz-Date",Rc="X-Amz-SignedHeaders",Tc="X-Amz-Expires",Gn="X-Amz-Signature",Jn="X-Amz-Security-Token",Kn="authorization",Qn=Vn.toLowerCase(),Ic="date",Oc=[Kn,Qn,Ic],Uc=Gn.toLowerCase(),Er="x-amz-content-sha256",kc=Jn.toLowerCase(),Mc={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},Nc=/^proxy-/,Dc=/^sec-/,ur="AWS4-HMAC-SHA256",jc="AWS4-HMAC-SHA256-PAYLOAD",Fc="UNSIGNED-PAYLOAD",Lc=50,Yn="aws4_request",qc=3600*24*7,De={},dr=[],lr=(t,e,r)=>`${t}/${e}/${r}/${Yn}`,zc=async(t,e,r,n,s)=>{const i=await Kr(t,e.secretAccessKey,e.accessKeyId),o=`${r}:${n}:${s}:${se(i)}:${e.sessionToken}`;if(o in De)return De[o];for(dr.push(o);dr.length>Lc;)delete De[dr.shift()];let a=`AWS4${e.secretAccessKey}`;for(const c of[r,n,s,Yn])a=await Kr(t,a,c);return De[o]=a},Kr=(t,e,r)=>{const n=new t(e);return n.update(Re(r)),n.digest()},Qr=({headers:t},e,r)=>{const n={};for(const s of Object.keys(t).sort()){if(t[s]==null)continue;const i=s.toLowerCase();(i in Mc||e?.has(i)||Nc.test(i)||Dc.test(i))&&(!r||r&&!r.has(i))||(n[i]=t[s].trim().replace(/\s+/g," "))}return n},Hc=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",pr=async({headers:t,body:e},r)=>{for(const n of Object.keys(t))if(n.toLowerCase()===Er)return t[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||Hc(e)){const n=new r;return n.update(Re(e)),se(await n.digest())}return Fc};class _c{format(e){const r=[];for(const i of Object.keys(e)){const o=me(i);r.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[i]))}const n=new Uint8Array(r.reduce((i,o)=>i+o.byteLength,0));let s=0;for(const i of r)n.set(i,s),s+=i.byteLength;return n}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 n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const s=new Uint8Array(9);return s[0]=5,s.set(e.value.bytes,1),s;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=me(e.value),c=new DataView(new ArrayBuffer(3+a.byteLength));c.setUint8(0,7),c.setUint16(1,a.byteLength,!1);const u=new Uint8Array(c.buffer);return u.set(a,3),u;case"timestamp":const p=new Uint8Array(9);return p[0]=8,p.set(Pr.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!Bc.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const l=new Uint8Array(17);return l[0]=9,l.set($o(e.value.replace(/\-/g,"")),1),l}}}var Yr;(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"})(Yr||(Yr={}));const Bc=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Pr{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 n=7,s=Math.abs(Math.round(e));n>-1&&s>0;n--,s/=256)r[n]=s;return e<0&&Zr(r),new Pr(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&Zr(e),parseInt(se(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function Zr(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Wc=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},Vc=(t,e={})=>{const{headers:r,query:n={}}=D.clone(t);for(const s of Object.keys(r)){const i=s.toLowerCase();(i.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(i)||e.hoistableHeaders?.has(i))&&(n[s]=r[s],delete r[s])}return{...t,headers:r,query:n}},Xr=t=>{t=D.clone(t);for(const e of Object.keys(t.headers))Oc.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},Gc=({query:t={}})=>{const e=[],r={};for(const n of Object.keys(t)){if(n.toLowerCase()===Uc)continue;const s=re(n);e.push(s);const i=t[n];typeof i=="string"?r[s]=`${s}=${re(i)}`:Array.isArray(i)&&(r[s]=i.slice(0).reduce((o,a)=>o.concat([`${s}=${re(a)}`]),[]).sort().join("&"))}return e.sort().map(n=>r[n]).filter(n=>n).join("&")},Jc=t=>Kc(t).toISOString().replace(/\.\d{3}Z$/,"Z"),Kc=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class Qc{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:r,region:n,service:s,sha256:i,uriEscapePath:o=!0}){this.service=s,this.sha256=i,this.uriEscapePath=o,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=G(n),this.credentialProvider=G(r)}createCanonicalRequest(e,r,n){const s=Object.keys(r).sort();return`${e.method}
|
|
7
7
|
${this.getCanonicalPath(e)}
|
|
8
|
-
${
|
|
8
|
+
${Gc(e)}
|
|
9
9
|
${s.map(i=>`${i}:${r[i]}`).join(`
|
|
10
10
|
`)}
|
|
11
11
|
|
|
@@ -13,5 +13,5 @@ ${s.join(";")}
|
|
|
13
13
|
${n}`}async createStringToSign(e,r,n,s){const i=new this.sha256;i.update(Re(n));const o=await i.digest();return`${s}
|
|
14
14
|
${e}
|
|
15
15
|
${r}
|
|
16
|
-
${se(o)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const r=[];for(const s of e.split("/"))s?.length!==0&&s!=="."&&(s===".."?r.pop():r.push(s));const n=`${e?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&e?.endsWith("/")?"/":""}`;return re(n).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=
|
|
17
|
-
`);return this.signString(g,{signingDate:n,signingRegion:a,signingService:o})}async signMessage(e,{signingDate:r=new Date,signingRegion:n,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:r,signingRegion:n,signingService:s,priorSignature:e.priorSignature}).then(i=>({message:e.message,signature:i}))}async signString(e,{signingDate:r=new Date,signingRegion:n,signingService:s}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=n??await this.regionProvider(),{shortDate:a}=this.formatDate(r),c=new this.sha256(await this.getSigningKey(i,o,a,s));return c.update(Re(e)),se(await c.digest())}async signRequest(e,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:s,signingRegion:i,signingService:o}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const c=i??await this.regionProvider(),u=Zr(e),{longDate:p,shortDate:l}=this.formatDate(r),h=lr(l,c,o??this.service);u.headers[Kn]=p,a.sessionToken&&(u.headers[Uc]=a.sessionToken);const f=await pr(u,this.sha256);!Bc(Er,u.headers)&&this.applyChecksum&&(u.headers[Er]=f);const g=Kr(u,s,n),y=await this.getSignature(p,h,this.getSigningKey(a,c,l,o),this.createCanonicalRequest(u,g,f));return u.headers[Jn]=`${ur} Credential=${a.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(g)}, Signature=${y}`,u}async getSignature(e,r,n,s){const i=await this.createStringToSign(e,r,s,ur),o=new this.sha256(await n);return o.update(Re(i)),se(await o.digest())}getSigningKey(e,r,n,s){return qc(this.sha256,e,n,r,s||this.service)}}const Qc=t=>{let e=t.credentials,r=!!t.credentials,n;Object.defineProperty(t,"credentials",{set(c){c&&c!==e&&c!==n&&(r=!0),e=c;const u=Yc(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),p=Zc(t,u);if(r&&!p.attributed){const l=typeof e=="object"&&e!==null;n=async h=>{const f=await p(h);return l&&(!f.$source||Object.keys(f.$source).length===0)?Sc(f,"CREDENTIALS_CODE","e"):f},n.memoized=p.memoized,n.configBound=p.configBound,n.attributed=!0}else n=p},get(){return n},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:s=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=Ae(t.signer):t.regionInfoProvider?a=()=>Ae(t.region)().then(async c=>[await t.regionInfoProvider(c,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},c]).then(([c,u])=>{const{signingRegion:p,signingService:l}=c;t.signingRegion=t.signingRegion||p||u,t.signingName=t.signingName||l||t.serviceId;const h={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:s},f=t.signerConstructor||Xr;return new f(h)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await Ae(t.region)(),properties:{}},c);const u=c.signingRegion,p=c.signingName;t.signingRegion=t.signingRegion||u,t.signingName=t.signingName||p||t.serviceId;const l={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:s},h=t.signerConstructor||Xr;return new h(l)},Object.assign(t,{systemClockOffset:i,signingEscapePath:s,signer:a})};function Yc(t,{credentials:e,credentialDefaultProvider:r}){let n;return e?e?.memoized?n=e:n=Na(e,Ma,On):r?n=Ae(r(Object.assign({},t,{parentClientConfig:t}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function Zc(t,e){if(e.configBound)return e;const r=async n=>e({...n,callerClientConfig:t});return r.memoized=e.memoized,r.configBound=!0,r}const en=typeof TextEncoder=="function"?new TextEncoder:null,Xc=t=>{if(typeof t=="string"){if(en)return en.encode(t).byteLength;let e=t.length;for(let r=e-1;r>=0;r--){const n=t.charCodeAt(r);n>127&&n<=2047?e++:n>2047&&n<=65535&&(e+=2),n>=56320&&n<=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 eu{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,r){const n=r.getMemberSchemas(),s=Object.values(n).find(i=>!!i.getMergedTraits().httpPayload);if(s)return s.getMergedTraits().mediaType||(s.isStringSchema()?"text/plain":s.isBlobSchema()?"application/octet-stream":e);if(!r.isUnitSchema()&&Object.values(n).find(i=>{const{httpQuery:o,httpQueryParams:a,httpHeader:c,httpLabel:u,httpPrefixHeaders:p}=i.getMergedTraits();return!o&&!a&&!c&&!u&&p===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,r,n,s,i,o){let a=r,c=e;e.includes("#")&&([a,c]=e.split("#"));const u={$metadata:i,$fault:n.statusCode<500?"client":"server"},p=m.for(a);try{return{errorSchema:o?.(p,c)??p.getSchema(e),errorMetadata:u}}catch{s.message=s.message??s.Message??"UnknownError";const l=m.for("smithy.ts.sdk.synthetic."+a),h=l.getBaseException();if(h){const f=l.getErrorCtor(h)??Error;throw this.decorateServiceException(Object.assign(new f({name:c}),u),s)}throw this.decorateServiceException(Object.assign(new Error(c),u),s)}}decorateServiceException(e,r={}){if(this.queryCompat){const n=e.Message??r.Message,s=Br(e,r);n&&(s.message=n),s.Error={...s.Error,Type:s.Error.Type,Code:s.Error.Code,Message:s.Error.message??s.Error.Message??n};const i=s.$metadata.requestId;return i&&(s.RequestId=i),s}return Br(e,r)}setQueryCompatError(e,r){const n=r.headers?.["x-amzn-query-error"];if(e!==void 0&&n!=null){const[s,i]=n.split(";"),o=Object.entries(e),a={Code:s,Type:i};Object.assign(e,a);for(const[c,u]of o)a[c==="message"?"Message":c]=u;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(n=>T.of(n).getMergedTraits().awsQueryError?.[0]===r)}}}class Rr{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*tu(t,e){if(t.isUnitSchema())return;const r=t.getSchema();for(let n=0;n<r[4].length;++n){const s=r[4][n],i=r[5][n],o=new T([i,0],s);!(s in e)&&!o.isIdempotencyToken()||(yield[s,o])}}function*ru(t,e,r){if(t.isUnitSchema())return;const n=t.getSchema();let s=Object.keys(e).filter(i=>i!=="__type").length;for(let i=0;i<n[4].length&&s!==0;++i){const o=n[4][i],a=n[5][i],c=new T([a,0],o);let u=o;r&&(u=c.getMergedTraits()[r]??o),u in e&&(yield[o,c],s-=1)}}class nu{from;to;keys;constructor(e,r){this.from=e,this.to=r,this.keys=new Set(Object.keys(this.from).filter(n=>n!=="__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]}}}function su(t,e,r){if(r?.source){const n=r.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||n!==String(e)))return n.includes(".")?new W(n,"bigDecimal"):BigInt(n)}return e}const iu=(t,e)=>wr(t,e).then(r=>(e?.utf8Encoder??Cr)(r)),ou=(t,e)=>iu(t,e).then(r=>{if(r.length)try{return JSON.parse(r)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:r}),n}return{}}),au=(t,e)=>{const r=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),n=i=>{let o=i;return typeof o=="number"&&(o=o.toString()),o.indexOf(",")>=0&&(o=o.split(",")[0]),o.indexOf(":")>=0&&(o=o.split(":")[0]),o.indexOf("#")>=0&&(o=o.split("#")[1]),o},s=r(t.headers,"x-amzn-errortype");if(s!==void 0)return n(t.headers[s]);if(e&&typeof e=="object"){const i=r(e,"code");if(i&&e[i]!==void 0)return n(e[i]);if(e.__type!==void 0)return n(e.__type)}};class cu extends Rr{settings;constructor(e){super(),this.settings=e}async read(e,r){return this._read(e,typeof r=="string"?JSON.parse(r,su):await ou(r,this.serdeContext))}readObject(e,r){return this._read(e,r)}_read(e,r){const n=r!==null&&typeof r=="object",s=T.of(e);if(n){if(s.isStructSchema()){const o=s.isUnionSchema(),a={};let c;o&&(c=new nu(r,a));for(const[u,p]of ru(s,r,this.settings.jsonName?"jsonName":!1)){const l=this.settings.jsonName?p.getMergedTraits().jsonName??u:u;o&&c.mark(l),r[l]!=null&&(a[u]=this._read(p,r[l]))}return o&&c.writeUnknown(),a}if(Array.isArray(r)&&s.isListSchema()){const o=s.getValueSchema(),a=[],c=!!s.getMergedTraits().sparse;for(const u of r)(c||u!=null)&&a.push(this._read(o,u));return a}if(s.isMapSchema()){const o=s.getValueSchema(),a={},c=!!s.getMergedTraits().sparse;for(const[u,p]of Object.entries(r))(c||p!=null)&&(a[u]=this._read(o,p));return a}}if(s.isBlobSchema()&&typeof r=="string")return Ke(r);const i=s.getMergedTraits().mediaType;if(s.isStringSchema()&&typeof r=="string"&&i)return i==="application/json"||i.endsWith("+json")?K.from(r):r;if(s.isTimestampSchema()&&r!=null)switch(Tn(s,this.settings)){case 5:return Go(r);case 6:return Yo(r);case 7:return Zo(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(s.isBigIntegerSchema()&&(typeof r=="number"||typeof r=="string"))return BigInt(r);if(s.isBigDecimalSchema()&&r!=null){if(r instanceof W)return r;const o=r;return o.type==="bigDecimal"&&"string"in o?new W(o.string,o.type):new W(String(r),"bigDecimal")}if(s.isNumericSchema()&&typeof r=="string"){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return r}if(s.isDocumentSchema())if(n){const o=Array.isArray(r)?[]:{};for(const[a,c]of Object.entries(r))c instanceof W?o[a]=c:o[a]=this._read(s,c);return o}else return structuredClone(r);return r}}const tn="Ν";class uu{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,r)=>{if(r instanceof W){const n=`${tn+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){const n=r.toString(),s=`${tn+"b"+this.counter++}_`+n;return this.values.set(`"${s}"`,n),s}return r}}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[r,n]of this.values)e=e.replace(r,n);return e}}class du extends Rr{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,r){this.rootSchema=T.of(e),this.buffer=this._write(this.rootSchema,r)}writeDiscriminatedDocument(e,r){this.write(e,r),typeof this.buffer=="object"&&(this.buffer.__type=T.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:r}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!r)return JSON.stringify(this.buffer);const n=new uu;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}_write(e,r,n){const s=r!==null&&typeof r=="object",i=T.of(e);if(s){if(i.isStructSchema()){const o={};for(const[a,c]of tu(i,r)){const u=this._write(c,r[a],i);if(u!==void 0){const p=c.getMergedTraits().jsonName,l=this.settings.jsonName?p??a:a;o[l]=u}}if(i.isUnionSchema()&&Object.keys(o).length===0){const{$unknown:a}=r;if(Array.isArray(a)){const[c,u]=a;o[c]=this._write(15,u)}}return o}if(Array.isArray(r)&&i.isListSchema()){const o=i.getValueSchema(),a=[],c=!!i.getMergedTraits().sparse;for(const u of r)(c||u!=null)&&a.push(this._write(o,u));return a}if(i.isMapSchema()){const o=i.getValueSchema(),a={},c=!!i.getMergedTraits().sparse;for(const[u,p]of Object.entries(r))(c||p!=null)&&(a[u]=this._write(o,p));return a}if(r instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?r:(this.serdeContext?.base64Encoder??_e)(r);if(r instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(Tn(i,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return Wo(r);case 7:return r.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",r),r.getTime()/1e3}r instanceof W&&(this.useReplacer=!0)}if(!(r===null&&n?.isStructSchema())){if(i.isStringSchema()){if(typeof r>"u"&&i.isIdempotencyToken())return Rn();const o=i.getMergedTraits().mediaType;return r!=null&&o&&(o==="application/json"||o.endsWith("+json"))?K.from(r):r}if(typeof r=="number"&&i.isNumericSchema())return Math.abs(r)===1/0||isNaN(r)?String(r):r;if(typeof r=="string"&&i.isBlobSchema())return i===this.rootSchema?r:(this.serdeContext?.base64Encoder??_e)(r);if(typeof r=="bigint"&&(this.useReplacer=!0),i.isDocumentSchema())if(s){const o=Array.isArray(r)?[]:{};for(const[a,c]of Object.entries(r))c instanceof W?(this.useReplacer=!0,o[a]=c):o[a]=this._write(i,c);return o}else return structuredClone(r);return r}}}class lu extends Rr{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new du(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new cu(this.settings);return e.setSerdeContext(this.serdeContext),e}}class pu extends ua{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:r,awsQueryCompatible:n,jsonCodec:s}){super({defaultNamespace:e}),this.serviceTarget=r,this.codec=s??new lu({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!n,this.mixin=new eu(this.awsQueryCompatible)}async serializeRequest(e,r,n){const s=await super.serializeRequest(e,r,n);return s.path.endsWith("/")||(s.path+="/"),Object.assign(s.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(s.headers["x-amzn-query-mode"]="true"),(Fe(e.input)==="unit"||!s.body)&&(s.body="{}"),s}getPayloadCodec(){return this.codec}async handleError(e,r,n,s,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(s,n);const o=au(n,s)??"Unknown",{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,n,s,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=T.of(a),p=s.message??s.Message??"Unknown",l=m.for(a[1]).getErrorCtor(a)??Error,h=new l(p),f={};for(const[g,y]of u.structIterator())s[g]!=null&&(f[g]=this.codec.createDeserializer().readObject(y,s[g]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(s,f),this.mixin.decorateServiceException(Object.assign(h,c,{$fault:u.getMergedTraits().error,message:p},f),s)}}class hu extends pu{constructor({defaultNamespace:e,serviceTarget:r,awsQueryCompatible:n,jsonCodec:s}){super({defaultNamespace:e,serviceTarget:r,awsQueryCompatible:n,jsonCodec:s})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const fu=/\d{12}\.ddb/;async function mu(t,e,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&_(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const s=await e.retryStrategy();typeof s.acquireInitialRetryToken=="function"?s.constructor?.name?.includes("Adaptive")?_(t,"RETRY_MODE_ADAPTIVE","F"):_(t,"RETRY_MODE_STANDARD","E"):_(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const s=t.endpointV2;switch(String(s?.url?.hostname).match(fu)&&_(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":_(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":_(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":_(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const s=n;s.accountId&&_(t,"RESOLVED_ACCOUNT_ID","T");for(const[i,o]of Object.entries(s.$source??{}))_(t,i,o)}}const rn="user-agent",hr="x-amz-user-agent",nn=" ",fr="/",gu=/[^!$%&'*+\-.^_`|~\w]/g,yu=/[^!$%&'*+\-.^_`|~\w#]/g,sn="-",wu=1024;function bu(t){let e="";for(const r in t){const n=t[r];if(e.length+n.length+1<=wu){e.length?e+=","+n:e+=n;continue}break}return e}const Eu=t=>(e,r)=>async n=>{const{request:s}=n;if(!D.isInstance(s))return e(n);const{headers:i}=s,o=r?.userAgent?.map(je)||[],a=(await t.defaultUserAgentProvider()).map(je);await mu(r,t,n);const c=r;a.push(`m/${bu(Object.assign({},r.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=t?.customUserAgent?.map(je)||[],p=await t.userAgentAppId();p&&a.push(je(["app",`${p}`]));const l=[].concat([...a,...o,...u]).join(nn),h=[...a.filter(f=>f.startsWith("aws-sdk-")),...u].join(nn);return t.runtime!=="browser"?(h&&(i[hr]=i[hr]?`${i[rn]} ${h}`:h),i[rn]=l):i[hr]=l,e({...n,request:s})},je=t=>{const e=t[0].split(fr).map(o=>o.replace(gu,sn)).join(fr),r=t[1]?.replace(yu,sn),n=e.indexOf(fr),s=e.substring(0,n);let i=e.substring(n+1);return s==="api"&&(i=i.toLowerCase()),[s,i,r].filter(o=>o&&o.length>0).reduce((o,a,c)=>{switch(c){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},Su={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},xu=t=>({applyToStack:e=>{e.add(Eu(t),Su)}}),vu=!1,Cu=!1,on=new Set,Au=(t,e=Ye)=>{if(!on.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 on.add(t)},Yn=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),$u=t=>Yn(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,Pu=t=>{const{region:e,useFipsEndpoint:r}=t;if(!e)throw new Error("Region is missing");return Object.assign(t,{region:async()=>{const n=typeof e=="function"?await e():e,s=$u(n);return Au(s),s},useFipsEndpoint:async()=>{const n=typeof e=="string"?e:await e();return Yn(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},an="content-length";function Ru(t){return e=>async r=>{const n=r.request;if(D.isInstance(n)){const{body:s,headers:i}=n;if(s&&Object.keys(i).map(o=>o.toLowerCase()).indexOf(an)===-1)try{const o=t(s);n.headers={...n.headers,[an]:String(o)}}catch{}}return e({...r,request:n})}}const Tu={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Iu=t=>({applyToStack:e=>{e.add(Ru(t.bodyLengthChecker),Tu)}}),Ou=async t=>{const e=t?.Bucket||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Du(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Nu(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},Uu=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,ku=/(\d+\.){3}\d+/,Mu=/\.\./,Nu=t=>Uu.test(t)&&!ku.test(t)&&!Mu.test(t),Du=t=>{const[e,r,n,,,s]=t.split(":"),i=e==="arn"&&t.split(":").length>=6,o=!!(i&&r&&n&&s);if(i&&!o)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return o},ju=(t,e,r,n=!1)=>{const s=async()=>{let i;return n?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 s();if(i&&typeof i=="object"){if("url"in i)return i.url.href;if("hostname"in i){const{protocol:o,hostname:a,port:c,path:u}=i;return`${o}//${a}${c?":"+c:""}${u}`}}return i}:s},Zn=async t=>{},Xn=t=>typeof t=="object"?"url"in t?Ge(t.url):t:Ge(t),Fu=async(t,e,r,n)=>{if(!r.isCustomEndpoint){let i;r.serviceConfiguredEndpoint?i=await r.serviceConfiguredEndpoint():i=await Zn(r.serviceId),i&&(r.endpoint=()=>Promise.resolve(Xn(i)),r.isCustomEndpoint=!0)}const s=await Lu(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(s,n)},Lu=async(t,e,r)=>{const n={},s=e?.getEndpointParameterInstructions?.()||{};for(const[i,o]of Object.entries(s))switch(o.type){case"staticContextParams":n[i]=o.value;break;case"contextParams":n[i]=t[o.name];break;case"clientContextParams":case"builtInParams":n[i]=await ju(o.name,i,r,o.type!=="builtInParams")();break;case"operationContextParams":n[i]=o.get(t);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return Object.keys(s).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await Ou(n),n},qu=({config:t,instructions:e})=>(r,n)=>async s=>{t.isCustomEndpoint&&Ta(n,"ENDPOINT_OVERRIDE","N");const i=await Fu(s.input,{getEndpointParameterInstructions(){return e}},{...t},n);n.endpointV2=i,n.authSchemes=i.properties?.authSchemes;const o=n.authSchemes?.[0];if(o){n.signing_region=o.signingRegion,n.signing_service=o.signingName;const a=we(n)?.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({...s})},zu={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:va.name},L=(t,e)=>({applyToStack:r=>{r.addRelativeTo(qu({config:t,instructions:e}),zu)}}),Hu=t=>{const e=t.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:s}=t,i=r!=null?async()=>Xn(await G(r)()):void 0,o=Object.assign(t,{endpoint:i,tls:e,isCustomEndpoint:!!r,useDualstackEndpoint:G(n??!1),useFipsEndpoint:G(s??!1)});let a;return o.serviceConfiguredEndpoint=async()=>(t.serviceId&&!a&&(a=Zn(t.serviceId)),a),o};var ge;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(ge||(ge={}));const Je=3,_u=ge.STANDARD,Bu=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Wu=["TimeoutError","RequestTimeout","RequestTimeoutException"],Vu=[500,502,503,504],Gu=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Ju=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Ku=t=>t?.$retryable!==void 0,Qu=t=>t.$metadata?.clockSkewCorrected,Yu=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},es=t=>t.$metadata?.httpStatusCode===429||Bu.includes(t.name)||t.$retryable?.throttling==!0,Tr=(t,e=0)=>Ku(t)||Qu(t)||Wu.includes(t.name)||Gu.includes(t?.code||"")||Ju.includes(t?.code||"")||Vu.includes(t.$metadata?.httpStatusCode||0)||Yu(t)||t.cause!==void 0&&e<=10&&Tr(t.cause,e+1),Zu=t=>{if(t.$metadata?.httpStatusCode!==void 0){const e=t.$metadata.httpStatusCode;return 500<=e&&e<=599&&!Tr(t)}return!1};class Ir{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(n=>Ir.setTimeoutFn(n,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(),es(e)){const s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(n)}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 n=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(e){return parseFloat(e.toFixed(8))}}const Sr=100,ts=20*1e3,Xu=500,cn=500,ed=5,td=10,rd=1,nd="amz-sdk-invocation-id",sd="amz-sdk-request",id=()=>{let t=Sr;return{computeNextBackoffDelay:e=>Math.floor(Math.min(ts,Math.random()*2**e*t)),setDelayBase:e=>{t=e}}},un=({retryDelay:t,retryCount:e,retryCost:r})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(ts,t),getRetryCost:()=>r});class rs{maxAttempts;mode=ge.STANDARD;capacity=cn;retryBackoffStrategy=id();maxAttemptsProvider;constructor(e){this.maxAttempts=e,this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return un({retryDelay:Sr,retryCount:0})}async refreshRetryTokenForRetry(e,r){const n=await this.getMaxAttempts();if(this.shouldRetry(e,r,n)){const s=r.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?Xu:Sr);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),o=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,i):i,a=this.getCapacityCost(s);return this.capacity-=a,un({retryDelay:o,retryCount:e.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(cn,this.capacity+(e.getRetryCost()??rd))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Je}`),Je}}shouldRetry(e,r,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(e){return e==="TRANSIENT"?td:ed}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class od{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=ge.ADAPTIVE;constructor(e,r){this.maxAttemptsProvider=e;const{rateLimiter:n}=r??{};this.rateLimiter=n??new Ir,this.standardRetryStrategy=new rs(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 ad=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}`),cd=t=>{const{retryStrategy:e,retryMode:r,maxAttempts:n}=t,s=G(n??Je);return Object.assign(t,{maxAttempts:s,retryStrategy:async()=>e||(await G(r)()===ge.ADAPTIVE?new od(s):new rs(s))})},ud=t=>t?.body instanceof ReadableStream,dd=t=>(e,r)=>async n=>{let s=await t.retryStrategy();const i=await t.maxAttempts();if(ld(s)){s=s;let o=await s.acquireInitialRetryToken(r.partition_id),a=new Error,c=0,u=0;const{request:p}=n,l=D.isInstance(p);for(l&&(p.headers[nd]=Rn());;)try{l&&(p.headers[sd]=`attempt=${c+1}; max=${i}`);const{response:h,output:f}=await e(n);return s.recordSuccess(o),f.$metadata.attempts=c+1,f.$metadata.totalRetryDelay=u,{response:h,output:f}}catch(h){const f=pd(h);if(a=ad(h),l&&ud(p))throw(r.logger instanceof In?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{o=await s.refreshRetryTokenForRetry(o,f)}catch{throw a.$metadata||(a.$metadata={}),a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=u,a}c=o.getRetryCount();const g=o.getRetryDelay();u+=g,await new Promise(y=>setTimeout(y,g))}}else return s=s,s?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",s.mode]]),s.retry(e,n)},ld=t=>typeof t.acquireInitialRetryToken<"u"&&typeof t.refreshRetryTokenForRetry<"u"&&typeof t.recordSuccess<"u",pd=t=>{const e={error:t,errorType:hd(t)},r=gd(t.$response);return r&&(e.retryAfterHint=r),e},hd=t=>es(t)?"THROTTLING":Tr(t)?"TRANSIENT":Zu(t)?"SERVER_ERROR":"CLIENT_ERROR",fd={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},md=t=>({applyToStack:e=>{e.add(dd(t),fd)}}),gd=t=>{if(!fe.isInstance(t))return;const e=Object.keys(t.headers).find(s=>s.toLowerCase()==="retry-after");if(!e)return;const r=t.headers[e],n=Number(r);return Number.isNaN(n)?new Date(r):new Date(n*1e3)},yd=async(t,e,r)=>({operation:we(e).operation,region:await G(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function wd(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:t.region},propertiesExtractor:(e,r)=>({signingProperties:{config:e,context:r}})}}function A(t){return{schemeId:"smithy.api#noAuth"}}const bd=t=>{const e=[];switch(t.operation){case"AssociateSoftwareToken":{e.push(A());break}case"ChangePassword":{e.push(A());break}case"CompleteWebAuthnRegistration":{e.push(A());break}case"ConfirmDevice":{e.push(A());break}case"ConfirmForgotPassword":{e.push(A());break}case"ConfirmSignUp":{e.push(A());break}case"DeleteUser":{e.push(A());break}case"DeleteUserAttributes":{e.push(A());break}case"DeleteWebAuthnCredential":{e.push(A());break}case"ForgetDevice":{e.push(A());break}case"ForgotPassword":{e.push(A());break}case"GetDevice":{e.push(A());break}case"GetTokensFromRefreshToken":{e.push(A());break}case"GetUser":{e.push(A());break}case"GetUserAttributeVerificationCode":{e.push(A());break}case"GetUserAuthFactors":{e.push(A());break}case"GlobalSignOut":{e.push(A());break}case"InitiateAuth":{e.push(A());break}case"ListDevices":{e.push(A());break}case"ListWebAuthnCredentials":{e.push(A());break}case"ResendConfirmationCode":{e.push(A());break}case"RespondToAuthChallenge":{e.push(A());break}case"RevokeToken":{e.push(A());break}case"SetUserMFAPreference":{e.push(A());break}case"SetUserSettings":{e.push(A());break}case"SignUp":{e.push(A());break}case"StartWebAuthnRegistration":{e.push(A());break}case"UpdateAuthEventFeedback":{e.push(A());break}case"UpdateDeviceStatus":{e.push(A());break}case"UpdateUserAttributes":{e.push(A());break}case"VerifySoftwareToken":{e.push(A());break}case"VerifyUserAttribute":{e.push(A());break}default:e.push(wd(t))}return e},Ed=t=>{const e=Qc(t);return Object.assign(e,{authSchemePreference:G(t.authSchemePreference??[])})},Sd=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),q={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},xd="3.967.0",vd={version:xd},Cd=t=>new TextEncoder().encode(t);var Ad=typeof rr<"u"&&rr.from?function(t){return rr.from(t,"utf8")}:Cd;function Oe(t){return t instanceof Uint8Array?t:typeof t=="string"?Ad(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function xr(t){return typeof t=="string"?t.length===0:t.byteLength===0}var ns={name:"SHA-256"},dn={name:"HMAC",hash:ns},$d=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 Pd={};function qe(){return typeof window<"u"?window:typeof self<"u"?self:Pd}var Rd=(function(){function t(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return t.prototype.update=function(e){if(!xr(e)){var r=Oe(e),n=new Uint8Array(this.toHash.byteLength+r.byteLength);n.set(this.toHash,0),n.set(r,this.toHash.byteLength),this.toHash=n}},t.prototype.digest=function(){var e=this;return this.key?this.key.then(function(r){return qe().crypto.subtle.sign(dn,r,e.toHash).then(function(n){return new Uint8Array(n)})}):xr(this.toHash)?Promise.resolve($d):Promise.resolve().then(function(){return qe().crypto.subtle.digest(ns,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,n){qe().crypto.subtle.importKey("raw",Oe(e.secret),dn,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},t})();function Td(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(n.next(p))}catch(l){o(l)}}function c(p){try{u(n.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):s(p.value).then(a,c)}u((n=n.apply(t,[])).next())})}function Id(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,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(u){return function(p){return c([u,p])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,s&&(i=u[0]&2?s.return:u[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,u[1])).done)return i;switch(s=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,s=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(p){u=[6,p],s=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var F=64,Od=32,Ud=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]),kd=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Md=Math.pow(2,53)-1,ze=(function(){function t(){this.state=Int32Array.from(kd),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,n=e.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>Md)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[r++],n--,this.bufferLength===F&&(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),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%F>=F-8){for(var s=this.bufferLength;s<F;s++)r.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<F-8;s++)r.setUint8(s,0);r.setUint32(F-8,Math.floor(e/4294967296),!0),r.setUint32(F-4,e),this.hashBuffer(),this.finished=!0}for(var i=new Uint8Array(Od),s=0;s<8;s++)i[s*4]=this.state[s]>>>24&255,i[s*4+1]=this.state[s]>>>16&255,i[s*4+2]=this.state[s]>>>8&255,i[s*4+3]=this.state[s]>>>0&255;return i},t.prototype.hashBuffer=function(){for(var e=this,r=e.buffer,n=e.state,s=n[0],i=n[1],o=n[2],a=n[3],c=n[4],u=n[5],p=n[6],l=n[7],h=0;h<F;h++){if(h<16)this.temp[h]=(r[h*4]&255)<<24|(r[h*4+1]&255)<<16|(r[h*4+2]&255)<<8|r[h*4+3]&255;else{var f=this.temp[h-2],g=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10;f=this.temp[h-15];var y=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;this.temp[h]=(g+this.temp[h-7]|0)+(y+this.temp[h-16]|0)}var b=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&p)|0)+(l+(Ud[h]+this.temp[h]|0)|0)|0,$=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&i^s&o^i&o)|0;l=p,p=u,u=c,c=a+b|0,a=o,o=i,i=s,s=b+$|0}n[0]+=s,n[1]+=i,n[2]+=o,n[3]+=a,n[4]+=c,n[5]+=u,n[6]+=p,n[7]+=l},t})(),Nd=(function(){function t(e){this.secret=e,this.hash=new ze,this.reset()}return t.prototype.update=function(e){if(!(xr(e)||this.error))try{this.hash.update(Oe(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 Td(this,void 0,void 0,function(){return Id(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new ze,this.secret){this.outer=new ze;var e=Dd(this.secret),r=new Uint8Array(F);r.set(e);for(var n=0;n<F;n++)e[n]^=54,r[n]^=92;this.hash.update(e),this.outer.update(r);for(var n=0;n<e.byteLength;n++)e[n]=0}},t})();function Dd(t){var e=Oe(t);if(e.byteLength>F){var r=new ze;r.update(e),e=r.digest()}var n=new Uint8Array(F);return n.set(e),n}var jd=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Fd(t){if(Ld(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return qd(e)}return!1}function Ld(t){if(typeof t=="object"&&typeof t.crypto=="object"){var e=t.crypto.getRandomValues;return typeof e=="function"}return!1}function qd(t){return t&&jd.every(function(e){return typeof t[e]=="function"})}var zd=(function(){function t(e){Fd(qe())?this.hash=new Rd(e):this.hash=new Nd(e)}return t.prototype.update=function(e,r){this.hash.update(Oe(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t})();const Hd=({serviceId:t,clientVersion:e})=>async r=>{const n=typeof window<"u"?window.navigator:void 0,s=n?.userAgent??"",i=n?.userAgentData?.platform??ln.os(s)??"other",o=void 0,a=n?.userAgentData?.brands??[],c=a[a.length-1],u=c?.brand??ln.browser(s)??"unknown",p=c?.version??"unknown",l=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${u}_${p}`]];t&&l.push([`api/${t}`,e]);const h=await r?.userAgentAppId?.();return h&&l.push([`app/${h}`]),l},ln={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"}},_d=t=>()=>Promise.reject(t),Bd=["in-region","cross-region","mobile","standard","legacy"],Wd=({defaultsMode:t}={})=>po(async()=>{const e=typeof t=="function"?await t():t;switch(e?.toLowerCase()){case"auto":return Promise.resolve(Vd()?"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 ${Bd.join(", ")}, got ${e}`)}}),Vd=()=>{const t=window?.navigator;if(t?.connection){const{effectiveType:e,rtt:r,downlink:n}=t?.connection;if(typeof e=="string"&&e!=="4g"||Number(r)>100||Number(n)<10)return!0}return t?.userAgentData?.mobile||typeof t?.maxTouchPoints=="number"&&t?.maxTouchPoints>1},ss="required",k="fn",M="argv",be="ref",pn=!0,hn="isSet",Ue="booleanEquals",le="error",B="endpoint",V="tree",Or="PartitionResult",Ur="getAttr",Se="stringEquals",fn={[ss]:!1,type:"string"},mn={[ss]:!0,default:!1,type:"boolean"},gn={[be]:"Endpoint"},is={[k]:Ue,[M]:[{[be]:"UseFIPS"},!0]},os={[k]:Ue,[M]:[{[be]:"UseDualStack"},!0]},R={},ve={[be]:"Region"},yn={[k]:Ur,[M]:[{[be]:Or},"supportsFIPS"]},as={[be]:Or},wn={[k]:Ue,[M]:[!0,{[k]:Ur,[M]:[as,"supportsDualStack"]}]},bn=[is],En=[os],Sn=[ve],Gd={parameters:{Region:fn,UseDualStack:mn,UseFIPS:mn,Endpoint:fn},rules:[{conditions:[{[k]:hn,[M]:[gn]}],rules:[{conditions:bn,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:le},{conditions:En,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:le},{endpoint:{url:gn,properties:R,headers:R},type:B}],type:V},{conditions:[{[k]:hn,[M]:Sn}],rules:[{conditions:[{[k]:"aws.partition",[M]:Sn,assign:Or}],rules:[{conditions:[is,os],rules:[{conditions:[{[k]:Ue,[M]:[pn,yn]},wn],rules:[{conditions:[{[k]:Se,[M]:[ve,"us-east-1"]}],endpoint:{url:"https://cognito-idp-fips.us-east-1.amazonaws.com",properties:R,headers:R},type:B},{conditions:[{[k]:Se,[M]:[ve,"us-east-2"]}],endpoint:{url:"https://cognito-idp-fips.us-east-2.amazonaws.com",properties:R,headers:R},type:B},{conditions:[{[k]:Se,[M]:[ve,"us-west-1"]}],endpoint:{url:"https://cognito-idp-fips.us-west-1.amazonaws.com",properties:R,headers:R},type:B},{conditions:[{[k]:Se,[M]:[ve,"us-west-2"]}],endpoint:{url:"https://cognito-idp-fips.us-west-2.amazonaws.com",properties:R,headers:R},type:B},{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:R,headers:R},type:B}],type:V},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:le}],type:V},{conditions:bn,rules:[{conditions:[{[k]:Ue,[M]:[yn,pn]}],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:R,headers:R},type:B}],type:V},{error:"FIPS is enabled but this partition does not support FIPS",type:le}],type:V},{conditions:En,rules:[{conditions:[wn],rules:[{conditions:[{[k]:Se,[M]:["aws",{[k]:Ur,[M]:[as,"name"]}]}],endpoint:{url:"https://cognito-idp.{Region}.amazonaws.com",properties:R,headers:R},type:B},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:R,headers:R},type:B}],type:V},{error:"DualStack is enabled but this partition does not support DualStack",type:le}],type:V},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:R,headers:R},type:B}],type:V}],type:V},{error:"Invalid Configuration: Missing Region",type:le}]},Jd=Gd,Kd=new Ja({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Qd=(t,e={})=>Kd.get(t,()=>hc(Jd,{endpointParams:t,logger:e.logger}));Ve.aws=_n;const Yd=t=>({apiVersion:"2016-04-18",base64Decoder:t?.base64Decoder??Ke,base64Encoder:t?.base64Encoder??_e,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Qd,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??bd,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Cc},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Oa}],logger:t?.logger??new In,protocol:t?.protocol??hu,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",xmlNamespace:"http://cognito-idp.amazonaws.com/doc/2016-04-18/",version:"2016-04-18",serviceTarget:"AWSCognitoIdentityProviderService"},serviceId:t?.serviceId??"Cognito Identity Provider",urlParser:t?.urlParser??Ge,utf8Decoder:t?.utf8Decoder??me,utf8Encoder:t?.utf8Encoder??Cr}),Zd=t=>{const e=Wd(t),r=()=>e().then(la),n=Yd(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??Xc,credentialDefaultProvider:t?.credentialDefaultProvider??(s=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??Hd({serviceId:n.serviceId,clientVersion:vd.version}),maxAttempts:t?.maxAttempts??Je,region:t?.region??_d("Region is missing"),requestHandler:vr.create(t?.requestHandler??r),retryMode:t?.retryMode??(async()=>(await r()).retryMode||_u),sha256:t?.sha256??zd,streamCollector:t?.streamCollector??So,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(vu)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(Cu))}},Xd=t=>({setRegion(e){t.region=e},region(){return t.region}}),el=t=>({region:t.region()}),tl=t=>{const e=t.httpAuthSchemes;let r=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(s){const i=e.findIndex(o=>o.schemeId===s.schemeId);i===-1?e.push(s):e.splice(i,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){n=s},credentials(){return n}}},rl=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),nl=(t,e)=>{const r=Object.assign(Xd(t),ga(t),ho(t),tl(t));return e.forEach(n=>n.configure(r)),Object.assign(t,el(r),ya(r),fo(r),rl(r))};class sl extends vn{config;constructor(...[e]){const r=Zd(e||{});super(r),this.initConfig=r;const n=Sd(r),s=Ga(n),i=cd(s),o=Pu(i),a=o,c=Hu(a),u=Ed(c),p=nl(u,e?.extensions||[]);this.config=p,this.middlewareStack.use(Io(this.config)),this.middlewareStack.use(xu(this.config)),this.middlewareStack.use(md(this.config)),this.middlewareStack.use(Iu(this.config)),this.middlewareStack.use(Fa(this.config)),this.middlewareStack.use(za(this.config)),this.middlewareStack.use(Ba(this.config)),this.middlewareStack.use(xa(this.config,{httpAuthSchemeParametersProvider:yd,identityProviderConfigProvider:async l=>new Ia({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Ra(this.config))}destroy(){super.destroy()}}class w extends pe{constructor(e){super(e),Object.setPrototypeOf(this,w.prototype)}}class Xe extends w{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,Xe.prototype)}}class et extends w{name="InvalidParameterException";$fault="client";reasonCode;constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,et.prototype),this.reasonCode=e.reasonCode}}class tt extends w{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,tt.prototype)}}class rt extends w{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,rt.prototype)}}class nt extends w{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,nt.prototype)}}class st extends w{name="UserImportInProgressException";$fault="client";constructor(e){super({name:"UserImportInProgressException",$fault:"client",...e}),Object.setPrototypeOf(this,st.prototype)}}class it extends w{name="UserNotFoundException";$fault="client";constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,it.prototype)}}class ot extends w{name="InvalidLambdaResponseException";$fault="client";constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),Object.setPrototypeOf(this,ot.prototype)}}class at extends w{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,at.prototype)}}class ct extends w{name="TooManyFailedAttemptsException";$fault="client";constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),Object.setPrototypeOf(this,ct.prototype)}}class ut extends w{name="UnexpectedLambdaException";$fault="client";constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),Object.setPrototypeOf(this,ut.prototype)}}class dt extends w{name="UserLambdaValidationException";$fault="client";constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,dt.prototype)}}class lt extends w{name="CodeDeliveryFailureException";$fault="client";constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),Object.setPrototypeOf(this,lt.prototype)}}class pt extends w{name="InvalidPasswordException";$fault="client";constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),Object.setPrototypeOf(this,pt.prototype)}}class ht extends w{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,ht.prototype)}}class ft extends w{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),Object.setPrototypeOf(this,ft.prototype)}}class mt extends w{name="PreconditionNotMetException";$fault="client";constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),Object.setPrototypeOf(this,mt.prototype)}}class gt extends w{name="UnsupportedUserStateException";$fault="client";constructor(e){super({name:"UnsupportedUserStateException",$fault:"client",...e}),Object.setPrototypeOf(this,gt.prototype)}}class yt extends w{name="UsernameExistsException";$fault="client";constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,yt.prototype)}}class wt extends w{name="AliasExistsException";$fault="client";constructor(e){super({name:"AliasExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,wt.prototype)}}class bt extends w{name="InvalidUserPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,bt.prototype)}}class Et extends w{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,Et.prototype)}}class St extends w{name="MFAMethodNotFoundException";$fault="client";constructor(e){super({name:"MFAMethodNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,St.prototype)}}class xt extends w{name="PasswordResetRequiredException";$fault="client";constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),Object.setPrototypeOf(this,xt.prototype)}}class vt extends w{name="UnsupportedOperationException";$fault="client";constructor(e){super({name:"UnsupportedOperationException",$fault:"client",...e}),Object.setPrototypeOf(this,vt.prototype)}}class Ct extends w{name="UserNotConfirmedException";$fault="client";constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),Object.setPrototypeOf(this,Ct.prototype)}}class At extends w{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(e){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...e}),Object.setPrototypeOf(this,At.prototype)}}class $t extends w{name="CodeMismatchException";$fault="client";constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,$t.prototype)}}class Pt extends w{name="ExpiredCodeException";$fault="client";constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),Object.setPrototypeOf(this,Pt.prototype)}}class Rt extends w{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(e){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...e}),Object.setPrototypeOf(this,Rt.prototype)}}class Tt extends w{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(e){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Tt.prototype)}}class It extends w{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,It.prototype)}}class Ot extends w{name="ForbiddenException";$fault="client";constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),Object.setPrototypeOf(this,Ot.prototype)}}class Ut extends w{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(e){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Ut.prototype)}}class kt extends w{name="WebAuthnClientMismatchException";$fault="client";constructor(e){super({name:"WebAuthnClientMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,kt.prototype)}}class Mt extends w{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(e){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...e}),Object.setPrototypeOf(this,Mt.prototype)}}class Nt extends w{name="WebAuthnNotEnabledException";$fault="client";constructor(e){super({name:"WebAuthnNotEnabledException",$fault:"client",...e}),Object.setPrototypeOf(this,Nt.prototype)}}class Dt extends w{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(e){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...e}),Object.setPrototypeOf(this,Dt.prototype)}}class jt extends w{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(e){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,jt.prototype)}}class Ft extends w{name="DeviceKeyExistsException";$fault="client";constructor(e){super({name:"DeviceKeyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Ft.prototype)}}class Lt extends w{name="GroupExistsException";$fault="client";constructor(e){super({name:"GroupExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Lt.prototype)}}class qt extends w{name="DuplicateProviderException";$fault="client";constructor(e){super({name:"DuplicateProviderException",$fault:"client",...e}),Object.setPrototypeOf(this,qt.prototype)}}class zt extends w{name="ManagedLoginBrandingExistsException";$fault="client";constructor(e){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,zt.prototype)}}class Ht extends w{name="TermsExistsException";$fault="client";constructor(e){super({name:"TermsExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Ht.prototype)}}class _t extends w{name="FeatureUnavailableInTierException";$fault="client";constructor(e){super({name:"FeatureUnavailableInTierException",$fault:"client",...e}),Object.setPrototypeOf(this,_t.prototype)}}class Bt extends w{name="TierChangeNotAllowedException";$fault="client";constructor(e){super({name:"TierChangeNotAllowedException",$fault:"client",...e}),Object.setPrototypeOf(this,Bt.prototype)}}class Wt extends w{name="UserPoolTaggingException";$fault="client";constructor(e){super({name:"UserPoolTaggingException",$fault:"client",...e}),Object.setPrototypeOf(this,Wt.prototype)}}class Vt extends w{name="InvalidOAuthFlowException";$fault="client";constructor(e){super({name:"InvalidOAuthFlowException",$fault:"client",...e}),Object.setPrototypeOf(this,Vt.prototype)}}class Gt extends w{name="ScopeDoesNotExistException";$fault="client";constructor(e){super({name:"ScopeDoesNotExistException",$fault:"client",...e}),Object.setPrototypeOf(this,Gt.prototype)}}class Jt extends w{name="UnsupportedIdentityProviderException";$fault="client";constructor(e){super({name:"UnsupportedIdentityProviderException",$fault:"client",...e}),Object.setPrototypeOf(this,Jt.prototype)}}class Kt extends w{name="RefreshTokenReuseException";$fault="client";constructor(e){super({name:"RefreshTokenReuseException",$fault:"client",...e}),Object.setPrototypeOf(this,Kt.prototype)}}class Qt extends w{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Qt.prototype)}}class Yt extends w{name="UnsupportedTokenTypeException";$fault="client";constructor(e){super({name:"UnsupportedTokenTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,Yt.prototype)}}class Zt extends w{name="WebAuthnConfigurationMissingException";$fault="client";constructor(e){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...e}),Object.setPrototypeOf(this,Zt.prototype)}}class Xt extends w{name="EnableSoftwareTokenMFAException";$fault="client";constructor(e){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...e}),Object.setPrototypeOf(this,Xt.prototype)}}const il="AvailableChallenges",ol="AdminCreateUser",al="AdminCreateUserRequest",cl="AdminCreateUserResponse",ul="AdminDeleteUser",dl="AdminDeleteUserRequest",ll="AdminDisableUserRequest",pl="AdminDisableUserResponse",hl="AdminDisableUser",fl="AliasExistsException",ml="AnalyticsEndpointId",gl="AdminEnableUser",yl="AdminEnableUserRequest",wl="AdminEnableUserResponse",bl="AuthFlow",El="AdminGetUser",Sl="AdminGetUserRequest",xl="AdminGetUserResponse",vl="AttributeListType",ie="AnalyticsMetadata",Cl="AnalyticsMetadataType",cs="AttributeName",Al="AuthParameters",$l="AuthParametersType",us="AuthenticationResult",Pl="AuthenticationResultType",Rl="AccessToken",Tl="AttributeType",Il="AttributeValueType",Ol="Attributes",ds="ConfirmationCode",kr="CodeDeliveryDetails",Ul="CodeDeliveryDetailsType",kl="CodeDeliveryFailureException",Ml="ConfirmForgotPassword",Nl="ConfirmForgotPasswordRequest",Dl="ConfirmForgotPasswordResponse",oe="ClientId",jl="ClientIdType",Z="ClientMetadata",Fl="CodeMismatchException",Ll="ConcurrentModificationException",Mr="ChallengeName",ls="ChallengeParameters",ql="ChallengeResponses",zl="ChallengeResponsesType",Hl="ConfirmSignUp",_l="ConfirmSignUpRequest",Bl="ConfirmSignUpResponse",Wl="DesiredDeliveryMediums",Vl="DeviceGroupKey",Gl="DeviceKey",Jl="DeviceKeyExistsException",ps="DeliveryMedium",Kl="DuplicateProviderException",Ql="Destination",hs="Enabled",Yl="ExpiredCodeException",Zl="EncodedData",Xl="ExpiresIn",ep="EnableSoftwareTokenMFAException",fs="ForceAliasCreation",tp="ForbiddenException",rp="ForgotPassword",np="ForgotPasswordRequest",sp="ForgotPasswordResponse",ip="FeatureUnavailableInTierException",op="GroupExistsException",ap="IpAddress",cp="InitiateAuthRequest",up="InitiateAuthResponse",dp="InitiateAuth",lp="InternalErrorException",pp="InvalidEmailRoleAccessPolicyException",hp="InvalidLambdaResponseException",fp="InvalidOAuthFlowException",mp="InvalidParameterException",gp="InvalidPasswordException",yp="InvalidSmsRoleAccessPolicyException",wp="InvalidSmsRoleTrustRelationshipException",bp="IdToken",Ep="InvalidUserPoolConfigurationException",Sp="LimitExceededException",xp="MessageAction",vp="MFAMethodNotFoundException",ms="MFAOptions",Cp="MFAOptionListType",Ap="MFAOptionType",$p="ManagedLoginBrandingExistsException",Pp="NotAuthorizedException",Rp="NewDeviceMetadata",Tp="NewDeviceMetadataType",Ip="Name",gs="Password",Op="PasswordHistoryPolicyViolationException",Up="PreferredMfaSetting",kp="PreconditionNotMetException",Mp="PasswordResetRequiredException",Np="PasswordType",Dp="ResendConfirmationCode",jp="ResendConfirmationCodeRequest",Fp="ResendConfirmationCodeResponse",Lp="ResourceNotFoundException",qp="RefreshToken",zp="RespondToAuthChallenge",Hp="RespondToAuthChallengeRequest",_p="RespondToAuthChallengeResponse",Bp="RefreshTokenReuseException",ae="Session",Wp="ScopeDoesNotExistException",ke="SecretHash",Vp="SecretHashType",Gp="SessionType",Jp="SoftwareTokenMFANotFoundException",Kp="SignUpRequest",Qp="SignUpResponse",Yp="SignUp",Zp="TierChangeNotAllowedException",Xp="TermsExistsException",eh="TooManyFailedAttemptsException",th="TooManyRequestsException",rh="TokenModelType",nh="TemporaryPassword",sh="TokenType",z="Username",Nr="UserAttributes",ys="UserCreateDate",ih="UserContextDataType",ce="UserContextData",oh="UserConfirmed",ah="UnauthorizedException",ch="UsernameExistsException",uh="UserImportInProgressException",dh="UnsupportedIdentityProviderException",lh="UnexpectedLambdaException",ws="UserLastModifiedDate",ph="UserLambdaValidationException",hh="UserMFASettingList",fh="UserNotConfirmedException",mh="UserNotFoundException",gh="UnsupportedOperationException",yh="UserPoolAddOnNotEnabledException",Me="UserPoolId",wh="UserPoolTaggingException",bs="UserStatus",bh="UserSub",Eh="UsernameType",Sh="UnsupportedTokenTypeException",xh="UserType",vh="UnsupportedUserStateException",Ch="User",Ah="Value",Es="ValidationData",$h="WebAuthnClientMismatchException",Ph="WebAuthnConfigurationMissingException",Rh="WebAuthnChallengeNotFoundException",Th="WebAuthnCredentialNotSupportedException",Ih="WebAuthnNotEnabledException",Oh="WebAuthnOriginNotAllowedException",Uh="WebAuthnRelyingPartyMismatchException",x="client",E="error",v="httpError",S="message",kh="reasonCode",Mh="server",Ss="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",d="com.amazonaws.cognitoidentityprovider";var Nh=[0,d,Il,8,0],ue=[0,d,jl,8,0],Dr=[0,d,Np,8,0],Ne=[0,d,Vp,8,0],de=[0,d,Gp,8,0],mr=[0,d,rh,8,0],H=[0,d,Eh,8,0],xs=[3,d,al,0,[Me,z,Nr,Es,nh,fs,xp,Wl,Z],[0,[()=>H,0],[()=>ye,0],[()=>ye,0],[()=>Dr,0],2,0,64,128]],vs=[3,d,cl,0,[Ch],[[()=>Hi,0]]],Cs=[3,d,dl,0,[Me,z],[0,[()=>H,0]]],As=[3,d,ll,0,[Me,z],[0,[()=>H,0]]],$s=[3,d,pl,0,[],[]],Ps=[3,d,yl,0,[Me,z],[0,[()=>H,0]]],Rs=[3,d,wl,0,[],[]],Ts=[3,d,Sl,0,[Me,z],[0,[()=>H,0]]],Is=[3,d,xl,0,[z,Nr,ys,ws,hs,bs,ms,Up,hh],[[()=>H,0],[()=>ye,0],4,4,2,0,()=>Yi,0,64]],Os=[-3,d,fl,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Os,wt);var X=[3,d,Cl,0,[ml],[0]],Us=[3,d,Tl,0,[Ip,Ah],[0,[()=>Nh,0]]],jr=[3,d,Pl,0,[Rl,Xl,sh,qp,bp,Rp],[[()=>mr,0],1,0,[()=>mr,0],[()=>mr,0],()=>di]],er=[3,d,Ul,0,[Ql,ps,cs],[0,0,0]],ks=[-3,d,kl,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ks,lt);var Ms=[-3,d,Fl,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ms,$t);var Ns=[-3,d,Ll,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ns,It);var Ds=[3,d,Nl,0,[oe,ke,z,ds,gs,ie,ce,Z],[[()=>ue,0],[()=>Ne,0],[()=>H,0],0,[()=>Dr,0],()=>X,[()=>ee,0],128]],js=[3,d,Dl,0,[],[]],Fs=[3,d,_l,0,[oe,ke,z,ds,fs,ie,ce,Z,ae],[[()=>ue,0],[()=>Ne,0],[()=>H,0],0,2,()=>X,[()=>ee,0],128,[()=>de,0]]],Ls=[3,d,Bl,0,[ae],[[()=>de,0]]],qs=[-3,d,Jl,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(qs,Ft);var zs=[-3,d,Kl,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(zs,qt);var Hs=[-3,d,ep,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Hs,Xt);var _s=[-3,d,Yl,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(_s,Pt);var Bs=[-3,d,ip,{[E]:x,[v]:403},[S],[0]];m.for(d).registerError(Bs,_t);var Ws=[-3,d,tp,{[E]:x,[v]:403},[S],[0]];m.for(d).registerError(Ws,Ot);var Vs=[3,d,np,0,[oe,ke,ce,z,ie,Z],[[()=>ue,0],[()=>Ne,0],[()=>ee,0],[()=>H,0],()=>X,128]],Gs=[3,d,sp,0,[kr],[()=>er]],Js=[-3,d,op,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Js,Lt);var Ks=[3,d,cp,0,[bl,Al,Z,oe,ie,ce,ae],[0,[()=>jh,0],128,[()=>ue,0],()=>X,[()=>ee,0],[()=>de,0]]],Qs=[3,d,up,0,[Mr,ae,ls,us,il],[0,[()=>de,0],128,[()=>jr,0],64]],Ys=[-3,d,lp,{[E]:Mh},[S],[0]];m.for(d).registerError(Ys,Xe);var Zs=[-3,d,pp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Zs,Et);var Xs=[-3,d,hp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Xs,ot);var ei=[-3,d,fp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ei,Vt);var ti=[-3,d,mp,{[E]:x,[v]:400},[S,kh],[0,0]];m.for(d).registerError(ti,et);var ri=[-3,d,gp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ri,pt);var ni=[-3,d,yp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ni,ht);var si=[-3,d,wp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(si,ft);var ii=[-3,d,Ep,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ii,bt);var oi=[-3,d,Sp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(oi,at);var ai=[-3,d,$p,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ai,zt);var ci=[-3,d,vp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ci,St);var ui=[3,d,Ap,0,[ps,cs],[0,0]],di=[3,d,Tp,0,[Gl,Vl],[0,0]],li=[-3,d,Pp,{[E]:x,[v]:403},[S],[0]];m.for(d).registerError(li,tt);var pi=[-3,d,Op,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(pi,Rt);var hi=[-3,d,Mp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(hi,xt);var fi=[-3,d,kp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(fi,mt);var mi=[-3,d,Bp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(mi,Kt);var gi=[3,d,jp,0,[oe,ke,ce,z,ie,Z],[[()=>ue,0],[()=>Ne,0],[()=>ee,0],[()=>H,0],()=>X,128]],yi=[3,d,Fp,0,[kr],[()=>er]],wi=[-3,d,Lp,{[E]:x,[v]:404},[S],[0]];m.for(d).registerError(wi,rt);var bi=[3,d,Hp,0,[oe,Mr,ae,ql,ie,ce,Z],[[()=>ue,0],0,[()=>de,0],[()=>Fh,0],()=>X,[()=>ee,0],128]],Ei=[3,d,_p,0,[Mr,ae,ls,us],[0,[()=>de,0],128,[()=>jr,0]]],Si=[-3,d,Wp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Si,Gt);var xi=[3,d,Kp,0,[oe,ke,z,gs,Nr,Es,ie,ce,Z],[[()=>ue,0],[()=>Ne,0],[()=>H,0],[()=>Dr,0],[()=>ye,0],[()=>ye,0],()=>X,[()=>ee,0],128]],vi=[3,d,Qp,0,[oh,kr,bh,ae],[2,()=>er,0,[()=>de,0]]],Ci=[-3,d,Jp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ci,Tt);var Ai=[-3,d,Xp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ai,Ht);var $i=[-3,d,Zp,{[E]:x,[v]:403},[S],[0]];m.for(d).registerError($i,Bt);var Pi=[-3,d,eh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Pi,ct);var Ri=[-3,d,th,{[E]:x,[v]:429},[S],[0]];m.for(d).registerError(Ri,nt);var Ti=[-3,d,ah,{[E]:x,[v]:401},[S],[0]];m.for(d).registerError(Ti,Qt);var Ii=[-3,d,lh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ii,ut);var Oi=[-3,d,dh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Oi,Jt);var Ui=[-3,d,gh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ui,vt);var ki=[-3,d,Sh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ki,Yt);var Mi=[-3,d,vh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Mi,gt);var ee=[3,d,ih,8,[ap,Zl],[0,0]],Ni=[-3,d,uh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ni,st);var Di=[-3,d,ph,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Di,dt);var ji=[-3,d,ch,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ji,yt);var Fi=[-3,d,fh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Fi,Ct);var Li=[-3,d,mh,{[E]:x,[v]:404},[S],[0]];m.for(d).registerError(Li,it);var qi=[-3,d,yh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(qi,At);var zi=[-3,d,wh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(zi,Wt);var Hi=[3,d,xh,0,[z,Ol,ys,ws,hs,bs,ms],[[()=>H,0],[()=>ye,0],4,4,2,0,()=>Yi]],_i=[-3,d,Rh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(_i,Ut);var Bi=[-3,d,$h,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Bi,kt);var Wi=[-3,d,Ph,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Wi,Zt);var Vi=[-3,d,Th,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Vi,Mt);var Gi=[-3,d,Ih,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Gi,Nt);var Ji=[-3,d,Oh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ji,Dt);var Ki=[-3,d,Uh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ki,jt);var Dh="unit",Qi=[-3,Ss,"CognitoIdentityProviderServiceException",0,[],[]];m.for(Ss).registerError(Qi,w);var ye=[1,d,vl,0,[()=>Us,0]],Yi=[1,d,Cp,0,()=>ui],jh=[2,d,$l,8,0,0],Fh=[2,d,zl,8,0,0],Zi=[9,d,ol,0,()=>xs,()=>vs],Xi=[9,d,ul,0,()=>Cs,()=>Dh],eo=[9,d,hl,0,()=>As,()=>$s],to=[9,d,gl,0,()=>Ps,()=>Rs],ro=[9,d,El,0,()=>Ts,()=>Is],no=[9,d,Ml,0,()=>Ds,()=>js],so=[9,d,Hl,0,()=>Fs,()=>Ls],io=[9,d,rp,0,()=>Vs,()=>Gs],oo=[9,d,dp,0,()=>Ks,()=>Qs],ao=[9,d,Dp,0,()=>gi,()=>yi],co=[9,d,zp,0,()=>bi,()=>Ei],uo=[9,d,Yp,0,()=>xi,()=>vi];class Lh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminCreateUser",{}).n("CognitoIdentityProviderClient","AdminCreateUserCommand").sc(Zi).build(){}class qh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminDeleteUser",{}).n("CognitoIdentityProviderClient","AdminDeleteUserCommand").sc(Xi).build(){}class zh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminDisableUser",{}).n("CognitoIdentityProviderClient","AdminDisableUserCommand").sc(eo).build(){}class Hh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminEnableUser",{}).n("CognitoIdentityProviderClient","AdminEnableUserCommand").sc(to).build(){}class _h extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminGetUser",{}).n("CognitoIdentityProviderClient","AdminGetUserCommand").sc(ro).build(){}class Bh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ConfirmForgotPassword",{}).n("CognitoIdentityProviderClient","ConfirmForgotPasswordCommand").sc(no).build(){}class Wh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ConfirmSignUp",{}).n("CognitoIdentityProviderClient","ConfirmSignUpCommand").sc(so).build(){}class Vh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ForgotPassword",{}).n("CognitoIdentityProviderClient","ForgotPasswordCommand").sc(io).build(){}class Gh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(oo).build(){}class Jh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ResendConfirmationCode",{}).n("CognitoIdentityProviderClient","ResendConfirmationCodeCommand").sc(ao).build(){}class Kh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","RespondToAuthChallenge",{}).n("CognitoIdentityProviderClient","RespondToAuthChallengeCommand").sc(co).build(){}class Qh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","SignUp",{}).n("CognitoIdentityProviderClient","SignUpCommand").sc(uo).build(){}const Xh=Object.freeze(Object.defineProperty({__proto__:null,$Command:N,AdminCreateUser$:Zi,AdminCreateUserCommand:Lh,AdminCreateUserRequest$:xs,AdminCreateUserResponse$:vs,AdminDeleteUser$:Xi,AdminDeleteUserCommand:qh,AdminDeleteUserRequest$:Cs,AdminDisableUser$:eo,AdminDisableUserCommand:zh,AdminDisableUserRequest$:As,AdminDisableUserResponse$:$s,AdminEnableUser$:to,AdminEnableUserCommand:Hh,AdminEnableUserRequest$:Ps,AdminEnableUserResponse$:Rs,AdminGetUser$:ro,AdminGetUserCommand:_h,AdminGetUserRequest$:Ts,AdminGetUserResponse$:Is,AliasExistsException:wt,AliasExistsException$:Os,AnalyticsMetadataType$:X,AttributeType$:Us,AuthenticationResultType$:jr,CodeDeliveryDetailsType$:er,CodeDeliveryFailureException:lt,CodeDeliveryFailureException$:ks,CodeMismatchException:$t,CodeMismatchException$:Ms,CognitoIdentityProviderClient:sl,CognitoIdentityProviderServiceException:w,CognitoIdentityProviderServiceException$:Qi,ConcurrentModificationException:It,ConcurrentModificationException$:Ns,ConfirmForgotPassword$:no,ConfirmForgotPasswordCommand:Bh,ConfirmForgotPasswordRequest$:Ds,ConfirmForgotPasswordResponse$:js,ConfirmSignUp$:so,ConfirmSignUpCommand:Wh,ConfirmSignUpRequest$:Fs,ConfirmSignUpResponse$:Ls,DeviceKeyExistsException:Ft,DeviceKeyExistsException$:qs,DuplicateProviderException:qt,DuplicateProviderException$:zs,EnableSoftwareTokenMFAException:Xt,EnableSoftwareTokenMFAException$:Hs,ExpiredCodeException:Pt,ExpiredCodeException$:_s,FeatureUnavailableInTierException:_t,FeatureUnavailableInTierException$:Bs,ForbiddenException:Ot,ForbiddenException$:Ws,ForgotPassword$:io,ForgotPasswordCommand:Vh,ForgotPasswordRequest$:Vs,ForgotPasswordResponse$:Gs,GroupExistsException:Lt,GroupExistsException$:Js,InitiateAuth$:oo,InitiateAuthCommand:Gh,InitiateAuthRequest$:Ks,InitiateAuthResponse$:Qs,InternalErrorException:Xe,InternalErrorException$:Ys,InvalidEmailRoleAccessPolicyException:Et,InvalidEmailRoleAccessPolicyException$:Zs,InvalidLambdaResponseException:ot,InvalidLambdaResponseException$:Xs,InvalidOAuthFlowException:Vt,InvalidOAuthFlowException$:ei,InvalidParameterException:et,InvalidParameterException$:ti,InvalidPasswordException:pt,InvalidPasswordException$:ri,InvalidSmsRoleAccessPolicyException:ht,InvalidSmsRoleAccessPolicyException$:ni,InvalidSmsRoleTrustRelationshipException:ft,InvalidSmsRoleTrustRelationshipException$:si,InvalidUserPoolConfigurationException:bt,InvalidUserPoolConfigurationException$:ii,LimitExceededException:at,LimitExceededException$:oi,MFAMethodNotFoundException:St,MFAMethodNotFoundException$:ci,MFAOptionType$:ui,ManagedLoginBrandingExistsException:zt,ManagedLoginBrandingExistsException$:ai,NewDeviceMetadataType$:di,NotAuthorizedException:tt,NotAuthorizedException$:li,PasswordHistoryPolicyViolationException:Rt,PasswordHistoryPolicyViolationException$:pi,PasswordResetRequiredException:xt,PasswordResetRequiredException$:hi,PreconditionNotMetException:mt,PreconditionNotMetException$:fi,RefreshTokenReuseException:Kt,RefreshTokenReuseException$:mi,ResendConfirmationCode$:ao,ResendConfirmationCodeCommand:Jh,ResendConfirmationCodeRequest$:gi,ResendConfirmationCodeResponse$:yi,ResourceNotFoundException:rt,ResourceNotFoundException$:wi,RespondToAuthChallenge$:co,RespondToAuthChallengeCommand:Kh,RespondToAuthChallengeRequest$:bi,RespondToAuthChallengeResponse$:Ei,ScopeDoesNotExistException:Gt,ScopeDoesNotExistException$:Si,SignUp$:uo,SignUpCommand:Qh,SignUpRequest$:xi,SignUpResponse$:vi,SoftwareTokenMFANotFoundException:Tt,SoftwareTokenMFANotFoundException$:Ci,TermsExistsException:Ht,TermsExistsException$:Ai,TierChangeNotAllowedException:Bt,TierChangeNotAllowedException$:$i,TooManyFailedAttemptsException:ct,TooManyFailedAttemptsException$:Pi,TooManyRequestsException:nt,TooManyRequestsException$:Ri,UnauthorizedException:Qt,UnauthorizedException$:Ti,UnexpectedLambdaException:ut,UnexpectedLambdaException$:Ii,UnsupportedIdentityProviderException:Jt,UnsupportedIdentityProviderException$:Oi,UnsupportedOperationException:vt,UnsupportedOperationException$:Ui,UnsupportedTokenTypeException:Yt,UnsupportedTokenTypeException$:ki,UnsupportedUserStateException:gt,UnsupportedUserStateException$:Mi,UserContextDataType$:ee,UserImportInProgressException:st,UserImportInProgressException$:Ni,UserLambdaValidationException:dt,UserLambdaValidationException$:Di,UserNotConfirmedException:Ct,UserNotConfirmedException$:Fi,UserNotFoundException:it,UserNotFoundException$:Li,UserPoolAddOnNotEnabledException:At,UserPoolAddOnNotEnabledException$:qi,UserPoolTaggingException:Wt,UserPoolTaggingException$:zi,UserType$:Hi,UsernameExistsException:yt,UsernameExistsException$:ji,WebAuthnChallengeNotFoundException:Ut,WebAuthnChallengeNotFoundException$:_i,WebAuthnClientMismatchException:kt,WebAuthnClientMismatchException$:Bi,WebAuthnConfigurationMissingException:Zt,WebAuthnConfigurationMissingException$:Wi,WebAuthnCredentialNotSupportedException:Mt,WebAuthnCredentialNotSupportedException$:Vi,WebAuthnNotEnabledException:Nt,WebAuthnNotEnabledException$:Gi,WebAuthnOriginNotAllowedException:Dt,WebAuthnOriginNotAllowedException$:Ji,WebAuthnRelyingPartyMismatchException:jt,WebAuthnRelyingPartyMismatchException$:Ki,__Client:vn},Symbol.toStringTag,{value:"Module"}));export{me as f,Xh as i,Cr as t};
|
|
16
|
+
${se(o)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const r=[];for(const s of e.split("/"))s?.length!==0&&s!=="."&&(s===".."?r.pop():r.push(s));const n=`${e?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&e?.endsWith("/")?"/":""}`;return re(n).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=Jc(e).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class en extends Qc{headerFormatter=new _c;constructor({applyChecksum:e,credentials:r,region:n,service:s,sha256:i,uriEscapePath:o=!0}){super({applyChecksum:e,credentials:r,region:n,service:s,sha256:i,uriEscapePath:o})}async presign(e,r={}){const{signingDate:n=new Date,expiresIn:s=3600,unsignableHeaders:i,unhoistableHeaders:o,signableHeaders:a,hoistableHeaders:c,signingRegion:u,signingService:p}=r,l=await this.credentialProvider();this.validateResolvedCredentials(l);const h=u??await this.regionProvider(),{longDate:f,shortDate:g}=this.formatDate(n);if(s>qc)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const y=lr(g,h,p??this.service),b=Vc(Xr(e),{unhoistableHeaders:o,hoistableHeaders:c});l.sessionToken&&(b.query[Jn]=l.sessionToken),b.query[$c]=ur,b.query[Pc]=`${l.accessKeyId}/${y}`,b.query[Vn]=f,b.query[Tc]=s.toString(10);const $=Qr(b,i,a);return b.query[Rc]=this.getCanonicalHeaderList($),b.query[Gn]=await this.getSignature(f,y,this.getSigningKey(l,h,g,p),this.createCanonicalRequest(b,$,await pr(e,this.sha256))),b}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:n=new Date,priorSignature:s,signingRegion:i,signingService:o}){const a=i??await this.regionProvider(),{shortDate:c,longDate:u}=this.formatDate(n),p=lr(c,a,o??this.service),l=await pr({headers:{},body:r},this.sha256),h=new this.sha256;h.update(e);const f=se(await h.digest()),g=[jc,u,p,s,f,l].join(`
|
|
17
|
+
`);return this.signString(g,{signingDate:n,signingRegion:a,signingService:o})}async signMessage(e,{signingDate:r=new Date,signingRegion:n,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:r,signingRegion:n,signingService:s,priorSignature:e.priorSignature}).then(i=>({message:e.message,signature:i}))}async signString(e,{signingDate:r=new Date,signingRegion:n,signingService:s}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=n??await this.regionProvider(),{shortDate:a}=this.formatDate(r),c=new this.sha256(await this.getSigningKey(i,o,a,s));return c.update(Re(e)),se(await c.digest())}async signRequest(e,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:s,signingRegion:i,signingService:o}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const c=i??await this.regionProvider(),u=Xr(e),{longDate:p,shortDate:l}=this.formatDate(r),h=lr(l,c,o??this.service);u.headers[Qn]=p,a.sessionToken&&(u.headers[kc]=a.sessionToken);const f=await pr(u,this.sha256);!Wc(Er,u.headers)&&this.applyChecksum&&(u.headers[Er]=f);const g=Qr(u,s,n),y=await this.getSignature(p,h,this.getSigningKey(a,c,l,o),this.createCanonicalRequest(u,g,f));return u.headers[Kn]=`${ur} Credential=${a.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(g)}, Signature=${y}`,u}async getSignature(e,r,n,s){const i=await this.createStringToSign(e,r,s,ur),o=new this.sha256(await n);return o.update(Re(i)),se(await o.digest())}getSigningKey(e,r,n,s){return zc(this.sha256,e,n,r,s||this.service)}}const Yc=t=>{let e=t.credentials,r=!!t.credentials,n;Object.defineProperty(t,"credentials",{set(c){c&&c!==e&&c!==n&&(r=!0),e=c;const u=Zc(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),p=Xc(t,u);if(r&&!p.attributed){const l=typeof e=="object"&&e!==null;n=async h=>{const f=await p(h);return l&&(!f.$source||Object.keys(f.$source).length===0)?xc(f,"CREDENTIALS_CODE","e"):f},n.memoized=p.memoized,n.configBound=p.configBound,n.attributed=!0}else n=p},get(){return n},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:s=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=Ae(t.signer):t.regionInfoProvider?a=()=>Ae(t.region)().then(async c=>[await t.regionInfoProvider(c,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},c]).then(([c,u])=>{const{signingRegion:p,signingService:l}=c;t.signingRegion=t.signingRegion||p||u,t.signingName=t.signingName||l||t.serviceId;const h={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:s},f=t.signerConstructor||en;return new f(h)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await Ae(t.region)(),properties:{}},c);const u=c.signingRegion,p=c.signingName;t.signingRegion=t.signingRegion||u,t.signingName=t.signingName||p||t.serviceId;const l={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:s},h=t.signerConstructor||en;return new h(l)},Object.assign(t,{systemClockOffset:i,signingEscapePath:s,signer:a})};function Zc(t,{credentials:e,credentialDefaultProvider:r}){let n;return e?e?.memoized?n=e:n=Da(e,Na,Un):r?n=Ae(r(Object.assign({},t,{parentClientConfig:t}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function Xc(t,e){if(e.configBound)return e;const r=async n=>e({...n,callerClientConfig:t});return r.memoized=e.memoized,r.configBound=!0,r}const tn=typeof TextEncoder=="function"?new TextEncoder:null,eu=t=>{if(typeof t=="string"){if(tn)return tn.encode(t).byteLength;let e=t.length;for(let r=e-1;r>=0;r--){const n=t.charCodeAt(r);n>127&&n<=2047?e++:n>2047&&n<=65535&&(e+=2),n>=56320&&n<=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 tu{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,r){const n=r.getMemberSchemas(),s=Object.values(n).find(i=>!!i.getMergedTraits().httpPayload);if(s)return s.getMergedTraits().mediaType||(s.isStringSchema()?"text/plain":s.isBlobSchema()?"application/octet-stream":e);if(!r.isUnitSchema()&&Object.values(n).find(i=>{const{httpQuery:o,httpQueryParams:a,httpHeader:c,httpLabel:u,httpPrefixHeaders:p}=i.getMergedTraits();return!o&&!a&&!c&&!u&&p===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,r,n,s,i,o){let a=r,c=e;e.includes("#")&&([a,c]=e.split("#"));const u={$metadata:i,$fault:n.statusCode<500?"client":"server"},p=m.for(a);try{return{errorSchema:o?.(p,c)??p.getSchema(e),errorMetadata:u}}catch{s.message=s.message??s.Message??"UnknownError";const l=m.for("smithy.ts.sdk.synthetic."+a),h=l.getBaseException();if(h){const f=l.getErrorCtor(h)??Error;throw this.decorateServiceException(Object.assign(new f({name:c}),u),s)}throw this.decorateServiceException(Object.assign(new Error(c),u),s)}}decorateServiceException(e,r={}){if(this.queryCompat){const n=e.Message??r.Message,s=Wr(e,r);n&&(s.message=n),s.Error={...s.Error,Type:s.Error.Type,Code:s.Error.Code,Message:s.Error.message??s.Error.Message??n};const i=s.$metadata.requestId;return i&&(s.RequestId=i),s}return Wr(e,r)}setQueryCompatError(e,r){const n=r.headers?.["x-amzn-query-error"];if(e!==void 0&&n!=null){const[s,i]=n.split(";"),o=Object.entries(e),a={Code:s,Type:i};Object.assign(e,a);for(const[c,u]of o)a[c==="message"?"Message":c]=u;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(n=>T.of(n).getMergedTraits().awsQueryError?.[0]===r)}}}class Rr{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*ru(t,e){if(t.isUnitSchema())return;const r=t.getSchema();for(let n=0;n<r[4].length;++n){const s=r[4][n],i=r[5][n],o=new T([i,0],s);!(s in e)&&!o.isIdempotencyToken()||(yield[s,o])}}function*nu(t,e,r){if(t.isUnitSchema())return;const n=t.getSchema();let s=Object.keys(e).filter(i=>i!=="__type").length;for(let i=0;i<n[4].length&&s!==0;++i){const o=n[4][i],a=n[5][i],c=new T([a,0],o);let u=o;r&&(u=c.getMergedTraits()[r]??o),u in e&&(yield[o,c],s-=1)}}class su{from;to;keys;constructor(e,r){this.from=e,this.to=r,this.keys=new Set(Object.keys(this.from).filter(n=>n!=="__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]}}}function iu(t,e,r){if(r?.source){const n=r.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||n!==String(e)))return n.includes(".")?new W(n,"bigDecimal"):BigInt(n)}return e}const ou=(t,e)=>wr(t,e).then(r=>(e?.utf8Encoder??Cr)(r)),au=(t,e)=>ou(t,e).then(r=>{if(r.length)try{return JSON.parse(r)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:r}),n}return{}}),cu=(t,e)=>{const r=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),n=i=>{let o=i;return typeof o=="number"&&(o=o.toString()),o.indexOf(",")>=0&&(o=o.split(",")[0]),o.indexOf(":")>=0&&(o=o.split(":")[0]),o.indexOf("#")>=0&&(o=o.split("#")[1]),o},s=r(t.headers,"x-amzn-errortype");if(s!==void 0)return n(t.headers[s]);if(e&&typeof e=="object"){const i=r(e,"code");if(i&&e[i]!==void 0)return n(e[i]);if(e.__type!==void 0)return n(e.__type)}};class uu extends Rr{settings;constructor(e){super(),this.settings=e}async read(e,r){return this._read(e,typeof r=="string"?JSON.parse(r,iu):await au(r,this.serdeContext))}readObject(e,r){return this._read(e,r)}_read(e,r){const n=r!==null&&typeof r=="object",s=T.of(e);if(n){if(s.isStructSchema()){const o=s.isUnionSchema(),a={};let c;o&&(c=new su(r,a));for(const[u,p]of nu(s,r,this.settings.jsonName?"jsonName":!1)){const l=this.settings.jsonName?p.getMergedTraits().jsonName??u:u;o&&c.mark(l),r[l]!=null&&(a[u]=this._read(p,r[l]))}return o&&c.writeUnknown(),a}if(Array.isArray(r)&&s.isListSchema()){const o=s.getValueSchema(),a=[],c=!!s.getMergedTraits().sparse;for(const u of r)(c||u!=null)&&a.push(this._read(o,u));return a}if(s.isMapSchema()){const o=s.getValueSchema(),a={},c=!!s.getMergedTraits().sparse;for(const[u,p]of Object.entries(r))(c||p!=null)&&(a[u]=this._read(o,p));return a}}if(s.isBlobSchema()&&typeof r=="string")return Ke(r);const i=s.getMergedTraits().mediaType;if(s.isStringSchema()&&typeof r=="string"&&i)return i==="application/json"||i.endsWith("+json")?K.from(r):r;if(s.isTimestampSchema()&&r!=null)switch(In(s,this.settings)){case 5:return Jo(r);case 6:return Zo(r);case 7:return Xo(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(s.isBigIntegerSchema()&&(typeof r=="number"||typeof r=="string"))return BigInt(r);if(s.isBigDecimalSchema()&&r!=null){if(r instanceof W)return r;const o=r;return o.type==="bigDecimal"&&"string"in o?new W(o.string,o.type):new W(String(r),"bigDecimal")}if(s.isNumericSchema()&&typeof r=="string"){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return r}if(s.isDocumentSchema())if(n){const o=Array.isArray(r)?[]:{};for(const[a,c]of Object.entries(r))c instanceof W?o[a]=c:o[a]=this._read(s,c);return o}else return structuredClone(r);return r}}const rn="Ν";class du{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,r)=>{if(r instanceof W){const n=`${rn+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){const n=r.toString(),s=`${rn+"b"+this.counter++}_`+n;return this.values.set(`"${s}"`,n),s}return r}}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[r,n]of this.values)e=e.replace(r,n);return e}}class lu extends Rr{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,r){this.rootSchema=T.of(e),this.buffer=this._write(this.rootSchema,r)}writeDiscriminatedDocument(e,r){this.write(e,r),typeof this.buffer=="object"&&(this.buffer.__type=T.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:r}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!r)return JSON.stringify(this.buffer);const n=new du;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}_write(e,r,n){const s=r!==null&&typeof r=="object",i=T.of(e);if(s){if(i.isStructSchema()){const o={};for(const[a,c]of ru(i,r)){const u=this._write(c,r[a],i);if(u!==void 0){const p=c.getMergedTraits().jsonName,l=this.settings.jsonName?p??a:a;o[l]=u}}if(i.isUnionSchema()&&Object.keys(o).length===0){const{$unknown:a}=r;if(Array.isArray(a)){const[c,u]=a;o[c]=this._write(15,u)}}return o}if(Array.isArray(r)&&i.isListSchema()){const o=i.getValueSchema(),a=[],c=!!i.getMergedTraits().sparse;for(const u of r)(c||u!=null)&&a.push(this._write(o,u));return a}if(i.isMapSchema()){const o=i.getValueSchema(),a={},c=!!i.getMergedTraits().sparse;for(const[u,p]of Object.entries(r))(c||p!=null)&&(a[u]=this._write(o,p));return a}if(r instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?r:(this.serdeContext?.base64Encoder??_e)(r);if(r instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(In(i,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return Vo(r);case 7:return r.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",r),r.getTime()/1e3}r instanceof W&&(this.useReplacer=!0)}if(!(r===null&&n?.isStructSchema())){if(i.isStringSchema()){if(typeof r>"u"&&i.isIdempotencyToken())return Tn();const o=i.getMergedTraits().mediaType;return r!=null&&o&&(o==="application/json"||o.endsWith("+json"))?K.from(r):r}if(typeof r=="number"&&i.isNumericSchema())return Math.abs(r)===1/0||isNaN(r)?String(r):r;if(typeof r=="string"&&i.isBlobSchema())return i===this.rootSchema?r:(this.serdeContext?.base64Encoder??_e)(r);if(typeof r=="bigint"&&(this.useReplacer=!0),i.isDocumentSchema())if(s){const o=Array.isArray(r)?[]:{};for(const[a,c]of Object.entries(r))c instanceof W?(this.useReplacer=!0,o[a]=c):o[a]=this._write(i,c);return o}else return structuredClone(r);return r}}}class pu extends Rr{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new lu(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new uu(this.settings);return e.setSerdeContext(this.serdeContext),e}}class hu extends da{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:r,awsQueryCompatible:n,jsonCodec:s}){super({defaultNamespace:e}),this.serviceTarget=r,this.codec=s??new pu({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!n,this.mixin=new tu(this.awsQueryCompatible)}async serializeRequest(e,r,n){const s=await super.serializeRequest(e,r,n);return s.path.endsWith("/")||(s.path+="/"),Object.assign(s.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(s.headers["x-amzn-query-mode"]="true"),(Fe(e.input)==="unit"||!s.body)&&(s.body="{}"),s}getPayloadCodec(){return this.codec}async handleError(e,r,n,s,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(s,n);const o=cu(n,s)??"Unknown",{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,n,s,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=T.of(a),p=s.message??s.Message??"Unknown",l=m.for(a[1]).getErrorCtor(a)??Error,h=new l(p),f={};for(const[g,y]of u.structIterator())s[g]!=null&&(f[g]=this.codec.createDeserializer().readObject(y,s[g]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(s,f),this.mixin.decorateServiceException(Object.assign(h,c,{$fault:u.getMergedTraits().error,message:p},f),s)}}class fu extends hu{constructor({defaultNamespace:e,serviceTarget:r,awsQueryCompatible:n,jsonCodec:s}){super({defaultNamespace:e,serviceTarget:r,awsQueryCompatible:n,jsonCodec:s})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const mu=/\d{12}\.ddb/;async function gu(t,e,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&_(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const s=await e.retryStrategy();typeof s.acquireInitialRetryToken=="function"?s.constructor?.name?.includes("Adaptive")?_(t,"RETRY_MODE_ADAPTIVE","F"):_(t,"RETRY_MODE_STANDARD","E"):_(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const s=t.endpointV2;switch(String(s?.url?.hostname).match(mu)&&_(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":_(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":_(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":_(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const s=n;s.accountId&&_(t,"RESOLVED_ACCOUNT_ID","T");for(const[i,o]of Object.entries(s.$source??{}))_(t,i,o)}}const nn="user-agent",hr="x-amz-user-agent",sn=" ",fr="/",yu=/[^!$%&'*+\-.^_`|~\w]/g,wu=/[^!$%&'*+\-.^_`|~\w#]/g,on="-",bu=1024;function Eu(t){let e="";for(const r in t){const n=t[r];if(e.length+n.length+1<=bu){e.length?e+=","+n:e+=n;continue}break}return e}const Su=t=>(e,r)=>async n=>{const{request:s}=n;if(!D.isInstance(s))return e(n);const{headers:i}=s,o=r?.userAgent?.map(je)||[],a=(await t.defaultUserAgentProvider()).map(je);await gu(r,t,n);const c=r;a.push(`m/${Eu(Object.assign({},r.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=t?.customUserAgent?.map(je)||[],p=await t.userAgentAppId();p&&a.push(je(["app",`${p}`]));const l=[].concat([...a,...o,...u]).join(sn),h=[...a.filter(f=>f.startsWith("aws-sdk-")),...u].join(sn);return t.runtime!=="browser"?(h&&(i[hr]=i[hr]?`${i[nn]} ${h}`:h),i[nn]=l):i[hr]=l,e({...n,request:s})},je=t=>{const e=t[0].split(fr).map(o=>o.replace(yu,on)).join(fr),r=t[1]?.replace(wu,on),n=e.indexOf(fr),s=e.substring(0,n);let i=e.substring(n+1);return s==="api"&&(i=i.toLowerCase()),[s,i,r].filter(o=>o&&o.length>0).reduce((o,a,c)=>{switch(c){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},xu={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},vu=t=>({applyToStack:e=>{e.add(Su(t),xu)}}),Cu=!1,Au=!1,an=new Set,$u=(t,e=Ye)=>{if(!an.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 an.add(t)},Zn=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),Pu=t=>Zn(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,Ru=t=>{const{region:e,useFipsEndpoint:r}=t;if(!e)throw new Error("Region is missing");return Object.assign(t,{region:async()=>{const n=typeof e=="function"?await e():e,s=Pu(n);return $u(s),s},useFipsEndpoint:async()=>{const n=typeof e=="string"?e:await e();return Zn(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},cn="content-length";function Tu(t){return e=>async r=>{const n=r.request;if(D.isInstance(n)){const{body:s,headers:i}=n;if(s&&Object.keys(i).map(o=>o.toLowerCase()).indexOf(cn)===-1)try{const o=t(s);n.headers={...n.headers,[cn]:String(o)}}catch{}}return e({...r,request:n})}}const Iu={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Ou=t=>({applyToStack:e=>{e.add(Tu(t.bodyLengthChecker),Iu)}}),Uu=async t=>{const e=t?.Bucket||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),ju(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Du(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},ku=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Mu=/(\d+\.){3}\d+/,Nu=/\.\./,Du=t=>ku.test(t)&&!Mu.test(t)&&!Nu.test(t),ju=t=>{const[e,r,n,,,s]=t.split(":"),i=e==="arn"&&t.split(":").length>=6,o=!!(i&&r&&n&&s);if(i&&!o)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return o},Fu=(t,e,r,n=!1)=>{const s=async()=>{let i;return n?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 s();if(i&&typeof i=="object"){if("url"in i)return i.url.href;if("hostname"in i){const{protocol:o,hostname:a,port:c,path:u}=i;return`${o}//${a}${c?":"+c:""}${u}`}}return i}:s},Xn=async t=>{},es=t=>typeof t=="object"?"url"in t?Ge(t.url):t:Ge(t),Lu=async(t,e,r,n)=>{if(!r.isCustomEndpoint){let i;r.serviceConfiguredEndpoint?i=await r.serviceConfiguredEndpoint():i=await Xn(r.serviceId),i&&(r.endpoint=()=>Promise.resolve(es(i)),r.isCustomEndpoint=!0)}const s=await qu(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(s,n)},qu=async(t,e,r)=>{const n={},s=e?.getEndpointParameterInstructions?.()||{};for(const[i,o]of Object.entries(s))switch(o.type){case"staticContextParams":n[i]=o.value;break;case"contextParams":n[i]=t[o.name];break;case"clientContextParams":case"builtInParams":n[i]=await Fu(o.name,i,r,o.type!=="builtInParams")();break;case"operationContextParams":n[i]=o.get(t);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return Object.keys(s).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await Uu(n),n},zu=({config:t,instructions:e})=>(r,n)=>async s=>{t.isCustomEndpoint&&Ia(n,"ENDPOINT_OVERRIDE","N");const i=await Lu(s.input,{getEndpointParameterInstructions(){return e}},{...t},n);n.endpointV2=i,n.authSchemes=i.properties?.authSchemes;const o=n.authSchemes?.[0];if(o){n.signing_region=o.signingRegion,n.signing_service=o.signingName;const a=we(n)?.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({...s})},Hu={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Ca.name},L=(t,e)=>({applyToStack:r=>{r.addRelativeTo(zu({config:t,instructions:e}),Hu)}}),_u=t=>{const e=t.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:s}=t,i=r!=null?async()=>es(await G(r)()):void 0,o=Object.assign(t,{endpoint:i,tls:e,isCustomEndpoint:!!r,useDualstackEndpoint:G(n??!1),useFipsEndpoint:G(s??!1)});let a;return o.serviceConfiguredEndpoint=async()=>(t.serviceId&&!a&&(a=Xn(t.serviceId)),a),o};var ge;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(ge||(ge={}));const Je=3,Bu=ge.STANDARD,Wu=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Vu=["TimeoutError","RequestTimeout","RequestTimeoutException"],Gu=[500,502,503,504],Ju=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Ku=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Qu=t=>t?.$retryable!==void 0,Yu=t=>t.$metadata?.clockSkewCorrected,Zu=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},ts=t=>t.$metadata?.httpStatusCode===429||Wu.includes(t.name)||t.$retryable?.throttling==!0,Tr=(t,e=0)=>Qu(t)||Yu(t)||Vu.includes(t.name)||Ju.includes(t?.code||"")||Ku.includes(t?.code||"")||Gu.includes(t.$metadata?.httpStatusCode||0)||Zu(t)||t.cause!==void 0&&e<=10&&Tr(t.cause,e+1),Xu=t=>{if(t.$metadata?.httpStatusCode!==void 0){const e=t.$metadata.httpStatusCode;return 500<=e&&e<=599&&!Tr(t)}return!1};class Ir{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(n=>Ir.setTimeoutFn(n,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(),ts(e)){const s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(n)}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 n=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(e){return parseFloat(e.toFixed(8))}}const Sr=100,rs=20*1e3,ed=500,un=500,td=5,rd=10,nd=1,sd="amz-sdk-invocation-id",id="amz-sdk-request",od=()=>{let t=Sr;return{computeNextBackoffDelay:e=>Math.floor(Math.min(rs,Math.random()*2**e*t)),setDelayBase:e=>{t=e}}},dn=({retryDelay:t,retryCount:e,retryCost:r})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(rs,t),getRetryCost:()=>r});class ns{maxAttempts;mode=ge.STANDARD;capacity=un;retryBackoffStrategy=od();maxAttemptsProvider;constructor(e){this.maxAttempts=e,this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return dn({retryDelay:Sr,retryCount:0})}async refreshRetryTokenForRetry(e,r){const n=await this.getMaxAttempts();if(this.shouldRetry(e,r,n)){const s=r.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?ed:Sr);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),o=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,i):i,a=this.getCapacityCost(s);return this.capacity-=a,dn({retryDelay:o,retryCount:e.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(un,this.capacity+(e.getRetryCost()??nd))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Je}`),Je}}shouldRetry(e,r,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(e){return e==="TRANSIENT"?rd:td}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class ad{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=ge.ADAPTIVE;constructor(e,r){this.maxAttemptsProvider=e;const{rateLimiter:n}=r??{};this.rateLimiter=n??new Ir,this.standardRetryStrategy=new ns(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 cd=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}`),ud=t=>{const{retryStrategy:e,retryMode:r,maxAttempts:n}=t,s=G(n??Je);return Object.assign(t,{maxAttempts:s,retryStrategy:async()=>e||(await G(r)()===ge.ADAPTIVE?new ad(s):new ns(s))})},dd=t=>t?.body instanceof ReadableStream,ld=t=>(e,r)=>async n=>{let s=await t.retryStrategy();const i=await t.maxAttempts();if(pd(s)){s=s;let o=await s.acquireInitialRetryToken(r.partition_id),a=new Error,c=0,u=0;const{request:p}=n,l=D.isInstance(p);for(l&&(p.headers[sd]=Tn());;)try{l&&(p.headers[id]=`attempt=${c+1}; max=${i}`);const{response:h,output:f}=await e(n);return s.recordSuccess(o),f.$metadata.attempts=c+1,f.$metadata.totalRetryDelay=u,{response:h,output:f}}catch(h){const f=hd(h);if(a=cd(h),l&&dd(p))throw(r.logger instanceof On?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{o=await s.refreshRetryTokenForRetry(o,f)}catch{throw a.$metadata||(a.$metadata={}),a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=u,a}c=o.getRetryCount();const g=o.getRetryDelay();u+=g,await new Promise(y=>setTimeout(y,g))}}else return s=s,s?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",s.mode]]),s.retry(e,n)},pd=t=>typeof t.acquireInitialRetryToken<"u"&&typeof t.refreshRetryTokenForRetry<"u"&&typeof t.recordSuccess<"u",hd=t=>{const e={error:t,errorType:fd(t)},r=yd(t.$response);return r&&(e.retryAfterHint=r),e},fd=t=>ts(t)?"THROTTLING":Tr(t)?"TRANSIENT":Xu(t)?"SERVER_ERROR":"CLIENT_ERROR",md={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},gd=t=>({applyToStack:e=>{e.add(ld(t),md)}}),yd=t=>{if(!fe.isInstance(t))return;const e=Object.keys(t.headers).find(s=>s.toLowerCase()==="retry-after");if(!e)return;const r=t.headers[e],n=Number(r);return Number.isNaN(n)?new Date(r):new Date(n*1e3)},wd=async(t,e,r)=>({operation:we(e).operation,region:await G(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function bd(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:t.region},propertiesExtractor:(e,r)=>({signingProperties:{config:e,context:r}})}}function A(t){return{schemeId:"smithy.api#noAuth"}}const Ed=t=>{const e=[];switch(t.operation){case"AssociateSoftwareToken":{e.push(A());break}case"ChangePassword":{e.push(A());break}case"CompleteWebAuthnRegistration":{e.push(A());break}case"ConfirmDevice":{e.push(A());break}case"ConfirmForgotPassword":{e.push(A());break}case"ConfirmSignUp":{e.push(A());break}case"DeleteUser":{e.push(A());break}case"DeleteUserAttributes":{e.push(A());break}case"DeleteWebAuthnCredential":{e.push(A());break}case"ForgetDevice":{e.push(A());break}case"ForgotPassword":{e.push(A());break}case"GetDevice":{e.push(A());break}case"GetTokensFromRefreshToken":{e.push(A());break}case"GetUser":{e.push(A());break}case"GetUserAttributeVerificationCode":{e.push(A());break}case"GetUserAuthFactors":{e.push(A());break}case"GlobalSignOut":{e.push(A());break}case"InitiateAuth":{e.push(A());break}case"ListDevices":{e.push(A());break}case"ListWebAuthnCredentials":{e.push(A());break}case"ResendConfirmationCode":{e.push(A());break}case"RespondToAuthChallenge":{e.push(A());break}case"RevokeToken":{e.push(A());break}case"SetUserMFAPreference":{e.push(A());break}case"SetUserSettings":{e.push(A());break}case"SignUp":{e.push(A());break}case"StartWebAuthnRegistration":{e.push(A());break}case"UpdateAuthEventFeedback":{e.push(A());break}case"UpdateDeviceStatus":{e.push(A());break}case"UpdateUserAttributes":{e.push(A());break}case"VerifySoftwareToken":{e.push(A());break}case"VerifyUserAttribute":{e.push(A());break}default:e.push(bd(t))}return e},Sd=t=>{const e=Yc(t);return Object.assign(e,{authSchemePreference:G(t.authSchemePreference??[])})},xd=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),q={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},vd="3.967.0",Cd={version:vd},Ad=t=>new TextEncoder().encode(t);var $d=typeof rr<"u"&&rr.from?function(t){return rr.from(t,"utf8")}:Ad;function Oe(t){return t instanceof Uint8Array?t:typeof t=="string"?$d(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function xr(t){return typeof t=="string"?t.length===0:t.byteLength===0}var ss={name:"SHA-256"},ln={name:"HMAC",hash:ss},Pd=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 Rd={};function qe(){return typeof window<"u"?window:typeof self<"u"?self:Rd}var Td=(function(){function t(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return t.prototype.update=function(e){if(!xr(e)){var r=Oe(e),n=new Uint8Array(this.toHash.byteLength+r.byteLength);n.set(this.toHash,0),n.set(r,this.toHash.byteLength),this.toHash=n}},t.prototype.digest=function(){var e=this;return this.key?this.key.then(function(r){return qe().crypto.subtle.sign(ln,r,e.toHash).then(function(n){return new Uint8Array(n)})}):xr(this.toHash)?Promise.resolve(Pd):Promise.resolve().then(function(){return qe().crypto.subtle.digest(ss,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,n){qe().crypto.subtle.importKey("raw",Oe(e.secret),ln,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},t})();function Id(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(n.next(p))}catch(l){o(l)}}function c(p){try{u(n.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):s(p.value).then(a,c)}u((n=n.apply(t,[])).next())})}function Od(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,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(u){return function(p){return c([u,p])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,s&&(i=u[0]&2?s.return:u[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,u[1])).done)return i;switch(s=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,s=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(p){u=[6,p],s=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var F=64,Ud=32,kd=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]),Md=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Nd=Math.pow(2,53)-1,ze=(function(){function t(){this.state=Int32Array.from(Md),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,n=e.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>Nd)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[r++],n--,this.bufferLength===F&&(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),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%F>=F-8){for(var s=this.bufferLength;s<F;s++)r.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<F-8;s++)r.setUint8(s,0);r.setUint32(F-8,Math.floor(e/4294967296),!0),r.setUint32(F-4,e),this.hashBuffer(),this.finished=!0}for(var i=new Uint8Array(Ud),s=0;s<8;s++)i[s*4]=this.state[s]>>>24&255,i[s*4+1]=this.state[s]>>>16&255,i[s*4+2]=this.state[s]>>>8&255,i[s*4+3]=this.state[s]>>>0&255;return i},t.prototype.hashBuffer=function(){for(var e=this,r=e.buffer,n=e.state,s=n[0],i=n[1],o=n[2],a=n[3],c=n[4],u=n[5],p=n[6],l=n[7],h=0;h<F;h++){if(h<16)this.temp[h]=(r[h*4]&255)<<24|(r[h*4+1]&255)<<16|(r[h*4+2]&255)<<8|r[h*4+3]&255;else{var f=this.temp[h-2],g=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10;f=this.temp[h-15];var y=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;this.temp[h]=(g+this.temp[h-7]|0)+(y+this.temp[h-16]|0)}var b=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&p)|0)+(l+(kd[h]+this.temp[h]|0)|0)|0,$=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&i^s&o^i&o)|0;l=p,p=u,u=c,c=a+b|0,a=o,o=i,i=s,s=b+$|0}n[0]+=s,n[1]+=i,n[2]+=o,n[3]+=a,n[4]+=c,n[5]+=u,n[6]+=p,n[7]+=l},t})(),Dd=(function(){function t(e){this.secret=e,this.hash=new ze,this.reset()}return t.prototype.update=function(e){if(!(xr(e)||this.error))try{this.hash.update(Oe(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 Id(this,void 0,void 0,function(){return Od(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new ze,this.secret){this.outer=new ze;var e=jd(this.secret),r=new Uint8Array(F);r.set(e);for(var n=0;n<F;n++)e[n]^=54,r[n]^=92;this.hash.update(e),this.outer.update(r);for(var n=0;n<e.byteLength;n++)e[n]=0}},t})();function jd(t){var e=Oe(t);if(e.byteLength>F){var r=new ze;r.update(e),e=r.digest()}var n=new Uint8Array(F);return n.set(e),n}var Fd=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Ld(t){if(qd(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return zd(e)}return!1}function qd(t){if(typeof t=="object"&&typeof t.crypto=="object"){var e=t.crypto.getRandomValues;return typeof e=="function"}return!1}function zd(t){return t&&Fd.every(function(e){return typeof t[e]=="function"})}var Hd=(function(){function t(e){Ld(qe())?this.hash=new Td(e):this.hash=new Dd(e)}return t.prototype.update=function(e,r){this.hash.update(Oe(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t})();const _d=({serviceId:t,clientVersion:e})=>async r=>{const n=typeof window<"u"?window.navigator:void 0,s=n?.userAgent??"",i=n?.userAgentData?.platform??pn.os(s)??"other",o=void 0,a=n?.userAgentData?.brands??[],c=a[a.length-1],u=c?.brand??pn.browser(s)??"unknown",p=c?.version??"unknown",l=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${u}_${p}`]];t&&l.push([`api/${t}`,e]);const h=await r?.userAgentAppId?.();return h&&l.push([`app/${h}`]),l},pn={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"}},Bd=t=>()=>Promise.reject(t),Wd=["in-region","cross-region","mobile","standard","legacy"],Vd=({defaultsMode:t}={})=>ho(async()=>{const e=typeof t=="function"?await t():t;switch(e?.toLowerCase()){case"auto":return Promise.resolve(Gd()?"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 ${Wd.join(", ")}, got ${e}`)}}),Gd=()=>{const t=window?.navigator;if(t?.connection){const{effectiveType:e,rtt:r,downlink:n}=t?.connection;if(typeof e=="string"&&e!=="4g"||Number(r)>100||Number(n)<10)return!0}return t?.userAgentData?.mobile||typeof t?.maxTouchPoints=="number"&&t?.maxTouchPoints>1},is="required",k="fn",M="argv",be="ref",hn=!0,fn="isSet",Ue="booleanEquals",le="error",B="endpoint",V="tree",Or="PartitionResult",Ur="getAttr",Se="stringEquals",mn={[is]:!1,type:"string"},gn={[is]:!0,default:!1,type:"boolean"},yn={[be]:"Endpoint"},os={[k]:Ue,[M]:[{[be]:"UseFIPS"},!0]},as={[k]:Ue,[M]:[{[be]:"UseDualStack"},!0]},R={},ve={[be]:"Region"},wn={[k]:Ur,[M]:[{[be]:Or},"supportsFIPS"]},cs={[be]:Or},bn={[k]:Ue,[M]:[!0,{[k]:Ur,[M]:[cs,"supportsDualStack"]}]},En=[os],Sn=[as],xn=[ve],Jd={parameters:{Region:mn,UseDualStack:gn,UseFIPS:gn,Endpoint:mn},rules:[{conditions:[{[k]:fn,[M]:[yn]}],rules:[{conditions:En,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:le},{conditions:Sn,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:le},{endpoint:{url:yn,properties:R,headers:R},type:B}],type:V},{conditions:[{[k]:fn,[M]:xn}],rules:[{conditions:[{[k]:"aws.partition",[M]:xn,assign:Or}],rules:[{conditions:[os,as],rules:[{conditions:[{[k]:Ue,[M]:[hn,wn]},bn],rules:[{conditions:[{[k]:Se,[M]:[ve,"us-east-1"]}],endpoint:{url:"https://cognito-idp-fips.us-east-1.amazonaws.com",properties:R,headers:R},type:B},{conditions:[{[k]:Se,[M]:[ve,"us-east-2"]}],endpoint:{url:"https://cognito-idp-fips.us-east-2.amazonaws.com",properties:R,headers:R},type:B},{conditions:[{[k]:Se,[M]:[ve,"us-west-1"]}],endpoint:{url:"https://cognito-idp-fips.us-west-1.amazonaws.com",properties:R,headers:R},type:B},{conditions:[{[k]:Se,[M]:[ve,"us-west-2"]}],endpoint:{url:"https://cognito-idp-fips.us-west-2.amazonaws.com",properties:R,headers:R},type:B},{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:R,headers:R},type:B}],type:V},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:le}],type:V},{conditions:En,rules:[{conditions:[{[k]:Ue,[M]:[wn,hn]}],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:R,headers:R},type:B}],type:V},{error:"FIPS is enabled but this partition does not support FIPS",type:le}],type:V},{conditions:Sn,rules:[{conditions:[bn],rules:[{conditions:[{[k]:Se,[M]:["aws",{[k]:Ur,[M]:[cs,"name"]}]}],endpoint:{url:"https://cognito-idp.{Region}.amazonaws.com",properties:R,headers:R},type:B},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:R,headers:R},type:B}],type:V},{error:"DualStack is enabled but this partition does not support DualStack",type:le}],type:V},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:R,headers:R},type:B}],type:V}],type:V},{error:"Invalid Configuration: Missing Region",type:le}]},Kd=Jd,Qd=new Ka({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Yd=(t,e={})=>Qd.get(t,()=>fc(Kd,{endpointParams:t,logger:e.logger}));Ve.aws=Bn;const Zd=t=>({apiVersion:"2016-04-18",base64Decoder:t?.base64Decoder??Ke,base64Encoder:t?.base64Encoder??_e,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Yd,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Ed,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ac},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ua}],logger:t?.logger??new On,protocol:t?.protocol??fu,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",xmlNamespace:"http://cognito-idp.amazonaws.com/doc/2016-04-18/",version:"2016-04-18",serviceTarget:"AWSCognitoIdentityProviderService"},serviceId:t?.serviceId??"Cognito Identity Provider",urlParser:t?.urlParser??Ge,utf8Decoder:t?.utf8Decoder??me,utf8Encoder:t?.utf8Encoder??Cr}),Xd=t=>{const e=Vd(t),r=()=>e().then(pa),n=Zd(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??eu,credentialDefaultProvider:t?.credentialDefaultProvider??(s=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??_d({serviceId:n.serviceId,clientVersion:Cd.version}),maxAttempts:t?.maxAttempts??Je,region:t?.region??Bd("Region is missing"),requestHandler:vr.create(t?.requestHandler??r),retryMode:t?.retryMode??(async()=>(await r()).retryMode||Bu),sha256:t?.sha256??Hd,streamCollector:t?.streamCollector??xo,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(Cu)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(Au))}},el=t=>({setRegion(e){t.region=e},region(){return t.region}}),tl=t=>({region:t.region()}),rl=t=>{const e=t.httpAuthSchemes;let r=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(s){const i=e.findIndex(o=>o.schemeId===s.schemeId);i===-1?e.push(s):e.splice(i,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){n=s},credentials(){return n}}},nl=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),sl=(t,e)=>{const r=Object.assign(el(t),ya(t),fo(t),rl(t));return e.forEach(n=>n.configure(r)),Object.assign(t,tl(r),wa(r),mo(r),nl(r))};class il extends Cn{config;constructor(...[e]){const r=Xd(e||{});super(r),this.initConfig=r;const n=xd(r),s=Ja(n),i=ud(s),o=Ru(i),a=o,c=_u(a),u=Sd(c),p=sl(u,e?.extensions||[]);this.config=p,this.middlewareStack.use(Oo(this.config)),this.middlewareStack.use(vu(this.config)),this.middlewareStack.use(gd(this.config)),this.middlewareStack.use(Ou(this.config)),this.middlewareStack.use(La(this.config)),this.middlewareStack.use(Ha(this.config)),this.middlewareStack.use(Wa(this.config)),this.middlewareStack.use(va(this.config,{httpAuthSchemeParametersProvider:wd,identityProviderConfigProvider:async l=>new Oa({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Ta(this.config))}destroy(){super.destroy()}}class w extends pe{constructor(e){super(e),Object.setPrototypeOf(this,w.prototype)}}class Xe extends w{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,Xe.prototype)}}class et extends w{name="InvalidParameterException";$fault="client";reasonCode;constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,et.prototype),this.reasonCode=e.reasonCode}}class tt extends w{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,tt.prototype)}}class rt extends w{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,rt.prototype)}}class nt extends w{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,nt.prototype)}}class st extends w{name="UserImportInProgressException";$fault="client";constructor(e){super({name:"UserImportInProgressException",$fault:"client",...e}),Object.setPrototypeOf(this,st.prototype)}}class it extends w{name="UserNotFoundException";$fault="client";constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,it.prototype)}}class ot extends w{name="InvalidLambdaResponseException";$fault="client";constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),Object.setPrototypeOf(this,ot.prototype)}}class at extends w{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,at.prototype)}}class ct extends w{name="TooManyFailedAttemptsException";$fault="client";constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),Object.setPrototypeOf(this,ct.prototype)}}class ut extends w{name="UnexpectedLambdaException";$fault="client";constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),Object.setPrototypeOf(this,ut.prototype)}}class dt extends w{name="UserLambdaValidationException";$fault="client";constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,dt.prototype)}}class lt extends w{name="CodeDeliveryFailureException";$fault="client";constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),Object.setPrototypeOf(this,lt.prototype)}}class pt extends w{name="InvalidPasswordException";$fault="client";constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),Object.setPrototypeOf(this,pt.prototype)}}class ht extends w{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,ht.prototype)}}class ft extends w{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),Object.setPrototypeOf(this,ft.prototype)}}class mt extends w{name="PreconditionNotMetException";$fault="client";constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),Object.setPrototypeOf(this,mt.prototype)}}class gt extends w{name="UnsupportedUserStateException";$fault="client";constructor(e){super({name:"UnsupportedUserStateException",$fault:"client",...e}),Object.setPrototypeOf(this,gt.prototype)}}class yt extends w{name="UsernameExistsException";$fault="client";constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,yt.prototype)}}class wt extends w{name="AliasExistsException";$fault="client";constructor(e){super({name:"AliasExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,wt.prototype)}}class bt extends w{name="InvalidUserPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,bt.prototype)}}class Et extends w{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,Et.prototype)}}class St extends w{name="MFAMethodNotFoundException";$fault="client";constructor(e){super({name:"MFAMethodNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,St.prototype)}}class xt extends w{name="PasswordResetRequiredException";$fault="client";constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),Object.setPrototypeOf(this,xt.prototype)}}class vt extends w{name="UnsupportedOperationException";$fault="client";constructor(e){super({name:"UnsupportedOperationException",$fault:"client",...e}),Object.setPrototypeOf(this,vt.prototype)}}class Ct extends w{name="UserNotConfirmedException";$fault="client";constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),Object.setPrototypeOf(this,Ct.prototype)}}class At extends w{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(e){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...e}),Object.setPrototypeOf(this,At.prototype)}}class $t extends w{name="CodeMismatchException";$fault="client";constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,$t.prototype)}}class Pt extends w{name="ExpiredCodeException";$fault="client";constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),Object.setPrototypeOf(this,Pt.prototype)}}class Rt extends w{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(e){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...e}),Object.setPrototypeOf(this,Rt.prototype)}}class Tt extends w{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(e){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Tt.prototype)}}class It extends w{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,It.prototype)}}class Ot extends w{name="ForbiddenException";$fault="client";constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),Object.setPrototypeOf(this,Ot.prototype)}}class Ut extends w{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(e){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Ut.prototype)}}class kt extends w{name="WebAuthnClientMismatchException";$fault="client";constructor(e){super({name:"WebAuthnClientMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,kt.prototype)}}class Mt extends w{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(e){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...e}),Object.setPrototypeOf(this,Mt.prototype)}}class Nt extends w{name="WebAuthnNotEnabledException";$fault="client";constructor(e){super({name:"WebAuthnNotEnabledException",$fault:"client",...e}),Object.setPrototypeOf(this,Nt.prototype)}}class Dt extends w{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(e){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...e}),Object.setPrototypeOf(this,Dt.prototype)}}class jt extends w{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(e){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,jt.prototype)}}class Ft extends w{name="DeviceKeyExistsException";$fault="client";constructor(e){super({name:"DeviceKeyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Ft.prototype)}}class Lt extends w{name="GroupExistsException";$fault="client";constructor(e){super({name:"GroupExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Lt.prototype)}}class qt extends w{name="DuplicateProviderException";$fault="client";constructor(e){super({name:"DuplicateProviderException",$fault:"client",...e}),Object.setPrototypeOf(this,qt.prototype)}}class zt extends w{name="ManagedLoginBrandingExistsException";$fault="client";constructor(e){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,zt.prototype)}}class Ht extends w{name="TermsExistsException";$fault="client";constructor(e){super({name:"TermsExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Ht.prototype)}}class _t extends w{name="FeatureUnavailableInTierException";$fault="client";constructor(e){super({name:"FeatureUnavailableInTierException",$fault:"client",...e}),Object.setPrototypeOf(this,_t.prototype)}}class Bt extends w{name="TierChangeNotAllowedException";$fault="client";constructor(e){super({name:"TierChangeNotAllowedException",$fault:"client",...e}),Object.setPrototypeOf(this,Bt.prototype)}}class Wt extends w{name="UserPoolTaggingException";$fault="client";constructor(e){super({name:"UserPoolTaggingException",$fault:"client",...e}),Object.setPrototypeOf(this,Wt.prototype)}}class Vt extends w{name="InvalidOAuthFlowException";$fault="client";constructor(e){super({name:"InvalidOAuthFlowException",$fault:"client",...e}),Object.setPrototypeOf(this,Vt.prototype)}}class Gt extends w{name="ScopeDoesNotExistException";$fault="client";constructor(e){super({name:"ScopeDoesNotExistException",$fault:"client",...e}),Object.setPrototypeOf(this,Gt.prototype)}}class Jt extends w{name="UnsupportedIdentityProviderException";$fault="client";constructor(e){super({name:"UnsupportedIdentityProviderException",$fault:"client",...e}),Object.setPrototypeOf(this,Jt.prototype)}}class Kt extends w{name="RefreshTokenReuseException";$fault="client";constructor(e){super({name:"RefreshTokenReuseException",$fault:"client",...e}),Object.setPrototypeOf(this,Kt.prototype)}}class Qt extends w{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Qt.prototype)}}class Yt extends w{name="UnsupportedTokenTypeException";$fault="client";constructor(e){super({name:"UnsupportedTokenTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,Yt.prototype)}}class Zt extends w{name="WebAuthnConfigurationMissingException";$fault="client";constructor(e){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...e}),Object.setPrototypeOf(this,Zt.prototype)}}class Xt extends w{name="EnableSoftwareTokenMFAException";$fault="client";constructor(e){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...e}),Object.setPrototypeOf(this,Xt.prototype)}}const ol="AvailableChallenges",al="AdminCreateUser",cl="AdminCreateUserRequest",ul="AdminCreateUserResponse",dl="AdminDeleteUser",ll="AdminDeleteUserRequest",pl="AdminDisableUserRequest",hl="AdminDisableUserResponse",fl="AdminDisableUser",ml="AliasExistsException",gl="AnalyticsEndpointId",yl="AdminEnableUser",wl="AdminEnableUserRequest",bl="AdminEnableUserResponse",El="AuthFlow",Sl="AdminGetUser",xl="AdminGetUserRequest",vl="AdminGetUserResponse",Cl="AttributeListType",ie="AnalyticsMetadata",Al="AnalyticsMetadataType",us="AttributeName",$l="AuthParameters",Pl="AuthParametersType",ds="AuthenticationResult",Rl="AuthenticationResultType",Tl="AccessToken",Il="AttributeType",Ol="AttributeValueType",Ul="Attributes",ls="ConfirmationCode",kr="CodeDeliveryDetails",kl="CodeDeliveryDetailsType",Ml="CodeDeliveryFailureException",Nl="ConfirmForgotPassword",Dl="ConfirmForgotPasswordRequest",jl="ConfirmForgotPasswordResponse",oe="ClientId",Fl="ClientIdType",Z="ClientMetadata",Ll="CodeMismatchException",ql="ConcurrentModificationException",Mr="ChallengeName",ps="ChallengeParameters",zl="ChallengeResponses",Hl="ChallengeResponsesType",_l="ConfirmSignUp",Bl="ConfirmSignUpRequest",Wl="ConfirmSignUpResponse",Vl="DesiredDeliveryMediums",Gl="DeviceGroupKey",Jl="DeviceKey",Kl="DeviceKeyExistsException",hs="DeliveryMedium",Ql="DuplicateProviderException",Yl="Destination",fs="Enabled",Zl="ExpiredCodeException",Xl="EncodedData",ep="ExpiresIn",tp="EnableSoftwareTokenMFAException",ms="ForceAliasCreation",rp="ForbiddenException",np="ForgotPassword",sp="ForgotPasswordRequest",ip="ForgotPasswordResponse",op="FeatureUnavailableInTierException",ap="GroupExistsException",cp="IpAddress",up="InitiateAuthRequest",dp="InitiateAuthResponse",lp="InitiateAuth",pp="InternalErrorException",hp="InvalidEmailRoleAccessPolicyException",fp="InvalidLambdaResponseException",mp="InvalidOAuthFlowException",gp="InvalidParameterException",yp="InvalidPasswordException",wp="InvalidSmsRoleAccessPolicyException",bp="InvalidSmsRoleTrustRelationshipException",Ep="IdToken",Sp="InvalidUserPoolConfigurationException",xp="LimitExceededException",vp="MessageAction",Cp="MFAMethodNotFoundException",gs="MFAOptions",Ap="MFAOptionListType",$p="MFAOptionType",Pp="ManagedLoginBrandingExistsException",Rp="NotAuthorizedException",Tp="NewDeviceMetadata",Ip="NewDeviceMetadataType",Op="Name",ys="Password",Up="PasswordHistoryPolicyViolationException",kp="PreferredMfaSetting",Mp="PreconditionNotMetException",Np="PasswordResetRequiredException",Dp="PasswordType",jp="ResendConfirmationCode",Fp="ResendConfirmationCodeRequest",Lp="ResendConfirmationCodeResponse",qp="ResourceNotFoundException",zp="RefreshToken",Hp="RespondToAuthChallenge",_p="RespondToAuthChallengeRequest",Bp="RespondToAuthChallengeResponse",Wp="RefreshTokenReuseException",ae="Session",Vp="ScopeDoesNotExistException",ke="SecretHash",Gp="SecretHashType",Jp="SessionType",Kp="SoftwareTokenMFANotFoundException",Qp="SignUpRequest",Yp="SignUpResponse",Zp="SignUp",Xp="TierChangeNotAllowedException",eh="TermsExistsException",th="TooManyFailedAttemptsException",rh="TooManyRequestsException",nh="TokenModelType",sh="TemporaryPassword",ih="TokenType",z="Username",Nr="UserAttributes",ws="UserCreateDate",oh="UserContextDataType",ce="UserContextData",ah="UserConfirmed",ch="UnauthorizedException",uh="UsernameExistsException",dh="UserImportInProgressException",lh="UnsupportedIdentityProviderException",ph="UnexpectedLambdaException",bs="UserLastModifiedDate",hh="UserLambdaValidationException",fh="UserMFASettingList",mh="UserNotConfirmedException",gh="UserNotFoundException",yh="UnsupportedOperationException",wh="UserPoolAddOnNotEnabledException",Me="UserPoolId",bh="UserPoolTaggingException",Es="UserStatus",Eh="UserSub",Sh="UsernameType",xh="UnsupportedTokenTypeException",vh="UserType",Ch="UnsupportedUserStateException",Ah="User",$h="Value",Ss="ValidationData",Ph="WebAuthnClientMismatchException",Rh="WebAuthnConfigurationMissingException",Th="WebAuthnChallengeNotFoundException",Ih="WebAuthnCredentialNotSupportedException",Oh="WebAuthnNotEnabledException",Uh="WebAuthnOriginNotAllowedException",kh="WebAuthnRelyingPartyMismatchException",x="client",E="error",v="httpError",S="message",Mh="reasonCode",Nh="server",xs="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",d="com.amazonaws.cognitoidentityprovider";var Dh=[0,d,Ol,8,0],ue=[0,d,Fl,8,0],Dr=[0,d,Dp,8,0],Ne=[0,d,Gp,8,0],de=[0,d,Jp,8,0],mr=[0,d,nh,8,0],H=[0,d,Sh,8,0],vs=[3,d,cl,0,[Me,z,Nr,Ss,sh,ms,vp,Vl,Z],[0,[()=>H,0],[()=>ye,0],[()=>ye,0],[()=>Dr,0],2,0,64,128]],Cs=[3,d,ul,0,[Ah],[[()=>_i,0]]],As=[3,d,ll,0,[Me,z],[0,[()=>H,0]]],$s=[3,d,pl,0,[Me,z],[0,[()=>H,0]]],Ps=[3,d,hl,0,[],[]],Rs=[3,d,wl,0,[Me,z],[0,[()=>H,0]]],Ts=[3,d,bl,0,[],[]],Is=[3,d,xl,0,[Me,z],[0,[()=>H,0]]],Os=[3,d,vl,0,[z,Nr,ws,bs,fs,Es,gs,kp,fh],[[()=>H,0],[()=>ye,0],4,4,2,0,()=>Zi,0,64]],Us=[-3,d,ml,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Us,wt);var X=[3,d,Al,0,[gl],[0]],ks=[3,d,Il,0,[Op,$h],[0,[()=>Dh,0]]],jr=[3,d,Rl,0,[Tl,ep,ih,zp,Ep,Tp],[[()=>mr,0],1,0,[()=>mr,0],[()=>mr,0],()=>li]],er=[3,d,kl,0,[Yl,hs,us],[0,0,0]],Ms=[-3,d,Ml,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ms,lt);var Ns=[-3,d,Ll,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ns,$t);var Ds=[-3,d,ql,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ds,It);var js=[3,d,Dl,0,[oe,ke,z,ls,ys,ie,ce,Z],[[()=>ue,0],[()=>Ne,0],[()=>H,0],0,[()=>Dr,0],()=>X,[()=>ee,0],128]],Fs=[3,d,jl,0,[],[]],Ls=[3,d,Bl,0,[oe,ke,z,ls,ms,ie,ce,Z,ae],[[()=>ue,0],[()=>Ne,0],[()=>H,0],0,2,()=>X,[()=>ee,0],128,[()=>de,0]]],qs=[3,d,Wl,0,[ae],[[()=>de,0]]],zs=[-3,d,Kl,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(zs,Ft);var Hs=[-3,d,Ql,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Hs,qt);var _s=[-3,d,tp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(_s,Xt);var Bs=[-3,d,Zl,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Bs,Pt);var Ws=[-3,d,op,{[E]:x,[v]:403},[S],[0]];m.for(d).registerError(Ws,_t);var Vs=[-3,d,rp,{[E]:x,[v]:403},[S],[0]];m.for(d).registerError(Vs,Ot);var Gs=[3,d,sp,0,[oe,ke,ce,z,ie,Z],[[()=>ue,0],[()=>Ne,0],[()=>ee,0],[()=>H,0],()=>X,128]],Js=[3,d,ip,0,[kr],[()=>er]],Ks=[-3,d,ap,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ks,Lt);var Qs=[3,d,up,0,[El,$l,Z,oe,ie,ce,ae],[0,[()=>Fh,0],128,[()=>ue,0],()=>X,[()=>ee,0],[()=>de,0]]],Ys=[3,d,dp,0,[Mr,ae,ps,ds,ol],[0,[()=>de,0],128,[()=>jr,0],64]],Zs=[-3,d,pp,{[E]:Nh},[S],[0]];m.for(d).registerError(Zs,Xe);var Xs=[-3,d,hp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Xs,Et);var ei=[-3,d,fp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ei,ot);var ti=[-3,d,mp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ti,Vt);var ri=[-3,d,gp,{[E]:x,[v]:400},[S,Mh],[0,0]];m.for(d).registerError(ri,et);var ni=[-3,d,yp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ni,pt);var si=[-3,d,wp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(si,ht);var ii=[-3,d,bp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ii,ft);var oi=[-3,d,Sp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(oi,bt);var ai=[-3,d,xp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ai,at);var ci=[-3,d,Pp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ci,zt);var ui=[-3,d,Cp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ui,St);var di=[3,d,$p,0,[hs,us],[0,0]],li=[3,d,Ip,0,[Jl,Gl],[0,0]],pi=[-3,d,Rp,{[E]:x,[v]:403},[S],[0]];m.for(d).registerError(pi,tt);var hi=[-3,d,Up,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(hi,Rt);var fi=[-3,d,Np,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(fi,xt);var mi=[-3,d,Mp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(mi,mt);var gi=[-3,d,Wp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(gi,Kt);var yi=[3,d,Fp,0,[oe,ke,ce,z,ie,Z],[[()=>ue,0],[()=>Ne,0],[()=>ee,0],[()=>H,0],()=>X,128]],wi=[3,d,Lp,0,[kr],[()=>er]],bi=[-3,d,qp,{[E]:x,[v]:404},[S],[0]];m.for(d).registerError(bi,rt);var Ei=[3,d,_p,0,[oe,Mr,ae,zl,ie,ce,Z],[[()=>ue,0],0,[()=>de,0],[()=>Lh,0],()=>X,[()=>ee,0],128]],Si=[3,d,Bp,0,[Mr,ae,ps,ds],[0,[()=>de,0],128,[()=>jr,0]]],xi=[-3,d,Vp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(xi,Gt);var vi=[3,d,Qp,0,[oe,ke,z,ys,Nr,Ss,ie,ce,Z],[[()=>ue,0],[()=>Ne,0],[()=>H,0],[()=>Dr,0],[()=>ye,0],[()=>ye,0],()=>X,[()=>ee,0],128]],Ci=[3,d,Yp,0,[ah,kr,Eh,ae],[2,()=>er,0,[()=>de,0]]],Ai=[-3,d,Kp,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ai,Tt);var $i=[-3,d,eh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError($i,Ht);var Pi=[-3,d,Xp,{[E]:x,[v]:403},[S],[0]];m.for(d).registerError(Pi,Bt);var Ri=[-3,d,th,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ri,ct);var Ti=[-3,d,rh,{[E]:x,[v]:429},[S],[0]];m.for(d).registerError(Ti,nt);var Ii=[-3,d,ch,{[E]:x,[v]:401},[S],[0]];m.for(d).registerError(Ii,Qt);var Oi=[-3,d,ph,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Oi,ut);var Ui=[-3,d,lh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ui,Jt);var ki=[-3,d,yh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ki,vt);var Mi=[-3,d,xh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Mi,Yt);var Ni=[-3,d,Ch,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ni,gt);var ee=[3,d,oh,8,[cp,Xl],[0,0]],Di=[-3,d,dh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Di,st);var ji=[-3,d,hh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(ji,dt);var Fi=[-3,d,uh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Fi,yt);var Li=[-3,d,mh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Li,Ct);var qi=[-3,d,gh,{[E]:x,[v]:404},[S],[0]];m.for(d).registerError(qi,it);var zi=[-3,d,wh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(zi,At);var Hi=[-3,d,bh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Hi,Wt);var _i=[3,d,vh,0,[z,Ul,ws,bs,fs,Es,gs],[[()=>H,0],[()=>ye,0],4,4,2,0,()=>Zi]],Bi=[-3,d,Th,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Bi,Ut);var Wi=[-3,d,Ph,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Wi,kt);var Vi=[-3,d,Rh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Vi,Zt);var Gi=[-3,d,Ih,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Gi,Mt);var Ji=[-3,d,Oh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ji,Nt);var Ki=[-3,d,Uh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Ki,Dt);var Qi=[-3,d,kh,{[E]:x,[v]:400},[S],[0]];m.for(d).registerError(Qi,jt);var jh="unit",Yi=[-3,xs,"CognitoIdentityProviderServiceException",0,[],[]];m.for(xs).registerError(Yi,w);var ye=[1,d,Cl,0,[()=>ks,0]],Zi=[1,d,Ap,0,()=>di],Fh=[2,d,Pl,8,0,0],Lh=[2,d,Hl,8,0,0],Xi=[9,d,al,0,()=>vs,()=>Cs],eo=[9,d,dl,0,()=>As,()=>jh],to=[9,d,fl,0,()=>$s,()=>Ps],ro=[9,d,yl,0,()=>Rs,()=>Ts],no=[9,d,Sl,0,()=>Is,()=>Os],so=[9,d,Nl,0,()=>js,()=>Fs],io=[9,d,_l,0,()=>Ls,()=>qs],oo=[9,d,np,0,()=>Gs,()=>Js],ao=[9,d,lp,0,()=>Qs,()=>Ys],co=[9,d,jp,0,()=>yi,()=>wi],uo=[9,d,Hp,0,()=>Ei,()=>Si],lo=[9,d,Zp,0,()=>vi,()=>Ci];class qh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminCreateUser",{}).n("CognitoIdentityProviderClient","AdminCreateUserCommand").sc(Xi).build(){}class zh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminDeleteUser",{}).n("CognitoIdentityProviderClient","AdminDeleteUserCommand").sc(eo).build(){}class Hh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminDisableUser",{}).n("CognitoIdentityProviderClient","AdminDisableUserCommand").sc(to).build(){}class _h extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminEnableUser",{}).n("CognitoIdentityProviderClient","AdminEnableUserCommand").sc(ro).build(){}class Bh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminGetUser",{}).n("CognitoIdentityProviderClient","AdminGetUserCommand").sc(no).build(){}class Wh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ConfirmForgotPassword",{}).n("CognitoIdentityProviderClient","ConfirmForgotPasswordCommand").sc(so).build(){}class Vh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ConfirmSignUp",{}).n("CognitoIdentityProviderClient","ConfirmSignUpCommand").sc(io).build(){}class Gh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ForgotPassword",{}).n("CognitoIdentityProviderClient","ForgotPasswordCommand").sc(oo).build(){}class Jh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(ao).build(){}class Kh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ResendConfirmationCode",{}).n("CognitoIdentityProviderClient","ResendConfirmationCodeCommand").sc(co).build(){}class Qh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","RespondToAuthChallenge",{}).n("CognitoIdentityProviderClient","RespondToAuthChallengeCommand").sc(uo).build(){}class Yh extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","SignUp",{}).n("CognitoIdentityProviderClient","SignUpCommand").sc(lo).build(){}const ef=Object.freeze(Object.defineProperty({__proto__:null,$Command:N,AdminCreateUser$:Xi,AdminCreateUserCommand:qh,AdminCreateUserRequest$:vs,AdminCreateUserResponse$:Cs,AdminDeleteUser$:eo,AdminDeleteUserCommand:zh,AdminDeleteUserRequest$:As,AdminDisableUser$:to,AdminDisableUserCommand:Hh,AdminDisableUserRequest$:$s,AdminDisableUserResponse$:Ps,AdminEnableUser$:ro,AdminEnableUserCommand:_h,AdminEnableUserRequest$:Rs,AdminEnableUserResponse$:Ts,AdminGetUser$:no,AdminGetUserCommand:Bh,AdminGetUserRequest$:Is,AdminGetUserResponse$:Os,AliasExistsException:wt,AliasExistsException$:Us,AnalyticsMetadataType$:X,AttributeType$:ks,AuthenticationResultType$:jr,CodeDeliveryDetailsType$:er,CodeDeliveryFailureException:lt,CodeDeliveryFailureException$:Ms,CodeMismatchException:$t,CodeMismatchException$:Ns,CognitoIdentityProviderClient:il,CognitoIdentityProviderServiceException:w,CognitoIdentityProviderServiceException$:Yi,ConcurrentModificationException:It,ConcurrentModificationException$:Ds,ConfirmForgotPassword$:so,ConfirmForgotPasswordCommand:Wh,ConfirmForgotPasswordRequest$:js,ConfirmForgotPasswordResponse$:Fs,ConfirmSignUp$:io,ConfirmSignUpCommand:Vh,ConfirmSignUpRequest$:Ls,ConfirmSignUpResponse$:qs,DeviceKeyExistsException:Ft,DeviceKeyExistsException$:zs,DuplicateProviderException:qt,DuplicateProviderException$:Hs,EnableSoftwareTokenMFAException:Xt,EnableSoftwareTokenMFAException$:_s,ExpiredCodeException:Pt,ExpiredCodeException$:Bs,FeatureUnavailableInTierException:_t,FeatureUnavailableInTierException$:Ws,ForbiddenException:Ot,ForbiddenException$:Vs,ForgotPassword$:oo,ForgotPasswordCommand:Gh,ForgotPasswordRequest$:Gs,ForgotPasswordResponse$:Js,GroupExistsException:Lt,GroupExistsException$:Ks,InitiateAuth$:ao,InitiateAuthCommand:Jh,InitiateAuthRequest$:Qs,InitiateAuthResponse$:Ys,InternalErrorException:Xe,InternalErrorException$:Zs,InvalidEmailRoleAccessPolicyException:Et,InvalidEmailRoleAccessPolicyException$:Xs,InvalidLambdaResponseException:ot,InvalidLambdaResponseException$:ei,InvalidOAuthFlowException:Vt,InvalidOAuthFlowException$:ti,InvalidParameterException:et,InvalidParameterException$:ri,InvalidPasswordException:pt,InvalidPasswordException$:ni,InvalidSmsRoleAccessPolicyException:ht,InvalidSmsRoleAccessPolicyException$:si,InvalidSmsRoleTrustRelationshipException:ft,InvalidSmsRoleTrustRelationshipException$:ii,InvalidUserPoolConfigurationException:bt,InvalidUserPoolConfigurationException$:oi,LimitExceededException:at,LimitExceededException$:ai,MFAMethodNotFoundException:St,MFAMethodNotFoundException$:ui,MFAOptionType$:di,ManagedLoginBrandingExistsException:zt,ManagedLoginBrandingExistsException$:ci,NewDeviceMetadataType$:li,NotAuthorizedException:tt,NotAuthorizedException$:pi,PasswordHistoryPolicyViolationException:Rt,PasswordHistoryPolicyViolationException$:hi,PasswordResetRequiredException:xt,PasswordResetRequiredException$:fi,PreconditionNotMetException:mt,PreconditionNotMetException$:mi,RefreshTokenReuseException:Kt,RefreshTokenReuseException$:gi,ResendConfirmationCode$:co,ResendConfirmationCodeCommand:Kh,ResendConfirmationCodeRequest$:yi,ResendConfirmationCodeResponse$:wi,ResourceNotFoundException:rt,ResourceNotFoundException$:bi,RespondToAuthChallenge$:uo,RespondToAuthChallengeCommand:Qh,RespondToAuthChallengeRequest$:Ei,RespondToAuthChallengeResponse$:Si,ScopeDoesNotExistException:Gt,ScopeDoesNotExistException$:xi,SignUp$:lo,SignUpCommand:Yh,SignUpRequest$:vi,SignUpResponse$:Ci,SoftwareTokenMFANotFoundException:Tt,SoftwareTokenMFANotFoundException$:Ai,TermsExistsException:Ht,TermsExistsException$:$i,TierChangeNotAllowedException:Bt,TierChangeNotAllowedException$:Pi,TooManyFailedAttemptsException:ct,TooManyFailedAttemptsException$:Ri,TooManyRequestsException:nt,TooManyRequestsException$:Ti,UnauthorizedException:Qt,UnauthorizedException$:Ii,UnexpectedLambdaException:ut,UnexpectedLambdaException$:Oi,UnsupportedIdentityProviderException:Jt,UnsupportedIdentityProviderException$:Ui,UnsupportedOperationException:vt,UnsupportedOperationException$:ki,UnsupportedTokenTypeException:Yt,UnsupportedTokenTypeException$:Mi,UnsupportedUserStateException:gt,UnsupportedUserStateException$:Ni,UserContextDataType$:ee,UserImportInProgressException:st,UserImportInProgressException$:Di,UserLambdaValidationException:dt,UserLambdaValidationException$:ji,UserNotConfirmedException:Ct,UserNotConfirmedException$:Li,UserNotFoundException:it,UserNotFoundException$:qi,UserPoolAddOnNotEnabledException:At,UserPoolAddOnNotEnabledException$:zi,UserPoolTaggingException:Wt,UserPoolTaggingException$:Hi,UserType$:_i,UsernameExistsException:yt,UsernameExistsException$:Fi,WebAuthnChallengeNotFoundException:Ut,WebAuthnChallengeNotFoundException$:Bi,WebAuthnClientMismatchException:kt,WebAuthnClientMismatchException$:Wi,WebAuthnConfigurationMissingException:Zt,WebAuthnConfigurationMissingException$:Vi,WebAuthnCredentialNotSupportedException:Mt,WebAuthnCredentialNotSupportedException$:Gi,WebAuthnNotEnabledException:Nt,WebAuthnNotEnabledException$:Ji,WebAuthnOriginNotAllowedException:Dt,WebAuthnOriginNotAllowedException$:Ki,WebAuthnRelyingPartyMismatchException:jt,WebAuthnRelyingPartyMismatchException$:Qi,__Client:Cn},Symbol.toStringTag,{value:"Module"}));export{me as f,ef as i,Cr as t};
|