@agentlang/lstudio 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/assets/AwsJson1_1Protocol-1sL8GPmz.js +1 -0
  2. package/assets/{fs-BFPzyhvM.js → fs-BxrTCdSt.js} +1 -1
  3. package/assets/{index-v-qSLw3O.js → index-B3r05-bX.js} +1 -1
  4. package/assets/{index-BZcC_1YB.css → index-BXzEORYS.css} +1 -1
  5. package/assets/{index-CWcv-6Zk.js → index-Cdypq0le.js} +1955 -969
  6. package/assets/{index-D4z_hbl0-y_rvYJag.js → index-D4z_hbl0-FxTZk5b8.js} +1 -1
  7. package/assets/{index-Bz3SWrlh-BOC9aAgh.js → index-DgJXwFi2-COKHP7FV.js} +1 -1
  8. package/assets/{index-CuvfCO6A.js → index-DjgOAzh3.js} +1 -1
  9. package/assets/index-DnN6Dyoy.js +1 -0
  10. package/assets/index-DvWiNIm-.js +1 -0
  11. package/assets/index-Lo_XIkxp.js +15 -0
  12. package/assets/index-WGenATk8-DLiSeXer.js +17 -0
  13. package/assets/{index.browser-CNuJpQRF.js → index.browser-GiwbU6nH.js} +4 -4
  14. package/assets/loadCognitoIdentity-C_bi1t9F.js +1 -0
  15. package/assets/loadSts-D_V03_bI.js +1 -0
  16. package/assets/{normalizeProvider-BrOPyH3l.js → normalizeProvider-EC8cbfMc.js} +1 -1
  17. package/assets/{replService-zFxUAnXb.js → replService-DrnjrXLr.js} +1 -1
  18. package/assets/{util-DRQhMG0c.js → util-dDeaEvHH.js} +1 -1
  19. package/assets/{winston-1qzyIKCb-DrBzcKjE.js → winston-1qzyIKCb-T03DN2Ds.js} +1 -1
  20. package/assets/{winston-oUPj17yo.js → winston-CKrqq8ju.js} +1 -1
  21. package/assets/{winston-BBhfKzmi.js → winston-ChvNJCpJ.js} +1 -1
  22. package/assets/{winston-CtxF18qc-R9Ff3XLo.js → winston-CtxF18qc-D2kpfBfi.js} +1 -1
  23. package/index.html +2 -2
  24. package/package.json +1 -1
  25. package/assets/index-Dcg-T9P7.js +0 -1
  26. package/assets/index-Dsv5Y1bn.js +0 -1
  27. package/assets/index-hklP5STE-Bcq23IoH.js +0 -17
  28. package/assets/loadCognitoIdentity-CyU-paEc.js +0 -1
  29. package/assets/loadSts-_086JMFD.js +0 -1
  30. package/assets/resolveDefaultsModeConfig-D1zWPouA.js +0 -15
@@ -1,17 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bz3SWrlh-BOC9aAgh.js","assets/preload-helper-BlTxHScW.js","assets/index-6mKfgpcs-DsgiI2lM.js"])))=>i.map(i=>d[i]);
2
- import{_ as Ai}from"./preload-helper-BlTxHScW.js";import{Y as et}from"./index-6mKfgpcs-DsgiI2lM.js";const Pi=(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)},Ti=t=>({setHttpHandler(e){t.httpHandler=e},httpHandler(){return t.httpHandler},updateHttpClientConfig(e,r){t.httpHandler?.updateHttpClientConfig(e,r)},httpHandlerConfigs(){return t.httpHandler.httpHandlerConfigs()}}),Ri=t=>({httpHandler:t.httpHandler()});var Te;(function(t){t.HTTP="http",t.HTTPS="https"})(Te||(Te={}));var He;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(He||(He={}));const ft="__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=$i(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 $i(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 ee=t=>encodeURIComponent(t).replace(/[!'()*]/g,Oi),Oi=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function Ii(t){const e=[];for(let r of Object.keys(t).sort()){const n=t[r];if(r=ee(r),Array.isArray(n))for(let s=0,i=n.length;s<i;s++)e.push(`${r}=${ee(n[s])}`);else{let s=r;(n||typeof n=="string")&&(s+=`=${ee(n)}`),e.push(s)}}return e.join("&")}function Dt(t,e){return new Request(t,e)}function Ui(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 tt={supported:void 0};class St{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new St(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(r=>r||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),tt.supported===void 0&&(tt.supported=typeof Request<"u"&&"keepalive"in Dt("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=Ii(e.query||{});c&&(a+=`?${c}`),e.fragment&&(a+=`#${e.fragment}`);let u="";if(e.username!=null||e.password!=null){const C=e.username??"",O=e.password??"";u=`${C}:${O}@`}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),tt.supported&&(g.keepalive=i),typeof this.config.requestInit=="function"&&Object.assign(g,this.config.requestInit(e));let y=()=>{};const b=Dt(h,g),P=[fetch(b).then(C=>{const O=C.headers,T={};for(const I of O.entries())T[I[0]]=I[1];return C.body!=null?{response:new fe({headers:T,reason:C.statusText,statusCode:C.status,body:C.body})}:C.blob().then(I=>({response:new fe({headers:T,reason:C.statusText,statusCode:C.status,body:I})}))}),Ui(s)];return r&&P.push(new Promise((C,O)=>{const T=()=>{const I=new Error("Request aborted");I.name="AbortError",O(I)};if(typeof r.addEventListener=="function"){const I=r;I.addEventListener("abort",T,{once:!0}),y=()=>I.removeEventListener("abort",T)}else r.onabort=T})),Promise.race(P).finally(y)}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=r,n))}httpHandlerConfigs(){return this.config??{}}}const br="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jt=Object.entries(br).reduce((t,[e,r])=>(t[r]=Number(e),t),{}),ki=br.split(""),he=6,Ce=8,Mi=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 jt))throw new TypeError(`Invalid character ${t[u]} in base64 string.`);i|=jt[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),vt=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+=ki[(o&Mi<<p)>>p]}s+="==".slice(0,4-c)}return s}const Ni=async t=>typeof Blob=="function"&&t instanceof Blob||t.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await t.arrayBuffer()):Di(t):ji(t);async function Di(t){const e=await Fi(t),r=Ke(e);return new Uint8Array(r)}async function ji(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 Fi(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 X=(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)=>Ft[f.step]-Ft[h.step]||Lt[f.priority||"normal"]-Lt[h.priority||"normal"]),i=l=>{let h=!1;const f=g=>{const y=X(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 X(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 P of X(b.name,b.aliases))g[P]=b;h.push(b)}),e.forEach(y=>{const b={...y,before:[],after:[]};for(const P of X(b.name,b.aliases))g[P]=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},P=X(f,y);if(P.length>0){if(P.some(C=>n.has(C))){if(!g)throw new Error(`Duplicate middleware name '${J(f,y)}'`);for(const C of P){const O=t.findIndex(I=>I.name===C||I.aliases?.some(Xe=>Xe===C));if(O===-1)continue;const T=t[O];if(T.step!==b.step||b.priority!==T.priority)throw new Error(`"${J(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${J(f,y)}" middleware with ${b.priority} priority in ${b.step} step.`);t.splice(O,1)}}for(const C of P)n.add(C)}t.push(b)},addRelativeTo:(l,h)=>{const{name:f,override:g,aliases:y}=h,b={middleware:l,...h},P=X(f,y);if(P.length>0){if(P.some(C=>n.has(C))){if(!g)throw new Error(`Duplicate middleware name '${J(f,y)}'`);for(const C of P){const O=e.findIndex(I=>I.name===C||I.aliases?.some(Xe=>Xe===C));if(O===-1)continue;const T=e[O];if(T.toMiddleware!==b.toMiddleware||T.relation!==b.relation)throw new Error(`"${J(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${J(f,y)}" middleware ${b.relation} "${b.toMiddleware}" middleware.`);e.splice(O,1)}}for(const C of P)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:P}=g;if(y&&y.includes(l)){const C=X(b,P);for(const O of C)n.delete(O);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},Ft={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Lt={high:3,normal:2,low:1};class Er{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 te extends Uint8Array{static fromString(e,r="utf-8"){if(typeof e=="string")return r==="base64"?te.mutate(Ke(e)):te.mutate(me(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,te.prototype),e}transformToString(e="utf-8"){return e==="base64"?_e(this):vt(this)}}const Sr={},mt={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),Sr[t]=e,mt[e]=t}function Li(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 mt)e[r/2]=mt[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return e}function re(t){let e="";for(let r=0;r<t.byteLength;r++)e+=Sr[t[r]];return e}const gt=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return te.mutate(t);if(!t)return te.mutate(new Uint8Array);const r=e.streamCollector(t);return te.mutate(await r)},Fe=t=>typeof t=="function"?t():t,we=t=>t[ft]||(t[ft]={}),G=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},vr=(t,e,r,n,s)=>({name:e,namespace:t,traits:r,input:n,output:s}),qi=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(vr(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:rt(/^x-[\w-]+-request-?id$/,g),extendedRequestId:rt(/^x-[\w-]+-id-2$/,g),cfId:rt(/^x-[\w-]+-cf-id$/,g)}}}catch{}}throw l}},rt=(t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],zi=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(vr(i,o,a,c,u),n.input,{...t,...r,endpoint:p});return e({...n,request:l})},Hi={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},_i={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Bi(t){return{applyToStack:e=>{e.add(zi(t),_i),e.add(qi(t),Hi),t.protocol.setSerdeContext(t)}}}function ve(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}class ${ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=$.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;nt(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,ve(a))}}else this.memberTraits=0;if(i instanceof $){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),Wi(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 $)return r;if(nt(r)){const[n,s]=r;if(n instanceof $)return Object.assign(n.getMergedTraits(),ve(s)),n;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new $(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(){const e=i=>(i&4)===4||!!i?.idempotencyToken,{normalizedTraits:r,traits:n,memberTraits:s}=this;return e(r)||e(n)||e(s)}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return ve(this.memberTraits)}getOwnTraits(){return ve(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(nt(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();for(let r=0;r<e[4].length;++r)yield[e[4][r],Ee([e[5][r],0],e[4][r])]}}function Ee(t,e){if(t instanceof $)return Object.assign(t,{memberName:e,_isMemberSchema:!0});const r=$;return new r(t,e)}const nt=t=>Array.isArray(t)&&t.length===2,Wi=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 xr=t=>{if(t!=null){if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return String(e)!==String(t)&&no.warn(ro(`Expected number but observed string: ${t}`)),e}if(typeof t=="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)}},Vi=Math.ceil(2**127*(2-2**-23)),Gi=t=>{const e=xr(t);if(e!==void 0&&!Number.isNaN(e)&&e!==1/0&&e!==-1/0&&Math.abs(e)>Vi)throw new TypeError(`Expected 32-bit float, got ${t}`);return e},Ji=t=>{if(t!=null){if(Number.isInteger(t)&&!Number.isNaN(t))return t;throw new TypeError(`Expected integer, got ${typeof t}: ${t}`)}},Ki=t=>Cr(t,16),Qi=t=>Cr(t,8),Cr=(t,e)=>{const r=Ji(t);if(r!==void 0&&Yi(r,e)!==r)throw new TypeError(`Expected ${e}-bit integer, got ${t}`);return r},Yi=(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]}},Zi=t=>xr(typeof t=="string"?Qe(t):t),Xi=t=>Gi(typeof t=="string"?Qe(t):t),eo=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Qe=t=>{const e=t.match(eo);if(e===null||e[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)},We=t=>Ki(typeof t=="string"?Qe(t):t),to=t=>Qi(typeof t=="string"?Qe(t):t),ro=t=>String(new TypeError(t).stack||t).split(`
4
- `).slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join(`
5
- `),no={warn:console.warn},so=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],xt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function io(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`${so[n]}, ${c} ${xt[r]} ${e} ${u}:${p}:${l} GMT`}const oo=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),ao=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=oo.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($e(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()-So(p)),g},co=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$/),uo=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$/),lo=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})$/),po=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=co.exec(t);if(e){const[r,n,s,i,o,a,c,u]=e;return Le(We($e(i)),st(s),Q(n,"day",1,31),{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u})}if(e=uo.exec(t),e){const[r,n,s,i,o,a,c,u]=e;return go(Le(fo(i),st(s),Q(n,"day",1,31),{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u}))}if(e=lo.exec(t),e){const[r,n,s,i,o,a,c,u]=e;return Le(We($e(u)),st(n),Q(s.trimLeft(),"day",1,31),{hours:i,minutes:o,seconds:a,fractionalMilliseconds:c})}throw new TypeError("Invalid RFC-7231 date-time value")},ho=t=>{if(t==null)return;let e;if(typeof t=="number")e=t;else if(typeof t=="string")e=Zi(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 wo(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),Eo(n.fractionalMilliseconds)))},fo=t=>{const e=new Date().getUTCFullYear(),r=Math.floor(e/100)*100+We($e(t));return r<e?r+100:r},mo=50*365*24*60*60*1e3,go=t=>t.getTime()-new Date().getTime()>mo?new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())):t,st=t=>{const e=xt.indexOf(t);if(e<0)throw new TypeError(`Invalid month: ${t}`);return e+1},yo=[31,28,31,30,31,30,31,31,30,31,30,31],wo=(t,e,r)=>{let n=yo[e];if(e===1&&bo(t)&&(n=29),r>n)throw new TypeError(`Invalid day for ${xt[e]} in ${t}: ${r}`)},bo=t=>t%4===0&&(t%100!==0||t%400===0),Q=(t,e,r,n)=>{const s=to($e(t));if(s<r||s>n)throw new TypeError(`${e} must be between ${r} and ${n}, inclusive`);return s},Eo=t=>t==null?0:Xi("0."+t)*1e3,So=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},$e=t=>{let e=0;for(;e<t.length-1&&t.charAt(e)==="0";)e++;return e===0?t:t.slice(e)},qt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),U=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0")),Ar=()=>{if(qt)return qt();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 zt=/^-?\d*(\.\d+)?$/;class W{string;type;constructor(e,r){if(this.string=e,this.type=r,!zt.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"&&zt.test(r.string)}}class vo{serdeContext;setSerdeContext(e){this.serdeContext=e}}class xo extends vo{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){const s=$.of(r.input),i=ve(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 Ai(async()=>{const{EventStreamSerde:r}=await import("./index-Bz3SWrlh-BOC9aAgh.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 Co extends xo{async serializeRequest(e,r,n){const s=this.serializer,i={},o={},a=await n.endpoint(),c=$.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=$.of(e.output),o={};if(n.statusCode>=300){const c=await gt(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 gt(n.body,r);c.byteLength>0&&Object.assign(o,await s.read(i,c))}return o.$metadata=this.deserializeMetadata(n),o}}function Pr(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 it="***SensitiveInformation***";function yt(t,e){if(e==null)return e;const r=$.of(t);if(r.getMergedTraits().sensitive)return it;if(r.isListSchema()){if(r.getValueSchema().getMergedTraits().sensitive)return it}else if(r.isMapSchema()){if(r.getKeySchema().getMergedTraits().sensitive||r.getValueSchema().getMergedTraits().sensitive)return it}else if(r.isStructSchema()&&typeof e=="object"){const n=e,s={};for(const[i,o]of r.structIterator())n[i]!=null&&(s[i]=yt(o,n[i]));return s}return e}class N{middlewareStack=Be();schema;static classBuilder(){return new Ao}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,[ft]:{commandInstance:this,...u},...p},{requestHandler:y}=r;return h.resolve(b=>y.handle(b.request,n||{}),g)}}class Ao{_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?yt.bind(null,a):u=>u),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(o?yt.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 Ht=(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},Po=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{}}},To=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}}},Ro=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},$o=t=>({setRetryStrategy(e){t.retryStrategy=e},retryStrategy(){return t.retryStrategy}}),Oo=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},Io=t=>Object.assign(To(t),$o(t)),Uo=t=>Object.assign(Ro(t),Oo(t));class Tr{trace(){}debug(){}info(){}warn(){}error(){}}const ko=(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 Mo(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const No=(t,e)=>(r,n)=>async s=>{const i=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,n,s.input)),o=t.authSchemePreference?await t.authSchemePreference():[],a=ko(i,o),c=Mo(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)},Do={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},jo=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(No(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),Do)}}),Fo={name:"serializerMiddleware"},Lo=t=>e=>{throw e},qo=(t,e)=>{},zo=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||Lo)(i));return(a.successHandler||qo)(c.response,i),c},Ho={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},_o=t=>({applyToStack:e=>{e.addRelativeTo(zo(),Ho)}}),Ae=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e};function Bo(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 Wo{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 Vo{async sign(e,r,n){return e}}const Go=t=>function(e){return Rr(e)&&e.expiration.getTime()-Date.now()<t},Jo=3e5,Ko=Go(Jo),Rr=t=>t.expiration!==void 0,Qo=(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))},Yo=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)},Zo={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Xo=t=>({applyToStack:e=>{e.add(Yo(t),Zo)}}),ea=()=>(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}},ta={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},ra=t=>({applyToStack:e=>{e.add(ea(),ta)}}),na={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},sa=()=>t=>async e=>t(e),ia=t=>({applyToStack:e=>{e.add(sa(),na)}}),oa=void 0;function aa(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function ca(t){const e=Ae(t.userAgentAppId??oa),{customUserAgent:r}=t;return Object.assign(t,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const n=await e();if(!aa(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 ua{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 da=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}$"),$r=t=>da.test(t)||t.startsWith("[")&&t.endsWith("]"),la=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Ye=(t,e=!1)=>{if(!e)return la.test(t);const r=t.split(".");for(const n of r)if(!Ye(n))return!1;return!0},Ve={},Oe="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 pa=(t,e)=>t===e,ha=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},Or=(t,e)=>ha(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),fa=t=>t!=null,ma=t=>!t,ot={[Te.HTTP]:80,[Te.HTTPS]:443},ga=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,P=new URL(`${g}//${h}${f?`:${f}`:""}${y}`);return P.search=Object.entries(b).map(([C,O])=>`${C}=${O}`).join("&"),P}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(Te).includes(c))return null;const u=$r(s),p=r.includes(`${n}:${ot[c]}`)||typeof t=="string"&&t.includes(`${n}:${ot[c]}`),l=`${n}${p?`:${ot[c]}`:""}`;return{scheme:c,authority:l,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:u}},ya=(t,e)=>t===e,wa=(t,e,r,n)=>e>=r||t.length<r?null:n?t.substring(t.length-r,t.length-e):t.substring(e,r),ba=t=>encodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Ea={booleanEquals:pa,getAttr:Or,isSet:fa,isValidHostLabel:Ye,not:ma,parseURL:ga,stringEquals:ya,substring:wa,uriEncode:ba},Ir=(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(Or(n[c],u))}else r.push(n[a]);s=o+1}return r.join("")},Sa=({ref:t},e)=>({...e.endpointParams,...e.referenceRecord})[t],Ze=(t,e,r)=>{if(typeof t=="string")return Ir(t,r);if(t.fn)return kr.callFunction(t,r);if(t.ref)return Sa(t,r);throw new j(`'${e}': ${String(t)} is not a string, function or reference.`)},Ur=({fn:t,argv:e},r)=>{const n=e.map(i=>["boolean","number"].includes(typeof i)?i:kr.evaluateExpression(i,"arg",r)),s=t.split(".");return s[0]in Ve&&s[1]!=null?Ve[s[0]][s[1]](...n):Ea[t](...n)},kr={evaluateExpression:Ze,callFunction:Ur},va=({assign:t,...e},r)=>{if(t&&t in r.referenceRecord)throw new j(`'${t}' is already defined in Reference Record.`);const n=Ur(e,r);return r.logger?.debug?.(`${Oe} evaluateCondition: ${Y(e)} = ${Y(n)}`),{result:n===""?!0:!!n,...t!=null&&{toAssign:{name:t,value:n}}}},Ct=(t=[],e)=>{const r={};for(const n of t){const{result:s,toAssign:i}=va(n,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!s)return{result:s};i&&(r[i.name]=i.value,e.logger?.debug?.(`${Oe} assign: ${i.name} := ${Y(i.value)}`))}return{result:!0,referenceRecord:r}},xa=(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})}),{}),Mr=(t,e)=>Object.entries(t).reduce((r,[n,s])=>({...r,[n]:Dr.getEndpointProperty(s,e)}),{}),Nr=(t,e)=>{if(Array.isArray(t))return t.map(r=>Nr(r,e));switch(typeof t){case"string":return Ir(t,e);case"object":if(t===null)throw new j(`Unexpected endpoint property: ${t}`);return Dr.getEndpointProperties(t,e);case"boolean":return t;default:throw new j(`Unexpected endpoint property type: ${typeof t}`)}},Dr={getEndpointProperty:Nr,getEndpointProperties:Mr},Ca=(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}`)},Aa=(t,e)=>{const{conditions:r,endpoint:n}=t,{result:s,referenceRecord:i}=Ct(r,e);if(!s)return;const o={...e,referenceRecord:{...e.referenceRecord,...i}},{url:a,properties:c,headers:u}=n;return e.logger?.debug?.(`${Oe} Resolving endpoint from template: ${Y(n)}`),{...u!=null&&{headers:xa(u,o)},...c!=null&&{properties:Mr(c,o)},url:Ca(a,o)}},Pa=(t,e)=>{const{conditions:r,error:n}=t,{result:s,referenceRecord:i}=Ct(r,e);if(s)throw new j(Ze(n,"Error",{...e,referenceRecord:{...e.referenceRecord,...i}}))},jr=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const n=Aa(r,e);if(n)return n}else if(r.type==="error")Pa(r,e);else if(r.type==="tree"){const n=Fr.evaluateTreeRule(r,e);if(n)return n}else throw new j(`Unknown endpoint rule: ${r}`);throw new j("Rules evaluation failed")},Ta=(t,e)=>{const{conditions:r,rules:n}=t,{result:s,referenceRecord:i}=Ct(r,e);if(s)return Fr.evaluateRules(n,{...e,referenceRecord:{...e.referenceRecord,...i}})},Fr={evaluateRules:jr,evaluateTreeRule:Ta},Ra=(t,e)=>{const{endpointParams:r,logger:n}=e,{parameters:s,rules:i}=t;e.logger?.debug?.(`${Oe} 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=jr(i,{endpointParams:r,logger:n,referenceRecord:{}});return e.logger?.debug?.(`${Oe} Resolved endpoint: ${Y(c)}`),c},Lr=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!Lr(r))return!1;return!0}return!(!Ye(t)||t.length<3||t.length>63||t!==t.toLowerCase()||$r(t))},_t=":",$a="/",Oa=t=>{const e=t.split(_t);if(e.length<6)return null;const[r,n,s,i,o,...a]=e;if(r!=="arn"||n===""||s===""||a.join(_t)==="")return null;const c=a.map(u=>u.split($a)).flat();return{partition:n,service:s,region:i,accountId:o,resourceId:c}},Ia=[{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)"}}}],Ua={partitions:Ia};let ka=Ua;const Ma=t=>{const{partitions:e}=ka;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}},qr={isVirtualHostableS3Bucket:Lr,parseArn:Oa,partition:Ma};Ve.aws=qr;function Na(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=Na(i)),{hostname:e,port:n?parseInt(n):void 0,protocol:s,path:r,query:o}};function Da(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 Bt=t=>fe.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,zr=t=>new Date(Date.now()+t),ja=(t,e)=>Math.abs(zr(e).getTime()-t)>=3e5,Wt=(t,e)=>{const r=Date.parse(t);return ja(r,e)?r-Date.now():e},Pe=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},Fa=async t=>{const e=Pe("context",t.context),r=Pe("config",t.config),n=e.endpointV2?.properties?.authSchemes?.[0],s=await Pe("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 La{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 Fa(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:zr(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return r=>{const n=r.ServerTime??Bt(r.$response);if(n){const s=Pe("config",e.config),i=s.systemClockOffset;s.systemClockOffset=Wt(n,s.systemClockOffset),s.systemClockOffset!==i&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(e,r){const n=Bt(e);if(n){const s=Pe("config",r.config);s.systemClockOffset=Wt(n,s.systemClockOffset)}}}const qa="X-Amz-Algorithm",za="X-Amz-Credential",Hr="X-Amz-Date",Ha="X-Amz-SignedHeaders",_a="X-Amz-Expires",_r="X-Amz-Signature",Br="X-Amz-Security-Token",Wr="authorization",Vr=Hr.toLowerCase(),Ba="date",Wa=[Wr,Vr,Ba],Va=_r.toLowerCase(),wt="x-amz-content-sha256",Ga=Br.toLowerCase(),Ja={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},Ka=/^proxy-/,Qa=/^sec-/,at="AWS4-HMAC-SHA256",Ya="AWS4-HMAC-SHA256-PAYLOAD",Za="UNSIGNED-PAYLOAD",Xa=50,Gr="aws4_request",ec=3600*24*7,De={},ct=[],ut=(t,e,r)=>`${t}/${e}/${r}/${Gr}`,tc=async(t,e,r,n,s)=>{const i=await Vt(t,e.secretAccessKey,e.accessKeyId),o=`${r}:${n}:${s}:${re(i)}:${e.sessionToken}`;if(o in De)return De[o];for(ct.push(o);ct.length>Xa;)delete De[ct.shift()];let a=`AWS4${e.secretAccessKey}`;for(const c of[r,n,s,Gr])a=await Vt(t,a,c);return De[o]=a},Vt=(t,e,r)=>{const n=new t(e);return n.update(Re(r)),n.digest()},Gt=({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 Ja||e?.has(i)||Ka.test(i)||Qa.test(i))&&(!r||r&&!r.has(i))||(n[i]=t[s].trim().replace(/\s+/g," "))}return n},rc=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",dt=async({headers:t,body:e},r)=>{for(const n of Object.keys(t))if(n.toLowerCase()===wt)return t[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||rc(e)){const n=new r;return n.update(Re(e)),re(await n.digest())}return Za};class nc{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(At.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!sc.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const l=new Uint8Array(17);return l[0]=9,l.set(Li(e.value.replace(/\-/g,"")),1),l}}}var Jt;(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"})(Jt||(Jt={}));const sc=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class At{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&&Kt(r),new At(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&Kt(e),parseInt(re(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function Kt(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const ic=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},oc=(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}},Qt=t=>{t=D.clone(t);for(const e of Object.keys(t.headers))Wa.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},ac=({query:t={}})=>{const e=[],r={};for(const n of Object.keys(t)){if(n.toLowerCase()===Va)continue;const s=ee(n);e.push(s);const i=t[n];typeof i=="string"?r[s]=`${s}=${ee(i)}`:Array.isArray(i)&&(r[s]=i.slice(0).reduce((o,a)=>o.concat([`${s}=${ee(a)}`]),[]).sort().join("&"))}return e.sort().map(n=>r[n]).filter(n=>n).join("&")},cc=t=>uc(t).toISOString().replace(/\.\d{3}Z$/,"Z"),uc=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class dc{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
- ${this.getCanonicalPath(e)}
8
- ${ac(e)}
9
- ${s.map(i=>`${i}:${r[i]}`).join(`
10
- `)}
11
-
12
- ${s.join(";")}
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
- ${e}
15
- ${r}
16
- ${re(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 ee(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=cc(e).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class Yt extends dc{headerFormatter=new nc;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>ec)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const y=ut(g,h,p??this.service),b=oc(Qt(e),{unhoistableHeaders:o,hoistableHeaders:c});l.sessionToken&&(b.query[Br]=l.sessionToken),b.query[qa]=at,b.query[za]=`${l.accessKeyId}/${y}`,b.query[Hr]=f,b.query[_a]=s.toString(10);const P=Gt(b,i,a);return b.query[Ha]=this.getCanonicalHeaderList(P),b.query[_r]=await this.getSignature(f,y,this.getSigningKey(l,h,g,p),this.createCanonicalRequest(b,P,await dt(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=ut(c,a,o??this.service),l=await dt({headers:{},body:r},this.sha256),h=new this.sha256;h.update(e);const f=re(await h.digest()),g=[Ya,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)),re(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=Qt(e),{longDate:p,shortDate:l}=this.formatDate(r),h=ut(l,c,o??this.service);u.headers[Vr]=p,a.sessionToken&&(u.headers[Ga]=a.sessionToken);const f=await dt(u,this.sha256);!ic(wt,u.headers)&&this.applyChecksum&&(u.headers[wt]=f);const g=Gt(u,s,n),y=await this.getSignature(p,h,this.getSigningKey(a,c,l,o),this.createCanonicalRequest(u,g,f));return u.headers[Wr]=`${at} 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,at),o=new this.sha256(await n);return o.update(Re(i)),re(await o.digest())}getSigningKey(e,r,n,s){return tc(this.sha256,e,n,r,s||this.service)}}const lc=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=pc(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),p=hc(t,u);r&&!p.attributed?(n=async l=>p(l).then(h=>Da(h,"CREDENTIALS_CODE","e")),n.memoized=p.memoized,n.configBound=p.configBound,n.attributed=!0):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||Yt;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||Yt;return new h(l)},Object.assign(t,{systemClockOffset:i,signingEscapePath:s,signer:a})};function pc(t,{credentials:e,credentialDefaultProvider:r}){let n;return e?e?.memoized?n=e:n=Qo(e,Ko,Rr):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 hc(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 Zt=typeof TextEncoder=="function"?new TextEncoder:null,fc=t=>{if(typeof t=="string"){if(Zt)return Zt.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 mc{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=Ht(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 Ht(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=>$.of(n).getMergedTraits().awsQueryError?.[0]===r)}}}class Pt{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*gc(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 $([i,0],s);!(s in e)&&!o.isIdempotencyToken()||(yield[s,o])}}function*yc(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 $([a,0],o);let u=o;r&&(u=c.getMergedTraits()[r]??o),u in e&&(yield[o,c],s-=1)}}function wc(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 bc=(t,e)=>gt(t,e).then(r=>(e?.utf8Encoder??vt)(r)),Ec=(t,e)=>bc(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{}}),Sc=(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 vc extends Pt{settings;constructor(e){super(),this.settings=e}async read(e,r){return this._read(e,typeof r=="string"?JSON.parse(r,wc):await Ec(r,this.serdeContext))}readObject(e,r){return this._read(e,r)}_read(e,r){const n=r!==null&&typeof r=="object",s=$.of(e);if(n){if(s.isStructSchema()){const o={};for(const[a,c]of yc(s,r,this.settings.jsonName?"jsonName":!1)){const u=this.settings.jsonName?c.getMergedTraits().jsonName??a:a,p=this._read(c,r[u]);p!=null&&(o[a]=p)}return o}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(Pr(s,this.settings)){case 5:return ao(r);case 6:return po(r);case 7:return ho(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 Xt="Ν";class xc{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=`${Xt+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){const n=r.toString(),s=`${Xt+"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 Cc extends Pt{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,r){this.rootSchema=$.of(e),this.buffer=this._write(this.rootSchema,r)}writeDiscriminatedDocument(e,r){this.write(e,r),typeof this.buffer=="object"&&(this.buffer.__type=$.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 xc;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=$.of(e);if(s){if(i.isStructSchema()){const o={};for(const[a,c]of gc(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}}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(Pr(i,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return io(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 Ar();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 Ac extends Pt{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Cc(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new vc(this.settings);return e.setSerdeContext(this.serdeContext),e}}class Pc extends Co{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 Ac({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!n,this.mixin=new mc(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=Sc(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=$.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 Tc extends Pc{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 Rc=/\d{12}\.ddb/;async function $c(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(Rc)&&_(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 er="user-agent",lt="x-amz-user-agent",tr=" ",pt="/",Oc=/[^!$%&'*+\-.^_`|~\w]/g,Ic=/[^!$%&'*+\-.^_`|~\w#]/g,rr="-",Uc=1024;function kc(t){let e="";for(const r in t){const n=t[r];if(e.length+n.length+1<=Uc){e.length?e+=","+n:e+=n;continue}break}return e}const Mc=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 $c(r,t,n);const c=r;a.push(`m/${kc(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(tr),h=[...a.filter(f=>f.startsWith("aws-sdk-")),...u].join(tr);return t.runtime!=="browser"?(h&&(i[lt]=i[lt]?`${i[er]} ${h}`:h),i[er]=l):i[lt]=l,e({...n,request:s})},je=t=>{const e=t[0].split(pt).map(o=>o.replace(Oc,rr)).join(pt),r=t[1]?.replace(Ic,rr),n=e.indexOf(pt),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}`}},"")},Nc={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Dc=t=>({applyToStack:e=>{e.add(Mc(t),Nc)}}),jc=!1,Fc=!1,nr=new Set,Lc=(t,e=Ye)=>{if(!nr.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 nr.add(t)},Jr=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),qc=t=>Jr(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,zc=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=qc(n);return Lc(s),s},useFipsEndpoint:async()=>{const n=typeof e=="string"?e:await e();return Jr(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},sr="content-length";function Hc(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(sr)===-1)try{const o=t(s);n.headers={...n.headers,[sr]:String(o)}}catch{}}return e({...r,request:n})}}const _c={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Bc=t=>({applyToStack:e=>{e.add(Hc(t.bodyLengthChecker),_c)}}),Wc=async t=>{const e=t?.Bucket||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Qc(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Kc(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},Vc=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Gc=/(\d+\.){3}\d+/,Jc=/\.\./,Kc=t=>Vc.test(t)&&!Gc.test(t)&&!Jc.test(t),Qc=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},Yc=(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},Kr=async t=>{},Qr=t=>typeof t=="object"?"url"in t?Ge(t.url):t:Ge(t),Zc=async(t,e,r,n)=>{if(!r.isCustomEndpoint){let i;r.serviceConfiguredEndpoint?i=await r.serviceConfiguredEndpoint():i=await Kr(r.serviceId),i&&(r.endpoint=()=>Promise.resolve(Qr(i)),r.isCustomEndpoint=!0)}const s=await Xc(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(s,n)},Xc=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 Yc(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 Wc(n),n},eu=({config:t,instructions:e})=>(r,n)=>async s=>{t.isCustomEndpoint&&Bo(n,"ENDPOINT_OVERRIDE","N");const i=await Zc(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})},tu={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Fo.name},L=(t,e)=>({applyToStack:r=>{r.addRelativeTo(eu({config:t,instructions:e}),tu)}}),ru=t=>{const e=t.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:s}=t,i=r!=null?async()=>Qr(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=Kr(t.serviceId)),a),o};var ge;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(ge||(ge={}));const Je=3,nu=ge.STANDARD,su=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],iu=["TimeoutError","RequestTimeout","RequestTimeoutException"],ou=[500,502,503,504],au=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],cu=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],uu=t=>t?.$retryable!==void 0,du=t=>t.$metadata?.clockSkewCorrected,lu=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},Yr=t=>t.$metadata?.httpStatusCode===429||su.includes(t.name)||t.$retryable?.throttling==!0,Tt=(t,e=0)=>uu(t)||du(t)||iu.includes(t.name)||au.includes(t?.code||"")||cu.includes(t?.code||"")||ou.includes(t.$metadata?.httpStatusCode||0)||lu(t)||t.cause!==void 0&&e<=10&&Tt(t.cause,e+1),pu=t=>{if(t.$metadata?.httpStatusCode!==void 0){const e=t.$metadata.httpStatusCode;return 500<=e&&e<=599&&!Tt(t)}return!1};class Rt{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=>Rt.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(),Yr(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 bt=100,Zr=20*1e3,hu=500,ir=500,fu=5,mu=10,gu=1,yu="amz-sdk-invocation-id",wu="amz-sdk-request",bu=()=>{let t=bt;return{computeNextBackoffDelay:e=>Math.floor(Math.min(Zr,Math.random()*2**e*t)),setDelayBase:e=>{t=e}}},or=({retryDelay:t,retryCount:e,retryCost:r})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(Zr,t),getRetryCost:()=>r});class Xr{maxAttempts;mode=ge.STANDARD;capacity=ir;retryBackoffStrategy=bu();maxAttemptsProvider;constructor(e){this.maxAttempts=e,this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return or({retryDelay:bt,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"?hu:bt);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,or({retryDelay:o,retryCount:e.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(ir,this.capacity+(e.getRetryCost()??gu))}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"?mu:fu}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class Eu{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=ge.ADAPTIVE;constructor(e,r){this.maxAttemptsProvider=e;const{rateLimiter:n}=r??{};this.rateLimiter=n??new Rt,this.standardRetryStrategy=new Xr(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 Su=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}`),vu=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 Eu(s):new Xr(s))})},xu=t=>t?.body instanceof ReadableStream,Cu=t=>(e,r)=>async n=>{let s=await t.retryStrategy();const i=await t.maxAttempts();if(Au(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[yu]=Ar());;)try{l&&(p.headers[wu]=`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=Pu(h);if(a=Su(h),l&&xu(p))throw(r.logger instanceof Tr?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)},Au=t=>typeof t.acquireInitialRetryToken<"u"&&typeof t.refreshRetryTokenForRetry<"u"&&typeof t.recordSuccess<"u",Pu=t=>{const e={error:t,errorType:Tu(t)},r=Ou(t.$response);return r&&(e.retryAfterHint=r),e},Tu=t=>Yr(t)?"THROTTLING":Tt(t)?"TRANSIENT":pu(t)?"SERVER_ERROR":"CLIENT_ERROR",Ru={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},$u=t=>({applyToStack:e=>{e.add(Cu(t),Ru)}}),Ou=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)},Iu=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 Uu(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 ku=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(Uu(t))}return e},Mu=t=>{const e=lc(t);return Object.assign(e,{authSchemePreference:G(t.authSchemePreference??[])})},Nu=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"}},Du="3.948.0",ju={version:Du},Fu=t=>new TextEncoder().encode(t);var Lu=typeof et<"u"&&et.from?function(t){return et.from(t,"utf8")}:Fu;function Ie(t){return t instanceof Uint8Array?t:typeof t=="string"?Lu(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function Et(t){return typeof t=="string"?t.length===0:t.byteLength===0}var en={name:"SHA-256"},ar={name:"HMAC",hash:en},qu=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 zu={};function qe(){return typeof window<"u"?window:typeof self<"u"?self:zu}var Hu=(function(){function t(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return t.prototype.update=function(e){if(!Et(e)){var r=Ie(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(ar,r,e.toHash).then(function(n){return new Uint8Array(n)})}):Et(this.toHash)?Promise.resolve(qu):Promise.resolve().then(function(){return qe().crypto.subtle.digest(en,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",Ie(e.secret),ar,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},t})();function _u(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 Bu(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,Wu=32,Vu=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]),Gu=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Ju=Math.pow(2,53)-1,ze=(function(){function t(){this.state=Int32Array.from(Gu),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>Ju)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(Wu),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+(Vu[h]+this.temp[h]|0)|0)|0,P=((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+P|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})(),Ku=(function(){function t(e){this.secret=e,this.hash=new ze,this.reset()}return t.prototype.update=function(e){if(!(Et(e)||this.error))try{this.hash.update(Ie(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 _u(this,void 0,void 0,function(){return Bu(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new ze,this.secret){this.outer=new ze;var e=Qu(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 Qu(t){var e=Ie(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 Yu=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Zu(t){if(Xu(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return ed(e)}return!1}function Xu(t){if(typeof t=="object"&&typeof t.crypto=="object"){var e=t.crypto.getRandomValues;return typeof e=="function"}return!1}function ed(t){return t&&Yu.every(function(e){return typeof t[e]=="function"})}var td=(function(){function t(e){Zu(qe())?this.hash=new Hu(e):this.hash=new Ku(e)}return t.prototype.update=function(e,r){this.hash.update(Ie(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t})();const rd=({serviceId:t,clientVersion:e})=>async r=>{const n=typeof window<"u"?window.navigator:void 0,s=n?.userAgent??"",i=n?.userAgentData?.platform??cr.os(s)??"other",o=void 0,a=n?.userAgentData?.brands??[],c=a[a.length-1],u=c?.brand??cr.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},cr={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"}},nd=t=>()=>Promise.reject(t),sd=["in-region","cross-region","mobile","standard","legacy"],id=({defaultsMode:t}={})=>Pi(async()=>{const e=typeof t=="function"?await t():t;switch(e?.toLowerCase()){case"auto":return Promise.resolve(od()?"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 ${sd.join(", ")}, got ${e}`)}}),od=()=>{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},tn="required",k="fn",M="argv",be="ref",ur=!0,dr="isSet",Ue="booleanEquals",le="error",B="endpoint",V="tree",$t="PartitionResult",Ot="getAttr",Se="stringEquals",lr={[tn]:!1,type:"string"},pr={[tn]:!0,default:!1,type:"boolean"},hr={[be]:"Endpoint"},rn={[k]:Ue,[M]:[{[be]:"UseFIPS"},!0]},nn={[k]:Ue,[M]:[{[be]:"UseDualStack"},!0]},R={},xe={[be]:"Region"},fr={[k]:Ot,[M]:[{[be]:$t},"supportsFIPS"]},sn={[be]:$t},mr={[k]:Ue,[M]:[!0,{[k]:Ot,[M]:[sn,"supportsDualStack"]}]},gr=[rn],yr=[nn],wr=[xe],ad={parameters:{Region:lr,UseDualStack:pr,UseFIPS:pr,Endpoint:lr},rules:[{conditions:[{[k]:dr,[M]:[hr]}],rules:[{conditions:gr,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:le},{conditions:yr,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:le},{endpoint:{url:hr,properties:R,headers:R},type:B}],type:V},{conditions:[{[k]:dr,[M]:wr}],rules:[{conditions:[{[k]:"aws.partition",[M]:wr,assign:$t}],rules:[{conditions:[rn,nn],rules:[{conditions:[{[k]:Ue,[M]:[ur,fr]},mr],rules:[{conditions:[{[k]:Se,[M]:[xe,"us-east-1"]}],endpoint:{url:"https://cognito-idp-fips.us-east-1.amazonaws.com",properties:R,headers:R},type:B},{conditions:[{[k]:Se,[M]:[xe,"us-east-2"]}],endpoint:{url:"https://cognito-idp-fips.us-east-2.amazonaws.com",properties:R,headers:R},type:B},{conditions:[{[k]:Se,[M]:[xe,"us-west-1"]}],endpoint:{url:"https://cognito-idp-fips.us-west-1.amazonaws.com",properties:R,headers:R},type:B},{conditions:[{[k]:Se,[M]:[xe,"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:gr,rules:[{conditions:[{[k]:Ue,[M]:[fr,ur]}],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:yr,rules:[{conditions:[mr],rules:[{conditions:[{[k]:Se,[M]:["aws",{[k]:Ot,[M]:[sn,"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}]},cd=ad,ud=new ua({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),dd=(t,e={})=>ud.get(t,()=>Ra(cd,{endpointParams:t,logger:e.logger}));Ve.aws=qr;const ld=t=>({apiVersion:"2016-04-18",base64Decoder:t?.base64Decoder??Ke,base64Encoder:t?.base64Encoder??_e,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??dd,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??ku,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new La},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Vo}],logger:t?.logger??new Tr,protocol:t?.protocol??new Tc({defaultNamespace:"com.amazonaws.cognitoidentityprovider",serviceTarget:"AWSCognitoIdentityProviderService",awsQueryCompatible:!1}),serviceId:t?.serviceId??"Cognito Identity Provider",urlParser:t?.urlParser??Ge,utf8Decoder:t?.utf8Decoder??me,utf8Encoder:t?.utf8Encoder??vt}),pd=t=>{const e=id(t),r=()=>e().then(Po),n=ld(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??fc,credentialDefaultProvider:t?.credentialDefaultProvider??(s=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??rd({serviceId:n.serviceId,clientVersion:ju.version}),maxAttempts:t?.maxAttempts??Je,region:t?.region??nd("Region is missing"),requestHandler:St.create(t?.requestHandler??r),retryMode:t?.retryMode??(async()=>(await r()).retryMode||nu),sha256:t?.sha256??td,streamCollector:t?.streamCollector??Ni,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(jc)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(Fc))}},hd=t=>({setRegion(e){t.region=e},region(){return t.region}}),fd=t=>({region:t.region()}),md=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}}},gd=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),yd=(t,e)=>{const r=Object.assign(hd(t),Io(t),Ti(t),md(t));return e.forEach(n=>n.configure(r)),Object.assign(t,fd(r),Uo(r),Ri(r),gd(r))};class wd extends Er{config;constructor(...[e]){const r=pd(e||{});super(r),this.initConfig=r;const n=Nu(r),s=ca(n),i=vu(s),o=zc(i),a=o,c=ru(a),u=Mu(c),p=yd(u,e?.extensions||[]);this.config=p,this.middlewareStack.use(Bi(this.config)),this.middlewareStack.use(Dc(this.config)),this.middlewareStack.use($u(this.config)),this.middlewareStack.use(Bc(this.config)),this.middlewareStack.use(Xo(this.config)),this.middlewareStack.use(ra(this.config)),this.middlewareStack.use(ia(this.config)),this.middlewareStack.use(jo(this.config,{httpAuthSchemeParametersProvider:Iu,identityProviderConfigProvider:async l=>new Wo({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(_o(this.config))}destroy(){super.destroy()}}let w=class on extends pe{constructor(e){super(e),Object.setPrototypeOf(this,on.prototype)}},an=class cn extends w{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,cn.prototype)}},un=class dn extends w{name="InvalidParameterException";$fault="client";reasonCode;constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,dn.prototype),this.reasonCode=e.reasonCode}},ln=class pn extends w{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,pn.prototype)}},hn=class fn extends w{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,fn.prototype)}},mn=class gn extends w{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,gn.prototype)}},yn=class wn extends w{name="UserImportInProgressException";$fault="client";constructor(e){super({name:"UserImportInProgressException",$fault:"client",...e}),Object.setPrototypeOf(this,wn.prototype)}},bn=class En extends w{name="UserNotFoundException";$fault="client";constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,En.prototype)}},Sn=class vn extends w{name="InvalidLambdaResponseException";$fault="client";constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),Object.setPrototypeOf(this,vn.prototype)}},xn=class Cn extends w{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Cn.prototype)}},An=class Pn extends w{name="TooManyFailedAttemptsException";$fault="client";constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),Object.setPrototypeOf(this,Pn.prototype)}},Tn=class Rn extends w{name="UnexpectedLambdaException";$fault="client";constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),Object.setPrototypeOf(this,Rn.prototype)}},$n=class On extends w{name="UserLambdaValidationException";$fault="client";constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,On.prototype)}},In=class Un extends w{name="CodeDeliveryFailureException";$fault="client";constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),Object.setPrototypeOf(this,Un.prototype)}},kn=class Mn extends w{name="InvalidPasswordException";$fault="client";constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),Object.setPrototypeOf(this,Mn.prototype)}},Nn=class Dn extends w{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,Dn.prototype)}},jn=class Fn extends w{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),Object.setPrototypeOf(this,Fn.prototype)}},Ln=class qn extends w{name="PreconditionNotMetException";$fault="client";constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),Object.setPrototypeOf(this,qn.prototype)}},zn=class Hn extends w{name="UnsupportedUserStateException";$fault="client";constructor(e){super({name:"UnsupportedUserStateException",$fault:"client",...e}),Object.setPrototypeOf(this,Hn.prototype)}},_n=class Bn extends w{name="UsernameExistsException";$fault="client";constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Bn.prototype)}},Wn=class Vn extends w{name="AliasExistsException";$fault="client";constructor(e){super({name:"AliasExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Vn.prototype)}},Gn=class Jn extends w{name="InvalidUserPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,Jn.prototype)}},Kn=class Qn extends w{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,Qn.prototype)}},Yn=class Zn extends w{name="MFAMethodNotFoundException";$fault="client";constructor(e){super({name:"MFAMethodNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Zn.prototype)}},Xn=class es extends w{name="PasswordResetRequiredException";$fault="client";constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),Object.setPrototypeOf(this,es.prototype)}},ts=class rs extends w{name="UnsupportedOperationException";$fault="client";constructor(e){super({name:"UnsupportedOperationException",$fault:"client",...e}),Object.setPrototypeOf(this,rs.prototype)}},ns=class ss extends w{name="UserNotConfirmedException";$fault="client";constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),Object.setPrototypeOf(this,ss.prototype)}},is=class os extends w{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(e){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...e}),Object.setPrototypeOf(this,os.prototype)}},as=class cs extends w{name="CodeMismatchException";$fault="client";constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,cs.prototype)}},us=class ds extends w{name="ExpiredCodeException";$fault="client";constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),Object.setPrototypeOf(this,ds.prototype)}},ls=class ps extends w{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(e){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...e}),Object.setPrototypeOf(this,ps.prototype)}},hs=class fs extends w{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(e){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,fs.prototype)}},ms=class gs extends w{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,gs.prototype)}},ys=class ws extends w{name="ForbiddenException";$fault="client";constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),Object.setPrototypeOf(this,ws.prototype)}},bs=class Es extends w{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(e){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Es.prototype)}},Ss=class vs extends w{name="WebAuthnClientMismatchException";$fault="client";constructor(e){super({name:"WebAuthnClientMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,vs.prototype)}},xs=class Cs extends w{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(e){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...e}),Object.setPrototypeOf(this,Cs.prototype)}},As=class Ps extends w{name="WebAuthnNotEnabledException";$fault="client";constructor(e){super({name:"WebAuthnNotEnabledException",$fault:"client",...e}),Object.setPrototypeOf(this,Ps.prototype)}},Ts=class Rs extends w{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(e){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...e}),Object.setPrototypeOf(this,Rs.prototype)}},$s=class Os extends w{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(e){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,Os.prototype)}},Is=class Us extends w{name="DeviceKeyExistsException";$fault="client";constructor(e){super({name:"DeviceKeyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Us.prototype)}},ks=class Ms extends w{name="GroupExistsException";$fault="client";constructor(e){super({name:"GroupExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Ms.prototype)}},Ns=class Ds extends w{name="DuplicateProviderException";$fault="client";constructor(e){super({name:"DuplicateProviderException",$fault:"client",...e}),Object.setPrototypeOf(this,Ds.prototype)}},js=class Fs extends w{name="ManagedLoginBrandingExistsException";$fault="client";constructor(e){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Fs.prototype)}},Ls=class qs extends w{name="TermsExistsException";$fault="client";constructor(e){super({name:"TermsExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,qs.prototype)}},zs=class Hs extends w{name="FeatureUnavailableInTierException";$fault="client";constructor(e){super({name:"FeatureUnavailableInTierException",$fault:"client",...e}),Object.setPrototypeOf(this,Hs.prototype)}},_s=class Bs extends w{name="TierChangeNotAllowedException";$fault="client";constructor(e){super({name:"TierChangeNotAllowedException",$fault:"client",...e}),Object.setPrototypeOf(this,Bs.prototype)}},Ws=class Vs extends w{name="UserPoolTaggingException";$fault="client";constructor(e){super({name:"UserPoolTaggingException",$fault:"client",...e}),Object.setPrototypeOf(this,Vs.prototype)}},Gs=class Js extends w{name="InvalidOAuthFlowException";$fault="client";constructor(e){super({name:"InvalidOAuthFlowException",$fault:"client",...e}),Object.setPrototypeOf(this,Js.prototype)}},Ks=class Qs extends w{name="ScopeDoesNotExistException";$fault="client";constructor(e){super({name:"ScopeDoesNotExistException",$fault:"client",...e}),Object.setPrototypeOf(this,Qs.prototype)}},Ys=class Zs extends w{name="UnsupportedIdentityProviderException";$fault="client";constructor(e){super({name:"UnsupportedIdentityProviderException",$fault:"client",...e}),Object.setPrototypeOf(this,Zs.prototype)}},Xs=class ei extends w{name="RefreshTokenReuseException";$fault="client";constructor(e){super({name:"RefreshTokenReuseException",$fault:"client",...e}),Object.setPrototypeOf(this,ei.prototype)}},ti=class ri extends w{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,ri.prototype)}},ni=class si extends w{name="UnsupportedTokenTypeException";$fault="client";constructor(e){super({name:"UnsupportedTokenTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,si.prototype)}},ii=class oi extends w{name="WebAuthnConfigurationMissingException";$fault="client";constructor(e){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...e}),Object.setPrototypeOf(this,oi.prototype)}},ai=class ci extends w{name="EnableSoftwareTokenMFAException";$fault="client";constructor(e){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...e}),Object.setPrototypeOf(this,ci.prototype)}};const bd="AvailableChallenges",Ed="AdminCreateUser",Sd="AdminCreateUserRequest",vd="AdminCreateUserResponse",xd="AdminDeleteUser",Cd="AdminDeleteUserRequest",Ad="AdminDisableUserRequest",Pd="AdminDisableUserResponse",Td="AdminDisableUser",Rd="AliasExistsException",$d="AnalyticsEndpointId",Od="AdminEnableUser",Id="AdminEnableUserRequest",Ud="AdminEnableUserResponse",kd="AuthFlow",Md="AdminGetUser",Nd="AdminGetUserRequest",Dd="AdminGetUserResponse",jd="AttributeListType",ne="AnalyticsMetadata",Fd="AnalyticsMetadataType",ui="AttributeName",Ld="AuthParameters",qd="AuthParametersType",di="AuthenticationResult",zd="AuthenticationResultType",Hd="AccessToken",_d="AttributeType",Bd="AttributeValueType",Wd="Attributes",li="ConfirmationCode",It="CodeDeliveryDetails",Vd="CodeDeliveryDetailsType",Gd="CodeDeliveryFailureException",Jd="ConfirmForgotPassword",Kd="ConfirmForgotPasswordRequest",Qd="ConfirmForgotPasswordResponse",se="ClientId",Yd="ClientIdType",Z="ClientMetadata",Zd="CodeMismatchException",Xd="ConcurrentModificationException",Ut="ChallengeName",pi="ChallengeParameters",el="ChallengeResponses",tl="ChallengeResponsesType",rl="ConfirmSignUp",nl="ConfirmSignUpRequest",sl="ConfirmSignUpResponse",il="DesiredDeliveryMediums",ol="DeviceGroupKey",al="DeviceKey",cl="DeviceKeyExistsException",hi="DeliveryMedium",ul="DuplicateProviderException",dl="Destination",fi="Enabled",ll="ExpiredCodeException",pl="EncodedData",hl="ExpiresIn",fl="EnableSoftwareTokenMFAException",mi="ForceAliasCreation",ml="ForbiddenException",gl="ForgotPassword",yl="ForgotPasswordRequest",wl="ForgotPasswordResponse",bl="FeatureUnavailableInTierException",El="GroupExistsException",Sl="IpAddress",vl="InitiateAuthRequest",xl="InitiateAuthResponse",Cl="InitiateAuth",Al="InternalErrorException",Pl="InvalidEmailRoleAccessPolicyException",Tl="InvalidLambdaResponseException",Rl="InvalidOAuthFlowException",$l="InvalidParameterException",Ol="InvalidPasswordException",Il="InvalidSmsRoleAccessPolicyException",Ul="InvalidSmsRoleTrustRelationshipException",kl="IdToken",Ml="InvalidUserPoolConfigurationException",Nl="LimitExceededException",Dl="MessageAction",jl="MFAMethodNotFoundException",gi="MFAOptions",Fl="MFAOptionListType",Ll="MFAOptionType",ql="ManagedLoginBrandingExistsException",zl="NotAuthorizedException",Hl="NewDeviceMetadata",_l="NewDeviceMetadataType",Bl="Name",yi="Password",Wl="PasswordHistoryPolicyViolationException",Vl="PreferredMfaSetting",Gl="PreconditionNotMetException",Jl="PasswordResetRequiredException",Kl="PasswordType",Ql="ResendConfirmationCode",Yl="ResendConfirmationCodeRequest",Zl="ResendConfirmationCodeResponse",Xl="ResourceNotFoundException",ep="RefreshToken",tp="RespondToAuthChallenge",rp="RespondToAuthChallengeRequest",np="RespondToAuthChallengeResponse",sp="RefreshTokenReuseException",ie="Session",ip="ScopeDoesNotExistException",ke="SecretHash",op="SecretHashType",ap="SessionType",cp="SoftwareTokenMFANotFoundException",up="SignUpRequest",dp="SignUpResponse",lp="SignUp",pp="TierChangeNotAllowedException",hp="TermsExistsException",fp="TooManyFailedAttemptsException",mp="TooManyRequestsException",gp="TokenModelType",yp="TemporaryPassword",wp="TokenType",z="Username",kt="UserAttributes",wi="UserCreateDate",bp="UserContextDataType",oe="UserContextData",Ep="UserConfirmed",Sp="UnauthorizedException",vp="UsernameExistsException",xp="UserImportInProgressException",Cp="UnsupportedIdentityProviderException",Ap="UnexpectedLambdaException",bi="UserLastModifiedDate",Pp="UserLambdaValidationException",Tp="UserMFASettingList",Rp="UserNotConfirmedException",$p="UserNotFoundException",Op="UnsupportedOperationException",Ip="UserPoolAddOnNotEnabledException",Me="UserPoolId",Up="UserPoolTaggingException",Ei="UserStatus",kp="UserSub",Mp="UsernameType",Np="UnsupportedTokenTypeException",Dp="UserType",jp="UnsupportedUserStateException",Fp="User",Lp="Value",Si="ValidationData",qp="WebAuthnClientMismatchException",zp="WebAuthnConfigurationMissingException",Hp="WebAuthnChallengeNotFoundException",_p="WebAuthnCredentialNotSupportedException",Bp="WebAuthnNotEnabledException",Wp="WebAuthnOriginNotAllowedException",Vp="WebAuthnRelyingPartyMismatchException",v="client",E="error",x="httpError",S="message",Gp="reasonCode",Jp="server",vi="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",d="com.amazonaws.cognitoidentityprovider";var Kp=[0,d,Bd,8,0],ae=[0,d,Yd,8,0],Mt=[0,d,Kl,8,0],Ne=[0,d,op,8,0],ce=[0,d,ap,8,0],ht=[0,d,gp,8,0],H=[0,d,Mp,8,0],Qp=[3,d,Sd,0,[Me,z,kt,Si,yp,mi,Dl,il,Z],[0,[()=>H,0],[()=>ye,0],[()=>ye,0],[()=>Mt,0],2,0,64,128]],Yp=[3,d,vd,0,[Fp],[[()=>yf,0]]],Zp=[3,d,Cd,0,[Me,z],[0,[()=>H,0]]],Xp=[3,d,Ad,0,[Me,z],[0,[()=>H,0]]],eh=[3,d,Pd,0,[],[]],th=[3,d,Id,0,[Me,z],[0,[()=>H,0]]],rh=[3,d,Ud,0,[],[]],nh=[3,d,Nd,0,[Me,z],[0,[()=>H,0]]],sh=[3,d,Dd,0,[z,kt,wi,bi,fi,Ei,gi,Vl,Tp],[[()=>H,0],[()=>ye,0],4,4,2,0,()=>Ci,0,64]],ih=[-3,d,Rd,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(ih,Wn);var ue=[3,d,Fd,0,[$d],[0]],oh=[3,d,_d,0,[Bl,Lp],[0,[()=>Kp,0]]],xi=[3,d,zd,0,[Hd,hl,wp,ep,kl,Hl],[[()=>ht,0],1,0,[()=>ht,0],[()=>ht,0],()=>Fh]],Nt=[3,d,Vd,0,[dl,hi,ui],[0,0,0]],ah=[-3,d,Gd,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(ah,In);var ch=[-3,d,Zd,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(ch,as);var uh=[-3,d,Xd,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(uh,ms);var dh=[3,d,Kd,0,[se,ke,z,li,yi,ne,oe,Z],[[()=>ae,0],[()=>Ne,0],[()=>H,0],0,[()=>Mt,0],()=>ue,[()=>de,0],128]],lh=[3,d,Qd,0,[],[]],ph=[3,d,nl,0,[se,ke,z,li,mi,ne,oe,Z,ie],[[()=>ae,0],[()=>Ne,0],[()=>H,0],0,2,()=>ue,[()=>de,0],128,[()=>ce,0]]],hh=[3,d,sl,0,[ie],[[()=>ce,0]]],fh=[-3,d,cl,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(fh,Is);var mh=[-3,d,ul,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(mh,Ns);var gh=[-3,d,fl,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(gh,ai);var yh=[-3,d,ll,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(yh,us);var wh=[-3,d,bl,{[E]:v,[x]:403},[S],[0]];m.for(d).registerError(wh,zs);var bh=[-3,d,ml,{[E]:v,[x]:403},[S],[0]];m.for(d).registerError(bh,ys);var Eh=[3,d,yl,0,[se,ke,oe,z,ne,Z],[[()=>ae,0],[()=>Ne,0],[()=>de,0],[()=>H,0],()=>ue,128]],Sh=[3,d,wl,0,[It],[()=>Nt]],vh=[-3,d,El,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(vh,ks);var xh=[3,d,vl,0,[kd,Ld,Z,se,ne,oe,ie],[0,[()=>Tf,0],128,[()=>ae,0],()=>ue,[()=>de,0],[()=>ce,0]]],Ch=[3,d,xl,0,[Ut,ie,pi,di,bd],[0,[()=>ce,0],128,[()=>xi,0],64]],Ah=[-3,d,Al,{[E]:Jp},[S],[0]];m.for(d).registerError(Ah,an);var Ph=[-3,d,Pl,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Ph,Kn);var Th=[-3,d,Tl,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Th,Sn);var Rh=[-3,d,Rl,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Rh,Gs);var $h=[-3,d,$l,{[E]:v,[x]:400},[S,Gp],[0,0]];m.for(d).registerError($h,un);var Oh=[-3,d,Ol,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Oh,kn);var Ih=[-3,d,Il,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Ih,Nn);var Uh=[-3,d,Ul,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Uh,jn);var kh=[-3,d,Ml,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(kh,Gn);var Mh=[-3,d,Nl,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Mh,xn);var Nh=[-3,d,ql,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Nh,js);var Dh=[-3,d,jl,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Dh,Yn);var jh=[3,d,Ll,0,[hi,ui],[0,0]],Fh=[3,d,_l,0,[al,ol],[0,0]],Lh=[-3,d,zl,{[E]:v,[x]:403},[S],[0]];m.for(d).registerError(Lh,ln);var qh=[-3,d,Wl,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(qh,ls);var zh=[-3,d,Jl,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(zh,Xn);var Hh=[-3,d,Gl,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Hh,Ln);var _h=[-3,d,sp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(_h,Xs);var Bh=[3,d,Yl,0,[se,ke,oe,z,ne,Z],[[()=>ae,0],[()=>Ne,0],[()=>de,0],[()=>H,0],()=>ue,128]],Wh=[3,d,Zl,0,[It],[()=>Nt]],Vh=[-3,d,Xl,{[E]:v,[x]:404},[S],[0]];m.for(d).registerError(Vh,hn);var Gh=[3,d,rp,0,[se,Ut,ie,el,ne,oe,Z],[[()=>ae,0],0,[()=>ce,0],[()=>Rf,0],()=>ue,[()=>de,0],128]],Jh=[3,d,np,0,[Ut,ie,pi,di],[0,[()=>ce,0],128,[()=>xi,0]]],Kh=[-3,d,ip,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Kh,Ks);var Qh=[3,d,up,0,[se,ke,z,yi,kt,Si,ne,oe,Z],[[()=>ae,0],[()=>Ne,0],[()=>H,0],[()=>Mt,0],[()=>ye,0],[()=>ye,0],()=>ue,[()=>de,0],128]],Yh=[3,d,dp,0,[Ep,It,kp,ie],[2,()=>Nt,0,[()=>ce,0]]],Zh=[-3,d,cp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Zh,hs);var Xh=[-3,d,hp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Xh,Ls);var ef=[-3,d,pp,{[E]:v,[x]:403},[S],[0]];m.for(d).registerError(ef,_s);var tf=[-3,d,fp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(tf,An);var rf=[-3,d,mp,{[E]:v,[x]:429},[S],[0]];m.for(d).registerError(rf,mn);var nf=[-3,d,Sp,{[E]:v,[x]:401},[S],[0]];m.for(d).registerError(nf,ti);var sf=[-3,d,Ap,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(sf,Tn);var of=[-3,d,Cp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(of,Ys);var af=[-3,d,Op,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(af,ts);var cf=[-3,d,Np,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(cf,ni);var uf=[-3,d,jp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(uf,zn);var de=[3,d,bp,8,[Sl,pl],[0,0]],df=[-3,d,xp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(df,yn);var lf=[-3,d,Pp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(lf,$n);var pf=[-3,d,vp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(pf,_n);var hf=[-3,d,Rp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(hf,ns);var ff=[-3,d,$p,{[E]:v,[x]:404},[S],[0]];m.for(d).registerError(ff,bn);var mf=[-3,d,Ip,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(mf,is);var gf=[-3,d,Up,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(gf,Ws);var yf=[3,d,Dp,0,[z,Wd,wi,bi,fi,Ei,gi],[[()=>H,0],[()=>ye,0],4,4,2,0,()=>Ci]],wf=[-3,d,Hp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(wf,bs);var bf=[-3,d,qp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(bf,Ss);var Ef=[-3,d,zp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Ef,ii);var Sf=[-3,d,_p,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Sf,xs);var vf=[-3,d,Bp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(vf,As);var xf=[-3,d,Wp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(xf,Ts);var Cf=[-3,d,Vp,{[E]:v,[x]:400},[S],[0]];m.for(d).registerError(Cf,$s);var Af="unit",Pf=[-3,vi,"CognitoIdentityProviderServiceException",0,[],[]];m.for(vi).registerError(Pf,w);var ye=[1,d,jd,0,[()=>oh,0]],Ci=[1,d,Fl,0,()=>jh],Tf=[2,d,qd,8,0,0],Rf=[2,d,tl,8,0,0],$f=[9,d,Ed,0,()=>Qp,()=>Yp],Of=[9,d,xd,0,()=>Zp,()=>Af],If=[9,d,Td,0,()=>Xp,()=>eh],Uf=[9,d,Od,0,()=>th,()=>rh],kf=[9,d,Md,0,()=>nh,()=>sh],Mf=[9,d,Jd,0,()=>dh,()=>lh],Nf=[9,d,rl,0,()=>ph,()=>hh],Df=[9,d,gl,0,()=>Eh,()=>Sh],jf=[9,d,Cl,0,()=>xh,()=>Ch],Ff=[9,d,Ql,0,()=>Bh,()=>Wh],Lf=[9,d,tp,0,()=>Gh,()=>Jh],qf=[9,d,lp,0,()=>Qh,()=>Yh];class zf extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminCreateUser",{}).n("CognitoIdentityProviderClient","AdminCreateUserCommand").sc($f).build(){}class Hf extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminDeleteUser",{}).n("CognitoIdentityProviderClient","AdminDeleteUserCommand").sc(Of).build(){}class _f extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminDisableUser",{}).n("CognitoIdentityProviderClient","AdminDisableUserCommand").sc(If).build(){}class Bf extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminEnableUser",{}).n("CognitoIdentityProviderClient","AdminEnableUserCommand").sc(Uf).build(){}class Wf extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","AdminGetUser",{}).n("CognitoIdentityProviderClient","AdminGetUserCommand").sc(kf).build(){}class Vf extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ConfirmForgotPassword",{}).n("CognitoIdentityProviderClient","ConfirmForgotPasswordCommand").sc(Mf).build(){}class Gf extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ConfirmSignUp",{}).n("CognitoIdentityProviderClient","ConfirmSignUpCommand").sc(Nf).build(){}class Jf extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ForgotPassword",{}).n("CognitoIdentityProviderClient","ForgotPasswordCommand").sc(Df).build(){}class Kf extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(jf).build(){}class Qf extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","ResendConfirmationCode",{}).n("CognitoIdentityProviderClient","ResendConfirmationCodeCommand").sc(Ff).build(){}class Yf extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","RespondToAuthChallenge",{}).n("CognitoIdentityProviderClient","RespondToAuthChallengeCommand").sc(Lf).build(){}class Zf extends N.classBuilder().ep(q).m(function(e,r,n,s){return[L(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","SignUp",{}).n("CognitoIdentityProviderClient","SignUpCommand").sc(qf).build(){}const tm=Object.freeze(Object.defineProperty({__proto__:null,$Command:N,AdminCreateUserCommand:zf,AdminDeleteUserCommand:Hf,AdminDisableUserCommand:_f,AdminEnableUserCommand:Bf,AdminGetUserCommand:Wf,AliasExistsException:Wn,CodeDeliveryFailureException:In,CodeMismatchException:as,CognitoIdentityProviderClient:wd,CognitoIdentityProviderServiceException:w,ConcurrentModificationException:ms,ConfirmForgotPasswordCommand:Vf,ConfirmSignUpCommand:Gf,DeviceKeyExistsException:Is,DuplicateProviderException:Ns,EnableSoftwareTokenMFAException:ai,ExpiredCodeException:us,FeatureUnavailableInTierException:zs,ForbiddenException:ys,ForgotPasswordCommand:Jf,GroupExistsException:ks,InitiateAuthCommand:Kf,InternalErrorException:an,InvalidEmailRoleAccessPolicyException:Kn,InvalidLambdaResponseException:Sn,InvalidOAuthFlowException:Gs,InvalidParameterException:un,InvalidPasswordException:kn,InvalidSmsRoleAccessPolicyException:Nn,InvalidSmsRoleTrustRelationshipException:jn,InvalidUserPoolConfigurationException:Gn,LimitExceededException:xn,MFAMethodNotFoundException:Yn,ManagedLoginBrandingExistsException:js,NotAuthorizedException:ln,PasswordHistoryPolicyViolationException:ls,PasswordResetRequiredException:Xn,PreconditionNotMetException:Ln,RefreshTokenReuseException:Xs,ResendConfirmationCodeCommand:Qf,ResourceNotFoundException:hn,RespondToAuthChallengeCommand:Yf,ScopeDoesNotExistException:Ks,SignUpCommand:Zf,SoftwareTokenMFANotFoundException:hs,TermsExistsException:Ls,TierChangeNotAllowedException:_s,TooManyFailedAttemptsException:An,TooManyRequestsException:mn,UnauthorizedException:ti,UnexpectedLambdaException:Tn,UnsupportedIdentityProviderException:Ys,UnsupportedOperationException:ts,UnsupportedTokenTypeException:ni,UnsupportedUserStateException:zn,UserImportInProgressException:yn,UserLambdaValidationException:$n,UserNotConfirmedException:ns,UserNotFoundException:bn,UserPoolAddOnNotEnabledException:is,UserPoolTaggingException:Ws,UsernameExistsException:_n,WebAuthnChallengeNotFoundException:bs,WebAuthnClientMismatchException:Ss,WebAuthnConfigurationMissingException:ii,WebAuthnCredentialNotSupportedException:xs,WebAuthnNotEnabledException:As,WebAuthnOriginNotAllowedException:Ts,WebAuthnRelyingPartyMismatchException:$s,__Client:Er},Symbol.toStringTag,{value:"Module"}));export{me as f,tm as i,vt as t};
@@ -1 +0,0 @@
1
- import{H,n as N,c as qe,t as Ae,d as xe,e as Ve,g as Je,h as We,a as L,i as Ke,f as Qe,s as Xe,F as Ye}from"./normalizeProvider-BrOPyH3l.js";import{i as Ze,b as et,c as _e,S as re,m as tt,d as st,e as nt,T as y,f as ie,N as R,h as P,j as rt,L as Pe,k as Re,v as it,R as ot,l as at,n as ke,o as ct,E as ut,r as dt,p as pt,q as lt,s as gt,t as ft,u as mt,D as ht,w as St,x as yt,y as Et,z as wt,A as Ct,B as It,F as bt,G as At,H as xt,I as _t,a as Pt,J as Rt,K as kt,M as vt,O as Ot,P as Dt,Q as Tt,U as Nt,V as Mt,W as Ut,X as $t,C as ve,g as Oe}from"./resolveDefaultsModeConfig-D1zWPouA.js";import"./preload-helper-BlTxHScW.js";import"./index-CWcv-6Zk.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-B7n8ZNar.js";const Ft=t=>e=>async s=>{if(!H.isInstance(s.request))return e(s);const{request:n}=s,{handlerProtocol:r=""}=t.requestHandler.metadata||{};if(r.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(s)},zt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},jt=t=>({applyToStack:e=>{e.add(Ft(t),zt)}}),Lt=()=>(t,e)=>async s=>{try{const n=await t(s),{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:c}=a,d=u??e.inputFilterSensitiveLog,p=c??e.outputFilterSensitiveLog,{$metadata:g,...m}=n.output;return o?.info?.({clientName:r,commandName:i,input:d(s.input),output:p(m),metadata:g}),n}catch(n){const{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u}=a,c=u??e.inputFilterSensitiveLog;throw o?.error?.({clientName:r,commandName:i,input:c(s.input),error:n,metadata:n.$metadata}),n}},Ht={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Gt=t=>({applyToStack:e=>{e.add(Lt(),Ht)}}),Bt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},qt=()=>t=>async e=>t(e),Vt=t=>({applyToStack:e=>{e.add(qt(),Bt)}}),Jt=void 0;function Wt(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function Kt(t){const e=N(t.userAgentAppId??Jt),{customUserAgent:s}=t;return Object.assign(t,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const n=await e();if(!Wt(n)){const r=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof n!="string"?r?.warn("userAgentAppId must be a string or undefined."):n.length>50&&r?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}const De=(t,e=!1)=>{if(e){for(const s of t.split("."))if(!De(s))return!1;return!0}return!(!Ze(t)||t.length<3||t.length>63||t!==t.toLowerCase()||et(t))},oe=":",Qt="/",Xt=t=>{const e=t.split(oe);if(e.length<6)return null;const[s,n,r,i,o,...a]=e;if(s!=="arn"||n===""||r===""||a.join(oe)==="")return null;const u=a.map(c=>c.split(Qt)).flat();return{partition:n,service:r,region:i,accountId:o,resourceId:u}},Yt=[{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)"}}}],Zt={partitions:Yt};let es=Zt;const ts=t=>{const{partitions:e}=es;for(const n of e){const{regions:r,outputs:i}=n;for(const[o,a]of Object.entries(r))if(o===t)return{...i,...a}}for(const n of e){const{regionRegex:r,outputs:i}=n;if(new RegExp(r).test(t))return{...i}}const s=e.find(n=>n.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},Te={isVirtualHostableS3Bucket:De,parseArn:Xt,partition:ts};_e.aws=Te;function ss(t,e,s){return t.$source||(t.$source={}),t.$source[e]=s,t}function I(t,e,s){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]=s}const ae=t=>qe.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Ne=t=>new Date(Date.now()+t),ns=(t,e)=>Math.abs(Ne(e).getTime()-t)>=3e5,ce=(t,e)=>{const s=Date.parse(t);return ns(s,e)?s-Date.now():e},M=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},rs=async t=>{const e=M("context",t.context),s=M("config",t.config),n=e.endpointV2?.properties?.authSchemes?.[0],i=await M("signer",s.signer)(n),o=t?.signingRegion,a=t?.signingRegionSet,u=t?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:u}};class is{async sign(e,s,n){if(!H.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await rs(n),{config:i,signer:o}=r;let{signingRegion:a,signingName:u}=r;const c=n.context;if(c?.authSchemes?.length??!1){const[p,g]=c.authSchemes;p?.name==="sigv4a"&&g?.name==="sigv4"&&(a=g?.signingRegion??a,u=g?.signingName??u)}return await o.sign(e,{signingDate:Ne(i.systemClockOffset),signingRegion:a,signingService:u})}errorHandler(e){return s=>{const n=s.ServerTime??ae(s.$response);if(n){const r=M("config",e.config),i=r.systemClockOffset;r.systemClockOffset=ce(n,r.systemClockOffset),r.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(e,s){const n=ae(e);if(n){const r=M("config",s.config);r.systemClockOffset=ce(n,r.systemClockOffset)}}}const os=t=>{let e=t.credentials,s=!!t.credentials,n;Object.defineProperty(t,"credentials",{set(c){c&&c!==e&&c!==n&&(s=!0),e=c;const d=as(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),p=cs(t,d);s&&!p.attributed?(n=async g=>p(g).then(m=>ss(m,"CREDENTIALS_CODE","e")),n.memoized=p.memoized,n.configBound=p.configBound,n.attributed=!0):n=p},get(){return n},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:r=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=N(t.signer):t.regionInfoProvider?a=()=>N(t.region)().then(async c=>[await t.regionInfoProvider(c,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},c]).then(([c,d])=>{const{signingRegion:p,signingService:g}=c;t.signingRegion=t.signingRegion||p||d,t.signingName=t.signingName||g||t.serviceId;const m={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:r},k=t.signerConstructor||re;return new k(m)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await N(t.region)(),properties:{}},c);const d=c.signingRegion,p=c.signingName;t.signingRegion=t.signingRegion||d,t.signingName=t.signingName||p||t.serviceId;const g={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:r},m=t.signerConstructor||re;return new m(g)},Object.assign(t,{systemClockOffset:i,signingEscapePath:r,signer:a})};function as(t,{credentials:e,credentialDefaultProvider:s}){let n;return e?e?.memoized?n=e:n=tt(e,nt,st):s?n=N(s(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 cs(t,e){if(e.configBound)return e;const s=async n=>e({...n,callerClientConfig:t});return s.memoized=e.memoized,s.configBound=!0,s}class us{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,s){const n=s.getMemberSchemas(),r=Object.values(n).find(i=>!!i.getMergedTraits().httpPayload);if(r){const i=r.getMergedTraits().mediaType;return i||(r.isStringSchema()?"text/plain":r.isBlobSchema()?"application/octet-stream":e)}else if(!s.isUnitSchema()&&Object.values(n).find(o=>{const{httpQuery:a,httpQueryParams:u,httpHeader:c,httpLabel:d,httpPrefixHeaders:p}=o.getMergedTraits();return!a&&!u&&!c&&!d&&p===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,s,n,r,i,o){let a=s,u=e;e.includes("#")&&([a,u]=e.split("#"));const c={$metadata:i,$fault:n.statusCode<500?"client":"server"},d=y.for(a);try{return{errorSchema:o?.(d,u)??d.getSchema(e),errorMetadata:c}}catch{r.message=r.message??r.Message??"UnknownError";const g=y.for("smithy.ts.sdk.synthetic."+a),m=g.getBaseException();if(m){const k=g.getErrorCtor(m)??Error;throw this.decorateServiceException(Object.assign(new k({name:u}),c),r)}throw this.decorateServiceException(Object.assign(new Error(u),c),r)}}decorateServiceException(e,s={}){if(this.queryCompat){const n=e.Message??s.Message,r=ie(e,s);n&&(r.message=n),r.Error={...r.Error,Type:r.Error.Type,Code:r.Error.Code,Message:r.Error.message??r.Error.Message??n};const i=r.$metadata.requestId;return i&&(r.RequestId=i),r}return ie(e,s)}setQueryCompatError(e,s){const n=s.headers?.["x-amzn-query-error"];if(e!==void 0&&n!=null){const[r,i]=n.split(";"),o=Object.entries(e),a={Code:r,Type:i};Object.assign(e,a);for(const[u,c]of o)a[u==="message"?"Message":u]=c;delete a.__type,e.Error=a}}queryCompatOutput(e,s){e.Error&&(s.Error=e.Error),e.Type&&(s.Type=e.Type),e.Code&&(s.Code=e.Code)}findQueryCompatibleError(e,s){try{return e.getSchema(s)}catch{return e.find(r=>R.of(r).getMergedTraits().awsQueryError?.[0]===s)}}}class G{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*ds(t,e){if(t.isUnitSchema())return;const s=t.getSchema();for(let n=0;n<s[4].length;++n){const r=s[4][n],i=s[5][n],o=new R([i,0],r);!(r in e)&&!o.isIdempotencyToken()||(yield[r,o])}}function*ps(t,e,s){if(t.isUnitSchema())return;const n=t.getSchema();let r=Object.keys(e).filter(i=>i!=="__type").length;for(let i=0;i<n[4].length&&r!==0;++i){const o=n[4][i],a=n[5][i],u=new R([a,0],o);let c=o;s&&(c=u.getMergedTraits()[s]??o),c in e&&(yield[o,u],r-=1)}}class ls{from;to;keys;constructor(e,s){this.from=e,this.to=s,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,s=this.from[e];this.to.$unknown=[e,s]}}}function gs(t,e,s){if(s?.source){const n=s.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||n!==String(e)))return n.includes(".")?new P(n,"bigDecimal"):BigInt(n)}return e}const fs=(t,e)=>rt(t,e).then(s=>(e?.utf8Encoder??Ae)(s)),ms=(t,e)=>fs(t,e).then(s=>{if(s.length)try{return JSON.parse(s)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:s}),n}return{}}),hs=(t,e)=>{const s=(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},r=s(t.headers,"x-amzn-errortype");if(r!==void 0)return n(t.headers[r]);if(e&&typeof e=="object"){const i=s(e,"code");if(i&&e[i]!==void 0)return n(e[i]);if(e.__type!==void 0)return n(e.__type)}};class Ss extends G{settings;constructor(e){super(),this.settings=e}async read(e,s){return this._read(e,typeof s=="string"?JSON.parse(s,gs):await ms(s,this.serdeContext))}readObject(e,s){return this._read(e,s)}_read(e,s){const n=s!==null&&typeof s=="object",r=R.of(e);if(n){if(r.isStructSchema()){const o=r.isUnionSchema(),a={};let u;o&&(u=new ls(s,a));for(const[c,d]of ps(r,s,this.settings.jsonName?"jsonName":!1)){const p=this.settings.jsonName?d.getMergedTraits().jsonName??c:c;o&&u.mark(p),s[p]!=null&&(a[c]=this._read(d,s[p]))}return o&&u.writeUnknown(),a}if(Array.isArray(s)&&r.isListSchema()){const o=r.getValueSchema(),a=[],u=!!r.getMergedTraits().sparse;for(const c of s)(u||c!=null)&&a.push(this._read(o,c));return a}if(r.isMapSchema()){const o=r.getValueSchema(),a={},u=!!r.getMergedTraits().sparse;for(const[c,d]of Object.entries(s))(u||d!=null)&&(a[c]=this._read(o,d));return a}}if(r.isBlobSchema()&&typeof s=="string")return xe(s);const i=r.getMergedTraits().mediaType;if(r.isStringSchema()&&typeof s=="string"&&i)return i==="application/json"||i.endsWith("+json")?Pe.from(s):s;if(r.isTimestampSchema()&&s!=null)switch(Re(r,this.settings)){case 5:return We(s);case 6:return Je(s);case 7:return Ve(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(r.isBigIntegerSchema()&&(typeof s=="number"||typeof s=="string"))return BigInt(s);if(r.isBigDecimalSchema()&&s!=null){if(s instanceof P)return s;const o=s;return o.type==="bigDecimal"&&"string"in o?new P(o.string,o.type):new P(String(s),"bigDecimal")}if(r.isNumericSchema()&&typeof s=="string"){switch(s){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return s}if(r.isDocumentSchema())if(n){const o=Array.isArray(s)?[]:{};for(const[a,u]of Object.entries(s))u instanceof P?o[a]=u:o[a]=this._read(r,u);return o}else return structuredClone(s);return s}}const ue="Ν";class ys{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,s)=>{if(s instanceof P){const n=`${ue+"nv"+this.counter++}_`+s.string;return this.values.set(`"${n}"`,s.string),n}if(typeof s=="bigint"){const n=s.toString(),r=`${ue+"b"+this.counter++}_`+n;return this.values.set(`"${r}"`,n),r}return s}}replaceInJson(e){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return e;for(const[s,n]of this.values)e=e.replace(s,n);return e}}class Es extends G{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,s){this.rootSchema=R.of(e),this.buffer=this._write(this.rootSchema,s)}writeDiscriminatedDocument(e,s){this.write(e,s),typeof this.buffer=="object"&&(this.buffer.__type=R.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:s}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!s)return JSON.stringify(this.buffer);const n=new ys;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}_write(e,s,n){const r=s!==null&&typeof s=="object",i=R.of(e);if(r){if(i.isStructSchema()){const o={};for(const[a,u]of ds(i,s)){const c=this._write(u,s[a],i);if(c!==void 0){const d=u.getMergedTraits().jsonName,p=this.settings.jsonName?d??a:a;o[p]=c}}if(i.isUnionSchema()&&Object.keys(o).length===0){const{$unknown:a}=s;if(Array.isArray(a)){const[u,c]=a;o[u]=this._write(15,c)}}return o}if(Array.isArray(s)&&i.isListSchema()){const o=i.getValueSchema(),a=[],u=!!i.getMergedTraits().sparse;for(const c of s)(u||c!=null)&&a.push(this._write(o,c));return a}if(i.isMapSchema()){const o=i.getValueSchema(),a={},u=!!i.getMergedTraits().sparse;for(const[c,d]of Object.entries(s))(u||d!=null)&&(a[c]=this._write(o,d));return a}if(s instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??L)(s);if(s instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(Re(i,this.settings)){case 5:return s.toISOString().replace(".000Z","Z");case 6:return Ke(s);case 7:return s.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",s),s.getTime()/1e3}s instanceof P&&(this.useReplacer=!0)}if(!(s===null&&n?.isStructSchema())){if(i.isStringSchema()){if(typeof s>"u"&&i.isIdempotencyToken())return it();const o=i.getMergedTraits().mediaType;return s!=null&&o&&(o==="application/json"||o.endsWith("+json"))?Pe.from(s):s}if(typeof s=="number"&&i.isNumericSchema())return Math.abs(s)===1/0||isNaN(s)?String(s):s;if(typeof s=="string"&&i.isBlobSchema())return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??L)(s);if(typeof s=="bigint"&&(this.useReplacer=!0),i.isDocumentSchema())if(r){const o=Array.isArray(s)?[]:{};for(const[a,u]of Object.entries(s))u instanceof P?(this.useReplacer=!0,o[a]=u):o[a]=this._write(i,u);return o}else return structuredClone(s);return s}}}class ws extends G{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Es(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new Ss(this.settings);return e.setSerdeContext(this.serdeContext),e}}class Cs extends ot{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e}),this.serviceTarget=s,this.codec=r??new ws({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!n,this.mixin=new us(this.awsQueryCompatible)}async serializeRequest(e,s,n){const r=await super.serializeRequest(e,s,n);return r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(r.headers["x-amzn-query-mode"]="true"),(at(e.input)==="unit"||!r.body)&&(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(e,s,n,r,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,n);const o=hs(n,r)??"Unknown",{errorSchema:a,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,n,r,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=R.of(a),d=r.message??r.Message??"Unknown",p=y.for(a[1]).getErrorCtor(a)??Error,g=new p(d),m={};for(const[k,Be]of c.structIterator())r[k]!=null&&(m[k]=this.codec.createDeserializer().readObject(Be,r[k]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,m),this.mixin.decorateServiceException(Object.assign(g,u,{$fault:c.getMergedTraits().error,message:d},m),r)}}class Is extends Cs{constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const bs=/\d{12}\.ddb/;async function As(t,e,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&I(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const i=await e.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?I(t,"RETRY_MODE_ADAPTIVE","F"):I(t,"RETRY_MODE_STANDARD","E"):I(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const i=t.endpointV2;switch(String(i?.url?.hostname).match(bs)&&I(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":I(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":I(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":I(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const r=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const i=r;i.accountId&&I(t,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))I(t,o,a)}}const de="user-agent",z="x-amz-user-agent",pe=" ",j="/",xs=/[^!$%&'*+\-.^_`|~\w]/g,_s=/[^!$%&'*+\-.^_`|~\w#]/g,le="-",Ps=1024;function Rs(t){let e="";for(const s in t){const n=t[s];if(e.length+n.length+1<=Ps){e.length?e+=","+n:e+=n;continue}break}return e}const ks=t=>(e,s)=>async n=>{const{request:r}=n;if(!H.isInstance(r))return e(n);const{headers:i}=r,o=s?.userAgent?.map($)||[],a=(await t.defaultUserAgentProvider()).map($);await As(s,t,n);const u=s;a.push(`m/${Rs(Object.assign({},s.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const c=t?.customUserAgent?.map($)||[],d=await t.userAgentAppId();d&&a.push($(["app",`${d}`]));const p=[].concat([...a,...o,...c]).join(pe),g=[...a.filter(m=>m.startsWith("aws-sdk-")),...c].join(pe);return t.runtime!=="browser"?(g&&(i[z]=i[z]?`${i[de]} ${g}`:g),i[de]=p):i[z]=p,e({...n,request:r})},$=t=>{const e=t[0].split(j).map(o=>o.replace(xs,le)).join(j),s=t[1]?.replace(_s,le),n=e.indexOf(j),r=e.substring(0,n);let i=e.substring(n+1);return r==="api"&&(i=i.toLowerCase()),[r,i,s].filter(o=>o&&o.length>0).reduce((o,a,u)=>{switch(u){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},vs={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Os=t=>({applyToStack:e=>{e.add(ks(t),vs)}}),Ds=async(t,e,s)=>({operation:ct(e).operation,region:await ke(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Ts(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:t.region},propertiesExtractor:(e,s)=>({signingProperties:{config:e,context:s}})}}function F(t){return{schemeId:"smithy.api#noAuth"}}const Ns=t=>{const e=[];switch(t.operation){case"GetCredentialsForIdentity":{e.push(F());break}case"GetId":{e.push(F());break}case"GetOpenIdToken":{e.push(F());break}case"UnlinkIdentity":{e.push(F());break}default:e.push(Ts(t))}return e},Ms=t=>{const e=os(t);return Object.assign(e,{authSchemePreference:ke(t.authSchemePreference??[])})},Us=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),Me={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$s="3.958.0",Fs={version:$s},zs=({serviceId:t,clientVersion:e})=>async s=>{const n=typeof window<"u"?window.navigator:void 0,r=n?.userAgent??"",i=n?.userAgentData?.platform??ge.os(r)??"other",o=void 0,a=n?.userAgentData?.brands??[],u=a[a.length-1],c=u?.brand??ge.browser(r)??"unknown",d=u?.version??"unknown",p=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${c}_${d}`]];t&&p.push([`api/${t}`,e]);const g=await s?.userAgentAppId?.();return g&&p.push([`app/${g}`]),p},ge={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"}},Ue="required",h="fn",S="argv",O="ref",fe=!0,me="isSet",U="booleanEquals",v="error",b="endpoint",_="tree",B="PartitionResult",q="getAttr",D="stringEquals",he={[Ue]:!1,type:"string"},Se={[Ue]:!0,default:!1,type:"boolean"},ye={[O]:"Endpoint"},$e={[h]:U,[S]:[{[O]:"UseFIPS"},!0]},Fe={[h]:U,[S]:[{[O]:"UseDualStack"},!0]},f={},T={[O]:"Region"},Ee={[h]:q,[S]:[{[O]:B},"supportsFIPS"]},ze={[O]:B},we={[h]:U,[S]:[!0,{[h]:q,[S]:[ze,"supportsDualStack"]}]},Ce=[$e],Ie=[Fe],be=[T],js={parameters:{Region:he,UseDualStack:Se,UseFIPS:Se,Endpoint:he},rules:[{conditions:[{[h]:me,[S]:[ye]}],rules:[{conditions:Ce,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:v},{conditions:Ie,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:v},{endpoint:{url:ye,properties:f,headers:f},type:b}],type:_},{conditions:[{[h]:me,[S]:be}],rules:[{conditions:[{[h]:"aws.partition",[S]:be,assign:B}],rules:[{conditions:[$e,Fe],rules:[{conditions:[{[h]:U,[S]:[fe,Ee]},we],rules:[{conditions:[{[h]:D,[S]:[T,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:D,[S]:[T,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:D,[S]:[T,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:D,[S]:[T,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:f,headers:f},type:b},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:v}],type:_},{conditions:Ce,rules:[{conditions:[{[h]:U,[S]:[Ee,fe]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"FIPS is enabled but this partition does not support FIPS",type:v}],type:_},{conditions:Ie,rules:[{conditions:[we],rules:[{conditions:[{[h]:D,[S]:["aws",{[h]:q,[S]:[ze,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:f,headers:f},type:b},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"DualStack is enabled but this partition does not support DualStack",type:v}],type:_},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:f,headers:f},type:b}],type:_}],type:_},{error:"Invalid Configuration: Missing Region",type:v}]},Ls=js,Hs=new ut({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Gs=(t,e={})=>Hs.get(t,()=>dt(Ls,{endpointParams:t,logger:e.logger}));_e.aws=Te;const Bs=t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??xe,base64Encoder:t?.base64Encoder??L,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Gs,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Ns,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new is},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new gt}],logger:t?.logger??new lt,protocol:t?.protocol??Is,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:t?.serviceId??"Cognito Identity",urlParser:t?.urlParser??pt,utf8Decoder:t?.utf8Decoder??Qe,utf8Encoder:t?.utf8Encoder??Ae}),qs=t=>{const e=ft(t),s=()=>e().then(It),n=Bs(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??Et,credentialDefaultProvider:t?.credentialDefaultProvider??(r=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??zs({serviceId:n.serviceId,clientVersion:Fs.version}),maxAttempts:t?.maxAttempts??yt,region:t?.region??St("Region is missing"),requestHandler:Ye.create(t?.requestHandler??s),retryMode:t?.retryMode??(async()=>(await s()).retryMode||ht),sha256:t?.sha256??mt,streamCollector:t?.streamCollector??Xe,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(Ct)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(wt))}},Vs=t=>({setRegion(e){t.region=e},region(){return t.region}}),Js=t=>({region:t.region()}),Ws=t=>{const e=t.httpAuthSchemes;let s=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(r){const i=e.findIndex(o=>o.schemeId===r.schemeId);i===-1?e.push(r):e.splice(i,1,r)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(r){s=r},httpAuthSchemeProvider(){return s},setCredentials(r){n=r},credentials(){return n}}},Ks=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Qs=(t,e)=>{const s=Object.assign(Vs(t),bt(t),At(t),Ws(t));return e.forEach(n=>n.configure(s)),Object.assign(t,Js(s),xt(s),_t(s),Ks(s))};class dr extends Pt{config;constructor(...[e]){const s=qs(e||{});super(s),this.initConfig=s;const n=Us(s),r=Kt(n),i=Rt(r),o=kt(i),a=o,u=vt(a),c=Ms(u),d=Qs(c,e?.extensions||[]);this.config=d,this.middlewareStack.use(Ot(this.config)),this.middlewareStack.use(Os(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use(Tt(this.config)),this.middlewareStack.use(jt(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Vt(this.config)),this.middlewareStack.use(Nt(this.config,{httpAuthSchemeParametersProvider:Ds,identityProviderConfigProvider:async p=>new Ut({"aws.auth#sigv4":p.credentials})})),this.middlewareStack.use(Mt(this.config))}destroy(){super.destroy()}}class E extends $t{constructor(e){super(e),Object.setPrototypeOf(this,E.prototype)}}class V extends E{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,V.prototype)}}class J extends E{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,J.prototype)}}class W extends E{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,W.prototype)}}class K extends E{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,K.prototype)}}class Q extends E{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Q.prototype)}}class X extends E{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,X.prototype)}}class Y extends E{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Y.prototype)}}class Z extends E{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,Z.prototype)}}class ee extends E{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,ee.prototype)}}class te extends E{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,te.prototype)}}class se extends E{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,se.prototype)}}const Xs="AccountId",Ys="AccessKeyId",je="Credentials",Zs="ConcurrentModificationException",en="CustomRoleArn",tn="DeveloperUserAlreadyRegisteredException",sn="Expiration",nn="ExternalServiceException",rn="GetCredentialsForIdentity",on="GetCredentialsForIdentityInput",an="GetCredentialsForIdentityResponse",cn="GetId",un="GetIdInput",dn="GetIdResponse",pn="InternalErrorException",ne="IdentityId",ln="InvalidIdentityPoolConfigurationException",gn="InvalidParameterException",fn="IdentityPoolId",mn="IdentityProviderToken",Le="Logins",hn="LimitExceededException",Sn="LoginsMap",yn="NotAuthorizedException",En="ResourceConflictException",wn="ResourceNotFoundException",Cn="SecretKey",In="SecretKeyString",bn="SessionToken",An="TooManyRequestsException",A="client",w="error",x="httpError",C="message",xn="server",He="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",l="com.amazonaws.cognitoidentity";var _n=[0,l,mn,8,0],Pn=[0,l,In,8,0],Rn=[-3,l,Zs,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(Rn,se);var kn=[3,l,je,0,[Ys,Cn,bn,sn],[0,[()=>Pn,0],0,4]],vn=[-3,l,tn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(vn,te);var On=[-3,l,nn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(On,Z);var Dn=[3,l,on,0,[ne,Le,en],[0,[()=>Ge,0],0]],Tn=[3,l,an,0,[ne,je],[0,[()=>kn,0]]],Nn=[3,l,un,0,[Xs,fn,Le],[0,0,[()=>Ge,0]]],Mn=[3,l,dn,0,[ne],[0]],Un=[-3,l,pn,{[w]:xn},[C],[0]];y.for(l).registerError(Un,V);var $n=[-3,l,ln,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError($n,ee);var Fn=[-3,l,gn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(Fn,J);var zn=[-3,l,hn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(zn,W);var jn=[-3,l,yn,{[w]:A,[x]:403},[C],[0]];y.for(l).registerError(jn,K);var Ln=[-3,l,En,{[w]:A,[x]:409},[C],[0]];y.for(l).registerError(Ln,Q);var Hn=[-3,l,wn,{[w]:A,[x]:404},[C],[0]];y.for(l).registerError(Hn,Y);var Gn=[-3,l,An,{[w]:A,[x]:429},[C],[0]];y.for(l).registerError(Gn,X);var Bn=[-3,He,"CognitoIdentityServiceException",0,[],[]];y.for(He).registerError(Bn,E);var Ge=[2,l,Sn,0,[0,0],[()=>_n,0]],qn=[9,l,rn,0,()=>Dn,()=>Tn],Vn=[9,l,cn,0,()=>Nn,()=>Mn];class pr extends ve.classBuilder().ep(Me).m(function(e,s,n,r){return[Oe(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(qn).build(){}class lr extends ve.classBuilder().ep(Me).m(function(e,s,n,r){return[Oe(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Vn).build(){}export{dr as CognitoIdentityClient,pr as GetCredentialsForIdentityCommand,lr as GetIdCommand};
@@ -1 +0,0 @@
1
- import{Y as gt,N as x,k as Oe,L as ft,h as $e,i as ht,b as St,c as Me,S as pe,m as yt,d as wt,e as Et,T,f as me,v as bt,R as At,l as Pt,j as ge,n as Ue,o as Tt,E as Ct,r as Rt,p as _t,q as It,s as kt,t as xt,u as Dt,D as vt,w as Nt,x as Ot,y as $t,z as Mt,A as Ut,B as Ft,F as Lt,G as zt,H as Ht,I as jt,a as Wt,J as Vt,K as Bt,M as Kt,O as qt,P as Gt,Q as Qt,U as Xt,V as Jt,W as Yt,X as Zt,C as es,g as ts}from"./resolveDefaultsModeConfig-D1zWPouA.js";import{d as q,t as G,H as Q,n as L,c as ss,a as Fe,i as rs,f as ns,s as is,F as os}from"./normalizeProvider-BrOPyH3l.js";function fe(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const X="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",J="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",Y="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",Le="(\\d?\\d)",ze="(\\d{4})",as=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),cs=new RegExp(`^${X}, ${Le} ${J} ${ze} ${Y} GMT$`),ds=new RegExp(`^${X}, ${Le}-${J}-(\\d\\d) ${Y} GMT$`),us=new RegExp(`^${X} ${J} ( [1-9]|\\d\\d) ${Y} ${ze}$`),ls=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ps=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},ms=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=as.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,s,r,n,i,o,a,,d,c]=t;I(r,1,12),I(n,1,31),I(i,0,23),I(o,0,59),I(a,0,60);const u=new Date(Date.UTC(Number(s),Number(r)-1,Number(n),Number(i),Number(o),Number(a),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(u.setUTCFullYear(Number(s)),c.toUpperCase()!="Z"){const[,l,m,S]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],P=l==="-"?1:-1;u.setTime(u.getTime()+P*(Number(m)*60*60*1e3+Number(S)*60*1e3))}return u},gs=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,s,r,n,i,o,a,d;if((d=cs.exec(e))?[,t,s,r,n,i,o,a]=d:(d=ds.exec(e))?([,t,s,r,n,i,o,a]=d,r=(Number(r)+1900).toString()):(d=us.exec(e))&&([,s,t,n,i,o,a,r]=d),r&&o){const c=Date.UTC(Number(r),ls.indexOf(s),Number(t),Number(n),Number(i),Number(o),a?Math.round(parseFloat(`0.${a}`)*1e3):0);I(t,1,31),I(n,0,23),I(i,0,59),I(o,0,60);const u=new Date(c);return u.setUTCFullYear(Number(r)),u}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function I(e,t,s){const r=Number(e);if(r<t||r>s)throw new Error(`Value ${r} out of range [${t}, ${s}]`)}const fs=e=>{const t=e.length,s=[];let r=!1,n,i=0;for(let o=0;o<t;++o){const a=e[o];switch(a){case'"':n!=="\\"&&(r=!r);break;case",":r||(s.push(e.slice(i,o)),i=o+1);break}n=a}return s.push(e.slice(i)),s.map(o=>{o=o.trim();const a=o.length;return a<2?o:(o[0]==='"'&&o[a-1]==='"'&&(o=o.slice(1,a-1)),o.replace(/\\"/g,'"'))})};class hs extends gt{settings;constructor(t){super(),this.settings=t}read(t,s){const r=x.of(t);if(r.isListSchema())return fs(s).map(n=>this.read(r.getValueSchema(),n));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??q)(s);if(r.isTimestampSchema())switch(Oe(r,this.settings)){case 5:return ms(s);case 6:return gs(s);case 7:return ps(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(r.isStringSchema()){const n=r.getMergedTraits().mediaType;let i=s;if(n)return r.getMergedTraits().httpHeader&&(i=this.base64ToUtf8(i)),(n==="application/json"||n.endsWith("+json"))&&(i=ft.from(i)),i}return r.isNumericSchema()?Number(s):r.isBigIntegerSchema()?BigInt(s):r.isBigDecimalSchema()?new $e(s,"bigDecimal"):r.isBooleanSchema()?String(s).toLowerCase()==="true":s}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??G)((this.serdeContext?.base64Decoder??q)(t))}}const He=e=>{const t="#text";for(const s in e)e.hasOwnProperty(s)&&e[s][t]!==void 0?e[s]=e[s][t]:typeof e[s]=="object"&&e[s]!==null&&(e[s]=He(e[s]));return e};const Ss=e=>t=>async s=>{if(!Q.isInstance(s.request))return t(s);const{request:r}=s,{handlerProtocol:n=""}=e.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let i=r.hostname;r.port!=null&&(i+=`:${r.port}`),r.headers.host=i}return t(s)},ys={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ws=e=>({applyToStack:t=>{t.add(Ss(e),ys)}}),Es=()=>(e,t)=>async s=>{try{const r=await e(s),{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:d,overrideOutputFilterSensitiveLog:c}=a,u=d??t.inputFilterSensitiveLog,l=c??t.outputFilterSensitiveLog,{$metadata:m,...S}=r.output;return o?.info?.({clientName:n,commandName:i,input:u(s.input),output:l(S),metadata:m}),r}catch(r){const{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:d}=a,c=d??t.inputFilterSensitiveLog;throw o?.error?.({clientName:n,commandName:i,input:c(s.input),error:r,metadata:r.$metadata}),r}},bs={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},As=e=>({applyToStack:t=>{t.add(Es(),bs)}}),Ps={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Ts=()=>e=>async t=>e(t),Cs=e=>({applyToStack:t=>{t.add(Ts(),Ps)}}),Rs=void 0;function _s(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function Is(e){const t=L(e.userAgentAppId??Rs),{customUserAgent:s}=e;return Object.assign(e,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const r=await t();if(!_s(r)){const n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof r!="string"?n?.warn("userAgentAppId must be a string or undefined."):r.length>50&&n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}const je=(e,t=!1)=>{if(t){for(const s of e.split("."))if(!je(s))return!1;return!0}return!(!ht(e)||e.length<3||e.length>63||e!==e.toLowerCase()||St(e))},he=":",ks="/",xs=e=>{const t=e.split(he);if(t.length<6)return null;const[s,r,n,i,o,...a]=t;if(s!=="arn"||r===""||n===""||a.join(he)==="")return null;const d=a.map(c=>c.split(ks)).flat();return{partition:r,service:n,region:i,accountId:o,resourceId:d}},Ds=[{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)"}}}],vs={partitions:Ds};let Ns=vs;const Os=e=>{const{partitions:t}=Ns;for(const r of t){const{regions:n,outputs:i}=r;for(const[o,a]of Object.entries(n))if(o===e)return{...i,...a}}for(const r of t){const{regionRegex:n,outputs:i}=r;if(new RegExp(n).test(e))return{...i}}const s=t.find(r=>r.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},We={isVirtualHostableS3Bucket:je,parseArn:xs,partition:Os};Me.aws=We;function $s(e,t,s){return e.$source||(e.$source={}),e.$source[t]=s,e}function C(e,t,s){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=s}const Se=e=>ss.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Ve=e=>new Date(Date.now()+e),Ms=(e,t)=>Math.abs(Ve(t).getTime()-e)>=3e5,ye=(e,t)=>{const s=Date.parse(e);return Ms(s,t)?s-Date.now():t},z=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},Us=async e=>{const t=z("context",e.context),s=z("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=await z("signer",s.signer)(r),o=e?.signingRegion,a=e?.signingRegionSet,d=e?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:d}};class Fs{async sign(t,s,r){if(!Q.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await Us(r),{config:i,signer:o}=n;let{signingRegion:a,signingName:d}=n;const c=r.context;if(c?.authSchemes?.length??!1){const[l,m]=c.authSchemes;l?.name==="sigv4a"&&m?.name==="sigv4"&&(a=m?.signingRegion??a,d=m?.signingName??d)}return await o.sign(t,{signingDate:Ve(i.systemClockOffset),signingRegion:a,signingService:d})}errorHandler(t){return s=>{const r=s.ServerTime??Se(s.$response);if(r){const n=z("config",t.config),i=n.systemClockOffset;n.systemClockOffset=ye(r,n.systemClockOffset),n.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(t,s){const r=Se(t);if(r){const n=z("config",s.config);n.systemClockOffset=ye(r,n.systemClockOffset)}}}const Ls=e=>{let t=e.credentials,s=!!e.credentials,r;Object.defineProperty(e,"credentials",{set(c){c&&c!==t&&c!==r&&(s=!0),t=c;const u=zs(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),l=Hs(e,u);s&&!l.attributed?(r=async m=>l(m).then(S=>$s(S,"CREDENTIALS_CODE","e")),r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0):r=l},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:n=!0,systemClockOffset:i=e.systemClockOffset||0,sha256:o}=e;let a;return e.signer?a=L(e.signer):e.regionInfoProvider?a=()=>L(e.region)().then(async c=>[await e.regionInfoProvider(c,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},c]).then(([c,u])=>{const{signingRegion:l,signingService:m}=c;e.signingRegion=e.signingRegion||l||u,e.signingName=e.signingName||m||e.serviceId;const S={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:n},P=e.signerConstructor||pe;return new P(S)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await L(e.region)(),properties:{}},c);const u=c.signingRegion,l=c.signingName;e.signingRegion=e.signingRegion||u,e.signingName=e.signingName||l||e.serviceId;const m={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:n},S=e.signerConstructor||pe;return new S(m)},Object.assign(e,{systemClockOffset:i,signingEscapePath:n,signer:a})};function zs(e,{credentials:t,credentialDefaultProvider:s}){let r;return t?t?.memoized?r=t:r=yt(t,Et,wt):s?r=L(s(Object.assign({},e,{parentClientConfig:e}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function Hs(e,t){if(t.configBound)return t;const s=async r=>t({...r,callerClientConfig:e});return s.memoized=t.memoized,s.configBound=!0,s}class js{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,s){const r=s.getMemberSchemas(),n=Object.values(r).find(i=>!!i.getMergedTraits().httpPayload);if(n){const i=n.getMergedTraits().mediaType;return i||(n.isStringSchema()?"text/plain":n.isBlobSchema()?"application/octet-stream":t)}else if(!s.isUnitSchema()&&Object.values(r).find(o=>{const{httpQuery:a,httpQueryParams:d,httpHeader:c,httpLabel:u,httpPrefixHeaders:l}=o.getMergedTraits();return!a&&!d&&!c&&!u&&l===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,s,r,n,i,o){let a=s,d=t;t.includes("#")&&([a,d]=t.split("#"));const c={$metadata:i,$fault:r.statusCode<500?"client":"server"},u=T.for(a);try{return{errorSchema:o?.(u,d)??u.getSchema(t),errorMetadata:c}}catch{n.message=n.message??n.Message??"UnknownError";const m=T.for("smithy.ts.sdk.synthetic."+a),S=m.getBaseException();if(S){const P=m.getErrorCtor(S)??Error;throw this.decorateServiceException(Object.assign(new P({name:d}),c),n)}throw this.decorateServiceException(Object.assign(new Error(d),c),n)}}decorateServiceException(t,s={}){if(this.queryCompat){const r=t.Message??s.Message,n=me(t,s);r&&(n.message=r),n.Error={...n.Error,Type:n.Error.Type,Code:n.Error.Code,Message:n.Error.message??n.Error.Message??r};const i=n.$metadata.requestId;return i&&(n.RequestId=i),n}return me(t,s)}setQueryCompatError(t,s){const r=s.headers?.["x-amzn-query-error"];if(t!==void 0&&r!=null){const[n,i]=r.split(";"),o=Object.entries(t),a={Code:n,Type:i};Object.assign(t,a);for(const[d,c]of o)a[d==="message"?"Message":d]=c;delete a.__type,t.Error=a}}queryCompatOutput(t,s){t.Error&&(s.Error=t.Error),t.Type&&(s.Type=t.Type),t.Code&&(s.Code=t.Code)}findQueryCompatibleError(t,s){try{return t.getSchema(s)}catch{return t.find(n=>x.of(n).getMergedTraits().awsQueryError?.[0]===s)}}}class Be{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*Ws(e,t){if(e.isUnitSchema())return;const s=e.getSchema();for(let r=0;r<s[4].length;++r){const n=s[4][r],i=s[5][r],o=new x([i,0],n);!(n in t)&&!o.isIdempotencyToken()||(yield[n,o])}}class Vs{from;to;keys;constructor(t,s){this.from=t,this.to=s,this.keys=new Set(Object.keys(this.from).filter(r=>r!=="__type"))}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,s=this.from[t];this.to.$unknown=[t,s]}}}let j;function Bs(e){j||(j=new DOMParser);const t=j.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const s=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const n=r;if(n.attributes.length===0&&n.childNodes.length===0)return"";const i={},o=Array.from(n.attributes);for(const d of o)i[`${d.name}`]=d.value;const a=Array.from(n.childNodes);for(const d of a){const c=s(d);if(c!=null){const u=d.nodeName;if(a.length===1&&o.length===0&&u==="#text")return c;i[u]?Array.isArray(i[u])?i[u].push(c):i[u]=[i[u],c]:i[u]=c}else if(a.length===1&&o.length===0)return n.textContent}return i}return null};return{[t.documentElement.nodeName]:s(t.documentElement)}}class Ks extends Be{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new hs(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,s,r){const n=x.of(t),i=n.getMemberSchemas();if(n.isStructSchema()&&n.isMemberSchema()&&!!Object.values(i).find(c=>!!c.getMemberTraits().eventPayload)){const c={},u=Object.keys(i)[0];return i[u].isBlobSchema()?c[u]=s:c[u]=this.read(i[u],s),c}const a=(this.serdeContext?.utf8Encoder??G)(s),d=this.parseXml(a);return this.readSchema(t,r?d[r]:d)}readSchema(t,s){const r=x.of(t);if(r.isUnitSchema())return;const n=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(s))return this.readSchema(r,[s]);if(s==null)return s;if(typeof s=="object"){const i=!!n.sparse,o=!!n.xmlFlattened;if(r.isListSchema()){const d=r.getValueSchema(),c=[],u=d.getMergedTraits().xmlName??"member",l=o?s:(s[0]??s)[u],m=Array.isArray(l)?l:[l];for(const S of m)(S!=null||i)&&c.push(this.readSchema(d,S));return c}const a={};if(r.isMapSchema()){const d=r.getKeySchema(),c=r.getValueSchema();let u;o?u=Array.isArray(s)?s:[s]:u=Array.isArray(s.entry)?s.entry:[s.entry];const l=d.getMergedTraits().xmlName??"key",m=c.getMergedTraits().xmlName??"value";for(const S of u){const P=S[l],F=S[m];(F!=null||i)&&(a[P]=this.readSchema(c,F))}return a}if(r.isStructSchema()){const d=r.isUnionSchema();let c;d&&(c=new Vs(s,a));for(const[u,l]of r.structIterator()){const m=l.getMergedTraits(),S=m.httpPayload?m.xmlName??l.getName():l.getMemberTraits().xmlName??u;d&&c.mark(S),s[S]!=null&&(a[u]=this.readSchema(l,s[S]))}return d&&c.writeUnknown(),a}if(r.isDocumentSchema())return s;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,s)}parseXml(t){if(t.length){let s;try{s=Bs(t)}catch(o){throw o&&typeof o=="object"&&Object.defineProperty(o,"$responseBodyText",{value:t}),o}const r="#text",n=Object.keys(s)[0],i=s[n];return i[r]&&(i[n]=i[r],delete i[r]),He(i)}return{}}}class qs extends Be{settings;buffer;constructor(t){super(),this.settings=t}write(t,s,r=""){this.buffer===void 0&&(this.buffer="");const n=x.of(t);if(r&&!r.endsWith(".")&&(r+="."),n.isBlobSchema())(typeof s=="string"||s instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??Fe)(s)));else if(n.isBooleanSchema()||n.isNumericSchema()||n.isStringSchema())s!=null?(this.writeKey(r),this.writeValue(String(s))):n.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(bt()));else if(n.isBigIntegerSchema())s!=null&&(this.writeKey(r),this.writeValue(String(s)));else if(n.isBigDecimalSchema())s!=null&&(this.writeKey(r),this.writeValue(s instanceof $e?s.string:String(s)));else if(n.isTimestampSchema()){if(s instanceof Date)switch(this.writeKey(r),Oe(n,this.settings)){case 5:this.writeValue(s.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(rs(s));break;case 7:this.writeValue(String(s.getTime()/1e3));break}}else if(n.isDocumentSchema())Array.isArray(s)?this.write(79,s,r):s instanceof Date?this.write(4,s,r):s instanceof Uint8Array?this.write(21,s,r):s&&typeof s=="object"?this.write(143,s,r):(this.writeKey(r),this.writeValue(String(s)));else if(n.isListSchema()){if(Array.isArray(s))if(s.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const i=n.getValueSchema(),o=this.settings.flattenLists||n.getMergedTraits().xmlFlattened;let a=1;for(const d of s){if(d==null)continue;const c=this.getKey("member",i.getMergedTraits().xmlName),u=o?`${r}${a}`:`${r}${c}.${a}`;this.write(i,d,u),++a}}}else if(n.isMapSchema()){if(s&&typeof s=="object"){const i=n.getKeySchema(),o=n.getValueSchema(),a=n.getMergedTraits().xmlFlattened;let d=1;for(const[c,u]of Object.entries(s)){if(u==null)continue;const l=this.getKey("key",i.getMergedTraits().xmlName),m=a?`${r}${d}.${l}`:`${r}entry.${d}.${l}`,S=this.getKey("value",o.getMergedTraits().xmlName),P=a?`${r}${d}.${S}`:`${r}entry.${d}.${S}`;this.write(i,c,m),this.write(o,u,P),++d}}}else if(n.isStructSchema()){if(s&&typeof s=="object"){let i=!1;for(const[o,a]of Ws(n,s)){if(s[o]==null&&!a.isIdempotencyToken())continue;const d=this.getKey(o,a.getMergedTraits().xmlName),c=`${r}${d}`;this.write(a,s[o],c),i=!0}if(!i&&n.isUnionSchema()){const{$unknown:o}=s;if(Array.isArray(o)){const[a,d]=o,c=`${r}${a}`;this.write(15,d,c)}}}}else if(!n.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${n.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const t=this.buffer;return delete this.buffer,t}getKey(t,s){const r=s??t;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${fe(t)}=`}writeValue(t){this.buffer+=fe(t)}}class Gs extends At{options;serializer;deserializer;mixin=new js;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const s={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new qs(s),this.deserializer=new Ks(s)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,s,r){const n=await super.serializeRequest(t,s,r);n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":"application/x-www-form-urlencoded"}),(Pt(t.input)==="unit"||!n.body)&&(n.body="");const i=t.name.split("#")[1]??t.name;return n.body=`Action=${i}&Version=${this.options.version}`+n.body,n.body.endsWith("&")&&(n.body=n.body.slice(-1)),n}async deserializeResponse(t,s,r){const n=this.deserializer,i=x.of(t.output),o={};if(r.statusCode>=300){const l=await ge(r.body,s);l.byteLength>0&&Object.assign(o,await n.read(15,l)),await this.handleError(t,s,r,o,this.deserializeMetadata(r))}for(const l in r.headers){const m=r.headers[l];delete r.headers[l],r.headers[l.toLowerCase()]=m}const a=t.name.split("#")[1]??t.name,d=i.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,c=await ge(r.body,s);return c.byteLength>0&&Object.assign(o,await n.read(i,c,d)),{$metadata:this.deserializeMetadata(r),...o}}useNestedResult(){return!0}async handleError(t,s,r,n,i){const o=this.loadQueryErrorCode(r,n)??"Unknown",a=this.loadQueryError(n),d=this.loadQueryErrorMessage(n);a.message=d,a.Error={Type:a.Type,Code:a.Code,Message:d};const{errorSchema:c,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,r,a,i,this.mixin.findQueryCompatibleError),l=x.of(c),m=T.for(c[1]).getErrorCtor(c)??Error,S=new m(d),P={Type:a.Error.Type,Code:a.Error.Code,Error:a.Error};for(const[F,ue]of l.structIterator()){const le=ue.getMergedTraits().xmlName??F,mt=a[le]??n[le];P[F]=this.deserializer.readSchema(ue,mt)}throw this.mixin.decorateServiceException(Object.assign(S,u,{$fault:l.getMergedTraits().error,message:d},P),n)}loadQueryErrorCode(t,s){const r=(s.Errors?.[0]?.Error??s.Errors?.Error??s.Error)?.Code;if(r!==void 0)return r;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const s=this.loadQueryError(t);return s?.message??s?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Qs=/\d{12}\.ddb/;async function Xs(e,t,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&C(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const i=await t.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?C(e,"RETRY_MODE_ADAPTIVE","F"):C(e,"RETRY_MODE_STANDARD","E"):C(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const i=e.endpointV2;switch(String(i?.url?.hostname).match(Qs)&&C(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":C(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":C(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":C(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const i=n;i.accountId&&C(e,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))C(e,o,a)}}const we="user-agent",W="x-amz-user-agent",Ee=" ",V="/",Js=/[^!$%&'*+\-.^_`|~\w]/g,Ys=/[^!$%&'*+\-.^_`|~\w#]/g,be="-",Zs=1024;function er(e){let t="";for(const s in e){const r=e[s];if(t.length+r.length+1<=Zs){t.length?t+=","+r:t+=r;continue}break}return t}const tr=e=>(t,s)=>async r=>{const{request:n}=r;if(!Q.isInstance(n))return t(r);const{headers:i}=n,o=s?.userAgent?.map(H)||[],a=(await e.defaultUserAgentProvider()).map(H);await Xs(s,e,r);const d=s;a.push(`m/${er(Object.assign({},s.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const c=e?.customUserAgent?.map(H)||[],u=await e.userAgentAppId();u&&a.push(H(["app",`${u}`]));const l=[].concat([...a,...o,...c]).join(Ee),m=[...a.filter(S=>S.startsWith("aws-sdk-")),...c].join(Ee);return e.runtime!=="browser"?(m&&(i[W]=i[W]?`${i[we]} ${m}`:m),i[we]=l):i[W]=l,t({...r,request:n})},H=e=>{const t=e[0].split(V).map(o=>o.replace(Js,be)).join(V),s=e[1]?.replace(Ys,be),r=t.indexOf(V),n=t.substring(0,r);let i=t.substring(r+1);return n==="api"&&(i=i.toLowerCase()),[n,i,s].filter(o=>o&&o.length>0).reduce((o,a,d)=>{switch(d){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},sr={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},rr=e=>({applyToStack:t=>{t.add(tr(e),sr)}}),nr=async(e,t,s)=>({operation:Tt(t).operation,region:await Ue(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function ir(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function or(e){return{schemeId:"smithy.api#noAuth"}}const ar=e=>{const t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(or());break}default:t.push(ir(e))}return t},cr=e=>Object.assign(e,{stsClientCtor:st}),dr=e=>{const t=cr(e),s=Ls(t);return Object.assign(s,{authSchemePreference:Ue(e.authSchemePreference??[])})},ur=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),lr={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},pr="3.958.0",mr={version:pr},gr=({serviceId:e,clientVersion:t})=>async s=>{const r=typeof window<"u"?window.navigator:void 0,n=r?.userAgent??"",i=r?.userAgentData?.platform??Ae.os(n)??"other",o=void 0,a=r?.userAgentData?.brands??[],d=a[a.length-1],c=d?.brand??Ae.browser(n)??"unknown",u=d?.version??"unknown",l=[["aws-sdk-js",t],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${c}_${u}`]];e&&l.push([`api/${e}`,t]);const m=await s?.userAgentAppId?.();return m&&l.push([`app/${m}`]),l},Ae={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}},Ke="required",p="type",g="fn",f="argv",D="ref",Pe=!1,B=!0,k="booleanEquals",w="stringEquals",qe="sigv4",Ge="sts",Qe="us-east-1",y="endpoint",Te="https://sts.{Region}.{PartitionResult#dnsSuffix}",R="tree",U="error",Z="getAttr",Ce={[Ke]:!1,[p]:"string"},K={[Ke]:!0,default:!1,[p]:"boolean"},Xe={[D]:"Endpoint"},Re={[g]:"isSet",[f]:[{[D]:"Region"}]},E={[D]:"Region"},_e={[g]:"aws.partition",[f]:[E],assign:"PartitionResult"},Je={[D]:"UseFIPS"},Ye={[D]:"UseDualStack"},b={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:qe,signingName:Ge,signingRegion:Qe}]},headers:{}},A={},Ie={conditions:[{[g]:w,[f]:[E,"aws-global"]}],[y]:b,[p]:y},Ze={[g]:k,[f]:[Je,!0]},et={[g]:k,[f]:[Ye,!0]},ke={[g]:Z,[f]:[{[D]:"PartitionResult"},"supportsFIPS"]},tt={[D]:"PartitionResult"},xe={[g]:k,[f]:[!0,{[g]:Z,[f]:[tt,"supportsDualStack"]}]},De=[{[g]:"isSet",[f]:[Xe]}],ve=[Ze],Ne=[et],fr={parameters:{Region:Ce,UseDualStack:K,UseFIPS:K,Endpoint:Ce,UseGlobalEndpoint:K},rules:[{conditions:[{[g]:k,[f]:[{[D]:"UseGlobalEndpoint"},B]},{[g]:"not",[f]:De},Re,_e,{[g]:k,[f]:[Je,Pe]},{[g]:k,[f]:[Ye,Pe]}],rules:[{conditions:[{[g]:w,[f]:[E,"ap-northeast-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"ap-south-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"ap-southeast-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"ap-southeast-2"]}],endpoint:b,[p]:y},Ie,{conditions:[{[g]:w,[f]:[E,"ca-central-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-central-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-north-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-west-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-west-2"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"eu-west-3"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"sa-east-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,Qe]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"us-east-2"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"us-west-1"]}],endpoint:b,[p]:y},{conditions:[{[g]:w,[f]:[E,"us-west-2"]}],endpoint:b,[p]:y},{endpoint:{url:Te,properties:{authSchemes:[{name:qe,signingName:Ge,signingRegion:"{Region}"}]},headers:A},[p]:y}],[p]:R},{conditions:De,rules:[{conditions:ve,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[p]:U},{conditions:Ne,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[p]:U},{endpoint:{url:Xe,properties:A,headers:A},[p]:y}],[p]:R},{conditions:[Re],rules:[{conditions:[_e],rules:[{conditions:[Ze,et],rules:[{conditions:[{[g]:k,[f]:[B,ke]},xe],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:A,headers:A},[p]:y}],[p]:R},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[p]:U}],[p]:R},{conditions:ve,rules:[{conditions:[{[g]:k,[f]:[ke,B]}],rules:[{conditions:[{[g]:w,[f]:[{[g]:Z,[f]:[tt,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:A,headers:A},[p]:y},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:A,headers:A},[p]:y}],[p]:R},{error:"FIPS is enabled but this partition does not support FIPS",[p]:U}],[p]:R},{conditions:Ne,rules:[{conditions:[xe],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:A,headers:A},[p]:y}],[p]:R},{error:"DualStack is enabled but this partition does not support DualStack",[p]:U}],[p]:R},Ie,{endpoint:{url:Te,properties:A,headers:A},[p]:y}],[p]:R}],[p]:R},{error:"Invalid Configuration: Missing Region",[p]:U}]},hr=fr,Sr=new Ct({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),yr=(e,t={})=>Sr.get(e,()=>Rt(hr,{endpointParams:e,logger:t.logger}));Me.aws=We;const wr=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??q,base64Encoder:e?.base64Encoder??Fe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??yr,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ar,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Fs},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new kt}],logger:e?.logger??new It,protocol:e?.protocol??Gs,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??_t,utf8Decoder:e?.utf8Decoder??ns,utf8Encoder:e?.utf8Encoder??G}),Er=e=>{const t=xt(e),s=()=>t().then(Ft),r=wr(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??$t,credentialDefaultProvider:e?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??gr({serviceId:r.serviceId,clientVersion:mr.version}),maxAttempts:e?.maxAttempts??Ot,region:e?.region??Nt("Region is missing"),requestHandler:os.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||vt),sha256:e?.sha256??Dt,streamCollector:e?.streamCollector??is,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ut)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Mt))}},br=e=>({setRegion(t){e.region=t},region(){return e.region}}),Ar=e=>({region:e.region()}),Pr=e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(n){const i=t.findIndex(o=>o.schemeId===n.schemeId);i===-1?t.push(n):t.splice(i,1,n)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){r=n},credentials(){return r}}},Tr=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Cr=(e,t)=>{const s=Object.assign(br(e),Lt(e),zt(e),Pr(e));return t.forEach(r=>r.configure(s)),Object.assign(e,Ar(s),Ht(s),jt(s),Tr(s))};class st extends Wt{config;constructor(...[t]){const s=Er(t||{});super(s),this.initConfig=s;const r=ur(s),n=Is(r),i=Vt(n),o=Bt(i),a=o,d=Kt(a),c=dr(d),u=Cr(c,t?.extensions||[]);this.config=u,this.middlewareStack.use(qt(this.config)),this.middlewareStack.use(rr(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Qt(this.config)),this.middlewareStack.use(ws(this.config)),this.middlewareStack.use(As(this.config)),this.middlewareStack.use(Cs(this.config)),this.middlewareStack.use(Xt(this.config,{httpAuthSchemeParametersProvider:nr,identityProviderConfigProvider:async l=>new Yt({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Jt(this.config))}destroy(){super.destroy()}}class _ extends Zt{constructor(t){super(t),Object.setPrototypeOf(this,_.prototype)}}class ee extends _{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,ee.prototype)}}class te extends _{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,te.prototype)}}class se extends _{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,se.prototype)}}class re extends _{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,re.prototype)}}class ne extends _{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,ne.prototype)}}class ie extends _{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,ie.prototype)}}class oe extends _{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,oe.prototype)}}const Rr="Arn",_r="AccessKeyId",Ir="AssumeRole",kr="AssumedRoleId",xr="AssumeRoleRequest",Dr="AssumeRoleResponse",ae="AssumedRoleUser",vr="AssumeRoleWithWebIdentity",Nr="AssumeRoleWithWebIdentityRequest",Or="AssumeRoleWithWebIdentityResponse",$r="Audience",ce="Credentials",Mr="ContextAssertion",rt="DurationSeconds",Ur="Expiration",Fr="ExternalId",Lr="ExpiredTokenException",zr="IDPCommunicationErrorException",Hr="IDPRejectedClaimException",jr="InvalidIdentityTokenException",Wr="Key",Vr="MalformedPolicyDocumentException",nt="Policy",it="PolicyArns",Br="ProviderArn",Kr="ProvidedContexts",qr="ProvidedContextsListType",Gr="ProvidedContext",Qr="PolicyDescriptorType",Xr="ProviderId",ot="PackedPolicySize",Jr="PackedPolicyTooLargeException",Yr="Provider",at="RoleArn",Zr="RegionDisabledException",ct="RoleSessionName",en="SecretAccessKey",tn="SubjectFromWebIdentityToken",de="SourceIdentity",sn="SerialNumber",rn="SessionToken",nn="Tags",on="TokenCode",an="TransitiveTagKeys",cn="Tag",dn="Value",un="WebIdentityToken",ln="arn",pn="accessKeySecretType",v="awsQueryError",N="client",mn="clientTokenType",O="error",$="httpError",M="message",gn="policyDescriptorListType",dt="smithy.ts.sdk.synthetic.com.amazonaws.sts",fn="tagListType",h="com.amazonaws.sts";var hn=[0,h,pn,8,0],Sn=[0,h,mn,8,0],ut=[3,h,ae,0,[kr,Rr],[0,0]],yn=[3,h,xr,0,[at,ct,it,nt,rt,nn,an,Fr,sn,on,de,Kr],[0,0,()=>pt,0,1,()=>On,64,0,0,0,0,()=>Nn]],wn=[3,h,Dr,0,[ce,ae,ot,de],[[()=>lt,0],()=>ut,1,0]],En=[3,h,Nr,0,[at,ct,un,Xr,it,nt,rt],[0,0,[()=>Sn,0],0,()=>pt,0,1]],bn=[3,h,Or,0,[ce,tn,ae,ot,Yr,$r,de],[[()=>lt,0],0,()=>ut,1,0,0,0]],lt=[3,h,ce,0,[_r,en,rn,Ur],[0,[()=>hn,0],0,4]],An=[-3,h,Lr,{[v]:["ExpiredTokenException",400],[O]:N,[$]:400},[M],[0]];T.for(h).registerError(An,ee);var Pn=[-3,h,zr,{[v]:["IDPCommunicationError",400],[O]:N,[$]:400},[M],[0]];T.for(h).registerError(Pn,oe);var Tn=[-3,h,Hr,{[v]:["IDPRejectedClaim",403],[O]:N,[$]:403},[M],[0]];T.for(h).registerError(Tn,ne);var Cn=[-3,h,jr,{[v]:["InvalidIdentityToken",400],[O]:N,[$]:400},[M],[0]];T.for(h).registerError(Cn,ie);var Rn=[-3,h,Vr,{[v]:["MalformedPolicyDocument",400],[O]:N,[$]:400},[M],[0]];T.for(h).registerError(Rn,te);var _n=[-3,h,Jr,{[v]:["PackedPolicyTooLarge",400],[O]:N,[$]:400},[M],[0]];T.for(h).registerError(_n,se);var In=[3,h,Qr,0,[ln],[0]],kn=[3,h,Gr,0,[Br,Mr],[0,0]],xn=[-3,h,Zr,{[v]:["RegionDisabledException",403],[O]:N,[$]:403},[M],[0]];T.for(h).registerError(xn,re);var Dn=[3,h,cn,0,[Wr,dn],[0,0]],vn=[-3,dt,"STSServiceException",0,[],[]];T.for(dt).registerError(vn,_);var pt=[1,h,gn,0,()=>In],Nn=[1,h,qr,0,()=>kn],On=[1,h,fn,0,()=>Dn],$n=[9,h,Ir,0,()=>yn,()=>wn],Ln=[9,h,vr,0,()=>En,()=>bn];class Mn extends es.classBuilder().ep(lr).m(function(t,s,r,n){return[ts(r,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc($n).build(){}const zn=Object.freeze(Object.defineProperty({__proto__:null,AssumeRoleCommand:Mn,STSClient:st},Symbol.toStringTag,{value:"Module"}));export{Ln as A,lt as C,An as E,Pn as I,Rn as M,_n as P,xn as R,st as S,Dn as T,_ as a,Mn as b,lr as c,ut as d,yn as e,wn as f,En as g,bn as h,Tn as i,Cn as j,In as k,kn as l,vn as m,$n as n,ee as o,te as p,se as q,re as r,$s as s,ne as t,ie as u,oe as v,zn as w};